Using Threejs + OrbitContols in TypeScript

前端 未结 14 1234
清歌不尽
清歌不尽 2021-02-07 11:59

I\'m not able to get this example of using the aforementioned combo going in TypeScript.

I have and <

14条回答
  •  你的背包
    2021-02-07 12:19

    As described in the docs do the following:

    import * as THREE from 'three';
    import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
    

    Important is that you use the folder jsm instead of js. And keep in mind that not all modules are available in the jsm folder yet

提交回复
热议问题