Three-freeform-controls (alternative to TransformControls)

Hi!
For the last few months I have been working (on/off) on a controls library for three.js objects. Finally got the time to finish the docs and api reference.
It provides 6-dof rotation and translation controls and is built to be fully customisable (something that I found to be lacking in TransformControls). Please take a look. Thanks!

Github: https://github.com/tocttou/three-freeform-controls
Documentation: https://ashishchaudhary.in/three-freeform-controls/

7 Likes

Hi @tocttou, great work!
I tried to achieve same result in jsfiddle (http://jsfiddle.net/mmalex/cgfm25p9/), maybe now I will use your solution. Thanks!

1 Like

I have issue when use TransformControls.
In mode rotate, i want to rotate object 360 degrees. Code below:

else if (axis === "X"  axis === "Y"  axis === "Z") {
    this.rotationAxis.copy(_unit[axis]);

    this.rotationAngle = this.pointEnd.angleTo(this.pointStart);

    this._startNorm.copy(this.pointStart).normalize();
    this._endNorm.copy(this.pointEnd).normalize();

    this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1;
}

It doesn’t work properly when I change the camera direction. The object’s rotation direction is opposite to the direction of my mouse pointer.
Pls help! Thanks