UNPKG

hytopia

Version:

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

58 lines (28 loc) 948 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [World](./server.world.md) &gt; [setDirectionalLightPosition](./server.world.setdirectionallightposition.md) ## World.setDirectionalLightPosition() method Sets the position the world's directional light originates from relative to a player's camera. **Signature:** ```typescript setDirectionalLightPosition(position: Vector3Like): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> position </td><td> [Vector3Like](./server.vector3like.md) </td><td> The light position relative to the player's camera. \*\*Side effects:\*\* Emits `WorldEvent.SET_DIRECTIONAL_LIGHT_POSITION`<!-- -->. \*\*Category:\*\* Core </td></tr> </tbody></table> **Returns:** void