hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
400 lines (171 loc) • 6.93 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [EntityEventPayloads](./server.entityeventpayloads.md)
## EntityEventPayloads interface
Event payloads for Entity emitted events.
**Signature:**
```typescript
export interface EntityEventPayloads
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
["ENTITY.BLOCK\_COLLISION"](./server.entityeventpayloads._entity.block_collision_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; blockType: [BlockType](./server.blocktype.md)<!-- -->; started: boolean; colliderHandleA: number; colliderHandleB: number; }
</td><td>
Emitted when an entity collides with a block type.
</td></tr>
<tr><td>
["ENTITY.BLOCK\_CONTACT\_FORCE"](./server.entityeventpayloads._entity.block_contact_force_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; blockType: [BlockType](./server.blocktype.md)<!-- -->; contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->; }
</td><td>
Emitted when an entity's contact force is applied to a block type.
</td></tr>
<tr><td>
["ENTITY.DESPAWN"](./server.entityeventpayloads._entity.despawn_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; }
</td><td>
Emitted when an entity is despawned.
</td></tr>
<tr><td>
["ENTITY.ENTITY\_COLLISION"](./server.entityeventpayloads._entity.entity_collision_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; otherEntity: [Entity](./server.entity.md)<!-- -->; started: boolean; colliderHandleA: number; colliderHandleB: number; }
</td><td>
Emitted when an entity collides with another entity.
</td></tr>
<tr><td>
["ENTITY.ENTITY\_CONTACT\_FORCE"](./server.entityeventpayloads._entity.entity_contact_force_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; otherEntity: [Entity](./server.entity.md)<!-- -->; contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->; }
</td><td>
Emitted when an entity's contact force is applied to another entity.
</td></tr>
<tr><td>
["ENTITY.SET\_MODEL\_ANIMATIONS\_PLAYBACK\_RATE"](./server.entityeventpayloads._entity.set_model_animations_playback_rate_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; playbackRate: number; }
</td><td>
Emitted when the playback rate of the entity's model animations is set.
</td></tr>
<tr><td>
["ENTITY.SET\_MODEL\_HIDDEN\_NODES"](./server.entityeventpayloads._entity.set_model_hidden_nodes_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; modelHiddenNodes: Set<string>; }
</td><td>
Emitted when nodes of the entity's model are set to be hidden.
</td></tr>
<tr><td>
["ENTITY.SET\_MODEL\_SHOWN\_NODES"](./server.entityeventpayloads._entity.set_model_shown_nodes_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; modelShownNodes: Set<string>; }
</td><td>
Emitted when nodes of the entity's model are set to be shown.
</td></tr>
<tr><td>
["ENTITY.SET\_MODEL\_TEXTURE\_URI"](./server.entityeventpayloads._entity.set_model_texture_uri_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; modelTextureUri: string \| undefined; }
</td><td>
Emitted when the texture uri of the entity's model is set.
</td></tr>
<tr><td>
["ENTITY.SET\_OPACITY"](./server.entityeventpayloads._entity.set_opacity_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; opacity: number; }
</td><td>
Emitted when the opacity of the entity is set.
</td></tr>
<tr><td>
["ENTITY.SET\_PARENT"](./server.entityeventpayloads._entity.set_parent_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; parent: [Entity](./server.entity.md) \| undefined; parentNodeName: string \| undefined; }
</td><td>
Emitted when the parent of the entity is set.
</td></tr>
<tr><td>
["ENTITY.SET\_TINT\_COLOR"](./server.entityeventpayloads._entity.set_tint_color_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; tintColor: [RgbColor](./server.rgbcolor.md) \| undefined; }
</td><td>
Emitted when the tint color of the entity is set.
</td></tr>
<tr><td>
["ENTITY.SPAWN"](./server.entityeventpayloads._entity.spawn_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; }
</td><td>
Emitted when the entity is spawned.
</td></tr>
<tr><td>
["ENTITY.START\_MODEL\_LOOPED\_ANIMATIONS"](./server.entityeventpayloads._entity.start_model_looped_animations_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; animations: Set<string>; }
</td><td>
Emitted when the looped animations of the entity's model are started.
</td></tr>
<tr><td>
["ENTITY.START\_MODEL\_ONESHOT\_ANIMATIONS"](./server.entityeventpayloads._entity.start_model_oneshot_animations_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; animations: Set<string>; }
</td><td>
Emitted when the oneshot animations of the entity's model are started.
</td></tr>
<tr><td>
["ENTITY.STOP\_MODEL\_ANIMATIONS"](./server.entityeventpayloads._entity.stop_model_animations_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; animations: Set<string>; }
</td><td>
Emitted when the model animations of the entity are stopped.
</td></tr>
<tr><td>
["ENTITY.TICK"](./server.entityeventpayloads._entity.tick_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; tickDeltaMs: number; }
</td><td>
Emitted when the entity is ticked.
</td></tr>
<tr><td>
["ENTITY.UPDATE\_POSITION"](./server.entityeventpayloads._entity.update_position_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; position: [Vector3Like](./server.vector3like.md)<!-- -->; }
</td><td>
Emitted when the position of the entity is updated at the end of the tick, either directly or by physics.
</td></tr>
<tr><td>
["ENTITY.UPDATE\_ROTATION"](./server.entityeventpayloads._entity.update_rotation_.md)
</td><td>
</td><td>
{ entity: [Entity](./server.entity.md)<!-- -->; rotation: [QuaternionLike](./server.quaternionlike.md)<!-- -->; }
</td><td>
Emitted when the rotation of the entity is updated at the end of the tick, either directly or by physics.
</td></tr>
</tbody></table>