ReferenceError:在npm项目中没有定义io3d

时间:2017-12-20 08:39:31

标签: archilogic 3d.io

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



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>
&#13;
&#13;
&#13;

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

IO3D正在处理全局变量,io3d未定义。

1 个答案:

答案 0 :(得分:1)

要在ES6模块中使用3dio-js,您可以像

一样导入它
import io3d from '3dio'