classic puzzle v1

This commit is contained in:
2025-11-14 18:41:57 +02:00
parent 8eea84b697
commit 3d86e2574a
10 changed files with 2754 additions and 5 deletions
+7
View File
@@ -15,6 +15,7 @@ import { Physics } from './Physics.js';
import { Clickable } from './Clickable.js';
import { DashBoard } from './Dashboard.js';
import { MotionEngine } from './MotionEngine.js';
import { Draggable } from './Draggable.js';
THREE.Cache.enabled = true
@@ -209,6 +210,7 @@ class GameEngine extends THREE.EventDispatcher{
}
this.clickable = new Clickable(20);
this.draggable = new Draggable(20);
}
initXrControllers() {
@@ -485,6 +487,11 @@ class GameEngine extends THREE.EventDispatcher{
this.hero?.characterControls?.idleReset();
}
onPointer(mouseEvent, domElement, type){
let mouse = this.getMouseVector(mouseEvent, domElement);
this.draggable?.update(mouse, this.camera, type);
}
setCamera(camera) {
//camera.updateProjectionMatrix();
this.camera = camera;