Skip to content

feature request: support 'href' metadata in 3D models (as per XR Fragments spec) #272

@coderofsalvation

Description

@coderofsalvation

It would be awesome if the janusweb-client would also check for existence of href extras inside 3D models, and allow clicking them.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions