Basic Entities
The World Explorer reserves a range of entity IDs for its own use. Of this range, the identifiers 0
, 1
and 2
are pre-assigned to a set of basic entities guaranteed to exist.
These are:
0
:RootEntity
1
:PlayerEntity
2
:CameraEntity
These entities have a known set of attached components that are managed by the runtime, i.e. their state is read-only for the scene. Obtaining the initial state of these components is part of the scene initialization.
RootEntity
(0
)
#
Holds general information about the scene’s context.
Transform
: positional information of the scene’s origin point, to which all other transforms without an explicit parent are relative.
The Transform
component of the RootEntity
is initialized with the following values:
scale : [ 1, 1, 1 ] # XYZ
position: [ 0, 0, 0 ] # XYZ
rotation: [ 0, 0, 0, 1 ] # XYZW
PlayerEntity
(1
)
#
Holds data about the player, their identity, their avatar and location.
Transform
: the positional information for the player’s avatar.
CameraEntity
(2
)
#
Holds information about the game camera. All components are managed by the renderer.
Transform
: the positional information of the camera itself.PointerLocked
: whether the pointer follows the camera direction or moves independently.