Skip to content

Animation

David Komer edited this page Jul 25, 2018 · 8 revisions

1. Nodes point at animations (not the other way around)

This is required to allow non-baked nodes to be targeted by dynamic animations. In other words, if we add some node at runtime, and generate some animation, it's much nicer to not have to fake an "originalNodeId" for targeting - rather, the node will point at the newly created animation (i.e. by adding the animationId to its list)

2. Animation updates are by the caller

Animations don't do anything other than update scene data. This is related to the overall architecture in that the caller will likely be able to optimize scene updates better than the lib (e.g. culling invisible nodes, using webassembly, etc.)

However, there are two mechanisms that make working with animations a breeze:

  1. Animation Data is parsed on the data side, into simple interfaces that can be serialised for passing alongside the scene
  2. There are provided helpers if the caller on the js side wants to create simple functions. It can also be used as inspiration or copied out.
Clone this wiki locally