UNPKG

hytopia

Version:

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

114 lines (52 loc) 1.65 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [LightManager](./server.lightmanager.md) ## LightManager class Manages Light instances in a world. **Signature:** ```typescript export default class LightManager ``` ## Remarks The LightManager is created internally as a singleton for each [World](./server.world.md) instance in a game server. It allows retrieval of all loaded Light instances, entity attached Light instances, and more. The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `LightManager` class. ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [world](./server.lightmanager.world.md) </td><td> `readonly` </td><td> [World](./server.world.md) </td><td> The world the LightManager is for. </td></tr> </tbody></table> ## Methods <table><thead><tr><th> Method </th><th> Modifiers </th><th> Description </th></tr></thead> <tbody><tr><td> [getAllEntityAttachedLights(entity)](./server.lightmanager.getallentityattachedlights.md) </td><td> </td><td> Retrieves all spawned Light instances attached to a specific entity. </td></tr> <tr><td> [getAllLights()](./server.lightmanager.getalllights.md) </td><td> </td><td> Retrieves all spawned Light instances for the world. </td></tr> </tbody></table>