allow fullscreen in game preview

This commit is contained in:
2026-02-27 12:16:31 +02:00
parent 30b49ba573
commit 6b94bde264
7 changed files with 16 additions and 12 deletions
+4 -3
View File
@@ -23,6 +23,7 @@ import { Telemetry } from './Telemetry.js';
THREE.Cache.enabled = true
const assetPath = '/asset/default/';
const defaultLightIntensity = 22;
class GameEngine extends EventManager{
async init(domNode, opts = {}) {
@@ -51,7 +52,7 @@ class GameEngine extends EventManager{
this.initCameraPivot()
this.ambientLight = new THREE.AmbientLight( 0x404040, 11 ); // soft white light
this.ambientLight = new THREE.AmbientLight( 0x404040, defaultLightIntensity ); // soft white light
scene.add( this.ambientLight );
// var hemiLight = new THREE.HemisphereLight( 0xffffff, 0x444444, 10 );
@@ -142,7 +143,7 @@ class GameEngine extends EventManager{
//const controls = new MapControls( camera, renderer.domElement );
this.transformControls = new TransformControls(this.camera, renderer.domElement);
this.transformControls.addEventListener('dragging-changed', function (event) {
controls.enabled = !event.value;
gameEngine.orbitControls.enabled = !event.value;
});
this.pointerControls = new PointerControls(this);
@@ -631,7 +632,7 @@ class GameEngine extends EventManager{
t
},{
o: this.ambientLight,
a: { intensity: show ? 0.1 : 11},
a: { intensity: show ? 0.1 : defaultLightIntensity},
t
}
])