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

Function drawMeshWithMaterial

src/models/index.ts:612–622  ·  view source on GitHub ↗
(
  material: number, mesh: Model,
  position: Vec3, scale: number, tint: Color,
  meshIdx: number = 0,
)

Source from the content-addressed store, hash-verified

610/// default 0 for single-mesh models. Loop 0..mesh.meshCount when
611/// rendering a multi-primitive GLB through a custom material.
612export function drawMeshWithMaterial(
613 material: number, mesh: Model,
614 position: Vec3, scale: number, tint: Color,
615 meshIdx: number = 0,
616): void {
617 bloom_draw_material(
618 material, mesh.handle, meshIdx,
619 position.x, position.y, position.z, scale,
620 tint.r, tint.g, tint.b, tint.a,
621 );
622}
623
624/// Draw every primitive of a multi-mesh GLB with the same material.
625/// Convenience wrapper around `drawMeshWithMaterial` that loops

Callers

nothing calls this directly

Calls 1

bloom_draw_materialFunction · 0.50

Tested by

no test coverage detected