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
/// A typed vertex attribute, equivalent to three.js's `BufferAttribute`.
////// `item_size` is the number of components per vertex (e.g. 3 for position).
#[derive(Debug, Clone)]pubstructBufferAttribute{pubarray:Vec<f32>,
pubitem_size:usize,
}implBufferAttribute{pubfnnew(array:Vec<f32>, item_size:usize)->Self{Self{ array, item_size }}pubfncount(&self)->usize{self.array.len()/self.item_size
}}