feat(world): Palmen und Requisiten als Instanzen mit Stammkollision
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2469d30e76
commit
9173400caa
16 files changed
+2504
-1
No files matched your search
@@ -69,6 +69,15 @@ export class ChunkStreamer {
|
||||
// Straßen und Bodenflächen sind reine Auflagen; Kollision trägt die Landplatte.
|
||||
(DECALS.has(name) ? group : collide).add(mesh);
|
||||
}
|
||||
// this.props ist seit Task 8 ein optionales Konstruktorfeld (siehe dortiger
|
||||
// Kommentar); die bestehenden Streaming-Tests bauen einen ChunkStreamer ohne
|
||||
// props auf und dürfen dabei nicht auf einmal an einem unbedingten Aufruf
|
||||
// scheitern — daher die Wache, statt props stillschweigend zur Pflicht zu machen.
|
||||
if (this.props) {
|
||||
const props = this.props.build(chunk);
|
||||
group.add(props.visual);
|
||||
for (const trunk of props.colliders) collide.add(trunk); // wandern in dieselbe BVH
|
||||
}
|
||||
group.add(collide);
|
||||
this.scene.add(group);
|
||||
group.updateMatrixWorld(true);
|
||||
|
||||
Reference in new issue
Block a user