TS → native FFI layout: 12 f64s per vertex — xyz, nx ny nz, rgba, uv. Color is ignored (material color wins via bloom_scene_set_material_color). Directly install pre-decoded geometry (from a loaded model) into a scene node, bypassing the 12-f64-per-vertex TS FFI layout.
(handle: u32,
positions: Vec<f32>, normals: Vec<f32>, uvs: Vec<f32>, indices: Vec<u32>,
)
| 274 | /// Directly install pre-decoded geometry (from a loaded model) into a scene |
| 275 | /// node, bypassing the 12-f64-per-vertex TS FFI layout. |
| 276 | pub fn set_geometry(handle: u32, |
| 277 | positions: Vec<f32>, normals: Vec<f32>, uvs: Vec<f32>, indices: Vec<u32>, |
| 278 | ) { |
| 279 | mark_dirty(handle, DIRTY_GEOMETRY, |n| { |
| 280 | n.positions = positions; |
| 281 | n.normals = normals; |
| 282 | n.uvs = uvs; |
| 283 | n.indices = indices; |
| 284 | n.geometry_version = n.geometry_version.wrapping_add(1); |
| 285 | }); |
| 286 | } |
| 287 | |
| 288 | pub fn update_geometry_f64(handle: u32, verts: &[f64], indices: &[f64]) { |
| 289 | mark_dirty(handle, DIRTY_GEOMETRY, |n| { |
no test coverage detected