mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 06:30:38 +00:00
The ForwardDiffuseLightPipeline now uses sys.lights
instead of the Scene variable to avoid errors due to injection removal.
This commit is contained in:
parent
a005e076fa
commit
063d30602e
2 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
|||
* The TileSprite Canvas Renderer did not support rotation, scaling or flipping. Fix #3231 (thanks @TCatshoek)
|
||||
* Fixed Group doesn't remove children from Scene when cleared with the `removeFromScene` argument set (thanks @iamchristopher)
|
||||
* Fixed an error in the lights pipeline when no Light Manager has been defined (thanks @samme)
|
||||
* The ForwardDiffuseLightPipeline now uses `sys.lights` instead of the Scene variable to avoid errors due to injection removal.
|
||||
|
||||
### Updates
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ var ForwardDiffuseLightPipeline = new Class({
|
|||
*/
|
||||
onRender: function (scene, camera)
|
||||
{
|
||||
var lightManager = scene.lights;
|
||||
var lightManager = scene.sys.lights;
|
||||
|
||||
if (!lightManager)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ var ForwardDiffuseLightPipeline = new Class({
|
|||
|
||||
var renderer = this.renderer;
|
||||
var program = this.program;
|
||||
var lights = scene.lights.cull(camera);
|
||||
var lights = lightManager.cull(camera);
|
||||
var lightCount = Math.min(lights.length, LIGHT_COUNT);
|
||||
var cameraMatrix = camera.matrix;
|
||||
var point = {x: 0, y: 0};
|
||||
|
|
Loading…
Reference in a new issue