@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user