How to integrate aframe to my project ANGULAR-CLI?

£可爱£侵袭症+ 提交于 2019-12-22 10:58:19

问题


Hello try integrating aframe in the following way:

  1. npm install aframe --save

  2. setup the angular-cli.json

    "scripts": ["../node_modules/aframe/dist/aframe-master.js"]
    
  3. Download the typings from https://github.com/devpaul/aframe-typings/blob/master/src/AFRAME.d.ts

  4. setup the tsconfig.json

    "files":["typings/AFRAME.d.ts"]
    

And I get the following error: Cannot find namespace 'THREE'


回答1:


In src/polyfills.ts you can import 'aframe'; before you import 'zone.js/dist/zone'



来源:https://stackoverflow.com/questions/44425128/how-to-integrate-aframe-to-my-project-angular-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!