Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / NetworkIdentityComponent

Class: NetworkIdentityComponent ​

Defined in: components/Network.ts:19

Marks an entity as shared between players. A scene object is simulated by the host (the first player in the room, then the longest connected); a spawned object belongs to the player who spawned it and leaves with them.

Extends ​

Constructors ​

Constructor ​

ts
new NetworkIdentityComponent(): NetworkIdentityComponent;

Defined in: components/Network.ts:25

Returns ​

NetworkIdentityComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
networkIdstringThe id every client knows this entity by. Set when connected, never saved.components/Network.ts:21
ownerstringThe session that simulates this entity. Set when connected, never saved.components/Network.ts:23