πΉAdd Light to the Scene
addLighttoScene: to add Light to the scene (returns id of light)
type | type of light | required | βambientβ | βdirectionalβ | βspotβ | βpointβ |
position | default: [0, 0, 0] (for directional, spot and point) | optional | [float, float, float] |
angle | default:PI/3(for spot) | optional | Number: [0, PI/2] |
color | Default: 0xffffff | optional | string |
decay | Default: 2 (for spot and point) | optional | number |
distance | Default: 0(for spot and point) | optional | number |
intensity | Default: 1 | optional | float |
penumbra | Default: 0(for spot) | optional | Number: [0, 1] |
removeLightfromScene:
id | id of light | required | string |
Last updated