This commit is contained in:
2026-02-17 20:46:55 +02:00
parent 50fae1396d
commit cc1c81969b
2 changed files with 6 additions and 2 deletions
@@ -46,6 +46,7 @@ export default{
}, },
beforeUnmount() { beforeUnmount() {
gameEngine?.stop(); gameEngine?.stop();
gameEngine?.destroy();
}, },
watch:{ watch:{
object(n){ object(n){
@@ -55,7 +56,10 @@ export default{
if (!this.obj) return; if (!this.obj) return;
gameEngine = new GameEngine(); gameEngine = new GameEngine();
this.gameEngine = gameEngine; this.gameEngine = gameEngine;
await gameEngine.init(this.$refs.target, {gizmo: true}); await gameEngine.init(this.$refs.target, {
gizmo: true,
xr: true,
});
await this.loadAsset(); await this.loadAsset();
} }
}, },
@@ -20,7 +20,7 @@ export default {
data(){ data(){
return { return {
query: { query: {
type: { $in: this.$p.objectTypes.filter(t=>!this.type || this.type.includes(t.type)).map(t=>t.value) } type: { '*in': this.$p.objectTypes.filter(t=>!this.type || this.type.includes(t.type)).map(t=>t.value) }
}, },
activatorProps:{}, activatorProps:{},
dialog: false dialog: false