收藏
回答

XR-Frame 3d Marker .map 文件引用问题?

按照示例代码

 <xr-ar-tracker mode="Marker" src="/static/ar/model.map">

      <xr-gltf model="gltf" anim-autoplay position="0.2 0 -0.2" scale="0.6 0.6 0.6" rotation="0 -50 0" />

    </xr-ar-tracker>

真机调试报错:

Error: not node js file system!path:/static/ar/model.map

 [xr-frame] Ar tracker process file error: copyFileSync:fail no such file or directory, copyFile "/static/ar/model.map" -> "wxfile://usr/xr-frame-ar-tracker-ar-tracker-1.map"

Error: Ar tracker process file error: copyFileSync:fail no such file or directory, copyFile "/static/ar/model.map" -> "wxfile://usr/xr-frame-ar-tracker-ar-tracker-1.map"

    at Object.error (https://lib/WAXRFrameRenderContext.js:1:921610)

    at t._setState (https://lib/WAXRFrameRenderContext.js:1:471154)

    at t._saveAndUseFile (https://lib/WAXRFrameRenderContext.js:1:470949)

    at t._processTracker (https://lib/WAXRFrameRenderContext.js:1:470082)

    at t._processData (https://lib/WAXRFrameRenderContext.js:1:469104)

    at t.onAdd (https://lib/WAXRFrameRenderContext.js:1:467314)

    at e._added (https://lib/WAXRFrameRenderContext.js:1:892540)

    at e._added (https://lib/WAXRFrameRenderContext.js:1:900133)

    at https://lib/WAXRFrameRenderContext.js:1:899609

    at e.dfs (https://lib/WAXRFrameRenderContext.js:1:901115)


/static/ar/model.map 换成同位置jpg图片就没有任何问题,并可以完成2d marker效果

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容