UNPKG

hytopia

Version:

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

248 lines (107 loc) 3 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [LightOptions](./server.lightoptions.md) ## LightOptions interface Options for creating a Light instance. **Signature:** ```typescript export interface LightOptions ``` ## Properties <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [angle?](./server.lightoptions.angle.md) </td><td> </td><td> number </td><td> _(Optional)_ If type is spotlight, the angle of the spotlight. </td></tr> <tr><td> [attachedToEntity?](./server.lightoptions.attachedtoentity.md) </td><td> </td><td> [Entity](./server.entity.md) </td><td> _(Optional)_ If set, the light will be attached to this entity. </td></tr> <tr><td> [color?](./server.lightoptions.color.md) </td><td> </td><td> [RgbColor](./server.rgbcolor.md) </td><td> _(Optional)_ The color of the light. Defaults to white. </td></tr> <tr><td> [distance?](./server.lightoptions.distance.md) </td><td> </td><td> number </td><td> _(Optional)_ The maximum distance the light will illuminate. 0 does not limit distance. Defaults to 0. </td></tr> <tr><td> [intensity?](./server.lightoptions.intensity.md) </td><td> </td><td> number </td><td> _(Optional)_ The intensity of the light in candela (cd). Defaults to 1 </td></tr> <tr><td> [offset?](./server.lightoptions.offset.md) </td><td> </td><td> [Vector3Like](./server.vector3like.md) </td><td> _(Optional)_ The offset of the light from the attached entity or position. </td></tr> <tr><td> [penumbra?](./server.lightoptions.penumbra.md) </td><td> </td><td> number </td><td> _(Optional)_ If type is spotlight, the penumbra of the spotlight. Defaults to 0 </td></tr> <tr><td> [position?](./server.lightoptions.position.md) </td><td> </td><td> [Vector3Like](./server.vector3like.md) </td><td> _(Optional)_ If set, the light will be attached at this position. </td></tr> <tr><td> [trackedEntity?](./server.lightoptions.trackedentity.md) </td><td> </td><td> [Entity](./server.entity.md) </td><td> _(Optional)_ If type is spotlight, the entity the spotlight will constantly point at. </td></tr> <tr><td> [trackedPosition?](./server.lightoptions.trackedposition.md) </td><td> </td><td> [Vector3Like](./server.vector3like.md) </td><td> _(Optional)_ If type is spotlight, the position the spotlight will constantly point at. </td></tr> <tr><td> [type?](./server.lightoptions.type.md) </td><td> </td><td> [LightType](./server.lighttype.md) </td><td> _(Optional)_ The type of light. Defaults to point light. </td></tr> </tbody></table>