#45, #47, redundant API request for scenario data invokation

This commit is contained in:
2026-01-27 18:36:32 +02:00
parent af8ea0fc82
commit ffb875b7a3
+10 -3
View File
@@ -14,6 +14,7 @@ export default {
await gameEngine.init(this.$refs.target, {
xr: true,
gizmo: this.env == 'GameDesigner',
stats: this.env != 'GamePlay',
designMode: this.env == 'GameDesigner',
depthSense: this.env == 'GameDesigner' ? false : this.store.prefs.xr.depthSense
});
@@ -68,9 +69,9 @@ export default {
mode(n){
gameEngine.transformControls.setMode(n)
},
async 'object.scenario'(n){
await this.loadScenario()
},
// async 'object.scenario'(n){
// await this.loadScenario()
// },
currentObject(n){
if (this.env == 'GameDesigner'){
gameEngine.transformControls.attach(n.__o);
@@ -282,12 +283,18 @@ export default {
},
resize(){
let r = this.$refs.target;
console.log('resizing!!', r.clientWidth, r.clientHeight, r)
gameEngine.resize(r.clientWidth, r.clientHeight);
//this.zoom = Math.min(r.clientWidth / this.viewBox.w, r.clientHeight / this.viewBox.h);
},
control(){
gameEngine.hero.lockControls();
},
async fullScreen(){
console.log(gameEngine.renderer.domElement);
await gameEngine.renderer.domElement.requestFullscreen()
}
}
}