2023-10-27 16:55:48 +02:00
|
|
|
xrf.frag.defaultPredefinedViews = (opts) => {
|
2023-08-15 18:27:26 +02:00
|
|
|
let {scene,model} = opts;
|
2023-10-27 16:55:48 +02:00
|
|
|
scene.traverse( (n) => {
|
|
|
|
|
if( n.userData && n.userData['#'] ){
|
|
|
|
|
let frag = xrf.URI.parse( n.userData['#'] )
|
2024-01-24 18:11:37 +00:00
|
|
|
if( n.parent && n.parent.parent.isScene && document.location.hash.length < 2 ){
|
2024-01-29 20:17:57 +01:00
|
|
|
xrf.navigator.to( n.userData['#'] ) // evaluate static XR fragments
|
|
|
|
|
console.log("to")
|
2024-01-24 18:11:37 +00:00
|
|
|
}else{
|
|
|
|
|
xrf.hashbus.pub( n.userData['#'] ) // evaluate static XR fragments
|
2024-01-29 20:17:57 +01:00
|
|
|
console.log("pub")
|
2024-01-24 18:11:37 +00:00
|
|
|
}
|
2023-09-14 10:21:16 +02:00
|
|
|
}
|
2023-10-27 16:55:48 +02:00
|
|
|
})
|
2023-06-08 17:45:21 +02:00
|
|
|
}
|