pages: minor bugfix
This commit is contained in:
parent
f5c480dcea
commit
9a05968710
6 changed files with 3182 additions and 4 deletions
5
dist/xrfragment.aframe.all.js
vendored
5
dist/xrfragment.aframe.all.js
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Fri Jul 12 04:11:54 PM UTC 2024
|
* v0.5.1 generated at Fri Jul 12 05:00:05 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: MPL-2.0
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -3608,6 +3608,9 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
return
|
return
|
||||||
}else sound.stop()
|
}else sound.stop()
|
||||||
|
|
||||||
|
console.dir(sound)
|
||||||
|
debugger
|
||||||
|
|
||||||
// apply embedded audio/video samplerate/fps or global mixer fps
|
// apply embedded audio/video samplerate/fps or global mixer fps
|
||||||
sound.setLoopStart(v.x);
|
sound.setLoopStart(v.x);
|
||||||
sound.setLoopEnd(v.y || buffer.duration);
|
sound.setLoopEnd(v.y || buffer.duration);
|
||||||
|
|
|
||||||
5
dist/xrfragment.aframe.js
vendored
5
dist/xrfragment.aframe.js
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Fri Jul 12 04:11:54 PM UTC 2024
|
* v0.5.1 generated at Fri Jul 12 05:00:05 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: MPL-2.0
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -3606,6 +3606,9 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
return
|
return
|
||||||
}else sound.stop()
|
}else sound.stop()
|
||||||
|
|
||||||
|
console.dir(sound)
|
||||||
|
debugger
|
||||||
|
|
||||||
// apply embedded audio/video samplerate/fps or global mixer fps
|
// apply embedded audio/video samplerate/fps or global mixer fps
|
||||||
sound.setLoopStart(v.x);
|
sound.setLoopStart(v.x);
|
||||||
sound.setLoopEnd(v.y || buffer.duration);
|
sound.setLoopEnd(v.y || buffer.duration);
|
||||||
|
|
|
||||||
3134
dist/xrfragment.module.js
vendored
3134
dist/xrfragment.module.js
vendored
File diff suppressed because it is too large
Load diff
5
dist/xrfragment.three.js
vendored
5
dist/xrfragment.three.js
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Fri Jul 12 04:11:54 PM UTC 2024
|
* v0.5.1 generated at Fri Jul 12 05:00:05 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: MPL-2.0
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -3606,6 +3606,9 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
return
|
return
|
||||||
}else sound.stop()
|
}else sound.stop()
|
||||||
|
|
||||||
|
console.dir(sound)
|
||||||
|
debugger
|
||||||
|
|
||||||
// apply embedded audio/video samplerate/fps or global mixer fps
|
// apply embedded audio/video samplerate/fps or global mixer fps
|
||||||
sound.setLoopStart(v.x);
|
sound.setLoopStart(v.x);
|
||||||
sound.setLoopEnd(v.y || buffer.duration);
|
sound.setLoopEnd(v.y || buffer.duration);
|
||||||
|
|
|
||||||
5
dist/xrfragment.three.module.js
vendored
5
dist/xrfragment.three.module.js
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* v0.5.1 generated at Fri Jul 12 04:11:54 PM UTC 2024
|
* v0.5.1 generated at Fri Jul 12 05:00:05 PM UTC 2024
|
||||||
* https://xrfragment.org
|
* https://xrfragment.org
|
||||||
* SPDX-License-Identifier: MPL-2.0
|
* SPDX-License-Identifier: MPL-2.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -3606,6 +3606,9 @@ let loadAudio = (mimetype) => function(url,opts){
|
||||||
return
|
return
|
||||||
}else sound.stop()
|
}else sound.stop()
|
||||||
|
|
||||||
|
console.dir(sound)
|
||||||
|
debugger
|
||||||
|
|
||||||
// apply embedded audio/video samplerate/fps or global mixer fps
|
// apply embedded audio/video samplerate/fps or global mixer fps
|
||||||
sound.setLoopStart(v.x);
|
sound.setLoopStart(v.x);
|
||||||
sound.setLoopEnd(v.y || buffer.duration);
|
sound.setLoopEnd(v.y || buffer.duration);
|
||||||
|
|
|
||||||
32
src/3rd/js/three/xrf/dynamic/envmapping.js
Normal file
32
src/3rd/js/three/xrf/dynamic/envmapping.js
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
// switch camera when multiple cameras for url #mycameraname
|
||||||
|
|
||||||
|
xrf.addEventListener('navigateLoaded', (opts) => {
|
||||||
|
// select active camera if any
|
||||||
|
let {id,match,v} = opts
|
||||||
|
let envmap = {}
|
||||||
|
let current = ''
|
||||||
|
|
||||||
|
// Recursive function to traverse the graph
|
||||||
|
function traverseAndSetEnvMap(node, closestAncestorMaterialMap = null) {
|
||||||
|
// Check if the current node has a material
|
||||||
|
if (node.isMesh && node.material) {
|
||||||
|
if (node.material.map && closestAncestorMaterialMap) {
|
||||||
|
// If the node has a material map, set the closest ancestor material map
|
||||||
|
node.material.envMap = closestAncestorMaterialMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the closest ancestor's material map
|
||||||
|
if (node.isMesh && node.material && node.material.map) {
|
||||||
|
closestAncestorMaterialMap = node.material.map.clone();
|
||||||
|
closestAncestorMaterialMap.mapping = THREE.EquirectangularReflectionMapping;
|
||||||
|
closestAncestorMaterialMap.needsUpdate = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Recursively traverse all children
|
||||||
|
node.children.forEach(child => traverseAndSetEnvMap(child, closestAncestorMaterialMap));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start traversal from the root node
|
||||||
|
traverseAndSetEnvMap(xrf.scene);
|
||||||
|
})
|
||||||
Loading…
Add table
Reference in a new issue