mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 18:09:14 -07:00
fix LOD
This commit is contained in:
@@ -225,12 +225,12 @@ package alternativa.engine3d.objects {
|
|||||||
// If object needs on light sources.
|
// If object needs on light sources.
|
||||||
if (lightsLength > 0 && child.useLights) {
|
if (lightsLength > 0 && child.useLights) {
|
||||||
// Calculation of transfer matrices from sources to object.
|
// Calculation of transfer matrices from sources to object.
|
||||||
var excludedLightLength:int = child.excludedLights.length;
|
var excludedLightLength:int = this.excludedLights.length;
|
||||||
var childLightsLength:int = 0;
|
var childLightsLength:int = 0;
|
||||||
for (var i:int = 0; i < lightsLength; i++) {
|
for (var i:int = 0; i < lightsLength; i++) {
|
||||||
var light:Light3D = lights[i];
|
var light:Light3D = lights[i];
|
||||||
var j:int = 0;
|
var j:int = 0;
|
||||||
while (j<excludedLightLength && child.excludedLights[j]!=light) j++;
|
while (j<excludedLightLength && this.excludedLights[j]!=light) j++;
|
||||||
if (j<excludedLightLength) continue;
|
if (j<excludedLightLength) continue;
|
||||||
|
|
||||||
light.lightToObjectTransform.combine(child.cameraToLocalTransform, light.localToCameraTransform);
|
light.lightToObjectTransform.combine(child.cameraToLocalTransform, light.localToCameraTransform);
|
||||||
|
|||||||
Reference in New Issue
Block a user