added camera dependency to xrf component

This commit is contained in:
Leon van Kammen 2024-12-16 14:17:12 +01:00
parent ba90411e6c
commit 78b60210bc
14 changed files with 2648 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* https://xrfragment.org
@ -5225,6 +5230,8 @@ window.AFRAME.registerComponent('xrf', {
http: { type:'string'},
https: { type:'string'},
},
dependencies: ['camera'],
init: async function () {
this.data = this.attrValue ? Object.values(this.attrValue)[0] : ""
@ -5239,8 +5246,6 @@ window.AFRAME.registerComponent('xrf', {
}
}
if( !AFRAME.scenes[0] ) return // ignore if no scene yet
if( !AFRAME.XRF ){
let camera = document.querySelector('[camera]')

5
dist/xrfragment.js vendored
View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* https://xrfragment.org

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* https://xrfragment.org

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Mon Dec 16 02:15:25 PM CET 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/*
* v0.5.1 generated at Mon Dec 16 01:48:34 PM CET 2024
* https://xrfragment.org

View File

@ -3,6 +3,8 @@ window.AFRAME.registerComponent('xrf', {
http: { type:'string'},
https: { type:'string'},
},
dependencies: ['camera'],
init: async function () {
this.data = this.attrValue ? Object.values(this.attrValue)[0] : ""
@ -17,8 +19,6 @@ window.AFRAME.registerComponent('xrf', {
}
}
if( !AFRAME.scenes[0] ) return // ignore if no scene yet
if( !AFRAME.XRF ){
let camera = document.querySelector('[camera]')