xr and gameplay

This commit is contained in:
2025-06-02 19:29:44 +03:00
parent c09eb1485c
commit b1de42dcb7
7 changed files with 294 additions and 0 deletions
+2
View File
@@ -9,6 +9,7 @@ import { StereoEffect } from 'three/addons/effects/StereoEffect.js';
import { MapControls } from 'three/addons/controls/MapControls.js';
import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls.js';
import { TransformControls } from 'three/addons/controls/TransformControls.js';
import { ARButton } from 'three/addons/webxr/ARButton.js';
class GameEngine {
async init(domNode) {
@@ -140,6 +141,7 @@ class GameEngine {
controls.rotateSpeed = 1 / gameEngine.camera.zoom;
gameEngine.camera.updateProjectionMatrix();
})
document.body.appendChild( ARButton.createButton( renderer, { } ) );
}
$ = THREE;