小编ras*_*hmi的帖子

在Angular2中使用three.js

我试图将three.js场景集成到一个有角度的2页.我是Angular 2和javascript的初学者,我在script.html中包含了脚本标签中的three.js文件,即在scene.component.ts文件中我有这样的代码...

//scene.component.ts
import { Component } from 'angular2/core';
import { THREE } from 'three-js/three';
@Component({
    selector: 'ps-scene',
    templateUrl: 'app/webgl/scene.component.html'
})
export class SceneComponent{
    scene = new THREE.Scene();
}
///////////////
Run Code Online (Sandbox Code Playgroud)

问题在于显示 - 从'three-js/three'导入{THREE};

它与'angular2/core'位于相同的目录路径中

提前致谢.

three.js angular2-directives angular

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

angular ×1

angular2-directives ×1

three.js ×1