threers 0.0.4

Drop-in three.js replacement for Rust and WebAssembly (wgpu) — THREE.* API, scene graph, PBR, post-fx, mesh BVH, CSG, an OpenSCAD front end with a watertight exact-CSG kernel, headless render, and native media codecs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Debug material that displays world-space normals as colors.
/// Matches three.js's `MeshNormalMaterial`.
#[derive(Debug, Clone, Copy, Default)]
pub struct NormalMaterial {
    pub opacity: f32,
    pub wireframe: bool,
}

impl NormalMaterial {
    pub const fn new() -> Self {
        Self {
            opacity: 1.0,
            wireframe: false,
        }
    }
}