threejs bugfix + doc update

This commit is contained in:
Leon van Kammen 2023-05-23 14:57:45 +02:00
parent 4664069235
commit 0832986696
5 changed files with 33 additions and 24 deletions

View file

@ -1176,9 +1176,6 @@ xrf.frag.rot = function(v, opts){
v.y * Math.PI / 180, v.y * Math.PI / 180,
v.z * Math.PI / 180 v.z * Math.PI / 180
) )
// camera.rotation.x = v.x
// camera.rotation.y = v.y
// camera.rotation.z = v.z
camera.updateMatrixWorld() camera.updateMatrixWorld()
} }
// *TODO* use webgl instancing // *TODO* use webgl instancing

View file

@ -1176,9 +1176,6 @@ xrf.frag.rot = function(v, opts){
v.y * Math.PI / 180, v.y * Math.PI / 180,
v.z * Math.PI / 180 v.z * Math.PI / 180
) )
// camera.rotation.x = v.x
// camera.rotation.y = v.y
// camera.rotation.z = v.z
camera.updateMatrixWorld() camera.updateMatrixWorld()
} }
// *TODO* use webgl instancing // *TODO* use webgl instancing

View file

@ -52,18 +52,18 @@ export function setupConsole(el){
})(console.log.bind(console)) })(console.log.bind(console))
} }
export function setupUrlBar(el){ export function setupUrlBar(el,XRF){
var isIframe = (window === window.parent || window.opener) ? false : true; var isIframe = (window === window.parent || window.opener) ? false : true;
if( isIframe ){ if( isIframe ){
// show internal URL bar to test XR fragments interactively // show internal URL bar to test XR fragments interactively
el.style.display = 'block' el.style.display = 'block'
let nav = window.AFRAME.XRF.navigator let nav = XRF.navigator
AFRAME.XRF.navigator.to = ((to) => (url,e) => { XRF.navigator.to = ((to) => (url,e) => {
to(url,e) to(url,e)
reflectUrl(url) reflectUrl(url)
})(AFRAME.XRF.navigator.to) })(XRF.navigator.to)
const reflectUrl = (url) => el.value = url || document.location.search.substr(1) + document.location.hash const reflectUrl = (url) => el.value = url || document.location.search.substr(1) + document.location.hash
reflectUrl() reflectUrl()

View file

@ -166,7 +166,7 @@
setupConsole() setupConsole()
setupUrlBar( $('input#uri') ) setupUrlBar( $('input#uri'), xrfragment )
// GUI // GUI

File diff suppressed because one or more lines are too long