UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

86 lines (40 loc) 1.03 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [Entity](./server.entity.md) &gt; [spawn](./server.entity.spawn.md) ## Entity.spawn() method Spawns the entity in the world. **Signature:** ```typescript spawn(world: World, position: Vector3Like, rotation?: QuaternionLike): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> world </td><td> [World](./server.world.md) </td><td> The world to spawn the entity in. </td></tr> <tr><td> position </td><td> [Vector3Like](./server.vector3like.md) </td><td> The position to spawn the entity at. </td></tr> <tr><td> rotation </td><td> [QuaternionLike](./server.quaternionlike.md) </td><td> _(Optional)_ The optional rotation to spawn the entity with. </td></tr> </tbody></table> **Returns:** void