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

Function createWall

examples/scene-graph/interactive.ts:61–78  ·  view source on GitHub ↗
(sx: number, sz: number, ex: number, ez: number)

Source from the content-addressed store, hash-verified

59const handleToWallId: Map<number, string> = new Map();
60
61function createWall(sx: number, sz: number, ex: number, ez: number): string {
62 const id = "wall_" + String(nextWallId);
63 nextWallId += 1;
64
65 const handle = createSceneNode();
66 const wall: WallData = {
67 id,
68 start: [sx, sz],
69 end: [ex, ez],
70 thickness: 0.2,
71 height: 3.0,
72 handle,
73 };
74 walls.set(id, wall);
75 handleToWallId.set(handle, id);
76 dirtyWalls.add(id);
77 return id;
78}
79
80// ============================================================
81// Wall System (frame callback, priority 4)

Callers 1

interactive.tsFile · 0.85

Calls 1

createSceneNodeFunction · 0.90

Tested by

no test coverage detected