-
Notifications
You must be signed in to change notification settings - Fork 54
Description
It would be awesome if the janusweb-client would also check for existence of href
extras inside 3D models, and allow clicking them.
- https://xrfragment.org/#href (ignore the fragments, just the url is enough)
Usecase
3D scene-files with XR Fragments allow for linking subscenes (or other 3D scene-files) together via clicking href
(metadata).
However, since an URL can be anything, also janusweb URLs can be used.
Suggested implementation:
When a 3D model is loaded in a janusweb scene, traverse the nodes and check for 'href' userData:
// THREEJS pseudocode
model.traverse( (node) => {
if( node.userData.href ){
console.log(node.userData.href) // https://foo.com/anotherjanuspage.html or https://foo.com/other.glb
node.onclick = function(){
if( node.userData.href.match(/\.html$) ) documentlocation.href = node.userData.href
if( node.userData.href.match(/\.glb$) ) model.replace( node.userData.href ) // reload model
}
}
})
This will allow janusweb spaces to spread across 3D files too.
I think this is a win-win, as it increases the metcalfe value of both janusweb AND XR-Fragment compatible 3D files, (and Open URL-driven immersive networks in general)
As per the XR Fragment spec, janusweb URLs will be treated as html-links (opening a tab or replacing the current page) by XR Fragment-compatible 3D viewers, so it'll already be possible to link to janusweb spaces from the local-first file-first XR experiences w/XR Fragment metadata.
Janusweb is a great complementary layer/ecosystem, as multiparty spaces are out scope for the XRF spec.