Point Lights

Creating A Point Light
Point Light Entity Attachment
Diving Deeper
Last updated

Last updated
const light = new Light({
color: { r: 255, g: 0, b: 0 }, // the lights color, defaults to 255,255,255
intensity: 5, // the lights intensity, defaults to 1
position: { x: 10, y: 20, z: -10 } // where the point light emits in the world
});
light.spawn(world);const light = new Light({
attachedToEntity: playerEntity, // the entity to follow
color: { r: 255, g: 0, b: 0 },
intensity: 5,
offset: { x: 0, y: 1, z: 0 }, // an offset of the pointlight relative to the attached entity
});
light.spawn(world);