Readonly
componentReadonly
componentReadonly
componentReadonly
schemaEntity that will host the value
The final value. The Set will freeze the value, it won't be editable from the script.
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.
Triggers the callback if the entity has changed on the last tick. If the value is undefined, the component was deleted.
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.
Appends an element to the set.