我无法得到this在TypeScript中使用上述组合的示例。在TypeScript中使用Threejs + OrbitContols
我有<script src="lib/three.min.js"></script>
和<script src="lib/OrbitControls.js"></script>
在我的HTML <head>
和输出文件放在<body>
:
/// <reference path="lib\three.d.ts" />
...
this.controls = new THREE.OrbitControls(this.camera); //there's the error
this.controls.addEventListener('change', this.render);
...
和
this.controls.update();
在定期调用render()
功能。据我所知,该设置是相同的expample,但给了我一个巨大的错误(略)在OrbitControls构造线的编译:
The property 'OrbitControls' does not exist on value of type '{REVISION:string;
CullFace: {[x: number ...
我想有全Threejs中的错误,因为Visual Studio的崩溃当我点击它:)。谢谢你的帮助。
链接中断 – smartmeta
对不起,这里是更新后的链接:https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/three/three-orbitcontrols.d.ts – BenR
@BenR更新后的链接再次被破坏:( –