mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 09:59:07 -07:00
Use rename identifiers
This commit is contained in:
@@ -10,17 +10,17 @@ package alternativa.engine3d.animation
|
||||
|
||||
public class AnimationController
|
||||
{
|
||||
private var §_-cn§:AnimationNode;
|
||||
private var var_733:AnimationNode;
|
||||
|
||||
private var §_-Kq§:Vector.<Object>;
|
||||
private var var_348:Vector.<Object>;
|
||||
|
||||
private var §_-62§:Vector.<Object3D> = new Vector.<Object3D>();
|
||||
private var var_732:Vector.<Object3D> = new Vector.<Object3D>();
|
||||
|
||||
private var §_-oX§:Dictionary = new Dictionary();
|
||||
private var var_734:Dictionary = new Dictionary();
|
||||
|
||||
private var §_-eB§:Object = new Object();
|
||||
private var var_619:Object = new Object();
|
||||
|
||||
private var §_-Jl§:int = -1;
|
||||
private var var_210:int = -1;
|
||||
|
||||
alternativa3d var nearestNotifyers:AnimationNotify;
|
||||
|
||||
@@ -31,24 +31,24 @@ package alternativa.engine3d.animation
|
||||
|
||||
public function get root() : AnimationNode
|
||||
{
|
||||
return this.§_-cn§;
|
||||
return this.var_733;
|
||||
}
|
||||
|
||||
public function set root(value:AnimationNode) : void
|
||||
{
|
||||
if(this.§_-cn§ != value)
|
||||
if(this.var_733 != value)
|
||||
{
|
||||
if(this.§_-cn§ != null)
|
||||
if(this.var_733 != null)
|
||||
{
|
||||
this.§_-cn§.alternativa3d::setController(null);
|
||||
this.§_-cn§.alternativa3d::_-Eo = false;
|
||||
this.var_733.alternativa3d::setController(null);
|
||||
this.var_733.alternativa3d::var_694 = false;
|
||||
}
|
||||
if(value != null)
|
||||
{
|
||||
value.alternativa3d::setController(this);
|
||||
value.alternativa3d::_-Eo = true;
|
||||
value.alternativa3d::var_694 = true;
|
||||
}
|
||||
this.§_-cn§ = value;
|
||||
this.var_733 = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,30 +60,30 @@ package alternativa.engine3d.animation
|
||||
var count:int = 0;
|
||||
var _loc6_:int = 0;
|
||||
var object:Object3D = null;
|
||||
if(this.§_-Jl§ < 0)
|
||||
if(this.var_210 < 0)
|
||||
{
|
||||
this.§_-Jl§ = getTimer();
|
||||
this.var_210 = getTimer();
|
||||
interval = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc6_ = int(getTimer());
|
||||
interval = 0.001 * (_loc6_ - this.§_-Jl§);
|
||||
this.§_-Jl§ = _loc6_;
|
||||
interval = 0.001 * (_loc6_ - this.var_210);
|
||||
this.var_210 = _loc6_;
|
||||
}
|
||||
if(this.§_-cn§ == null)
|
||||
if(this.var_733 == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for each(data in this.§_-eB§)
|
||||
for each(data in this.var_619)
|
||||
{
|
||||
data.reset();
|
||||
}
|
||||
this.§_-cn§.alternativa3d::update(interval,1);
|
||||
for(i = 0,count = int(this.§_-62§.length); i < count; )
|
||||
this.var_733.alternativa3d::update(interval,1);
|
||||
for(i = 0,count = int(this.var_732.length); i < count; )
|
||||
{
|
||||
object = this.§_-62§[i];
|
||||
data = this.§_-eB§[object.name];
|
||||
object = this.var_732[i];
|
||||
data = this.var_619[object.name];
|
||||
if(data != null)
|
||||
{
|
||||
data.apply(object);
|
||||
@@ -96,28 +96,28 @@ package alternativa.engine3d.animation
|
||||
{
|
||||
notify.dispatchEvent(new NotifyEvent(notify));
|
||||
}
|
||||
notify = notify.alternativa3d::_-XY;
|
||||
notify = notify.alternativa3d::name_587;
|
||||
}
|
||||
this.alternativa3d::nearestNotifyers = null;
|
||||
}
|
||||
|
||||
alternativa3d function addObject(object:Object) : void
|
||||
{
|
||||
if(object in this.§_-oX§)
|
||||
if(object in this.var_734)
|
||||
{
|
||||
++this.§_-oX§[object];
|
||||
++this.var_734[object];
|
||||
}
|
||||
else
|
||||
{
|
||||
if(object is Object3D)
|
||||
{
|
||||
this.§_-62§.push(object);
|
||||
this.var_732.push(object);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-Kq§.push(object);
|
||||
this.var_348.push(object);
|
||||
}
|
||||
this.§_-oX§[object] = 1;
|
||||
this.var_734[object] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,56 +126,56 @@ package alternativa.engine3d.animation
|
||||
var index:int = 0;
|
||||
var j:int = 0;
|
||||
var count:int = 0;
|
||||
var used:int = int(this.§_-oX§[object]);
|
||||
var used:int = int(this.var_734[object]);
|
||||
used--;
|
||||
if(used <= 0)
|
||||
{
|
||||
if(object is Object3D)
|
||||
{
|
||||
index = int(this.§_-62§.indexOf(object));
|
||||
count = this.§_-62§.length - 1;
|
||||
index = int(this.var_732.indexOf(object));
|
||||
count = this.var_732.length - 1;
|
||||
for(j = index + 1; index < count; )
|
||||
{
|
||||
this.§_-62§[index] = this.§_-62§[j];
|
||||
this.var_732[index] = this.var_732[j];
|
||||
index++;
|
||||
j++;
|
||||
}
|
||||
this.§_-62§.length = count;
|
||||
this.var_732.length = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
index = int(this.§_-Kq§.indexOf(object));
|
||||
count = this.§_-Kq§.length - 1;
|
||||
index = int(this.var_348.indexOf(object));
|
||||
count = this.var_348.length - 1;
|
||||
for(j = index + 1; index < count; )
|
||||
{
|
||||
this.§_-Kq§[index] = this.§_-Kq§[j];
|
||||
this.var_348[index] = this.var_348[j];
|
||||
index++;
|
||||
j++;
|
||||
}
|
||||
this.§_-Kq§.length = count;
|
||||
this.var_348.length = count;
|
||||
}
|
||||
delete this.§_-oX§[object];
|
||||
delete this.var_734[object];
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-oX§[object] = used;
|
||||
this.var_734[object] = used;
|
||||
}
|
||||
}
|
||||
|
||||
alternativa3d function getState(name:String) : AnimationState
|
||||
{
|
||||
var state:AnimationState = this.§_-eB§[name];
|
||||
var state:AnimationState = this.var_619[name];
|
||||
if(state == null)
|
||||
{
|
||||
state = new AnimationState();
|
||||
this.§_-eB§[name] = state;
|
||||
this.var_619[name] = state;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
public function freeze() : void
|
||||
{
|
||||
this.§_-Jl§ = -1;
|
||||
this.var_210 = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ package alternativa.engine3d.animation
|
||||
|
||||
public class AnimationNode
|
||||
{
|
||||
alternativa3d var §_-Eo§:Boolean = false;
|
||||
alternativa3d var var_694:Boolean = false;
|
||||
|
||||
alternativa3d var _parent:AnimationNode;
|
||||
|
||||
@@ -21,7 +21,7 @@ package alternativa.engine3d.animation
|
||||
|
||||
public function get isActive() : Boolean
|
||||
{
|
||||
return this.alternativa3d::_-Eo && this.alternativa3d::controller != null;
|
||||
return this.alternativa3d::var_694 && this.alternativa3d::controller != null;
|
||||
}
|
||||
|
||||
public function get parent() : AnimationNode
|
||||
@@ -51,7 +51,7 @@ package alternativa.engine3d.animation
|
||||
alternativa3d function removeNode(node:AnimationNode) : void
|
||||
{
|
||||
node.alternativa3d::setController(null);
|
||||
node.alternativa3d::_-Eo = false;
|
||||
node.alternativa3d::var_694 = false;
|
||||
node.alternativa3d::_parent = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@ package alternativa.engine3d.animation
|
||||
{
|
||||
public var name:String;
|
||||
|
||||
alternativa3d var §_-qC§:Number = 0;
|
||||
alternativa3d var var_420:Number = 0;
|
||||
|
||||
alternativa3d var next:AnimationNotify;
|
||||
|
||||
alternativa3d var §_-1n§:Number;
|
||||
alternativa3d var var_735:Number;
|
||||
|
||||
alternativa3d var §_-XY§:AnimationNotify;
|
||||
alternativa3d var name_587:AnimationNotify;
|
||||
|
||||
public function AnimationNotify(name:String)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ package alternativa.engine3d.animation
|
||||
|
||||
public function get time() : Number
|
||||
{
|
||||
return this.alternativa3d::_-qC;
|
||||
return this.alternativa3d::var_420;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ package alternativa.engine3d.animation
|
||||
|
||||
public class AnimationState
|
||||
{
|
||||
public var §_-6V§:int = 0;
|
||||
public var var_731:int = 0;
|
||||
|
||||
public var transform:TransformKey = new TransformKey();
|
||||
|
||||
public var §_-H1§:Number = 0;
|
||||
public var var_729:Number = 0;
|
||||
|
||||
public var numbers:Object = new Object();
|
||||
|
||||
public var §_-NT§:Object = new Object();
|
||||
public var var_730:Object = new Object();
|
||||
|
||||
public function AnimationState()
|
||||
{
|
||||
@@ -27,36 +27,36 @@ package alternativa.engine3d.animation
|
||||
public function reset() : void
|
||||
{
|
||||
var key:String = null;
|
||||
this.§_-H1§ = 0;
|
||||
this.var_729 = 0;
|
||||
for(key in this.numbers)
|
||||
{
|
||||
delete this.numbers[key];
|
||||
delete this.§_-NT§[key];
|
||||
delete this.var_730[key];
|
||||
}
|
||||
}
|
||||
|
||||
public function addWeightedTransform(key:TransformKey, weight:Number) : void
|
||||
{
|
||||
this.§_-H1§ += weight;
|
||||
this.transform.interpolate(this.transform,key,weight / this.§_-H1§);
|
||||
this.var_729 += weight;
|
||||
this.transform.interpolate(this.transform,key,weight / this.var_729);
|
||||
}
|
||||
|
||||
public function addWeightedNumber(property:String, value:Number, weight:Number) : void
|
||||
{
|
||||
var current:Number = NaN;
|
||||
var sum:Number = Number(this.§_-NT§[property]);
|
||||
var sum:Number = Number(this.var_730[property]);
|
||||
if(sum == sum)
|
||||
{
|
||||
sum += weight;
|
||||
weight /= sum;
|
||||
current = Number(this.numbers[property]);
|
||||
this.numbers[property] = (1 - weight) * current + weight * value;
|
||||
this.§_-NT§[property] = sum;
|
||||
this.var_730[property] = sum;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.numbers[property] = value;
|
||||
this.§_-NT§[property] = weight;
|
||||
this.var_730[property] = weight;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ package alternativa.engine3d.animation
|
||||
var sum:Number = NaN;
|
||||
var weight:Number = NaN;
|
||||
var key:String = null;
|
||||
if(this.§_-H1§ > 0)
|
||||
if(this.var_729 > 0)
|
||||
{
|
||||
object.x = this.transform.alternativa3d::x;
|
||||
object.y = this.transform.alternativa3d::y;
|
||||
@@ -80,48 +80,48 @@ package alternativa.engine3d.animation
|
||||
switch(key)
|
||||
{
|
||||
case "x":
|
||||
sum = Number(this.§_-NT§["x"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["x"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.x = (1 - weight) * object.x + weight * this.numbers["x"];
|
||||
break;
|
||||
case "y":
|
||||
sum = Number(this.§_-NT§["y"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["y"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.y = (1 - weight) * object.y + weight * this.numbers["y"];
|
||||
break;
|
||||
case "z":
|
||||
sum = Number(this.§_-NT§["z"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["z"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.z = (1 - weight) * object.z + weight * this.numbers["z"];
|
||||
break;
|
||||
case "rotationX":
|
||||
sum = Number(this.§_-NT§["rotationX"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationX"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationX = (1 - weight) * object.rotationX + weight * this.numbers["rotationX"];
|
||||
break;
|
||||
case "rotationY":
|
||||
sum = Number(this.§_-NT§["rotationY"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationY"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationY = (1 - weight) * object.rotationY + weight * this.numbers["rotationY"];
|
||||
break;
|
||||
case "rotationZ":
|
||||
sum = Number(this.§_-NT§["rotationZ"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationZ"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationZ = (1 - weight) * object.rotationZ + weight * this.numbers["rotationZ"];
|
||||
break;
|
||||
case "scaleX":
|
||||
sum = Number(this.§_-NT§["scaleX"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleX"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleX = (1 - weight) * object.scaleX + weight * this.numbers["scaleX"];
|
||||
break;
|
||||
case "scaleY":
|
||||
sum = Number(this.§_-NT§["scaleY"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleY"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleY = (1 - weight) * object.scaleY + weight * this.numbers["scaleY"];
|
||||
break;
|
||||
case "scaleZ":
|
||||
sum = Number(this.§_-NT§["scaleZ"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleZ"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleZ = (1 - weight) * object.scaleZ + weight * this.numbers["scaleZ"];
|
||||
break;
|
||||
default:
|
||||
@@ -136,7 +136,7 @@ package alternativa.engine3d.animation
|
||||
var sum:Number = NaN;
|
||||
var weight:Number = NaN;
|
||||
var key:String = null;
|
||||
if(this.§_-H1§ > 0)
|
||||
if(this.var_729 > 0)
|
||||
{
|
||||
object.x = this.transform.alternativa3d::x;
|
||||
object.y = this.transform.alternativa3d::y;
|
||||
@@ -151,48 +151,48 @@ package alternativa.engine3d.animation
|
||||
switch(key)
|
||||
{
|
||||
case "x":
|
||||
sum = Number(this.§_-NT§["x"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["x"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.x = (1 - weight) * object.x + weight * this.numbers["x"];
|
||||
break;
|
||||
case "y":
|
||||
sum = Number(this.§_-NT§["y"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["y"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.y = (1 - weight) * object.y + weight * this.numbers["y"];
|
||||
break;
|
||||
case "z":
|
||||
sum = Number(this.§_-NT§["z"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["z"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.z = (1 - weight) * object.z + weight * this.numbers["z"];
|
||||
break;
|
||||
case "rotationX":
|
||||
sum = Number(this.§_-NT§["rotationX"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationX"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationX = (1 - weight) * object.rotationX + weight * this.numbers["rotationX"];
|
||||
break;
|
||||
case "rotationY":
|
||||
sum = Number(this.§_-NT§["rotationY"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationY"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationY = (1 - weight) * object.rotationY + weight * this.numbers["rotationY"];
|
||||
break;
|
||||
case "rotationZ":
|
||||
sum = Number(this.§_-NT§["rotationZ"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["rotationZ"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.rotationZ = (1 - weight) * object.rotationZ + weight * this.numbers["rotationZ"];
|
||||
break;
|
||||
case "scaleX":
|
||||
sum = Number(this.§_-NT§["scaleX"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleX"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleX = (1 - weight) * object.scaleX + weight * this.numbers["scaleX"];
|
||||
break;
|
||||
case "scaleY":
|
||||
sum = Number(this.§_-NT§["scaleY"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleY"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleY = (1 - weight) * object.scaleY + weight * this.numbers["scaleY"];
|
||||
break;
|
||||
case "scaleZ":
|
||||
sum = Number(this.§_-NT§["scaleZ"]);
|
||||
weight = sum / (sum + this.§_-H1§);
|
||||
sum = Number(this.var_730["scaleZ"]);
|
||||
weight = sum / (sum + this.var_729);
|
||||
object.scaleZ = (1 - weight) * object.scaleZ + weight * this.numbers["scaleZ"];
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -6,7 +6,7 @@ package alternativa.engine3d.animation.keys
|
||||
|
||||
public class Keyframe
|
||||
{
|
||||
alternativa3d var §_-qC§:Number = 0;
|
||||
alternativa3d var var_420:Number = 0;
|
||||
|
||||
public function Keyframe()
|
||||
{
|
||||
@@ -15,7 +15,7 @@ package alternativa.engine3d.animation.keys
|
||||
|
||||
public function get time() : Number
|
||||
{
|
||||
return this.alternativa3d::_-qC;
|
||||
return this.alternativa3d::var_420;
|
||||
}
|
||||
|
||||
public function get value() : Object
|
||||
@@ -38,7 +38,7 @@ package alternativa.engine3d.animation.keys
|
||||
|
||||
public function toString() : String
|
||||
{
|
||||
return "[Keyframe time = " + this.alternativa3d::_-qC.toFixed(2) + " value = " + this.value + "]";
|
||||
return "[Keyframe time = " + this.alternativa3d::var_420.toFixed(2) + " value = " + this.value + "]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ package alternativa.engine3d.animation.keys
|
||||
|
||||
public class NumberKey extends Keyframe
|
||||
{
|
||||
alternativa3d var §_-4O§:Number = 0;
|
||||
alternativa3d var name_598:Number = 0;
|
||||
|
||||
alternativa3d var next:NumberKey;
|
||||
|
||||
@@ -17,17 +17,17 @@ package alternativa.engine3d.animation.keys
|
||||
|
||||
public function interpolate(a:NumberKey, b:NumberKey, c:Number) : void
|
||||
{
|
||||
this.alternativa3d::_-4O = (1 - c) * a.alternativa3d::_-4O + c * b.alternativa3d::_-4O;
|
||||
this.alternativa3d::name_598 = (1 - c) * a.alternativa3d::name_598 + c * b.alternativa3d::name_598;
|
||||
}
|
||||
|
||||
override public function get value() : Object
|
||||
{
|
||||
return this.alternativa3d::_-4O;
|
||||
return this.alternativa3d::name_598;
|
||||
}
|
||||
|
||||
override public function set value(v:Object) : void
|
||||
{
|
||||
this.alternativa3d::_-4O = Number(v);
|
||||
this.alternativa3d::name_598 = Number(v);
|
||||
}
|
||||
|
||||
override alternativa3d function get nextKeyFrame() : Keyframe
|
||||
|
||||
@@ -21,15 +21,15 @@ package alternativa.engine3d.collisions
|
||||
|
||||
private var matrix:Transform3D = new Transform3D();
|
||||
|
||||
private var §_-jX§:Transform3D = new Transform3D();
|
||||
private var var_580:Transform3D = new Transform3D();
|
||||
|
||||
alternativa3d var geometries:Vector.<Geometry> = new Vector.<Geometry>();
|
||||
|
||||
alternativa3d var §_-QK§:Vector.<Transform3D> = new Vector.<Transform3D>();
|
||||
alternativa3d var name_315:Vector.<Transform3D> = new Vector.<Transform3D>();
|
||||
|
||||
private var vertices:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-g0§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_581:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var indices:Vector.<int> = new Vector.<int>();
|
||||
|
||||
@@ -39,23 +39,23 @@ package alternativa.engine3d.collisions
|
||||
|
||||
private var src:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-o5§:Vector3D = new Vector3D();
|
||||
private var var_574:Vector3D = new Vector3D();
|
||||
|
||||
private var dest:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-SE§:Vector3D = new Vector3D();
|
||||
private var var_575:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-pU§:Vector3D = new Vector3D();
|
||||
private var var_573:Vector3D = new Vector3D();
|
||||
|
||||
alternativa3d var sphere:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-SZ§:Vector3D = new Vector3D();
|
||||
private var var_579:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-1v§:Vector3D = new Vector3D();
|
||||
private var var_576:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-L9§:Vector3D = new Vector3D();
|
||||
private var var_578:Vector3D = new Vector3D();
|
||||
|
||||
private var §_-8B§:Vector3D = new Vector3D();
|
||||
private var var_577:Vector3D = new Vector3D();
|
||||
|
||||
public function EllipsoidCollider(radiusX:Number, radiusY:Number, radiusZ:Number)
|
||||
{
|
||||
@@ -70,18 +70,18 @@ package alternativa.engine3d.collisions
|
||||
this.alternativa3d::sphere.x = transform.d;
|
||||
this.alternativa3d::sphere.y = transform.h;
|
||||
this.alternativa3d::sphere.z = transform.l;
|
||||
var sax:Number = transform.a * this.§_-SZ§.x + transform.b * this.§_-SZ§.y + transform.c * this.§_-SZ§.z + transform.d;
|
||||
var say:Number = transform.e * this.§_-SZ§.x + transform.f * this.§_-SZ§.y + transform.g * this.§_-SZ§.z + transform.h;
|
||||
var saz:Number = transform.i * this.§_-SZ§.x + transform.j * this.§_-SZ§.y + transform.k * this.§_-SZ§.z + transform.l;
|
||||
var sbx:Number = transform.a * this.§_-1v§.x + transform.b * this.§_-1v§.y + transform.c * this.§_-1v§.z + transform.d;
|
||||
var sby:Number = transform.e * this.§_-1v§.x + transform.f * this.§_-1v§.y + transform.g * this.§_-1v§.z + transform.h;
|
||||
var sbz:Number = transform.i * this.§_-1v§.x + transform.j * this.§_-1v§.y + transform.k * this.§_-1v§.z + transform.l;
|
||||
var scx:Number = transform.a * this.§_-L9§.x + transform.b * this.§_-L9§.y + transform.c * this.§_-L9§.z + transform.d;
|
||||
var scy:Number = transform.e * this.§_-L9§.x + transform.f * this.§_-L9§.y + transform.g * this.§_-L9§.z + transform.h;
|
||||
var scz:Number = transform.i * this.§_-L9§.x + transform.j * this.§_-L9§.y + transform.k * this.§_-L9§.z + transform.l;
|
||||
var sdx:Number = transform.a * this.§_-8B§.x + transform.b * this.§_-8B§.y + transform.c * this.§_-8B§.z + transform.d;
|
||||
var sdy:Number = transform.e * this.§_-8B§.x + transform.f * this.§_-8B§.y + transform.g * this.§_-8B§.z + transform.h;
|
||||
var sdz:Number = transform.i * this.§_-8B§.x + transform.j * this.§_-8B§.y + transform.k * this.§_-8B§.z + transform.l;
|
||||
var sax:Number = transform.a * this.var_579.x + transform.b * this.var_579.y + transform.c * this.var_579.z + transform.d;
|
||||
var say:Number = transform.e * this.var_579.x + transform.f * this.var_579.y + transform.g * this.var_579.z + transform.h;
|
||||
var saz:Number = transform.i * this.var_579.x + transform.j * this.var_579.y + transform.k * this.var_579.z + transform.l;
|
||||
var sbx:Number = transform.a * this.var_576.x + transform.b * this.var_576.y + transform.c * this.var_576.z + transform.d;
|
||||
var sby:Number = transform.e * this.var_576.x + transform.f * this.var_576.y + transform.g * this.var_576.z + transform.h;
|
||||
var sbz:Number = transform.i * this.var_576.x + transform.j * this.var_576.y + transform.k * this.var_576.z + transform.l;
|
||||
var scx:Number = transform.a * this.var_578.x + transform.b * this.var_578.y + transform.c * this.var_578.z + transform.d;
|
||||
var scy:Number = transform.e * this.var_578.x + transform.f * this.var_578.y + transform.g * this.var_578.z + transform.h;
|
||||
var scz:Number = transform.i * this.var_578.x + transform.j * this.var_578.y + transform.k * this.var_578.z + transform.l;
|
||||
var sdx:Number = transform.a * this.var_577.x + transform.b * this.var_577.y + transform.c * this.var_577.z + transform.d;
|
||||
var sdy:Number = transform.e * this.var_577.x + transform.f * this.var_577.y + transform.g * this.var_577.z + transform.h;
|
||||
var sdz:Number = transform.i * this.var_577.x + transform.j * this.var_577.y + transform.k * this.var_577.z + transform.l;
|
||||
var dx:Number = sax - this.alternativa3d::sphere.x;
|
||||
var dy:Number = say - this.alternativa3d::sphere.y;
|
||||
var dz:Number = saz - this.alternativa3d::sphere.z;
|
||||
@@ -162,30 +162,30 @@ package alternativa.engine3d.collisions
|
||||
this.radius = this.radiusZ;
|
||||
}
|
||||
this.matrix.compose(source.x,source.y,source.z,0,0,0,this.radiusX / this.radius,this.radiusY / this.radius,this.radiusZ / this.radius);
|
||||
this.§_-jX§.copy(this.matrix);
|
||||
this.§_-jX§.invert();
|
||||
this.var_580.copy(this.matrix);
|
||||
this.var_580.invert();
|
||||
this.src.x = 0;
|
||||
this.src.y = 0;
|
||||
this.src.z = 0;
|
||||
this.§_-o5§.x = this.§_-jX§.a * displacement.x + this.§_-jX§.b * displacement.y + this.§_-jX§.c * displacement.z;
|
||||
this.§_-o5§.y = this.§_-jX§.e * displacement.x + this.§_-jX§.f * displacement.y + this.§_-jX§.g * displacement.z;
|
||||
this.§_-o5§.z = this.§_-jX§.i * displacement.x + this.§_-jX§.j * displacement.y + this.§_-jX§.k * displacement.z;
|
||||
this.dest.x = this.src.x + this.§_-o5§.x;
|
||||
this.dest.y = this.src.y + this.§_-o5§.y;
|
||||
this.dest.z = this.src.z + this.§_-o5§.z;
|
||||
var rad:Number = this.radius + this.§_-o5§.length;
|
||||
this.§_-SZ§.x = -rad;
|
||||
this.§_-SZ§.y = -rad;
|
||||
this.§_-SZ§.z = -rad;
|
||||
this.§_-1v§.x = rad;
|
||||
this.§_-1v§.y = -rad;
|
||||
this.§_-1v§.z = -rad;
|
||||
this.§_-L9§.x = rad;
|
||||
this.§_-L9§.y = rad;
|
||||
this.§_-L9§.z = -rad;
|
||||
this.§_-8B§.x = -rad;
|
||||
this.§_-8B§.y = rad;
|
||||
this.§_-8B§.z = -rad;
|
||||
this.var_574.x = this.var_580.a * displacement.x + this.var_580.b * displacement.y + this.var_580.c * displacement.z;
|
||||
this.var_574.y = this.var_580.e * displacement.x + this.var_580.f * displacement.y + this.var_580.g * displacement.z;
|
||||
this.var_574.z = this.var_580.i * displacement.x + this.var_580.j * displacement.y + this.var_580.k * displacement.z;
|
||||
this.dest.x = this.src.x + this.var_574.x;
|
||||
this.dest.y = this.src.y + this.var_574.y;
|
||||
this.dest.z = this.src.z + this.var_574.z;
|
||||
var rad:Number = this.radius + this.var_574.length;
|
||||
this.var_579.x = -rad;
|
||||
this.var_579.y = -rad;
|
||||
this.var_579.z = -rad;
|
||||
this.var_576.x = rad;
|
||||
this.var_576.y = -rad;
|
||||
this.var_576.z = -rad;
|
||||
this.var_578.x = rad;
|
||||
this.var_578.y = rad;
|
||||
this.var_578.z = -rad;
|
||||
this.var_577.x = -rad;
|
||||
this.var_577.y = rad;
|
||||
this.var_577.z = -rad;
|
||||
if(excludedObjects == null || !excludedObjects[object])
|
||||
{
|
||||
if(object.alternativa3d::transformChanged)
|
||||
@@ -201,7 +201,7 @@ package alternativa.engine3d.collisions
|
||||
}
|
||||
if(intersects)
|
||||
{
|
||||
object.alternativa3d::localToGlobalTransform.combine(this.§_-jX§,object.alternativa3d::transform);
|
||||
object.alternativa3d::localToGlobalTransform.combine(this.var_580,object.alternativa3d::transform);
|
||||
object.alternativa3d::collectGeometry(this,excludedObjects);
|
||||
}
|
||||
if(object.alternativa3d::childrenList != null)
|
||||
@@ -218,11 +218,11 @@ package alternativa.engine3d.collisions
|
||||
for(var i:int = 0; i < geometriesLength; i++)
|
||||
{
|
||||
geometry = this.alternativa3d::geometries[i];
|
||||
transform = this.alternativa3d::_-QK[i];
|
||||
transform = this.alternativa3d::name_315[i];
|
||||
geometryIndicesLength = int(geometry.alternativa3d::_indices.length);
|
||||
if(!(geometry.alternativa3d::_numVertices == 0 || geometryIndicesLength == 0))
|
||||
{
|
||||
vBuffer = VertexAttributes.POSITION < geometry.alternativa3d::_-GM.length ? geometry.alternativa3d::_-GM[VertexAttributes.POSITION] : null;
|
||||
vBuffer = VertexAttributes.POSITION < geometry.alternativa3d::var_170.length ? geometry.alternativa3d::var_170[VertexAttributes.POSITION] : null;
|
||||
if(vBuffer != null)
|
||||
{
|
||||
attributesOffset = int(geometry.alternativa3d::_attributesOffsets[VertexAttributes.POSITION]);
|
||||
@@ -300,13 +300,13 @@ package alternativa.engine3d.collisions
|
||||
indicesLength++;
|
||||
this.indices[indicesLength] = c;
|
||||
indicesLength++;
|
||||
this.§_-g0§[normalsLength] = normalX;
|
||||
this.var_581[normalsLength] = normalX;
|
||||
normalsLength++;
|
||||
this.§_-g0§[normalsLength] = normalY;
|
||||
this.var_581[normalsLength] = normalY;
|
||||
normalsLength++;
|
||||
this.§_-g0§[normalsLength] = normalZ;
|
||||
this.var_581[normalsLength] = normalZ;
|
||||
normalsLength++;
|
||||
this.§_-g0§[normalsLength] = offset;
|
||||
this.var_581[normalsLength] = offset;
|
||||
normalsLength++;
|
||||
++this.numTriangles;
|
||||
}
|
||||
@@ -319,7 +319,7 @@ package alternativa.engine3d.collisions
|
||||
}
|
||||
}
|
||||
this.alternativa3d::geometries.length = 0;
|
||||
this.alternativa3d::_-QK.length = 0;
|
||||
this.alternativa3d::name_315.length = 0;
|
||||
}
|
||||
|
||||
public function calculateDestination(source:Vector3D, displacement:Vector3D, object:Object3D, excludedObjects:Dictionary = null) : Vector3D
|
||||
@@ -341,17 +341,17 @@ package alternativa.engine3d.collisions
|
||||
{
|
||||
break;
|
||||
}
|
||||
offset = this.radius + this.threshold + this.§_-pU§.w - this.dest.x * this.§_-pU§.x - this.dest.y * this.§_-pU§.y - this.dest.z * this.§_-pU§.z;
|
||||
this.dest.x += this.§_-pU§.x * offset;
|
||||
this.dest.y += this.§_-pU§.y * offset;
|
||||
this.dest.z += this.§_-pU§.z * offset;
|
||||
this.src.x = this.§_-SE§.x + this.§_-pU§.x * (this.radius + this.threshold);
|
||||
this.src.y = this.§_-SE§.y + this.§_-pU§.y * (this.radius + this.threshold);
|
||||
this.src.z = this.§_-SE§.z + this.§_-pU§.z * (this.radius + this.threshold);
|
||||
this.§_-o5§.x = this.dest.x - this.src.x;
|
||||
this.§_-o5§.y = this.dest.y - this.src.y;
|
||||
this.§_-o5§.z = this.dest.z - this.src.z;
|
||||
if(this.§_-o5§.length < this.threshold)
|
||||
offset = this.radius + this.threshold + this.var_573.w - this.dest.x * this.var_573.x - this.dest.y * this.var_573.y - this.dest.z * this.var_573.z;
|
||||
this.dest.x += this.var_573.x * offset;
|
||||
this.dest.y += this.var_573.y * offset;
|
||||
this.dest.z += this.var_573.z * offset;
|
||||
this.src.x = this.var_575.x + this.var_573.x * (this.radius + this.threshold);
|
||||
this.src.y = this.var_575.y + this.var_573.y * (this.radius + this.threshold);
|
||||
this.src.z = this.var_575.z + this.var_573.z * (this.radius + this.threshold);
|
||||
this.var_574.x = this.dest.x - this.src.x;
|
||||
this.var_574.y = this.dest.y - this.src.y;
|
||||
this.var_574.z = this.dest.z - this.src.z;
|
||||
if(this.var_574.length < this.threshold)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -385,39 +385,39 @@ package alternativa.engine3d.collisions
|
||||
{
|
||||
if(this.checkCollision())
|
||||
{
|
||||
resCollisionPoint.x = this.matrix.a * this.§_-SE§.x + this.matrix.b * this.§_-SE§.y + this.matrix.c * this.§_-SE§.z + this.matrix.d;
|
||||
resCollisionPoint.y = this.matrix.e * this.§_-SE§.x + this.matrix.f * this.§_-SE§.y + this.matrix.g * this.§_-SE§.z + this.matrix.h;
|
||||
resCollisionPoint.z = this.matrix.i * this.§_-SE§.x + this.matrix.j * this.§_-SE§.y + this.matrix.k * this.§_-SE§.z + this.matrix.l;
|
||||
if(this.§_-pU§.x < this.§_-pU§.y)
|
||||
resCollisionPoint.x = this.matrix.a * this.var_575.x + this.matrix.b * this.var_575.y + this.matrix.c * this.var_575.z + this.matrix.d;
|
||||
resCollisionPoint.y = this.matrix.e * this.var_575.x + this.matrix.f * this.var_575.y + this.matrix.g * this.var_575.z + this.matrix.h;
|
||||
resCollisionPoint.z = this.matrix.i * this.var_575.x + this.matrix.j * this.var_575.y + this.matrix.k * this.var_575.z + this.matrix.l;
|
||||
if(this.var_573.x < this.var_573.y)
|
||||
{
|
||||
if(this.§_-pU§.x < this.§_-pU§.z)
|
||||
if(this.var_573.x < this.var_573.z)
|
||||
{
|
||||
abx = 0;
|
||||
aby = -this.§_-pU§.z;
|
||||
abz = Number(this.§_-pU§.y);
|
||||
aby = -this.var_573.z;
|
||||
abz = Number(this.var_573.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
abx = -this.§_-pU§.y;
|
||||
aby = Number(this.§_-pU§.x);
|
||||
abx = -this.var_573.y;
|
||||
aby = Number(this.var_573.x);
|
||||
abz = 0;
|
||||
}
|
||||
}
|
||||
else if(this.§_-pU§.y < this.§_-pU§.z)
|
||||
else if(this.var_573.y < this.var_573.z)
|
||||
{
|
||||
abx = Number(this.§_-pU§.z);
|
||||
abx = Number(this.var_573.z);
|
||||
aby = 0;
|
||||
abz = -this.§_-pU§.x;
|
||||
abz = -this.var_573.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
abx = -this.§_-pU§.y;
|
||||
aby = Number(this.§_-pU§.x);
|
||||
abx = -this.var_573.y;
|
||||
aby = Number(this.var_573.x);
|
||||
abz = 0;
|
||||
}
|
||||
acx = this.§_-pU§.z * aby - this.§_-pU§.y * abz;
|
||||
acy = this.§_-pU§.x * abz - this.§_-pU§.z * abx;
|
||||
acz = this.§_-pU§.y * abx - this.§_-pU§.x * aby;
|
||||
acx = this.var_573.z * aby - this.var_573.y * abz;
|
||||
acy = this.var_573.x * abz - this.var_573.z * abx;
|
||||
acz = this.var_573.y * abx - this.var_573.x * aby;
|
||||
abx2 = this.matrix.a * abx + this.matrix.b * aby + this.matrix.c * abz;
|
||||
aby2 = this.matrix.e * abx + this.matrix.f * aby + this.matrix.g * abz;
|
||||
abz2 = this.matrix.i * abx + this.matrix.j * aby + this.matrix.k * abz;
|
||||
@@ -492,7 +492,7 @@ package alternativa.engine3d.collisions
|
||||
var projectionInsideLength:Number = NaN;
|
||||
var time:Number = NaN;
|
||||
var minTime:Number = 1;
|
||||
var displacementLength:Number = Number(this.§_-o5§.length);
|
||||
var displacementLength:Number = Number(this.var_574.length);
|
||||
var indicesLength:int = this.numTriangles * 3;
|
||||
for(var i:int = 0,var j:int = 0; i < indicesLength; )
|
||||
{
|
||||
@@ -517,13 +517,13 @@ package alternativa.engine3d.collisions
|
||||
cy = this.vertices[index];
|
||||
index++;
|
||||
cz = this.vertices[index];
|
||||
normalX = this.§_-g0§[j];
|
||||
normalX = this.var_581[j];
|
||||
j++;
|
||||
normalY = this.§_-g0§[j];
|
||||
normalY = this.var_581[j];
|
||||
j++;
|
||||
normalZ = this.§_-g0§[j];
|
||||
normalZ = this.var_581[j];
|
||||
j++;
|
||||
offset = this.§_-g0§[j];
|
||||
offset = this.var_581[j];
|
||||
j++;
|
||||
distance = this.src.x * normalX + this.src.y * normalY + this.src.z * normalZ - offset;
|
||||
if(distance < this.radius)
|
||||
@@ -535,9 +535,9 @@ package alternativa.engine3d.collisions
|
||||
else
|
||||
{
|
||||
_loc33_ = (distance - this.radius) / (distance - this.dest.x * normalX - this.dest.y * normalY - this.dest.z * normalZ + offset);
|
||||
pointX = this.src.x + this.§_-o5§.x * _loc33_ - normalX * this.radius;
|
||||
pointY = this.src.y + this.§_-o5§.y * _loc33_ - normalY * this.radius;
|
||||
pointZ = this.src.z + this.§_-o5§.z * _loc33_ - normalZ * this.radius;
|
||||
pointX = this.src.x + this.var_574.x * _loc33_ - normalX * this.radius;
|
||||
pointY = this.src.y + this.var_574.y * _loc33_ - normalY * this.radius;
|
||||
pointZ = this.src.z + this.var_574.z * _loc33_ - normalZ * this.radius;
|
||||
}
|
||||
min = 1e+22;
|
||||
inside = true;
|
||||
@@ -636,11 +636,11 @@ package alternativa.engine3d.collisions
|
||||
deltaX = this.src.x - faceX;
|
||||
deltaY = this.src.y - faceY;
|
||||
deltaZ = this.src.z - faceZ;
|
||||
if(deltaX * this.§_-o5§.x + deltaY * this.§_-o5§.y + deltaZ * this.§_-o5§.z <= 0)
|
||||
if(deltaX * this.var_574.x + deltaY * this.var_574.y + deltaZ * this.var_574.z <= 0)
|
||||
{
|
||||
backX = -this.§_-o5§.x / displacementLength;
|
||||
backY = -this.§_-o5§.y / displacementLength;
|
||||
backZ = -this.§_-o5§.z / displacementLength;
|
||||
backX = -this.var_574.x / displacementLength;
|
||||
backY = -this.var_574.y / displacementLength;
|
||||
backZ = -this.var_574.z / displacementLength;
|
||||
deltaLength = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;
|
||||
projectionLength = deltaX * backX + deltaY * backY + deltaZ * backZ;
|
||||
projectionInsideLength = this.radius * this.radius - deltaLength + projectionLength * projectionLength;
|
||||
@@ -650,23 +650,23 @@ package alternativa.engine3d.collisions
|
||||
if(time < minTime)
|
||||
{
|
||||
minTime = time;
|
||||
this.§_-SE§.x = faceX;
|
||||
this.§_-SE§.y = faceY;
|
||||
this.§_-SE§.z = faceZ;
|
||||
this.var_575.x = faceX;
|
||||
this.var_575.y = faceY;
|
||||
this.var_575.z = faceZ;
|
||||
if(inside)
|
||||
{
|
||||
this.§_-pU§.x = normalX;
|
||||
this.§_-pU§.y = normalY;
|
||||
this.§_-pU§.z = normalZ;
|
||||
this.§_-pU§.w = offset;
|
||||
this.var_573.x = normalX;
|
||||
this.var_573.y = normalY;
|
||||
this.var_573.z = normalZ;
|
||||
this.var_573.w = offset;
|
||||
}
|
||||
else
|
||||
{
|
||||
deltaLength = Number(Math.sqrt(deltaLength));
|
||||
this.§_-pU§.x = deltaX / deltaLength;
|
||||
this.§_-pU§.y = deltaY / deltaLength;
|
||||
this.§_-pU§.z = deltaZ / deltaLength;
|
||||
this.§_-pU§.w = this.§_-SE§.x * this.§_-pU§.x + this.§_-SE§.y * this.§_-pU§.y + this.§_-SE§.z * this.§_-pU§.z;
|
||||
this.var_573.x = deltaX / deltaLength;
|
||||
this.var_573.y = deltaY / deltaLength;
|
||||
this.var_573.z = deltaZ / deltaLength;
|
||||
this.var_573.w = this.var_575.x * this.var_573.x + this.var_575.y * this.var_573.y + this.var_575.z * this.var_573.z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,27 +32,27 @@ package alternativa.engine3d.core
|
||||
|
||||
alternativa3d var textures:Vector.<TextureBase> = new Vector.<TextureBase>();
|
||||
|
||||
alternativa3d var §_-kR§:Vector.<int> = new Vector.<int>();
|
||||
alternativa3d var var_183:Vector.<int> = new Vector.<int>();
|
||||
|
||||
alternativa3d var §_-Oq§:int = 0;
|
||||
alternativa3d var var_182:int = 0;
|
||||
|
||||
alternativa3d var vertexBuffers:Vector.<VertexBuffer3D> = new Vector.<VertexBuffer3D>();
|
||||
|
||||
alternativa3d var §else §:Vector.<int> = new Vector.<int>();
|
||||
alternativa3d var name_318:Vector.<int> = new Vector.<int>();
|
||||
|
||||
alternativa3d var §_-nw§:Vector.<int> = new Vector.<int>();
|
||||
alternativa3d var name_324:Vector.<int> = new Vector.<int>();
|
||||
|
||||
alternativa3d var §_-EL§:Vector.<String> = new Vector.<String>();
|
||||
alternativa3d var name_322:Vector.<String> = new Vector.<String>();
|
||||
|
||||
alternativa3d var §_-3G§:int = 0;
|
||||
alternativa3d var name_316:int = 0;
|
||||
|
||||
alternativa3d var §_-Aq§:Vector.<Number> = new Vector.<Number>();
|
||||
alternativa3d var name_323:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
alternativa3d var §_-9X§:int = 0;
|
||||
alternativa3d var name_317:int = 0;
|
||||
|
||||
alternativa3d var §_-Cl§:Vector.<Number> = new Vector.<Number>(28 * 4,true);
|
||||
alternativa3d var name_321:Vector.<Number> = new Vector.<Number>(28 * 4,true);
|
||||
|
||||
alternativa3d var §_-Kv§:int = 0;
|
||||
alternativa3d var name_320:int = 0;
|
||||
|
||||
public function DrawUnit()
|
||||
{
|
||||
@@ -68,11 +68,11 @@ package alternativa.engine3d.core
|
||||
this.alternativa3d::blendDestination = Context3DBlendFactor.ZERO;
|
||||
this.alternativa3d::culling = Context3DTriangleFace.FRONT;
|
||||
this.alternativa3d::textures.length = 0;
|
||||
this.alternativa3d::_-Oq = 0;
|
||||
this.alternativa3d::var_182 = 0;
|
||||
this.alternativa3d::vertexBuffers.length = 0;
|
||||
this.alternativa3d::_-3G = 0;
|
||||
this.alternativa3d::_-9X = 0;
|
||||
this.alternativa3d::_-Kv = 0;
|
||||
this.alternativa3d::name_316 = 0;
|
||||
this.alternativa3d::name_317 = 0;
|
||||
this.alternativa3d::name_320 = 0;
|
||||
}
|
||||
|
||||
alternativa3d function setTextureAt(sampler:int, texture:TextureBase) : void
|
||||
@@ -85,9 +85,9 @@ package alternativa.engine3d.core
|
||||
{
|
||||
throw new Error("Texture is null");
|
||||
}
|
||||
this.alternativa3d::_-kR[this.alternativa3d::_-Oq] = sampler;
|
||||
this.alternativa3d::textures[this.alternativa3d::_-Oq] = texture;
|
||||
++this.alternativa3d::_-Oq;
|
||||
this.alternativa3d::var_183[this.alternativa3d::var_182] = sampler;
|
||||
this.alternativa3d::textures[this.alternativa3d::var_182] = texture;
|
||||
++this.alternativa3d::var_182;
|
||||
}
|
||||
|
||||
alternativa3d function setVertexBufferAt(index:int, buffer:VertexBuffer3D, bufferOffset:int, format:String) : void
|
||||
@@ -100,11 +100,11 @@ package alternativa.engine3d.core
|
||||
{
|
||||
throw new Error("Buffer is null");
|
||||
}
|
||||
this.alternativa3d::else [this.alternativa3d::_-3G] = index;
|
||||
this.alternativa3d::vertexBuffers[this.alternativa3d::_-3G] = buffer;
|
||||
this.alternativa3d::_-nw[this.alternativa3d::_-3G] = bufferOffset;
|
||||
this.alternativa3d::_-EL[this.alternativa3d::_-3G] = format;
|
||||
++this.alternativa3d::_-3G;
|
||||
this.alternativa3d::name_318[this.alternativa3d::name_316] = index;
|
||||
this.alternativa3d::vertexBuffers[this.alternativa3d::name_316] = buffer;
|
||||
this.alternativa3d::name_324[this.alternativa3d::name_316] = bufferOffset;
|
||||
this.alternativa3d::name_322[this.alternativa3d::name_316] = format;
|
||||
++this.alternativa3d::name_316;
|
||||
}
|
||||
|
||||
alternativa3d function setVertexConstantsFromVector(firstRegister:int, data:Vector.<Number>, numRegisters:int) : void
|
||||
@@ -114,14 +114,14 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + numRegisters > this.alternativa3d::_-9X)
|
||||
if(firstRegister + numRegisters > this.alternativa3d::name_317)
|
||||
{
|
||||
this.alternativa3d::_-9X = firstRegister + numRegisters;
|
||||
this.alternativa3d::_-Aq.length = this.alternativa3d::_-9X << 2;
|
||||
this.alternativa3d::name_317 = firstRegister + numRegisters;
|
||||
this.alternativa3d::name_323.length = this.alternativa3d::name_317 << 2;
|
||||
}
|
||||
for(var i:int = 0,var len:int = numRegisters << 2; i < len; )
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = data[i];
|
||||
this.alternativa3d::name_323[offset] = data[i];
|
||||
offset++;
|
||||
i++;
|
||||
}
|
||||
@@ -134,18 +134,18 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + 1 > this.alternativa3d::_-9X)
|
||||
if(firstRegister + 1 > this.alternativa3d::name_317)
|
||||
{
|
||||
this.alternativa3d::_-9X = firstRegister + 1;
|
||||
this.alternativa3d::_-Aq.length = this.alternativa3d::_-9X << 2;
|
||||
this.alternativa3d::name_317 = firstRegister + 1;
|
||||
this.alternativa3d::name_323.length = this.alternativa3d::name_317 << 2;
|
||||
}
|
||||
this.alternativa3d::_-Aq[offset] = x;
|
||||
this.alternativa3d::name_323[offset] = x;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = y;
|
||||
this.alternativa3d::name_323[offset] = y;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = z;
|
||||
this.alternativa3d::name_323[offset] = z;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = w;
|
||||
this.alternativa3d::name_323[offset] = w;
|
||||
}
|
||||
|
||||
alternativa3d function setVertexConstantsFromTransform(firstRegister:int, transform:Transform3D) : void
|
||||
@@ -155,34 +155,34 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + 3 > this.alternativa3d::_-9X)
|
||||
if(firstRegister + 3 > this.alternativa3d::name_317)
|
||||
{
|
||||
this.alternativa3d::_-9X = firstRegister + 3;
|
||||
this.alternativa3d::_-Aq.length = this.alternativa3d::_-9X << 2;
|
||||
this.alternativa3d::name_317 = firstRegister + 3;
|
||||
this.alternativa3d::name_323.length = this.alternativa3d::name_317 << 2;
|
||||
}
|
||||
this.alternativa3d::_-Aq[offset] = transform.a;
|
||||
this.alternativa3d::name_323[offset] = transform.a;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.b;
|
||||
this.alternativa3d::name_323[offset] = transform.b;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.c;
|
||||
this.alternativa3d::name_323[offset] = transform.c;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.d;
|
||||
this.alternativa3d::name_323[offset] = transform.d;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.e;
|
||||
this.alternativa3d::name_323[offset] = transform.e;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.f;
|
||||
this.alternativa3d::name_323[offset] = transform.f;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.g;
|
||||
this.alternativa3d::name_323[offset] = transform.g;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.h;
|
||||
this.alternativa3d::name_323[offset] = transform.h;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.i;
|
||||
this.alternativa3d::name_323[offset] = transform.i;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.j;
|
||||
this.alternativa3d::name_323[offset] = transform.j;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.k;
|
||||
this.alternativa3d::name_323[offset] = transform.k;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.l;
|
||||
this.alternativa3d::name_323[offset] = transform.l;
|
||||
}
|
||||
|
||||
alternativa3d function setProjectionConstants(camera:Camera3D, firstRegister:int, transform:Transform3D = null) : void
|
||||
@@ -192,99 +192,99 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + 4 > this.alternativa3d::_-9X)
|
||||
if(firstRegister + 4 > this.alternativa3d::name_317)
|
||||
{
|
||||
this.alternativa3d::_-9X = firstRegister + 4;
|
||||
this.alternativa3d::_-Aq.length = this.alternativa3d::_-9X << 2;
|
||||
this.alternativa3d::name_317 = firstRegister + 4;
|
||||
this.alternativa3d::name_323.length = this.alternativa3d::name_317 << 2;
|
||||
}
|
||||
if(transform != null)
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = transform.a * camera.alternativa3d::m0;
|
||||
this.alternativa3d::name_323[offset] = transform.a * camera.alternativa3d::m0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.b * camera.alternativa3d::m0;
|
||||
this.alternativa3d::name_323[offset] = transform.b * camera.alternativa3d::m0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.c * camera.alternativa3d::m0;
|
||||
this.alternativa3d::name_323[offset] = transform.c * camera.alternativa3d::m0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.d * camera.alternativa3d::m0;
|
||||
this.alternativa3d::name_323[offset] = transform.d * camera.alternativa3d::m0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.e * camera.alternativa3d::m5;
|
||||
this.alternativa3d::name_323[offset] = transform.e * camera.alternativa3d::m5;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.f * camera.alternativa3d::m5;
|
||||
this.alternativa3d::name_323[offset] = transform.f * camera.alternativa3d::m5;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.g * camera.alternativa3d::m5;
|
||||
this.alternativa3d::name_323[offset] = transform.g * camera.alternativa3d::m5;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.h * camera.alternativa3d::m5;
|
||||
this.alternativa3d::name_323[offset] = transform.h * camera.alternativa3d::m5;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.i * camera.alternativa3d::m10;
|
||||
this.alternativa3d::name_323[offset] = transform.i * camera.alternativa3d::m10;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.j * camera.alternativa3d::m10;
|
||||
this.alternativa3d::name_323[offset] = transform.j * camera.alternativa3d::m10;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.k * camera.alternativa3d::m10;
|
||||
this.alternativa3d::name_323[offset] = transform.k * camera.alternativa3d::m10;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.l * camera.alternativa3d::m10 + camera.alternativa3d::m14;
|
||||
this.alternativa3d::name_323[offset] = transform.l * camera.alternativa3d::m10 + camera.alternativa3d::m14;
|
||||
offset++;
|
||||
if(!camera.orthographic)
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = transform.i;
|
||||
this.alternativa3d::name_323[offset] = transform.i;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.j;
|
||||
this.alternativa3d::name_323[offset] = transform.j;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.k;
|
||||
this.alternativa3d::name_323[offset] = transform.k;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = transform.l;
|
||||
this.alternativa3d::name_323[offset] = transform.l;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 1;
|
||||
this.alternativa3d::name_323[offset] = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = camera.alternativa3d::m0;
|
||||
this.alternativa3d::name_323[offset] = camera.alternativa3d::m0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = camera.alternativa3d::m5;
|
||||
this.alternativa3d::name_323[offset] = camera.alternativa3d::m5;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = camera.alternativa3d::m10;
|
||||
this.alternativa3d::name_323[offset] = camera.alternativa3d::m10;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = camera.alternativa3d::m14;
|
||||
this.alternativa3d::name_323[offset] = camera.alternativa3d::m14;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
if(!camera.orthographic)
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = 1;
|
||||
this.alternativa3d::name_323[offset] = 1;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.alternativa3d::_-Aq[offset] = 0;
|
||||
this.alternativa3d::name_323[offset] = 0;
|
||||
offset++;
|
||||
this.alternativa3d::_-Aq[offset] = 1;
|
||||
this.alternativa3d::name_323[offset] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -296,13 +296,13 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + numRegisters > this.alternativa3d::_-Kv)
|
||||
if(firstRegister + numRegisters > this.alternativa3d::name_320)
|
||||
{
|
||||
this.alternativa3d::_-Kv = firstRegister + numRegisters;
|
||||
this.alternativa3d::name_320 = firstRegister + numRegisters;
|
||||
}
|
||||
for(var i:int = 0,var len:int = numRegisters << 2; i < len; )
|
||||
{
|
||||
this.alternativa3d::_-Cl[offset] = data[i];
|
||||
this.alternativa3d::name_321[offset] = data[i];
|
||||
offset++;
|
||||
i++;
|
||||
}
|
||||
@@ -315,17 +315,17 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + 1 > this.alternativa3d::_-Kv)
|
||||
if(firstRegister + 1 > this.alternativa3d::name_320)
|
||||
{
|
||||
this.alternativa3d::_-Kv = firstRegister + 1;
|
||||
this.alternativa3d::name_320 = firstRegister + 1;
|
||||
}
|
||||
this.alternativa3d::_-Cl[offset] = x;
|
||||
this.alternativa3d::name_321[offset] = x;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = y;
|
||||
this.alternativa3d::name_321[offset] = y;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = z;
|
||||
this.alternativa3d::name_321[offset] = z;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = w;
|
||||
this.alternativa3d::name_321[offset] = w;
|
||||
}
|
||||
|
||||
alternativa3d function setFragmentConstantsFromTransform(firstRegister:int, transform:Transform3D) : void
|
||||
@@ -335,33 +335,33 @@ package alternativa.engine3d.core
|
||||
throw new Error("Register index " + firstRegister + " is out of bounds.");
|
||||
}
|
||||
var offset:int = firstRegister << 2;
|
||||
if(firstRegister + 3 > this.alternativa3d::_-Kv)
|
||||
if(firstRegister + 3 > this.alternativa3d::name_320)
|
||||
{
|
||||
this.alternativa3d::_-Kv = firstRegister + 3;
|
||||
this.alternativa3d::name_320 = firstRegister + 3;
|
||||
}
|
||||
this.alternativa3d::_-Cl[offset] = transform.a;
|
||||
this.alternativa3d::name_321[offset] = transform.a;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.b;
|
||||
this.alternativa3d::name_321[offset] = transform.b;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.c;
|
||||
this.alternativa3d::name_321[offset] = transform.c;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.d;
|
||||
this.alternativa3d::name_321[offset] = transform.d;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.e;
|
||||
this.alternativa3d::name_321[offset] = transform.e;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.f;
|
||||
this.alternativa3d::name_321[offset] = transform.f;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.g;
|
||||
this.alternativa3d::name_321[offset] = transform.g;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.h;
|
||||
this.alternativa3d::name_321[offset] = transform.h;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.i;
|
||||
this.alternativa3d::name_321[offset] = transform.i;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.j;
|
||||
this.alternativa3d::name_321[offset] = transform.j;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.k;
|
||||
this.alternativa3d::name_321[offset] = transform.k;
|
||||
offset++;
|
||||
this.alternativa3d::_-Cl[offset] = transform.l;
|
||||
this.alternativa3d::name_321[offset] = transform.l;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@ package alternativa.engine3d.core
|
||||
|
||||
public var intensity:Number = 1;
|
||||
|
||||
alternativa3d var §_-cl§:Transform3D = new Transform3D();
|
||||
alternativa3d var name_80:Transform3D = new Transform3D();
|
||||
|
||||
alternativa3d var §_-oG§:String;
|
||||
alternativa3d var name_79:String;
|
||||
|
||||
alternativa3d var red:Number;
|
||||
|
||||
@@ -25,7 +25,7 @@ package alternativa.engine3d.core
|
||||
public function Light3D()
|
||||
{
|
||||
super();
|
||||
this.alternativa3d::_-oG = "l" + lastLightNumber.toString(16);
|
||||
this.alternativa3d::name_79 = "l" + lastLightNumber.toString(16);
|
||||
name = "L" + (lastLightNumber++).toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -551,7 +551,7 @@ package alternativa.engine3d.core
|
||||
var event3D:Event3D = event as Event3D;
|
||||
if(event3D != null)
|
||||
{
|
||||
event3D.alternativa3d::_-5E = this;
|
||||
event3D.alternativa3d::name_314 = this;
|
||||
}
|
||||
var branch:Vector.<Object3D> = new Vector.<Object3D>();
|
||||
var branchLength:int = 0;
|
||||
@@ -565,8 +565,8 @@ package alternativa.engine3d.core
|
||||
object = branch[i];
|
||||
if(event3D != null)
|
||||
{
|
||||
event3D.alternativa3d::_-Kh = object;
|
||||
event3D.alternativa3d::_-VE = EventPhase.CAPTURING_PHASE;
|
||||
event3D.alternativa3d::name_313 = object;
|
||||
event3D.alternativa3d::name_312 = EventPhase.CAPTURING_PHASE;
|
||||
}
|
||||
if(object.alternativa3d::captureListeners != null)
|
||||
{
|
||||
@@ -587,17 +587,17 @@ package alternativa.engine3d.core
|
||||
}
|
||||
if(event3D != null)
|
||||
{
|
||||
event3D.alternativa3d::_-VE = EventPhase.AT_TARGET;
|
||||
event3D.alternativa3d::name_312 = EventPhase.AT_TARGET;
|
||||
}
|
||||
for(i = 0; i < branchLength; )
|
||||
{
|
||||
object = branch[i];
|
||||
if(event3D != null)
|
||||
{
|
||||
event3D.alternativa3d::_-Kh = object;
|
||||
event3D.alternativa3d::name_313 = object;
|
||||
if(i > 0)
|
||||
{
|
||||
event3D.alternativa3d::_-VE = EventPhase.BUBBLING_PHASE;
|
||||
event3D.alternativa3d::name_312 = EventPhase.BUBBLING_PHASE;
|
||||
}
|
||||
}
|
||||
if(object.alternativa3d::bubbleListeners != null)
|
||||
@@ -1164,7 +1164,7 @@ package alternativa.engine3d.core
|
||||
for(i = 0; i < lightsLength; )
|
||||
{
|
||||
light = lights[i];
|
||||
light.alternativa3d::_-cl.combine(child.alternativa3d::cameraToLocalTransform,light.alternativa3d::localToCameraTransform);
|
||||
light.alternativa3d::name_80.combine(child.alternativa3d::cameraToLocalTransform,light.alternativa3d::localToCameraTransform);
|
||||
if(light.boundBox == null || light.alternativa3d::checkBound(child))
|
||||
{
|
||||
camera.alternativa3d::childLights[childLightsLength] = light;
|
||||
@@ -1179,7 +1179,7 @@ package alternativa.engine3d.core
|
||||
for(i = 0; i < lightsLength; )
|
||||
{
|
||||
light = lights[i];
|
||||
light.alternativa3d::_-cl.combine(child.alternativa3d::cameraToLocalTransform,light.alternativa3d::localToCameraTransform);
|
||||
light.alternativa3d::name_80.combine(child.alternativa3d::cameraToLocalTransform,light.alternativa3d::localToCameraTransform);
|
||||
i++;
|
||||
}
|
||||
child.alternativa3d::collectDraws(camera,lights,lightsLength);
|
||||
|
||||
@@ -20,7 +20,7 @@ package alternativa.engine3d.core
|
||||
|
||||
alternativa3d var camera:Camera3D;
|
||||
|
||||
alternativa3d var §_-T5§:Vector.<DrawUnit> = new Vector.<DrawUnit>();
|
||||
alternativa3d var var_585:Vector.<DrawUnit> = new Vector.<DrawUnit>();
|
||||
|
||||
public function Renderer()
|
||||
{
|
||||
@@ -31,10 +31,10 @@ package alternativa.engine3d.core
|
||||
{
|
||||
var list:DrawUnit = null;
|
||||
var next:DrawUnit = null;
|
||||
var drawUnitsLength:int = int(this.alternativa3d::_-T5.length);
|
||||
var drawUnitsLength:int = int(this.alternativa3d::var_585.length);
|
||||
for(var i:int = 0; i < drawUnitsLength; )
|
||||
{
|
||||
list = this.alternativa3d::_-T5[i];
|
||||
list = this.alternativa3d::var_585[i];
|
||||
if(list != null)
|
||||
{
|
||||
switch(i)
|
||||
@@ -90,7 +90,7 @@ package alternativa.engine3d.core
|
||||
}
|
||||
i++;
|
||||
}
|
||||
this.alternativa3d::_-T5.length = 0;
|
||||
this.alternativa3d::var_585.length = 0;
|
||||
}
|
||||
|
||||
alternativa3d function createDrawUnit(object:Object3D, program:Program3D, indexBuffer:IndexBuffer3D, firstIndex:int, numTriangles:int, debugShader:ShaderProgram = null) : DrawUnit
|
||||
@@ -116,12 +116,12 @@ package alternativa.engine3d.core
|
||||
|
||||
alternativa3d function addDrawUnit(drawUnit:DrawUnit, renderPriority:int) : void
|
||||
{
|
||||
if(renderPriority >= this.alternativa3d::_-T5.length)
|
||||
if(renderPriority >= this.alternativa3d::var_585.length)
|
||||
{
|
||||
this.alternativa3d::_-T5.length = renderPriority + 1;
|
||||
this.alternativa3d::var_585.length = renderPriority + 1;
|
||||
}
|
||||
drawUnit.alternativa3d::next = this.alternativa3d::_-T5[renderPriority];
|
||||
this.alternativa3d::_-T5[renderPriority] = drawUnit;
|
||||
drawUnit.alternativa3d::next = this.alternativa3d::var_585[renderPriority];
|
||||
this.alternativa3d::var_585[renderPriority] = drawUnit;
|
||||
}
|
||||
|
||||
protected function renderDrawUnit(drawUnit:DrawUnit, context:Context3D, camera:Camera3D) : void
|
||||
@@ -134,25 +134,25 @@ package alternativa.engine3d.core
|
||||
var currentTextures:int = 0;
|
||||
context.setBlendFactors(drawUnit.alternativa3d::blendSource,drawUnit.alternativa3d::blendDestination);
|
||||
context.setCulling(drawUnit.alternativa3d::culling);
|
||||
for(var i:int = 0; i < drawUnit.alternativa3d::_-3G; i++)
|
||||
for(var i:int = 0; i < drawUnit.alternativa3d::name_316; i++)
|
||||
{
|
||||
bufferIndex = int(drawUnit.alternativa3d::else [i]);
|
||||
bufferIndex = int(drawUnit.alternativa3d::name_318[i]);
|
||||
bufferBit = 1 << bufferIndex;
|
||||
currentBuffers |= bufferBit;
|
||||
_usedBuffers &= ~bufferBit;
|
||||
context.setVertexBufferAt(bufferIndex,drawUnit.alternativa3d::vertexBuffers[i],drawUnit.alternativa3d::_-nw[i],drawUnit.alternativa3d::_-EL[i]);
|
||||
context.setVertexBufferAt(bufferIndex,drawUnit.alternativa3d::vertexBuffers[i],drawUnit.alternativa3d::name_324[i],drawUnit.alternativa3d::name_322[i]);
|
||||
}
|
||||
if(drawUnit.alternativa3d::_-9X > 0)
|
||||
if(drawUnit.alternativa3d::name_317 > 0)
|
||||
{
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,drawUnit.alternativa3d::_-Aq,drawUnit.alternativa3d::_-9X);
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.VERTEX,0,drawUnit.alternativa3d::name_323,drawUnit.alternativa3d::name_317);
|
||||
}
|
||||
if(drawUnit.alternativa3d::_-Kv > 0)
|
||||
if(drawUnit.alternativa3d::name_320 > 0)
|
||||
{
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,drawUnit.alternativa3d::_-Cl,drawUnit.alternativa3d::_-Kv);
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,drawUnit.alternativa3d::name_321,drawUnit.alternativa3d::name_320);
|
||||
}
|
||||
for(i = 0; i < drawUnit.alternativa3d::_-Oq; )
|
||||
for(i = 0; i < drawUnit.alternativa3d::var_182; )
|
||||
{
|
||||
textureSampler = int(drawUnit.alternativa3d::_-kR[i]);
|
||||
textureSampler = int(drawUnit.alternativa3d::var_183[i]);
|
||||
textureBit = 1 << textureSampler;
|
||||
currentTextures |= textureBit;
|
||||
_usedTextures &= ~textureBit;
|
||||
|
||||
@@ -12,42 +12,42 @@ package alternativa.engine3d.core.events
|
||||
|
||||
public static const REMOVED:String = "removed3D";
|
||||
|
||||
alternativa3d var §_-5E§:Object3D;
|
||||
alternativa3d var name_314:Object3D;
|
||||
|
||||
alternativa3d var §_-Kh§:Object3D;
|
||||
alternativa3d var name_313:Object3D;
|
||||
|
||||
alternativa3d var §_-iJ§:Boolean;
|
||||
alternativa3d var var_107:Boolean;
|
||||
|
||||
alternativa3d var §_-VE§:uint = 3;
|
||||
alternativa3d var name_312:uint = 3;
|
||||
|
||||
alternativa3d var stop:Boolean = false;
|
||||
|
||||
alternativa3d var §_-XD§:Boolean = false;
|
||||
alternativa3d var var_108:Boolean = false;
|
||||
|
||||
public function Event3D(type:String, bubbles:Boolean = true)
|
||||
{
|
||||
super(type,bubbles);
|
||||
this.alternativa3d::_-iJ = bubbles;
|
||||
this.alternativa3d::var_107 = bubbles;
|
||||
}
|
||||
|
||||
override public function get bubbles() : Boolean
|
||||
{
|
||||
return this.alternativa3d::_-iJ;
|
||||
return this.alternativa3d::var_107;
|
||||
}
|
||||
|
||||
override public function get eventPhase() : uint
|
||||
{
|
||||
return this.alternativa3d::_-VE;
|
||||
return this.alternativa3d::name_312;
|
||||
}
|
||||
|
||||
override public function get target() : Object
|
||||
{
|
||||
return this.alternativa3d::_-5E;
|
||||
return this.alternativa3d::name_314;
|
||||
}
|
||||
|
||||
override public function get currentTarget() : Object
|
||||
{
|
||||
return this.alternativa3d::_-Kh;
|
||||
return this.alternativa3d::name_313;
|
||||
}
|
||||
|
||||
override public function stopPropagation() : void
|
||||
@@ -57,15 +57,15 @@ package alternativa.engine3d.core.events
|
||||
|
||||
override public function stopImmediatePropagation() : void
|
||||
{
|
||||
this.alternativa3d::_-XD = true;
|
||||
this.alternativa3d::var_108 = true;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
var result:Event3D = new Event3D(type,this.alternativa3d::_-iJ);
|
||||
result.alternativa3d::_-5E = this.alternativa3d::_-5E;
|
||||
result.alternativa3d::_-Kh = this.alternativa3d::_-Kh;
|
||||
result.alternativa3d::_-VE = this.alternativa3d::_-VE;
|
||||
var result:Event3D = new Event3D(type,this.alternativa3d::var_107);
|
||||
result.alternativa3d::name_314 = this.alternativa3d::name_314;
|
||||
result.alternativa3d::name_313 = this.alternativa3d::name_313;
|
||||
result.alternativa3d::name_312 = this.alternativa3d::name_312;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ package alternativa.engine3d.core.events
|
||||
|
||||
public var localZ:Number;
|
||||
|
||||
alternativa3d var §_-BX§:Surface;
|
||||
alternativa3d var var_109:Surface;
|
||||
|
||||
public function MouseEvent3D(type:String, bubbles:Boolean = true, localX:Number = NaN, localY:Number = NaN, localZ:Number = NaN, relatedObject:Object3D = null, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, buttonDown:Boolean = false, delta:int = 0)
|
||||
{
|
||||
@@ -65,12 +65,12 @@ package alternativa.engine3d.core.events
|
||||
|
||||
public function get surface() : Surface
|
||||
{
|
||||
return this.alternativa3d::_-BX;
|
||||
return this.alternativa3d::var_109;
|
||||
}
|
||||
|
||||
override public function clone() : Event
|
||||
{
|
||||
return new MouseEvent3D(type,alternativa3d::_-iJ,this.localX,this.localY,this.localZ,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta);
|
||||
return new MouseEvent3D(type,alternativa3d::var_107,this.localX,this.localY,this.localZ,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta);
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
|
||||
@@ -30,13 +30,13 @@ package alternativa.engine3d.effects
|
||||
|
||||
public var originY:Number;
|
||||
|
||||
public var §_-q§:Number;
|
||||
public var name_333:Number;
|
||||
|
||||
public var §_-Ts§:Number;
|
||||
public var name_330:Number;
|
||||
|
||||
public var §_-ej§:Number;
|
||||
public var name_332:Number;
|
||||
|
||||
public var §_-W5§:Number;
|
||||
public var name_331:Number;
|
||||
|
||||
public var red:Number;
|
||||
|
||||
|
||||
@@ -21,23 +21,23 @@ package alternativa.engine3d.effects
|
||||
|
||||
private var height:Number;
|
||||
|
||||
private var §_-gV§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_151:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-0r§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_657:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-4e§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_659:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-Oj§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_662:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-07§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_656:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-3l§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_658:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-7S§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_660:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-Ch§:Vector.<Number> = new Vector.<Number>();
|
||||
private var var_661:Vector.<Number> = new Vector.<Number>();
|
||||
|
||||
private var §_-kf§:int = 0;
|
||||
private var var_148:int = 0;
|
||||
|
||||
public function ParticlePrototype(width:Number, height:Number, atlas:TextureAtlas, animated:Boolean = false, blendSource:String = "sourceAlpha", blendDestination:String = "oneMinusSourceAlpha")
|
||||
{
|
||||
@@ -52,23 +52,23 @@ package alternativa.engine3d.effects
|
||||
|
||||
public function addKey(time:Number, rotation:Number = 0, scaleX:Number = 1, scaleY:Number = 1, red:Number = 1, green:Number = 1, blue:Number = 1, alpha:Number = 1) : void
|
||||
{
|
||||
var lastIndex:int = this.§_-kf§ - 1;
|
||||
if(this.§_-kf§ > 0 && time <= this.§_-gV§[lastIndex])
|
||||
var lastIndex:int = this.var_148 - 1;
|
||||
if(this.var_148 > 0 && time <= this.var_151[lastIndex])
|
||||
{
|
||||
throw new Error("Keys must be successively.");
|
||||
}
|
||||
this.§_-gV§[this.§_-kf§] = time;
|
||||
this.§_-0r§[this.§_-kf§] = rotation;
|
||||
this.§_-4e§[this.§_-kf§] = scaleX;
|
||||
this.§_-Oj§[this.§_-kf§] = scaleY;
|
||||
this.§_-07§[this.§_-kf§] = red;
|
||||
this.§_-3l§[this.§_-kf§] = green;
|
||||
this.§_-7S§[this.§_-kf§] = blue;
|
||||
this.§_-Ch§[this.§_-kf§] = alpha;
|
||||
++this.§_-kf§;
|
||||
this.var_151[this.var_148] = time;
|
||||
this.var_657[this.var_148] = rotation;
|
||||
this.var_659[this.var_148] = scaleX;
|
||||
this.var_662[this.var_148] = scaleY;
|
||||
this.var_656[this.var_148] = red;
|
||||
this.var_658[this.var_148] = green;
|
||||
this.var_660[this.var_148] = blue;
|
||||
this.var_661[this.var_148] = alpha;
|
||||
++this.var_148;
|
||||
}
|
||||
|
||||
public function createParticle(effect:§_-SG§, time:Number, position:Vector3D, rotation:Number = 0, scaleX:Number = 1, scaleY:Number = 1, alpha:Number = 1, firstFrame:int = 0) : void
|
||||
public function createParticle(effect:name_77, time:Number, position:Vector3D, rotation:Number = 0, scaleX:Number = 1, scaleY:Number = 1, alpha:Number = 1, firstFrame:int = 0) : void
|
||||
{
|
||||
var systemScale:Number = NaN;
|
||||
var effectScale:Number = NaN;
|
||||
@@ -85,12 +85,12 @@ package alternativa.engine3d.effects
|
||||
var cy:Number = NaN;
|
||||
var cz:Number = NaN;
|
||||
var rot:Number = NaN;
|
||||
var b:int = this.§_-kf§ - 1;
|
||||
if(this.atlas.diffuse.alternativa3d::_texture != null && this.§_-kf§ > 1 && time >= this.§_-gV§[0] && time < this.§_-gV§[b])
|
||||
var b:int = this.var_148 - 1;
|
||||
if(this.atlas.diffuse.alternativa3d::_texture != null && this.var_148 > 1 && time >= this.var_151[0] && time < this.var_151[b])
|
||||
{
|
||||
for(b = 1; b < this.§_-kf§; )
|
||||
for(b = 1; b < this.var_148; )
|
||||
{
|
||||
if(time < this.§_-gV§[b])
|
||||
if(time < this.var_151[b])
|
||||
{
|
||||
systemScale = Number(effect.alternativa3d::system.alternativa3d::scale);
|
||||
effectScale = Number(effect.scale);
|
||||
@@ -98,7 +98,7 @@ package alternativa.engine3d.effects
|
||||
wind = effect.alternativa3d::system.wind;
|
||||
gravity = effect.alternativa3d::system.gravity;
|
||||
a = b - 1;
|
||||
t = (time - this.§_-gV§[a]) / (this.§_-gV§[b] - this.§_-gV§[a]);
|
||||
t = (time - this.var_151[a]) / (this.var_151[b] - this.var_151[a]);
|
||||
pos = firstFrame + (this.animated ? time * this.atlas.fps : 0);
|
||||
if(this.atlas.loop)
|
||||
{
|
||||
@@ -127,26 +127,26 @@ package alternativa.engine3d.effects
|
||||
particle.opacity = this.atlas.opacity != null ? this.atlas.opacity.alternativa3d::_texture : null;
|
||||
particle.blendSource = this.blendSource;
|
||||
particle.blendDestination = this.blendDestination;
|
||||
cx = effect.alternativa3d::_-M7.x + position.x * effectScale;
|
||||
cy = effect.alternativa3d::_-M7.y + position.y * effectScale;
|
||||
cz = effect.alternativa3d::_-M7.z + position.z * effectScale;
|
||||
cx = effect.alternativa3d::var_157.x + position.x * effectScale;
|
||||
cy = effect.alternativa3d::var_157.y + position.y * effectScale;
|
||||
cz = effect.alternativa3d::var_157.z + position.z * effectScale;
|
||||
particle.x = cx * transform.a + cy * transform.b + cz * transform.c + transform.d;
|
||||
particle.y = cx * transform.e + cy * transform.f + cz * transform.g + transform.h;
|
||||
particle.z = cx * transform.i + cy * transform.j + cz * transform.k + transform.l;
|
||||
rot = this.§_-0r§[a] + (this.§_-0r§[b] - this.§_-0r§[a]) * t;
|
||||
rot = this.var_657[a] + (this.var_657[b] - this.var_657[a]) * t;
|
||||
particle.rotation = scaleX * scaleY > 0 ? rotation + rot : rotation - rot;
|
||||
particle.width = systemScale * effectScale * scaleX * this.width * (this.§_-4e§[a] + (this.§_-4e§[b] - this.§_-4e§[a]) * t);
|
||||
particle.height = systemScale * effectScale * scaleY * this.height * (this.§_-Oj§[a] + (this.§_-Oj§[b] - this.§_-Oj§[a]) * t);
|
||||
particle.width = systemScale * effectScale * scaleX * this.width * (this.var_659[a] + (this.var_659[b] - this.var_659[a]) * t);
|
||||
particle.height = systemScale * effectScale * scaleY * this.height * (this.var_662[a] + (this.var_662[b] - this.var_662[a]) * t);
|
||||
particle.originX = this.atlas.originX;
|
||||
particle.originY = this.atlas.originY;
|
||||
particle.§_-q§ = 1 / this.atlas.columnsCount;
|
||||
particle.§_-Ts§ = 1 / this.atlas.rowsCount;
|
||||
particle.§_-ej§ = col / this.atlas.columnsCount;
|
||||
particle.§_-W5§ = row / this.atlas.rowsCount;
|
||||
particle.red = this.§_-07§[a] + (this.§_-07§[b] - this.§_-07§[a]) * t;
|
||||
particle.green = this.§_-3l§[a] + (this.§_-3l§[b] - this.§_-3l§[a]) * t;
|
||||
particle.blue = this.§_-7S§[a] + (this.§_-7S§[b] - this.§_-7S§[a]) * t;
|
||||
particle.alpha = alpha * (this.§_-Ch§[a] + (this.§_-Ch§[b] - this.§_-Ch§[a]) * t);
|
||||
particle.name_333 = 1 / this.atlas.columnsCount;
|
||||
particle.name_330 = 1 / this.atlas.rowsCount;
|
||||
particle.name_332 = col / this.atlas.columnsCount;
|
||||
particle.name_331 = row / this.atlas.rowsCount;
|
||||
particle.red = this.var_656[a] + (this.var_656[b] - this.var_656[a]) * t;
|
||||
particle.green = this.var_658[a] + (this.var_658[b] - this.var_658[a]) * t;
|
||||
particle.blue = this.var_660[a] + (this.var_660[b] - this.var_660[a]) * t;
|
||||
particle.alpha = alpha * (this.var_661[a] + (this.var_661[b] - this.var_661[a]) * t);
|
||||
particle.next = effect.alternativa3d::particleList;
|
||||
effect.alternativa3d::particleList = particle;
|
||||
break;
|
||||
@@ -158,8 +158,8 @@ package alternativa.engine3d.effects
|
||||
|
||||
public function get lifeTime() : Number
|
||||
{
|
||||
var lastIndex:int = this.§_-kf§ - 1;
|
||||
return this.§_-gV§[lastIndex];
|
||||
var lastIndex:int = this.var_148 - 1;
|
||||
return this.var_151[lastIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,13 +38,13 @@ package alternativa.engine3d.effects
|
||||
|
||||
private static const limit:int = 31;
|
||||
|
||||
public var §_-jW§:Boolean = true;
|
||||
public var var_141:Boolean = true;
|
||||
|
||||
public var gravity:Vector3D = new Vector3D(0,0,-1);
|
||||
|
||||
public var wind:Vector3D = new Vector3D();
|
||||
|
||||
public var §_-IN§:int = 0;
|
||||
public var name_76:int = 0;
|
||||
|
||||
public var fogMaxDensity:Number = 0;
|
||||
|
||||
@@ -54,7 +54,7 @@ package alternativa.engine3d.effects
|
||||
|
||||
alternativa3d var scale:Number = 1;
|
||||
|
||||
alternativa3d var effectList:§_-SG§;
|
||||
alternativa3d var effectList:name_77;
|
||||
|
||||
private var drawUnit:DrawUnit = null;
|
||||
|
||||
@@ -68,19 +68,19 @@ package alternativa.engine3d.effects
|
||||
|
||||
private var counter:int;
|
||||
|
||||
private var §_-La§:Number;
|
||||
private var var_139:Number;
|
||||
|
||||
private var §_-p3§:Number;
|
||||
private var var_140:Number;
|
||||
|
||||
private var §_-ZN§:Vector.<Object3D> = new Vector.<Object3D>();
|
||||
private var var_138:Vector.<Object3D> = new Vector.<Object3D>();
|
||||
|
||||
private var §_-hr§:int = 0;
|
||||
private var var_136:int = 0;
|
||||
|
||||
private var pause:Boolean = false;
|
||||
|
||||
private var §_-pK§:Number;
|
||||
private var var_135:Number;
|
||||
|
||||
private var §_-L5§:Number = 0;
|
||||
private var var_137:Number = 0;
|
||||
|
||||
public function ParticleSystem()
|
||||
{
|
||||
@@ -91,7 +91,7 @@ package alternativa.engine3d.effects
|
||||
{
|
||||
if(!this.pause)
|
||||
{
|
||||
this.§_-pK§ = getTimer() * 0.001;
|
||||
this.var_135 = getTimer() * 0.001;
|
||||
this.pause = true;
|
||||
}
|
||||
}
|
||||
@@ -100,22 +100,22 @@ package alternativa.engine3d.effects
|
||||
{
|
||||
if(this.pause)
|
||||
{
|
||||
this.§_-L5§ += getTimer() * 0.001 - this.§_-pK§;
|
||||
this.var_137 += getTimer() * 0.001 - this.var_135;
|
||||
this.pause = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function prevFrame() : void
|
||||
{
|
||||
this.§_-pK§ -= 0.001;
|
||||
this.var_135 -= 0.001;
|
||||
}
|
||||
|
||||
public function nextFrame() : void
|
||||
{
|
||||
this.§_-pK§ += 0.001;
|
||||
this.var_135 += 0.001;
|
||||
}
|
||||
|
||||
public function each(effect:§_-SG§) : §_-SG§
|
||||
public function method_21(effect:name_77) : name_77
|
||||
{
|
||||
if(effect.alternativa3d::system != null)
|
||||
{
|
||||
@@ -123,34 +123,34 @@ package alternativa.engine3d.effects
|
||||
}
|
||||
effect.alternativa3d::startTime = this.alternativa3d::getTime();
|
||||
effect.alternativa3d::system = this;
|
||||
effect.alternativa3d::_-is(0);
|
||||
effect.alternativa3d::_-Af(0);
|
||||
effect.alternativa3d::implements = this.alternativa3d::effectList;
|
||||
effect.alternativa3d::name_329(0);
|
||||
effect.alternativa3d::name_327(0);
|
||||
effect.alternativa3d::name_326 = this.alternativa3d::effectList;
|
||||
this.alternativa3d::effectList = effect;
|
||||
return effect;
|
||||
}
|
||||
|
||||
public function getEffectByName(name:String) : §_-SG§
|
||||
public function getEffectByName(name:String) : name_77
|
||||
{
|
||||
for(var effect:§_-SG§ = this.alternativa3d::effectList; effect != null; )
|
||||
for(var effect:name_77 = this.alternativa3d::effectList; effect != null; )
|
||||
{
|
||||
if(effect.name == name)
|
||||
{
|
||||
return effect;
|
||||
}
|
||||
effect = effect.alternativa3d::implements;
|
||||
effect = effect.alternativa3d::name_326;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
alternativa3d function getTime() : Number
|
||||
{
|
||||
return this.pause ? this.§_-pK§ - this.§_-L5§ : getTimer() * 0.001 - this.§_-L5§;
|
||||
return this.pause ? this.var_135 - this.var_137 : getTimer() * 0.001 - this.var_137;
|
||||
}
|
||||
|
||||
override alternativa3d function collectDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int) : void
|
||||
{
|
||||
var visibleEffectList:§_-SG§ = null;
|
||||
var visibleEffectList:name_77 = null;
|
||||
var effectTime:Number = NaN;
|
||||
var culling:int = 0;
|
||||
var debug:int = 0;
|
||||
@@ -165,7 +165,7 @@ package alternativa.engine3d.effects
|
||||
camera.alternativa3d::calculateFrustum(alternativa3d::cameraToLocalTransform);
|
||||
var conflictAnyway:Boolean = false;
|
||||
var time:Number = this.alternativa3d::getTime();
|
||||
for(var effect:§_-SG§ = this.alternativa3d::effectList,var prev:§_-SG§ = null; effect != null; )
|
||||
for(var effect:name_77 = this.alternativa3d::effectList,var prev:name_77 = null; effect != null; )
|
||||
{
|
||||
effectTime = time - effect.alternativa3d::startTime;
|
||||
if(effectTime <= effect.alternativa3d::lifeTime)
|
||||
@@ -178,7 +178,7 @@ package alternativa.engine3d.effects
|
||||
}
|
||||
if(culling >= 0)
|
||||
{
|
||||
if(effect.alternativa3d::_-Xj(effectTime))
|
||||
if(effect.alternativa3d::name_328(effectTime))
|
||||
{
|
||||
if(effect.alternativa3d::particleList != null)
|
||||
{
|
||||
@@ -187,33 +187,33 @@ package alternativa.engine3d.effects
|
||||
conflictAnyway ||= effect.boundBox == null;
|
||||
}
|
||||
prev = effect;
|
||||
effect = effect.alternativa3d::implements;
|
||||
effect = effect.alternativa3d::name_326;
|
||||
}
|
||||
else if(prev != null)
|
||||
{
|
||||
prev.alternativa3d::implements = effect.alternativa3d::implements;
|
||||
effect = prev.alternativa3d::implements;
|
||||
prev.alternativa3d::name_326 = effect.alternativa3d::name_326;
|
||||
effect = prev.alternativa3d::name_326;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.alternativa3d::effectList = effect.alternativa3d::implements;
|
||||
this.alternativa3d::effectList = effect.alternativa3d::name_326;
|
||||
effect = this.alternativa3d::effectList;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
prev = effect;
|
||||
effect = effect.alternativa3d::implements;
|
||||
effect = effect.alternativa3d::name_326;
|
||||
}
|
||||
}
|
||||
else if(prev != null)
|
||||
{
|
||||
prev.alternativa3d::implements = effect.alternativa3d::implements;
|
||||
effect = prev.alternativa3d::implements;
|
||||
prev.alternativa3d::name_326 = effect.alternativa3d::name_326;
|
||||
effect = prev.alternativa3d::name_326;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.alternativa3d::effectList = effect.alternativa3d::implements;
|
||||
this.alternativa3d::effectList = effect.alternativa3d::name_326;
|
||||
effect = this.alternativa3d::effectList;
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ package alternativa.engine3d.effects
|
||||
this.opacity = null;
|
||||
this.blendSource = null;
|
||||
this.blendDestination = null;
|
||||
this.§_-hr§ = 0;
|
||||
this.var_136 = 0;
|
||||
}
|
||||
if(camera.debug)
|
||||
{
|
||||
@@ -294,13 +294,13 @@ package alternativa.engine3d.effects
|
||||
|
||||
private function flush(camera:Camera3D) : void
|
||||
{
|
||||
if(this.§_-hr§ == this.§_-ZN§.length)
|
||||
if(this.var_136 == this.var_138.length)
|
||||
{
|
||||
this.§_-ZN§[this.§_-hr§] = new Object3D();
|
||||
this.var_138[this.var_136] = new Object3D();
|
||||
}
|
||||
var object:Object3D = this.§_-ZN§[this.§_-hr§];
|
||||
++this.§_-hr§;
|
||||
object.alternativa3d::localToCameraTransform.l = (this.§_-La§ + this.§_-p3§) / 2;
|
||||
var object:Object3D = this.var_138[this.var_136];
|
||||
++this.var_136;
|
||||
object.alternativa3d::localToCameraTransform.l = (this.var_139 + this.var_140) / 2;
|
||||
this.drawUnit.alternativa3d::object = object;
|
||||
this.drawUnit.alternativa3d::numTriangles = this.counter << 1;
|
||||
if(this.blendDestination == Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA)
|
||||
@@ -314,7 +314,7 @@ package alternativa.engine3d.effects
|
||||
this.drawUnit.alternativa3d::setVertexBufferAt(0,vertexBuffer,0,Context3DVertexBufferFormat.FLOAT_3);
|
||||
this.drawUnit.alternativa3d::setVertexBufferAt(1,vertexBuffer,3,Context3DVertexBufferFormat.FLOAT_3);
|
||||
this.drawUnit.alternativa3d::setProjectionConstants(camera,124);
|
||||
this.drawUnit.alternativa3d::setFragmentConstantsFromNumbers(0,(this.§_-IN§ >> 16 & 0xFF) / 255,(this.§_-IN§ >> 8 & 0xFF) / 255,(this.§_-IN§ & 0xFF) / 255,this.fogMaxDensity);
|
||||
this.drawUnit.alternativa3d::setFragmentConstantsFromNumbers(0,(this.name_76 >> 16 & 0xFF) / 255,(this.name_76 >> 8 & 0xFF) / 255,(this.name_76 & 0xFF) / 255,this.fogMaxDensity);
|
||||
this.drawUnit.alternativa3d::setFragmentConstantsFromNumbers(1,this.fogNear,this.fogFar - this.fogNear,0,1);
|
||||
this.drawUnit.alternativa3d::setTextureAt(0,this.diffuse);
|
||||
if(this.opacity != null)
|
||||
@@ -349,15 +349,15 @@ package alternativa.engine3d.effects
|
||||
this.blendSource = particle.blendSource;
|
||||
this.blendDestination = particle.blendDestination;
|
||||
this.counter = 0;
|
||||
this.§_-La§ = particle.z;
|
||||
this.var_139 = particle.z;
|
||||
}
|
||||
offset = this.counter << 2;
|
||||
this.drawUnit.alternativa3d::setVertexConstantsFromNumbers(offset++,particle.originX,particle.originY,particle.width,particle.height);
|
||||
this.drawUnit.alternativa3d::setVertexConstantsFromNumbers(offset++,particle.x,particle.y,particle.z,particle.rotation);
|
||||
this.drawUnit.alternativa3d::setVertexConstantsFromNumbers(offset++,particle.§_-q§,particle.§_-Ts§,particle.§_-ej§,particle.§_-W5§);
|
||||
this.drawUnit.alternativa3d::setVertexConstantsFromNumbers(offset++,particle.name_333,particle.name_330,particle.name_332,particle.name_331);
|
||||
this.drawUnit.alternativa3d::setVertexConstantsFromNumbers(offset++,particle.red,particle.green,particle.blue,particle.alpha);
|
||||
++this.counter;
|
||||
this.§_-p3§ = particle.z;
|
||||
this.var_140 = particle.z;
|
||||
last = particle;
|
||||
particle = particle.next;
|
||||
}
|
||||
@@ -435,12 +435,12 @@ package alternativa.engine3d.effects
|
||||
return list;
|
||||
}
|
||||
|
||||
private function drawConflictEffects(camera:Camera3D, effectList:§_-SG§) : void
|
||||
private function drawConflictEffects(camera:Camera3D, effectList:name_77) : void
|
||||
{
|
||||
var particleList:Particle = null;
|
||||
var next:§_-SG§ = null;
|
||||
var next:name_77 = null;
|
||||
var last:Particle = null;
|
||||
for(var effect:§_-SG§ = effectList; effect != null; )
|
||||
for(var effect:name_77 = effectList; effect != null; )
|
||||
{
|
||||
next = effect.alternativa3d::next;
|
||||
effect.alternativa3d::next = null;
|
||||
|
||||
@@ -72,9 +72,9 @@ package alternativa.engine3d.lights
|
||||
|
||||
override alternativa3d function checkBound(targetObject:Object3D) : Boolean
|
||||
{
|
||||
var rScale:Number = Number(Math.sqrt(alternativa3d::_-cl.a * alternativa3d::_-cl.a + alternativa3d::_-cl.e * alternativa3d::_-cl.e + alternativa3d::_-cl.i * alternativa3d::_-cl.i));
|
||||
rScale += Math.sqrt(alternativa3d::_-cl.b * alternativa3d::_-cl.b + alternativa3d::_-cl.f * alternativa3d::_-cl.f + alternativa3d::_-cl.j * alternativa3d::_-cl.j);
|
||||
rScale += Math.sqrt(alternativa3d::_-cl.c * alternativa3d::_-cl.c + alternativa3d::_-cl.g * alternativa3d::_-cl.g + alternativa3d::_-cl.k * alternativa3d::_-cl.k);
|
||||
var rScale:Number = Number(Math.sqrt(alternativa3d::name_80.a * alternativa3d::name_80.a + alternativa3d::name_80.e * alternativa3d::name_80.e + alternativa3d::name_80.i * alternativa3d::name_80.i));
|
||||
rScale += Math.sqrt(alternativa3d::name_80.b * alternativa3d::name_80.b + alternativa3d::name_80.f * alternativa3d::name_80.f + alternativa3d::name_80.j * alternativa3d::name_80.j);
|
||||
rScale += Math.sqrt(alternativa3d::name_80.c * alternativa3d::name_80.c + alternativa3d::name_80.g * alternativa3d::name_80.g + alternativa3d::name_80.k * alternativa3d::name_80.k);
|
||||
rScale /= 3;
|
||||
rScale *= this.attenuationEnd;
|
||||
rScale *= rScale;
|
||||
@@ -84,9 +84,9 @@ package alternativa.engine3d.lights
|
||||
var minY:Number = bb.minY;
|
||||
var minZ:Number = bb.minZ;
|
||||
var maxX:Number = bb.maxX;
|
||||
var px:Number = Number(alternativa3d::_-cl.d);
|
||||
var py:Number = Number(alternativa3d::_-cl.h);
|
||||
var pz:Number = Number(alternativa3d::_-cl.l);
|
||||
var px:Number = Number(alternativa3d::name_80.d);
|
||||
var py:Number = Number(alternativa3d::name_80.h);
|
||||
var pz:Number = Number(alternativa3d::name_80.l);
|
||||
var maxY:Number = bb.maxY;
|
||||
var maxZ:Number = bb.maxZ;
|
||||
if(px < minX)
|
||||
|
||||
@@ -80,22 +80,22 @@ package alternativa.engine3d.lights
|
||||
var w:Number = (maxX - minX) * 0.5;
|
||||
var l:Number = (maxY - minY) * 0.5;
|
||||
var h:Number = (maxZ - minZ) * 0.5;
|
||||
var ax:Number = alternativa3d::_-cl.a * w;
|
||||
var ay:Number = alternativa3d::_-cl.e * w;
|
||||
var az:Number = alternativa3d::_-cl.i * w;
|
||||
var bx:Number = alternativa3d::_-cl.b * l;
|
||||
var by:Number = alternativa3d::_-cl.f * l;
|
||||
var bz:Number = alternativa3d::_-cl.j * l;
|
||||
var cx:Number = alternativa3d::_-cl.c * h;
|
||||
var cy:Number = alternativa3d::_-cl.g * h;
|
||||
var cz:Number = alternativa3d::_-cl.k * h;
|
||||
var ax:Number = alternativa3d::name_80.a * w;
|
||||
var ay:Number = alternativa3d::name_80.e * w;
|
||||
var az:Number = alternativa3d::name_80.i * w;
|
||||
var bx:Number = alternativa3d::name_80.b * l;
|
||||
var by:Number = alternativa3d::name_80.f * l;
|
||||
var bz:Number = alternativa3d::name_80.j * l;
|
||||
var cx:Number = alternativa3d::name_80.c * h;
|
||||
var cy:Number = alternativa3d::name_80.g * h;
|
||||
var cz:Number = alternativa3d::name_80.k * h;
|
||||
var objectBB:BoundBox = targetObject.boundBox;
|
||||
var hw:Number = (objectBB.maxX - objectBB.minX) * 0.5;
|
||||
var hl:Number = (objectBB.maxY - objectBB.minY) * 0.5;
|
||||
var hh:Number = (objectBB.maxZ - objectBB.minZ) * 0.5;
|
||||
var dx:Number = alternativa3d::_-cl.a * (minX + w) + alternativa3d::_-cl.b * (minY + l) + alternativa3d::_-cl.c * (minZ + h) + alternativa3d::_-cl.d - objectBB.minX - hw;
|
||||
var dy:Number = alternativa3d::_-cl.e * (minX + w) + alternativa3d::_-cl.f * (minY + l) + alternativa3d::_-cl.g * (minZ + h) + alternativa3d::_-cl.h - objectBB.minY - hl;
|
||||
var dz:Number = alternativa3d::_-cl.i * (minX + w) + alternativa3d::_-cl.j * (minY + l) + alternativa3d::_-cl.k * (minZ + h) + alternativa3d::_-cl.l - objectBB.minZ - hh;
|
||||
var dx:Number = alternativa3d::name_80.a * (minX + w) + alternativa3d::name_80.b * (minY + l) + alternativa3d::name_80.c * (minZ + h) + alternativa3d::name_80.d - objectBB.minX - hw;
|
||||
var dy:Number = alternativa3d::name_80.e * (minX + w) + alternativa3d::name_80.f * (minY + l) + alternativa3d::name_80.g * (minZ + h) + alternativa3d::name_80.h - objectBB.minY - hl;
|
||||
var dz:Number = alternativa3d::name_80.i * (minX + w) + alternativa3d::name_80.j * (minY + l) + alternativa3d::name_80.k * (minZ + h) + alternativa3d::name_80.l - objectBB.minZ - hh;
|
||||
sum = 0;
|
||||
if(ax >= 0)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ package alternativa.engine3d.lights
|
||||
return false;
|
||||
}
|
||||
sum = 0;
|
||||
pro = alternativa3d::_-cl.a * ax + alternativa3d::_-cl.e * ay + alternativa3d::_-cl.i * az;
|
||||
pro = alternativa3d::name_80.a * ax + alternativa3d::name_80.e * ay + alternativa3d::name_80.i * az;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -217,7 +217,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.a * bx + alternativa3d::_-cl.e * by + alternativa3d::_-cl.i * bz;
|
||||
pro = alternativa3d::name_80.a * bx + alternativa3d::name_80.e * by + alternativa3d::name_80.i * bz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -226,7 +226,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.a * cx + alternativa3d::_-cl.e * cy + alternativa3d::_-cl.i * cz;
|
||||
pro = alternativa3d::name_80.a * cx + alternativa3d::name_80.e * cy + alternativa3d::name_80.i * cz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -235,31 +235,31 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
if(alternativa3d::_-cl.a >= 0)
|
||||
if(alternativa3d::name_80.a >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.a * hw;
|
||||
sum += alternativa3d::name_80.a * hw;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.a * hw;
|
||||
sum -= alternativa3d::name_80.a * hw;
|
||||
}
|
||||
if(alternativa3d::_-cl.e >= 0)
|
||||
if(alternativa3d::name_80.e >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.e * hl;
|
||||
sum += alternativa3d::name_80.e * hl;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.e * hl;
|
||||
sum -= alternativa3d::name_80.e * hl;
|
||||
}
|
||||
if(alternativa3d::_-cl.i >= 0)
|
||||
if(alternativa3d::name_80.i >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.i * hh;
|
||||
sum += alternativa3d::name_80.i * hh;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.i * hh;
|
||||
sum -= alternativa3d::name_80.i * hh;
|
||||
}
|
||||
pro = alternativa3d::_-cl.a * dx + alternativa3d::_-cl.e * dy + alternativa3d::_-cl.i * dz;
|
||||
pro = alternativa3d::name_80.a * dx + alternativa3d::name_80.e * dy + alternativa3d::name_80.i * dz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum -= pro;
|
||||
@@ -273,7 +273,7 @@ package alternativa.engine3d.lights
|
||||
return false;
|
||||
}
|
||||
sum = 0;
|
||||
pro = alternativa3d::_-cl.b * ax + alternativa3d::_-cl.f * ay + alternativa3d::_-cl.j * az;
|
||||
pro = alternativa3d::name_80.b * ax + alternativa3d::name_80.f * ay + alternativa3d::name_80.j * az;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -282,7 +282,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.b * bx + alternativa3d::_-cl.f * by + alternativa3d::_-cl.j * bz;
|
||||
pro = alternativa3d::name_80.b * bx + alternativa3d::name_80.f * by + alternativa3d::name_80.j * bz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -291,7 +291,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.b * cx + alternativa3d::_-cl.f * cy + alternativa3d::_-cl.j * cz;
|
||||
pro = alternativa3d::name_80.b * cx + alternativa3d::name_80.f * cy + alternativa3d::name_80.j * cz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -300,31 +300,31 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
if(alternativa3d::_-cl.b >= 0)
|
||||
if(alternativa3d::name_80.b >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.b * hw;
|
||||
sum += alternativa3d::name_80.b * hw;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.b * hw;
|
||||
sum -= alternativa3d::name_80.b * hw;
|
||||
}
|
||||
if(alternativa3d::_-cl.f >= 0)
|
||||
if(alternativa3d::name_80.f >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.f * hl;
|
||||
sum += alternativa3d::name_80.f * hl;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.f * hl;
|
||||
sum -= alternativa3d::name_80.f * hl;
|
||||
}
|
||||
if(alternativa3d::_-cl.j >= 0)
|
||||
if(alternativa3d::name_80.j >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.j * hh;
|
||||
sum += alternativa3d::name_80.j * hh;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.j * hh;
|
||||
sum -= alternativa3d::name_80.j * hh;
|
||||
}
|
||||
pro = alternativa3d::_-cl.b * dx + alternativa3d::_-cl.f * dy + alternativa3d::_-cl.j * dz;
|
||||
pro = alternativa3d::name_80.b * dx + alternativa3d::name_80.f * dy + alternativa3d::name_80.j * dz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum -= pro;
|
||||
@@ -335,7 +335,7 @@ package alternativa.engine3d.lights
|
||||
return false;
|
||||
}
|
||||
sum = 0;
|
||||
pro = alternativa3d::_-cl.c * ax + alternativa3d::_-cl.g * ay + alternativa3d::_-cl.k * az;
|
||||
pro = alternativa3d::name_80.c * ax + alternativa3d::name_80.g * ay + alternativa3d::name_80.k * az;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -344,7 +344,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.c * bx + alternativa3d::_-cl.g * by + alternativa3d::_-cl.k * bz;
|
||||
pro = alternativa3d::name_80.c * bx + alternativa3d::name_80.g * by + alternativa3d::name_80.k * bz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -353,7 +353,7 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
pro = alternativa3d::_-cl.c * cx + alternativa3d::_-cl.g * cy + alternativa3d::_-cl.k * cz;
|
||||
pro = alternativa3d::name_80.c * cx + alternativa3d::name_80.g * cy + alternativa3d::name_80.k * cz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum += pro;
|
||||
@@ -362,31 +362,31 @@ package alternativa.engine3d.lights
|
||||
{
|
||||
sum -= pro;
|
||||
}
|
||||
if(alternativa3d::_-cl.c >= 0)
|
||||
if(alternativa3d::name_80.c >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.c * hw;
|
||||
sum += alternativa3d::name_80.c * hw;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.c * hw;
|
||||
sum -= alternativa3d::name_80.c * hw;
|
||||
}
|
||||
if(alternativa3d::_-cl.g >= 0)
|
||||
if(alternativa3d::name_80.g >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.g * hl;
|
||||
sum += alternativa3d::name_80.g * hl;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.g * hl;
|
||||
sum -= alternativa3d::name_80.g * hl;
|
||||
}
|
||||
if(alternativa3d::_-cl.k >= 0)
|
||||
if(alternativa3d::name_80.k >= 0)
|
||||
{
|
||||
sum += alternativa3d::_-cl.k * hh;
|
||||
sum += alternativa3d::name_80.k * hh;
|
||||
}
|
||||
else
|
||||
{
|
||||
sum -= alternativa3d::_-cl.k * hh;
|
||||
sum -= alternativa3d::name_80.k * hh;
|
||||
}
|
||||
pro = alternativa3d::_-cl.c * dx + alternativa3d::_-cl.g * dy + alternativa3d::_-cl.k * dz;
|
||||
pro = alternativa3d::name_80.c * dx + alternativa3d::name_80.g * dy + alternativa3d::name_80.k * dz;
|
||||
if(pro >= 0)
|
||||
{
|
||||
sum -= pro;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package alternativa.engine3d.loaders
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import alternativa.engine3d.animation.§_-FA§;
|
||||
import alternativa.engine3d.animation.keys.§_-Np§;
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
import alternativa.engine3d.core.Light3D;
|
||||
import alternativa.engine3d.core.Object3D;
|
||||
import alternativa.engine3d.loaders.collada.DaeDocument;
|
||||
@@ -24,30 +24,30 @@ package alternativa.engine3d.loaders
|
||||
|
||||
public var materials:Vector.<ParserMaterial>;
|
||||
|
||||
public var §_-eL§:Vector.<§_-FA§>;
|
||||
public var var_635:Vector.<name_550>;
|
||||
|
||||
private var §_-W6§:Dictionary;
|
||||
private var var_634:Dictionary;
|
||||
|
||||
public function ParserCollada()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public static function parseAnimation(data:XML) : §_-FA§
|
||||
public static function parseAnimation(data:XML) : name_550
|
||||
{
|
||||
var document:DaeDocument = new DaeDocument(data,0);
|
||||
var clip:§_-FA§ = new §_-FA§();
|
||||
var clip:name_550 = new name_550();
|
||||
collectAnimation(clip,document.scene.nodes);
|
||||
return clip.numTracks > 0 ? clip : null;
|
||||
}
|
||||
|
||||
private static function collectAnimation(clip:§_-FA§, nodes:Vector.<DaeNode>) : void
|
||||
private static function collectAnimation(clip:name_550, nodes:Vector.<DaeNode>) : void
|
||||
{
|
||||
var node:DaeNode = null;
|
||||
var animation:§_-FA§ = null;
|
||||
var animation:name_550 = null;
|
||||
var t:int = 0;
|
||||
var numTracks:int = 0;
|
||||
var track:§_-Np§ = null;
|
||||
var track:name_552 = null;
|
||||
for(var i:int = 0,var count:int = int(nodes.length); i < count; i++)
|
||||
{
|
||||
node = nodes[i];
|
||||
@@ -56,13 +56,13 @@ package alternativa.engine3d.loaders
|
||||
{
|
||||
for(t = 0,numTracks = int(animation.numTracks); t < numTracks; t++)
|
||||
{
|
||||
track = animation.§_-QA§(t);
|
||||
clip.§_-nn§(track);
|
||||
track = animation.name_553(t);
|
||||
clip.name_551(track);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
clip.§_-nn§(node.createStaticTransformTrack());
|
||||
clip.name_551(node.createStaticTransformTrack());
|
||||
}
|
||||
collectAnimation(clip,node.nodes);
|
||||
}
|
||||
@@ -73,14 +73,14 @@ package alternativa.engine3d.loaders
|
||||
this.objects = null;
|
||||
this.hierarchy = null;
|
||||
this.lights = null;
|
||||
this.§_-eL§ = null;
|
||||
this.var_635 = null;
|
||||
this.materials = null;
|
||||
this.§_-W6§ = null;
|
||||
this.var_634 = null;
|
||||
}
|
||||
|
||||
public function getObjectLayer(object:Object3D) : String
|
||||
{
|
||||
return this.§_-W6§[object];
|
||||
return this.var_634[object];
|
||||
}
|
||||
|
||||
private function init(data:XML, units:Number) : DaeDocument
|
||||
@@ -89,9 +89,9 @@ package alternativa.engine3d.loaders
|
||||
this.objects = new Vector.<Object3D>();
|
||||
this.hierarchy = new Vector.<Object3D>();
|
||||
this.lights = new Vector.<Light3D>();
|
||||
this.§_-eL§ = new Vector.<§_-FA§>();
|
||||
this.var_635 = new Vector.<name_550>();
|
||||
this.materials = new Vector.<ParserMaterial>();
|
||||
this.§_-W6§ = new Dictionary(true);
|
||||
this.var_634 = new Dictionary(true);
|
||||
return new DaeDocument(data,units);
|
||||
}
|
||||
|
||||
@@ -129,11 +129,11 @@ package alternativa.engine3d.loaders
|
||||
}
|
||||
if(animatedObject.animation != null)
|
||||
{
|
||||
this.§_-eL§.push(animatedObject.animation);
|
||||
this.var_635.push(animatedObject.animation);
|
||||
}
|
||||
if(Boolean(layer))
|
||||
{
|
||||
this.§_-W6§[object] = layer;
|
||||
this.var_634[object] = layer;
|
||||
}
|
||||
return object;
|
||||
}
|
||||
@@ -421,13 +421,13 @@ package alternativa.engine3d.loaders
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getAnimationByObject(object:Object) : §_-FA§
|
||||
public function getAnimationByObject(object:Object) : name_550
|
||||
{
|
||||
var animation:§_-FA§ = null;
|
||||
var animation:name_550 = null;
|
||||
var objects:Array = null;
|
||||
for each(animation in this.§_-eL§)
|
||||
for each(animation in this.var_635)
|
||||
{
|
||||
objects = animation.alternativa3d::_-Kq;
|
||||
objects = animation.alternativa3d::var_348;
|
||||
if(objects.indexOf(object) >= 0)
|
||||
{
|
||||
return animation;
|
||||
|
||||
@@ -22,11 +22,11 @@ package alternativa.engine3d.loaders
|
||||
|
||||
public var transparency:Number = 0;
|
||||
|
||||
public var §_-3m§:String = "diffuse";
|
||||
public var var_670:String = "diffuse";
|
||||
|
||||
private var textureMaterial:TextureMaterial;
|
||||
|
||||
private var §_-h7§:FillMaterial;
|
||||
private var var_669:FillMaterial;
|
||||
|
||||
public function ParserMaterial()
|
||||
{
|
||||
@@ -51,22 +51,22 @@ package alternativa.engine3d.loaders
|
||||
override alternativa3d function collectDraws(camera:Camera3D, surface:Surface, geometry:Geometry, lights:Vector.<Light3D>, lightsLength:int, objectRenderPriority:int = -1) : void
|
||||
{
|
||||
var map:ExternalTextureResource = null;
|
||||
var colorO:Object = this.colors[this.§_-3m§];
|
||||
var colorO:Object = this.colors[this.var_670];
|
||||
if(colorO != null)
|
||||
{
|
||||
if(this.§_-h7§ == null)
|
||||
if(this.var_669 == null)
|
||||
{
|
||||
this.§_-h7§ = new FillMaterial(int(colorO));
|
||||
this.var_669 = new FillMaterial(int(colorO));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-h7§.color = int(colorO);
|
||||
this.var_669.color = int(colorO);
|
||||
}
|
||||
this.§_-h7§.alternativa3d::collectDraws(camera,surface,geometry,lights,lightsLength,objectRenderPriority);
|
||||
this.var_669.alternativa3d::collectDraws(camera,surface,geometry,lights,lightsLength,objectRenderPriority);
|
||||
}
|
||||
else
|
||||
{
|
||||
map = this.textures[this.§_-3m§];
|
||||
map = this.textures[this.var_670];
|
||||
if(map != null)
|
||||
{
|
||||
if(this.textureMaterial == null)
|
||||
|
||||
@@ -2,8 +2,8 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.alternativa3d;
|
||||
import alternativa.engine3d.animation.keys.NumberKey;
|
||||
import alternativa.engine3d.animation.keys.§_-Np§;
|
||||
import alternativa.engine3d.animation.keys.§_-kB§;
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.keys.name_591;
|
||||
|
||||
use namespace alternativa3d;
|
||||
|
||||
@@ -35,9 +35,9 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public static const PARAM_MATRIX:String = "matrix";
|
||||
|
||||
public var tracks:Vector.<§_-Np§>;
|
||||
public var tracks:Vector.<name_552>;
|
||||
|
||||
public var §_-dS§:String = "undefined";
|
||||
public var name_589:String = "undefined";
|
||||
|
||||
public var animName:String;
|
||||
|
||||
@@ -129,13 +129,13 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(componentName)
|
||||
{
|
||||
case "X":
|
||||
this.§_-dS§ = PARAM_TRANSLATE_X;
|
||||
this.name_589 = PARAM_TRANSLATE_X;
|
||||
break loop1;
|
||||
case "Y":
|
||||
this.§_-dS§ = PARAM_TRANSLATE_Y;
|
||||
this.name_589 = PARAM_TRANSLATE_Y;
|
||||
break loop1;
|
||||
case "Z":
|
||||
this.§_-dS§ = PARAM_TRANSLATE_Z;
|
||||
this.name_589 = PARAM_TRANSLATE_Z;
|
||||
}
|
||||
break;
|
||||
case "rotate":
|
||||
@@ -143,26 +143,26 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(axis.indexOf(1))
|
||||
{
|
||||
case 0:
|
||||
this.§_-dS§ = PARAM_ROTATION_X;
|
||||
this.name_589 = PARAM_ROTATION_X;
|
||||
break loop1;
|
||||
case 1:
|
||||
this.§_-dS§ = PARAM_ROTATION_Y;
|
||||
this.name_589 = PARAM_ROTATION_Y;
|
||||
break loop1;
|
||||
case 2:
|
||||
this.§_-dS§ = PARAM_ROTATION_Z;
|
||||
this.name_589 = PARAM_ROTATION_Z;
|
||||
}
|
||||
break;
|
||||
case "scale":
|
||||
switch(componentName)
|
||||
{
|
||||
case "X":
|
||||
this.§_-dS§ = PARAM_SCALE_X;
|
||||
this.name_589 = PARAM_SCALE_X;
|
||||
break loop1;
|
||||
case "Y":
|
||||
this.§_-dS§ = PARAM_SCALE_Y;
|
||||
this.name_589 = PARAM_SCALE_Y;
|
||||
break loop1;
|
||||
case "Z":
|
||||
this.§_-dS§ = PARAM_SCALE_Z;
|
||||
this.name_589 = PARAM_SCALE_Z;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,55 +171,55 @@ package alternativa.engine3d.loaders.collada
|
||||
switch(transformationName)
|
||||
{
|
||||
case "translate":
|
||||
this.§_-dS§ = PARAM_TRANSLATE;
|
||||
this.name_589 = PARAM_TRANSLATE;
|
||||
break;
|
||||
case "scale":
|
||||
this.§_-dS§ = PARAM_SCALE;
|
||||
this.name_589 = PARAM_SCALE;
|
||||
break;
|
||||
case "matrix":
|
||||
this.§_-dS§ = PARAM_MATRIX;
|
||||
this.name_589 = PARAM_MATRIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function parseSampler() : void
|
||||
{
|
||||
var track:§_-kB§ = null;
|
||||
var track:name_591 = null;
|
||||
var toRad:Number = NaN;
|
||||
var key:NumberKey = null;
|
||||
var sampler:DaeSampler = document.findSampler(data.@source[0]);
|
||||
if(sampler != null)
|
||||
{
|
||||
sampler.parse();
|
||||
if(this.§_-dS§ == PARAM_MATRIX)
|
||||
if(this.name_589 == PARAM_MATRIX)
|
||||
{
|
||||
this.tracks = Vector.<§_-Np§>([sampler.parseTransformationTrack(this.animName)]);
|
||||
this.tracks = Vector.<name_552>([sampler.parseTransformationTrack(this.animName)]);
|
||||
return;
|
||||
}
|
||||
if(this.§_-dS§ == PARAM_TRANSLATE)
|
||||
if(this.name_589 == PARAM_TRANSLATE)
|
||||
{
|
||||
this.tracks = sampler.parsePointsTracks(this.animName,"x","y","z");
|
||||
return;
|
||||
}
|
||||
if(this.§_-dS§ == PARAM_SCALE)
|
||||
if(this.name_589 == PARAM_SCALE)
|
||||
{
|
||||
this.tracks = sampler.parsePointsTracks(this.animName,"scaleX","scaleY","scaleZ");
|
||||
return;
|
||||
}
|
||||
if(this.§_-dS§ == PARAM_ROTATION_X || this.§_-dS§ == PARAM_ROTATION_Y || this.§_-dS§ == PARAM_ROTATION_Z)
|
||||
if(this.name_589 == PARAM_ROTATION_X || this.name_589 == PARAM_ROTATION_Y || this.name_589 == PARAM_ROTATION_Z)
|
||||
{
|
||||
track = sampler.parseNumbersTrack(this.animName,this.§_-dS§);
|
||||
track = sampler.parseNumbersTrack(this.animName,this.name_589);
|
||||
toRad = Math.PI / 180;
|
||||
for(key = track.alternativa3d::_-ku; key != null; key = key.alternativa3d::next)
|
||||
for(key = track.alternativa3d::name_599; key != null; key = key.alternativa3d::next)
|
||||
{
|
||||
key.alternativa3d::_-4O *= toRad;
|
||||
key.alternativa3d::name_598 *= toRad;
|
||||
}
|
||||
this.tracks = Vector.<§_-Np§>([track]);
|
||||
this.tracks = Vector.<name_552>([track]);
|
||||
return;
|
||||
}
|
||||
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)
|
||||
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)
|
||||
{
|
||||
this.tracks = Vector.<§_-Np§>([sampler.parseNumbersTrack(this.animName,this.§_-dS§)]);
|
||||
this.tracks = Vector.<name_552>([sampler.parseNumbersTrack(this.animName,this.name_589)]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.*;
|
||||
import alternativa.engine3d.animation.§_-FA§;
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
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 §_-A6§:Vector.<Vector.<Number>>;
|
||||
private var var_725:Vector.<Vector.<Number>>;
|
||||
|
||||
private var §_-2j§:Array;
|
||||
private var var_724:Array;
|
||||
|
||||
private var indices:Array;
|
||||
|
||||
private var §_-4h§:DaeInput;
|
||||
private var var_727:DaeInput;
|
||||
|
||||
private var §_-NK§:DaeInput;
|
||||
private var var_726:DaeInput;
|
||||
|
||||
private var §_-5O§:int;
|
||||
private var var_728:int;
|
||||
|
||||
private var geometry:Geometry;
|
||||
|
||||
private var primitives:Vector.<DaePrimitive>;
|
||||
|
||||
private var §_-1U§:int = 0;
|
||||
private var var_723:int = 0;
|
||||
|
||||
private var §_-I§:Vector.<Number>;
|
||||
private var var_722:Vector.<Number>;
|
||||
|
||||
public function DaeController(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.§_-2j§ = parseIntsArray(vcountsXML);
|
||||
this.var_724 = 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.§_-2j§.length; )
|
||||
for(i = 0; i < this.var_724.length; )
|
||||
{
|
||||
count = int(this.§_-2j§[i]);
|
||||
if(this.§_-1U§ < count)
|
||||
count = int(this.var_724[i]);
|
||||
if(this.var_723 < count)
|
||||
{
|
||||
this.§_-1U§ = count;
|
||||
this.var_723 = count;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
var geom:DaeGeometry = this.daeGeometry;
|
||||
this.§_-I§ = this.getBindShapeMatrix();
|
||||
this.var_722 = this.getBindShapeMatrix();
|
||||
if(geom != null)
|
||||
{
|
||||
geom.parse();
|
||||
vertices = geom.§_-FV§;
|
||||
vertices = geom.var_715;
|
||||
source = geom.geometry;
|
||||
localMaxJointsPerVertex = this.§_-1U§ % 2 != 0 ? this.§_-1U§ + 1 : this.§_-1U§;
|
||||
localMaxJointsPerVertex = this.var_723 % 2 != 0 ? this.var_723 + 1 : this.var_723;
|
||||
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.§_-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]);
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.§_-4h§.offset;
|
||||
var weightsOffset:int = this.§_-NK§.offset;
|
||||
var weightsSource:DaeSource = this.§_-NK§.prepareSource(1);
|
||||
var jointsOffset:int = this.var_727.offset;
|
||||
var weightsOffset:int = this.var_726.offset;
|
||||
var weightsSource:DaeSource = this.var_726.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.§_-Eq§];
|
||||
vec = verticesDict[vertex.name_600];
|
||||
if(vec == null)
|
||||
{
|
||||
vec = verticesDict[vertex.§_-Eq§] = new Vector.<uint>();
|
||||
vec = verticesDict[vertex.name_600] = new Vector.<uint>();
|
||||
}
|
||||
vec.push(vertex.§_-AR§);
|
||||
vec.push(vertex.name_601);
|
||||
}
|
||||
}
|
||||
var vertexIndex:int = 0;
|
||||
for(i = 0,count = int(this.§_-2j§.length); i < count; i++)
|
||||
for(i = 0,count = int(this.var_724.length); i < count; i++)
|
||||
{
|
||||
jointsPerVertex = int(this.§_-2j§[i]);
|
||||
jointsPerVertex = int(this.var_724[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.§_-5O§ * (vertexIndex + k);
|
||||
index = this.var_728 * (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.§_-4h§ == null)
|
||||
if(this.var_727 == null)
|
||||
{
|
||||
this.§_-4h§ = input;
|
||||
this.var_727 = input;
|
||||
}
|
||||
break;
|
||||
case "WEIGHT":
|
||||
if(this.§_-NK§ == null)
|
||||
if(this.var_726 == null)
|
||||
{
|
||||
this.§_-NK§ = input;
|
||||
this.var_726 = input;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.§_-5O§ = maxInputOffset + 1;
|
||||
this.var_728 = maxInputOffset + 1;
|
||||
}
|
||||
|
||||
private function parseJointsBindMatrices() : void
|
||||
@@ -290,12 +290,12 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
stride = jointsSource.stride;
|
||||
count = jointsSource.numbers.length / stride;
|
||||
this.§_-A6§ = new Vector.<Vector.<Number>>(count);
|
||||
this.var_725 = new Vector.<Vector.<Number>>(count);
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = stride * i;
|
||||
matrix = new Vector.<Number>(16);
|
||||
this.§_-A6§[i] = matrix;
|
||||
this.var_725[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.§_-I§ = this.getBindShapeMatrix();
|
||||
numJoints = int(this.§_-A6§.length);
|
||||
skin = new Skin(this.§_-1U§,numJoints);
|
||||
this.var_722 = this.getBindShapeMatrix();
|
||||
numJoints = int(this.var_725.length);
|
||||
skin = new Skin(this.var_723,numJoints);
|
||||
skin.geometry = this.geometry;
|
||||
joints = this.addJointsToSkin(skin,topmostJoints,this.findNodes(skeletons));
|
||||
this.setJointsBindMatrices(joints);
|
||||
skin.§_-WA§ = this.collectRenderedJoints(joints,numJoints);
|
||||
skin.var_633 = 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>) : §_-FA§
|
||||
private function mergeJointsClips(skin:Skin, joints:Vector.<DaeObject>) : name_550
|
||||
{
|
||||
var animatedObject:DaeObject = null;
|
||||
var clip:§_-FA§ = null;
|
||||
var clip:name_550 = null;
|
||||
var object:Object3D = null;
|
||||
var t:int = 0;
|
||||
if(!this.hasJointsAnimation(joints))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var result:§_-FA§ = new §_-FA§();
|
||||
var result:name_550 = new name_550();
|
||||
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.§_-nn§(clip.§_-QA§(t));
|
||||
result.name_551(clip.name_553(t));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.§_-nn§(animatedObject.jointNode.createStaticTransformTrack());
|
||||
result.name_551(animatedObject.jointNode.createStaticTransformTrack());
|
||||
}
|
||||
object = animatedObject.object;
|
||||
object.name = animatedObject.jointNode.animName;
|
||||
resultObjects.push(object);
|
||||
}
|
||||
result.alternativa3d::_-Kq = resultObjects;
|
||||
result.alternativa3d::var_348 = 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.§_-A6§.length); i < count; i++)
|
||||
for(var i:int = 0,var count:int = int(this.var_725.length); i < count; i++)
|
||||
{
|
||||
animatedJoint = animatedJoints[i];
|
||||
bindMatrix = this.§_-A6§[i];
|
||||
bindMatrix = this.var_725[i];
|
||||
Joint(animatedJoint.object).alternativa3d::setBindPoseMatrix(bindMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
private var data:XML;
|
||||
|
||||
internal var §_-DR§:Object;
|
||||
internal var var_690:Object;
|
||||
|
||||
internal var arrays:Object;
|
||||
|
||||
@@ -24,9 +24,9 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
internal var effects:Object;
|
||||
|
||||
internal var §_-DW§:Object;
|
||||
internal var var_691:Object;
|
||||
|
||||
internal var §_-GB§:Object;
|
||||
internal var var_692: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.§_-DR§ = new Object();
|
||||
this.var_690 = new Object();
|
||||
this.arrays = new Object();
|
||||
for each(element in this.data..source)
|
||||
{
|
||||
source = new DaeSource(element,this);
|
||||
if(source.id != null)
|
||||
{
|
||||
this.§_-DR§[source.id] = source;
|
||||
this.var_690[source.id] = source;
|
||||
}
|
||||
}
|
||||
this.lights = new Object();
|
||||
@@ -139,13 +139,13 @@ package alternativa.engine3d.loaders.collada
|
||||
this.geometries[geom.id] = geom;
|
||||
}
|
||||
}
|
||||
this.§_-DW§ = new Object();
|
||||
this.var_691 = new Object();
|
||||
for each(element in this.data.library_controllers.controller)
|
||||
{
|
||||
controller = new DaeController(element,this);
|
||||
if(controller.id != null)
|
||||
{
|
||||
this.§_-DW§[controller.id] = controller;
|
||||
this.var_691[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.§_-GB§ = new Object();
|
||||
this.var_692 = new Object();
|
||||
for each(element in this.data.library_animations..sampler)
|
||||
{
|
||||
sampler = new DaeSampler(element,this);
|
||||
if(sampler.id != null)
|
||||
{
|
||||
this.§_-GB§[sampler.id] = sampler;
|
||||
this.var_692[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.§_-DR§[this.getLocalID(url)];
|
||||
return this.var_690[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.§_-DW§[this.getLocalID(url)];
|
||||
return this.var_691[this.getLocalID(url)];
|
||||
}
|
||||
|
||||
public function findSampler(url:XML) : DaeSampler
|
||||
{
|
||||
return this.§_-GB§[this.getLocalID(url)];
|
||||
return this.var_692[this.getLocalID(url)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
public static var commonAlways:Boolean = false;
|
||||
|
||||
private var §_-3x§:Object;
|
||||
private var var_717:Object;
|
||||
|
||||
private var §_-El§:Object;
|
||||
private var var_718:Object;
|
||||
|
||||
private var §_-3H§:Object;
|
||||
private var var_716: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.§_-3x§ = new Object();
|
||||
this.var_717 = new Object();
|
||||
for each(element in data.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.§_-3x§[param.sid] = param;
|
||||
this.var_717[param.sid] = param;
|
||||
}
|
||||
this.§_-El§ = new Object();
|
||||
this.var_718 = new Object();
|
||||
for each(element in data.profile_COMMON.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.§_-El§[param.sid] = param;
|
||||
this.var_718[param.sid] = param;
|
||||
}
|
||||
this.§_-3H§ = new Object();
|
||||
this.var_716 = new Object();
|
||||
technique = data.profile_COMMON.technique[0];
|
||||
if(technique != null)
|
||||
{
|
||||
for each(element in technique.newparam)
|
||||
{
|
||||
param = new DaeParam(element,document);
|
||||
this.§_-3H§[param.sid] = param;
|
||||
this.var_716[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.§_-3H§[name];
|
||||
param = this.var_716[name];
|
||||
if(param != null)
|
||||
{
|
||||
return param;
|
||||
}
|
||||
param = this.§_-El§[name];
|
||||
param = this.var_718[name];
|
||||
if(param != null)
|
||||
{
|
||||
return param;
|
||||
}
|
||||
return this.§_-3x§[name];
|
||||
return this.var_717[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 §_-Ba§:int = -1;
|
||||
private var var_697:int = -1;
|
||||
|
||||
public function DaeElement(data:XML, document:DaeDocument)
|
||||
{
|
||||
@@ -35,12 +35,12 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function parse() : Boolean
|
||||
{
|
||||
if(this.§_-Ba§ < 0)
|
||||
if(this.var_697 < 0)
|
||||
{
|
||||
this.§_-Ba§ = this.parseImplementation() ? 1 : 0;
|
||||
return this.§_-Ba§ != 0;
|
||||
this.var_697 = this.parseImplementation() ? 1 : 0;
|
||||
return this.var_697 != 0;
|
||||
}
|
||||
return this.§_-Ba§ != 0;
|
||||
return this.var_697 != 0;
|
||||
}
|
||||
|
||||
protected function parseImplementation() : Boolean
|
||||
|
||||
@@ -13,7 +13,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeGeometry extends DaeElement
|
||||
{
|
||||
internal var §_-FV§:Vector.<DaeVertex>;
|
||||
internal var var_715:Vector.<DaeVertex>;
|
||||
|
||||
internal var primitives:Vector.<DaePrimitive>;
|
||||
|
||||
@@ -53,9 +53,9 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
this.parsePrimitives();
|
||||
this.vertices.parse();
|
||||
numVertices = this.vertices.§_-E6§.numbers.length / this.vertices.§_-E6§.stride;
|
||||
numVertices = this.vertices.name_597.numbers.length / this.vertices.name_597.stride;
|
||||
this.geometry = new Geometry();
|
||||
this.§_-FV§ = new Vector.<DaeVertex>(numVertices);
|
||||
this.var_715 = 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.§_-FV§.length);
|
||||
channels |= p.fillGeometry(this.geometry,this.§_-FV§);
|
||||
numVertices = int(this.var_715.length);
|
||||
channels |= p.fillGeometry(this.geometry,this.var_715);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -105,14 +105,14 @@ package alternativa.engine3d.loaders.collada
|
||||
i++;
|
||||
}
|
||||
this.geometry.addVertexStream(attributes);
|
||||
numVertices = int(this.§_-FV§.length);
|
||||
numVertices = int(this.var_715.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.§_-FV§[i];
|
||||
vertex = this.var_715[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.§_-hC§ != null)
|
||||
if(vertex.name_596 != null)
|
||||
{
|
||||
data.writeFloat(vertex.§_-hC§.x);
|
||||
data.writeFloat(vertex.§_-hC§.y);
|
||||
data.writeFloat(vertex.§_-hC§.z);
|
||||
data.writeFloat(vertex.§_-hC§.w);
|
||||
data.writeFloat(vertex.name_596.x);
|
||||
data.writeFloat(vertex.name_596.y);
|
||||
data.writeFloat(vertex.name_596.z);
|
||||
data.writeFloat(vertex.name_596.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.@set[0];
|
||||
var attr:XML = data.@name_616[0];
|
||||
return attr == null ? 0 : int(parseInt(attr.toString(),10));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.§_-FA§;
|
||||
import alternativa.engine3d.animation.keys.§_-Np§;
|
||||
import alternativa.engine3d.animation.keys.§_-ew§;
|
||||
import alternativa.engine3d.animation.keys.§_-kB§;
|
||||
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.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 §_-DE§:Vector.<DaeInstanceController>;
|
||||
private var var_698:Vector.<DaeInstanceController>;
|
||||
|
||||
public var nodes:Vector.<DaeNode>;
|
||||
|
||||
@@ -112,11 +112,11 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public function addInstanceController(controller:DaeInstanceController) : void
|
||||
{
|
||||
if(this.§_-DE§ == null)
|
||||
if(this.var_698 == null)
|
||||
{
|
||||
this.§_-DE§ = new Vector.<DaeInstanceController>();
|
||||
this.var_698 = new Vector.<DaeInstanceController>();
|
||||
}
|
||||
this.§_-DE§.push(controller);
|
||||
this.var_698.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.§_-DE§ == null)
|
||||
if(this.var_698 == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var skins:Vector.<DaeObject> = new Vector.<DaeObject>();
|
||||
for(var i:int = 0,var count:int = int(this.§_-DE§.length); i < count; )
|
||||
for(var i:int = 0,var count:int = int(this.var_698.length); i < count; )
|
||||
{
|
||||
instanceController = this.§_-DE§[i];
|
||||
instanceController = this.var_698[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:§_-FA§ = this.parseAnimation(object);
|
||||
var animation:name_550 = this.parseAnimation(object);
|
||||
if(animation == null)
|
||||
{
|
||||
return new DaeObject(object);
|
||||
}
|
||||
object.name = this.animName;
|
||||
animation.§_-L6§(object,false);
|
||||
animation.method_360(object,false);
|
||||
return new DaeObject(object,animation);
|
||||
}
|
||||
|
||||
public function parseAnimation(object:Object3D = null) : §_-FA§
|
||||
public function parseAnimation(object:Object3D = null) : name_550
|
||||
{
|
||||
if(this.channels == null || !this.hasTransformationAnimation())
|
||||
{
|
||||
@@ -366,7 +366,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
return this.createClip(channel.tracks);
|
||||
}
|
||||
var clip:§_-FA§ = new §_-FA§();
|
||||
var clip:name_550 = new name_550();
|
||||
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.§_-nn§(this.createValueStaticTrack("x",object == null ? Number(components[0].x) : object.x));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("y",object == null ? Number(components[0].y) : object.y));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("z",object == null ? Number(components[0].z) : object.z));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("rotationX",object == null ? Number(components[1].x) : object.rotationX));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("rotationY",object == null ? Number(components[1].y) : object.rotationY));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("rotationZ",object == null ? Number(components[1].z) : object.rotationZ));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("scaleX",object == null ? Number(components[2].x) : object.scaleX));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("scaleY",object == null ? Number(components[2].y) : object.scaleY));
|
||||
clip.name_551(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.§_-nn§(this.createValueStaticTrack("scaleZ",object == null ? Number(components[2].z) : object.scaleZ));
|
||||
clip.name_551(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.<§_-Np§>) : §_-FA§
|
||||
private function createClip(tracks:Vector.<name_552>) : name_550
|
||||
{
|
||||
var clip:§_-FA§ = new §_-FA§();
|
||||
var clip:name_550 = new name_550();
|
||||
for(var i:int = 0,var count:int = int(tracks.length); i < count; i++)
|
||||
{
|
||||
clip.§_-nn§(tracks[i]);
|
||||
clip.name_551(tracks[i]);
|
||||
}
|
||||
return clip;
|
||||
}
|
||||
|
||||
private function addTracksToClip(clip:§_-FA§, tracks:Vector.<§_-Np§>) : void
|
||||
private function addTracksToClip(clip:name_550, tracks:Vector.<name_552>) : void
|
||||
{
|
||||
for(var i:int = 0,var count:int = int(tracks.length); i < count; i++)
|
||||
{
|
||||
clip.§_-nn§(tracks[i]);
|
||||
clip.name_551(tracks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,18 +498,18 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
channel = this.channels[i];
|
||||
channel.parse();
|
||||
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;
|
||||
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;
|
||||
if(result)
|
||||
{
|
||||
return true;
|
||||
@@ -526,7 +526,7 @@ package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
channel = this.channels[i];
|
||||
channel.parse();
|
||||
if(channel.§_-dS§ == param)
|
||||
if(channel.name_589 == param)
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ package alternativa.engine3d.loaders.collada
|
||||
return null;
|
||||
}
|
||||
|
||||
private function concatTracks(source:Vector.<§_-Np§>, dest:Vector.<§_-Np§>) : void
|
||||
private function concatTracks(source:Vector.<name_552>, dest:Vector.<name_552>) : 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) : §_-Np§
|
||||
private function createValueStaticTrack(property:String, value:Number) : name_552
|
||||
{
|
||||
var track:§_-kB§ = new §_-kB§(this.animName,property);
|
||||
var track:name_591 = new name_591(this.animName,property);
|
||||
track.addKey(0,value);
|
||||
return track;
|
||||
}
|
||||
|
||||
public function createStaticTransformTrack() : §_-ew§
|
||||
public function createStaticTransformTrack() : name_590
|
||||
{
|
||||
var track:§_-ew§ = new §_-ew§(this.animName);
|
||||
var track:name_590 = new name_590(this.animName);
|
||||
track.addKey(0,this.getMatrix());
|
||||
return track;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.§_-FA§;
|
||||
import alternativa.engine3d.animation.name_550;
|
||||
import alternativa.engine3d.core.Object3D;
|
||||
|
||||
public class DaeObject
|
||||
{
|
||||
public var object:Object3D;
|
||||
|
||||
public var animation:§_-FA§;
|
||||
public var animation:name_550;
|
||||
|
||||
public var jointNode:DaeNode;
|
||||
|
||||
public function DaeObject(object:Object3D, animation:§_-FA§ = null)
|
||||
public function DaeObject(object:Object3D, animation:name_550 = null)
|
||||
{
|
||||
super();
|
||||
this.object = object;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package alternativa.engine3d.loaders.collada
|
||||
{
|
||||
import alternativa.engine3d.animation.keys.§_-Np§;
|
||||
import alternativa.engine3d.animation.keys.§_-ew§;
|
||||
import alternativa.engine3d.animation.keys.§_-kB§;
|
||||
import alternativa.engine3d.animation.keys.name_552;
|
||||
import alternativa.engine3d.animation.keys.name_590;
|
||||
import alternativa.engine3d.animation.keys.name_591;
|
||||
import flash.geom.Matrix3D;
|
||||
|
||||
use namespace collada;
|
||||
|
||||
public class DaeSampler extends DaeElement
|
||||
{
|
||||
private var §_-G6§:Vector.<Number>;
|
||||
private var var_719:Vector.<Number>;
|
||||
|
||||
private var values:Vector.<Number>;
|
||||
|
||||
private var §_-JC§:int;
|
||||
private var var_720:int;
|
||||
|
||||
private var §_-7i§:int;
|
||||
private var var_721: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.§_-G6§ = inputSource.numbers;
|
||||
this.§_-JC§ = inputSource.stride;
|
||||
this.var_719 = inputSource.numbers;
|
||||
this.var_720 = inputSource.stride;
|
||||
}
|
||||
break;
|
||||
case "OUTPUT":
|
||||
@@ -52,7 +52,7 @@ package alternativa.engine3d.loaders.collada
|
||||
if(outputSource != null)
|
||||
{
|
||||
this.values = outputSource.numbers;
|
||||
this.§_-7i§ = outputSource.stride;
|
||||
this.var_721 = outputSource.stride;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -60,73 +60,73 @@ package alternativa.engine3d.loaders.collada
|
||||
return true;
|
||||
}
|
||||
|
||||
public function parseNumbersTrack(objectName:String, property:String) : §_-kB§
|
||||
public function parseNumbersTrack(objectName:String, property:String) : name_591
|
||||
{
|
||||
var track:§_-kB§ = null;
|
||||
var track:name_591 = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ > 0)
|
||||
if(this.var_719 != null && this.values != null && this.var_720 > 0)
|
||||
{
|
||||
track = new §_-kB§(objectName,property);
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
track = new name_591(objectName,property);
|
||||
count = this.var_719.length / this.var_720;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
track.addKey(this.§_-G6§[int(this.§_-JC§ * i)],this.values[int(this.§_-7i§ * i)]);
|
||||
track.addKey(this.var_719[int(this.var_720 * i)],this.values[int(this.var_721 * i)]);
|
||||
}
|
||||
return track;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function parseTransformationTrack(objectName:String) : §_-Np§
|
||||
public function parseTransformationTrack(objectName:String) : name_552
|
||||
{
|
||||
var track:§_-ew§ = null;
|
||||
var track:name_590 = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
var index:int = 0;
|
||||
var matrix:Matrix3D = null;
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ != 0)
|
||||
if(this.var_719 != null && this.values != null && this.var_720 != 0)
|
||||
{
|
||||
track = new §_-ew§(objectName);
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
track = new name_590(objectName);
|
||||
count = this.var_719.length / this.var_720;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = this.§_-7i§ * i;
|
||||
index = this.var_721 * 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.§_-G6§[i * this.§_-JC§],matrix);
|
||||
track.addKey(this.var_719[i * this.var_720],matrix);
|
||||
}
|
||||
return track;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function parsePointsTracks(objectName:String, xProperty:String, yProperty:String, zProperty:String) : Vector.<§_-Np§>
|
||||
public function parsePointsTracks(objectName:String, xProperty:String, yProperty:String, zProperty:String) : Vector.<name_552>
|
||||
{
|
||||
var xTrack:§_-kB§ = null;
|
||||
var yTrack:§_-kB§ = null;
|
||||
var zTrack:§_-kB§ = null;
|
||||
var xTrack:name_591 = null;
|
||||
var yTrack:name_591 = null;
|
||||
var zTrack:name_591 = null;
|
||||
var count:int = 0;
|
||||
var i:int = 0;
|
||||
var index:int = 0;
|
||||
var time:Number = NaN;
|
||||
if(this.§_-G6§ != null && this.values != null && this.§_-JC§ != 0)
|
||||
if(this.var_719 != null && this.values != null && this.var_720 != 0)
|
||||
{
|
||||
xTrack = new §_-kB§(objectName,xProperty);
|
||||
xTrack = new name_591(objectName,xProperty);
|
||||
xTrack.object = objectName;
|
||||
yTrack = new §_-kB§(objectName,yProperty);
|
||||
yTrack = new name_591(objectName,yProperty);
|
||||
yTrack.object = objectName;
|
||||
zTrack = new §_-kB§(objectName,zProperty);
|
||||
zTrack = new name_591(objectName,zProperty);
|
||||
zTrack.object = objectName;
|
||||
count = this.§_-G6§.length / this.§_-JC§;
|
||||
count = this.var_719.length / this.var_720;
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
index = i * this.§_-7i§;
|
||||
time = this.§_-G6§[i * this.§_-JC§];
|
||||
index = i * this.var_721;
|
||||
time = this.var_719[i * this.var_720];
|
||||
xTrack.addKey(time,this.values[index]);
|
||||
yTrack.addKey(time,this.values[index + 1]);
|
||||
zTrack.addKey(time,this.values[index + 2]);
|
||||
}
|
||||
return Vector.<§_-Np§>([xTrack,yTrack,zTrack]);
|
||||
return Vector.<name_552>([xTrack,yTrack,zTrack]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public class DaeSource extends DaeElement
|
||||
{
|
||||
private const §_-XM§:String = "float_array";
|
||||
private const const_7:String = "float_array";
|
||||
|
||||
private const §_-g6§:String = "int_array";
|
||||
private const const_9:String = "int_array";
|
||||
|
||||
private const §_-ZJ§:String = "Name_array";
|
||||
private const const_8:String = "Name_array";
|
||||
|
||||
public var numbers:Vector.<Number>;
|
||||
|
||||
public var §_-op§:Vector.<int>;
|
||||
public var var_550:Vector.<int>;
|
||||
|
||||
public var names:Vector.<String>;
|
||||
|
||||
@@ -34,9 +34,9 @@ package alternativa.engine3d.loaders.collada
|
||||
child = children[i];
|
||||
switch(child.localName())
|
||||
{
|
||||
case this.§_-XM§:
|
||||
case this.§_-g6§:
|
||||
case this.§_-ZJ§:
|
||||
case this.const_7:
|
||||
case this.const_9:
|
||||
case this.const_8:
|
||||
_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.§_-XM§:
|
||||
case this.const_7:
|
||||
this.numbers = new Vector.<Number>(int(arrStride * count));
|
||||
break;
|
||||
case this.§_-g6§:
|
||||
this.§_-op§ = new Vector.<int>(int(arrStride * count));
|
||||
case this.const_9:
|
||||
this.var_550 = new Vector.<int>(int(arrStride * count));
|
||||
break;
|
||||
case this.§_-ZJ§:
|
||||
case this.const_8:
|
||||
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.§_-XM§:
|
||||
case this.const_7:
|
||||
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.§_-g6§:
|
||||
case this.const_9:
|
||||
for(j = 0; j < count; j++)
|
||||
{
|
||||
this.§_-op§[int(arrStride * j + curr)] = parseInt(array[int(offset + stride * j + i)],10);
|
||||
this.var_550[int(arrStride * j + curr)] = parseInt(array[int(offset + stride * j + i)],10);
|
||||
}
|
||||
break;
|
||||
case this.§_-ZJ§:
|
||||
case this.const_8:
|
||||
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 §_-Eq§:int;
|
||||
public var name_600:int;
|
||||
|
||||
public var §_-AR§:int;
|
||||
public var name_601:int;
|
||||
|
||||
public var indices:Vector.<int> = new Vector.<int>();
|
||||
|
||||
@@ -20,7 +20,7 @@ package alternativa.engine3d.loaders.collada
|
||||
|
||||
public var normal:Vector3D;
|
||||
|
||||
public var §_-hC§:Vector3D;
|
||||
public var name_596: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.§_-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;
|
||||
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;
|
||||
var dot:Number = crossX * biNormalX + crossY * biNormalY + crossZ * biNormalZ;
|
||||
this.§_-hC§.w = dot < 0 ? -1 : 1;
|
||||
this.name_596.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 §_-E6§:DaeSource;
|
||||
public var name_597: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.§_-E6§ = new DaeInput(inputXML,document).prepareSource(3);
|
||||
if(this.§_-E6§ != null)
|
||||
this.name_597 = new DaeInput(inputXML,document).prepareSource(3);
|
||||
if(this.name_597 != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ package alternativa.engine3d.materials
|
||||
this.blue = (value & 0xFF) / 255;
|
||||
}
|
||||
|
||||
private function final(object:Object3D) : ShaderProgram
|
||||
private function method_22(object:Object3D) : ShaderProgram
|
||||
{
|
||||
var vertexLinker:Linker = new Linker(Context3DProgramType.VERTEX);
|
||||
var positionVar:String = "aPosition";
|
||||
@@ -81,11 +81,11 @@ package alternativa.engine3d.materials
|
||||
var program:ShaderProgram = _programs[object.alternativa3d::transformProcedure];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.final(object);
|
||||
program = this.method_22(object);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
_programs[object.alternativa3d::transformProcedure] = program;
|
||||
}
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::_-EM,surface.indexBegin,surface.numTriangles,program);
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::name_78,surface.indexBegin,surface.numTriangles,program);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aPosition"),positionBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.POSITION],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.POSITION]);
|
||||
object.alternativa3d::setTransformConstants(drawUnit,surface,program.vertexShader,camera);
|
||||
drawUnit.alternativa3d::setProjectionConstants(camera,program.vertexShader.getVariableIndex("cProjMatrix"),object.alternativa3d::localToCameraTransform);
|
||||
|
||||
@@ -84,7 +84,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
private static const outputWithAdvancedFogProcedure:Procedure = new Procedure(["#v0=vZDistance","#c0=cFogConsts","#c1=cFogRange","#s0=sFogTexture","min t0.xy, v0.xy, c1.xy","max t0.xy, t0.xy, c1.zw","mul i0.xyz, i0.xyz, t0.y","mov t1.xyzw, c0.yyzw","div t0.z, v0.z, v0.w","mul t0.z, t0.z, c0.x","add t1.x, t1.x, t0.z","tex t1, t1, s0 <2d, repeat, linear, miplinear>","mul t0.xyz, t1.xyz, t0.x","add i0.xyz, i0.xyz, t0.xyz","mov o0, i0"],"outputWithAdvancedFog");
|
||||
|
||||
alternativa3d var §_-ES§:Boolean = false;
|
||||
alternativa3d var var_54:Boolean = false;
|
||||
|
||||
alternativa3d var outputAlpha:Procedure = new Procedure(["#c0=cSurface","mov i0.w, c0.w","mov o0, i0"],"outputAlpha");
|
||||
|
||||
@@ -94,7 +94,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
public var normalMap:TextureResource;
|
||||
|
||||
private var §_-NH§:int = 0;
|
||||
private var var_53:int = 0;
|
||||
|
||||
public var specularMap:TextureResource;
|
||||
|
||||
@@ -102,7 +102,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
public var glossiness:Number = 100;
|
||||
|
||||
public var §_-kj§:Number = 1;
|
||||
public var var_26:Number = 1;
|
||||
|
||||
public function StandardMaterial(diffuseMap:TextureResource, normalMap:TextureResource, specularMap:TextureResource = null, glossinessMap:TextureResource = null, opacityMap:TextureResource = null)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
public function get normalMapSpace() : int
|
||||
{
|
||||
return this.§_-NH§;
|
||||
return this.var_53;
|
||||
}
|
||||
|
||||
public function set normalMapSpace(value:int) : void
|
||||
@@ -130,7 +130,7 @@ package alternativa.engine3d.materials
|
||||
{
|
||||
throw new ArgumentError("Value must be a constant from the NormalMapSpace class");
|
||||
}
|
||||
this.§_-NH§ = value;
|
||||
this.var_53 = value;
|
||||
}
|
||||
|
||||
alternativa3d function getPassUVProcedure() : Procedure
|
||||
@@ -142,7 +142,7 @@ package alternativa.engine3d.materials
|
||||
{
|
||||
}
|
||||
|
||||
private function final(object:Object3D, lights:Vector.<Light3D>, directional:DirectionalLight, lightsLength:int) : ShaderProgram
|
||||
private function method_22(object:Object3D, lights:Vector.<Light3D>, directional:DirectionalLight, lightsLength:int) : ShaderProgram
|
||||
{
|
||||
var i:int = 0;
|
||||
var outputProcedure:Procedure = null;
|
||||
@@ -204,9 +204,9 @@ package alternativa.engine3d.materials
|
||||
vertexLinker.addProcedure(_passVaryingsProcedure);
|
||||
vertexLinker.setInputParams(_passVaryingsProcedure,positionVar);
|
||||
fragmentLinker.declareVariable("tViewVector");
|
||||
if(this.§_-NH§ == NormalMapSpace.TANGENT_RIGHT_HANDED || this.§_-NH§ == NormalMapSpace.TANGENT_LEFT_HANDED)
|
||||
if(this.var_53 == NormalMapSpace.TANGENT_RIGHT_HANDED || this.var_53 == NormalMapSpace.TANGENT_LEFT_HANDED)
|
||||
{
|
||||
nrmProcedure = this.§_-NH§ == NormalMapSpace.TANGENT_RIGHT_HANDED ? _passTBNRightProcedure : _passTBNLeftProcedure;
|
||||
nrmProcedure = this.var_53 == NormalMapSpace.TANGENT_RIGHT_HANDED ? _passTBNRightProcedure : _passTBNLeftProcedure;
|
||||
vertexLinker.addProcedure(nrmProcedure);
|
||||
vertexLinker.setInputParams(nrmProcedure,tangentVar,normalVar);
|
||||
fragmentLinker.addProcedure(_getNormalAndViewTangentProcedure);
|
||||
@@ -250,12 +250,12 @@ package alternativa.engine3d.materials
|
||||
}
|
||||
else if(light is OmniLight)
|
||||
{
|
||||
lightFragmentProcedure.compileFromArray(["#c0=c" + light.alternativa3d::_-oG + "Position","#c1=c" + light.alternativa3d::_-oG + "Color","#c2=c" + light.alternativa3d::_-oG + "Radius","#v0=vPosition","sub t0, c0, v0","dp3 t0.w, t0.xyz, t0.xyz","nrm t0.xyz, t0.xyz","add t1.xyz, i1.xyz, t0.xyz","mov t1.w, c0.w","nrm t1.xyz, t1.xyz","dp3 t1.w, t1.xyz, i0.xyz","pow t1.w, t1.w, o1.w","sqt t1.x, t0.w","dp3 t0.w, t0.xyz, i0.xyz","sub t0.x, t1.x, c2.z","div t0.y, t0.x, c2.y","sub t0.x, c2.x, t0.y","sat t0.xw, t0.xw","mul t0.xyz, c1.xyz, t0.xxx","mul t1.xyz, t0.xyz, t1.w","add o1.xyz, o1.xyz, t1.xyz","mul t0.xyz, t0.xyz, t0.www","add o0.xyz, o0.xyz, t0.xyz"]);
|
||||
lightFragmentProcedure.compileFromArray(["#c0=c" + light.alternativa3d::name_79 + "Position","#c1=c" + light.alternativa3d::name_79 + "Color","#c2=c" + light.alternativa3d::name_79 + "Radius","#v0=vPosition","sub t0, c0, v0","dp3 t0.w, t0.xyz, t0.xyz","nrm t0.xyz, t0.xyz","add t1.xyz, i1.xyz, t0.xyz","mov t1.w, c0.w","nrm t1.xyz, t1.xyz","dp3 t1.w, t1.xyz, i0.xyz","pow t1.w, t1.w, o1.w","sqt t1.x, t0.w","dp3 t0.w, t0.xyz, i0.xyz","sub t0.x, t1.x, c2.z","div t0.y, t0.x, c2.y","sub t0.x, c2.x, t0.y","sat t0.xw, t0.xw","mul t0.xyz, c1.xyz, t0.xxx","mul t1.xyz, t0.xyz, t1.w","add o1.xyz, o1.xyz, t1.xyz","mul t0.xyz, t0.xyz, t0.www","add o0.xyz, o0.xyz, t0.xyz"]);
|
||||
lightFragmentProcedure.name += "Omni";
|
||||
}
|
||||
else if(light is SpotLight)
|
||||
{
|
||||
lightFragmentProcedure.compileFromArray(["#c0=c" + light.alternativa3d::_-oG + "Position","#c1=c" + light.alternativa3d::_-oG + "Color","#c2=c" + light.alternativa3d::_-oG + "Radius","#c3=c" + light.alternativa3d::_-oG + "Axis","#v0=vPosition","sub t0, c0, v0","dp3 t0.w, t0, t0","nrm t0.xyz,t0.xyz","add t2.xyz, i1.xyz, t0.xyz","nrm t2.xyz, t2.xyz","dp3 t2.x, t2.xyz, i0.xyz","pow t2.x, t2.x, o1.w","dp3 t1.x, t0.xyz, c3.xyz","dp3 t0.x, t0, i0.xyz","sqt t0.w, t0.w","sub t0.w, t0.w, c2.y","div t0.y, t0.w, c2.x","sub t0.w, c0.w, t0.y","sub t0.y, t1.x, c2.w","div t0.y, t0.y, c2.z","sat t0.xyw,t0.xyw","mul t1.xyz,c1.xyz,t0.yyy","mul t1.xyz,t1.xyz,t0.www","mul t2.xyz, t2.x, t1.xyz","add o1.xyz, o1.xyz, t2.xyz","mul t1.xyz, t1.xyz, t0.xxx","add o0.xyz, o0.xyz, t1.xyz"]);
|
||||
lightFragmentProcedure.compileFromArray(["#c0=c" + light.alternativa3d::name_79 + "Position","#c1=c" + light.alternativa3d::name_79 + "Color","#c2=c" + light.alternativa3d::name_79 + "Radius","#c3=c" + light.alternativa3d::name_79 + "Axis","#v0=vPosition","sub t0, c0, v0","dp3 t0.w, t0, t0","nrm t0.xyz,t0.xyz","add t2.xyz, i1.xyz, t0.xyz","nrm t2.xyz, t2.xyz","dp3 t2.x, t2.xyz, i0.xyz","pow t2.x, t2.x, o1.w","dp3 t1.x, t0.xyz, c3.xyz","dp3 t0.x, t0, i0.xyz","sqt t0.w, t0.w","sub t0.w, t0.w, c2.y","div t0.y, t0.w, c2.x","sub t0.w, c0.w, t0.y","sub t0.y, t1.x, c2.w","div t0.y, t0.y, c2.z","sat t0.xyw,t0.xyw","mul t1.xyz,c1.xyz,t0.yyy","mul t1.xyz,t1.xyz,t0.www","mul t2.xyz, t2.x, t1.xyz","add o1.xyz, o1.xyz, t2.xyz","mul t1.xyz, t1.xyz, t0.xxx","add o0.xyz, o0.xyz, t1.xyz"]);
|
||||
lightFragmentProcedure.name += "Spot";
|
||||
}
|
||||
}
|
||||
@@ -276,7 +276,7 @@ package alternativa.engine3d.materials
|
||||
fragmentLinker.addProcedure(_mulLightingProcedure);
|
||||
fragmentLinker.setInputParams(_mulLightingProcedure,"tTotalLight","tTotalHighLight");
|
||||
fragmentLinker.setOutputParams(_mulLightingProcedure,"outColor");
|
||||
if(§_-L4§)
|
||||
if(var_21)
|
||||
{
|
||||
fragmentLinker.addProcedure(this.alternativa3d::outputDiffuseAlpha);
|
||||
fragmentLinker.setInputParams(this.alternativa3d::outputDiffuseAlpha,"outColor");
|
||||
@@ -320,7 +320,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
private function formDirectionalProcedure(procedure:Procedure, light:Light3D, useShadow:Boolean) : void
|
||||
{
|
||||
var source:Array = ["#c0=c" + light.alternativa3d::_-oG + "Direction","#c1=c" + light.alternativa3d::_-oG + "Color","add t0.xyz, i1.xyz, c0.xyz","mov t0.w, c0.w","nrm t0.xyz,t0.xyz","dp3 t0.w, t0.xyz, i0.xyz","pow t0.w, t0.w, o1.w","dp3 t0.x, i0.xyz, c0.xyz","sat t0.x, t0.x"];
|
||||
var source:Array = ["#c0=c" + light.alternativa3d::name_79 + "Direction","#c1=c" + light.alternativa3d::name_79 + "Color","add t0.xyz, i1.xyz, c0.xyz","mov t0.w, c0.w","nrm t0.xyz,t0.xyz","dp3 t0.w, t0.xyz, i0.xyz","pow t0.w, t0.w, o1.w","dp3 t0.x, i0.xyz, c0.xyz","sat t0.x, t0.x"];
|
||||
if(useShadow)
|
||||
{
|
||||
source.push("mul t0.x, t0.x, i2.x");
|
||||
@@ -394,7 +394,7 @@ package alternativa.engine3d.materials
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(!§_-L4§ && opacityMap != null && opacityMap.alternativa3d::_texture == null)
|
||||
if(!var_21 && opacityMap != null && opacityMap.alternativa3d::_texture == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ package alternativa.engine3d.materials
|
||||
{
|
||||
return;
|
||||
}
|
||||
var key:String = alternativa3d::fogMode.toString() + this.§_-NH§.toString() + (this.glossinessMap != null ? "G" : "g") + (opacityMap != null ? "O" : "o") + (this.specularMap != null ? "S" : "s") + (§_-L4§ ? "D" : "d");
|
||||
var key:String = alternativa3d::fogMode.toString() + this.var_53.toString() + (this.glossinessMap != null ? "G" : "g") + (opacityMap != null ? "O" : "o") + (this.specularMap != null ? "S" : "s") + (var_21 ? "D" : "d");
|
||||
for(i = 0; i < lightsLength; i++)
|
||||
{
|
||||
light = lights[i];
|
||||
@@ -424,14 +424,14 @@ package alternativa.engine3d.materials
|
||||
directional = DirectionalLight(light);
|
||||
key += "S";
|
||||
}
|
||||
key += light.alternativa3d::_-oG;
|
||||
key += light.alternativa3d::name_79;
|
||||
}
|
||||
var programs:Dictionary = _programs[object.alternativa3d::transformProcedure];
|
||||
if(programs == null)
|
||||
{
|
||||
programs = new Dictionary(false);
|
||||
_programs[object.alternativa3d::transformProcedure] = programs;
|
||||
program = this.final(object,lights,directional,lightsLength);
|
||||
program = this.method_22(object,lights,directional,lightsLength);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
programs[key] = program;
|
||||
}
|
||||
@@ -440,21 +440,21 @@ package alternativa.engine3d.materials
|
||||
program = programs[key];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.final(object,lights,directional,lightsLength);
|
||||
program = this.method_22(object,lights,directional,lightsLength);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
programs[key] = program;
|
||||
}
|
||||
}
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::_-EM,surface.indexBegin,surface.numTriangles,program);
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::name_78,surface.indexBegin,surface.numTriangles,program);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aPosition"),positionBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.POSITION],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.POSITION]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aUV"),uvBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.TEXCOORDS[0]],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.TEXCOORDS[0]]);
|
||||
object.alternativa3d::setTransformConstants(drawUnit,surface,program.vertexShader,camera);
|
||||
drawUnit.alternativa3d::setProjectionConstants(camera,program.vertexShader.getVariableIndex("cProjMatrix"),object.alternativa3d::localToCameraTransform);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromVector(program.fragmentShader.getVariableIndex("cAmbientColor"),camera.alternativa3d::ambient,1);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("cSurface"),0,this.glossiness,this.§_-kj§,alpha);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("cSurface"),0,this.glossiness,this.var_26,alpha);
|
||||
if(lightsLength > 0)
|
||||
{
|
||||
if(this.§_-NH§ == NormalMapSpace.TANGENT_RIGHT_HANDED || this.§_-NH§ == NormalMapSpace.TANGENT_LEFT_HANDED)
|
||||
if(this.var_53 == NormalMapSpace.TANGENT_RIGHT_HANDED || this.var_53 == NormalMapSpace.TANGENT_LEFT_HANDED)
|
||||
{
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aNormal"),normalsBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.NORMAL],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.NORMAL]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aTangent"),tangentsBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.TANGENT4],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.TANGENT4]);
|
||||
@@ -467,37 +467,37 @@ package alternativa.engine3d.materials
|
||||
light = lights[i];
|
||||
if(light is DirectionalLight)
|
||||
{
|
||||
transform = light.alternativa3d::_-cl;
|
||||
transform = light.alternativa3d::name_80;
|
||||
len = Number(Math.sqrt(transform.c * transform.c + transform.g * transform.g + transform.k * transform.k));
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Direction"),-transform.c / len,-transform.g / len,-transform.k / len,1);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Direction"),-transform.c / len,-transform.g / len,-transform.k / len,1);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
}
|
||||
else if(light is OmniLight)
|
||||
{
|
||||
omni = light as OmniLight;
|
||||
transform = light.alternativa3d::_-cl;
|
||||
transform = light.alternativa3d::name_80;
|
||||
rScale = Number(Math.sqrt(transform.a * transform.a + transform.e * transform.e + transform.i * transform.i));
|
||||
rScale += Math.sqrt(transform.b * transform.b + transform.f * transform.f + transform.j * transform.j);
|
||||
rScale += Math.sqrt(transform.c * transform.c + transform.g * transform.g + transform.k * transform.k);
|
||||
rScale /= 3;
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Position"),transform.d,transform.h,transform.l);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Radius"),1,omni.attenuationEnd * rScale - omni.attenuationBegin * rScale,omni.attenuationBegin * rScale);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Position"),transform.d,transform.h,transform.l);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Radius"),1,omni.attenuationEnd * rScale - omni.attenuationBegin * rScale,omni.attenuationBegin * rScale);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
}
|
||||
else if(light is SpotLight)
|
||||
{
|
||||
spot = light as SpotLight;
|
||||
transform = light.alternativa3d::_-cl;
|
||||
transform = light.alternativa3d::name_80;
|
||||
rScale = Number(Math.sqrt(transform.a * transform.a + transform.e * transform.e + transform.i * transform.i));
|
||||
rScale += Math.sqrt(transform.b * transform.b + transform.f * transform.f + transform.j * transform.j);
|
||||
rScale += len = Number(Math.sqrt(transform.c * transform.c + transform.g * transform.g + transform.k * transform.k));
|
||||
rScale /= 3;
|
||||
falloff = Number(Math.cos(spot.falloff * 0.5));
|
||||
hotspot = Number(Math.cos(spot.hotspot * 0.5));
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Position"),transform.d,transform.h,transform.l);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Axis"),-transform.c / len,-transform.g / len,-transform.k / len);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Radius"),spot.attenuationEnd * rScale - spot.attenuationBegin * rScale,spot.attenuationBegin * rScale,hotspot == falloff ? 0.000001 : hotspot - falloff,falloff);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::_-oG + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Position"),transform.d,transform.h,transform.l);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Axis"),-transform.c / len,-transform.g / len,-transform.k / len);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Radius"),spot.attenuationEnd * rScale - spot.attenuationBegin * rScale,spot.attenuationBegin * rScale,hotspot == falloff ? 0.000001 : hotspot - falloff,falloff);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("c" + light.alternativa3d::name_79 + "Color"),light.alternativa3d::red,light.alternativa3d::green,light.alternativa3d::blue);
|
||||
}
|
||||
if(directional != null)
|
||||
{
|
||||
@@ -507,7 +507,7 @@ package alternativa.engine3d.materials
|
||||
}
|
||||
}
|
||||
drawUnit.alternativa3d::setTextureAt(program.fragmentShader.getVariableIndex("sTexture"),diffuseMap.alternativa3d::_texture);
|
||||
if(!§_-L4§ && opacityMap != null)
|
||||
if(!var_21 && opacityMap != null)
|
||||
{
|
||||
drawUnit.alternativa3d::setTextureAt(program.fragmentShader.getVariableIndex("sOpacity"),opacityMap.alternativa3d::_texture);
|
||||
}
|
||||
@@ -566,7 +566,7 @@ package alternativa.engine3d.materials
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("cFogConsts"),0.5 * uScale,0.5 - uRight,0);
|
||||
drawUnit.alternativa3d::setTextureAt(program.fragmentShader.getVariableIndex("sFogTexture"),alternativa3d::fogTexture.alternativa3d::_texture);
|
||||
}
|
||||
if(this.alternativa3d::_-ES)
|
||||
if(this.alternativa3d::var_54)
|
||||
{
|
||||
if(drawUnit.alternativa3d::object == null)
|
||||
{
|
||||
@@ -574,7 +574,7 @@ package alternativa.engine3d.materials
|
||||
}
|
||||
camera.alternativa3d::renderer.alternativa3d::addDrawUnit(drawUnit,objectRenderPriority >= 0 ? objectRenderPriority : RenderPriority.OPAQUE);
|
||||
}
|
||||
else if(§_-L4§ || opacityMap != null || alpha < 1)
|
||||
else if(var_21 || opacityMap != null || alpha < 1)
|
||||
{
|
||||
drawUnit.alternativa3d::blendSource = Context3DBlendFactor.SOURCE_ALPHA;
|
||||
drawUnit.alternativa3d::blendDestination = Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA;
|
||||
|
||||
@@ -40,7 +40,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
public var alpha:Number = 1;
|
||||
|
||||
public var §_-L4§:Boolean = false;
|
||||
public var var_21:Boolean = false;
|
||||
|
||||
public function TextureMaterial(diffuseMap:TextureResource = null, opacityMap:TextureResource = null, alpha:Number = 1)
|
||||
{
|
||||
@@ -52,7 +52,7 @@ package alternativa.engine3d.materials
|
||||
|
||||
override alternativa3d function get canDrawInShadowMap() : Boolean
|
||||
{
|
||||
return !this.§_-L4§ && this.opacityMap == null;
|
||||
return !this.var_21 && this.opacityMap == null;
|
||||
}
|
||||
|
||||
override alternativa3d function fillResources(resources:Dictionary, resourceType:Class) : void
|
||||
@@ -68,7 +68,7 @@ package alternativa.engine3d.materials
|
||||
}
|
||||
}
|
||||
|
||||
private function final(object:Object3D) : ShaderProgram
|
||||
private function method_22(object:Object3D) : ShaderProgram
|
||||
{
|
||||
var vertexLinker:Linker = new Linker(Context3DProgramType.VERTEX);
|
||||
var positionVar:String = "aPosition";
|
||||
@@ -80,7 +80,7 @@ package alternativa.engine3d.materials
|
||||
vertexLinker.addProcedure(alternativa3d::_projectProcedure);
|
||||
vertexLinker.setInputParams(alternativa3d::_projectProcedure,positionVar);
|
||||
vertexLinker.addProcedure(alternativa3d::_passUVProcedure);
|
||||
var outProcedure:Procedure = this.§_-L4§ ? alternativa3d::_samplerSetProcedureDiffuseAlpha : (this.opacityMap != null ? alternativa3d::_samplerSetProcedureOpacity : alternativa3d::_samplerSetProcedure);
|
||||
var outProcedure:Procedure = this.var_21 ? alternativa3d::_samplerSetProcedureDiffuseAlpha : (this.opacityMap != null ? alternativa3d::_samplerSetProcedureOpacity : alternativa3d::_samplerSetProcedure);
|
||||
var fragmentLinker:Linker = new Linker(Context3DProgramType.FRAGMENT);
|
||||
fragmentLinker.addProcedure(outProcedure);
|
||||
fragmentLinker.setOppositeLinker(vertexLinker);
|
||||
@@ -93,13 +93,13 @@ package alternativa.engine3d.materials
|
||||
var object:Object3D = surface.alternativa3d::object;
|
||||
var positionBuffer:VertexBuffer3D = geometry.alternativa3d::getVertexBuffer(VertexAttributes.POSITION);
|
||||
var uvBuffer:VertexBuffer3D = geometry.alternativa3d::getVertexBuffer(VertexAttributes.TEXCOORDS[0]);
|
||||
var key:int = this.§_-L4§ ? 2 : (this.opacityMap != null ? 1 : 0);
|
||||
var key:int = this.var_21 ? 2 : (this.opacityMap != null ? 1 : 0);
|
||||
var optionsPrograms:Vector.<ShaderProgram> = _programs[object.alternativa3d::transformProcedure];
|
||||
if(optionsPrograms == null)
|
||||
{
|
||||
optionsPrograms = new Vector.<ShaderProgram>(3,true);
|
||||
_programs[object.alternativa3d::transformProcedure] = optionsPrograms;
|
||||
program = this.final(object);
|
||||
program = this.method_22(object);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
optionsPrograms[key] = program;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ package alternativa.engine3d.materials
|
||||
program = optionsPrograms[key];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.final(object);
|
||||
program = this.method_22(object);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
optionsPrograms[key] = program;
|
||||
}
|
||||
@@ -117,22 +117,22 @@ package alternativa.engine3d.materials
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(!this.§_-L4§ && this.opacityMap != null && this.opacityMap.alternativa3d::_texture == null)
|
||||
if(!this.var_21 && this.opacityMap != null && this.opacityMap.alternativa3d::_texture == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::_-EM,surface.indexBegin,surface.numTriangles,program);
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::name_78,surface.indexBegin,surface.numTriangles,program);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aPosition"),positionBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.POSITION],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.POSITION]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aUV"),uvBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.TEXCOORDS[0]],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.TEXCOORDS[0]]);
|
||||
object.alternativa3d::setTransformConstants(drawUnit,surface,program.vertexShader,camera);
|
||||
drawUnit.alternativa3d::setProjectionConstants(camera,program.vertexShader.getVariableIndex("cProjMatrix"),object.alternativa3d::localToCameraTransform);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex("cAlpha"),0,0,0,this.alpha);
|
||||
drawUnit.alternativa3d::setTextureAt(program.fragmentShader.getVariableIndex("sTexture"),this.diffuseMap.alternativa3d::_texture);
|
||||
if(!this.§_-L4§ && this.opacityMap != null)
|
||||
if(!this.var_21 && this.opacityMap != null)
|
||||
{
|
||||
drawUnit.alternativa3d::setTextureAt(program.fragmentShader.getVariableIndex("sOpacity"),this.opacityMap.alternativa3d::_texture);
|
||||
}
|
||||
if(this.§_-L4§ || this.opacityMap != null || this.alpha < 1)
|
||||
if(this.var_21 || this.opacityMap != null || this.alpha < 1)
|
||||
{
|
||||
drawUnit.alternativa3d::blendSource = Context3DBlendFactor.SOURCE_ALPHA;
|
||||
drawUnit.alternativa3d::blendDestination = Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA;
|
||||
|
||||
@@ -33,23 +33,23 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
regmask = 15;
|
||||
}
|
||||
§_-0J§ = regmask << 16 | index;
|
||||
name_345 = regmask << 16 | index;
|
||||
switch(strType)
|
||||
{
|
||||
case "t":
|
||||
§_-0J§ |= 33554432;
|
||||
name_345 |= 33554432;
|
||||
type = 2;
|
||||
break;
|
||||
case "o":
|
||||
§_-0J§ |= 50331648;
|
||||
name_345 |= 50331648;
|
||||
type = 3;
|
||||
break;
|
||||
case "v":
|
||||
§_-0J§ |= 67108864;
|
||||
name_345 |= 67108864;
|
||||
type = 4;
|
||||
break;
|
||||
case "i":
|
||||
§_-0J§ |= 100663296;
|
||||
name_345 |= 100663296;
|
||||
type = 6;
|
||||
break;
|
||||
default:
|
||||
@@ -60,7 +60,7 @@ package alternativa.engine3d.materials.compiler
|
||||
override public function writeToByteArray(byteCode:ByteArray, newIndex:int, newType:int) : void
|
||||
{
|
||||
byteCode.position = position;
|
||||
byteCode.writeUnsignedInt(§_-0J§ & ~0x0F00FFFF | newIndex | newType << 24);
|
||||
byteCode.writeUnsignedInt(name_345 & ~0x0F00FFFF | newIndex | newType << 24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,58 +10,58 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public class Linker
|
||||
{
|
||||
public var §_-RT§:int = 0;
|
||||
public var var_177:int = 0;
|
||||
|
||||
public var §_-A§:int = 0;
|
||||
public var var_176:int = 0;
|
||||
|
||||
public var type:String;
|
||||
|
||||
private var §_-2L§:Vector.<Procedure> = new Vector.<Procedure>();
|
||||
private var var_128:Vector.<Procedure> = new Vector.<Procedure>();
|
||||
|
||||
private var §_-RU§:ByteArray = new ByteArray();
|
||||
private var var_175:ByteArray = new ByteArray();
|
||||
|
||||
private var §_-8Z§:Boolean;
|
||||
private var var_174:Boolean;
|
||||
|
||||
alternativa3d var §_-3r§:Object;
|
||||
alternativa3d var var_173:Object;
|
||||
|
||||
private var §_-c§:Object = new Object();
|
||||
private var var_180:Object = new Object();
|
||||
|
||||
private var §_-T1§:Linker;
|
||||
private var var_178:Linker;
|
||||
|
||||
private var §_-W8§:Dictionary = new Dictionary();
|
||||
private var var_179:Dictionary = new Dictionary();
|
||||
|
||||
private var §_-f-§:Dictionary = new Dictionary();
|
||||
private var var_181:Dictionary = new Dictionary();
|
||||
|
||||
private var §_-Jf§:Vector.<uint> = new Vector.<uint>(6,true);
|
||||
private var var_172:Vector.<uint> = new Vector.<uint>(6,true);
|
||||
|
||||
public function Linker(programType:String)
|
||||
{
|
||||
super();
|
||||
this.§_-RU§.endian = Endian.LITTLE_ENDIAN;
|
||||
this.var_175.endian = Endian.LITTLE_ENDIAN;
|
||||
this.type = programType;
|
||||
this.§_-RU§.writeByte(160);
|
||||
this.§_-RU§.writeUnsignedInt(1);
|
||||
this.§_-RU§.writeByte(161);
|
||||
this.§_-RU§.writeByte(programType == Context3DProgramType.FRAGMENT ? 1 : 0);
|
||||
this.var_175.writeByte(160);
|
||||
this.var_175.writeUnsignedInt(1);
|
||||
this.var_175.writeByte(161);
|
||||
this.var_175.writeByte(programType == Context3DProgramType.FRAGMENT ? 1 : 0);
|
||||
}
|
||||
|
||||
public function clear() : void
|
||||
{
|
||||
this.§_-RU§.length = 7;
|
||||
this.§_-Jf§[0] = this.§_-Jf§[1] = this.§_-Jf§[2] = this.§_-Jf§[3] = this.§_-Jf§[4] = this.§_-Jf§[5] = 0;
|
||||
this.§_-2L§.length = 0;
|
||||
this.§_-8Z§ = false;
|
||||
this.§_-A§ = 0;
|
||||
this.§_-RT§ = 0;
|
||||
this.alternativa3d::_-3r = null;
|
||||
this.§_-W8§ = new Dictionary();
|
||||
this.§_-f-§ = new Dictionary();
|
||||
this.var_175.length = 7;
|
||||
this.var_172[0] = this.var_172[1] = this.var_172[2] = this.var_172[3] = this.var_172[4] = this.var_172[5] = 0;
|
||||
this.var_128.length = 0;
|
||||
this.var_174 = false;
|
||||
this.var_176 = 0;
|
||||
this.var_177 = 0;
|
||||
this.alternativa3d::var_173 = null;
|
||||
this.var_179 = new Dictionary();
|
||||
this.var_181 = new Dictionary();
|
||||
}
|
||||
|
||||
public function addProcedure(procedure:Procedure) : void
|
||||
{
|
||||
this.§_-8Z§ = true;
|
||||
this.§_-2L§.push(procedure);
|
||||
this.var_174 = true;
|
||||
this.var_128.push(procedure);
|
||||
}
|
||||
|
||||
public function declareVariable(name:String, type:uint = 2) : void
|
||||
@@ -71,26 +71,26 @@ package alternativa.engine3d.materials.compiler
|
||||
v.index = -1;
|
||||
v.type = type;
|
||||
v.name = name;
|
||||
this.§_-c§[name] = v;
|
||||
this.var_180[name] = v;
|
||||
}
|
||||
|
||||
public function setInputParams(procedure:Procedure, ... args) : void
|
||||
{
|
||||
this.§_-W8§[procedure] = args;
|
||||
this.var_179[procedure] = args;
|
||||
}
|
||||
|
||||
public function setOutputParams(procedure:Procedure, ... args) : void
|
||||
{
|
||||
this.§_-f-§[procedure] = args;
|
||||
this.var_181[procedure] = args;
|
||||
}
|
||||
|
||||
public function getVariableIndex(name:String) : int
|
||||
{
|
||||
if(this.§_-8Z§)
|
||||
if(this.var_174)
|
||||
{
|
||||
this.link();
|
||||
}
|
||||
var variable:Variable = this.alternativa3d::_-3r[name];
|
||||
var variable:Variable = this.alternativa3d::var_173[name];
|
||||
if(variable == null)
|
||||
{
|
||||
throw new Error("Variable \"" + name + "\" not found");
|
||||
@@ -100,11 +100,11 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public function findVariable(name:String) : int
|
||||
{
|
||||
if(this.§_-8Z§)
|
||||
if(this.var_174)
|
||||
{
|
||||
this.link();
|
||||
}
|
||||
var variable:Variable = this.alternativa3d::_-3r[name];
|
||||
var variable:Variable = this.alternativa3d::var_173[name];
|
||||
if(variable == null)
|
||||
{
|
||||
return -1;
|
||||
@@ -114,26 +114,26 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public function containsVariable(name:String) : Boolean
|
||||
{
|
||||
if(this.§_-8Z§)
|
||||
if(this.var_174)
|
||||
{
|
||||
this.link();
|
||||
}
|
||||
return this.alternativa3d::_-3r[name] != null;
|
||||
return this.alternativa3d::var_173[name] != null;
|
||||
}
|
||||
|
||||
public function getByteCode() : ByteArray
|
||||
{
|
||||
if(this.§_-8Z§)
|
||||
if(this.var_174)
|
||||
{
|
||||
this.link();
|
||||
}
|
||||
return this.§_-RU§;
|
||||
return this.var_175;
|
||||
}
|
||||
|
||||
public function setOppositeLinker(linker:Linker) : void
|
||||
{
|
||||
this.§_-T1§ = linker;
|
||||
this.§_-8Z§ = true;
|
||||
this.var_178 = linker;
|
||||
this.var_174 = true;
|
||||
}
|
||||
|
||||
public function link() : void
|
||||
@@ -150,28 +150,28 @@ package alternativa.engine3d.materials.compiler
|
||||
var vars:Vector.<Variable> = null;
|
||||
var inParam:Variable = null;
|
||||
var outParam:Variable = null;
|
||||
if(this.§_-8Z§)
|
||||
if(this.var_174)
|
||||
{
|
||||
this.alternativa3d::_-3r = new Object();
|
||||
this.§_-RU§.position = 7;
|
||||
this.§_-Jf§[0] = 0;
|
||||
this.§_-Jf§[1] = 0;
|
||||
this.§_-Jf§[3] = 0;
|
||||
this.§_-Jf§[4] = 0;
|
||||
this.§_-Jf§[5] = 0;
|
||||
this.§_-A§ = 0;
|
||||
this.§_-RT§ = 0;
|
||||
for each(v in this.§_-c§)
|
||||
this.alternativa3d::var_173 = new Object();
|
||||
this.var_175.position = 7;
|
||||
this.var_172[0] = 0;
|
||||
this.var_172[1] = 0;
|
||||
this.var_172[3] = 0;
|
||||
this.var_172[4] = 0;
|
||||
this.var_172[5] = 0;
|
||||
this.var_176 = 0;
|
||||
this.var_177 = 0;
|
||||
for each(v in this.var_180)
|
||||
{
|
||||
this.alternativa3d::_-3r[v.name] = v;
|
||||
this.alternativa3d::var_173[v.name] = v;
|
||||
}
|
||||
for(i = 0; i < this.§_-2L§.length; i++)
|
||||
for(i = 0; i < this.var_128.length; i++)
|
||||
{
|
||||
p = this.§_-2L§[i];
|
||||
this.§_-A§ += p.§_-A§;
|
||||
this.§_-RT§ += p.§_-RT§;
|
||||
input = this.§_-W8§[p];
|
||||
output = this.§_-f-§[p];
|
||||
p = this.var_128[i];
|
||||
this.var_176 += p.var_176;
|
||||
this.var_177 += p.var_177;
|
||||
input = this.var_179[p];
|
||||
output = this.var_181[p];
|
||||
code = new ByteArray();
|
||||
code.endian = Endian.LITTLE_ENDIAN;
|
||||
p.byteCode.position = 0;
|
||||
@@ -182,21 +182,21 @@ package alternativa.engine3d.materials.compiler
|
||||
for(j = 0; j < numParams; )
|
||||
{
|
||||
param = input[j];
|
||||
v = this.alternativa3d::_-3r[param];
|
||||
v = this.alternativa3d::var_173[param];
|
||||
if(v == null)
|
||||
{
|
||||
throw new Error("Input parameter not set. paramName = " + param);
|
||||
}
|
||||
if(p.§_-d2§[6].length > j)
|
||||
if(p.name_343[6].length > j)
|
||||
{
|
||||
inParam = p.§_-d2§[6][j];
|
||||
inParam = p.name_343[6][j];
|
||||
if(inParam == null)
|
||||
{
|
||||
throw new Error("Input parameter set, but not exist in code. paramName = " + param + ", register = i" + j.toString());
|
||||
}
|
||||
if(this.§_-c§[v.name] != null && v.index < 0)
|
||||
if(this.var_180[v.name] != null && v.index < 0)
|
||||
{
|
||||
v.index = int(this.§_-Jf§[v.type]++);
|
||||
v.index = int(this.var_172[v.type]++);
|
||||
}
|
||||
while(inParam != null)
|
||||
{
|
||||
@@ -213,25 +213,25 @@ package alternativa.engine3d.materials.compiler
|
||||
for(j = 0; j < numParams; j++)
|
||||
{
|
||||
param = output[j];
|
||||
v = this.alternativa3d::_-3r[param];
|
||||
v = this.alternativa3d::var_173[param];
|
||||
if(v == null)
|
||||
{
|
||||
if(!(j == 0 && i == this.§_-2L§.length - 1))
|
||||
if(!(j == 0 && i == this.var_128.length - 1))
|
||||
{
|
||||
throw new Error("Output parameter have not declared. paramName = " + param);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(this.§_-c§[v.name] != null && v.index < 0)
|
||||
if(this.var_180[v.name] != null && v.index < 0)
|
||||
{
|
||||
if(v.type != 2)
|
||||
{
|
||||
throw new Error("Wrong output type:" + VariableType.TYPE_NAMES[v.type]);
|
||||
}
|
||||
v.index = int(this.§_-Jf§[v.type]++);
|
||||
v.index = int(this.var_172[v.type]++);
|
||||
}
|
||||
outParam = p.§_-d2§[3][j];
|
||||
outParam = p.name_343[3][j];
|
||||
if(outParam == null)
|
||||
{
|
||||
throw new Error("Output parameter set, but not exist in code. paramName = " + param + ", register = i" + j.toString());
|
||||
@@ -244,7 +244,7 @@ package alternativa.engine3d.materials.compiler
|
||||
}
|
||||
}
|
||||
}
|
||||
vars = p.§_-d2§[2];
|
||||
vars = p.name_343[2];
|
||||
for(j = 0; j < vars.length; j++)
|
||||
{
|
||||
v = vars[j];
|
||||
@@ -252,19 +252,19 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
while(v != null)
|
||||
{
|
||||
v.writeToByteArray(code,v.index + this.§_-Jf§[2],VariableType.TEMPORARY);
|
||||
v.writeToByteArray(code,v.index + this.var_172[2],VariableType.TEMPORARY);
|
||||
v = v.next;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.§_-Jf§[VariableType.CONSTANT] += p.alternativa3d::_-in;
|
||||
this.resolveVariablesUsages(code,p.§_-d2§[0],VariableType.ATTRIBUTE);
|
||||
this.resolveVariablesUsages(code,p.§_-d2§[1],VariableType.CONSTANT);
|
||||
this.resolveVaryings(code,p.§_-d2§[4]);
|
||||
this.resolveVariablesUsages(code,p.§_-d2§[5],VariableType.SAMPLER);
|
||||
this.§_-RU§.writeBytes(code,0,code.length);
|
||||
this.var_172[VariableType.CONSTANT] += p.alternativa3d::name_344;
|
||||
this.resolveVariablesUsages(code,p.name_343[0],VariableType.ATTRIBUTE);
|
||||
this.resolveVariablesUsages(code,p.name_343[1],VariableType.CONSTANT);
|
||||
this.resolveVaryings(code,p.name_343[4]);
|
||||
this.resolveVariablesUsages(code,p.name_343[5],VariableType.SAMPLER);
|
||||
this.var_175.writeBytes(code,0,code.length);
|
||||
}
|
||||
this.§_-8Z§ = false;
|
||||
this.var_174 = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -273,17 +273,17 @@ package alternativa.engine3d.materials.compiler
|
||||
var vUsage:Variable = null;
|
||||
var variable:Variable = null;
|
||||
var type:uint = VariableType.VARYING;
|
||||
if(this.§_-T1§ != null && this.§_-T1§.§_-8Z§)
|
||||
if(this.var_178 != null && this.var_178.var_174)
|
||||
{
|
||||
this.§_-T1§.link();
|
||||
this.var_178.link();
|
||||
}
|
||||
var oppositeVariables:Object = this.§_-T1§ != null ? this.§_-T1§.alternativa3d::_-3r : null;
|
||||
var oppositeVariables:Object = this.var_178 != null ? this.var_178.alternativa3d::var_173 : null;
|
||||
for(var j:uint = 0; j < variableUsages.length; j++)
|
||||
{
|
||||
vUsage = variableUsages[j];
|
||||
if(vUsage != null)
|
||||
{
|
||||
variable = this.alternativa3d::_-3r[vUsage.name];
|
||||
variable = this.alternativa3d::var_173[vUsage.name];
|
||||
if(variable == null)
|
||||
{
|
||||
variable = Variable.create();
|
||||
@@ -291,7 +291,7 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
throw new Error("Varying is not assigned. Use \'assignVariableName\' method. register = " + vUsage.index);
|
||||
}
|
||||
this.alternativa3d::_-3r[vUsage.name] = variable;
|
||||
this.alternativa3d::var_173[vUsage.name] = variable;
|
||||
variable.name = vUsage.name;
|
||||
if(oppositeVariables != null)
|
||||
{
|
||||
@@ -303,8 +303,8 @@ package alternativa.engine3d.materials.compiler
|
||||
}
|
||||
else
|
||||
{
|
||||
variable.index = this.§_-Jf§[type];
|
||||
this.§_-Jf§[type] += vUsage.size;
|
||||
variable.index = this.var_172[type];
|
||||
this.var_172[type] += vUsage.size;
|
||||
}
|
||||
variable.type = type;
|
||||
}
|
||||
@@ -326,26 +326,26 @@ package alternativa.engine3d.materials.compiler
|
||||
vUsage = variableUsages[j];
|
||||
if(vUsage != null)
|
||||
{
|
||||
variable = this.alternativa3d::_-3r[vUsage.name];
|
||||
variable = this.alternativa3d::var_173[vUsage.name];
|
||||
if(variable == null)
|
||||
{
|
||||
variable = Variable.create();
|
||||
if(vUsage.name != null)
|
||||
{
|
||||
this.alternativa3d::_-3r[vUsage.name] = variable;
|
||||
this.alternativa3d::var_173[vUsage.name] = variable;
|
||||
}
|
||||
else if(!vUsage.isRelative)
|
||||
{
|
||||
throw new Error(VariableType.TYPE_NAMES[type] + " is not assigned. Use \"assignVariableName\" method. register = " + vUsage.index);
|
||||
}
|
||||
variable.name = vUsage.name;
|
||||
variable.index = this.§_-Jf§[type];
|
||||
this.§_-Jf§[type] += vUsage.size;
|
||||
variable.index = this.var_172[type];
|
||||
this.var_172[type] += vUsage.size;
|
||||
variable.type = type;
|
||||
}
|
||||
else if(variable.index < 0)
|
||||
{
|
||||
variable.index = int(this.§_-Jf§[type]++);
|
||||
variable.index = int(this.var_172[type]++);
|
||||
}
|
||||
while(vUsage != null)
|
||||
{
|
||||
@@ -364,9 +364,9 @@ package alternativa.engine3d.materials.compiler
|
||||
var result:String = "LINKER:\n";
|
||||
var totalCodes:uint = 0;
|
||||
var totalCommands:uint = 0;
|
||||
for(var i:int = 0; i < this.§_-2L§.length; i++)
|
||||
for(var i:int = 0; i < this.var_128.length; i++)
|
||||
{
|
||||
p = this.§_-2L§[i];
|
||||
p = this.var_128[i];
|
||||
if(p.name != null)
|
||||
{
|
||||
result += p.name + "(";
|
||||
@@ -375,7 +375,7 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
result += "#" + i.toString() + "(";
|
||||
}
|
||||
args = this.§_-W8§[p];
|
||||
args = this.var_179[p];
|
||||
if(args != null)
|
||||
{
|
||||
for each(str in args)
|
||||
@@ -385,7 +385,7 @@ package alternativa.engine3d.materials.compiler
|
||||
result = result.substr(0,result.length - 1);
|
||||
}
|
||||
result += ")";
|
||||
args = this.§_-f-§[p];
|
||||
args = this.var_181[p];
|
||||
if(args != null)
|
||||
{
|
||||
result += "->(";
|
||||
@@ -396,9 +396,9 @@ package alternativa.engine3d.materials.compiler
|
||||
result = result.substr(0,result.length - 1);
|
||||
result += ")";
|
||||
}
|
||||
result += " [IS:" + p.§_-RT§.toString() + ", CMDS:" + p.§_-A§.toString() + "]\n";
|
||||
totalCodes += p.§_-RT§;
|
||||
totalCommands += p.§_-A§;
|
||||
result += " [IS:" + p.var_177.toString() + ", CMDS:" + p.var_176.toString() + "]\n";
|
||||
totalCodes += p.var_177;
|
||||
totalCommands += p.var_176;
|
||||
}
|
||||
return result + ("[IS:" + totalCodes.toString() + ", CMDS:" + totalCommands.toString() + "]\n");
|
||||
}
|
||||
|
||||
@@ -12,13 +12,13 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public var byteCode:ByteArray = new ByteArray();
|
||||
|
||||
public var §_-d2§:Vector.<Vector.<Variable>> = new Vector.<Vector.<Variable>>();
|
||||
public var name_343:Vector.<Vector.<Variable>> = new Vector.<Vector.<Variable>>();
|
||||
|
||||
public var §_-RT§:int = 0;
|
||||
public var var_177:int = 0;
|
||||
|
||||
public var §_-A§:int = 0;
|
||||
public var var_176:int = 0;
|
||||
|
||||
alternativa3d var §_-in§:uint = 0;
|
||||
alternativa3d var name_344:uint = 0;
|
||||
|
||||
public function Procedure(array:Array = null, name:String = null)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
private function addVariableUsage(v:Variable) : void
|
||||
{
|
||||
var vars:Vector.<Variable> = this.§_-d2§[v.type];
|
||||
var vars:Vector.<Variable> = this.name_343[v.type];
|
||||
var index:int = v.index;
|
||||
if(index >= vars.length)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public function assignVariableName(type:uint, index:uint, name:String, size:uint = 1) : void
|
||||
{
|
||||
for(var v:Variable = this.§_-d2§[type][index]; v != null; )
|
||||
for(var v:Variable = this.name_343[type][index]; v != null; )
|
||||
{
|
||||
v.size = size;
|
||||
v.name = name;
|
||||
@@ -84,11 +84,11 @@ package alternativa.engine3d.materials.compiler
|
||||
var varName:String = null;
|
||||
for(var i:int = 0; i < 7; i++)
|
||||
{
|
||||
this.§_-d2§[i] = new Vector.<Variable>();
|
||||
this.name_343[i] = new Vector.<Variable>();
|
||||
}
|
||||
this.byteCode.length = 0;
|
||||
this.§_-A§ = 0;
|
||||
this.§_-RT§ = 0;
|
||||
this.var_176 = 0;
|
||||
this.var_177 = 0;
|
||||
var declarationStrings:Vector.<String> = new Vector.<String>();
|
||||
var count:int = int(source.length);
|
||||
for(i = 0; i < count; i++)
|
||||
@@ -131,7 +131,7 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public function assignConstantsArray(registersCount:uint = 1) : void
|
||||
{
|
||||
this.alternativa3d::_-in = registersCount;
|
||||
this.alternativa3d::name_344 = registersCount;
|
||||
}
|
||||
|
||||
private function writeCommand(source:String) : void
|
||||
@@ -167,161 +167,161 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
case "mov":
|
||||
type = CommandType.MOV;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "add":
|
||||
type = CommandType.ADD;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "sub":
|
||||
type = CommandType.SUB;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "mul":
|
||||
type = CommandType.MUL;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "div":
|
||||
type = CommandType.DIV;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "rcp":
|
||||
type = CommandType.RCP;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "min":
|
||||
type = CommandType.MIN;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "max":
|
||||
type = CommandType.MAX;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "frc":
|
||||
type = CommandType.FRC;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "sqt":
|
||||
type = CommandType.SQT;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "rsq":
|
||||
type = CommandType.RSQ;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "pow":
|
||||
type = CommandType.POW;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
this.§_-RT§ += 3;
|
||||
this.var_177 += 3;
|
||||
break;
|
||||
case "log":
|
||||
type = CommandType.LOG;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "exp":
|
||||
type = CommandType.EXP;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "nrm":
|
||||
type = CommandType.NRM;
|
||||
this.§_-RT§ += 3;
|
||||
this.var_177 += 3;
|
||||
break;
|
||||
case "sin":
|
||||
type = CommandType.SIN;
|
||||
this.§_-RT§ += 8;
|
||||
this.var_177 += 8;
|
||||
break;
|
||||
case "cos":
|
||||
type = CommandType.COS;
|
||||
this.§_-RT§ += 8;
|
||||
this.var_177 += 8;
|
||||
break;
|
||||
case "crs":
|
||||
type = CommandType.CRS;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
this.§_-RT§ += 2;
|
||||
this.var_177 += 2;
|
||||
break;
|
||||
case "dp3":
|
||||
type = CommandType.DP3;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "dp4":
|
||||
type = CommandType.DP4;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "abs":
|
||||
type = CommandType.ABS;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "neg":
|
||||
type = CommandType.NEG;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "sat":
|
||||
type = CommandType.SAT;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "m33":
|
||||
type = CommandType.M33;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
this.§_-RT§ += 3;
|
||||
this.var_177 += 3;
|
||||
break;
|
||||
case "m44":
|
||||
type = CommandType.M44;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
this.§_-RT§ += 4;
|
||||
this.var_177 += 4;
|
||||
break;
|
||||
case "m34":
|
||||
type = CommandType.M34;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
this.§_-RT§ += 3;
|
||||
this.var_177 += 3;
|
||||
break;
|
||||
case "kil":
|
||||
type = CommandType.KIL;
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "tex":
|
||||
type = CommandType.TEX;
|
||||
source2 = new SamplerVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "sge":
|
||||
type = CommandType.SGE;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
break;
|
||||
case "slt":
|
||||
type = CommandType.SLT;
|
||||
source2 = new SourceVariable(operands[3]);
|
||||
this.addVariableUsage(source2);
|
||||
++this.§_-RT§;
|
||||
++this.var_177;
|
||||
}
|
||||
this.byteCode.writeUnsignedInt(type);
|
||||
if(destination != null)
|
||||
{
|
||||
destination.position = this.byteCode.position;
|
||||
this.byteCode.writeUnsignedInt(destination.§_-0J§);
|
||||
this.byteCode.writeUnsignedInt(destination.name_345);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -333,8 +333,8 @@ package alternativa.engine3d.materials.compiler
|
||||
this.addVariableUsage(source1.relative);
|
||||
source1.relative.position = this.byteCode.position;
|
||||
}
|
||||
this.byteCode.writeUnsignedInt(source1.§_-0J§);
|
||||
this.byteCode.writeUnsignedInt(source1.§_-oc§);
|
||||
this.byteCode.writeUnsignedInt(source1.name_345);
|
||||
this.byteCode.writeUnsignedInt(source1.name_346);
|
||||
if(source2 != null)
|
||||
{
|
||||
s2v = source2 as SourceVariable;
|
||||
@@ -344,24 +344,24 @@ package alternativa.engine3d.materials.compiler
|
||||
this.addVariableUsage(s2v.relative);
|
||||
s2v.relative.position = s2v.position;
|
||||
}
|
||||
this.byteCode.writeUnsignedInt(source2.§_-0J§);
|
||||
this.byteCode.writeUnsignedInt(source2.§_-oc§);
|
||||
this.byteCode.writeUnsignedInt(source2.name_345);
|
||||
this.byteCode.writeUnsignedInt(source2.name_346);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.byteCode.position = this.byteCode.length = this.byteCode.length + 8;
|
||||
}
|
||||
++this.§_-A§;
|
||||
++this.var_176;
|
||||
}
|
||||
|
||||
public function newInstance() : Procedure
|
||||
{
|
||||
var res:Procedure = new Procedure();
|
||||
res.byteCode = this.byteCode;
|
||||
res.§_-d2§ = this.§_-d2§;
|
||||
res.§_-RT§ = this.§_-RT§;
|
||||
res.alternativa3d::_-in = this.alternativa3d::_-in;
|
||||
res.§_-A§ = this.§_-A§;
|
||||
res.name_343 = this.name_343;
|
||||
res.var_177 = this.var_177;
|
||||
res.alternativa3d::name_344 = this.alternativa3d::name_344;
|
||||
res.var_176 = this.var_176;
|
||||
res.name = this.name;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
throw new Error("Error: index offset " + reloffset + " out of bounds. [0..255]");
|
||||
}
|
||||
§_-0J§ = reloffset << 16 | index;
|
||||
§_-oc§ |= type << 8;
|
||||
§_-oc§ |= relsel << 16;
|
||||
§_-oc§ |= 1 << 31;
|
||||
name_345 = reloffset << 16 | index;
|
||||
name_346 |= type << 8;
|
||||
name_346 |= relsel << 16;
|
||||
name_346 |= 1 << 31;
|
||||
}
|
||||
|
||||
override public function writeToByteArray(byteCode:ByteArray, newIndex:int, newType:int) : void
|
||||
|
||||
@@ -13,19 +13,19 @@ package alternativa.engine3d.materials.compiler
|
||||
switch(strType)
|
||||
{
|
||||
case "s":
|
||||
§_-oc§ = VariableType.SAMPLER;
|
||||
name_346 = VariableType.SAMPLER;
|
||||
break;
|
||||
case "i":
|
||||
§_-oc§ = VariableType.INPUT;
|
||||
name_346 = VariableType.INPUT;
|
||||
}
|
||||
index = parseInt(source.match(/\d+/g)[0],10);
|
||||
§_-0J§ = index;
|
||||
name_345 = index;
|
||||
var optsi:int = int(source.search(/<.*>/g));
|
||||
if(optsi != -1)
|
||||
{
|
||||
opts = source.substring(optsi).match(/(\w+)/g);
|
||||
}
|
||||
type = §_-oc§;
|
||||
type = name_346;
|
||||
var optsLength:uint = uint(opts.length);
|
||||
for(var i:int = 0; i < optsLength; )
|
||||
{
|
||||
@@ -33,51 +33,51 @@ package alternativa.engine3d.materials.compiler
|
||||
switch(op)
|
||||
{
|
||||
case "2d":
|
||||
§_-oc§ &= ~0xF000;
|
||||
name_346 &= ~0xF000;
|
||||
break;
|
||||
case "3d":
|
||||
§_-oc§ &= ~0xF000;
|
||||
§_-oc§ |= 8192;
|
||||
name_346 &= ~0xF000;
|
||||
name_346 |= 8192;
|
||||
break;
|
||||
case "cube":
|
||||
§_-oc§ &= ~0xF000;
|
||||
§_-oc§ |= 4096;
|
||||
name_346 &= ~0xF000;
|
||||
name_346 |= 4096;
|
||||
break;
|
||||
case "mipnearest":
|
||||
§_-oc§ &= ~0x0F000000;
|
||||
§_-oc§ |= 16777216;
|
||||
name_346 &= ~0x0F000000;
|
||||
name_346 |= 16777216;
|
||||
break;
|
||||
case "miplinear":
|
||||
§_-oc§ &= ~0x0F000000;
|
||||
§_-oc§ |= 33554432;
|
||||
name_346 &= ~0x0F000000;
|
||||
name_346 |= 33554432;
|
||||
break;
|
||||
case "mipnone":
|
||||
case "nomip":
|
||||
§_-oc§ &= ~0x0F000000;
|
||||
name_346 &= ~0x0F000000;
|
||||
break;
|
||||
case "nearest":
|
||||
§_-oc§ &= ~4026531840;
|
||||
name_346 &= ~4026531840;
|
||||
break;
|
||||
case "linear":
|
||||
§_-oc§ &= ~4026531840;
|
||||
§_-oc§ |= 268435456;
|
||||
name_346 &= ~4026531840;
|
||||
name_346 |= 268435456;
|
||||
break;
|
||||
case "centroid":
|
||||
§_-oc§ |= 4294967296;
|
||||
name_346 |= 4294967296;
|
||||
break;
|
||||
case "single":
|
||||
§_-oc§ |= 8589934592;
|
||||
name_346 |= 8589934592;
|
||||
break;
|
||||
case "depth":
|
||||
§_-oc§ |= 17179869184;
|
||||
name_346 |= 17179869184;
|
||||
break;
|
||||
case "repeat":
|
||||
case "wrap":
|
||||
§_-oc§ &= ~0xF00000;
|
||||
§_-oc§ |= 1048576;
|
||||
name_346 &= ~0xF00000;
|
||||
name_346 |= 1048576;
|
||||
break;
|
||||
case "clamp":
|
||||
§_-oc§ &= ~0xF00000;
|
||||
name_346 &= ~0xF00000;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
|
||||
@@ -50,7 +50,7 @@ package alternativa.engine3d.materials.compiler
|
||||
{
|
||||
regmask = 228;
|
||||
}
|
||||
§_-0J§ = regmask << 24 | index;
|
||||
name_345 = regmask << 24 | index;
|
||||
switch(strType)
|
||||
{
|
||||
case "a":
|
||||
@@ -74,12 +74,12 @@ package alternativa.engine3d.materials.compiler
|
||||
default:
|
||||
throw new ArgumentError("Wrong source register type, must be \"a\" or \"c\" or \"t\" or \"o\" or \"v\" or \"i\", var = " + source);
|
||||
}
|
||||
§_-oc§ = type;
|
||||
name_346 = type;
|
||||
if(isRel)
|
||||
{
|
||||
this.relative = new RelativeVariable(relreg[0]);
|
||||
§_-0J§ |= this.relative.§_-0J§;
|
||||
§_-oc§ |= this.relative.§_-oc§;
|
||||
name_345 |= this.relative.name_345;
|
||||
name_346 |= this.relative.name_346;
|
||||
isRelative = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public var next:Variable;
|
||||
|
||||
public var §_-0J§:uint;
|
||||
public var name_345:uint;
|
||||
|
||||
public var §_-oc§:uint;
|
||||
public var name_346:uint;
|
||||
|
||||
public var isRelative:Boolean;
|
||||
|
||||
private var §_-RS§:uint = 1;
|
||||
private var var_32:uint = 1;
|
||||
|
||||
public function Variable()
|
||||
{
|
||||
@@ -51,12 +51,12 @@ package alternativa.engine3d.materials.compiler
|
||||
|
||||
public function get size() : uint
|
||||
{
|
||||
return this.§_-RS§;
|
||||
return this.var_32;
|
||||
}
|
||||
|
||||
public function set size(value:uint) : void
|
||||
{
|
||||
this.§_-RS§ = value;
|
||||
this.var_32 = value;
|
||||
}
|
||||
|
||||
public function writeToByteArray(byteCode:ByteArray, newIndex:int, newType:int) : void
|
||||
|
||||
@@ -29,9 +29,9 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
var surface:Surface = null;
|
||||
var debug:int = 0;
|
||||
for(var i:int = 0; i < alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < alternativa3d::var_93; )
|
||||
{
|
||||
surface = alternativa3d::_-eW[i];
|
||||
surface = alternativa3d::var_92[i];
|
||||
if(surface.material != null)
|
||||
{
|
||||
surface.material.alternativa3d::collectDraws(camera,surface,geometry,lights,lightsLength,RenderPriority.DECALS);
|
||||
|
||||
@@ -8,11 +8,11 @@ package alternativa.engine3d.objects
|
||||
|
||||
public class Joint extends Object3D
|
||||
{
|
||||
alternativa3d var §_-Dy§:Transform3D = new Transform3D();
|
||||
alternativa3d var name_549:Transform3D = new Transform3D();
|
||||
|
||||
alternativa3d var bindPoseTransform:Transform3D = new Transform3D();
|
||||
|
||||
private var §_-ar§:Transform3D = new Transform3D();
|
||||
private var var_689:Transform3D = new Transform3D();
|
||||
|
||||
public function Joint()
|
||||
{
|
||||
@@ -28,7 +28,7 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
if(this.alternativa3d::bindPoseTransform != null)
|
||||
{
|
||||
this.alternativa3d::_-Dy.combine(alternativa3d::localToGlobalTransform,this.alternativa3d::bindPoseTransform);
|
||||
this.alternativa3d::name_549.combine(alternativa3d::localToGlobalTransform,this.alternativa3d::bindPoseTransform);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
public var geometry:Geometry;
|
||||
|
||||
alternativa3d var §_-eW§:Vector.<Surface> = new Vector.<Surface>();
|
||||
alternativa3d var var_92:Vector.<Surface> = new Vector.<Surface>();
|
||||
|
||||
alternativa3d var §_-Oy§:int = 0;
|
||||
alternativa3d var var_93:int = 0;
|
||||
|
||||
public function Mesh()
|
||||
{
|
||||
@@ -43,7 +43,7 @@ package alternativa.engine3d.objects
|
||||
else if(this.geometry != null)
|
||||
{
|
||||
minTime = 1e+22;
|
||||
for each(s in this.alternativa3d::_-eW)
|
||||
for each(s in this.alternativa3d::var_92)
|
||||
{
|
||||
data = this.geometry.alternativa3d::intersectRay(origin,direction,s.indexBegin,s.numTriangles);
|
||||
if(data != null && data.time < minTime)
|
||||
@@ -73,26 +73,26 @@ package alternativa.engine3d.objects
|
||||
res.material = material;
|
||||
res.indexBegin = indexBegin;
|
||||
res.numTriangles = numTriangles;
|
||||
var _loc5_:* = this.alternativa3d::_-Oy++;
|
||||
this.alternativa3d::_-eW[_loc5_] = res;
|
||||
var _loc5_:* = this.alternativa3d::var_93++;
|
||||
this.alternativa3d::var_92[_loc5_] = res;
|
||||
return res;
|
||||
}
|
||||
|
||||
public function getSurface(index:int) : Surface
|
||||
{
|
||||
return this.alternativa3d::_-eW[index];
|
||||
return this.alternativa3d::var_92[index];
|
||||
}
|
||||
|
||||
public function get numSurfaces() : int
|
||||
{
|
||||
return this.alternativa3d::_-Oy;
|
||||
return this.alternativa3d::var_93;
|
||||
}
|
||||
|
||||
public function setMaterialToAllSurfaces(material:Material) : void
|
||||
{
|
||||
for(var i:int = 0; i < this.alternativa3d::_-eW.length; i++)
|
||||
for(var i:int = 0; i < this.alternativa3d::var_92.length; i++)
|
||||
{
|
||||
this.alternativa3d::_-eW[i].material = material;
|
||||
this.alternativa3d::var_92[i].material = material;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,9 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
resources[this.geometry] = true;
|
||||
}
|
||||
for(var i:int = 0; i < this.alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < this.alternativa3d::var_93; )
|
||||
{
|
||||
s = this.alternativa3d::_-eW[i];
|
||||
s = this.alternativa3d::var_92[i];
|
||||
if(s.material != null)
|
||||
{
|
||||
s.material.alternativa3d::fillResources(resources,resourceType);
|
||||
@@ -133,9 +133,9 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
var surface:Surface = null;
|
||||
var debug:int = 0;
|
||||
for(var i:int = 0; i < this.alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < this.alternativa3d::var_93; )
|
||||
{
|
||||
surface = this.alternativa3d::_-eW[i];
|
||||
surface = this.alternativa3d::var_92[i];
|
||||
if(surface.material != null)
|
||||
{
|
||||
surface.material.alternativa3d::collectDraws(camera,surface,this.geometry,lights,lightsLength);
|
||||
@@ -159,7 +159,7 @@ package alternativa.engine3d.objects
|
||||
override alternativa3d function collectGeometry(collider:EllipsoidCollider, excludedObjects:Dictionary) : void
|
||||
{
|
||||
collider.alternativa3d::geometries.push(this.geometry);
|
||||
collider.alternativa3d::_-QK.push(alternativa3d::localToGlobalTransform);
|
||||
collider.alternativa3d::name_315.push(alternativa3d::localToGlobalTransform);
|
||||
}
|
||||
|
||||
override public function clone() : Object3D
|
||||
@@ -175,9 +175,9 @@ package alternativa.engine3d.objects
|
||||
super.clonePropertiesFrom(source);
|
||||
var mesh:Mesh = source as Mesh;
|
||||
this.geometry = mesh.geometry;
|
||||
this.alternativa3d::_-Oy = 0;
|
||||
this.alternativa3d::_-eW.length = 0;
|
||||
for each(s in mesh.alternativa3d::_-eW)
|
||||
this.alternativa3d::var_93 = 0;
|
||||
this.alternativa3d::var_92.length = 0;
|
||||
for each(s in mesh.alternativa3d::var_92)
|
||||
{
|
||||
this.addSurface(s.material,s.indexBegin,s.numTriangles);
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ package alternativa.engine3d.objects
|
||||
|
||||
private static var _deltaTransformProcedures:Dictionary = new Dictionary();
|
||||
|
||||
public var §_-WA§:Vector.<Joint>;
|
||||
public var var_633:Vector.<Joint>;
|
||||
|
||||
alternativa3d var §_-Cq§:Vector.<Vector.<Joint>>;
|
||||
alternativa3d var var_630:Vector.<Vector.<Joint>>;
|
||||
|
||||
alternativa3d var §_-fB§:Vector.<Procedure>;
|
||||
alternativa3d var var_631:Vector.<Procedure>;
|
||||
|
||||
alternativa3d var §do §:Vector.<Procedure>;
|
||||
alternativa3d var var_632:Vector.<Procedure>;
|
||||
|
||||
private var numJoints:int = 0;
|
||||
|
||||
@@ -41,19 +41,19 @@ package alternativa.engine3d.objects
|
||||
super();
|
||||
this.numJoints = numJoints;
|
||||
this.maxInfluences = maxInfluences;
|
||||
this.§_-WA§ = new Vector.<Joint>();
|
||||
this.alternativa3d::_-Cq = new Vector.<Vector.<Joint>>();
|
||||
this.alternativa3d::_-fB = new Vector.<Procedure>();
|
||||
this.alternativa3d::do = new Vector.<Procedure>();
|
||||
this.var_633 = new Vector.<Joint>();
|
||||
this.alternativa3d::var_630 = new Vector.<Vector.<Joint>>();
|
||||
this.alternativa3d::var_631 = new Vector.<Procedure>();
|
||||
this.alternativa3d::var_632 = new Vector.<Procedure>();
|
||||
alternativa3d::transformProcedure = this.calculateTransformProcedure(maxInfluences,numJoints);
|
||||
alternativa3d::deltaTransformProcedure = this.calculateDeltaTransformProcedure(maxInfluences,numJoints);
|
||||
}
|
||||
|
||||
override public function addSurface(material:Material, indexBegin:uint, numTriangles:uint) : Surface
|
||||
{
|
||||
this.alternativa3d::_-fB[alternativa3d::_-Oy] = alternativa3d::transformProcedure;
|
||||
this.alternativa3d::do [alternativa3d::_-Oy] = alternativa3d::deltaTransformProcedure;
|
||||
this.alternativa3d::_-Cq[alternativa3d::_-Oy] = this.§_-WA§;
|
||||
this.alternativa3d::var_631[alternativa3d::var_93] = alternativa3d::transformProcedure;
|
||||
this.alternativa3d::var_632[alternativa3d::var_93] = alternativa3d::deltaTransformProcedure;
|
||||
this.alternativa3d::var_630[alternativa3d::var_93] = this.var_633;
|
||||
return super.addSurface(material,indexBegin,numTriangles);
|
||||
}
|
||||
|
||||
@@ -340,16 +340,16 @@ package alternativa.engine3d.objects
|
||||
var lastMaxIndex:uint = 0;
|
||||
var lastSurfaceIndex:uint = 0;
|
||||
var lastIndicesCount:uint = 0;
|
||||
this.alternativa3d::_-Cq.length = 0;
|
||||
this.alternativa3d::var_630.length = 0;
|
||||
var jointsBufferNumMappings:int = int(geometry.alternativa3d::_vertexStreams[jointsBuffer].attributes.length);
|
||||
var jointsBufferData:ByteArray = geometry.alternativa3d::_vertexStreams[jointsBuffer].data;
|
||||
for(var i:int = 0; i < alternativa3d::_-Oy; i++)
|
||||
for(var i:int = 0; i < alternativa3d::var_93; i++)
|
||||
{
|
||||
outIndices = new Vector.<uint>();
|
||||
outVertices = new ByteArray();
|
||||
outJointsMaps = new Vector.<Dictionary>();
|
||||
outVertices.endian = Endian.LITTLE_ENDIAN;
|
||||
maxIndex = this.divideSurface(limit,iterations,alternativa3d::_-eW[i],jointsOffsets,jointsBufferNumMappings * 4,jointsBufferData,outVertices,outIndices,outSurfaces,outJointsMaps);
|
||||
maxIndex = this.divideSurface(limit,iterations,alternativa3d::var_92[i],jointsOffsets,jointsBufferNumMappings * 4,jointsBufferData,outVertices,outIndices,outSurfaces,outJointsMaps);
|
||||
for(j = 0,count = int(outIndices.length); j < count; j++)
|
||||
{
|
||||
var _loc31_:* = totalIndicesLength++;
|
||||
@@ -358,7 +358,7 @@ package alternativa.engine3d.objects
|
||||
for(j = 0,count = int(outJointsMaps.length); j < count; j++)
|
||||
{
|
||||
maxJoints = 0;
|
||||
vec = this.alternativa3d::_-Cq[j + lastSurfaceIndex] = new Vector.<Joint>();
|
||||
vec = this.alternativa3d::var_630[j + lastSurfaceIndex] = new Vector.<Joint>();
|
||||
joints = outJointsMaps[j];
|
||||
for(key in joints)
|
||||
{
|
||||
@@ -367,7 +367,7 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
vec.length = index + 1;
|
||||
}
|
||||
vec[index] = this.§_-WA§[uint(key / 3)];
|
||||
vec[index] = this.var_633[uint(key / 3)];
|
||||
maxJoints++;
|
||||
}
|
||||
}
|
||||
@@ -380,14 +380,14 @@ package alternativa.engine3d.objects
|
||||
totalVertices.writeBytes(outVertices,0,outVertices.length);
|
||||
lastMaxIndex += maxIndex;
|
||||
}
|
||||
alternativa3d::_-eW = outSurfaces;
|
||||
alternativa3d::_-Oy = outSurfaces.length;
|
||||
this.alternativa3d::_-fB.length = alternativa3d::_-Oy;
|
||||
this.alternativa3d::do .length = alternativa3d::_-Oy;
|
||||
for(i = 0; i < alternativa3d::_-Oy; i++)
|
||||
alternativa3d::var_92 = outSurfaces;
|
||||
alternativa3d::var_93 = outSurfaces.length;
|
||||
this.alternativa3d::var_631.length = alternativa3d::var_93;
|
||||
this.alternativa3d::var_632.length = alternativa3d::var_93;
|
||||
for(i = 0; i < alternativa3d::var_93; i++)
|
||||
{
|
||||
this.alternativa3d::_-fB[i] = this.calculateTransformProcedure(this.maxInfluences,this.alternativa3d::_-Cq[i].length);
|
||||
this.alternativa3d::do [i] = this.calculateDeltaTransformProcedure(this.maxInfluences,this.alternativa3d::_-Cq[i].length);
|
||||
this.alternativa3d::var_631[i] = this.calculateTransformProcedure(this.maxInfluences,this.alternativa3d::var_630[i].length);
|
||||
this.alternativa3d::var_632[i] = this.calculateDeltaTransformProcedure(this.maxInfluences,this.alternativa3d::var_630[i].length);
|
||||
}
|
||||
var newGeometry:Geometry = new Geometry();
|
||||
newGeometry.alternativa3d::_indices = totalIndices;
|
||||
@@ -453,11 +453,11 @@ package alternativa.engine3d.objects
|
||||
this.calculateJointsTransforms(child);
|
||||
child = child.alternativa3d::next;
|
||||
}
|
||||
for(var i:int = 0; i < alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < alternativa3d::var_93; )
|
||||
{
|
||||
surface = alternativa3d::_-eW[i];
|
||||
alternativa3d::transformProcedure = this.alternativa3d::_-fB[i];
|
||||
alternativa3d::deltaTransformProcedure = this.alternativa3d::do [i];
|
||||
surface = alternativa3d::var_92[i];
|
||||
alternativa3d::transformProcedure = this.alternativa3d::var_631[i];
|
||||
alternativa3d::deltaTransformProcedure = this.alternativa3d::var_632[i];
|
||||
if(surface.material != null)
|
||||
{
|
||||
surface.material.alternativa3d::collectDraws(camera,surface,geometry,lights,lightsLength);
|
||||
@@ -489,12 +489,12 @@ package alternativa.engine3d.objects
|
||||
attribute = int(VertexAttributes.JOINTS[i >> 1]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(vertexShader.getVariableIndex("joint" + i.toString()),geometry.alternativa3d::getVertexBuffer(attribute),geometry.alternativa3d::_attributesOffsets[attribute],VertexAttributes.alternativa3d::FORMATS[attribute]);
|
||||
}
|
||||
var surfaceIndex:int = int(alternativa3d::_-eW.indexOf(surface));
|
||||
var joints:Vector.<Joint> = this.alternativa3d::_-Cq[surfaceIndex];
|
||||
var surfaceIndex:int = int(alternativa3d::var_92.indexOf(surface));
|
||||
var joints:Vector.<Joint> = this.alternativa3d::var_630[surfaceIndex];
|
||||
for(i = 0,count = int(joints.length); i < count; i++)
|
||||
{
|
||||
joint = joints[i];
|
||||
drawUnit.alternativa3d::setVertexConstantsFromTransform(i * 3,joint.alternativa3d::_-Dy);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromTransform(i * 3,joint.alternativa3d::name_549);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,15 +618,15 @@ package alternativa.engine3d.objects
|
||||
{
|
||||
super.clonePropertiesFrom(source);
|
||||
var skin:Skin = Skin(source);
|
||||
if(skin.§_-WA§ != null)
|
||||
if(skin.var_633 != null)
|
||||
{
|
||||
this.§_-WA§ = this.cloneJointsVector(skin.§_-WA§,skin);
|
||||
this.var_633 = this.cloneJointsVector(skin.var_633,skin);
|
||||
}
|
||||
for(var i:int = 0; i < alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < alternativa3d::var_93; )
|
||||
{
|
||||
this.alternativa3d::_-Cq[i] = this.cloneJointsVector(skin.alternativa3d::_-Cq[i],skin);
|
||||
this.alternativa3d::_-fB[i] = this.calculateTransformProcedure(this.maxInfluences,this.alternativa3d::_-Cq[i].length);
|
||||
this.alternativa3d::do [i] = this.calculateDeltaTransformProcedure(this.maxInfluences,this.alternativa3d::_-Cq[i].length);
|
||||
this.alternativa3d::var_630[i] = this.cloneJointsVector(skin.alternativa3d::var_630[i],skin);
|
||||
this.alternativa3d::var_631[i] = this.calculateTransformProcedure(this.maxInfluences,this.alternativa3d::var_630[i].length);
|
||||
this.alternativa3d::var_632[i] = this.calculateDeltaTransformProcedure(this.maxInfluences,this.alternativa3d::var_630[i].length);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,17 +30,17 @@ package alternativa.engine3d.objects
|
||||
|
||||
private static var transformProcedureStatic:Procedure = new Procedure(["sub t0.xyz, i0.xyz, c0.xyz","mul t0.x, t0.x, c0.w","mul t0.y, t0.y, c0.w","mul t0.z, t0.z, c0.w","add o0.xyz, t0.xyz, c0.xyz","mov o0.w, i0.w","#c0=cTrans"]);
|
||||
|
||||
private var §_-gj§:Surface;
|
||||
private var var_98:Surface;
|
||||
|
||||
private var §_-69§:Surface;
|
||||
private var var_95:Surface;
|
||||
|
||||
private var §_-EB§:Surface;
|
||||
private var var_96:Surface;
|
||||
|
||||
private var §_-iw§:Surface;
|
||||
private var var_99:Surface;
|
||||
|
||||
private var §_-1V§:Surface;
|
||||
private var var_94:Surface;
|
||||
|
||||
private var §_-Oz§:Surface;
|
||||
private var var_97:Surface;
|
||||
|
||||
private var size:Number;
|
||||
|
||||
@@ -60,21 +60,21 @@ package alternativa.engine3d.objects
|
||||
geometry.setAttributeValues(VertexAttributes.POSITION,Vector.<Number>([-size,-size,size,-size,-size,-size,-size,size,-size,-size,size,size,size,size,size,size,size,-size,size,-size,-size,size,-size,size,size,-size,size,size,-size,-size,-size,-size,-size,-size,-size,size,-size,size,size,-size,size,-size,size,size,-size,size,size,size,-size,size,-size,-size,-size,-size,size,-size,-size,size,size,-size,-size,-size,size,-size,size,size,size,size,size,size,-size,size]));
|
||||
geometry.setAttributeValues(VertexAttributes.TEXCOORDS[0],Vector.<Number>([uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding,uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding,uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding,uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding,uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding,uvPadding,uvPadding,uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,1 - uvPadding,uvPadding]));
|
||||
geometry.indices = Vector.<uint>([0,1,3,2,3,1,4,5,7,6,7,5,8,9,11,10,11,9,12,13,15,14,15,13,16,17,19,18,19,17,20,21,23,22,23,21]);
|
||||
this.§_-gj§ = addSurface(left,0,2);
|
||||
this.§_-69§ = addSurface(right,6,2);
|
||||
this.§_-EB§ = addSurface(back,12,2);
|
||||
this.§_-iw§ = addSurface(front,18,2);
|
||||
this.§_-1V§ = addSurface(bottom,24,2);
|
||||
this.§_-Oz§ = addSurface(top,30,2);
|
||||
this.var_98 = addSurface(left,0,2);
|
||||
this.var_95 = addSurface(right,6,2);
|
||||
this.var_96 = addSurface(back,12,2);
|
||||
this.var_99 = addSurface(front,18,2);
|
||||
this.var_94 = addSurface(bottom,24,2);
|
||||
this.var_97 = addSurface(top,30,2);
|
||||
alternativa3d::transformProcedure = transformProcedureStatic;
|
||||
}
|
||||
|
||||
override alternativa3d function collectDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int) : void
|
||||
{
|
||||
var surface:Surface = null;
|
||||
for(var i:int = 0; i < alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < alternativa3d::var_93; )
|
||||
{
|
||||
surface = alternativa3d::_-eW[i];
|
||||
surface = alternativa3d::var_92[i];
|
||||
if(surface.material != null)
|
||||
{
|
||||
surface.material.alternativa3d::collectDraws(camera,surface,geometry,lights,lightsLength,RenderPriority.SKY);
|
||||
@@ -166,17 +166,17 @@ package alternativa.engine3d.objects
|
||||
switch(side)
|
||||
{
|
||||
case LEFT:
|
||||
return this.§_-gj§;
|
||||
return this.var_98;
|
||||
case RIGHT:
|
||||
return this.§_-69§;
|
||||
return this.var_95;
|
||||
case BACK:
|
||||
return this.§_-EB§;
|
||||
return this.var_96;
|
||||
case FRONT:
|
||||
return this.§_-iw§;
|
||||
return this.var_99;
|
||||
case BOTTOM:
|
||||
return this.§_-1V§;
|
||||
return this.var_94;
|
||||
case TOP:
|
||||
return this.§_-Oz§;
|
||||
return this.var_97;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -195,33 +195,33 @@ package alternativa.engine3d.objects
|
||||
var newSurface:Surface = null;
|
||||
super.clonePropertiesFrom(source);
|
||||
var src:SkyBox = source as SkyBox;
|
||||
for(var i:int = 0; i < src.alternativa3d::_-Oy; )
|
||||
for(var i:int = 0; i < src.alternativa3d::var_93; )
|
||||
{
|
||||
surface = src.alternativa3d::_-eW[i];
|
||||
newSurface = alternativa3d::_-eW[i];
|
||||
if(surface == src.§_-gj§)
|
||||
surface = src.alternativa3d::var_92[i];
|
||||
newSurface = alternativa3d::var_92[i];
|
||||
if(surface == src.var_98)
|
||||
{
|
||||
this.§_-gj§ = newSurface;
|
||||
this.var_98 = newSurface;
|
||||
}
|
||||
else if(surface == src.§_-69§)
|
||||
else if(surface == src.var_95)
|
||||
{
|
||||
this.§_-69§ = newSurface;
|
||||
this.var_95 = newSurface;
|
||||
}
|
||||
else if(surface == src.§_-EB§)
|
||||
else if(surface == src.var_96)
|
||||
{
|
||||
this.§_-EB§ = newSurface;
|
||||
this.var_96 = newSurface;
|
||||
}
|
||||
else if(surface == src.§_-iw§)
|
||||
else if(surface == src.var_99)
|
||||
{
|
||||
this.§_-iw§ = newSurface;
|
||||
this.var_99 = newSurface;
|
||||
}
|
||||
else if(surface == src.§_-1V§)
|
||||
else if(surface == src.var_94)
|
||||
{
|
||||
this.§_-1V§ = newSurface;
|
||||
this.var_94 = newSurface;
|
||||
}
|
||||
else if(surface == src.§_-Oz§)
|
||||
else if(surface == src.var_97)
|
||||
{
|
||||
this.§_-Oz§ = newSurface;
|
||||
this.var_97 = newSurface;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ package alternativa.engine3d.objects
|
||||
|
||||
public var thickness:Number = 1;
|
||||
|
||||
alternativa3d var §_-lc§:Vector.<Number> = new Vector.<Number>(4,true);
|
||||
alternativa3d var var_625:Vector.<Number> = new Vector.<Number>(4,true);
|
||||
|
||||
alternativa3d var geometry:WireGeometry;
|
||||
|
||||
@@ -181,24 +181,24 @@ package alternativa.engine3d.objects
|
||||
|
||||
public function get alpha() : Number
|
||||
{
|
||||
return this.alternativa3d::_-lc[3];
|
||||
return this.alternativa3d::var_625[3];
|
||||
}
|
||||
|
||||
public function set alpha(value:Number) : void
|
||||
{
|
||||
this.alternativa3d::_-lc[3] = value;
|
||||
this.alternativa3d::var_625[3] = value;
|
||||
}
|
||||
|
||||
public function get color() : uint
|
||||
{
|
||||
return this.alternativa3d::_-lc[0] * 255 << 16 | this.alternativa3d::_-lc[1] * 255 << 8 | this.alternativa3d::_-lc[2] * 255;
|
||||
return this.alternativa3d::var_625[0] * 255 << 16 | this.alternativa3d::var_625[1] * 255 << 8 | this.alternativa3d::var_625[2] * 255;
|
||||
}
|
||||
|
||||
public function set color(value:uint) : void
|
||||
{
|
||||
this.alternativa3d::_-lc[0] = (value >> 16 & 0xFF) / 255;
|
||||
this.alternativa3d::_-lc[1] = (value >> 8 & 0xFF) / 255;
|
||||
this.alternativa3d::_-lc[2] = (value & 0xFF) / 255;
|
||||
this.alternativa3d::var_625[0] = (value >> 16 & 0xFF) / 255;
|
||||
this.alternativa3d::var_625[1] = (value >> 8 & 0xFF) / 255;
|
||||
this.alternativa3d::var_625[2] = (value & 0xFF) / 255;
|
||||
}
|
||||
|
||||
override alternativa3d function updateBoundBox(boundBox:BoundBox, hierarchy:Boolean, transform:Transform3D = null) : void
|
||||
@@ -212,7 +212,7 @@ package alternativa.engine3d.objects
|
||||
|
||||
override alternativa3d function collectDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int) : void
|
||||
{
|
||||
this.alternativa3d::geometry.alternativa3d::getDrawUnits(camera,this.alternativa3d::_-lc,this.thickness,this,alternativa3d::shaderProgram);
|
||||
this.alternativa3d::geometry.alternativa3d::getDrawUnits(camera,this.alternativa3d::var_625,this.thickness,this,alternativa3d::shaderProgram);
|
||||
}
|
||||
|
||||
override alternativa3d function fillResources(resources:Dictionary, hierarchy:Boolean = false, resourceType:Class = null) : void
|
||||
|
||||
@@ -21,17 +21,17 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
alternativa3d var _vertexStreams:Vector.<VertexStream> = new Vector.<VertexStream>();
|
||||
|
||||
alternativa3d var §_-EM§:IndexBuffer3D;
|
||||
alternativa3d var name_78:IndexBuffer3D;
|
||||
|
||||
alternativa3d var _numVertices:int;
|
||||
|
||||
alternativa3d var _indices:Vector.<uint> = new Vector.<uint>();
|
||||
|
||||
alternativa3d var §_-GM§:Vector.<VertexStream> = new Vector.<VertexStream>();
|
||||
alternativa3d var var_170:Vector.<VertexStream> = new Vector.<VertexStream>();
|
||||
|
||||
alternativa3d var _attributesOffsets:Vector.<int> = new Vector.<int>();
|
||||
|
||||
private var §_-QD§:Vector.<int> = new Vector.<int>();
|
||||
private var var_171:Vector.<int> = new Vector.<int>();
|
||||
|
||||
public function Geometry(numVertices:int = 0)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
if(attribute != 0)
|
||||
{
|
||||
if(attribute < this.alternativa3d::_-GM.length && this.alternativa3d::_-GM[attribute] != null)
|
||||
if(attribute < this.alternativa3d::var_170.length && this.alternativa3d::var_170[attribute] != null)
|
||||
{
|
||||
throw new Error("Attribute " + attribute + " already used in this geometry.");
|
||||
}
|
||||
@@ -111,16 +111,16 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
throw new Error("Standard attributes must be predefined size.");
|
||||
}
|
||||
if(this.alternativa3d::_-GM.length < attribute)
|
||||
if(this.alternativa3d::var_170.length < attribute)
|
||||
{
|
||||
this.alternativa3d::_-GM.length = attribute + 1;
|
||||
this.alternativa3d::var_170.length = attribute + 1;
|
||||
this.alternativa3d::_attributesOffsets.length = attribute + 1;
|
||||
this.§_-QD§.length = attribute + 1;
|
||||
this.var_171.length = attribute + 1;
|
||||
}
|
||||
startIndex = i - stride;
|
||||
this.alternativa3d::_-GM[attribute] = vBuffer;
|
||||
this.alternativa3d::var_170[attribute] = vBuffer;
|
||||
this.alternativa3d::_attributesOffsets[attribute] = startIndex;
|
||||
this.§_-QD§[attribute] = stride;
|
||||
this.var_171[attribute] = stride;
|
||||
}
|
||||
stride = 1;
|
||||
}
|
||||
@@ -150,13 +150,13 @@ package alternativa.engine3d.resources
|
||||
|
||||
public function hasAttribute(attribute:uint) : Boolean
|
||||
{
|
||||
return attribute < this.alternativa3d::_-GM.length && this.alternativa3d::_-GM[attribute] != null;
|
||||
return attribute < this.alternativa3d::var_170.length && this.alternativa3d::var_170[attribute] != null;
|
||||
}
|
||||
|
||||
public function findVertexStreamByAttribute(attribute:uint) : int
|
||||
{
|
||||
var i:int = 0;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::_-GM.length ? this.alternativa3d::_-GM[attribute] : null;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::var_170.length ? this.alternativa3d::var_170[attribute] : null;
|
||||
if(vBuffer != null)
|
||||
{
|
||||
for(i = 0; i < this.alternativa3d::_vertexStreams.length; )
|
||||
@@ -173,7 +173,7 @@ package alternativa.engine3d.resources
|
||||
|
||||
public function getAttributeOffset(attribute:uint) : int
|
||||
{
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::_-GM.length ? this.alternativa3d::_-GM[attribute] : null;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::var_170.length ? this.alternativa3d::var_170[attribute] : null;
|
||||
if(vBuffer == null)
|
||||
{
|
||||
throw new Error("Attribute not found.");
|
||||
@@ -185,12 +185,12 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
var srcIndex:int = 0;
|
||||
var j:int = 0;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::_-GM.length ? this.alternativa3d::_-GM[attribute] : null;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::var_170.length ? this.alternativa3d::var_170[attribute] : null;
|
||||
if(vBuffer == null)
|
||||
{
|
||||
throw new Error("Attribute not found.");
|
||||
}
|
||||
var stride:int = this.§_-QD§[attribute];
|
||||
var stride:int = this.var_171[attribute];
|
||||
if(values == null || values.length != stride * this.alternativa3d::_numVertices)
|
||||
{
|
||||
throw new Error("Values count must be the same.");
|
||||
@@ -213,13 +213,13 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
var dstIndex:int = 0;
|
||||
var j:int = 0;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::_-GM.length ? this.alternativa3d::_-GM[attribute] : null;
|
||||
var vBuffer:VertexStream = attribute < this.alternativa3d::var_170.length ? this.alternativa3d::var_170[attribute] : null;
|
||||
if(vBuffer == null)
|
||||
{
|
||||
throw new Error("Attribute not found.");
|
||||
}
|
||||
var data:ByteArray = vBuffer.data;
|
||||
var stride:int = this.§_-QD§[attribute];
|
||||
var stride:int = this.var_171[attribute];
|
||||
var result:Vector.<Number> = new Vector.<Number>(stride * this.alternativa3d::_numVertices);
|
||||
var numMappings:int = int(vBuffer.attributes.length);
|
||||
var offset:int = this.alternativa3d::_attributesOffsets[attribute];
|
||||
@@ -237,7 +237,7 @@ package alternativa.engine3d.resources
|
||||
|
||||
override public function get isUploaded() : Boolean
|
||||
{
|
||||
return this.alternativa3d::_-EM != null;
|
||||
return this.alternativa3d::name_78 != null;
|
||||
}
|
||||
|
||||
override public function upload(context3D:Context3D) : void
|
||||
@@ -247,10 +247,10 @@ package alternativa.engine3d.resources
|
||||
var numMappings:int = 0;
|
||||
var data:ByteArray = null;
|
||||
var numBuffers:int = int(this.alternativa3d::_vertexStreams.length);
|
||||
if(this.alternativa3d::_-EM != null)
|
||||
if(this.alternativa3d::name_78 != null)
|
||||
{
|
||||
this.alternativa3d::_-EM.dispose();
|
||||
this.alternativa3d::_-EM = null;
|
||||
this.alternativa3d::name_78.dispose();
|
||||
this.alternativa3d::name_78 = null;
|
||||
for(i = 0; i < numBuffers; i++)
|
||||
{
|
||||
vBuffer = this.alternativa3d::_vertexStreams[i];
|
||||
@@ -276,8 +276,8 @@ package alternativa.engine3d.resources
|
||||
i++;
|
||||
}
|
||||
var numIndices:int = int(this.alternativa3d::_indices.length);
|
||||
this.alternativa3d::_-EM = context3D.createIndexBuffer(numIndices);
|
||||
this.alternativa3d::_-EM.uploadFromVector(this.alternativa3d::_indices,0,numIndices);
|
||||
this.alternativa3d::name_78 = context3D.createIndexBuffer(numIndices);
|
||||
this.alternativa3d::name_78.uploadFromVector(this.alternativa3d::_indices,0,numIndices);
|
||||
}
|
||||
|
||||
override public function dispose() : void
|
||||
@@ -285,10 +285,10 @@ package alternativa.engine3d.resources
|
||||
var numBuffers:int = 0;
|
||||
var i:int = 0;
|
||||
var vBuffer:VertexStream = null;
|
||||
if(this.alternativa3d::_-EM != null)
|
||||
if(this.alternativa3d::name_78 != null)
|
||||
{
|
||||
this.alternativa3d::_-EM.dispose();
|
||||
this.alternativa3d::_-EM = null;
|
||||
this.alternativa3d::name_78.dispose();
|
||||
this.alternativa3d::name_78 = null;
|
||||
numBuffers = int(this.alternativa3d::_vertexStreams.length);
|
||||
for(i = 0; i < numBuffers; i++)
|
||||
{
|
||||
@@ -301,25 +301,25 @@ package alternativa.engine3d.resources
|
||||
|
||||
public function updateIndexBufferInContextFromVector(data:Vector.<uint>, startOffset:int, count:int) : void
|
||||
{
|
||||
if(this.alternativa3d::_-EM == null)
|
||||
if(this.alternativa3d::name_78 == null)
|
||||
{
|
||||
throw new Error("Geometry must be uploaded.");
|
||||
}
|
||||
this.alternativa3d::_-EM.uploadFromVector(data,startOffset,count);
|
||||
this.alternativa3d::name_78.uploadFromVector(data,startOffset,count);
|
||||
}
|
||||
|
||||
public function updateIndexBufferInContextFromByteArray(data:ByteArray, byteArrayOffset:int, startOffset:int, count:int) : void
|
||||
{
|
||||
if(this.alternativa3d::_-EM == null)
|
||||
if(this.alternativa3d::name_78 == null)
|
||||
{
|
||||
throw new Error("Geometry must be uploaded.");
|
||||
}
|
||||
this.alternativa3d::_-EM.uploadFromByteArray(data,byteArrayOffset,startOffset,count);
|
||||
this.alternativa3d::name_78.uploadFromByteArray(data,byteArrayOffset,startOffset,count);
|
||||
}
|
||||
|
||||
public function updateVertexBufferInContextFromVector(index:int, data:Vector.<Number>, startVertex:int, numVertices:int) : void
|
||||
{
|
||||
if(this.alternativa3d::_-EM == null)
|
||||
if(this.alternativa3d::name_78 == null)
|
||||
{
|
||||
throw new Error("Geometry must be uploaded.");
|
||||
}
|
||||
@@ -328,7 +328,7 @@ package alternativa.engine3d.resources
|
||||
|
||||
public function updateVertexBufferInContextFromByteArray(index:int, data:ByteArray, byteArrayOffset:int, startVertex:int, numVertices:int) : void
|
||||
{
|
||||
if(this.alternativa3d::_-EM == null)
|
||||
if(this.alternativa3d::name_78 == null)
|
||||
{
|
||||
throw new Error("Geometry must be uploaded.");
|
||||
}
|
||||
@@ -426,14 +426,14 @@ package alternativa.engine3d.resources
|
||||
var minTime:Number = 1e+22;
|
||||
var posAttribute:int = int(VertexAttributes.POSITION);
|
||||
var uvAttribute:int = int(VertexAttributes.TEXCOORDS[0]);
|
||||
if(VertexAttributes.POSITION >= this.alternativa3d::_-GM.length || (positionStream = this.alternativa3d::_-GM[posAttribute]) == null)
|
||||
if(VertexAttributes.POSITION >= this.alternativa3d::var_170.length || (positionStream = this.alternativa3d::var_170[posAttribute]) == null)
|
||||
{
|
||||
throw new Error("Raycast require POSITION attribute");
|
||||
}
|
||||
var positionBuffer:ByteArray = positionStream.data;
|
||||
var positionOffset:uint = uint(this.alternativa3d::_attributesOffsets[posAttribute] * 4);
|
||||
var stride:uint = positionStream.attributes.length * 4;
|
||||
var hasUV:Boolean = uvAttribute < this.alternativa3d::_-GM.length && (uvStream = this.alternativa3d::_-GM[uvAttribute]) != null;
|
||||
var hasUV:Boolean = uvAttribute < this.alternativa3d::var_170.length && (uvStream = this.alternativa3d::var_170[uvAttribute]) != null;
|
||||
if(hasUV)
|
||||
{
|
||||
uvBuffer = uvStream.data;
|
||||
@@ -607,9 +607,9 @@ package alternativa.engine3d.resources
|
||||
alternativa3d function getVertexBuffer(attribute:int) : VertexBuffer3D
|
||||
{
|
||||
var stream:VertexStream = null;
|
||||
if(attribute < this.alternativa3d::_-GM.length)
|
||||
if(attribute < this.alternativa3d::var_170.length)
|
||||
{
|
||||
stream = this.alternativa3d::_-GM[attribute];
|
||||
stream = this.alternativa3d::var_170[attribute];
|
||||
return stream != null ? stream.buffer : null;
|
||||
}
|
||||
return null;
|
||||
@@ -623,7 +623,7 @@ package alternativa.engine3d.resources
|
||||
var x:Number = NaN;
|
||||
var y:Number = NaN;
|
||||
var z:Number = NaN;
|
||||
var vBuffer:VertexStream = VertexAttributes.POSITION < this.alternativa3d::_-GM.length ? this.alternativa3d::_-GM[VertexAttributes.POSITION] : null;
|
||||
var vBuffer:VertexStream = VertexAttributes.POSITION < this.alternativa3d::var_170.length ? this.alternativa3d::var_170[VertexAttributes.POSITION] : null;
|
||||
if(vBuffer == null)
|
||||
{
|
||||
throw new Error("Cannot calculate BoundBox without data.");
|
||||
|
||||
@@ -19,25 +19,25 @@ package alternativa.engine3d.resources
|
||||
|
||||
public class WireGeometry extends Resource
|
||||
{
|
||||
private const §_-VA§:uint = 65500;
|
||||
private const const_6:uint = 65500;
|
||||
|
||||
private const §_-Pp§:Number = 2 * Math.tan(Math.PI / 6);
|
||||
private const const_5:Number = 2 * Math.tan(Math.PI / 6);
|
||||
|
||||
private const §_-SS§:uint = 7;
|
||||
private const const_4:uint = 7;
|
||||
|
||||
alternativa3d var vertexBuffers:Vector.<VertexBuffer3D>;
|
||||
|
||||
alternativa3d var indexBuffers:Vector.<IndexBuffer3D>;
|
||||
|
||||
private var §_-Rz§:Vector.<int>;
|
||||
private var var_688:Vector.<int>;
|
||||
|
||||
private var vertices:Vector.<Vector.<Number>>;
|
||||
|
||||
private var indices:Vector.<Vector.<uint>>;
|
||||
|
||||
private var §_-ix§:int = 0;
|
||||
private var var_686:int = 0;
|
||||
|
||||
private var §_-dP§:uint = 0;
|
||||
private var var_687:uint = 0;
|
||||
|
||||
public function WireGeometry()
|
||||
{
|
||||
@@ -53,7 +53,7 @@ package alternativa.engine3d.resources
|
||||
var inds:Vector.<uint> = null;
|
||||
var vBuffer:VertexBuffer3D = null;
|
||||
var iBuffer:IndexBuffer3D = null;
|
||||
for(var i:int = 0; i <= this.§_-ix§; )
|
||||
for(var i:int = 0; i <= this.var_686; )
|
||||
{
|
||||
if(this.alternativa3d::vertexBuffers[i] != null)
|
||||
{
|
||||
@@ -63,12 +63,12 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
this.alternativa3d::indexBuffers[i].dispose();
|
||||
}
|
||||
if(this.§_-Rz§[i] > 0)
|
||||
if(this.var_688[i] > 0)
|
||||
{
|
||||
verts = this.vertices[i];
|
||||
inds = this.indices[i];
|
||||
vBuffer = this.alternativa3d::vertexBuffers[i] = context3D.createVertexBuffer(verts.length / this.§_-SS§,this.§_-SS§);
|
||||
vBuffer.uploadFromVector(verts,0,verts.length / this.§_-SS§);
|
||||
vBuffer = this.alternativa3d::vertexBuffers[i] = context3D.createVertexBuffer(verts.length / this.const_4,this.const_4);
|
||||
vBuffer.uploadFromVector(verts,0,verts.length / this.const_4);
|
||||
iBuffer = this.alternativa3d::indexBuffers[i] = context3D.createIndexBuffer(inds.length);
|
||||
iBuffer.uploadFromVector(inds,0,inds.length);
|
||||
}
|
||||
@@ -78,7 +78,7 @@ package alternativa.engine3d.resources
|
||||
|
||||
override public function dispose() : void
|
||||
{
|
||||
for(var i:int = 0; i <= this.§_-ix§; )
|
||||
for(var i:int = 0; i <= this.var_686; )
|
||||
{
|
||||
if(this.alternativa3d::vertexBuffers[i] != null)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ package alternativa.engine3d.resources
|
||||
|
||||
override public function get isUploaded() : Boolean
|
||||
{
|
||||
for(var i:int = 0; i <= this.§_-ix§; )
|
||||
for(var i:int = 0; i <= this.var_686; )
|
||||
{
|
||||
if(this.alternativa3d::vertexBuffers[i] == null)
|
||||
{
|
||||
@@ -118,8 +118,8 @@ package alternativa.engine3d.resources
|
||||
this.indices = new Vector.<Vector.<uint>>();
|
||||
this.vertices[0] = new Vector.<Number>();
|
||||
this.indices[0] = new Vector.<uint>();
|
||||
this.§_-Rz§ = new Vector.<int>(1);
|
||||
this.§_-dP§ = 0;
|
||||
this.var_688 = new Vector.<int>(1);
|
||||
this.var_687 = 0;
|
||||
}
|
||||
|
||||
alternativa3d function updateBoundBox(boundBox:BoundBox, transform:Transform3D = null) : void
|
||||
@@ -177,7 +177,7 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
boundBox.maxZ = z;
|
||||
}
|
||||
j += this.§_-SS§;
|
||||
j += this.const_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,17 +191,17 @@ package alternativa.engine3d.resources
|
||||
{
|
||||
shader.upload(camera.alternativa3d::context3D);
|
||||
}
|
||||
for(var i:int = 0; i <= this.§_-ix§; )
|
||||
for(var i:int = 0; i <= this.var_686; )
|
||||
{
|
||||
iBuffer = this.alternativa3d::indexBuffers[i];
|
||||
vBuffer = this.alternativa3d::vertexBuffers[i];
|
||||
if(iBuffer != null && vBuffer != null)
|
||||
{
|
||||
drawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,shader.program,iBuffer,0,this.§_-Rz§[i],shader);
|
||||
drawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,shader.program,iBuffer,0,this.var_688[i],shader);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(0,vBuffer,0,Context3DVertexBufferFormat.FLOAT_4);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(1,vBuffer,4,Context3DVertexBufferFormat.FLOAT_3);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromNumbers(0,0,1,-1,0.000001);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromNumbers(1,-this.§_-Pp§ / camera.view.alternativa3d::_height,0,camera.nearClipping,thickness);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromNumbers(1,-this.const_5 / camera.view.alternativa3d::_height,0,camera.nearClipping,thickness);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromTransform(2,object.alternativa3d::localToCameraTransform);
|
||||
drawUnit.alternativa3d::setProjectionConstants(camera,5);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(0,color[0],color[1],color[2],color[3]);
|
||||
@@ -222,26 +222,26 @@ package alternativa.engine3d.resources
|
||||
|
||||
alternativa3d function addLine(v1x:Number, v1y:Number, v1z:Number, v2x:Number, v2y:Number, v2z:Number) : void
|
||||
{
|
||||
var currentVertices:Vector.<Number> = this.vertices[this.§_-ix§];
|
||||
var currentIndices:Vector.<uint> = this.indices[this.§_-ix§];
|
||||
var verticesCount:uint = currentVertices.length / this.§_-SS§;
|
||||
if(verticesCount > this.§_-VA§ - 4)
|
||||
var currentVertices:Vector.<Number> = this.vertices[this.var_686];
|
||||
var currentIndices:Vector.<uint> = this.indices[this.var_686];
|
||||
var verticesCount:uint = currentVertices.length / this.const_4;
|
||||
if(verticesCount > this.const_6 - 4)
|
||||
{
|
||||
this.§_-dP§ = 0;
|
||||
++this.§_-ix§;
|
||||
this.§_-Rz§[this.§_-ix§] = 0;
|
||||
currentVertices = this.vertices[this.§_-ix§] = new Vector.<Number>();
|
||||
currentIndices = this.indices[this.§_-ix§] = new Vector.<uint>();
|
||||
this.alternativa3d::vertexBuffers.length = this.§_-ix§ + 1;
|
||||
this.alternativa3d::indexBuffers.length = this.§_-ix§ + 1;
|
||||
this.var_687 = 0;
|
||||
++this.var_686;
|
||||
this.var_688[this.var_686] = 0;
|
||||
currentVertices = this.vertices[this.var_686] = new Vector.<Number>();
|
||||
currentIndices = this.indices[this.var_686] = new Vector.<uint>();
|
||||
this.alternativa3d::vertexBuffers.length = this.var_686 + 1;
|
||||
this.alternativa3d::indexBuffers.length = this.var_686 + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-Rz§[this.§_-ix§] += 2;
|
||||
this.var_688[this.var_686] += 2;
|
||||
}
|
||||
currentVertices.push(v1x,v1y,v1z,0.5,v2x,v2y,v2z,v2x,v2y,v2z,-0.5,v1x,v1y,v1z,v1x,v1y,v1z,-0.5,v2x,v2y,v2z,v2x,v2y,v2z,0.5,v1x,v1y,v1z);
|
||||
currentIndices.push(this.§_-dP§,this.§_-dP§ + 1,this.§_-dP§ + 2,this.§_-dP§ + 3,this.§_-dP§ + 2,this.§_-dP§ + 1);
|
||||
this.§_-dP§ += 4;
|
||||
currentIndices.push(this.var_687,this.var_687 + 1,this.var_687 + 2,this.var_687 + 3,this.var_687 + 2,this.var_687 + 1);
|
||||
this.var_687 += 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,31 +49,31 @@ package alternativa.engine3d.shadows
|
||||
|
||||
public var offset:Vector3D = new Vector3D();
|
||||
|
||||
public var §_-qg§:Object3D;
|
||||
public var var_235:Object3D;
|
||||
|
||||
private var context:Context3D;
|
||||
|
||||
private var shadowMap:Texture;
|
||||
|
||||
private var §_-FQ§:Number;
|
||||
private var var_236:Number;
|
||||
|
||||
private var light:DirectionalLight;
|
||||
|
||||
alternativa3d var §_-UK§:Matrix3D = new Matrix3D();
|
||||
alternativa3d var var_238:Matrix3D = new Matrix3D();
|
||||
|
||||
private var debugObject:Mesh;
|
||||
|
||||
public var §_-Vg§:TextureMaterial = new TextureMaterial();
|
||||
public var var_237:TextureMaterial = new TextureMaterial();
|
||||
|
||||
private var §_-Ez§:TextureResource = new ExternalTextureResource("null");
|
||||
private var var_239:TextureResource = new ExternalTextureResource("null");
|
||||
|
||||
private var §_-M§:Number = 0;
|
||||
private var var_164:Number = 0;
|
||||
|
||||
private var pcfOffsets:Vector.<Number>;
|
||||
|
||||
private var §_-1a§:Boolean = false;
|
||||
private var var_167:Boolean = false;
|
||||
|
||||
private var §_-bD§:Matrix3D = new Matrix3D();
|
||||
private var var_169:Matrix3D = new Matrix3D();
|
||||
|
||||
private var uvMatrix:Matrix3D = new Matrix3D();
|
||||
|
||||
@@ -85,18 +85,18 @@ package alternativa.engine3d.shadows
|
||||
{
|
||||
super();
|
||||
this.context = context;
|
||||
this.§_-FQ§ = worldSize;
|
||||
this.§_-M§ = pcfSize / worldSize / 255;
|
||||
if(this.§_-M§ > 0)
|
||||
this.var_236 = worldSize;
|
||||
this.var_164 = pcfSize / worldSize / 255;
|
||||
if(this.var_164 > 0)
|
||||
{
|
||||
this.pcfOffsets = Vector.<Number>([-this.§_-M§,-this.§_-M§,0,1 / 4,-this.§_-M§,this.§_-M§,0,1,this.§_-M§,-this.§_-M§,0,1,this.§_-M§,this.§_-M§,0,1]);
|
||||
this.pcfOffsets = Vector.<Number>([-this.var_164,-this.var_164,0,1 / 4,-this.var_164,this.var_164,0,1,this.var_164,-this.var_164,0,1,this.var_164,this.var_164,0,1]);
|
||||
}
|
||||
this.shadowMap = context.createTexture(size,size,Context3DTextureFormat.BGRA,true);
|
||||
this.§_-Ez§.alternativa3d::_texture = this.shadowMap;
|
||||
this.§_-Vg§.diffuseMap = this.§_-Ez§;
|
||||
this.§_-Vg§.alpha = 0.9;
|
||||
this.§_-Vg§.§_-L4§ = true;
|
||||
this.debugObject = new Box(worldSize,worldSize,1,1,1,1,false,this.§_-Vg§);
|
||||
this.var_239.alternativa3d::_texture = this.shadowMap;
|
||||
this.var_237.diffuseMap = this.var_239;
|
||||
this.var_237.alpha = 0.9;
|
||||
this.var_237.var_21 = true;
|
||||
this.debugObject = new Box(worldSize,worldSize,1,1,1,1,false,this.var_237);
|
||||
this.debugObject.geometry.upload(context);
|
||||
}
|
||||
|
||||
@@ -161,12 +161,12 @@ package alternativa.engine3d.shadows
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.VERTEX,4,Vector.<Number>([255,0,0,1]));
|
||||
context.setProgramConstantsFromVector(Context3DProgramType.FRAGMENT,0,Vector.<Number>([1 / 255,0,0,1]));
|
||||
context.setCulling(Context3DTriangleFace.BACK);
|
||||
for(var i:int = 0; i < mesh.alternativa3d::_-Oy; i++)
|
||||
for(var i:int = 0; i < mesh.alternativa3d::var_93; i++)
|
||||
{
|
||||
surface = mesh.alternativa3d::_-eW[i];
|
||||
surface = mesh.alternativa3d::var_92[i];
|
||||
if(!(surface.material == null || !surface.material.alternativa3d::canDrawInShadowMap))
|
||||
{
|
||||
context.drawTriangles(mesh.geometry.alternativa3d::_-EM,surface.indexBegin,surface.numTriangles);
|
||||
context.drawTriangles(mesh.geometry.alternativa3d::name_78,surface.indexBegin,surface.numTriangles);
|
||||
}
|
||||
}
|
||||
context.setVertexBufferAt(0,null);
|
||||
@@ -299,13 +299,13 @@ package alternativa.engine3d.shadows
|
||||
|
||||
public function get worldSize() : Number
|
||||
{
|
||||
return this.§_-FQ§;
|
||||
return this.var_236;
|
||||
}
|
||||
|
||||
public function set worldSize(value:Number) : void
|
||||
{
|
||||
this.§_-FQ§ = value;
|
||||
var newDebug:Mesh = new Box(this.§_-FQ§,this.§_-FQ§,1,1,1,1,false,this.§_-Vg§);
|
||||
this.var_236 = value;
|
||||
var newDebug:Mesh = new Box(this.var_236,this.var_236,1,1,1,1,false,this.var_237);
|
||||
newDebug.geometry.upload(this.context);
|
||||
if(this.debugObject.alternativa3d::_parent != null)
|
||||
{
|
||||
@@ -318,7 +318,7 @@ package alternativa.engine3d.shadows
|
||||
public function setLight(value:DirectionalLight) : void
|
||||
{
|
||||
this.light = value;
|
||||
if(this.§_-1a§)
|
||||
if(this.var_167)
|
||||
{
|
||||
this.light.addChild(this.debugObject);
|
||||
}
|
||||
@@ -326,13 +326,13 @@ package alternativa.engine3d.shadows
|
||||
|
||||
override public function get debug() : Boolean
|
||||
{
|
||||
return this.§_-1a§;
|
||||
return this.var_167;
|
||||
}
|
||||
|
||||
override public function set debug(value:Boolean) : void
|
||||
{
|
||||
this.§_-1a§ = value;
|
||||
if(this.§_-1a§)
|
||||
this.var_167 = value;
|
||||
if(this.var_167)
|
||||
{
|
||||
if(this.light != null)
|
||||
{
|
||||
@@ -348,7 +348,7 @@ package alternativa.engine3d.shadows
|
||||
override alternativa3d function cullReciever(boundBox:BoundBox, object:Object3D) : Boolean
|
||||
{
|
||||
alternativa3d::copyMatrixFromTransform(matrix,object.alternativa3d::localToGlobalTransform);
|
||||
matrix.append(this.alternativa3d::_-UK);
|
||||
matrix.append(this.alternativa3d::var_238);
|
||||
return alternativa3d::cullObjectImplementation(boundBox,matrix);
|
||||
}
|
||||
|
||||
@@ -356,12 +356,12 @@ package alternativa.engine3d.shadows
|
||||
{
|
||||
var root:Object3D = null;
|
||||
active = true;
|
||||
this.§_-qg§.alternativa3d::localToCameraTransform.compose(this.§_-qg§.alternativa3d::_x,this.§_-qg§.alternativa3d::_y,this.§_-qg§.alternativa3d::_z,this.§_-qg§.alternativa3d::_rotationX,this.§_-qg§.alternativa3d::_rotationY,this.§_-qg§.alternativa3d::_rotationZ,this.§_-qg§.alternativa3d::_scaleX,this.§_-qg§.alternativa3d::_scaleY,this.§_-qg§.alternativa3d::_scaleZ);
|
||||
for(root = this.§_-qg§; root.alternativa3d::_parent != null; )
|
||||
this.var_235.alternativa3d::localToCameraTransform.compose(this.var_235.alternativa3d::_x,this.var_235.alternativa3d::_y,this.var_235.alternativa3d::_z,this.var_235.alternativa3d::_rotationX,this.var_235.alternativa3d::_rotationY,this.var_235.alternativa3d::_rotationZ,this.var_235.alternativa3d::_scaleX,this.var_235.alternativa3d::_scaleY,this.var_235.alternativa3d::_scaleZ);
|
||||
for(root = this.var_235; root.alternativa3d::_parent != null; )
|
||||
{
|
||||
root = root.alternativa3d::_parent;
|
||||
root.alternativa3d::localToGlobalTransform.compose(root.alternativa3d::_x,root.alternativa3d::_y,root.alternativa3d::_z,root.alternativa3d::_rotationX,root.alternativa3d::_rotationY,root.alternativa3d::_rotationZ,root.alternativa3d::_scaleX,root.alternativa3d::_scaleY,root.alternativa3d::_scaleZ);
|
||||
this.§_-qg§.alternativa3d::localToCameraTransform.append(root.alternativa3d::localToGlobalTransform);
|
||||
this.var_235.alternativa3d::localToCameraTransform.append(root.alternativa3d::localToGlobalTransform);
|
||||
}
|
||||
this.light.alternativa3d::localToGlobalTransform.compose(this.light.alternativa3d::_x,this.light.alternativa3d::_y,this.light.alternativa3d::_z,this.light.alternativa3d::_rotationX,this.light.alternativa3d::_rotationY,this.light.alternativa3d::_rotationZ,this.light.alternativa3d::_scaleX,this.light.alternativa3d::_scaleY,this.light.alternativa3d::_scaleZ);
|
||||
for(root = this.light; root.alternativa3d::_parent != null; )
|
||||
@@ -372,25 +372,25 @@ package alternativa.engine3d.shadows
|
||||
}
|
||||
this.light.alternativa3d::globalToLocalTransform.copy(this.light.alternativa3d::localToGlobalTransform);
|
||||
this.light.alternativa3d::globalToLocalTransform.invert();
|
||||
this.§_-qg§.alternativa3d::localToCameraTransform.append(this.light.alternativa3d::globalToLocalTransform);
|
||||
var t:Transform3D = this.§_-qg§.alternativa3d::localToCameraTransform;
|
||||
this.var_235.alternativa3d::localToCameraTransform.append(this.light.alternativa3d::globalToLocalTransform);
|
||||
var t:Transform3D = this.var_235.alternativa3d::localToCameraTransform;
|
||||
this.center.x = t.a * this.offset.x + t.b * this.offset.y + t.c * this.offset.z + t.d;
|
||||
this.center.y = t.e * this.offset.x + t.f * this.offset.y + t.g * this.offset.z + t.h;
|
||||
this.center.z = t.i * this.offset.x + t.j * this.offset.y + t.k * this.offset.z + t.l;
|
||||
this.calculateShadowMapProjection(this.§_-bD§,this.uvMatrix,this.center,this.§_-FQ§,this.§_-FQ§,this.§_-FQ§);
|
||||
alternativa3d::copyMatrixFromTransform(this.alternativa3d::_-UK,this.light.alternativa3d::globalToLocalTransform);
|
||||
this.alternativa3d::_-UK.append(this.uvMatrix);
|
||||
this.calculateShadowMapProjection(this.var_169,this.uvMatrix,this.center,this.var_236,this.var_236,this.var_236);
|
||||
alternativa3d::copyMatrixFromTransform(this.alternativa3d::var_238,this.light.alternativa3d::globalToLocalTransform);
|
||||
this.alternativa3d::var_238.append(this.uvMatrix);
|
||||
this.debugObject.x = this.center.x;
|
||||
this.debugObject.y = this.center.y;
|
||||
this.debugObject.z = this.center.z - this.§_-FQ§ / 2;
|
||||
this.§_-Vg§.diffuseMap = null;
|
||||
this.debugObject.z = this.center.z - this.var_236 / 2;
|
||||
this.var_237.diffuseMap = null;
|
||||
this.context.setRenderToTexture(this.shadowMap,true,0,0);
|
||||
this.context.clear(1,1,1,1);
|
||||
cleanContext(this.context);
|
||||
alternativa3d::drawObjectToShadowMap(this.context,this.§_-qg§,this.light,this.§_-bD§);
|
||||
alternativa3d::drawObjectToShadowMap(this.context,this.var_235,this.light,this.var_169);
|
||||
this.context.setRenderToBackBuffer();
|
||||
cleanContext(this.context);
|
||||
this.§_-Vg§.diffuseMap = this.§_-Ez§;
|
||||
this.var_237.diffuseMap = this.var_239;
|
||||
}
|
||||
|
||||
private function calculateShadowMapProjection(matrix:Matrix3D, uvMatrix:Matrix3D, offset:Vector3D, width:Number, height:Number, length:Number) : void
|
||||
@@ -426,19 +426,19 @@ package alternativa.engine3d.shadows
|
||||
|
||||
override public function getFShader(index:int = 0) : Procedure
|
||||
{
|
||||
return initFShader(false,this.§_-M§ > 0,index);
|
||||
return initFShader(false,this.var_164 > 0,index);
|
||||
}
|
||||
|
||||
override public function getFIntensityShader() : Procedure
|
||||
{
|
||||
return initFShader(false,this.§_-M§ > 0,0,true);
|
||||
return initFShader(false,this.var_164 > 0,0,true);
|
||||
}
|
||||
|
||||
override public function applyShader(drawUnit:DrawUnit, program:ShaderProgram, object:Object3D, camera:Camera3D, index:int = 0) : void
|
||||
{
|
||||
localToGlobal.combine(camera.alternativa3d::localToGlobalTransform,object.alternativa3d::localToCameraTransform);
|
||||
alternativa3d::copyMatrixFromTransform(objectToShadowMap,localToGlobal);
|
||||
objectToShadowMap.append(this.alternativa3d::_-UK);
|
||||
objectToShadowMap.append(this.alternativa3d::var_238);
|
||||
objectToShadowMap.copyRawDataTo(vector,0,true);
|
||||
drawUnit.alternativa3d::setVertexConstantsFromVector(program.vertexShader.getVariableIndex(index + "cTOSHADOW"),vector,4);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromVector(program.fragmentShader.getVariableIndex(index + "cConstants"),constants,1);
|
||||
@@ -446,7 +446,7 @@ package alternativa.engine3d.shadows
|
||||
{
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromNumbers(program.fragmentShader.getVariableIndex(index + "cShadowColor"),camera.alternativa3d::ambient[0] / 2,camera.alternativa3d::ambient[1] / 2,camera.alternativa3d::ambient[2] / 2,1);
|
||||
}
|
||||
if(this.§_-M§ > 0)
|
||||
if(this.var_164 > 0)
|
||||
{
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromVector(program.fragmentShader.getVariableIndex("cDPCF0"),this.pcfOffsets,this.pcfOffsets.length / 4);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package alternativa.engine3d.shadows
|
||||
|
||||
private static const boundVertices:Vector.<Number> = new Vector.<Number>(24);
|
||||
|
||||
alternativa3d var §if§:String;
|
||||
alternativa3d var var_104:String;
|
||||
|
||||
public var active:Boolean = false;
|
||||
|
||||
@@ -28,7 +28,7 @@ package alternativa.engine3d.shadows
|
||||
{
|
||||
super();
|
||||
++counter;
|
||||
this.alternativa3d::if = "M" + counter.toString();
|
||||
this.alternativa3d::var_104 = "M" + counter.toString();
|
||||
}
|
||||
|
||||
alternativa3d function get needMultiplyBlend() : Boolean
|
||||
|
||||
@@ -12,15 +12,15 @@ package alternativa.engine3d.shadows
|
||||
|
||||
public var renderers:Vector.<ShadowRenderer> = new Vector.<ShadowRenderer>();
|
||||
|
||||
private var §_-jy§:Dictionary = new Dictionary();
|
||||
private var var_12:Dictionary = new Dictionary();
|
||||
|
||||
private var §_-gR§:int;
|
||||
private var var_161:int;
|
||||
|
||||
private var §_-i-§:int;
|
||||
private var var_158:int;
|
||||
|
||||
private var §_-O0§:Vector.<ShadowRenderer> = new Vector.<ShadowRenderer>();
|
||||
private var var_159:Vector.<ShadowRenderer> = new Vector.<ShadowRenderer>();
|
||||
|
||||
private var §_-aJ§:int;
|
||||
private var var_160:int;
|
||||
|
||||
public function ShadowsSystem()
|
||||
{
|
||||
@@ -34,7 +34,7 @@ package alternativa.engine3d.shadows
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.§_-i-§ = 0;
|
||||
this.var_158 = 0;
|
||||
var num:int = int(this.renderers.length);
|
||||
for(var i:int = 0; i < num; )
|
||||
{
|
||||
@@ -42,8 +42,8 @@ package alternativa.engine3d.shadows
|
||||
renderer.update();
|
||||
if(renderer.active)
|
||||
{
|
||||
this.§_-O0§[this.§_-i-§] = renderer;
|
||||
++this.§_-i-§;
|
||||
this.var_159[this.var_158] = renderer;
|
||||
++this.var_158;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -52,8 +52,8 @@ package alternativa.engine3d.shadows
|
||||
root.alternativa3d::composeTransforms();
|
||||
}
|
||||
root.alternativa3d::localToGlobalTransform.copy(root.alternativa3d::transform);
|
||||
this.§_-gR§ = 0;
|
||||
this.§_-aJ§ = 0;
|
||||
this.var_161 = 0;
|
||||
this.var_160 = 0;
|
||||
this.recursive(root);
|
||||
}
|
||||
|
||||
@@ -74,21 +74,21 @@ package alternativa.engine3d.shadows
|
||||
child.alternativa3d::composeTransforms();
|
||||
}
|
||||
child.alternativa3d::localToGlobalTransform.combine(object.alternativa3d::localToGlobalTransform,child.alternativa3d::transform);
|
||||
for(i = 0; i < this.§_-i-§; )
|
||||
for(i = 0; i < this.var_158; )
|
||||
{
|
||||
renderer = this.§_-O0§[i];
|
||||
renderer = this.var_159[i];
|
||||
if(child.useShadow)
|
||||
{
|
||||
if(child.boundBox == null || renderer.alternativa3d::cullReciever(child.boundBox,child))
|
||||
{
|
||||
++this.§_-gR§;
|
||||
++this.var_161;
|
||||
if(value == null)
|
||||
{
|
||||
value = this.§_-jy§[child];
|
||||
value = this.var_12[child];
|
||||
if(value == null)
|
||||
{
|
||||
value = new Vector.<ShadowRenderer>();
|
||||
this.§_-jy§[child] = value;
|
||||
this.var_12[child] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -109,9 +109,9 @@ package alternativa.engine3d.shadows
|
||||
|
||||
private function setRenderers(object:Object3D, renderers:Vector.<ShadowRenderer>, numShadowRenderers:int) : void
|
||||
{
|
||||
if(numShadowRenderers > this.§_-aJ§)
|
||||
if(numShadowRenderers > this.var_160)
|
||||
{
|
||||
this.§_-aJ§ = numShadowRenderers;
|
||||
this.var_160 = numShadowRenderers;
|
||||
}
|
||||
if(numShadowRenderers > MAX_SHADOWMAPS)
|
||||
{
|
||||
|
||||
@@ -44,23 +44,23 @@ package alternativa.engine3d.shadows
|
||||
|
||||
private var partSize:Number;
|
||||
|
||||
private var §_-f7§:Vector.<Vector.<Texture>> = new Vector.<Vector.<Texture>>();
|
||||
private var var_162:Vector.<Vector.<Texture>> = new Vector.<Vector.<Texture>>();
|
||||
|
||||
private var §_-md§:Vector.<Vector.<Matrix3D>> = new Vector.<Vector.<Matrix3D>>();
|
||||
private var var_166:Vector.<Vector.<Matrix3D>> = new Vector.<Vector.<Matrix3D>>();
|
||||
|
||||
private var light:DirectionalLight;
|
||||
|
||||
private var §_-65§:Transform3D = new Transform3D();
|
||||
private var var_168:Transform3D = new Transform3D();
|
||||
|
||||
private var §_-1a§:Boolean = false;
|
||||
private var var_167:Boolean = false;
|
||||
|
||||
private var §_-4u§:Object3D;
|
||||
private var var_163:Object3D;
|
||||
|
||||
private var §_-Mf§:Dictionary = new Dictionary();
|
||||
private var var_165:Dictionary = new Dictionary();
|
||||
|
||||
private var §_-M§:Number = 0;
|
||||
private var var_164:Number = 0;
|
||||
|
||||
private var §_-bD§:Matrix3D = new Matrix3D();
|
||||
private var var_169:Matrix3D = new Matrix3D();
|
||||
|
||||
private var rawData:Vector.<Number> = new Vector.<Number>(16);
|
||||
|
||||
@@ -69,7 +69,7 @@ package alternativa.engine3d.shadows
|
||||
super();
|
||||
this.context = context;
|
||||
this.partSize = partSize;
|
||||
this.§_-M§ = pcfSize;
|
||||
this.var_164 = pcfSize;
|
||||
constants[3] = 1 - this.alpha;
|
||||
}
|
||||
|
||||
@@ -266,32 +266,32 @@ package alternativa.engine3d.shadows
|
||||
|
||||
public function addReciever(object:Object3D) : void
|
||||
{
|
||||
this.§_-Mf§[object] = true;
|
||||
this.var_165[object] = true;
|
||||
}
|
||||
|
||||
public function removeReciever(object:Object3D) : void
|
||||
{
|
||||
delete this.§_-Mf§[object];
|
||||
delete this.var_165[object];
|
||||
}
|
||||
|
||||
public function dispose() : void
|
||||
{
|
||||
var textures:Vector.<Texture> = null;
|
||||
var texture:Texture = null;
|
||||
for each(textures in this.§_-f7§)
|
||||
for each(textures in this.var_162)
|
||||
{
|
||||
for each(texture in textures)
|
||||
{
|
||||
texture.dispose();
|
||||
}
|
||||
}
|
||||
this.§_-f7§.length = 0;
|
||||
this.§_-md§.length = 0;
|
||||
this.var_162.length = 0;
|
||||
this.var_166.length = 0;
|
||||
}
|
||||
|
||||
override alternativa3d function cullReciever(boundBox:BoundBox, object:Object3D) : Boolean
|
||||
{
|
||||
return this.§_-Mf§[object];
|
||||
return this.var_165[object];
|
||||
}
|
||||
|
||||
public function calculateShadows(object:Object3D, light:DirectionalLight, widthPartsCount:int = 1, heightPartsCount:int = 1, overlap:Number = 0) : void
|
||||
@@ -327,7 +327,7 @@ package alternativa.engine3d.shadows
|
||||
}
|
||||
light.alternativa3d::globalToLocalTransform.copy(light.alternativa3d::localToGlobalTransform);
|
||||
light.alternativa3d::globalToLocalTransform.invert();
|
||||
this.§_-65§.copy(light.alternativa3d::globalToLocalTransform);
|
||||
this.var_168.copy(light.alternativa3d::globalToLocalTransform);
|
||||
object.alternativa3d::localToCameraTransform.append(light.alternativa3d::globalToLocalTransform);
|
||||
this.bounds.reset();
|
||||
alternativa3d::calculateBoundBox(this.bounds,object);
|
||||
@@ -340,10 +340,10 @@ package alternativa.engine3d.shadows
|
||||
var halfOverlap:Number = overlap * 0.5;
|
||||
var partWorldWidth:Number = (frustumMaxX - frustumMinX) / widthPartsCount;
|
||||
var partWorldHeight:Number = (frustumMaxY - frustumMinY) / heightPartsCount;
|
||||
this.§_-4u§ = new Object3D();
|
||||
if(this.§_-1a§)
|
||||
this.var_163 = new Object3D();
|
||||
if(this.var_167)
|
||||
{
|
||||
light.addChild(this.§_-4u§);
|
||||
light.addChild(this.var_163);
|
||||
}
|
||||
for(var xIndex:int = 0; xIndex < widthPartsCount; )
|
||||
{
|
||||
@@ -382,34 +382,34 @@ package alternativa.engine3d.shadows
|
||||
height = partWorldHeight + overlap;
|
||||
}
|
||||
uvMatrix = new Matrix3D();
|
||||
this.calculateShadowMapProjection(this.§_-bD§,uvMatrix,leftX,leftY,frustumMinZ,leftX + width,leftY + height,frustumMaxZ);
|
||||
this.calculateShadowMapProjection(this.var_169,uvMatrix,leftX,leftY,frustumMinZ,leftX + width,leftY + height,frustumMaxZ);
|
||||
shadowMap = this.context.createTexture(this.partSize,this.partSize,Context3DTextureFormat.BGRA,true);
|
||||
this.context.setRenderToTexture(shadowMap,true,0,0);
|
||||
this.context.clear(1,1,1,0.5);
|
||||
cleanContext(this.context);
|
||||
DirectionalShadowRenderer.alternativa3d::drawObjectToShadowMap(this.context,object,light,this.§_-bD§);
|
||||
DirectionalShadowRenderer.alternativa3d::drawObjectToShadowMap(this.context,object,light,this.var_169);
|
||||
cleanContext(this.context);
|
||||
maps.push(shadowMap);
|
||||
matrices.push(uvMatrix);
|
||||
texture = new ExternalTextureResource(null);
|
||||
texture.alternativa3d::_texture = shadowMap;
|
||||
material = new TextureMaterial(texture);
|
||||
material.§_-L4§ = true;
|
||||
material.var_21 = true;
|
||||
debugObject = new Box(width,height,1,1,1,1,false,material);
|
||||
debugObject.geometry.upload(this.context);
|
||||
debugObject.x = leftX + width / 2;
|
||||
debugObject.y = leftY + height / 2;
|
||||
debugObject.z = frustumMinZ;
|
||||
this.§_-4u§.addChild(debugObject);
|
||||
this.var_163.addChild(debugObject);
|
||||
}
|
||||
this.§_-f7§.push(maps);
|
||||
this.§_-md§.push(matrices);
|
||||
this.var_162.push(maps);
|
||||
this.var_166.push(matrices);
|
||||
xIndex++;
|
||||
}
|
||||
this.context.setRenderToBackBuffer();
|
||||
if(this.§_-M§ > 0)
|
||||
if(this.var_164 > 0)
|
||||
{
|
||||
offset = this.§_-M§ / partWorldWidth;
|
||||
offset = this.var_164 / partWorldWidth;
|
||||
pcfOffsets = Vector.<Number>([-offset,-offset,0,1 / 4,-offset,offset,0,1,offset,-offset,0,1,offset,offset,0,1]);
|
||||
}
|
||||
}
|
||||
@@ -433,24 +433,24 @@ package alternativa.engine3d.shadows
|
||||
|
||||
override public function get debug() : Boolean
|
||||
{
|
||||
return this.§_-1a§;
|
||||
return this.var_167;
|
||||
}
|
||||
|
||||
override public function set debug(value:Boolean) : void
|
||||
{
|
||||
this.§_-1a§ = value;
|
||||
if(this.§_-4u§ != null)
|
||||
this.var_167 = value;
|
||||
if(this.var_163 != null)
|
||||
{
|
||||
if(value)
|
||||
{
|
||||
if(this.light != null)
|
||||
{
|
||||
this.light.addChild(this.§_-4u§);
|
||||
this.light.addChild(this.var_163);
|
||||
}
|
||||
}
|
||||
else if(this.§_-4u§.alternativa3d::_parent != null)
|
||||
else if(this.var_163.alternativa3d::_parent != null)
|
||||
{
|
||||
this.§_-4u§.alternativa3d::removeFromParent();
|
||||
this.var_163.alternativa3d::removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -462,23 +462,23 @@ package alternativa.engine3d.shadows
|
||||
|
||||
override public function getFShader(index:int = 0) : Procedure
|
||||
{
|
||||
return initFShader(false,this.§_-M§ > 0,index);
|
||||
return initFShader(false,this.var_164 > 0,index);
|
||||
}
|
||||
|
||||
override public function getFIntensityShader() : Procedure
|
||||
{
|
||||
return initFShader(false,this.§_-M§ > 0,0,true);
|
||||
return initFShader(false,this.var_164 > 0,0,true);
|
||||
}
|
||||
|
||||
override public function applyShader(drawUnit:DrawUnit, program:ShaderProgram, object:Object3D, camera:Camera3D, index:int = 0) : void
|
||||
{
|
||||
objectToShadowMap.combine(camera.alternativa3d::localToGlobalTransform,object.alternativa3d::localToCameraTransform);
|
||||
objectToShadowMap.append(this.§_-65§);
|
||||
objectToShadowMap.append(this.var_168);
|
||||
var coords:Vector3D = new Vector3D(objectToShadowMap.d,objectToShadowMap.h,objectToShadowMap.l);
|
||||
var xIndex:int = (coords.x - this.bounds.minX) / (this.bounds.maxX - this.bounds.minX) * this.§_-f7§.length;
|
||||
xIndex = xIndex < 0 ? 0 : (xIndex >= this.§_-f7§.length ? int(this.§_-f7§.length - 1) : xIndex);
|
||||
var maps:Vector.<Texture> = this.§_-f7§[xIndex];
|
||||
var matrices:Vector.<Matrix3D> = this.§_-md§[xIndex];
|
||||
var xIndex:int = (coords.x - this.bounds.minX) / (this.bounds.maxX - this.bounds.minX) * this.var_162.length;
|
||||
xIndex = xIndex < 0 ? 0 : (xIndex >= this.var_162.length ? int(this.var_162.length - 1) : xIndex);
|
||||
var maps:Vector.<Texture> = this.var_162[xIndex];
|
||||
var matrices:Vector.<Matrix3D> = this.var_166[xIndex];
|
||||
var yIndex:int = (coords.y - this.bounds.minY) / (this.bounds.maxY - this.bounds.minY) * maps.length;
|
||||
yIndex = yIndex < 0 ? 0 : (yIndex >= maps.length ? int(maps.length - 1) : yIndex);
|
||||
var shadowMap:Texture = maps[yIndex];
|
||||
@@ -488,7 +488,7 @@ package alternativa.engine3d.shadows
|
||||
objectToUVMap.transpose();
|
||||
drawUnit.alternativa3d::setVertexConstantsFromVector(program.vertexShader.getVariableIndex("cTOSHADOW"),objectToUVMap.rawData,4);
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromVector(program.fragmentShader.getVariableIndex("cConstants"),constants,1);
|
||||
if(this.§_-M§ > 0)
|
||||
if(this.var_164 > 0)
|
||||
{
|
||||
drawUnit.alternativa3d::setFragmentConstantsFromVector(program.fragmentShader.getVariableIndex("cPCF0"),pcfOffsets,pcfOffsets.length >> 2);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ package alternativa.osgi.bundle
|
||||
|
||||
private var _name:String;
|
||||
|
||||
private var §_-lF§:Vector.<IBundleActivator>;
|
||||
private var var_566:Vector.<IBundleActivator>;
|
||||
|
||||
private var §_-7V§:Properties;
|
||||
private var var_567:Properties;
|
||||
|
||||
public function BundleDescriptor(properties:Properties)
|
||||
{
|
||||
@@ -23,7 +23,7 @@ package alternativa.osgi.bundle
|
||||
var isActivatorExists:Boolean = false;
|
||||
var activatorClass:Class = null;
|
||||
super();
|
||||
this.§_-7V§ = properties || new Properties();
|
||||
this.var_567 = properties || new Properties();
|
||||
this._name = properties.getProperty("Bundle-Name");
|
||||
clientLog.log(LOG_CHANNEL,"BundleDescriptor: Bundle name: %1",this._name);
|
||||
var activatorClassNames:Array = [properties.getProperty("Bundle-Activator")];
|
||||
@@ -31,14 +31,14 @@ package alternativa.osgi.bundle
|
||||
{
|
||||
activatorClassNames.push(this._name.toLowerCase() + ".Activator");
|
||||
}
|
||||
this.§_-lF§ = new Vector.<IBundleActivator>();
|
||||
this.var_566 = new Vector.<IBundleActivator>();
|
||||
for each(activatorClassName in activatorClassNames)
|
||||
{
|
||||
isActivatorExists = Boolean(ApplicationDomain.currentDomain.hasDefinition(activatorClassName));
|
||||
if(isActivatorExists)
|
||||
{
|
||||
activatorClass = Class(ApplicationDomain.currentDomain.getDefinition(activatorClassName));
|
||||
this.§_-lF§.push(IBundleActivator(new activatorClass()));
|
||||
this.var_566.push(IBundleActivator(new activatorClass()));
|
||||
clientLog.log(LOG_CHANNEL,"BundleDescriptor: Activator has been created: %1",activatorClassName);
|
||||
}
|
||||
else
|
||||
@@ -55,12 +55,12 @@ package alternativa.osgi.bundle
|
||||
|
||||
public function get activators() : Vector.<IBundleActivator>
|
||||
{
|
||||
return this.§_-lF§;
|
||||
return this.var_566;
|
||||
}
|
||||
|
||||
public function get properties() : Properties
|
||||
{
|
||||
return this.§_-7V§;
|
||||
return this.var_567;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,49 +36,49 @@ package alternativa.osgi.service.console
|
||||
|
||||
private var container:Sprite = new Sprite();
|
||||
|
||||
private var §_-mB§:Sprite;
|
||||
private var var_538:Sprite;
|
||||
|
||||
private var input:TextField;
|
||||
|
||||
private var §_-2O§:Vector.<TextField> = new Vector.<TextField>();
|
||||
private var var_531:Vector.<TextField> = new Vector.<TextField>();
|
||||
|
||||
private var §_-V8§:int;
|
||||
private var var_546:int;
|
||||
|
||||
private var §_-k3§:int;
|
||||
private var var_543:int;
|
||||
|
||||
private var §_-5f§:int = 0;
|
||||
private var var_545:int = 0;
|
||||
|
||||
private var §_-Y3§:Boolean;
|
||||
private var var_544:Boolean;
|
||||
|
||||
private var visible:Boolean;
|
||||
|
||||
private var §_-Fe§:Array = [];
|
||||
private var var_533:Array = [];
|
||||
|
||||
private var §_-hY§:int = 0;
|
||||
private var var_532:int = 0;
|
||||
|
||||
private var §_-Pl§:Object = {};
|
||||
private var var_540:Object = {};
|
||||
|
||||
private var §_-I9§:Object = {};
|
||||
private var var_536:Object = {};
|
||||
|
||||
private var §_-HF§:int;
|
||||
private var var_529:int;
|
||||
|
||||
private var §_-6U§:int;
|
||||
private var var_541:int;
|
||||
|
||||
private var §_-gO§:int;
|
||||
private var var_530:int;
|
||||
|
||||
private var buffer:ICircularStringBuffer;
|
||||
|
||||
private var §_-Nl§:int;
|
||||
private var var_535:int;
|
||||
|
||||
private var §_-Gl§:int;
|
||||
private var var_534:int;
|
||||
|
||||
private var align:int;
|
||||
|
||||
private var §_-0P§:uint = 16777215;
|
||||
private var var_539:uint = 16777215;
|
||||
|
||||
private var §_-Su§:uint = 0;
|
||||
private var var_537:uint = 0;
|
||||
|
||||
private var §_-S9§:Number = 1;
|
||||
private var var_542:Number = 1;
|
||||
|
||||
private var filter:String;
|
||||
|
||||
@@ -113,12 +113,12 @@ package alternativa.osgi.service.console
|
||||
|
||||
public function addVariable(variable:ConsoleVar) : void
|
||||
{
|
||||
this.§_-I9§[variable.getName()] = variable;
|
||||
this.var_536[variable.getName()] = variable;
|
||||
}
|
||||
|
||||
public function removeVariable(variableName:String) : void
|
||||
{
|
||||
delete this.§_-I9§[variableName];
|
||||
delete this.var_536[variableName];
|
||||
}
|
||||
|
||||
public function set horizontalAlignment(value:int) : void
|
||||
@@ -147,7 +147,7 @@ package alternativa.osgi.service.console
|
||||
|
||||
public function addText(text:String) : void
|
||||
{
|
||||
var needScroll:Boolean = this.buffer.size - this.§_-gO§ <= this.§_-HF§;
|
||||
var needScroll:Boolean = this.buffer.size - this.var_530 <= this.var_529;
|
||||
var linesAdded:int = this.addLine(text);
|
||||
if(needScroll)
|
||||
{
|
||||
@@ -157,7 +157,7 @@ package alternativa.osgi.service.console
|
||||
|
||||
public function addPrefixedText(prefix:String, text:String) : void
|
||||
{
|
||||
var needScroll:Boolean = this.buffer.size - this.§_-gO§ <= this.§_-HF§;
|
||||
var needScroll:Boolean = this.buffer.size - this.var_530 <= this.var_529;
|
||||
var linesAdded:int = this.addPrefixedLine(prefix,text);
|
||||
if(needScroll)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
var linesAdded:int = 0;
|
||||
var line:String = null;
|
||||
var needScroll:Boolean = this.buffer.size - this.§_-gO§ <= this.§_-HF§;
|
||||
var needScroll:Boolean = this.buffer.size - this.var_530 <= this.var_529;
|
||||
for each(line in lines)
|
||||
{
|
||||
linesAdded += this.addLine(line);
|
||||
@@ -184,7 +184,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
var linesAdded:int = 0;
|
||||
var line:String = null;
|
||||
var needScroll:Boolean = this.buffer.size - this.§_-gO§ <= this.§_-HF§;
|
||||
var needScroll:Boolean = this.buffer.size - this.var_530 <= this.var_529;
|
||||
for each(line in lines)
|
||||
{
|
||||
linesAdded += this.addPrefixedLine(prefix,line);
|
||||
@@ -231,34 +231,34 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
widthPercent = this.clamp(widthPercent,1,100);
|
||||
heightPercent = this.clamp(heightPercent,1,100);
|
||||
if(widthPercent == this.§_-Nl§ && heightPercent == this.§_-Gl§)
|
||||
if(widthPercent == this.var_535 && heightPercent == this.var_534)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.§_-Nl§ = widthPercent;
|
||||
this.§_-Gl§ = heightPercent;
|
||||
this.var_535 = widthPercent;
|
||||
this.var_534 = heightPercent;
|
||||
this.updateSize();
|
||||
this.updateAlignment();
|
||||
}
|
||||
|
||||
public function set width(widthPercent:int) : void
|
||||
{
|
||||
this.setSize(widthPercent,this.§_-Gl§);
|
||||
this.setSize(widthPercent,this.var_534);
|
||||
}
|
||||
|
||||
public function get width() : int
|
||||
{
|
||||
return this.§_-Nl§;
|
||||
return this.var_535;
|
||||
}
|
||||
|
||||
public function set height(heightPercent:int) : void
|
||||
{
|
||||
this.setSize(this.§_-Nl§,heightPercent);
|
||||
this.setSize(this.var_535,heightPercent);
|
||||
}
|
||||
|
||||
public function get height() : int
|
||||
{
|
||||
return this.§_-Gl§;
|
||||
return this.var_534;
|
||||
}
|
||||
|
||||
public function setCommandHandler(commandName:String, handler:Function) : void
|
||||
@@ -271,7 +271,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
throw new ArgumentError("Handler is null");
|
||||
}
|
||||
this.§_-Pl§[commandName] = handler;
|
||||
this.var_540[commandName] = handler;
|
||||
}
|
||||
|
||||
public function removeCommandHandler(commandName:String) : void
|
||||
@@ -280,7 +280,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
throw new ArgumentError("Command name is null or empty");
|
||||
}
|
||||
delete this.§_-Pl§[commandName];
|
||||
delete this.var_540[commandName];
|
||||
}
|
||||
|
||||
public function hideDelayed(delay:uint) : void
|
||||
@@ -295,22 +295,22 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
return;
|
||||
}
|
||||
var len:int = int(this.§_-Fe§.length);
|
||||
if(len == 0 || this.§_-Fe§[len - 1] != text)
|
||||
var len:int = int(this.var_533.length);
|
||||
if(len == 0 || this.var_533[len - 1] != text)
|
||||
{
|
||||
this.§_-Fe§.push(text);
|
||||
this.var_533.push(text);
|
||||
}
|
||||
this.§_-hY§ = len + 1;
|
||||
this.var_532 = len + 1;
|
||||
var tokens:Array = text.match(TOKENIZER);
|
||||
var commandName:String = tokens.shift();
|
||||
var variable:ConsoleVar = this.§_-I9§[commandName];
|
||||
var variable:ConsoleVar = this.var_536[commandName];
|
||||
if(variable != null)
|
||||
{
|
||||
variable.processConsoleInput(this,tokens);
|
||||
}
|
||||
else
|
||||
{
|
||||
_loc6_ = this.§_-Pl§[commandName];
|
||||
_loc6_ = this.var_540[commandName];
|
||||
if(_loc6_ != null)
|
||||
{
|
||||
_loc6_.call(null,this,tokens);
|
||||
@@ -320,13 +320,13 @@ package alternativa.osgi.service.console
|
||||
|
||||
public function set alpha(value:Number) : void
|
||||
{
|
||||
this.§_-S9§ = value;
|
||||
this.var_542 = value;
|
||||
this.updateSize();
|
||||
}
|
||||
|
||||
public function get alpha() : Number
|
||||
{
|
||||
return this.§_-S9§;
|
||||
return this.var_542;
|
||||
}
|
||||
|
||||
private function calcTextMetrics(stage:Stage) : void
|
||||
@@ -335,8 +335,8 @@ package alternativa.osgi.service.console
|
||||
tf.defaultTextFormat = DEFAULT_TEXT_FORMAT;
|
||||
tf.text = "j";
|
||||
stage.addChild(tf);
|
||||
this.§_-V8§ = tf.textWidth;
|
||||
this.§_-k3§ = tf.textHeight + 4;
|
||||
this.var_546 = tf.textWidth;
|
||||
this.var_543 = tf.textHeight + 4;
|
||||
stage.removeChild(tf);
|
||||
}
|
||||
|
||||
@@ -358,38 +358,38 @@ package alternativa.osgi.service.console
|
||||
|
||||
private function initOutput() : void
|
||||
{
|
||||
this.§_-mB§ = new Sprite();
|
||||
this.§_-mB§.addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
|
||||
this.container.addChild(this.§_-mB§);
|
||||
this.var_538 = new Sprite();
|
||||
this.var_538.addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
|
||||
this.container.addChild(this.var_538);
|
||||
}
|
||||
|
||||
private function resizeOutput(w:int, h:int) : void
|
||||
{
|
||||
this.§_-HF§ = h / (this.§_-k3§ + this.§_-5f§);
|
||||
this.§_-6U§ = w / this.§_-V8§ - 1;
|
||||
this.var_529 = h / (this.var_543 + this.var_545);
|
||||
this.var_541 = w / this.var_546 - 1;
|
||||
this.updateTextFields(w);
|
||||
this.scrollOutput(0);
|
||||
var g:Graphics = this.§_-mB§.graphics;
|
||||
var g:Graphics = this.var_538.graphics;
|
||||
g.clear();
|
||||
g.beginFill(this.§_-0P§,this.§_-S9§);
|
||||
g.beginFill(this.var_539,this.var_542);
|
||||
g.drawRect(0,0,w,h);
|
||||
g.endFill();
|
||||
}
|
||||
|
||||
private function updateTextFields(w:int) : void
|
||||
{
|
||||
for(var tf:TextField = null; this.§_-2O§.length > this.§_-HF§; )
|
||||
for(var tf:TextField = null; this.var_531.length > this.var_529; )
|
||||
{
|
||||
this.§_-mB§.removeChild(this.§_-2O§.pop());
|
||||
this.var_538.removeChild(this.var_531.pop());
|
||||
}
|
||||
while(this.§_-2O§.length < this.§_-HF§)
|
||||
while(this.var_531.length < this.var_529)
|
||||
{
|
||||
this.createTextField();
|
||||
}
|
||||
var lineHeight:int = this.§_-k3§ + this.§_-5f§;
|
||||
for(var i:int = 0; i < this.§_-2O§.length; i++)
|
||||
var lineHeight:int = this.var_543 + this.var_545;
|
||||
for(var i:int = 0; i < this.var_531.length; i++)
|
||||
{
|
||||
tf = this.§_-2O§[i];
|
||||
tf = this.var_531[i];
|
||||
tf.y = i * lineHeight;
|
||||
tf.width = w;
|
||||
}
|
||||
@@ -398,24 +398,24 @@ package alternativa.osgi.service.console
|
||||
private function createTextField() : void
|
||||
{
|
||||
var tf:TextField = new TextField();
|
||||
tf.height = this.§_-k3§;
|
||||
tf.height = this.var_543;
|
||||
tf.defaultTextFormat = DEFAULT_TEXT_FORMAT;
|
||||
tf.tabEnabled = false;
|
||||
tf.selectable = true;
|
||||
this.§_-mB§.addChild(tf);
|
||||
this.§_-2O§.push(tf);
|
||||
this.var_538.addChild(tf);
|
||||
this.var_531.push(tf);
|
||||
}
|
||||
|
||||
private function scrollOutput(delta:int) : void
|
||||
{
|
||||
this.§_-gO§ += delta;
|
||||
if(this.§_-gO§ + this.§_-HF§ > this.buffer.size)
|
||||
this.var_530 += delta;
|
||||
if(this.var_530 + this.var_529 > this.buffer.size)
|
||||
{
|
||||
this.§_-gO§ = this.buffer.size - this.§_-HF§;
|
||||
this.var_530 = this.buffer.size - this.var_529;
|
||||
}
|
||||
if(this.§_-gO§ < 0)
|
||||
if(this.var_530 < 0)
|
||||
{
|
||||
this.§_-gO§ = 0;
|
||||
this.var_530 = 0;
|
||||
}
|
||||
this.updateOutput();
|
||||
}
|
||||
@@ -431,14 +431,14 @@ package alternativa.osgi.service.console
|
||||
private function printPage() : void
|
||||
{
|
||||
var pageLineIndex:int = 0;
|
||||
var iterator:IStringBufferIterator = this.buffer.getIterator(this.§_-gO§);
|
||||
while(pageLineIndex < this.§_-HF§ && Boolean(iterator.hasNext()))
|
||||
var iterator:IStringBufferIterator = this.buffer.getIterator(this.var_530);
|
||||
while(pageLineIndex < this.var_529 && Boolean(iterator.hasNext()))
|
||||
{
|
||||
TextField(this.§_-2O§[pageLineIndex++]).text = iterator.getNext();
|
||||
TextField(this.var_531[pageLineIndex++]).text = iterator.getNext();
|
||||
}
|
||||
while(pageLineIndex < this.§_-HF§)
|
||||
while(pageLineIndex < this.var_529)
|
||||
{
|
||||
TextField(this.§_-2O§[pageLineIndex++]).text = "";
|
||||
TextField(this.var_531[pageLineIndex++]).text = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
if(this.isToggleKey(e))
|
||||
{
|
||||
this.§_-Y3§ = true;
|
||||
this.var_544 = true;
|
||||
}
|
||||
switch(e.keyCode)
|
||||
{
|
||||
@@ -468,10 +468,10 @@ package alternativa.osgi.service.console
|
||||
this.historyDown();
|
||||
break;
|
||||
case Keyboard.PAGE_UP:
|
||||
this.scrollOutput(-this.§_-HF§);
|
||||
this.scrollOutput(-this.var_529);
|
||||
break;
|
||||
case Keyboard.PAGE_DOWN:
|
||||
this.scrollOutput(this.§_-HF§);
|
||||
this.scrollOutput(this.var_529);
|
||||
}
|
||||
e.stopPropagation();
|
||||
}
|
||||
@@ -486,10 +486,10 @@ package alternativa.osgi.service.console
|
||||
|
||||
private function onTextInput(e:TextEvent) : void
|
||||
{
|
||||
if(this.§_-Y3§)
|
||||
if(this.var_544)
|
||||
{
|
||||
e.preventDefault();
|
||||
this.§_-Y3§ = false;
|
||||
this.var_544 = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,26 +509,26 @@ package alternativa.osgi.service.console
|
||||
|
||||
private function historyUp() : void
|
||||
{
|
||||
if(this.§_-hY§ == 0)
|
||||
if(this.var_532 == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
--this.§_-hY§;
|
||||
var command:String = this.§_-Fe§[this.§_-hY§];
|
||||
--this.var_532;
|
||||
var command:String = this.var_533[this.var_532];
|
||||
this.input.text = command == null ? "" : command;
|
||||
}
|
||||
|
||||
private function historyDown() : void
|
||||
{
|
||||
++this.§_-hY§;
|
||||
if(this.§_-hY§ >= this.§_-Fe§.length)
|
||||
++this.var_532;
|
||||
if(this.var_532 >= this.var_533.length)
|
||||
{
|
||||
this.§_-hY§ = this.§_-Fe§.length;
|
||||
this.var_532 = this.var_533.length;
|
||||
this.input.text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.input.text = this.§_-Fe§[this.§_-hY§];
|
||||
this.input.text = this.var_533[this.var_532];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,9 +565,9 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
for(i = 0; i < line.length; )
|
||||
{
|
||||
this.buffer.add(line.substr(i,this.§_-6U§));
|
||||
this.buffer.add(line.substr(i,this.var_541));
|
||||
linesAdded++;
|
||||
i += this.§_-6U§;
|
||||
i += this.var_541;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,7 +580,7 @@ package alternativa.osgi.service.console
|
||||
var line:String = null;
|
||||
var i:int = 0;
|
||||
var lines:Array = s.split(LINE_SPLITTER);
|
||||
var effectiveLineWidth:int = this.§_-6U§ - prefix.length;
|
||||
var effectiveLineWidth:int = this.var_541 - prefix.length;
|
||||
for each(line in lines)
|
||||
{
|
||||
if(!(Boolean(this.filter) && line.indexOf(this.filter) < 0))
|
||||
@@ -616,8 +616,8 @@ package alternativa.osgi.service.console
|
||||
|
||||
private function updateSize() : void
|
||||
{
|
||||
var pixelHeight:int = 0.01 * this.§_-Gl§ * this.stage.stageHeight;
|
||||
var pixelWidth:int = 0.01 * this.§_-Nl§ * this.stage.stageWidth;
|
||||
var pixelHeight:int = 0.01 * this.var_534 * this.stage.stageHeight;
|
||||
var pixelWidth:int = 0.01 * this.var_535 * this.stage.stageWidth;
|
||||
var outputHeight:int = pixelHeight - INPUT_HEIGHT;
|
||||
this.resizeOutput(pixelWidth,outputHeight);
|
||||
this.input.y = outputHeight;
|
||||
@@ -679,7 +679,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
var commandName:String = null;
|
||||
var list:Array = [];
|
||||
for(commandName in this.§_-Pl§)
|
||||
for(commandName in this.var_540)
|
||||
{
|
||||
list.push(commandName);
|
||||
}
|
||||
@@ -718,11 +718,11 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
if(params.length == 0)
|
||||
{
|
||||
this.addText("Width=" + this.§_-Nl§);
|
||||
this.addText("Width=" + this.var_535);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setSize(int(params[0]),this.§_-Gl§);
|
||||
this.setSize(int(params[0]),this.var_534);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -730,11 +730,11 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
if(params.length == 0)
|
||||
{
|
||||
this.addText("Height=" + this.§_-Gl§);
|
||||
this.addText("Height=" + this.var_534);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setSize(this.§_-Nl§,int(params[0]));
|
||||
this.setSize(this.var_535,int(params[0]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
if(params.length == 0)
|
||||
{
|
||||
this.addText("Alpha=" + this.§_-S9§);
|
||||
this.addText("Alpha=" + this.var_542);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -754,14 +754,14 @@ package alternativa.osgi.service.console
|
||||
{
|
||||
if(params.length == 0)
|
||||
{
|
||||
this.addText("Background color = " + this.§_-0P§);
|
||||
this.addText("Background color = " + this.var_539);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-0P§ = uint(params[0]);
|
||||
this.var_539 = uint(params[0]);
|
||||
this.updateSize();
|
||||
this.input.backgroundColor = this.§_-0P§;
|
||||
this.addText("Background color set to " + this.§_-0P§);
|
||||
this.input.backgroundColor = this.var_539;
|
||||
this.addText("Background color set to " + this.var_539);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -770,20 +770,20 @@ package alternativa.osgi.service.console
|
||||
var _loc3_:TextField = null;
|
||||
if(params.length == 0)
|
||||
{
|
||||
this.addText("Foreground color = " + this.§_-Su§);
|
||||
this.addText("Foreground color = " + this.var_537);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-Su§ = uint(params[0]);
|
||||
DEFAULT_TEXT_FORMAT.color = this.§_-Su§;
|
||||
this.input.textColor = this.§_-Su§;
|
||||
this.var_537 = uint(params[0]);
|
||||
DEFAULT_TEXT_FORMAT.color = this.var_537;
|
||||
this.input.textColor = this.var_537;
|
||||
this.input.defaultTextFormat = DEFAULT_TEXT_FORMAT;
|
||||
for each(_loc3_ in this.§_-2O§)
|
||||
for each(_loc3_ in this.var_531)
|
||||
{
|
||||
_loc3_.textColor = this.§_-Su§;
|
||||
_loc3_.textColor = this.var_537;
|
||||
_loc3_.defaultTextFormat = DEFAULT_TEXT_FORMAT;
|
||||
}
|
||||
this.addText("Foreground color set to " + this.§_-Su§);
|
||||
this.addText("Foreground color set to " + this.var_537);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,11 +816,11 @@ package alternativa.osgi.service.console
|
||||
var variable:ConsoleVar = null;
|
||||
var s:String = null;
|
||||
var vars:Array = [];
|
||||
for(name in this.§_-I9§)
|
||||
for(name in this.var_536)
|
||||
{
|
||||
if(start == null || start == "" || name.indexOf(start) == 0)
|
||||
{
|
||||
variable = this.§_-I9§[name];
|
||||
variable = this.var_536[name];
|
||||
vars.push(showValues ? name + " = " + variable.toString() : name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,39 +6,39 @@ package alternativa.osgi.service.display
|
||||
|
||||
public class Display implements IDisplay
|
||||
{
|
||||
private var §_-We§:Stage;
|
||||
private var var_43:Stage;
|
||||
|
||||
private var §_-j§:DisplayObjectContainer;
|
||||
private var var_557:DisplayObjectContainer;
|
||||
|
||||
private var §finally§:DisplayObjectContainer;
|
||||
private var var_565:DisplayObjectContainer;
|
||||
|
||||
private var §_-TJ§:DisplayObjectContainer;
|
||||
private var var_563:DisplayObjectContainer;
|
||||
|
||||
private var §_-6o§:DisplayObjectContainer;
|
||||
private var var_559:DisplayObjectContainer;
|
||||
|
||||
private var §_-Xl§:DisplayObjectContainer;
|
||||
private var var_564:DisplayObjectContainer;
|
||||
|
||||
private var §_-Ha§:DisplayObjectContainer;
|
||||
private var var_560:DisplayObjectContainer;
|
||||
|
||||
private var §_-5X§:DisplayObjectContainer;
|
||||
private var var_558:DisplayObjectContainer;
|
||||
|
||||
private var §_-Qq§:DisplayObjectContainer;
|
||||
private var var_562:DisplayObjectContainer;
|
||||
|
||||
private var §_-Ow§:DisplayObjectContainer;
|
||||
private var var_561:DisplayObjectContainer;
|
||||
|
||||
public function Display(rootContainer:DisplayObjectContainer)
|
||||
{
|
||||
super();
|
||||
this.§_-We§ = rootContainer.stage;
|
||||
this.§_-j§ = rootContainer;
|
||||
this.§finally§ = this.addLayerSprite();
|
||||
this.§_-TJ§ = this.addLayerSprite();
|
||||
this.§_-6o§ = this.addLayerSprite();
|
||||
this.§_-Xl§ = this.addLayerSprite();
|
||||
this.§_-Ha§ = this.addLayerSprite();
|
||||
this.§_-5X§ = this.addLayerSprite();
|
||||
this.§_-Qq§ = this.addLayerSprite();
|
||||
this.§_-Ow§ = this.addLayerSprite();
|
||||
this.var_43 = rootContainer.stage;
|
||||
this.var_557 = rootContainer;
|
||||
this.var_565 = this.addLayerSprite();
|
||||
this.var_563 = this.addLayerSprite();
|
||||
this.var_559 = this.addLayerSprite();
|
||||
this.var_564 = this.addLayerSprite();
|
||||
this.var_560 = this.addLayerSprite();
|
||||
this.var_558 = this.addLayerSprite();
|
||||
this.var_562 = this.addLayerSprite();
|
||||
this.var_561 = this.addLayerSprite();
|
||||
}
|
||||
|
||||
private function addLayerSprite() : Sprite
|
||||
@@ -46,58 +46,58 @@ package alternativa.osgi.service.display
|
||||
var sprite:Sprite = new Sprite();
|
||||
sprite.mouseEnabled = false;
|
||||
sprite.tabEnabled = false;
|
||||
this.§_-j§.addChild(sprite);
|
||||
this.var_557.addChild(sprite);
|
||||
return sprite;
|
||||
}
|
||||
|
||||
public function get stage() : Stage
|
||||
{
|
||||
return this.§_-We§;
|
||||
return this.var_43;
|
||||
}
|
||||
|
||||
public function get mainContainer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-j§;
|
||||
return this.var_557;
|
||||
}
|
||||
|
||||
public function get backgroundLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§finally§;
|
||||
return this.var_565;
|
||||
}
|
||||
|
||||
public function get contentLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-TJ§;
|
||||
return this.var_563;
|
||||
}
|
||||
|
||||
public function get contentUILayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-6o§;
|
||||
return this.var_559;
|
||||
}
|
||||
|
||||
public function get systemLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-Xl§;
|
||||
return this.var_564;
|
||||
}
|
||||
|
||||
public function get systemUILayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-Ha§;
|
||||
return this.var_560;
|
||||
}
|
||||
|
||||
public function get dialogsLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-5X§;
|
||||
return this.var_558;
|
||||
}
|
||||
|
||||
public function get noticesLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-Qq§;
|
||||
return this.var_562;
|
||||
}
|
||||
|
||||
public function get cursorLayer() : DisplayObjectContainer
|
||||
{
|
||||
return this.§_-Ow§;
|
||||
return this.var_561;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ package alternativa.osgi.service.dump
|
||||
{
|
||||
private var osgi:OSGi;
|
||||
|
||||
private var §_-gQ§:Dictionary;
|
||||
private var var_548:Dictionary;
|
||||
|
||||
private var §_-G8§:Vector.<IDumper>;
|
||||
private var var_547:Vector.<IDumper>;
|
||||
|
||||
public function DumpService(osgi:OSGi)
|
||||
{
|
||||
@@ -18,27 +18,27 @@ package alternativa.osgi.service.dump
|
||||
this.osgi = osgi;
|
||||
var console:IConsole = IConsole(osgi.getService(IConsole));
|
||||
console.setCommandHandler("dump",this.hadleConsoleCommand);
|
||||
this.§_-gQ§ = new Dictionary(false);
|
||||
this.§_-G8§ = new Vector.<IDumper>();
|
||||
this.var_548 = new Dictionary(false);
|
||||
this.var_547 = new Vector.<IDumper>();
|
||||
}
|
||||
|
||||
public function registerDumper(dumper:IDumper) : void
|
||||
{
|
||||
if(this.§_-gQ§[dumper.dumperName] != null)
|
||||
if(this.var_548[dumper.dumperName] != null)
|
||||
{
|
||||
throw new Error("Dumper is already registered");
|
||||
}
|
||||
this.§_-gQ§[dumper.dumperName] = dumper;
|
||||
this.§_-G8§.push(dumper);
|
||||
this.var_548[dumper.dumperName] = dumper;
|
||||
this.var_547.push(dumper);
|
||||
}
|
||||
|
||||
public function unregisterDumper(dumperName:String) : void
|
||||
{
|
||||
var dumper:IDumper = this.§_-gQ§[dumperName];
|
||||
var dumper:IDumper = this.var_548[dumperName];
|
||||
if(dumper != null)
|
||||
{
|
||||
this.§_-G8§.splice(this.§_-G8§.indexOf(dumper),1);
|
||||
delete this.§_-gQ§[dumperName];
|
||||
this.var_547.splice(this.var_547.indexOf(dumper),1);
|
||||
delete this.var_548[dumperName];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,14 +53,14 @@ package alternativa.osgi.service.dump
|
||||
if(dumperName.match(/^\d+$/) != null)
|
||||
{
|
||||
index = int(int(dumperName));
|
||||
if(index < this.§_-G8§.length)
|
||||
if(index < this.var_547.length)
|
||||
{
|
||||
dumper = this.§_-G8§[index];
|
||||
dumper = this.var_547[index];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dumper = this.§_-gQ§[dumperName];
|
||||
dumper = this.var_548[dumperName];
|
||||
}
|
||||
if(dumper == null)
|
||||
{
|
||||
@@ -71,20 +71,20 @@ package alternativa.osgi.service.dump
|
||||
|
||||
public function get dumpersByName() : Dictionary
|
||||
{
|
||||
return this.§_-gQ§;
|
||||
return this.var_548;
|
||||
}
|
||||
|
||||
public function get dumpersList() : Vector.<IDumper>
|
||||
{
|
||||
return this.§_-G8§;
|
||||
return this.var_547;
|
||||
}
|
||||
|
||||
private function getDumperList() : String
|
||||
{
|
||||
var s:String = "";
|
||||
for(var i:int = 0; i < this.§_-G8§.length; i++)
|
||||
for(var i:int = 0; i < this.var_547.length; i++)
|
||||
{
|
||||
s += i.toString() + " " + this.§_-G8§[i].dumperName + "\n";
|
||||
s += i.toString() + " " + this.var_547[i].dumperName + "\n";
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ package alternativa.osgi.service.launcherparams
|
||||
{
|
||||
private var urlParams:Properties;
|
||||
|
||||
private var §_-QJ§:Vector.<LibraryInfo>;
|
||||
private var var_553:Vector.<LibraryInfo>;
|
||||
|
||||
public function LauncherParams(urlParams:Properties, startupLibraryInfos:Vector.<LibraryInfo>)
|
||||
{
|
||||
super();
|
||||
this.urlParams = urlParams;
|
||||
this.§_-QJ§ = startupLibraryInfos;
|
||||
this.var_553 = startupLibraryInfos;
|
||||
}
|
||||
|
||||
public function getParameter(parameterName:String) : String
|
||||
@@ -28,7 +28,7 @@ package alternativa.osgi.service.launcherparams
|
||||
|
||||
public function get startupLibraryInfos() : Vector.<LibraryInfo>
|
||||
{
|
||||
return this.§_-QJ§;
|
||||
return this.var_553;
|
||||
}
|
||||
|
||||
public function get isDebug() : Boolean
|
||||
|
||||
@@ -9,21 +9,21 @@ package alternativa.osgi.service.locale
|
||||
|
||||
private var images:Object = {};
|
||||
|
||||
private var §_-bK§:Object = {};
|
||||
private var var_549:Object = {};
|
||||
|
||||
private var numbers:Object = {};
|
||||
|
||||
private var §_-op§:Object = {};
|
||||
private var var_550:Object = {};
|
||||
|
||||
private var §_-VI§:String;
|
||||
private var var_552:String;
|
||||
|
||||
private var §_-4p§:String;
|
||||
private var var_551:String;
|
||||
|
||||
public function LocaleService(language:String, defaultLanguage:String)
|
||||
{
|
||||
super();
|
||||
this.§_-VI§ = language;
|
||||
this.§_-4p§ = defaultLanguage;
|
||||
this.var_552 = language;
|
||||
this.var_551 = defaultLanguage;
|
||||
this.strings = new Dictionary();
|
||||
this.images = new Dictionary();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ package alternativa.osgi.service.locale
|
||||
|
||||
public function setBoolean(id:String, value:Boolean) : void
|
||||
{
|
||||
this.§_-bK§[id] = value;
|
||||
this.var_549[id] = value;
|
||||
}
|
||||
|
||||
public function setNumber(id:String, value:Number) : void
|
||||
@@ -50,7 +50,7 @@ package alternativa.osgi.service.locale
|
||||
|
||||
public function setInt(id:String, value:int) : void
|
||||
{
|
||||
this.§_-op§[id] = value;
|
||||
this.var_550[id] = value;
|
||||
}
|
||||
|
||||
public function getText(id:String, ... vars) : String
|
||||
@@ -75,7 +75,7 @@ package alternativa.osgi.service.locale
|
||||
|
||||
public function getBoolean(id:String) : Boolean
|
||||
{
|
||||
return this.§_-bK§[id];
|
||||
return this.var_549[id];
|
||||
}
|
||||
|
||||
public function getNumber(id:String) : Number
|
||||
@@ -85,17 +85,17 @@ package alternativa.osgi.service.locale
|
||||
|
||||
public function getInt(id:String) : int
|
||||
{
|
||||
return this.§_-op§[id];
|
||||
return this.var_550[id];
|
||||
}
|
||||
|
||||
public function get language() : String
|
||||
{
|
||||
return this.§_-VI§;
|
||||
return this.var_552;
|
||||
}
|
||||
|
||||
public function get defaultLanguage() : String
|
||||
{
|
||||
return this.§_-4p§;
|
||||
return this.var_551;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,33 +6,33 @@ package alternativa.osgi.service.network
|
||||
{
|
||||
private static const SHARED_OBJECT_NAME:String = "connection";
|
||||
|
||||
private var §_-oQ§:String;
|
||||
private var var_556:String;
|
||||
|
||||
private var §_-O7§:Vector.<int>;
|
||||
private var var_555:Vector.<int>;
|
||||
|
||||
private var §_-5u§:String;
|
||||
private var var_554:String;
|
||||
|
||||
public function NetworkService(controlServerAddress:String, controlServerPorts:Vector.<int>, resourcesRootUrl:String)
|
||||
{
|
||||
super();
|
||||
this.§_-oQ§ = controlServerAddress;
|
||||
this.§_-O7§ = controlServerPorts;
|
||||
this.§_-5u§ = resourcesRootUrl;
|
||||
this.var_556 = controlServerAddress;
|
||||
this.var_555 = controlServerPorts;
|
||||
this.var_554 = resourcesRootUrl;
|
||||
}
|
||||
|
||||
public function get controlServerAddress() : String
|
||||
{
|
||||
return this.§_-oQ§;
|
||||
return this.var_556;
|
||||
}
|
||||
|
||||
public function get controlServerPorts() : Vector.<int>
|
||||
{
|
||||
return this.§_-O7§;
|
||||
return this.var_555;
|
||||
}
|
||||
|
||||
public function get resourcesRootUrl() : String
|
||||
{
|
||||
return this.§_-5u§;
|
||||
return this.var_554;
|
||||
}
|
||||
|
||||
public function getLastPort(host:String) : int
|
||||
|
||||
@@ -26,15 +26,15 @@ package alternativa.physics
|
||||
|
||||
public var scene:PhysicsScene;
|
||||
|
||||
public var §_-Sb§:Boolean = true;
|
||||
public var var_500:Boolean = true;
|
||||
|
||||
public var §_-N4§:Boolean = false;
|
||||
public var var_499:Boolean = false;
|
||||
|
||||
public var §_-ia§:int;
|
||||
public var var_502:int;
|
||||
|
||||
public var §_-N0§:Boolean = false;
|
||||
public var var_498:Boolean = false;
|
||||
|
||||
public var §_-fA§:Boolean = true;
|
||||
public var var_501:Boolean = true;
|
||||
|
||||
public var aabb:BoundBox = new BoundBox();
|
||||
|
||||
@@ -42,11 +42,11 @@ package alternativa.physics
|
||||
|
||||
public var state:BodyState = new BodyState();
|
||||
|
||||
public var §_-U3§:BodyState = new BodyState();
|
||||
public var var_492:BodyState = new BodyState();
|
||||
|
||||
public var §_-1G§:Vector3 = new Vector3();
|
||||
public var var_496:Vector3 = new Vector3();
|
||||
|
||||
public var §_-fR§:Vector3 = new Vector3();
|
||||
public var var_497:Vector3 = new Vector3();
|
||||
|
||||
public var material:BodyMaterial = new BodyMaterial();
|
||||
|
||||
@@ -54,15 +54,15 @@ package alternativa.physics
|
||||
|
||||
public var invInertia:Matrix3 = new Matrix3();
|
||||
|
||||
public var §_-nX§:Matrix3 = new Matrix3();
|
||||
public var var_495:Matrix3 = new Matrix3();
|
||||
|
||||
public var baseMatrix:Matrix3 = new Matrix3();
|
||||
|
||||
public var collisionPrimitives:CollisionPrimitiveList;
|
||||
|
||||
public var §_-iu§:Vector3 = new Vector3();
|
||||
public var var_494:Vector3 = new Vector3();
|
||||
|
||||
public var §_-Xr§:Vector3 = new Vector3();
|
||||
public var var_493:Vector3 = new Vector3();
|
||||
|
||||
public var data:Object;
|
||||
|
||||
@@ -105,36 +105,36 @@ package alternativa.physics
|
||||
{
|
||||
var t1:Number = NaN;
|
||||
t1 = 1 - t;
|
||||
pos.x = this.§_-U3§.position.x * t1 + this.state.position.x * t;
|
||||
pos.y = this.§_-U3§.position.y * t1 + this.state.position.y * t;
|
||||
pos.z = this.§_-U3§.position.z * t1 + this.state.position.z * t;
|
||||
orientation.w = this.§_-U3§.orientation.w * t1 + this.state.orientation.w * t;
|
||||
orientation.x = this.§_-U3§.orientation.x * t1 + this.state.orientation.x * t;
|
||||
orientation.y = this.§_-U3§.orientation.y * t1 + this.state.orientation.y * t;
|
||||
orientation.z = this.§_-U3§.orientation.z * t1 + this.state.orientation.z * t;
|
||||
pos.x = this.var_492.position.x * t1 + this.state.position.x * t;
|
||||
pos.y = this.var_492.position.y * t1 + this.state.position.y * t;
|
||||
pos.z = this.var_492.position.z * t1 + this.state.position.z * t;
|
||||
orientation.w = this.var_492.orientation.w * t1 + this.state.orientation.w * t;
|
||||
orientation.x = this.var_492.orientation.x * t1 + this.state.orientation.x * t;
|
||||
orientation.y = this.var_492.orientation.y * t1 + this.state.orientation.y * t;
|
||||
orientation.z = this.var_492.orientation.z * t1 + this.state.orientation.z * t;
|
||||
}
|
||||
|
||||
public function interpolateSLERP(t:Number, pos:Vector3, orientation:Quaternion) : void
|
||||
{
|
||||
var t1:Number = NaN;
|
||||
t1 = 1 - t;
|
||||
pos.x = this.§_-U3§.position.x * t1 + this.state.position.x * t;
|
||||
pos.y = this.§_-U3§.position.y * t1 + this.state.position.y * t;
|
||||
pos.z = this.§_-U3§.position.z * t1 + this.state.position.z * t;
|
||||
orientation.slerp(this.§_-U3§.orientation,this.state.orientation,t);
|
||||
pos.x = this.var_492.position.x * t1 + this.state.position.x * t;
|
||||
pos.y = this.var_492.position.y * t1 + this.state.position.y * t;
|
||||
pos.z = this.var_492.position.z * t1 + this.state.position.z * t;
|
||||
orientation.slerp(this.var_492.orientation,this.state.orientation,t);
|
||||
}
|
||||
|
||||
public function interpolateToMatrix(t:Number, m:Matrix4) : void
|
||||
{
|
||||
var t1:Number = NaN;
|
||||
t1 = 1 - t;
|
||||
m.d = this.§_-U3§.position.x * t1 + this.state.position.x * t;
|
||||
m.h = this.§_-U3§.position.y * t1 + this.state.position.y * t;
|
||||
m.l = this.§_-U3§.position.z * t1 + this.state.position.z * t;
|
||||
_q.w = this.§_-U3§.orientation.w * t1 + this.state.orientation.w * t;
|
||||
_q.x = this.§_-U3§.orientation.x * t1 + this.state.orientation.x * t;
|
||||
_q.y = this.§_-U3§.orientation.y * t1 + this.state.orientation.y * t;
|
||||
_q.z = this.§_-U3§.orientation.z * t1 + this.state.orientation.z * t;
|
||||
m.d = this.var_492.position.x * t1 + this.state.position.x * t;
|
||||
m.h = this.var_492.position.y * t1 + this.state.position.y * t;
|
||||
m.l = this.var_492.position.z * t1 + this.state.position.z * t;
|
||||
_q.w = this.var_492.orientation.w * t1 + this.state.orientation.w * t;
|
||||
_q.x = this.var_492.orientation.x * t1 + this.state.orientation.x * t;
|
||||
_q.y = this.var_492.orientation.y * t1 + this.state.orientation.y * t;
|
||||
_q.z = this.var_492.orientation.z * t1 + this.state.orientation.z * t;
|
||||
_q.normalize();
|
||||
_q.toMatrix4(m);
|
||||
}
|
||||
@@ -142,10 +142,10 @@ package alternativa.physics
|
||||
public function interpolateToMatrixSLERP(t:Number, m:Matrix4) : void
|
||||
{
|
||||
var t1:Number = 1 - t;
|
||||
m.d = this.§_-U3§.position.x * t1 + this.state.position.x * t;
|
||||
m.h = this.§_-U3§.position.y * t1 + this.state.position.y * t;
|
||||
m.l = this.§_-U3§.position.z * t1 + this.state.position.z * t;
|
||||
_q.slerp(this.§_-U3§.orientation,this.state.orientation,t);
|
||||
m.d = this.var_492.position.x * t1 + this.state.position.x * t;
|
||||
m.h = this.var_492.position.y * t1 + this.state.position.y * t;
|
||||
m.l = this.var_492.position.z * t1 + this.state.position.z * t;
|
||||
_q.slerp(this.var_492.orientation,this.state.orientation,t);
|
||||
_q.normalize();
|
||||
_q.toMatrix4(m);
|
||||
}
|
||||
@@ -201,42 +201,42 @@ package alternativa.physics
|
||||
x = (r.y * dir.z - r.z * dir.y) * magnitude;
|
||||
y = (r.z * dir.x - r.x * dir.z) * magnitude;
|
||||
var z:Number = (r.x * dir.y - r.y * dir.x) * magnitude;
|
||||
this.state.rotation.x += this.§_-nX§.a * x + this.§_-nX§.b * y + this.§_-nX§.c * z;
|
||||
this.state.rotation.y += this.§_-nX§.e * x + this.§_-nX§.f * y + this.§_-nX§.g * z;
|
||||
this.state.rotation.z += this.§_-nX§.i * x + this.§_-nX§.j * y + this.§_-nX§.k * z;
|
||||
this.state.rotation.x += this.var_495.a * x + this.var_495.b * y + this.var_495.c * z;
|
||||
this.state.rotation.y += this.var_495.e * x + this.var_495.f * y + this.var_495.g * z;
|
||||
this.state.rotation.z += this.var_495.i * x + this.var_495.j * y + this.var_495.k * z;
|
||||
}
|
||||
|
||||
public function addForce(f:Vector3) : void
|
||||
{
|
||||
this.§_-iu§.add(f);
|
||||
this.var_494.add(f);
|
||||
}
|
||||
|
||||
public function addForceXYZ(fx:Number, fy:Number, fz:Number) : void
|
||||
{
|
||||
this.§_-iu§.x += fx;
|
||||
this.§_-iu§.y += fy;
|
||||
this.§_-iu§.z += fz;
|
||||
this.var_494.x += fx;
|
||||
this.var_494.y += fy;
|
||||
this.var_494.z += fz;
|
||||
}
|
||||
|
||||
public function addWorldForceXYZ(px:Number, py:Number, pz:Number, fx:Number, fy:Number, fz:Number) : void
|
||||
{
|
||||
var rx:Number = NaN;
|
||||
this.§_-iu§.x += fx;
|
||||
this.§_-iu§.y += fy;
|
||||
this.§_-iu§.z += fz;
|
||||
this.var_494.x += fx;
|
||||
this.var_494.y += fy;
|
||||
this.var_494.z += fz;
|
||||
var pos:Vector3 = this.state.position;
|
||||
rx = px - pos.x;
|
||||
var ry:Number = py - pos.y;
|
||||
var rz:Number = pz - pos.z;
|
||||
this.§_-Xr§.x += ry * fz - rz * fy;
|
||||
this.§_-Xr§.y += rz * fx - rx * fz;
|
||||
this.§_-Xr§.z += rx * fy - ry * fx;
|
||||
this.var_493.x += ry * fz - rz * fy;
|
||||
this.var_493.y += rz * fx - rx * fz;
|
||||
this.var_493.z += rx * fy - ry * fx;
|
||||
}
|
||||
|
||||
public function addWorldForce(pos:Vector3, force:Vector3) : void
|
||||
{
|
||||
this.§_-iu§.add(force);
|
||||
this.§_-Xr§.add(_r.diff(pos,this.state.position).cross(force));
|
||||
this.var_494.add(force);
|
||||
this.var_493.add(_r.diff(pos,this.state.position).cross(force));
|
||||
}
|
||||
|
||||
public function addWorldForceScaled(pos:Vector3, force:Vector3, scale:Number) : void
|
||||
@@ -244,44 +244,44 @@ package alternativa.physics
|
||||
_f.x = scale * force.x;
|
||||
_f.y = scale * force.y;
|
||||
_f.z = scale * force.z;
|
||||
this.§_-iu§.add(_f);
|
||||
this.§_-Xr§.add(_r.diff(pos,this.state.position).cross(_f));
|
||||
this.var_494.add(_f);
|
||||
this.var_493.add(_r.diff(pos,this.state.position).cross(_f));
|
||||
}
|
||||
|
||||
public function addLocalForce(pos:Vector3, force:Vector3) : void
|
||||
{
|
||||
this.baseMatrix.transformVector(pos,_r);
|
||||
this.baseMatrix.transformVector(force,_f);
|
||||
this.§_-iu§.add(_f);
|
||||
this.§_-Xr§.add(_r.cross(_f));
|
||||
this.var_494.add(_f);
|
||||
this.var_493.add(_r.cross(_f));
|
||||
}
|
||||
|
||||
public function addWorldForceAtLocalPoint(localPos:Vector3, worldForce:Vector3) : void
|
||||
{
|
||||
this.baseMatrix.transformVector(localPos,_r);
|
||||
this.§_-iu§.add(worldForce);
|
||||
this.§_-Xr§.add(_r.cross(worldForce));
|
||||
this.var_494.add(worldForce);
|
||||
this.var_493.add(_r.cross(worldForce));
|
||||
}
|
||||
|
||||
public function addTorque(t:Vector3) : void
|
||||
{
|
||||
this.§_-Xr§.add(t);
|
||||
this.var_493.add(t);
|
||||
}
|
||||
|
||||
internal function clearAccumulators() : void
|
||||
{
|
||||
this.§_-iu§.x = this.§_-iu§.y = this.§_-iu§.z = 0;
|
||||
this.§_-Xr§.x = this.§_-Xr§.y = this.§_-Xr§.z = 0;
|
||||
this.var_494.x = this.var_494.y = this.var_494.z = 0;
|
||||
this.var_493.x = this.var_493.y = this.var_493.z = 0;
|
||||
}
|
||||
|
||||
internal function calcAccelerations() : void
|
||||
{
|
||||
this.§_-1G§.x = this.§_-iu§.x * this.invMass;
|
||||
this.§_-1G§.y = this.§_-iu§.y * this.invMass;
|
||||
this.§_-1G§.z = this.§_-iu§.z * this.invMass;
|
||||
this.§_-fR§.x = this.§_-nX§.a * this.§_-Xr§.x + this.§_-nX§.b * this.§_-Xr§.y + this.§_-nX§.c * this.§_-Xr§.z;
|
||||
this.§_-fR§.y = this.§_-nX§.e * this.§_-Xr§.x + this.§_-nX§.f * this.§_-Xr§.y + this.§_-nX§.g * this.§_-Xr§.z;
|
||||
this.§_-fR§.z = this.§_-nX§.i * this.§_-Xr§.x + this.§_-nX§.j * this.§_-Xr§.y + this.§_-nX§.k * this.§_-Xr§.z;
|
||||
this.var_496.x = this.var_494.x * this.invMass;
|
||||
this.var_496.y = this.var_494.y * this.invMass;
|
||||
this.var_496.z = this.var_494.z * this.invMass;
|
||||
this.var_497.x = this.var_495.a * this.var_493.x + this.var_495.b * this.var_493.y + this.var_495.c * this.var_493.z;
|
||||
this.var_497.y = this.var_495.e * this.var_493.x + this.var_495.f * this.var_493.y + this.var_495.g * this.var_493.z;
|
||||
this.var_497.z = this.var_495.i * this.var_493.x + this.var_495.j * this.var_493.y + this.var_495.k * this.var_493.z;
|
||||
}
|
||||
|
||||
public function calcDerivedData() : void
|
||||
@@ -289,10 +289,10 @@ package alternativa.physics
|
||||
var item:CollisionPrimitiveListItem = null;
|
||||
var primitive:CollisionPrimitive = null;
|
||||
this.state.orientation.toMatrix3(this.baseMatrix);
|
||||
this.§_-nX§.copy(this.invInertia).append(this.baseMatrix).prependTransposed(this.baseMatrix);
|
||||
this.var_495.copy(this.invInertia).append(this.baseMatrix).prependTransposed(this.baseMatrix);
|
||||
if(this.collisionPrimitives != null)
|
||||
{
|
||||
this.aabb.§_-GT§();
|
||||
this.aabb.name_426();
|
||||
for(item = this.collisionPrimitives.head; item != null; )
|
||||
{
|
||||
primitive = item.primitive;
|
||||
@@ -302,7 +302,7 @@ package alternativa.physics
|
||||
primitive.transform.prepend(primitive.localTransform);
|
||||
}
|
||||
primitive.calculateAABB();
|
||||
this.aabb.§_-EH§(primitive.aabb);
|
||||
this.aabb.name_424(primitive.aabb);
|
||||
item = item.next;
|
||||
}
|
||||
}
|
||||
@@ -310,22 +310,22 @@ package alternativa.physics
|
||||
|
||||
public function saveState() : void
|
||||
{
|
||||
this.§_-U3§.copy(this.state);
|
||||
this.var_492.copy(this.state);
|
||||
}
|
||||
|
||||
internal function restoreState() : void
|
||||
{
|
||||
this.state.copy(this.§_-U3§);
|
||||
this.state.copy(this.var_492);
|
||||
}
|
||||
|
||||
internal function integrateVelocity(dt:Number) : void
|
||||
{
|
||||
this.state.velocity.x += this.§_-1G§.x * dt;
|
||||
this.state.velocity.y += this.§_-1G§.y * dt;
|
||||
this.state.velocity.z += this.§_-1G§.z * dt;
|
||||
this.state.rotation.x += this.§_-fR§.x * dt;
|
||||
this.state.rotation.y += this.§_-fR§.y * dt;
|
||||
this.state.rotation.z += this.§_-fR§.z * dt;
|
||||
this.state.velocity.x += this.var_496.x * dt;
|
||||
this.state.velocity.y += this.var_496.y * dt;
|
||||
this.state.velocity.z += this.var_496.z * dt;
|
||||
this.state.rotation.x += this.var_497.x * dt;
|
||||
this.state.rotation.y += this.var_497.y * dt;
|
||||
this.state.rotation.z += this.var_497.z * dt;
|
||||
this.state.velocity.x *= linDamping;
|
||||
this.state.velocity.y *= linDamping;
|
||||
this.state.velocity.z *= linDamping;
|
||||
|
||||
@@ -2,9 +2,9 @@ package alternativa.physics
|
||||
{
|
||||
public class BodyMaterial
|
||||
{
|
||||
public var §_-Pe§:Number = 0;
|
||||
public var name_501:Number = 0;
|
||||
|
||||
public var §_-J1§:Number = 0.3;
|
||||
public var name_422:Number = 0.3;
|
||||
|
||||
public function BodyMaterial()
|
||||
{
|
||||
|
||||
@@ -8,32 +8,32 @@ package alternativa.physics
|
||||
|
||||
public var body2:Body;
|
||||
|
||||
public var §_-Pe§:Number;
|
||||
public var name_501:Number;
|
||||
|
||||
public var §_-J1§:Number;
|
||||
public var name_422:Number;
|
||||
|
||||
public var normal:Vector3 = new Vector3();
|
||||
|
||||
public var points:Vector.<ContactPoint>;
|
||||
|
||||
public var §_-P3§:int;
|
||||
public var name_506:int;
|
||||
|
||||
public var §_-HA§:Number = 0;
|
||||
public var var_663:Number = 0;
|
||||
|
||||
public var §_-CV§:Boolean;
|
||||
public var name_507:Boolean;
|
||||
|
||||
public var next:Contact;
|
||||
|
||||
public var index:int;
|
||||
|
||||
private const §_-29§:int = 8;
|
||||
private const const_3:int = 8;
|
||||
|
||||
public function Contact(index:int)
|
||||
{
|
||||
this.points = new Vector.<ContactPoint>(this.§_-29§,true);
|
||||
this.points = new Vector.<ContactPoint>(this.const_3,true);
|
||||
super();
|
||||
this.index = index;
|
||||
for(var i:int = 0; i < this.§_-29§; i++)
|
||||
for(var i:int = 0; i < this.const_3; i++)
|
||||
{
|
||||
this.points[i] = new ContactPoint();
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ package alternativa.physics
|
||||
|
||||
public var feature2:int;
|
||||
|
||||
public var §_-0C§:Number;
|
||||
public var name_503:Number;
|
||||
|
||||
public var §_-A-§:Number;
|
||||
public var name_505:Number;
|
||||
|
||||
public var §_-DS§:Number;
|
||||
public var name_502:Number;
|
||||
|
||||
public var angularInertia1:Number;
|
||||
|
||||
@@ -26,9 +26,9 @@ package alternativa.physics
|
||||
|
||||
public var r2:Vector3 = new Vector3();
|
||||
|
||||
public var §_-Dv§:Number;
|
||||
public var name_504:Number;
|
||||
|
||||
public var §_-CV§:Boolean;
|
||||
public var name_507:Boolean;
|
||||
|
||||
public function ContactPoint()
|
||||
{
|
||||
|
||||
@@ -3,54 +3,54 @@ package alternativa.physics
|
||||
import alternativa.math.Matrix3;
|
||||
import alternativa.math.Vector3;
|
||||
import alternativa.physics.collision.ICollisionDetector;
|
||||
import alternativa.physics.collision.§_-LG§;
|
||||
import alternativa.physics.collision.name_508;
|
||||
import alternativa.physics.constraints.Constraint;
|
||||
|
||||
public class PhysicsScene
|
||||
{
|
||||
private static var lastBodyId:int;
|
||||
|
||||
public const §_-ga§:int = 1000;
|
||||
public const const_2:int = 1000;
|
||||
|
||||
public var §_-kv§:int = 10;
|
||||
public var var_608:int = 10;
|
||||
|
||||
public var §_-YB§:Number = 0.1;
|
||||
public var name_360:Number = 0.1;
|
||||
|
||||
public var dynamic:Number = 0.5;
|
||||
public var name_365:Number = 0.5;
|
||||
|
||||
public var §_-Yi§:int = 5;
|
||||
public var var_605:int = 5;
|
||||
|
||||
public var §_-2I§:int = 5;
|
||||
public var var_602:int = 5;
|
||||
|
||||
public var §_-06§:Boolean = false;
|
||||
public var name_366:Boolean = false;
|
||||
|
||||
public var §_-Y6§:int = 10;
|
||||
public var var_604:int = 10;
|
||||
|
||||
public var §_-cc§:Number = 1;
|
||||
public var var_606:Number = 1;
|
||||
|
||||
public var §_-GG§:Number = 0.01;
|
||||
public var var_603:Number = 0.01;
|
||||
|
||||
public var §_-MX§:Vector3 = new Vector3(0,0,-9.8);
|
||||
public var name_403:Vector3 = new Vector3(0,0,-9.8);
|
||||
|
||||
public var §_-fz§:Number = 9.8;
|
||||
public var var_607:Number = 9.8;
|
||||
|
||||
public var collisionDetector:ICollisionDetector;
|
||||
|
||||
public var §_-By§:BodyList = new BodyList();
|
||||
public var name_438:BodyList = new BodyList();
|
||||
|
||||
public var contacts:Contact;
|
||||
|
||||
public var §_-7e§:Vector.<Constraint> = new Vector.<Constraint>();
|
||||
public var var_599:Vector.<Constraint> = new Vector.<Constraint>();
|
||||
|
||||
public var §_-0v§:int;
|
||||
public var var_598:int;
|
||||
|
||||
public var §_-hA§:int;
|
||||
public var var_601:int;
|
||||
|
||||
public var time:int;
|
||||
|
||||
private var §_-lh§:Contact;
|
||||
private var var_600:Contact;
|
||||
|
||||
private var §_-MN§:Vector3 = new Vector3();
|
||||
private var var_597:Vector3 = new Vector3();
|
||||
|
||||
private var _v:Vector3 = new Vector3();
|
||||
|
||||
@@ -59,35 +59,35 @@ package alternativa.physics
|
||||
super();
|
||||
this.contacts = new Contact(0);
|
||||
var contact:Contact = this.contacts;
|
||||
for(var i:int = 1; i < this.§_-ga§; i++)
|
||||
for(var i:int = 1; i < this.const_2; i++)
|
||||
{
|
||||
contact.next = new Contact(i);
|
||||
contact = contact.next;
|
||||
}
|
||||
this.collisionDetector = new §_-LG§();
|
||||
this.collisionDetector = new name_508();
|
||||
}
|
||||
|
||||
public function get gravity() : Vector3
|
||||
{
|
||||
return this.§_-MX§.clone();
|
||||
return this.name_403.clone();
|
||||
}
|
||||
|
||||
public function set gravity(value:Vector3) : void
|
||||
{
|
||||
this.§_-MX§.copy(value);
|
||||
this.§_-fz§ = this.§_-MX§.length();
|
||||
this.name_403.copy(value);
|
||||
this.var_607 = this.name_403.length();
|
||||
}
|
||||
|
||||
public function addBody(body:Body) : void
|
||||
{
|
||||
body.id = lastBodyId++;
|
||||
body.scene = this;
|
||||
this.§_-By§.append(body);
|
||||
this.name_438.append(body);
|
||||
}
|
||||
|
||||
public function removeBody(body:Body) : void
|
||||
{
|
||||
if(this.§_-By§.remove(body))
|
||||
if(this.name_438.remove(body))
|
||||
{
|
||||
body.scene = null;
|
||||
}
|
||||
@@ -95,20 +95,20 @@ package alternativa.physics
|
||||
|
||||
public function addConstraint(c:Constraint) : void
|
||||
{
|
||||
var _loc2_:* = this.§_-0v§++;
|
||||
this.§_-7e§[_loc2_] = c;
|
||||
var _loc2_:* = this.var_598++;
|
||||
this.var_599[_loc2_] = c;
|
||||
c.world = this;
|
||||
}
|
||||
|
||||
public function removeConstraint(c:Constraint) : Boolean
|
||||
{
|
||||
var idx:int = int(this.§_-7e§.indexOf(c));
|
||||
var idx:int = int(this.var_599.indexOf(c));
|
||||
if(idx < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.§_-7e§.splice(idx,1);
|
||||
--this.§_-0v§;
|
||||
this.var_599.splice(idx,1);
|
||||
--this.var_598;
|
||||
c.world = null;
|
||||
return true;
|
||||
}
|
||||
@@ -116,15 +116,15 @@ package alternativa.physics
|
||||
private function applyForces(dt:Number) : void
|
||||
{
|
||||
var body:Body = null;
|
||||
for(var item:BodyListItem = this.§_-By§.head; item != null; )
|
||||
for(var item:BodyListItem = this.name_438.head; item != null; )
|
||||
{
|
||||
body = item.body;
|
||||
body.calcAccelerations();
|
||||
if(body.§_-fA§ && body.§_-Sb§ && !body.§_-N0§)
|
||||
if(body.var_501 && body.var_500 && !body.var_498)
|
||||
{
|
||||
body.§_-1G§.x += this.§_-MX§.x;
|
||||
body.§_-1G§.y += this.§_-MX§.y;
|
||||
body.§_-1G§.z += this.§_-MX§.z;
|
||||
body.var_496.x += this.name_403.x;
|
||||
body.var_496.y += this.name_403.y;
|
||||
body.var_496.z += this.name_403.z;
|
||||
}
|
||||
item = item.next;
|
||||
}
|
||||
@@ -138,13 +138,13 @@ package alternativa.physics
|
||||
var j:int = 0;
|
||||
var cp:ContactPoint = null;
|
||||
var bPos:Vector3 = null;
|
||||
for(var item:BodyListItem = this.§_-By§.head; item != null; )
|
||||
for(var item:BodyListItem = this.name_438.head; item != null; )
|
||||
{
|
||||
body = item.body;
|
||||
if(!body.§_-N0§)
|
||||
if(!body.var_498)
|
||||
{
|
||||
body.saveState();
|
||||
if(this.§_-06§)
|
||||
if(this.name_366)
|
||||
{
|
||||
body.integrateVelocity(dt);
|
||||
body.integratePosition(dt);
|
||||
@@ -153,12 +153,12 @@ package alternativa.physics
|
||||
}
|
||||
item = item.next;
|
||||
}
|
||||
this.§_-lh§ = this.collisionDetector.getAllContacts(this.contacts);
|
||||
for(var contact:Contact = this.contacts; contact != this.§_-lh§; )
|
||||
this.var_600 = this.collisionDetector.getAllContacts(this.contacts);
|
||||
for(var contact:Contact = this.contacts; contact != this.var_600; )
|
||||
{
|
||||
b1 = contact.body1;
|
||||
b2 = contact.body2;
|
||||
for(j = 0; j < contact.§_-P3§; )
|
||||
for(j = 0; j < contact.name_506; )
|
||||
{
|
||||
cp = contact.points[j];
|
||||
bPos = b1.state.position;
|
||||
@@ -176,12 +176,12 @@ package alternativa.physics
|
||||
}
|
||||
contact = contact.next;
|
||||
}
|
||||
if(this.§_-06§)
|
||||
if(this.name_366)
|
||||
{
|
||||
for(item = this.§_-By§.head; item != null; )
|
||||
for(item = this.name_438.head; item != null; )
|
||||
{
|
||||
body = item.body;
|
||||
if(!body.§_-N0§)
|
||||
if(!body.var_498)
|
||||
{
|
||||
body.restoreState();
|
||||
body.calcDerivedData();
|
||||
@@ -198,63 +198,63 @@ package alternativa.physics
|
||||
var j:int = 0;
|
||||
var cp:ContactPoint = null;
|
||||
var constraint:Constraint = null;
|
||||
for(var contact:Contact = this.contacts; contact != this.§_-lh§; )
|
||||
for(var contact:Contact = this.contacts; contact != this.var_600; )
|
||||
{
|
||||
b1 = contact.body1;
|
||||
b2 = contact.body2;
|
||||
if(b1.§_-N0§)
|
||||
if(b1.var_498)
|
||||
{
|
||||
b1.§_-N0§ = false;
|
||||
b1.§_-ia§ = 0;
|
||||
b1.var_498 = false;
|
||||
b1.var_502 = 0;
|
||||
}
|
||||
if(b2 != null && b2.§_-N0§)
|
||||
if(b2 != null && b2.var_498)
|
||||
{
|
||||
b2.§_-N0§ = false;
|
||||
b2.§_-ia§ = 0;
|
||||
b2.var_498 = false;
|
||||
b2.var_502 = 0;
|
||||
}
|
||||
contact.§_-Pe§ = b1.material.§_-Pe§;
|
||||
if(b2 != null && b2.material.§_-Pe§ < contact.§_-Pe§)
|
||||
contact.name_501 = b1.material.name_501;
|
||||
if(b2 != null && b2.material.name_501 < contact.name_501)
|
||||
{
|
||||
contact.§_-Pe§ = b2.material.§_-Pe§;
|
||||
contact.name_501 = b2.material.name_501;
|
||||
}
|
||||
contact.§_-J1§ = b1.material.§_-J1§;
|
||||
if(b2 != null && b2.material.§_-J1§ < contact.§_-J1§)
|
||||
contact.name_422 = b1.material.name_422;
|
||||
if(b2 != null && b2.material.name_422 < contact.name_422)
|
||||
{
|
||||
contact.§_-J1§ = b2.material.§_-J1§;
|
||||
contact.name_422 = b2.material.name_422;
|
||||
}
|
||||
for(j = 0; j < contact.§_-P3§; )
|
||||
for(j = 0; j < contact.name_506; )
|
||||
{
|
||||
cp = contact.points[j];
|
||||
cp.§_-Dv§ = 0;
|
||||
cp.§_-DS§ = 0;
|
||||
if(b1.§_-Sb§)
|
||||
cp.name_504 = 0;
|
||||
cp.name_502 = 0;
|
||||
if(b1.var_500)
|
||||
{
|
||||
cp.angularInertia1 = this._v.cross2(cp.r1,contact.normal).transform3(b1.§_-nX§).cross(cp.r1).dot(contact.normal);
|
||||
cp.§_-DS§ += b1.invMass + cp.angularInertia1;
|
||||
cp.angularInertia1 = this._v.cross2(cp.r1,contact.normal).transform3(b1.var_495).cross(cp.r1).dot(contact.normal);
|
||||
cp.name_502 += b1.invMass + cp.angularInertia1;
|
||||
}
|
||||
if(b2 != null && b2.§_-Sb§)
|
||||
if(b2 != null && b2.var_500)
|
||||
{
|
||||
cp.angularInertia2 = this._v.cross2(cp.r2,contact.normal).transform3(b2.§_-nX§).cross(cp.r2).dot(contact.normal);
|
||||
cp.§_-DS§ += b2.invMass + cp.angularInertia2;
|
||||
cp.angularInertia2 = this._v.cross2(cp.r2,contact.normal).transform3(b2.var_495).cross(cp.r2).dot(contact.normal);
|
||||
cp.name_502 += b2.invMass + cp.angularInertia2;
|
||||
}
|
||||
this.calcSepVelocity(b1,b2,cp,this._v);
|
||||
cp.§_-0C§ = this._v.dot(contact.normal);
|
||||
if(cp.§_-0C§ < 0)
|
||||
cp.name_503 = this._v.dot(contact.normal);
|
||||
if(cp.name_503 < 0)
|
||||
{
|
||||
cp.§_-0C§ = -contact.§_-Pe§ * cp.§_-0C§;
|
||||
cp.name_503 = -contact.name_501 * cp.name_503;
|
||||
}
|
||||
cp.§_-A-§ = cp.penetration > this.§_-YB§ ? (cp.penetration - this.§_-YB§) / (this.§_-kv§ * dt) : 0;
|
||||
if(cp.§_-A-§ > this.dynamic)
|
||||
cp.name_505 = cp.penetration > this.name_360 ? (cp.penetration - this.name_360) / (this.var_608 * dt) : 0;
|
||||
if(cp.name_505 > this.name_365)
|
||||
{
|
||||
cp.§_-A-§ = this.dynamic;
|
||||
cp.name_505 = this.name_365;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
contact = contact.next;
|
||||
}
|
||||
for(var i:int = 0; i < this.§_-0v§; i++)
|
||||
for(var i:int = 0; i < this.var_598; i++)
|
||||
{
|
||||
constraint = this.§_-7e§[i];
|
||||
constraint = this.var_599[i];
|
||||
constraint.preProcess(dt);
|
||||
}
|
||||
}
|
||||
@@ -264,19 +264,19 @@ package alternativa.physics
|
||||
var i:int = 0;
|
||||
var contact:Contact = null;
|
||||
var constraint:Constraint = null;
|
||||
var iterNum:int = forceInelastic ? this.§_-2I§ : this.§_-Yi§;
|
||||
var iterNum:int = forceInelastic ? this.var_602 : this.var_605;
|
||||
var forwardLoop:Boolean = false;
|
||||
for(var iter:int = 0; iter < iterNum; iter++)
|
||||
{
|
||||
forwardLoop = !forwardLoop;
|
||||
for(contact = this.contacts; contact != this.§_-lh§; )
|
||||
for(contact = this.contacts; contact != this.var_600; )
|
||||
{
|
||||
this.resolveContact(contact,forceInelastic,forwardLoop);
|
||||
contact = contact.next;
|
||||
}
|
||||
for(i = 0; i < this.§_-0v§; i++)
|
||||
for(i = 0; i < this.var_598; i++)
|
||||
{
|
||||
constraint = this.§_-7e§[i];
|
||||
constraint = this.var_599[i];
|
||||
constraint.apply(dt);
|
||||
}
|
||||
}
|
||||
@@ -290,13 +290,13 @@ package alternativa.physics
|
||||
var normal:Vector3 = contactInfo.normal;
|
||||
if(forwardLoop)
|
||||
{
|
||||
for(i = 0; i < contactInfo.§_-P3§; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i++)
|
||||
for(i = 0; i < contactInfo.name_506; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i++)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i = contactInfo.§_-P3§ - 1; i >= 0; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i--)
|
||||
for(i = contactInfo.name_506 - 1; i >= 0; this.resolveContactPoint(i,b1,b2,contactInfo,normal,forceInelastic),i--)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -313,7 +313,7 @@ package alternativa.physics
|
||||
var cp:ContactPoint = contact.points[idx];
|
||||
if(!forceInelastic)
|
||||
{
|
||||
cp.§_-CV§ = true;
|
||||
cp.name_507 = true;
|
||||
}
|
||||
var newVel:Number = 0;
|
||||
this.calcSepVelocity(b1,b2,cp,this._v);
|
||||
@@ -321,12 +321,12 @@ package alternativa.physics
|
||||
var sepVel:Number = this._v.x * cnormal.x + this._v.y * cnormal.y + this._v.z * cnormal.z;
|
||||
if(forceInelastic)
|
||||
{
|
||||
minSpeVel = cp.§_-A-§;
|
||||
minSpeVel = cp.name_505;
|
||||
if(sepVel < minSpeVel)
|
||||
{
|
||||
cp.§_-CV§ = false;
|
||||
cp.name_507 = false;
|
||||
}
|
||||
else if(cp.§_-CV§)
|
||||
else if(cp.name_507)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -334,22 +334,22 @@ package alternativa.physics
|
||||
}
|
||||
else
|
||||
{
|
||||
newVel = cp.§_-0C§;
|
||||
newVel = cp.name_503;
|
||||
}
|
||||
var deltaVel:Number = newVel - sepVel;
|
||||
var impulse:Number = deltaVel / cp.§_-DS§;
|
||||
var accumImpulse:Number = cp.§_-Dv§ + impulse;
|
||||
var impulse:Number = deltaVel / cp.name_502;
|
||||
var accumImpulse:Number = cp.name_504 + impulse;
|
||||
if(accumImpulse < 0)
|
||||
{
|
||||
accumImpulse = 0;
|
||||
}
|
||||
var deltaImpulse:Number = accumImpulse - cp.§_-Dv§;
|
||||
cp.§_-Dv§ = accumImpulse;
|
||||
if(b1.§_-Sb§)
|
||||
var deltaImpulse:Number = accumImpulse - cp.name_504;
|
||||
cp.name_504 = accumImpulse;
|
||||
if(b1.var_500)
|
||||
{
|
||||
b1.applyRelPosWorldImpulse(cp.r1,normal,deltaImpulse);
|
||||
}
|
||||
if(b2 != null && b2.§_-Sb§)
|
||||
if(b2 != null && b2.var_500)
|
||||
{
|
||||
b2.applyRelPosWorldImpulse(cp.r2,normal,-deltaImpulse);
|
||||
}
|
||||
@@ -364,42 +364,42 @@ package alternativa.physics
|
||||
{
|
||||
return;
|
||||
}
|
||||
this.§_-MN§.x = -this._v.x;
|
||||
this.§_-MN§.y = -this._v.y;
|
||||
this.§_-MN§.z = -this._v.z;
|
||||
this.§_-MN§.normalize();
|
||||
if(b1.§_-Sb§)
|
||||
this.var_597.x = -this._v.x;
|
||||
this.var_597.y = -this._v.y;
|
||||
this.var_597.z = -this._v.z;
|
||||
this.var_597.normalize();
|
||||
if(b1.var_500)
|
||||
{
|
||||
r = cp.r1;
|
||||
m = b1.§_-nX§;
|
||||
this._v.x = r.y * this.§_-MN§.z - r.z * this.§_-MN§.y;
|
||||
this._v.y = r.z * this.§_-MN§.x - r.x * this.§_-MN§.z;
|
||||
this._v.z = r.x * this.§_-MN§.y - r.y * this.§_-MN§.x;
|
||||
m = b1.var_495;
|
||||
this._v.x = r.y * this.var_597.z - r.z * this.var_597.y;
|
||||
this._v.y = r.z * this.var_597.x - r.x * this.var_597.z;
|
||||
this._v.z = r.x * this.var_597.y - r.y * this.var_597.x;
|
||||
xx = m.a * this._v.x + m.b * this._v.y + m.c * this._v.z;
|
||||
yy = m.e * this._v.x + m.f * this._v.y + m.g * this._v.z;
|
||||
zz = m.i * this._v.x + m.j * this._v.y + m.k * this._v.z;
|
||||
this._v.x = yy * r.z - zz * r.y;
|
||||
this._v.y = zz * r.x - xx * r.z;
|
||||
this._v.z = xx * r.y - yy * r.x;
|
||||
tanSpeedByUnitImpulse += b1.invMass + this._v.x * this.§_-MN§.x + this._v.y * this.§_-MN§.y + this._v.z * this.§_-MN§.z;
|
||||
tanSpeedByUnitImpulse += b1.invMass + this._v.x * this.var_597.x + this._v.y * this.var_597.y + this._v.z * this.var_597.z;
|
||||
}
|
||||
if(b2 != null && b2.§_-Sb§)
|
||||
if(b2 != null && b2.var_500)
|
||||
{
|
||||
r = cp.r2;
|
||||
m = b2.§_-nX§;
|
||||
this._v.x = r.y * this.§_-MN§.z - r.z * this.§_-MN§.y;
|
||||
this._v.y = r.z * this.§_-MN§.x - r.x * this.§_-MN§.z;
|
||||
this._v.z = r.x * this.§_-MN§.y - r.y * this.§_-MN§.x;
|
||||
m = b2.var_495;
|
||||
this._v.x = r.y * this.var_597.z - r.z * this.var_597.y;
|
||||
this._v.y = r.z * this.var_597.x - r.x * this.var_597.z;
|
||||
this._v.z = r.x * this.var_597.y - r.y * this.var_597.x;
|
||||
xx = m.a * this._v.x + m.b * this._v.y + m.c * this._v.z;
|
||||
yy = m.e * this._v.x + m.f * this._v.y + m.g * this._v.z;
|
||||
zz = m.i * this._v.x + m.j * this._v.y + m.k * this._v.z;
|
||||
this._v.x = yy * r.z - zz * r.y;
|
||||
this._v.y = zz * r.x - xx * r.z;
|
||||
this._v.z = xx * r.y - yy * r.x;
|
||||
tanSpeedByUnitImpulse += b2.invMass + this._v.x * this.§_-MN§.x + this._v.y * this.§_-MN§.y + this._v.z * this.§_-MN§.z;
|
||||
tanSpeedByUnitImpulse += b2.invMass + this._v.x * this.var_597.x + this._v.y * this.var_597.y + this._v.z * this.var_597.z;
|
||||
}
|
||||
var tanImpulse:Number = tanSpeed / tanSpeedByUnitImpulse;
|
||||
var max:Number = contact.§_-J1§ * cp.§_-Dv§;
|
||||
var max:Number = contact.name_422 * cp.name_504;
|
||||
if(max < 0)
|
||||
{
|
||||
if(tanImpulse < max)
|
||||
@@ -411,13 +411,13 @@ package alternativa.physics
|
||||
{
|
||||
tanImpulse = max;
|
||||
}
|
||||
if(b1.§_-Sb§)
|
||||
if(b1.var_500)
|
||||
{
|
||||
b1.applyRelPosWorldImpulse(cp.r1,this.§_-MN§,tanImpulse);
|
||||
b1.applyRelPosWorldImpulse(cp.r1,this.var_597,tanImpulse);
|
||||
}
|
||||
if(b2 != null && b2.§_-Sb§)
|
||||
if(b2 != null && b2.var_500)
|
||||
{
|
||||
b2.applyRelPosWorldImpulse(cp.r2,this.§_-MN§,-tanImpulse);
|
||||
b2.applyRelPosWorldImpulse(cp.r2,this.var_597,-tanImpulse);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ package alternativa.physics
|
||||
|
||||
private function intergateVelocities(dt:Number) : void
|
||||
{
|
||||
for(var item:BodyListItem = this.§_-By§.head; item != null; )
|
||||
for(var item:BodyListItem = this.name_438.head; item != null; )
|
||||
{
|
||||
item.body.integrateVelocity(dt);
|
||||
item = item.next;
|
||||
@@ -458,10 +458,10 @@ package alternativa.physics
|
||||
private function integratePositions(dt:Number) : void
|
||||
{
|
||||
var body:Body = null;
|
||||
for(var item:BodyListItem = this.§_-By§.head; item != null; )
|
||||
for(var item:BodyListItem = this.name_438.head; item != null; )
|
||||
{
|
||||
body = item.body;
|
||||
if(body.§_-Sb§ && !body.§_-N0§)
|
||||
if(body.var_500 && !body.var_498)
|
||||
{
|
||||
body.integratePosition(dt);
|
||||
}
|
||||
@@ -472,28 +472,28 @@ package alternativa.physics
|
||||
private function postPhysics() : void
|
||||
{
|
||||
var body:Body = null;
|
||||
for(var item:BodyListItem = this.§_-By§.head; item != null; )
|
||||
for(var item:BodyListItem = this.name_438.head; item != null; )
|
||||
{
|
||||
body = item.body;
|
||||
body.clearAccumulators();
|
||||
body.calcDerivedData();
|
||||
if(body.§_-N4§)
|
||||
if(body.var_499)
|
||||
{
|
||||
if(body.state.velocity.length() < this.§_-cc§ && body.state.rotation.length() < this.§_-GG§)
|
||||
if(body.state.velocity.length() < this.var_606 && body.state.rotation.length() < this.var_603)
|
||||
{
|
||||
if(!body.§_-N0§)
|
||||
if(!body.var_498)
|
||||
{
|
||||
++body.§_-ia§;
|
||||
if(body.§_-ia§ >= this.§_-Y6§)
|
||||
++body.var_502;
|
||||
if(body.var_502 >= this.var_604)
|
||||
{
|
||||
body.§_-N0§ = true;
|
||||
body.var_498 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
body.§_-ia§ = 0;
|
||||
body.§_-N0§ = false;
|
||||
body.var_502 = 0;
|
||||
body.var_498 = false;
|
||||
}
|
||||
}
|
||||
item = item.next;
|
||||
@@ -502,7 +502,7 @@ package alternativa.physics
|
||||
|
||||
public function update(delta:int) : void
|
||||
{
|
||||
++this.§_-hA§;
|
||||
++this.var_601;
|
||||
this.time += delta;
|
||||
var dt:Number = 0.001 * delta;
|
||||
this.applyForces(dt);
|
||||
|
||||
@@ -6,21 +6,21 @@ package alternativa.physics.collision
|
||||
{
|
||||
public var indices:Vector.<int>;
|
||||
|
||||
public var §_-Xt§:Vector.<int>;
|
||||
public var var_674:Vector.<int>;
|
||||
|
||||
public var boundBox:BoundBox;
|
||||
|
||||
public var parent:CollisionKdNode;
|
||||
|
||||
public var §_-da§:CollisionKdTree2D;
|
||||
public var name_487:CollisionKdTree2D;
|
||||
|
||||
public var axis:int = -1;
|
||||
|
||||
public var coord:Number;
|
||||
|
||||
public var §_-75§:CollisionKdNode;
|
||||
public var name_484:CollisionKdNode;
|
||||
|
||||
public var §_-Gm§:CollisionKdNode;
|
||||
public var name_483:CollisionKdNode;
|
||||
|
||||
public function CollisionKdNode()
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ package alternativa.physics.collision.colliders
|
||||
import alternativa.physics.ContactPoint;
|
||||
import alternativa.physics.collision.CollisionPrimitive;
|
||||
import alternativa.physics.collision.primitives.CollisionRect;
|
||||
import alternativa.physics.collision.primitives.§_-m3§;
|
||||
import alternativa.physics.collision.primitives.name_311;
|
||||
|
||||
public class BoxRectCollider extends BoxCollider
|
||||
{
|
||||
@@ -28,9 +28,9 @@ package alternativa.physics.collision.colliders
|
||||
|
||||
private var axis22:Vector3 = new Vector3();
|
||||
|
||||
private var §_-Wt§:int;
|
||||
private var var_675:int;
|
||||
|
||||
private var §_-hK§:Number;
|
||||
private var var_676:Number;
|
||||
|
||||
private var points1:Vector.<Vector3> = new Vector.<Vector3>(8,true);
|
||||
|
||||
@@ -53,27 +53,27 @@ package alternativa.physics.collision.colliders
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var box:§_-m3§ = prim1 as §_-m3§;
|
||||
var box:name_311 = prim1 as name_311;
|
||||
if(box == null)
|
||||
{
|
||||
box = prim2 as §_-m3§;
|
||||
box = prim2 as name_311;
|
||||
rect = prim1 as CollisionRect;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect = prim2 as CollisionRect;
|
||||
}
|
||||
if(this.§_-Wt§ < 4)
|
||||
if(this.var_675 < 4)
|
||||
{
|
||||
if(!this.findFaceContactPoints(box,rect,this.vectorToBox,this.§_-Wt§,contact))
|
||||
if(!this.findFaceContactPoints(box,rect,this.vectorToBox,this.var_675,contact))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-Wt§ -= 4;
|
||||
if(!this.findEdgesIntersection(box,rect,this.vectorToBox,int(this.§_-Wt§ / 2),this.§_-Wt§ % 2,contact))
|
||||
this.var_675 -= 4;
|
||||
if(!this.findEdgesIntersection(box,rect,this.vectorToBox,int(this.var_675 / 2),this.var_675 % 2,contact))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -91,14 +91,14 @@ package alternativa.physics.collision.colliders
|
||||
|
||||
override public function haveCollision(prim1:CollisionPrimitive, prim2:CollisionPrimitive) : Boolean
|
||||
{
|
||||
var box:§_-m3§ = null;
|
||||
var box:name_311 = null;
|
||||
var rect:CollisionRect = null;
|
||||
var rectTransform:Matrix4 = null;
|
||||
this.§_-hK§ = 10000000000;
|
||||
box = prim1 as §_-m3§;
|
||||
this.var_676 = 10000000000;
|
||||
box = prim1 as name_311;
|
||||
if(box == null)
|
||||
{
|
||||
box = prim2 as §_-m3§;
|
||||
box = prim2 as name_311;
|
||||
rect = prim1 as CollisionRect;
|
||||
}
|
||||
else
|
||||
@@ -159,7 +159,7 @@ package alternativa.physics.collision.colliders
|
||||
return true;
|
||||
}
|
||||
|
||||
private function findFaceContactPoints(box:§_-m3§, rect:CollisionRect, vectorToBox:Vector3, faceAxisIdx:int, contact:Contact) : Boolean
|
||||
private function findFaceContactPoints(box:name_311, rect:CollisionRect, vectorToBox:Vector3, faceAxisIdx:int, contact:Contact) : Boolean
|
||||
{
|
||||
var pnum:int = 0;
|
||||
var i:int = 0;
|
||||
@@ -206,13 +206,13 @@ package alternativa.physics.collision.colliders
|
||||
boxTransform.transformPointsN(this.points1,this.points2,4);
|
||||
rectTransform.transformPointsTransposedN(this.points2,this.points1,4);
|
||||
pnum = this.clipByRect(rect.hs);
|
||||
contact.§_-P3§ = 0;
|
||||
contact.name_506 = 0;
|
||||
for(i = 0; i < pnum; )
|
||||
{
|
||||
v = this.points1[i];
|
||||
if(v.z < this.epsilon)
|
||||
{
|
||||
cp = contact.points[contact.§_-P3§++];
|
||||
cp = contact.points[contact.name_506++];
|
||||
cp.penetration = -v.z;
|
||||
cpPos = cp.pos;
|
||||
cpPos.x = rectTransform.a * v.x + rectTransform.b * v.y + rectTransform.c * v.z + rectTransform.d;
|
||||
@@ -249,14 +249,14 @@ package alternativa.physics.collision.colliders
|
||||
rectTransform.transformPointsN(this.points1,this.points2,4);
|
||||
boxTransform.transformPointsTransposedN(this.points2,this.points1,4);
|
||||
pnum = this.clipByBox(box.hs,faceAxisIdx);
|
||||
contact.§_-P3§ = 0;
|
||||
contact.name_506 = 0;
|
||||
for(i = 0; i < pnum; )
|
||||
{
|
||||
v = this.points1[i];
|
||||
_loc21_ = this.getPointBoxPenetration(box.hs,v,faceAxisIdx,negativeFace);
|
||||
if(_loc21_ > -this.epsilon)
|
||||
{
|
||||
cp = contact.points[contact.§_-P3§++];
|
||||
cp = contact.points[contact.name_506++];
|
||||
cp.penetration = _loc21_;
|
||||
cpPos = cp.pos;
|
||||
cpPos.x = boxTransform.a * v.x + boxTransform.b * v.y + boxTransform.c * v.z + boxTransform.d;
|
||||
@@ -392,7 +392,7 @@ package alternativa.physics.collision.colliders
|
||||
return clipHighY(hs.y,pnum,this.points2,this.points1,this.epsilon);
|
||||
}
|
||||
|
||||
private function findEdgesIntersection(box:§_-m3§, rect:CollisionRect, vectorToBox:Vector3, axisIdx1:int, axisIdx2:int, contact:Contact) : Boolean
|
||||
private function findEdgesIntersection(box:name_311, rect:CollisionRect, vectorToBox:Vector3, axisIdx1:int, axisIdx2:int, contact:Contact) : Boolean
|
||||
{
|
||||
var halfLen1:Number = NaN;
|
||||
var halfLen2:Number = NaN;
|
||||
@@ -483,9 +483,9 @@ package alternativa.physics.collision.colliders
|
||||
var c2:Number = this.axis20.x * vx + this.axis20.y * vy + this.axis20.z * vz;
|
||||
var t1:Number = (c2 * k - c1) / det;
|
||||
var t2:Number = (c2 - c1 * k) / det;
|
||||
contact.§_-P3§ = 1;
|
||||
contact.name_506 = 1;
|
||||
var cp:ContactPoint = contact.points[0];
|
||||
cp.penetration = this.§_-hK§;
|
||||
cp.penetration = this.var_676;
|
||||
var cpPos:Vector3 = cp.pos;
|
||||
cpPos.x = 0.5 * (x1 + this.axis10.x * t1 + x2 + this.axis20.x * t2);
|
||||
cpPos.y = 0.5 * (y1 + this.axis10.y * t1 + y2 + this.axis20.y * t2);
|
||||
@@ -501,22 +501,22 @@ package alternativa.physics.collision.colliders
|
||||
return true;
|
||||
}
|
||||
|
||||
private function testMainAxis(box:§_-m3§, rect:CollisionRect, axis:Vector3, axisIndex:int, vectorToBox:Vector3) : Boolean
|
||||
private function testMainAxis(box:name_311, rect:CollisionRect, axis:Vector3, axisIndex:int, vectorToBox:Vector3) : Boolean
|
||||
{
|
||||
var overlap:Number = this.overlapOnAxis(box,rect,axis,vectorToBox);
|
||||
if(overlap < -this.epsilon)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(overlap + this.epsilon < this.§_-hK§)
|
||||
if(overlap + this.epsilon < this.var_676)
|
||||
{
|
||||
this.§_-hK§ = overlap;
|
||||
this.§_-Wt§ = axisIndex;
|
||||
this.var_676 = overlap;
|
||||
this.var_675 = axisIndex;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function testDerivedAxis(box:§_-m3§, rect:CollisionRect, axis1:Vector3, axis2:Vector3, axisIndex:int, vectorToBox:Vector3) : Boolean
|
||||
private function testDerivedAxis(box:name_311, rect:CollisionRect, axis1:Vector3, axis2:Vector3, axisIndex:int, vectorToBox:Vector3) : Boolean
|
||||
{
|
||||
this.axis.x = axis1.y * axis2.z - axis1.z * axis2.y;
|
||||
this.axis.y = axis1.z * axis2.x - axis1.x * axis2.z;
|
||||
@@ -535,15 +535,15 @@ package alternativa.physics.collision.colliders
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(overlap + this.epsilon < this.§_-hK§)
|
||||
if(overlap + this.epsilon < this.var_676)
|
||||
{
|
||||
this.§_-hK§ = overlap;
|
||||
this.§_-Wt§ = axisIndex;
|
||||
this.var_676 = overlap;
|
||||
this.var_675 = axisIndex;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function overlapOnAxis(box:§_-m3§, rect:CollisionRect, axis:Vector3, vectorToBox:Vector3) : Number
|
||||
public function overlapOnAxis(box:name_311, rect:CollisionRect, axis:Vector3, vectorToBox:Vector3) : Number
|
||||
{
|
||||
var m:Matrix4 = box.transform;
|
||||
var d:Number = (m.a * axis.x + m.e * axis.y + m.i * axis.z) * box.hs.x;
|
||||
|
||||
@@ -6,17 +6,17 @@ package alternativa.physics.collision.colliders
|
||||
import alternativa.physics.collision.CollisionPrimitive;
|
||||
import alternativa.physics.collision.ICollider;
|
||||
import alternativa.physics.collision.primitives.CollisionSphere;
|
||||
import alternativa.physics.collision.primitives.§_-m3§;
|
||||
import alternativa.physics.collision.primitives.name_311;
|
||||
|
||||
public class BoxSphereCollider implements ICollider
|
||||
{
|
||||
private var center:Vector3 = new Vector3();
|
||||
|
||||
private var §_-ZR§:Vector3 = new Vector3();
|
||||
private var var_713:Vector3 = new Vector3();
|
||||
|
||||
private var bPos:Vector3 = new Vector3();
|
||||
|
||||
private var §_-dt§:Vector3 = new Vector3();
|
||||
private var var_714:Vector3 = new Vector3();
|
||||
|
||||
public function BoxSphereCollider()
|
||||
{
|
||||
@@ -25,20 +25,20 @@ package alternativa.physics.collision.colliders
|
||||
|
||||
public function getContact(prim1:CollisionPrimitive, prim2:CollisionPrimitive, contact:Contact) : Boolean
|
||||
{
|
||||
var box:§_-m3§ = null;
|
||||
var box:name_311 = null;
|
||||
var sphere:CollisionSphere = prim1 as CollisionSphere;
|
||||
if(sphere == null)
|
||||
{
|
||||
sphere = prim2 as CollisionSphere;
|
||||
box = prim1 as §_-m3§;
|
||||
box = prim1 as name_311;
|
||||
}
|
||||
else
|
||||
{
|
||||
box = prim2 as §_-m3§;
|
||||
box = prim2 as name_311;
|
||||
}
|
||||
sphere.transform.getAxis(3,this.§_-dt§);
|
||||
sphere.transform.getAxis(3,this.var_714);
|
||||
box.transform.getAxis(3,this.bPos);
|
||||
box.transform.transformPointTransposed(this.§_-dt§,this.center);
|
||||
box.transform.transformPointTransposed(this.var_714,this.center);
|
||||
var hs:Vector3 = box.hs;
|
||||
var sx:Number = hs.x + sphere.r;
|
||||
var sy:Number = hs.y + sphere.r;
|
||||
@@ -49,73 +49,73 @@ package alternativa.physics.collision.colliders
|
||||
}
|
||||
if(this.center.x > hs.x)
|
||||
{
|
||||
this.§_-ZR§.x = hs.x;
|
||||
this.var_713.x = hs.x;
|
||||
}
|
||||
else if(this.center.x < -hs.x)
|
||||
{
|
||||
this.§_-ZR§.x = -hs.x;
|
||||
this.var_713.x = -hs.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.x = this.center.x;
|
||||
this.var_713.x = this.center.x;
|
||||
}
|
||||
if(this.center.y > hs.y)
|
||||
{
|
||||
this.§_-ZR§.y = hs.y;
|
||||
this.var_713.y = hs.y;
|
||||
}
|
||||
else if(this.center.y < -hs.y)
|
||||
{
|
||||
this.§_-ZR§.y = -hs.y;
|
||||
this.var_713.y = -hs.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.y = this.center.y;
|
||||
this.var_713.y = this.center.y;
|
||||
}
|
||||
if(this.center.z > hs.z)
|
||||
{
|
||||
this.§_-ZR§.z = hs.z;
|
||||
this.var_713.z = hs.z;
|
||||
}
|
||||
else if(this.center.z < -hs.z)
|
||||
{
|
||||
this.§_-ZR§.z = -hs.z;
|
||||
this.var_713.z = -hs.z;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.z = this.center.z;
|
||||
this.var_713.z = this.center.z;
|
||||
}
|
||||
var distSqr:Number = this.center.subtract(this.§_-ZR§).lengthSqr();
|
||||
var distSqr:Number = this.center.subtract(this.var_713).lengthSqr();
|
||||
if(distSqr > sphere.r * sphere.r)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
contact.body1 = sphere.body;
|
||||
contact.body2 = box.body;
|
||||
contact.normal.copy(this.§_-ZR§).transform4(box.transform).subtract(this.§_-dt§).normalize().reverse();
|
||||
contact.§_-P3§ = 1;
|
||||
contact.normal.copy(this.var_713).transform4(box.transform).subtract(this.var_714).normalize().reverse();
|
||||
contact.name_506 = 1;
|
||||
var cp:ContactPoint = contact.points[0];
|
||||
cp.penetration = sphere.r - Math.sqrt(distSqr);
|
||||
cp.pos.copy(contact.normal).scale(-sphere.r).add(this.§_-dt§);
|
||||
cp.r1.diff(cp.pos,this.§_-dt§);
|
||||
cp.pos.copy(contact.normal).scale(-sphere.r).add(this.var_714);
|
||||
cp.r1.diff(cp.pos,this.var_714);
|
||||
cp.r2.diff(cp.pos,this.bPos);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function haveCollision(prim1:CollisionPrimitive, prim2:CollisionPrimitive) : Boolean
|
||||
{
|
||||
var box:§_-m3§ = null;
|
||||
var box:name_311 = null;
|
||||
var sphere:CollisionSphere = prim1 as CollisionSphere;
|
||||
if(sphere == null)
|
||||
{
|
||||
sphere = prim2 as CollisionSphere;
|
||||
box = prim1 as §_-m3§;
|
||||
box = prim1 as name_311;
|
||||
}
|
||||
else
|
||||
{
|
||||
box = prim2 as §_-m3§;
|
||||
box = prim2 as name_311;
|
||||
}
|
||||
sphere.transform.getAxis(3,this.§_-dt§);
|
||||
sphere.transform.getAxis(3,this.var_714);
|
||||
box.transform.getAxis(3,this.bPos);
|
||||
box.transform.transformPointTransposed(this.§_-dt§,this.center);
|
||||
box.transform.transformPointTransposed(this.var_714,this.center);
|
||||
var hs:Vector3 = box.hs;
|
||||
var sx:Number = hs.x + sphere.r;
|
||||
var sy:Number = hs.y + sphere.r;
|
||||
@@ -126,41 +126,41 @@ package alternativa.physics.collision.colliders
|
||||
}
|
||||
if(this.center.x > hs.x)
|
||||
{
|
||||
this.§_-ZR§.x = hs.x;
|
||||
this.var_713.x = hs.x;
|
||||
}
|
||||
else if(this.center.x < -hs.x)
|
||||
{
|
||||
this.§_-ZR§.x = -hs.x;
|
||||
this.var_713.x = -hs.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.x = this.center.x;
|
||||
this.var_713.x = this.center.x;
|
||||
}
|
||||
if(this.center.y > hs.y)
|
||||
{
|
||||
this.§_-ZR§.y = hs.y;
|
||||
this.var_713.y = hs.y;
|
||||
}
|
||||
else if(this.center.y < -hs.y)
|
||||
{
|
||||
this.§_-ZR§.y = -hs.y;
|
||||
this.var_713.y = -hs.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.y = this.center.y;
|
||||
this.var_713.y = this.center.y;
|
||||
}
|
||||
if(this.center.z > hs.z)
|
||||
{
|
||||
this.§_-ZR§.z = hs.z;
|
||||
this.var_713.z = hs.z;
|
||||
}
|
||||
else if(this.center.z < -hs.z)
|
||||
{
|
||||
this.§_-ZR§.z = -hs.z;
|
||||
this.var_713.z = -hs.z;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.§_-ZR§.z = this.center.z;
|
||||
this.var_713.z = this.center.z;
|
||||
}
|
||||
var distSqr:Number = this.center.subtract(this.§_-ZR§).lengthSqr();
|
||||
var distSqr:Number = this.center.subtract(this.var_713).lengthSqr();
|
||||
return distSqr <= sphere.r * sphere.r;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ package alternativa.physics.collision.colliders
|
||||
contact.normal.x = dx;
|
||||
contact.normal.y = dy;
|
||||
contact.normal.z = dz;
|
||||
contact.§_-P3§ = 1;
|
||||
contact.name_506 = 1;
|
||||
var cp:ContactPoint = contact.points[0];
|
||||
cp.penetration = sum - len;
|
||||
cp.pos.x = this.p1.x - dx * s1.r;
|
||||
|
||||
@@ -11,7 +11,7 @@ package alternativa.physics.collision.primitives
|
||||
|
||||
public var hs:Vector3 = new Vector3();
|
||||
|
||||
public var §_-ng§:Boolean = true;
|
||||
public var var_572:Boolean = true;
|
||||
|
||||
public function CollisionRect(hs:Vector3, collisionGroup:int, collisionMask:int)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ package alternativa.physics.constraints
|
||||
|
||||
public class Constraint
|
||||
{
|
||||
public var §_-CV§:Boolean;
|
||||
public var name_507:Boolean;
|
||||
|
||||
public var world:PhysicsScene;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ package alternativa.protocol
|
||||
|
||||
public class OptionalMap
|
||||
{
|
||||
private var §_-bU§:int;
|
||||
private var var_671:int;
|
||||
|
||||
private var size:int;
|
||||
|
||||
@@ -19,28 +19,28 @@ package alternativa.protocol
|
||||
this.map.writeBytes(source,0,this.convertSize(size));
|
||||
}
|
||||
this.size = size;
|
||||
this.§_-bU§ = 0;
|
||||
this.var_671 = 0;
|
||||
}
|
||||
|
||||
public function getReadPosition() : int
|
||||
{
|
||||
return this.§_-bU§;
|
||||
return this.var_671;
|
||||
}
|
||||
|
||||
public function setReadPosition(value:int) : void
|
||||
{
|
||||
this.§_-bU§ = value;
|
||||
this.var_671 = value;
|
||||
}
|
||||
|
||||
public function reset() : void
|
||||
{
|
||||
this.§_-bU§ = 0;
|
||||
this.var_671 = 0;
|
||||
}
|
||||
|
||||
public function clear() : void
|
||||
{
|
||||
this.size = 0;
|
||||
this.§_-bU§ = 0;
|
||||
this.var_671 = 0;
|
||||
}
|
||||
|
||||
public function addBit(isNull:Boolean) : void
|
||||
@@ -51,17 +51,17 @@ package alternativa.protocol
|
||||
|
||||
public function hasNextBit() : Boolean
|
||||
{
|
||||
return this.§_-bU§ < this.size;
|
||||
return this.var_671 < this.size;
|
||||
}
|
||||
|
||||
public function OptionalMap() : Boolean
|
||||
{
|
||||
if(this.§_-bU§ >= this.size)
|
||||
if(this.var_671 >= this.size)
|
||||
{
|
||||
throw new Error("Index out of bounds: " + this.§_-bU§);
|
||||
throw new Error("Index out of bounds: " + this.var_671);
|
||||
}
|
||||
var res:Boolean = this.getBit(this.§_-bU§);
|
||||
++this.§_-bU§;
|
||||
var res:Boolean = this.getBit(this.var_671);
|
||||
++this.var_671;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -107,20 +107,20 @@ package alternativa.protocol
|
||||
|
||||
public function toString() : String
|
||||
{
|
||||
var result:String = "readPosition: " + this.§_-bU§ + " size:" + this.getSize() + " mask:";
|
||||
var _readPosition:int = this.§_-bU§;
|
||||
for(var i:int = this.§_-bU§; i < this.getSize(); i++)
|
||||
var result:String = "readPosition: " + this.var_671 + " size:" + this.getSize() + " mask:";
|
||||
var _readPosition:int = this.var_671;
|
||||
for(var i:int = this.var_671; i < this.getSize(); i++)
|
||||
{
|
||||
result += this.OptionalMap() ? "1" : "0";
|
||||
}
|
||||
this.§_-bU§ = _readPosition;
|
||||
this.var_671 = _readPosition;
|
||||
return result;
|
||||
}
|
||||
|
||||
public function clone() : alternativa.protocol.OptionalMap
|
||||
{
|
||||
var map:alternativa.protocol.OptionalMap = new alternativa.protocol.OptionalMap(this.size,this.map);
|
||||
map.§_-bU§ = this.§_-bU§;
|
||||
map.var_671 = this.var_671;
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,48 +6,48 @@ package alternativa.protocol
|
||||
|
||||
public class ProtocolBuffer
|
||||
{
|
||||
private var §_-R§:IDataOutput;
|
||||
private var var_587:IDataOutput;
|
||||
|
||||
private var §_-ch§:IDataInput;
|
||||
private var var_588:IDataInput;
|
||||
|
||||
private var §_-7s§:OptionalMap;
|
||||
private var var_586:OptionalMap;
|
||||
|
||||
public function ProtocolBuffer(output:IDataOutput, input:IDataInput, optionalMap:OptionalMap)
|
||||
{
|
||||
super();
|
||||
this.§_-R§ = output;
|
||||
this.§_-ch§ = input;
|
||||
this.§_-7s§ = optionalMap;
|
||||
this.var_587 = output;
|
||||
this.var_588 = input;
|
||||
this.var_586 = optionalMap;
|
||||
}
|
||||
|
||||
public function get writer() : IDataOutput
|
||||
{
|
||||
return this.§_-R§;
|
||||
return this.var_587;
|
||||
}
|
||||
|
||||
public function set writer(value:IDataOutput) : void
|
||||
{
|
||||
this.§_-R§ = value;
|
||||
this.var_587 = value;
|
||||
}
|
||||
|
||||
public function get reader() : IDataInput
|
||||
{
|
||||
return this.§_-ch§;
|
||||
return this.var_588;
|
||||
}
|
||||
|
||||
public function set reader(value:IDataInput) : void
|
||||
{
|
||||
this.§_-ch§ = value;
|
||||
this.var_588 = value;
|
||||
}
|
||||
|
||||
public function get optionalMap() : OptionalMap
|
||||
{
|
||||
return this.§_-7s§;
|
||||
return this.var_586;
|
||||
}
|
||||
|
||||
public function set optionalMap(value:OptionalMap) : void
|
||||
{
|
||||
this.§_-7s§ = value;
|
||||
this.var_586 = value;
|
||||
}
|
||||
|
||||
public function toString() : String
|
||||
|
||||
@@ -9,7 +9,7 @@ package alternativa.protocol.codec
|
||||
{
|
||||
private var codec:ICodec;
|
||||
|
||||
private var §_-In§:Object;
|
||||
private var var_189:Object;
|
||||
|
||||
public function OptionalCodecDecorator(codec:ICodec)
|
||||
{
|
||||
@@ -17,13 +17,13 @@ package alternativa.protocol.codec
|
||||
this.codec = codec;
|
||||
if(codec is IPrimitiveCodec)
|
||||
{
|
||||
this.§_-In§ = IPrimitiveCodec(codec).nullValue();
|
||||
this.var_189 = IPrimitiveCodec(codec).nullValue();
|
||||
}
|
||||
}
|
||||
|
||||
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
|
||||
{
|
||||
if(object == this.§_-In§)
|
||||
if(object == this.var_189)
|
||||
{
|
||||
protocolBuffer.optionalMap.addBit(true);
|
||||
}
|
||||
@@ -36,7 +36,7 @@ package alternativa.protocol.codec
|
||||
|
||||
public function decode(protocolBuffer:ProtocolBuffer) : Object
|
||||
{
|
||||
return protocolBuffer.optionalMap.OptionalMap() ? this.§_-In§ : this.codec.decode(protocolBuffer);
|
||||
return protocolBuffer.optionalMap.OptionalMap() ? this.var_189 : this.codec.decode(protocolBuffer);
|
||||
}
|
||||
|
||||
public function init(protocol:IProtocol) : void
|
||||
|
||||
@@ -34,9 +34,9 @@ package alternativa.protocol.impl
|
||||
|
||||
public static var defaultInstance:IProtocol = new Protocol();
|
||||
|
||||
private var §_-5c§:Object = new Object();
|
||||
private var var_190:Object = new Object();
|
||||
|
||||
private var §_-RY§:Dictionary = new Dictionary(false);
|
||||
private var var_191:Dictionary = new Dictionary(false);
|
||||
|
||||
public function Protocol()
|
||||
{
|
||||
@@ -67,26 +67,26 @@ package alternativa.protocol.impl
|
||||
|
||||
public function registerCodec(codecInfo:ICodecInfo, codec:ICodec) : void
|
||||
{
|
||||
this.§_-5c§[codecInfo] = codec;
|
||||
this.var_190[codecInfo] = codec;
|
||||
}
|
||||
|
||||
public function registerCodecForType(type:Class, codec:ICodec) : void
|
||||
{
|
||||
this.§_-5c§[new TypeCodecInfo(type,false)] = codec;
|
||||
this.§_-5c§[new TypeCodecInfo(type,true)] = new OptionalCodecDecorator(codec);
|
||||
this.var_190[new TypeCodecInfo(type,false)] = codec;
|
||||
this.var_190[new TypeCodecInfo(type,true)] = new OptionalCodecDecorator(codec);
|
||||
}
|
||||
|
||||
public function getCodec(codecInfo:ICodecInfo) : ICodec
|
||||
{
|
||||
var result:ICodec = this.§_-5c§[codecInfo];
|
||||
var result:ICodec = this.var_190[codecInfo];
|
||||
if(result == null)
|
||||
{
|
||||
throw Error("Codec not found for " + codecInfo);
|
||||
}
|
||||
if(this.§_-RY§[result] == null)
|
||||
if(this.var_191[result] == null)
|
||||
{
|
||||
result.init(this);
|
||||
this.§_-RY§[result] = result;
|
||||
this.var_191[result] = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4,25 +4,25 @@ package alternativa.protocol.info
|
||||
|
||||
public class CollectionCodecInfo extends CodecInfo
|
||||
{
|
||||
private var §_-jo§:ICodecInfo;
|
||||
private var var_186:ICodecInfo;
|
||||
|
||||
private var §_-fp§:int;
|
||||
private var var_185:int;
|
||||
|
||||
public function CollectionCodecInfo(elementCodec:ICodecInfo, optional:Boolean, level:int)
|
||||
{
|
||||
super(optional);
|
||||
this.§_-jo§ = elementCodec;
|
||||
this.§_-fp§ = level;
|
||||
this.var_186 = elementCodec;
|
||||
this.var_185 = level;
|
||||
}
|
||||
|
||||
public function get level() : int
|
||||
{
|
||||
return this.§_-fp§;
|
||||
return this.var_185;
|
||||
}
|
||||
|
||||
public function get elementCodec() : ICodecInfo
|
||||
{
|
||||
return this.§_-jo§;
|
||||
return this.var_186;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
|
||||
@@ -4,17 +4,17 @@ package alternativa.protocol.info
|
||||
|
||||
public class TypeCodecInfo extends CodecInfo
|
||||
{
|
||||
private var §_-hx§:Class;
|
||||
private var var_184:Class;
|
||||
|
||||
public function TypeCodecInfo(type:Class, optional:Boolean)
|
||||
{
|
||||
super(optional);
|
||||
this.§_-hx§ = type;
|
||||
this.var_184 = type;
|
||||
}
|
||||
|
||||
public function get type() : Class
|
||||
{
|
||||
return this.§_-hx§;
|
||||
return this.var_184;
|
||||
}
|
||||
|
||||
override public function toString() : String
|
||||
|
||||
@@ -13,22 +13,22 @@ package alternativa.tanks
|
||||
{
|
||||
public var gameKernel:GameKernel;
|
||||
|
||||
private var §_-9P§:IGenericTargetEvaluator;
|
||||
private var var_453:IGenericTargetEvaluator;
|
||||
|
||||
private var §_-bW§:IRailgunTargetEvaluator;
|
||||
private var var_454:IRailgunTargetEvaluator;
|
||||
|
||||
private var §_-ci§:IGenericTargetEvaluator;
|
||||
private var var_455:IGenericTargetEvaluator;
|
||||
|
||||
private var §_-L1§:Dictionary;
|
||||
private var var_456:Dictionary;
|
||||
|
||||
private var §_-ee§:Dictionary;
|
||||
private var var_457:Dictionary;
|
||||
|
||||
public function TextureResourceService(param1:GameKernel)
|
||||
{
|
||||
super();
|
||||
this.gameKernel = param1;
|
||||
this.§_-L1§ = new Dictionary();
|
||||
this.§_-ee§ = new Dictionary();
|
||||
this.var_456 = new Dictionary();
|
||||
this.var_457 = new Dictionary();
|
||||
}
|
||||
|
||||
public function getCompressedTextureResource(param1:ByteArray) : ATFTextureResource
|
||||
@@ -68,22 +68,22 @@ package alternativa.tanks
|
||||
|
||||
private function getCompressedResourceSafe(param1:ByteArray, param2:Boolean) : ATFTextureResource
|
||||
{
|
||||
var _loc3_:ATFTextureResource = this.§_-L1§[param1];
|
||||
var _loc3_:ATFTextureResource = this.var_456[param1];
|
||||
if(_loc3_ == null && param2)
|
||||
{
|
||||
_loc3_ = new ATFTextureResource(param1);
|
||||
this.§_-L1§[param1] = _loc3_;
|
||||
this.var_456[param1] = _loc3_;
|
||||
}
|
||||
return _loc3_;
|
||||
}
|
||||
|
||||
private function getBitmapResourceSafe(param1:BitmapData, param2:Boolean) : BitmapTextureResource
|
||||
{
|
||||
var _loc3_:BitmapTextureResource = this.§_-ee§[param1];
|
||||
var _loc3_:BitmapTextureResource = this.var_457[param1];
|
||||
if(_loc3_ == null && param2)
|
||||
{
|
||||
_loc3_ = new BitmapTextureResource(param1);
|
||||
this.§_-ee§[param1] = _loc3_;
|
||||
this.var_457[param1] = _loc3_;
|
||||
}
|
||||
return _loc3_;
|
||||
}
|
||||
@@ -91,51 +91,51 @@ package alternativa.tanks
|
||||
public function clear() : void
|
||||
{
|
||||
this.gameKernel = null;
|
||||
this.§_-9P§ = null;
|
||||
this.§_-bW§ = null;
|
||||
this.§_-ci§ = null;
|
||||
this.var_453 = null;
|
||||
this.var_454 = null;
|
||||
this.var_455 = null;
|
||||
}
|
||||
|
||||
public function getGenericTargetEvaluator() : IGenericTargetEvaluator
|
||||
{
|
||||
if(this.§_-9P§ == null)
|
||||
if(this.var_453 == null)
|
||||
{
|
||||
throw new Error("Generic target evaluator is not set");
|
||||
}
|
||||
return this.§_-9P§;
|
||||
return this.var_453;
|
||||
}
|
||||
|
||||
public function setGenericTargetEvaluator(param1:IGenericTargetEvaluator) : void
|
||||
{
|
||||
this.§_-9P§ = param1;
|
||||
this.var_453 = param1;
|
||||
}
|
||||
|
||||
public function getRailgunTargetEvaluator() : IRailgunTargetEvaluator
|
||||
{
|
||||
if(this.§_-bW§ == null)
|
||||
if(this.var_454 == null)
|
||||
{
|
||||
throw new Error("Railgun target evaluator is not set");
|
||||
}
|
||||
return this.§_-bW§;
|
||||
return this.var_454;
|
||||
}
|
||||
|
||||
public function setRailgunTargetEvaluator(param1:IRailgunTargetEvaluator) : void
|
||||
{
|
||||
this.§_-bW§ = param1;
|
||||
this.var_454 = param1;
|
||||
}
|
||||
|
||||
public function getFlamethrowerTargetEvaluator() : IGenericTargetEvaluator
|
||||
{
|
||||
if(this.§_-ci§ == null)
|
||||
if(this.var_455 == null)
|
||||
{
|
||||
throw new Error("Flame/freeze target evaluator is not set");
|
||||
}
|
||||
return this.§_-ci§;
|
||||
return this.var_455;
|
||||
}
|
||||
|
||||
public function setFlamethrowerTargetEvaluator(param1:IGenericTargetEvaluator) : void
|
||||
{
|
||||
this.§_-ci§ = param1;
|
||||
this.var_455 = param1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,19 +2,19 @@ package alternativa.tanks.config
|
||||
{
|
||||
public class BlobLibrary
|
||||
{
|
||||
private var §_-GF§:Object;
|
||||
private var var_199:Object;
|
||||
|
||||
public function BlobLibrary()
|
||||
{
|
||||
super();
|
||||
this.§_-GF§ = new Object();
|
||||
this.var_199 = new Object();
|
||||
}
|
||||
|
||||
public function get categoryIds() : Vector.<String>
|
||||
{
|
||||
var _loc2_:String = null;
|
||||
var _loc1_:Vector.<String> = new Vector.<String>();
|
||||
for(_loc2_ in this.§_-GF§)
|
||||
for(_loc2_ in this.var_199)
|
||||
{
|
||||
_loc1_.push(_loc2_);
|
||||
}
|
||||
@@ -23,12 +23,12 @@ package alternativa.tanks.config
|
||||
|
||||
public function getCategory(param1:String) : BlobCategory
|
||||
{
|
||||
return this.§_-GF§[param1];
|
||||
return this.var_199[param1];
|
||||
}
|
||||
|
||||
public function setCategory(param1:String, param2:BlobCategory) : void
|
||||
{
|
||||
this.§_-GF§[param1] = param2;
|
||||
this.var_199[param1] = param2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,15 +13,15 @@ package alternativa.tanks.config
|
||||
|
||||
public class TankPartsLibrary extends ResourceLoader
|
||||
{
|
||||
private var §_-SB§:Vector.<TankPart>;
|
||||
private var var_196:Vector.<TankPart>;
|
||||
|
||||
private var §_-dl§:Vector.<TankPart>;
|
||||
private var var_197:Vector.<TankPart>;
|
||||
|
||||
private var §_-cy§:Vector.<BitmapData>;
|
||||
private var var_198:Vector.<BitmapData>;
|
||||
|
||||
private var §_-Ic§:TankPartsBatchLoader;
|
||||
private var var_194:TankPartsBatchLoader;
|
||||
|
||||
private var §_-1D§:ImageSequenceLoader;
|
||||
private var var_195:ImageSequenceLoader;
|
||||
|
||||
public function TankPartsLibrary(param1:Config)
|
||||
{
|
||||
@@ -30,52 +30,52 @@ package alternativa.tanks.config
|
||||
|
||||
public function get numHulls() : int
|
||||
{
|
||||
return this.§_-SB§.length;
|
||||
return this.var_196.length;
|
||||
}
|
||||
|
||||
public function getHull(param1:int) : TankHull
|
||||
{
|
||||
return TankHull(this.§_-SB§[param1]);
|
||||
return TankHull(this.var_196[param1]);
|
||||
}
|
||||
|
||||
public function getHullByID(param1:String) : TankHull
|
||||
{
|
||||
return this.findPartByID(param1,this.§_-SB§) as TankHull;
|
||||
return this.findPartByID(param1,this.var_196) as TankHull;
|
||||
}
|
||||
|
||||
public function getHullIndex(param1:String) : int
|
||||
{
|
||||
return this.getPartIndex(param1,this.§_-SB§);
|
||||
return this.getPartIndex(param1,this.var_196);
|
||||
}
|
||||
|
||||
public function get numTurrets() : int
|
||||
{
|
||||
return this.§_-dl§.length;
|
||||
return this.var_197.length;
|
||||
}
|
||||
|
||||
public function getTurret(param1:int) : TankTurret
|
||||
{
|
||||
return TankTurret(this.§_-dl§[param1]);
|
||||
return TankTurret(this.var_197[param1]);
|
||||
}
|
||||
|
||||
public function getTurretByID(param1:String) : TankTurret
|
||||
{
|
||||
return this.findPartByID(param1,this.§_-dl§) as TankTurret;
|
||||
return this.findPartByID(param1,this.var_197) as TankTurret;
|
||||
}
|
||||
|
||||
public function getTurretIndex(param1:String) : int
|
||||
{
|
||||
return this.getPartIndex(param1,this.§_-dl§);
|
||||
return this.getPartIndex(param1,this.var_197);
|
||||
}
|
||||
|
||||
public function get numColormaps() : int
|
||||
{
|
||||
return this.§_-cy§.length;
|
||||
return this.var_198.length;
|
||||
}
|
||||
|
||||
public function getColormap(param1:int) : BitmapData
|
||||
{
|
||||
return this.§_-cy§[param1];
|
||||
return this.var_198[param1];
|
||||
}
|
||||
|
||||
override public function run() : void
|
||||
@@ -114,47 +114,47 @@ package alternativa.tanks.config
|
||||
|
||||
private function loadHulls() : void
|
||||
{
|
||||
this.§_-Ic§ = new TankPartsBatchLoader();
|
||||
this.§_-Ic§.addEventListener(Event.COMPLETE,this.onHullsLoadingComplete);
|
||||
this.§_-Ic§.load(this.getBaseUrl(),config.xml.tankParts.hull,new TankHullLoaderFactory());
|
||||
this.var_194 = new TankPartsBatchLoader();
|
||||
this.var_194.addEventListener(Event.COMPLETE,this.onHullsLoadingComplete);
|
||||
this.var_194.load(this.getBaseUrl(),config.xml.tankParts.hull,new TankHullLoaderFactory());
|
||||
}
|
||||
|
||||
private function onHullsLoadingComplete(param1:Event) : void
|
||||
{
|
||||
dispatchEvent(new TaskEvent(TaskEvent.TASK_PROGRESS,1,3));
|
||||
this.§_-Ic§.removeEventListener(Event.COMPLETE,this.onHullsLoadingComplete);
|
||||
this.§_-SB§ = this.§_-Ic§.parts;
|
||||
this.var_194.removeEventListener(Event.COMPLETE,this.onHullsLoadingComplete);
|
||||
this.var_196 = this.var_194.parts;
|
||||
this.loadTurrets();
|
||||
}
|
||||
|
||||
private function loadTurrets() : void
|
||||
{
|
||||
this.§_-Ic§.addEventListener(Event.COMPLETE,this.onTurretsLoadingComplete);
|
||||
this.§_-Ic§.load(this.getBaseUrl(),config.xml.tankParts.turret,new TankTurretLoaderFactory());
|
||||
this.var_194.addEventListener(Event.COMPLETE,this.onTurretsLoadingComplete);
|
||||
this.var_194.load(this.getBaseUrl(),config.xml.tankParts.turret,new TankTurretLoaderFactory());
|
||||
}
|
||||
|
||||
private function onTurretsLoadingComplete(param1:Event) : void
|
||||
{
|
||||
dispatchEvent(new TaskEvent(TaskEvent.TASK_PROGRESS,1,3));
|
||||
this.§_-Ic§.removeEventListener(Event.COMPLETE,this.onTurretsLoadingComplete);
|
||||
this.§_-dl§ = this.§_-Ic§.parts;
|
||||
this.§_-Ic§ = null;
|
||||
this.var_194.removeEventListener(Event.COMPLETE,this.onTurretsLoadingComplete);
|
||||
this.var_197 = this.var_194.parts;
|
||||
this.var_194 = null;
|
||||
this.loadColormaps();
|
||||
}
|
||||
|
||||
private function loadColormaps() : void
|
||||
{
|
||||
this.§_-1D§ = new ImageSequenceLoader();
|
||||
this.§_-1D§.addEventListener(Event.COMPLETE,this.onColormapsLoadingComplete);
|
||||
this.§_-1D§.load(StringUtils.makeCorrectBaseUrl(config.xml.colorings.@baseUrl),config.xml.colorings.image);
|
||||
this.var_195 = new ImageSequenceLoader();
|
||||
this.var_195.addEventListener(Event.COMPLETE,this.onColormapsLoadingComplete);
|
||||
this.var_195.load(StringUtils.makeCorrectBaseUrl(config.xml.colorings.@baseUrl),config.xml.colorings.image);
|
||||
}
|
||||
|
||||
private function onColormapsLoadingComplete(param1:Event) : void
|
||||
{
|
||||
dispatchEvent(new TaskEvent(TaskEvent.TASK_PROGRESS,1,3));
|
||||
this.§_-cy§ = this.§_-1D§.images;
|
||||
this.§_-1D§.removeEventListener(Event.COMPLETE,this.onColormapsLoadingComplete);
|
||||
this.§_-1D§ = null;
|
||||
this.var_198 = this.var_195.images;
|
||||
this.var_195.removeEventListener(Event.COMPLETE,this.onColormapsLoadingComplete);
|
||||
this.var_195 = null;
|
||||
completeTask();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package alternativa.tanks.config.loaders
|
||||
|
||||
private var loader:Loader;
|
||||
|
||||
private var §_-lW§:int;
|
||||
private var var_589:int;
|
||||
|
||||
public function ImageSequenceLoader()
|
||||
{
|
||||
@@ -31,15 +31,15 @@ package alternativa.tanks.config.loaders
|
||||
this.imagesXml = param2;
|
||||
this.loader = new Loader();
|
||||
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE,this.onImageLoadingComplete);
|
||||
this.§_-lW§ = -1;
|
||||
this.var_589 = -1;
|
||||
this.images = new Vector.<BitmapData>();
|
||||
this.loadNextImage();
|
||||
}
|
||||
|
||||
private function loadNextImage() : void
|
||||
{
|
||||
++this.§_-lW§;
|
||||
if(this.§_-lW§ == this.imagesXml.length())
|
||||
++this.var_589;
|
||||
if(this.var_589 == this.imagesXml.length())
|
||||
{
|
||||
this.loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,this.onImageLoadingComplete);
|
||||
this.loader.unload();
|
||||
@@ -53,7 +53,7 @@ package alternativa.tanks.config.loaders
|
||||
}
|
||||
else
|
||||
{
|
||||
this.loader.load(new URLRequest(this.baseUrl + this.imagesXml[this.§_-lW§].@file));
|
||||
this.loader.load(new URLRequest(this.baseUrl + this.imagesXml[this.var_589].@file));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ package alternativa.tanks.config.loaders
|
||||
{
|
||||
public var parts:Vector.<TankPart>;
|
||||
|
||||
private var §_-d5§:TaskSequence;
|
||||
private var var_34:TaskSequence;
|
||||
|
||||
public function TankPartsBatchLoader()
|
||||
{
|
||||
@@ -22,18 +22,18 @@ package alternativa.tanks.config.loaders
|
||||
{
|
||||
var _loc4_:XML = null;
|
||||
this.parts = new Vector.<TankPart>();
|
||||
this.§_-d5§ = new TaskSequence();
|
||||
this.var_34 = new TaskSequence();
|
||||
for each(_loc4_ in param2)
|
||||
{
|
||||
this.§_-d5§.addTask(param3.createLoader(param1,_loc4_,this.parts));
|
||||
this.var_34.addTask(param3.createLoader(param1,_loc4_,this.parts));
|
||||
}
|
||||
this.§_-d5§.addEventListener(Event.COMPLETE,this.onSequenceComplete);
|
||||
this.§_-d5§.run();
|
||||
this.var_34.addEventListener(Event.COMPLETE,this.onSequenceComplete);
|
||||
this.var_34.run();
|
||||
}
|
||||
|
||||
private function onSequenceComplete(param1:Event) : void
|
||||
{
|
||||
this.§_-d5§ = null;
|
||||
this.var_34 = null;
|
||||
if(hasEventListener(Event.COMPLETE))
|
||||
{
|
||||
dispatchEvent(new Event(Event.COMPLETE));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package alternativa.tanks.config.loaders.tankparts
|
||||
{
|
||||
import § var§.TankHullParser;
|
||||
import alternativa.tanks.game.entities.tank.TankPart;
|
||||
import alternativa.utils.ByteArrayMap;
|
||||
import package_43.TankHullParser;
|
||||
|
||||
public class TankHullLoader extends TankPartLoader
|
||||
{
|
||||
@@ -14,7 +14,7 @@ package alternativa.tanks.config.loaders.tankparts
|
||||
override public function parseModelData(param1:ByteArrayMap) : TankPart
|
||||
{
|
||||
var _loc2_:TankHullParser = new TankHullParser();
|
||||
return _loc2_.parse(param1,§_-P9§);
|
||||
return _loc2_.parse(param1,var_673);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package alternativa.tanks.config.loaders.tankparts
|
||||
{
|
||||
import § var§.TankTurretParser;
|
||||
import alternativa.tanks.game.entities.tank.TankPart;
|
||||
import alternativa.utils.ByteArrayMap;
|
||||
import package_43.TankTurretParser;
|
||||
|
||||
public class TankTurretLoader extends TankPartLoader
|
||||
{
|
||||
@@ -14,7 +14,7 @@ package alternativa.tanks.config.loaders.tankparts
|
||||
override public function parseModelData(param1:ByteArrayMap) : TankPart
|
||||
{
|
||||
var _loc2_:TankTurretParser = new TankTurretParser();
|
||||
return _loc2_.parse(param1,§_-P9§);
|
||||
return _loc2_.parse(param1,var_673);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,20 +4,20 @@ package alternativa.tanks.game
|
||||
{
|
||||
private static var lastId:int;
|
||||
|
||||
private var §_-3I§:int;
|
||||
private var var_101:int;
|
||||
|
||||
private var components:Vector.<EntityComponent>;
|
||||
|
||||
private var §_-ax§:Object;
|
||||
private var var_100:Object;
|
||||
|
||||
internal var index:int = -1;
|
||||
|
||||
public function Entity(id:int)
|
||||
{
|
||||
super();
|
||||
this.§_-3I§ = id;
|
||||
this.var_101 = id;
|
||||
this.components = new Vector.<EntityComponent>();
|
||||
this.§_-ax§ = new Object();
|
||||
this.var_100 = new Object();
|
||||
}
|
||||
|
||||
public static function generateId() : int
|
||||
@@ -27,7 +27,7 @@ package alternativa.tanks.game
|
||||
|
||||
public function get id() : int
|
||||
{
|
||||
return this.§_-3I§;
|
||||
return this.var_101;
|
||||
}
|
||||
|
||||
public function addComponent(component:EntityComponent) : void
|
||||
@@ -90,7 +90,7 @@ package alternativa.tanks.game
|
||||
{
|
||||
var numListeners:uint = 0;
|
||||
var i:int = 0;
|
||||
var listeners:Vector.<Function> = this.§_-ax§[eventType];
|
||||
var listeners:Vector.<Function> = this.var_100[eventType];
|
||||
if(listeners != null)
|
||||
{
|
||||
numListeners = uint(listeners.length);
|
||||
@@ -103,11 +103,11 @@ package alternativa.tanks.game
|
||||
|
||||
public function addEventHandler(eventType:String, handler:Function) : void
|
||||
{
|
||||
var handlers:Vector.<Function> = this.§_-ax§[eventType];
|
||||
var handlers:Vector.<Function> = this.var_100[eventType];
|
||||
if(handlers == null)
|
||||
{
|
||||
handlers = new Vector.<Function>();
|
||||
this.§_-ax§[eventType] = handlers;
|
||||
this.var_100[eventType] = handlers;
|
||||
}
|
||||
handlers.push(handler);
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ package alternativa.tanks.game
|
||||
{
|
||||
public class GameTask
|
||||
{
|
||||
public var §_-Uw§:TaskManager;
|
||||
public var var_4:TaskManager;
|
||||
|
||||
public var priority:int;
|
||||
|
||||
protected var §_-iS§:Boolean;
|
||||
protected var var_3:Boolean;
|
||||
|
||||
public function GameTask(priority:int)
|
||||
{
|
||||
@@ -28,7 +28,7 @@ package alternativa.tanks.game
|
||||
|
||||
final public function get paused() : Boolean
|
||||
{
|
||||
return this.§_-iS§;
|
||||
return this.var_3;
|
||||
}
|
||||
|
||||
final public function set paused(value:Boolean) : void
|
||||
@@ -45,18 +45,18 @@ package alternativa.tanks.game
|
||||
|
||||
final public function pause() : void
|
||||
{
|
||||
if(!this.§_-iS§)
|
||||
if(!this.var_3)
|
||||
{
|
||||
this.§_-iS§ = true;
|
||||
this.var_3 = true;
|
||||
this.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
final public function resume() : void
|
||||
{
|
||||
if(this.§_-iS§)
|
||||
if(this.var_3)
|
||||
{
|
||||
this.§_-iS§ = false;
|
||||
this.var_3 = false;
|
||||
this.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ package alternativa.tanks.game
|
||||
|
||||
private static var vector:Vector3 = new Vector3();
|
||||
|
||||
private var §_-G7§:Object3D;
|
||||
private var var_234:Object3D;
|
||||
|
||||
public function ObjectController()
|
||||
{
|
||||
@@ -20,64 +20,64 @@ package alternativa.tanks.game
|
||||
|
||||
public function get object() : Object3D
|
||||
{
|
||||
return this.§_-G7§;
|
||||
return this.var_234;
|
||||
}
|
||||
|
||||
public function set object(value:Object3D) : void
|
||||
{
|
||||
this.§_-G7§ = value;
|
||||
this.var_234 = value;
|
||||
}
|
||||
|
||||
public function setPosition(x:Number, y:Number, z:Number) : void
|
||||
{
|
||||
this.§_-G7§.x = x;
|
||||
this.§_-G7§.y = y;
|
||||
this.§_-G7§.z = z;
|
||||
this.var_234.x = x;
|
||||
this.var_234.y = y;
|
||||
this.var_234.z = z;
|
||||
}
|
||||
|
||||
public function setRotation(rx:Number, ry:Number, rz:Number) : void
|
||||
{
|
||||
this.§_-G7§.rotationX = rx;
|
||||
this.§_-G7§.rotationY = ry;
|
||||
this.§_-G7§.rotationZ = rz;
|
||||
this.var_234.rotationX = rx;
|
||||
this.var_234.rotationY = ry;
|
||||
this.var_234.rotationZ = rz;
|
||||
}
|
||||
|
||||
public function moveRelative(dx:Number, dy:Number, dz:Number) : void
|
||||
{
|
||||
matrix.setRotationMatrix(this.§_-G7§.rotationX,this.§_-G7§.rotationY,this.§_-G7§.rotationZ);
|
||||
matrix.setRotationMatrix(this.var_234.rotationX,this.var_234.rotationY,this.var_234.rotationZ);
|
||||
vector.reset(dx,dy,dz);
|
||||
vector.transform3(matrix);
|
||||
this.§_-G7§.x += vector.x;
|
||||
this.§_-G7§.y += vector.y;
|
||||
this.§_-G7§.z += vector.z;
|
||||
this.var_234.x += vector.x;
|
||||
this.var_234.y += vector.y;
|
||||
this.var_234.z += vector.z;
|
||||
}
|
||||
|
||||
public function move(dx:Number, dy:Number, dz:Number) : void
|
||||
{
|
||||
this.§_-G7§.x += dx;
|
||||
this.§_-G7§.y += dy;
|
||||
this.§_-G7§.z += dz;
|
||||
this.var_234.x += dx;
|
||||
this.var_234.y += dy;
|
||||
this.var_234.z += dz;
|
||||
}
|
||||
|
||||
public function rotate(rdx:Number, rdy:Number, rdz:Number) : void
|
||||
{
|
||||
this.§_-G7§.rotationX += rdx;
|
||||
this.§_-G7§.rotationY += rdy;
|
||||
this.§_-G7§.rotationZ += rdz;
|
||||
this.var_234.rotationX += rdx;
|
||||
this.var_234.rotationY += rdy;
|
||||
this.var_234.rotationZ += rdz;
|
||||
}
|
||||
|
||||
public function lookAtXYZ(x:Number, y:Number, z:Number) : void
|
||||
{
|
||||
var dx:Number = x - this.§_-G7§.x;
|
||||
var dy:Number = y - this.§_-G7§.y;
|
||||
var dz:Number = z - this.§_-G7§.z;
|
||||
this.§_-G7§.rotationX = Math.atan2(dz,Math.sqrt(dx * dx + dy * dy));
|
||||
if(this.§_-G7§ is Camera3D)
|
||||
var dx:Number = x - this.var_234.x;
|
||||
var dy:Number = y - this.var_234.y;
|
||||
var dz:Number = z - this.var_234.z;
|
||||
this.var_234.rotationX = Math.atan2(dz,Math.sqrt(dx * dx + dy * dy));
|
||||
if(this.var_234 is Camera3D)
|
||||
{
|
||||
this.§_-G7§.rotationX -= 0.5 * Math.PI;
|
||||
this.var_234.rotationX -= 0.5 * Math.PI;
|
||||
}
|
||||
this.§_-G7§.rotationY = 0;
|
||||
this.§_-G7§.rotationZ = -Math.atan2(dx,dy);
|
||||
this.var_234.rotationY = 0;
|
||||
this.var_234.rotationZ = -Math.atan2(dx,dy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ package alternativa.tanks.game.camera
|
||||
|
||||
public class AxisIndicator extends Shape
|
||||
{
|
||||
private var §_-RS§:int;
|
||||
private var var_32:int;
|
||||
|
||||
private var axis:Vector.<Number> = Vector.<Number>([0,0,0,0,0,0]);
|
||||
|
||||
public function AxisIndicator(size:int)
|
||||
{
|
||||
super();
|
||||
this.§_-RS§ = size;
|
||||
this.var_32 = size;
|
||||
}
|
||||
|
||||
public function update(camera:GameCamera) : void
|
||||
@@ -26,7 +26,7 @@ package alternativa.tanks.game.camera
|
||||
this.axis[3] = camera.yAxis.y;
|
||||
this.axis[4] = camera.xAxis.z;
|
||||
this.axis[5] = camera.yAxis.z;
|
||||
var halfSize:int = this.§_-RS§ / 2;
|
||||
var halfSize:int = this.var_32 / 2;
|
||||
for(var i:int = 0,var bitOffset:int = 16; i < 6; i += 2,bitOffset -= 8)
|
||||
{
|
||||
kx = this.axis[i] + 1;
|
||||
@@ -39,7 +39,7 @@ package alternativa.tanks.game.camera
|
||||
|
||||
public function get size() : int
|
||||
{
|
||||
return this.§_-RS§;
|
||||
return this.var_32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,17 +38,17 @@ package alternativa.tanks.game.camera
|
||||
|
||||
private static var vector:Vector3 = new Vector3();
|
||||
|
||||
public var §_-eX§:Number = 0.01;
|
||||
public var var_49:Number = 0.01;
|
||||
|
||||
public var §_-ma§:Number = 0.01;
|
||||
public var var_50:Number = 0.01;
|
||||
|
||||
public var speed:Number = 500;
|
||||
|
||||
public var §_-NF§:Number = 3;
|
||||
public var var_48:Number = 3;
|
||||
|
||||
private var §_-ls§:Number = 0;
|
||||
private var var_47:Number = 0;
|
||||
|
||||
private var §_-Z3§:Number = 0;
|
||||
private var var_46:Number = 0;
|
||||
|
||||
private var currentPosition:Vector3D = new Vector3D();
|
||||
|
||||
@@ -60,7 +60,7 @@ package alternativa.tanks.game.camera
|
||||
|
||||
private var parentMatrix:Matrix4 = new Matrix4();
|
||||
|
||||
private var §_-Kj§:Matrix4 = new Matrix4();
|
||||
private var var_45:Matrix4 = new Matrix4();
|
||||
|
||||
public function FreeCameraController(camera:GameCamera, input:IInput)
|
||||
{
|
||||
@@ -68,8 +68,8 @@ package alternativa.tanks.game.camera
|
||||
this.input = input;
|
||||
this.controller = new ObjectController();
|
||||
this.controller.object = camera;
|
||||
this.§_-Z3§ = camera.rotationX;
|
||||
this.§_-ls§ = camera.rotationZ;
|
||||
this.var_46 = camera.rotationX;
|
||||
this.var_47 = camera.rotationZ;
|
||||
this.currentPosition.x = camera.x;
|
||||
this.currentPosition.y = camera.y;
|
||||
this.currentPosition.z = camera.z;
|
||||
@@ -78,8 +78,8 @@ package alternativa.tanks.game.camera
|
||||
public function enable() : void
|
||||
{
|
||||
var object:Object3D = this.controller.object;
|
||||
this.§_-Z3§ = object.rotationX;
|
||||
this.§_-ls§ = object.rotationZ;
|
||||
this.var_46 = object.rotationX;
|
||||
this.var_47 = object.rotationZ;
|
||||
this.currentPosition.x = object.x;
|
||||
this.currentPosition.y = object.y;
|
||||
this.currentPosition.z = object.z;
|
||||
@@ -96,8 +96,8 @@ package alternativa.tanks.game.camera
|
||||
public function lookAtXYZ(x:Number, y:Number, z:Number) : void
|
||||
{
|
||||
this.controller.lookAtXYZ(x,y,z);
|
||||
this.§_-Z3§ = this.controller.object.rotationX;
|
||||
this.§_-ls§ = this.controller.object.rotationZ;
|
||||
this.var_46 = this.controller.object.rotationX;
|
||||
this.var_47 = this.controller.object.rotationZ;
|
||||
}
|
||||
|
||||
public function setTarget(value:Entity) : void
|
||||
@@ -128,14 +128,14 @@ package alternativa.tanks.game.camera
|
||||
}
|
||||
if(this.input.mouseButtonPressed())
|
||||
{
|
||||
yaw = -this.input.getMouseDeltaX() * this.§_-eX§;
|
||||
pitch = -this.input.getMouseDeltaY() * this.§_-ma§;
|
||||
this.§_-ls§ += yaw;
|
||||
this.§_-Z3§ += pitch;
|
||||
yaw = -this.input.getMouseDeltaX() * this.var_49;
|
||||
pitch = -this.input.getMouseDeltaY() * this.var_50;
|
||||
this.var_47 += yaw;
|
||||
this.var_46 += pitch;
|
||||
}
|
||||
var object:Object3D = this.controller.object;
|
||||
var drX:Number = this.§_-Z3§ - object.rotationX;
|
||||
var drZ:Number = this.§_-ls§ - object.rotationZ;
|
||||
var drX:Number = this.var_46 - object.rotationX;
|
||||
var drZ:Number = this.var_47 - object.rotationZ;
|
||||
if(drX != 0 || drZ != 0)
|
||||
{
|
||||
if(smoothing > 0)
|
||||
@@ -153,7 +153,7 @@ package alternativa.tanks.game.camera
|
||||
if(moved)
|
||||
{
|
||||
vector.normalize();
|
||||
vector.scale(this.speed * timeDelta * (1 + this.input.getKeyState(KEY_SPEED) * (this.§_-NF§ - 1)));
|
||||
vector.scale(this.speed * timeDelta * (1 + this.input.getKeyState(KEY_SPEED) * (this.var_48 - 1)));
|
||||
}
|
||||
matrix.setRotationMatrix(object.rotationX,object.rotationY,object.rotationZ);
|
||||
vector.reset(vector.x,vector.y,vector.z);
|
||||
@@ -180,9 +180,9 @@ package alternativa.tanks.game.camera
|
||||
if(targeted && this.target != null)
|
||||
{
|
||||
this.updateTargetState();
|
||||
dx = this.§_-Kj§.d - object.x;
|
||||
dy = this.§_-Kj§.h - object.y;
|
||||
dz = this.§_-Kj§.l - object.z;
|
||||
dx = this.var_45.d - object.x;
|
||||
dy = this.var_45.h - object.y;
|
||||
dz = this.var_45.l - object.z;
|
||||
object.rotationX = Math.atan2(dz,Math.sqrt(dx * dx + dy * dy)) - 0.5 * Math.PI;
|
||||
object.rotationY = 0;
|
||||
object.rotationZ = -Math.atan2(dx,dy);
|
||||
@@ -192,8 +192,8 @@ package alternativa.tanks.game.camera
|
||||
private function updateTargetState() : void
|
||||
{
|
||||
this.setMatrixFromObject(this.target.parent,this.parentMatrix);
|
||||
this.setMatrixFromObject(this.target,this.§_-Kj§);
|
||||
this.§_-Kj§.append(this.parentMatrix);
|
||||
this.setMatrixFromObject(this.target,this.var_45);
|
||||
this.var_45.append(this.parentMatrix);
|
||||
}
|
||||
|
||||
private function setMatrixFromObject(object:Object3D, matrix:Matrix4) : void
|
||||
|
||||
@@ -24,7 +24,7 @@ package alternativa.tanks.game.effects
|
||||
|
||||
private var fps:Number;
|
||||
|
||||
private var §_-5m§:Number;
|
||||
private var var_472:Number;
|
||||
|
||||
private var numFrames:int;
|
||||
|
||||
@@ -52,7 +52,7 @@ package alternativa.tanks.game.effects
|
||||
this.frames = frames;
|
||||
this.fps = fps;
|
||||
this.sizeGrowSpeed = sizeGrowSpeed;
|
||||
this.§_-5m§ = 0;
|
||||
this.var_472 = 0;
|
||||
this.numFrames = frames.length;
|
||||
this.size = startSize;
|
||||
this.plane.scaleX = startSize;
|
||||
@@ -74,16 +74,16 @@ package alternativa.tanks.game.effects
|
||||
|
||||
public function play(camera:GameCamera) : Boolean
|
||||
{
|
||||
if(this.§_-5m§ >= this.numFrames)
|
||||
if(this.var_472 >= this.numFrames)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
this.plane.setMaterialToAllSurfaces(this.frames[int(this.§_-5m§)]);
|
||||
this.plane.setMaterialToAllSurfaces(this.frames[int(this.var_472)]);
|
||||
this.plane.scaleX = this.size;
|
||||
this.plane.scaleY = this.size;
|
||||
var dt:Number = TimeSystem.timeDeltaSeconds;
|
||||
this.size += this.sizeGrowSpeed * dt;
|
||||
this.§_-5m§ += this.fps * dt;
|
||||
this.var_472 += this.fps * dt;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package alternativa.tanks.game.effects
|
||||
|
||||
private var offsetToCamera:Number;
|
||||
|
||||
private var §_-iD§:Number;
|
||||
private var var_458:Number;
|
||||
|
||||
private var currFrame:Number;
|
||||
|
||||
@@ -41,7 +41,7 @@ package alternativa.tanks.game.effects
|
||||
this.initSprite(width,height,rotation,originX,originY);
|
||||
this.frames = frames;
|
||||
this.offsetToCamera = offsetToCamera;
|
||||
this.§_-iD§ = 0.001 * fps;
|
||||
this.var_458 = 0.001 * fps;
|
||||
this.position.copy(position);
|
||||
this.loop = loop;
|
||||
this.numFrames = frames.length;
|
||||
@@ -72,7 +72,7 @@ package alternativa.tanks.game.effects
|
||||
this.sprite.y = this.position.y + this.offsetToCamera * toCamera.y;
|
||||
this.sprite.z = this.position.z + this.offsetToCamera * toCamera.z;
|
||||
this.sprite.material = this.frames[int(this.currFrame)];
|
||||
this.currFrame += this.§_-iD§ * TimeSystem.timeDelta;
|
||||
this.currFrame += this.var_458 * TimeSystem.timeDelta;
|
||||
if(this.loop)
|
||||
{
|
||||
while(this.currFrame >= this.numFrames)
|
||||
|
||||
@@ -18,11 +18,11 @@ package alternativa.tanks.game.effects
|
||||
|
||||
private var speed:Number;
|
||||
|
||||
private var §_-Jr§:Number;
|
||||
private var var_737:Number;
|
||||
|
||||
private var §_-KH§:int;
|
||||
private var var_738:int;
|
||||
|
||||
private var §_-EE§:int;
|
||||
private var var_736:int;
|
||||
|
||||
public function Blinker(initialInterval:int, minInterval:int, intervalDecrement:int, minValue:Number, maxValue:Number, speedCoeff:Number)
|
||||
{
|
||||
@@ -33,15 +33,15 @@ package alternativa.tanks.game.effects
|
||||
this.minValue = minValue;
|
||||
this.maxValue = maxValue;
|
||||
this.speedCoeff = speedCoeff;
|
||||
this.§_-Jr§ = maxValue - minValue;
|
||||
this.var_737 = maxValue - minValue;
|
||||
}
|
||||
|
||||
public function init(now:int) : void
|
||||
{
|
||||
this.value = this.maxValue;
|
||||
this.§_-EE§ = this.initialInterval;
|
||||
this.var_736 = this.initialInterval;
|
||||
this.speed = this.getSpeed(-1);
|
||||
this.§_-KH§ = now + this.§_-EE§;
|
||||
this.var_738 = now + this.var_736;
|
||||
}
|
||||
|
||||
public function setMaxValue(value:Number) : void
|
||||
@@ -51,7 +51,7 @@ package alternativa.tanks.game.effects
|
||||
return;
|
||||
}
|
||||
this.maxValue = value;
|
||||
this.§_-Jr§ = this.maxValue - this.minValue;
|
||||
this.var_737 = this.maxValue - this.minValue;
|
||||
}
|
||||
|
||||
public function setMinValue(value:Number) : void
|
||||
@@ -61,7 +61,7 @@ package alternativa.tanks.game.effects
|
||||
return;
|
||||
}
|
||||
this.minValue = value;
|
||||
this.§_-Jr§ = this.maxValue - this.minValue;
|
||||
this.var_737 = this.maxValue - this.minValue;
|
||||
}
|
||||
|
||||
public function updateValue(now:int, delta:int) : Number
|
||||
@@ -75,17 +75,17 @@ package alternativa.tanks.game.effects
|
||||
{
|
||||
this.value = this.minValue;
|
||||
}
|
||||
if(now >= this.§_-KH§)
|
||||
if(now >= this.var_738)
|
||||
{
|
||||
if(this.§_-EE§ > this.minInterval)
|
||||
if(this.var_736 > this.minInterval)
|
||||
{
|
||||
this.§_-EE§ -= this.intervalDecrement;
|
||||
if(this.§_-EE§ < this.minInterval)
|
||||
this.var_736 -= this.intervalDecrement;
|
||||
if(this.var_736 < this.minInterval)
|
||||
{
|
||||
this.§_-EE§ = this.minInterval;
|
||||
this.var_736 = this.minInterval;
|
||||
}
|
||||
}
|
||||
this.§_-KH§ = now + this.§_-EE§;
|
||||
this.var_738 = now + this.var_736;
|
||||
if(this.speed < 0)
|
||||
{
|
||||
this.speed = this.getSpeed(1);
|
||||
@@ -100,7 +100,7 @@ package alternativa.tanks.game.effects
|
||||
|
||||
private function getSpeed(direction:Number) : Number
|
||||
{
|
||||
return direction * this.speedCoeff * this.§_-Jr§ / this.§_-EE§;
|
||||
return direction * this.speedCoeff * this.var_737 / this.var_736;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ package alternativa.tanks.game.effects
|
||||
{
|
||||
private var sprite:Sprite3D;
|
||||
|
||||
private var §_-iD§:Number;
|
||||
private var var_458:Number;
|
||||
|
||||
private var currFrame:Number;
|
||||
|
||||
@@ -40,7 +40,7 @@ package alternativa.tanks.game.effects
|
||||
{
|
||||
this.initSprite(width,height,rotation,originX,originY);
|
||||
this.frames = frames;
|
||||
this.§_-iD§ = 0.001 * fps;
|
||||
this.var_458 = 0.001 * fps;
|
||||
this.position.copy(position);
|
||||
this.velocity.copy(velocity);
|
||||
this.acceleration = acceleration;
|
||||
@@ -86,7 +86,7 @@ package alternativa.tanks.game.effects
|
||||
this.velocity.z *= speed;
|
||||
}
|
||||
this.sprite.material = this.frames[int(this.currFrame)];
|
||||
this.currFrame += this.§_-iD§ * TimeSystem.timeDelta;
|
||||
this.currFrame += this.var_458 * TimeSystem.timeDelta;
|
||||
if(this.loop)
|
||||
{
|
||||
while(this.currFrame >= this.numFrames)
|
||||
|
||||
@@ -4,34 +4,34 @@ package alternativa.tanks.game.entities
|
||||
|
||||
public class EventStates
|
||||
{
|
||||
public var §_-Ah§:IComponentState;
|
||||
public var name_371:IComponentState;
|
||||
|
||||
private var §_-eB§:Object;
|
||||
private var var_619:Object;
|
||||
|
||||
public function EventStates()
|
||||
{
|
||||
super();
|
||||
this.§_-eB§ = new Object();
|
||||
this.var_619 = new Object();
|
||||
}
|
||||
|
||||
public function setEventState(entity:Entity, eventType:String, eventState:IComponentState) : void
|
||||
{
|
||||
if(this.§_-eB§[eventType] != null)
|
||||
if(this.var_619[eventType] != null)
|
||||
{
|
||||
throw new Error("Duplicate event type: " + eventType);
|
||||
}
|
||||
this.§_-eB§[eventType] = eventState;
|
||||
this.var_619[eventType] = eventState;
|
||||
entity.addEventHandler(eventType,this.onEvent);
|
||||
}
|
||||
|
||||
public function onEvent(eventName:String, data:*) : void
|
||||
{
|
||||
var newState:IComponentState = this.§_-eB§[eventName];
|
||||
if(newState != this.§_-Ah§)
|
||||
var newState:IComponentState = this.var_619[eventName];
|
||||
if(newState != this.name_371)
|
||||
{
|
||||
this.§_-Ah§.stop();
|
||||
this.§_-Ah§ = newState;
|
||||
this.§_-Ah§.start(data);
|
||||
this.name_371.stop();
|
||||
this.name_371 = newState;
|
||||
this.name_371.start(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package alternativa.tanks.game.entities.map
|
||||
import alternativa.physics.collision.CollisionPrimitive;
|
||||
import alternativa.physics.collision.primitives.CollisionRect;
|
||||
import alternativa.physics.collision.primitives.CollisionTriangle;
|
||||
import alternativa.physics.collision.primitives.§_-m3§;
|
||||
import alternativa.physics.collision.primitives.name_311;
|
||||
import alternativa.tanks.game.EntityComponent;
|
||||
import alternativa.tanks.game.GameKernel;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
@@ -53,15 +53,15 @@ package alternativa.tanks.game.entities.map
|
||||
|
||||
private var skyboxSize:Number;
|
||||
|
||||
private var §_-Zy§:A3DMapBuilder;
|
||||
private var var_89:A3DMapBuilder;
|
||||
|
||||
private var gameKernel:GameKernel;
|
||||
|
||||
private var §_-9h§:Number = 1.5;
|
||||
private var var_90:Number = 1.5;
|
||||
|
||||
private var listener:IA3DMapComponentListener;
|
||||
|
||||
private var §_-RZ§:Boolean = true;
|
||||
private var var_91:Boolean = true;
|
||||
|
||||
public function A3DMapComponent(files:ByteArrayMap, skyboxFiles:ByteArrayMap, skyboxSize:Number, listener:IA3DMapComponentListener)
|
||||
{
|
||||
@@ -124,13 +124,13 @@ package alternativa.tanks.game.entities.map
|
||||
var light:Light3D = null;
|
||||
var renderSystem:RenderSystem = gameKernel.getRenderSystem();
|
||||
var mapGeometryContainer:Object3D = renderSystem.getMapGeometryContainer();
|
||||
for each(object in this.§_-Zy§.objects)
|
||||
for each(object in this.var_89.objects)
|
||||
{
|
||||
mapGeometryContainer.removeChild(object);
|
||||
}
|
||||
renderSystem.releaseResources(mapGeometryContainer.getResources(true));
|
||||
lights = renderSystem.lights;
|
||||
for each(light in this.§_-Zy§.lights)
|
||||
for each(light in this.var_89.lights)
|
||||
{
|
||||
if(light is DirectionalLight)
|
||||
{
|
||||
@@ -155,9 +155,9 @@ package alternativa.tanks.game.entities.map
|
||||
|
||||
private function buildRealMap() : void
|
||||
{
|
||||
this.§_-Zy§ = new A3DMapBuilder();
|
||||
this.§_-Zy§.addEventListener(Event.COMPLETE,this.onBuildingComplete);
|
||||
this.§_-Zy§.buildMap(this.files);
|
||||
this.var_89 = new A3DMapBuilder();
|
||||
this.var_89.addEventListener(Event.COMPLETE,this.onBuildingComplete);
|
||||
this.var_89.buildMap(this.files);
|
||||
}
|
||||
|
||||
private function onBuildingComplete(event:Event) : void
|
||||
@@ -188,7 +188,7 @@ package alternativa.tanks.game.entities.map
|
||||
}
|
||||
var renderSystem:RenderSystem = this.gameKernel.getRenderSystem();
|
||||
var lights:Lights = renderSystem.lights;
|
||||
for each(light in this.§_-Zy§.lights)
|
||||
for each(light in this.var_89.lights)
|
||||
{
|
||||
if(light is DirectionalLight)
|
||||
{
|
||||
@@ -236,7 +236,7 @@ package alternativa.tanks.game.entities.map
|
||||
var object:Object3D = null;
|
||||
var renderSystem:RenderSystem = this.gameKernel.getRenderSystem();
|
||||
var mapGeometryContainer:Object3D = renderSystem.getMapGeometryContainer();
|
||||
for each(object in this.§_-Zy§.objects)
|
||||
for each(object in this.var_89.objects)
|
||||
{
|
||||
mapGeometryContainer.addChild(object);
|
||||
}
|
||||
@@ -252,11 +252,11 @@ package alternativa.tanks.game.entities.map
|
||||
var renderSystem:RenderSystem = null;
|
||||
var physicsContainer:Object3D = null;
|
||||
var physicsSystem:PhysicsSystem = this.gameKernel.getPhysicsSystem();
|
||||
physicsSystem.initCollisionGeometry(this.§_-Zy§.collisionPrimitives);
|
||||
physicsSystem.initCollisionGeometry(this.var_89.collisionPrimitives);
|
||||
if(this.gameKernel.options[MapOptions.VISUALIZE_PHYSICS] != null)
|
||||
{
|
||||
renderSystem = this.gameKernel.getRenderSystem();
|
||||
physicsContainer = this.createPhysicsVisualObjects(this.§_-Zy§.collisionPrimitives);
|
||||
physicsContainer = this.createPhysicsVisualObjects(this.var_89.collisionPrimitives);
|
||||
physicsContainer.visible = false;
|
||||
renderSystem.addContainer(PHYSICS_GEOMETRY,physicsContainer,true);
|
||||
}
|
||||
@@ -272,9 +272,9 @@ package alternativa.tanks.game.entities.map
|
||||
for(var i:int = 0; i < numCollisionPrimitives; )
|
||||
{
|
||||
collisionPrimitive = collisionPrimitives[i];
|
||||
if(collisionPrimitive is §_-m3§)
|
||||
if(collisionPrimitive is name_311)
|
||||
{
|
||||
physicsVisualContainer.addChild(this.createPhysicsVisualBox(§_-m3§(collisionPrimitive),boxMaterial));
|
||||
physicsVisualContainer.addChild(this.createPhysicsVisualBox(name_311(collisionPrimitive),boxMaterial));
|
||||
}
|
||||
else if(collisionPrimitive is CollisionTriangle)
|
||||
{
|
||||
@@ -285,7 +285,7 @@ package alternativa.tanks.game.entities.map
|
||||
return physicsVisualContainer;
|
||||
}
|
||||
|
||||
private function createPhysicsVisualBox(collisionBox:§_-m3§, material:Material) : Box
|
||||
private function createPhysicsVisualBox(collisionBox:name_311, material:Material) : Box
|
||||
{
|
||||
var size:Vector3 = collisionBox.hs.clone().scale(2);
|
||||
var box:Box = new Box(size.x,size.y,size.z);
|
||||
@@ -385,27 +385,27 @@ package alternativa.tanks.game.entities.map
|
||||
private function toggleDecals() : void
|
||||
{
|
||||
var d:Decal = null;
|
||||
this.§_-RZ§ = !this.§_-RZ§;
|
||||
for each(d in this.§_-Zy§.decals)
|
||||
this.var_91 = !this.var_91;
|
||||
for each(d in this.var_89.decals)
|
||||
{
|
||||
d.visible = this.§_-RZ§;
|
||||
d.visible = this.var_91;
|
||||
}
|
||||
}
|
||||
|
||||
private function get decalsOffset() : Number
|
||||
{
|
||||
return this.§_-9h§;
|
||||
return this.var_90;
|
||||
}
|
||||
|
||||
private function set decalsOffset(value:Number) : void
|
||||
{
|
||||
var decal:Decal = null;
|
||||
this.§_-9h§ = value;
|
||||
for each(decal in this.§_-Zy§.decals)
|
||||
this.var_90 = value;
|
||||
for each(decal in this.var_89.decals)
|
||||
{
|
||||
decal.offset = this.§_-9h§;
|
||||
decal.offset = this.var_90;
|
||||
}
|
||||
IConsole(OSGi.getInstance().getService(IConsole)).addText("Decals offset: " + this.§_-9h§);
|
||||
IConsole(OSGi.getInstance().getService(IConsole)).addText("Decals offset: " + this.var_90);
|
||||
}
|
||||
|
||||
private function toggleGeometry(containerId:String) : void
|
||||
|
||||
@@ -57,7 +57,7 @@ package alternativa.tanks.game.entities.map
|
||||
}
|
||||
}
|
||||
|
||||
private function final(targetObject:Object3D) : ShaderProgram
|
||||
private function method_22(targetObject:Object3D) : ShaderProgram
|
||||
{
|
||||
var vertexLinker:Linker = new Linker(Context3DProgramType.VERTEX);
|
||||
var fragmentLinker:Linker = new Linker(Context3DProgramType.FRAGMENT);
|
||||
@@ -105,11 +105,11 @@ package alternativa.tanks.game.entities.map
|
||||
var program:ShaderProgram = _programs[object.alternativa3d::transformProcedure];
|
||||
if(program == null)
|
||||
{
|
||||
program = this.final(object);
|
||||
program = this.method_22(object);
|
||||
program.upload(camera.alternativa3d::context3D);
|
||||
_programs[object.alternativa3d::transformProcedure] = program;
|
||||
}
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::_-EM,surface.indexBegin,surface.numTriangles,program);
|
||||
var drawUnit:DrawUnit = camera.alternativa3d::renderer.alternativa3d::createDrawUnit(object,program.program,geometry.alternativa3d::name_78,surface.indexBegin,surface.numTriangles,program);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aPosition"),positionBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.POSITION],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.POSITION]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aUV"),uvBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.TEXCOORDS[0]],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.TEXCOORDS[0]]);
|
||||
drawUnit.alternativa3d::setVertexBufferAt(program.vertexShader.getVariableIndex("aNormal"),normalsBuffer,geometry.alternativa3d::_attributesOffsets[VertexAttributes.NORMAL],VertexAttributes.alternativa3d::FORMATS[VertexAttributes.NORMAL]);
|
||||
|
||||
@@ -17,11 +17,11 @@ package alternativa.tanks.game.entities.tank
|
||||
|
||||
private var enabled:Boolean;
|
||||
|
||||
private var §_-lp§:IBasicWeapon;
|
||||
private var var_442:IBasicWeapon;
|
||||
|
||||
private var §_-89§:Boolean;
|
||||
private var var_508:Boolean;
|
||||
|
||||
private var §_-ZM§:Boolean;
|
||||
private var var_507:Boolean;
|
||||
|
||||
public function BasicWeaponManualControlComponent()
|
||||
{
|
||||
@@ -30,7 +30,7 @@ package alternativa.tanks.game.entities.tank
|
||||
|
||||
override public function initComponent() : void
|
||||
{
|
||||
this.§_-lp§ = IBasicWeapon(entity.getComponentStrict(IBasicWeapon));
|
||||
this.var_442 = IBasicWeapon(entity.getComponentStrict(IBasicWeapon));
|
||||
entity.addEventHandler(TankEvents.SET_ACTIVATING_STATE,this.onSetInactiveState);
|
||||
entity.addEventHandler(TankEvents.SET_DEAD_STATE,this.onSetInactiveState);
|
||||
entity.addEventHandler(TankEvents.SET_RESPAWN_STATE,this.onSetInactiveState);
|
||||
@@ -57,20 +57,20 @@ package alternativa.tanks.game.entities.tank
|
||||
|
||||
public function runLogic() : void
|
||||
{
|
||||
if(this.§_-89§)
|
||||
if(this.var_508)
|
||||
{
|
||||
this.§_-lp§.pullTrigger();
|
||||
if(this.§_-ZM§)
|
||||
this.var_442.pullTrigger();
|
||||
if(this.var_507)
|
||||
{
|
||||
this.§_-lp§.forceUpdate();
|
||||
this.var_442.forceUpdate();
|
||||
}
|
||||
}
|
||||
if(this.§_-ZM§)
|
||||
if(this.var_507)
|
||||
{
|
||||
this.§_-lp§.releaseTrigger();
|
||||
this.var_442.releaseTrigger();
|
||||
}
|
||||
this.§_-89§ = false;
|
||||
this.§_-ZM§ = false;
|
||||
this.var_508 = false;
|
||||
this.var_507 = false;
|
||||
}
|
||||
|
||||
private function onKey(eventType:KeyboardEventType, keyCode:uint) : void
|
||||
@@ -78,18 +78,18 @@ package alternativa.tanks.game.entities.tank
|
||||
switch(eventType)
|
||||
{
|
||||
case KeyboardEventType.KEY_DOWN:
|
||||
this.§_-89§ = true;
|
||||
this.var_508 = true;
|
||||
if(!this.enabled)
|
||||
{
|
||||
this.§_-ZM§ = false;
|
||||
this.var_507 = false;
|
||||
}
|
||||
break;
|
||||
case KeyboardEventType.KEY_UP:
|
||||
this.§_-ZM§ = true;
|
||||
this.var_507 = true;
|
||||
if(!this.enabled)
|
||||
{
|
||||
this.§_-lp§.releaseTrigger();
|
||||
this.§_-89§ = false;
|
||||
this.var_442.releaseTrigger();
|
||||
this.var_508 = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,31 +7,31 @@ package alternativa.tanks.game.entities.tank
|
||||
|
||||
public class TankHull extends TankPart
|
||||
{
|
||||
public var §_-Sh§:Vector3 = new Vector3();
|
||||
public var name_400:Vector3 = new Vector3();
|
||||
|
||||
public var §_-Rj§:Vector3 = new Vector3();
|
||||
public var name_395:Vector3 = new Vector3();
|
||||
|
||||
public var §_-EN§:Vector3 = new Vector3();
|
||||
public var name_398:Vector3 = new Vector3();
|
||||
|
||||
public var §_-eh§:BoxData;
|
||||
public var name_388:BoxData;
|
||||
|
||||
public var §_-AE§:Vector.<BoxData> = new Vector.<BoxData>();
|
||||
public var name_396:Vector.<BoxData> = new Vector.<BoxData>();
|
||||
|
||||
public var §_-KR§:Vector.<BoxData> = new Vector.<BoxData>();
|
||||
public var name_397:Vector.<BoxData> = new Vector.<BoxData>();
|
||||
|
||||
public var §_-j9§:Vector.<Vector3> = new Vector.<Vector3>();
|
||||
public var name_401:Vector.<Vector3> = new Vector.<Vector3>();
|
||||
|
||||
public var §_-Hd§:Vector.<Vector3> = new Vector.<Vector3>();
|
||||
public var name_399:Vector.<Vector3> = new Vector.<Vector3>();
|
||||
|
||||
public var §_-DH§:Number = 1;
|
||||
public var name_437:Number = 1;
|
||||
|
||||
public var §_-EY§:Vector.<TankWheel> = new Vector.<TankWheel>();
|
||||
public var name_247:Vector.<TankWheel> = new Vector.<TankWheel>();
|
||||
|
||||
public var §_-M4§:Vector.<TankWheel> = new Vector.<TankWheel>();
|
||||
public var name_245:Vector.<TankWheel> = new Vector.<TankWheel>();
|
||||
|
||||
public var §_-Ei§:Skin;
|
||||
public var name_261:Skin;
|
||||
|
||||
public var §_-iA§:Skin;
|
||||
public var name_266:Skin;
|
||||
|
||||
public var shadow:Mesh;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user