bugfix regarding aframe update
This commit is contained in:
parent
659c2da2a5
commit
f9be7a946a
|
@ -7,7 +7,11 @@ window.AFRAME.registerComponent('xrf', {
|
|||
|
||||
init: async function () {
|
||||
|
||||
this.data = this.attrValue ? Object.values(this.attrValue)[0] : ""
|
||||
// fix needed since aframe 1.7.0 (non-key/value string values no longer accepted)
|
||||
for( var i in this.data ){
|
||||
if( !this.data[i] ) delete this.data[i]
|
||||
}
|
||||
this.data = Object.keys(this.data)[0] + ":" + Object.values(this.data)[0]
|
||||
|
||||
// override this.data when URL has passed (`://....com/?https://foo.com/index.glb` e.g.)
|
||||
if( typeof this.data == "string" ){
|
||||
|
|
|
@ -18,7 +18,9 @@ xrf.navigator.to = (url,flags,loader,data) => {
|
|||
let URI
|
||||
|
||||
if( typeof url == 'string' ){
|
||||
debugger
|
||||
URI = xrfragment.URI.toAbsolute( xrf.navigator.URI, url )
|
||||
debugger
|
||||
URI.hash = xrf.navigator.reactifyHash(URI.hash) // automatically reflect hash-changes to navigator.to(...)
|
||||
// decorate with extra state
|
||||
URI.fileChange = URI.file && URI.URN + URI.file != xrf.navigator.URI.URN + xrf.navigator.URI.file
|
||||
|
|
|
@ -30,6 +30,8 @@ xrf.filter.scene = function(opts){
|
|||
.sort(frag) // get (sorted) filters from XR Fragments
|
||||
.process(frag,scene,opts) // show/hide things
|
||||
|
||||
if( !scene ) return
|
||||
|
||||
scene.visible = true // always enable scene
|
||||
|
||||
return scene
|
||||
|
|
Loading…
Reference in New Issue