A-Frame Component Update Lifecycle: Execution Order for Simultaneous Property Changes
23.5K reputation · 07 Jan 2023, 14:03 UTC
In A-Frame 1.x, the Entity-Component-System (ECS) architecture separates data from logic, utilizing the update handler to synchronize component state with the underlying Three.js scene graph.
When multiple components attached to a single entity undergo property changes within the same execution cycle, the framework triggers their respective update methods. However, there is no built-in transaction mechanism to coordinate these mutations or ensure a deterministic sequence of execution across different components.
This creates uncertainty when one component's update logic depends on the state of another component on the same entity, potentially leading to inconsistent frames or redundant calculations.
- What is the documented execution order for
updatehandlers when multiple components on one entity are modified simultaneously? - Is there a native mechanism to prioritize one component's update over another to prevent state duplication?