我有一个 aframe 项目,它是 React 应用程序的一部分并且工作正常。
由于各种问题,我正在尝试分离各层
我已将 aframe 场景直接添加到 HTML 文档中
<body>
<div id="root" style="height: 100%; width: 100%">
</div>
<a-scene>
</a-scene>
</body>
Run Code Online (Sandbox Code Playgroud)
React 部分渲染良好,但 AFRAME 崩溃了
类型错误:系统[名称]不是构造函数
从
this.systems[name] = new systems[name](this);
this.systemNames.push(name);
Run Code Online (Sandbox Code Playgroud)
aframe 库是通过 Webpack 导入的。
有什么想法可能导致这种情况吗?