jared-hughes / DesThree

Desmos bindings for three.js
3 stars 0 forks source link

Add other transformations besides Position #44

Open jared-hughes opened 3 years ago

jared-hughes commented 3 years ago

We currently have the Position function to move meshes around, but Object3D supports so much more, main ones being rotation and scale.

I envision the following four additional functions:

Currently, we clone the object for each Position call, which would cause 4× memory usage (and increased CPU usage) if an object is positioned, rotated, and scaled. Before implementing this, should restrict each object to only one Position call, only one Rotate call, etc., and implement a Group function that can create a new local axis system to reset this restriction.

jared-hughes commented 3 years ago

Probably want no Euler angles as those are confusing.

Instead of RotateQuaternion, use RotateAboutAxis(object, vector, angle)