ripe-tech / ripe-sdk

The public Javascript SDK for RIPE Core
https://www.platforme.com
Apache License 2.0
8 stars 4 forks source link

#429 CSR `changeFrame` support #414

Closed NFSS10 closed 2 years ago

NFSS10 commented 2 years ago
- -
Issue Implement changeFrame method
https://github.com/ripe-tech/ripe-sdk/issues/429
Dependencies https://github.com/ripe-tech/ripe-sdk/pull/413
Decisions - Add CsrAnimation which is the base class that has the common logic for a CSR animation.
- Add CsrChangeFrameAnimation which handles the CSR change frame transition animation.
- Add CsrUtils which contains multiple methods usefull to handle CSR related logic.
- Add changeFrame method. This method receives a PRC frame and update the CSR mesh to match the PRC state. It respects all the PRC options.
- Add flushPending method. This method handles the logic of running pending operations. This method comes from supporting the features PRC currently have.
* Clicking in ripe-sdk-demo frames will also update the CSR state to match the PRC frame.
- Use THREE.Group to manipulate positions and rotations instead of directly changing mesh axis.
Improve animation loop so it can run animations.

https://user-images.githubusercontent.com/22588915/188637195-203f01d8-2a05-42d6-8417-8133c0a70c77.mp4