【问题标题】:Exception inside runPreRender running 8th Wall Web with ownRunLoop=falserunPreRender 运行 8th Wall Web 时出现异常,其中 ownRunLoop=false
【发布时间】:2019-01-24 02:19:56
【问题描述】:

是否有在某处使用应用拥有的运行循环(使用 ownRunLoop=false)的示例?

当我基于 three.js 应用创建一个简单的示例时:

const onxrloaded = () => {
  const canvas = document.getElementById('camerafeed')
  // Open the camera and start running the camera run loop.
  XR.run({canvas, ownRunLoop:false})

    function render() {
        XR.runPreRender(Date.now());
        XR.runPostRender(Date.now());
    }
    function animate() {
        requestAnimationFrame( animate );
        render();
    }
    animate();
}
window.onload = () => {window.XR ? onxrloaded() : window.addEventListener('xrloaded', onxrloaded)}

我收到以下错误:

xrweb.js:3 Uncaught TypeError: Cannot read property '_c8EmAsm_flushTrace' of undefined
    at Object.V [as runPreRender] (VM737 xrweb.js:3)
    at render (index.js:121)
    at animate (index.js:126)
    at onxrloaded (index.js:128)
    at window.onload (index.js:131)

有什么想法可以解决这个问题吗?

【问题讨论】:

    标签: 8thwall-web


    【解决方案1】:

    您可能需要确保在调用 runPre/PostRender 之前已调用 onStart。

    【讨论】:

    • 是的,这就是问题所在。
    • @griffin2000 你是怎么解决的?另外,您是否有示例演示如何在第 8 面墙中使用 EffectCompose?
    猜你喜欢
    • 1970-01-01
    • 2019-08-26
    • 1970-01-01
    • 1970-01-01
    • 2023-03-06
    • 2019-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多