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

Function bloom_draw_texture_rec

native/web/src/lib.rs:666–682  ·  view source on GitHub ↗
(
    handle: f64,
    src_x: f64, src_y: f64, src_w: f64, src_h: f64,
    dst_x: f64, dst_y: f64,
    tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64,
)

Source from the content-addressed store, hash-verified

664
665#[wasm_bindgen]
666pub fn bloom_draw_texture_rec(
667 handle: f64,
668 src_x: f64, src_y: f64, src_w: f64, src_h: f64,
669 dst_x: f64, dst_y: f64,
670 tint_r: f64, tint_g: f64, tint_b: f64, tint_a: f64,
671) {
672 let eng = engine();
673 if let Some(tex) = eng.textures.get(handle) {
674 let bind_group_idx = tex.bind_group_idx;
675 eng.renderer.draw_texture_rec(
676 bind_group_idx,
677 src_x, src_y, src_w, src_h,
678 dst_x, dst_y,
679 tint_r, tint_g, tint_b, tint_a,
680 );
681 }
682}
683
684#[wasm_bindgen]
685pub fn bloom_get_texture_width(handle: f64) -> f64 {

Callers

nothing calls this directly

Calls 3

draw_texture_recMethod · 0.80
engineFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected