Three.js - Rotating a object around certain axis

后端 未结 2 1809
自闭症患者
自闭症患者 2021-01-24 03:15

I\'ve used THREE={REVISION:\"68\"}

I\'ve already done rotation (OBJECT_X) by axis \"z\"http://jsfiddle.net/eVkgs/39/

When I change position OBJECT_X

2条回答
  •  天涯浪人
    2021-01-24 03:57

    I solved this problem this way

    I created the ObjectControls module for ThreeJS that allows you to rotate a single OBJECT (or a Group), and not the SCENE

    Include the libary:

    then

    var controls = new THREE.ObjectControls(camera, renderer.domElement, yourMesh);

    You can find here a live demo here: https://albertopiras.github.io/threeJS-object-controls/

    Here is the repo: https://github.com/albertopiras/threeJS-object-controls.

    I hope this helps

提交回复
热议问题