Skip to content

Commit

Permalink
Fix double world load causing crash of SharedObjects + add shared obj…
Browse files Browse the repository at this point in the history
…ects to champion home
  • Loading branch information
dburleson committed Feb 15, 2024
1 parent c28395f commit 6cf3617
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions spa/assets/worlds/championhome/home.wrl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ WorldInfo {
info ["Created with Vivaty Studio, a Web3D authoring tool"
]
}

EXTERNPROTO SharedObject [
exposedField SFVec3f translation
exposedField SFRotation rotation
exposedField MFNode children
exposedField SFString name
exposedField SFString id
eventIn SFBool startMove
eventOut SFBool isOver
eventOut SFTime touchTime
eventOut SFVec3f newPosition
eventOut SFRotation newRotation
] "/externprotos/shared_xite.wrl#SharedObject"

PROTO BooleanFilter [
eventIn SFBool set_boolean
eventOut SFBool inputFalse
Expand Down
4 changes: 2 additions & 2 deletions spa/src/pages/world-browser/WorldBrowserPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ export default Vue.extend({
});
},
startX3DListeners(browserbak: any): void {
console.log('starting 3d listeners');
const browser = X3D.getBrowser();
const browserProto = Object.getPrototypeOf(browser);
const prox = browser.currentScene.createNode("ProximitySensor");
Expand Down Expand Up @@ -633,7 +632,8 @@ export default Vue.extend({
}
},
"$store.data.view3d": function () {
if (this.$route.name === "world-browser" || this.$route.name === "user-home") {
if (this.$route.name === "world-browser" || this.$route.name === "user-home"
&& this.$store.data.x3dReady) {
this.loadAndJoinPlace();
}
},
Expand Down

0 comments on commit 6cf3617

Please sign in to comment.