From e5438e9fee2c5310b0398f53f3f34e3405e9b2b5 Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Tue, 4 Jul 2023 15:23:10 +0200 Subject: [PATCH] wip --- src/3rd/js/three/xrf/src.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/3rd/js/three/xrf/src.js b/src/3rd/js/three/xrf/src.js index 2c7e23d..6c7f47a 100644 --- a/src/3rd/js/three/xrf/src.js +++ b/src/3rd/js/three/xrf/src.js @@ -3,11 +3,12 @@ xrf.frag.src = function(v, opts){ opts.embedded = v // indicate embedded XR fragment let { mesh, model, camera, scene, renderer, THREE} = opts - let src = new THREE.Group() - if( v.string[0] == "#" ){ // local - console.log(" └ instancing src") - let frag = xrfragment.URI.parse(v.string) + console.log(" └ instancing src") + let src = new THREE.Group() + let frag = xrfragment.URI.parse(v.string) + + const localSRC = () => { // apply embedded XR fragments setTimeout( () => { @@ -38,4 +39,12 @@ xrf.frag.src = function(v, opts){ if( !opts.recursive ) mesh.material.visible = false // lets hide the preview object because deleting disables animations+nested objs },10) } + + const externalSRC = () => { + console.dir(frag) + + } + + if( v.string[0] == "#" ) localSRC() // local + else externalSRC() }