You must be eating, breathing, and sleeping Meteor.
That’s the same idea that I had, although in the above demos that isn’t the case yet: only the node that the render task is attached to gets updated (no traversal of the scene graph).
I just made an update, so now in that last demo,
let rotation = 0
Motor.addRenderTask(timestamp => {
rotation += 1
node1.rotation = [0,rotation,0]
node2.rotation = [0,rotation,rotation]
})
both node1
and node2
are re-rendered since they are both modified inside the render task. It’s interesting, because not all nodes in a render task are necessarily updated, for example:
let rotation = 0
Motor.addRenderTask(timestamp => {
rotation += 1
node1.rotation = [0,rotation,0]
if (rotation > 200)
node2.rotation = [0,rotation,rotation]
})
In this last one, node2 will start being modified after rotation is greater than 200, so it won’t start being re-rendered until that point.