classic puzzle v1
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user