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

Function setupGeometryDensity

examples/renderer-test/main.ts:401–428  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

399// culling, batching, and future LOD / virtualized geometry.
400
401function setupGeometryDensity(): void {
402 const cx = 25.0;
403 const cz = -25.0;
404
405 // Ground
406 placeCube(cx, -0.05, cz, 22, 0.1, 22, 0.2, 0.22, 0.25, 0.6, 0.0);
407
408 for (let row = 0; row < 10; row = row + 1) {
409 for (let col = 0; col < 10; col = col + 1) {
410 const x = cx - 9 + col * 2;
411 const z = cz - 9 + row * 2;
412 const height = 0.5 + Math.sin(row * 1.3 + col * 0.7) * 0.3;
413
414 // Alternate cubes and spheres
415 if ((row + col) % 2 === 0) {
416 const r = 0.3 + col * 0.07;
417 const g = 0.3 + row * 0.07;
418 const b = 0.5;
419 placeCube(x, height / 2, z, 0.8, height, 0.8, r, g, b, 0.5, 0.0);
420 } else {
421 const r = 0.5;
422 const g = 0.3 + col * 0.07;
423 const b = 0.3 + row * 0.07;
424 placeSphere(x, height / 2 + 0.25, z, 0.6, r, g, b, 0.4, 0.2);
425 }
426 }
427 }
428}
429
430// ============================================================
431// Zone 6: Thin Geometry / Anti-Aliasing (centered at x=-25, z=-25)

Callers 1

main.tsFile · 0.85

Calls 2

placeCubeFunction · 0.85
placeSphereFunction · 0.85

Tested by

no test coverage detected