mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-27 02:19:07 -07:00
Deobfuscate more packages
This commit is contained in:
@@ -2,8 +2,8 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import alternativa.engine3d.animation.keys.NumberKey;
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.keys.name_591;
|
||||
import alternativa.engine3d.animation.keys.NumberTrack;
|
||||
import alternativa.engine3d.animation.keys.Track;
|
||||
|
||||
use namespace alternativa3d;
|
||||
|
||||
@@ -35,9 +35,9 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public static const PARAM_MATRIX:String = "matrix";
|
||||
|
||||
public var tracks:Vector.<name_552>;
|
||||
public var tracks:Vector.<Track>;
|
||||
|
||||
public var name_589:String = "undefined";
|
||||
public var §_-dS§:String = "undefined";
|
||||
|
||||
public var animName:String;
|
||||
|
||||
@@ -129,13 +129,13 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(componentName)
|
||||
{
|
||||
case "X":
|
||||
this.name_589 = PARAM_TRANSLATE_X;
|
||||
this.§_-dS§ = PARAM_TRANSLATE_X;
|
||||
break loop1;
|
||||
case "Y":
|
||||
this.name_589 = PARAM_TRANSLATE_Y;
|
||||
this.§_-dS§ = PARAM_TRANSLATE_Y;
|
||||
break loop1;
|
||||
case "Z":
|
||||
this.name_589 = PARAM_TRANSLATE_Z;
|
||||
this.§_-dS§ = PARAM_TRANSLATE_Z;
|
||||
}
|
||||
break;
|
||||
case "rotate":
|
||||
@@ -143,26 +143,26 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(axis.indexOf(1))
|
||||
{
|
||||
case 0:
|
||||
this.name_589 = PARAM_ROTATION_X;
|
||||
this.§_-dS§ = PARAM_ROTATION_X;
|
||||
break loop1;
|
||||
case 1:
|
||||
this.name_589 = PARAM_ROTATION_Y;
|
||||
this.§_-dS§ = PARAM_ROTATION_Y;
|
||||
break loop1;
|
||||
case 2:
|
||||
this.name_589 = PARAM_ROTATION_Z;
|
||||
this.§_-dS§ = PARAM_ROTATION_Z;
|
||||
}
|
||||
break;
|
||||
case "scale":
|
||||
switch(componentName)
|
||||
{
|
||||
case "X":
|
||||
this.name_589 = PARAM_SCALE_X;
|
||||
this.§_-dS§ = PARAM_SCALE_X;
|
||||
break loop1;
|
||||
case "Y":
|
||||
this.name_589 = PARAM_SCALE_Y;
|
||||
this.§_-dS§ = PARAM_SCALE_Y;
|
||||
break loop1;
|
||||
case "Z":
|
||||
this.name_589 = PARAM_SCALE_Z;
|
||||
this.§_-dS§ = PARAM_SCALE_Z;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,55 +171,55 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(transformationName)
|
||||
{
|
||||
case "translate":
|
||||
this.name_589 = PARAM_TRANSLATE;
|
||||
this.§_-dS§ = PARAM_TRANSLATE;
|
||||
break;
|
||||
case "scale":
|
||||
this.name_589 = PARAM_SCALE;
|
||||
this.§_-dS§ = PARAM_SCALE;
|
||||
break;
|
||||
case "matrix":
|
||||
this.name_589 = PARAM_MATRIX;
|
||||
this.§_-dS§ = PARAM_MATRIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function parseSampler() : void
|
||||
{
|
||||
var track:name_591 = null;
|
||||
var track:NumberTrack = null;
|
||||
var toRad:Number = NaN;
|
||||
var key:NumberKey = null;
|
||||
var sampler:DaeSampler = document.findSampler(data.@source[0]);
|
||||
if(sampler != null)
|
||||
{
|
||||
sampler.parse();
|
||||
if(this.name_589 == PARAM_MATRIX)
|
||||
if(this.§_-dS§ == PARAM_MATRIX)
|
||||
{
|
||||
this.tracks = Vector.<name_552>([sampler.parseTransformationTrack(this.animName)]);
|
||||
this.tracks = Vector.<Track>([sampler.parseTransformationTrack(this.animName)]);
|
||||
return;
|
||||
}
|
||||
if(this.name_589 == PARAM_TRANSLATE)
|
||||
if(this.§_-dS§ == PARAM_TRANSLATE)
|
||||
{
|
||||
this.tracks = sampler.parsePointsTracks(this.animName,"x","y","z");
|
||||
return;
|
||||
}
|
||||
if(this.name_589 == PARAM_SCALE)
|
||||
if(this.§_-dS§ == PARAM_SCALE)
|
||||
{
|
||||
this.tracks = sampler.parsePointsTracks(this.animName,"scaleX","scaleY","scaleZ");
|
||||
return;
|
||||
}
|
||||
if(this.name_589 == PARAM_ROTATION_X || this.name_589 == PARAM_ROTATION_Y || this.name_589 == PARAM_ROTATION_Z)
|
||||
if(this.§_-dS§ == PARAM_ROTATION_X || this.§_-dS§ == PARAM_ROTATION_Y || this.§_-dS§ == PARAM_ROTATION_Z)
|
||||
{
|
||||
track = sampler.parseNumbersTrack(this.animName,this.name_589);
|
||||
track = sampler.parseNumbersTrack(this.animName,this.§_-dS§);
|
||||
toRad = Math.PI / 180;
|
||||
for(key = track.alternativa3d::name_599; key != null; key = key.alternativa3d::next)
|
||||
for(key = track.alternativa3d::_-ku; key != null; key = key.alternativa3d::next)
|
||||
{
|
||||
key.alternativa3d::name_598 *= toRad;
|
||||
key.alternativa3d::_-4O *= toRad;
|
||||
}
|
||||
this.tracks = Vector.<name_552>([track]);
|
||||
this.tracks = Vector.<Track>([track]);
|
||||
return;
|
||||
}
|
||||
if(this.name_589 == PARAM_TRANSLATE_X || this.name_589 == PARAM_TRANSLATE_Y || this.name_589 == PARAM_TRANSLATE_Z || this.name_589 == PARAM_SCALE_X || this.name_589 == PARAM_SCALE_Y || this.name_589 == PARAM_SCALE_Z)
|
||||
if(this.§_-dS§ == PARAM_TRANSLATE_X || this.§_-dS§ == PARAM_TRANSLATE_Y || this.§_-dS§ == PARAM_TRANSLATE_Z || this.§_-dS§ == PARAM_SCALE_X || this.§_-dS§ == PARAM_SCALE_Y || this.§_-dS§ == PARAM_SCALE_Z)
|
||||
{
|
||||
this.tracks = Vector.<name_552>([sampler.parseNumbersTrack(this.animName,this.name_589)]);
|
||||
this.tracks = Vector.<Track>([sampler.parseNumbersTrack(this.animName,this.§_-dS§)]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.*;
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
import alternativa.engine3d.animation.AnimationClip;
|
||||
import alternativa.engine3d.core.Object3D;
|
||||
import alternativa.engine3d.core.VertexAttributes;
|
||||
import alternativa.engine3d.loaders.ParserMaterial;
|
||||
@@ -17,25 +17,25 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeController extends DaeElement
|
||||
{
|
||||
private var var_725:Vector.<Vector.<Number>>;
|
||||
private var §_-A6§:Vector.<Vector.<Number>>;
|
||||
|
||||
private var var_724:Array;
|
||||
private var §_-2j§:Array;
|
||||
|
||||
private var indices:Array;
|
||||
|
||||
private var var_727:DaeInput;
|
||||
private var §_-4h§:DaeInput;
|
||||
|
||||
private var var_726:DaeInput;
|
||||
private var §_-NK§:DaeInput;
|
||||
|
||||
private var var_728:int;
|
||||
private var §_-5O§:int;
|
||||
|
||||
private var geometry:Geometry;
|
||||
|
||||
private var primitives:Vector.<DaePrimitive>;
|
||||
|
||||
private var var_723:int = 0;
|
||||
private var §_-1U§:int = 0;
|
||||
|
||||
private var var_722:Vector.<Number>;
|
||||
private var §_-I§:Vector.<Number>;
|
||||
|
||||
public function DaeController(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.var_724 = parseIntsArray(vcountsXML);
|
||||
this.§_-2j§ = parseIntsArray(vcountsXML);
|
||||
var indicesXML:XML = vertexWeightsXML.v[0];
|
||||
if(indicesXML == null)
|
||||
{
|
||||
@@ -87,23 +87,23 @@ package alternativa.engine3d.loaders.collada
|
||||
this.indices = parseIntsArray(indicesXML);
|
||||
this.parseInputs();
|
||||
this.parseJointsBindMatrices();
|
||||
for(i = 0; i < this.var_724.length; )
|
||||
for(i = 0; i < this.§_-2j§.length; )
|
||||
{
|
||||
count = int(this.var_724[i]);
|
||||
if(this.var_723 < count)
|
||||
count = int(this.§_-2j§[i]);
|
||||
if(this.§_-1U§ < count)
|
||||
{
|
||||
this.var_723 = count;
|
||||
this.§_-1U§ = count;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
var geom:DaeGeometry = this.daeGeometry;
|
||||
this.var_722 = this.getBindShapeMatrix();
|
||||
this.§_-I§ = this.getBindShapeMatrix();
|
||||
if(geom != null)
|
||||
{
|
||||
geom.parse();
|
||||
vertices = geom.var_715;
|
||||
vertices = geom.§_-FV§;
|
||||
source = geom.geometry;
|
||||
localMaxJointsPerVertex = this.var_723 % 2 != 0 ? this.var_723 + 1 : this.var_723;
|
||||
localMaxJointsPerVertex = this.§_-1U§ % 2 != 0 ? this.§_-1U§ + 1 : this.§_-1U§;
|
||||
this.geometry = new Geometry();
|
||||
this.geometry.alternativa3d::_indices = source.alternativa3d::_indices.slice();
|
||||
attributes = source.getVertexStreamAttributes(0);
|
||||
@@ -165,9 +165,9 @@ package alternativa.engine3d.loaders.collada
|
||||
y = Number(data.readFloat());
|
||||
z = Number(data.readFloat());
|
||||
data.position -= 12;
|
||||
data.writeFloat(x * this.var_722[0] + y * this.var_722[1] + z * this.var_722[2] + this.var_722[3]);
|
||||
data.writeFloat(x * this.var_722[4] + y * this.var_722[5] + z * this.var_722[6] + this.var_722[7]);
|
||||
data.writeFloat(x * this.var_722[8] + y * this.var_722[9] + z * this.var_722[10] + this.var_722[11]);
|
||||
data.writeFloat(x * this.§_-I§[0] + y * this.§_-I§[1] + z * this.§_-I§[2] + this.§_-I§[3]);
|
||||
data.writeFloat(x * this.§_-I§[4] + y * this.§_-I§[5] + z * this.§_-I§[6] + this.§_-I§[7]);
|
||||
data.writeFloat(x * this.§_-I§[8] + y * this.§_-I§[9] + z * this.§_-I§[10] + this.§_-I§[11]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,9 +184,9 @@ package alternativa.engine3d.loaders.collada
|
||||
var index:int = 0;
|
||||
var jointIndex:int = 0;
|
||||
var weightIndex:int = 0;
|
||||
var jointsOffset:int = this.var_727.offset;
|
||||
var weightsOffset:int = this.var_726.offset;
|
||||
var weightsSource:DaeSource = this.var_726.prepareSource(1);
|
||||
var jointsOffset:int = this.§_-4h§.offset;
|
||||
var weightsOffset:int = this.§_-NK§.offset;
|
||||
var weightsSource:DaeSource = this.§_-NK§.prepareSource(1);
|
||||
var weights:Vector.<Number> = weightsSource.numbers;
|
||||
var weightsStride:int = weightsSource.stride;
|
||||
var verticesDict:Dictionary = new Dictionary();
|
||||
@@ -198,25 +198,25 @@ package alternativa.engine3d.loaders.collada
|
||||
vertex = vertices[i];
|
||||
if(vertex != null)
|
||||
{
|
||||
vec = verticesDict[vertex.name_600];
|
||||
vec = verticesDict[vertex.§_-Eq§];
|
||||
if(vec == null)
|
||||
{
|
||||
vec = verticesDict[vertex.name_600] = new Vector.<uint>();
|
||||
vec = verticesDict[vertex.§_-Eq§] = new Vector.<uint>();
|
||||
}
|
||||
vec.push(vertex.name_601);
|
||||
vec.push(vertex.§_-AR§);
|
||||
}
|
||||
}
|
||||
var vertexIndex:int = 0;
|
||||
for(i = 0,count = int(this.var_724.length); i < count; i++)
|
||||
for(i = 0,count = int(this.§_-2j§.length); i < count; i++)
|
||||
{
|
||||
jointsPerVertex = int(this.var_724[i]);
|
||||
jointsPerVertex = int(this.§_-2j§[i]);
|
||||
vertexOutIndices = verticesDict[i];
|
||||
for(j = 0; j < vertexOutIndices.length; j++)
|
||||
{
|
||||
byteArray.position = vertexOutIndices[j] * localMaxJointsPerVertex * 8;
|
||||
for(k = 0; k < jointsPerVertex; k++)
|
||||
{
|
||||
index = this.var_728 * (vertexIndex + k);
|
||||
index = this.§_-5O§ * (vertexIndex + k);
|
||||
jointIndex = int(this.indices[int(index + jointsOffset)]);
|
||||
if(jointIndex >= 0)
|
||||
{
|
||||
@@ -254,20 +254,20 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(semantic)
|
||||
{
|
||||
case "JOINT":
|
||||
if(this.var_727 == null)
|
||||
if(this.§_-4h§ == null)
|
||||
{
|
||||
this.var_727 = input;
|
||||
this.§_-4h§ = input;
|
||||
}
|
||||
break;
|
||||
case "WEIGHT":
|
||||
if(this.var_726 == null)
|
||||
if(this.§_-NK§ == null)
|
||||
{
|
||||
this.var_726 = input;
|
||||
this.§_-NK§ = input;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.var_728 = maxInputOffset + 1;
|
||||
this.§_-5O§ = maxInputOffset + 1;
|
||||
}
|
||||
|
||||
private function parseJointsBindMatrices() : void
|
||||
@@ -290,12 +290,12 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
stride = jointsSource.stride;
|
||||
count = jointsSource.numbers.length / stride;
|
||||
this.var_725 = new Vector.<Vector.<Number>>(count);
|
||||
this.§_-A6§ = new Vector.<Vector.<Number>>(count);
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = stride * i;
|
||||
matrix = new Vector.<Number>(16);
|
||||
this.var_725[i] = matrix;
|
||||
this.§_-A6§[i] = matrix;
|
||||
for(j = 0; j < 16; j++)
|
||||
{
|
||||
matrix[j] = jointsSource.numbers[int(index + j)];
|
||||
@@ -323,13 +323,13 @@ package alternativa.engine3d.loaders.collada
|
||||
var skinXML:XML = data.skin[0];
|
||||
if(skinXML != null)
|
||||
{
|
||||
this.var_722 = this.getBindShapeMatrix();
|
||||
numJoints = int(this.var_725.length);
|
||||
skin = new Skin(this.var_723,numJoints);
|
||||
this.§_-I§ = this.getBindShapeMatrix();
|
||||
numJoints = int(this.§_-A6§.length);
|
||||
skin = new Skin(this.§_-1U§,numJoints);
|
||||
skin.geometry = this.geometry;
|
||||
joints = this.addJointsToSkin(skin,topmostJoints,this.findNodes(skeletons));
|
||||
this.setJointsBindMatrices(joints);
|
||||
skin.var_633 = this.collectRenderedJoints(joints,numJoints);
|
||||
skin.§_-WA§ = this.collectRenderedJoints(joints,numJoints);
|
||||
if(this.primitives != null)
|
||||
{
|
||||
for(i = 0; i < this.primitives.length; i++)
|
||||
@@ -364,17 +364,17 @@ package alternativa.engine3d.loaders.collada
|
||||
return result;
|
||||
}
|
||||
|
||||
private function mergeJointsClips(skin:Skin, joints:Vector.<DaeObject>) : name_550
|
||||
private function mergeJointsClips(skin:Skin, joints:Vector.<DaeObject>) : AnimationClip
|
||||
{
|
||||
var animatedObject:DaeObject = null;
|
||||
var clip:name_550 = null;
|
||||
var clip:AnimationClip = null;
|
||||
var object:Object3D = null;
|
||||
var t:int = 0;
|
||||
if(!this.hasJointsAnimation(joints))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var result:name_550 = new name_550();
|
||||
var result:AnimationClip = new AnimationClip();
|
||||
var resultObjects:Array = [skin];
|
||||
for(var i:int = 0,var count:int = int(joints.length); i < count; i++)
|
||||
{
|
||||
@@ -384,18 +384,18 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
for(t = 0; t < clip.numTracks; t++)
|
||||
{
|
||||
result.name_551(clip.name_553(t));
|
||||
result.addTrack(clip.getTrackAt(t));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.name_551(animatedObject.jointNode.createStaticTransformTrack());
|
||||
result.addTrack(animatedObject.jointNode.createStaticTransformTrack());
|
||||
}
|
||||
object = animatedObject.object;
|
||||
object.name = animatedObject.jointNode.animName;
|
||||
resultObjects.push(object);
|
||||
}
|
||||
result.alternativa3d::var_348 = resultObjects;
|
||||
result.alternativa3d::_-Kq = resultObjects;
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -418,10 +418,10 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
var animatedJoint:DaeObject = null;
|
||||
var bindMatrix:Vector.<Number> = null;
|
||||
for(var i:int = 0,var count:int = int(this.var_725.length); i < count; i++)
|
||||
for(var i:int = 0,var count:int = int(this.§_-A6§.length); i < count; i++)
|
||||
{
|
||||
animatedJoint = animatedJoints[i];
|
||||
bindMatrix = this.var_725[i];
|
||||
bindMatrix = this.§_-A6§[i];
|
||||
Joint(animatedJoint.object).alternativa3d::setBindPoseMatrix(bindMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
private var data:XML;
|
||||
|
||||
internal var var_690:Object;
|
||||
internal var §_-DR§:Object;
|
||||
|
||||
internal var arrays:Object;
|
||||
|
||||
@@ -24,9 +24,9 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
internal var effects:Object;
|
||||
|
||||
internal var var_691:Object;
|
||||
internal var §_-DW§:Object;
|
||||
|
||||
internal var var_692:Object;
|
||||
internal var §_-GB§:Object;
|
||||
|
||||
public var materials:Object;
|
||||
|
||||
@@ -83,14 +83,14 @@ package alternativa.engine3d.loaders.collada
|
||||
var geom:DaeGeometry = null;
|
||||
var controller:DaeController = null;
|
||||
var node:DaeNode = null;
|
||||
this.var_690 = new Object();
|
||||
this.§_-DR§ = new Object();
|
||||
this.arrays = new Object();
|
||||
for each(element in this.data..source)
|
||||
{
|
||||
source = new DaeSource(element,this);
|
||||
if(source.id != null)
|
||||
{
|
||||
this.var_690[source.id] = source;
|
||||
this.§_-DR§[source.id] = source;
|
||||
}
|
||||
}
|
||||
this.lights = new Object();
|
||||
@@ -139,13 +139,13 @@ package alternativa.engine3d.loaders.collada
|
||||
this.geometries[geom.id] = geom;
|
||||
}
|
||||
}
|
||||
this.var_691 = new Object();
|
||||
this.§_-DW§ = new Object();
|
||||
for each(element in this.data.library_controllers.controller)
|
||||
{
|
||||
controller = new DaeController(element,this);
|
||||
if(controller.id != null)
|
||||
{
|
||||
this.var_691[controller.id] = controller;
|
||||
this.§_-DW§[controller.id] = controller;
|
||||
}
|
||||
}
|
||||
this.nodes = new Object();
|
||||
@@ -198,13 +198,13 @@ package alternativa.engine3d.loaders.collada
|
||||
var sampler:DaeSampler = null;
|
||||
var channel:DaeChannel = null;
|
||||
var node:DaeNode = null;
|
||||
this.var_692 = new Object();
|
||||
this.§_-GB§ = new Object();
|
||||
for each(element in this.data.library_animations..sampler)
|
||||
{
|
||||
sampler = new DaeSampler(element,this);
|
||||
if(sampler.id != null)
|
||||
{
|
||||
this.var_692[sampler.id] = sampler;
|
||||
this.§_-GB§[sampler.id] = sampler;
|
||||
}
|
||||
}
|
||||
for each(element in this.data.library_animations..channel)
|
||||
@@ -225,7 +225,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function findSource(url:XML) : DaeSource
|
||||
{
|
||||
return this.var_690[this.getLocalID(url)];
|
||||
return this.§_-DR§[this.getLocalID(url)];
|
||||
}
|
||||
|
||||
public function findLight(url:XML) : DaeLight
|
||||
@@ -275,12 +275,12 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function findController(url:XML) : DaeController
|
||||
{
|
||||
return this.var_691[this.getLocalID(url)];
|
||||
return this.§_-DW§[this.getLocalID(url)];
|
||||
}
|
||||
|
||||
public function findSampler(url:XML) : DaeSampler
|
||||
{
|
||||
return this.var_692[this.getLocalID(url)];
|
||||
return this.§_-GB§[this.getLocalID(url)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
public static var commonAlways:Boolean = false;
|
||||
|
||||
private var var_717:Object;
|
||||
private var §_-3x§:Object;
|
||||
|
||||
private var var_718:Object;
|
||||
private var §_-El§:Object;
|
||||
|
||||
private var var_716:Object;
|
||||
private var §_-3H§:Object;
|
||||
|
||||
private var diffuse:DaeEffectParam;
|
||||
|
||||
@@ -66,26 +66,26 @@ package alternativa.engine3d.loaders.collada
|
||||
var reflectiveXML:XML = null;
|
||||
var emissionXML:XML = null;
|
||||
var specularXML:XML = null;
|
||||
this.var_717 = new Object();
|
||||
this.§_-3x§ = new Object();
|
||||
for each(element in data.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.var_717[param.sid] = param;
|
||||
this.§_-3x§[param.sid] = param;
|
||||
}
|
||||
this.var_718 = new Object();
|
||||
this.§_-El§ = new Object();
|
||||
for each(element in data.profile_COMMON.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.var_718[param.sid] = param;
|
||||
this.§_-El§[param.sid] = param;
|
||||
}
|
||||
this.var_716 = new Object();
|
||||
this.§_-3H§ = new Object();
|
||||
technique = data.profile_COMMON.technique[0];
|
||||
if(technique != null)
|
||||
{
|
||||
for each(element in technique.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.var_716[param.sid] = param;
|
||||
this.§_-3H§[param.sid] = param;
|
||||
}
|
||||
}
|
||||
shader = data.profile_COMMON.technique.*.(localName() == "constant" || localName() == "lambert" || localName() == "phong" || localName() == "blinn")[0];
|
||||
@@ -153,17 +153,17 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
return param;
|
||||
}
|
||||
param = this.var_716[name];
|
||||
param = this.§_-3H§[name];
|
||||
if(param != null)
|
||||
{
|
||||
return param;
|
||||
}
|
||||
param = this.var_718[name];
|
||||
param = this.§_-El§[name];
|
||||
if(param != null)
|
||||
{
|
||||
return param;
|
||||
}
|
||||
return this.var_717[name];
|
||||
return this.§_-3x§[name];
|
||||
}
|
||||
|
||||
private function float4ToUint(value:Array, alpha:Boolean = true) : uint
|
||||
|
||||
@@ -12,7 +12,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public var data:XML;
|
||||
|
||||
private var var_697:int = -1;
|
||||
private var §_-Ba§:int = -1;
|
||||
|
||||
public function DaeElement(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -35,12 +35,12 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function parse() : Boolean
|
||||
{
|
||||
if(this.var_697 < 0)
|
||||
if(this.§_-Ba§ < 0)
|
||||
{
|
||||
this.var_697 = this.parseImplementation() ? 1 : 0;
|
||||
return this.var_697 != 0;
|
||||
this.§_-Ba§ = this.parseImplementation() ? 1 : 0;
|
||||
return this.§_-Ba§ != 0;
|
||||
}
|
||||
return this.var_697 != 0;
|
||||
return this.§_-Ba§ != 0;
|
||||
}
|
||||
|
||||
protected function parseImplementation() : Boolean
|
||||
|
||||
@@ -13,7 +13,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeGeometry extends DaeElement
|
||||
{
|
||||
internal var var_715:Vector.<DaeVertex>;
|
||||
internal var §_-FV§:Vector.<DaeVertex>;
|
||||
|
||||
internal var primitives:Vector.<DaePrimitive>;
|
||||
|
||||
@@ -53,9 +53,9 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
this.parsePrimitives();
|
||||
this.vertices.parse();
|
||||
numVertices = this.vertices.name_597.numbers.length / this.vertices.name_597.stride;
|
||||
numVertices = this.vertices.§_-E6§.numbers.length / this.vertices.§_-E6§.stride;
|
||||
this.geometry = new Geometry();
|
||||
this.var_715 = new Vector.<DaeVertex>(numVertices);
|
||||
this.§_-FV§ = new Vector.<DaeVertex>(numVertices);
|
||||
channels = 0;
|
||||
for(i = 0; i < this.primitives.length; )
|
||||
{
|
||||
@@ -63,8 +63,8 @@ package alternativa.engine3d.loaders.collada
|
||||
p.parse();
|
||||
if(p.verticesEquals(this.vertices))
|
||||
{
|
||||
numVertices = int(this.var_715.length);
|
||||
channels |= p.fillGeometry(this.geometry,this.var_715);
|
||||
numVertices = int(this.§_-FV§.length);
|
||||
channels |= p.fillGeometry(this.geometry,this.§_-FV§);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -105,14 +105,14 @@ package alternativa.engine3d.loaders.collada
|
||||
i++;
|
||||
}
|
||||
this.geometry.addVertexStream(attributes);
|
||||
numVertices = int(this.var_715.length);
|
||||
numVertices = int(this.§_-FV§.length);
|
||||
data = new ByteArray();
|
||||
data.endian = Endian.LITTLE_ENDIAN;
|
||||
numMappings = int(attributes.length);
|
||||
data.length = 4 * numMappings * numVertices;
|
||||
for(i = 0; i < numVertices; )
|
||||
{
|
||||
vertex = this.var_715[i];
|
||||
vertex = this.§_-FV§[i];
|
||||
if(vertex != null)
|
||||
{
|
||||
data.position = 4 * numMappings * i;
|
||||
@@ -125,12 +125,12 @@ package alternativa.engine3d.loaders.collada
|
||||
data.writeFloat(vertex.normal.y);
|
||||
data.writeFloat(vertex.normal.z);
|
||||
}
|
||||
if(vertex.name_596 != null)
|
||||
if(vertex.§_-hC§ != null)
|
||||
{
|
||||
data.writeFloat(vertex.name_596.x);
|
||||
data.writeFloat(vertex.name_596.y);
|
||||
data.writeFloat(vertex.name_596.z);
|
||||
data.writeFloat(vertex.name_596.w);
|
||||
data.writeFloat(vertex.§_-hC§.x);
|
||||
data.writeFloat(vertex.§_-hC§.y);
|
||||
data.writeFloat(vertex.§_-hC§.z);
|
||||
data.writeFloat(vertex.§_-hC§.w);
|
||||
}
|
||||
for(j = 0; j < vertex.uvs.length; )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function get setNum() : int
|
||||
{
|
||||
var attr:XML = data.@name_616[0];
|
||||
var attr:XML = data.@set[0];
|
||||
return attr == null ? 0 : int(parseInt(attr.toString(),10));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.keys.name_590;
|
||||
import alternativa.engine3d.animation.keys.name_591;
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
import alternativa.engine3d.animation.AnimationClip;
|
||||
import alternativa.engine3d.animation.keys.NumberTrack;
|
||||
import alternativa.engine3d.animation.keys.Track;
|
||||
import alternativa.engine3d.animation.keys.TransformTrack;
|
||||
import alternativa.engine3d.core.Light3D;
|
||||
import alternativa.engine3d.core.Object3D;
|
||||
import alternativa.engine3d.objects.Mesh;
|
||||
@@ -23,7 +23,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
private var channels:Vector.<DaeChannel>;
|
||||
|
||||
private var var_698:Vector.<DaeInstanceController>;
|
||||
private var §_-DE§:Vector.<DaeInstanceController>;
|
||||
|
||||
public var nodes:Vector.<DaeNode>;
|
||||
|
||||
@@ -112,11 +112,11 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function addInstanceController(controller:DaeInstanceController) : void
|
||||
{
|
||||
if(this.var_698 == null)
|
||||
if(this.§_-DE§ == null)
|
||||
{
|
||||
this.var_698 = new Vector.<DaeInstanceController>();
|
||||
this.§_-DE§ = new Vector.<DaeInstanceController>();
|
||||
}
|
||||
this.var_698.push(controller);
|
||||
this.§_-DE§.push(controller);
|
||||
}
|
||||
|
||||
override protected function parseImplementation() : Boolean
|
||||
@@ -188,14 +188,14 @@ package alternativa.engine3d.loaders.collada
|
||||
var instanceController:DaeInstanceController = null;
|
||||
var skinAndAnimatedJoints:DaeObject = null;
|
||||
var skin:Skin = null;
|
||||
if(this.var_698 == null)
|
||||
if(this.§_-DE§ == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var skins:Vector.<DaeObject> = new Vector.<DaeObject>();
|
||||
for(var i:int = 0,var count:int = int(this.var_698.length); i < count; )
|
||||
for(var i:int = 0,var count:int = int(this.§_-DE§.length); i < count; )
|
||||
{
|
||||
instanceController = this.var_698[i];
|
||||
instanceController = this.§_-DE§[i];
|
||||
instanceController.parse();
|
||||
skinAndAnimatedJoints = instanceController.parseSkin(this.parseInstanceMaterials(instanceController.data));
|
||||
if(skinAndAnimatedJoints != null)
|
||||
@@ -345,17 +345,17 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function applyAnimation(object:Object3D) : DaeObject
|
||||
{
|
||||
var animation:name_550 = this.parseAnimation(object);
|
||||
var animation:AnimationClip = this.parseAnimation(object);
|
||||
if(animation == null)
|
||||
{
|
||||
return new DaeObject(object);
|
||||
}
|
||||
object.name = this.animName;
|
||||
animation.method_360(object,false);
|
||||
animation.attach(object,false);
|
||||
return new DaeObject(object,animation);
|
||||
}
|
||||
|
||||
public function parseAnimation(object:Object3D = null) : name_550
|
||||
public function parseAnimation(object:Object3D = null) : AnimationClip
|
||||
{
|
||||
if(this.channels == null || !this.hasTransformationAnimation())
|
||||
{
|
||||
@@ -366,7 +366,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
return this.createClip(channel.tracks);
|
||||
}
|
||||
var clip:name_550 = new name_550();
|
||||
var clip:AnimationClip = new AnimationClip();
|
||||
var components:Vector.<Vector3D> = object != null ? null : this.getMatrix().decompose();
|
||||
channel = this.getChannel(DaeChannel.PARAM_TRANSLATE);
|
||||
if(channel != null)
|
||||
@@ -382,7 +382,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("x",object == null ? Number(components[0].x) : object.x));
|
||||
clip.addTrack(this.createValueStaticTrack("x",object == null ? Number(components[0].x) : object.x));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_TRANSLATE_Y);
|
||||
if(channel != null)
|
||||
@@ -391,7 +391,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("y",object == null ? Number(components[0].y) : object.y));
|
||||
clip.addTrack(this.createValueStaticTrack("y",object == null ? Number(components[0].y) : object.y));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_TRANSLATE_Z);
|
||||
if(channel != null)
|
||||
@@ -400,7 +400,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("z",object == null ? Number(components[0].z) : object.z));
|
||||
clip.addTrack(this.createValueStaticTrack("z",object == null ? Number(components[0].z) : object.z));
|
||||
}
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_ROTATION_X);
|
||||
@@ -410,7 +410,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("rotationX",object == null ? Number(components[1].x) : object.rotationX));
|
||||
clip.addTrack(this.createValueStaticTrack("rotationX",object == null ? Number(components[1].x) : object.rotationX));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_ROTATION_Y);
|
||||
if(channel != null)
|
||||
@@ -419,7 +419,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("rotationY",object == null ? Number(components[1].y) : object.rotationY));
|
||||
clip.addTrack(this.createValueStaticTrack("rotationY",object == null ? Number(components[1].y) : object.rotationY));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_ROTATION_Z);
|
||||
if(channel != null)
|
||||
@@ -428,7 +428,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("rotationZ",object == null ? Number(components[1].z) : object.rotationZ));
|
||||
clip.addTrack(this.createValueStaticTrack("rotationZ",object == null ? Number(components[1].z) : object.rotationZ));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_SCALE);
|
||||
if(channel != null)
|
||||
@@ -444,7 +444,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("scaleX",object == null ? Number(components[2].x) : object.scaleX));
|
||||
clip.addTrack(this.createValueStaticTrack("scaleX",object == null ? Number(components[2].x) : object.scaleX));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_SCALE_Y);
|
||||
if(channel != null)
|
||||
@@ -453,7 +453,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("scaleY",object == null ? Number(components[2].y) : object.scaleY));
|
||||
clip.addTrack(this.createValueStaticTrack("scaleY",object == null ? Number(components[2].y) : object.scaleY));
|
||||
}
|
||||
channel = this.getChannel(DaeChannel.PARAM_SCALE_Z);
|
||||
if(channel != null)
|
||||
@@ -462,7 +462,7 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.name_551(this.createValueStaticTrack("scaleZ",object == null ? Number(components[2].z) : object.scaleZ));
|
||||
clip.addTrack(this.createValueStaticTrack("scaleZ",object == null ? Number(components[2].z) : object.scaleZ));
|
||||
}
|
||||
}
|
||||
if(clip.numTracks > 0)
|
||||
@@ -472,21 +472,21 @@ package alternativa.engine3d.loaders.collada
|
||||
return null;
|
||||
}
|
||||
|
||||
private function createClip(tracks:Vector.<name_552>) : name_550
|
||||
private function createClip(tracks:Vector.<Track>) : AnimationClip
|
||||
{
|
||||
var clip:name_550 = new name_550();
|
||||
var clip:AnimationClip = new AnimationClip();
|
||||
for(var i:int = 0,var count:int = int(tracks.length); i < count; i++)
|
||||
{
|
||||
clip.name_551(tracks[i]);
|
||||
clip.addTrack(tracks[i]);
|
||||
}
|
||||
return clip;
|
||||
}
|
||||
|
||||
private function addTracksToClip(clip:name_550, tracks:Vector.<name_552>) : void
|
||||
private function addTracksToClip(clip:AnimationClip, tracks:Vector.<Track>) : void
|
||||
{
|
||||
for(var i:int = 0,var count:int = int(tracks.length); i < count; i++)
|
||||
{
|
||||
clip.name_551(tracks[i]);
|
||||
clip.addTrack(tracks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,18 +498,18 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
channel = this.channels[i];
|
||||
channel.parse();
|
||||
result = channel.name_589 == DaeChannel.PARAM_MATRIX;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_TRANSLATE;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_TRANSLATE_X;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_TRANSLATE_Y;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_TRANSLATE_Z;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_ROTATION_X;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_ROTATION_Y;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_ROTATION_Z;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_SCALE;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_SCALE_X;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_SCALE_Y;
|
||||
result ||= channel.name_589 == DaeChannel.PARAM_SCALE_Z;
|
||||
result = channel.§_-dS§ == DaeChannel.PARAM_MATRIX;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_TRANSLATE;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_TRANSLATE_X;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_TRANSLATE_Y;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_TRANSLATE_Z;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_ROTATION_X;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_ROTATION_Y;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_ROTATION_Z;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_SCALE;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_SCALE_X;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_SCALE_Y;
|
||||
result ||= channel.§_-dS§ == DaeChannel.PARAM_SCALE_Z;
|
||||
if(result)
|
||||
{
|
||||
return true;
|
||||
@@ -526,7 +526,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
channel = this.channels[i];
|
||||
channel.parse();
|
||||
if(channel.name_589 == param)
|
||||
if(channel.§_-dS§ == param)
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ package alternativa.engine3d.loaders.collada
|
||||
return null;
|
||||
}
|
||||
|
||||
private function concatTracks(source:Vector.<name_552>, dest:Vector.<name_552>) : void
|
||||
private function concatTracks(source:Vector.<Track>, dest:Vector.<Track>) : void
|
||||
{
|
||||
for(var i:int = 0,var count:int = int(source.length); i < count; i++)
|
||||
{
|
||||
@@ -543,16 +543,16 @@ package alternativa.engine3d.loaders.collada
|
||||
}
|
||||
}
|
||||
|
||||
private function createValueStaticTrack(property:String, value:Number) : name_552
|
||||
private function createValueStaticTrack(property:String, value:Number) : Track
|
||||
{
|
||||
var track:name_591 = new name_591(this.animName,property);
|
||||
var track:NumberTrack = new NumberTrack(this.animName,property);
|
||||
track.addKey(0,value);
|
||||
return track;
|
||||
}
|
||||
|
||||
public function createStaticTransformTrack() : name_590
|
||||
public function createStaticTransformTrack() : TransformTrack
|
||||
{
|
||||
var track:name_590 = new name_590(this.animName);
|
||||
var track:TransformTrack = new TransformTrack(this.animName);
|
||||
track.addKey(0,this.getMatrix());
|
||||
return track;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
import alternativa.engine3d.animation.AnimationClip;
|
||||
import alternativa.engine3d.core.Object3D;
|
||||
|
||||
public class DaeObject
|
||||
{
|
||||
public var object:Object3D;
|
||||
|
||||
public var animation:name_550;
|
||||
public var animation:AnimationClip;
|
||||
|
||||
public var jointNode:DaeNode;
|
||||
|
||||
public function DaeObject(object:Object3D, animation:name_550 = null)
|
||||
public function DaeObject(object:Object3D, animation:AnimationClip = null)
|
||||
{
|
||||
super();
|
||||
this.object = object;
|
||||
|
||||
391
src/alternativa/engine3d/loaders/collada/DaePrimitive.as
Normal file
391
src/alternativa/engine3d/loaders/collada/DaePrimitive.as
Normal file
@@ -0,0 +1,391 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import alternativa.engine3d.resources.Geometry;
|
||||
|
||||
use namespace collada;
|
||||
use namespace alternativa3d;
|
||||
|
||||
public class DaePrimitive extends DaeElement
|
||||
{
|
||||
internal static const NORMALS:int = 1;
|
||||
|
||||
internal static const TANGENT4:int = 2;
|
||||
|
||||
internal static const TEXCOORDS:Vector.<uint> = Vector.<uint>([8,16,32,64,128,256,512,1024]);
|
||||
|
||||
internal var §_-2g§:DaeInput;
|
||||
|
||||
internal var §_-aL§:Vector.<DaeInput>;
|
||||
|
||||
internal var §_-Fl§:DaeInput;
|
||||
|
||||
internal var §_-jU§:Vector.<DaeInput>;
|
||||
|
||||
internal var §_-ly§:Vector.<DaeInput>;
|
||||
|
||||
internal var indices:Vector.<uint>;
|
||||
|
||||
internal var §_-5O§:int;
|
||||
|
||||
public var indexBegin:int;
|
||||
|
||||
public var numTriangles:int;
|
||||
|
||||
public function DaePrimitive(data:XML, document:DaeDocument)
|
||||
{
|
||||
super(data,document);
|
||||
}
|
||||
|
||||
override protected function parseImplementation() : Boolean
|
||||
{
|
||||
this.parseInputs();
|
||||
this.parseIndices();
|
||||
return true;
|
||||
}
|
||||
|
||||
private function get type() : String
|
||||
{
|
||||
return data.localName() as String;
|
||||
}
|
||||
|
||||
private function parseInputs() : void
|
||||
{
|
||||
var input:DaeInput = null;
|
||||
var semantic:String = null;
|
||||
var offset:int = 0;
|
||||
this.§_-aL§ = new Vector.<DaeInput>();
|
||||
this.§_-ly§ = new Vector.<DaeInput>();
|
||||
this.§_-jU§ = new Vector.<DaeInput>();
|
||||
var inputsList:XMLList = data.input;
|
||||
var maxInputOffset:int = 0;
|
||||
for(var i:int = 0,var count:int = int(inputsList.length()); i < count; offset = input.offset,maxInputOffset = offset > maxInputOffset ? offset : maxInputOffset,i++)
|
||||
{
|
||||
input = new DaeInput(inputsList[i],document);
|
||||
semantic = input.semantic;
|
||||
if(semantic == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
switch(semantic)
|
||||
{
|
||||
case "VERTEX":
|
||||
if(this.§_-2g§ == null)
|
||||
{
|
||||
this.§_-2g§ = input;
|
||||
}
|
||||
break;
|
||||
case "TEXCOORD":
|
||||
this.§_-aL§.push(input);
|
||||
break;
|
||||
case "NORMAL":
|
||||
if(this.§_-Fl§ == null)
|
||||
{
|
||||
this.§_-Fl§ = input;
|
||||
}
|
||||
break;
|
||||
case "TEXTANGENT":
|
||||
this.§_-ly§.push(input);
|
||||
break;
|
||||
case "TEXBINORMAL":
|
||||
this.§_-jU§.push(input);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.§_-5O§ = maxInputOffset + 1;
|
||||
}
|
||||
|
||||
private function parseIndices() : void
|
||||
{
|
||||
var array:Array = null;
|
||||
var _loc5_:XMLList = null;
|
||||
var _loc6_:XMLList = null;
|
||||
var j:int = 0;
|
||||
this.indices = new Vector.<uint>();
|
||||
var vcount:Vector.<int> = new Vector.<int>();
|
||||
var i:int = 0;
|
||||
var count:int = 0;
|
||||
switch(data.localName())
|
||||
{
|
||||
case "polylist":
|
||||
case "polygons":
|
||||
_loc5_ = data.vcount;
|
||||
array = parseStringArray(_loc5_[0]);
|
||||
i = 0;
|
||||
count = int(array.length);
|
||||
while(true)
|
||||
{
|
||||
if(i < count)
|
||||
{
|
||||
vcount.push(parseInt(array[i]));
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
case "triangles":
|
||||
_loc6_ = data.p;
|
||||
for(i = 0,count = int(_loc6_.length()); i < count; )
|
||||
{
|
||||
array = parseStringArray(_loc6_[i]);
|
||||
for(j = 0; j < array.length; j++)
|
||||
{
|
||||
this.indices.push(parseInt(array[j],10));
|
||||
}
|
||||
if(vcount.length > 0)
|
||||
{
|
||||
this.indices = this.triangulate(this.indices,vcount);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function triangulate(input:Vector.<uint>, vcount:Vector.<int>) : Vector.<uint>
|
||||
{
|
||||
var indexIn:uint = 0;
|
||||
var i:int = 0;
|
||||
var j:int = 0;
|
||||
var k:int = 0;
|
||||
var count:int = 0;
|
||||
var verticesCount:int = 0;
|
||||
var attributesCount:int = 0;
|
||||
var res:Vector.<uint> = new Vector.<uint>();
|
||||
var indexOut:uint = 0;
|
||||
for(i = 0,count = int(vcount.length); i < count; i++)
|
||||
{
|
||||
verticesCount = vcount[i];
|
||||
attributesCount = verticesCount * this.§_-5O§;
|
||||
if(verticesCount == 3)
|
||||
{
|
||||
j = 0;
|
||||
while(j < attributesCount)
|
||||
{
|
||||
res[indexOut] = input[indexIn];
|
||||
j++;
|
||||
indexIn++;
|
||||
indexOut++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(j = 1; j < verticesCount - 1; )
|
||||
{
|
||||
for(k = 0; k < this.§_-5O§; k++,indexOut++)
|
||||
{
|
||||
res[indexOut] = input[int(indexIn + k)];
|
||||
}
|
||||
for(k = 0; k < this.§_-5O§; k++,indexOut++)
|
||||
{
|
||||
res[indexOut] = input[int(indexIn + this.§_-5O§ * j + k)];
|
||||
}
|
||||
for(k = 0; k < this.§_-5O§; k++,indexOut++)
|
||||
{
|
||||
res[indexOut] = input[int(indexIn + this.§_-5O§ * (j + 1) + k)];
|
||||
}
|
||||
j++;
|
||||
}
|
||||
indexIn += this.§_-5O§ * verticesCount;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public function fillGeometry(geometry:Geometry, vertices:Vector.<DaeVertex>) : uint
|
||||
{
|
||||
var tangentSource:DaeSource = null;
|
||||
var binormalSource:DaeSource = null;
|
||||
var normalSource:DaeSource = null;
|
||||
var index:uint = 0;
|
||||
var vertex:DaeVertex = null;
|
||||
var s:DaeSource = null;
|
||||
var j:int = 0;
|
||||
if(this.§_-2g§ == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
this.§_-2g§.parse();
|
||||
var numIndices:int = int(this.indices.length);
|
||||
var daeVertices:DaeVertices = document.findVertices(this.§_-2g§.source);
|
||||
if(daeVertices == null)
|
||||
{
|
||||
document.logger.logNotFoundError(this.§_-2g§.source);
|
||||
return 0;
|
||||
}
|
||||
daeVertices.parse();
|
||||
var positionSource:DaeSource = daeVertices.§_-E6§;
|
||||
var vertexStride:int = 3;
|
||||
var mainSource:DaeSource = positionSource;
|
||||
var mainInput:DaeInput = this.§_-2g§;
|
||||
var channels:uint = 0;
|
||||
var inputOffsets:Vector.<int> = new Vector.<int>();
|
||||
inputOffsets.push(this.§_-2g§.offset);
|
||||
if(this.§_-Fl§ != null)
|
||||
{
|
||||
normalSource = this.§_-Fl§.prepareSource(3);
|
||||
inputOffsets.push(this.§_-Fl§.offset);
|
||||
vertexStride += 3;
|
||||
channels |= NORMALS;
|
||||
if(this.§_-ly§.length > 0 && this.§_-jU§.length > 0)
|
||||
{
|
||||
tangentSource = this.§_-ly§[0].prepareSource(3);
|
||||
inputOffsets.push(this.§_-ly§[0].offset);
|
||||
binormalSource = this.§_-jU§[0].prepareSource(3);
|
||||
inputOffsets.push(this.§_-jU§[0].offset);
|
||||
vertexStride += 4;
|
||||
channels |= TANGENT4;
|
||||
}
|
||||
}
|
||||
var textureSources:Vector.<DaeSource> = new Vector.<DaeSource>();
|
||||
var numTexCoordsInputs:int = int(this.§_-aL§.length);
|
||||
if(numTexCoordsInputs > 8)
|
||||
{
|
||||
numTexCoordsInputs = 8;
|
||||
}
|
||||
for(var i:int = 0; i < numTexCoordsInputs; )
|
||||
{
|
||||
s = this.§_-aL§[i].prepareSource(2);
|
||||
textureSources.push(s);
|
||||
inputOffsets.push(this.§_-aL§[i].offset);
|
||||
vertexStride += 2;
|
||||
channels |= TEXCOORDS[i];
|
||||
i++;
|
||||
}
|
||||
var verticesLength:int = int(vertices.length);
|
||||
this.indexBegin = geometry.alternativa3d::_indices.length;
|
||||
for(i = 0; i < numIndices; i += this.§_-5O§)
|
||||
{
|
||||
index = this.indices[int(i + mainInput.offset)];
|
||||
vertex = vertices[index];
|
||||
if(vertex == null || !this.isEqual(vertex,this.indices,i,inputOffsets))
|
||||
{
|
||||
if(vertex != null)
|
||||
{
|
||||
index = uint(verticesLength++);
|
||||
}
|
||||
vertex = new DaeVertex();
|
||||
vertices[index] = vertex;
|
||||
vertex.§_-Eq§ = this.indices[int(i + this.§_-2g§.offset)];
|
||||
vertex.addPosition(positionSource.numbers,vertex.§_-Eq§,positionSource.stride,document.unitScaleFactor);
|
||||
if(normalSource != null)
|
||||
{
|
||||
vertex.addNormal(normalSource.numbers,this.indices[int(i + this.§_-Fl§.offset)],normalSource.stride);
|
||||
}
|
||||
if(tangentSource != null)
|
||||
{
|
||||
vertex.addTangentBiDirection(tangentSource.numbers,this.indices[int(i + this.§_-ly§[0].offset)],tangentSource.stride,binormalSource.numbers,this.indices[int(i + this.§_-jU§[0].offset)],binormalSource.stride);
|
||||
}
|
||||
for(j = 0; j < textureSources.length; )
|
||||
{
|
||||
vertex.appendUV(textureSources[j].numbers,this.indices[int(i + this.§_-aL§[j].offset)],textureSources[j].stride);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
vertex.§_-AR§ = index;
|
||||
geometry.alternativa3d::_indices.push(index);
|
||||
}
|
||||
this.numTriangles = (geometry.alternativa3d::_indices.length - this.indexBegin) / 3;
|
||||
return channels;
|
||||
}
|
||||
|
||||
private function isEqual(vertex:DaeVertex, indices:Vector.<uint>, index:int, offsets:Vector.<int>) : Boolean
|
||||
{
|
||||
var numOffsets:int = int(offsets.length);
|
||||
for(var j:int = 0; j < numOffsets; )
|
||||
{
|
||||
if(vertex.indices[j] != indices[int(index + offsets[j])])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function findInputBySet(inputs:Vector.<DaeInput>, setNum:int) : DaeInput
|
||||
{
|
||||
var input:DaeInput = null;
|
||||
for(var i:int = 0,var numInputs:int = int(inputs.length); i < numInputs; )
|
||||
{
|
||||
input = inputs[i];
|
||||
if(input.setNum == setNum)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private function getTexCoordsDatas(mainSetNum:int) : Vector.<VertexChannelData>
|
||||
{
|
||||
var i:int = 0;
|
||||
var texCoordsInput:DaeInput = null;
|
||||
var texCoordsSource:DaeSource = null;
|
||||
var data:VertexChannelData = null;
|
||||
var mainInput:DaeInput = this.findInputBySet(this.§_-aL§,mainSetNum);
|
||||
var numInputs:int = int(this.§_-aL§.length);
|
||||
var datas:Vector.<VertexChannelData> = new Vector.<VertexChannelData>();
|
||||
for(i = 0; i < numInputs; )
|
||||
{
|
||||
texCoordsInput = this.§_-aL§[i];
|
||||
texCoordsSource = texCoordsInput.prepareSource(2);
|
||||
if(texCoordsSource != null)
|
||||
{
|
||||
data = new VertexChannelData(texCoordsSource.numbers,texCoordsSource.stride,texCoordsInput.offset,texCoordsInput.setNum);
|
||||
if(texCoordsInput == mainInput)
|
||||
{
|
||||
datas.unshift(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
datas.push(data);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return datas.length > 0 ? datas : null;
|
||||
}
|
||||
|
||||
public function verticesEquals(otherVertices:DaeVertices) : Boolean
|
||||
{
|
||||
var vertices:DaeVertices = document.findVertices(this.§_-2g§.source);
|
||||
if(vertices == null)
|
||||
{
|
||||
document.logger.logNotFoundError(this.§_-2g§.source);
|
||||
}
|
||||
return vertices == otherVertices;
|
||||
}
|
||||
|
||||
public function get materialSymbol() : String
|
||||
{
|
||||
var attr:XML = data.@material[0];
|
||||
return attr == null ? null : attr.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import flash.geom.Point;
|
||||
|
||||
class VertexChannelData
|
||||
{
|
||||
public var values:Vector.<Number>;
|
||||
|
||||
public var stride:int;
|
||||
|
||||
public var offset:int;
|
||||
|
||||
public var index:int;
|
||||
|
||||
public var channel:Vector.<Point>;
|
||||
|
||||
public var inputSet:int;
|
||||
|
||||
public function VertexChannelData(values:Vector.<Number>, stride:int, offset:int, inputSet:int = 0)
|
||||
{
|
||||
super();
|
||||
this.values = values;
|
||||
this.stride = stride;
|
||||
this.offset = offset;
|
||||
this.inputSet = inputSet;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.keys.name_590;
|
||||
import alternativa.engine3d.animation.keys.name_591;
|
||||
import alternativa.engine3d.animation.keys.NumberTrack;
|
||||
import alternativa.engine3d.animation.keys.Track;
|
||||
import alternativa.engine3d.animation.keys.TransformTrack;
|
||||
import flash.geom.Matrix3D;
|
||||
|
||||
use namespace collada;
|
||||
|
||||
public class DaeSampler extends DaeElement
|
||||
{
|
||||
private var var_719:Vector.<Number>;
|
||||
private var §_-G6§:Vector.<Number>;
|
||||
|
||||
private var values:Vector.<Number>;
|
||||
|
||||
private var var_720:int;
|
||||
private var §_-JC§:int;
|
||||
|
||||
private var var_721:int;
|
||||
private var §_-7i§:int;
|
||||
|
||||
public function DaeSampler(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -43,8 +43,8 @@ package alternativa.engine3d.loaders.collada
|
||||
inputSource = input.prepareSource(1);
|
||||
if(inputSource != null)
|
||||
{
|
||||
this.var_719 = inputSource.numbers;
|
||||
this.var_720 = inputSource.stride;
|
||||
this.§_-G6§ = inputSource.numbers;
|
||||
this.§_-JC§ = inputSource.stride;
|
||||
}
|
||||
break;
|
||||
case "OUTPUT":
|
||||
@@ -52,7 +52,7 @@ package alternativa.engine3d.loaders.collada
|
||||
if(outputSource != null)
|
||||
{
|
||||
this.values = outputSource.numbers;
|
||||
this.var_721 = outputSource.stride;
|
||||
this.§_-7i§ = outputSource.stride;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -60,73 +60,73 @@ package alternativa.engine3d.loaders.collada
|
||||
return true;
|
||||
}
|
||||
|
||||
public function parseNumbersTrack(objectName:String, property:String) : name_591
|
||||
public function parseNumbersTrack(objectName:String, property:String) : NumberTrack
|
||||
{
|
||||
var track:name_591 = null;
|
||||
var track:NumberTrack = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
if(this.var_719 != null && this.values != null && this.var_720 > 0)
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ > 0)
|
||||
{
|
||||
track = new name_591(objectName,property);
|
||||
count = this.var_719.length / this.var_720;
|
||||
track = new NumberTrack(objectName,property);
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
track.addKey(this.var_719[int(this.var_720 * i)],this.values[int(this.var_721 * i)]);
|
||||
track.addKey(this.§_-G6§[int(this.§_-JC§ * i)],this.values[int(this.§_-7i§ * i)]);
|
||||
}
|
||||
return track;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function parseTransformationTrack(objectName:String) : name_552
|
||||
public function parseTransformationTrack(objectName:String) : Track
|
||||
{
|
||||
var track:name_590 = null;
|
||||
var track:TransformTrack = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
var index:int = 0;
|
||||
var matrix:Matrix3D = null;
|
||||
if(this.var_719 != null && this.values != null && this.var_720 != 0)
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ != 0)
|
||||
{
|
||||
track = new name_590(objectName);
|
||||
count = this.var_719.length / this.var_720;
|
||||
track = new TransformTrack(objectName);
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = this.var_721 * i;
|
||||
index = this.§_-7i§ * i;
|
||||
matrix = new Matrix3D(Vector.<Number>([this.values[index],this.values[index + 4],this.values[index + 8],this.values[index + 12],this.values[index + 1],this.values[index + 5],this.values[index + 9],this.values[index + 13],this.values[index + 2],this.values[index + 6],this.values[index + 10],this.values[index + 14],this.values[index + 3],this.values[index + 7],this.values[index + 11],this.values[index + 15]]));
|
||||
track.addKey(this.var_719[i * this.var_720],matrix);
|
||||
track.addKey(this.§_-G6§[i * this.§_-JC§],matrix);
|
||||
}
|
||||
return track;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function parsePointsTracks(objectName:String, xProperty:String, yProperty:String, zProperty:String) : Vector.<name_552>
|
||||
public function parsePointsTracks(objectName:String, xProperty:String, yProperty:String, zProperty:String) : Vector.<Track>
|
||||
{
|
||||
var xTrack:name_591 = null;
|
||||
var yTrack:name_591 = null;
|
||||
var zTrack:name_591 = null;
|
||||
var xTrack:NumberTrack = null;
|
||||
var yTrack:NumberTrack = null;
|
||||
var zTrack:NumberTrack = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
var index:int = 0;
|
||||
var time:Number = NaN;
|
||||
if(this.var_719 != null && this.values != null && this.var_720 != 0)
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ != 0)
|
||||
{
|
||||
xTrack = new name_591(objectName,xProperty);
|
||||
xTrack = new NumberTrack(objectName,xProperty);
|
||||
xTrack.object = objectName;
|
||||
yTrack = new name_591(objectName,yProperty);
|
||||
yTrack = new NumberTrack(objectName,yProperty);
|
||||
yTrack.object = objectName;
|
||||
zTrack = new name_591(objectName,zProperty);
|
||||
zTrack = new NumberTrack(objectName,zProperty);
|
||||
zTrack.object = objectName;
|
||||
count = this.var_719.length / this.var_720;
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = i * this.var_721;
|
||||
time = this.var_719[i * this.var_720];
|
||||
index = i * this.§_-7i§;
|
||||
time = this.§_-G6§[i * this.§_-JC§];
|
||||
xTrack.addKey(time,this.values[index]);
|
||||
yTrack.addKey(time,this.values[index + 1]);
|
||||
zTrack.addKey(time,this.values[index + 2]);
|
||||
}
|
||||
return Vector.<name_552>([xTrack,yTrack,zTrack]);
|
||||
return Vector.<Track>([xTrack,yTrack,zTrack]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeSource extends DaeElement
|
||||
{
|
||||
private const const_7:String = "float_array";
|
||||
private const §_-XM§:String = "float_array";
|
||||
|
||||
private const const_9:String = "int_array";
|
||||
private const §_-g6§:String = "int_array";
|
||||
|
||||
private const const_8:String = "Name_array";
|
||||
private const §_-ZJ§:String = "Name_array";
|
||||
|
||||
public var numbers:Vector.<Number>;
|
||||
|
||||
public var var_550:Vector.<int>;
|
||||
public var §_-op§:Vector.<int>;
|
||||
|
||||
public var names:Vector.<String>;
|
||||
|
||||
@@ -34,9 +34,9 @@ package alternativa.engine3d.loaders.collada
|
||||
child = children[i];
|
||||
switch(child.localName())
|
||||
{
|
||||
case this.const_7:
|
||||
case this.const_9:
|
||||
case this.const_8:
|
||||
case this.§_-XM§:
|
||||
case this.§_-g6§:
|
||||
case this.§_-ZJ§:
|
||||
_loc5_ = new DaeArray(child,document);
|
||||
if(_loc5_.id != null)
|
||||
{
|
||||
@@ -119,13 +119,13 @@ package alternativa.engine3d.loaders.collada
|
||||
var arrStride:int = int(Math.max(this.numValidParams(params),stride));
|
||||
switch(type)
|
||||
{
|
||||
case this.const_7:
|
||||
case this.§_-XM§:
|
||||
this.numbers = new Vector.<Number>(int(arrStride * count));
|
||||
break;
|
||||
case this.const_9:
|
||||
this.var_550 = new Vector.<int>(int(arrStride * count));
|
||||
case this.§_-g6§:
|
||||
this.§_-op§ = new Vector.<int>(int(arrStride * count));
|
||||
break;
|
||||
case this.const_8:
|
||||
case this.§_-ZJ§:
|
||||
this.names = new Vector.<String>(int(arrStride * count));
|
||||
}
|
||||
var curr:int = 0;
|
||||
@@ -136,7 +136,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case this.const_7:
|
||||
case this.§_-XM§:
|
||||
for(j = 0; j < count; j++)
|
||||
{
|
||||
value = array[int(offset + stride * j + i)];
|
||||
@@ -147,13 +147,13 @@ package alternativa.engine3d.loaders.collada
|
||||
this.numbers[int(arrStride * j + curr)] = parseFloat(value);
|
||||
}
|
||||
break;
|
||||
case this.const_9:
|
||||
case this.§_-g6§:
|
||||
for(j = 0; j < count; j++)
|
||||
{
|
||||
this.var_550[int(arrStride * j + curr)] = parseInt(array[int(offset + stride * j + i)],10);
|
||||
this.§_-op§[int(arrStride * j + curr)] = parseInt(array[int(offset + stride * j + i)],10);
|
||||
}
|
||||
break;
|
||||
case this.const_8:
|
||||
case this.§_-ZJ§:
|
||||
for(j = 0; j < count; j++)
|
||||
{
|
||||
this.names[int(arrStride * j + curr)] = array[int(offset + stride * j + i)];
|
||||
|
||||
@@ -4,9 +4,9 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeVertex
|
||||
{
|
||||
public var name_600:int;
|
||||
public var §_-Eq§:int;
|
||||
|
||||
public var name_601:int;
|
||||
public var §_-AR§:int;
|
||||
|
||||
public var indices:Vector.<int> = new Vector.<int>();
|
||||
|
||||
@@ -20,7 +20,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public var normal:Vector3D;
|
||||
|
||||
public var name_596:Vector3D;
|
||||
public var §_-hC§:Vector3D;
|
||||
|
||||
public function DaeVertex()
|
||||
{
|
||||
@@ -55,12 +55,12 @@ package alternativa.engine3d.loaders.collada
|
||||
var biNormalX:Number = biNormalData[int(biNormalOffset++)];
|
||||
var biNormalY:Number = biNormalData[int(biNormalOffset++)];
|
||||
var biNormalZ:Number = biNormalData[biNormalOffset];
|
||||
this.name_596 = new Vector3D(tangentData[int(tangentOffset++)],tangentData[int(tangentOffset++)],tangentData[tangentOffset]);
|
||||
var crossX:Number = this.normal.y * this.name_596.z - this.normal.z * this.name_596.y;
|
||||
var crossY:Number = this.normal.z * this.name_596.x - this.normal.x * this.name_596.z;
|
||||
var crossZ:Number = this.normal.x * this.name_596.y - this.normal.y * this.name_596.x;
|
||||
this.§_-hC§ = new Vector3D(tangentData[int(tangentOffset++)],tangentData[int(tangentOffset++)],tangentData[tangentOffset]);
|
||||
var crossX:Number = this.normal.y * this.§_-hC§.z - this.normal.z * this.§_-hC§.y;
|
||||
var crossY:Number = this.normal.z * this.§_-hC§.x - this.normal.x * this.§_-hC§.z;
|
||||
var crossZ:Number = this.normal.x * this.§_-hC§.y - this.normal.y * this.§_-hC§.x;
|
||||
var dot:Number = crossX * biNormalX + crossY * biNormalY + crossZ * biNormalZ;
|
||||
this.name_596.w = dot < 0 ? -1 : 1;
|
||||
this.§_-hC§.w = dot < 0 ? -1 : 1;
|
||||
}
|
||||
|
||||
public function appendUV(data:Vector.<Number>, dataIndex:int, stride:int) : void
|
||||
|
||||
@@ -7,7 +7,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeVertices extends DaeElement
|
||||
{
|
||||
public var name_597:DaeSource;
|
||||
public var §_-E6§:DaeSource;
|
||||
|
||||
public function DaeVertices(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -20,8 +20,8 @@ package alternativa.engine3d.loaders.collada
|
||||
inputXML = data.input.(@semantic == "POSITION")[0];
|
||||
if(inputXML != null)
|
||||
{
|
||||
this.name_597 = new DaeInput(inputXML,document).prepareSource(3);
|
||||
if(this.name_597 != null)
|
||||
this.§_-E6§ = new DaeInput(inputXML,document).prepareSource(3);
|
||||
if(this.§_-E6§ != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user