We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d7435f commit 8174ec2Copy full SHA for 8174ec2
1 file changed
src/gameobjects/lights/LightsManager.js
@@ -163,7 +163,7 @@ var LightsManager = new Class({
163
}
164
165
166
- if (visibleLights > this.maxLights)
+ if (visibleLights.length > this.maxLights)
167
{
168
// We've got too many lights, so sort by distance from camera and cull those far away
169
// This isn't ideal because it doesn't factor in the radius of the lights, but it'll do for now
@@ -181,7 +181,7 @@ var LightsManager = new Class({
181
182
sortByDistance: function (a, b)
183
184
- return (a.distance < b.distance);
+ return (a.distance >= b.distance);
185
},
186
187
/**
0 commit comments