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:
Rotate(object3d, rotateX, rotateY, rotateZ) — difficult for users bc EulerAngles
RotateQuaternion(object3d, quaternion) — need to implement quaternion function. Maybe save for later.
LookAt(object3d, vector3) — parents of object3d must be uniformly-scaled
Scale(object3d, scaleX, scaleY, scaleZ) — default scaleY and scaleZ to be same as scaleX.
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.
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:
Rotate(object3d, rotateX, rotateY, rotateZ)
— difficult for users bc EulerAnglesRotateQuaternion(object3d, quaternion)
— need to implement quaternion function. Maybe save for later.LookAt(object3d, vector3)
— parents of object3d must be uniformly-scaledScale(object3d, scaleX, scaleY, scaleZ)
— default scaleY and scaleZ to be same as scaleX.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 onePosition
call, only oneRotate
call, etc., and implement aGroup
function that can create a new local axis system to reset this restriction.