amazing maze
This commit is contained in:
@@ -4,6 +4,7 @@ import { DRACOLoader } from 'three/examples/jsm/Addons.js';
|
||||
import { OrbitControls } from 'three/examples/jsm/Addons.js';
|
||||
//import { Controller as OrbitControls } from './3rd-party/phy/3TH/Controller.js';
|
||||
import { ViewportGizmo } from "three-viewport-gizmo";
|
||||
import Stats from 'three/examples/jsm/libs/stats.module';
|
||||
//import { AnaglyphEffect } from './three/AnaglyphEffect';
|
||||
import { AnaglyphEffect } from 'three/addons/effects/AnaglyphEffect.js';
|
||||
import { StereoEffect } from 'three/addons/effects/StereoEffect.js';
|
||||
@@ -23,7 +24,7 @@ class GameEngine {
|
||||
this.opts = opts;
|
||||
const gameEngine = this;
|
||||
|
||||
this.perspectiveCamera = new THREE.PerspectiveCamera(45, this.aspect, 0.01, 1000);
|
||||
this.perspectiveCamera = new THREE.PerspectiveCamera(45, this.aspect, 0.01, 25);
|
||||
this.raycaster = new THREE.Raycaster();
|
||||
this.perspectiveCamera.position.set(0, 0, 10);
|
||||
|
||||
@@ -163,6 +164,9 @@ class GameEngine {
|
||||
|
||||
await this.initPhysics();
|
||||
|
||||
this.stats = new Stats();
|
||||
document.body.appendChild(this.stats.dom);
|
||||
|
||||
if (opts.ar) {
|
||||
renderer.xr.enabled = true;
|
||||
document.body.appendChild(ARButton.createButton(renderer, {}));
|
||||
@@ -569,6 +573,7 @@ class GameEngine {
|
||||
} else {
|
||||
this.renderer.render(scene, camera);
|
||||
}
|
||||
this.stats?.update()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user