MozillaReality / mred

INACTIVE - Mixed Reality Editor
27 stars 6 forks source link

add "targetPose" to scene graph nodes #58

Closed blairmacintyre closed 2 months ago

blairmacintyre commented 5 years ago

In WebLayer3D, gheric has a nice feature that every node has a "target" Object3D associated with it, and every frame the system lerps the actual pose of the Object3D to that target pose.

This handles one of the common uses of Tweening, namely updating the pose.

Combine with a "targetLerpSpeed" (0 .. 1).

joshmarinacci commented 5 years ago

so this is the target of an Object3D.lookAt() call?

blairmacintyre commented 5 years ago

no.

The idea is that when you want to change the .matrix on an Object3D, instead of just setting it, you set the desired value on this second object.

Then each frame you do a lerp from the Object3Ds current value to the target. So, over a small period of time, the object moves to the desired value.

I think this is very low priority right now.