You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs don't make it clear that component functions only run once, when the component is created. That's different from React, so it's important to point out.
Also, for hooks that run every frame, it'd be good to add something to the docs that explains when they run, ideally with a visualization.
For the sake of writing the hooks doc later, the pseudocode is:
every frame:
for every entity in the scene, in creation order:
for every component on this entity, in creation order:
run any functions registered by useUpdate, in the order they were registered
call useCanvasDrawOrderSort, passing in every entity in the scene, in creation order. it returns an array of components, in the order they should be drawn
for every component in the returned array:
run any functions registered by useDraw (or useRawDraw), in the order that they were registered
NOTE: useDraw is a thin wrapper around useRawDraw.
The text was updated successfully, but these errors were encountered:
The docs don't make it clear that component functions only run once, when the component is created. That's different from React, so it's important to point out.
Also, for hooks that run every frame, it'd be good to add something to the docs that explains when they run, ideally with a visualization.
For the sake of writing the hooks doc later, the pseudocode is:
The text was updated successfully, but these errors were encountered: