Software Development
Lighting
Phaser 4 dynamic lighting, which is WebGL only: the Scene's LightsManager (this.lights.enable, addLight, addConeLight, setAmbientColor, removeLight, render.maxLights), setLighting(true) on Sprites, Images, Text, TileSprites, tilemap layers, particles, Graphics and Shapes, normal maps (load.image with [diffuse, normal], setDataSource), self-shadowing (setSelfShadow, render.selfShadow), cone lights (setCone, setConeRotation, setConeAngles), the PointLight Game Object and the ImageLight filter. Use when adding lights, a torch, lantern, flashlight, spotlight, vision cone, darkness or a day/night mood, glowing lamps, muzzle flashes, or bumpy normal-mapped sprites and tiles. Replaces v3's setPipeline('Light2D'), which doesn't exist in v4. Lit objects render black unless this.lights.enable() is called. Triggers on: light, lights, lighting, normal map, setLighting, Light2D, ambient light, cone light, spotlight, flashlight, torch, lantern, PointLight, pointlight, self shadow, ImageLight.
- Publisher / source
- phaserjs/phaser (found on skills.sh)
- Upstream record
- phaserjs/phaser
- Version
- Version 1
- Published
- Publication review
- Approved for publication
- Content fingerprint
107d993448c80b7b4fc3996128b7d1d5f83fb1a31bc48b99b60f0dec39742997