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

Function placeCube

examples/renderer-test/main.ts:239–255  ·  view source on GitHub ↗
(
  px: number, py: number, pz: number,
  sx: number, sy: number, sz: number,
  cr: number, cg: number, cb: number,
  roughness: number, metalness: number,
)

Source from the content-addressed store, hash-verified

237}
238
239function placeCube(
240 px: number, py: number, pz: number,
241 sx: number, sy: number, sz: number,
242 cr: number, cg: number, cb: number,
243 roughness: number, metalness: number,
244): number {
245 const node = placeNode(cubeHandle, 0, px, py, pz, sx, sy, sz);
246 setSceneNodeColor(node, cr, cg, cb);
247 setSceneNodePbr(node, roughness, metalness);
248 // Thin horizontal slabs (floors) should receive but not cast
249 // shadows — otherwise they fill the shadow map with their own
250 // depth and everything reads as "in shadow of the ground".
251 if (sy <= 0.3) {
252 setSceneNodeCastShadow(node, false);
253 }
254 return node;
255}
256
257// ============================================================
258// Zone 1: PBR Material Gallery (centered at origin)

Callers 8

setupMaterialGalleryFunction · 0.85
setupLightArenaFunction · 0.85
setupShadowTestFunction · 0.85
setupWaterFunction · 0.85
setupGeometryDensityFunction · 0.85
setupThinGeometryFunction · 0.85
setupGroundFunction · 0.85
setupGltfModelFunction · 0.85

Calls 4

setSceneNodeColorFunction · 0.90
setSceneNodePbrFunction · 0.90
setSceneNodeCastShadowFunction · 0.90
placeNodeFunction · 0.85

Tested by

no test coverage detected