Readonly
componentReadonly
componentReadonly
componentReadonly
schemaDelete the current component to an entity, return null if the entity doesn't have the current component.
Entity to delete the component from
This function writes the whole state of the component into a ByteBuffer
Optional
filterEntity: ((entity: Entity) => boolean)Marks the entity as deleted and signals it cannot be used ever again. It must clear the component internal state, produces a synchronization message to remove the component from the entity.
Entity ID that was deleted.
Get the readonly component of the entity (to mutate it, use getMutable instead), throws an error if the entity doesn't have the component.
Entity that will be used to get the component
This function returns an iterable with all the CRDT updates that need to be broadcasted to other actors in the system. After returning, this function clears the internal dirty state. Updates are produced only once.
Get the mutable component of the entity, throw an error if the entity doesn't have the component.
Entity to get the component from
Get the mutable component of the entity, return null if the entity doesn't have the component.
Entity to get the component from
Get the readonly component of the entity (to mutate it, use getMutable instead), or null if the entity doesn't have the component.
Entity that will be used to try to get the component
Creates or replaces a move tween component that animates an entity's position from start to end
entity to apply the tween to
starting position vector
ending position vector
duration of the tween in seconds
Optional
easingFunction: EasingFunctioneasing function to use (defaults to EF_LINEAR)
Creates or replaces a rotation tween component that animates an entity's rotation from start to end
entity to apply the tween to
starting rotation quaternion
ending rotation quaternion
duration of the tween in seconds
Optional
easingFunction: EasingFunctioneasing function to use (defaults to EF_LINEAR)
Creates or replaces a continuous rotation tween component that rotates an entity continuously
entity to apply the tween to
rotation direction quaternion
speed of rotation per second
Optional
duration: numberduration of the tween in seconds (defaults to 0 for infinite)
Creates or replaces a scale tween component that animates an entity's scale from start to end
entity to apply the tween to
starting scale vector
ending scale vector
duration of the tween in seconds
Optional
easingFunction: EasingFunctioneasing function to use (defaults to EF_LINEAR)
Creates or replaces a texture move tween component that animates texture UV coordinates from start to end
entity to apply the tween to
starting UV coordinates
ending UV coordinates
duration of the tween in seconds
Optional
movementType: TextureMovementTypetype of texture movement (defaults to TMT_OFFSET)
Optional
easingFunction: EasingFunctioneasing function to use (defaults to EF_LINEAR)
Creates or replaces a continuous texture move tween component that moves texture UV coordinates continuously
entity to apply the tween to
direction vector for UV movement
speed of UV movement per second
Optional
movementType: TextureMovementTypetype of texture movement (defaults to TMT_OFFSET)
Optional
duration: numberduration of the tween in seconds (defaults to 0 for infinite)
This function receives a CRDT update and returns a touple with a "conflict resoluton" message, in case of the sender being updated or null in case of noop/accepted change. The second element of the touple is the modified/changed/deleted value.
Texture helpers with constructor