mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 18:09:14 -07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1419,7 +1419,6 @@ package alternativa.engine3d.core {
|
|||||||
alternativa3d function collectChildrenDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int, useShadow:Boolean):void {
|
alternativa3d function collectChildrenDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int, useShadow:Boolean):void {
|
||||||
var i:int;
|
var i:int;
|
||||||
var light:Light3D;
|
var light:Light3D;
|
||||||
var excludedLightLength:int = excludedLights.length;
|
|
||||||
|
|
||||||
for (var child:Object3D = childrenList; child != null; child = child.next) {
|
for (var child:Object3D = childrenList; child != null; child = child.next) {
|
||||||
// Checking visibility flag
|
// Checking visibility flag
|
||||||
@@ -1434,6 +1433,7 @@ package alternativa.engine3d.core {
|
|||||||
child.listening = true;
|
child.listening = true;
|
||||||
}
|
}
|
||||||
// Check if object needs in lightning
|
// Check if object needs in lightning
|
||||||
|
var excludedLightLength:int = child.excludedLights.length;
|
||||||
if (lightsLength > 0 && child.useLights) {
|
if (lightsLength > 0 && child.useLights) {
|
||||||
// Pass the lights to children and calculate appropriate transformations
|
// Pass the lights to children and calculate appropriate transformations
|
||||||
var childLightsLength:int = 0;
|
var childLightsLength:int = 0;
|
||||||
@@ -1443,7 +1443,7 @@ package alternativa.engine3d.core {
|
|||||||
light = lights[i];
|
light = lights[i];
|
||||||
// Checking object for existing in excludedLights
|
// Checking object for existing in excludedLights
|
||||||
j = 0;
|
j = 0;
|
||||||
while (j<excludedLightLength && excludedLights[j]!=light) j++;
|
while (j<excludedLightLength && child.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);
|
||||||
@@ -1459,7 +1459,7 @@ package alternativa.engine3d.core {
|
|||||||
light = lights[i];
|
light = lights[i];
|
||||||
// Проверка источника света на отсутствие в excludedLights
|
// Проверка источника света на отсутствие в excludedLights
|
||||||
j = 0;
|
j = 0;
|
||||||
while (j<excludedLightLength && excludedLights[j]!=light) j++;
|
while (j<excludedLightLength && child.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);
|
||||||
camera.childLights[childLightsLength] = light;
|
camera.childLights[childLightsLength] = light;
|
||||||
|
|||||||
@@ -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 = 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 && 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