bugfix: ignore non-XRF fragments

This commit is contained in:
Leon van Kammen 2024-10-13 14:08:45 +02:00
parent 69e801e4a5
commit 89147de484
14 changed files with 2171 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Sun Oct 13 02:08:22 PM CEST 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
* https://xrfragment.org * https://xrfragment.org
@ -4044,7 +4049,7 @@ xrf.addEventListener('dynamicKeyValue', (opts) => {
xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname
} }
if( !xrf.URI.vars[ v.string ] ) return console.error(`'${v.string}' metadata-key not found in scene`) if( !xrf.URI.vars[ v.string ] ) return // ignore non-template URI fragments
//if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`) //if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`)
if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`) if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`)

5
dist/xrfragment.js vendored
View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Sun Oct 13 02:08:22 PM CEST 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 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

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 02:08:22 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
*/ */

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Sun Oct 13 02:08:22 PM CEST 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
* https://xrfragment.org * https://xrfragment.org
@ -4044,7 +4049,7 @@ xrf.addEventListener('dynamicKeyValue', (opts) => {
xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname
} }
if( !xrf.URI.vars[ v.string ] ) return console.error(`'${v.string}' metadata-key not found in scene`) if( !xrf.URI.vars[ v.string ] ) return // ignore non-template URI fragments
//if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`) //if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`)
if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`) if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`)

View File

@ -1,3 +1,8 @@
/*
* v0.5.1 generated at Sun Oct 13 02:08:22 PM CEST 2024
* https://xrfragment.org
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/* /*
* v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024 * v0.5.1 generated at Sun Oct 13 01:57:25 PM CEST 2024
* https://xrfragment.org * https://xrfragment.org
@ -4044,7 +4049,7 @@ xrf.addEventListener('dynamicKeyValue', (opts) => {
xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname
} }
if( !xrf.URI.vars[ v.string ] ) return console.error(`'${v.string}' metadata-key not found in scene`) if( !xrf.URI.vars[ v.string ] ) return // ignore non-template URI fragments
//if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`) //if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`)
if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`) if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`)

View File

@ -53,7 +53,7 @@ xrf.addEventListener('dynamicKeyValue', (opts) => {
xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname xrf.frag.dynamic.material(v,opts) // check if fragment is an objectname
} }
if( !xrf.URI.vars[ v.string ] ) return console.error(`'${v.string}' metadata-key not found in scene`) if( !xrf.URI.vars[ v.string ] ) return // ignore non-template URI fragments
//if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`) //if( xrf.URI.vars[ id ] && !match.length ) return console.error(`'${id}' object/tag/metadata-key not found in scene`)
if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`) if( xrf.debug ) console.log(`URI.vars[${id}] => '${v.string}'`)