MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_draw_material

Function bloom_draw_material

native/web/src/lib.rs:1224–1244  ·  view source on GitHub ↗
(
    material: f64,
    mesh_handle: f64,
    mesh_idx: f64,
    x: f64, y: f64, z: f64, scale: f64,
    r: f64, g: f64, b: f64, a: f64,
)

Source from the content-addressed store, hash-verified

1222
1223#[wasm_bindgen]
1224pub fn bloom_draw_material(
1225 material: f64,
1226 mesh_handle: f64,
1227 mesh_idx: f64,
1228 x: f64, y: f64, z: f64, scale: f64,
1229 r: f64, g: f64, b: f64, a: f64,
1230) {
1231 let eng = engine();
1232 let handle_bits = mesh_handle.to_bits();
1233 if let Some(model) = eng.models.get(mesh_handle) {
1234 eng.renderer.cache_model_if_static(handle_bits, &model.meshes);
1235 }
1236 eng.renderer.submit_material_draw(
1237 material as u32,
1238 handle_bits,
1239 mesh_idx as usize,
1240 [x as f32, y as f32, z as f32],
1241 scale as f32,
1242 [(r / 255.0) as f32, (g / 255.0) as f32, (b / 255.0) as f32, (a / 255.0) as f32],
1243 );
1244}
1245
1246#[wasm_bindgen]
1247pub fn bloom_load_model_animation(_path: f64) -> f64 { 0.0 }

Callers

nothing calls this directly

Calls 4

cache_model_if_staticMethod · 0.80
submit_material_drawMethod · 0.80
engineFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected