VR headset object management

This commit is contained in:
2025-06-30 23:06:22 +03:00
parent 392a94698b
commit 4ca83b7d87
11 changed files with 71 additions and 53 deletions
+4 -1
View File
@@ -163,7 +163,7 @@ export default {
}
for (let i of this.scene.data.items || []) {
let gltf = await gameEngine.load(`/asset/default/${i.data.$go.asset.name}`);
this.setObjectAttributes(l, i.data, gltf, 10);
this.setObjectAttributes(l, i.data, gltf, 1);
gameEngine.activeObjects.add(gltf.scene);
//console.log(JSON.stringify(l));
//window.gameEngine = gameEngine;
@@ -175,6 +175,9 @@ export default {
// gameEngine.activeObjects.add(camera);
// this.setObjectAttributes(l, { id: 'camera', 'title': 'Main camera' }, { scene: camera })
// cameraHelper.update();
//this is needed cause when mounted canvas has different size
this.resize();
},
async expandScenarioData(scene){
scene.data.$environment = (await this.$api.gameObject.load(scene.data.environment)).data