add physics to interactive objects

This commit is contained in:
2025-11-08 17:08:51 +02:00
parent 168fb5b770
commit f5a08a9702
10 changed files with 67 additions and 36 deletions
@@ -20,6 +20,7 @@
<script>
import { GameEngine } from '@/lib/GameEngine.js';
import { autoScale } from '@/lib/MeshUtils';
let gameEngine = null;
export default{
@@ -75,7 +76,7 @@ export default{
this.animations = gltf.animations.map(a => ({
name: a.name, id: a.uuid
}));
gameEngine.autoScale(gltf.scene);
autoScale(gltf.scene);
let bb = new gameEngine.$.Box3().setFromObject(gltf.scene);
gltf.scene.traverse(function (o) {
o.frustumCulled = false;