The only fix I have found is super janky and it is to wait for XR8 to load and try by setTimeout
import './index.css'
import {runFacePipeline} from './run-face-pipeline'
const startApp = {
init() {
runFacePipeline()
},
waitForXR8() {
// Check if XR8 is available
if (window.XR8) {
this.init() // Initialize if XR8 is available
} else {
// If not, wait and check again after a short delay
setTimeout(() => this.waitForXR8(), 100)
}
}
}
// Start checking for XR8 when the window loads
window.addEventListener('load', () => startApp.waitForXR8())
I would like to know if there is a better way to do this and not have to wait like this for XR8 to load. As this is a new problem and has been an issue.
@Evan Thats actually the original way I had all my threejs face try on projects. Just recently it stopped working and being intermittent which lead me to doing this setTimeout method which isnβt optimal. Didnβt know if anything could of possibly changed in 8th wall
Are all references to XR8 wrapped inside of the event handler for the xrloaded event? You could also try adding some logs to sanity check - for example: