【发布时间】:2017-10-06 05:01:57
【问题描述】:
我正在开发一个基于 Angular cli 的应用程序,其中使用了 three.js。我可以将three.js 与import * as THREE from 'three'; 一起使用
但我也想添加Projector.js。
我在.angular-cli.json中添加了以下代码,
"scripts": [
"../node_modules/three/build/three.js",
"../node_modules/three/examples/js/renderers/Projector.js"
],
我想创建一个投影仪对象,例如,
projector: any = new THREE.Projector();
我的浏览器控制台出现错误,
THREE.Projector has been moved to /examples/js/renderers/Projector.js.
如何在 Angular cli 应用程序的组件中使用 projector.js?
【问题讨论】:
标签: angular three.js angular-cli