improved cam positioning + elevator demo
This commit is contained in:
parent
4d68b50ede
commit
69e801e4a5
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,288 @@
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:46:46 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:30 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:07 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:43:13 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:39:19 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:38:42 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:37:55 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:36:54 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:35:57 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:34:06 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:33:40 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:32:37 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:36 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:05 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:44 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:33 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:05 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:02:37 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:57:29 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:56:22 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:42:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:40:16 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:36:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:35:27 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:31:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:29:12 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:28:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:45 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:24:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:20:54 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:19:35 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:16:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:59:00 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:54:20 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:49:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:47:23 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:46:21 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:40:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:37:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:36:49 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 09:01:32 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:11 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:26 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:56:58 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
|
@ -2199,7 +2484,9 @@ xrf.parseModel = function(model,url){
|
||||||
model.file = file
|
model.file = file
|
||||||
model.isXRF = true
|
model.isXRF = true
|
||||||
model.scene.isXRFRoot = true
|
model.scene.isXRFRoot = true
|
||||||
model.scene.traverse( (n) => n.isXRF = true ) // mark for deletion during reset()
|
model.scene.traverse( (n) => {
|
||||||
|
n.isXRF = true
|
||||||
|
}) // mark for deletion during reset()
|
||||||
|
|
||||||
xrf.emit('parseModel',{model,url,file})
|
xrf.emit('parseModel',{model,url,file})
|
||||||
}
|
}
|
||||||
|
@ -2258,9 +2545,17 @@ xrf.reset = () => {
|
||||||
|
|
||||||
// allow others to reset certain events
|
// allow others to reset certain events
|
||||||
xrf.emit('reset',{})
|
xrf.emit('reset',{})
|
||||||
|
|
||||||
|
// reattach camera to root scene
|
||||||
|
xrf.scene.attach(xrf.camera)
|
||||||
|
xrf.camera.position.set(0,0,0)
|
||||||
|
xrf.camera.updateMatrixWorld()
|
||||||
|
xrf.camera.getCam().updateMatrixWorld()
|
||||||
|
|
||||||
const disposeObject = (obj) => {
|
const disposeObject = (obj) => {
|
||||||
if (obj.children.length > 0) obj.children.forEach((child) => disposeObject(child));
|
if (obj.children.length > 0){
|
||||||
|
obj.children.forEach((child) => disposeObject(child));
|
||||||
|
}
|
||||||
if (obj.geometry) obj.geometry.dispose();
|
if (obj.geometry) obj.geometry.dispose();
|
||||||
if (obj.material) {
|
if (obj.material) {
|
||||||
if (obj.material.map) obj.material.map.dispose();
|
if (obj.material.map) obj.material.map.dispose();
|
||||||
|
@ -2680,20 +2975,17 @@ xrf.frag.pos = function(v, opts){
|
||||||
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
|
|
||||||
let pos = v
|
let pos = v
|
||||||
|
|
||||||
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
||||||
if( pos.x == undefined ){
|
if( pos.x == undefined ){
|
||||||
let obj = scene.getObjectByName(v.string)
|
let obj = scene.getObjectByName(v.string)
|
||||||
if( !obj ) return
|
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||||
pos = obj.position.clone()
|
let worldPos = new THREE.Vector3()
|
||||||
obj.getWorldPosition(pos)
|
obj.getWorldPosition(worldPos)
|
||||||
camera.position.copy(pos)
|
camera.position.copy(worldPos)
|
||||||
obj.attach(camera)
|
obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||||
camera.position.set(0,0,0)
|
camera.position.set(0,0,0)
|
||||||
let c = camera.getCam().rotation
|
let c = camera.rotation
|
||||||
c.set( c.x, obj.rotation.y, c.z )
|
c.set( c.x, obj.rotation.y, c.z )
|
||||||
|
|
||||||
obj.updateMatrixWorld(); // Update parent’s world matrix
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
||||||
|
@ -2707,6 +2999,7 @@ xrf.frag.pos = function(v, opts){
|
||||||
xrf.frag.pos.lastVector3 = camera.position.clone()
|
xrf.frag.pos.lastVector3 = camera.position.clone()
|
||||||
|
|
||||||
camera.updateMatrixWorld()
|
camera.updateMatrixWorld()
|
||||||
|
camera.getCam().updateMatrixWorld()
|
||||||
}
|
}
|
||||||
|
|
||||||
xrf.frag.pos.get = function(precision,randomize){
|
xrf.frag.pos.get = function(precision,randomize){
|
||||||
|
@ -3503,20 +3796,6 @@ xrf.sceneToTranscript = (scene, ignoreMesh ) => {
|
||||||
}
|
}
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
// switch camera when multiple cameras for url #mycameraname
|
||||||
|
|
||||||
xrf.addEventListener('dynamicKey', (opts) => {
|
|
||||||
// select active camera if any
|
|
||||||
let {id,match,v} = opts
|
|
||||||
match.map( (w) => {
|
|
||||||
w.nodes.map( (node) => {
|
|
||||||
if( node.isCamera ){
|
|
||||||
console.log("switching camera to cam: "+node.name)
|
|
||||||
xrf.model.camera = node
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
|
||||||
|
|
||||||
xrf.addEventListener('navigateLoaded', (opts) => {
|
xrf.addEventListener('navigateLoaded', (opts) => {
|
||||||
// select active camera if any
|
// select active camera if any
|
||||||
let {id,match,v,THREE} = opts
|
let {id,match,v,THREE} = opts
|
||||||
|
@ -3873,6 +4152,7 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
||||||
: new THREE.Audio( camera.listener )
|
: new THREE.Audio( camera.listener )
|
||||||
|
|
||||||
|
sound.isXRF = true
|
||||||
mesh.media = mesh.media || {}
|
mesh.media = mesh.media || {}
|
||||||
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,288 @@
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:46:46 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:30 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:07 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:43:13 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:39:19 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:38:42 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:37:55 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:36:54 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:35:57 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:34:06 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:33:40 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:32:37 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:36 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:05 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:44 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:33 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:05 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:02:37 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:57:29 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:56:22 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:42:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:40:16 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:36:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:35:27 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:31:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:29:12 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:28:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:45 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:24:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:20:54 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:19:35 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:16:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:59:00 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:54:20 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:49:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:47:23 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:46:21 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:40:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:37:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:36:49 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 09:01:32 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:11 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:26 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:56:58 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
@ -747,7 +747,10 @@ window.frontend = (opts) => new Proxy({
|
||||||
if( !data.selected ) return
|
if( !data.selected ) return
|
||||||
|
|
||||||
|
|
||||||
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ data.xrf ? data.xrf.string : data.mesh.userData.src}<br>` : ''
|
let topic = data.xrf ? data.xrf.string : data.mesh.userData.src
|
||||||
|
if( topic.length > 20 ) topic = topic.replace(/.*\//,'')
|
||||||
|
|
||||||
|
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ topic }<br>` : ''
|
||||||
let metadata = data.mesh.userData
|
let metadata = data.mesh.userData
|
||||||
let meta = xrf.Parser.getMetaData()
|
let meta = xrf.Parser.getMetaData()
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,3 +1,288 @@
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:46:46 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:30 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:07 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:43:13 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:39:19 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:38:42 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:37:55 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:36:54 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:35:57 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:34:06 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:33:40 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:32:37 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:36 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:05 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:44 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:33 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:05 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:02:37 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:57:29 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:56:22 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:42:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:40:16 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:36:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:35:27 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:31:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:29:12 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:28:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:45 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:24:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:20:54 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:19:35 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:16:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:59:00 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:54:20 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:49:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:47:23 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:46:21 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:40:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:37:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:36:49 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 09:01:32 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:11 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:26 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:56:58 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
|
@ -2199,7 +2484,9 @@ xrf.parseModel = function(model,url){
|
||||||
model.file = file
|
model.file = file
|
||||||
model.isXRF = true
|
model.isXRF = true
|
||||||
model.scene.isXRFRoot = true
|
model.scene.isXRFRoot = true
|
||||||
model.scene.traverse( (n) => n.isXRF = true ) // mark for deletion during reset()
|
model.scene.traverse( (n) => {
|
||||||
|
n.isXRF = true
|
||||||
|
}) // mark for deletion during reset()
|
||||||
|
|
||||||
xrf.emit('parseModel',{model,url,file})
|
xrf.emit('parseModel',{model,url,file})
|
||||||
}
|
}
|
||||||
|
@ -2258,9 +2545,17 @@ xrf.reset = () => {
|
||||||
|
|
||||||
// allow others to reset certain events
|
// allow others to reset certain events
|
||||||
xrf.emit('reset',{})
|
xrf.emit('reset',{})
|
||||||
|
|
||||||
|
// reattach camera to root scene
|
||||||
|
xrf.scene.attach(xrf.camera)
|
||||||
|
xrf.camera.position.set(0,0,0)
|
||||||
|
xrf.camera.updateMatrixWorld()
|
||||||
|
xrf.camera.getCam().updateMatrixWorld()
|
||||||
|
|
||||||
const disposeObject = (obj) => {
|
const disposeObject = (obj) => {
|
||||||
if (obj.children.length > 0) obj.children.forEach((child) => disposeObject(child));
|
if (obj.children.length > 0){
|
||||||
|
obj.children.forEach((child) => disposeObject(child));
|
||||||
|
}
|
||||||
if (obj.geometry) obj.geometry.dispose();
|
if (obj.geometry) obj.geometry.dispose();
|
||||||
if (obj.material) {
|
if (obj.material) {
|
||||||
if (obj.material.map) obj.material.map.dispose();
|
if (obj.material.map) obj.material.map.dispose();
|
||||||
|
@ -2680,20 +2975,17 @@ xrf.frag.pos = function(v, opts){
|
||||||
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
|
|
||||||
let pos = v
|
let pos = v
|
||||||
|
|
||||||
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
||||||
if( pos.x == undefined ){
|
if( pos.x == undefined ){
|
||||||
let obj = scene.getObjectByName(v.string)
|
let obj = scene.getObjectByName(v.string)
|
||||||
if( !obj ) return
|
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||||
pos = obj.position.clone()
|
let worldPos = new THREE.Vector3()
|
||||||
obj.getWorldPosition(pos)
|
obj.getWorldPosition(worldPos)
|
||||||
camera.position.copy(pos)
|
camera.position.copy(worldPos)
|
||||||
obj.attach(camera)
|
obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||||
camera.position.set(0,0,0)
|
camera.position.set(0,0,0)
|
||||||
let c = camera.getCam().rotation
|
let c = camera.rotation
|
||||||
c.set( c.x, obj.rotation.y, c.z )
|
c.set( c.x, obj.rotation.y, c.z )
|
||||||
|
|
||||||
obj.updateMatrixWorld(); // Update parent’s world matrix
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
||||||
|
@ -2707,6 +2999,7 @@ xrf.frag.pos = function(v, opts){
|
||||||
xrf.frag.pos.lastVector3 = camera.position.clone()
|
xrf.frag.pos.lastVector3 = camera.position.clone()
|
||||||
|
|
||||||
camera.updateMatrixWorld()
|
camera.updateMatrixWorld()
|
||||||
|
camera.getCam().updateMatrixWorld()
|
||||||
}
|
}
|
||||||
|
|
||||||
xrf.frag.pos.get = function(precision,randomize){
|
xrf.frag.pos.get = function(precision,randomize){
|
||||||
|
@ -3503,20 +3796,6 @@ xrf.sceneToTranscript = (scene, ignoreMesh ) => {
|
||||||
}
|
}
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
// switch camera when multiple cameras for url #mycameraname
|
||||||
|
|
||||||
xrf.addEventListener('dynamicKey', (opts) => {
|
|
||||||
// select active camera if any
|
|
||||||
let {id,match,v} = opts
|
|
||||||
match.map( (w) => {
|
|
||||||
w.nodes.map( (node) => {
|
|
||||||
if( node.isCamera ){
|
|
||||||
console.log("switching camera to cam: "+node.name)
|
|
||||||
xrf.model.camera = node
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
|
||||||
|
|
||||||
xrf.addEventListener('navigateLoaded', (opts) => {
|
xrf.addEventListener('navigateLoaded', (opts) => {
|
||||||
// select active camera if any
|
// select active camera if any
|
||||||
let {id,match,v,THREE} = opts
|
let {id,match,v,THREE} = opts
|
||||||
|
@ -3873,6 +4152,7 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
||||||
: new THREE.Audio( camera.listener )
|
: new THREE.Audio( camera.listener )
|
||||||
|
|
||||||
|
sound.isXRF = true
|
||||||
mesh.media = mesh.media || {}
|
mesh.media = mesh.media || {}
|
||||||
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,288 @@
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:46:46 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:30 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:45:07 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:43:13 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:39:19 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:38:42 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:37:55 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:36:54 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:35:57 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:34:06 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:33:40 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:32:37 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:36 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 01:31:05 PM CEST 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:44 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:04:33 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:03:05 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 11:02:37 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:57:29 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:56:22 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:42:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:40:16 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:36:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:35:27 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:31:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:29:12 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:28:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:45 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:27:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:24:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:20:54 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:19:35 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:16:06 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:31 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 10:13:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:59:00 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:58:07 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:54:20 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:49:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:47:23 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:46:21 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:40:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:37:15 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Sun Oct 13 09:36:49 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 09:01:32 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:38 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:59:11 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:59 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:26 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:58:08 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:41 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:57:14 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
* v0.5.1 generated at Tue Oct 8 08:56:58 AM UTC 2024
|
||||||
|
* https://xrfragment.org
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
* v0.5.1 generated at Mon Oct 7 06:59:29 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
|
@ -2199,7 +2484,9 @@ xrf.parseModel = function(model,url){
|
||||||
model.file = file
|
model.file = file
|
||||||
model.isXRF = true
|
model.isXRF = true
|
||||||
model.scene.isXRFRoot = true
|
model.scene.isXRFRoot = true
|
||||||
model.scene.traverse( (n) => n.isXRF = true ) // mark for deletion during reset()
|
model.scene.traverse( (n) => {
|
||||||
|
n.isXRF = true
|
||||||
|
}) // mark for deletion during reset()
|
||||||
|
|
||||||
xrf.emit('parseModel',{model,url,file})
|
xrf.emit('parseModel',{model,url,file})
|
||||||
}
|
}
|
||||||
|
@ -2258,9 +2545,17 @@ xrf.reset = () => {
|
||||||
|
|
||||||
// allow others to reset certain events
|
// allow others to reset certain events
|
||||||
xrf.emit('reset',{})
|
xrf.emit('reset',{})
|
||||||
|
|
||||||
|
// reattach camera to root scene
|
||||||
|
xrf.scene.attach(xrf.camera)
|
||||||
|
xrf.camera.position.set(0,0,0)
|
||||||
|
xrf.camera.updateMatrixWorld()
|
||||||
|
xrf.camera.getCam().updateMatrixWorld()
|
||||||
|
|
||||||
const disposeObject = (obj) => {
|
const disposeObject = (obj) => {
|
||||||
if (obj.children.length > 0) obj.children.forEach((child) => disposeObject(child));
|
if (obj.children.length > 0){
|
||||||
|
obj.children.forEach((child) => disposeObject(child));
|
||||||
|
}
|
||||||
if (obj.geometry) obj.geometry.dispose();
|
if (obj.geometry) obj.geometry.dispose();
|
||||||
if (obj.material) {
|
if (obj.material) {
|
||||||
if (obj.material.map) obj.material.map.dispose();
|
if (obj.material.map) obj.material.map.dispose();
|
||||||
|
@ -2680,20 +2975,17 @@ xrf.frag.pos = function(v, opts){
|
||||||
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
|
|
||||||
let pos = v
|
let pos = v
|
||||||
|
|
||||||
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
||||||
if( pos.x == undefined ){
|
if( pos.x == undefined ){
|
||||||
let obj = scene.getObjectByName(v.string)
|
let obj = scene.getObjectByName(v.string)
|
||||||
if( !obj ) return
|
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||||
pos = obj.position.clone()
|
let worldPos = new THREE.Vector3()
|
||||||
obj.getWorldPosition(pos)
|
obj.getWorldPosition(worldPos)
|
||||||
camera.position.copy(pos)
|
camera.position.copy(worldPos)
|
||||||
obj.attach(camera)
|
obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||||
camera.position.set(0,0,0)
|
camera.position.set(0,0,0)
|
||||||
let c = camera.getCam().rotation
|
let c = camera.rotation
|
||||||
c.set( c.x, obj.rotation.y, c.z )
|
c.set( c.x, obj.rotation.y, c.z )
|
||||||
|
|
||||||
obj.updateMatrixWorld(); // Update parent’s world matrix
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
||||||
|
@ -2707,6 +2999,7 @@ xrf.frag.pos = function(v, opts){
|
||||||
xrf.frag.pos.lastVector3 = camera.position.clone()
|
xrf.frag.pos.lastVector3 = camera.position.clone()
|
||||||
|
|
||||||
camera.updateMatrixWorld()
|
camera.updateMatrixWorld()
|
||||||
|
camera.getCam().updateMatrixWorld()
|
||||||
}
|
}
|
||||||
|
|
||||||
xrf.frag.pos.get = function(precision,randomize){
|
xrf.frag.pos.get = function(precision,randomize){
|
||||||
|
@ -3503,20 +3796,6 @@ xrf.sceneToTranscript = (scene, ignoreMesh ) => {
|
||||||
}
|
}
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
// switch camera when multiple cameras for url #mycameraname
|
||||||
|
|
||||||
xrf.addEventListener('dynamicKey', (opts) => {
|
|
||||||
// select active camera if any
|
|
||||||
let {id,match,v} = opts
|
|
||||||
match.map( (w) => {
|
|
||||||
w.nodes.map( (node) => {
|
|
||||||
if( node.isCamera ){
|
|
||||||
console.log("switching camera to cam: "+node.name)
|
|
||||||
xrf.model.camera = node
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
|
||||||
|
|
||||||
xrf.addEventListener('navigateLoaded', (opts) => {
|
xrf.addEventListener('navigateLoaded', (opts) => {
|
||||||
// select active camera if any
|
// select active camera if any
|
||||||
let {id,match,v,THREE} = opts
|
let {id,match,v,THREE} = opts
|
||||||
|
@ -3873,6 +4152,7 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
||||||
: new THREE.Audio( camera.listener )
|
: new THREE.Audio( camera.listener )
|
||||||
|
|
||||||
|
sound.isXRF = true
|
||||||
mesh.media = mesh.media || {}
|
mesh.media = mesh.media || {}
|
||||||
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
||||||
|
|
||||||
|
|
Binary file not shown.
12
index.html
12
index.html
File diff suppressed because one or more lines are too long
|
@ -105,7 +105,10 @@ window.frontend = (opts) => new Proxy({
|
||||||
if( !data.selected ) return
|
if( !data.selected ) return
|
||||||
|
|
||||||
|
|
||||||
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ data.xrf ? data.xrf.string : data.mesh.userData.src}<br>` : ''
|
let topic = data.xrf ? data.xrf.string : data.mesh.userData.src
|
||||||
|
if( topic.length > 20 ) topic = topic.replace(/.*\//,'')
|
||||||
|
|
||||||
|
let html = this.notify_links ? `<b class="badge">${data.mesh.isSRC && !data.mesh.portal ? 'src' : 'href'}</b>${ topic }<br>` : ''
|
||||||
let metadata = data.mesh.userData
|
let metadata = data.mesh.userData
|
||||||
let meta = xrf.Parser.getMetaData()
|
let meta = xrf.Parser.getMetaData()
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,9 @@ xrf.parseModel = function(model,url){
|
||||||
model.file = file
|
model.file = file
|
||||||
model.isXRF = true
|
model.isXRF = true
|
||||||
model.scene.isXRFRoot = true
|
model.scene.isXRFRoot = true
|
||||||
model.scene.traverse( (n) => n.isXRF = true ) // mark for deletion during reset()
|
model.scene.traverse( (n) => {
|
||||||
|
n.isXRF = true
|
||||||
|
}) // mark for deletion during reset()
|
||||||
|
|
||||||
xrf.emit('parseModel',{model,url,file})
|
xrf.emit('parseModel',{model,url,file})
|
||||||
}
|
}
|
||||||
|
@ -102,9 +104,17 @@ xrf.reset = () => {
|
||||||
|
|
||||||
// allow others to reset certain events
|
// allow others to reset certain events
|
||||||
xrf.emit('reset',{})
|
xrf.emit('reset',{})
|
||||||
|
|
||||||
|
// reattach camera to root scene
|
||||||
|
xrf.scene.attach(xrf.camera)
|
||||||
|
xrf.camera.position.set(0,0,0)
|
||||||
|
xrf.camera.updateMatrixWorld()
|
||||||
|
xrf.camera.getCam().updateMatrixWorld()
|
||||||
|
|
||||||
const disposeObject = (obj) => {
|
const disposeObject = (obj) => {
|
||||||
if (obj.children.length > 0) obj.children.forEach((child) => disposeObject(child));
|
if (obj.children.length > 0){
|
||||||
|
obj.children.forEach((child) => disposeObject(child));
|
||||||
|
}
|
||||||
if (obj.geometry) obj.geometry.dispose();
|
if (obj.geometry) obj.geometry.dispose();
|
||||||
if (obj.material) {
|
if (obj.material) {
|
||||||
if (obj.material.map) obj.material.map.dispose();
|
if (obj.material.map) obj.material.map.dispose();
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
// switch camera when multiple cameras for url #mycameraname
|
|
||||||
|
|
||||||
xrf.addEventListener('dynamicKey', (opts) => {
|
|
||||||
// select active camera if any
|
|
||||||
let {id,match,v} = opts
|
|
||||||
match.map( (w) => {
|
|
||||||
w.nodes.map( (node) => {
|
|
||||||
if( node.isCamera ){
|
|
||||||
console.log("switching camera to cam: "+node.name)
|
|
||||||
xrf.model.camera = node
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
|
@ -2,16 +2,17 @@ xrf.frag.pos = function(v, opts){
|
||||||
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
|
|
||||||
let pos = v
|
let pos = v
|
||||||
console.dir(pos)
|
|
||||||
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
// spec: indirect coordinate using objectname: https://xrfragment.org/#navigating%203D
|
||||||
if( pos.x == undefined ){
|
if( pos.x == undefined ){
|
||||||
let obj = scene.getObjectByName(v.string)
|
let obj = scene.getObjectByName(v.string)
|
||||||
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
if( !obj ) return console.warn("#pos="+v.string+" not found")
|
||||||
|
let worldPos = new THREE.Vector3()
|
||||||
|
obj.getWorldPosition(worldPos)
|
||||||
|
camera.position.copy(worldPos)
|
||||||
|
obj.attach(camera) // instead of add() [keeps camera animations intact]
|
||||||
camera.position.set(0,0,0)
|
camera.position.set(0,0,0)
|
||||||
obj.attach(camera)
|
let c = camera.rotation
|
||||||
let c = camera.getCam().rotation
|
|
||||||
c.set( c.x, obj.rotation.y, c.z )
|
c.set( c.x, obj.rotation.y, c.z )
|
||||||
obj.updateMatrixWorld(); // Update parent’s world matrix
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
// spec: direct coordinate: https://xrfragment.org/#navigating%203D
|
||||||
|
@ -25,6 +26,7 @@ xrf.frag.pos = function(v, opts){
|
||||||
xrf.frag.pos.lastVector3 = camera.position.clone()
|
xrf.frag.pos.lastVector3 = camera.position.clone()
|
||||||
|
|
||||||
camera.updateMatrixWorld()
|
camera.updateMatrixWorld()
|
||||||
|
camera.getCam().updateMatrixWorld()
|
||||||
}
|
}
|
||||||
|
|
||||||
xrf.frag.pos.get = function(precision,randomize){
|
xrf.frag.pos.get = function(precision,randomize){
|
||||||
|
|
|
@ -17,6 +17,7 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
let sound = isPositionalAudio ? new THREE.PositionalAudio( camera.listener)
|
||||||
: new THREE.Audio( camera.listener )
|
: new THREE.Audio( camera.listener )
|
||||||
|
|
||||||
|
sound.isXRF = true
|
||||||
mesh.media = mesh.media || {}
|
mesh.media = mesh.media || {}
|
||||||
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
mesh.media.audio = { set: (mediafragment,v) => mesh.media.audio[mediafragment] = v }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue