aframeSystem


Introduction

A system, of the entity-component-system pattern, provides global scope, services, and management to classes of components. It provides public APIs (methods and properties) for classes of components. A system can be accessed through the scene element, and can help components interface with the global scene.

For example, the camera system manages all entities with the camera component, controlling which camera is the active camera.

Parameters

ParameterDetails
dataData provided by the schema available across handlers and methods
elReference to <a-scene>
schemaBehaves the same as component schemas. Parses to data.

Remarks

METHODS

A system, like a component, defines lifecycle handlers. It can also define methods intended to be public API.

MethodDescription
initCalled once when the system is initialized. Used to initialize.
pauseCalled when the scene pauses. Used to stop dynamic behavior.
playCalled when the scene starts or resumes. Used to start dynamic behavior.
tickIf defined, will be called on every tick of the scene's render loop.