2

我试图将场景数据加载到框架中,然后出现以下错误

3dio.js:13140 Uncaught (in promise) ReferenceError: io3d is not defined
    at NewComponent.update (3dio.js:13140)
    at NewComponent.updateProperties (aframe-master.js:73663)
    at HTMLElement.value (aframe-master.js:72467)
    at doUpdateComponent (aframe-master.js:72441)
    at Array.forEach (<anonymous>)
    at HTMLElement.value (aframe-master.js:72423)
    at entityLoadCallback (aframe-master.js:72234)
    at emitLoaded (aframe-master.js:73071)
    at <anonymous>

"dependencies": {
    "3dio": "^1.1.1",
    "aframe": "^0.6.0",
    "aframe-animation-component": "^3.2.5",
 }

IO3D 在全局变量上工作,io3d 没有定义。

4

1 回答 1

1

要在 ES6 模块中使用 3dio-js,您可以像这样导入它

import io3d from '3dio'
于 2018-01-02T02:55:18.990 回答