Section 1
//BSPNode (alternativa.engine3d.core.BSPNode)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.*;
public final class BSPNode {
alternativa3d var mobile:uint;// = 4294967295
alternativa3d var normal:Point3D;
alternativa3d var front:BSPNode;
alternativa3d var parent:BSPNode;
alternativa3d var offset:Number;
alternativa3d var back:BSPNode;
alternativa3d var backPrimitives:Set;
alternativa3d var frontPrimitives:Set;
alternativa3d var primitive:PolyPrimitive;
private static var collector:Array = new Array();
public function BSPNode(){
normal = new Point3D();
super();
}
alternativa3d static function createBSPNode(_arg1:PolyPrimitive):BSPNode{
var _local2:BSPNode = collector.pop();
if (_local2 == null){
_local2 = new (BSPNode);
};
_local2.primitive = _arg1;
_arg1.node = _local2;
_local2.normal.copy(_arg1.face.globalNormal);
_local2.offset = _arg1.face.globalOffset;
_local2.mobile = _arg1.mobile;
return (_local2);
}
alternativa3d static function destroyBSPNode(_arg1:BSPNode):void{
collector.push(_arg1);
}
}
}//package alternativa.engine3d.core
Section 2
//Camera3D (alternativa.engine3d.core.Camera3D)
package alternativa.engine3d.core {
import alternativa.types.*;
import flash.geom.*;
import alternativa.engine3d.display.*;
import alternativa.engine3d.*;
public class Camera3D extends Object3D {
alternativa3d var _view:View;
alternativa3d var _fov:Number;// = 1.5707963267949
alternativa3d var focusDistortion:Number;
private var currentSkin:Skin;
alternativa3d var textureMatrices:Map;
alternativa3d var cameraCoords:Map;
alternativa3d var viewAngle:Number;
alternativa3d var redrawOperation:Operation;
private var textureMatricesCalculated:Set;
alternativa3d var clearCalculatedOperation:Operation;
private var cameraCoordsCalculated:Set;
alternativa3d var cameraMatrix:Matrix3D;
private var prevSkin:Skin;
alternativa3d var _focusHalfSize:Number;// = 500
private var firstSkin:Skin;
alternativa3d var calculateMatrixOperation:Operation;
alternativa3d var focusDistance:Number;
alternativa3d var calculateSkinsOperation:Operation;
alternativa3d var direction:Point3D;
private static var counter:uint = 0;
public function Camera3D(_arg1:String=null){
redrawOperation = new Operation("redraw", this);
calculateMatrixOperation = new Operation("calculateMatrix", this, calculateMatrix, Operation.CAMERA_CALCULATE_MATRIX);
clearCalculatedOperation = new Operation("clearCalculated", this, clearCalculated, Operation.CAMERA_CLEAR_CALCULATED);
calculateSkinsOperation = new Operation("calculateSkins", this, calculateSkins, Operation.CAMERA_CALCULATE_SKINS);
focusDistance = (_focusHalfSize / Math.tan((0.5 * _fov)));
focusDistortion = (1 / (focusDistance * focusDistance));
viewAngle = Math.sin((Math.PI / 4));
direction = new Point3D(0, 0, 1);
cameraMatrix = new Matrix3D();
cameraCoords = new Map(true);
cameraCoordsCalculated = new Set(true);
textureMatrices = new Map(true);
textureMatricesCalculated = new Set(true);
_view = new View();
super(_arg1);
calculateTransformationOperation.addSequel(calculateMatrixOperation);
calculateMatrixOperation.addSequel(calculateSkinsOperation);
redrawOperation.addSequel(calculateSkinsOperation);
calculateSkinsOperation.addSequel(clearCalculatedOperation);
}
alternativa3d function calculateCameraCoord(_arg1:Point3D):Point3D{
var _local2:Point3D = cameraCoords[_arg1];
if (_local2 == null){
_local2 = new Point3D();
cameraCoords[_arg1] = _local2;
};
if (!cameraCoordsCalculated[_arg1]){
_local2.copy(_arg1);
_local2.transform(cameraMatrix);
cameraCoordsCalculated[_arg1] = true;
};
return (_local2);
}
alternativa3d function removeTextureMatrix(_arg1:Face):void{
delete textureMatrices[_arg1];
delete textureMatricesCalculated[_arg1];
}
private function insertCurrentSkin():void{
var _local1:Skin = Skin.createSkin(this);
_view.canvas.addChildAt(_local1, _view.canvas.getChildIndex(currentSkin));
_local1.nextSkin = currentSkin;
if (prevSkin == null){
firstSkin = _local1;
} else {
prevSkin.nextSkin = _local1;
};
currentSkin = _local1;
}
public function get view():View{
return (_view);
}
public function set zoom(_arg1:Number):void{
_arg1 = (1 / _arg1);
if (((((!((_scaleX == _arg1))) || (!((_scaleY == _arg1))))) || (!((_scaleZ == _arg1))))){
_scaleX = _arg1;
_scaleY = _arg1;
_scaleZ = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
public function set fov(_arg1:Number):void{
_arg1 = ((_arg1)<0) ? 0 : ((_arg1)>Math.PI) ? Math.PI : _arg1;
if (_fov != _arg1){
focusDistance = (_focusHalfSize / Math.tan((0.5 * _arg1)));
focusDistortion = (1 / (focusDistance * focusDistance));
viewAngle = Math.sin((0.5 * _arg1));
addOperationToScene(redrawOperation);
_fov = _arg1;
};
}
private function addCurrentSkin():void{
if (currentSkin == null){
currentSkin = Skin.createSkin(this);
_view.canvas.addChild(currentSkin);
if (prevSkin == null){
firstSkin = currentSkin;
} else {
prevSkin.nextSkin = currentSkin;
};
};
}
private function drawAddedSkin(_arg1:PolyPrimitive):void{
if (_scene.changedPrimitives[_arg1]){
if (currentSkin == null){
addCurrentSkin();
} else {
if (!_scene.changedPrimitives[currentSkin._primitive]){
insertCurrentSkin();
};
};
currentSkin.draw(_arg1);
prevSkin = currentSkin;
currentSkin = currentSkin.nextSkin;
} else {
while (((!((currentSkin == null))) && (_scene.changedPrimitives[currentSkin._primitive]))) {
removeCurrentSkin();
};
if (currentSkin != null){
prevSkin = currentSkin;
currentSkin = currentSkin.nextSkin;
};
};
}
public function set viewRadius(_arg1:Number):void{
focusDistance = (_arg1 / Math.tan((0.5 * _fov)));
focusDistortion = (1 / (focusDistance * focusDistance));
viewAngle = Math.sin((0.5 * _fov));
addOperationToScene(redrawOperation);
_focusHalfSize = _arg1;
}
private function calculateMatrix():void{
direction.x = transformation.c;
direction.y = transformation.g;
direction.z = transformation.k;
direction.normalize();
cameraMatrix.copy(transformation);
cameraMatrix.invert();
}
private function isometricRenderChanged(_arg1:BSPNode):void{
var _local2:*;
var _local3:Point3D;
var _local4:Number;
if (_arg1 != null){
_local3 = _arg1.normal;
_local4 = (((direction.x * _local3.x) + (direction.y * _local3.y)) + (direction.z * _local3.z));
if (_arg1.primitive != null){
if (_local4 <= 0){
isometricRenderChanged(_arg1.back);
drawAddedSkin(_arg1.primitive);
isometricRenderChanged(_arg1.front);
} else {
isometricRenderChanged(_arg1.front);
isometricRenderChanged(_arg1.back);
};
} else {
if (_local4 <= 0){
isometricRenderChanged(_arg1.back);
for (_local2 in _arg1.frontPrimitives) {
drawAddedSkin(_local2);
};
isometricRenderChanged(_arg1.front);
} else {
isometricRenderChanged(_arg1.front);
for (_local2 in _arg1.backPrimitives) {
drawAddedSkin(_local2);
};
isometricRenderChanged(_arg1.back);
};
};
};
}
override protected function clonePropertiesFrom(_arg1:Object3D):void{
super.clonePropertiesFrom(_arg1);
var _local2:Camera3D = Camera3D(_arg1);
_fov = _local2._fov;
_focusHalfSize = _local2._focusHalfSize;
focusDistance = _local2.focusDistance;
focusDistortion = _local2.focusDistortion;
viewAngle = _local2.viewAngle;
view.crop = _local2.view.crop;
view.width = _local2.view.width;
view.height = _local2.view.height;
}
public function get zoom():Number{
return ((3 / ((_scaleX + _scaleY) + _scaleZ)));
}
private function calculateSkins():void{
prevSkin = null;
currentSkin = firstSkin;
if (((calculateTransformationOperation.queued) || (redrawOperation.queued))){
if (_fov == 0){
isometricRender(_scene.bsp);
} else {
perspectiveRender(_scene.bsp);
};
} else {
if (_fov == 0){
isometricRenderChanged(_scene.bsp);
} else {
perspectiveRenderChanged(_scene.bsp);
};
};
while (currentSkin != null) {
removeCurrentSkin();
};
}
override protected function removeFromScene(_arg1:Scene3D):void{
super.removeFromScene(_arg1);
_arg1.calculateBSPOperation.removeSequel(calculateSkinsOperation);
}
override protected function createEmptyObject():Object3D{
return (new Camera3D());
}
private function drawSkin(_arg1:PolyPrimitive):void{
addCurrentSkin();
currentSkin.draw(_arg1);
prevSkin = currentSkin;
currentSkin = currentSkin.nextSkin;
}
private function perspectiveRenderChanged(_arg1:BSPNode):void{
var _local2:*;
var _local3:Point3D;
var _local4:Number;
var _local5:Number;
if (_arg1 != null){
_local3 = _arg1.normal;
_local4 = (((direction.x * _local3.x) + (direction.y * _local3.y)) + (direction.z * _local3.z));
_local5 = ((((globalCoords.x * _local3.x) + (globalCoords.y * _local3.y)) + (globalCoords.z * _local3.z)) - _arg1.offset);
if (_arg1.primitive != null){
if (_local5 > 0){
if (_local4 < viewAngle){
perspectiveRenderChanged(_arg1.back);
drawAddedSkin(_arg1.primitive);
};
perspectiveRenderChanged(_arg1.front);
} else {
if (_local4 > -(viewAngle)){
perspectiveRenderChanged(_arg1.front);
};
perspectiveRenderChanged(_arg1.back);
};
} else {
if (_local5 > 0){
if (_local4 < viewAngle){
perspectiveRenderChanged(_arg1.back);
for (_local2 in _arg1.frontPrimitives) {
drawAddedSkin(_local2);
};
};
perspectiveRenderChanged(_arg1.front);
} else {
if (_local4 > -(viewAngle)){
perspectiveRenderChanged(_arg1.front);
for (_local2 in _arg1.backPrimitives) {
drawAddedSkin(_local2);
};
};
perspectiveRenderChanged(_arg1.back);
};
};
};
}
private function isometricRender(_arg1:BSPNode):void{
var _local2:*;
var _local3:Point3D;
var _local4:Number;
if (_arg1 != null){
_local3 = _arg1.normal;
_local4 = (((direction.x * _local3.x) + (direction.y * _local3.y)) + (direction.z * _local3.z));
if (_arg1.primitive != null){
if (_local4 <= 0){
isometricRender(_arg1.back);
drawSkin(_arg1.primitive);
isometricRender(_arg1.front);
} else {
isometricRender(_arg1.front);
isometricRender(_arg1.back);
};
} else {
if (_local4 <= 0){
isometricRender(_arg1.back);
for (_local2 in _arg1.frontPrimitives) {
drawSkin(_local2);
};
isometricRender(_arg1.front);
} else {
isometricRender(_arg1.front);
for (_local2 in _arg1.backPrimitives) {
drawSkin(_local2);
};
isometricRender(_arg1.back);
};
};
};
}
override protected function defaultName():String{
return (("camera" + ++counter));
}
public function get fov():Number{
return (_fov);
}
override protected function addToScene(_arg1:Scene3D):void{
super.addToScene(_arg1);
_arg1.calculateBSPOperation.addSequel(calculateSkinsOperation);
}
private function perspectiveRender(_arg1:BSPNode):void{
var _local2:*;
var _local3:Point3D;
var _local4:Number;
var _local5:Number;
if (_arg1 != null){
_local3 = _arg1.normal;
_local4 = (((direction.x * _local3.x) + (direction.y * _local3.y)) + (direction.z * _local3.z));
_local5 = ((((globalCoords.x * _local3.x) + (globalCoords.y * _local3.y)) + (globalCoords.z * _local3.z)) - _arg1.offset);
if (_arg1.primitive != null){
if (_local5 > 0){
if (_local4 < viewAngle){
perspectiveRender(_arg1.back);
drawSkin(_arg1.primitive);
};
perspectiveRender(_arg1.front);
} else {
if (_local4 > -(viewAngle)){
perspectiveRender(_arg1.front);
};
perspectiveRender(_arg1.back);
};
} else {
if (_local5 > 0){
if (_local4 < viewAngle){
perspectiveRender(_arg1.back);
for (_local2 in _arg1.frontPrimitives) {
drawSkin(_local2);
};
};
perspectiveRender(_arg1.front);
} else {
if (_local4 > -(viewAngle)){
perspectiveRender(_arg1.front);
for (_local2 in _arg1.backPrimitives) {
drawSkin(_local2);
};
};
perspectiveRender(_arg1.back);
};
};
};
}
alternativa3d function calculateTextureMatrix(_arg1:Face, _arg2:uint, _arg3:uint):Matrix{
var _local6:Point3D;
var _local7:Point3D;
var _local8:Point3D;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local4:Matrix = textureMatrices[_arg1];
var _local5:Matrix = _arg1.uvMatrix;
if (_local4 == null){
_local4 = new Matrix();
textureMatrices[_arg1] = _local4;
};
if (!textureMatricesCalculated[_arg1]){
_local6 = calculateCameraCoord(_arg1.primitive.points[0]);
_local7 = calculateCameraCoord(_arg1.primitive.points[1]);
_local8 = calculateCameraCoord(_arg1.primitive.points[2]);
_local9 = (_local7.x - _local6.x);
_local10 = (_local7.y - _local6.y);
_local11 = (_local8.x - _local6.x);
_local12 = (_local8.y - _local6.y);
_local4.a = (((_local5.a * _local9) + (_local5.b * _local11)) / _arg2);
_local4.b = (((_local5.a * _local10) + (_local5.b * _local12)) / _arg2);
_local4.c = (-(((_local5.c * _local9) + (_local5.d * _local11))) / _arg3);
_local4.d = (-(((_local5.c * _local10) + (_local5.d * _local12))) / _arg3);
_local4.tx = ((((_local5.tx + _local5.c) * _local9) + ((_local5.ty + _local5.d) * _local11)) + _local6.x);
_local4.ty = ((((_local5.tx + _local5.c) * _local10) + ((_local5.ty + _local5.d) * _local12)) + _local6.y);
textureMatricesCalculated[_arg1] = true;
};
return (_local4);
}
private function removeCurrentSkin():void{
var _local1:Skin = currentSkin.nextSkin;
_view.canvas.removeChild(currentSkin);
currentSkin.draw(null);
currentSkin.nextSkin = null;
currentSkin.camera = null;
Skin.destroySkin(currentSkin);
currentSkin = _local1;
if (prevSkin == null){
firstSkin = currentSkin;
} else {
prevSkin.nextSkin = currentSkin;
};
}
private function clearCalculated():void{
cameraCoordsCalculated.clear();
textureMatricesCalculated.clear();
}
}
}//package alternativa.engine3d.core
Section 3
//Face (alternativa.engine3d.core.Face)
package alternativa.engine3d.core {
import alternativa.types.*;
import flash.geom.*;
import alternativa.engine3d.*;
public final class Face {
alternativa3d var _aUV:Point;
alternativa3d var _cUV:Point;
alternativa3d var globalOffset:Number;
alternativa3d var calculateUVOperation:Operation;
alternativa3d var changeMaterialOperation:Operation;
alternativa3d var uvMatrix:Matrix;
alternativa3d var _bUV:Point;
alternativa3d var _num:uint;
alternativa3d var calculateFragmentsUVOperation:Operation;
alternativa3d var _mesh:Mesh;
alternativa3d var _vertices:Array;
alternativa3d var primitive:PolyPrimitive;
alternativa3d var updatePrimitiveOperation:Operation;
alternativa3d var globalNormal:Point3D;
alternativa3d var _surface:Surface;
alternativa3d var calculateNormalOperation:Operation;
public function Face(_arg1:Array){
var _local3:Vertex;
changeMaterialOperation = new Operation("changeMaterial", this);
calculateUVOperation = new Operation("calculateUV", this, calculateUV, Operation.FACE_CALCULATE_UV);
calculateFragmentsUVOperation = new Operation("calculateFragmentsUV", this, calculateFragmentsUV, Operation.FACE_CALCULATE_FRAGMENTS_UV);
calculateNormalOperation = new Operation("calculateNormal", this, calculateNormal, Operation.FACE_CALCULATE_NORMAL);
updatePrimitiveOperation = new Operation("updatePrimitive", this, updatePrimitive, Operation.FACE_UPDATE_PRIMITIVE);
globalNormal = new Point3D();
super();
_vertices = _arg1;
_num = _arg1.length;
primitive = PolyPrimitive.createPolyPrimitive();
primitive.face = this;
primitive.num = _num;
var _local2:uint;
while (_local2 < _num) {
_local3 = _arg1[_local2];
primitive.points.push(_local3.globalCoords);
primitive.uvs.push(null);
_local3.addToFace(this);
_local2++;
};
calculateNormalOperation.addSequel(updatePrimitiveOperation);
calculateUVOperation.addSequel(calculateFragmentsUVOperation);
}
private function calculatePrimitiveUV(_arg1:PolyPrimitive):void{
var _local2:Array;
var _local3:Array;
var _local4:Array;
var _local5:Array;
var _local6:Array;
var _local7:Array;
var _local8:uint;
var _local9:uint;
var _local10:Point3D;
var _local11:Point;
var _local12:Point;
var _local13:Point;
var _local14:Number;
var _local15:Boolean;
var _local16:uint;
var _local17:Boolean;
if (_arg1.fragment1 != null){
_local2 = _arg1.points;
_local3 = _arg1.fragment1.points;
_local4 = _arg1.fragment2.points;
_local5 = _arg1.uvs;
_local6 = _arg1.fragment1.uvs;
_local7 = _arg1.fragment2.uvs;
_local8 = 0;
_local9 = 0;
_local15 = true;
_local16 = 0;
while (_local16 < _arg1.num) {
_local17 = true;
_local10 = _local2[_local16];
if (_local10 == _local4[_local9]){
if (_local7[_local9] == null){
_local7[_local9] = _local5[_local16];
};
_local17 = false;
_local9++;
};
if (_local10 == _local3[_local8]){
if (_local6[_local8] == null){
_local6[_local8] = _local5[_local16];
};
_local17 = false;
_local8++;
};
if (_local17){
_local12 = _local5[((_local16)==0) ? (_arg1.num - 1) : (_local16 - 1)];
_local13 = _local5[_local16];
_local14 = (_local15) ? _arg1.splitTime1 : _arg1.splitTime2;
_local11 = _local7[_local9];
if (_local11 == null){
_local11 = new Point((_local12.x + ((_local13.x - _local12.x) * _local14)), (_local12.y + ((_local13.y - _local12.y) * _local14)));
_local7[_local9] = _local11;
_local6[_local8] = _local11;
} else {
_local11.x = (_local12.x + ((_local13.x - _local12.x) * _local14));
_local11.y = (_local12.y + ((_local13.y - _local12.y) * _local14));
};
_local15 = false;
_local9++;
_local8++;
if (_local10 == _local4[_local9]){
if (_local7[_local9] == null){
_local7[_local9] = _local5[_local16];
};
_local9++;
};
if (_local10 == _local3[_local8]){
if (_local6[_local8] == null){
_local6[_local8] = _local5[_local16];
};
_local8++;
};
};
_local16++;
};
if (_local9 < _arg1.fragment2.num){
_local12 = _local5[(_arg1.num - 1)];
_local13 = _local5[0];
_local14 = (_local15) ? _arg1.splitTime1 : _arg1.splitTime2;
_local11 = _local7[_local9];
if (_local11 == null){
_local11 = new Point((_local12.x + ((_local13.x - _local12.x) * _local14)), (_local12.y + ((_local13.y - _local12.y) * _local14)));
_local7[_local9] = _local11;
_local6[_local8] = _local11;
} else {
_local11.x = (_local12.x + ((_local13.x - _local12.x) * _local14));
_local11.y = (_local12.y + ((_local13.y - _local12.y) * _local14));
};
};
calculatePrimitiveUV(_arg1.fragment1);
calculatePrimitiveUV(_arg1.fragment2);
};
}
private function calculateUV():void{
var _local1:uint;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Point3D;
var _local8:Point3D;
var _local9:Point3D;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Point;
var _local19:Point3D;
if (((((!((_aUV == null))) && (!((_bUV == null))))) && (!((_cUV == null))))){
_local2 = (_bUV.x - _aUV.x);
_local3 = (_bUV.y - _aUV.y);
_local4 = (_cUV.x - _aUV.x);
_local5 = (_cUV.y - _aUV.y);
_local6 = ((_local2 * _local5) - (_local3 * _local4));
if (uvMatrix == null){
uvMatrix = new Matrix();
};
uvMatrix.a = (_local5 / _local6);
uvMatrix.b = (-(_local3) / _local6);
uvMatrix.c = (-(_local4) / _local6);
uvMatrix.d = (_local2 / _local6);
uvMatrix.tx = -(((uvMatrix.a * _aUV.x) + (uvMatrix.c * _aUV.y)));
uvMatrix.ty = -(((uvMatrix.b * _aUV.x) + (uvMatrix.d * _aUV.y)));
primitive.uvs[0] = _aUV;
primitive.uvs[1] = _bUV;
primitive.uvs[2] = _cUV;
if (_num > 3){
_local7 = primitive.points[0];
_local8 = primitive.points[1];
_local9 = primitive.points[2];
if (((globalNormal.x)<0) ? -(globalNormal.x) : globalNormal.x > ((globalNormal.y)<0) ? -(globalNormal.y) : globalNormal.y){
if (((globalNormal.x)<0) ? -(globalNormal.x) : globalNormal.x > ((globalNormal.z)<0) ? -(globalNormal.z) : globalNormal.z){
_local10 = (_local8.y - _local7.y);
_local11 = (_local8.z - _local7.z);
_local12 = (_local9.y - _local7.y);
_local13 = (_local9.z - _local7.z);
_local6 = ((_local10 * _local13) - (_local12 * _local11));
_local1 = 3;
while (_local1 < _num) {
_local19 = primitive.points[_local1];
_local14 = (_local19.y - _local7.y);
_local15 = (_local19.z - _local7.z);
_local16 = (((_local14 * _local13) - (_local12 * _local15)) / _local6);
_local17 = (((_local10 * _local15) - (_local14 * _local11)) / _local6);
_local18 = primitive.uvs[_local1];
if (_local18 == null){
_local18 = new Point();
primitive.uvs[_local1] = _local18;
};
_local18.x = ((_aUV.x + (_local2 * _local16)) + (_local4 * _local17));
_local18.y = ((_aUV.y + (_local3 * _local16)) + (_local5 * _local17));
_local1++;
};
} else {
_local10 = (_local8.x - _local7.x);
_local11 = (_local8.y - _local7.y);
_local12 = (_local9.x - _local7.x);
_local13 = (_local9.y - _local7.y);
_local6 = ((_local10 * _local13) - (_local12 * _local11));
_local1 = 3;
while (_local1 < _num) {
_local19 = primitive.points[_local1];
_local14 = (_local19.x - _local7.x);
_local15 = (_local19.y - _local7.y);
_local16 = (((_local14 * _local13) - (_local12 * _local15)) / _local6);
_local17 = (((_local10 * _local15) - (_local14 * _local11)) / _local6);
_local18 = primitive.uvs[_local1];
if (_local18 == null){
_local18 = new Point();
primitive.uvs[_local1] = _local18;
};
_local18.x = ((_aUV.x + (_local2 * _local16)) + (_local4 * _local17));
_local18.y = ((_aUV.y + (_local3 * _local16)) + (_local5 * _local17));
_local1++;
};
};
} else {
if (((globalNormal.y)<0) ? -(globalNormal.y) : globalNormal.y > ((globalNormal.z)<0) ? -(globalNormal.z) : globalNormal.z){
_local10 = (_local8.x - _local7.x);
_local11 = (_local8.z - _local7.z);
_local12 = (_local9.x - _local7.x);
_local13 = (_local9.z - _local7.z);
_local6 = ((_local10 * _local13) - (_local12 * _local11));
_local1 = 3;
while (_local1 < _num) {
_local19 = primitive.points[_local1];
_local14 = (_local19.x - _local7.x);
_local15 = (_local19.z - _local7.z);
_local16 = (((_local14 * _local13) - (_local12 * _local15)) / _local6);
_local17 = (((_local10 * _local15) - (_local14 * _local11)) / _local6);
_local18 = primitive.uvs[_local1];
if (_local18 == null){
_local18 = new Point();
primitive.uvs[_local1] = _local18;
};
_local18.x = ((_aUV.x + (_local2 * _local16)) + (_local4 * _local17));
_local18.y = ((_aUV.y + (_local3 * _local16)) + (_local5 * _local17));
_local1++;
};
} else {
_local10 = (_local8.x - _local7.x);
_local11 = (_local8.y - _local7.y);
_local12 = (_local9.x - _local7.x);
_local13 = (_local9.y - _local7.y);
_local6 = ((_local10 * _local13) - (_local12 * _local11));
_local1 = 3;
while (_local1 < _num) {
_local19 = primitive.points[_local1];
_local14 = (_local19.x - _local7.x);
_local15 = (_local19.y - _local7.y);
_local16 = (((_local14 * _local13) - (_local12 * _local15)) / _local6);
_local17 = (((_local10 * _local15) - (_local14 * _local11)) / _local6);
_local18 = primitive.uvs[_local1];
if (_local18 == null){
_local18 = new Point();
primitive.uvs[_local1] = _local18;
};
_local18.x = ((_aUV.x + (_local2 * _local16)) + (_local4 * _local17));
_local18.y = ((_aUV.y + (_local3 * _local16)) + (_local5 * _local17));
_local1++;
};
};
};
};
} else {
uvMatrix = null;
_local1 = 0;
while (_local1 < _num) {
primitive.uvs[_local1] = null;
_local1++;
};
};
}
alternativa3d function addToMesh(_arg1:Mesh):void{
_arg1.changeCoordsOperation.addSequel(updatePrimitiveOperation);
_arg1.changeRotationOrScaleOperation.addSequel(calculateNormalOperation);
_arg1.changeMobileOperation.addSequel(updatePrimitiveOperation);
_mesh = _arg1;
primitive.mobile = _arg1._mobile;
}
public function set aUV(_arg1:Point):void{
if (_aUV != null){
if (_arg1 != null){
if (!_aUV.equals(_arg1)){
_aUV.x = _arg1.x;
_aUV.y = _arg1.y;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
_aUV = null;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
if (_arg1 != null){
_aUV = _arg1.clone();
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
};
}
public function get num():uint{
return (_num);
}
public function set cUV(_arg1:Point):void{
if (_cUV != null){
if (_arg1 != null){
if (!_cUV.equals(_arg1)){
_cUV.x = _arg1.x;
_cUV.y = _arg1.y;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
_cUV = null;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
if (_arg1 != null){
_cUV = _arg1.clone();
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
};
}
alternativa3d function addToSurface(_arg1:Surface):void{
_arg1.changeMaterialOperation.addSequel(changeMaterialOperation);
if (((!((_mesh == null))) && (((((!((_surface == null))) && (!((_surface._material == _arg1._material))))) || ((((_surface == null)) && (!((_arg1._material == null))))))))){
_mesh.addOperationToScene(changeMaterialOperation);
};
_surface = _arg1;
}
public function set bUV(_arg1:Point):void{
if (_bUV != null){
if (_arg1 != null){
if (!_bUV.equals(_arg1)){
_bUV.x = _arg1.x;
_bUV.y = _arg1.y;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
_bUV = null;
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
} else {
if (_arg1 != null){
_bUV = _arg1.clone();
if (_mesh != null){
_mesh.addOperationToScene(calculateUVOperation);
};
};
};
}
alternativa3d function removeFromSurface(_arg1:Surface):void{
_arg1.changeMaterialOperation.removeSequel(changeMaterialOperation);
if (_arg1._material != null){
_mesh.addOperationToScene(changeMaterialOperation);
};
_surface = null;
}
public function get id():Object{
return (((_mesh)!=null) ? _mesh.getFaceId(this) : null);
}
alternativa3d function removeVertices():void{
var _local2:Vertex;
var _local1:uint;
while (_local1 < _num) {
_local2 = _vertices.pop();
primitive.points.pop();
_local2.removeFromFace(this);
_local1++;
};
_num = 0;
}
private function updatePrimitive():void{
var _local1:Vertex = _vertices[0];
globalOffset = (((_local1.globalCoords.x * globalNormal.x) + (_local1.globalCoords.y * globalNormal.y)) + (_local1.globalCoords.z * globalNormal.z));
removePrimitive(primitive);
primitive.mobile = _mesh._mobile;
_mesh._scene.addPrimitives.push(primitive);
}
private function removePrimitiveUV(_arg1:PolyPrimitive):void{
var _local2:uint;
while (_local2 < _arg1.num) {
_arg1.uvs[_local2] = null;
_local2++;
};
if (_arg1.fragment1 != null){
removePrimitiveUV(_arg1.fragment1);
removePrimitiveUV(_arg1.fragment2);
};
}
public function get bUV():Point{
return (((_bUV)!=null) ? _bUV.clone() : null);
}
public function get surface():Surface{
return (_surface);
}
private function calculateFragmentsUV():void{
if (!updatePrimitiveOperation.queued){
if (uvMatrix != null){
calculatePrimitiveUV(primitive);
} else {
removePrimitiveUV(primitive);
};
};
}
private function removePrimitive(_arg1:PolyPrimitive):void{
if (_arg1.fragment1 != null){
removePrimitive(_arg1.fragment1);
removePrimitive(_arg1.fragment2);
_arg1.fragment1 = null;
_arg1.fragment2 = null;
if (_arg1 != this.primitive){
_arg1.parent = null;
_arg1.sibling = null;
PolyPrimitive.destroyPolyPrimitive(_arg1);
};
} else {
if (_arg1.node != null){
_mesh._scene.removeBSPPrimitive(_arg1);
};
};
}
public function get cUV():Point{
return (((_cUV)!=null) ? _cUV.clone() : null);
}
public function get aUV():Point{
return (((_aUV)!=null) ? _aUV.clone() : null);
}
alternativa3d function removeFromMesh(_arg1:Mesh):void{
_arg1.changeCoordsOperation.removeSequel(updatePrimitiveOperation);
_arg1.changeRotationOrScaleOperation.removeSequel(calculateNormalOperation);
_arg1.changeMobileOperation.removeSequel(updatePrimitiveOperation);
_mesh = null;
}
alternativa3d function removeFromScene(_arg1:Scene3D):void{
_arg1.removeOperation(calculateUVOperation);
_arg1.removeOperation(calculateFragmentsUVOperation);
_arg1.removeOperation(calculateNormalOperation);
_arg1.removeOperation(updatePrimitiveOperation);
_arg1.removeOperation(changeMaterialOperation);
removePrimitive(primitive);
_arg1.addOperation(_arg1.calculateBSPOperation);
updatePrimitiveOperation.removeSequel(_arg1.calculateBSPOperation);
}
public function toString():String{
var _local3:Vertex;
var _local1:String = (("[Face ID:" + id) + ((_num)>0) ? " vertices:" : "");
var _local2:uint;
while (_local2 < _num) {
_local3 = _vertices[_local2];
_local1 = (_local1 + (_local3.id + ((_local2)<(_num - 1)) ? ", " : ""));
_local2++;
};
_local1 = (_local1 + "]");
return (_local1);
}
private function calculateNormal():void{
var _local1:Vertex = _vertices[0];
var _local2:Point3D = _local1.globalCoords;
_local1 = _vertices[1];
var _local3:Point3D = _local1.globalCoords;
var _local4:Number = (_local3.x - _local2.x);
var _local5:Number = (_local3.y - _local2.y);
var _local6:Number = (_local3.z - _local2.z);
_local1 = _vertices[2];
var _local7:Point3D = _local1.globalCoords;
var _local8:Number = (_local7.x - _local2.x);
var _local9:Number = (_local7.y - _local2.y);
var _local10:Number = (_local7.z - _local2.z);
globalNormal.x = ((_local10 * _local5) - (_local9 * _local6));
globalNormal.y = ((_local8 * _local6) - (_local10 * _local4));
globalNormal.z = ((_local9 * _local4) - (_local8 * _local5));
globalNormal.normalize();
}
public function get edgeJoinedFaces():Set{
var _local3:Vertex;
var _local4:Vertex;
var _local5:*;
var _local6:Face;
var _local1:Set = new Set(true);
var _local2:uint;
while (_local2 < _num) {
_local3 = _vertices[_local2];
_local4 = _vertices[((_local2)<(_num - 1)) ? (_local2 + 1) : 0];
for (_local5 in _local3._faces) {
_local6 = _local5;
if (((!((_local6 == this))) && ((_local6._vertices.indexOf(_local4) >= 0)))){
_local1[_local6] = true;
};
};
_local2++;
};
return (_local1);
}
public function getUVFast(_arg1:Point3D, _arg2:Point3D):Point{
var _local3:uint;
if ((((((_aUV == null)) || ((_bUV == null)))) || ((_cUV == null)))){
return (null);
};
if (((_arg2.x)<0) ? -(_arg2.x) : _arg2.x > ((_arg2.y)<0) ? -(_arg2.y) : _arg2.y){
if (((_arg2.x)<0) ? -(_arg2.x) : _arg2.x > ((_arg2.z)<0) ? -(_arg2.z) : _arg2.z){
_local3 = 0;
} else {
_local3 = 2;
};
} else {
if (((_arg2.y)<0) ? -(_arg2.y) : _arg2.y > ((_arg2.z)<0) ? -(_arg2.z) : _arg2.z){
_local3 = 1;
} else {
_local3 = 2;
};
};
var _local4:Vertex = _vertices[0];
var _local5:Point3D = _local4._coords;
_local4 = _vertices[1];
var _local6:Point3D = _local4._coords;
_local4 = _vertices[2];
var _local7:Point3D = _local4._coords;
var _local8:Number = ((_local3)==0) ? (_local6.y - _local5.y) : (_local6.x - _local5.x);
var _local9:Number = ((_local3)==2) ? (_local6.y - _local5.y) : (_local6.z - _local5.z);
var _local10:Number = ((_local3)==0) ? (_local7.y - _local5.y) : (_local7.x - _local5.x);
var _local11:Number = ((_local3)==2) ? (_local7.y - _local5.y) : (_local7.z - _local5.z);
var _local12:Number = ((_local8 * _local11) - (_local10 * _local9));
var _local13:Number = ((_local3)==0) ? (_arg1.y - _local5.y) : (_arg1.x - _local5.x);
var _local14:Number = ((_local3)==2) ? (_arg1.y - _local5.y) : (_arg1.z - _local5.z);
var _local15:Number = (((_local13 * _local11) - (_local10 * _local14)) / _local12);
var _local16:Number = (((_local8 * _local14) - (_local13 * _local9)) / _local12);
var _local17:Number = (_bUV.x - _aUV.x);
var _local18:Number = (_bUV.y - _aUV.y);
var _local19:Number = (_cUV.x - _aUV.x);
var _local20:Number = (_cUV.y - _aUV.y);
return (new Point(((_aUV.x + (_local17 * _local15)) + (_local19 * _local16)), ((_aUV.y + (_local18 * _local15)) + (_local20 * _local16))));
}
public function get normal():Point3D{
var _local12:Number;
var _local1:Point3D = new Point3D();
var _local2:Vertex = _vertices[0];
var _local3:Point3D = _local2.coords;
_local2 = _vertices[1];
var _local4:Point3D = _local2.coords;
var _local5:Number = (_local4.x - _local3.x);
var _local6:Number = (_local4.y - _local3.y);
var _local7:Number = (_local4.z - _local3.z);
_local2 = _vertices[2];
var _local8:Point3D = _local2.coords;
var _local9:Number = (_local8.x - _local3.x);
var _local10:Number = (_local8.y - _local3.y);
var _local11:Number = (_local8.z - _local3.z);
_local1.x = ((_local11 * _local6) - (_local10 * _local7));
_local1.y = ((_local9 * _local7) - (_local11 * _local5));
_local1.z = ((_local10 * _local5) - (_local9 * _local6));
if (((((!((_local1.x == 0))) || (!((_local1.y == 0))))) || (!((_local1.z == 0))))){
_local12 = Math.sqrt((((_local1.x * _local1.x) + (_local1.y * _local1.y)) + (_local1.z * _local1.z)));
_local1.x = (_local1.x / _local12);
_local1.y = (_local1.y / _local12);
_local1.z = (_local1.z / _local12);
};
return (_local1);
}
public function getUV(_arg1:Point3D):Point{
return (getUVFast(_arg1, normal));
}
public function get vertices():Array{
return (new Array().concat(_vertices));
}
public function get mesh():Mesh{
return (_mesh);
}
alternativa3d function addToScene(_arg1:Scene3D):void{
_arg1.addOperation(calculateNormalOperation);
_arg1.addOperation(calculateUVOperation);
updatePrimitiveOperation.addSequel(_arg1.calculateBSPOperation);
}
}
}//package alternativa.engine3d.core
Section 4
//Mesh (alternativa.engine3d.core.Mesh)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import alternativa.utils.*;
import alternativa.engine3d.errors.*;
import alternativa.engine3d.*;
public class Mesh extends Object3D {
private var faceIdCounter:uint;// = 0
alternativa3d var _surfaces:Map;
alternativa3d var _vertices:Map;
private var vertexIdCounter:uint;// = 0
private var surfaceIdCounter:uint;// = 0
alternativa3d var _faces:Map;
private static var counter:uint = 0;
public function Mesh(_arg1:String=null){
_vertices = new Map();
_faces = new Map();
_surfaces = new Map();
super(_arg1);
}
public function removeFace(_arg1:Object):Face{
var _local2 = (_arg1 is Face);
if (_arg1 == null){
throw (new FaceNullError(this));
};
if (_local2){
if (Face(_arg1)._mesh != this){
throw (new FaceNotFoundError(_arg1, this));
};
} else {
if (_faces[_arg1] == undefined){
throw (new FaceNotFoundError(_arg1, this));
};
if (!(_faces[_arg1] is Face)){
throw (new FaceInvalidIDError(_arg1, this));
};
};
var _local3:Face = (_local2) ? Face(_arg1) : _faces[_arg1];
var _local4:Object = (_local2) ? getFaceId(Face(_arg1)) : _arg1;
if (_scene != null){
_local3.removeFromScene(_scene);
};
_local3.removeVertices();
if (_local3._surface != null){
_local3._surface._faces.remove(_local3);
_local3.removeFromSurface(_local3._surface);
};
_local3.removeFromMesh(this);
delete _faces[_local4];
return (_local3);
}
public function hasSurface(_arg1:Object):Boolean{
if (_arg1 == null){
throw (new SurfaceNullError(this));
};
if ((_arg1 is Surface)){
return ((_arg1._mesh == this));
};
if (_surfaces[_arg1] != undefined){
if ((_surfaces[_arg1] is Surface)){
return (true);
};
throw (new SurfaceInvalidIDError(_arg1, this));
//unresolved jump
};
return (false);
}
public function setMaterialToAllSurfaces(_arg1:SurfaceMaterial):void{
var _local3:Surface;
var _local2:Boolean;
for each (_local3 in _surfaces) {
if (_local2){
_local2 = false;
_local3.material = _arg1;
} else {
_local3.material = ((_arg1)!=null) ? SurfaceMaterial(_arg1.clone()) : null;
};
};
}
public function removeVertex(_arg1:Object):Vertex{
var _local2 = (_arg1 is Vertex);
if (_arg1 == null){
throw (new VertexNullError(this));
};
if (_local2){
if (Vertex(_arg1)._mesh != this){
throw (new VertexNotFoundError(_arg1, this));
};
} else {
if (_vertices[_arg1] == undefined){
throw (new VertexNotFoundError(_arg1, this));
};
if (!(_vertices[_arg1] is Vertex)){
throw (new VertexInvalidIDError(_arg1, this));
};
};
var _local3:Vertex = (_local2) ? Vertex(_arg1) : _vertices[_arg1];
var _local4:Object = (_local2) ? getVertexId(Vertex(_arg1)) : _arg1;
if (_scene != null){
_local3.removeFromScene(_scene);
};
_local3.removeFromMesh(this);
delete _vertices[_local4];
return (_local3);
}
public function removeSurface(_arg1:Object):Surface{
var _local2 = (_arg1 is Surface);
if (_arg1 == null){
throw (new SurfaceNullError(this));
};
if (_local2){
if (Surface(_arg1)._mesh != this){
throw (new SurfaceNotFoundError(_arg1, this));
};
} else {
if (_surfaces[_arg1] == undefined){
throw (new SurfaceNotFoundError(_arg1, this));
};
if (!(_surfaces[_arg1] is Surface)){
throw (new SurfaceInvalidIDError(_arg1, this));
};
};
var _local3:Surface = (_local2) ? Surface(_arg1) : _surfaces[_arg1];
var _local4:Object = (_local2) ? getSurfaceId(Surface(_arg1)) : _arg1;
if (_scene != null){
_local3.removeFromScene(_scene);
};
_local3.removeFaces();
_local3.removeFromMesh(this);
delete _surfaces[_local4];
return (_local3);
}
public function addSurface(_arg1:Array=null, _arg2:Object=null):Surface{
var _local4:uint;
var _local5:uint;
if (_arg2 != null){
if (_surfaces[_arg2] != undefined){
if ((_surfaces[_arg2] is Surface)){
throw (new SurfaceExistsError(_surfaces[_arg2], _arg2, this));
};
throw (new SurfaceInvalidIDError(_arg2, this));
};
} else {
while (_surfaces[surfaceIdCounter] != undefined) {
surfaceIdCounter++;
};
_arg2 = surfaceIdCounter;
};
var _local3:Surface = new Surface();
if (_scene != null){
_local3.addToScene(_scene);
};
_local3.addToMesh(this);
_surfaces[_arg2] = _local3;
if (_arg1 != null){
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
_local3.addFace(_arg1[_local5]);
_local5++;
};
};
return (_local3);
}
public function getFaceId(_arg1:Face):Object{
var _local2:Object;
if (_arg1 == null){
throw (new FaceNullError(this));
};
if (_arg1._mesh != this){
throw (new FaceNotFoundError(_arg1, this));
};
for (_local2 in _faces) {
if (_faces[_local2] == _arg1){
return (_local2);
};
};
return (null);
}
public function setMaterialToSurface(_arg1:SurfaceMaterial, _arg2:Object):void{
var _local3 = (_arg2 is Surface);
if (_arg2 == null){
throw (new SurfaceNullError(this));
};
if (_local3){
if (Surface(_arg2)._mesh != this){
throw (new SurfaceNotFoundError(_arg2, this));
};
} else {
if (_surfaces[_arg2] == undefined){
throw (new SurfaceNotFoundError(_arg2, this));
};
if (!(_surfaces[_arg2] is Surface)){
throw (new SurfaceInvalidIDError(_arg2, this));
};
};
var _local4:Surface = (_local3) ? Surface(_arg2) : _surfaces[_arg2];
_local4.material = _arg1;
}
override alternativa3d function setScene(_arg1:Scene3D):void{
var _local2:Vertex;
var _local3:Face;
var _local4:Surface;
if (_scene != _arg1){
if (_arg1 != null){
for each (_local2 in _vertices) {
_local2.addToScene(_arg1);
};
for each (_local3 in _faces) {
_local3.addToScene(_arg1);
};
for each (_local4 in _surfaces) {
_local4.addToScene(_arg1);
};
} else {
for each (_local2 in _vertices) {
_local2.removeFromScene(_scene);
};
for each (_local3 in _faces) {
_local3.removeFromScene(_scene);
};
for each (_local4 in _surfaces) {
_local4.removeFromScene(_scene);
};
};
};
super.setScene(_arg1);
}
override protected function clonePropertiesFrom(_arg1:Object3D):void{
var _local3:*;
var _local4:int;
var _local5:int;
var _local7:Map;
var _local8:Vertex;
var _local9:Face;
var _local10:Array;
var _local11:Face;
var _local12:Surface;
var _local13:Array;
super.clonePropertiesFrom(_arg1);
var _local2:Mesh = Mesh(_arg1);
var _local6:Map = new Map(true);
for (_local3 in _local2._vertices) {
_local8 = _local2._vertices[_local3];
_local6[_local8] = addVertex(_local8.x, _local8.y, _local8.z, _local3);
};
_local7 = new Map(true);
for (_local3 in _local2._faces) {
_local9 = _local2._faces[_local3];
_local4 = _local9._vertices.length;
_local10 = new Array(_local4);
_local5 = 0;
while (_local5 < _local4) {
_local10[_local5] = _local6[_local9._vertices[_local5]];
_local5++;
};
_local11 = addFace(_local10, _local3);
_local11.aUV = _local9._aUV;
_local11.bUV = _local9._bUV;
_local11.cUV = _local9._cUV;
_local7[_local9] = _local11;
};
for (_local3 in _local2._surfaces) {
_local12 = _local2._surfaces[_local3];
_local13 = _local12._faces.toArray();
_local4 = _local13.length;
_local5 = 0;
while (_local5 < _local4) {
_local13[_local5] = _local7[_local13[_local5]];
_local5++;
};
addSurface(_local13, _local3).material = SurfaceMaterial(_local12.material.clone());
};
}
public function getVertexById(_arg1:Object):Vertex{
if (_arg1 == null){
throw (new VertexNullError(this));
};
if (_vertices[_arg1] == undefined){
throw (new VertexNotFoundError(_arg1, this));
};
if ((_vertices[_arg1] is Vertex)){
return (_vertices[_arg1]);
};
throw (new VertexInvalidIDError(_arg1, this));
}
public function getFaceById(_arg1:Object):Face{
if (_arg1 == null){
throw (new FaceNullError(this));
};
if (_faces[_arg1] == undefined){
throw (new FaceNotFoundError(_arg1, this));
};
if ((_faces[_arg1] is Face)){
return (_faces[_arg1]);
};
throw (new FaceInvalidIDError(_arg1, this));
}
public function getVertexId(_arg1:Vertex):Object{
var _local2:Object;
if (_arg1 == null){
throw (new VertexNullError(this));
};
if (_arg1._mesh != this){
throw (new VertexNotFoundError(_arg1, this));
};
for (_local2 in _vertices) {
if (_vertices[_local2] == _arg1){
return (_local2);
};
};
return (null);
}
public function hasFace(_arg1:Object):Boolean{
if (_arg1 == null){
throw (new FaceNullError(this));
};
if ((_arg1 is Face)){
return ((_arg1._mesh == this));
};
if (_faces[_arg1] != undefined){
if ((_faces[_arg1] is Face)){
return (true);
};
throw (new FaceInvalidIDError(_arg1, this));
//unresolved jump
};
return (false);
}
public function addFace(_arg1:Array, _arg2:Object=null):Face{
var _local5:Vertex;
if (_arg1 == null){
throw (new FaceNeedMoreVerticesError(this));
};
if (_arg2 != null){
if (_faces[_arg2] != undefined){
if ((_faces[_arg2] is Face)){
throw (new FaceExistsError(_faces[_arg2], _arg2, this));
};
throw (new FaceInvalidIDError(_arg2, this));
};
} else {
while (_faces[faceIdCounter] != undefined) {
faceIdCounter++;
};
_arg2 = faceIdCounter;
};
var _local3:uint = _arg1.length;
if (_local3 < 3){
throw (new FaceNeedMoreVerticesError(this, _local3));
};
var _local4:Array = new Array();
var _local6:uint;
while (_local6 < _local3) {
if ((_arg1[_local6] is Vertex)){
_local5 = _arg1[_local6];
if (_local5._mesh != this){
throw (new VertexNotFoundError(_arg1[_local6], this));
};
} else {
if (_vertices[_arg1[_local6]] == null){
throw (new VertexNotFoundError(_arg1[_local6], this));
};
if (!(_vertices[_arg1[_local6]] is Vertex)){
throw (new VertexInvalidIDError(_arg1[_local6], this));
};
_local5 = _vertices[_arg1[_local6]];
};
_local4.push(_local5);
_local6++;
};
var _local7:Face = new Face(_local4);
if (_scene != null){
_local7.addToScene(_scene);
};
_local7.addToMesh(this);
_faces[_arg2] = _local7;
return (_local7);
}
override protected function createEmptyObject():Object3D{
return (new Mesh());
}
public function addVertex(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Object=null):Vertex{
if (_arg4 != null){
if (_vertices[_arg4] != undefined){
if ((_vertices[_arg4] is Vertex)){
throw (new VertexExistsError(_vertices[_arg4], _arg4, this));
};
throw (new VertexInvalidIDError(_arg4, this));
};
} else {
while (_vertices[vertexIdCounter] != undefined) {
vertexIdCounter++;
};
_arg4 = vertexIdCounter;
};
var _local5:Vertex = new Vertex(_arg1, _arg2, _arg3);
if (_scene != null){
_local5.addToScene(_scene);
};
_local5.addToMesh(this);
_vertices[_arg4] = _local5;
return (_local5);
}
public function get surfaces():Map{
return (_surfaces.clone());
}
public function getSurfaceById(_arg1:Object):Surface{
if (_arg1 == null){
throw (new SurfaceNullError(this));
};
if (_surfaces[_arg1] == undefined){
throw (new SurfaceNotFoundError(_arg1, this));
};
if ((_surfaces[_arg1] is Surface)){
return (_surfaces[_arg1]);
};
throw (new SurfaceInvalidIDError(_arg1, this));
}
override protected function defaultName():String{
return (("mesh" + ++counter));
}
public function hasVertex(_arg1:Object):Boolean{
if (_arg1 == null){
throw (new VertexNullError(this));
};
if ((_arg1 is Vertex)){
return ((_arg1._mesh == this));
};
if (_vertices[_arg1] != undefined){
if ((_vertices[_arg1] is Vertex)){
return (true);
};
throw (new VertexInvalidIDError(_arg1, this));
//unresolved jump
};
return (false);
}
public function setUVsToFace(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Object):void{
var _local5 = (_arg4 is Face);
if (_arg4 == null){
throw (new FaceNullError(this));
};
if (_local5){
if (Face(_arg4)._mesh != this){
throw (new FaceNotFoundError(_arg4, this));
};
} else {
if (_faces[_arg4] == undefined){
throw (new FaceNotFoundError(_arg4, this));
};
if (!(_faces[_arg4] is Face)){
throw (new FaceInvalidIDError(_arg4, this));
};
};
var _local6:Face = (_local5) ? Face(_arg4) : _faces[_arg4];
_local6.aUV = _arg1;
_local6.bUV = _arg2;
_local6.cUV = _arg3;
}
public function getSurfaceId(_arg1:Surface):Object{
var _local2:Object;
if (_arg1 == null){
throw (new SurfaceNullError(this));
};
if (_arg1._mesh != this){
throw (new SurfaceNotFoundError(_arg1, this));
};
for (_local2 in _surfaces) {
if (_surfaces[_local2] == _arg1){
return (_local2);
};
};
return (null);
}
public function get faces():Map{
return (_faces.clone());
}
public function get vertices():Map{
return (_vertices.clone());
}
override public function toString():String{
return ((((((((("[" + ObjectUtils.getClassName(this)) + " ") + _name) + " vertices: ") + _vertices.length) + " faces: ") + _faces.length) + "]"));
}
public function addAllFacesToSurface(_arg1:Object=null, _arg2:Boolean=false):Surface{
var _local3:Surface;
var _local4:Object;
var _local5:Face;
var _local6:Map;
var _local7:*;
var _local8:Surface;
if ((_arg1 is Surface)){
if (_arg1._mesh == this){
_local3 = Surface(_arg1);
} else {
throw (new SurfaceNotFoundError(_arg1, this));
};
} else {
if (_surfaces[_arg1] == undefined){
_local3 = addSurface(null, _arg1);
_local4 = _arg1;
} else {
if ((_surfaces[_arg1] is Surface)){
_local3 = _surfaces[_arg1];
} else {
throw (new SurfaceInvalidIDError(_arg1, this));
};
};
};
for each (_local5 in _faces) {
if (_local5._surface != _local3){
_local3.addFace(_local5);
};
};
if (_arg2){
if (_local4 == null){
_local4 = getSurfaceId(_local3);
};
_local6 = new Map();
_local6[_local4] = _local3;
delete _surfaces[_local4];
for (_local7 in _surfaces) {
_local8 = _surfaces[_local7];
if (_scene != null){
_local8.removeFromScene(_scene);
};
_local8.removeFromMesh(this);
delete _surfaces[_local7];
};
_surfaces = _local6;
};
return (_local3);
}
}
}//package alternativa.engine3d.core
Section 5
//Object3D (alternativa.engine3d.core.Object3D)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.utils.*;
import alternativa.engine3d.errors.*;
import alternativa.engine3d.*;
public class Object3D {
alternativa3d var transformation:Matrix3D;
alternativa3d var _scene:Scene3D;
alternativa3d var changeMobileOperation:Operation;
alternativa3d var calculateTransformationOperation:Operation;
alternativa3d var changeCoordsOperation:Operation;
alternativa3d var _rotationX:Number;// = 0
alternativa3d var _rotationY:Number;// = 0
alternativa3d var _rotationZ:Number;// = 0
alternativa3d var globalCoords:Point3D;
alternativa3d var _coords:Point3D;
alternativa3d var _mobile:uint;// = 0
alternativa3d var _parent:Object3D;
alternativa3d var _children:Set;
alternativa3d var _name:String;
alternativa3d var changeRotationOrScaleOperation:Operation;
alternativa3d var _scaleZ:Number;// = 1
alternativa3d var _scaleX:Number;// = 1
alternativa3d var _scaleY:Number;// = 1
private static var counter:uint = 0;
public function Object3D(_arg1:String=null){
changeRotationOrScaleOperation = new Operation("changeRotationOrScale", this);
changeCoordsOperation = new Operation("changeCoords", this);
changeMobileOperation = new Operation("changeMobile", this);
calculateTransformationOperation = new Operation("calculateTransformation", this, calculateTransformation, Operation.OBJECT_TRANSFORMATION);
_children = new Set();
_coords = new Point3D();
transformation = new Matrix3D();
globalCoords = new Point3D();
super();
_name = ((_arg1)!=null) ? _arg1 : defaultName();
changeRotationOrScaleOperation.addSequel(calculateTransformationOperation);
changeCoordsOperation.addSequel(calculateTransformationOperation);
}
public function get z():Number{
return (_coords.z);
}
public function set z(_arg1:Number):void{
if (_coords.z != _arg1){
_coords.z = _arg1;
addOperationToScene(changeCoordsOperation);
};
}
alternativa3d function removeOperationFromScene(_arg1:Operation):void{
if (_scene != null){
_scene.removeOperation(_arg1);
};
}
public function get x():Number{
return (_coords.x);
}
public function getChildByName(_arg1:String):Object3D{
var _local2:*;
var _local3:Object3D;
for (_local2 in _children) {
_local3 = _local2;
if (_local3._name == _arg1){
return (_local3);
};
};
return (null);
}
public function get name():String{
return (_name);
}
public function get scene():Scene3D{
return (_scene);
}
private function calculateTransformation():void{
if (changeRotationOrScaleOperation.queued){
transformation.toTransform(_coords.x, _coords.y, _coords.z, _rotationX, _rotationY, _rotationZ, _scaleX, _scaleY, _scaleZ);
if (_parent != null){
transformation.combine(_parent.transformation);
};
globalCoords.x = transformation.d;
globalCoords.y = transformation.h;
globalCoords.z = transformation.l;
} else {
globalCoords.copy(_coords);
if (_parent != null){
globalCoords.transform(_parent.transformation);
};
transformation.offset(globalCoords.x, globalCoords.y, globalCoords.z);
};
}
public function set name(_arg1:String):void{
_name = _arg1;
}
public function get coords():Point3D{
return (_coords.clone());
}
public function set scaleZ(_arg1:Number):void{
if (_scaleZ != _arg1){
_scaleZ = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
public function get mobile():uint{
return (_mobile);
}
public function get rotationZ():Number{
return (_rotationZ);
}
public function set scaleY(_arg1:Number):void{
if (_scaleY != _arg1){
_scaleY = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
public function get rotationX():Number{
return (_rotationX);
}
public function set scaleX(_arg1:Number):void{
if (_scaleX != _arg1){
_scaleX = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
alternativa3d function setParent(_arg1:Object3D):void{
if (_parent != null){
removeParentSequels();
};
_parent = _arg1;
if (_arg1 != null){
addParentSequels();
};
}
public function get parent():Object3D{
return (_parent);
}
public function set rotationX(_arg1:Number):void{
if (_rotationX != _arg1){
_rotationX = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
public function set rotationZ(_arg1:Number):void{
if (_rotationZ != _arg1){
_rotationZ = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
public function set coords(_arg1:Point3D):void{
if (!_coords.equals(_arg1)){
_coords.copy(_arg1);
addOperationToScene(changeCoordsOperation);
};
}
public function set mobile(_arg1:uint):void{
if (_mobile != _arg1){
_mobile = _arg1;
addOperationToScene(changeMobileOperation);
};
}
public function set rotationY(_arg1:Number):void{
if (_rotationY != _arg1){
_rotationY = _arg1;
addOperationToScene(changeRotationOrScaleOperation);
};
}
private function removeParentSequels():void{
_parent.changeCoordsOperation.removeSequel(changeCoordsOperation);
_parent.changeRotationOrScaleOperation.removeSequel(changeRotationOrScaleOperation);
}
alternativa3d function setScene(_arg1:Scene3D):void{
var _local2:*;
var _local3:Object3D;
if (_scene != _arg1){
if (_scene != null){
removeFromScene(_scene);
};
if (_arg1 != null){
addToScene(_arg1);
};
_scene = _arg1;
} else {
addOperationToScene(changeRotationOrScaleOperation);
};
for (_local2 in _children) {
_local3 = _local2;
_local3.setScene(_scene);
};
}
private function addParentSequels():void{
_parent.changeCoordsOperation.addSequel(changeCoordsOperation);
_parent.changeRotationOrScaleOperation.addSequel(changeRotationOrScaleOperation);
}
alternativa3d function addOperationToScene(_arg1:Operation):void{
if (_scene != null){
_scene.addOperation(_arg1);
};
}
public function get scaleX():Number{
return (_scaleX);
}
public function get scaleY():Number{
return (_scaleY);
}
public function get scaleZ():Number{
return (_scaleZ);
}
alternativa3d function setLevel(_arg1:uint):void{
var _local2:*;
var _local3:Object3D;
calculateTransformationOperation.level = _arg1;
for (_local2 in _children) {
_local3 = _local2;
_local3.setLevel((_arg1 + 1));
};
}
protected function clonePropertiesFrom(_arg1:Object3D):void{
_name = _arg1._name;
_mobile = _arg1._mobile;
_coords.x = _arg1._coords.x;
_coords.y = _arg1._coords.y;
_coords.z = _arg1._coords.z;
_rotationX = _arg1._rotationX;
_rotationY = _arg1._rotationY;
_rotationZ = _arg1._rotationZ;
_scaleX = _arg1._scaleX;
_scaleY = _arg1._scaleY;
_scaleZ = _arg1._scaleZ;
}
protected function createEmptyObject():Object3D{
return (new Object3D());
}
public function clone():Object3D{
var _local2:*;
var _local3:Object3D;
var _local1:Object3D = createEmptyObject();
_local1.clonePropertiesFrom(this);
for (_local2 in _children) {
_local3 = _local2;
_local1.addChild(_local3.clone());
};
return (_local1);
}
protected function removeFromScene(_arg1:Scene3D):void{
_arg1.removeOperation(changeRotationOrScaleOperation);
_arg1.removeOperation(changeCoordsOperation);
_arg1.removeOperation(changeMobileOperation);
changeMobileOperation.removeSequel(_arg1.calculateBSPOperation);
}
public function get rotationY():Number{
return (_rotationY);
}
public function toString():String{
return ((((("[" + ObjectUtils.getClassName(this)) + " ") + _name) + "]"));
}
protected function addToScene(_arg1:Scene3D):void{
_arg1.addOperation(changeRotationOrScaleOperation);
changeMobileOperation.addSequel(_arg1.calculateBSPOperation);
}
public function set y(_arg1:Number):void{
if (_coords.y != _arg1){
_coords.y = _arg1;
addOperationToScene(changeCoordsOperation);
};
}
protected function defaultName():String{
return (("object" + ++counter));
}
public function set x(_arg1:Number):void{
if (_coords.x != _arg1){
_coords.x = _arg1;
addOperationToScene(changeCoordsOperation);
};
}
public function removeChild(_arg1:Object3D):void{
if (_arg1 == null){
throw (new Object3DNullError(this));
};
if (_arg1._parent != this){
throw (new Object3DNotFoundError(_arg1, this));
};
_children.remove(_arg1);
_arg1.setParent(null);
_arg1.setScene(null);
}
public function get y():Number{
return (_coords.y);
}
public function addChild(_arg1:Object3D):void{
var _local2:Object3D;
if (_arg1 == null){
throw (new Object3DNullError(this));
};
if (_arg1._parent == this){
throw (new Object3DExistsError(_arg1, this));
};
if (_arg1 == this){
throw (new Object3DSelfError(this));
};
if (_arg1._scene == _scene){
_local2 = _parent;
while (_local2 != null) {
if (_arg1 == _local2){
throw (new Object3DParentError(_arg1, this));
};
_local2 = _local2._parent;
};
};
if (_arg1._parent != null){
_arg1._parent._children.remove(_arg1);
} else {
if (((!((_arg1._scene == null))) && ((_arg1._scene._root == _arg1)))){
_arg1._scene.root = null;
};
};
_children.add(_arg1);
_arg1.setParent(this);
_arg1.setLevel((calculateTransformationOperation.level + 1));
_arg1.setScene(_scene);
}
public function get children():Set{
return (_children.clone());
}
}
}//package alternativa.engine3d.core
Section 6
//Operation (alternativa.engine3d.core.Operation)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.*;
public class Operation {
public var queued:Boolean;// = false
alternativa3d var method:Function;
public var priority:uint;
alternativa3d var name:String;
public var level:uint;// = 0
private var sequel:Operation;
private var sequels:Set;
alternativa3d var object:Object;
public static const CAMERA_CALCULATE_SKINS:uint = 11;
public static const FACE_CALCULATE_NORMAL:uint = 3;
public static const CAMERA_CLEAR_CALCULATED:uint = 9;
public static const OBJECT_TRANSFORMATION:uint = 1;
public static const SCENE_CLEAR_PRIMITIVES:uint = 12;
public static const FACE_UPDATE_PRIMITIVE:uint = 5;
public static const CAMERA_CALCULATE_MATRIX:uint = 8;
public static const SKIN_DRAW:uint = 10;
public static const VERTEX_CALCULATE_COORDS:uint = 2;
public static const SCENE_CALCULATE_BSP:uint = 6;
public static const FACE_CALCULATE_UV:uint = 4;
public static const FACE_CALCULATE_FRAGMENTS_UV:uint = 7;
public function Operation(_arg1:String, _arg2:Object=null, _arg3:Function=null, _arg4:uint=0, _arg5:uint=0){
this.object = _arg2;
this.method = _arg3;
this.name = _arg1;
this.priority = _arg4;
this.level = _arg5;
}
alternativa3d function addSequel(_arg1:Operation):void{
if (sequel == null){
if (sequels == null){
sequel = _arg1;
} else {
sequels[_arg1] = true;
};
} else {
if (sequel != _arg1){
sequels = new Set(true);
sequels[sequel] = true;
sequels[_arg1] = true;
sequel = null;
};
};
}
public function toString():String{
return ((((((((("[Operation " + priority) + "/") + level) + " ") + object) + ".") + name) + "]"));
}
alternativa3d function removeSequel(_arg1:Operation):void{
var _local2:*;
var _local3:Boolean;
if (sequel == null){
if (sequels != null){
delete sequels[_arg1];
_local3 = false;
for (_local2 in sequels) {
if (_local3){
_local3 = false;
break;
};
_local3 = true;
};
if (_local3){
sequel = _local2;
sequels = null;
};
};
} else {
if (sequel == _arg1){
sequel = null;
};
};
}
alternativa3d function collectSequels(_arg1:Array):void{
var _local2:*;
var _local3:Operation;
if (sequel == null){
for (_local2 in sequels) {
_local3 = _local2;
if (!_local3.queued){
_arg1.push(_local3);
_local3.queued = true;
_local3.collectSequels(_arg1);
};
};
} else {
if (!sequel.queued){
_arg1.push(sequel);
sequel.queued = true;
sequel.collectSequels(_arg1);
};
};
}
}
}//package alternativa.engine3d.core
Section 7
//PolyPrimitive (alternativa.engine3d.core.PolyPrimitive)
package alternativa.engine3d.core {
import alternativa.engine3d.*;
public class PolyPrimitive {
alternativa3d var sibling:PolyPrimitive;
public var splitQuality:Number;
alternativa3d var splitTime1:Number;
alternativa3d var num:uint;
alternativa3d var disbalance:int;
alternativa3d var node:BSPNode;
alternativa3d var splitTime2:Number;
alternativa3d var splits:uint;
alternativa3d var face:Face;
alternativa3d var fragment1:PolyPrimitive;
alternativa3d var fragment2:PolyPrimitive;
alternativa3d var points:Array;
public var mobile:uint;
alternativa3d var parent:PolyPrimitive;
alternativa3d var uvs:Array;
private static var collector:Array = new Array();
public function PolyPrimitive(){
points = new Array();
uvs = new Array();
super();
}
public function toString():String{
return ((("[Primitive " + face._mesh._name) + "]"));
}
alternativa3d static function destroyPolyPrimitive(_arg1:PolyPrimitive):void{
_arg1.face = null;
var _local2:uint;
while (_local2 < _arg1.num) {
_arg1.points.pop();
_arg1.uvs.pop();
_local2++;
};
collector.push(_arg1);
}
alternativa3d static function createPolyPrimitive():PolyPrimitive{
var _local1:PolyPrimitive = collector.pop();
if (_local1 == null){
_local1 = new (PolyPrimitive);
};
return (_local1);
}
}
}//package alternativa.engine3d.core
Section 8
//Scene3D (alternativa.engine3d.core.Scene3D)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import alternativa.engine3d.physics.*;
import flash.display.*;
import alternativa.engine3d.errors.*;
import alternativa.engine3d.*;
public class Scene3D {
alternativa3d const planeOffsetTreshold:Number = 0.1;
private var addSplitQualitySort:Array;
private var collisionDestination:Point3D;
private var removeNodes:Set;
private var collisionVector:Point3D;
private var _splitAnalysis:Boolean;// = true
private var dummyOperation:Operation;
private var collisionPoint:Point3D;
private var operationSort:Array;
private var childPrimitives:Set;
private var operationSortOptions:Array;
private var collisionPrimitivePoint:Point3D;
alternativa3d var bsp:BSPNode;
alternativa3d var changedPrimitives:Set;
alternativa3d var _root:Object3D;
private var _splitBalance:Number;// = 0
private var collisionPrimitiveNearest:PolyPrimitive;
alternativa3d var clearPrimitivesOperation:Operation;
alternativa3d var updateBSPOperation:Operation;
private var collisionPrimitiveNearestLengthSqr:Number;
private var collisionPrimitive:PolyPrimitive;
private var addSortOptions:Array;
private var dummyNode:BSPNode;
private var collisionNormal:Point3D;
private var addSort:Array;
private var collisionRadius:Number;
private var collisionOffset:Number;
private var operations:Array;
alternativa3d var addPrimitives:Array;
alternativa3d var calculateBSPOperation:Operation;
private var collisionPlanes:Array;
private var collisionPlanePoint:Point3D;
private var addSplitQualitySortOptions:Array;
private var collisionSource:Point3D;
private static var pointOffsets:Array = new Array();
public function Scene3D(){
updateBSPOperation = new Operation("updateBSP", this);
calculateBSPOperation = new Operation("calculateBSP", this, calculateBSP, Operation.SCENE_CALCULATE_BSP);
clearPrimitivesOperation = new Operation("clearPrimitives", this, clearPrimitives, Operation.SCENE_CLEAR_PRIMITIVES);
operations = new Array();
operationSort = ["priority", "level"];
operationSortOptions = [Array.NUMERIC, Array.NUMERIC];
dummyOperation = new Operation("removed", this);
changedPrimitives = new Set();
childPrimitives = new Set();
addPrimitives = new Array();
addSort = ["mobile"];
addSortOptions = [(Array.NUMERIC | Array.DESCENDING)];
addSplitQualitySort = ["mobile", "splitQuality"];
addSplitQualitySortOptions = [(Array.NUMERIC | Array.DESCENDING), (Array.NUMERIC | Array.DESCENDING)];
removeNodes = new Set();
dummyNode = new BSPNode();
collisionDestination = new Point3D();
collisionPlanes = new Array();
collisionPlanePoint = new Point3D();
collisionPrimitivePoint = new Point3D();
collisionPoint = new Point3D();
collisionNormal = new Point3D();
super();
updateBSPOperation.addSequel(calculateBSPOperation);
calculateBSPOperation.addSequel(clearPrimitivesOperation);
}
private function childBSP(_arg1:BSPNode):void{
var _local2:PolyPrimitive;
var _local3:*;
if (((!((_arg1 == null))) && (!((_arg1 == dummyNode))))){
_local2 = _arg1.primitive;
if (_local2 != null){
childPrimitives[_local2] = true;
changedPrimitives[_local2] = true;
_arg1.primitive = null;
_local2.node = null;
} else {
for (_local3 in _arg1.backPrimitives) {
_local2 = _local3;
childPrimitives[_local2] = true;
changedPrimitives[_local2] = true;
_local2.node = null;
};
for (_local3 in _arg1.frontPrimitives) {
_local2 = _local3;
childPrimitives[_local2] = true;
changedPrimitives[_local2] = true;
_local2.node = null;
};
_arg1.backPrimitives = null;
_arg1.frontPrimitives = null;
};
childBSP(_arg1.back);
childBSP(_arg1.front);
_arg1.parent = null;
_arg1.back = null;
_arg1.front = null;
BSPNode.destroyBSPNode(_arg1);
};
}
alternativa3d function removeBSPPrimitive(_arg1:PolyPrimitive):void{
var _local4:*;
var _local5:BSPNode;
var _local2:BSPNode = _arg1.node;
_arg1.node = null;
var _local3:Boolean;
changedPrimitives[_arg1] = true;
if (_local2.primitive == _arg1){
removeNodes[_local2] = true;
_local2.primitive = null;
} else {
if (_local2.frontPrimitives[_arg1]){
delete _local2.frontPrimitives[_arg1];
for (_local4 in _local2.frontPrimitives) {
if (_local3){
_local3 = false;
break;
};
_local3 = true;
};
if (_local4 == null){
_local5 = _local2.back;
_local2.back = _local2.front;
_local2.front = _local5;
_local2.normal.invert();
_local2.offset = -(_local2.offset);
for (_local4 in _local2.backPrimitives) {
if (_local3){
_local3 = false;
break;
};
_local3 = true;
};
if (_local3){
_local2.primitive = _local4;
_local2.mobile = _local2.primitive.mobile;
_local2.frontPrimitives = null;
} else {
_local2.frontPrimitives = _local2.backPrimitives;
if (_arg1.mobile == _local2.mobile){
_local2.mobile = uint.MAX_VALUE;
for (_local4 in _local2.frontPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
};
};
_local2.backPrimitives = null;
} else {
if (((_local3) && ((_local2.backPrimitives == null)))){
_local2.primitive = _local4;
_local2.mobile = _local2.primitive.mobile;
_local2.frontPrimitives = null;
} else {
if (_arg1.mobile == _local2.mobile){
_local2.mobile = uint.MAX_VALUE;
for (_local4 in _local2.backPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
for (_local4 in _local2.frontPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
};
};
};
} else {
delete _local2.backPrimitives[_arg1];
for (_local4 in _local2.backPrimitives) {
break;
};
if (_local4 == null){
for (_local4 in _local2.frontPrimitives) {
if (_local3){
_local3 = false;
break;
};
_local3 = true;
};
if (_local3){
_local2.primitive = _local4;
_local2.mobile = _local2.primitive.mobile;
_local2.frontPrimitives = null;
} else {
if (_arg1.mobile == _local2.mobile){
_local2.mobile = uint.MAX_VALUE;
for (_local4 in _local2.frontPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
};
};
_local2.backPrimitives = null;
} else {
if (_arg1.mobile == _local2.mobile){
_local2.mobile = uint.MAX_VALUE;
for (_local4 in _local2.backPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
for (_local4 in _local2.frontPrimitives) {
_arg1 = _local4;
_local2.mobile = ((_local2.mobile)>_arg1.mobile) ? _arg1.mobile : _local2.mobile;
};
};
};
};
};
}
public function get splitAnalysis():Boolean{
return (_splitAnalysis);
}
private function collectCollisionPlanes(_arg1:BSPNode):void{
var _local2:Number;
var _local3:Number;
var _local4:Point3D;
var _local5:Number;
var _local6:Face;
var _local7:*;
var _local8:CollisionPlane;
if (_arg1 != null){
_local2 = ((((collisionSource.x * _arg1.normal.x) + (collisionSource.y * _arg1.normal.y)) + (collisionSource.z * _arg1.normal.z)) - _arg1.offset);
_local3 = ((((collisionDestination.x * _arg1.normal.x) + (collisionDestination.y * _arg1.normal.y)) + (collisionDestination.z * _arg1.normal.z)) - _arg1.offset);
if (_local2 >= 0){
collectCollisionPlanes(_arg1.front);
if (_local3 < collisionRadius){
_local8 = new CollisionPlane();
_local8.node = _arg1;
_local8.infront = true;
_local8.sourceOffset = _local2;
_local8.destinationOffset = _local3;
collisionPlanes.push(_local8);
collectCollisionPlanes(_arg1.back);
};
} else {
collectCollisionPlanes(_arg1.back);
if (-(_local3) < collisionRadius){
if (_arg1.backPrimitives != null){
_local8 = new CollisionPlane();
_local8.node = _arg1;
_local8.infront = false;
_local8.sourceOffset = -(_local2);
_local8.destinationOffset = -(_local3);
collisionPlanes.push(_local8);
};
collectCollisionPlanes(_arg1.front);
};
};
};
}
private function clearPrimitives():void{
changedPrimitives.clear();
}
private function splitQualityAnalise():void{
var _local1:uint;
var _local5:PolyPrimitive;
var _local6:Point3D;
var _local7:Number;
var _local8:uint;
var _local9:PolyPrimitive;
var _local10:Boolean;
var _local11:Boolean;
var _local12:uint;
var _local13:Point3D;
var _local14:Number;
var _local2:uint = addPrimitives.length;
var _local3:uint;
var _local4:uint;
_local1 = 0;
while (_local1 < _local2) {
_local5 = addPrimitives[_local1];
_local5.splits = 0;
_local5.disbalance = 0;
_local6 = _local5.face.globalNormal;
_local7 = _local5.face.globalOffset;
_local8 = 0;
while (_local8 < _local2) {
if (_local1 != _local8){
_local9 = addPrimitives[_local8];
if (_local5.mobile <= _local9.mobile){
_local10 = false;
_local11 = false;
_local12 = 0;
while (_local12 < _local9.num) {
_local13 = _local9.points[_local12];
_local14 = ((((_local13.x * _local6.x) + (_local13.y * _local6.y)) + (_local13.z * _local6.z)) - _local7);
if (_local14 > planeOffsetTreshold){
if (!_local10){
_local5.disbalance++;
_local10 = true;
};
if (_local11){
_local5.splits++;
break;
};
} else {
if (_local14 < -(planeOffsetTreshold)){
if (!_local11){
_local5.disbalance--;
_local11 = true;
};
if (_local10){
_local5.splits++;
break;
};
};
};
_local12++;
};
};
};
_local8++;
};
_local5.disbalance = ((_local5.disbalance)>0) ? _local5.disbalance : -(_local5.disbalance);
_local3 = ((_local3)>_local5.splits) ? _local3 : _local5.splits;
_local4 = ((_local4)>_local5.disbalance) ? _local4 : _local5.disbalance;
_local1++;
};
_local1 = 0;
while (_local1 < _local2) {
_local5 = addPrimitives[_local1];
_local5.splitQuality = ((((1 - _splitBalance) * _local5.splits) / _local3) + ((_splitBalance * _local5.disbalance) / _local4));
_local1++;
};
}
public function set splitAnalysis(_arg1:Boolean):void{
if (_splitAnalysis != _arg1){
_splitAnalysis = _arg1;
addOperation(updateBSPOperation);
};
}
private function assemblePrimitive(_arg1:PolyPrimitive):void{
if (((!((_arg1.sibling == null))) && (canAssemble(_arg1.sibling)))){
assemblePrimitive(_arg1.parent);
_arg1.sibling.sibling = null;
_arg1.sibling.parent = null;
PolyPrimitive.destroyPolyPrimitive(_arg1.sibling);
_arg1.sibling = null;
_arg1.parent.fragment1 = null;
_arg1.parent.fragment2 = null;
_arg1.parent = null;
PolyPrimitive.destroyPolyPrimitive(_arg1);
} else {
addPrimitives.push(_arg1);
};
}
public function drawBSPNode(_arg1:BSPNode, _arg2:Sprite, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local8:PolyPrimitive;
var _local6:Shape = new Shape();
_arg2.addChild(_local6);
_local6.x = _arg3;
_local6.y = _arg4;
var _local7:uint = 0xFF0000;
if (_arg1.primitive != null){
_local8 = _arg1.primitive;
} else {
if (_arg1.frontPrimitives != null){
_local8 = _arg1.frontPrimitives.peek();
};
};
if (_local8 != null){
if (((!((_local8.face._surface == null))) && (!((_local8.face._surface._material == null))))){
if ((_local8.face._surface._material is FillMaterial)){
_local7 = FillMaterial(_local8.face._surface._material)._color;
};
if ((_local8.face._surface._material is WireMaterial)){
_local7 = WireMaterial(_local8.face._surface._material)._color;
};
if ((_local8.face._surface._material is TextureMaterial)){
_local7 = TextureMaterial(_local8.face._surface._material).texture.bitmapData.getPixel(0, 0);
};
};
};
if (_arg1 == dummyNode){
_local7 = 0xFF00FF;
};
_local6.graphics.beginFill(_local7);
_local6.graphics.drawCircle(0, 0, 3);
_local6.graphics.endFill();
var _local9:Number = 100;
var _local10:Number = 20;
if (_arg1.back != null){
_arg2.graphics.lineStyle(0, 0x660000);
_arg2.graphics.moveTo(_arg3, _arg4);
_arg2.graphics.lineTo((_arg3 - (_local9 * _arg5)), (_arg4 + _local10));
drawBSPNode(_arg1.back, _arg2, (_arg3 - (_local9 * _arg5)), (_arg4 + _local10), (_arg5 * 0.8));
};
if (_arg1.front != null){
_arg2.graphics.lineStyle(0, 0x6600);
_arg2.graphics.moveTo(_arg3, _arg4);
_arg2.graphics.lineTo((_arg3 + (_local9 * _arg5)), (_arg4 + _local10));
drawBSPNode(_arg1.front, _arg2, (_arg3 + (_local9 * _arg5)), (_arg4 + _local10), (_arg5 * 0.8));
};
}
private function calculateCollisionWithPrimitive(_arg1:PolyPrimitive):void{
var _local7:Point3D;
var _local8:Point3D;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local2:uint = _arg1.num;
var _local3:Array = _arg1.points;
var _local4:Point3D = _arg1.face.globalNormal;
var _local5:Boolean;
var _local6:uint;
while (_local6 < _local2) {
_local7 = _local3[_local6];
_local8 = _local3[((_local6)<(_local2 - 1)) ? (_local6 + 1) : 0];
_local9 = (_local8.x - _local7.x);
_local10 = (_local8.y - _local7.y);
_local11 = (_local8.z - _local7.z);
_local12 = (collisionPlanePoint.x - _local7.x);
_local13 = (collisionPlanePoint.y - _local7.y);
_local14 = (collisionPlanePoint.z - _local7.z);
_local15 = ((_local13 * _local11) - (_local14 * _local10));
_local16 = ((_local14 * _local9) - (_local12 * _local11));
_local17 = ((_local12 * _local10) - (_local13 * _local9));
if ((((_local15 * _local4.x) + (_local16 * _local4.y)) + (_local17 * _local4.z)) > 0){
_local5 = false;
_local18 = (((_local9 * _local9) + (_local10 * _local10)) + (_local11 * _local11));
_local19 = ((((_local15 * _local15) + (_local16 * _local16)) + (_local17 * _local17)) / _local18);
if (_local19 < collisionPrimitiveNearestLengthSqr){
_local20 = Math.sqrt(_local18);
_local21 = (_local9 / _local20);
_local22 = (_local10 / _local20);
_local23 = (_local11 / _local20);
_local24 = (((_local21 * _local12) + (_local22 * _local13)) + (_local23 * _local14));
if (_local24 < 0){
_local25 = (((_local12 * _local12) + (_local13 * _local13)) + (_local14 * _local14));
if (_local25 < collisionPrimitiveNearestLengthSqr){
collisionPrimitiveNearestLengthSqr = _local25;
collisionPrimitivePoint.x = _local7.x;
collisionPrimitivePoint.y = _local7.y;
collisionPrimitivePoint.z = _local7.z;
collisionPrimitiveNearest = _arg1;
};
} else {
if (_local24 > _local20){
_local12 = (collisionPlanePoint.x - _local8.x);
_local13 = (collisionPlanePoint.y - _local8.y);
_local14 = (collisionPlanePoint.z - _local8.z);
_local25 = (((_local12 * _local12) + (_local13 * _local13)) + (_local14 * _local14));
if (_local25 < collisionPrimitiveNearestLengthSqr){
collisionPrimitiveNearestLengthSqr = _local25;
collisionPrimitivePoint.x = _local8.x;
collisionPrimitivePoint.y = _local8.y;
collisionPrimitivePoint.z = _local8.z;
collisionPrimitiveNearest = _arg1;
};
} else {
collisionPrimitiveNearestLengthSqr = _local19;
collisionPrimitivePoint.x = (_local7.x + (_local21 * _local24));
collisionPrimitivePoint.y = (_local7.y + (_local22 * _local24));
collisionPrimitivePoint.z = (_local7.z + (_local23 * _local24));
collisionPrimitiveNearest = _arg1;
};
};
};
};
_local6++;
};
if (_local5){
collisionPrimitive = _arg1;
};
}
private function removeBSPNode(_arg1:BSPNode):BSPNode{
var _local2:BSPNode;
if (_arg1 != null){
_arg1.back = removeBSPNode(_arg1.back);
_arg1.front = removeBSPNode(_arg1.front);
if (!removeNodes[_arg1]){
_local2 = _arg1;
if (_arg1.back != null){
if (_arg1.back != dummyNode){
_arg1.back.parent = _arg1;
} else {
_arg1.back = null;
};
};
if (_arg1.front != null){
if (_arg1.front != dummyNode){
_arg1.front.parent = _arg1;
} else {
_arg1.front = null;
};
};
} else {
if (_arg1.back == null){
if (_arg1.front != null){
_local2 = _arg1.front;
_arg1.front = null;
};
} else {
if (_arg1.front == null){
_local2 = _arg1.back;
_arg1.back = null;
} else {
childBSP(_arg1.back);
childBSP(_arg1.front);
_local2 = dummyNode;
_arg1.back = null;
_arg1.front = null;
};
};
delete removeNodes[_arg1];
_arg1.parent = null;
BSPNode.destroyBSPNode(_arg1);
};
};
return (_local2);
}
private function canAssemble(_arg1:PolyPrimitive):Boolean{
var _local2:PolyPrimitive;
var _local3:PolyPrimitive;
var _local4:Boolean;
var _local5:Boolean;
if (childPrimitives[_arg1]){
delete childPrimitives[_arg1];
return (true);
};
_local2 = _arg1.fragment1;
_local3 = _arg1.fragment2;
if (_local2 != null){
_local4 = canAssemble(_local2);
_local5 = canAssemble(_local3);
if (((_local4) && (_local5))){
_local2.parent = null;
_local3.parent = null;
_local2.sibling = null;
_local3.sibling = null;
_arg1.fragment1 = null;
_arg1.fragment2 = null;
PolyPrimitive.destroyPolyPrimitive(_local2);
PolyPrimitive.destroyPolyPrimitive(_local3);
return (true);
};
if (_local4){
addPrimitives.push(_local2);
};
if (_local5){
addPrimitives.push(_local3);
};
};
return (false);
}
alternativa3d function removeOperation(_arg1:Operation):void{
if (_arg1.queued){
operations[operations.indexOf(_arg1)] = dummyOperation;
_arg1.queued = false;
};
}
public function set root(_arg1:Object3D):void{
if (_root != _arg1){
if (_arg1 != null){
if (_arg1._parent != null){
_arg1._parent._children.remove(_arg1);
} else {
if (((!((_arg1._scene == null))) && ((_arg1._scene._root == _arg1)))){
_arg1._scene.root = null;
};
};
_arg1.setParent(null);
_arg1.setScene(this);
_arg1.setLevel(0);
};
if (_root != null){
_root.setParent(null);
_root.setScene(null);
};
_root = _arg1;
} else {
if (_root != null){
throw (new Scene3DRootExistError(_root, this));
};
};
}
alternativa3d function addOperation(_arg1:Operation):void{
if (!_arg1.queued){
operations.push(_arg1);
_arg1.queued = true;
};
}
public function set splitBalance(_arg1:Number):void{
_arg1 = ((_arg1)<0) ? 0 : ((_arg1)>1) ? 1 : _arg1;
if (_splitBalance != _arg1){
_splitBalance = _arg1;
if (_splitAnalysis){
addOperation(updateBSPOperation);
};
};
}
private function addBSP(_arg1:BSPNode, _arg2:PolyPrimitive):void{
var _local3:Point3D;
var _local4:Point3D;
var _local5:*;
var _local6:PolyPrimitive;
var _local7:Array;
var _local8:Array;
var _local9:Boolean;
var _local10:Boolean;
var _local11:uint;
var _local12:Number;
var _local13:PolyPrimitive;
var _local14:PolyPrimitive;
var _local15:Boolean;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Point;
if (_arg2.mobile < _arg1.mobile){
if (_arg1.primitive != null){
childPrimitives[_arg1.primitive] = true;
changedPrimitives[_arg1.primitive] = true;
_arg1.primitive.node = null;
} else {
for (_local5 in _arg1.backPrimitives) {
_local6 = _local5;
childPrimitives[_local6] = true;
changedPrimitives[_local6] = true;
_local6.node = null;
};
for (_local5 in _arg1.frontPrimitives) {
_local6 = _local5;
childPrimitives[_local6] = true;
changedPrimitives[_local6] = true;
_local6.node = null;
};
};
childBSP(_arg1.back);
childBSP(_arg1.front);
assembleChildPrimitives();
if (_splitAnalysis){
splitQualityAnalise();
addPrimitives.sortOn(addSplitQualitySort, addSplitQualitySortOptions);
} else {
addPrimitives.sortOn(addSort, addSortOptions);
};
_arg1.primitive = _arg2;
changedPrimitives[_arg2] = true;
_arg2.node = _arg1;
_arg1.normal.copy(_arg2.face.globalNormal);
_arg1.offset = _arg2.face.globalOffset;
_arg1.mobile = _arg2.mobile;
_arg1.backPrimitives = null;
_arg1.frontPrimitives = null;
_arg1.back = null;
_arg1.front = null;
} else {
_local4 = _arg1.normal;
_local7 = _arg2.points;
_local8 = _arg2.uvs;
_local9 = false;
_local10 = false;
_local11 = 0;
while (_local11 < _arg2.num) {
_local3 = _local7[_local11];
_local12 = ((((_local3.x * _local4.x) + (_local3.y * _local4.y)) + (_local3.z * _local4.z)) - _arg1.offset);
if (_local12 > planeOffsetTreshold){
_local9 = true;
} else {
if (_local12 < -(planeOffsetTreshold)){
_local10 = true;
};
};
pointOffsets[_local11] = _local12;
_local11++;
};
if (((!(_local9)) && (!(_local10)))){
_arg2.node = _arg1;
if (_arg1.primitive != null){
_arg1.frontPrimitives = new Set(true);
_arg1.frontPrimitives[_arg1.primitive] = true;
_arg1.primitive = null;
};
if (Point3D.dot(_arg2.face.globalNormal, _local4) > 0){
_arg1.frontPrimitives[_arg2] = true;
} else {
if (_arg1.backPrimitives == null){
_arg1.backPrimitives = new Set(true);
};
_arg1.backPrimitives[_arg2] = true;
};
changedPrimitives[_arg2] = true;
} else {
if (!_local10){
if (_arg1.front == null){
_arg1.front = BSPNode.createBSPNode(_arg2);
_arg1.front.parent = _arg1;
changedPrimitives[_arg2] = true;
} else {
addBSP(_arg1.front, _arg2);
};
} else {
if (!_local9){
if (_arg1.back == null){
_arg1.back = BSPNode.createBSPNode(_arg2);
_arg1.back.parent = _arg1;
changedPrimitives[_arg2] = true;
} else {
addBSP(_arg1.back, _arg2);
};
} else {
_local13 = PolyPrimitive.createPolyPrimitive();
_local14 = PolyPrimitive.createPolyPrimitive();
_local15 = true;
_local16 = pointOffsets[0];
_local11 = 0;
while (_local11 < _arg2.num) {
_local17 = ((_local11)==(_arg2.num - 1)) ? 0 : (_local11 + 1);
_local18 = pointOffsets[_local17];
if (_local16 > planeOffsetTreshold){
_local14.points.push(_local7[_local11]);
_local14.uvs.push(_arg2.uvs[_local11]);
} else {
if (_local16 < -(planeOffsetTreshold)){
_local13.points.push(_local7[_local11]);
_local13.uvs.push(_arg2.uvs[_local11]);
} else {
_local13.points.push(_local7[_local11]);
_local14.points.push(_local7[_local11]);
_local13.uvs.push(_arg2.uvs[_local11]);
_local14.uvs.push(_arg2.uvs[_local11]);
};
};
if ((((((_local16 > planeOffsetTreshold)) && ((_local18 < -(planeOffsetTreshold))))) || ((((_local16 < -(planeOffsetTreshold))) && ((_local18 > planeOffsetTreshold)))))){
_local19 = (_local16 / (_local16 - _local18));
_local3 = Point3D.interpolate(_local7[_local11], _local7[_local17], _local19);
_local13.points.push(_local3);
_local14.points.push(_local3);
if (_arg2.face.uvMatrix != null){
_local20 = Point.interpolate(_local8[_local17], _local8[_local11], _local19);
} else {
_local20 = null;
};
_local13.uvs.push(_local20);
_local14.uvs.push(_local20);
if (_local15){
_arg2.splitTime1 = _local19;
_local15 = false;
} else {
_arg2.splitTime2 = _local19;
};
};
_local16 = _local18;
_local11++;
};
_local13.num = _local13.points.length;
_local14.num = _local14.points.length;
_local13.mobile = _arg2.mobile;
_local14.mobile = _arg2.mobile;
_local13.face = _arg2.face;
_local14.face = _arg2.face;
_local13.parent = _arg2;
_local14.parent = _arg2;
_local13.sibling = _local14;
_local14.sibling = _local13;
_arg2.fragment1 = _local13;
_arg2.fragment2 = _local14;
if (_arg1.back == null){
_arg1.back = BSPNode.createBSPNode(_local13);
_arg1.back.parent = _arg1;
changedPrimitives[_local13] = true;
} else {
addBSP(_arg1.back, _local13);
};
if (_arg1.front == null){
_arg1.front = BSPNode.createBSPNode(_local14);
_arg1.front.parent = _arg1;
changedPrimitives[_local14] = true;
} else {
addBSP(_arg1.front, _local14);
};
};
};
};
};
}
public function get root():Object3D{
return (_root);
}
private function calculateCollisionWithPlane(_arg1:CollisionPlane):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
collisionPlanePoint.copy(collisionSource);
if (_arg1.sourceOffset <= collisionRadius){
if (_arg1.infront){
collisionPlanePoint.x = (collisionPlanePoint.x - (_arg1.node.normal.x * _arg1.sourceOffset));
collisionPlanePoint.y = (collisionPlanePoint.y - (_arg1.node.normal.y * _arg1.sourceOffset));
collisionPlanePoint.z = (collisionPlanePoint.z - (_arg1.node.normal.z * _arg1.sourceOffset));
} else {
collisionPlanePoint.x = (collisionPlanePoint.x + (_arg1.node.normal.x * _arg1.sourceOffset));
collisionPlanePoint.y = (collisionPlanePoint.y + (_arg1.node.normal.y * _arg1.sourceOffset));
collisionPlanePoint.z = (collisionPlanePoint.z + (_arg1.node.normal.z * _arg1.sourceOffset));
};
} else {
_local3 = ((_arg1.sourceOffset - collisionRadius) / (_arg1.sourceOffset - _arg1.destinationOffset));
collisionPlanePoint.x = (collisionSource.x + (collisionVector.x * _local3));
collisionPlanePoint.y = (collisionSource.y + (collisionVector.y * _local3));
collisionPlanePoint.z = (collisionSource.z + (collisionVector.z * _local3));
if (_arg1.infront){
collisionPlanePoint.x = (collisionPlanePoint.x - (_arg1.node.normal.x * collisionRadius));
collisionPlanePoint.y = (collisionPlanePoint.y - (_arg1.node.normal.y * collisionRadius));
collisionPlanePoint.z = (collisionPlanePoint.z - (_arg1.node.normal.z * collisionRadius));
} else {
collisionPlanePoint.x = (collisionPlanePoint.x + (_arg1.node.normal.x * collisionRadius));
collisionPlanePoint.y = (collisionPlanePoint.y + (_arg1.node.normal.y * collisionRadius));
collisionPlanePoint.z = (collisionPlanePoint.z + (_arg1.node.normal.z * collisionRadius));
};
};
collisionPrimitiveNearestLengthSqr = Number.MAX_VALUE;
collisionPrimitiveNearest = null;
if (_arg1.infront){
if (_arg1.node.primitive != null){
calculateCollisionWithPrimitive(_arg1.node.primitive);
} else {
for (_local2 in _arg1.node.frontPrimitives) {
calculateCollisionWithPrimitive(_local2);
if (collisionPrimitive != null){
break;
};
};
};
} else {
for (_local2 in _arg1.node.backPrimitives) {
calculateCollisionWithPrimitive(_local2);
if (collisionPrimitive != null){
break;
};
};
};
if (collisionPrimitive != null){
if (_arg1.infront){
collisionNormal.x = _arg1.node.normal.x;
collisionNormal.y = _arg1.node.normal.y;
collisionNormal.z = _arg1.node.normal.z;
collisionOffset = _arg1.node.offset;
} else {
collisionNormal.x = -(_arg1.node.normal.x);
collisionNormal.y = -(_arg1.node.normal.y);
collisionNormal.z = -(_arg1.node.normal.z);
collisionOffset = -(_arg1.node.offset);
};
collisionPoint.x = collisionPlanePoint.x;
collisionPoint.y = collisionPlanePoint.y;
collisionPoint.z = collisionPlanePoint.z;
} else {
_local4 = (collisionSource.x - collisionPrimitivePoint.x);
_local5 = (collisionSource.y - collisionPrimitivePoint.y);
_local6 = (collisionSource.z - collisionPrimitivePoint.z);
if ((((_local4 * collisionVector.x) + (_local5 * collisionVector.y)) + (_local6 * collisionVector.z)) <= 0){
_local7 = Math.sqrt((((collisionVector.x * collisionVector.x) + (collisionVector.y * collisionVector.y)) + (collisionVector.z * collisionVector.z)));
_local8 = (-(collisionVector.x) / _local7);
_local9 = (-(collisionVector.y) / _local7);
_local10 = (-(collisionVector.z) / _local7);
_local11 = (((_local4 * _local4) + (_local5 * _local5)) + (_local6 * _local6));
_local12 = (((_local4 * _local8) + (_local5 * _local9)) + (_local6 * _local10));
_local13 = (((collisionRadius * collisionRadius) - _local11) + (_local12 * _local12));
if (_local13 > 0){
_local14 = (_local12 - Math.sqrt(_local13));
if (_local14 < _local7){
collisionPoint.x = collisionPrimitivePoint.x;
collisionPoint.y = collisionPrimitivePoint.y;
collisionPoint.z = collisionPrimitivePoint.z;
_local15 = Math.sqrt(_local11);
collisionNormal.x = (_local4 / _local15);
collisionNormal.y = (_local5 / _local15);
collisionNormal.z = (_local6 / _local15);
collisionOffset = (((collisionPoint.x * collisionNormal.x) + (collisionPoint.y * collisionNormal.y)) + (collisionPoint.z * collisionNormal.z));
collisionPrimitive = collisionPrimitiveNearest;
};
};
};
};
}
public function calculate():void{
var _local1:Operation;
var _local2:uint;
var _local3:uint;
if (operations[0] != undefined){
_local2 = operations.length;
_local3 = 0;
while (_local3 < _local2) {
_local1 = operations[_local3];
_local1.collectSequels(operations);
_local3++;
};
operations.sortOn(operationSort, operationSortOptions);
_local2 = operations.length;
_local3 = 0;
while (_local3 < _local2) {
_local1 = operations[_local3];
if (_local1.method != null){
_local1.method();
};
_local3++;
};
_local3 = 0;
while (_local3 < _local2) {
_local1 = operations.pop();
_local1.queued = false;
_local3++;
};
};
}
public function get splitBalance():Number{
return (_splitBalance);
}
public function drawBSP(_arg1:Sprite):void{
_arg1.graphics.clear();
while (_arg1.numChildren > 0) {
_arg1.removeChildAt(0);
};
if (bsp != null){
drawBSPNode(bsp, _arg1, 0, 0, 1);
};
}
public function calculateCollision(_arg1:Point3D, _arg2:Point3D, _arg3:Number=0):Collision{
var _local4:CollisionPlane;
var _local5:Collision;
collisionSource = _arg1;
collisionVector = _arg2;
collisionDestination.x = (collisionSource.x + collisionVector.x);
collisionDestination.y = (collisionSource.y + collisionVector.y);
collisionDestination.z = (collisionSource.z + collisionVector.z);
collisionRadius = _arg3;
collectCollisionPlanes(bsp);
collisionPlanes.sortOn("sourceOffset", (Array.NUMERIC | Array.DESCENDING));
while (((!(((_local4 = collisionPlanes.pop()) == null))) && ((collisionPrimitive == null)))) {
calculateCollisionWithPlane(_local4);
};
if (collisionPrimitive != null){
_local5 = new Collision();
_local5.face = collisionPrimitive.face;
_local5.normal = collisionNormal.clone();
_local5.point = collisionPoint.clone();
_local5.offset = collisionOffset;
};
collisionSource = null;
collisionVector = null;
collisionPrimitive = null;
var _local6:uint = collisionPlanes.length;
var _local7:uint;
while (_local7 < _local6) {
collisionPlanes.pop();
_local7++;
};
return (_local5);
}
private function assembleChildPrimitives():void{
var _local1:PolyPrimitive;
while ((_local1 = childPrimitives.take()) != null) {
assemblePrimitive(_local1);
};
}
private function calculateBSP():void{
var _local1:*;
var _local2:PolyPrimitive;
var _local3:BSPNode;
var _local4:BSPNode;
var _local5:BSPNode;
var _local6:BSPNode;
if (updateBSPOperation.queued){
removeNodes.clear();
childBSP(bsp);
bsp = null;
assembleChildPrimitives();
} else {
if (!removeNodes.isEmpty()){
while ((_local3 = removeNodes.peek()) != null) {
_local4 = _local3;
while ((_local3 = _local3.parent) != null) {
if (removeNodes[_local3]){
_local4 = _local3;
};
};
_local5 = _local4.parent;
_local6 = removeBSPNode(_local4);
if (_local6 == dummyNode){
_local6 = null;
};
if (_local5 != null){
if (_local5.front == _local4){
_local5.front = _local6;
} else {
_local5.back = _local6;
};
} else {
bsp = _local6;
};
if (_local6 != null){
_local6.parent = _local5;
};
};
assembleChildPrimitives();
};
};
if (addPrimitives[0] != undefined){
if (_splitAnalysis){
splitQualityAnalise();
addPrimitives.sortOn(addSplitQualitySort, addSplitQualitySortOptions);
} else {
addPrimitives.sortOn(addSort, addSortOptions);
};
if (bsp == null){
_local2 = addPrimitives.pop();
bsp = BSPNode.createBSPNode(_local2);
changedPrimitives[_local2] = true;
};
while ((_local2 = addPrimitives.pop()) != null) {
addBSP(bsp, _local2);
};
};
}
}
}//package alternativa.engine3d.core
Section 9
//Surface (alternativa.engine3d.core.Surface)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import alternativa.engine3d.errors.*;
import alternativa.engine3d.*;
public class Surface {
alternativa3d var changeFacesOperation:Operation;
alternativa3d var _material:SurfaceMaterial;
alternativa3d var changeMaterialOperation:Operation;
alternativa3d var _faces:Set;
alternativa3d var _mesh:Mesh;
public function Surface(){
changeFacesOperation = new Operation("changeFaces", this);
changeMaterialOperation = new Operation("changeMaterial", this);
_faces = new Set();
super();
}
public function toString():String{
var _local4:*;
var _local5:Face;
var _local1:uint = _faces.length;
var _local2:String = (("[Surface ID:" + id) + ((_local1)>0) ? " faces:" : "");
var _local3:uint;
for (_local4 in _faces) {
_local5 = _local4;
_local2 = (_local2 + (_local5.id + ((_local3)<(_local1 - 1)) ? ", " : ""));
_local3++;
};
_local2 = (_local2 + "]");
return (_local2);
}
alternativa3d function removeFromScene(_arg1:Scene3D):void{
_arg1.removeOperation(changeFacesOperation);
_arg1.removeOperation(changeMaterialOperation);
if (_material != null){
_material.removeFromScene(_arg1);
};
}
public function get material():SurfaceMaterial{
return (_material);
}
public function removeFace(_arg1:Object):void{
var _local2 = (_arg1 is Face);
if (_mesh == null){
throw (new SurfaceNotInMeshError(this));
};
if (_arg1 == null){
throw (new FaceNullError(null, this));
};
if (_local2){
if (Face(_arg1)._mesh != _mesh){
throw (new FaceNotFoundError(_arg1, this._mesh, this));
};
} else {
if (_mesh._faces[_arg1] == undefined){
throw (new FaceNotFoundError(_arg1, this._mesh, this));
};
if (!(_mesh._faces[_arg1] is Face)){
throw (new FaceInvalidIDError(_arg1, null, this));
};
};
var _local3:Face = (_local2) ? Face(_arg1) : _mesh._faces[_arg1];
if (!_faces.has(_local3)){
throw (new FaceNotFoundError(_local3, null, this));
};
_faces.remove(_local3);
_local3.removeFromSurface(this);
_mesh.addOperationToScene(changeFacesOperation);
}
alternativa3d function addToMesh(_arg1:Mesh):void{
if (_material != null){
_material.addToMesh(_arg1);
};
_mesh = _arg1;
}
public function get id():Object{
return (((_mesh)!=null) ? _mesh.getSurfaceId(this) : null);
}
public function get mesh():Mesh{
return (_mesh);
}
alternativa3d function removeFaces():void{
var _local1:*;
var _local2:Face;
for (_local1 in _faces) {
_local2 = _local1;
_faces.remove(_local2);
_local2.removeFromSurface(this);
};
}
public function set material(_arg1:SurfaceMaterial):void{
if (_material != _arg1){
if (_material != null){
_material.removeFromSurface(this);
if (_mesh != null){
_material.removeFromMesh(_mesh);
if (_mesh._scene != null){
_material.removeFromScene(_mesh._scene);
};
};
};
if (_arg1 != null){
if (_arg1._surface != null){
_arg1._surface.material = null;
};
_arg1.addToSurface(this);
if (_mesh != null){
_arg1.addToMesh(_mesh);
if (_mesh._scene != null){
_arg1.addToScene(_mesh._scene);
};
};
};
_material = _arg1;
if (_mesh != null){
_mesh.addOperationToScene(changeMaterialOperation);
};
};
}
public function get faces():Set{
return (_faces.clone());
}
alternativa3d function removeFromMesh(_arg1:Mesh):void{
if (_material != null){
_material.removeFromMesh(_arg1);
};
_mesh = null;
}
public function addFace(_arg1:Object):void{
var _local2 = (_arg1 is Face);
if (_mesh == null){
throw (new SurfaceNotInMeshError(this));
};
if (_arg1 == null){
throw (new FaceNullError(null, this));
};
if (_local2){
if (Face(_arg1)._mesh != _mesh){
throw (new FaceNotFoundError(_arg1, this._mesh, this));
};
} else {
if (_mesh._faces[_arg1] == undefined){
throw (new FaceNotFoundError(_arg1, this._mesh, this));
};
if (!(_mesh._faces[_arg1] is Face)){
throw (new FaceInvalidIDError(_arg1, null, this));
};
};
var _local3:Face = (_local2) ? Face(_arg1) : _mesh._faces[_arg1];
if (_faces.has(_local3)){
throw (new FaceExistsError(_local3, null, null, this));
};
if (_local3._surface != null){
_local3._surface._faces.remove(_local3);
_local3.removeFromSurface(_local3._surface);
};
_faces.add(_local3);
_local3.addToSurface(this);
_mesh.addOperationToScene(changeFacesOperation);
}
alternativa3d function addToScene(_arg1:Scene3D):void{
if (_material != null){
_material.addToScene(_arg1);
};
}
}
}//package alternativa.engine3d.core
Section 10
//Vertex (alternativa.engine3d.core.Vertex)
package alternativa.engine3d.core {
import alternativa.types.*;
import alternativa.engine3d.*;
public final class Vertex {
alternativa3d var _mesh:Mesh;
alternativa3d var changeCoordsOperation:Operation;
alternativa3d var globalCoords:Point3D;
alternativa3d var calculateCoordsOperation:Operation;
alternativa3d var _faces:Set;
alternativa3d var _coords:Point3D;
public function Vertex(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
changeCoordsOperation = new Operation("changeCoords", this);
calculateCoordsOperation = new Operation("calculateCoords", this, calculateCoords, Operation.VERTEX_CALCULATE_COORDS);
_faces = new Set();
globalCoords = new Point3D();
super();
_coords = new Point3D(_arg1, _arg2, _arg3);
changeCoordsOperation.addSequel(calculateCoordsOperation);
}
alternativa3d function addToFace(_arg1:Face):void{
changeCoordsOperation.addSequel(_arg1.calculateUVOperation);
changeCoordsOperation.addSequel(_arg1.calculateNormalOperation);
_faces.add(_arg1);
}
alternativa3d function removeFromFace(_arg1:Face):void{
changeCoordsOperation.removeSequel(_arg1.calculateUVOperation);
changeCoordsOperation.removeSequel(_arg1.calculateNormalOperation);
_faces.remove(_arg1);
}
alternativa3d function addToMesh(_arg1:Mesh):void{
_arg1.changeCoordsOperation.addSequel(calculateCoordsOperation);
_arg1.changeRotationOrScaleOperation.addSequel(calculateCoordsOperation);
_mesh = _arg1;
}
public function get id():Object{
return (((_mesh)!=null) ? _mesh.getVertexId(this) : null);
}
public function get coords():Point3D{
return (_coords.clone());
}
alternativa3d function removeFromMesh(_arg1:Mesh):void{
var _local2:*;
var _local3:Face;
_arg1.changeCoordsOperation.removeSequel(calculateCoordsOperation);
_arg1.changeRotationOrScaleOperation.removeSequel(calculateCoordsOperation);
for (_local2 in _faces) {
_local3 = _local2;
_arg1.removeFace(_local3);
};
_mesh = null;
}
private function calculateCoords():void{
globalCoords.copy(_coords);
globalCoords.transform(_mesh.transformation);
}
alternativa3d function removeFromScene(_arg1:Scene3D):void{
_arg1.removeOperation(calculateCoordsOperation);
_arg1.removeOperation(changeCoordsOperation);
}
public function toString():String{
return ((((((((("[Vertex ID:" + id) + " ") + _coords.x.toFixed(2)) + ", ") + _coords.y.toFixed(2)) + ", ") + _coords.z.toFixed(2)) + "]"));
}
public function get mesh():Mesh{
return (_mesh);
}
public function set x(_arg1:Number):void{
if (_coords.x != _arg1){
_coords.x = _arg1;
if (_mesh != null){
_mesh.addOperationToScene(changeCoordsOperation);
};
};
}
public function set y(_arg1:Number):void{
if (_coords.y != _arg1){
_coords.y = _arg1;
if (_mesh != null){
_mesh.addOperationToScene(changeCoordsOperation);
};
};
}
public function set z(_arg1:Number):void{
if (_coords.z != _arg1){
_coords.z = _arg1;
if (_mesh != null){
_mesh.addOperationToScene(changeCoordsOperation);
};
};
}
public function get faces():Set{
return (_faces.clone());
}
public function get x():Number{
return (_coords.x);
}
public function get y():Number{
return (_coords.y);
}
public function get z():Number{
return (_coords.z);
}
public function set coords(_arg1:Point3D):void{
if (!_coords.equals(_arg1)){
_coords.copy(_arg1);
if (_mesh != null){
_mesh.addOperationToScene(changeCoordsOperation);
};
};
}
alternativa3d function addToScene(_arg1:Scene3D):void{
_arg1.addOperation(calculateCoordsOperation);
}
}
}//package alternativa.engine3d.core
Section 11
//Skin (alternativa.engine3d.display.Skin)
package alternativa.engine3d.display {
import alternativa.engine3d.core.*;
import alternativa.engine3d.materials.*;
import flash.display.*;
import alternativa.engine3d.*;
public class Skin extends Sprite {
alternativa3d var materialOperation:Operation;
alternativa3d var nextSkin:Skin;
alternativa3d var face:Face;
alternativa3d var camera:Camera3D;
private var material:SurfaceMaterial;
alternativa3d var _primitive:PolyPrimitive;
alternativa3d var alphaOperation:Operation;
alternativa3d var redrawOperation:Operation;
alternativa3d var blendModeOperation:Operation;
alternativa3d var gfx:Graphics;
private static var collector:Array = new Array();
public function Skin(){
materialOperation = new Operation("material", this, changeMaterial, Operation.SKIN_DRAW);
redrawOperation = new Operation("redraw", this, redraw, Operation.SKIN_DRAW);
alphaOperation = new Operation("alpha", this, changeAlpha, Operation.SKIN_DRAW);
blendModeOperation = new Operation("blendMode", this, changeBlendMode, Operation.SKIN_DRAW);
gfx = graphics;
super();
}
alternativa3d function draw(_arg1:PolyPrimitive):void{
if (((!((_primitive == _arg1))) || (!((face == _arg1.face))))){
if (_primitive != null){
face.changeMaterialOperation.removeSequel(materialOperation);
face.calculateUVOperation.removeSequel(redrawOperation);
if (material != null){
material.alphaOperation.removeSequel(alphaOperation);
material.drawParamsOperation.removeSequel(redrawOperation);
material.clear(this);
};
material = null;
face = null;
};
_primitive = _arg1;
if (_arg1 != null){
face = _arg1.face;
face.changeMaterialOperation.addSequel(materialOperation);
face.calculateUVOperation.addSequel(redrawOperation);
material = ((face._surface)!=null) ? face._surface._material : null;
if (material != null){
material.alphaOperation.addSequel(alphaOperation);
material.drawParamsOperation.addSequel(redrawOperation);
material.draw(this);
alpha = material._alpha;
blendMode = material._blendMode;
};
};
} else {
if (((((!((material == null))) && (!(redrawOperation.queued)))) && (!(materialOperation.queued)))){
material.clear(this);
material.draw(this);
};
};
}
private function changeBlendMode():void{
if (material != null){
blendMode = material._blendMode;
};
}
private function changeAlpha():void{
if (material != null){
alpha = material._alpha;
};
}
private function redraw():void{
if (material != null){
material.clear(this);
material.draw(this);
};
}
private function changeMaterial():void{
if (material != null){
material.alphaOperation.removeSequel(alphaOperation);
material.drawParamsOperation.removeSequel(redrawOperation);
material.clear(this);
};
material = (((!((face == null))) && (!((face._surface == null))))) ? face._surface._material : null;
if (material != null){
material.alphaOperation.addSequel(alphaOperation);
material.drawParamsOperation.addSequel(redrawOperation);
material.draw(this);
alpha = material._alpha;
blendMode = material._blendMode;
};
}
alternativa3d static function createSkin(_arg1:Camera3D):Skin{
var _local2:Skin = collector.pop();
if (_local2 == null){
_local2 = new (Skin);
};
_local2.camera = _arg1;
return (_local2);
}
alternativa3d static function destroySkin(_arg1:Skin):void{
collector.push(_arg1);
}
}
}//package alternativa.engine3d.display
Section 12
//View (alternativa.engine3d.display.View)
package alternativa.engine3d.display {
import flash.geom.*;
import flash.display.*;
import alternativa.engine3d.*;
public class View extends Sprite {
alternativa3d var halfHeight:Number;
alternativa3d var _height:Number;
alternativa3d var _width:Number;
private var _background:uint;// = 0
private var _crop:Boolean;// = false
alternativa3d var halfWidth:Number;
alternativa3d var canvas:Sprite;
public function View(_arg1:Number=0, _arg2:Number=0){
canvas = new Sprite();
canvas.mouseEnabled = false;
canvas.mouseChildren = false;
canvas.tabEnabled = false;
canvas.tabChildren = false;
addChild(canvas);
this.width = _arg1;
this.height = _arg2;
}
public function set crop(_arg1:Boolean):void{
_crop = _arg1;
if (_arg1){
scrollRect = new Rectangle(0, 0, width, height);
} else {
scrollRect = null;
};
}
override public function get width():Number{
return (_width);
}
override public function get height():Number{
return (_height);
}
public function get crop():Boolean{
return (_crop);
}
override public function set width(_arg1:Number):void{
if (_width != _arg1){
_width = _arg1;
halfWidth = (_arg1 * 0.5);
canvas.x = halfWidth;
if (crop){
scrollRect = new Rectangle(0, 0, _width, height);
};
};
}
override public function set height(_arg1:Number):void{
if (_height != _arg1){
_height = _arg1;
halfHeight = (_arg1 * 0.5);
canvas.y = halfHeight;
if (crop){
scrollRect = new Rectangle(0, 0, width, _height);
};
};
}
}
}//package alternativa.engine3d.display
Section 13
//Engine3DError (alternativa.engine3d.errors.Engine3DError)
package alternativa.engine3d.errors {
public class Engine3DError extends Error {
public function Engine3DError(_arg1:String=""){
super(_arg1);
this.name = "Engine3DError";
}
}
}//package alternativa.engine3d.errors
Section 14
//FaceError (alternativa.engine3d.errors.FaceError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class FaceError extends SurfaceError {
public var faceId:Object;
public var face:Face;
public function FaceError(_arg1:String="", _arg2:Mesh=null, _arg3:Object=null, _arg4:Face=null, _arg5:Object=null){
super(_arg1, _arg2);
if ((_arg3 is Surface)){
this.surface = Surface(_arg3);
} else {
this.surfaceId = _arg3;
};
this.face = _arg4;
this.faceId = _arg5;
this.name = "FaceError";
}
}
}//package alternativa.engine3d.errors
Section 15
//FaceExistsError (alternativa.engine3d.errors.FaceExistsError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class FaceExistsError extends FaceError {
public function FaceExistsError(_arg1:Face=null, _arg2:Object=null, _arg3:Mesh=null, _arg4:Object=null){
super("", _arg3, _arg4, _arg1, _arg2);
if (_arg4 != null){
this.message = TextUtils.insertVars("Face %1 with id '%2' already exists in surface %3", _arg1, _arg2, _arg4);
} else {
if (_arg3 != null){
this.message = TextUtils.insertVars("Face %1 with id '%2' already exists in mesh %3", _arg1, _arg2, _arg3);
};
};
this.name = "FaceExistsError";
}
}
}//package alternativa.engine3d.errors
Section 16
//FaceInvalidIDError (alternativa.engine3d.errors.FaceInvalidIDError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class FaceInvalidIDError extends FaceError {
public function FaceInvalidIDError(_arg1:Object=null, _arg2:Mesh=null, _arg3:Object=null){
super("", _arg2, _arg3, null, _arg1);
if (_arg2 != null){
this.message = TextUtils.insertVars("The word '%1' is reserved and cannot be used as a face ID", _arg1);
} else {
if (_arg3 != null){
this.message = TextUtils.insertVars("The word '%1' is reserved and cannot be used as a face ID", _arg1);
};
};
this.name = "FaceInvalidIDError";
}
}
}//package alternativa.engine3d.errors
Section 17
//FaceNeedMoreVerticesError (alternativa.engine3d.errors.FaceNeedMoreVerticesError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class FaceNeedMoreVerticesError extends FaceError {
public var countVertices:uint;
public function FaceNeedMoreVerticesError(_arg1:Mesh=null, _arg2:uint=0){
super("Need three or more vertices for face creating and adding to mesh %2", _arg1);
this.countVertices = _arg2;
this.name = "FaceNeedMoreVerticesError";
}
}
}//package alternativa.engine3d.errors
Section 18
//FaceNotFoundError (alternativa.engine3d.errors.FaceNotFoundError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class FaceNotFoundError extends FaceError {
public function FaceNotFoundError(_arg1:Object=null, _arg2:Mesh=null, _arg3:Object=null){
super("", _arg2, _arg3);
if ((_arg1 is Face)){
if (_arg3 != null){
if (_arg2 == null){
this.message = TextUtils.insertVars("Face %1 not found in surface %2", _arg1, _arg3);
} else {
this.message = TextUtils.insertVars("Face %1 not found in mesh %2 of surface %3", _arg1, _arg2, _arg3);
};
} else {
this.message = TextUtils.insertVars("Face %1 not found in mesh %2", _arg1, _arg2);
};
this.face = Face(_arg1);
} else {
if (_arg3 != null){
if (_arg2 == null){
this.message = TextUtils.insertVars("Face with id '%1' not found in surface %2", _arg1, _arg3);
} else {
this.message = TextUtils.insertVars("Face with id '%1' not found in mesh %2 of surface %3", _arg1, _arg2, _arg3);
};
} else {
this.message = TextUtils.insertVars("Face with ID %1 not found in mesh %2", _arg1, _arg2);
};
this.faceId = _arg1;
};
this.name = "FaceNotFoundError";
}
}
}//package alternativa.engine3d.errors
Section 19
//FaceNullError (alternativa.engine3d.errors.FaceNullError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class FaceNullError extends FaceError {
public function FaceNullError(_arg1:Mesh=null, _arg2:Object=null){
super("", _arg1, _arg2);
if (_arg1 != null){
this.message = TextUtils.insertVars("Operation on %1 mesh with null face cannot be done", _arg1);
} else {
if (_arg2 != null){
this.message = TextUtils.insertVars("Operation on %1 surface with null face cannot be done", _arg2);
};
};
this.name = "FaceNullError";
}
}
}//package alternativa.engine3d.errors
Section 20
//MeshError (alternativa.engine3d.errors.MeshError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class MeshError extends Engine3DError {
public var mesh:Mesh;
public function MeshError(_arg1:String="", _arg2:Mesh=null){
super(_arg1);
this.mesh = _arg2;
this.name = "MeshError";
}
}
}//package alternativa.engine3d.errors
Section 21
//Object3DError (alternativa.engine3d.errors.Object3DError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class Object3DError extends Engine3DError {
public var child:Object3D;
public var object:Object3D;
public function Object3DError(_arg1:String="", _arg2:Object3D=null, _arg3:Object3D=null){
super(_arg1);
this.object = _arg2;
this.child = _arg3;
this.name = "Object3DError";
}
}
}//package alternativa.engine3d.errors
Section 22
//Object3DExistsError (alternativa.engine3d.errors.Object3DExistsError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Object3DExistsError extends Object3DError {
public function Object3DExistsError(_arg1:Object3D=null, _arg2:Object3D=null){
super(TextUtils.insertVars("Object %1 is already a child of the %2 object", _arg1, _arg2), _arg2, _arg1);
this.name = "Object3DExistsError";
}
}
}//package alternativa.engine3d.errors
Section 23
//Object3DNotFoundError (alternativa.engine3d.errors.Object3DNotFoundError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Object3DNotFoundError extends Object3DError {
public function Object3DNotFoundError(_arg1:Object3D=null, _arg2:Object3D=null){
super(TextUtils.insertVars("Object %1 not found in the child list of %2", _arg1, _arg2), _arg2, _arg1);
this.name = "Object3DNotFoundError";
}
}
}//package alternativa.engine3d.errors
Section 24
//Object3DNullError (alternativa.engine3d.errors.Object3DNullError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Object3DNullError extends Object3DError {
public function Object3DNullError(_arg1:Object3D=null){
super(TextUtils.insertVars("Object %1 operation cannot be done with null object", _arg1), _arg1);
this.name = "Object3DNullError";
}
}
}//package alternativa.engine3d.errors
Section 25
//Object3DParentError (alternativa.engine3d.errors.Object3DParentError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Object3DParentError extends Object3DError {
public function Object3DParentError(_arg1:Object3D=null, _arg2:Object3D=null){
super(TextUtils.insertVars("Object %1 cannot be added to its child %2", _arg1, _arg2), _arg2, _arg1);
this.name = "Object3DParentError";
}
}
}//package alternativa.engine3d.errors
Section 26
//Object3DSelfError (alternativa.engine3d.errors.Object3DSelfError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Object3DSelfError extends Object3DError {
public function Object3DSelfError(_arg1:Object3D=null){
super(TextUtils.insertVars("Object %1 cannot be added to itself", _arg1), _arg1, _arg1);
this.name = "Object3DSelfError";
}
}
}//package alternativa.engine3d.errors
Section 27
//Scene3DError (alternativa.engine3d.errors.Scene3DError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class Scene3DError extends Engine3DError {
public var scene:Scene3D;
public function Scene3DError(_arg1:String="", _arg2:Scene3D=null){
super(_arg1);
this.scene = _arg2;
this.name = "Scene3DError";
}
}
}//package alternativa.engine3d.errors
Section 28
//Scene3DRootExistError (alternativa.engine3d.errors.Scene3DRootExistError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class Scene3DRootExistError extends Scene3DError {
public var root:Object3D;
public function Scene3DRootExistError(_arg1:Object3D=null, _arg2:Scene3D=null){
super(TextUtils.insertVars("Object %1 already is root in %2 scene", _arg1, _arg2), _arg2);
this.root = _arg1;
this.name = "Scene3DRootExistError";
}
}
}//package alternativa.engine3d.errors
Section 29
//SurfaceError (alternativa.engine3d.errors.SurfaceError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class SurfaceError extends MeshError {
public var surfaceId:Object;
public var surface:Surface;
public function SurfaceError(_arg1:String="", _arg2:Mesh=null, _arg3:Surface=null, _arg4:Object=null){
super(_arg1, _arg2);
this.surface = _arg3;
this.surfaceId = _arg4;
this.name = "SurfaceInMeshError";
}
}
}//package alternativa.engine3d.errors
Section 30
//SurfaceExistsError (alternativa.engine3d.errors.SurfaceExistsError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class SurfaceExistsError extends SurfaceError {
public function SurfaceExistsError(_arg1:Surface=null, _arg2:Object=null, _arg3:Mesh=null){
super("", _arg3, _arg1, _arg2);
this.message = TextUtils.insertVars("Surface %1 with id '%2' already exists in mesh %3", _arg1, _arg2, _arg3);
this.name = "SurfaceExistsError";
}
}
}//package alternativa.engine3d.errors
Section 31
//SurfaceInvalidIDError (alternativa.engine3d.errors.SurfaceInvalidIDError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class SurfaceInvalidIDError extends SurfaceError {
public function SurfaceInvalidIDError(_arg1:Object=null, _arg2:Mesh=null){
super(TextUtils.insertVars("The word '%1' is reserved and cannot be used as a surface ID", _arg1), _arg2, null, _arg1);
this.name = "SurfaceInvalidIDError";
}
}
}//package alternativa.engine3d.errors
Section 32
//SurfaceNotFoundError (alternativa.engine3d.errors.SurfaceNotFoundError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class SurfaceNotFoundError extends SurfaceError {
public function SurfaceNotFoundError(_arg1:Object=null, _arg2:Mesh=null){
super("", _arg2);
if ((_arg1 is Surface)){
this.message = TextUtils.insertVars("Surface %1 not found in mesh %2", _arg1, _arg2);
this.surface = Surface(_arg1);
} else {
this.message = TextUtils.insertVars("Surface with ID %1 not found in mesh %2", _arg1, _arg2);
this.surfaceId = _arg1;
};
this.name = "SurfaceNotFoundError";
}
}
}//package alternativa.engine3d.errors
Section 33
//SurfaceNotInMeshError (alternativa.engine3d.errors.SurfaceNotInMeshError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class SurfaceNotInMeshError extends SurfaceError {
public function SurfaceNotInMeshError(_arg1:Surface=null){
super(TextUtils.insertVars("Surface %1 must be in mesh for face adding to this", _arg1), null, _arg1);
this.name = "SurfaceNotInMeshError";
}
}
}//package alternativa.engine3d.errors
Section 34
//SurfaceNullError (alternativa.engine3d.errors.SurfaceNullError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class SurfaceNullError extends SurfaceError {
public function SurfaceNullError(_arg1:Mesh=null){
super(TextUtils.insertVars("Operation on %1 mesh with null surface cannot be done", _arg1), _arg1);
this.name = "SurfaceNullError";
}
}
}//package alternativa.engine3d.errors
Section 35
//VertexError (alternativa.engine3d.errors.VertexError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
public class VertexError extends MeshError {
public var vertex:Vertex;
public var vertexId:Object;
public function VertexError(_arg1:String="", _arg2:Mesh=null, _arg3:Vertex=null, _arg4:Object=null){
super(_arg1, _arg2);
this.vertex = _arg3;
this.vertexId = _arg4;
this.name = "VertexError";
}
}
}//package alternativa.engine3d.errors
Section 36
//VertexExistsError (alternativa.engine3d.errors.VertexExistsError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public final class VertexExistsError extends VertexError {
public function VertexExistsError(_arg1:Vertex=null, _arg2:Object=null, _arg3:Mesh=null){
super("", _arg3, _arg1, _arg2);
this.message = TextUtils.insertVars("Vertex %1 with id '%2' already exists in mesh %3", _arg1, _arg2, _arg3);
this.name = "VertexExistsError";
}
}
}//package alternativa.engine3d.errors
Section 37
//VertexInvalidIDError (alternativa.engine3d.errors.VertexInvalidIDError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public final class VertexInvalidIDError extends VertexError {
public function VertexInvalidIDError(_arg1:Object=null, _arg2:Mesh=null){
super(TextUtils.insertVars("The word '%1' is reserved and cannot be used as a vertex ID", _arg1, _arg2), _arg2, null, _arg1);
this.name = "VertexInvalidIDError";
}
}
}//package alternativa.engine3d.errors
Section 38
//VertexNotFoundError (alternativa.engine3d.errors.VertexNotFoundError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public class VertexNotFoundError extends VertexError {
public function VertexNotFoundError(_arg1:Object=null, _arg2:Mesh=null){
super("", _arg2);
if ((_arg1 is Vertex)){
this.message = TextUtils.insertVars("Vertex %1 not found in mesh %2", _arg1, _arg2);
this.vertex = Vertex(_arg1);
} else {
this.message = TextUtils.insertVars("Vertex with id %1 not found in mesh %2", _arg1, _arg2);
this.vertexId = _arg1;
};
this.name = "VertexNotFoundError";
}
}
}//package alternativa.engine3d.errors
Section 39
//VertexNullError (alternativa.engine3d.errors.VertexNullError)
package alternativa.engine3d.errors {
import alternativa.engine3d.core.*;
import alternativa.utils.*;
public final class VertexNullError extends VertexError {
public function VertexNullError(_arg1:Mesh=null){
super(TextUtils.insertVars("Operation on %1 mesh with null vertex cannot be done", _arg1), _arg1);
this.name = "VertexNullError";
}
}
}//package alternativa.engine3d.errors
Section 40
//FillMaterial (alternativa.engine3d.materials.FillMaterial)
package alternativa.engine3d.materials {
import alternativa.engine3d.core.*;
import alternativa.types.*;
import flash.display.*;
import alternativa.engine3d.display.*;
import alternativa.engine3d.*;
public class FillMaterial extends SurfaceMaterial {
alternativa3d var _color:uint;
private static var gfx:Graphics;
private static var focusDistance:Number;
private static var points1:Array = new Array();
private static var points2:Array = new Array();
public function FillMaterial(_arg1:uint, _arg2:Number=1, _arg3:String="normal"){
super(_arg2, _arg3);
_color = _arg1;
}
private function clip(_arg1:uint, _arg2:Array, _arg3:Array, _arg4:Number, _arg5:Number, _arg6:Number):uint{
var _local7:Number;
var _local9:Point3D;
var _local13:Point3D;
var _local14:Number;
var _local8:uint;
var _local10:Point3D = _arg2[(_arg1 - 1)];
var _local11:Number = (((_arg4 * _local10.x) + (_arg5 * _local10.y)) + (_arg6 * _local10.z));
var _local12:uint;
while (_local12 < _arg1) {
_local13 = _arg2[_local12];
_local14 = (((_arg4 * _local13.x) + (_arg5 * _local13.y)) + (_arg6 * _local13.z));
if (_local14 > 0){
if (_local11 <= 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new Point3D((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
};
_local8++;
};
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = _local13.clone();
_arg3[_local8] = _local9;
} else {
_local9.copy(_local13);
};
_local8++;
} else {
if (_local11 > 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new Point3D((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
};
_local8++;
};
};
_local11 = _local14;
_local10 = _local13;
_local12++;
};
return (_local8);
}
public function set color(_arg1:uint):void{
if (_color != _arg1){
_color = _arg1;
addDrawParamsOperationToScene();
};
}
public function get color():uint{
return (_color);
}
override alternativa3d function draw(_arg1:Skin):void{
var _local5:Point3D;
var _local6:uint;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Point3D;
gfx = _arg1.gfx;
var _local2:Camera3D = _arg1.camera;
var _local3:uint = _arg1._primitive.num;
var _local4:Array = _arg1._primitive.points;
if (_local2._fov == 0){
gfx.beginFill(_color);
_local5 = _local2.calculateCameraCoord(_local4[0]);
gfx.moveTo(_local5.x, _local5.y);
_local6 = 1;
while (_local6 < _local3) {
_local5 = _local2.calculateCameraCoord(_local4[_local6]);
gfx.lineTo(_local5.x, _local5.y);
_local6++;
};
} else {
focusDistance = _local2.focusDistance;
_local6 = 0;
while (_local6 < _local3) {
_local5 = _local2.calculateCameraCoord(_local4[_local6]);
_local12 = points1[_local6];
if (_local12 == null){
_local12 = _local5.clone();
points1[_local6] = _local12;
} else {
_local12.copy(_local5);
};
_local6++;
};
_local7 = -(focusDistance);
_local8 = _local2._view.halfWidth;
_local9 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local7 = (_local7 / _local9);
_local8 = (_local8 / _local9);
_local3 = clip(_local3, points1, points2, _local7, 0, _local8);
if (_local3 < 3){
return;
};
_local3 = clip(_local3, points2, points1, -(_local7), 0, _local8);
if (_local3 < 3){
return;
};
_local10 = -(focusDistance);
_local8 = _local2._view.halfHeight;
_local9 = Math.sqrt(((_local10 * _local10) + (_local8 * _local8)));
_local10 = (_local10 / _local9);
_local8 = (_local8 / _local9);
_local3 = clip(_local3, points1, points2, 0, _local10, _local8);
if (_local3 < 3){
return;
};
_local3 = clip(_local3, points2, points1, 0, -(_local10), _local8);
if (_local3 < 3){
return;
};
gfx.beginFill(_color);
_local5 = points1[0];
_local11 = (focusDistance / _local5.z);
gfx.moveTo((_local5.x * _local11), (_local5.y * _local11));
_local6 = 1;
while (_local6 < _local3) {
_local5 = points1[_local6];
_local11 = (focusDistance / _local5.z);
gfx.lineTo((_local5.x * _local11), (_local5.y * _local11));
_local6++;
};
};
}
override public function clone():Material{
return (new FillMaterial(_color, _alpha, _blendMode));
}
}
}//package alternativa.engine3d.materials
Section 41
//Material (alternativa.engine3d.materials.Material)
package alternativa.engine3d.materials {
public class Material {
public function clone():Material{
return (new Material());
}
}
}//package alternativa.engine3d.materials
Section 42
//SurfaceMaterial (alternativa.engine3d.materials.SurfaceMaterial)
package alternativa.engine3d.materials {
import alternativa.engine3d.core.*;
import alternativa.engine3d.display.*;
import alternativa.engine3d.*;
public class SurfaceMaterial extends Material {
alternativa3d var _blendMode:String;// = "normal"
alternativa3d var drawParamsOperation:Operation;
alternativa3d var _alpha:Number;
alternativa3d var alphaOperation:Operation;
alternativa3d var _surface:Surface;
alternativa3d var blendModeOperation:Operation;
public function SurfaceMaterial(_arg1:Number=1, _arg2:String="normal"){
drawParamsOperation = new Operation("drawParams", this);
alphaOperation = new Operation("alpha", this);
blendModeOperation = new Operation("blendMode", this);
super();
_alpha = _arg1;
_blendMode = _arg2;
}
alternativa3d function draw(_arg1:Skin):void{
}
alternativa3d function addToMesh(_arg1:Mesh):void{
}
alternativa3d function clear(_arg1:Skin):void{
_arg1.gfx.clear();
}
alternativa3d function addToSurface(_arg1:Surface):void{
_surface = _arg1;
}
public function get blendMode():String{
return (_blendMode);
}
alternativa3d function removeFromMesh(_arg1:Mesh):void{
}
alternativa3d function removeFromScene(_arg1:Scene3D):void{
_arg1.removeOperation(drawParamsOperation);
}
override public function clone():Material{
return (new SurfaceMaterial(_alpha, _blendMode));
}
public function get alpha():Number{
return (_alpha);
}
public function set blendMode(_arg1:String):void{
if (_blendMode != _arg1){
_blendMode = _arg1;
if (((!((_surface == null))) && (!((_surface._mesh == null))))){
_surface._mesh.addOperationToScene(blendModeOperation);
};
};
}
public function get surface():Surface{
return (_surface);
}
alternativa3d function addToScene(_arg1:Scene3D):void{
}
protected function addDrawParamsOperationToScene():void{
if (((!((_surface == null))) && (!((_surface._mesh == null))))){
_surface._mesh.addOperationToScene(drawParamsOperation);
};
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
if (((!((_surface == null))) && (!((_surface._mesh == null))))){
_surface._mesh.addOperationToScene(alphaOperation);
};
};
}
alternativa3d function removeFromSurface(_arg1:Surface):void{
_surface = null;
}
}
}//package alternativa.engine3d.materials
Section 43
//TextureMaterial (alternativa.engine3d.materials.TextureMaterial)
package alternativa.engine3d.materials {
import alternativa.engine3d.core.*;
import alternativa.types.*;
import flash.geom.*;
import flash.display.*;
import alternativa.engine3d.display.*;
import alternativa.engine3d.*;
public class TextureMaterial extends SurfaceMaterial {
alternativa3d var _smooth:Boolean;
alternativa3d var _debug:Boolean;// = false
alternativa3d var _texture:Texture;
alternativa3d var _repeat:Boolean;
alternativa3d var _precision:Number;
private static var textureMatrix:Matrix = new Matrix();
private static var focusDistance:Number;
private static var points1:Array = new Array();
private static var points2:Array = new Array();
private static var gfx:Graphics;
private static var distortion:Number;
public function TextureMaterial(_arg1:Texture, _arg2:Number=1, _arg3:Boolean=true, _arg4:Boolean=false, _arg5:String="normal", _arg6:Number=10){
super(_arg2, _arg5);
_texture = _arg1;
_repeat = _arg3;
_smooth = _arg4;
_precision = _arg6;
}
override alternativa3d function draw(_arg1:Skin):void{
var _local4:uint;
var _local5:Array;
var _local6:Point3D;
var _local7:uint;
var _local8:Matrix;
var _local9:Array;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:Boolean;
var _local19:TexturePoint;
var _local20:TexturePoint;
var _local21:TexturePoint;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Point;
var _local29:TexturePoint;
var _local30:Number;
var _local31:Number;
var _local32:Number;
var _local33:Number;
var _local34:Number;
var _local2:Face = _arg1.face;
var _local3:Camera3D = _arg1.camera;
if (((!((_local2.uvMatrix == null))) && (!((_texture == null))))){
gfx = _arg1.gfx;
_local4 = _arg1._primitive.num;
_local5 = _arg1._primitive.points;
if (_local3._fov == 0){
_local8 = _local3.calculateTextureMatrix(_local2, texture.width, texture.height);
gfx.beginBitmapFill(_texture.bitmapData, _local8, true, true);
if (_debug){
gfx.lineStyle(1, 0xFFFFFF);
};
_local6 = _local3.calculateCameraCoord(_local5[0]);
gfx.moveTo(_local6.x, _local6.y);
_local7 = 1;
while (_local7 < _local4) {
_local6 = _local3.calculateCameraCoord(_local5[_local7]);
gfx.lineTo(_local6.x, _local6.y);
_local7++;
};
if (_debug){
_local6 = _local3.calculateCameraCoord(_local5[0]);
gfx.lineTo(_local6.x, _local6.y);
};
} else {
focusDistance = _local3.focusDistance;
distortion = (_local3.focusDistortion * _precision);
_local9 = _arg1._primitive.uvs;
_local7 = 0;
while (_local7 < _local4) {
_local6 = _local3.calculateCameraCoord(_local5[_local7]);
_local28 = _local9[_local7];
_local29 = points1[_local7];
if (_local29 == null){
_local29 = new TexturePoint(_local6.x, _local6.y, _local6.z, _local28.x, _local28.y);
points1[_local7] = _local29;
} else {
_local29.x = _local6.x;
_local29.y = _local6.y;
_local29.z = _local6.z;
_local29.u = _local28.x;
_local29.v = _local28.y;
};
_local7++;
};
_local10 = -(focusDistance);
_local11 = _local3._view.halfWidth;
_local12 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
_local10 = (_local10 / _local12);
_local11 = (_local11 / _local12);
_local4 = clip(_local4, points1, points2, _local10, 0, _local11);
if (_local4 < 3){
return;
};
_local4 = clip(_local4, points2, points1, -(_local10), 0, _local11);
if (_local4 < 3){
return;
};
_local13 = -(focusDistance);
_local11 = _local3._view.halfHeight;
_local12 = Math.sqrt(((_local13 * _local13) + (_local11 * _local11)));
_local13 = (_local13 / _local12);
_local11 = (_local11 / _local12);
_local4 = clip(_local4, points1, points2, 0, _local13, _local11);
if (_local4 < 3){
return;
};
_local4 = clip(_local4, points2, points1, 0, -(_local13), _local11);
if (_local4 < 3){
return;
};
_local14 = 0;
_local15 = (_local4 - 1);
_local16 = 1;
_local17 = ((_local15)>0) ? (_local15 - 1) : (_local4 - 1);
_local18 = true;
_local19 = points1[_local15];
_local21 = points1[_local14];
if (_precision > 0){
_local22 = (_local19.x / _local19.z);
_local23 = (_local19.y / _local19.z);
_local26 = (_local21.x / _local21.z);
_local27 = (_local21.y / _local21.z);
_local30 = (((_local21.x + _local19.x) / (_local21.z + _local19.z)) - (0.5 * (_local26 + _local22)));
_local31 = (((_local21.y + _local19.y) / (_local21.z + _local19.z)) - (0.5 * (_local27 + _local23)));
_local34 = ((_local30 * _local30) + (_local31 * _local31));
while (_local14 != _local17) {
if (_local18){
_local19 = points1[_local14];
_local20 = points1[_local16];
_local21 = points1[_local15];
_local24 = _local22;
_local25 = _local23;
_local22 = _local26;
_local23 = _local27;
_local26 = _local24;
_local27 = _local25;
_local24 = (_local20.x / _local20.z);
_local25 = (_local20.y / _local20.z);
_local30 = (((_local20.x + _local21.x) / (_local20.z + _local21.z)) - (0.5 * (_local24 + _local26)));
_local31 = (((_local20.y + _local21.y) / (_local20.z + _local21.z)) - (0.5 * (_local25 + _local27)));
_local33 = ((_local30 * _local30) + (_local31 * _local31));
_local14 = _local16;
_local16 = ((_local14)<(_local4 - 1)) ? (_local14 + 1) : 0;
} else {
_local19 = points1[_local17];
_local20 = points1[_local15];
_local21 = points1[_local14];
_local22 = _local24;
_local23 = _local25;
_local24 = _local26;
_local25 = _local27;
_local26 = _local22;
_local27 = _local23;
_local22 = (_local19.x / _local19.z);
_local23 = (_local19.y / _local19.z);
_local30 = (((_local21.x + _local19.x) / (_local21.z + _local19.z)) - (0.5 * (_local26 + _local22)));
_local31 = (((_local21.y + _local19.y) / (_local21.z + _local19.z)) - (0.5 * (_local27 + _local23)));
_local34 = ((_local30 * _local30) + (_local31 * _local31));
_local15 = _local17;
_local17 = ((_local15)>0) ? (_local15 - 1) : (_local4 - 1);
};
if ((((_local24 - _local22) * (_local27 - _local23)) - ((_local25 - _local23) * (_local26 - _local22))) < -(_local3.focusDistortion)){
_local30 = (((_local19.x + _local20.x) / (_local19.z + _local20.z)) - (0.5 * (_local22 + _local24)));
_local31 = (((_local19.y + _local20.y) / (_local19.z + _local20.z)) - (0.5 * (_local23 + _local25)));
_local32 = ((_local30 * _local30) + (_local31 * _local31));
bisection(_local19.x, _local19.y, _local19.z, _local19.u, _local19.v, _local20.x, _local20.y, _local20.z, _local20.u, _local20.v, _local21.x, _local21.y, _local21.z, _local21.u, _local21.v, _local32, _local33, _local34);
};
_local18 = !(_local18);
};
} else {
_local22 = ((focusDistance * _local19.x) / _local19.z);
_local23 = ((focusDistance * _local19.y) / _local19.z);
_local26 = ((focusDistance * _local21.x) / _local21.z);
_local27 = ((focusDistance * _local21.y) / _local21.z);
while (_local14 != _local17) {
if (_local18){
_local19 = points1[_local14];
_local20 = points1[_local16];
_local21 = points1[_local15];
_local24 = _local22;
_local25 = _local23;
_local22 = _local26;
_local23 = _local27;
_local26 = _local24;
_local27 = _local25;
_local24 = ((focusDistance * _local20.x) / _local20.z);
_local25 = ((focusDistance * _local20.y) / _local20.z);
_local14 = _local16;
_local16 = ((_local14)<(_local4 - 1)) ? (_local14 + 1) : 0;
} else {
_local19 = points1[_local17];
_local20 = points1[_local15];
_local21 = points1[_local14];
_local22 = _local24;
_local23 = _local25;
_local24 = _local26;
_local25 = _local27;
_local26 = _local22;
_local27 = _local23;
_local22 = ((focusDistance * _local19.x) / _local19.z);
_local23 = ((focusDistance * _local19.y) / _local19.z);
_local15 = _local17;
_local17 = ((_local15)>0) ? (_local15 - 1) : (_local4 - 1);
};
drawTriangle(_local22, _local23, _local19.u, _local19.v, _local24, _local25, _local20.u, _local20.v, _local26, _local27, _local21.u, _local21.v);
_local18 = !(_local18);
};
};
};
} else {
_local3.removeTextureMatrix(_local2);
};
}
private function bisection(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:Number, _arg13:Number, _arg14:Number, _arg15:Number, _arg16:Number, _arg17:Number, _arg18:Number):void{
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Number;
var _local26:Number;
var _local27:Number;
var _local28:Number;
if (_arg16 > _arg17){
if (_arg16 > _arg18){
if (_arg16 > distortion){
_local19 = (0.5 * (_arg1 + _arg6));
_local20 = (0.5 * (_arg2 + _arg7));
_local21 = (0.5 * (_arg3 + _arg8));
_local22 = (0.5 * (_arg4 + _arg9));
_local23 = (0.5 * (_arg5 + _arg10));
_local24 = (((_arg1 + _local19) / (_arg3 + _local21)) - (0.5 * ((_arg1 / _arg3) + (_local19 / _local21))));
_local25 = (((_arg2 + _local20) / (_arg3 + _local21)) - (0.5 * ((_arg2 / _arg3) + (_local20 / _local21))));
_local26 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg6 + _local19) / (_arg8 + _local21)) - (0.5 * ((_arg6 / _arg8) + (_local19 / _local21))));
_local25 = (((_arg7 + _local20) / (_arg8 + _local21)) - (0.5 * ((_arg7 / _arg8) + (_local20 / _local21))));
_local27 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg11 + _local19) / (_arg13 + _local21)) - (0.5 * ((_arg11 / _arg13) + (_local19 / _local21))));
_local25 = (((_arg12 + _local20) / (_arg13 + _local21)) - (0.5 * ((_arg12 / _arg13) + (_local20 / _local21))));
_local28 = ((_local24 * _local24) + (_local25 * _local25));
bisection(_local19, _local20, _local21, _local22, _local23, _arg11, _arg12, _arg13, _arg14, _arg15, _arg1, _arg2, _arg3, _arg4, _arg5, _local28, _arg18, _local26);
bisection(_local19, _local20, _local21, _local22, _local23, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15, _local27, _arg17, _local28);
return;
};
} else {
if (_arg18 > distortion){
_local19 = (0.5 * (_arg11 + _arg1));
_local20 = (0.5 * (_arg12 + _arg2));
_local21 = (0.5 * (_arg13 + _arg3));
_local22 = (0.5 * (_arg14 + _arg4));
_local23 = (0.5 * (_arg15 + _arg5));
_local24 = (((_arg1 + _local19) / (_arg3 + _local21)) - (0.5 * ((_arg1 / _arg3) + (_local19 / _local21))));
_local25 = (((_arg2 + _local20) / (_arg3 + _local21)) - (0.5 * ((_arg2 / _arg3) + (_local20 / _local21))));
_local26 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg6 + _local19) / (_arg8 + _local21)) - (0.5 * ((_arg6 / _arg8) + (_local19 / _local21))));
_local25 = (((_arg7 + _local20) / (_arg8 + _local21)) - (0.5 * ((_arg7 / _arg8) + (_local20 / _local21))));
_local27 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg11 + _local19) / (_arg13 + _local21)) - (0.5 * ((_arg11 / _arg13) + (_local19 / _local21))));
_local25 = (((_arg12 + _local20) / (_arg13 + _local21)) - (0.5 * ((_arg12 / _arg13) + (_local20 / _local21))));
_local28 = ((_local24 * _local24) + (_local25 * _local25));
bisection(_local19, _local20, _local21, _local22, _local23, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15, _local27, _arg17, _local28);
bisection(_local19, _local20, _local21, _local22, _local23, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _local26, _arg16, _local27);
return;
};
};
} else {
if (_arg17 > _arg18){
if (_arg17 > distortion){
_local19 = (0.5 * (_arg6 + _arg11));
_local20 = (0.5 * (_arg7 + _arg12));
_local21 = (0.5 * (_arg8 + _arg13));
_local22 = (0.5 * (_arg9 + _arg14));
_local23 = (0.5 * (_arg10 + _arg15));
_local24 = (((_arg1 + _local19) / (_arg3 + _local21)) - (0.5 * ((_arg1 / _arg3) + (_local19 / _local21))));
_local25 = (((_arg2 + _local20) / (_arg3 + _local21)) - (0.5 * ((_arg2 / _arg3) + (_local20 / _local21))));
_local26 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg6 + _local19) / (_arg8 + _local21)) - (0.5 * ((_arg6 / _arg8) + (_local19 / _local21))));
_local25 = (((_arg7 + _local20) / (_arg8 + _local21)) - (0.5 * ((_arg7 / _arg8) + (_local20 / _local21))));
_local27 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg11 + _local19) / (_arg13 + _local21)) - (0.5 * ((_arg11 / _arg13) + (_local19 / _local21))));
_local25 = (((_arg12 + _local20) / (_arg13 + _local21)) - (0.5 * ((_arg12 / _arg13) + (_local20 / _local21))));
_local28 = ((_local24 * _local24) + (_local25 * _local25));
bisection(_local19, _local20, _local21, _local22, _local23, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _local26, _arg16, _local27);
bisection(_local19, _local20, _local21, _local22, _local23, _arg11, _arg12, _arg13, _arg14, _arg15, _arg1, _arg2, _arg3, _arg4, _arg5, _local28, _arg18, _local26);
return;
};
} else {
if (_arg18 > distortion){
_local19 = (0.5 * (_arg11 + _arg1));
_local20 = (0.5 * (_arg12 + _arg2));
_local21 = (0.5 * (_arg13 + _arg3));
_local22 = (0.5 * (_arg14 + _arg4));
_local23 = (0.5 * (_arg15 + _arg5));
_local24 = (((_arg1 + _local19) / (_arg3 + _local21)) - (0.5 * ((_arg1 / _arg3) + (_local19 / _local21))));
_local25 = (((_arg2 + _local20) / (_arg3 + _local21)) - (0.5 * ((_arg2 / _arg3) + (_local20 / _local21))));
_local26 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg6 + _local19) / (_arg8 + _local21)) - (0.5 * ((_arg6 / _arg8) + (_local19 / _local21))));
_local25 = (((_arg7 + _local20) / (_arg8 + _local21)) - (0.5 * ((_arg7 / _arg8) + (_local20 / _local21))));
_local27 = ((_local24 * _local24) + (_local25 * _local25));
_local24 = (((_arg11 + _local19) / (_arg13 + _local21)) - (0.5 * ((_arg11 / _arg13) + (_local19 / _local21))));
_local25 = (((_arg12 + _local20) / (_arg13 + _local21)) - (0.5 * ((_arg12 / _arg13) + (_local20 / _local21))));
_local28 = ((_local24 * _local24) + (_local25 * _local25));
bisection(_local19, _local20, _local21, _local22, _local23, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15, _local27, _arg17, _local28);
bisection(_local19, _local20, _local21, _local22, _local23, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _local26, _arg16, _local27);
return;
};
};
};
var _local29:Number = (focusDistance / _arg3);
var _local30:Number = (focusDistance / _arg8);
var _local31:Number = (focusDistance / _arg13);
drawTriangle((_arg1 * _local29), (_arg2 * _local29), _arg4, _arg5, (_arg6 * _local30), (_arg7 * _local30), _arg9, _arg10, (_arg11 * _local31), (_arg12 * _local31), _arg14, _arg15);
}
private function clip(_arg1:uint, _arg2:Array, _arg3:Array, _arg4:Number, _arg5:Number, _arg6:Number):uint{
var _local7:Number;
var _local9:TexturePoint;
var _local13:TexturePoint;
var _local14:Number;
var _local8:uint;
var _local10:TexturePoint = _arg2[(_arg1 - 1)];
var _local11:Number = (((_arg4 * _local10.x) + (_arg5 * _local10.y)) + (_arg6 * _local10.z));
var _local12:uint;
while (_local12 < _arg1) {
_local13 = _arg2[_local12];
_local14 = (((_arg4 * _local13.x) + (_arg5 * _local13.y)) + (_arg6 * _local13.z));
if (_local14 > 0){
if (_local11 <= 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new TexturePoint((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)), (_local13.u - ((_local13.u - _local10.u) * _local7)), (_local13.v - ((_local13.v - _local10.v) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
_local9.u = (_local13.u - ((_local13.u - _local10.u) * _local7));
_local9.v = (_local13.v - ((_local13.v - _local10.v) * _local7));
};
_local8++;
};
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new TexturePoint(_local13.x, _local13.y, _local13.z, _local13.u, _local13.v);
_arg3[_local8] = _local9;
} else {
_local9.x = _local13.x;
_local9.y = _local13.y;
_local9.z = _local13.z;
_local9.u = _local13.u;
_local9.v = _local13.v;
};
_local8++;
} else {
if (_local11 > 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new TexturePoint((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)), (_local13.u - ((_local13.u - _local10.u) * _local7)), (_local13.v - ((_local13.v - _local10.v) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
_local9.u = (_local13.u - ((_local13.u - _local10.u) * _local7));
_local9.v = (_local13.v - ((_local13.v - _local10.v) * _local7));
};
_local8++;
};
};
_local11 = _local14;
_local10 = _local13;
_local12++;
};
return (_local8);
}
public function get debug():Boolean{
return (_debug);
}
public function get texture():Texture{
return (_texture);
}
public function set smooth(_arg1:Boolean):void{
if (_smooth != _arg1){
_smooth = _arg1;
addDrawParamsOperationToScene();
};
}
override public function clone():Material{
return (new TextureMaterial(_texture, _alpha, _repeat, _smooth, _blendMode, _precision));
}
public function get repeat():Boolean{
return (_repeat);
}
public function set debug(_arg1:Boolean):void{
if (_debug != _arg1){
_debug = _arg1;
addDrawParamsOperationToScene();
};
}
private function drawTriangle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Number, _arg11:Number, _arg12:Number):void{
var _local13:Number = (_arg5 - _arg1);
var _local14:Number = (_arg6 - _arg2);
var _local15:Number = (_arg9 - _arg1);
var _local16:Number = (_arg10 - _arg2);
var _local17:Number = (_arg7 - _arg3);
var _local18:Number = (_arg8 - _arg4);
var _local19:Number = (_arg11 - _arg3);
var _local20:Number = (_arg12 - _arg4);
var _local21:Number = ((_local17 * _local20) - (_local18 * _local19));
var _local22:Number = _texture.width;
var _local23:Number = _texture.height;
textureMatrix.a = (((_local20 * _local13) - (_local18 * _local15)) / _local21);
textureMatrix.b = (((_local20 * _local14) - (_local18 * _local16)) / _local21);
textureMatrix.c = (((_local19 * _local13) - (_local17 * _local15)) / _local21);
textureMatrix.d = (((_local19 * _local14) - (_local17 * _local16)) / _local21);
textureMatrix.tx = ((((_arg4 - 1) * textureMatrix.c) - (_arg3 * textureMatrix.a)) + _arg1);
textureMatrix.ty = ((((_arg4 - 1) * textureMatrix.d) - (_arg3 * textureMatrix.b)) + _arg2);
textureMatrix.a = (textureMatrix.a / _local22);
textureMatrix.b = (textureMatrix.b / _local22);
textureMatrix.c = (textureMatrix.c / _local23);
textureMatrix.d = (textureMatrix.d / _local23);
gfx.beginBitmapFill(_texture.bitmapData, textureMatrix, _repeat, _smooth);
if (_debug){
gfx.lineStyle(1, 0xFFFFFF);
};
gfx.moveTo(_arg1, _arg2);
gfx.lineTo(_arg5, _arg6);
gfx.lineTo(_arg9, _arg10);
if (_debug){
gfx.lineTo(_arg1, _arg2);
};
}
public function get smooth():Boolean{
return (_smooth);
}
public function set texture(_arg1:Texture):void{
if (_texture != _arg1){
_texture = _arg1;
addDrawParamsOperationToScene();
};
}
public function set precision(_arg1:Number):void{
if (_precision != _arg1){
_precision = _arg1;
addDrawParamsOperationToScene();
};
}
public function set repeat(_arg1:Boolean):void{
if (_repeat != _arg1){
_repeat = _arg1;
addDrawParamsOperationToScene();
};
}
public function get precision():Number{
return (_precision);
}
}
}//package alternativa.engine3d.materials
class TexturePoint {
public var u:Number;
public var v:Number;
public var x:Number;
public var y:Number;
public var z:Number;
private function TexturePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0, _arg5:Number=0){
this.x = _arg1;
this.y = _arg2;
this.z = _arg3;
this.u = _arg4;
this.v = _arg5;
}
}
Section 44
//TextureMaterialPrecision (alternativa.engine3d.materials.TextureMaterialPrecision)
package alternativa.engine3d.materials {
public class TextureMaterialPrecision {
public static const HIGH:Number = 6;
public static const VERY_LOW:Number = 50;
public static const VERY_HIGH:Number = 3;
public static const BEST:Number = 1;
public static const LOW:Number = 25;
public static const MEDIUM:Number = 10;
public static const NONE:Number = -1;
}
}//package alternativa.engine3d.materials
Section 45
//WireMaterial (alternativa.engine3d.materials.WireMaterial)
package alternativa.engine3d.materials {
import alternativa.engine3d.core.*;
import alternativa.types.*;
import flash.display.*;
import alternativa.engine3d.display.*;
import alternativa.engine3d.*;
public class WireMaterial extends SurfaceMaterial {
alternativa3d var _color:uint;
alternativa3d var _thickness:Number;
private var currentSkin:Skin;
private static var gfx:Graphics;
private static var focusDistance:Number;
private static var points1:Array = new Array();
private static var points2:Array = new Array();
public function WireMaterial(_arg1:Number, _arg2:uint=0, _arg3:Number=1, _arg4:String="normal"){
super(_arg3, _arg4);
_color = _arg2;
_thickness = _arg1;
}
public function get color():uint{
return (_color);
}
public function set color(_arg1:uint):void{
if (_color != _arg1){
_color = _arg1;
addDrawParamsOperationToScene();
};
}
override alternativa3d function draw(_arg1:Skin):void{
var _local5:Point3D;
var _local6:uint;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Point3D;
gfx = _arg1.gfx;
var _local2:Camera3D = _arg1.camera;
var _local3:uint = _arg1._primitive.num;
var _local4:Array = _arg1._primitive.points;
if (_local2._fov == 0){
gfx.lineStyle(_thickness, _color);
_local5 = _local2.calculateCameraCoord(_local4[(_local3 - 1)]);
gfx.moveTo(_local5.x, _local5.y);
_local6 = 0;
while (_local6 < _local3) {
_local5 = _local2.calculateCameraCoord(_local4[_local6]);
gfx.lineTo(_local5.x, _local5.y);
_local6++;
};
} else {
focusDistance = _local2.focusDistance;
_local6 = 0;
while (_local6 < _local3) {
_local5 = _local2.calculateCameraCoord(_local4[_local6]);
_local12 = points1[_local6];
if (_local12 == null){
_local12 = _local5.clone();
points1[_local6] = _local12;
} else {
_local12.copy(_local5);
};
_local6++;
};
_local7 = -(focusDistance);
_local8 = _local2._view.halfWidth;
_local9 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
_local7 = (_local7 / _local9);
_local8 = (_local8 / _local9);
_local3 = clip(_local3, points1, points2, _local7, 0, _local8);
if (_local3 < 3){
return;
};
_local3 = clip(_local3, points2, points1, -(_local7), 0, _local8);
if (_local3 < 3){
return;
};
_local10 = -(focusDistance);
_local8 = _local2._view.halfHeight;
_local9 = Math.sqrt(((_local10 * _local10) + (_local8 * _local8)));
_local10 = (_local10 / _local9);
_local8 = (_local8 / _local9);
_local3 = clip(_local3, points1, points2, 0, _local10, _local8);
if (_local3 < 3){
return;
};
_local3 = clip(_local3, points2, points1, 0, -(_local10), _local8);
if (_local3 < 3){
return;
};
gfx.lineStyle(_thickness, _color);
_local5 = points1[(_local3 - 1)];
_local11 = (focusDistance / _local5.z);
gfx.moveTo((_local5.x * _local11), (_local5.y * _local11));
_local6 = 0;
while (_local6 < _local3) {
_local5 = points1[_local6];
_local11 = (focusDistance / _local5.z);
gfx.lineTo((_local5.x * _local11), (_local5.y * _local11));
_local6++;
};
};
}
public function set thickness(_arg1:Number):void{
if (_thickness != _arg1){
_thickness = _arg1;
addDrawParamsOperationToScene();
};
}
private function clip(_arg1:uint, _arg2:Array, _arg3:Array, _arg4:Number, _arg5:Number, _arg6:Number):uint{
var _local7:Number;
var _local9:Point3D;
var _local13:Point3D;
var _local14:Number;
var _local8:uint;
var _local10:Point3D = _arg2[(_arg1 - 1)];
var _local11:Number = (((_arg4 * _local10.x) + (_arg5 * _local10.y)) + (_arg6 * _local10.z));
var _local12:uint;
while (_local12 < _arg1) {
_local13 = _arg2[_local12];
_local14 = (((_arg4 * _local13.x) + (_arg5 * _local13.y)) + (_arg6 * _local13.z));
if (_local14 > 0){
if (_local11 <= 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new Point3D((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
};
_local8++;
};
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = _local13.clone();
_arg3[_local8] = _local9;
} else {
_local9.copy(_local13);
};
_local8++;
} else {
if (_local11 > 0){
_local7 = (_local14 / (_local14 - _local11));
_local9 = _arg3[_local8];
if (_local9 == null){
_local9 = new Point3D((_local13.x - ((_local13.x - _local10.x) * _local7)), (_local13.y - ((_local13.y - _local10.y) * _local7)), (_local13.z - ((_local13.z - _local10.z) * _local7)));
_arg3[_local8] = _local9;
} else {
_local9.x = (_local13.x - ((_local13.x - _local10.x) * _local7));
_local9.y = (_local13.y - ((_local13.y - _local10.y) * _local7));
_local9.z = (_local13.z - ((_local13.z - _local10.z) * _local7));
};
_local8++;
};
};
_local11 = _local14;
_local10 = _local13;
_local12++;
};
return (_local8);
}
public function get thickness():Number{
return (_thickness);
}
override public function clone():Material{
return (new WireMaterial(_thickness, _color, _alpha, _blendMode));
}
}
}//package alternativa.engine3d.materials
Section 46
//Collision (alternativa.engine3d.physics.Collision)
package alternativa.engine3d.physics {
import alternativa.engine3d.core.*;
import alternativa.types.*;
public class Collision {
public var point:Point3D;
public var offset:Number;
public var normal:Point3D;
public var face:Face;
}
}//package alternativa.engine3d.physics
Section 47
//CollisionPlane (alternativa.engine3d.physics.CollisionPlane)
package alternativa.engine3d.physics {
import alternativa.engine3d.core.*;
public class CollisionPlane {
public var destinationOffset:Number;
public var infront:Boolean;
public var node:BSPNode;
public var sourceOffset:Number;
}
}//package alternativa.engine3d.physics
Section 48
//Plane (alternativa.engine3d.primitives.Plane)
package alternativa.engine3d.primitives {
import alternativa.engine3d.core.*;
import flash.geom.*;
public class Plane extends Mesh {
public function Plane(_arg1:Number=100, _arg2:Number=100, _arg3:uint=1, _arg4:uint=1, _arg5:Boolean=true, _arg6:Boolean=false){
var _local13:int;
var _local14:int;
var _local16:Surface;
var _local17:Surface;
super();
if ((((_arg3 <= 0)) || ((_arg4 <= 0)))){
return;
};
var _local7:Number = (_arg1 / 2);
var _local8:Number = (_arg2 / 2);
var _local9:Number = (_arg1 / _arg3);
var _local10:Number = (_arg2 / _arg4);
var _local11:Number = (1 / _arg3);
var _local12:Number = (1 / _arg4);
var _local15:Array = new Array();
_local14 = 0;
while (_local14 <= _arg4) {
_local15[_local14] = new Array();
_local13 = 0;
while (_local13 <= _arg3) {
_local15[_local14][_local13] = new Point((_local13 * _local11), (_local14 * _local12));
addVertex(((_local13 * _local9) - _local7), ((_local14 * _local10) - _local8), 0, ((_local13 + "_") + _local14));
_local13++;
};
_local14++;
};
if (((_arg5) || (!(_arg6)))){
_local16 = addSurface(null, "front");
};
if (((_arg5) || (_arg6))){
_local17 = addSurface(null, "back");
};
_local14 = 0;
while (_local14 < _arg4) {
_local13 = 0;
while (_local13 < _arg3) {
if (((_arg5) || (!(_arg6)))){
addFace([((_local13 + "_") + _local14), (((_local13 + 1) + "_") + _local14), (((_local13 + 1) + "_") + (_local14 + 1)), ((_local13 + "_") + (_local14 + 1))], ((("front" + _local13) + "_") + _local14));
setUVsToFace(_local15[_local14][_local13], _local15[_local14][(_local13 + 1)], _local15[(_local14 + 1)][(_local13 + 1)], ((("front" + _local13) + "_") + _local14));
_local16.addFace(((("front" + _local13) + "_") + _local14));
};
if (((_arg5) || (_arg6))){
addFace([((_local13 + "_") + _local14), ((_local13 + "_") + (_local14 + 1)), (((_local13 + 1) + "_") + (_local14 + 1)), (((_local13 + 1) + "_") + _local14)], ((("back" + _local13) + "_") + _local14));
setUVsToFace(_local15[(_arg4 - _local14)][_local13], _local15[((_arg4 - _local14) - 1)][_local13], _local15[((_arg4 - _local14) - 1)][(_local13 + 1)], ((("back" + _local13) + "_") + _local14));
_local17.addFace(((("back" + _local13) + "_") + _local14));
};
_local13++;
};
_local14++;
};
}
override protected function createEmptyObject():Object3D{
return (new Plane(0, 0, 0));
}
}
}//package alternativa.engine3d.primitives
Section 49
//alternativa3d (alternativa.engine3d.alternativa3d)
package alternativa.engine3d {
public namespace alternativa3d = "http://3d.alternativaplatform.com";
}//package alternativa.engine3d
Section 50
//Map (alternativa.types.Map)
package alternativa.types {
import flash.utils.*;
public dynamic class Map extends Dictionary {
private var weakKeys:Boolean;
public function Map(_arg1:Boolean=false){
this.weakKeys = _arg1;
super(_arg1);
}
public function clear():void{
var _local1:*;
for (_local1 in this) {
delete this[_local1];
};
}
public function get length():uint{
var _local2:*;
var _local1:uint;
for (_local2 in this) {
_local1++;
};
return (_local1);
}
public function toSet(_arg1:Boolean=false):Set{
var _local3:*;
var _local2:Set = new Set(_arg1);
for each (_local3 in this) {
_local2[_local3] = true;
};
return (_local2);
}
public function isEmpty():Boolean{
var _local1:*;
for (_local1 in this) {
return (false);
};
return (true);
}
public function peek(){
var _local1:*;
for each (_local1 in this) {
return (_local1);
};
return (null);
}
public function clone():Map{
var _local2:*;
var _local1:Map = new Map(weakKeys);
for (_local2 in this) {
_local1[_local2] = this[_local2];
};
return (_local1);
}
public function toArray(_arg1:Boolean=false):Array{
var _local3:*;
var _local2:Array = new Array();
if (_arg1){
for (_local3 in this) {
_local2.push(this[_local3]);
};
} else {
for (_local3 in this) {
_local2[_local3] = this[_local3];
};
};
return (_local2);
}
}
}//package alternativa.types
Section 51
//Matrix3D (alternativa.types.Matrix3D)
package alternativa.types {
public final class Matrix3D {
public var a:Number;
public var b:Number;
public var c:Number;
public var d:Number;
public var e:Number;
public var f:Number;
public var g:Number;
public var h:Number;
public var i:Number;
public var j:Number;
public var k:Number;
public var l:Number;
public function Matrix3D(_arg1:Number=1, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=1, _arg7:Number=0, _arg8:Number=0, _arg9:Number=0, _arg10:Number=0, _arg11:Number=1, _arg12:Number=0){
this.a = _arg1;
this.b = _arg2;
this.c = _arg3;
this.d = _arg4;
this.e = _arg5;
this.f = _arg6;
this.g = _arg7;
this.h = _arg8;
this.i = _arg9;
this.j = _arg10;
this.k = _arg11;
this.l = _arg12;
}
public function clone():Matrix3D{
return (new Matrix3D(a, b, c, d, e, f, g, h, i, j, k, l));
}
public function toString():String{
return (((((((((((((((((((((((("Matrix:\r" + a.toFixed(3)) + "\t") + b.toFixed(3)) + "\t") + c.toFixed(3)) + "\t") + d.toFixed(3)) + "\r") + e.toFixed(3)) + "\t") + f.toFixed(3)) + "\t") + g.toFixed(3)) + "\t") + h.toFixed(3)) + "\r") + i.toFixed(3)) + "\t") + j.toFixed(3)) + "\t") + k.toFixed(3)) + "\t") + l.toFixed(3)));
}
public function scale(_arg1:Number, _arg2:Number, _arg3:Number):void{
a = (a * _arg1);
b = (b * _arg1);
c = (c * _arg1);
d = (d * _arg1);
e = (e * _arg2);
f = (f * _arg2);
g = (g * _arg2);
h = (h * _arg2);
i = (i * _arg3);
j = (j * _arg3);
k = (k * _arg3);
l = (l * _arg3);
}
public function offset(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{
d = _arg1;
h = _arg2;
l = _arg3;
}
public function translate(_arg1:Number, _arg2:Number, _arg3:Number):void{
d = (d + _arg1);
h = (h + _arg2);
l = (l + _arg3);
}
public function equals(_arg1:Matrix3D, _arg2:Number=0):Boolean{
var _local3:Number = (a - _arg1.a);
var _local4:Number = (b - _arg1.b);
var _local5:Number = (c - _arg1.c);
var _local6:Number = (d - _arg1.d);
var _local7:Number = (e - _arg1.e);
var _local8:Number = (f - _arg1.f);
var _local9:Number = (g - _arg1.g);
var _local10:Number = (h - _arg1.h);
var _local11:Number = (i - _arg1.i);
var _local12:Number = (j - _arg1.j);
var _local13:Number = (k - _arg1.k);
var _local14:Number = (l - _arg1.l);
_local3 = ((_local3)<0) ? -(_local3) : _local3;
_local4 = ((_local4)<0) ? -(_local4) : _local4;
_local5 = ((_local5)<0) ? -(_local5) : _local5;
_local6 = ((_local6)<0) ? -(_local6) : _local6;
_local7 = ((_local7)<0) ? -(_local7) : _local7;
_local8 = ((_local8)<0) ? -(_local8) : _local8;
_local9 = ((_local9)<0) ? -(_local9) : _local9;
_local10 = ((_local10)<0) ? -(_local10) : _local10;
_local11 = ((_local11)<0) ? -(_local11) : _local11;
_local12 = ((_local12)<0) ? -(_local12) : _local12;
_local13 = ((_local13)<0) ? -(_local13) : _local13;
_local14 = ((_local14)<0) ? -(_local14) : _local14;
return ((((((((((((((((((((((((_local3 <= _arg2)) && ((_local4 <= _arg2)))) && ((_local5 <= _arg2)))) && ((_local6 <= _arg2)))) && ((_local7 <= _arg2)))) && ((_local8 <= _arg2)))) && ((_local9 <= _arg2)))) && ((_local10 <= _arg2)))) && ((_local11 <= _arg2)))) && ((_local12 <= _arg2)))) && ((_local13 <= _arg2)))) && ((_local14 <= _arg2))));
}
public function toIdentity():void{
a = 1;
b = 0;
c = 0;
d = 0;
e = 0;
f = 1;
g = 0;
h = 0;
i = 0;
j = 0;
k = 1;
l = 0;
}
public function convertToScreen():void{
var _local1:Number = e;
var _local2:Number = f;
var _local3:Number = g;
var _local4:Number = h;
e = -(i);
f = -(j);
g = -(k);
h = -(l);
i = -(_local1);
j = -(_local2);
k = -(_local3);
l = -(_local4);
}
public function rotate(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number = Math.cos(_arg1);
var _local5:Number = Math.sin(_arg1);
var _local6:Number = Math.cos(_arg2);
var _local7:Number = Math.sin(_arg2);
var _local8:Number = Math.cos(_arg3);
var _local9:Number = Math.sin(_arg3);
var _local10:Number = (_local8 * _local7);
var _local11:Number = (_local9 * _local7);
var _local12:Number = (_local8 * _local6);
var _local13:Number = ((_local10 * _local5) - (_local9 * _local4));
var _local14:Number = ((_local10 * _local4) + (_local9 * _local5));
var _local15:Number = (_local9 * _local6);
var _local16:Number = ((_local11 * _local5) + (_local8 * _local4));
var _local17:Number = ((_local11 * _local4) - (_local8 * _local5));
var _local18:Number = -(_local7);
var _local19:Number = (_local6 * _local5);
var _local20:Number = (_local6 * _local4);
var _local21:Number = a;
var _local22:Number = b;
var _local23:Number = c;
var _local24:Number = d;
var _local25:Number = e;
var _local26:Number = f;
var _local27:Number = g;
var _local28:Number = h;
var _local29:Number = i;
var _local30:Number = j;
var _local31:Number = k;
var _local32:Number = l;
a = (((_local12 * _local21) + (_local13 * _local25)) + (_local14 * _local29));
b = (((_local12 * _local22) + (_local13 * _local26)) + (_local14 * _local30));
c = (((_local12 * _local23) + (_local13 * _local27)) + (_local14 * _local31));
d = (((_local12 * _local24) + (_local13 * _local28)) + (_local14 * _local32));
e = (((_local15 * _local21) + (_local16 * _local25)) + (_local17 * _local29));
f = (((_local15 * _local22) + (_local16 * _local26)) + (_local17 * _local30));
g = (((_local15 * _local23) + (_local16 * _local27)) + (_local17 * _local31));
h = (((_local15 * _local24) + (_local16 * _local28)) + (_local17 * _local32));
i = (((_local18 * _local21) + (_local19 * _local25)) + (_local20 * _local29));
j = (((_local18 * _local22) + (_local19 * _local26)) + (_local20 * _local30));
k = (((_local18 * _local23) + (_local19 * _local27)) + (_local20 * _local31));
l = (((_local18 * _local24) + (_local19 * _local28)) + (_local20 * _local32));
}
public function inverseTransform(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Number=1):void{
var _local10:Number = Math.cos(-(_arg4));
var _local11:Number = Math.sin(-(_arg4));
var _local12:Number = Math.cos(-(_arg5));
var _local13:Number = Math.sin(-(_arg5));
var _local14:Number = Math.cos(-(_arg6));
var _local15:Number = Math.sin(-(_arg6));
var _local16:Number = (_local11 * _local13);
var _local17:Number = (1 / _arg7);
var _local18:Number = (1 / _arg8);
var _local19:Number = (1 / _arg9);
var _local20:Number = (_local12 * _local17);
var _local21:Number = (_local10 * _local18);
var _local22:Number = (_local11 * _local19);
var _local23:Number = (_local10 * _local19);
var _local24:Number = (_local14 * _local20);
var _local25:Number = (-(_local15) * _local20);
var _local26:Number = (_local13 * _local17);
var _local27:Number = -((((_local24 * _arg1) + (_local25 * _arg2)) + (_local26 * _arg3)));
var _local28:Number = ((_local15 * _local21) + ((_local16 * _local14) * _local18));
var _local29:Number = ((_local14 * _local21) - ((_local16 * _local15) * _local18));
var _local30:Number = ((-(_local11) * _local12) * _local18);
var _local31:Number = -((((_local28 * _arg1) + (_local29 * _arg2)) + (_local30 * _arg3)));
var _local32:Number = ((_local15 * _local22) - ((_local14 * _local13) * _local23));
var _local33:Number = ((_local14 * _local22) + ((_local13 * _local15) * _local23));
var _local34:Number = (_local12 * _local23);
var _local35:Number = -((((_local32 * _arg1) + (_local33 * _arg2)) + (_local34 * _arg3)));
var _local36:Number = a;
var _local37:Number = b;
var _local38:Number = c;
var _local39:Number = d;
var _local40:Number = e;
var _local41:Number = f;
var _local42:Number = g;
var _local43:Number = h;
var _local44:Number = i;
var _local45:Number = j;
var _local46:Number = k;
var _local47:Number = l;
a = (((_local24 * _local36) + (_local25 * _local40)) + (_local26 * _local44));
b = (((_local24 * _local37) + (_local25 * _local41)) + (_local26 * _local45));
c = (((_local24 * _local38) + (_local25 * _local42)) + (_local26 * _local46));
d = ((((_local24 * _local39) + (_local25 * _local43)) + (_local26 * _local47)) + _local27);
e = (((_local28 * _local36) + (_local29 * _local40)) + (_local30 * _local44));
f = (((_local28 * _local37) + (_local29 * _local41)) + (_local30 * _local45));
g = (((_local28 * _local38) + (_local29 * _local42)) + (_local30 * _local46));
h = ((((_local28 * _local39) + (_local29 * _local43)) + (_local30 * _local47)) + _local31);
i = (((_local32 * _local36) + (_local33 * _local40)) + (_local34 * _local44));
j = (((_local32 * _local37) + (_local33 * _local41)) + (_local34 * _local45));
k = (((_local32 * _local38) + (_local33 * _local42)) + (_local34 * _local46));
l = ((((_local32 * _local39) + (_local33 * _local43)) + (_local34 * _local47)) + _local35);
}
public function invert():void{
var _local1:Number = a;
var _local2:Number = b;
var _local3:Number = c;
var _local4:Number = d;
var _local5:Number = e;
var _local6:Number = f;
var _local7:Number = g;
var _local8:Number = h;
var _local9:Number = i;
var _local10:Number = j;
var _local11:Number = k;
var _local12:Number = l;
var _local13:Number = (((((((-(_local3) * _local6) * _local9) + ((_local2 * _local7) * _local9)) + ((_local3 * _local5) * _local10)) - ((_local1 * _local7) * _local10)) - ((_local2 * _local5) * _local11)) + ((_local1 * _local6) * _local11));
a = (((-(_local7) * _local10) + (_local6 * _local11)) / _local13);
b = (((_local3 * _local10) - (_local2 * _local11)) / _local13);
c = (((-(_local3) * _local6) + (_local2 * _local7)) / _local13);
d = ((((((((_local4 * _local7) * _local10) - ((_local3 * _local8) * _local10)) - ((_local4 * _local6) * _local11)) + ((_local2 * _local8) * _local11)) + ((_local3 * _local6) * _local12)) - ((_local2 * _local7) * _local12)) / _local13);
e = (((_local7 * _local9) - (_local5 * _local11)) / _local13);
f = (((-(_local3) * _local9) + (_local1 * _local11)) / _local13);
g = (((_local3 * _local5) - (_local1 * _local7)) / _local13);
h = ((((((((_local3 * _local8) * _local9) - ((_local4 * _local7) * _local9)) + ((_local4 * _local5) * _local11)) - ((_local1 * _local8) * _local11)) - ((_local3 * _local5) * _local12)) + ((_local1 * _local7) * _local12)) / _local13);
i = (((-(_local6) * _local9) + (_local5 * _local10)) / _local13);
j = (((_local2 * _local9) - (_local1 * _local10)) / _local13);
k = (((-(_local2) * _local5) + (_local1 * _local6)) / _local13);
l = ((((((((_local4 * _local6) * _local9) - ((_local2 * _local8) * _local9)) - ((_local4 * _local5) * _local10)) + ((_local1 * _local8) * _local10)) + ((_local2 * _local5) * _local12)) - ((_local1 * _local6) * _local12)) / _local13);
}
public function inverseCombine(_arg1:Matrix3D):void{
var _local2:Number = a;
var _local3:Number = b;
var _local4:Number = c;
var _local5:Number = d;
var _local6:Number = e;
var _local7:Number = f;
var _local8:Number = g;
var _local9:Number = h;
var _local10:Number = i;
var _local11:Number = j;
var _local12:Number = k;
var _local13:Number = l;
a = (((_local2 * _arg1.a) + (_local3 * _arg1.e)) + (_local4 * _arg1.i));
b = (((_local2 * _arg1.b) + (_local3 * _arg1.f)) + (_local4 * _arg1.j));
c = (((_local2 * _arg1.c) + (_local3 * _arg1.g)) + (_local4 * _arg1.k));
d = ((((_local2 * _arg1.d) + (_local3 * _arg1.h)) + (_local4 * _arg1.l)) + _local5);
e = (((_local6 * _arg1.a) + (_local7 * _arg1.e)) + (_local8 * _arg1.i));
f = (((_local6 * _arg1.b) + (_local7 * _arg1.f)) + (_local8 * _arg1.j));
g = (((_local6 * _arg1.c) + (_local7 * _arg1.g)) + (_local8 * _arg1.k));
h = ((((_local6 * _arg1.d) + (_local7 * _arg1.h)) + (_local8 * _arg1.l)) + _local9);
i = (((_local10 * _arg1.a) + (_local11 * _arg1.e)) + (_local12 * _arg1.i));
j = (((_local10 * _arg1.b) + (_local11 * _arg1.f)) + (_local12 * _arg1.j));
k = (((_local10 * _arg1.c) + (_local11 * _arg1.g)) + (_local12 * _arg1.k));
l = ((((_local10 * _arg1.d) + (_local11 * _arg1.h)) + (_local12 * _arg1.l)) + _local13);
}
public function toTransform(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Number=1):void{
var _local10:Number = Math.cos(_arg4);
var _local11:Number = Math.sin(_arg4);
var _local12:Number = Math.cos(_arg5);
var _local13:Number = Math.sin(_arg5);
var _local14:Number = Math.cos(_arg6);
var _local15:Number = Math.sin(_arg6);
var _local16:Number = (_local14 * _local13);
var _local17:Number = (_local15 * _local13);
var _local18:Number = (_local12 * _arg7);
var _local19:Number = (_local11 * _arg8);
var _local20:Number = (_local10 * _arg8);
var _local21:Number = (_local10 * _arg9);
var _local22:Number = (_local11 * _arg9);
a = (_local14 * _local18);
b = ((_local16 * _local19) - (_local15 * _local20));
c = ((_local16 * _local21) + (_local15 * _local22));
d = _arg1;
e = (_local15 * _local18);
f = ((_local17 * _local19) + (_local14 * _local20));
g = ((_local17 * _local21) - (_local14 * _local22));
h = _arg2;
i = (-(_local13) * _arg7);
j = (_local12 * _local19);
k = (_local12 * _local21);
l = _arg3;
}
public function inverseRotate(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number = Math.cos(-(_arg1));
var _local5:Number = Math.sin(-(_arg1));
var _local6:Number = Math.cos(-(_arg2));
var _local7:Number = Math.sin(-(_arg2));
var _local8:Number = Math.cos(-(_arg3));
var _local9:Number = Math.sin(-(_arg3));
var _local10:Number = (_local5 * _local7);
var _local11:Number = (_local6 * _local8);
var _local12:Number = (-(_local6) * _local9);
var _local13:Number = _local7;
var _local14:Number = ((_local4 * _local9) + (_local10 * _local8));
var _local15:Number = ((_local4 * _local8) - (_local10 * _local9));
var _local16:Number = (-(_local5) * _local6);
var _local17:Number = ((_local5 * _local9) - ((_local4 * _local8) * _local7));
var _local18:Number = ((_local5 * _local8) + ((_local4 * _local7) * _local9));
var _local19:Number = (_local4 * _local6);
var _local20:Number = a;
var _local21:Number = b;
var _local22:Number = c;
var _local23:Number = d;
var _local24:Number = e;
var _local25:Number = f;
var _local26:Number = g;
var _local27:Number = h;
var _local28:Number = i;
var _local29:Number = j;
var _local30:Number = k;
var _local31:Number = l;
a = (((_local11 * _local20) + (_local12 * _local24)) + (_local13 * _local28));
b = (((_local11 * _local21) + (_local12 * _local25)) + (_local13 * _local29));
c = (((_local11 * _local22) + (_local12 * _local26)) + (_local13 * _local30));
d = (((_local11 * _local23) + (_local12 * _local27)) + (_local13 * _local31));
e = (((_local14 * _local20) + (_local15 * _local24)) + (_local16 * _local28));
f = (((_local14 * _local21) + (_local15 * _local25)) + (_local16 * _local29));
g = (((_local14 * _local22) + (_local15 * _local26)) + (_local16 * _local30));
h = (((_local14 * _local23) + (_local15 * _local27)) + (_local16 * _local31));
i = (((_local17 * _local20) + (_local18 * _local24)) + (_local19 * _local28));
j = (((_local17 * _local21) + (_local18 * _local25)) + (_local19 * _local29));
k = (((_local17 * _local22) + (_local18 * _local26)) + (_local19 * _local30));
l = (((_local17 * _local23) + (_local18 * _local27)) + (_local19 * _local31));
}
public function copy(_arg1:Matrix3D):void{
a = _arg1.a;
b = _arg1.b;
c = _arg1.c;
d = _arg1.d;
e = _arg1.e;
f = _arg1.f;
g = _arg1.g;
h = _arg1.h;
i = _arg1.i;
j = _arg1.j;
k = _arg1.k;
l = _arg1.l;
}
public function inverseConvertToScreen():void{
var _local1:Number = b;
var _local2:Number = f;
var _local3:Number = j;
b = -(c);
f = -(g);
j = -(k);
c = -(_local1);
g = -(_local2);
k = -(_local3);
}
public function inverseScale(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:Number = (1 / _arg1);
var _local5:Number = (1 / _arg2);
var _local6:Number = (1 / _arg3);
a = (a * _local4);
b = (b * _local4);
c = (c * _local4);
d = (d * _local4);
e = (e * _local5);
f = (f * _local5);
g = (g * _local5);
h = (h * _local5);
i = (i * _local6);
j = (j * _local6);
k = (k * _local6);
l = (l * _local6);
}
public function transform(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Number=1):void{
var _local10:Number = Math.cos(_arg4);
var _local11:Number = Math.sin(_arg4);
var _local12:Number = Math.cos(_arg5);
var _local13:Number = Math.sin(_arg5);
var _local14:Number = Math.cos(_arg6);
var _local15:Number = Math.sin(_arg6);
var _local16:Number = (_local14 * _local13);
var _local17:Number = (_local15 * _local13);
var _local18:Number = (_local12 * _arg7);
var _local19:Number = (_local11 * _arg8);
var _local20:Number = (_local10 * _arg8);
var _local21:Number = (_local10 * _arg9);
var _local22:Number = (_local11 * _arg9);
var _local23:Number = (_local14 * _local18);
var _local24:Number = ((_local16 * _local19) - (_local15 * _local20));
var _local25:Number = ((_local16 * _local21) + (_local15 * _local22));
var _local26:Number = _arg1;
var _local27:Number = (_local15 * _local18);
var _local28:Number = ((_local17 * _local19) + (_local14 * _local20));
var _local29:Number = ((_local17 * _local21) - (_local14 * _local22));
var _local30:Number = _arg2;
var _local31:Number = (-(_local13) * _arg7);
var _local32:Number = (_local12 * _local19);
var _local33:Number = (_local12 * _local21);
var _local34:Number = _arg3;
var _local35:Number = a;
var _local36:Number = b;
var _local37:Number = c;
var _local38:Number = d;
var _local39:Number = e;
var _local40:Number = f;
var _local41:Number = g;
var _local42:Number = h;
var _local43:Number = i;
var _local44:Number = j;
var _local45:Number = k;
var _local46:Number = l;
a = (((_local23 * _local35) + (_local24 * _local39)) + (_local25 * _local43));
b = (((_local23 * _local36) + (_local24 * _local40)) + (_local25 * _local44));
c = (((_local23 * _local37) + (_local24 * _local41)) + (_local25 * _local45));
d = ((((_local23 * _local38) + (_local24 * _local42)) + (_local25 * _local46)) + _local26);
e = (((_local27 * _local35) + (_local28 * _local39)) + (_local29 * _local43));
f = (((_local27 * _local36) + (_local28 * _local40)) + (_local29 * _local44));
g = (((_local27 * _local37) + (_local28 * _local41)) + (_local29 * _local45));
h = ((((_local27 * _local38) + (_local28 * _local42)) + (_local29 * _local46)) + _local30);
i = (((_local31 * _local35) + (_local32 * _local39)) + (_local33 * _local43));
j = (((_local31 * _local36) + (_local32 * _local40)) + (_local33 * _local44));
k = (((_local31 * _local37) + (_local32 * _local41)) + (_local33 * _local45));
l = ((((_local31 * _local38) + (_local32 * _local42)) + (_local33 * _local46)) + _local34);
}
public function translateLocal(_arg1:Number, _arg2:Number, _arg3:Number):void{
d = (d + (((a * _arg1) + (b * _arg2)) + (c * _arg3)));
h = (h + (((e * _arg1) + (f * _arg2)) + (g * _arg3)));
l = (l + (((i * _arg1) + (j * _arg2)) + (k * _arg3)));
}
public function inverseTranslate(_arg1:Number, _arg2:Number, _arg3:Number):void{
d = (d - _arg1);
h = (h - _arg2);
l = (l - _arg3);
}
public function combine(_arg1:Matrix3D):void{
var _local2:Number = a;
var _local3:Number = b;
var _local4:Number = c;
var _local5:Number = d;
var _local6:Number = e;
var _local7:Number = f;
var _local8:Number = g;
var _local9:Number = h;
var _local10:Number = i;
var _local11:Number = j;
var _local12:Number = k;
var _local13:Number = l;
a = (((_arg1.a * _local2) + (_arg1.b * _local6)) + (_arg1.c * _local10));
b = (((_arg1.a * _local3) + (_arg1.b * _local7)) + (_arg1.c * _local11));
c = (((_arg1.a * _local4) + (_arg1.b * _local8)) + (_arg1.c * _local12));
d = ((((_arg1.a * _local5) + (_arg1.b * _local9)) + (_arg1.c * _local13)) + _arg1.d);
e = (((_arg1.e * _local2) + (_arg1.f * _local6)) + (_arg1.g * _local10));
f = (((_arg1.e * _local3) + (_arg1.f * _local7)) + (_arg1.g * _local11));
g = (((_arg1.e * _local4) + (_arg1.f * _local8)) + (_arg1.g * _local12));
h = ((((_arg1.e * _local5) + (_arg1.f * _local9)) + (_arg1.g * _local13)) + _arg1.h);
i = (((_arg1.i * _local2) + (_arg1.j * _local6)) + (_arg1.k * _local10));
j = (((_arg1.i * _local3) + (_arg1.j * _local7)) + (_arg1.k * _local11));
k = (((_arg1.i * _local4) + (_arg1.j * _local8)) + (_arg1.k * _local12));
l = ((((_arg1.i * _local5) + (_arg1.j * _local9)) + (_arg1.k * _local13)) + _arg1.l);
}
public static function inverseTranslationMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
return (new Matrix3D(1, 0, 0, -(_arg1), 0, 1, 0, -(_arg2), 0, 0, 1, -(_arg3)));
}
public static function translationMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
return (new Matrix3D(1, 0, 0, _arg1, 0, 1, 0, _arg2, 0, 0, 1, _arg3));
}
public static function inverseRotationMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
var _local4:Number = Math.cos(-(_arg1));
var _local5:Number = Math.sin(-(_arg1));
var _local6:Number = Math.cos(-(_arg2));
var _local7:Number = Math.sin(-(_arg2));
var _local8:Number = Math.cos(-(_arg3));
var _local9:Number = Math.sin(-(_arg3));
var _local10:Number = (_local5 * _local7);
return (new Matrix3D((_local6 * _local8), (-(_local6) * _local9), _local7, 0, ((_local4 * _local9) + (_local10 * _local8)), ((_local4 * _local8) - (_local10 * _local9)), (-(_local5) * _local6), 0, ((_local5 * _local9) - ((_local4 * _local8) * _local7)), ((_local5 * _local8) + ((_local4 * _local7) * _local9)), (_local4 * _local6), 0));
}
public static function inverseTransformationMatrix(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Number=1):Matrix3D{
var _local10:Number = Math.cos(-(_arg4));
var _local11:Number = Math.sin(-(_arg4));
var _local12:Number = Math.cos(-(_arg5));
var _local13:Number = Math.sin(-(_arg5));
var _local14:Number = Math.cos(-(_arg6));
var _local15:Number = Math.sin(-(_arg6));
var _local16:Number = (_local11 * _local13);
var _local17:Number = (1 / _arg7);
var _local18:Number = (1 / _arg8);
var _local19:Number = (1 / _arg9);
var _local20:Number = (_local12 * _local17);
var _local21:Number = (_local10 * _local18);
var _local22:Number = (_local11 * _local19);
var _local23:Number = (_local10 * _local19);
var _local24:Number = (_local14 * _local20);
var _local25:Number = (-(_local15) * _local20);
var _local26:Number = (_local13 * _local17);
var _local27:Number = ((_local15 * _local21) + ((_local16 * _local14) * _local18));
var _local28:Number = ((_local14 * _local21) - ((_local16 * _local15) * _local18));
var _local29:Number = ((-(_local11) * _local12) * _local18);
var _local30:Number = ((_local15 * _local22) - ((_local14 * _local13) * _local23));
var _local31:Number = ((_local14 * _local22) + ((_local13 * _local15) * _local23));
var _local32:Number = (_local12 * _local23);
return (new Matrix3D(_local24, _local25, _local26, -((((_local24 * _arg1) + (_local25 * _arg2)) + (_local26 * _arg3))), _local27, _local28, _local29, -((((_local27 * _arg1) + (_local28 * _arg2)) + (_local29 * _arg3))), _local30, _local31, _local32, -((((_local30 * _arg1) + (_local31 * _arg2)) + (_local32 * _arg3)))));
}
public static function inverseMatrix(_arg1:Matrix3D):Matrix3D{
var _local2:Number = (((((((-(_arg1.c) * _arg1.f) * _arg1.i) + ((_arg1.b * _arg1.g) * _arg1.i)) + ((_arg1.c * _arg1.e) * _arg1.j)) - ((_arg1.a * _arg1.g) * _arg1.j)) - ((_arg1.b * _arg1.e) * _arg1.k)) + ((_arg1.a * _arg1.f) * _arg1.k));
var _local3:Number = (((-(_arg1.g) * _arg1.j) + (_arg1.f * _arg1.k)) / _local2);
var _local4:Number = (((_arg1.c * _arg1.j) - (_arg1.b * _arg1.k)) / _local2);
var _local5:Number = (((-(_arg1.c) * _arg1.f) + (_arg1.b * _arg1.g)) / _local2);
var _local6:Number = ((((((((_arg1.d * _arg1.g) * _arg1.j) - ((_arg1.c * _arg1.h) * _arg1.j)) - ((_arg1.d * _arg1.f) * _arg1.k)) + ((_arg1.b * _arg1.h) * _arg1.k)) + ((_arg1.c * _arg1.f) * _arg1.l)) - ((_arg1.b * _arg1.g) * _arg1.l)) / _local2);
var _local7:Number = (((_arg1.g * _arg1.i) - (_arg1.e * _arg1.k)) / _local2);
var _local8:Number = (((-(_arg1.c) * _arg1.i) + (_arg1.a * _arg1.k)) / _local2);
var _local9:Number = (((_arg1.c * _arg1.e) - (_arg1.a * _arg1.g)) / _local2);
var _local10:Number = ((((((((_arg1.c * _arg1.h) * _arg1.i) - ((_arg1.d * _arg1.g) * _arg1.i)) + ((_arg1.d * _arg1.e) * _arg1.k)) - ((_arg1.a * _arg1.h) * _arg1.k)) - ((_arg1.c * _arg1.e) * _arg1.l)) + ((_arg1.a * _arg1.g) * _arg1.l)) / _local2);
var _local11:Number = (((-(_arg1.f) * _arg1.i) + (_arg1.e * _arg1.j)) / _local2);
var _local12:Number = (((_arg1.b * _arg1.i) - (_arg1.a * _arg1.j)) / _local2);
var _local13:Number = (((-(_arg1.b) * _arg1.e) + (_arg1.a * _arg1.f)) / _local2);
var _local14:Number = ((((((((_arg1.d * _arg1.f) * _arg1.i) - ((_arg1.b * _arg1.h) * _arg1.i)) - ((_arg1.d * _arg1.e) * _arg1.j)) + ((_arg1.a * _arg1.h) * _arg1.j)) + ((_arg1.b * _arg1.e) * _arg1.l)) - ((_arg1.a * _arg1.f) * _arg1.l)) / _local2);
return (new Matrix3D(_local3, _local4, _local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12, _local13, _local14));
}
public static function inverseScaleMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
return (new Matrix3D((1 / _arg1), 0, 0, 0, 0, (1 / _arg2), 0, 0, 0, 0, (1 / _arg3), 0));
}
public static function scaleMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
return (new Matrix3D(_arg1, 0, 0, 0, 0, _arg2, 0, 0, 0, 0, _arg3, 0));
}
public static function transformationMatrix(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=0, _arg7:Number=1, _arg8:Number=1, _arg9:Number=1):Matrix3D{
var _local10:Number = Math.cos(_arg4);
var _local11:Number = Math.sin(_arg4);
var _local12:Number = Math.cos(_arg5);
var _local13:Number = Math.sin(_arg5);
var _local14:Number = Math.cos(_arg6);
var _local15:Number = Math.sin(_arg6);
var _local16:Number = (_local14 * _local13);
var _local17:Number = (_local15 * _local13);
var _local18:Number = (_local12 * _arg7);
var _local19:Number = (_local11 * _arg8);
var _local20:Number = (_local10 * _arg8);
var _local21:Number = (_local10 * _arg9);
var _local22:Number = (_local11 * _arg9);
return (new Matrix3D((_local14 * _local18), ((_local16 * _local19) - (_local15 * _local20)), ((_local16 * _local21) + (_local15 * _local22)), _arg1, (_local15 * _local18), ((_local17 * _local19) + (_local14 * _local20)), ((_local17 * _local21) - (_local14 * _local22)), _arg2, (-(_local13) * _arg7), (_local12 * _local19), (_local12 * _local21), _arg3));
}
public static function product(_arg1:Matrix3D, _arg2:Matrix3D):Matrix3D{
return (new Matrix3D((((_arg1.a * _arg2.a) + (_arg1.b * _arg2.e)) + (_arg1.c * _arg2.i)), (((_arg1.a * _arg2.b) + (_arg1.b * _arg2.f)) + (_arg1.c * _arg2.j)), (((_arg1.a * _arg2.c) + (_arg1.b * _arg2.g)) + (_arg1.c * _arg2.k)), ((((_arg1.a * _arg2.d) + (_arg1.b * _arg2.h)) + (_arg1.c * _arg2.l)) + _arg1.d), (((_arg1.e * _arg2.a) + (_arg1.f * _arg2.e)) + (_arg1.g * _arg2.i)), (((_arg1.e * _arg2.b) + (_arg1.f * _arg2.f)) + (_arg1.g * _arg2.j)), (((_arg1.e * _arg2.c) + (_arg1.f * _arg2.g)) + (_arg1.g * _arg2.k)), ((((_arg1.e * _arg2.d) + (_arg1.f * _arg2.h)) + (_arg1.g * _arg2.l)) + _arg1.h), (((_arg1.i * _arg2.a) + (_arg1.j * _arg2.e)) + (_arg1.k * _arg2.i)), (((_arg1.i * _arg2.b) + (_arg1.j * _arg2.f)) + (_arg1.k * _arg2.j)), (((_arg1.i * _arg2.c) + (_arg1.j * _arg2.g)) + (_arg1.k * _arg2.k)), ((((_arg1.i * _arg2.d) + (_arg1.j * _arg2.h)) + (_arg1.k * _arg2.l)) + _arg1.l)));
}
public static function rotationMatrix(_arg1:Number, _arg2:Number, _arg3:Number):Matrix3D{
var _local4:Number = Math.cos(_arg1);
var _local5:Number = Math.sin(_arg1);
var _local6:Number = Math.cos(_arg2);
var _local7:Number = Math.sin(_arg2);
var _local8:Number = Math.cos(_arg3);
var _local9:Number = Math.sin(_arg3);
var _local10:Number = (_local8 * _local7);
var _local11:Number = (_local9 * _local7);
return (new Matrix3D((_local8 * _local6), ((_local10 * _local5) - (_local9 * _local4)), ((_local10 * _local4) + (_local9 * _local5)), 0, (_local9 * _local6), ((_local11 * _local5) + (_local8 * _local4)), ((_local11 * _local4) - (_local8 * _local5)), 0, -(_local7), (_local6 * _local5), (_local6 * _local4), 0));
}
}
}//package alternativa.types
Section 52
//Point3D (alternativa.types.Point3D)
package alternativa.types {
import flash.geom.*;
public final class Point3D {
public var x:Number;
public var y:Number;
public var z:Number;
public function Point3D(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
this.x = _arg1;
this.y = _arg2;
this.z = _arg3;
}
public function floor():void{
x = Math.floor(x);
y = Math.floor(y);
z = Math.floor(z);
}
public function add(_arg1:Point3D):void{
x = (x + _arg1.x);
y = (y + _arg1.y);
z = (z + _arg1.z);
}
public function toString():String{
return (((((("X: " + x.toFixed(3)) + " Y:") + y.toFixed(3)) + " Z:") + z.toFixed(3)));
}
public function multiply(_arg1:Number):void{
x = (x * _arg1);
y = (y * _arg1);
z = (z * _arg1);
}
public function transform(_arg1:Matrix3D):void{
var _local2:Number = x;
var _local3:Number = y;
var _local4:Number = z;
x = ((((_arg1.a * _local2) + (_arg1.b * _local3)) + (_arg1.c * _local4)) + _arg1.d);
y = ((((_arg1.e * _local2) + (_arg1.f * _local3)) + (_arg1.g * _local4)) + _arg1.h);
z = ((((_arg1.i * _local2) + (_arg1.j * _local3)) + (_arg1.k * _local4)) + _arg1.l);
}
public function get length():Number{
return (Math.sqrt((((x * x) + (y * y)) + (z * z))));
}
public function clone():Point3D{
return (new Point3D(x, y, z));
}
public function set length(_arg1:Number):void{
var _local2:Number;
if (((((!((x == 0))) || (!((y == 0))))) || (!((z == 0))))){
_local2 = (_arg1 / length);
x = (x * _local2);
y = (y * _local2);
z = (z * _local2);
} else {
z = _arg1;
};
}
public function normalize():void{
var _local1:Number;
if (((((!((x == 0))) || (!((y == 0))))) || (!((z == 0))))){
_local1 = Math.sqrt((((x * x) + (y * y)) + (z * z)));
x = (x / _local1);
y = (y / _local1);
z = (z / _local1);
} else {
z = 1;
};
}
public function get lengthSqr():Number{
return ((((x * x) + (y * y)) + (z * z)));
}
public function reset():void{
x = 0;
y = 0;
z = 0;
}
public function copy(_arg1:Point3D):void{
x = _arg1.x;
y = _arg1.y;
z = _arg1.z;
}
public function invert():void{
x = -(x);
y = -(y);
z = -(z);
}
public function subtract(_arg1:Point3D):void{
x = (x - _arg1.x);
y = (y - _arg1.y);
z = (z - _arg1.z);
}
public function toPoint():Point{
return (new Point(x, y));
}
public function round():void{
x = Math.round(x);
y = Math.round(y);
z = Math.round(z);
}
public function equals(_arg1:Point3D, _arg2:Number=0):Boolean{
return (((((((((((((x - _arg1.x) <= _arg2)) && (((x - _arg1.x) >= -(_arg2))))) && (((y - _arg1.y) <= _arg2)))) && (((y - _arg1.y) >= -(_arg2))))) && (((z - _arg1.z) <= _arg2)))) && (((z - _arg1.z) >= -(_arg2)))));
}
public static function cross(_arg1:Point3D, _arg2:Point3D):Point3D{
return (new Point3D(((_arg1.y * _arg2.z) - (_arg1.z * _arg2.y)), ((_arg1.z * _arg2.x) - (_arg1.x * _arg2.z)), ((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x))));
}
public static function cross2D(_arg1:Point3D, _arg2:Point3D):Number{
return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)));
}
public static function angle(_arg1:Point3D, _arg2:Point3D):Number{
var _local3:Number = (_arg1.length * _arg2.length);
var _local4:Number = ((_local3)!=0) ? (dot(_arg1, _arg2) / _local3) : 1;
return (Math.acos(_local4));
}
public static function average(_arg1:Point3D, _arg2:Point3D=null, _arg3:Point3D=null, _arg4:Point3D=null):Point3D{
if (_arg2 == null){
return (_arg1.clone());
};
if (_arg3 == null){
return (new Point3D(((_arg1.x + _arg2.x) * 0.5), ((_arg1.y + _arg2.y) * 0.5), ((_arg1.z + _arg2.z) * 0.5)));
};
if (_arg4 == null){
return (new Point3D((((_arg1.x + _arg2.x) + _arg3.x) / 3), (((_arg1.y + _arg2.y) + _arg3.y) / 3), (((_arg1.z + _arg2.z) + _arg3.z) / 3)));
};
return (new Point3D(((((_arg1.x + _arg2.x) + _arg3.x) + _arg4.x) * 0.25), ((((_arg1.y + _arg2.y) + _arg3.y) + _arg4.y) * 0.25), ((((_arg1.z + _arg2.z) + _arg3.z) + _arg4.z) / 0.25)));
}
public static function random(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Point3D{
return (new Point3D((_arg1 + (Math.random() * (_arg2 - _arg1))), (_arg3 + (Math.random() * (_arg4 - _arg3))), (_arg5 + (Math.random() * (_arg6 - _arg5)))));
}
public static function interpolate(_arg1:Point3D, _arg2:Point3D, _arg3:Number=0.5):Point3D{
return (new Point3D((_arg1.x + ((_arg2.x - _arg1.x) * _arg3)), (_arg1.y + ((_arg2.y - _arg1.y) * _arg3)), (_arg1.z + ((_arg2.z - _arg1.z) * _arg3))));
}
public static function dot(_arg1:Point3D, _arg2:Point3D):Number{
return ((((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)) + (_arg1.z * _arg2.z)));
}
public static function sum(_arg1:Point3D, _arg2:Point3D):Point3D{
return (new Point3D((_arg1.x + _arg2.x), (_arg1.y + _arg2.y), (_arg1.z + _arg2.z)));
}
public static function dot2D(_arg1:Point3D, _arg2:Point3D):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function difference(_arg1:Point3D, _arg2:Point3D):Point3D{
return (new Point3D((_arg1.x - _arg2.x), (_arg1.y - _arg2.y), (_arg1.z - _arg2.z)));
}
public static function angleFast(_arg1:Point3D, _arg2:Point3D):Number{
var _local3:Number = dot(_arg1, _arg2);
if (Math.abs(_local3) > 1){
_local3 = ((_local3)>0) ? 1 : -1;
};
return (Math.acos(_local3));
}
}
}//package alternativa.types
Section 53
//Set (alternativa.types.Set)
package alternativa.types {
import flash.utils.*;
public dynamic final class Set extends Dictionary {
private var weakKeys:Boolean;
public function Set(_arg1:Boolean=false){
this.weakKeys = _arg1;
super(_arg1);
}
public function transferToArray(_arg1:Array):void{
var _local2:*;
for (_local2 in this) {
_arg1.push(_local2);
delete this[_local2];
};
}
public function add(_arg1):void{
this[_arg1] = true;
}
public function peek(){
var _local1:*;
for (_local1 in this) {
return (_local1);
};
return (null);
}
public function concatExcluding(_arg1:Set, _arg2:Set):void{
var _local3:*;
for (_local3 in _arg1) {
if (!_arg2.has(_local3)){
this[_local3] = _local3;
};
};
}
public function remove(_arg1):void{
delete this[_arg1];
}
public function get length():uint{
var _local2:*;
var _local1:uint;
for (_local2 in this) {
_local1++;
};
return (_local1);
}
public function take(){
var _local1:*;
for (_local1 in this) {
delete this[_local1];
return (_local1);
};
return (null);
}
public function isEmpty():Boolean{
var _local1:*;
for (_local1 in this) {
return (false);
};
return (true);
}
public function transfer(_arg1:Set):void{
var _local2:*;
for (_local2 in _arg1) {
this[_local2] = true;
delete _arg1[_local2];
};
}
public function clear():void{
var _local1:*;
for (_local1 in this) {
delete this[_local1];
};
}
public function any(){
var _local3:*;
var _local1:uint;
var _local2:uint = (Math.random() * length);
for (_local3 in this) {
if (_local1 == _local2){
return (_local3);
};
_local1++;
};
return (null);
}
public function isSingle():Boolean{
var _local2:*;
var _local1:Boolean;
for (_local2 in this) {
if (_local1){
return (false);
};
_local1 = true;
};
return (_local1);
}
public function concat(_arg1:Set):void{
var _local2:*;
for (_local2 in _arg1) {
this[_local2] = true;
};
}
public function addToArray(_arg1:Array):void{
var _local2:*;
for (_local2 in this) {
_arg1.push(_local2);
};
}
public function toString():String{
var _local2:*;
var _local1 = "";
for (_local2 in this) {
_local1 = (_local1 + ("," + _local2.toString()));
};
return (_local1.substring(1));
}
public function has(_arg1):Boolean{
return (this[_arg1]);
}
public function subtract(_arg1:Set):void{
var _local2:*;
for (_local2 in _arg1) {
delete this[_local2];
};
}
public function clone():Set{
var _local2:*;
var _local1:Set = new Set(weakKeys);
for (_local2 in this) {
_local1[_local2] = true;
};
return (_local1);
}
public function toArray():Array{
var _local2:*;
var _local1:Array = new Array();
for (_local2 in this) {
_local1.push(_local2);
};
return (_local1);
}
}
}//package alternativa.types
Section 54
//Texture (alternativa.types.Texture)
package alternativa.types {
import flash.display.*;
public class Texture {
public var width:uint;
public var height:uint;
public var bitmapData:BitmapData;
public var name:String;
public function Texture(_arg1:BitmapData, _arg2:String=null){
if (_arg1 == null){
throw (new Error("Невозможно создать данные текстуры, т.к. указана null-текстура"));
};
this.bitmapData = _arg1;
width = _arg1.width;
height = _arg1.height;
this.name = _arg2;
}
public function toString():String{
return ((((((("[TextureData " + ((name)!=null) ? name : "") + " ") + width) + "x") + height) + "]"));
}
}
}//package alternativa.types
Section 55
//BitmapUtils (alternativa.utils.BitmapUtils)
package alternativa.utils {
import flash.geom.*;
import flash.display.*;
public class BitmapUtils {
public static function getNonTransparentRect(_arg1:BitmapData):Rectangle{
return ((_arg1.transparent) ? _arg1.getColorBoundsRect(4278190080, 0, false) : _arg1.rect);
}
public static function getFragment(_arg1:BitmapData, _arg2:Rectangle):BitmapData{
var _local3:BitmapData = new BitmapData(_arg2.width, _arg2.height, _arg1.transparent, 0);
_local3.copyPixels(_arg1, _arg2, new Point());
return (_local3);
}
public static function mergeBitmapAlpha(_arg1:BitmapData, _arg2:BitmapData, _arg3:Boolean=false):BitmapData{
var _local4:BitmapData = new BitmapData(_arg1.width, _arg1.height);
_local4.copyPixels(_arg1, _arg1.rect, new Point());
_local4.copyChannel(_arg2, _arg2.rect, new Point(), BitmapDataChannel.RED, BitmapDataChannel.ALPHA);
if (_arg3){
_arg1.dispose();
_arg2.dispose();
};
return (_local4);
}
}
}//package alternativa.utils
Section 56
//FPS (alternativa.utils.FPS)
package alternativa.utils {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.system.*;
public final class FPS extends Sprite {
private var currentY:int;
private var diagramTimer:int;
private var tfTimer:int;
private var downloadedBytes:uint;// = 0
private var socketOutBytes:uint;// = 0
private var socketOutLast:uint;// = 0
private var socketInBytes:uint;// = 0
private var mem:TextField;
private var skn:TextField;
private var diagram:BitmapData;
private var socketOut:TextField;
private var skins:int;// = -1
private var fps:TextField;
private var socketInLast:uint;// = 0
private var tfDelay:int;// = 0
private var socketIn:TextField;
private var dwl:TextField;
private var skinsChanged:int;// = 0
private static const maxMemory:uint = 41943040;
private static const diagramWidth:uint = 60;
private static const tfDelayMax:int = 10;
private static const maxSocket:uint = 4200;
private static const diagramHeight:uint = 40;
private static var instance:FPS;
public function FPS(_arg1:DisplayObjectContainer){
var _local2:Bitmap;
fps = new TextField();
mem = new TextField();
skn = new TextField();
dwl = new TextField();
socketIn = new TextField();
socketOut = new TextField();
super();
if (instance == null){
mouseEnabled = false;
mouseChildren = false;
_arg1.addChild(this);
fps.defaultTextFormat = new TextFormat("Tahoma", 10, 0xCCCCCC);
fps.autoSize = TextFieldAutoSize.LEFT;
fps.text = ("FPS: " + Number(stage.frameRate).toFixed(2));
fps.selectable = false;
fps.x = (-(diagramWidth) - 2);
addChild(fps);
mem.defaultTextFormat = new TextFormat("Tahoma", 10, 0xCCCC00);
mem.autoSize = TextFieldAutoSize.LEFT;
mem.text = ("MEM: " + bytesToString(System.totalMemory));
mem.selectable = false;
mem.x = (-(diagramWidth) - 2);
mem.y = 10;
addChild(mem);
currentY = 20;
skn.defaultTextFormat = new TextFormat("Tahoma", 10, 0xFF6600);
skn.autoSize = TextFieldAutoSize.LEFT;
skn.text = ("MEM: " + bytesToString(System.totalMemory));
skn.selectable = false;
skn.x = (-(diagramWidth) - 2);
dwl.defaultTextFormat = new TextFormat("Tahoma", 10, 0xCC00CC);
dwl.autoSize = TextFieldAutoSize.LEFT;
dwl.selectable = false;
dwl.x = (-(diagramWidth) - 2);
socketIn.defaultTextFormat = new TextFormat("Tahoma", 10, 0xFF00);
socketIn.autoSize = TextFieldAutoSize.LEFT;
socketIn.selectable = false;
socketIn.x = (-(diagramWidth) - 2);
socketOut.defaultTextFormat = new TextFormat("Tahoma", 10, 26367);
socketOut.autoSize = TextFieldAutoSize.LEFT;
socketOut.selectable = false;
socketOut.x = (-(diagramWidth) - 2);
diagram = new BitmapData(diagramWidth, diagramHeight, true, 553648127);
_local2 = new Bitmap(diagram);
_local2.y = (currentY + 4);
_local2.x = -(diagramWidth);
addChildAt(_local2, 0);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(Event.RESIZE, onResize);
onResize();
diagramTimer = getTimer();
tfTimer = getTimer();
} else {
throw (new Error("FPS is a Singleton. Use FPS.init to create FPS instance"));
};
}
private function bytesToString(_arg1:uint):String{
var _local2:String;
if (_arg1 < 0x0400){
_local2 = (String(_arg1) + "b");
} else {
if (_arg1 < 0x2800){
_local2 = (Number((_arg1 / 0x0400)).toFixed(2) + "kb");
} else {
if (_arg1 < 102400){
_local2 = (Number((_arg1 / 0x0400)).toFixed(1) + "kb");
} else {
if (_arg1 < 0x100000){
_local2 = ((_arg1 >> 10) + "kb");
} else {
if (_arg1 < 0xA00000){
_local2 = (Number((_arg1 / 0x100000)).toFixed(2) + "mb");
} else {
if (_arg1 < 104857600){
_local2 = (Number((_arg1 / 0x100000)).toFixed(1) + "mb");
} else {
_local2 = ((_arg1 >> 20) + "mb");
};
};
};
};
};
};
return (_local2);
}
private function onEnterFrame(_arg1:Event):void{
tfDelay++;
if (tfDelay >= tfDelayMax){
tfDelay = 0;
fps.text = ("FPS: " + Number(((1000 * tfDelayMax) / (getTimer() - tfTimer))).toFixed(2));
tfTimer = getTimer();
};
var _local2:Number = (1000 / (getTimer() - diagramTimer));
var _local3:Number = ((_local2)>stage.frameRate) ? 1 : (_local2 / stage.frameRate);
diagramTimer = getTimer();
diagram.scroll(1, 0);
diagram.fillRect(new Rectangle(0, 0, 1, diagram.height), 553648127);
diagram.setPixel32(0, (diagramHeight * (1 - _local3)), 4291611852);
mem.text = ("MEM: " + bytesToString(System.totalMemory));
var _local4:Number = ((skins)==0) ? 0 : (skinsChanged / skins);
diagram.setPixel32(0, (diagramHeight * (1 - _local4)), 4294927872);
var _local5:Number = (System.totalMemory / maxMemory);
diagram.setPixel32(0, (diagramHeight * (1 - _local5)), 4291611648);
var _local6:Number = ((socketInBytes - socketInLast) / maxSocket);
socketInLast = socketInBytes;
diagram.setPixel32(0, (diagramHeight * (1 - _local6)), 4278255360);
var _local7:Number = ((socketOutBytes - socketOutLast) / maxSocket);
socketOutLast = socketOutBytes;
diagram.setPixel32(0, (diagramHeight * (1 - _local7)), 4278216447);
}
private function onResize(_arg1:Event=null):void{
var _local2:Point = parent.globalToLocal(new Point((stage.stageWidth - 2), -3));
x = _local2.x;
y = _local2.y;
}
public static function addDownloadBytes(_arg1:uint):void{
if (instance.downloadedBytes == 0){
instance.dwl.y = instance.currentY;
instance.currentY = (instance.currentY + 10);
instance.addChild(instance.dwl);
instance.getChildAt(0).y = (instance.currentY + 4);
};
instance.downloadedBytes = (instance.downloadedBytes + _arg1);
instance.dwl.text = ("DWL: " + instance.bytesToString(instance.downloadedBytes));
}
public static function init(_arg1:DisplayObjectContainer):void{
instance = new FPS(_arg1);
}
public static function addSocketInBytes(_arg1:uint):void{
if (instance.socketInBytes == 0){
instance.socketIn.y = instance.currentY;
instance.currentY = (instance.currentY + 10);
instance.addChild(instance.socketIn);
instance.getChildAt(0).y = (instance.currentY + 4);
};
instance.socketInBytes = (instance.socketInBytes + _arg1);
instance.socketIn.text = ("IN: " + instance.bytesToString(instance.socketInBytes));
}
public static function addSocketOutBytes(_arg1:uint):void{
if (instance.socketOutBytes == 0){
instance.socketOut.y = instance.currentY;
instance.currentY = (instance.currentY + 10);
instance.addChild(instance.socketOut);
instance.getChildAt(0).y = (instance.currentY + 4);
};
instance.socketOutBytes = (instance.socketOutBytes + _arg1);
instance.socketOut.text = ("OUT: " + instance.bytesToString(instance.socketOutBytes));
}
public static function addSkins(_arg1:uint, _arg2:uint):void{
if (instance.skins < 0){
instance.skn.y = instance.currentY;
instance.currentY = (instance.currentY + 10);
instance.addChild(instance.skn);
instance.getChildAt(0).y = (instance.currentY + 4);
};
instance.skins = _arg1;
instance.skinsChanged = _arg2;
instance.skn.text = ("SKN: " + ((_arg2)>0) ? ((_arg1.toString() + "-") + _arg2.toString()) : _arg1.toString());
}
}
}//package alternativa.utils
Section 57
//MathUtils (alternativa.utils.MathUtils)
package alternativa.utils {
import flash.geom.*;
public final class MathUtils {
public static const DEG30:Number = (Math.PI / 6);
public static const DEG10:Number = (Math.PI / 18);
public static const DEG360:Number = (Math.PI + Math.PI);
public static const DEG1:Number = toRad;
public static const DEG5:Number = (Math.PI / 36);
private static const toDeg:Number = (180 / Math.PI);
private static const toRad:Number = (Math.PI / 180);
public static const DEG180:Number = Math.PI;
public static const DEG60:Number = (Math.PI / 3);
public static const DEG45:Number = (Math.PI / 4);
public static const DEG90:Number = (Math.PI / 2);
public static function vectorCross(_arg1:Point, _arg2:Point):Number{
return (((_arg1.x * _arg2.y) - (_arg1.y * _arg2.x)));
}
public static function segmentDistance(_arg1:Point, _arg2:Point, _arg3:Point):Number{
var _local4:Number = (_arg2.x - _arg1.x);
var _local5:Number = (_arg2.y - _arg1.y);
var _local6:Number = (_arg3.x - _arg1.x);
var _local7:Number = (_arg3.y - _arg1.y);
return ((((_local4 * _local7) - (_local5 * _local6)) / Math.sqrt(((_local4 * _local4) + (_local5 * _local5)))));
}
public static function vectorAngleFast(_arg1:Point, _arg2:Point):Number{
var _local3:Number = vectorDot(_arg1, _arg2);
if (Math.abs(_local3) > 1){
_local3 = ((_local3)>0) ? 1 : -1;
};
return (Math.acos(_local3));
}
public static function randomAngle():Number{
return ((Math.random() * DEG360));
}
public static function vectorAngle(_arg1:Point, _arg2:Point):Number{
var _local3:Number = (_arg1.length * _arg2.length);
var _local4:Number = ((_local3)!=0) ? (vectorDot(_arg1, _arg2) / _local3) : 1;
return (Math.acos(_local4));
}
public static function limitAngle(_arg1:Number):Number{
var _local2:Number = (_arg1 % DEG360);
_local2 = ((_local2)>0) ? ((_local2)>DEG180) ? (_local2 - DEG360) : _local2 : ((_local2)<-(DEG180)) ? (_local2 + DEG360) : _local2;
return (_local2);
}
public static function random(_arg1:Number=NaN, _arg2:Number=NaN):Number{
if (isNaN(_arg1)){
return (Math.random());
};
if (isNaN(_arg2)){
return ((Math.random() * _arg1));
};
return (((Math.random() * (_arg2 - _arg1)) + _arg1));
}
public static function vectorDot(_arg1:Point, _arg2:Point):Number{
return (((_arg1.x * _arg2.x) + (_arg1.y * _arg2.y)));
}
public static function toDegree(_arg1:Number):Number{
return ((_arg1 * toDeg));
}
public static function deltaAngle(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (_arg2 - _arg1);
if (_local3 > DEG180){
return ((_local3 - DEG360));
};
if (_local3 < -(DEG180)){
return ((_local3 + DEG360));
};
return (_local3);
}
public static function toRadian(_arg1:Number):Number{
return ((_arg1 * toRad));
}
public static function triangleHasPoint(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point):Boolean{
if (vectorCross(_arg3.subtract(_arg1), _arg4.subtract(_arg1)) <= 0){
if (vectorCross(_arg2.subtract(_arg3), _arg4.subtract(_arg3)) <= 0){
if (vectorCross(_arg1.subtract(_arg2), _arg4.subtract(_arg2)) <= 0){
return (true);
};
return (false);
} else {
return (false);
};
//unresolved jump
};
return (false);
}
public static function equals(_arg1:Number, _arg2:Number, _arg3:Number=0):Boolean{
return (((((_arg2 - _arg1) <= _arg3)) && (((_arg2 - _arg1) >= -(_arg3)))));
}
}
}//package alternativa.utils
Section 58
//MouseUtils (alternativa.utils.MouseUtils)
package alternativa.utils {
import flash.geom.*;
import flash.display.*;
public class MouseUtils {
private static var _stage:Stage = null;
public static function init(_arg1:Stage):void{
_stage = _arg1;
}
public static function localCoords(_arg1:DisplayObject):Point{
return (_arg1.globalToLocal(globalCoords()));
}
public static function globalCoords(_arg1:Boolean=true):Point{
var _local3:int;
var _local4:int;
var _local2:Point;
if (_stage != null){
_local3 = _stage.mouseX;
_local4 = _stage.mouseY;
if (_arg1){
_local3 = ((_local3)<0) ? 0 : ((_local3)>_stage.stageWidth) ? _stage.stageWidth : _local3;
_local4 = ((_local4)<0) ? 0 : ((_local4)>_stage.stageHeight) ? _stage.stageHeight : _local4;
};
_local2 = new Point(_local3, _local4);
} else {
throw (new Error("MouseUtility don't have link to stage. Use MouseUtility.init(stage) before."));
};
return (_local2);
}
}
}//package alternativa.utils
Section 59
//ObjectUtils (alternativa.utils.ObjectUtils)
package alternativa.utils {
import flash.utils.*;
public class ObjectUtils {
public static function getClassTree(_arg1, _arg2:Class=null):Array{
var _local3:Array = new Array();
var _local4:Class = Class(getDefinitionByName(getQualifiedClassName(_arg1)));
_arg2 = ((_arg2)==null) ? Object : _arg2;
while (_local4 != _arg2) {
_local3.push(_local4);
_local4 = Class(getDefinitionByName(getQualifiedSuperclassName(_local4)));
};
_local3.push(_local4);
return (_local3);
}
public static function getClass(_arg1):Class{
return (Class(getDefinitionByName(getQualifiedClassName(_arg1))));
}
public static function getClassName(_arg1):String{
var _local2:String = getQualifiedClassName(_arg1);
return (_local2.substring((_local2.indexOf("::") + 2)));
}
}
}//package alternativa.utils
Section 60
//TextUtils (alternativa.utils.TextUtils)
package alternativa.utils {
public final class TextUtils {
public static function insertVars(_arg1:String, ... _args):String{
var _local3:String = _arg1;
var _local4 = 1;
while (_local4 <= _args.length) {
_local3 = _local3.replace(("%" + _local4.toString()), _args[(_local4 - 1)]);
_local4++;
};
return (_local3);
}
}
}//package alternativa.utils
Section 61
//BunkerMesh (bunker.BunkerMesh)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class BunkerMesh extends Mesh {
private var loader:Loader;
private var onLoadMethod:Function;
public var material:TextureMaterial;
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = BunkerMesh_Bmp;
public function BunkerMesh(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Bunker");
mobile = 3;
addVertex(-251.980309082079, -393.700798584032, 157.480445312453, "2042");
addVertex(-39.3700872192858, 314.960669921828, 157.48032324214, "2051");
addVertex(-39.3700795898912, 393.700812744093, 157.480307983351, "2052");
addVertex(-23.6220422516344, 330.708930419874, 157.478766845656, "2053");
addVertex(-196.850365234422, -236.220451904344, 31.4961847533705, "1030");
addVertex(275.590522216749, 78.7401727904798, 62.9921869506361, "7");
addVertex(228.350562499953, 259.842536376906, 181.10646765132, "8");
addVertex(181.102363037062, 236.220481323195, 15.7480472793104, "13");
addVertex(-39.3700872192858, 236.220496581984, 157.480338500929, "2054");
addVertex(-181.102348877001, -236.220451904344, 15.7481388320448, "1040");
addVertex(-118.110237670946, -236.220451904344, 0.0001068115234375, "1041");
addVertex(251.98032324214, 314.960669921828, 157.480338500929, "18");
addVertex(-39.3700872192858, 78.7401727904798, 157.480384277296, "2067");
addVertex(-118.110230041551, -157.480339599657, 9.1552734375E-5, "1044");
addVertex(-196.850365234422, -157.480339599657, 31.4961694945814, "1037");
addVertex(192.913398193312, 314.960639404249, 47.2441019286634, "23");
addVertex(283.464545654249, 236.220511840773, 165.35434667964, "24");
addVertex(299.212592529249, 314.960639404249, 102.362204956007, "26");
addVertex(299.212592529249, 236.220496581984, 102.362220214796, "27");
addVertex(-181.102348877001, -157.480339599657, 15.7481312026503, "1045");
addVertex(-267.716484619188, -157.480339599657, 94.4882883300306, "1054");
addVertex(-267.716484619188, -236.220451904344, 94.4883035888197, "1055");
addVertex(-283.464531494188, -157.480339599657, 165.354422973585, "1048");
addVertex(-251.980309082079, -157.480339599657, 157.480414794874, "1050");
addVertex(-39.3700872192858, 3.0517578125E-5, 157.480384277296, "2066");
addVertex(-181.102348877001, -181.102348877001, 196.850470947218, "1064");
addVertex(-78.7401662598131, -181.102348877001, 196.850501464796, "1065");
addVertex(-49.2126012573717, -181.102348877001, 167.322944091749, "1066");
addVertex(-228.350548339891, -181.102348877001, 181.106543945265, "1068");
addVertex(-23.6220422516344, -377.952751709032, 157.478888915968, "2089");
addVertex(283.464545654249, 3.0517578125E-5, 165.354377197218, "50");
addVertex(299.212592529249, 78.7401727904798, 102.362258361769, "52");
addVertex(299.212592529249, 3.0517578125E-5, 102.362273620558, "53");
addVertex(-39.3700719604967, -157.480339599657, 157.480414794874, "2075");
addVertex(78.7401651610853, 55.1181024779798, 196.85044042964, "55");
addVertex(-39.3700872192858, -708.661522460985, 157.480506347609, "2104");
addVertex(-39.3700872192858, -944.88198144536, 157.480536865187, "2097");
addVertex(78.7401651610853, 23.6220697631361, 196.850455688429, "58");
addVertex(39.370086120558, 3.0517578125E-5, 157.480384277296, "59");
addVertex(-181.102348877001, -417.322868896532, 196.850516723585, "1085");
addVertex(49.2126001586439, 23.622039245558, 167.322913574171, "62");
addVertex(-181.102348877001, -212.598381591844, 196.850486206007, "1087");
addVertex(-228.350548339891, -212.598381591844, 181.106559204054, "1083");
addVertex(-78.7401662598131, 23.6220697631361, 196.850455688429, "1093");
addVertex(78.7401651610853, -181.102348877001, 196.850501464796, "70");
addVertex(228.350562499953, -212.598381591844, 181.106559204054, "71");
addVertex(-39.3700872192858, -866.14174707036, 157.480521606398, "2103");
addVertex(-275.590538574266, -157.480339599657, 62.9922250976088, "1098");
addVertex(-228.350548339891, 354.330756591749, 181.106452392531, "2124");
addVertex(-251.980309082079, 3.0517578125E-5, 157.480384277296, "1101");
addVertex(-275.590569091844, 3.0517578125E-5, 62.9921983947279, "1095");
addVertex(-23.6220422516344, -614.173241210985, 157.478934692335, "2111");
addVertex(267.716498779249, -157.480339599657, 94.4882883300306, "81");
addVertex(-39.3700719604967, -472.440910888719, 157.480475830031, "2122");
addVertex(-39.3700872192858, 3.0517578125E-5, 6.866455078125E-5, "1108");
addVertex(299.212592529249, -157.480339599657, 102.362304138136, "85");
addVertex(299.212592529249, -236.220451904344, 102.362319396925, "86");
addVertex(-251.980309082079, 402.88022558589, 157.48032324214, "2127");
addVertex(23.6220468749525, 299.212500976515, -31.4960485229967, "1113");
addVertex(39.3700708617689, -157.480339599657, 0.0001068115234375, "1118");
addVertex(23.6220411529066, -141.732292724657, 157.47885839839, "95");
addVertex(-251.980309082079, 314.960669921828, 157.480338500929, "2129");
addVertex(-39.3700872192858, -393.700798584032, 157.480475830031, "2120");
addVertex(39.370086120558, 314.960639404249, 1.52587890625E-5, "1125");
addVertex(62.9921259154798, 393.826667236281, 23.1102213134291, "102");
addVertex(-228.350548339891, 55.1181024779798, 181.106513427687, "2143");
addVertex(15.7480320205214, -244.094475341844, 165.354468749953, "106");
addVertex(251.98032324214, 402.88022558589, 157.48032324214, "108");
addVertex(228.350562499953, 354.330756591749, 181.106452392531, "109");
addVertex(181.102363037062, 315.449256347609, 196.850379394484, "110");
addVertex(-251.980309082079, 78.7401727904798, 157.480384277296, "2142");
addVertex(39.3700784911634, 393.700812744093, 157.480307983351, "112");
addVertex(31.496062683058, 393.700782226515, 125.984237121535, "114");
addVertex(-116.209625793505, 419.97202246089, 23.1102174987318, "115");
addVertex(-228.350548339891, -417.322868896532, 181.106589721632, "2164");
addVertex(-56.446075988817, 409.448829101515, 149.606284545851, "1142");
addVertex(-251.980309082079, -1032.80141503911, 157.480552123976, "2167");
addVertex(-263.763451171922, 409.444251464796, 110.236205505324, "121");
addVertex(-275.590538574266, 314.960639404249, 62.9921488036634, "122");
addVertex(-181.102348877001, 315.449256347609, 196.850379394484, "1139");
addVertex(-228.350548339891, -984.25209863286, 181.106666015578, "2166");
addVertex(-139.150337768602, 420.227576660109, 135.702552246046, "1155");
addVertex(-228.350548339891, -685.039330078172, 181.106635497999, "2180");
addVertex(-31.4960637817858, 393.700782226515, 125.984237121535, "1160");
addVertex(-181.102348877001, 78.7401727904798, 15.7480777968885, "137");
addVertex(-196.850365234422, 236.220481323195, 31.4960855712416, "139");
addVertex(-62.9921270142077, 393.826667236281, 23.1102213134291, "1164");
addVertex(-251.980309082079, -472.440910888719, 157.480460571242, "2191");
addVertex(-23.6220479736803, 299.212500976515, -31.4960485229967, "1169");
addVertex(-228.350548339891, -448.818901611376, 181.106604980421, "2196");
addVertex(-49.2126012573717, 259.842536376906, 167.322867797804, "151");
addVertex(-228.350548339891, -653.543358398485, 181.10662023921, "2193");
addVertex(-78.7401662598131, 259.842536376906, 196.850409912062, "154");
addVertex(-181.102348877001, 259.842536376906, 196.850394653273, "155");
addVertex(-15.7480350265978, 322.834693359328, 165.35434667964, "156");
addVertex(-78.7401662598131, 55.1181024779798, 196.85044042964, "162");
addVertex(-118.110237670946, 3.0517578125E-5, 6.103515625E-5, "163");
addVertex(-251.980309082079, -629.921288085985, 157.48049108882, "2185");
addVertex(-118.110237670946, -629.921288085985, 0.0001678466796875, "2216");
addVertex(-192.913384033251, -629.921288085985, 47.2442621459486, "2211");
addVertex(-192.913384033251, 3.0517578125E-5, 47.2441591491224, "1196");
addVertex(-267.716484619188, 78.7401727904798, 94.4882349242689, "173");
addVertex(-192.913384033251, 78.7401727904798, 47.2441477050306, "174");
addVertex(-192.913384033251, -944.88198144536, 47.2443079223158, "2224");
addVertex(-192.913384033251, -866.14174707036, 47.244296478224, "2226");
addVertex(-299.212578369188, 78.7401727904798, 102.362258361769, "179");
addVertex(-299.212578369188, 3.0517578125E-5, 102.362273620558, "180");
addVertex(-228.350548339891, 23.6220697631361, 181.106513427687, "181");
addVertex(-181.102348877001, 23.6220697631361, 196.85044042964, "182");
addVertex(-192.913384033251, 314.960639404249, 47.2441019286634, "1207");
addVertex(-192.913384033251, -472.440910888719, 47.2442468871595, "2234");
addVertex(-49.2126012573717, 23.622039245558, 167.322913574171, "187");
addVertex(-192.913384033251, 236.220496581984, 47.2441171874525, "1205");
addVertex(-192.913384033251, -236.220451904344, 47.2442087401869, "1214");
addVertex(-15.7480312119005, 86.6141657104017, 165.354407714796, "191");
addVertex(-15.7480312119005, -7.87402351002675, 165.354407714796, "192");
addVertex(-23.6220422516344, -251.968498779344, 157.478888915968, "2203");
addVertex(-192.913384033251, -157.480339599657, 47.2441972960951, "1219");
addVertex(-267.716484619188, 236.220496581984, 94.4882044066908, "1213");
addVertex(-275.590538574266, -236.220451904344, 62.9922365417005, "198");
addVertex(-267.716484619188, -472.440910888719, 94.4883417357923, "2231");
addVertex(-192.913384033251, -708.661522460985, 47.2442774047377, "2212");
addVertex(-283.464531494188, -236.220451904344, 165.354438232374, "204");
addVertex(-299.212578369188, -157.480339599657, 102.362304138136, "207");
addVertex(-299.212578369188, -236.220451904344, 102.362319396925, "208");
addVertex(-49.2126012573717, -212.598381591844, 167.322959350538, "209");
addVertex(-39.3700872192858, -236.220451904344, 157.480445312453, "212");
addVertex(171.110236572218, -1055.46010644536, 81.8655618896009, "1231");
addVertex(-15.7480312119005, -149.606316162157, 165.354438232374, "216");
addVertex(-192.913384033251, -393.700798584032, 47.2442354430677, "2238");
addVertex(-23.6220422516344, -141.732292724657, 157.47885839839, "219");
addVertex(-23.6220479736803, 15.7479862441542, -31.4959874878405, "222");
addVertex(-23.6220479736803, -173.228386474657, -31.4959493408678, "225");
addVertex(39.3700784911634, -1023.62209375005, 157.480536865187, "1250");
addVertex(181.102363037062, -944.88198144536, 15.7482380141737, "231");
addVertex(196.850379394484, -708.661522460985, 31.4962457885267, "1256");
addVertex(47.2440942992689, -1023.62197167974, 0.000213623046875, "233");
addVertex(196.850379394484, -944.88198144536, 31.4962724914076, "235");
addVertex(275.590552734328, -944.88198144536, 62.9923509826185, "237");
addVertex(251.98032324214, -1032.80141503911, 157.480552123976, "238");
addVertex(181.102363037062, -708.661522460985, 15.7482074965956, "1255");
addVertex(78.7401651610853, -959.763695312547, 196.850593017531, "1249");
addVertex(228.350562499953, -921.260155273485, 181.106666015578, "243");
addVertex(228.350562499953, -984.25209863286, 181.106666015578, "244");
addVertex(181.102363037062, -866.14174707036, 15.7482303847792, "251");
addVertex(251.98032324214, -866.14174707036, 157.480536865187, "1276");
addVertex(251.98032324214, -944.88198144536, 157.480536865187, "1279");
addVertex(275.590552734328, -866.14174707036, 62.9923395385267, "256");
addVertex(267.716498779249, -944.88198144536, 94.4883951415541, "1283");
addVertex(196.850379394484, -866.14174707036, 31.496264862013, "1267");
addVertex(283.464545654249, -944.88198144536, 165.354529785109, "263");
addVertex(299.212592529249, -866.14174707036, 102.362403320265, "265");
addVertex(283.464545654249, -866.14174707036, 165.354529785109, "1290");
addVertex(299.212592529249, -944.88198144536, 102.36241094966, "1284");
addVertex(39.370086120558, -944.88198144536, 157.480536865187, "1294");
addVertex(15.7480358352186, -952.75600488286, 165.354560302687, "271");
addVertex(15.7480320205214, -858.26772363286, 165.354545043898, "272");
addVertex(23.6220411529066, -850.39370019536, 157.478965209913, "273");
addVertex(181.102363037062, -921.260155273485, 196.850593017531, "1299");
addVertex(78.7401651610853, -921.260155273485, 196.850593017531, "1300");
addVertex(49.2126001586439, -921.260155273485, 167.323066162062, "1301");
addVertex(181.102363037062, -629.921288085985, 15.748199867201, "279");
addVertex(181.102363037062, -472.440910888719, 15.7481769790174, "280");
addVertex(49.2126001586439, -889.76381738286, 167.323050903273, "1308");
addVertex(275.590552734328, -472.440910888719, 62.9922746886732, "285");
addVertex(267.716498779249, -708.661522460985, 94.4883646239759, "288");
addVertex(192.913398193312, -708.661522460985, 47.2442774047377, "289");
addVertex(283.464545654249, -629.921288085985, 165.354499267531, "291");
addVertex(283.464545654249, -708.661522460985, 165.354499267531, "292");
addVertex(181.102363037062, -889.76381738286, 196.850577758742, "1317");
addVertex(299.212592529249, -708.661522460985, 102.362380432081, "294");
addVertex(299.212592529249, -629.921288085985, 102.362372802687, "295");
addVertex(23.6220411529066, -960.630272460985, 157.478980468703, "1313");
addVertex(181.102363037062, -448.818901611376, 196.850531982374, "298");
addVertex(78.7401651610853, -653.543358398485, 196.850562499953, "300");
addVertex(49.2126001586439, -653.543358398485, 167.323020385695, "302");
addVertex(49.2126001586439, -685.039330078172, 167.323035644484, "303");
addVertex(196.850379394484, -629.921288085985, 31.4962381591322, "1330");
addVertex(275.590522216749, -708.661522460985, 62.9923128356459, "1332");
addVertex(23.6220411529066, -724.409447265672, 157.478949951124, "309");
addVertex(181.102363037062, -393.700798584032, 15.7481693496229, "311");
addVertex(78.7401651610853, -889.76381738286, 196.850593017531, "1319");
addVertex(192.913398193312, -472.440910888719, 47.2442468871595, "317");
addVertex(228.350562499953, -889.76381738286, 181.106650756788, "1316");
addVertex(283.464545654249, -472.440910888719, 165.354468749953, "320");
addVertex(39.370086120558, -866.14174707036, 157.480521606398, "1295");
addVertex(49.2126001586439, -417.322868896532, 167.322989868117, "324");
addVertex(49.2126001586439, -448.818901611376, 167.323005126906, "325");
addVertex(39.3700708617689, -472.440910888719, 157.480475830031, "326");
addVertex(251.98032324214, -708.661522460985, 157.480506347609, "1349");
addVertex(267.716498779249, -629.921288085985, 94.4883569945814, "1359");
addVertex(23.6220468749525, -929.133812500047, -31.4958501587389, "338");
addVertex(181.102363037062, -653.543358398485, 196.850547241163, "1364");
addVertex(62.9921259154798, -1023.74794824224, 23.1104540099623, "343");
addVertex(31.496062683058, -1023.62209375005, 125.98446600337, "344");
addVertex(181.102363037062, -685.039330078172, 196.850562499953, "1372");
addVertex(78.7401651610853, -685.039330078172, 196.850562499953, "1373");
addVertex(228.350562499953, -653.543358398485, 181.10662023921, "1376");
addVertex(228.350562499953, -685.039330078172, 181.106635497999, "1378");
addVertex(-49.2126012573717, -921.260155273485, 167.323066162062, "363");
addVertex(-181.102348877001, -708.661522460985, 15.7482074965956, "367");
addVertex(-275.590538574266, -866.14174707036, 62.9923395385267, "372");
addVertex(267.716498779249, -866.14174707036, 94.4883875121595, "1400");
addVertex(-283.464531494188, -944.88198144536, 165.354529785109, "377");
addVertex(-283.464531494188, -866.14174707036, 165.354529785109, "378");
addVertex(-299.212578369188, -944.88198144536, 102.36241094966, "379");
addVertex(-181.102348877001, -889.76381738286, 196.850577758742, "384");
addVertex(-23.6220422516344, -960.630272460985, 157.478980468703, "387");
addVertex(118.110236572218, -236.220451904344, 0.0001068115234375, "1416");
addVertex(196.850379394484, -393.700798584032, 31.4962114562513, "1417");
addVertex(-181.102348877001, -472.440910888719, 15.7481769790174, "395");
addVertex(-181.102348877001, -629.921288085985, 15.748199867201, "396");
addVertex(-196.850365234422, -472.440910888719, 31.4962190856459, "397");
addVertex(-275.590538574266, -472.440910888719, 62.9922746886732, "399");
addVertex(267.716498779249, -393.700798584032, 94.4883264770033, "1419");
addVertex(39.370086120558, -708.661522460985, 157.480506347609, "1411");
addVertex(196.850379394484, -472.440910888719, 31.4962190856459, "1429");
addVertex(-251.980309082079, -708.661522460985, 157.480506347609, "406");
addVertex(-283.464531494188, -629.921288085985, 165.354499267531, "408");
addVertex(118.110236572218, -393.700798584032, 0.0001373291015625, "1428");
addVertex(275.590552734328, -393.700798584032, 62.9922632445814, "1420");
addVertex(267.716498779249, -472.440910888719, 94.4883417357923, "1439");
addVertex(-78.7401662598131, -653.543358398485, 196.850562499953, "416");
addVertex(-39.3700872192858, -629.921288085985, 157.48049108882, "418");
addVertex(-15.7480312119005, -716.535423828172, 165.354529785109, "421");
addVertex(299.212592529249, -393.700798584032, 102.362342285109, "1446");
addVertex(283.464545654249, -393.700798584032, 165.354468749953, "1447");
addVertex(251.98032324214, -472.440910888719, 157.480460571242, "1440");
addVertex(-118.110237670946, -393.700798584032, 0.0001373291015625, "425");
addVertex(299.212592529249, -472.440910888719, 102.362349914503, "1442");
addVertex(-267.716484619188, -393.700798584032, 94.4883264770033, "429");
addVertex(228.350562499953, -448.818901611376, 181.106604980421, "1455");
addVertex(78.7401651610853, -448.818901611376, 196.850531982374, "1458");
addVertex(-299.212578369188, -472.440910888719, 102.362349914503, "437");
addVertex(78.7401651610853, -417.322868896532, 196.850531982374, "1467");
addVertex(39.370086120558, -393.700798584032, 157.480475830031, "1453");
addVertex(-23.6220422516344, -488.188957763719, 157.478919433546, "447");
addVertex(23.6220411529066, -377.952751709032, 157.478888915968, "1472");
addVertex(-39.3700872192858, -944.88198144536, 0.00022125244140625, "450");
addVertex(181.102363037062, -417.322868896532, 196.850516723585, "1476");
addVertex(-39.3700719604967, -472.440910888719, 0.000152587890625, "454");
addVertex(-139.150337768602, -1050.14882714849, 135.702796386671, "456");
addVertex(181.102363037062, 314.960639404249, 15.7480320205214, "462");
addVertex(39.370086120558, -629.921288085985, 157.48049108882, "1487");
addVertex(228.350562499953, -417.322868896532, 181.106589721632, "1480");
addVertex(275.590552734328, 314.960639404249, 62.9921488036634, "467");
addVertex(275.590583251906, -629.921288085985, 62.9923013915541, "1492");
addVertex(251.98032324214, -629.921288085985, 157.48049108882, "1498");
addVertex(78.7401651610853, 329.842414306593, 196.850379394484, "476");
addVertex(181.102363037062, 78.7401727904798, 15.7480777968885, "479");
addVertex(275.590552734328, 236.220496581984, 62.992156433058, "484");
addVertex(23.6220468749525, -456.692864013719, -31.4959035645006, "1509");
addVertex(23.6220468749525, -173.228386474657, -31.4959493408678, "1508");
addVertex(196.850379394484, 236.220481323195, 31.4960855712416, "494");
addVertex(118.110236572218, 314.960639404249, 0, "497");
addVertex(196.850379394484, 314.960639404249, 31.4960664977552, "499");
addVertex(23.6220411529066, -614.173241210985, 157.478934692335, "1524");
addVertex(15.7480320205214, -622.047264648485, 165.35451452632, "1525");
addVertex(267.716498779249, 314.960639404249, 94.4881891479017, "502");
addVertex(283.464545654249, 314.960669921828, 165.354331420851, "503");
addVertex(15.7480320205214, -480.314934326219, 165.354499267531, "1530");
addVertex(15.7480320205214, -385.826775146532, 165.354499267531, "1532");
addVertex(251.98032324214, 236.220511840773, 157.480353759718, "510");
addVertex(263.763465331984, -1039.36562402349, 110.23643438716, "1537");
addVertex(78.7401651610853, 291.338843749953, 196.850409912062, "516");
addVertex(181.102363037062, 291.338843749953, 196.850379394484, "517");
addVertex(139.150351928663, -1050.14882714849, 135.702796386671, "1542");
addVertex(49.2126001586439, 259.842536376906, 167.322867797804, "521");
addVertex(49.2126001586439, 291.338843749953, 167.322852539015, "522");
addVertex(181.102363037062, -945.370506835985, 196.850593017531, "1547");
addVertex(181.102363037062, 259.842536376906, 196.850394653273, "529");
addVertex(181.102363037062, 55.1181024779798, 196.85044042964, "533");
addVertex(56.4460748900892, -1039.37014062505, 149.606513427687, "1559");
addVertex(181.102363037062, 3.0517578125E-5, 15.7480930556776, "537");
addVertex(181.102363037062, -157.480339599657, 15.7481312026503, "538");
addVertex(116.209624694777, -1049.89333398442, 23.1104578246595, "1563");
addVertex(196.850379394484, -157.480339599657, 31.4961694945814, "541");
addVertex(275.590583251906, 3.0517578125E-5, 62.9921983947279, "543");
addVertex(196.850379394484, 3.0517578125E-5, 31.496135162306, "544");
addVertex(118.110244201613, 236.220466064406, 1.52587890625E-5, "1570");
addVertex(39.370086120558, 3.0517578125E-5, 6.866455078125E-5, "1575");
addVertex(47.2440942992689, 393.700751708937, -1.52587890625E-5, "1568");
addVertex(196.850379394484, 78.7401727904798, 31.4961160888197, "556");
addVertex(251.98032324214, 78.7401727904798, 157.480384277296, "557");
addVertex(283.464545654249, 78.7401727904798, 165.354377197218, "559");
addVertex(118.110236572218, 3.0517578125E-5, 6.103515625E-5, "1585");
addVertex(267.716498779249, 3.0517578125E-5, 94.4882578124525, "565");
addVertex(251.98032324214, 3.0517578125E-5, 157.480384277296, "566");
addVertex(181.102363037062, -181.102348877001, 196.850470947218, "571");
addVertex(181.102363037062, 23.6220697631361, 196.85044042964, "572");
addVertex(118.110236572218, -708.661522460985, 0.00017547607421875, "1601");
addVertex(228.350562499953, 55.1181024779798, 181.106513427687, "578");
addVertex(49.2126001586439, 55.1180719604017, 167.322913574171, "579");
addVertex(118.110244201613, -866.14174707036, 0.0001983642578125, "1604");
addVertex(15.7480320205214, -716.535423828172, 165.354529785109, "1618");
addVertex(-23.6220422516344, -724.409447265672, 157.478949951124, "1621");
addVertex(-23.6220422516344, -850.39370019536, 157.478965209913, "1622");
addVertex(267.716498779249, 78.7401727904798, 94.4882349242689, "601");
addVertex(78.7401651610853, 259.842536376906, 196.850409912062, "606");
addVertex(196.850379394484, -236.220451904344, 31.4961847533705, "609");
addVertex(118.110236572218, -629.921288085985, 0.0001678466796875, "1636");
addVertex(275.590552734328, -236.220451904344, 62.9922365417005, "613");
addVertex(192.913398193312, -629.921288085985, 47.2442621459486, "1638");
addVertex(275.590552734328, -157.480339599657, 62.9922250976088, "616");
addVertex(23.6220411529066, -488.188957763719, 157.478919433546, "1625");
addVertex(181.102363037062, -236.220451904344, 15.7481388320448, "619");
addVertex(192.913398193312, -866.14174707036, 47.244296478224, "1647");
addVertex(118.110228942824, -157.480339599657, 9.1552734375E-5, "624");
addVertex(118.110236572218, -944.88198144536, 0.00020599365234375, "1649");
addVertex(251.98032324214, -157.480339599657, 157.480414794874, "626");
addVertex(283.464545654249, -157.480339599657, 165.354422973585, "628");
addVertex(192.913398193312, -944.88198144536, 47.2443079223158, "1654");
addVertex(267.716498779249, -236.220451904344, 94.4883035888197, "634");
addVertex(283.464545654249, -236.220451904344, 165.354438232374, "636");
addVertex(118.110228942824, -472.440910888719, 0.0001373291015625, "1663");
addVertex(49.2126001586439, -181.102348877001, 167.322944091749, "640");
addVertex(192.913398193312, -393.700798584032, 47.2442354430677, "1668");
addVertex(49.2126001586439, -212.598381591844, 167.322959350538, "646");
addVertex(-181.102348877001, -944.88198144536, 15.7482380141737, "1673");
addVertex(-171.110222412157, -1055.46010644536, 81.8655618896009, "1674");
addVertex(78.7401651610853, -212.598381591844, 196.850501464796, "654");
addVertex(181.102363037062, -212.598381591844, 196.850486206007, "655");
addVertex(-181.102348877001, -945.370506835985, 196.850593017531, "1682");
addVertex(-275.590538574266, -944.88198144536, 62.9923509826185, "1678");
addVertex(-78.7401662598131, -959.763695312547, 196.850593017531, "1687");
addVertex(-181.102348877001, -866.14174707036, 15.7482303847792, "1689");
addVertex(-196.850365234422, -866.14174707036, 31.496264862013, "1696");
addVertex(23.6220468749525, 15.7479862441542, -31.4959874878405, "676");
addVertex(15.7480358352186, 322.834693359328, 165.35434667964, "677");
addVertex(15.7480320205214, 228.346473144484, 165.354377197218, "680");
addVertex(-15.7480312119005, 228.346473144484, 165.354377197218, "682");
addVertex(15.7480320205214, 86.6141657104017, 165.354407714796, "686");
addVertex(15.7480320205214, -7.87402351002675, 165.354407714796, "687");
addVertex(23.6220411529066, -15.7480464706896, 157.478827880812, "688");
addVertex(15.7480320205214, -149.606316162157, 165.354438232374, "691");
addVertex(-267.716484619188, -944.88198144536, 94.4883951415541, "1716");
addVertex(-196.850365234422, -944.88198144536, 31.4962724914076, "1710");
addVertex(-251.980309082079, -944.88198144536, 157.480536865187, "1711");
addVertex(-15.7480312119005, -244.094475341844, 165.354468749953, "696");
addVertex(-251.980309082079, -866.14174707036, 157.480536865187, "1721");
addVertex(263.763465331984, 409.444251464796, 110.236205505324, "700");
addVertex(-78.7401662598131, -921.260155273485, 196.850593017531, "1727");
addVertex(-267.716484619188, -866.14174707036, 94.4883875121595, "1720");
addVertex(-181.102348877001, -921.260155273485, 196.850593017531, "1729");
addVertex(-299.212578369188, -866.14174707036, 102.362403320265, "1724");
addVertex(-228.350548339891, -921.260155273485, 181.106666015578, "1735");
addVertex(-49.2126012573717, -889.76381738286, 167.323050903273, "1739");
addVertex(139.150351928663, 420.227576660109, 135.702552246046, "708");
addVertex(171.110236572218, 425.53891699214, 81.8653177489759, "720");
addVertex(-228.350548339891, -889.76381738286, 181.106650756788, "1745");
addVertex(56.4460748900892, 409.448829101515, 149.606284545851, "723");
addVertex(-15.7480312119005, -858.26772363286, 165.354545043898, "1740");
addVertex(-78.7401662598131, -889.76381738286, 196.850593017531, "1749");
addVertex(116.209624694777, 419.97202246089, 23.1102174987318, "726");
addVertex(23.6220411529066, 94.4881891479017, 157.478797363234, "732");
addVertex(-275.590569091844, -629.921288085985, 62.9923013915541, "1758");
addVertex(-23.6220422516344, 94.4881891479017, 157.478797363234, "735");
addVertex(-23.6220422516344, 220.472449706984, 157.478797363234, "736");
addVertex(-275.590508056688, -708.661522460985, 62.9923128356459, "1761");
addVertex(-196.850365234422, -629.921288085985, 31.4962381591322, "1759");
addVertex(-118.110237670946, -708.661522460985, 0.00017547607421875, "1769");
addVertex(-196.850365234422, -708.661522460985, 31.4962457885267, "1771");
addVertex(-283.464531494188, -708.661522460985, 165.354499267531, "1774");
addVertex(251.98032324214, -236.220451904344, 157.480414794874, "751");
addVertex(-299.212578369188, -708.661522460985, 102.362380432081, "1778");
addVertex(23.6220411529066, -251.968498779344, 157.478888915968, "757");
addVertex(-299.212578369188, -629.921288085985, 102.362372802687, "1784");
addVertex(23.6220411529066, 330.708930419874, 157.478766845656, "762");
addVertex(39.370086120558, 314.960669921828, 157.48032324214, "763");
addVertex(39.370086120558, 236.220496581984, 157.480338500929, "764");
addVertex(23.6220411529066, 220.472449706984, 157.478797363234, "765");
addVertex(-181.102348877001, -685.039330078172, 196.850562499953, "1792");
addVertex(39.370086120558, 78.7401727904798, 157.480384277296, "770");
addVertex(-49.2126012573717, -685.039330078172, 167.323035644484, "1789");
addVertex(-49.2126012573717, -653.543358398485, 167.323020385695, "1801");
addVertex(-181.102348877001, -448.818901611376, 196.850531982374, "1786");
addVertex(-15.7480312119005, -622.047264648485, 165.35451452632, "1807");
addVertex(39.370086120558, -236.220451904344, 157.480445312453, "786");
addVertex(-181.102348877001, -653.543358398485, 196.850547241163, "1803");
addVertex(39.3700708617689, -157.480339599657, 157.480414794874, "788");
addVertex(251.98032324214, -393.700798584032, 157.480445312453, "789");
addVertex(-267.716484619188, -708.661522460985, 94.4883646239759, "1816");
addVertex(228.350562499953, 291.338843749953, 181.106452392531, "798");
addVertex(-78.7401662598131, -685.039330078172, 196.850562499953, "1829");
addVertex(-196.850365234422, -393.700798584032, 31.4962114562513, "1830");
addVertex(-181.102348877001, -393.700798584032, 15.7481693496229, "1837");
addVertex(228.350562499953, 23.6220697631361, 181.106513427687, "823");
addVertex(228.350562499953, -181.102348877001, 181.106543945265, "826");
addVertex(192.913398193312, 3.0517578125E-5, 47.2441591491224, "831");
addVertex(-283.464531494188, -393.700798584032, 165.354468749953, "1856");
addVertex(-299.212578369188, -393.700798584032, 102.362342285109, "1857");
addVertex(-49.2126012573717, -448.818901611376, 167.323005126906, "1859");
addVertex(192.913398193312, 78.7401727904798, 47.2441477050306, "836");
addVertex(118.110236572218, 78.7401727904798, 4.57763671875E-5, "839");
addVertex(-283.464531494188, -472.440910888719, 165.354468749953, "1847");
addVertex(-49.2126012573717, -417.322868896532, 167.322989868117, "1865");
addVertex(267.716498779249, 236.220496581984, 94.4882044066908, "844");
addVertex(192.913398193312, 236.220496581984, 47.2441171874525, "849");
addVertex(-15.7480312119005, -480.314934326219, 165.354499267531, "1878");
addVertex(-15.7480312119005, -385.826775146532, 165.354499267531, "1882");
addVertex(192.913398193312, -157.480339599657, 47.2441972960951, "860");
addVertex(192.913398193312, -236.220451904344, 47.2442087401869, "861");
addVertex(-78.7401662598131, -448.818901611376, 196.850531982374, "1886");
addVertex(-267.716484619188, -629.921288085985, 94.4883569945814, "1894");
addVertex(-171.110222412157, 425.53891699214, 81.8653177489759, "871");
addVertex(-23.6220479736803, -645.669334960985, -31.495880676317, "1901");
addVertex(-78.7401662598131, 291.338843749953, 196.850409912062, "881");
addVertex(23.6220468749525, -645.669334960985, -31.495880676317, "1906");
addVertex(-78.7401662598131, 329.842414306593, 196.850379394484, "883");
addVertex(39.370086120558, -629.921288085985, 0.00017547607421875, "1910");
addVertex(39.3700708617689, -472.440910888719, 0.000152587890625, "1917");
addVertex(-23.6220479736803, -456.692864013719, -31.4959035645006, "1919");
addVertex(-196.850365234422, 314.960639404249, 31.4960664977552, "897");
addVertex(-181.102348877001, 236.220481323195, 15.7480472793104, "900");
addVertex(-39.3700719604967, -157.480339599657, 0.0001068115234375, "1925");
addVertex(-47.2440953979967, -1023.62197167974, 0.000213623046875, "1926");
addVertex(-181.102348877001, 314.960639404249, 15.7480320205214, "905");
addVertex(-283.464531494188, 314.960669921828, 165.354331420851, "909");
addVertex(-267.716484619188, 314.960639404249, 94.4881891479017, "910");
addVertex(-299.212578369188, 314.960639404249, 102.362204956007, "913");
addVertex(-299.212578369188, 236.220496581984, 102.362220214796, "917");
addVertex(-283.464531494188, 236.220511840773, 165.35434667964, "918");
addVertex(-251.980309082079, 236.220511840773, 157.480353759718, "920");
addVertex(-228.350548339891, 291.338843749953, 181.106452392531, "923");
addVertex(-181.102348877001, 291.338843749953, 196.850379394484, "924");
addVertex(-263.763451171922, -1039.36562402349, 110.23643438716, "1933");
addVertex(-39.3700795898912, -1023.62209375005, 157.480536865187, "1954");
addVertex(-49.2126012573717, 291.338843749953, 167.322852539015, "931");
addVertex(-116.209625793505, -1049.89333398442, 23.1104578246595, "1960");
addVertex(-228.350548339891, 259.842536376906, 181.10646765132, "940");
addVertex(-31.4960637817858, -1023.62209375005, 125.98446600337, "1965");
addVertex(-62.9921270142077, -1023.74794824224, 23.1104540099623, "1966");
addVertex(-56.446075988817, -1039.37014062505, 149.606513427687, "1969");
addVertex(-181.102348877001, 3.0517578125E-5, 15.7480930556776, "948");
addVertex(-196.850365234422, 3.0517578125E-5, 31.496135162306, "951");
addVertex(-118.110237670946, 314.960639404249, 0, "1978");
addVertex(-118.11024530034, 236.220466064406, 1.52587890625E-5, "1979");
addVertex(-196.850365234422, 78.7401727904798, 31.4961160888197, "956");
addVertex(-39.3700872192858, 314.960639404249, 1.52587890625E-5, "1981");
addVertex(-47.2440953979967, 393.700751708937, -1.52587890625E-5, "1975");
addVertex(-118.110237670946, 78.7401727904798, 4.57763671875E-5, "965");
addVertex(-283.464531494188, 78.7401727904798, 165.354377197218, "969");
addVertex(-118.110230041551, -472.440910888719, 0.0001373291015625, "2000");
addVertex(-39.3700872192858, -629.921288085985, 0.00017547607421875, "2002");
addVertex(-283.464531494188, 3.0517578125E-5, 165.354377197218, "979");
addVertex(-267.716484619188, 3.0517578125E-5, 94.4882578124525, "981");
addVertex(-49.2126012573717, 55.1180719604017, 167.322913574171, "985");
addVertex(-181.102348877001, 55.1181024779798, 196.85044042964, "987");
addVertex(-118.110237670946, -944.88198144536, 0.00020599365234375, "2013");
addVertex(-118.11024530034, -866.14174707036, 0.0001983642578125, "2009");
addVertex(39.370086120558, -944.88198144536, 0.00022125244140625, "2019");
addVertex(-23.6220479736803, -929.133812500047, -31.4958501587389, "2021");
addVertex(-15.7480350265978, -952.75600488286, 165.354560302687, "2022");
addVertex(-23.6220422516344, -15.7480464706896, 157.478827880812, "1004");
addVertex(-275.590508056688, 78.7401727904798, 62.9921869506361, "1010");
addVertex(-275.590538574266, 236.220496581984, 62.992156433058, "1013");
addVertex(-251.980309082079, -236.220451904344, 157.480414794874, "2041");
addVertex(-275.590538574266, -393.700798584032, 62.9922632445814, "2034");
addVertex(-78.7401662598131, -212.598381591844, 196.850501464796, "2046");
addVertex(-78.7401662598131, -417.322868896532, 196.850531982374, "2047");
addFace(["1349", "1498", "291", "292"], "0");
setUVsToFace(new Point(0.327172577381134, 0.85982084274292), new Point(0.283411085605621, 0.85982084274292), new Point(0.283411085605621, 0.841784000396729), "0");
addFace(["624", "1118", "1917", "1663", "1428", "1416"], "1");
setUVsToFace(new Point(0.482375987661958, 0.00100000827712014), new Point(0.482375987661958, 0.044761471181633), new Point(0.307330191135406, 0.0447614714503288), "1");
addFace(["1004", "735", "191", "192"], "2");
setUVsToFace(new Point(0.473787426948547, 0.530651211738586), new Point(0.412521362304688, 0.530651211738586), new Point(0.416897491313937, 0.524461785263002), "2");
addFace(["1801", "416", "1886", "1859", "2122", "418"], "3");
setUVsToFace(new Point(0.206678840784189, 0.206472806003681), new Point(0.206678852438927, 0.183264791965485), new Point(0.320458650588989, 0.183264836668968), "3");
addFace(["1055", "198", "1030", "1214"], "4");
setUVsToFace(new Point(0.740647435188293, 0.649797856807709), new Point(0.745176315307617, 0.63233208656311), new Point(0.791980028152466, 0.637889385223389), "4");
addFace(["1508", "1118", "1925", "225"], "5");
setUVsToFace(new Point(0.0754395789126364, 0.150258526206017), new Point(0.0841918811202049, 0.16982926428318), new Point(0.0404304340481758, 0.16982926428318), "5");
addFace(["450", "2002", "1769", "2009", "2013", "1926"], "6");
setUVsToFace(new Point(0.0447613671422005, 0.0885229408740997), new Point(0.219807287965016, 0.0885229239133397), new Point(0.176045773837761, 0.132284390126723), "6");
addFace(["1856", "1857", "429", "2042"], "7");
setUVsToFace(new Point(0.0835447907447815, 0.983741879463196), new Point(0.0474685318768024, 0.982876837253571), new Point(0.0479010455310345, 0.964838743209839), "7");
addFace(["251", "1255", "1601", "1604"], "8");
setUVsToFace(new Point(0.00100001704413444, 0.802795469760895), new Point(0.088522898266094, 0.802795584599501), new Point(0.088522881269455, 0.838882148265839), "8");
addFace(["1621", "418", "2122", "447", "2111"], "9");
setUVsToFace(new Point(0.62241277001724, 0.170902997255325), new Point(0.569899020398594, 0.17965529216988), new Point(0.48237606883049, 0.179655283689499), "9");
addFace(["1965", "1969", "1559", "344"], "10");
setUVsToFace(new Point(0.94523012638092, 0.490400493144989), new Point(0.931363642215729, 0.47462210059166), new Point(0.994105840540322, 0.47462210059166), "10");
addFace(["1618", "309", "1621", "421"], "11");
setUVsToFace(new Point(0.0806185156106949, 0.841589212417603), new Point(0.0849946588277817, 0.847778677940369), new Point(0.0587377846240997, 0.847778677940369), "11");
addFace(["786", "788", "640", "646"], "12");
setUVsToFace(new Point(0.351091653108597, 0.247860297560692), new Point(0.307330203976972, 0.247860291564141), new Point(0.320458650588989, 0.2401242852211), "12");
addFace(["646", "654", "1467", "324", "1453", "786"], "13");
setUVsToFace(new Point(0.337963223457336, 0.2401242852211), new Point(0.337963223457336, 0.216916292905807), new Point(0.451742879258619, 0.216916474019023), "13");
addFace(["1301", "1308", "1316", "243"], "14");
setUVsToFace(new Point(0.901176273822784, 0.271845817565918), new Point(0.901176273822784, 0.289350569248199), new Point(0.801616668701172, 0.289350569248199), "14");
addFace(["1376", "302", "300", "1364"], "15");
setUVsToFace(new Point(0.900746097964365, 0.867333976507163), new Point(0.800962626934052, 0.871085464954376), new Point(0.818003952503204, 0.85533082485199), "15");
addFace(["225", "1925", "454", "1919"], "16");
setUVsToFace(new Point(0.303884416309922, 0.576970097286779), new Point(0.295132100582123, 0.557399332523346), new Point(0.470177918672562, 0.557399272918701), "16");
addFace(["416", "1801", "2193", "1803"], "17");
setUVsToFace(new Point(0.719622594261869, 0.933119081319328), new Point(0.702004671096802, 0.918012142181396), new Point(0.801858603954315, 0.918033421039581), "17");
addFace(["940", "920", "2129", "923"], "18");
setUVsToFace(new Point(0.0804961621761322, 0.27184596657753), new Point(0.0936246251405307, 0.290417015552521), new Point(0.0498631037771702, 0.290417015552521), "18");
addFace(["1716", "1678", "1710", "2224"], "19");
setUVsToFace(new Point(0.757980644702911, 0.702461421489716), new Point(0.76250946521759, 0.684995710849762), new Point(0.809313297271729, 0.690552949905396), "19");
addFace(["1065", "1066", "1068", "1064"], "20");
setUVsToFace(new Point(0.821889375682945, 0.808075876407387), new Point(0.804271399974823, 0.792968928813934), new Point(0.904125273227692, 0.792990207672119), "20");
addFace(["1279", "238", "244", "243", "1316", "1276"], "22");
setUVsToFace(new Point(0.0498630329966545, 0.26913857460022), new Point(0.00100000004749745, 0.269138544797897), new Point(0.0279822831770206, 0.250567504272655), "22");
addFace(["831", "1585", "537", "544"], "23");
setUVsToFace(new Point(0.9093998670578, 0.655950248241425), new Point(0.958552479743958, 0.657290637493134), new Point(0.923983752727509, 0.667646884918213), "23");
addFace(["95", "688", "788", "786", "757"], "24");
setUVsToFace(new Point(0.298577964305878, 0.144646123051643), new Point(0.228559628129005, 0.144646123051643), new Point(0.307330280542374, 0.13589383661747), "24");
addFace(["871", "1155", "2127", "121"], "25");
setUVsToFace(new Point(0.412646225807481, 0.749294451160126), new Point(0.42380952835083, 0.782379567623138), new Point(0.3592209815979, 0.782300770282745), "25");
addFace(["1919", "1509", "1508", "225"], "26");
setUVsToFace(new Point(0.791413486003876, 0.243172988295555), new Point(0.791413486003876, 0.216916128993034), new Point(0.948954641819, 0.216916128993034), "26");
addFace(["1601", "289", "1638", "1636"], "27");
setUVsToFace(new Point(0.0912300050258636, 0.535121440887451), new Point(0.140400841832161, 0.535121440887451), new Point(0.140400826931, 0.578882932662964), "27");
addFace(["696", "2203", "219", "216"], "28");
setUVsToFace(new Point(0.692468702793121, 0.340494990348816), new Point(0.696844837449171, 0.346684395297168), new Point(0.635578751564026, 0.34668442606926), "28");
addFace(["2000", "454", "1925", "1044", "1041", "425"], "29");
setUVsToFace(new Point(0.307330191135406, 0.132284387946129), new Point(0.307330191135406, 0.0885229259729385), new Point(0.482375987661958, 0.0885229686168283), "29");
addFace(["109", "108", "18", "798"], "30");
setUVsToFace(new Point(0.771927177906036, 0.250567704439163), new Point(0.798909544944763, 0.269138753414154), new Point(0.75004647796264, 0.269138753414154), "30");
addFace(["110", "708", "108", "109"], "31");
setUVsToFace(new Point(0.127934562719144, 0.790737052675486), new Point(0.0912299975752831, 0.72954273223877), new Point(0.155809864401817, 0.730602860450745), "31");
addFace(["609", "619", "311", "1417"], "32");
setUVsToFace(new Point(0.756729066371918, 0.565507292747498), new Point(0.756729066371918, 0.577884793281555), new Point(0.669206261634827, 0.577884793281555), "32");
addFace(["786", "1453", "1625", "1472", "757"], "33");
setUVsToFace(new Point(0.351091682910919, 0.135893821716309), new Point(0.438614638719235, 0.135893821716309), new Point(0.491128369136018, 0.144646123051643), "33");
addFace(["948", "163", "1196", "951"], "34");
setUVsToFace(new Point(0.719439804553986, 0.687052607536316), new Point(0.75437152300838, 0.696110492218904), new Point(0.705303013324738, 0.699285864830017), "34");
addFace(["379", "1716", "1720", "1724"], "35");
setUVsToFace(new Point(0.402122735977173, 0.810095250606537), new Point(0.402122735977173, 0.828138589859009), new Point(0.358361214399338, 0.828138649463654), "35");
addFace(["1419", "1420", "1417", "1668"], "36");
setUVsToFace(new Point(0.710578143596649, 0.732847094535828), new Point(0.715107023715973, 0.715381443500519), new Point(0.761910736560822, 0.720938682556152), "36");
addFace(["1476", "1467", "654", "655"], "37");
setUVsToFace(new Point(0.906095743179321, 0.0614993274211884), new Point(0.906095743179321, 0.118389219045639), new Point(0.792315781116486, 0.118389219045639), "37");
addFace(["1299", "243", "244", "1547"], "38");
setUVsToFace(new Point(0.987573146820068, 0.18326473236084), new Point(0.987573146820068, 0.210943356156349), new Point(0.952564060688019, 0.210943356156349), "38");
addFace(["23", "849", "844", "502"], "39");
setUVsToFace(new Point(0.582798480987549, 0.336885571479797), new Point(0.582798480987549, 0.293124109506607), new Point(0.631969332695007, 0.293124109506607), "39");
addFace(["2075", "1004", "219", "2203", "212"], "40");
setUVsToFace(new Point(0.30733027012377, 0.179655290110273), new Point(0.228559666850792, 0.170902997255325), new Point(0.298577964305878, 0.170902997255325), "40");
addFace(["502", "18", "108", "700", "467"], "41");
setUVsToFace(new Point(0.455528121989806, 0.792969525874559), new Point(0.491609752178192, 0.792970716953278), new Point(0.491608172655106, 0.841833770275116), "41");
addFace(["1400", "1276", "1349", "288"], "42");
setUVsToFace(new Point(0.00100000004749745, 0.628041923046112), new Point(0.00100000004749745, 0.591956913471222), new Point(0.088522881269455, 0.591956913471222), "42");
addFace(["1816", "1761", "1771", "2212"], "43");
setUVsToFace(new Point(0.81330543756485, 0.77164089679718), new Point(0.817834046433181, 0.754175175519103), new Point(0.864637970924377, 0.75973242521286), "43");
addFace(["900", "137", "965", "1979"], "44");
setUVsToFace(new Point(0.875923275947571, 0.535121500492096), new Point(0.963446089165031, 0.535121436516753), new Point(0.963446140289307, 0.57120805978775), "44");
addFace(["2167", "456", "1674", "1933"], "45");
setUVsToFace(new Point(0.140186093216145, 0.0563425938506041), new Point(0.204732730984688, 0.0538562797009945), new Point(0.194819614291191, 0.0873409062623978), "45");
addFace(["494", "484", "844", "849"], "46");
setUVsToFace(new Point(0.648875296115875, 0.865313351154327), new Point(0.602311730384827, 0.872615158557892), new Point(0.597133636474609, 0.85533082485199), "46");
addFace(["521", "764", "763", "522"], "47");
setUVsToFace(new Point(0.0753944937601016, 0.240124391274059), new Point(0.0885229110717773, 0.247860416769981), new Point(0.0447614714503288, 0.247860431671143), "47");
addFace(["1524", "326", "1487", "1411", "309"], "48");
setUVsToFace(new Point(0.561146637095173, 0.144646123051643), new Point(0.482375970701175, 0.135893830196696), new Point(0.569899022579193, 0.135893821716309), "48");
addFace(["628", "636", "751", "626"], "49");
setUVsToFace(new Point(0.953851103782654, 0.897118330001831), new Point(0.997612535953522, 0.897118330001831), new Point(0.997612595558167, 0.915155291557312), "49");
addFace(["764", "770", "765", "762"], "50");
setUVsToFace(new Point(0.0885229110717773, 0.135893821716309), new Point(0.17604582382815, 0.135893821716309), new Point(0.0972752124071121, 0.144646123051643), "50");
addFace(["789", "1480", "71", "826", "626", "751"], "51");
setUVsToFace(new Point(0.356193244457245, 0.269138634204865), new Point(0.343064814805984, 0.250567585229874), new Point(0.456844657659531, 0.250567615032196), "51");
addFace(["1682", "456", "2167", "2166"], "52");
setUVsToFace(new Point(0.229885609998651, 0.743366052342978), new Point(0.193181052803993, 0.682171761989594), new Point(0.257760941982269, 0.683231949806213), "52");
addFace(["565", "543", "616", "81"], "53");
setUVsToFace(new Point(0.997228145599365, 0.0370850339531898), new Point(0.997228145599365, 0.055128352393864), new Point(0.909705102443695, 0.0551283396780491), "53");
addFace(["1575", "1125", "1113", "676"], "54");
setUVsToFace(new Point(0.295132100582123, 0.535121440887451), new Point(0.470177918672562, 0.535121500492096), new Point(0.461425602436066, 0.554692208766937), "54");
addFace(["292", "294", "288", "1349"], "55");
setUVsToFace(new Point(0.897738039493561, 0.995746076107025), new Point(0.861661732196808, 0.9948810338974), new Point(0.86209423585712, 0.976842953643431), "55");
addFace(["2196", "1859", "1886", "1786"], "56");
setUVsToFace(new Point(0.800309896469116, 0.909121453762054), new Point(0.700526475906372, 0.912872970104218), new Point(0.717567849622276, 0.89711836294034), "56");
addFace(["708", "110", "476", "723"], "57");
setUVsToFace(new Point(0.898690044879913, 0.340095460414886), new Point(0.827759802341461, 0.347744166851044), new Point(0.847183611829417, 0.293677914137161), "57");
addFace(["1933", "1674", "1710", "1678"], "58");
setUVsToFace(new Point(0.757819890975952, 0.414122819900513), new Point(0.766026198863983, 0.468094170093536), new Point(0.697157319858665, 0.462932640943056), "58");
addFace(["883", "1139", "1155", "1142"], "59");
setUVsToFace(new Point(0.673054337608828, 0.414117091244546), new Point(0.694484293460846, 0.467420041561127), new Point(0.623317897319794, 0.462426424026489), "59");
addFace(["1004", "2075", "2066", "2067", "2054", "736", "735"], "60");
setUVsToFace(new Point(0.228559624918618, 0.170902997255325), new Point(0.307330271441235, 0.179655290110273), new Point(0.219807307907262, 0.17965529859066), "60");
addFace(["1673", "2013", "2224", "1710"], "61");
setUVsToFace(new Point(0.82118558883667, 0.687052607536316), new Point(0.856117069721222, 0.696110248565674), new Point(0.807048980794308, 0.699285774169156), "61");
addFace(["1376", "1455", "1440", "1498"], "62");
setUVsToFace(new Point(0.211780458688736, 0.250567585229874), new Point(0.325560241937637, 0.250567585229874), new Point(0.312431842088699, 0.269138634204865), "62");
addFace(["823", "62", "579", "578"], "63");
setUVsToFace(new Point(0.829096972942352, 0.474622130393982), new Point(0.928656578063965, 0.47462210059166), new Point(0.928656578063965, 0.492126673460007), "63");
addFace(["1359", "1498", "1440", "1439"], "64");
setUVsToFace(new Point(0.909705102443695, 0.0975843667984009), new Point(0.909705102443695, 0.0614993274211884), new Point(0.997228145599365, 0.0614993497729301), "64");
addFace(["1313", "1250", "1954", "387"], "65");
setUVsToFace(new Point(0.753697335720062, 0.144646117491006), new Point(0.788706302642822, 0.135893821716309), new Point(0.788706302642822, 0.17965529859066), "65");
addFace(["338", "2019", "1910", "1906"], "66");
setUVsToFace(new Point(0.660096406936646, 0.494192838668823), new Point(0.651344023422278, 0.474622089905885), new Point(0.826389908790588, 0.474622130393982), "66");
addFace(["139", "1013", "1010", "956"], "67");
setUVsToFace(new Point(0.0912300422787666, 0.726835787296295), new Point(0.0912300050258636, 0.679703176021576), new Point(0.178752915100898, 0.679703134684261), "67");
addFace(["1729", "1727", "1687", "1682"], "68");
setUVsToFace(new Point(0.415251106023788, 0.807388040366788), new Point(0.358361214399338, 0.807388067245483), new Point(0.358361214399338, 0.785989046096802), "68");
addFace(["216", "219", "95", "691"], "69");
setUVsToFace(new Point(0.780382335186005, 0.675685048103333), new Point(0.784758508205414, 0.681874513626099), new Point(0.758501589298248, 0.681874513626099), "69");
addFace(["688", "1004", "192", "687"], "70");
setUVsToFace(new Point(0.784237587052093, 0.7122603058815), new Point(0.757980644702911, 0.7122603058815), new Point(0.762356817722321, 0.706070840358734), "70");
addFace(["497", "1568", "1975", "1978", "1981", "1125"], "71");
setUVsToFace(new Point(0.744944870471954, 0.00100001020399924), new Point(0.788706243038177, 0.0403853207826614), new Point(0.788706243038177, 0.0928990766406059), "71");
addFace(["517", "516", "476", "110"], "72");
setUVsToFace(new Point(0.00100000004749745, 0.897710680961609), new Point(0.0578898936510086, 0.897710680961609), new Point(0.0578898936510086, 0.919109898197539), "72");
addFace(["1040", "1041", "1214", "1030"], "73");
setUVsToFace(new Point(0.803852379322052, 0.634389042854309), new Point(0.838783860206604, 0.643446624279022), new Point(0.789715647697449, 0.646622180938721), "73");
addFace(["1284", "265", "1400", "1283"], "74");
setUVsToFace(new Point(0.905904233455658, 0.876224637031555), new Point(0.949665784835815, 0.8762246966362), new Point(0.949665784835815, 0.894267976284027), "74");
addFace(["1429", "285", "1439", "317"], "75");
setUVsToFace(new Point(0.546960771083832, 0.886207103729248), new Point(0.500397264957428, 0.893508911132813), new Point(0.495219171047211, 0.876224637031555), "75");
addFace(["2211", "2212", "1769", "2216"], "76");
setUVsToFace(new Point(0.465409338474274, 0.353623449802399), new Point(0.465409368276596, 0.397384941577911), new Point(0.416238516569138, 0.397384941577911), "76");
addFace(["2142", "940", "2143", "181", "1101"], "77");
setUVsToFace(new Point(0.181147497058702, 0.290416985750198), new Point(0.0804960988151477, 0.271845936775208), new Point(0.194275945425034, 0.271845936775208), "77");
addFace(["826", "640", "70", "571"], "78");
setUVsToFace(new Point(0.846784486635183, 0.624881253928786), new Point(0.747001111507416, 0.628632724285126), new Point(0.764042437076569, 0.612878143787384), "78");
addFace(["1359", "1638", "289", "288"], "79");
setUVsToFace(new Point(0.189571619033813, 0.578882932662964), new Point(0.140400826931, 0.578882932662964), new Point(0.140400841832161, 0.535121440887451), "79");
addFace(["1373", "303", "1378", "1372"], "80");
setUVsToFace(new Point(0.719693244811337, 0.971199499414363), new Point(0.702075242996216, 0.956092536449432), new Point(0.801929175853729, 0.956113874912262), "80");
addFace(["2196", "2191", "2042", "2164"], "81");
setUVsToFace(new Point(0.474349290132523, 0.271845877170563), new Point(0.487477689981461, 0.290416896343231), new Point(0.443716240849816, 0.290416896343231), "81");
addFace(["1113", "1125", "1981", "1169"], "82");
setUVsToFace(new Point(0.335680485643959, 0.150258511304855), new Point(0.344432771205902, 0.16982926428318), new Point(0.300671279430389, 0.16982926428318), "82");
addFace(["378", "1724", "1720", "1721"], "83");
setUVsToFace(new Point(0.604874491691589, 0.16982926428318), new Point(0.568798243999481, 0.168964251875877), new Point(0.569230735301971, 0.150926098227501), "83");
addFace(["50", "566", "557", "559"], "84");
setUVsToFace(new Point(0.951891779899597, 0.956092536449432), new Point(0.951891779899597, 0.974129438400269), new Point(0.90813022851944, 0.974129438400269), "84");
addFace(["1524", "2111", "447", "1625"], "85");
setUVsToFace(new Point(0.56114673614502, 0.144646123051643), new Point(0.56114673614502, 0.170902997255325), new Point(0.491128385066986, 0.170902997255325), "85");
addFace(["497", "1125", "1575", "839", "1570"], "86");
setUVsToFace(new Point(0.744944766103323, 0.00100000431231076), new Point(0.74494470407326, 0.0447614603729402), new Point(0.569898962974548, 0.0447614602744579), "86");
addFace(["1196", "965", "174", "173", "981"], "87");
setUVsToFace(new Point(0.242351889610291, 0.578882932662964), new Point(0.193181037614678, 0.535121560096777), new Point(0.242351874709129, 0.535121500492096), "87");
addFace(["235", "237", "1283", "1654"], "88");
setUVsToFace(new Point(0.852366864681244, 0.823163032531738), new Point(0.805803298950195, 0.830464839935303), new Point(0.800625264644623, 0.813180506229401), "88");
addFace(["1601", "1910", "2019", "233", "1649", "1604"], "89");
setUVsToFace(new Point(0.176045773837761, 0.0010000043861723), new Point(0.219807287965016, 0.0447614604714223), new Point(0.0447613671422005, 0.0447614602744579), "89");
addFace(["1044", "1219", "1214", "1041"], "90");
setUVsToFace(new Point(0.79231584072113, 0.135893851518631), new Point(0.841486692428589, 0.13589383661747), new Point(0.841486692428589, 0.179655283689499), "90");
addFace(["1837", "1040", "1030", "1830"], "91");
setUVsToFace(new Point(0.991406202316284, 0.262945115566254), new Point(0.903883337974548, 0.262945145368576), new Point(0.903883337974548, 0.250567525625229), "91");
addFace(["174", "965", "137", "956"], "92");
setUVsToFace(new Point(0.748200523328284, 0.856671116211086), new Point(0.797353267669678, 0.858011484146118), new Point(0.762784600257874, 0.868367791175842), "92");
addFace(["2226", "2009", "1689", "1696"], "93");
setUVsToFace(new Point(0.748031973838806, 0.835596024990082), new Point(0.797184526920319, 0.836936414241791), new Point(0.762615859508514, 0.84729266166687), "93");
addFace(["1400", "256", "1267", "1647"], "94");
setUVsToFace(new Point(0.596964955329895, 0.830646216869354), new Point(0.601493775844574, 0.813180506229401), new Point(0.648297488689423, 0.818737864494324), "94");
addFace(["897", "871", "121", "122"], "95");
setUVsToFace(new Point(0.854449812671229, 0.404773939225204), new Point(0.785431504249573, 0.407231658697128), new Point(0.795747458934784, 0.353623449802399), "95");
addFace(["1276", "1316", "1378", "1376", "1498", "1349"], "96");
setUVsToFace(new Point(0.093624547123909, 0.26913857460022), new Point(0.0804960876703262, 0.250567525625229), new Point(0.194275900491982, 0.250567564368285), "96");
addFace(["1250", "1313", "1295", "1294"], "97");
setUVsToFace(new Point(0.788706302642822, 0.135893821716309), new Point(0.753697335720062, 0.144646123051643), new Point(0.70118348966738, 0.135893825956509), "97");
addFace(["1428", "311", "619", "1416"], "98");
setUVsToFace(new Point(0.193181052803993, 0.828620672225952), new Point(0.193181082606316, 0.792534112930298), new Point(0.280703991651535, 0.792534232139587), "98");
addFace(["1559", "1563", "343", "344"], "99");
setUVsToFace(new Point(0.52771133184433, 0.754667103290558), new Point(0.605683565139771, 0.754175126552582), new Point(0.592185825809284, 0.784226488251272), "99");
addFace(["1524", "309", "1618", "1525"], "100");
setUVsToFace(new Point(0.924754114331989, 0.627475676922081), new Point(0.863487958908081, 0.627475678920746), new Point(0.867864072322845, 0.62128621339798), "100");
addFace(["71", "1480", "1476", "655"], "101");
setUVsToFace(new Point(0.666499137878418, 0.562800168991089), new Point(0.552719295024872, 0.562800109386444), new Point(0.552719295024872, 0.535121440887451), "101");
addFace(["985", "187", "181", "2143"], "102");
setUVsToFace(new Point(0.55396831035614, 0.672114491462708), new Point(0.55396831035614, 0.65460991859436), new Point(0.653527915477753, 0.65460991859436), "102");
addFace(["2120", "212", "2089", "447", "2122"], "103");
setUVsToFace(new Point(0.438614636659622, 0.17965529859066), new Point(0.351091704474838, 0.179655311432233), new Point(0.429862352890561, 0.170903006244423), "103");
addFace(["1256", "1332", "288", "289"], "104");
setUVsToFace(new Point(0.64887523651123, 0.886207103729248), new Point(0.602311730384827, 0.893508911132813), new Point(0.597133636474609, 0.876224637031555), "104");
addFace(["13", "479", "556", "494"], "105");
setUVsToFace(new Point(0.695834398269653, 0.747970581054688), new Point(0.608311474323273, 0.747970581054688), new Point(0.608311474323273, 0.735593020915985), "105");
addFace(["1054", "981", "1101", "1050"], "106");
setUVsToFace(new Point(0.323301434516907, 0.389708459377289), new Point(0.235778510570526, 0.389708459377289), new Point(0.235778510570526, 0.353623449802399), "106");
addFace(["1301", "1294", "1295", "1308"], "107");
setUVsToFace(new Point(0.731816530227661, 0.240124136209488), new Point(0.7449447100711, 0.247860159088196), new Point(0.701183319091797, 0.247860178351402), "107");
addFace(["789", "1440", "1455", "1480"], "108");
setUVsToFace(new Point(0.356193291220344, 0.269138634204865), new Point(0.312431842088699, 0.269138634204865), new Point(0.325560241937637, 0.250567585229874), "108");
addFace(["861", "860", "624", "1416"], "109");
setUVsToFace(new Point(0.47713041305542, 0.41412279009819), new Point(0.477130383253098, 0.457884222269058), new Point(0.427959531545639, 0.457884222269058), "109");
addFace(["849", "1570", "13", "494"], "110");
setUVsToFace(new Point(0.646286189556122, 0.856671154499054), new Point(0.695438802242279, 0.858011484146118), new Point(0.66087007522583, 0.868367791175842), "110");
addFace(["235", "1231", "1537", "237"], "111");
setUVsToFace(new Point(0.971805930137634, 0.344245195388794), new Point(0.902820765972137, 0.346732288599014), new Point(0.913169085357581, 0.293153120152904), "111");
addFace(["156", "677", "680", "682"], "112");
setUVsToFace(new Point(0.914069712162018, 0.732886020609056), new Point(0.914069712162018, 0.715381443500519), new Point(0.966583549976349, 0.715381443500519), "112");
addFace(["1213", "920", "2142", "173"], "113");
setUVsToFace(new Point(0.00100000854581594, 0.571206510066986), new Point(0.0010000000654312, 0.53512144088745), new Point(0.0885229259729385, 0.535121440887451), "113");
addFace(["272", "273", "1313", "271"], "114");
setUVsToFace(new Point(0.367460399866104, 0.521993100643158), new Point(0.371836543083191, 0.528182446956635), new Point(0.310570299625397, 0.528182446956635), "114");
addFace(["1213", "910", "913", "917"], "115");
setUVsToFace(new Point(0.951144099235535, 0.915161669254303), new Point(0.907382607460022, 0.915161788463593), new Point(0.907382547855377, 0.897118449211121), "115");
addFace(["2193", "1801", "1789", "2180"], "116");
setUVsToFace(new Point(0.73794037103653, 0.649836599826813), new Point(0.638380765914917, 0.649836599826813), new Point(0.638380765914917, 0.632332026958466), "116");
addFace(["765", "732", "735", "736"], "117");
setUVsToFace(new Point(0.0972752124071121, 0.144646123051643), new Point(0.167293563485146, 0.144646123051643), new Point(0.167293563485146, 0.170902997255325), "117");
addFace(["1364", "300", "1458", "298"], "118");
setUVsToFace(new Point(0.114779815077782, 0.47462210059166), new Point(0.114779815077782, 0.531512022018433), new Point(0.00100000004749745, 0.531512022018433), "118");
addFace(["1882", "2089", "1472", "1532"], "119");
setUVsToFace(new Point(0.988033994305457, 0.535121440887451), new Point(0.992410182952881, 0.541310906410217), new Point(0.966153264045715, 0.541310906410217), "119");
addFace(["1098", "1095", "981", "1054"], "120");
setUVsToFace(new Point(0.323301434516907, 0.407751768827438), new Point(0.235778510570526, 0.407751766642093), new Point(0.235778510570526, 0.389708459377289), "120");
addFace(["1213", "917", "918", "920"], "121");
setUVsToFace(new Point(0.319768488407135, 0.929388582706451), new Point(0.319493532180786, 0.947429895401001), new Point(0.283411085605621, 0.946879863739014), "121");
addFace(["566", "626", "823", "578", "557"], "122");
setUVsToFace(new Point(0.575000524520874, 0.269138693809509), new Point(0.48747737420237, 0.269138693809509), new Point(0.58812894973726, 0.250567644834518), "122");
addFace(["1411", "273", "1622", "309"], "123");
setUVsToFace(new Point(0.613660506662191, 0.135893822109981), new Point(0.692431092262268, 0.144646123051643), new Point(0.692431092262268, 0.170902997255325), "123");
addFace(["1300", "1301", "243", "1299"], "124");
setUVsToFace(new Point(0.616229896530053, 0.989915894315639), new Point(0.598612010478973, 0.974808931350708), new Point(0.698465883731842, 0.974830269813538), "124");
addFace(["395", "2000", "2234", "397"], "125");
setUVsToFace(new Point(0.774764537811279, 0.756232082843781), new Point(0.809696018695831, 0.765289723873138), new Point(0.760627788228771, 0.768465241184097), "125");
addFace(["1066", "209", "1083", "1068"], "126");
setUVsToFace(new Point(0.55396831035614, 0.702500343322754), new Point(0.55396831035614, 0.684995710849762), new Point(0.653527915477753, 0.684995710849762), "126");
addFace(["2120", "2122", "1859", "1865"], "127");
setUVsToFace(new Point(0.351091653108597, 0.214208871126175), new Point(0.307330220937729, 0.214208856225014), new Point(0.320458650588989, 0.206472858786583), "127");
addFace(["216", "691", "106", "696"], "128");
setUVsToFace(new Point(0.805538535118103, 0.973597168922424), new Point(0.805538535118103, 0.956092536449432), new Point(0.858052372932434, 0.956092536449432), "128");
addFace(["1830", "2034", "429", "2238"], "129");
setUVsToFace(new Point(0.648706495761871, 0.844238221645355), new Point(0.602142989635468, 0.85154002904892), new Point(0.596964955329895, 0.834255695343018), "129");
addFace(["102", "726", "723", "114"], "130");
setUVsToFace(new Point(0.540021896362305, 0.745949029922485), new Point(0.527711391448975, 0.715381443500519), new Point(0.60560348588367, 0.718921250685368), "130");
addFace(["447", "2089", "1882", "1878"], "131");
setUVsToFace(new Point(0.681406736373901, 0.409652531147003), new Point(0.620140650488819, 0.409652589900228), new Point(0.624516785144806, 0.403463125228882), "131");
addFace(["1048", "207", "1054", "1050"], "132");
setUVsToFace(new Point(0.944206476211548, 0.995739638805389), new Point(0.90813022851944, 0.994874656200409), new Point(0.908562799981346, 0.976836578198018), "132");
addFace(["723", "726", "720", "708"], "133");
setUVsToFace(new Point(0.193181052803993, 0.747953653335571), new Point(0.27114927689921, 0.746960922748824), new Point(0.255469650030136, 0.788924753665924), "133");
addFace(["2053", "2052", "112", "762"], "134");
setUVsToFace(new Point(0.036009032279253, 0.170902997255325), new Point(0.00100000004749745, 0.17965529859066), new Point(0.00100000004749745, 0.135893821716309), "134");
addFace(["700", "720", "499", "467"], "135");
setUVsToFace(new Point(0.640430688858032, 0.47462210059166), new Point(0.648636996746063, 0.52859354019165), new Point(0.579768015080538, 0.523432014462949), "135");
addFace(["1745", "1739", "363", "1735"], "136");
setUVsToFace(new Point(0.901176273822784, 0.268072217702866), new Point(0.801616668701172, 0.268072217702866), new Point(0.801616668701172, 0.250567525625229), "136");
addFace(["1917", "1118", "1508", "1509"], "137");
setUVsToFace(new Point(0.768733203411102, 0.41412279009819), new Point(0.943778991699219, 0.414122819900513), new Point(0.935026738556309, 0.433693557841855), "137");
addFace(["1472", "2089", "212", "2203"], "138");
setUVsToFace(new Point(0.429862320423126, 0.144646123051643), new Point(0.429862320423126, 0.170902997255325), new Point(0.351091666979951, 0.179655298196988), "138");
addFace(["317", "1439", "1419", "1668"], "139");
setUVsToFace(new Point(0.567360401153564, 0.353623449802399), new Point(0.616531252861023, 0.353623449802399), new Point(0.616531252861023, 0.397384852170944), "139");
addFace(["2142", "1101", "979", "969"], "140");
setUVsToFace(new Point(0.0447614528238773, 0.982875645160675), new Point(0.00100000004749745, 0.982875645160675), new Point(0.00100000004749745, 0.964838743209839), "140");
addFace(["114", "723", "1142", "1160"], "141");
setUVsToFace(new Point(0.489774167537689, 0.620548725128174), new Point(0.47590771317482, 0.604770243167877), new Point(0.53864985704422, 0.604770243167877), "141");
addFace(["372", "1696", "1771", "1761"], "142");
setUVsToFace(new Point(0.088522881269455, 0.648792266845703), new Point(0.0885228897677767, 0.695924836783097), new Point(0.00100000854581594, 0.695924937725067), "142");
addFace(["687", "192", "191", "686"], "143");
setUVsToFace(new Point(0.96756500005722, 0.754175126552582), new Point(0.96756500005722, 0.771679759025574), new Point(0.915051162242889, 0.771679759025574), "143");
addFace(["1055", "208", "204", "2041"], "144");
setUVsToFace(new Point(0.083825945854187, 0.922360479831696), new Point(0.0835509598255157, 0.9404017329216), new Point(0.0474685318768024, 0.939851760864258), "144");
addFace(["279", "1636", "1638", "1330"], "145");
setUVsToFace(new Point(0.558424115180969, 0.815237462520599), new Point(0.593355498822821, 0.824294856169375), new Point(0.544287323951721, 0.827470660209656), "145");
addFace(["1045", "948", "951", "1037"], "146");
setUVsToFace(new Point(0.997228145599365, 0.130712389945984), new Point(0.909705102443695, 0.130712419748306), new Point(0.909705102443695, 0.118334800004959), "146");
addFace(["2211", "2216", "396", "1759"], "147");
setUVsToFace(new Point(0.908878982067108, 0.686335980892181), new Point(0.958031535148621, 0.68767637014389), new Point(0.923462867736816, 0.69803261756897), "147");
addFace(["544", "537", "538", "541"], "148");
setUVsToFace(new Point(0.640242278575897, 0.565507292747498), new Point(0.640242278575897, 0.577884855884456), new Point(0.552719295024872, 0.577884793281555), "148");
addFace(["1231", "1563", "1559", "1542"], "149");
setUVsToFace(new Point(0.105251602828503, 0.836878061294556), new Point(0.0912291096116459, 0.794332011593697), new Point(0.169098556041718, 0.798380494117737), "149");
addFace(["2041", "2042", "2034", "198", "1055"], "150");
setUVsToFace(new Point(0.118389241397381, 0.47462210059166), new Point(0.205912172794342, 0.47462210059166), new Point(0.205912172794342, 0.528750419616699), "150");
addFace(["1856", "2042", "2191", "1847"], "151");
setUVsToFace(new Point(0.481242805719376, 0.900226533412933), new Point(0.481242805719376, 0.91826343536377), new Point(0.43748140335083, 0.91826343536377), "151");
addFace(["280", "1663", "1636", "279"], "152");
setUVsToFace(new Point(0.525004327297211, 0.715381498734481), new Point(0.525004327297211, 0.751468062400818), new Point(0.43748140335083, 0.751468002796173), "152");
addFace(["2041", "204", "1048", "1050"], "153");
setUVsToFace(new Point(0.358361214399338, 0.848882555961609), new Point(0.358361214399338, 0.830845654010773), new Point(0.402122676372528, 0.830845654010773), "153");
addFace(["987", "155", "154", "162"], "154");
setUVsToFace(new Point(0.349558293819427, 0.350013971328735), new Point(0.235778525471687, 0.350013971328735), new Point(0.235778525471687, 0.293124079704285), "154");
addFace(["981", "180", "979", "1101"], "155");
setUVsToFace(new Point(0.319768458604813, 0.971972405910492), new Point(0.319493502378464, 0.990013599395752), new Point(0.283411085605621, 0.989463627338409), "155");
addFace(["881", "931", "923", "924"], "156");
setUVsToFace(new Point(0.820058941841125, 0.891331553459167), new Point(0.802441000938416, 0.876224637031555), new Point(0.902294817883601, 0.876245951686149), "156");
addFace(["1710", "1674", "1960", "1673"], "157");
setUVsToFace(new Point(0.193181052803993, 0.884347677230835), new Point(0.260724540034112, 0.870112537871517), new Point(0.260277897119522, 0.914917469024658), "157");
addFace(["476", "112", "723"], "158");
setUVsToFace(new Point(0.139289826154709, 0.0857560709118843), new Point(0.0979738235473633, 0.0631706044077873), new Point(0.100487887859344, 0.0497728772461414), "158");
addFace(["1568", "726", "102"], "159");
setUVsToFace(new Point(0.251596629619598, 0.532384872436523), new Point(0.208619251847267, 0.531930088996887), new Point(0.240038707852364, 0.521993100643158), "159");
addFace(["883", "881", "924", "1139"], "160");
setUVsToFace(new Point(0.283411085605621, 0.816799240696318), new Point(0.283411085605621, 0.795400023460388), new Point(0.340300977230072, 0.795400023460388), "160");
addFace(["1279", "1276", "1290", "263"], "161");
setUVsToFace(new Point(0.994585454463959, 0.873367726802826), new Point(0.950824022293091, 0.873367726802826), new Point(0.950824022293091, 0.85533082485199), "161");
addFace(["1530", "1625", "447", "1878"], "162");
setUVsToFace(new Point(0.882128059864044, 0.675503671169281), new Point(0.886504232883453, 0.681693136692047), new Point(0.860247379941218, 0.681693136692047), "162");
addFace(["1083", "2164", "2042", "2041", "1050", "1068"], "163");
setUVsToFace(new Point(0.343064874410629, 0.271845906972885), new Point(0.456844750701874, 0.271845906972885), new Point(0.443716316931383, 0.290416955947876), "163");
addFace(["251", "1604", "1647", "1267"], "164");
setUVsToFace(new Point(0.660169839859009, 0.815237462520599), new Point(0.695101228091837, 0.824294838873956), new Point(0.646033048629761, 0.827470660209656), "164");
addFace(["1696", "372", "1720", "2226"], "165");
setUVsToFace(new Point(0.75062108039856, 0.844238221645355), new Point(0.704057585800433, 0.851540107350841), new Point(0.698879420757294, 0.834255695343018), "165");
addFace(["271", "1313", "387", "2022"], "166");
setUVsToFace(new Point(0.481076538562775, 0.0750335639085739), new Point(0.474887043237686, 0.0794097036123276), new Point(0.474887043237686, 0.0531528294086456), "166");
addFace(["1759", "1758", "1894", "2211"], "167");
setUVsToFace(new Point(0.911468088626862, 0.6949782371521), new Point(0.864904463291168, 0.702279984951019), new Point(0.85972648859024, 0.684995710849762), "167");
addFace(["1919", "454", "1917", "1509"], "168");
setUVsToFace(new Point(0.00975228846073151, 0.941387593746185), new Point(0.00100000004749745, 0.921816945075989), new Point(0.0447614528238773, 0.921816945075989), "168");
addFace(["52", "601", "565", "53"], "169");
setUVsToFace(new Point(0.947948217391968, 0.834255814552307), new Point(0.947948217391968, 0.852299094200134), new Point(0.9041867852211, 0.852298974990845), "169");
addFace(["181", "187", "1093", "182"], "170");
setUVsToFace(new Point(0.900577422034343, 0.846258815421929), new Point(0.800793945789337, 0.850010275840759), new Point(0.81783527135849, 0.834255695343018), "170");
addFace(["2180", "1745", "1721", "406", "2185", "2193"], "171");
setUVsToFace(new Point(0.605633556842804, 0.27184584736824), new Point(0.719413459300995, 0.271845817565918), new Point(0.706285053897366, 0.290416843616067), "171");
addFace(["521", "606", "55", "579", "770", "764"], "172");
setUVsToFace(new Point(0.0753945460474893, 0.240124482890967), new Point(0.0753945481070874, 0.216916475674493), new Point(0.18917427957058, 0.216916337609291), "172");
addFace(["1169", "1981", "1108", "222"], "173");
setUVsToFace(new Point(0.367113560438156, 0.651902794837952), new Point(0.358361183922923, 0.632332077608491), new Point(0.533407032489777, 0.63233208656311), "173");
addFace(["2166", "2167", "1711", "1721", "1745", "1735"], "174");
setUVsToFace(new Point(0.77192730728899, 0.271845817565918), new Point(0.798909564480786, 0.290416836738586), new Point(0.750046491622925, 0.290416836738586), "174");
addFace(["613", "751", "634"], "175");
setUVsToFace(new Point(0.323301404714584, 0.46825110912323), new Point(0.323301404714584, 0.41412279009819), new Point(0.323301404714584, 0.45020779967308), "175");
addFace(["931", "151", "940", "923"], "176");
setUVsToFace(new Point(0.53611421585083, 0.649836838245392), new Point(0.53611421585083, 0.63233208656311), new Point(0.635673761367798, 0.63233208656311), "176");
addFace(["871", "115", "1142", "1155"], "177");
setUVsToFace(new Point(0.908288538455963, 0.178441017866135), new Point(0.894266055267118, 0.135894867048592), new Point(0.972135424613953, 0.139943435788155), "177");
addFace(["1739", "1749", "1829", "1789", "2104", "2103"], "178");
setUVsToFace(new Point(0.0753944815859203, 0.20647276505653), new Point(0.0753944815859203, 0.183264742938916), new Point(0.189174324274063, 0.183264777064323), "178");
addFace(["1279", "1283", "1537", "238"], "179");
setUVsToFace(new Point(0.992261290550232, 0.40613380074501), new Point(0.956176280975342, 0.406134933233261), new Point(0.965198338031769, 0.353623449802399), "179");
addFace(["1400", "265", "1290", "1276"], "180");
setUVsToFace(new Point(0.319768488407135, 0.950680494308472), new Point(0.319493502325385, 0.96872167776223), new Point(0.283411085605621, 0.968171715736389), "180");
addFace(["763", "112", "476", "516", "522"], "181");
setUVsToFace(new Point(0.0447614714503288, 0.247860431671143), new Point(0.00100002282124253, 0.247860507327332), new Point(0.0364906369171083, 0.216916401474864), "181");
addFace(["2097", "1954", "1687", "1727", "363"], "182");
setUVsToFace(new Point(0.0447614379227161, 0.214208751916885), new Point(0.00100000004749745, 0.214208751916885), new Point(0.0364906154572964, 0.18326473236084), "182");
addFace(["2224", "2013", "2009", "2226"], "183");
setUVsToFace(new Point(0.375179265984234, 0.457884281873703), new Point(0.326008498668671, 0.457884281873703), new Point(0.326008498668671, 0.41412279009819), "183");
addFace(["325", "324", "1480", "1455"], "184");
setUVsToFace(new Point(0.594778776168823, 0.792968928813934), new Point(0.594778776168823, 0.810473501682281), new Point(0.495219171047211, 0.810473501682281), "184");
addFace(["367", "1769", "2212", "1771"], "185");
setUVsToFace(new Point(0.876510322093964, 0.756232082843781), new Point(0.911441802978516, 0.765289723873138), new Point(0.862373572457556, 0.768465244977068), "185");
addFace(["1066", "1065", "1093", "187", "2066", "2075"], "186");
setUVsToFace(new Point(0.469247627937056, 0.206472908735738), new Point(0.46924763917923, 0.183264881372452), new Point(0.583027422428131, 0.183264940977097), "186");
addFace(["948", "1045", "1044", "163"], "187");
setUVsToFace(new Point(0.785693168640137, 0.535121500492096), new Point(0.87321609258651, 0.535121376912108), new Point(0.873216152191162, 0.57120805978775), "187");
addFace(["2216", "2000", "395", "396"], "188");
setUVsToFace(new Point(0.178752958774563, 0.914465482632636), new Point(0.0912300199270248, 0.914465546607971), new Point(0.0912299901247025, 0.878378927707672), "188");
addFace(["2191", "2196", "2193", "2185"], "189");
setUVsToFace(new Point(0.487477689981461, 0.290416896343231), new Point(0.474349299848661, 0.27184584736824), new Point(0.588129043579102, 0.27184584736824), "189");
addFace(["1711", "377", "378", "1721"], "190");
setUVsToFace(new Point(0.952372848987579, 0.894261479377747), new Point(0.952372848987579, 0.876224637031555), new Point(0.996134340763092, 0.876224637031555), "190");
addFace(["396", "395", "397", "1759"], "191");
setUVsToFace(new Point(0.798101007938385, 0.748834070545294), new Point(0.710578143596649, 0.748834073543549), new Point(0.710578143596649, 0.736456513404846), "191");
addFace(["2053", "762", "677", "156"], "192");
setUVsToFace(new Point(0.185676204358574, 0.735732197761536), new Point(0.159419313073158, 0.735732197761536), new Point(0.163795441389084, 0.72954273223877), "192");
addFace(["1878", "1882", "1532", "1530"], "193");
setUVsToFace(new Point(0.547732889652252, 0.974244713783264), new Point(0.495219171047211, 0.974244713783264), new Point(0.495219171047211, 0.956740140914917), "193");
addFace(["918", "909", "2129", "920"], "194");
setUVsToFace(new Point(0.949008285999298, 0.813180565834045), new Point(0.992769777774811, 0.813180565834045), new Point(0.992769777774811, 0.831217467784882), "194");
addFace(["18", "510", "8", "798"], "195");
setUVsToFace(new Point(0.75004643201828, 0.269138723611832), new Point(0.706284880638123, 0.269138723611832), new Point(0.71941339969635, 0.250567704439163), "195");
addFace(["1716", "379", "377", "1711"], "196");
setUVsToFace(new Point(0.433783143758774, 0.89715838432312), new Point(0.433508157730103, 0.915199637413025), new Point(0.397425741010139, 0.914649675362511), "196");
addFace(["2164", "1083", "1087", "1085"], "197");
setUVsToFace(new Point(0.744294166564941, 0.61017107963562), new Point(0.63051426410675, 0.61017107963562), new Point(0.630514144897461, 0.582492470741272), "197");
addFace(["1636", "1663", "1917", "1910", "1601"], "198");
setUVsToFace(new Point(0.219807282090187, 0.00100000423844904), new Point(0.307330244561217, 0.00100000847864177), new Point(0.307330244561217, 0.0447614687548434), "198");
addFace(["462", "497", "23", "499"], "199");
setUVsToFace(new Point(0.875528872013092, 0.717438280582428), new Point(0.910460352897644, 0.726495921611786), new Point(0.861392116823073, 0.72967158956979), "199");
addFace(["1673", "1960", "1926", "2013"], "200");
setUVsToFace(new Point(0.433871954679489, 0.697322070598602), new Point(0.365143954753876, 0.697051227092743), new Point(0.358361214399338, 0.65460991859436), "200");
addFace(["387", "1622", "1740", "2022"], "201");
setUVsToFace(new Point(0.489225775003433, 0.467683076858521), new Point(0.427959529969918, 0.467683109629299), new Point(0.432335704565048, 0.461493700742722), "201");
addFace(["263", "1284", "1283", "1279"], "202");
setUVsToFace(new Point(0.319487363100052, 0.88143116235733), new Point(0.283411115407944, 0.88056617975235), new Point(0.283843619065632, 0.86252803986995), "202");
addFace(["1207", "910", "1213", "1205"], "203");
setUVsToFace(new Point(0.140400826931, 0.582492530345917), new Point(0.189571633934975, 0.582492470741272), new Point(0.189571648836136, 0.62625390291214), "203");
addFace(["844", "484", "7", "601"], "204");
setUVsToFace(new Point(0.440690636634827, 0.329209089279175), new Point(0.440690636634827, 0.347252428531647), new Point(0.353167712688446, 0.347252428531647), "204");
addFace(["1207", "1978", "905", "897"], "205");
setUVsToFace(new Point(0.544371664524078, 0.898458659648895), new Point(0.59352433681488, 0.899799048900604), new Point(0.558955628675309, 0.91015536515493), "205");
addFace(["59", "788", "688", "732", "765", "770"], "206");
setUVsToFace(new Point(0.219807311892509, 0.135893821716309), new Point(0.307330283396982, 0.135893830196696), new Point(0.228559630497966, 0.144646123051643), "206");
addFace(["387", "2103", "2104", "418", "1621", "1622"], "207");
setUVsToFace(new Point(0.753697344504454, 0.170902997255325), new Point(0.701183461924569, 0.17965529859066), new Point(0.613660573959351, 0.17965529859066), "207");
addFace(["1064", "1068", "181", "182"], "208");
setUVsToFace(new Point(0.551261216402054, 0.65460991859436), new Point(0.551261246204376, 0.682288527488708), new Point(0.437481433153152, 0.682288527488708), "208");
addFace(["2164", "1865", "1859", "2196"], "209");
setUVsToFace(new Point(0.707871079444885, 0.732886016368866), new Point(0.608311474323273, 0.732886016368866), new Point(0.608311474323273, 0.715381443500519), "209");
addFace(["1663", "317", "1668", "1428"], "210");
setUVsToFace(new Point(0.518189549446106, 0.353623449802399), new Point(0.567360401153564, 0.353623449802399), new Point(0.567360401153564, 0.397384852170944), "210");
addFace(["897", "122", "910", "1207"], "211");
setUVsToFace(new Point(0.546960771083832, 0.907100915908813), new Point(0.500397264957428, 0.914402663707733), new Point(0.495219171047211, 0.897118330001831), "211");
addFace(["1966", "1960", "1969", "1965"], "212");
setUVsToFace(new Point(0.896628379821777, 0.527467548847198), new Point(0.884317815303802, 0.496899902820587), new Point(0.962209784823117, 0.50043973447515), "212");
addFace(["940", "151", "154", "155"], "213");
setUVsToFace(new Point(0.696917112719615, 0.9091214818616), new Point(0.597133636474609, 0.912872970104218), new Point(0.614174962043762, 0.897118330001831), "213");
addFace(["162", "154", "151", "2054", "2067", "985"], "214");
setUVsToFace(new Point(0.600532029811402, 0.183264927566048), new Point(0.714311838150024, 0.18326498568058), new Point(0.714311818846635, 0.206473021050031), "214");
addFace(["616", "543", "544", "541"], "215");
setUVsToFace(new Point(0.0912300199270248, 0.629863440990448), new Point(0.178752988576889, 0.629863500595093), new Point(0.178752973675722, 0.676996070532479), "215");
addFace(["325", "326", "1453", "324"], "216");
setUVsToFace(new Point(0.46924763917923, 0.240124240517616), new Point(0.482376039028168, 0.247860237956047), new Point(0.4386146068573, 0.247860252857208), "216");
addFace(["2021", "450", "2019", "338"], "217");
setUVsToFace(new Point(0.729984819889069, 0.150258496403694), new Point(0.738737106323242, 0.16982926428318), new Point(0.694975614547729, 0.16982926428318), "217");
addFace(["162", "985", "2143", "987"], "218");
setUVsToFace(new Point(0.823156457634395, 0.952483072230566), new Point(0.805538535118103, 0.937376141548157), new Point(0.905392467975616, 0.937397420406342), "218");
addFace(["1969", "1960", "1674", "456"], "219");
setUVsToFace(new Point(0.00100000004749745, 0.758215010166168), new Point(0.078967459499836, 0.757221281528473), new Point(0.0632886067032814, 0.799186050891876), "219");
addFace(["163", "1044", "1925", "1118", "1108", "965"], "220");
setUVsToFace(new Point(0.569898962974548, 0.13228440284729), new Point(0.482375931865398, 0.132284398607097), new Point(0.482375931865398, 0.0885229323937131), "220");
addFace(["1758", "1759", "397", "399"], "221");
setUVsToFace(new Point(0.280703991651535, 0.632332146167755), new Point(0.280703991651535, 0.67946469783783), new Point(0.193181052803993, 0.679464757442474), "221");
addFace(["789", "751", "613", "1420", "1419"], "222");
setUVsToFace(new Point(0.235778480768204, 0.41412279009819), new Point(0.323301404714584, 0.414123594760895), new Point(0.323301404714584, 0.46825110912323), "222");
addFace(["826", "823", "626"], "223");
setUVsToFace(new Point(0.474349230527878, 0.250567615032196), new Point(0.588128983974457, 0.250567644834518), new Point(0.487477630376816, 0.269138664007187), "223");
addFace(["155", "987", "2143", "940"], "224");
setUVsToFace(new Point(0.651344060897827, 0.496899962425232), new Point(0.765123784542084, 0.496899902820587), new Point(0.765123784542084, 0.52457857131958), "224");
addFace(["606", "529", "533", "55"], "225");
setUVsToFace(new Point(0.118389271199703, 0.410513311624527), new Point(0.118389271199703, 0.353623449802399), new Point(0.232169076800346, 0.353623449802399), "225");
addFace(["981", "1095", "951", "1196"], "226");
setUVsToFace(new Point(0.656234920024872, 0.702461421489716), new Point(0.660763621330261, 0.684995710849762), new Point(0.707567393779755, 0.690552949905396), "226");
addFace(["2127", "1155", "1139", "2124"], "227");
setUVsToFace(new Point(0.0384453311562538, 0.698631942272186), new Point(0.072340726852417, 0.75361180305481), new Point(0.000983375569858301, 0.753310517621809), "227");
addFace(["1786", "1803", "2193", "2196"], "228");
setUVsToFace(new Point(0.747001171112061, 0.582492470741272), new Point(0.860780954360962, 0.582492470741272), new Point(0.860780954360962, 0.61017107963562), "228");
addFace(["272", "271", "2022", "1740"], "229");
setUVsToFace(new Point(0.946486115455627, 0.41412279009819), new Point(0.998999893665314, 0.41412279009819), new Point(0.998999893665314, 0.431627397009057), "229");
addFace(["1066", "2075", "212", "209"], "230");
setUVsToFace(new Point(0.46924763917923, 0.206472903490067), new Point(0.482376039028168, 0.21420893073082), new Point(0.4386146068573, 0.214208900928497), "230");
addFace(["798", "522", "516", "517"], "231");
setUVsToFace(new Point(0.730297565460205, 0.624881267547607), new Point(0.630514144897461, 0.628632783889771), new Point(0.647555514738255, 0.6128782434292), "231");
addFace(["58", "62", "823", "572"], "232");
setUVsToFace(new Point(0.616229897178814, 0.952483081033696), new Point(0.598612010478973, 0.937376141548157), new Point(0.698465883731842, 0.937397420406342), "232");
addFace(["2129", "2127", "2124", "923"], "233");
setUVsToFace(new Point(0.0498630774286024, 0.290417015552521), new Point(0.00100000004749745, 0.290417015552521), new Point(0.0279823839664459, 0.27184596657753), "233");
addFace(["1458", "300", "302", "1487", "326", "325"], "234");
setUVsToFace(new Point(0.46924763917923, 0.216916233301163), new Point(0.583027313719262, 0.216916138283229), new Point(0.583027313719262, 0.240124145499682), "234");
addFace(["2127", "2129", "910", "122", "121"], "235");
setUVsToFace(new Point(0.337541458421647, 0.742925602464983), new Point(0.337540993687763, 0.791788680280544), new Point(0.301454395055771, 0.791790008544922), "235");
addFace(["2103", "2097", "363", "1739"], "236");
setUVsToFace(new Point(0.0885229483246803, 0.214208781719208), new Point(0.0447614269609809, 0.214208762455967), new Point(0.0578897520899773, 0.206472754478455), "236");
addFace(["956", "1010", "173", "174"], "237");
setUVsToFace(new Point(0.750789701938629, 0.865313351154327), new Point(0.70422625541687, 0.872615158557892), new Point(0.699048161506653, 0.85533082485199), "237");
addFace(["883", "2052", "2051", "931", "881"], "238");
setUVsToFace(new Point(0.753215661829054, 0.183265018452393), new Point(0.788706346420634, 0.214209077581126), new Point(0.74494481086731, 0.214209035038948), "238");
addFace(["233", "1563", "231", "1649"], "239");
setUVsToFace(new Point(0.935425817966461, 0.353623449802399), new Point(0.926985479261777, 0.395773618095911), new Point(0.858298659324646, 0.393342435359955), "239");
addFace(["1359", "288", "294", "295"], "240");
setUVsToFace(new Point(0.236942559480667, 0.997376918792725), new Point(0.193181052803993, 0.99737685918808), new Point(0.193181052803993, 0.979333460330963), "240");
addFace(["1778", "1816", "1894", "1784"], "241");
setUVsToFace(new Point(0.481242895126343, 0.879476130008698), new Point(0.481242895126343, 0.897519469261169), new Point(0.43748140335083, 0.897519528865814), "241");
addFace(["1575", "1118", "624", "1585", "839"], "242");
setUVsToFace(new Point(0.569898962974548, 0.0447614629027689), new Point(0.482376009225845, 0.0447614714503288), new Point(0.482376009225845, 0.00100000854581594), "242");
addFace(["1933", "1716", "1711", "2167"], "243");
setUVsToFace(new Point(0.028065474703908, 0.894101321697235), new Point(0.0190467272966697, 0.841589783340516), new Point(0.0551283434033394, 0.841590940952301), "243");
addFace(["1249", "1250", "1294", "1301", "1300"], "244");
setUVsToFace(new Point(0.753215670585632, 0.216916128993034), new Point(0.788706243038177, 0.247860133647919), new Point(0.744944870471954, 0.24786014854908), "244");
addFace(["836", "839", "1585", "831"], "245");
setUVsToFace(new Point(0.359741121530533, 0.518383622169495), new Point(0.310570299625397, 0.518383622169495), new Point(0.310570359230042, 0.474622130393982), "245");
addFace(["1458", "325", "1455", "298"], "246");
setUVsToFace(new Point(0.719693244811337, 0.989915894315639), new Point(0.702075242996216, 0.974808931350708), new Point(0.801929175853729, 0.974830269813538), "246");
addFace(["1250", "1559", "1969", "1954"], "247");
setUVsToFace(new Point(0.627101004123688, 0.0740464478731155), new Point(0.630113780498505, 0.0873409062623978), new Point(0.576684296131134, 0.0546603798866272), "247");
addFace(["2052", "1142", "723", "112"], "249");
setUVsToFace(new Point(0.0615852326154709, 0.0873409062623978), new Point(0.048316515982151, 0.084426574409008), new Point(0.10048794156559, 0.0497728801536505), "249");
addFace(["861", "1416", "619", "609"], "250");
setUVsToFace(new Point(0.544371664524078, 0.856671154499054), new Point(0.59352433681488, 0.858011484146118), new Point(0.558955609798431, 0.868367791175842), "250");
addFace(["2103", "387", "1954", "2097"], "251");
setUVsToFace(new Point(0.701183378696442, 0.17965529859066), new Point(0.753697335720062, 0.170902997255325), new Point(0.788706413613578, 0.179655294350466), "251");
addFace(["900", "1979", "1205", "139"], "252");
setUVsToFace(new Point(0.558424115180969, 0.836312651634216), new Point(0.593355492518667, 0.845370232918158), new Point(0.544287323951721, 0.848545789718628), "252");
addFace(["454", "2000", "2216", "1769", "2002"], "253");
setUVsToFace(new Point(0.307330191135406, 0.0885229259729385), new Point(0.307330191135406, 0.132284387946129), new Point(0.219807282090187, 0.13228440284729), "253");
addFace(["969", "179", "173", "2142"], "254");
setUVsToFace(new Point(0.473557621240616, 0.939873695373535), new Point(0.43748140335083, 0.939008712768555), new Point(0.437913902919453, 0.920970631385261), "254");
addFace(["81", "626", "566", "565"], "255");
setUVsToFace(new Point(0.909705102443695, 0.0370850148610771), new Point(0.909705102443695, 0.00100000004749745), new Point(0.997228145599365, 0.00100001913961023), "255");
addFace(["2051", "2054", "151", "931"], "256");
setUVsToFace(new Point(0.74494481086731, 0.214209035038948), new Point(0.701183378696442, 0.214209020137787), new Point(0.714311765460733, 0.206473009543039), "256");
addFace(["2053", "736", "2054", "2051", "2052"], "257");
setUVsToFace(new Point(0.036009032279253, 0.170902997255325), new Point(0.097275180043206, 0.170902997255325), new Point(0.0885229110717773, 0.17965529859066), "257");
addFace(["115", "871", "897", "905"], "258");
setUVsToFace(new Point(0.349319130182266, 0.690921366214752), new Point(0.351439327958763, 0.735678318229107), new Point(0.283411085605621, 0.72397643327713), "258");
addFace(["640", "826", "71", "646"], "259");
setUVsToFace(new Point(0.708852589130402, 0.771679759025574), new Point(0.609292984008789, 0.771679759025574), new Point(0.609292984008789, 0.754175126552582), "259");
addFace(["1429", "280", "279", "1330"], "260");
setUVsToFace(new Point(0.696815848350525, 0.774386760574423), new Point(0.696815848350525, 0.78676438331604), new Point(0.609292984008789, 0.78676438331604), "260");
addFace(["762", "765", "680", "677"], "261");
setUVsToFace(new Point(0.594893932342529, 0.346684455871582), new Point(0.533627663846672, 0.346684425099478), new Point(0.5380038022995, 0.340495020151138), "261");
addFace(["479", "839", "836", "556"], "262");
setUVsToFace(new Point(0.905598163604736, 0.634388983249664), new Point(0.940529644489288, 0.643446564674377), new Point(0.891461410865178, 0.646622118857782), "262");
addFace(["7", "484", "494", "556"], "263");
setUVsToFace(new Point(0.529910624027252, 0.41412279009819), new Point(0.617433607578278, 0.414122819900513), new Point(0.617433599097886, 0.461255330233234), "263");
addFace(["1865", "2047", "2046", "209", "212", "2120"], "264");
setUVsToFace(new Point(0.337963217292818, 0.206472859701979), new Point(0.337963223457336, 0.183264836668968), new Point(0.451743066310883, 0.183264881372452), "264");
addFace(["1373", "1319", "1308", "1295", "1411", "303"], "265");
setUVsToFace(new Point(0.600531407488822, 0.216916411102991), new Point(0.714311838150024, 0.216916143894196), new Point(0.714311838150024, 0.240124151110649), "265");
addFace(["1378", "1316", "1317", "1372"], "266");
setUVsToFace(new Point(0.782986104488373, 0.562800109386444), new Point(0.669206261634827, 0.562800109386444), new Point(0.669206321239471, 0.535121440887451), "266");
addFace(["421", "1621", "2111", "1807"], "267");
setUVsToFace(new Point(0.610858201980591, 0.674821615219116), new Point(0.615234375, 0.681011080741882), new Point(0.553968289114837, 0.681011078743218), "267");
addFace(["1101", "181", "1068", "1050"], "268");
setUVsToFace(new Point(0.224908964776903, 0.290416978872746), new Point(0.211780518293381, 0.271845936775208), new Point(0.325560301542282, 0.271845906972885), "268");
addFace(["1332", "256", "1400", "288"], "269");
setUVsToFace(new Point(0.088522881269455, 0.646085202693939), new Point(0.00100000004749745, 0.646085202693939), new Point(0.00100000004749745, 0.628041984836092), "269");
addFace(["557", "578", "8", "510"], "270");
setUVsToFace(new Point(0.618762075901031, 0.269138693809509), new Point(0.6056337573543, 0.250567665696145), new Point(0.71941339969635, 0.250567704439163), "270");
addFace(["1807", "2111", "1524", "1525"], "271");
setUVsToFace(new Point(0.986798628437843, 0.496899902820587), new Point(0.991174757480621, 0.503089308738708), new Point(0.964917838573456, 0.503089308738708), "271");
addFace(["1654", "1649", "231", "235"], "272");
setUVsToFace(new Point(0.849777824460652, 0.814520819823514), new Point(0.898930251598358, 0.815861225128174), new Point(0.864361643791199, 0.826217472553253), "272");
addFace(["1142", "115", "1164", "1160"], "273");
setUVsToFace(new Point(0.0912300050258636, 0.966069877147675), new Point(0.169202223420143, 0.965577960014343), new Point(0.15570442008441, 0.995629391973664), "273");
addFace(["1901", "2021", "338", "1906"], "274");
setUVsToFace(new Point(0.948954641819, 0.209521606564522), new Point(0.791413486003876, 0.209521606564522), new Point(0.791413486003876, 0.18326473236084), "274");
addFace(["384", "1745", "2180", "1792"], "275");
setUVsToFace(new Point(0.998999953269958, 0.436400592327118), new Point(0.999000012874603, 0.464079201221466), new Point(0.885220170021057, 0.464079201221466), "275");
addFace(["1256", "1267", "256", "1332"], "276");
setUVsToFace(new Point(0.37093397974968, 0.629625082015991), new Point(0.283411085605621, 0.629625100283334), new Point(0.283411085605621, 0.582492470741272), "276");
addFace(["682", "736", "2053", "156"], "279");
setUVsToFace(new Point(0.473128527402878, 0.400994390249252), new Point(0.477504670619965, 0.407183796167374), new Point(0.416238486766815, 0.407183855772018), "279");
addFace(["1440", "789", "1447", "320"], "280");
setUVsToFace(new Point(0.58544909954071, 0.995891034603119), new Point(0.541687667369843, 0.995891034603119), new Point(0.541687667369843, 0.977854073047638), "280");
addFace(["222", "676", "1113", "1169"], "281");
setUVsToFace(new Point(0.31644344329834, 0.0794097036123276), new Point(0.31644344329834, 0.053152821958065), new Point(0.473984688520432, 0.053152821958065), "281");
addFace(["636", "86", "634", "751"], "282");
setUVsToFace(new Point(0.473557651042938, 0.962386250495911), new Point(0.437481434255392, 0.961521249594575), new Point(0.437913924455643, 0.943483173847198), "282");
addFace(["1108", "1981", "1978", "1979", "965"], "284");
setUVsToFace(new Point(0.569898962974548, 0.0885229408740997), new Point(0.74494470407326, 0.0885229323937121), new Point(0.744944766103323, 0.132284396486999), "284");
addFace(["831", "565", "601", "836"], "285");
setUVsToFace(new Point(0.359741181135178, 0.474622130393982), new Point(0.408912003040314, 0.474622130393982), new Point(0.408911943435669, 0.518383622169495), "285");
addFace(["1419", "1446", "1447", "789"], "287");
setUVsToFace(new Point(0.984604060649872, 0.977380096912384), new Point(0.984329104423523, 0.995421290397644), new Point(0.948246657848358, 0.994871318340302), "287");
addFace(["408", "1784", "1894", "2185"], "288");
setUVsToFace(new Point(0.394437491893768, 0.870492815971375), new Point(0.358361223667317, 0.869627757717111), new Point(0.35879373550415, 0.851589679718018), "288");
addFace(["222", "1108", "1575", "676"], "291");
setUVsToFace(new Point(0.292163418851277, 0.839076936244965), new Point(0.283411115407944, 0.819506227970123), new Point(0.327172577381134, 0.819506227970123), "291");
addFace(["1231", "1542", "238", "1537"], "293");
setUVsToFace(new Point(0.247472316026688, 0.918526887893677), new Point(0.258629351854324, 0.951617836952209), new Point(0.194034882401693, 0.951544500492042), "293");
addFace(["1749", "1739", "1745", "384"], "294");
setUVsToFace(new Point(0.719693249990456, 0.952483080686088), new Point(0.702075242996216, 0.937376141548157), new Point(0.801929175853729, 0.937397420406342), "294");
addFace(["1055", "1054", "207", "208"], "295");
setUVsToFace(new Point(0.595103800296783, 0.974783420562744), new Point(0.55134242773056, 0.974783480167389), new Point(0.55134242773056, 0.956740200519562), "295");
addFace(["609", "613", "634", "861"], "296");
setUVsToFace(new Point(0.546960771083832, 0.865313351154327), new Point(0.500397264957428, 0.872615158557892), new Point(0.495219171047211, 0.85533082485199), "296");
addFace(["1083", "209", "2046", "1087"], "297");
setUVsToFace(new Point(0.798831637751659, 0.888227725329609), new Point(0.699048161506653, 0.891979157924652), new Point(0.716089487075806, 0.876224637031555), "297");
addFace(["1682", "2166", "1735", "1729"], "298");
setUVsToFace(new Point(0.965963959693909, 0.216916128993034), new Point(0.987573146820068, 0.244594752788544), new Point(0.952563882147495, 0.244594752788544), "298");
addFace(["624", "538", "537", "1585"], "300");
setUVsToFace(new Point(0.0912299975752831, 0.875671744346619), new Point(0.0912300273776054, 0.83958512544632), new Point(0.17875300347805, 0.839585244655609), "300");
addFace(["1317", "1319", "1373", "1372"], "301");
setUVsToFace(new Point(0.114779852330685, 0.293124079704285), new Point(0.114779852330685, 0.350013971328735), new Point(0.00100000004749745, 0.350013971328735), "301");
addFace(["502", "26", "503", "18"], "302");
setUVsToFace(new Point(0.394718617200851, 0.939742147922516), new Point(0.39444363117218, 0.957783401012421), new Point(0.358361214452398, 0.957233438961864), "302");
addFace(["1010", "1013", "1213", "173"], "303");
setUVsToFace(new Point(0.0885229259729385, 0.589249789714813), new Point(0.00100000854581594, 0.589249789714813), new Point(0.00100000854581594, 0.571206510066986), "303");
addFace(["924", "923", "2124", "1139"], "304");
setUVsToFace(new Point(0.472490459680557, 0.849090397357941), new Point(0.472490459680557, 0.876769065856934), new Point(0.43748140335083, 0.876769065856934), "304");
addFace(["1735", "363", "1727", "1729"], "305");
setUVsToFace(new Point(0.698395458518355, 0.930015271993235), new Point(0.598612010478973, 0.933766722679138), new Point(0.615653276443481, 0.918012142181396), "305");
addFace(["289", "1601", "1255", "1256"], "306");
setUVsToFace(new Point(0.646286189556122, 0.877564907073975), new Point(0.69543868303299, 0.878905296325684), new Point(0.66087003426842, 0.889261537397277), "306");
addFace(["18", "503", "24", "510"], "308");
setUVsToFace(new Point(0.950655281543732, 0.852292776107788), new Point(0.950655281543732, 0.834255814552307), new Point(0.994416832923889, 0.834255695343018), "308");
addFace(["81", "85", "628", "626"], "309");
setUVsToFace(new Point(0.394718608993246, 0.897158396264921), new Point(0.39444363117218, 0.915199637413025), new Point(0.358361214399338, 0.914649665355682), "309");
addFace(["1532", "1472", "1625", "1530"], "311");
setUVsToFace(new Point(0.794419705867767, 0.342963814735413), new Point(0.798795878887177, 0.349153190851212), new Point(0.737529814243317, 0.349153161048889), "311");
addFace(["2067", "2066", "187", "985"], "312");
setUVsToFace(new Point(0.613660279749922, 0.214208960533142), new Point(0.569898962974548, 0.214208960533142), new Point(0.583027422428131, 0.20647294819355), "312");
addFace(["421", "1807", "1525", "1618"], "313");
setUVsToFace(new Point(0.996652781963348, 0.649836659431458), new Point(0.944138944149017, 0.649836659431458), new Point(0.944138944149017, 0.63233208656311), "313");
addFace(["951", "1095", "1098", "1037"], "314");
setUVsToFace(new Point(0.193181082606327, 0.629625040678659), new Point(0.193181052803993, 0.582492470741272), new Point(0.280703991651535, 0.582492470741272), "314");
addFace(["191", "735", "732", "686"], "315");
setUVsToFace(new Point(0.18426850438118, 0.91717267036438), new Point(0.188644662499428, 0.923362135887146), new Point(0.162387809557192, 0.923362135887146), "315");
addFace(["1563", "1231", "235", "231"], "316");
setUVsToFace(new Point(0.424269199371338, 0.700931549072266), new Point(0.426389206533505, 0.745688536172054), new Point(0.358361214399338, 0.733986556529999), "316");
addFace(["956", "137", "900", "139"], "317");
setUVsToFace(new Point(0.991406202316284, 0.271845817565918), new Point(0.991406202316284, 0.284223407506943), new Point(0.903883337974548, 0.284223407506943), "317");
addFace(["317", "1663", "280", "1429"], "318");
setUVsToFace(new Point(0.544371664524078, 0.877564907073975), new Point(0.59352433681488, 0.878905296325684), new Point(0.558955628552365, 0.889261539463646), "318");
addFace(["425", "1041", "1040", "1837"], "319");
setUVsToFace(new Point(0.951010942459106, 0.618579149246216), new Point(0.863488018512726, 0.618579149246216), new Point(0.863487958908081, 0.582492470741272), "319");
addFace(["1758", "399", "2231", "1894"], "322");
setUVsToFace(new Point(0.413531452417374, 0.407751768827438), new Point(0.326008528470993, 0.407751768827438), new Point(0.326008528470993, 0.389708452821252), "322");
addFace(["823", "826", "571", "572"], "324");
setUVsToFace(new Point(0.881610751152039, 0.524578630924225), new Point(0.767830967903137, 0.52457857131958), new Point(0.767830967903137, 0.496899902820587), "324");
addFace(["1249", "1547", "1542", "1559"], "325");
setUVsToFace(new Point(0.555651009082794, 0.474622070789337), new Point(0.577095150947571, 0.527919352054596), new Point(0.505945152084438, 0.52291912490261), "325");
addFace(["557", "510", "844", "601"], "326");
setUVsToFace(new Point(0.353167712688446, 0.293124079704285), new Point(0.440690666437149, 0.293124079704285), new Point(0.440690636634827, 0.329209089279175), "326");
addFace(["1769", "367", "1689", "2009"], "327");
setUVsToFace(new Point(0.43748140335083, 0.79026186466217), new Point(0.43748140335083, 0.754175186157227), new Point(0.525004267692566, 0.754175126552582), "327");
addFace(["2238", "2234", "2000", "425"], "329");
setUVsToFace(new Point(0.68474954366684, 0.293124079704285), new Point(0.68474954366684, 0.336885511875153), new Point(0.635578751564026, 0.336885511875153), "329");
addFace(["571", "70", "58", "572"], "330");
setUVsToFace(new Point(0.232169076800346, 0.293124079704285), new Point(0.232169076800346, 0.350013971328735), new Point(0.118389271199703, 0.350013971328735), "330");
addFace(["408", "2185", "406", "1774"], "331");
setUVsToFace(new Point(0.0447615087032318, 0.944094717502594), new Point(0.0447615012526512, 0.96213161945343), new Point(0.00100000109523535, 0.96213161945343), "331");
addFace(["1093", "1065", "1064", "182"], "332");
setUVsToFace(new Point(0.118389241397381, 0.41412279009819), new Point(0.232169046998024, 0.41412279009819), new Point(0.232169046998024, 0.471012651920319), "332");
addFace(["429", "2231", "2234", "2238"], "333");
setUVsToFace(new Point(0.733920395374298, 0.293124079704285), new Point(0.733920395374298, 0.336885511875153), new Point(0.68474954366684, 0.336885511875153), "333");
addFace(["1376", "1364", "298", "1455"], "336");
setUVsToFace(new Point(0.43748140335083, 0.71267431974411), new Point(0.43748140335083, 0.684995710849762), new Point(0.551261246204376, 0.684995710849762), "336");
addFace(["50", "53", "565", "566"], "337");
setUVsToFace(new Point(0.319487333297729, 0.903943717479706), new Point(0.283411103053153, 0.903078661479612), new Point(0.283843606710434, 0.885040581226349), "337");
addFace(["110", "109", "798", "517"], "338");
setUVsToFace(new Point(0.967117846012115, 0.582492470741272), new Point(0.988727033138275, 0.61017107963562), new Point(0.953717874051966, 0.61017107963562), "338");
addFace(["601", "52", "559", "557"], "339");
setUVsToFace(new Point(0.473838840135038, 0.966539332392827), new Point(0.473563849925995, 0.984580516815186), new Point(0.43748140335083, 0.984030485153198), "339");
addFace(["462", "726", "1568", "497"], "340");
setUVsToFace(new Point(0.626904726028442, 0.625204622745514), new Point(0.558176755905151, 0.62493371963501), new Point(0.551393985748291, 0.582492470741272), "340");
addFace(["1906", "1910", "2002", "1901"], "341");
setUVsToFace(new Point(0.46974390745163, 0.150258526206017), new Point(0.478496223688126, 0.16982926428318), new Point(0.434734761714935, 0.16982926428318), "341");
addFace(["1087", "2046", "2047", "1085"], "342");
setUVsToFace(new Point(0.792315781116486, 0.0578898936510086), new Point(0.792315781116486, 0.00100000004749745), new Point(0.906095743179321, 0.00100000004749745), "342");
addFace(["106", "757", "2203", "696"], "343");
setUVsToFace(new Point(0.678115665912628, 0.674821496009827), new Point(0.682491779327393, 0.681011021137238), new Point(0.656234920024872, 0.681011021137238), "343");
addFace(["418", "2104", "1789", "1801"], "344");
setUVsToFace(new Point(0.219807311892509, 0.214208826422691), new Point(0.176045805215836, 0.214208796620369), new Point(0.189174324274063, 0.206472799181938), "344");
addFace(["1376", "1378", "303", "302"], "345");
setUVsToFace(new Point(0.656234920024872, 0.672114491462708), new Point(0.656234920024872, 0.65460991859436), new Point(0.755794525146484, 0.65460991859436), "345");
addFace(["24", "27", "844", "510"], "346");
setUVsToFace(new Point(0.21057017147541, 0.16982926428318), new Point(0.174493926329557, 0.168964267922248), new Point(0.174926429986954, 0.150926098227501), "346");
addFace(["1420", "613", "609", "1417"], "347");
setUVsToFace(new Point(0.412521362304688, 0.474622130393982), new Point(0.500044345855713, 0.474622130393982), new Point(0.500044345855713, 0.521754682064056), "347");
addFace(["499", "720", "726", "462"], "348");
setUVsToFace(new Point(0.0912299901247025, 0.931398630142212), new Point(0.158778354525566, 0.91717267036438), new Point(0.158326834440231, 0.96196848154068), "348");
addFace(["1316", "1308", "1319", "1317"], "349");
setUVsToFace(new Point(0.595002545793094, 0.930015262055712), new Point(0.495219171047211, 0.933766722679138), new Point(0.512260496616364, 0.918012142181396), "349");
addFace(["686", "732", "688", "687"], "350");
setUVsToFace(new Point(0.586800515651703, 0.463962465524673), new Point(0.591176688671112, 0.470151901245117), new Point(0.529910605833519, 0.470151842492006), "350");
addFace(["58", "70", "640", "788", "59", "62"], "351");
setUVsToFace(new Point(0.206678852438927, 0.21691632270813), new Point(0.320458650588989, 0.216916292905807), new Point(0.320458640768947, 0.240124311672267), "351");
addFace(["1816", "1778", "1774", "406"], "353");
setUVsToFace(new Point(0.433783143758774, 0.91845029592514), new Point(0.433508157730103, 0.936491549015045), new Point(0.397425741010139, 0.935941527357264), "353");
addFace(["1249", "1300", "1299", "1547"], "354");
setUVsToFace(new Point(0.250070929527283, 0.955227272501367), new Point(0.250070929527283, 0.976626336574554), new Point(0.193181052803993, 0.976626336574554), "354");
addFace(["1979", "1978", "1207", "1205"], "355");
setUVsToFace(new Point(0.0912300050258636, 0.626253962516785), new Point(0.0912299975752831, 0.582492470741272), new Point(0.140400839396661, 0.582492487702054), "355");
addFace(["1689", "367", "1771", "1696"], "356");
setUVsToFace(new Point(0.899846851825714, 0.748834070545293), new Point(0.812323927879333, 0.748834073543549), new Point(0.812323927879333, 0.736456513404846), "356");
addFace(["85", "81", "634", "86"], "358");
setUVsToFace(new Point(0.538980603218079, 0.977854132652283), new Point(0.538980603218079, 0.995897471904755), new Point(0.495219171047211, 0.99589741230011), "358");
addFace(["238", "1542", "1547", "244"], "360");
setUVsToFace(new Point(0.320856392383575, 0.63233208656311), new Point(0.354751825332642, 0.687311887741089), new Point(0.283394431508186, 0.687010697304785), "360");
addFace(["1480", "324", "1467", "1476"], "361");
setUVsToFace(new Point(0.697269283527114, 0.80497204868825), new Point(0.597485840320587, 0.808723509311676), new Point(0.614527106285095, 0.792968928813934), "361");
addFace(["311", "1428", "1668", "1417"], "362");
setUVsToFace(new Point(0.773783087730408, 0.717438280582428), new Point(0.80871456861496, 0.726495921611786), new Point(0.759646356105804, 0.729671537876129), "362");
addFace(["601", "7", "556", "836"], "367");
setUVsToFace(new Point(0.842393219470978, 0.649797797203064), new Point(0.846921946534708, 0.63233219699629), new Point(0.89372581243515, 0.637889325618744), "367");
addFace(["456", "1682", "1687", "1969"], "368");
setUVsToFace(new Point(0.781300783157349, 0.400594830513), new Point(0.710370540618896, 0.408243536949158), new Point(0.729794326561779, 0.354177211683164), "368");
addFace(["1256", "1255", "251", "1267"], "369");
setUVsToFace(new Point(0.799082517623901, 0.775250315666199), new Point(0.799082517623901, 0.787627875804901), new Point(0.711559653282166, 0.787627872806645), "369");
addFace(["1439", "285", "1492", "1359"], "370");
setUVsToFace(new Point(0.997228145599365, 0.0975843751435229), new Point(0.997228145599365, 0.115627698600292), new Point(0.909705102443695, 0.115627683699131), "370");
addFace(["764", "762", "112", "763"], "371");
setUVsToFace(new Point(0.088522959813931, 0.135893825956504), new Point(0.036009032279253, 0.144646123051643), new Point(0.00100000004749745, 0.135893821716309), "371");
addFace(["23", "497", "1570", "849"], "372");
setUVsToFace(new Point(0.582798480987549, 0.336885541677475), new Point(0.53362762928009, 0.336885541677475), new Point(0.53362763429517, 0.293124092545844), "372");
addFace(["654", "646", "71", "655"], "373");
setUVsToFace(new Point(0.821537174368257, 0.912225333357223), new Point(0.80391925573349, 0.897118330001831), new Point(0.903773188591003, 0.897139728069305), "373");
addFace(["2231", "399", "397", "2234"], "374");
setUVsToFace(new Point(0.711559593677521, 0.77164089679718), new Point(0.7160884141922, 0.754175126552582), new Point(0.762892186641693, 0.75973242521286), "374");
addFace(["538", "624", "860", "541"], "375");
setUVsToFace(new Point(0.821706533432007, 0.656666874885559), new Point(0.856637954711914, 0.665724515914917), new Point(0.807569754474682, 0.668900034173568), "375");
addFace(["1829", "1749", "384", "1792"], "376");
setUVsToFace(new Point(0.00100000004749745, 0.353623449802399), new Point(0.114779852330685, 0.353623449802399), new Point(0.114779852330685, 0.410513311624527), "376");
addFace(["2238", "425", "1837", "1830"], "377");
setUVsToFace(new Point(0.646117448806763, 0.835596024990082), new Point(0.69527006149292, 0.836936414241791), new Point(0.660701334476471, 0.84729266166687), "377");
addFace(["544", "543", "565", "831"], "379");
setUVsToFace(new Point(0.911988973617554, 0.664592444896698), new Point(0.865425407886505, 0.671894252300262), new Point(0.860247373580933, 0.65460991859436), "379");
addFace(["578", "533", "529", "8"], "380");
setUVsToFace(new Point(0.768733203411102, 0.464079201221466), new Point(0.768733203411102, 0.436400592327118), new Point(0.882512927055359, 0.436400651931763), "380");
addFace(["909", "913", "910", "2129"], "381");
setUVsToFace(new Point(0.275725871324539, 0.99823659658432), new Point(0.239649623632431, 0.99737161397934), new Point(0.24008212728994, 0.979333533722697), "381");
addFace(["1118", "1575", "1108"], "383");
setUVsToFace(new Point(0.482376009225845, 0.0447614714503288), new Point(0.569898962974548, 0.0447614602744579), new Point(0.569898962974548, 0.0885229408740997), "383");
addFace(["1219", "1044", "1045", "1037"], "384");
setUVsToFace(new Point(0.747863292694092, 0.814520835876465), new Point(0.797015845775604, 0.815861225128174), new Point(0.762446994740174, 0.826217465873273), "384");
addFace(["2034", "1830", "1030", "198"], "385");
setUVsToFace(new Point(0.825052738189697, 0.293124079704285), new Point(0.825052797794342, 0.340256631374359), new Point(0.737529873847961, 0.340256661176682), "385");
addFace(["1037", "1098", "1054", "1219"], "386");
setUVsToFace(new Point(0.750452220439911, 0.823163032531738), new Point(0.703888773918152, 0.830464839935303), new Point(0.698710739612579, 0.813180506229401), "386");
addFace(["2231", "437", "1847", "2191"], "387");
setUVsToFace(new Point(0.394718587398529, 0.91845029592514), new Point(0.39444363117218, 0.936491549015045), new Point(0.358361231859848, 0.935941530253797), "387");
addFace(["1359", "1492", "1330", "1638"], "388");
setUVsToFace(new Point(0.495219171047211, 0.830646216869354), new Point(0.499747993614097, 0.813180589267472), new Point(0.546551764011383, 0.818737864494324), "388");
addFace(["273", "1411", "1295", "1313"], "389");
setUVsToFace(new Point(0.692431092262268, 0.144646123051643), new Point(0.613660503280307, 0.135893821716309), new Point(0.701183378696442, 0.135893821716309), "389");
addFace(["1446", "1419", "1439", "1442"], "390");
setUVsToFace(new Point(0.849300026893616, 0.977206587791443), new Point(0.849299967288971, 0.995249927043915), new Point(0.805538535118103, 0.99524986743927), "390");
addFace(["861", "634", "81", "860"], "391");
setUVsToFace(new Point(0.47713041305542, 0.41412279009819), new Point(0.526301234960556, 0.41412279009819), new Point(0.526301205158234, 0.457884222269058), "391");
addFace(["1429", "1330", "1492", "285"], "393");
setUVsToFace(new Point(0.707663536071777, 0.400755971670151), new Point(0.620140612125397, 0.400755971670151), new Point(0.620140731334686, 0.353623449802399), "393");
addFace(["883", "1142", "2052"], "394");
setUVsToFace(new Point(0.81330543756485, 0.776271402835846), new Point(0.866214156150818, 0.775250315666199), new Point(0.859171390533447, 0.786921560764313), "394");
addFace(["1975", "1164", "115"], "395");
setUVsToFace(new Point(0.792315781116486, 0.132814958691597), new Point(0.80347752571106, 0.121998660266399), new Point(0.83524626493454, 0.130755066871643), "395");
addFace(["8", "521", "522", "798"], "398");
setUVsToFace(new Point(0.373641043901443, 0.604770243167877), new Point(0.473200649023056, 0.604770243167877), new Point(0.473200649023056, 0.622275054454803), "398");
addFace(["2224", "2226", "1720", "1716"], "399");
setUVsToFace(new Point(0.375179260969162, 0.457884281873703), new Point(0.375179260969162, 0.41412279009819), new Point(0.424350082874298, 0.41412279009819), "399");
addFace(["2231", "429", "1857", "437"], "400");
setUVsToFace(new Point(0.905423223972321, 0.974135875701904), new Point(0.861661791801453, 0.974135935306549), new Point(0.861661732196808, 0.956092655658722), "400");
addFace(["578", "579", "55", "533"], "401");
setUVsToFace(new Point(0.595002545411209, 0.949379271155398), new Point(0.495219171047211, 0.953130722045898), new Point(0.512260496616364, 0.937376141548157), "401");
addFace(["2047", "1865", "2164", "1085"], "402");
setUVsToFace(new Point(0.616229901709113, 0.971199507522292), new Point(0.598612010478973, 0.956092536449432), new Point(0.698465883731842, 0.956113874912262), "402");
addFace(["1740", "1622", "273", "272"], "403");
setUVsToFace(new Point(0.575849000879443, 0.705207347869873), new Point(0.580225169658661, 0.711396813392639), new Point(0.55396831035614, 0.711396813392639), "403");
addFace(["1359", "295", "291", "1498"], "404");
setUVsToFace(new Point(0.319768488407135, 0.908096730709076), new Point(0.319493532180786, 0.926137983798981), new Point(0.283411085605621, 0.925587952136993), "404");
addFace(["454", "2002", "1910", "1917"], "405");
setUVsToFace(new Point(0.307330191135406, 0.0885229350891951), new Point(0.219807282090187, 0.0885229408740997), new Point(0.219807282090187, 0.0447614602744579), "405");
addFace(["1604", "1649", "1654", "1647"], "406");
setUVsToFace(new Point(0.208619251847267, 0.518383622169495), new Point(0.208619266748428, 0.47462210059166), new Point(0.257790108569804, 0.47462210059166), "406");
addFace(["62", "59", "770", "579"], "407");
setUVsToFace(new Point(0.206678865814525, 0.240124338865285), new Point(0.219807296991348, 0.247860342264175), new Point(0.176045835018158, 0.247860357165337), "407");
addFace(["108", "708", "720", "700"], "408");
setUVsToFace(new Point(0.668440653190232, 0.0563425690417943), new Point(0.732987284660339, 0.0538562685251236), new Point(0.723074197769165, 0.0873409062623978), "408");
addFace(["1720", "372", "1761", "1816"], "409");
setUVsToFace(new Point(0.530920565128326, 0.329209089279175), new Point(0.530920565128326, 0.347252428531647), new Point(0.443397700786591, 0.347252430716996), "409");
addFace(["1196", "163", "965"], "410");
setUVsToFace(new Point(0.242351889610291, 0.578882932662964), new Point(0.193181082606316, 0.578882932662964), new Point(0.193181052803993, 0.535121500492096), "410");
addFace(["1886", "416", "1803", "1786"], "411");
setUVsToFace(new Point(0.00100000004749745, 0.41412279009819), new Point(0.114779815077782, 0.41412279009819), new Point(0.114779815077782, 0.471012651920319), "411");
addFace(["81", "616", "541", "860"], "412");
setUVsToFace(new Point(0.758501589298248, 0.672075688838959), new Point(0.763030426760235, 0.654610069349073), new Point(0.809834182262421, 0.660167217254639), "412");
addFace(["320", "1442", "1439", "1440"], "414");
setUVsToFace(new Point(0.394437491893768, 0.893005430698395), new Point(0.358361214399338, 0.89214038848877), new Point(0.358793700511625, 0.874102251989927), "414");
addFace(["26", "502", "844", "27"], "417");
setUVsToFace(new Point(0.948116898536682, 0.855330884456635), new Point(0.948116898536682, 0.873374283313751), new Point(0.904355466365814, 0.873374223709106), "417");
addFace(["1524", "1625", "1453", "326"], "418");
setUVsToFace(new Point(0.56114673614502, 0.144646123051643), new Point(0.491128385066986, 0.144646123051643), new Point(0.438614635448341, 0.135893828137089), "418");
addFace(["1054", "1055", "1214", "1219"], "419");
setUVsToFace(new Point(0.890657544136047, 0.13589383661747), new Point(0.890657544136047, 0.179655283689499), new Point(0.841486692428589, 0.179655283689499), "419");
addFace(["839", "479", "13", "1570"], "420");
setUVsToFace(new Point(0.193181052803993, 0.867414474487305), new Point(0.193181097507477, 0.831327855587006), new Point(0.280703991651535, 0.83132791519165), "420");
addFace(["406", "1721", "1720", "1816"], "421");
setUVsToFace(new Point(0.443397700786591, 0.293124079704285), new Point(0.530920565128326, 0.293124079704285), new Point(0.530920565128326, 0.329209089279175), "421");
addFace(["2212", "2211", "1894", "1816"], "422");
setUVsToFace(new Point(0.465409398078918, 0.397384941577911), new Point(0.465409338474274, 0.353623449802399), new Point(0.514580130577087, 0.353623449802399), "422");
addFace(["95", "757", "106", "691"], "424");
setUVsToFace(new Point(0.579455614089966, 0.407183766365051), new Point(0.518189528204821, 0.407183735592979), new Point(0.52256566286087, 0.400994300842285), "424");
addFace(["2191", "2185", "1894", "2231"], "425");
setUVsToFace(new Point(0.326008528470993, 0.353623449802399), new Point(0.413531452417374, 0.353623441061408), new Point(0.413531452417374, 0.389708459377289), "425");
addFace(["1213", "1013", "139", "1205"], "426");
setUVsToFace(new Point(0.495219171047211, 0.851721465587616), new Point(0.49974799156189, 0.834255695343018), new Point(0.546551764011383, 0.839812994003296), "426");
addFace(["1283", "237", "1537"], "428");
setUVsToFace(new Point(0.956176280975342, 0.406134933233261), new Point(0.938132882118225, 0.406135499477386), new Point(0.965198338031769, 0.353623449802399), "428");
addFace(["1975", "115", "905", "1978"], "429");
setUVsToFace(new Point(0.550012230873108, 0.535121440887451), new Point(0.541572004644102, 0.577271644942215), new Point(0.472885012626648, 0.574840545654297), "429");
addFace(["606", "521", "8", "529"], "430");
setUVsToFace(new Point(0.823085909523174, 0.933119081666935), new Point(0.805468022823334, 0.918012142181396), new Point(0.905321896076202, 0.918033421039581), "430");
addFace(["2002", "450", "2021", "1901"], "432");
setUVsToFace(new Point(0.373641043901443, 0.582492470741272), new Point(0.548686921596527, 0.582492470741272), new Point(0.539934515953064, 0.602063179016113), "432");
addFace(["1400", "1647", "1654", "1283"], "433");
setUVsToFace(new Point(0.306960880756378, 0.518383622169495), new Point(0.257790088653564, 0.518383622169495), new Point(0.257790088653564, 0.47462210059166), "433");
addFace(["502", "467", "499", "23"], "434");
setUVsToFace(new Point(0.812323927879333, 0.732847094535828), new Point(0.81685263599195, 0.715381374455249), new Point(0.863656520843506, 0.720938682556152), "434");
addFace(["2180", "1789", "1829", "1792"], "435");
setUVsToFace(new Point(0.800662096010838, 0.804972058625773), new Point(0.700878620147705, 0.808723509311676), new Point(0.717919945716858, 0.792968928813934), "435");
addFace(["688", "95", "219", "1004"], "436");
setUVsToFace(new Point(0.228559628129005, 0.144646123051643), new Point(0.298577964305878, 0.144646123051643), new Point(0.298577964305878, 0.170902997255325), "436");
addFace(["303", "1411", "1487", "302"], "438");
setUVsToFace(new Point(0.600531935691833, 0.240124195814133), new Point(0.613660415741265, 0.247860226143473), new Point(0.569898962974548, 0.247860208153725), "438");
addFace(["450", "1926", "233", "2019"], "439");
setUVsToFace(new Point(0.0447613671422005, 0.0885229319697977), new Point(0.00100000004749745, 0.0928990766406059), new Point(0.00100000004749745, 0.0403853207826614), "439");
addFace(["680", "765", "736", "682"], "440");
setUVsToFace(new Point(0.678115665912628, 0.706070899963379), new Point(0.682491779327393, 0.712260365486145), new Point(0.656234920024872, 0.712260365486145), "440");
addFace(["1249", "1559", "1250"], "582");
setUVsToFace(new Point(0.667544424533844, 0.0499332919716835), new Point(0.630113780498505, 0.0873409062623978), new Point(0.627101004123688, 0.0740464478731155), "582");
addFace(["233", "343", "1563"], "583");
setUVsToFace(new Point(0.90773469209671, 0.803785145282745), new Point(0.918896377086639, 0.792968928813934), new Point(0.950665175914764, 0.801725327968597), "583");
addFace(["1622", "1621", "309"], "610");
setUVsToFace(new Point(0.692431092262268, 0.170902997255325), new Point(0.622412741184235, 0.170902997255325), new Point(0.622412741184235, 0.144646123051643), "610");
addFace(["1933", "1678", "1716"], "636");
setUVsToFace(new Point(0.028065474703908, 0.894101321697235), new Point(0.00100000004749745, 0.841589212417603), new Point(0.0190433114767075, 0.84158980846405), "636");
addFace(["1687", "1954", "1969"], "778");
setUVsToFace(new Point(0.911126732826233, 0.401567906141281), new Point(0.864878416061401, 0.410411685705185), new Point(0.858298718929291, 0.398473232984543), "778");
addFace(["1926", "1960", "1966"], "779");
setUVsToFace(new Point(0.368985891342163, 0.471885472536087), new Point(0.326008498668671, 0.471430778503418), new Point(0.357427924871445, 0.461493730545044), "779");
addFace(["2034", "2042", "429"], "815");
setUVsToFace(new Point(0.205912172794342, 0.528750419616699), new Point(0.205912172794342, 0.47462210059166), new Point(0.205912172794342, 0.510707139968872), "815");
addFace(["2142", "920", "940"], "848");
setUVsToFace(new Point(0.181147500872612, 0.290416985750198), new Point(0.0936245769262314, 0.290417015552521), new Point(0.0804961621761322, 0.27184596657753), "848");
addFace(["2203", "757", "1472"], "871");
setUVsToFace(new Point(0.359843969345093, 0.170902997255325), new Point(0.359843969345093, 0.144646123051643), new Point(0.429862320423126, 0.144646123051643), "871");
addFace(["981", "173", "179", "180"], "884");
setUVsToFace(new Point(0.946301221847534, 0.831223905086517), new Point(0.902539789676666, 0.831223964691162), new Point(0.902539730072021, 0.813180565834045), "884");
addSurface(["217", "405", "109", "216", "55", "582", "156", "195", "125", "236", "157", "197", "237", "25", "262", "269", "136", "388", "279", "149", "268", "64", "204", "130", "313", "425", "137", "65", "189", "263", "199", "34", "389", "285", "435", "266", "131", "35", "432", "20", "28", "267", "164", "90", "91", "152", "134", "276", "227", "52", "205", "153", "165", "337", "179", "436", "226", "200", "288", "72", "429", "408", "135", "336", "348", "100", "2", "316", "298", "112", "301", "0", "239", "201", "5", "101", "367", "297", "113", "256", "296", "74", "324", "75", "61", "358", "314", "116", "140", "384", "309", "4", "422", "117", "341", "167", "213", "12", "295", "168", "162", "27", "282", "332", "141", "325", "26", "247", "304", "212", "110", "398", "169", "126", "409", "393", "349", "42", "115", "273", "399", "73", "387", "146", "272", "440", "439", "114", "111", "347", "311", "98", "362", "43", "438", "127", "300", "7", "53", "346", "417", "143", "329", "102", "412", "305", "403", "144", "884", "145", "8", "37", "411", "81", "80", "356", "183", "400", "401", "430", "30", "202", "166", "330", "308", "44", "36", "271", "338", "76", "402", "203", "355", "318", "414", "142", "354", "293", "45", "215", "254", "99", "154", "191", "188", "345", "433", "139", "138", "390", "255", "196", "434", "353", "381", "193", "132", "70", "57", "31", "270", "333", "133", "187", "779", "370", "385", "361", "265", "360", "287", "225", "68", "312", "331", "69", "160", "147", "94", "50", "410", "155", "219", "379", "218", "161", "291", "95", "319", "170", "190", "371", "372", "224", "206", "232", "192", "848", "251", "238", "10", "394", "58", "243", "391", "322", "56", "249", "344", "84", "6", "426", "158", "339", "250", "317", "66", "14", "778", "260", "386", "41", "59", "67", "252", "18", "261", "11", "342", "104", "105", "85", "93", "46", "294", "302", "182", "92", "233", "306", "258", "32", "214", "19", "15", "428", "815", "368", "315", "350", "234", "343", "23", "151", "610", "240", "253", "51", "340", "97", "871", "176", "369", "257", "96", "583", "351", "38", "103", "177", "259", "62", "407", "86", "47", "395", "39", "79", "78", "241", "406", "63", "245", "9", "274", "71", "120", "82", "228", "222", "275", "1", "121", "246", "242", "418", "83", "48", "181", "175", "373", "184", "40", "229", "77", "208", "185", "209", "118", "13", "174", "223", "419", "303", "159", "280", "383", "221", "420", "326", "163", "123", "89", "374", "24", "87", "281", "180", "16", "230", "198", "231", "122", "171", "17", "284", "421", "172", "22", "119", "60", "107", "33", "376", "375", "106", "178", "235", "3", "88", "327", "128", "377", "129", "49", "636", "380", "244", "404", "424", "29", "220", "108", "124", "148", "186", "54", "207", "264", "150", "173", "194", "211", "210"], "Bunker");
setMaterialToSurface(material, "Bunker");
}
private function onLoadComplete(_arg1:Event):void{
material.texture = new Texture(Bitmap(loader.content).bitmapData);
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("bunker.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading bunker texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
}
}//package bunker
Section 62
//BunkerMesh_Bmp (bunker.BunkerMesh_Bmp)
package bunker {
import mx.core.*;
public class BunkerMesh_Bmp extends BitmapAsset {
}
}//package bunker
Section 63
//BunkerWindows (bunker.BunkerWindows)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.engine3d.materials.*;
public class BunkerWindows extends Mesh {
public function BunkerWindows(){
super("BunkerWindows");
mobile = 1;
addVertex(283.464545654249, 236.220511840773, 165.35434667964, "0");
addVertex(283.464545654249, 314.960669921828, 165.35434667964, "1");
addVertex(299.212592529249, 314.960639404249, 102.362220214796, "2");
addVertex(299.212592529249, 236.220496581984, 102.362235473585, "3");
addVertex(283.464545654249, 3.0517578125E-5, 165.354407714796, "4");
addVertex(283.464545654249, 78.7401727904798, 165.354392456007, "5");
addVertex(299.212592529249, 78.7401727904798, 102.362273620558, "6");
addVertex(299.212592529249, 3.0517578125E-5, 102.362288879347, "7");
addVertex(283.464545654249, -236.220451904344, 165.354438232374, "8");
addVertex(283.464545654249, -157.480339599657, 165.354438232374, "9");
addVertex(299.212592529249, -157.480339599657, 102.362319396925, "10");
addVertex(299.212592529249, -236.220451904344, 102.362334655714, "11");
addVertex(-283.464531494188, 236.220511840773, 165.35434667964, "12");
addVertex(-283.464531494188, 314.960669921828, 165.35434667964, "13");
addVertex(-299.212578369188, 314.960639404249, 102.362220214796, "14");
addVertex(-299.212578369188, 236.220496581984, 102.362235473585, "15");
addVertex(-283.464531494188, 3.0517578125E-5, 165.354407714796, "16");
addVertex(-283.464531494188, 78.7401727904798, 165.354392456007, "17");
addVertex(-299.212578369188, 78.7401727904798, 102.362273620558, "18");
addVertex(-299.212578369188, 3.0517578125E-5, 102.362288879347, "19");
addVertex(-283.464531494188, -236.220451904344, 165.354438232374, "20");
addVertex(-283.464531494188, -157.480339599657, 165.354438232374, "21");
addVertex(-299.212578369188, -157.480339599657, 102.362319396925, "22");
addVertex(-299.212578369188, -236.220451904344, 102.362334655714, "23");
addVertex(283.464545654249, -866.14174707036, 165.354529785109, "24");
addVertex(283.464545654249, -944.88198144536, 165.354560302687, "25");
addVertex(299.212592529249, -944.88198144536, 102.362426208449, "26");
addVertex(299.212592529249, -866.14174707036, 102.362418579054, "27");
addVertex(283.464545654249, -629.921288085985, 165.354499267531, "28");
addVertex(283.464545654249, -708.661522460985, 165.354529785109, "29");
addVertex(299.212592529249, -708.661522460985, 102.36239569087, "30");
addVertex(299.212592529249, -629.921288085985, 102.362388061476, "31");
addVertex(283.464545654249, -393.700798584032, 165.354468749953, "32");
addVertex(283.464545654249, -472.440910888719, 165.354484008742, "33");
addVertex(299.212592529249, -472.440910888719, 102.362365173292, "34");
addVertex(299.212592529249, -393.700798584032, 102.362357543898, "35");
addVertex(-283.464531494188, -944.88198144536, 165.354560302687, "36");
addVertex(-283.464531494188, -866.14174707036, 165.354529785109, "37");
addVertex(-299.212578369188, -944.88198144536, 102.362426208449, "38");
addVertex(-299.212578369188, -866.14174707036, 102.362418579054, "39");
addVertex(-283.464531494188, -708.661522460985, 165.354529785109, "40");
addVertex(-283.464531494188, -629.921288085985, 165.354499267531, "41");
addVertex(-299.212578369188, -708.661522460985, 102.36239569087, "42");
addVertex(-299.212578369188, -629.921288085985, 102.362388061476, "43");
addVertex(-283.464531494188, -472.440910888719, 165.354484008742, "44");
addVertex(-283.464531494188, -393.700798584032, 165.354468749953, "45");
addVertex(-299.212578369188, -472.440910888719, 102.362365173292, "46");
addVertex(-299.212578369188, -393.700798584032, 102.362357543898, "47");
addFace(["9", "10", "11", "8"], "16");
addFace(["37", "36", "38", "39"], "1");
addFace(["30", "29", "28", "31"], "2");
addFace(["45", "44", "46", "47"], "3");
addFace(["6", "7", "4", "5"], "4");
addFace(["26", "25", "24", "27"], "5");
addFace(["0", "1", "2", "3"], "6");
addFace(["23", "22", "21", "20"], "0");
addFace(["34", "33", "32", "35"], "24");
addFace(["41", "40", "42", "43"], "12");
addFace(["17", "16", "19", "18"], "13");
addFace(["14", "13", "12", "15"], "8");
addSurface(["24", "16", "2", "3", "5", "12", "13", "8", "6", "0", "1", "4"], "BunkerWindows");
setMaterialToSurface(new FillMaterial(0xFFFFFF), "BunkerWindows");
}
}
}//package bunker
Section 64
//Core (bunker.Core)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.display.*;
public class Core extends Mesh {
public function Core(){
super("Core");
coords = new Point3D(4.13731169549708E-13, 2322.83471679688, -433.070861816406);
addVertex(78.7401580810543, 0, 0, "0");
addVertex(68.1909790039058, 39.3701171875, 0, "1");
addVertex(39.3700752258297, 68.19091796875, 0, "2");
addVertex(-3.44184168616469E-6, 78.740234375, 0, "3");
addVertex(-39.370082855225, 68.19091796875, 0, "4");
addVertex(-68.1909790039067, 39.3701171875, 0, "5");
addVertex(-78.7401580810551, 0, 0, "6");
addVertex(-68.1909866333012, -39.3701171875, 0, "7");
addVertex(-39.3701019287113, -68.19091796875, 0, "8");
addVertex(-3.66072676614769E-5, -78.740234375, 0, "9");
addVertex(39.3700408935543, -68.19091796875, 0, "10");
addVertex(68.1909484863277, -39.3701171875, 0, "11");
addVertex(78.7401580810543, 0, 409.448822021484, "12");
addVertex(68.1909790039058, 39.3701171875, 409.448822021484, "13");
addVertex(39.3700752258297, 68.19091796875, 409.448822021484, "14");
addVertex(-39.370082855225, 68.19091796875, 409.448822021484, "16");
addVertex(-68.1909790039067, 39.3701171875, 409.448822021484, "17");
addVertex(-78.7401580810551, 0, 409.448822021484, "18");
addVertex(-68.1909866333012, -39.3701171875, 409.448822021484, "19");
addVertex(-39.3701019287113, -68.19091796875, 409.448822021484, "20");
addVertex(-3.66072676614769E-5, -78.740234375, 409.448822021484, "21");
addVertex(39.3700408935543, -68.19091796875, 409.448822021484, "22");
addVertex(68.1909484863277, -39.3701171875, 409.448822021484, "23");
addVertex(-3.44184259565939E-6, 78.740234375, 409.448822021484, "25");
addFace(["7", "19", "18", "6"], "0");
addFace(["23", "11", "0", "12"], "1");
addFace(["12", "0", "1", "13"], "2");
addFace(["17", "5", "6", "18"], "3");
addFace(["2", "14", "13", "1"], "4");
addFace(["11", "23", "22", "10"], "5");
addFace(["3", "25", "14", "2"], "24");
addFace(["20", "8", "9", "21"], "8");
addFace(["10", "22", "21", "9"], "10");
addFace(["19", "7", "8", "20"], "11");
addFace(["16", "4", "5", "17"], "12");
addFace(["25", "3", "4", "16"], "9");
addSurface(["24", "9", "4", "2", "0", "1", "3", "5", "10", "11", "12", "8"], "Core");
setMaterialToSurface(new FillMaterial(1965853, 0.25, BlendMode.ADD), "Core");
}
}
}//package bunker
Section 65
//Energy (bunker.Energy)
package bunker {
import flash.events.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import alternativa.utils.*;
import alternativa.engine3d.primitives.*;
import flash.filters.*;
public class Energy extends Plane {
private var shape:Shape;
public var material:TextureMaterial;
private var gfx:Graphics;
private static const bitmapHeight:uint = 307;
private static const bitmapWidth:uint = 90;
private static const texture:Texture = new Texture(new BitmapData(bitmapWidth, bitmapHeight, false, 0));
private static const xd:Number = 25;
private static const glowSize:Number = 20;
public function Energy(){
material = new TextureMaterial(texture, 1, false, false, BlendMode.ADD, 15);
shape = new Shape();
gfx = shape.graphics;
super(120, 409, 1, 1, false);
mobile = 100;
rotationX = MathUtils.DEG90;
y = 2322.835;
z = -228.346;
setMaterialToSurface(material, "front");
shape.filters = [new GlowFilter(15658547, 1, glowSize, glowSize, 2, 1)];
}
public function onEnterFrame(_arg1:Event):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
gfx.clear();
var _local2:uint = MathUtils.random(3, 6);
var _local3:uint;
while (_local3 < _local2) {
_local4 = Math.random();
_local5 = MathUtils.random((-(xd) * (1 - _local4)), (xd * (1 - _local4)));
_local6 = glowSize;
gfx.moveTo(_local5, _local6);
gfx.lineStyle((_local4 * 8), 0xFFFFFF, _local4);
while (_local6 < ((bitmapHeight - glowSize) - (bitmapHeight / 10))) {
_local6 = (_local6 + MathUtils.random(5, (bitmapHeight / 10)));
_local5 = (_local5 + MathUtils.random((-((1 - _local4)) * 15), ((1 - _local4) * 15)));
_local5 = ((_local5)<-(xd)) ? -(xd) : ((_local5)>xd) ? xd : _local5;
gfx.lineTo(_local5, _local6);
};
_local5 = (_local5 + MathUtils.random(-10, 10));
gfx.lineTo(_local5, (bitmapHeight - 10));
_local3++;
};
texture.bitmapData.fillRect(texture.bitmapData.rect, 0);
texture.bitmapData.draw(shape, new Matrix(1, 0, 0, 1, (bitmapWidth * 0.5)));
}
}
}//package bunker
Section 66
//Entrance (bunker.Entrance)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Entrance extends Mesh {
private var loader:Loader;
private var onLoadMethod:Function;
public var material:TextureMaterial;
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = Entrance_Bmp;
public function Entrance(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Entrance");
mobile = 2;
coords = new Point3D(362.204772949219, -1921.26000976563, 78.7401580810547);
addVertex(354.330688476563, -141.732055664063, 62.9921264648438, "256");
addVertex(-47.2441253662109, -307.086547851563, -78.7399368286133, "762");
addVertex(338.582641601563, 62.9923095703125, -78.7401580810547, "3");
addVertex(338.582641601563, 78.7403564453125, -62.9921264648438, "260");
addVertex(343.195190429688, -168.615600585938, -62.9921264648438, "5");
addVertex(354.330688476563, 62.9923095703125, 62.9921264648438, "262");
addVertex(174.156097412109, 272.643310546875, -11.8110198974609, "8");
addVertex(217.85205078125, 144.413696289063, -11.81103515625, "9");
addVertex(217.85205078125, 144.413696289063, 11.81103515625, "10");
addVertex(354.330688476563, -141.732055664063, -62.9921264648438, "267");
addVertex(195.405151367188, 137.0673828125, 11.8110198974609, "12");
addVertex(195.405151367188, 137.0673828125, -11.81103515625, "13");
addVertex(-338.582702636719, 62.9923095703125, -78.7401580810547, "518");
addVertex(102.362182617188, 314.960815429688, 62.9921264648438, "783");
addVertex(-354.330749511719, 62.9923095703125, 62.9921264648438, "528");
addVertex(338.582702636719, -150.957153320313, -78.7401580810547, "265");
addVertex(-207.986022949219, -303.825073242188, -62.9921264648438, "515");
addVertex(43.1441650390625, 314.960815429688, 62.9923553466797, "781");
addVertex(212.598388671875, 78.7403564453125, -62.9921264648438, "22");
addVertex(-62.9921569824219, -307.086547851563, -55.6296920776367, "774");
addVertex(-338.582702636719, -150.957153320313, -78.7401580810547, "536");
addVertex(123.228302001953, 299.6064453125, -62.9921264648438, "281");
addVertex(-343.195251464844, -168.615600585938, 62.9921264648438, "541");
addVertex(354.330688476563, 62.9923095703125, -62.9921264648438, "261");
addVertex(-43.1442260742188, 314.960815429688, 62.9923553466797, "801");
addVertex(106.759643554688, 299.212768554688, 78.7401580810547, "290");
addVertex(343.195190429688, -168.615600585938, 62.9921264648438, "35");
addVertex(212.598388671875, 78.7403564453125, 62.9921264648438, "293");
addVertex(191.732269287109, 94.0946044921875, 63.4461669921875, "294");
addVertex(-190.327423095703, -299.212524414063, 78.7401580810547, "544");
addVertex(-338.582702636719, 78.7403564453125, -62.9921264648438, "517");
addVertex(-106.759704589844, 299.212768554688, -78.7401580810547, "556");
addVertex(-102.362243652344, 314.960815429688, 62.9921264648438, "797");
addVertex(-62.9921569824219, -299.212524414063, -55.6296844482422, "765");
addVertex(191.732269287109, 94.0946044921875, -62.9921264648438, "306");
addVertex(186.307098388672, 109.936157226563, -50.2340850830078, "308");
addVertex(128.379150390625, 283.673706054688, -50.2345886230469, "309");
addVertex(-191.732299804688, 94.0946044921875, -62.9921264648438, "566");
addVertex(7.87396240234375, 7.8741455078125, 35.4330749511719, "55");
addVertex(76.1498107910156, -137.750854492188, 35.4330902099609, "57");
addVertex(-102.362243652344, 314.960815429688, -62.9921264648438, "570");
addVertex(84.0238037109375, -124.112670898438, 35.4330902099609, "60");
addVertex(-47.2441253662109, 299.213012695313, -78.7399291992188, "812");
addVertex(-181.102447509766, -314.960571289063, 62.9921264648438, "822");
addVertex(190.327362060547, -299.212524414063, 78.7401580810547, "823");
addVertex(-123.228363037109, 299.6064453125, -62.9921264648438, "576");
addVertex(88.7898864746094, -108.353881835938, -43.3070831298828, "65");
addVertex(64.90576171875, -149.606323242188, -51.1811065673828, "67");
addVertex(-31.49609375, -307.086547851563, 47.2443237304688, "773");
addVertex(-11.81103515625, -74.8031005859375, 43.3071136474609, "829");
addVertex(28.4540710449219, 11.8111572265625, 43.3070831298828, "70");
addVertex(14.3917388916016, -79.364501953125, 43.3071136474609, "831");
addVertex(69.4454040527344, -157.480346679688, 43.3070831298828, "72");
addVertex(-185.499877929688, 62.9923095703125, -78.7401580810547, "841");
addVertex(186.581420898438, 110.02734375, 50.6900634765625, "313");
addVertex(-2.58078002929688, -99.82177734375, 43.3071136474609, "835");
addVertex(116.092102050781, -108.360229492188, -78.7401580810547, "332");
addVertex(80.2637023925781, -314.960571289063, -58.2493515014648, "77");
addVertex(-128.653564453125, 283.764770507813, 50.7051239013672, "591");
addVertex(123.228302001953, 299.6064453125, 63.4645690917969, "328");
addVertex(47.2440643310547, -299.212524414063, -78.7399291992188, "849");
addVertex(-191.732330322266, 94.0946044921875, 63.4461669921875, "586");
addVertex(15.8327789306641, -84.7425537109375, 39.3701019287109, "339");
addVertex(31.4960327148438, 299.212890625, 47.2443237304688, "84");
addVertex(77.0317993164063, 314.960693359375, -62.9921569824219, "85");
addVertex(7.95877075195313, -98.3807373046875, 39.3701019287109, "336");
addVertex(-123.228363037109, 299.6064453125, 63.4645690917969, "594");
addVertex(-207.986022949219, -303.825073242188, 62.9921264648438, "91");
addVertex(78.548583984375, -173.228149414063, 78.7401580810547, "604");
addVertex(102.434173583984, -108.359985351563, -47.2440948486328, "333");
addVertex(-212.598449707031, 78.7403564453125, -62.9921264648438, "96");
addVertex(69.4454040527344, -157.480346679688, -43.3070831298828, "354");
addVertex(71.7152404785156, -161.417358398438, 47.2440948486328, "603");
addVertex(-354.330749511719, 62.9923095703125, -62.9921264648438, "100");
addVertex(-354.330749511719, -141.732055664063, -62.9921264648438, "101");
addVertex(71.7152404785156, -161.417358398438, -47.2440948486328, "606");
addVertex(-102.434204101563, -108.35986328125, 47.2440948486328, "615");
addVertex(97.8860473632813, -108.35791015625, -43.3070831298828, "352");
addVertex(-195.405212402344, 137.0673828125, 11.8110198974609, "105");
addVertex(-354.330749511719, -141.732055664063, 62.9921264648438, "98");
addVertex(-186.307159423828, 109.936157226563, -50.2340850830078, "107");
addVertex(-128.379211425781, 283.673706054688, -50.2345886230469, "109");
addVertex(-217.852111816406, 144.413696289063, 11.81103515625, "111");
addVertex(-116.092163085938, -108.360229492188, -78.7401580810547, "624");
addVertex(23.9097137451172, 3.9371337890625, -43.3070831298828, "369");
addVertex(-195.405212402344, 137.0673828125, -11.81103515625, "106");
addVertex(23.9097137451172, 3.9371337890625, -51.1811065673828, "371");
addVertex(-37.5840454101563, 27.5592041015625, -78.7401580810547, "630");
addVertex(88.7898864746094, -108.353881835938, -51.1811065673828, "367");
addVertex(-174.156127929688, 272.643310546875, -11.8110198974609, "113");
addVertex(30.7262420654297, 15.7481689453125, 47.2440948486328, "378");
addVertex(102.434143066406, -108.35986328125, 47.2440948486328, "379");
addVertex(7.87396240234375, -70.8660888671875, 39.3701019287109, "636");
addVertex(37.583984375, 27.5592041015625, -78.7401580810547, "893");
addVertex(-30.7263031005859, 15.7481689453125, 47.2440948486328, "600");
addVertex(77.5908508300781, -143.129028320313, 43.3071136474609, "383");
addVertex(11.8109741210938, 11.8111572265625, 43.3071136474609, "640");
addVertex(-78.5486450195313, -173.228393554688, -78.7401580810547, "625");
addVertex(-23.9097747802734, 3.9371337890625, -43.3070831298828, "370");
addVertex(30.7262420654297, 15.7481689453125, -47.2440948486328, "627");
addVertex(89.40185546875, -122.671630859375, 43.3071136474609, "389");
addVertex(185.499816894531, 62.9923095703125, -78.7401580810547, "896");
addVertex(-7.8740234375, 7.8741455078125, 35.4330749511719, "643");
addVertex(78.548583984375, -173.228393554688, -78.7401580810547, "900");
addVertex(-30.7263031005859, 15.7481689453125, -47.2440948486328, "142");
addVertex(-76.1498718261719, -137.750854492188, 35.4330902099609, "655");
addVertex(-64.9058227539063, -149.606323242188, -51.1811065673828, "144");
addVertex(-88.7899475097656, -108.353881835938, -51.1811065673828, "145");
addVertex(-11.81103515625, 11.8111572265625, 43.3071136474609, "147");
addVertex(11.8109741210938, -74.8031005859375, 43.3071136474609, "404");
addVertex(-7.8740234375, -70.8660888671875, 39.3701019287109, "149");
addVertex(-71.7153015136719, -161.417358398438, -47.2440948486328, "662");
addVertex(-78.5486297607422, -173.228149414063, 78.7401580810547, "911");
addVertex(-102.434234619141, -108.359985351563, -47.2440948486328, "664");
addVertex(-7.95883178710938, -98.3807373046875, 39.3701019287109, "153");
addVertex(-14.3917999267578, -79.364501953125, 43.3071136474609, "155");
addVertex(-15.8328399658203, -84.7425537109375, 39.3701019287109, "156");
addVertex(-28.4541320800781, 11.8111572265625, -43.3070831298828, "669");
addVertex(-84.0238647460938, -124.112670898438, 35.4330902099609, "158");
addVertex(43.1441650390625, -314.960571289063, 62.9923553466797, "415");
addVertex(106.759643554688, 299.212768554688, -78.7401580810547, "890");
addVertex(28.4540710449219, 11.8111572265625, -43.3070831298828, "673");
addVertex(-64.9058074951172, -149.606323242188, -43.3070831298828, "162");
addVertex(-88.7899475097656, -108.353881835938, -43.3070831298828, "163");
addVertex(97.8860473632813, -108.35791015625, 43.3070831298828, "403");
addVertex(-338.582702636719, 62.9923095703125, 78.7401580810547, "917");
addVertex(-69.4454650878906, -157.480346679688, 43.3070831298828, "167");
addVertex(77.0317993164063, -314.960571289063, -62.9921646118164, "424");
addVertex(-69.4454650878906, -157.480346679688, -43.3070831298828, "681");
addVertex(-97.8861083984375, -108.35791015625, -43.3070831298828, "682");
addVertex(-31.49609375, -299.212524414063, 47.2443237304688, "171");
addVertex(181.102386474609, -314.960571289063, -62.9921264648438, "411");
addVertex(-80.2637634277344, -314.960571289063, -58.2493515014648, "174");
addVertex(-31.49609375, 299.212890625, 47.2443237304688, "176");
addVertex(-77.0318603515625, 314.960693359375, -62.9921569824219, "177");
addVertex(-80.2637634277344, 314.960693359375, -58.2493591308594, "178");
addVertex(-62.9921569824219, 299.212768554688, -55.6296844482422, "179");
addVertex(62.9920959472656, -307.086547851563, -55.6296920776367, "436");
addVertex(47.2440643310547, -307.086547851563, -78.7399368286133, "430");
addVertex(31.4960327148438, -299.212524414063, 47.2443237304688, "439");
addVertex(-23.9097747802734, 3.9371337890625, -51.1811065673828, "696");
addVertex(64.9057464599609, -149.606323242188, -43.3070831298828, "689");
addVertex(116.092102050781, -108.360229492188, 78.7401580810547, "946");
addVertex(62.9920959472656, -299.212524414063, -55.6296844482422, "435");
addVertex(-37.5840454101563, 27.5592041015625, 78.7401580810547, "929");
addVertex(-106.759704589844, 299.212768554688, 78.7401580810547, "930");
addVertex(102.362182617188, 314.960815429688, -62.9921264648438, "446");
addVertex(-185.499877929688, 62.9923095703125, 78.7401580810547, "921");
addVertex(80.2637023925781, 314.960693359375, -58.2493591308594, "448");
addVertex(37.583984375, 27.5592041015625, 78.7401580810547, "934");
addVertex(128.653503417969, 283.764770507813, 50.7051239013672, "194");
addVertex(62.9920959472656, 299.212768554688, -55.6296844482422, "451");
addVertex(47.2440643310547, 299.213012695313, -78.7399291992188, "452");
addVertex(-338.582702636719, -150.957153320313, 78.7401580810547, "915");
addVertex(-77.5909118652344, -143.129028320313, 43.3071136474609, "710");
addVertex(-71.7153015136719, -161.417358398438, 47.2440948486328, "712");
addVertex(-186.581481933594, 110.02734375, 50.6900634765625, "457");
addVertex(338.582641601563, -150.957153320313, 78.7401580810547, "945");
addVertex(-116.092163085938, -108.360229492188, 78.7401580810547, "910");
addVertex(-151.709228515625, 265.296997070313, -11.8110198974609, "463");
addVertex(-89.4019165039063, -122.671630859375, 43.3071136474609, "657");
addVertex(-28.4541320800781, 11.8111572265625, 43.3070831298828, "721");
addVertex(151.709167480469, 265.296997070313, 11.81103515625, "210");
addVertex(151.709167480469, 265.296997070313, -11.8110198974609, "211");
addVertex(-151.709228515625, 265.296997070313, 11.81103515625, "469");
addVertex(174.156097412109, 272.643310546875, 11.81103515625, "214");
addVertex(-97.8861083984375, -108.35791015625, 43.3070831298828, "720");
addVertex(-217.852111816406, 144.413696289063, -11.81103515625, "476");
addVertex(-174.156127929688, 272.643310546875, 11.81103515625, "480");
addVertex(2.58071899414063, -99.82177734375, 43.3071136474609, "738");
addVertex(-190.327423095703, -299.212524414063, -78.7401580810547, "740");
addVertex(190.327362060547, -299.212524414063, -78.7401580810547, "229");
addVertex(-77.0318603515625, -314.960571289063, -62.9921646118164, "743");
addVertex(338.582702636719, 78.7403564453125, 62.9921264648438, "233");
addVertex(185.499816894531, 62.9923095703125, 78.7401580810547, "235");
addVertex(-338.582702636719, 78.7403564453125, 62.9921264648438, "492");
addVertex(-43.1442260742188, -314.960571289063, 62.9923553466797, "752");
addVertex(181.102386474609, -314.960571289063, 62.9921264648438, "241");
addVertex(-343.195251464844, -168.615600585938, -62.9921264648438, "498");
addVertex(207.985961914063, -303.825073242188, 62.9921264648438, "243");
addVertex(207.985961914063, -303.825073242188, -62.9921264648438, "244");
addVertex(-212.598449707031, 78.7403564453125, 62.9921264648438, "505");
addVertex(-181.102447509766, -314.960571289063, -62.9921264648438, "745");
addVertex(-47.2441253662109, -299.212524414063, -78.7399291992188, "755");
addVertex(338.582702636719, 62.9923095703125, 78.7401580810547, "253");
addVertex(31.4960327148438, -307.086547851563, 47.2443237304688, "767");
addFace(["439", "415", "77", "435"], "0");
setUVsToFace(new Point(0.347750902175903, 0.717860758304596), new Point(0.363310426473618, 0.704885303974152), new Point(0.384936958551407, 0.804781794548035), "0");
addFace(["745", "515", "91", "822"], "1");
setUVsToFace(new Point(0.174701154232025, 0.671431720256805), new Point(0.151244834065437, 0.671431720256805), new Point(0.151244834065437, 0.56987601518631), "1");
addFace(["505", "921", "917", "492"], "2");
setUVsToFace(new Point(0.946728646755219, 0.878229845317248), new Point(0.928776025772095, 0.900073945522308), new Point(0.928776025772095, 0.776674211025238), "2");
addFace(["371", "369", "370", "696"], "3");
setUVsToFace(new Point(0.0150818433612585, 0.638357162475586), new Point(0.0150818433612585, 0.632009983062744), new Point(0.0536290518939495, 0.632009983062744), "3");
addFace(["256", "945", "253", "262"], "4");
setUVsToFace(new Point(0.887042343616486, 0.990766704082489), new Point(0.869089782238007, 0.998203042903527), new Point(0.869089782238007, 0.825738668441772), "4");
addFace(["603", "604", "911", "712"], "5");
setUVsToFace(new Point(0.622293472290039, 0.829686403274536), new Point(0.595178067684174, 0.835194706916809), new Point(0.595178067684174, 0.708558976650238), "5");
addFace(["383", "72", "167", "710", "835", "738"], "6");
setUVsToFace(new Point(0.503248274326324, 0.690256297588348), new Point(0.491679638624191, 0.683690249919891), new Point(0.491679296659986, 0.571730437302508), "6");
addFace(["801", "797", "570", "178"], "7");
setUVsToFace(new Point(0.666229844093323, 0.819273889064789), new Point(0.71396541595459, 0.819274067878723), new Point(0.71396541595459, 0.920829713344574), "7");
addFace(["294", "235", "290", "328"], "8");
setUVsToFace(new Point(0.807324707508087, 0.93432205915451), new Point(0.789641418859338, 0.956518770430646), new Point(0.78962367773056, 0.755801677703857), "8");
addFace(["896", "890", "893", "332"], "9");
setUVsToFace(new Point(0.191417098045349, 0.42346203327179), new Point(0.00100027374222797, 0.359989714782418), new Point(0.219979703426361, 0.304227322340012), "9");
addFace(["712", "911", "910", "615"], "10");
setUVsToFace(new Point(0.484120428562164, 0.969141960144043), new Point(0.45699942111969, 0.974622189998627), new Point(0.457000881433487, 0.91420578956604), "10");
addFace(["142", "630", "624", "664"], "11");
setUVsToFace(new Point(0.840021669864655, 0.656810462474823), new Point(0.867141093723551, 0.651321833373506), new Point(0.867144227027893, 0.777859807014465), "11");
addFace(["591", "457", "105", "469"], "12");
setUVsToFace(new Point(0.733735680580139, 0.798960208892822), new Point(0.733968598445509, 0.651002270519287), new Point(0.767785549163818, 0.669721722602844), "12");
addFace(["457", "107", "106", "105"], "13");
setUVsToFace(new Point(0.410779029130936, 0.704885303974152), new Point(0.410856476108602, 0.786239912971017), new Point(0.38785108923912, 0.755267381668091), "13");
addFace(["624", "625", "662", "664"], "14");
setUVsToFace(new Point(0.375469148159027, 0.937825977802277), new Point(0.375470638275146, 0.998242378234863), new Point(0.34835228014921, 0.992757473585298), "14");
addFace(["451", "448", "781", "84"], "15");
setUVsToFace(new Point(0.298017263412476, 0.907093167304993), new Point(0.27918142080307, 0.909251570701599), new Point(0.300807867877079, 0.809355079267211), "15");
addFace(["934", "930", "290", "235", "946"], "16");
setUVsToFace(new Point(0.75508975982666, 0.304227322340012), new Point(0.974069119710461, 0.187872118409697), new Point(0.974069189510793, 0.359989714782418), "16");
addFace(["174", "765", "755", "743"], "17");
setUVsToFace(new Point(0.0182863753288984, 0.860762000083923), new Point(0.0159843061119318, 0.841943144798279), new Point(0.0362928044994646, 0.832157547536106), "17");
addFace(["294", "328", "194", "313"], "18");
setUVsToFace(new Point(0.00101476011332124, 0.883182883262634), new Point(0.000999841816020227, 0.70855427653404), new Point(0.0112859541550279, 0.72205650806427), "18");
addFace(["332", "265", "3", "896"], "19");
setUVsToFace(new Point(0.329544067382813, 0.367512583732605), new Point(0.363881319761276, 0.546861827373505), new Point(0.191417065953806, 0.546861806662824), "19");
addFace(["643", "147", "640", "55"], "20");
setUVsToFace(new Point(0.0989832580089569, 0.626598060131073), new Point(0.0918868258595467, 0.629771649837494), new Point(0.0918868258595467, 0.610729992389679), "20");
addFace(["243", "823", "945", "35"], "21");
setUVsToFace(new Point(0.435161232948303, 0.970929324626923), new Point(0.417208410370264, 0.978365453303557), new Point(0.417208552360535, 0.809355139732361), "21");
addFace(["244", "229", "411"], "22");
setUVsToFace(new Point(0.595178067684174, 0.837137460708618), new Point(0.610671520233154, 0.848865687847137), new Point(0.595178067684174, 0.860593795776367), "22");
addFace(["306", "896", "22"], "23");
setUVsToFace(new Point(0.459794878959656, 0.65161520242691), new Point(0.448982059955597, 0.678035795688629), new Point(0.43891167640686, 0.65161520242691), "23");
addFace(["241", "823", "243"], "24");
setUVsToFace(new Point(0.12036619335413, 0.860593914985657), new Point(0.10487274825573, 0.848865747451782), new Point(0.12036619335413, 0.837137579917908), "24");
addFace(["293", "235", "294"], "25");
setUVsToFace(new Point(0.630088031291962, 0.995541870594025), new Point(0.639401733875275, 0.968845129013062), new Point(0.650960266590118, 0.99477219581604), "25");
addFace(["890", "281", "446"], "26");
setUVsToFace(new Point(0.943847298622131, 0.983895361423492), new Point(0.928776025772095, 0.994399785995483), new Point(0.928776025772095, 0.973516464233398), "26");
addFace(["783", "328", "290"], "27");
setUVsToFace(new Point(0.452241539955139, 0.934697687625885), new Point(0.451787441968918, 0.955579519271851), new Point(0.437103986740112, 0.944979548454285), "27");
addFace(["3", "261", "260"], "28");
setUVsToFace(new Point(0.6107257604599, 0.988975822925568), new Point(0.595178306102753, 0.997952103614807), new Point(0.595178306102753, 0.979999482631683), "28");
addFace(["233", "262", "253"], "29");
setUVsToFace(new Point(0.964218974113464, 0.978300094604492), new Point(0.964218974113464, 0.996252715587616), new Point(0.948671460151672, 0.987276434898376), "29");
addFace(["5", "267", "265"], "30");
setUVsToFace(new Point(0.908880591392517, 0.971083760261536), new Point(0.908880591392517, 0.947627365589142), new Point(0.924374103546143, 0.959355533123016), "30");
addFace(["945", "256", "35"], "31");
setUVsToFace(new Point(0.840021669864655, 0.965937674045563), new Point(0.85551518201828, 0.954209446907043), new Point(0.85551518201828, 0.977665781974792), "31");
addFace(["822", "544", "823", "752"], "32");
setUVsToFace(new Point(0.993964612483978, 0.300408899784088), new Point(0.976011991500854, 0.307845145463943), new Point(0.976011991500854, 0.00100000004749745), "32");
addFace(["163", "162", "144", "145"], "33");
setUVsToFace(new Point(0.820377945899963, 0.998999953269958), new Point(0.820377945899963, 0.960575103759766), new Point(0.82672518491745, 0.960575103759766), "33");
addFace(["98", "541", "498", "101"], "34");
setUVsToFace(new Point(0.595178306102753, 0.875529646873474), new Point(0.618634581565857, 0.875529646873474), new Point(0.618634581565857, 0.977085471153259), "34");
addFace(["781", "783", "290"], "291");
setUVsToFace(new Point(0.906937658786774, 0.772168815135956), new Point(0.906937777996063, 0.819904386997223), new Point(0.888985157012939, 0.82344925403595), "291");
addFace(["12", "313", "194", "210"], "36");
setUVsToFace(new Point(0.664287090301514, 0.948512256145477), new Point(0.630088031291962, 0.966902375221252), new Point(0.630237102508545, 0.819273829460144), "36");
addFace(["70", "403", "389", "831", "404", "640"], "37");
setUVsToFace(new Point(0.628145277500153, 0.650647222995758), new Point(0.531277179718018, 0.706616222858429), new Point(0.51973889402974, 0.699777140003946), "37");
addFace(["100", "528", "98", "101"], "38");
setUVsToFace(new Point(0.731643736362457, 0.713832557201385), new Point(0.630088031291962, 0.713832557201385), new Point(0.630088031291962, 0.548804581165314), "38");
addFace(["492", "528", "100", "517"], "39");
setUVsToFace(new Point(0.972468793392181, 0.756182193756104), new Point(0.99042135477066, 0.756182312965393), new Point(0.99042135477066, 0.857738018035889), "39");
addFace(["171", "439", "767", "773"], "40");
setUVsToFace(new Point(0.628145277500153, 0.626604199409485), new Point(0.577367424964905, 0.626604199409485), new Point(0.577367424964905, 0.620256960391998), "40");
addFace(["849", "435", "77", "424"], "41");
setUVsToFace(new Point(0.174701154232025, 0.701007544994354), new Point(0.154392674565315, 0.69122189283371), new Point(0.156694745761629, 0.672403085886149), "41");
addFace(["606", "900", "332", "333"], "42");
setUVsToFace(new Point(0.319281488656998, 0.94330632686615), new Point(0.346402525901794, 0.937826037406921), new Point(0.346404347723934, 0.998248153263217), "42");
addFace(["774", "762", "755", "765"], "43");
setUVsToFace(new Point(0.49565252661705, 0.691709280014038), new Point(0.518195688724518, 0.691709458827972), new Point(0.518195688724518, 0.698056697845459), "43");
addFace(["627", "893", "630", "142"], "44");
setUVsToFace(new Point(0.666229844093323, 0.9292718904875), new Point(0.693345248699188, 0.923743844032288), new Point(0.693345248699188, 0.984336614608765), "44");
addFace(["415", "241", "411", "77"], "45");
setUVsToFace(new Point(0.491679638624191, 0.986737549304962), new Point(0.491679847240448, 0.875529646873474), new Point(0.593235552128445, 0.875529699860658), "45");
addFace(["586", "566", "107", "457"], "46");
setUVsToFace(new Point(0.139423131942749, 0.548804581165314), new Point(0.241338282823563, 0.548804581165314), new Point(0.231056081957721, 0.562224566961153), "46");
addFace(["369", "673", "669", "370"], "47");
setUVsToFace(new Point(0.0073472373187542, 0.646984061694004), new Point(0.00100000004749745, 0.650647222995758), new Point(0.00100000004749745, 0.604773581027985), "47");
addFace(["8", "211", "13", "9"], "48");
setUVsToFace(new Point(0.382002770900726, 0.548804581165314), new Point(0.400097221136093, 0.554726421833038), new Point(0.364873945713043, 0.658092141151428), "48");
addFace(["823", "415", "752"], "305");
setUVsToFace(new Point(0.976011991500854, 0.00100000004749745), new Point(0.993964493274689, 0.119644112884998), new Point(0.993964493274689, 0.189201042056084), "305");
addFace(["265", "229", "244", "5"], "50");
setUVsToFace(new Point(0.906937897205353, 0.825391948223114), new Point(0.906937897205353, 0.994402408599854), new Point(0.888984982645294, 0.986966294881365), "50");
addFace(["253", "235", "293", "233"], "51");
setUVsToFace(new Point(0.908880591392517, 0.945684508403238), new Point(0.908880591392517, 0.822284698486328), new Point(0.926833212375641, 0.844128847122192), "51");
addFace(["194", "309", "211", "210"], "52");
setUVsToFace(new Point(0.859925806522369, 0.548804581165314), new Point(0.860209162429109, 0.63017173450941), new Point(0.836113572120667, 0.599198818206787), "52");
addFace(["370", "163", "145", "696"], "53");
setUVsToFace(new Point(0.859917104244232, 0.884343028068542), new Point(0.859917104244232, 0.779802560806274), new Point(0.866264402866364, 0.779802560806274), "53");
addFace(["171", "752", "415", "439"], "54");
setUVsToFace(new Point(0.452651858329773, 0.765052676200867), new Point(0.43469911813736, 0.774442195892334), new Point(0.43469911813736, 0.704885303974152), "54");
addFace(["411", "229", "849", "424"], "55");
setUVsToFace(new Point(0.968567073345184, 0.868454337120056), new Point(0.986519873142242, 0.861018121242523), new Point(0.986519791193736, 0.976357365474296), "55");
addFace(["261", "267", "256", "262"], "56");
setUVsToFace(new Point(0.593235313892365, 0.708558976650238), new Point(0.593235313892365, 0.87358695268631), new Point(0.491679638624191, 0.87358695268631), "56");
addFace(["921", "930", "934", "929"], "57");
setUVsToFace(new Point(0.783652333864281, 0.124399818598533), new Point(0.97406929731369, 0.187872141599655), new Point(0.75508975982666, 0.304227322340012), "57");
addFace(["174", "743", "745"], "276");
setUVsToFace(new Point(0.0987327396869659, 0.915047585964203), new Point(0.10255590826273, 0.912442326545715), new Point(0.102555885910988, 0.996333539485931), "276");
addFace(["194", "328", "281", "309"], "59");
setUVsToFace(new Point(0.0112859541550279, 0.72205650806427), new Point(0.00100000004749745, 0.708558976650238), new Point(0.102926674335107, 0.708461403560685), "59");
addFace(["841", "556", "576", "566"], "60");
setUVsToFace(new Point(0.993964612483978, 0.30978786945343), new Point(0.993964612483978, 0.510504961013794), new Point(0.976011991500854, 0.506607949733734), "60");
addFace(["332", "893", "627", "333"], "61");
setUVsToFace(new Point(0.760709047317505, 0.800902903079987), new Point(0.760711848735809, 0.927430987358093), new Point(0.733586549758911, 0.921952247619629), "61");
addFace(["624", "536", "740", "755", "625"], "62");
setUVsToFace(new Point(0.329544067382813, 0.180349245667458), new Point(0.363881319761276, 0.00100000004749745), new Point(0.483389794826508, 0.120508335530758), "62");
addFace(["379", "603", "72", "383", "389", "403"], "63");
setUVsToFace(new Point(0.0411608477621878, 0.858516344014257), new Point(0.0905818343162537, 0.858813345432281), new Point(0.0887521132826805, 0.86330109834671), "63");
addFace(["657", "720", "721", "147", "829", "155"], "64");
setUVsToFace(new Point(0.519739112876335, 0.555643601924018), new Point(0.531277413022898, 0.54880449900284), new Point(0.628145277500153, 0.604773581027985), "64");
addFace(["446", "783", "781", "448"], "65");
setUVsToFace(new Point(0.769728302955627, 0.752887547016144), new Point(0.769728302955627, 0.651331841945648), new Point(0.817463874816895, 0.651331663131714), "65");
addFace(["452", "890", "446", "85"], "66");
setUVsToFace(new Point(0.228990126334935, 0.698087107813272), new Point(0.18101479113102, 0.698087573051453), new Point(0.18455958366394, 0.680134892463684), "66");
addFace(["155", "829", "404", "831", "738", "835"], "67");
setUVsToFace(new Point(0.554648697376251, 0.616109182277606), new Point(0.558325588703156, 0.618189573287964), new Point(0.558325588703156, 0.637231290340424), "67");
addFace(["367", "65", "369", "371"], "68");
setUVsToFace(new Point(0.815614700317383, 0.860342144966125), new Point(0.809267461299896, 0.860342144966125), new Point(0.809267461299896, 0.755801677703857), "68");
addFace(["541", "91", "515", "498"], "69");
setUVsToFace(new Point(0.243281111121178, 0.702942550182343), new Point(0.243281111121178, 0.548804581165314), new Point(0.344836801290512, 0.548804581165314), "69");
addFace(["8", "214", "210", "211"], "70");
setUVsToFace(new Point(0.901602029800415, 0.567846298217773), new Point(0.901602029800415, 0.548804581165314), new Point(0.920640766620636, 0.548804581165314), "70");
addFace(["10", "9", "13", "12"], "71");
setUVsToFace(new Point(0.476038187742233, 0.976564871885695), new Point(0.476038187742233, 0.995606601238251), new Point(0.45699942111969, 0.995606601238251), "71");
addFace(["162", "681", "354", "689"], "72");
setUVsToFace(new Point(0.131118357181549, 0.575389981269836), new Point(0.137465611100197, 0.571730554103851), new Point(0.137465611100197, 0.683690249919891), "72");
addFace(["774", "773", "767", "436", "430", "762"], "35");
setUVsToFace(new Point(0.243281111121178, 0.787811815738678), new Point(0.268670240950137, 0.704885225582147), new Point(0.319448086034805, 0.704885225582147), "35");
addFace(["640", "404", "636"], "74");
setUVsToFace(new Point(0.305777311325073, 0.981976449489594), new Point(0.305162698030472, 0.912165701389313), new Point(0.30959141254425, 0.915288507938385), "74");
addFace(["636", "55", "640"], "75");
setUVsToFace(new Point(0.30959141254425, 0.915288507938385), new Point(0.312790840864182, 0.978752851486206), new Point(0.305777311325073, 0.981976449489594), "75");
addFace(["383", "738", "336"], "76");
setUVsToFace(new Point(0.695902585983276, 0.993554592132568), new Point(0.695287942886353, 0.923743844032288), new Point(0.699716627597809, 0.92686665058136), "76");
addFace(["336", "57", "383"], "77");
setUVsToFace(new Point(0.699716627597809, 0.92686665058136), new Point(0.702916085720062, 0.990331053733826), new Point(0.695902585983276, 0.993554592132568), "77");
addFace(["448", "451", "452", "85"], "78");
setUVsToFace(new Point(0.0250248126685619, 0.613032102584839), new Point(0.0438435859978199, 0.610729992389679), new Point(0.0536290800759408, 0.631038710408825), "78");
addFace(["518", "536", "624", "630", "841"], "79");
setUVsToFace(new Point(0.191417048001959, 0.000999996408269643), new Point(0.363881291646696, 0.000999996472185238), new Point(0.329544067382813, 0.180349245667458), "79");
addFace(["831", "389", "60"], "80");
setUVsToFace(new Point(0.892031133174896, 0.618615388870239), new Point(0.89264577627182, 0.548804581165314), new Point(0.899659276008606, 0.552028238773346), "80");
addFace(["60", "339", "831"], "81");
setUVsToFace(new Point(0.899659276008606, 0.552028238773346), new Point(0.896459817886353, 0.615492582321167), new Point(0.892031133174896, 0.618615388870239), "81");
addFace(["106", "107", "109", "463"], "82");
setUVsToFace(new Point(0.243281111121178, 0.827743947505951), new Point(0.276848968563746, 0.809027109441413), new Point(0.2770736515522, 0.956983625888824), "82");
addFace(["682", "664", "662", "681"], "83");
setUVsToFace(new Point(0.762644648551941, 0.93120938539505), new Point(0.767132759094238, 0.929373860359192), new Point(0.767132759094238, 0.978794574737549), "83");
addFace(["378", "934", "946", "379"], "84");
setUVsToFace(new Point(0.346401430830413, 0.930395400254866), new Point(0.319281488656998, 0.935883224010468), new Point(0.319284319877625, 0.809355139732361), "84");
addFace(["12", "210", "214", "10"], "85");
setUVsToFace(new Point(0.157502775626039, 0.881451904773697), new Point(0.192726045846939, 0.984817624092102), new Point(0.174631610512733, 0.990739464759827), "85");
addFace(["517", "518", "841", "96"], "86");
setUVsToFace(new Point(0.437103986740112, 0.809355210510846), new Point(0.455056697130203, 0.809355139732361), new Point(0.455056697130203, 0.932754874229431), "86");
addFace(["106", "476", "111", "105"], "87");
setUVsToFace(new Point(0.882006049156189, 0.630205512046814), new Point(0.862967371940613, 0.630205512046814), new Point(0.862967371940613, 0.611163842298942), "87");
addFace(["463", "109", "591", "469"], "88");
setUVsToFace(new Point(0.129219397902489, 0.62777978181839), new Point(0.105279818177223, 0.658753156661987), new Point(0.105407297611237, 0.577385544776917), "88");
addFace(["167", "712", "615", "720", "657", "710"], "89");
setUVsToFace(new Point(0.181399045015035, 0.703217777954529), new Point(0.179569280109408, 0.698703577013693), new Point(0.228990212082863, 0.699058890342712), "89");
addFace(["256", "267", "5", "35"], "90");
setUVsToFace(new Point(0.0362927885726094, 0.729630410671234), new Point(0.0362927913665771, 0.83118611574173), new Point(0.0128364851698279, 0.83118611574173), "90");
addFace(["900", "625", "755", "849", "229"], "91");
setUVsToFace(new Point(0.381834149360657, 0.337248831987381), new Point(0.381834149360657, 0.21061300659564), new Point(0.48338970541954, 0.235847532749176), "91");
addFace(["662", "606", "354", "681"], "92");
setUVsToFace(new Point(0.767142713069916, 0.800902788392774), new Point(0.767142713069916, 0.916521906852722), new Point(0.762654602527618, 0.914692282676697), "92");
addFace(["662", "625", "900", "606"], "93");
setUVsToFace(new Point(0.10487274825573, 0.714067339897156), new Point(0.131988108158112, 0.708558976650238), new Point(0.131988108158112, 0.835194706916809), "93");
addFace(["281", "306", "308", "309"], "350");
setUVsToFace(new Point(0.102930001914501, 0.708558976650238), new Point(0.102930094306049, 0.88318746070885), new Point(0.092645101249218, 0.869685351848602), "350");
addFace(["281", "328", "783", "446"], "95");
setUVsToFace(new Point(0.948671460151672, 0.753268203449233), new Point(0.948671460151672, 0.651331663131714), new Point(0.969554841518402, 0.651712477207184), "95");
addFace(["96", "566", "586", "505"], "96");
setUVsToFace(new Point(0.969554693137352, 0.858103962047321), new Point(0.948671460151672, 0.85810399055481), new Point(0.948671460151672, 0.756182372570038), "96");
addFace(["636", "404", "829", "149"], "97");
setUVsToFace(new Point(0.502327680587769, 0.560611605644226), new Point(0.499154031276703, 0.556123435497284), new Point(0.518195688724518, 0.556123435497284), "97");
addFace(["13", "308", "313", "12"], "98");
setUVsToFace(new Point(0.302248597145081, 0.962547898292542), new Point(0.279243210275599, 0.993520820364064), new Point(0.279320657253265, 0.912165701389313), "98");
addFace(["436", "435", "849", "430"], "99");
setUVsToFace(new Point(0.49565252661705, 0.555152118206024), new Point(0.49565252661705, 0.548804819583893), new Point(0.518195688724518, 0.548804581165314), "99");
addFace(["378", "70", "640"], "100");
setUVsToFace(new Point(0.628145277500153, 0.627575576305389), new Point(0.62631368637085, 0.632063746452332), new Point(0.61289769411087, 0.632063806056976), "100");
addFace(["147", "721", "600"], "101");
setUVsToFace(new Point(0.593855977058411, 0.632063806056976), new Point(0.580440104007721, 0.632063746452332), new Point(0.578608512878418, 0.627575576305389), "101");
addFace(["930", "921", "586", "594"], "102");
setUVsToFace(new Point(0.820377945899963, 0.852048754692078), new Point(0.820383787155151, 0.651331663131714), new Point(0.838078916072845, 0.673528373241425), "102");
addFace(["370", "669", "682", "163"], "103");
setUVsToFace(new Point(0.0073472373187542, 0.608436822891235), new Point(0.00100000004749745, 0.604773581027985), new Point(0.0978681296110153, 0.548804581165314), "103");
addFace(["762", "430", "849", "755"], "104");
setUVsToFace(new Point(0.489736944437027, 0.235847532749176), new Point(0.489736944437027, 0.312014311552048), new Point(0.48338970541954, 0.312014311552048), "104");
addFace(["570", "177", "178"], "298");
setUVsToFace(new Point(0.71396541595459, 0.920829713344574), new Point(0.693546652793884, 0.920829772949219), new Point(0.696151852607727, 0.91700667142868), "298");
addFace(["336", "738", "831", "339"], "108");
setUVsToFace(new Point(0.502327680587769, 0.70351630449295), new Point(0.499154031276703, 0.699028074741364), new Point(0.518195661997285, 0.699028082273693), "108");
addFace(["570", "556", "812", "177"], "110");
setUVsToFace(new Point(0.0870370660716296, 0.839889268948274), new Point(0.0905818343162537, 0.857841968536377), new Point(0.0426064245402813, 0.857841670513153), "110");
addFace(["773", "774", "765", "171"], "111");
setUVsToFace(new Point(0.72322684526443, 0.819273763423676), new Point(0.72322690486908, 0.905999839305878), new Point(0.716879606246948, 0.905999839305878), "111");
addFace(["378", "379", "403", "70"], "112");
setUVsToFace(new Point(0.809267461299896, 0.977826833724976), new Point(0.809267415032257, 0.862285089090807), new Point(0.813755571842194, 0.864120543003082), "112");
addFace(["544", "915", "910", "911"], "113");
setUVsToFace(new Point(0.491679638624191, 0.120508335530758), new Point(0.611188556843431, 0.00100004753238073), new Point(0.645525395870209, 0.180349245667458), "113");
addFace(["294", "306", "22", "293"], "114");
setUVsToFace(new Point(0.993352055549622, 0.651331694126172), new Point(0.993352055549622, 0.75325334072113), new Point(0.972468912601471, 0.75325334072113), "114");
addFace(["309", "308", "13", "211"], "115");
setUVsToFace(new Point(0.436803847551346, 0.548804581165314), new Point(0.436579164563095, 0.696761178369778), new Point(0.403011322021484, 0.678044259548187), "115");
addFace(["682", "681", "162", "163"], "116");
setUVsToFace(new Point(0.0978681365882172, 0.548804610298734), new Point(0.137465611100197, 0.571730554103851), new Point(0.131118357181549, 0.575389981269836), "116");
addFace(["528", "917", "915", "98"], "117");
setUVsToFace(new Point(0.857974290847778, 0.952266697252151), new Point(0.840021669864655, 0.952266812324524), new Point(0.840021669864655, 0.779802620410919), "117");
addFace(["755", "740", "745", "743"], "118");
setUVsToFace(new Point(0.966624140739441, 0.861018121242523), new Point(0.966624319553375, 0.976357281208038), new Point(0.948671590210676, 0.968921063644705), "118");
addFace(["229", "265", "332", "900"], "119");
setUVsToFace(new Point(0.483389794826508, 0.427353471517563), new Point(0.363881319761276, 0.546861827373505), new Point(0.329544002009879, 0.367512595542639), "119");
addFace(["604", "946", "823"], "349");
setUVsToFace(new Point(0.593235313892365, 0.337248831987381), new Point(0.645525395870209, 0.367512583732605), new Point(0.491679638624191, 0.427353471517563), "349");
addFace(["556", "841", "630", "893", "890", "452", "812"], "58");
setUVsToFace(new Point(0.00100019684886718, 0.187872119392478), new Point(0.191417133420422, 0.124399779085879), new Point(0.219979703426361, 0.24363449358504), "58");
addFace(["910", "915", "917", "921", "929"], "105");
setUVsToFace(new Point(0.645525459991434, 0.180349243966242), new Point(0.611188173294067, 0.00100000004749745), new Point(0.783652365207672, 0.00100000004749745), "105");
addFace(["945", "823", "946", "235", "253"], "73");
setUVsToFace(new Point(0.611188173294067, 0.546861827373505), new Point(0.491679638624191, 0.427353471517563), new Point(0.645525395870209, 0.367512583732605), "73");
addFace(["411", "424", "77"], "124");
setUVsToFace(new Point(0.593235552310944, 0.875529646873474), new Point(0.593235552310944, 0.959420800209045), new Point(0.58941239118576, 0.956815600395203), "124");
addFace(["96", "505", "492", "517"], "125");
setUVsToFace(new Point(0.835142195224762, 0.548804581165314), new Point(0.835142195224762, 0.650360286235809), new Point(0.733586549758911, 0.650360286235809), "125");
addFace(["604", "823", "544", "911"], "126");
setUVsToFace(new Point(0.593235313892365, 0.337248831987381), new Point(0.491679638624191, 0.427353471517563), new Point(0.491679638624191, 0.120508335530758), "126");
addFace(["469", "480", "113", "463"], "127");
setUVsToFace(new Point(0.464165478944778, 0.704885303974152), new Point(0.483204215764999, 0.704885303974152), new Point(0.483204215764999, 0.723926961421967), "127");
addFace(["910", "929", "600", "615"], "128");
setUVsToFace(new Point(0.348346503197841, 0.935893172556439), new Point(0.348349571228027, 0.809355139732361), new Point(0.37547492980957, 0.814833879470825), "128");
addFace(["946", "604", "603", "379"], "129");
setUVsToFace(new Point(0.862968862056732, 0.609221041202545), new Point(0.862967371940613, 0.548804581165314), new Point(0.890088438987732, 0.554284870624542), "129");
addFace(["745", "822", "752", "174"], "131");
setUVsToFace(new Point(0.102555882763723, 0.996333486498748), new Point(0.00100018456578255, 0.996333539485931), new Point(0.00100000004749745, 0.885125637054443), "131");
addFace(["22", "896", "3", "260"], "132");
setUVsToFace(new Point(0.928776025772095, 0.673175811767578), new Point(0.946728646755219, 0.651331722736359), new Point(0.946728646755219, 0.774731516838074), "132");
addFace(["174", "752", "171", "765"], "133");
setUVsToFace(new Point(0.195640161633492, 0.98134833574295), new Point(0.217266649007797, 0.881451904773712), new Point(0.232826203107834, 0.894427418708801), "133");
addFace(["352", "333", "627", "673"], "134");
setUVsToFace(new Point(0.988462501167366, 0.862853792927443), new Point(0.992950677871704, 0.861018121242523), new Point(0.992950677871704, 0.976559996604919), "134");
addFace(["469", "105", "111", "480"], "135");
setUVsToFace(new Point(0.0372641645371914, 0.832996070384979), new Point(0.0724874287843704, 0.729630410671234), new Point(0.0905818343162537, 0.735552251338959), "135");
addFace(["720", "615", "600", "721"], "136");
setUVsToFace(new Point(0.833156108856201, 0.967697739601135), new Point(0.828667892441005, 0.969533133908151), new Point(0.828667938709259, 0.853991389274597), "136");
addFace(["448", "85", "446"], "137");
setUVsToFace(new Point(0.787541806697845, 0.749064385890961), new Point(0.790147125720978, 0.752887547016144), new Point(0.769728302955627, 0.752887547016144), "137");
addFace(["233", "260", "261", "262"], "138");
setUVsToFace(new Point(0.431785047054291, 0.704885303974152), new Point(0.431785047054291, 0.806440949440002), new Point(0.4138323366642, 0.806440949440002), "138");
addFace(["260", "233", "293", "22"], "139");
setUVsToFace(new Point(0.731643736362457, 0.81733101606369), new Point(0.630088031291962, 0.81733101606369), new Point(0.630088031291962, 0.715775310993195), "139");
addFace(["673", "627", "142", "669"], "140");
setUVsToFace(new Point(0.993335604667664, 0.758013844490051), new Point(0.997823894023895, 0.756182312965393), new Point(0.997823894023895, 0.805719144215575), "140");
addFace(["389", "383", "57", "60"], "141");
setUVsToFace(new Point(0.0169570166617632, 0.629771709442139), new Point(0.0169570166617632, 0.610729878766124), new Point(0.0240534413605928, 0.6139035820961), "141");
addFace(["801", "178", "179", "176"], "142");
setUVsToFace(new Point(0.454471051692963, 0.548804581165314), new Point(0.47609755396843, 0.648701071739197), new Point(0.457261847604539, 0.646542608007837), "142");
addFace(["435", "436", "767", "439"], "143");
setUVsToFace(new Point(0.485358953475952, 0.635530650615692), new Point(0.479011714458466, 0.635530710220337), new Point(0.479011803865439, 0.548804634338136), "143");
addFace(["67", "144", "162", "689"], "144");
setUVsToFace(new Point(0.82672518491745, 0.853991364674423), new Point(0.82672518491745, 0.958632290363312), new Point(0.820377945899963, 0.958632290363312), "144");
addFace(["812", "179", "178", "177"], "146");
setUVsToFace(new Point(0.0824908455685575, 0.6409221719659), new Point(0.0621822364628315, 0.63113659620285), new Point(0.0644843280315399, 0.612317800521851), "146");
addFace(["576", "594", "591", "109"], "147");
setUVsToFace(new Point(0.241335021632834, 0.723526000833059), new Point(0.139408364892006, 0.723428428173065), new Point(0.149694323539734, 0.709930956363678), "147");
addFace(["107", "566", "576", "109"], "148");
setUVsToFace(new Point(0.231053471565247, 0.562302052974701), new Point(0.241338467347366, 0.548799873605872), new Point(0.241338357329369, 0.723428428173065), "148");
addFace(["689", "354", "352", "65"], "149");
setUVsToFace(new Point(0.131118363040939, 0.68003085789273), new Point(0.137465611100197, 0.683690249919891), new Point(0.0978681296110153, 0.706616222858429), "149");
addFace(["67", "689", "65", "367"], "150");
setUVsToFace(new Point(0.137216314673424, 0.923550486564636), new Point(0.130869075655937, 0.923550486564636), new Point(0.130869075655937, 0.885125637054443), "150");
addFace(["101", "536", "518", "100"], "152");
setUVsToFace(new Point(0.869089782238007, 0.65876799408162), new Point(0.887042343616486, 0.651331663131714), new Point(0.887042343616486, 0.823795855045319), "152");
addFace(["915", "544", "91", "541"], "153");
setUVsToFace(new Point(0.397313147783279, 0.978365480899811), new Point(0.397313117980957, 0.809355139732361), new Point(0.415265828371048, 0.816791355609894), "153");
addFace(["290", "930", "801", "781"], "154");
setUVsToFace(new Point(0.888985157012939, 0.823449016381322), new Point(0.888985157012939, 0.651331663131714), new Point(0.906937658786774, 0.702611982822418), "154");
addFace(["463", "113", "476", "106"], "155");
setUVsToFace(new Point(0.17567253112793, 0.57579779624939), new Point(0.193766951560974, 0.56987601518631), new Point(0.228990212082863, 0.673241674900055), "155");
addFace(["591", "594", "586", "457"], "156");
setUVsToFace(new Point(0.149694323539734, 0.709930956363678), new Point(0.139408222459134, 0.723433258402496), new Point(0.139423131942749, 0.548804581165314), "156");
addFace(["155", "835", "153", "156"], "157");
setUVsToFace(new Point(0.0567226894199848, 0.63135951757431), new Point(0.0567226894199848, 0.612317800521851), new Point(0.0612108683137141, 0.615491332673549), "157");
addFace(["142", "664", "682", "669"], "158");
setUVsToFace(new Point(0.626036875628178, 0.875529739697383), new Point(0.626036882400513, 0.991071581840515), new Point(0.621548712253571, 0.989235937595367), "158");
addFace(["35", "5", "244", "243"], "159");
setUVsToFace(new Point(0.139408364892006, 0.725371241569519), new Point(0.24096405506134, 0.725371241569519), new Point(0.24096405506134, 0.879509150981903), "159");
addFace(["72", "603", "712", "167"], "160");
setUVsToFace(new Point(0.240228459239006, 0.995241231031255), new Point(0.235740318894386, 0.997070968151093), new Point(0.235740318894386, 0.881451904773712), "160");
addFace(["261", "3", "265", "267"], "161");
setUVsToFace(new Point(0.377417683601379, 0.809355139732361), new Point(0.395370364189148, 0.809355076393501), new Point(0.395370364189148, 0.981819450855255), "161");
addFace(["797", "594", "576", "570"], "162");
setUVsToFace(new Point(0.45699942111969, 0.809735953807831), new Point(0.477882713079453, 0.809355139732361), new Point(0.477882713079453, 0.911291739878043), "162");
addFace(["781", "801", "176", "84"], "163");
setUVsToFace(new Point(0.928776025772095, 0.97157377482754), new Point(0.928776025772095, 0.902016758918762), new Point(0.946728646755219, 0.911406278610229), "163");
addFace(["147", "600", "378", "640"], "164");
setUVsToFace(new Point(0.593855977058411, 0.632063806056976), new Point(0.578608512878418, 0.627575576305389), new Point(0.628145449532113, 0.627575576305389), "164");
addFace(["243", "244", "411", "241"], "165");
setUVsToFace(new Point(0.127954959869385, 0.885125517845154), new Point(0.127954959869385, 0.986681282520294), new Point(0.104498654603958, 0.986681282520294), "165");
addFace(["515", "745", "740"], "166");
setUVsToFace(new Point(0.769728302955627, 0.981917798519135), new Point(0.769728302955627, 0.958461463451385), new Point(0.785221755504608, 0.97018963098526), "166");
addFace(["566", "96", "841"], "167");
setUVsToFace(new Point(0.243281111121178, 0.958926379680634), new Point(0.264164328575134, 0.958926379680634), new Point(0.254093945026398, 0.985347092151642), "167");
addFace(["822", "91", "544"], "168");
setUVsToFace(new Point(0.129219397902489, 0.675217926502228), new Point(0.105763092637062, 0.675217926502228), new Point(0.117491245269775, 0.659724533557892), "168");
addFace(["505", "586", "921"], "169");
setUVsToFace(new Point(0.367651760578156, 0.687703013420105), new Point(0.346779525279999, 0.686933279037476), new Point(0.35833802819252, 0.661006212234497), "169");
addFace(["556", "570", "576"], "170");
setUVsToFace(new Point(0.729501008987427, 0.934248208999634), new Point(0.714429795742035, 0.944627106189728), new Point(0.714429795742035, 0.923743844032288), "170");
addFace(["797", "930", "594"], "171");
setUVsToFace(new Point(0.449836701154709, 0.797266781330109), new Point(0.43469911813736, 0.786984801292419), new Point(0.449382603168488, 0.776384949684143), "171");
addFace(["518", "517", "100"], "172");
setUVsToFace(new Point(0.412860602140427, 0.989284634590149), new Point(0.397313117980957, 0.998260915279388), new Point(0.397313117980957, 0.98030823469162), "172");
addFace(["492", "917", "528"], "173");
setUVsToFace(new Point(0.432756036520004, 0.998260915279388), new Point(0.417208552360535, 0.989284634590149), new Point(0.432756036520004, 0.98030823469162), "173");
addFace(["498", "536", "101"], "174");
setUVsToFace(new Point(0.976011991500854, 0.512447655200958), new Point(0.99150550365448, 0.524175763130188), new Point(0.976011991500854, 0.535903930664063), "174");
addFace(["915", "541", "98"], "175");
setUVsToFace(new Point(0.78962367773056, 0.97018963098526), new Point(0.805117189884186, 0.958461463451385), new Point(0.805117189884186, 0.981917798519135), "175");
addFace(["930", "797", "801"], "289");
setUVsToFace(new Point(0.888985157012939, 0.651331663131714), new Point(0.906937777996063, 0.654876470565796), new Point(0.906937658786774, 0.702611982822418), "289");
addFace(["655", "710", "657", "158"], "178");
setUVsToFace(new Point(0.975663423538208, 0.994168162345886), new Point(0.96856701374054, 0.997341835873006), new Point(0.96856701374054, 0.978300094604492), "178");
addFace(["890", "896", "306", "281"], "179");
setUVsToFace(new Point(0.787680983543396, 0.755801677703857), new Point(0.787680983543396, 0.956518709659576), new Point(0.769728300095234, 0.934322542725557), "179");
addFace(["929", "934", "378", "600"], "181");
setUVsToFace(new Point(0.733586549758911, 0.989966793478803), new Point(0.733586549758911, 0.929373860359192), new Point(0.760701894760132, 0.934901773929596), "181");
addFace(["606", "333", "352", "354"], "184");
setUVsToFace(new Point(0.864405274391174, 0.886285781860352), new Point(0.864405335038936, 0.935706477504397), new Point(0.859917104244232, 0.93387097120285), "184");
addFace(["308", "306", "294", "313"], "185");
setUVsToFace(new Point(0.092645101249218, 0.869685351848602), new Point(0.102929927408695, 0.883182883262634), new Point(0.00101807867662898, 0.883280588443235), "185");
addFace(["823", "241", "415"], "304");
setUVsToFace(new Point(0.976011991500854, 0.00100000004749745), new Point(0.993964612483978, 0.00843623746186495), new Point(0.993964493274689, 0.119644112884998), "304");
addFace(["515", "740", "536", "498"], "49");
setUVsToFace(new Point(0.908880461896962, 0.658767799481765), new Point(0.926833271980286, 0.651331663131714), new Point(0.926833271980286, 0.820342063903809), "49");
addFace(["352", "673", "369", "65"], "121");
setUVsToFace(new Point(0.0978681296110153, 0.706616222858429), new Point(0.00100000004749745, 0.650647222995758), new Point(0.0073472373187542, 0.646983981132507), "121");
addFace(["147", "643", "149"], "226");
setUVsToFace(new Point(0.481411457061768, 0.809355139732361), new Point(0.488424956798553, 0.812578678131104), new Point(0.4852254986763, 0.876043021678925), "226");
addFace(["149", "829", "147"], "227");
setUVsToFace(new Point(0.4852254986763, 0.876043021678925), new Point(0.480796843767166, 0.879165887832642), new Point(0.481411457061768, 0.809355139732361), "227");
addFace(["710", "655", "153"], "232");
setUVsToFace(new Point(0.455209195613861, 0.704885303974152), new Point(0.462222665548325, 0.708108901977539), new Point(0.459023237228394, 0.77157324552536), "232");
addFace(["153", "835", "710"], "233");
setUVsToFace(new Point(0.459023237228394, 0.77157324552536), new Point(0.454594552516937, 0.774696111679077), new Point(0.455209195613861, 0.704885303974152), "233");
addFace(["155", "156", "158"], "236");
setUVsToFace(new Point(0.704858839511871, 0.923743844032288), new Point(0.709287524223328, 0.92686665058136), new Point(0.712486982345581, 0.990331053733826), "236");
addFace(["158", "657", "155"], "237");
setUVsToFace(new Point(0.712486982345581, 0.990331053733826), new Point(0.705473482608795, 0.993554592132568), new Point(0.704858839511871, 0.923743844032288), "237");
addSurface(["3", "127", "71", "121", "87", "172", "174", "140", "58", "2", "27", "150", "233", "164", "73", "48", "185", "17", "67", "169", "82", "112", "23", "167", "144", "103", "37", "8", "100", "291", "141", "128", "91", "74", "95", "28", "63", "68", "165", "61", "9", "350", "49", "92", "160", "52", "173", "83", "104", "148", "98", "51", "142", "184", "175", "305", "143", "4", "124", "111", "96", "62", "34", "179", "12", "59", "226", "56", "117", "26", "36", "161", "32", "7", "110", "276", "5", "16", "289", "84", "134", "65", "13", "44", "85", "79", "88", "53", "45", "133", "66", "86", "31", "93", "40", "19", "113", "24", "77", "298", "35", "81", "232", "138", "181", "114", "153", "57", "171", "41", "154", "22", "75", "168", "30", "60", "15", "131", "126", "64", "72", "132", "129", "54", "99", "125", "155", "101", "156", "146", "80", "20", "38", "166", "55", "29", "137", "6", "304", "157", "11", "25", "118", "178", "162", "14", "116", "43", "159", "227", "158", "108", "50", "46", "69", "78", "10", "237", "70", "89", "170", "236", "21", "349", "102", "0", "42", "147", "39", "90", "1", "139", "149", "119", "76", "18", "97", "135", "115", "152", "163", "33", "136", "105", "47"], "Entrance");
setMaterialToSurface(material, "Entrance");
}
private function onLoadComplete(_arg1:Event):void{
material.texture = new Texture(Bitmap(loader.content).bitmapData);
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("entrance.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading entrance texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
}
}//package bunker
Section 67
//Entrance_Bmp (bunker.Entrance_Bmp)
package bunker {
import mx.core.*;
public class Entrance_Bmp extends BitmapAsset {
}
}//package bunker
Section 68
//EntranceWindows (bunker.EntranceWindows)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.engine3d.materials.*;
public class EntranceWindows extends Mesh {
public function EntranceWindows(){
super("EntranceWindows");
mobile = 1;
x = 539.3701171875;
y = -1921.25988769531;
addVertex(-3.00927734375, 272.643188476563, 90.5511932373047, "0");
addVertex(-3.00927734375, 272.643188476563, 66.9291381835938, "1");
addVertex(40.6867065429688, 144.41357421875, 66.9291152954102, "2");
addVertex(40.6867065429688, 144.41357421875, 90.5511932373047, "3");
addVertex(-351.321472167969, 272.643188476563, 90.5511932373047, "4");
addVertex(-395.017456054688, 144.41357421875, 90.5511932373047, "5");
addVertex(-395.017456054688, 144.41357421875, 66.9291152954102, "6");
addVertex(-351.321472167969, 272.643188476563, 66.9291381835938, "7");
addFace(["5", "6", "7", "4"], "0");
addFace(["1", "2", "3", "0"], "4");
addSurface(["4", "0"], "EntranceWindows");
setMaterialToSurface(new FillMaterial(0xFFFFFF), "EntranceWindows");
}
}
}//package bunker
Section 69
//Grid (bunker.Grid)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import alternativa.utils.*;
import flash.net.*;
import flash.system.*;
public class Grid extends Mesh {
private var alpha:BitmapData;
public var material:TextureMaterial;
private var onLoadMethod:Function;
private var loader:Loader;
private var counter:uint;// = 0
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = Grid_Bmp;
public function Grid(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Grid");
mobile = 2;
addVertex(39.370086120558, 314.960639404249, 1.52587890625E-5, "0");
addVertex(39.370086120558, 3.0517578125E-5, 6.866455078125E-5, "1");
addVertex(-39.3700872192858, 3.0517578125E-5, 6.866455078125E-5, "2");
addVertex(-39.3700872192858, 314.960639404249, 1.52587890625E-5, "3");
addVertex(-39.3700719604967, -157.480339599657, 0.0001068115234375, "4");
addVertex(39.3700708617689, -157.480339599657, 0.0001068115234375, "5");
addVertex(39.370086120558, -944.88198144536, 0.00022125244140625, "6");
addVertex(39.370086120558, -629.921288085985, 0.00017547607421875, "7");
addVertex(-39.3700872192858, -629.921288085985, 0.00017547607421875, "8");
addVertex(39.3700708617689, -472.440910888719, 0.000152587890625, "9");
addVertex(-39.3700872192858, -944.88198144536, 0.00022125244140625, "10");
addVertex(-39.3700719604967, -472.440910888719, 0.000152587890625, "11");
addFace(["7", "8", "10", "6"], "0");
setUVsToFace(new Point(0.252499997615814, 0.995000004768372), new Point(0.00499999988824129, 0.995000004768372), new Point(0.00499999988824129, 0.00499999988824129), "0");
addFace(["4", "11", "9", "5"], "1");
setUVsToFace(new Point(0.262261658906937, 0.994999706745148), new Point(0.262261658906937, 0.00499999988824129), new Point(0.509761571884155, 0.00499999988824129), "1");
addFace(["0", "3", "2", "1"], "6");
setUVsToFace(new Point(0.520228862762451, 0.00499999988824129), new Point(0.767728924751282, 0.00499999988824129), new Point(0.767728924751282, 0.994999825954437), "6");
addSurface(["0", "6", "1"], "Grid");
setMaterialToSurface(material, "Grid");
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("gridalpha.gif"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading grid texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadComplete(_arg1:Event):void{
counter++;
if (counter < 2){
switch (counter){
case 1:
alpha = Bitmap(loader.content).bitmapData;
loader.load(new URLRequest("grid.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
};
} else {
material.texture = new Texture(BitmapUtils.mergeBitmapAlpha(Bitmap(loader.content).bitmapData, alpha, true));
complete();
};
}
}
}//package bunker
Section 70
//Grid_Bmp (bunker.Grid_Bmp)
package bunker {
import mx.core.*;
public class Grid_Bmp extends BitmapAsset {
}
}//package bunker
Section 71
//MoveSound (bunker.MoveSound)
package bunker {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import alternativa.utils.*;
import flash.net.*;
public class MoveSound {
private var intervalId:int;
private var sequence:Array;
private var channel:SoundChannel;
private var sounds:Array;
private var loaded:Boolean;// = false
private var sound:Sound;
private var onLoadMethod:Function;
private var transform:SoundTransform;
private var current:int;// = -1
private var counter:int;// = -1
public static const FLY:uint = 3;
public static const NONE:uint = 0;
public static const WALK:uint = 1;
public static const RUN:uint = 2;
public function MoveSound(){
sequence = ["step1.mp3", "step2.mp3", "step3.mp3", "step4.mp3", "fly.mp3"];
sounds = new Array();
transform = new SoundTransform();
super();
}
private function loadNext():void{
counter++;
if (sound != null){
sound.removeEventListener(Event.COMPLETE, onLoadComplete);
sound.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
};
if (counter < sequence.length){
sound = new Sound();
sound.addEventListener(Event.COMPLETE, onLoadComplete);
sound.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
sound.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
sound.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
sound.load(new URLRequest(sequence[counter]), new SoundLoaderContext());
} else {
if (sounds.length == sequence.length){
loaded = true;
};
onLoadMethod.call();
onLoadMethod = null;
sound = null;
};
}
private function onLoadError(_arg1:IOErrorEvent):void{
loadNext();
}
public function setMode(_arg1:uint, _arg2:Number=1):void{
var _local3:Sound;
if (loaded){
if (current != _arg1){
if (channel != null){
channel.stop();
};
clearInterval(intervalId);
current = -1;
current = _arg1;
if ((((_arg1 == WALK)) || ((_arg1 == RUN)))){
nextSample();
intervalId = setInterval(nextSample, ((_arg1)==WALK) ? 500 : 300);
};
if (_arg1 == FLY){
_local3 = sounds[(sounds.length - 1)];
if (_local3 != null){
channel = _local3.play(0, 1000000, transform);
};
};
};
if (_arg1 == FLY){
transform.volume = (0.5 + (_arg2 / 3));
if (transform.volume > 2.5){
transform.volume = 2.5;
};
channel.soundTransform = transform;
};
};
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loadNext();
return ("Loading sound");
}
private function nextSample():void{
var _local1:Sound = sounds[Math.round(MathUtils.random(0, (sounds.length - 2)))];
if (_local1 != null){
_local1.play();
};
}
private function onLoadComplete(_arg1:Event):void{
sounds.push(sound);
loadNext();
}
}
}//package bunker
Section 72
//Passage (bunker.Passage)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Passage extends Mesh {
private var loader:Loader;
private var onLoadMethod:Function;
public var material:TextureMaterial;
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = Passage_Bmp;
public function Passage(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Passage");
mobile = 1;
y = -1023.6220703125;
addVertex(62.9925537109375, -362.204223632813, 23.1080436706543, "101");
addVertex(47.2440299987793, 0.0003662109375, -0.00194549560546875, "1");
addVertex(314.960571289063, -598.4248046875, -0.00255584716796875, "177");
addVertex(31.4959907531738, -236.22021484375, 125.982040405273, "4");
addVertex(47.2440223693848, -236.220092773438, -0.0022125244140625, "69");
addVertex(-31.496129989624, 0.000244140625, 125.982315063477, "6");
addVertex(-47.2441673278809, -236.220092773438, -0.0022125244140625, "7");
addVertex(299.213134765625, -267.7158203125, 125.982299804688, "136");
addVertex(-31.4961357116699, -236.22021484375, 125.982040405273, "75");
addVertex(51.8591575622559, -247.353271484375, -0.00223541259765625, "12");
addVertex(377.159545898438, -284.2578125, -0.00196075439453125, "133");
addVertex(310.346313476563, -351.071044921875, -0.00203704833984375, "142");
addVertex(-26.0896949768066, -325.302124023438, 23.1079368591309, "16");
addVertex(62.9930038452148, -236.219360351563, 23.1081619262695, "81");
addVertex(299.213134765625, -330.7080078125, 125.982238769531, "21");
addVertex(62.9925537109375, -330.708129882813, 125.982109069824, "22");
addVertex(299.213134765625, -251.967651367188, -0.00194549560546875, "24");
addVertex(62.9925537109375, -251.968017578125, -0.00208282470703125, "25");
addVertex(299.213134765625, -236.219848632813, 23.1083106994629, "26");
addVertex(366.024047851563, -295.393432617188, 125.982276916504, "155");
addVertex(321.481811523438, -339.935424804688, 125.982238769531, "29");
addVertex(388.295043945313, -273.122314453125, 23.1082878112793, "31");
addVertex(330.708984375, -362.204467773438, 125.98210144043, "33");
addVertex(393.701019287109, -362.204467773438, 125.98210144043, "34");
addVertex(62.9925537109375, -346.4560546875, -0.00217437744140625, "100");
addVertex(425.19775390625, -598.424072265625, 23.1078186035156, "37");
addVertex(40.7234153747559, -258.488891601563, 125.982025146484, "85");
addVertex(330.708618164063, -598.424926757813, 125.98169708252, "39");
addVertex(393.700744628906, -598.424926757813, 125.98169708252, "40");
addVertex(-3.81857681274414, -303.031127929688, 125.981979370117, "97");
addVertex(409.449035644531, -362.204345703125, -0.00215911865234375, "153");
addVertex(299.212219238281, -362.204956054688, 23.1080665588379, "43");
addVertex(31.4959964752197, 0.000244140625, 125.982315063477, "45");
addVertex(425.197082519531, -362.204467773438, 23.1080780029297, "166");
addVertex(62.9920616149902, 0.000244140625, 23.1082801818848, "47");
addVertex(314.9609375, -362.204345703125, -0.002166748046875, "149");
addVertex(409.448760986328, -598.4248046875, -0.00255584716796875, "169");
addVertex(299.212554931641, -598.424926757813, 23.1076812744141, "178");
addVertex(-14.9540748596191, -314.16650390625, -0.00229644775390625, "90");
addVertex(-47.2441596984863, 0.0003662109375, -0.00194549560546875, "54");
addVertex(62.9925537109375, -267.716186523438, 125.982162475586, "119");
addVertex(-62.9921913146973, 0.000244140625, 23.1082801818848, "57");
addVertex(299.213134765625, -346.455810546875, -0.00203704833984375, "123");
addVertex(-62.9921989440918, -236.22021484375, 23.1080207824707, "61");
addFace(["85", "97", "75", "4"], "0");
setUVsToFace(new Point(0.269689649343491, 0.564177930355072), new Point(0.268254697322845, 0.637364268302917), new Point(0.1912590432554, 0.603692690542139), "0");
addFace(["61", "7", "54", "57"], "1");
setUVsToFace(new Point(0.830142617225647, 0.96650230884552), new Point(0.830142438411713, 0.999000012874603), new Point(0.555640876293195, 0.998999644518249), "1");
addFace(["43", "123", "100", "101"], "2");
setUVsToFace(new Point(0.830141544342041, 0.931184649467468), new Point(0.830142608236583, 0.963682311776368), new Point(0.555640935897827, 0.963682889938354), "2");
addFace(["81", "25", "24", "26"], "3");
setUVsToFace(new Point(0.552821576595306, 0.931184530258179), new Point(0.552822053432465, 0.96368271112442), new Point(0.278320401906967, 0.963682174682617), "3");
addFace(["57", "6", "75", "61"], "4");
setUVsToFace(new Point(0.555640935897827, 0.893047947354113), new Point(0.555640935897827, 0.76802521944046), new Point(0.830142438411713, 0.768025577068329), "4");
addFace(["136", "119", "81", "26"], "5");
setUVsToFace(new Point(0.278320401906967, 0.76802521944046), new Point(0.552822053432465, 0.76802533864975), new Point(0.552821530351021, 0.893048061927499), "5");
addFace(["101", "16", "97", "22"], "6");
setUVsToFace(new Point(0.862769245721628, 0.113049494184218), new Point(0.862769246101379, 0.00100000004749745), new Point(0.987005054950714, 0.015005256049335), "6");
addFace(["22", "97", "85", "119"], "7");
setUVsToFace(new Point(0.346510990555384, 0.606736193436473), new Point(0.268254697322845, 0.637364268302917), new Point(0.269689649343491, 0.564177930355072), "7");
addFace(["61", "16", "90", "7"], "8");
setUVsToFace(new Point(0.0685883313417435, 0.00795052852481604), new Point(0.18063722550869, 0.0079504931345582), new Point(0.173634648323059, 0.0396849401295185), "8");
addFace(["7", "69", "1", "54"], "9");
setUVsToFace(new Point(0.183734504389577, 0.0436126515269279), new Point(0.265670269727707, 0.116706468164921), new Point(0.0829357653856277, 0.321545869112015), "9");
addFace(["133", "31", "26", "24"], "10");
setUVsToFace(new Point(0.75490391254425, 0.330265164375305), new Point(0.74790116730532, 0.298531241748188), new Point(0.859950304031372, 0.298530995845795), "10");
addFace(["153", "133", "142", "149"], "11");
setUVsToFace(new Point(0.677215993404388, 0.287651985883713), new Point(0.588918447494507, 0.330265164375305), new Point(0.582666277885437, 0.220642745494843), "11");
addFace(["69", "12", "81"], "12");
setUVsToFace(new Point(0.807421803474426, 0.637364268302917), new Point(0.807421803474426, 0.623359262943268), new Point(0.839155852794647, 0.630356669425964), "12");
addFace(["6", "45", "4", "75"], "13");
setUVsToFace(new Point(0.000999998301267624, 0.405822247266769), new Point(0.0537653677165508, 0.355086535215378), new Point(0.24402442574501, 0.552956700325012), "13");
addFace(["119", "136", "21", "22"], "14");
setUVsToFace(new Point(0.295775353908539, 0.55397093296051), new Point(0.493645191192627, 0.363711476325989), new Point(0.544380950870443, 0.416476871431691), "14");
addFace(["81", "85", "4"], "15");
setUVsToFace(new Point(0.84197473526001, 0.462892413139343), new Point(0.966210067272186, 0.448891550302505), new Point(0.966210126876831, 0.476902663707733), "15");
addFace(["1", "69", "81", "47"], "16");
setUVsToFace(new Point(0.552821934223175, 0.928364992141724), new Point(0.278320422218377, 0.928365141742568), new Point(0.278321176767349, 0.895867109298706), "16");
addFace(["136", "155", "29", "21"], "18");
setUVsToFace(new Point(0.493645191192627, 0.363711476325989), new Point(0.571901738643646, 0.33308407664299), new Point(0.570466420283868, 0.40627034843234), "18");
addFace(["142", "133", "24", "123"], "19");
setUVsToFace(new Point(0.582666277885437, 0.220642745494843), new Point(0.588918604256969, 0.330265136200692), new Point(0.496348112821579, 0.297968208789825), "19");
addFace(["22", "21", "43", "101"], "76");
setUVsToFace(new Point(0.278320381093992, 0.640183161366616), new Point(0.55282199382782, 0.64018315076828), new Point(0.552820980548859, 0.765206277370453), "76");
addFace(["25", "81", "12"], "22");
setUVsToFace(new Point(0.455002009868622, 0.339504837989807), new Point(0.486735761165619, 0.346511989831924), new Point(0.455001801252365, 0.353509813547134), "22");
addFace(["100", "123", "24", "25"], "23");
setUVsToFace(new Point(0.364602501137078, 0.0332977042156236), new Point(0.569441854953766, 0.2160325050354), new Point(0.496348112821579, 0.297968208789825), "23");
addFace(["81", "4", "45", "47"], "24");
setUVsToFace(new Point(0.555641809656766, 0.7652057892721), new Point(0.555640876293182, 0.64018326997757), new Point(0.830142378807068, 0.64018315076828), "24");
addFace(["81", "119", "85"], "25");
setUVsToFace(new Point(0.0604258812963963, 0.62336277961731), new Point(0.184661373496056, 0.609352648258209), new Point(0.184661209583282, 0.637364268302917), "25");
addFace(["100", "25", "12"], "26");
setUVsToFace(new Point(0.364602595567703, 0.033297672867775), new Point(0.291508853435516, 0.115233302116394), new Point(0.278284668922424, 0.110622465610504), "26");
addFace(["166", "31", "133", "153"], "27");
setUVsToFace(new Point(0.587426841259003, 0.503949880599976), new Point(0.587427258491516, 0.615998804569244), new Point(0.555692911148071, 0.608996212482452), "27");
addFace(["153", "169", "37", "166"], "28");
setUVsToFace(new Point(0.275501519441605, 0.928365290164948), new Point(0.00100000149920215, 0.928365542881906), new Point(0.00100081565324217, 0.895867526531219), "28");
addFace(["177", "169", "153", "149"], "29");
setUVsToFace(new Point(0.778014580491357, 0.00971857826632175), new Point(0.859950304031372, 0.0828123912215233), new Point(0.677215993404388, 0.287651985883713), "29");
addFace(["90", "16", "101", "100"], "30");
setUVsToFace(new Point(0.26200932264328, 0.446856290102005), new Point(0.29374372959137, 0.439853578805923), new Point(0.293743789196014, 0.551902651786804), "30");
addFace(["155", "31", "166", "34"], "31");
setUVsToFace(new Point(0.966210603713989, 0.431127786636353), new Point(0.841974854469299, 0.445133060216904), new Point(0.841974486280527, 0.333083663806535), "31");
addFace(["37", "40", "34", "166"], "32");
setUVsToFace(new Point(0.0010009752586484, 0.893048584461212), new Point(0.00100000004749745, 0.768025696277618), new Point(0.275501477593882, 0.768024983666583), "32");
addFace(["177", "149", "43", "178"], "33");
setUVsToFace(new Point(0.830142438411713, 0.928365767002106), new Point(0.555640904929208, 0.92836498677698), new Point(0.555641651153564, 0.895867168903351), "33");
addFace(["26", "31", "155", "136"], "34");
setUVsToFace(new Point(0.832961559295654, 0.880074083805084), new Point(0.832961320877075, 0.76802521944046), new Point(0.957196884398844, 0.782030460901457), "34");
addFace(["29", "155", "34", "33"], "35");
setUVsToFace(new Point(0.57046639919281, 0.406270384788513), new Point(0.571901738643646, 0.33308407664299), new Point(0.648897104383392, 0.366756489334293), "35");
addFace(["90", "100", "12", "69", "7"], "20");
setUVsToFace(new Point(0.272032521855467, 0.00100008299584045), new Point(0.364602649519175, 0.0332977885519475), new Point(0.278284668922424, 0.110622465610504), "20");
addFace(["43", "33", "39", "178"], "38");
setUVsToFace(new Point(0.00100054976064712, 0.765206098556519), new Point(0.00100000004749745, 0.64018315076828), new Point(0.275501507336504, 0.640183531575953), "38");
addFace(["97", "16", "61", "75"], "39");
setUVsToFace(new Point(0.957197189331055, 0.738227188587189), new Point(0.832961320877075, 0.752232015132904), new Point(0.83296124447405, 0.640182598928691), "39");
addFace(["123", "43", "142"], "44");
setUVsToFace(new Point(0.422328233718872, 0.33950486779213), new Point(0.454062163829803, 0.346512347459793), new Point(0.422328233718872, 0.353509813547134), "44");
addFace(["40", "39", "33", "34"], "37");
setUVsToFace(new Point(0.83915575066982, 0.564626739195502), new Point(0.786390423774719, 0.615362524986267), new Point(0.59613174200058, 0.417492210865021), "37");
addFace(["43", "21", "29"], "47");
setUVsToFace(new Point(0.862769186496735, 0.130817756056786), new Point(0.98700487613678, 0.116807609796524), new Point(0.98700487613678, 0.144818708300591), "47");
addFace(["149", "142", "43"], "54");
setUVsToFace(new Point(0.774748206138611, 0.637364268302917), new Point(0.7747483253479, 0.623359441757202), new Point(0.806482195854187, 0.630357563495636), "54");
addFace(["43", "29", "33"], "57");
setUVsToFace(new Point(0.714920163154602, 0.3517085313797), new Point(0.839155852794647, 0.337707251310349), new Point(0.839155614376068, 0.365718603134155), "57");
addSurface(["13", "76", "30", "15", "22", "27", "5", "12", "26", "57", "35", "2", "32", "47", "19", "37", "8", "10", "16", "23", "25", "3", "33", "29", "6", "28", "9", "11", "0", "24", "39", "38", "14", "34", "31", "7", "54", "1", "4", "20", "18", "44"], "Passage");
setMaterialToSurface(material, "Passage");
}
private function onLoadComplete(_arg1:Event):void{
material.texture = new Texture(Bitmap(loader.content).bitmapData);
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("passage.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading passage texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
}
}//package bunker
Section 73
//Passage_Bmp (bunker.Passage_Bmp)
package bunker {
import mx.core.*;
public class Passage_Bmp extends BitmapAsset {
}
}//package bunker
Section 74
//Reactor (bunker.Reactor)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Reactor extends Mesh {
public var material1:TextureMaterial;
public var material2:TextureMaterial;
public var material3:TextureMaterial;
public var material4:TextureMaterial;
private var loader:Loader;
private var onLoadMethod:Function;
private var counter:uint;// = 0
private static const Bmp1:Class = Reactor_Bmp1;
private static const Bmp2:Class = Reactor_Bmp2;
private static const Bmp3:Class = Reactor_Bmp3;
private static const Bmp4:Class = Reactor_Bmp4;
private static const texture1:Texture = new Texture(new Bmp1().bitmapData);
private static const texture2:Texture = new Texture(new Bmp2().bitmapData);
private static const texture4:Texture = new Texture(new Bmp4().bitmapData);
private static const texture3:Texture = new Texture(new Bmp3().bitmapData);
public function Reactor(){
material1 = new TextureMaterial(texture1, 1, false, true, BlendMode.NORMAL, 1);
material2 = new TextureMaterial(texture2, 1, false, true, BlendMode.NORMAL, 1);
material3 = new TextureMaterial(texture3, 1, false, true, BlendMode.NORMAL, 1);
material4 = new TextureMaterial(texture4, 1, false, true, BlendMode.NORMAL, 1);
super("Reactor");
coords = new Point3D(6.01790806856878E-13, 2322.83471679688, -629.921264648438);
addVertex(-236.220474243165, -551.18115234375, 141.732299804688, "0");
addVertex(55.1180648803705, -141.73193359375, 173.228332519531, "1");
addVertex(551.181091308593, -236.220458984375, 141.732299804688, "2");
addVertex(-118.110244750977, -551.18115234375, 141.732299804688, "4");
addVertex(62.9921913146967, -511.810913085938, 23.1101684570313, "5");
addVertex(-141.732254028321, -55.117919921875, 173.228363037109, "6");
addVertex(551.181091308593, -236.220458984375, 236.220581054688, "7");
addVertex(551.181030273437, -118.1103515625, 236.220581054688, "8");
addVertex(-551.181091308594, -236.220458984375, 236.220581054688, "9");
addVertex(-551.181091308594, -236.220458984375, 141.732299804688, "10");
addVertex(393.700866699218, -118.1103515625, 78.740234375, "11");
addVertex(-236.220489501954, -85.494873046875, 0, "12");
addVertex(-85.4949951171881, -236.220458984375, 0, "13");
addVertex(-118.110244750977, -551.18115234375, 236.220611572266, "14");
addVertex(118.110237121581, -551.18115234375, 141.732299804688, "16");
addVertex(62.9921874999994, -359.157958984375, 23.1101684570313, "17");
addVertex(-62.9920616149908, -511.810913085938, 23.1101684570313, "18");
addVertex(31.4961223602289, -511.81103515625, 125.984313964844, "19");
addVertex(62.073265075683, -393.700927734375, 78.740234375, "20");
addVertex(-118.110229492188, -393.700927734375, 78.7401733398438, "21");
addVertex(-62.073146820069, -393.700927734375, 78.740234375, "22");
addVertex(-118.110244750977, -314.960693359375, 0, "23");
addVertex(64.7250213623041, -314.960571289063, -6.103515625E-5, "24");
addVertex(-23.6220436096197, -520.247436523438, 149.6064453125, "25");
addVertex(-23.6220436096197, -525.871826171875, 165.3544921875, "26");
addVertex(-417.778442382813, 78.740234375, 102.826171875, "27");
addVertex(-529.133850097657, 78.740234375, 214.181671142578, "28");
addVertex(-529.133850097657, -78.739990234375, 214.181640625, "29");
addVertex(-417.778350830079, -78.739990234375, 102.826171875, "30");
addVertex(-31.4960041046149, -511.81103515625, 125.984313964844, "31");
addVertex(39.3700408935541, -102.362060546875, 196.850402832031, "32");
addVertex(102.362121582031, -39.369873046875, 196.850402832031, "33");
addVertex(-102.362335205079, 39.369873046875, 196.850341796875, "34");
addVertex(-102.36215209961, -39.369873046875, 196.850402832031, "35");
addVertex(47.2441596984857, -335.389892578125, -6.103515625E-5, "40");
addVertex(-64.7248916625983, -314.960571289063, -6.103515625E-5, "42");
addVertex(-79.5289916992193, -336.685546875, 21.7249755859375, "43");
addVertex(-55.1181259155279, -141.73193359375, 173.228393554688, "44");
addVertex(-41.5130691528326, -430.015380859375, 93.2660522460938, "46");
addVertex(41.5131874084467, -430.015380859375, 93.2660522460938, "47");
addVertex(-47.2440338134772, -335.389892578125, -6.103515625E-5, "48");
addVertex(236.220474243163, -551.18115234375, 141.732299804688, "49");
addVertex(-551.181030273438, 118.1103515625, 236.220581054688, "50");
addVertex(118.110244750976, -314.960693359375, 0, "51");
addVertex(-23.6220436096197, -513.0888671875, 164.718994140625, "52");
addVertex(118.110260009765, -393.700927734375, 78.7401733398438, "53");
addVertex(-62.9920654296881, -359.157958984375, 23.1101684570313, "54");
addVertex(23.6220474243158, -513.0888671875, 164.718994140625, "55");
addVertex(-393.700866699219, -118.110107421875, 78.740234375, "56");
addVertex(23.6220474243158, -525.871826171875, 165.3544921875, "57");
addVertex(23.6220474243158, -520.247436523438, 149.6064453125, "58");
addVertex(79.5291213989252, -336.685546875, 21.7249755859375, "59");
addVertex(-314.960601806641, -118.110107421875, 0, "60");
addVertex(-47.2440299987799, -511.810913085938, -6.103515625E-5, "62");
addVertex(85.4949951171869, -236.220458984375, 0, "63");
addVertex(-141.732360839844, 55.1181640625, 173.228302001953, "64");
addVertex(47.2441596984857, -511.810913085938, -6.103515625E-5, "67");
addVertex(551.181091308593, 236.220458984375, 141.732299804688, "68");
addVertex(-551.181091308594, 236.220458984375, 141.732299804688, "69");
addVertex(-236.220474243165, 551.180908203125, 141.732299804688, "70");
addVertex(236.220474243163, 551.180908203125, 141.732299804688, "71");
addVertex(551.181091308593, 118.110107421875, 236.220581054688, "72");
addVertex(-39.3700866699225, -102.362060546875, 196.850402832031, "74");
addVertex(102.362274169921, 39.369873046875, 196.850341796875, "76");
addVertex(39.3700485229486, 102.36181640625, 196.850402832031, "77");
addVertex(55.1180877685541, 141.732177734375, 173.228332519531, "80");
addVertex(-55.1181030273444, 141.732177734375, 173.228393554688, "81");
addVertex(141.732208251953, -55.117919921875, 173.228363037109, "83");
addVertex(-314.960601806641, 118.110107421875, 0, "84");
addVertex(118.110229492187, 314.96044921875, 0, "85");
addVertex(314.960632324218, -118.1103515625, 0, "86");
addVertex(314.960632324218, 118.109619140625, 0, "87");
addVertex(-118.109985351563, 314.96044921875, 0, "88");
addVertex(-118.110137939454, 393.70068359375, 78.740234375, "89");
addVertex(-236.220474243165, 85.49462890625, 0, "90");
addVertex(236.220489501953, -85.4951171875, 0, "91");
addVertex(236.220474243163, 85.49462890625, 0, "92");
addVertex(-118.110168457032, 551.180908203125, 236.220520019531, "95");
addVertex(-85.49496459961, 236.22021484375, 0, "96");
addVertex(529.133911132812, 78.739990234375, 214.181640625, "97");
addVertex(529.133911132812, -78.740234375, 214.181671142578, "98");
addVertex(141.732299804687, 55.1181640625, 173.228302001953, "99");
addVertex(417.778503417968, -78.740234375, 102.826171875, "100");
addVertex(78.7402877807611, 417.7783203125, 102.826171875, "101");
addVertex(85.4949645996088, 236.22021484375, 0, "102");
addVertex(-78.7399978637701, 529.1337890625, 214.181640625, "103");
addVertex(-78.7399368286139, 417.7783203125, 102.826171875, "104");
addVertex(-39.3700790405279, 102.36181640625, 196.850402832031, "105");
addVertex(393.700866699218, 118.110107421875, 78.740234375, "106");
addVertex(-236.220474243165, 551.180908203125, 236.220489501953, "108");
addVertex(78.740257263183, 529.1337890625, 214.181671142578, "109");
addVertex(118.110260009765, 393.70068359375, 78.740234375, "111");
addVertex(417.77847290039, 78.739990234375, 102.826171875, "113");
addVertex(-393.700805664063, 118.110107421875, 78.740234375, "116");
addVertex(228.346389770507, 86.6142578125, 984.252014160156, "117");
addVertex(228.346450805663, -86.6142578125, 984.252075195313, "118");
addVertex(102.362274169921, -39.369873046875, 606.299255371094, "119");
addVertex(39.3700408935541, -102.36181640625, 606.299194335938, "120");
addVertex(-55.1181106567389, 141.73193359375, 629.921203613281, "121");
addVertex(-39.3700790405279, 102.362060546875, 606.299194335938, "123");
addVertex(314.960754394531, -118.1103515625, 984.251342773438, "125");
addVertex(-86.6141738891608, 228.34619140625, 984.252014160156, "126");
addVertex(141.732208251953, 55.117919921875, 629.921203613281, "127");
addVertex(-114.531021118165, 95.4423828125, 669.291442871094, "130");
addVertex(55.1180801391596, 141.73193359375, 629.921203613281, "131");
addVertex(-102.36215209961, 39.369873046875, 606.299194335938, "132");
addVertex(118.110290527343, 551.180908203125, 236.220520019531, "134");
addVertex(-228.346450805665, 86.6142578125, 984.252014160156, "137");
addVertex(101.407653808593, 121.689208984375, 708.661499023438, "138");
addVertex(102.362121582031, 39.369873046875, 606.299194335938, "139");
addVertex(39.3700485229486, 102.362060546875, 606.299194335938, "140");
addVertex(121.689208984374, 101.40771484375, 708.661499023438, "141");
addVertex(348.114288330078, 290.09521484375, 551.181213378906, "142");
addVertex(114.531005859374, 95.4423828125, 669.291442871094, "144");
addVertex(141.732299804687, -55.1181640625, 629.921264648438, "146");
addVertex(290.095245361328, 348.1142578125, 551.181213378906, "147");
addVertex(86.6141433715814, 228.34619140625, 984.252014160156, "148");
addVertex(95.4424819946283, 114.531005859375, 669.291442871094, "149");
addVertex(-101.407714843751, 121.689208984375, 708.661499023438, "150");
addVertex(-290.095275878907, 348.1142578125, 551.181213378906, "152");
addVertex(-324.002502441407, 388.802978515625, 393.700897216797, "153");
addVertex(236.220474243163, 551.180908203125, 236.220489501953, "154");
addVertex(-118.110229492188, 314.96044921875, 984.251953125, "155");
addVertex(118.110198974609, 314.96044921875, 984.251953125, "156");
addVertex(-95.4425430297858, 114.531005859375, 669.291442871094, "157");
addVertex(-348.114349365235, 290.09521484375, 551.181213378906, "158");
addVertex(551.181091308593, 236.220458984375, 236.220581054688, "159");
addVertex(314.960571289062, 118.110107421875, 984.251953125, "160");
addVertex(324.002471923828, 388.802978515625, 393.700897216797, "161");
addVertex(-121.689224243165, 101.40771484375, 708.661499023438, "162");
addVertex(388.802978515624, 324.00244140625, 393.700897216797, "163");
addVertex(-388.80307006836, 324.00244140625, 393.700927734375, "164");
addVertex(-118.110229492188, -314.96044921875, 984.251953125, "166");
addVertex(55.118072509765, -141.732177734375, 629.921203613281, "167");
addVertex(118.110237121581, -551.18115234375, 236.220611572266, "168");
addVertex(-101.407768249512, -121.689453125, 708.661499023438, "170");
addVertex(-551.181030273438, -118.110107421875, 236.220581054688, "171");
addVertex(-324.002532958985, -388.802978515625, 393.700927734375, "173");
addVertex(-86.6141738891608, -228.34619140625, 984.252014160156, "174");
addVertex(-141.732254028321, 55.117919921875, 629.921203613281, "175");
addVertex(-141.732360839844, -55.1181640625, 629.921264648438, "176");
addVertex(-114.531127929688, -95.442626953125, 669.291442871094, "177");
addVertex(-121.689315795899, -101.407958984375, 708.661499023438, "178");
addVertex(-388.803009033204, -324.002685546875, 393.700866699219, "179");
addVertex(-348.114288330079, -290.095336914063, 551.181213378906, "181");
addVertex(-55.1181182861334, -141.732177734375, 629.921203613281, "183");
addVertex(290.095245361328, -348.1142578125, 551.181274414063, "184");
addVertex(-228.346511840821, -86.6142578125, 984.252075195313, "185");
addVertex(-95.4426193237311, -114.53125, 669.291442871094, "186");
addVertex(-290.095245361329, -348.114379882813, 551.181213378906, "188");
addVertex(-39.3700866699225, -102.36181640625, 606.299194335938, "189");
addVertex(-102.362335205079, -39.369873046875, 606.299255371094, "190");
addVertex(388.803039550781, -324.002563476563, 393.700927734375, "193");
addVertex(-551.181091308594, 236.220458984375, 236.220581054688, "194");
addVertex(95.4425888061517, -114.531005859375, 669.291442871094, "195");
addVertex(101.407730102538, -121.689208984375, 708.661437988281, "196");
addVertex(118.110198974609, -314.96044921875, 984.251953125, "197");
addVertex(348.114318847656, -290.095336914063, 551.181213378906, "198");
addVertex(114.531097412109, -95.442626953125, 669.291442871094, "199");
addVertex(86.6141433715814, -228.34619140625, 984.252014160156, "200");
addVertex(236.220474243163, -551.18115234375, 236.220611572266, "201");
addVertex(324.002532958984, -388.802978515625, 393.700866699219, "203");
addVertex(-314.960632324219, 118.110107421875, 984.251953125, "204");
addVertex(-236.220474243165, -551.18115234375, 236.220611572266, "205");
addVertex(121.689270019531, -101.40771484375, 708.661437988281, "207");
addVertex(-314.960815429688, -118.1103515625, 984.251342773438, "208");
addFace(["21", "0", "4", "31", "46", "22"], "0");
setUVsToFace(new Point(0.105798617005348, 0.999000012874603), new Point(0.00100000004749745, 0.848505079746246), new Point(0.10579838603735, 0.848504960536957), "0");
addFace(["58", "19", "31", "25"], "1");
setUVsToFace(new Point(0.801227271556854, 0.848293662071228), new Point(0.808213889598846, 0.870550036430359), new Point(0.752321422100067, 0.870550036430359), "1");
addFace(["57", "168", "19", "58"], "2");
setUVsToFace(new Point(0.801227267910419, 0.833456118386742), new Point(0.885065972805023, 0.766687273979187), new Point(0.808213889598846, 0.870550036430359), "2");
addFace(["20", "53", "51", "59"], "3");
setUVsToFace(new Point(0.338947981595993, 0.310168236494064), new Point(0.338947921991348, 0.359889447689056), new Point(0.240142986178398, 0.359889328479767), "3");
addFace(["49", "201", "7", "2"], "4");
setUVsToFace(new Point(0.6017906665802, 0.269489807146431), new Point(0.6017906665802, 0.185650989413261), new Point(0.997010231018066, 0.185651034116745), "4");
addFace(["16", "49", "53", "20", "47", "19"], "5");
setUVsToFace(new Point(0.645109236240387, 0.676238119602203), new Point(0.70537070305827, 0.761977609976006), new Point(0.521983623504639, 0.762776136398315), "5");
addFace(["22", "46", "54", "43"], "6");
setUVsToFace(new Point(0.829220414161682, 0.446416020393372), new Point(0.793857634067535, 0.429486811161041), new Point(0.884349942207336, 0.42805203795433), "6");
addFace(["31", "14", "26", "25"], "7");
setUVsToFace(new Point(0.752321422100067, 0.870550036430359), new Point(0.675469219684601, 0.766687273979187), new Point(0.759307915990031, 0.833456118386732), "7");
addFace(["1", "83", "33", "32"], "8");
setUVsToFace(new Point(0.29395005106926, 0.00599717069417238), new Point(0.402635335922241, 0.00599713018164039), new Point(0.387814611196518, 0.0464348047971725), "8");
addFace(["14", "168", "57", "26"], "9");
setUVsToFace(new Point(0.675469195991322, 0.766687273979187), new Point(0.885065972805023, 0.766687273979187), new Point(0.801227271556854, 0.833456099033356), "9");
addFace(["50", "171", "29", "28"], "10");
setUVsToFace(new Point(0.297414660453796, 0.634997069835663), new Point(0.297414571046783, 0.844593841861258), new Point(0.269754528999329, 0.809660911560059), "10");
addFace(["53", "49", "2", "11"], "11");
setUVsToFace(new Point(0.626491904258728, 0.182717680931091), new Point(0.6017906665802, 0.00100002030376345), new Point(0.99701010285341, 0.00100002548775535), "11");
addFace(["67", "40", "48", "62"], "12");
setUVsToFace(new Point(0.106187373399734, 0.418039113283157), new Point(0.159205824136734, 0.270753979682922), new Point(0.238089326228525, 0.299149812414255), "12");
addFace(["51", "86", "91", "63", "24"], "13");
setUVsToFace(new Point(0.106182686984539, 0.23240177333355), new Point(0.000999944165384029, 0.0089033797552396), new Point(0.0765377796040592, 0.00533773164598639), "13");
addFace(["14", "4", "0", "205"], "14");
setUVsToFace(new Point(0.902103960514069, 0.45034596323967), new Point(0.902103960514069, 0.534184813499451), new Point(0.797305524349213, 0.534184813499451), "14");
addFace(["63", "91", "83", "1"], "15");
setUVsToFace(new Point(0.790924370288849, 0.444941192865372), new Point(0.6017906665802, 0.444941192865372), new Point(0.642014741897583, 0.272423148155212), "15");
addFace(["90", "84", "60", "12"], "16");
setUVsToFace(new Point(0.522341668605804, 0.00456583919003606), new Point(0.597879528999329, 0.00100000004749745), new Point(0.526889960348693, 0.198208606340448), "16");
addFace(["60", "56", "21", "23"], "17");
setUVsToFace(new Point(0.536557691758511, 0.360867337976672), new Point(0.585960149765015, 0.446434944868088), new Point(0.240142926573753, 0.446434855461121), "17");
addFace(["44", "13", "63", "1"], "18");
setUVsToFace(new Point(0.476408571004868, 0.935213506221771), new Point(0.301325708627701, 0.962166726589203), new Point(0.301325711860109, 0.810448477755634), "18");
addFace(["56", "10", "0", "21"], "19");
setUVsToFace(new Point(0.0257010335994761, 0.632063659256689), new Point(0.00100000004749745, 0.450345933437347), new Point(0.396219491958618, 0.450346052646637), "19");
addFace(["64", "6", "35", "34"], "20");
setUVsToFace(new Point(0.00100000004749745, 0.340658754110336), new Point(0.0010000541806221, 0.242847040295601), new Point(0.0417383760213852, 0.256820172071457), "20");
addFace(["56", "60", "84", "116", "27", "30"], "21");
setUVsToFace(new Point(0.0998009186323617, 0.844593632224415), new Point(0.00100000004749745, 0.844593584537506), new Point(0.00100000004749745, 0.634997248649597), "21");
addFace(["12", "13", "44", "6"], "22");
setUVsToFace(new Point(0.490459442138672, 0.807515144348145), new Point(0.301325905323858, 0.807515197236946), new Point(0.341550141572952, 0.634997069835663), "22");
addFace(["17", "5", "19", "47"], "23");
setUVsToFace(new Point(0.29395005106926, 0.0474125668406487), new Point(0.429397970438004, 0.0474125780165195), new Point(0.429398082568736, 0.142874286744658), "23");
addFace(["90", "12", "6", "64"], "24");
setUVsToFace(new Point(0.793857634067535, 0.424140930175781), new Point(0.793857723289236, 0.272423152494233), new Point(0.968940377235413, 0.299376487731934), "24");
addFace(["23", "21", "22", "43"], "25");
setUVsToFace(new Point(0.131852716207504, 0.756969153881073), new Point(0.230657321195273, 0.756969033391498), new Point(0.230657666921616, 0.806690454483032), "25");
addFace(["40", "17", "59", "24"], "26");
setUVsToFace(new Point(0.16440449655056, 0.75102287530899), new Point(0.131852656602859, 0.751941025257111), new Point(0.138764457430778, 0.728119896991639), "26");
addFace(["43", "54", "48", "42"], "27");
setUVsToFace(new Point(0.20076759159565, 0.728052020072937), new Point(0.208374589681625, 0.751642525196075), new Point(0.175811186432838, 0.751941025257111), "27");
addFace(["171", "56", "30", "29"], "28");
setUVsToFace(new Point(0.297414630651474, 0.844593822956085), new Point(0.0998051167207016, 0.844593738662545), new Point(0.130023241043091, 0.809660851955414), "28");
addFace(["168", "201", "49", "16"], "29");
setUVsToFace(new Point(0.084838829934597, 0.341636538505554), new Point(0.084838829934597, 0.446434944868088), new Point(0.00100000004749745, 0.446434944868088), "29");
addFace(["40", "67", "5", "17"], "30");
setUVsToFace(new Point(0.258860975503922, 0.174123212695122), new Point(0.258860975503922, 0.0175860822200775), new Point(0.283674776554108, 0.0175861390435364), "30");
addFace(["17", "47", "20", "59"], "31");
setUVsToFace(new Point(0.529289311827507, 0.357653237397781), new Point(0.438715308904648, 0.359889447689056), new Point(0.473420947790146, 0.341651052236557), "31");
addFace(["31", "18", "54", "46"], "32");
setUVsToFace(new Point(0.257883220911026, 0.174123212695122), new Point(0.162421479821205, 0.174123167991638), new Point(0.16242140660073, 0.0386752788196659), "32");
addFace(["24", "63", "42", "48", "40"], "33");
setUVsToFace(new Point(0.150751397013664, 0.248445123434067), new Point(0.157074773082977, 0.176466924030841), new Point(0.258822698761325, 0.28734773964795), "33");
addFace(["116", "50", "28", "27"], "34");
setUVsToFace(new Point(0.0998049527406693, 0.634997069835663), new Point(0.297414660453796, 0.634997069835663), new Point(0.269754588603973, 0.669929802417755), "34");
addFace(["44", "1", "32", "74"], "35");
setUVsToFace(new Point(0.339925736188889, 0.319151341915131), new Point(0.437737565142969, 0.319151341915131), new Point(0.423764437437057, 0.359889447689056), "35");
addFace(["63", "13", "23", "42"], "36");
setUVsToFace(new Point(0.157074719667435, 0.17646712064743), new Point(0.299825757741928, 0.227853462100029), new Point(0.303391418825114, 0.303391336317833), "36");
addFace(["60", "23", "13", "12"], "37");
setUVsToFace(new Point(0.526890099048615, 0.19820836186409), new Point(0.303391463576031, 0.303391195453539), new Point(0.299825757741928, 0.227853462100029), "37");
addFace(["8", "11", "2"], "38");
setUVsToFace(new Point(0.499177843332291, 0.766687273979187), new Point(0.67253589630127, 0.861537635326385), new Point(0.493392735719681, 0.900769889354706), "38");
addFace(["2", "7", "8"], "39");
setUVsToFace(new Point(0.185583978891373, 0.932343721389771), new Point(0.185583978891373, 0.848504960536957), new Point(0.290382236242294, 0.848504960536957), "39");
addFace(["171", "9", "10"], "40");
setUVsToFace(new Point(0.747903168201447, 0.537118136882782), new Point(0.852701604366302, 0.537118136882782), new Point(0.852701604366302, 0.620956897735596), "40");
addFace(["10", "56", "171"], "41");
setUVsToFace(new Point(0.768329381942749, 0.634997069835663), new Point(0.906891047954559, 0.755130887031555), new Point(0.70928168296814, 0.755516827106476), "41");
addFace(["35", "6", "44", "74"], "42");
setUVsToFace(new Point(0.146673383514029, 0.724566388112603), new Point(0.131852656602859, 0.684128642082214), new Point(0.240537941455841, 0.684128701686859), "42");
addFace(["26", "57", "55", "52"], "43");
setUVsToFace(new Point(0.242991641163826, 0.764771103858948), new Point(0.242991641163826, 0.806690454483032), new Point(0.231635466217995, 0.806690454483032), "43");
addFace(["23", "43", "42"], "44");
setUVsToFace(new Point(0.131852716207504, 0.756969153881073), new Point(0.159113675355911, 0.791202068328857), new Point(0.131852656602859, 0.804337680339813), "44");
addFace(["51", "24", "59"], "45");
setUVsToFace(new Point(0.240142986178398, 0.359889328479767), new Point(0.240142926573753, 0.312521010637283), new Point(0.267403930425644, 0.325656592845917), "45");
addFace(["31", "4", "14"], "46");
setUVsToFace(new Point(0.804656088352203, 0.875600874423981), new Point(0.738031685352325, 0.929294526576996), new Point(0.675469219684601, 0.87348335981369), "46");
addFace(["19", "168", "16"], "47");
setUVsToFace(new Point(0.493392735719681, 0.903703212738037), new Point(0.622563302516937, 0.906651854515076), new Point(0.557860910892487, 0.959967434406281), "47");
addFace(["205", "0", "10", "9"], "48");
setUVsToFace(new Point(0.794372320175171, 0.450345965963949), new Point(0.794372320175171, 0.534184813499451), new Point(0.399152755737305, 0.534184813499451), "48");
addFace(["53", "11", "86", "51"], "49");
setUVsToFace(new Point(0.399152755737305, 0.537118196487427), new Point(0.744969976099908, 0.537118232967456), new Point(0.695567488670349, 0.622685730457306), "49");
addFace(["25", "26", "52"], "50");
setUVsToFace(new Point(0.798730373382568, 0.846436679363251), new Point(0.783892869949341, 0.846399545669556), new Point(0.788264989852905, 0.835918664932251), "50");
addFace(["57", "58", "55"], "51");
setUVsToFace(new Point(0.223119094967842, 0.751941025257111), new Point(0.209352359175682, 0.746406674385071), new Point(0.223000302910805, 0.740585446357727), "51");
addFace(["62", "48", "54", "18"], "52");
setUVsToFace(new Point(0.457862824201584, 0.990891695022583), new Point(0.301325628055668, 0.990891695022583), new Point(0.322414875030518, 0.966077744960785), "52");
addFace(["87", "106", "111", "85"], "53");
setUVsToFace(new Point(0.444884884665736, 0.475552234099992), new Point(0.395873367786407, 0.39066070318222), new Point(0.738955914974213, 0.390660792589188), "53");
addFace(["106", "68", "71", "111"], "54");
setUVsToFace(new Point(0.0255057606846094, 0.484986513853073), new Point(0.00100000004749745, 0.304705679416656), new Point(0.393094151301948, 0.304705732340424), "54");
addFace(["88", "89", "116", "84"], "55");
setUVsToFace(new Point(0.538205504417419, 0.753381550312042), new Point(0.489193856716156, 0.668490529060364), new Point(0.83227649808956, 0.668490844913437), "55");
addFace(["70", "69", "116", "89"], "56");
setUVsToFace(new Point(0.596865355968475, 0.0010000403271988), new Point(0.988959610462189, 0.00100000004749745), new Point(0.964453637599945, 0.181280761957169), "56");
addFace(["88", "85", "111", "101", "104", "89"], "57");
setUVsToFace(new Point(0.000999937532515843, 0.907350015472932), new Point(0.00100002693943679, 0.699410796165466), new Point(0.0990197810934124, 0.69941073233682), "57");
addFace(["72", "106", "113", "97"], "58");
setUVsToFace(new Point(0.295070767402649, 0.695705056190491), new Point(0.0990236897306937, 0.69570497189683), new Point(0.129003077745438, 0.661048412322998), "58");
addFace(["105", "81", "64", "34"], "59");
setUVsToFace(new Point(0.145502462983131, 0.869754254817963), new Point(0.130798757076263, 0.829636216163635), new Point(0.238624490879358, 0.829636105650566), "59");
addFace(["11", "8", "98", "100", "86"], "60");
setUVsToFace(new Point(0.0990236923098564, 0.48776575922966), new Point(0.295070767402649, 0.48776575922966), new Point(0.267629444599152, 0.522422254085541), "60");
addFace(["102", "96", "81", "80"], "61");
setUVsToFace(new Point(0.298776388168335, 0.986150145530701), new Point(0.298776388168335, 0.835631668567657), new Point(0.472474604845047, 0.862371742725372), "61");
addFace(["86", "87", "92", "91"], "62");
setUVsToFace(new Point(0.00100000004749745, 0.30100005865097), new Point(0.0714280530810356, 0.1053511723876), new Point(0.126920402050018, 0.155840754508972), "62");
addFace(["8", "72", "97", "98"], "63");
setUVsToFace(new Point(0.295070767402649, 0.48776575922966), new Point(0.295070709260515, 0.695705193448814), new Point(0.267629355192184, 0.661048471927643), "63");
addFace(["134", "95", "103", "109"], "64");
setUVsToFace(new Point(0.295070737600327, 0.699410736560822), new Point(0.295070737600327, 0.907350122928619), new Point(0.267629384994507, 0.872693479061127), "64");
addFace(["99", "80", "77", "76"], "65");
setUVsToFace(new Point(0.130798757076263, 0.748178541660309), new Point(0.238624572753906, 0.748178601264954), new Point(0.223920866847038, 0.788296580314636), "65");
addFace(["83", "91", "92", "99"], "66");
setUVsToFace(new Point(0.843616865997506, 0.611543454109101), new Point(0.669918656349182, 0.638283848762512), new Point(0.669918715953827, 0.48776575922966), "66");
addFace(["68", "159", "154", "71"], "67");
setUVsToFace(new Point(0.395873367786407, 0.387881508595047), new Point(0.395873367786407, 0.304705679416656), new Point(0.787967503070831, 0.304705768823624), "67");
addFace(["87", "85", "102", "92"], "68");
setUVsToFace(new Point(0.0714280530810356, 0.1053511723876), new Point(0.293159510974458, 0.000999819372836781), new Point(0.296696901321411, 0.0759406387805939), "68");
addFace(["102", "85", "88", "96"], "69");
setUVsToFace(new Point(0.296696847944008, 0.0759406605226564), new Point(0.293159395456314, 0.00100000004749745), new Point(0.488808512687683, 0.0714281350374222), "69");
addFace(["81", "96", "90", "64"], "70");
setUVsToFace(new Point(0.446508533856029, 0.487765886288376), new Point(0.486414611339569, 0.658919513225555), new Point(0.298776388168335, 0.658919394016266), "70");
addFace(["111", "134", "109", "101"], "71");
setUVsToFace(new Point(0.0990236401557922, 0.699410736560822), new Point(0.295070737600327, 0.699410736560822), new Point(0.267629444599152, 0.734067261219025), "71");
addFace(["33", "83", "99", "76"], "72");
setUVsToFace(new Point(0.144661411643028, 0.576651632785797), new Point(0.130798757076263, 0.536235451698303), new Point(0.227836974865353, 0.536235326672503), "72");
addFace(["35", "74", "32", "33", "76", "77", "105", "34"], "73");
setUVsToFace(new Point(0.489193856716156, 0.614210963249206), new Point(0.490731238007376, 0.535807186800025), new Point(0.540694478843457, 0.48776574926742), "73");
addFace(["87", "86", "100", "113", "106"], "74");
setUVsToFace(new Point(0.000999973272077376, 0.695704674218923), new Point(0.0010000403271988, 0.48776575922966), new Point(0.129003122448921, 0.522422254085541), "74");
addFace(["88", "84", "90", "96"], "75");
setUVsToFace(new Point(0.488808512687683, 0.0714281350374222), new Point(0.5931596159935, 0.293159514665604), new Point(0.518218994140625, 0.296697169542313), "75");
addFace(["95", "89", "104", "103"], "76");
setUVsToFace(new Point(0.295070737600327, 0.907350122928619), new Point(0.0990236774086952, 0.907350122928619), new Point(0.129003077745438, 0.872693419456482), "76");
addFace(["194", "69", "70", "108"], "77");
setUVsToFace(new Point(0.988959491252899, 0.184060001247811), new Point(0.988959491252899, 0.267235845327377), new Point(0.596865355968475, 0.267235845327377), "77");
addFace(["77", "80", "81", "105"], "78");
setUVsToFace(new Point(0.144661381840706, 0.658109247684479), new Point(0.130798757076263, 0.617692828178406), new Point(0.227837120311301, 0.617692828178406), "78");
addFace(["72", "159", "68"], "79");
setUVsToFace(new Point(0.414101779460907, 0.30100005865097), new Point(0.310131967067719, 0.30100005865097), new Point(0.310131967067719, 0.21782423555851), "79");
addFace(["68", "106", "72"], "80");
setUVsToFace(new Point(0.728280365467072, 0.756160795688629), new Point(0.865746378898621, 0.875344693660736), new Point(0.669699609279633, 0.875727653503418), "80");
addFace(["95", "108", "70"], "81");
setUVsToFace(new Point(0.00100000004749745, 0.911055743694305), new Point(0.104969754815102, 0.911055743694305), new Point(0.104969754815102, 0.994231522083282), "81");
addFace(["95", "70", "89"], "82");
setUVsToFace(new Point(0.669699609279633, 0.999000012874603), new Point(0.728280365467072, 0.879433274269104), new Point(0.865746319293976, 0.998617172241211), "82");
addFace(["134", "111", "71"], "83");
setUVsToFace(new Point(0.494933217763901, 0.756160795688629), new Point(0.66692042350769, 0.850261092185974), new Point(0.489193797111511, 0.889183104038239), "83");
addFace(["71", "154", "134"], "84");
setUVsToFace(new Point(0.790746748447418, 0.387881487607956), new Point(0.790746748447418, 0.304705739021301), new Point(0.894716441631317, 0.304705679416656), "84");
addFace(["50", "116", "69"], "85");
setUVsToFace(new Point(0.303466111421585, 0.30100005865097), new Point(0.131478935480118, 0.206899777054787), new Point(0.309205561876297, 0.16797761619091), "85");
addFace(["69", "194", "50"], "86");
setUVsToFace(new Point(0.7417351603508, 0.473836570978165), new Point(0.7417351603508, 0.390660732984543), new Point(0.845704853534698, 0.39066070318222), "86");
addFace(["92", "102", "80", "99"], "87");
setUVsToFace(new Point(0.486414611339569, 0.832852363586426), new Point(0.298776388168335, 0.832852363586426), new Point(0.338682383298874, 0.661698639392853), "87");
addFace(["125", "160", "159", "72", "8"], "88");
setUVsToFace(new Point(0.0745811089873314, 0.492548495531082), new Point(0.221743315458298, 0.492548137903214), new Point(0.295324435137294, 0.981245836314945), "88");
addFace(["160", "125", "118", "117"], "89");
setUVsToFace(new Point(0.64645391702652, 0.0559810921549797), new Point(0.782959640026093, 0.00100000004749745), new Point(0.784918606281281, 0.0583829395473003), "89");
addFace(["138", "148", "117", "141"], "90");
setUVsToFace(new Point(0.63201779127121, 0.599240601062775), new Point(0.578516662120819, 0.422846645116806), new Point(0.703388129375455, 0.422846645116806), "90");
addFace(["204", "194", "164", "158"], "91");
setUVsToFace(new Point(0.523636688571103, 0.495309825074398), new Point(0.575666427612305, 0.986769497394562), new Point(0.465466350317001, 0.883304357528687), "91");
addFace(["131", "148", "138", "149"], "92");
setUVsToFace(new Point(0.602797210216522, 0.649639010429382), new Point(0.578516157484884, 0.422846817406122), new Point(0.63201779127121, 0.599240601062775), "92");
addFace(["153", "108", "155", "152"], "93");
setUVsToFace(new Point(0.408374708579453, 0.883304346867599), new Point(0.29817470908165, 0.986769556999207), new Point(0.350204408168793, 0.495309948921204), "93");
addFace(["160", "156", "154", "147"], "94");
setUVsToFace(new Point(0.350204508316621, 0.00100001079714551), new Point(0.523636758327484, 0.00100000004749745), new Point(0.575666427612305, 0.492459684610367), "94");
addFace(["132", "123", "140", "139", "119", "120", "189", "190"], "95");
setUVsToFace(new Point(0.885407567024231, 0.356577754020691), new Point(0.829919815063477, 0.355489730834961), new Point(0.795920133590698, 0.320129930973053), "95");
addFace(["7", "125", "8"], "96");
setUVsToFace(new Point(0.00100000004749745, 0.981245815753937), new Point(0.0745811089873314, 0.492548495531082), new Point(0.0745810568332672, 0.981245815753937), "96");
addFace(["127", "117", "118", "146"], "97");
setUVsToFace(new Point(0.598138451576233, 0.879732131958008), new Point(0.578516662120819, 0.652489364147186), new Point(0.686435759657604, 0.652489292850468), "97");
addFace(["147", "161", "149", "138"], "98");
setUVsToFace(new Point(0.706238090991974, 0.736349761486053), new Point(0.767530262470245, 0.652939677238464), new Point(0.754961729049683, 0.933635115623474), "98");
addFace(["156", "95", "134"], "99");
setUVsToFace(new Point(0.0745811462402344, 0.00100000004749745), new Point(0.221743300557137, 0.48969778418541), new Point(0.0745810866355896, 0.48969778418541), "99");
addFace(["154", "156", "134"], "100");
setUVsToFace(new Point(0.00100000004749745, 0.48969778418541), new Point(0.0745811462402344, 0.00100000004749745), new Point(0.0745810866355896, 0.48969778418541), "100");
addFace(["139", "127", "146", "119"], "101");
setUVsToFace(new Point(0.728659272193909, 0.174685209989548), new Point(0.757262587547302, 0.164874389767647), new Point(0.757262749200128, 0.233550029585223), "101");
addFace(["161", "154", "159", "163"], "102");
setUVsToFace(new Point(0.465466460548394, 0.388994419291314), new Point(0.575666427612305, 0.492459684610367), new Point(0.298174738883972, 0.492459654808044), "102");
addFace(["123", "121", "131", "140"], "103");
setUVsToFace(new Point(0.699317336082458, 0.251945328609762), new Point(0.727920413017273, 0.242134556174278), new Point(0.727920413017273, 0.310810267925262), "103");
addFace(["141", "117", "127", "144"], "104");
setUVsToFace(new Point(0.649886608123779, 0.599240601062775), new Point(0.703388197737921, 0.422846817405433), new Point(0.679107367992401, 0.649639010429382), "104");
addFace(["127", "131", "149", "144"], "105");
setUVsToFace(new Point(0.679107367992401, 0.649639010429382), new Point(0.602797915300431, 0.649639010429382), new Point(0.632543385028839, 0.624439716339111), "105");
addFace(["155", "204", "158", "152"], "106");
setUVsToFace(new Point(0.350204408168793, 0.495309948921204), new Point(0.523636670250811, 0.495309948921204), new Point(0.462478965520859, 0.779839158058167), "106");
addFace(["132", "175", "121", "123"], "107");
setUVsToFace(new Point(0.758212578045419, 0.244905997961492), new Point(0.786604762077332, 0.234500095248222), new Point(0.786604762077332, 0.310810267925262), "107");
addFace(["150", "126", "121", "157"], "108");
setUVsToFace(new Point(0.867290019989014, 0.177393943071365), new Point(0.920791208744049, 0.00100000004749745), new Point(0.896510720252991, 0.227792292833328), "108");
addFace(["162", "137", "126", "150"], "109");
setUVsToFace(new Point(0.849421322345734, 0.177393943071365), new Point(0.795920265825579, 0.00100000004749745), new Point(0.920791208744049, 0.00100000004749745), "109");
addFace(["157", "153", "152", "150"], "110");
setUVsToFace(new Point(0.936620116233826, 0.433111369609833), new Point(0.938174724578857, 0.714083731174469), new Point(0.880199731314302, 0.628334876037669), "110");
addFace(["126", "155", "156", "148"], "111");
setUVsToFace(new Point(0.67621905874711, 0.313698487257192), new Point(0.633497714996338, 0.352058976888657), new Point(0.578516721725464, 0.215553313493729), "111");
addFace(["131", "127", "139", "140"], "112");
setUVsToFace(new Point(0.757262587547302, 0.234500095248222), new Point(0.757262647151947, 0.310810267925262), new Point(0.728870451450348, 0.30040431022644), "112");
addFace(["144", "163", "142", "141"], "113");
setUVsToFace(new Point(0.997445450423537, 0.433111376524192), new Point(0.999000012874603, 0.714083731174469), new Point(0.941024899482727, 0.628334879875183), "113");
addFace(["164", "194", "108", "153"], "114");
setUVsToFace(new Point(0.465466350317001, 0.883304357528687), new Point(0.575666427612305, 0.986769497394562), new Point(0.29817484271285, 0.986769460092051), "114");
addFace(["150", "152", "158", "162"], "115");
setUVsToFace(new Point(0.958134412765503, 0.00100000004749745), new Point(0.974758446216583, 0.208520352840424), new Point(0.923641839440307, 0.208520346275029), "115");
addFace(["163", "159", "160", "142"], "116");
setUVsToFace(new Point(0.40837487578392, 0.388994425535202), new Point(0.298174738883972, 0.492459654808044), new Point(0.350204537202103, 0.00100003201781892), "116");
addFace(["156", "155", "108", "95"], "117");
setUVsToFace(new Point(0.0745811113009314, 0.00100003992245612), new Point(0.22174334526062, 0.00100000004749745), new Point(0.295324474573135, 0.48969778418541), "117");
addFace(["142", "147", "138", "141"], "118");
setUVsToFace(new Point(0.992141842842102, 0.924454391002655), new Point(0.941024625155217, 0.924454478288719), new Point(0.957648873329163, 0.716934025287628), "118");
addFace(["147", "142", "160"], "119");
setUVsToFace(new Point(0.462479084730148, 0.285529226064682), new Point(0.41136223077774, 0.285529226064682), new Point(0.350204527378082, 0.00100000004749745), "119");
addFace(["130", "164", "153", "157"], "120");
setUVsToFace(new Point(0.853961765766144, 0.714796662330627), new Point(0.87409895658493, 0.99505090713501), new Point(0.817007375475159, 0.995050615855888), "120");
addFace(["175", "137", "162", "130"], "121");
setUVsToFace(new Point(0.820200502872467, 0.227792307734489), new Point(0.79592025198465, 0.000999779124182504), new Point(0.849421322345734, 0.177393943071365), "121");
addFace(["204", "155", "126", "137"], "122");
setUVsToFace(new Point(0.793069899082184, 0.419996351003647), new Point(0.633497714996338, 0.352058976888657), new Point(0.676219046115875, 0.313698500394821), "122");
addFace(["154", "161", "147"], "123");
setUVsToFace(new Point(0.575666427612305, 0.492459684610367), new Point(0.465466439723969, 0.388994425535202), new Point(0.462479084730148, 0.285529226064682), "123");
addFace(["148", "156", "160", "117"], "124");
setUVsToFace(new Point(0.635899662971497, 0.213594332337379), new Point(0.578516721725464, 0.215553313493729), new Point(0.646454091296906, 0.0559810888133918), "124");
addFace(["158", "164", "130", "162"], "125");
setUVsToFace(new Point(0.817007303237915, 0.506256759166718), new Point(0.878299474716187, 0.422846704721451), new Point(0.865730941295624, 0.703542113304138), "125");
addFace(["157", "121", "175", "130"], "126");
setUVsToFace(new Point(0.86676450146622, 0.202593084866029), new Point(0.896510720252991, 0.227792292833328), new Point(0.820200502872467, 0.227792307734489), "126");
addFace(["126", "148", "131", "121"], "127");
setUVsToFace(new Point(0.7062381397326, 0.422846645116806), new Point(0.814157009124756, 0.422846645116806), new Point(0.794535338878632, 0.65008944272995), "127");
addFace(["161", "163", "144", "149"], "128");
setUVsToFace(new Point(0.937291204929352, 0.997188210487366), new Point(0.880199611186981, 0.997188210487366), new Point(0.900336623191833, 0.716934025287628), "128");
addFace(["188", "173", "186", "170"], "129");
setUVsToFace(new Point(0.706263303756714, 0.736404299736023), new Point(0.767564237117767, 0.652982413768768), new Point(0.754993915557861, 0.933717727661133), "129");
addFace(["181", "179", "9"], "130");
setUVsToFace(new Point(0.411395609378815, 0.285569846630096), new Point(0.408407807350159, 0.389049857854843), new Point(0.29819193482399, 0.4925297498703), "130");
addFace(["166", "188", "181"], "131");
setUVsToFace(new Point(0.523686110973358, 0.00100000004749745), new Point(0.462519735097885, 0.285569846630096), new Point(0.411395609378815, 0.285569846630096), "131");
addFace(["173", "205", "9", "179"], "132");
setUVsToFace(new Point(0.465507507324219, 0.389049828052521), new Point(0.575723350048065, 0.4925297498703), new Point(0.29819193482399, 0.4925297498703), "132");
addFace(["208", "9", "171"], "133");
setUVsToFace(new Point(0.221774831414223, 0.492593377828598), new Point(0.295366436243057, 0.98136043548584), new Point(0.221774816513062, 0.98136043548584), "133");
addFace(["176", "183", "186", "177"], "134");
setUVsToFace(new Point(0.679153740406036, 0.649706304073334), new Point(0.602832919675809, 0.649706343144975), new Point(0.632583141326904, 0.624503493309021), "134");
addFace(["194", "204", "50"], "135");
setUVsToFace(new Point(0.00100000004749745, 0.98136043548584), new Point(0.0745916292071342, 0.492592990398407), new Point(0.0745916068553925, 0.98136043548584), "135");
addFace(["184", "203", "201"], "136");
setUVsToFace(new Point(0.411395579576492, 0.779925107955933), new Point(0.408407777547836, 0.883405089378357), new Point(0.298191964626312, 0.986885011196136), "136");
addFace(["193", "7", "201", "203"], "137");
setUVsToFace(new Point(0.465507507324219, 0.883405029773712), new Point(0.575723154518062, 0.986884936476937), new Point(0.298191964626312, 0.986885011196136), "137");
addFace(["167", "200", "174", "183"], "138");
setUVsToFace(new Point(0.725887793172806, 0.650156855583191), new Point(0.706263303756714, 0.422881633043289), new Point(0.814197599887848, 0.422881633043289), "138");
addFace(["125", "198", "184"], "139");
setUVsToFace(new Point(0.523686289787292, 0.495355695486069), new Point(0.462519705295563, 0.779925167560577), new Point(0.411395579576492, 0.779925107955933), "139");
addFace(["197", "166", "174", "200"], "140");
setUVsToFace(new Point(0.738143883936945, 0.0689471476125212), new Point(0.793132662773132, 0.205472305417061), new Point(0.735741496086121, 0.20743153989315), "140");
addFace(["125", "7", "193", "198"], "141");
setUVsToFace(new Point(0.523686190304088, 0.495356028798832), new Point(0.575723350048065, 0.986885011196136), new Point(0.465507507324219, 0.883405029773712), "141");
addFace(["189", "183", "176", "190"], "142");
setUVsToFace(new Point(0.656973540782928, 0.25334307551384), new Point(0.685369849205017, 0.242935553193092), new Point(0.685369832897251, 0.319256533301168), "142");
addFace(["196", "200", "167", "195"], "143");
setUVsToFace(new Point(0.867338418960571, 0.177419170737267), new Point(0.920847117900848, 0.00100003811530769), new Point(0.896563291549683, 0.227824673056602), "143");
addFace(["146", "167", "120", "119"], "144");
setUVsToFace(new Point(0.683214604854584, 0.133736088871956), new Point(0.683214545249939, 0.210057139396667), new Point(0.654818296432495, 0.199649602174759), "144");
addFace(["184", "198", "207", "196"], "145");
setUVsToFace(new Point(0.974796772003174, 0.208549872040749), new Point(0.923672616481781, 0.208549916744232), new Point(0.940299093723297, 0.00100003811530769), "145");
addFace(["183", "174", "170", "186"], "146");
setUVsToFace(new Point(0.602832734584808, 0.649706363677979), new Point(0.578548848628998, 0.422881722450256), new Point(0.632057547569275, 0.599300742149353), "146");
addFace(["174", "185", "176", "178"], "147");
setUVsToFace(new Point(0.578549147051602, 0.422881510716609), new Point(0.703437805175781, 0.422881633043289), new Point(0.679153740406036, 0.649706304073334), "147");
addFace(["176", "177", "178"], "148");
setUVsToFace(new Point(0.679153740406036, 0.649706304073334), new Point(0.649403274059296, 0.624503493309021), new Point(0.64992880821228, 0.599300742149353), "148");
addFace(["9", "208", "166", "181"], "149");
setUVsToFace(new Point(0.29819193482399, 0.4925297498703), new Point(0.350228995084763, 0.00100041832774878), new Point(0.523686219834279, 0.00100005537355929), "149");
addFace(["50", "204", "208", "171"], "150");
setUVsToFace(new Point(0.0745916068553925, 0.98136043548584), new Point(0.0745916217564417, 0.492592979021821), new Point(0.221774831414223, 0.492593377828598), "150");
addFace(["146", "118", "207", "199"], "151");
setUVsToFace(new Point(0.82024222612381, 0.22782464325428), new Point(0.795958013508352, 0.000999854296839658), new Point(0.849467039108276, 0.177419170737267), "151");
addFace(["176", "175", "132", "190"], "152");
setUVsToFace(new Point(0.653876423835754, 0.141371726989746), new Point(0.653876304626465, 0.210057139396667), new Point(0.625269114971161, 0.200244918465614), "152");
addFace(["173", "179", "177", "186"], "153");
setUVsToFace(new Point(0.937307417392731, 0.997279822826385), new Point(0.880207777023315, 0.99727988243103), new Point(0.900347590446472, 0.716985821723938), "153");
addFace(["205", "166", "197", "201", "168", "14"], "154");
setUVsToFace(new Point(0.0010000039468282, 0.489767491817474), new Point(0.0745916217565536, 0.00100000004749745), new Point(0.221774831414223, 0.00100000004749745), "154");
addFace(["201", "197", "125", "184"], "155");
setUVsToFace(new Point(0.298191964626312, 0.986885011196136), new Point(0.350229203701019, 0.495355278253555), new Point(0.523686059845832, 0.495355771835301), "155");
addFace(["198", "193", "199", "207"], "156");
setUVsToFace(new Point(0.817023158073425, 0.506303608417511), new Point(0.878324190414077, 0.422881483193878), new Point(0.865753710269928, 0.703617036342621), "156");
addFace(["207", "118", "200", "196"], "157");
setUVsToFace(new Point(0.849467039108276, 0.177419170737267), new Point(0.795958161354065, 0.00100000004749745), new Point(0.9208476782283, 0.00100003911911381), "157");
addFace(["120", "167", "183", "189"], "158");
setUVsToFace(new Point(0.627424240112305, 0.260383307933807), new Point(0.656031727790833, 0.250571101903915), new Point(0.656031727790833, 0.319256593442315), "158");
addFace(["195", "203", "184", "196"], "159");
setUVsToFace(new Point(0.936636388301849, 0.433147847652435), new Point(0.938191115856171, 0.714160323143005), new Point(0.880207621074313, 0.628399148820583), "159");
addFace(["167", "146", "199", "195"], "160");
setUVsToFace(new Point(0.896563291549683, 0.227824673056602), new Point(0.82024222612381, 0.22782464325428), new Point(0.849992692470551, 0.20262186229229), "160");
addFace(["181", "188", "170", "178"], "161");
setUVsToFace(new Point(0.992140829563141, 0.924535632133484), new Point(0.941016614437103, 0.924535691738129), new Point(0.957642912864685, 0.716985762119293), "161");
addFace(["185", "208", "204", "137"], "162");
setUVsToFace(new Point(0.686819910008572, 0.322339887852222), new Point(0.725185811519623, 0.365067392587662), new Point(0.588660597801208, 0.420056104660034), "162");
addFace(["185", "137", "175", "176"], "163");
setUVsToFace(new Point(0.578548848628998, 0.652531802654266), new Point(0.686483307168256, 0.652531780283143), new Point(0.666858732700348, 0.879806995391846), "163");
addFace(["125", "197", "200", "118"], "164");
setUVsToFace(new Point(0.578548848628998, 0.00100000004749745), new Point(0.738143736027032, 0.0689471830723982), new Point(0.695416390895844, 0.107313089072704), "164");
addFace(["177", "179", "181", "178"], "165");
setUVsToFace(new Point(0.997445220336577, 0.433147868782876), new Point(0.999000012874603, 0.714160323143005), new Point(0.941016614437103, 0.628399193286896), "165");
addFace(["174", "166", "208", "185"], "166");
setUVsToFace(new Point(0.735741496086121, 0.20743153989315), new Point(0.793132662773132, 0.205472305417061), new Point(0.725186016995834, 0.365067351006646), "166");
addFace(["166", "205", "173", "188"], "167");
setUVsToFace(new Point(0.523685698443519, 0.000999876255177168), new Point(0.575723350048065, 0.4925297498703), new Point(0.465507507324219, 0.389049828052521), "167");
addFace(["193", "203", "195", "199"], "168");
setUVsToFace(new Point(0.87412291765213, 0.995150506496429), new Point(0.817023158073425, 0.995150625705719), new Point(0.837162673473358, 0.714856445789337), "168");
addFace(["178", "170", "174"], "169");
setUVsToFace(new Point(0.64992880821228, 0.599300742149353), new Point(0.632057547569275, 0.599300742149353), new Point(0.578548848628998, 0.422881722450256), "169");
addSurface(["43", "15", "11", "27", "26", "44", "19", "29", "3", "21", "24", "20", "36", "52", "48", "37", "10", "4", "47", "34", "42", "12", "30", "46", "6", "13", "5", "31", "22", "45", "7", "23", "39", "32", "16", "28", "2", "14", "35", "8", "38", "50", "33", "40", "9", "41", "0", "18", "1", "17", "51", "49", "25"], "ReactorBottom1");
setMaterialToSurface(material1, "ReactorBottom1");
addSurface(["54", "68", "59", "63", "85", "81", "56", "69", "64", "65", "72", "78", "61", "74", "57", "84", "53", "66", "73", "62", "86", "75", "58", "77", "82", "60", "71", "67", "80", "70", "87", "76", "79", "83", "55"], "ReactorBottom2");
setMaterialToSurface(material2, "ReactorBottom2");
addSurface(["134", "166", "147", "137", "143", "159", "142", "130", "151", "135", "164", "167", "148", "131", "160", "140", "156", "169", "168", "144", "165", "132", "145", "161", "162", "158", "149", "155", "153", "136", "152", "154", "133", "146", "129", "139", "150", "141", "157", "138", "163"], "ReactorTop1");
setMaterialToSurface(material3, "ReactorTop1");
addSurface(["101", "125", "97", "117", "126", "122", "99", "89", "95", "110", "118", "106", "115", "98", "111", "88", "90", "103", "119", "102", "116", "123", "112", "91", "127", "108", "124", "104", "120", "114", "100", "94", "113", "96", "107", "128", "109", "92", "121", "105", "93"], "ReactorTop2");
setMaterialToSurface(material4, "ReactorTop2");
}
private function onLoadError(_arg1:IOErrorEvent):void{
counter++;
if (counter < 4){
switch (counter){
case 1:
loader.load(new URLRequest("material3.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
case 2:
loader.load(new URLRequest("reactortop1.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
case 3:
loader.load(new URLRequest("reactortop2.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
};
} else {
complete();
};
}
private function onLoadComplete(_arg1:Event):void{
counter++;
if (counter < 4){
switch (counter){
case 1:
material1.texture = new Texture(Bitmap(loader.content).bitmapData);
loader.load(new URLRequest("reactorbottom2.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
case 2:
material2.texture = new Texture(Bitmap(loader.content).bitmapData);
loader.load(new URLRequest("reactortop1.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
case 3:
material3.texture = new Texture(Bitmap(loader.content).bitmapData);
loader.load(new URLRequest("reactortop2.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
};
} else {
material4.texture = new Texture(Bitmap(loader.content).bitmapData);
complete();
};
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("reactorbottom1.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading reactor texture");
}
}
}//package bunker
Section 75
//Reactor_Bmp1 (bunker.Reactor_Bmp1)
package bunker {
import mx.core.*;
public class Reactor_Bmp1 extends BitmapAsset {
}
}//package bunker
Section 76
//Reactor_Bmp2 (bunker.Reactor_Bmp2)
package bunker {
import mx.core.*;
public class Reactor_Bmp2 extends BitmapAsset {
}
}//package bunker
Section 77
//Reactor_Bmp3 (bunker.Reactor_Bmp3)
package bunker {
import mx.core.*;
public class Reactor_Bmp3 extends BitmapAsset {
}
}//package bunker
Section 78
//Reactor_Bmp4 (bunker.Reactor_Bmp4)
package bunker {
import mx.core.*;
public class Reactor_Bmp4 extends BitmapAsset {
}
}//package bunker
Section 79
//ReactorLight (bunker.ReactorLight)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
public class ReactorLight extends Mesh {
public function ReactorLight(){
super("ReactorLight");
coords = new Point3D(6.01790806856878E-13, 2322.83471679688, -629.921264648438);
addVertex(-23.6220436096197, -520.247436523438, 149.6064453125, "0");
addVertex(23.6220474243158, -520.247436523438, 149.6064453125, "1");
addVertex(-23.6220436096197, -513.0888671875, 164.718994140625, "2");
addVertex(23.6220474243158, -513.0888671875, 164.718994140625, "3");
addFace(["0", "2", "3", "1"], "2");
addSurface(["2"], "ReactorLight");
setMaterialToSurface(new FillMaterial(0xFFFFFF), "ReactorLight");
}
}
}//package bunker
Section 80
//Screen (bunker.Screen)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.media.*;
public class Screen extends Mesh {
public var material:TextureMaterial;
private static const animation:MovieClip = new screenAnimation();
private static const screenAnimation:Class = Screen_screenAnimation;
private static const screen:Texture = new Texture(new BitmapData(0x0100, 0x0100, false, 0x440000));
public function Screen(){
material = new TextureMaterial(screen, 1, false, false, BlendMode.NORMAL, 15);
super("Screen");
mobile = 2;
coords = new Point3D(362.204772949219, -1921.26000976563, 78.7401580810547);
addVertex(64.90576171875, -149.606323242188, -51.1811065673828, "0");
addVertex(88.7898864746094, -108.353881835938, -51.1811065673828, "1");
addVertex(23.9097137451172, 3.9371337890625, -51.1811065673828, "2");
addVertex(-64.9058227539063, -149.606323242188, -51.1811065673828, "3");
addVertex(-88.7899475097656, -108.353881835938, -51.1811065673828, "4");
addVertex(-23.9097747802734, 3.9371337890625, -51.1811065673828, "5");
addFace(["1", "2", "5", "4", "3", "0"], "2");
setUVsToFace(new Point((1 - 0.00999999977648258), 0.368336379528046), new Point((1 - 0.36805060505867), 0.988030850887299), new Point((1 - 0.631949415764282), 0.98803119360935), "2");
addSurface(["2"], "Screen");
setMaterialToSurface(material, "Screen");
animation.stop();
}
public function checkVolume(_arg1:Point3D, _arg2:Point3D):void{
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local3:Number = 125;
var _local4:Number = 250;
var _local5:Point3D = Point3D.difference(new Point3D(362, -2007, 0), _arg1);
var _local6:Number = (((_local5.x * _local5.x) + (_local5.y * _local5.y)) + (_local5.z * _local5.z));
var _local7:Number = (_local3 * _local3);
var _local8:Number = (_local4 * _local4);
if (_local6 <= _local7){
_local9 = 1;
_local10 = 0;
} else {
if (_local6 <= _local8){
_local11 = ((_local6 - _local7) / (_local8 - _local7));
_local9 = (1 - _local11);
_local5.normalize();
_local10 = (Point3D.dot(_local5, _arg2) * Math.sqrt(_local11));
} else {
_local9 = 0;
_local10 = 0;
};
};
animation.soundTransform = new SoundTransform((_local9 * 0.3), _local10);
}
public function stopAnimation():void{
animation.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(_arg1:Event):void{
screen.bitmapData.draw(animation);
}
public function startAnimation():void{
animation.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
}
}//package bunker
Section 81
//Screen_screenAnimation (bunker.Screen_screenAnimation)
package bunker {
import mx.core.*;
import flash.utils.*;
public class Screen_screenAnimation extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Screen_screenAnimation(){
dataClass = Screen_screenAnimation_dataClass;
super();
initialWidth = (0x1400 / 20);
initialHeight = (0x1400 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package bunker
Section 82
//Screen_screenAnimation_dataClass (bunker.Screen_screenAnimation_dataClass)
package bunker {
import mx.core.*;
public class Screen_screenAnimation_dataClass extends ByteArrayAsset {
}
}//package bunker
Section 83
//ScreenLight (bunker.ScreenLight)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.engine3d.materials.*;
public class ScreenLight extends Mesh {
public function ScreenLight(){
super("ScreenLight");
mobile = 3;
x = 539.3701171875;
y = -1921.25988769531;
addVertex(-169.291381835938, -70.8662109375, 118.110260009766, "0");
addVertex(-185.039367675781, -70.8662109375, 118.110260009766, "1");
addVertex(-185.039367675781, 7.8740234375, 114.173233032227, "2");
addVertex(-169.291381835938, 7.8740234375, 114.173233032227, "3");
addVertex(-169.206573486328, -98.380859375, 118.110260009766, "4");
addVertex(-161.332580566406, -84.74267578125, 118.110260009766, "5");
addVertex(-93.1415405273438, -124.11279296875, 114.173248291016, "6");
addVertex(-101.015533447266, -137.750854492188, 114.173248291016, "7");
addVertex(-253.315216064453, -137.750854492188, 114.173248291016, "8");
addVertex(-261.189208984375, -124.11279296875, 114.173248291016, "9");
addVertex(-192.998168945313, -84.74267578125, 118.110260009766, "10");
addVertex(-185.124176025391, -98.380859375, 118.110260009766, "11");
addFace(["0", "1", "2", "3"], "2");
addFace(["4", "5", "6", "7"], "4");
addFace(["9", "10", "11", "8"], "6");
addSurface(["2", "6", "4"], "ScreenLight");
setMaterialToSurface(new FillMaterial(16770991), "ScreenLight");
}
}
}//package bunker
Section 84
//Slope (bunker.Slope)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Slope extends Mesh {
private var loader:Loader;
private var onLoadMethod:Function;
public var material:TextureMaterial;
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = Slope_Bmp;
public function Slope(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Slope");
mobile = 1;
y = 393.700805664063;
addVertex(47.2441024780273, 236.220520019531, -3.0517578125E-5, "1");
addVertex(31.4960689544678, 236.220520019531, 125.984230041504, "2");
addVertex(-31.496057510376, 236.220581054688, 125.984230041504, "5");
addVertex(62.9921875, 1417.32299804688, -606.811096191406, "72");
addVertex(-47.2440948486328, 0, -3.0517578125E-5, "9");
addVertex(47.2441558837891, 1417.32299804688, -629.921325683594, "76");
addVertex(62.9921798706055, 1181.1025390625, -606.810974121094, "73");
addVertex(-62.9920654296875, 1417.32299804688, -606.811096191406, "82");
addVertex(-31.4960060119629, 1417.32299804688, -503.936950683594, "84");
addVertex(31.4961204528809, 1417.32299804688, -503.936950683594, "22");
addVertex(47.2441482543945, 1181.1025390625, -629.921264648438, "87");
addVertex(-47.2440338134766, 1417.32299804688, -629.921325683594, "25");
addVertex(47.2441520690918, 1118.11840820313, -612.989074707031, "94");
addVertex(62.9921340942383, 236.220520019531, 23.1101989746094, "34");
addVertex(62.9921264648438, 3.0517578125E-5, 23.1102066040039, "36");
addVertex(-47.2440414428711, 1181.1025390625, -629.921264648438, "101");
addVertex(-62.992073059082, 1181.1025390625, -606.810974121094, "102");
addVertex(47.2440948486328, 0, -3.0517578125E-5, "40");
addVertex(-62.992073059082, 1129.78271484375, -593.037963867188, "107");
addVertex(-62.9921264648438, 3.0517578125E-5, 23.1102066040039, "44");
addVertex(31.4960632324219, 3.0517578125E-5, 125.984222412109, "37");
addVertex(-47.2440376281738, 1118.11840820313, -612.989074707031, "30");
addVertex(-31.4960632324219, 3.0517578125E-5, 125.984222412109, "48");
addVertex(31.4961166381836, 1181.1025390625, -503.937072753906, "114");
addVertex(-31.4960098266602, 1181.1025390625, -503.937072753906, "108");
addVertex(-31.4960556030273, 298.648864746094, 109.061813354492, "117");
addVertex(-62.9921188354492, 247.320861816406, 19.9073677062988, "111");
addVertex(62.9921798706055, 1129.78271484375, -593.037963867188, "121");
addVertex(31.4960708618164, 298.648864746094, 109.061813354492, "123");
addVertex(62.9921340942383, 247.320861816406, 19.9073677062988, "124");
addVertex(-47.2440872192383, 236.220520019531, -3.0517578125E-5, "61");
addVertex(-62.9921188354492, 236.220520019531, 23.1101989746094, "62");
addFace(["123", "117", "108", "114"], "0");
setUVsToFace(new Point(0.330243736505508, 0.00100000004749745), new Point(0.38816511631012, 0.00100000004749745), new Point(0.388165056705475, 0.988979995250702), "0");
addFace(["73", "87", "94", "121"], "1");
setUVsToFace(new Point(0.61574151923796, 0.711591593226423), new Point(0.640927731990814, 0.706364870071411), new Point(0.640236377716064, 0.766331136226654), "1");
addFace(["30", "101", "102", "107"], "2");
setUVsToFace(new Point(0.831726789474487, 0.00100000004749745), new Point(0.830066680908203, 0.0609473027288914), new Point(0.805113136768341, 0.0547373481094837), "2");
addFace(["124", "121", "94", "1"], "3");
setUVsToFace(new Point(0.482005715370178, 0.00100000004749745), new Point(0.47064870595932, 0.988892912864685), new Point(0.444969981908798, 0.990254163742065), "3");
addFace(["76", "25", "101", "87"], "4");
setUVsToFace(new Point(0.688416063785553, 0.00100000004749745), new Point(0.775298118591309, 0.00100000004749745), new Point(0.775298118591309, 0.218205183744431), "4");
addFace(["44", "9", "61", "62"], "5");
setUVsToFace(new Point(0.648230493068695, 0.486699402332306), new Point(0.673945069313049, 0.486699402332306), new Point(0.673945060823882, 0.703904597209976), "5");
addFace(["111", "117", "5", "62"], "6");
setUVsToFace(new Point(0.586208820343018, 0.228412017226219), new Point(0.499344378709793, 0.27560818195343), new Point(0.484554605890198, 0.218205154747222), "6");
addFace(["82", "102", "101", "25"], "7");
setUVsToFace(new Point(0.777758479118347, 0.218205183744431), new Point(0.777758291995547, 0.00100000004749745), new Point(0.803472995758057, 0.00100000004749745), "7");
addFace(["114", "22", "72", "73"], "8");
setUVsToFace(new Point(0.587849020957947, 0.218205153942108), new Point(0.587848901748657, 0.00100000004749745), new Point(0.686775922775269, 0.00100000004749745), "8");
addFace(["94", "30", "61", "1"], "10");
setUVsToFace(new Point(0.327783465385437, 0.988555252552032), new Point(0.240901410579681, 0.988555252552032), new Point(0.240901380777359, 0.00100000004749745), "10");
addFace(["123", "2", "5", "117"], "11");
setUVsToFace(new Point(0.748797714710236, 0.280139923095703), new Point(0.748797655105591, 0.220665395259857), new Point(0.806719064712524, 0.220665395259857), "11");
addFace(["34", "124", "1"], "12");
setUVsToFace(new Point(0.587848901748657, 0.925210177898407), new Point(0.598201751708984, 0.92759120464325), new Point(0.587979853153229, 0.950924456119537), "12");
addFace(["2", "123", "124", "34"], "13");
setUVsToFace(new Point(0.484465897083282, 0.334651231765747), new Point(0.499344378709793, 0.27724826335907), new Point(0.586208820343018, 0.324444472789764), "13");
addFace(["30", "107", "111", "61"], "14");
setUVsToFace(new Point(0.417594844609848, 0.000996466770407212), new Point(0.443329900503159, 0.00336705567315221), new Point(0.415948987007141, 0.99094569683075), "14");
addFace(["124", "123", "114", "121"], "15");
setUVsToFace(new Point(0.223694890737534, 0.988835394382477), new Point(0.124978341162205, 0.995284020900726), new Point(0.140591828384617, 0.00742745106436493), "15");
addFace(["87", "73", "72", "76"], "16");
setUVsToFace(new Point(0.613563537597656, 0.923570036888123), new Point(0.587848901748657, 0.923570036888123), new Point(0.587849088871278, 0.706364870071411), "16");
addFace(["61", "111", "62"], "17");
setUVsToFace(new Point(0.681614577770233, 0.486699342727661), new Point(0.686208188533783, 0.51175582408905), new Point(0.675585210323334, 0.511697053909302), "17");
addFace(["62", "5", "48", "44"], "18");
setUVsToFace(new Point(0.583392798900604, 0.218205213546753), new Point(0.484465897083282, 0.218205213546753), new Point(0.484465911756616, 0.000999943925557301), "18");
addFace(["87", "101", "30", "94"], "19");
setUVsToFace(new Point(0.544436156749725, 0.819530546665192), new Point(0.544436156749725, 0.906412601470947), new Point(0.484465897083282, 0.906412601470947), "19");
addFace(["108", "117", "111", "107"], "20");
setUVsToFace(new Point(0.00100000004749745, 0.988709270954132), new Point(0.0241302829235792, 0.00100000004749745), new Point(0.122518137097359, 0.0113136433064938), "20");
addFace(["102", "82", "84", "108"], "21");
setUVsToFace(new Point(0.583392798900604, 0.600685238838196), new Point(0.583392914464627, 0.817890405654907), new Point(0.484465897083282, 0.817890405654907), "21");
addFace(["1", "40", "36", "34"], "22");
setUVsToFace(new Point(0.714130640029907, 0.440330773591995), new Point(0.714130648519077, 0.657535998272001), new Point(0.688416063785553, 0.657535970211029), "22");
addFace(["1", "61", "9", "40"], "23");
setUVsToFace(new Point(0.587848901748657, 0.267033934593201), new Point(0.674730956554413, 0.267033934593201), new Point(0.674730956554413, 0.484239161014557), "23");
addFace(["37", "2", "34", "36"], "28");
setUVsToFace(new Point(0.484465897083282, 0.551856458187103), new Point(0.484465897083282, 0.334651231765747), new Point(0.583392798900604, 0.334651231765747), "28");
addFace(["73", "121", "114"], "34");
setUVsToFace(new Point(0.686775863170624, 0.218205153942108), new Point(0.674666345119476, 0.265393853187561), new Point(0.587849020957947, 0.218205153942108), "34");
addFace(["114", "108", "84", "22"], "37");
setUVsToFace(new Point(0.688416123390198, 0.220665395259857), new Point(0.746337532997131, 0.220665395259857), new Point(0.746337473392487, 0.437870591878891), "37");
addFace(["108", "107", "102"], "39");
setUVsToFace(new Point(0.484466016292572, 0.600685238838196), new Point(0.571283340454102, 0.553496539592743), new Point(0.583392798900604, 0.600685238838196), "39");
addFace(["48", "5", "2", "37"], "52");
setUVsToFace(new Point(0.645770370960236, 0.486699402332306), new Point(0.645770311355591, 0.703904569149017), new Point(0.587848901748657, 0.703904569149017), "52");
addSurface(["5", "13", "3", "20", "14", "18", "8", "1", "37", "21", "15", "12", "23", "22", "28", "10", "52", "16", "11", "34", "6", "17", "39", "2", "19", "0", "4", "7"], "Slope");
setMaterialToSurface(material, "Slope");
}
private function onLoadComplete(_arg1:Event):void{
material.texture = new Texture(Bitmap(loader.content).bitmapData);
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("slope.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading slope texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
}
}//package bunker
Section 85
//Slope_Bmp (bunker.Slope_Bmp)
package bunker {
import mx.core.*;
public class Slope_Bmp extends BitmapAsset {
}
}//package bunker
Section 86
//Sound3D (bunker.Sound3D)
package bunker {
import flash.events.*;
import alternativa.types.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
public class Sound3D {
private var intervalId:int;
private var multiplier:Number;
private var channel:SoundChannel;
private var loaded:Boolean;// = false
private var sound:Sound;
private var far:Number;
private var volume:Number;// = 1
private var pan:Number;// = 0
private var coords:Point3D;
private var onLoadMethod:Function;
private var near:Number;
private var fadeInned:Boolean;// = false
private var url:String;
private var transform:SoundTransform;
private var info:String;
public function Sound3D(_arg1:Point3D, _arg2:Number, _arg3:Number, _arg4:String, _arg5:String, _arg6:Number=1){
sound = new Sound();
transform = new SoundTransform(0);
super();
this.coords = _arg1.clone();
this.near = _arg2;
this.far = _arg3;
this.url = _arg4;
this.info = _arg5;
this.multiplier = _arg6;
}
public function checkVolume(_arg1:Point3D, _arg2:Point3D):void{
var _local3:Point3D;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (loaded){
_local3 = Point3D.difference(this.coords, _arg1);
_local4 = (((_local3.x * _local3.x) + (_local3.y * _local3.y)) + (_local3.z * _local3.z));
_local5 = (near * near);
_local6 = (far * far);
if (_local4 <= _local5){
volume = multiplier;
pan = 0;
} else {
if (_local4 <= _local6){
_local7 = ((_local4 - _local5) / (_local6 - _local5));
volume = ((1 - _local7) * multiplier);
_local3.normalize();
pan = (Point3D.dot(_local3, _arg2) * Math.sqrt(_local7));
} else {
volume = 0;
pan = 0;
};
};
if (fadeInned){
transform.volume = volume;
transform.pan = pan;
channel.soundTransform = transform;
};
};
}
private function onLoadComplete(_arg1:Event):void{
channel = sound.play(0, 1000000, transform);
intervalId = setInterval(addVolume, 100);
loaded = true;
sound.removeEventListener(Event.COMPLETE, onLoadComplete);
sound.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod.call();
onLoadMethod = null;
}
private function addVolume():void{
transform.volume = (transform.volume + 0.05);
if (transform.volume >= volume){
transform.volume = volume;
clearInterval(intervalId);
fadeInned = true;
};
transform.pan = pan;
channel.soundTransform = transform;
}
private function onLoadError(_arg1:IOErrorEvent):void{
sound.removeEventListener(Event.COMPLETE, onLoadComplete);
sound.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
sound.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod.call();
onLoadMethod = null;
}
public function getStrength(_arg1:Point3D, _arg2:Number):Number{
var _local5:Number;
var _local3:Point3D = Point3D.difference(this.coords, _arg1);
var _local4:Number = (((_local3.x * _local3.x) + (_local3.y * _local3.y)) + (_local3.z * _local3.z));
if (_local4 > 0){
_local5 = (_arg2 * _arg2);
if (_local4 <= _local5){
return ((1 - (_local4 / _local5)));
};
return (0);
//unresolved jump
};
return (1);
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
sound.addEventListener(Event.COMPLETE, onLoadComplete);
sound.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
sound.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
sound.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
sound.load(new URLRequest(url), new SoundLoaderContext());
return (info);
}
}
}//package bunker
Section 87
//Splits (bunker.Splits)
package bunker {
import alternativa.engine3d.core.*;
import alternativa.types.*;
public class Splits extends Mesh {
public function Splits(){
super("Splits");
mobile = 0;
coords = new Point3D(1548.55651855469, -1582.67712402344, 26.2467193603516);
rotationX = 1.57079637050629;
addVertex(26.2467041015627, -26.2467193603515, 1.14728049993573E-6, "0");
addVertex(26.2467041015627, -18.3727035522461, 8.03096327217645E-7, "1");
addVertex(18.3726806640627, -26.2467193603515, 1.14728049993573E-6, "2");
addVertex(26.2467041015627, -26.2467420765016, -519.684935376156, "3");
addVertex(26.2467041015627, -18.3727262683961, -519.68493572034, "4");
addVertex(18.3726806640627, -26.2467420765016, -519.684935376156, "5");
addVertex(26.2467041015627, -26.2468074714971, -2015.74804572772, "6");
addVertex(26.2467041015627, -18.3727916633916, -2015.7480460719, "7");
addVertex(18.3726806640627, -26.2468074714971, -2015.74804572772, "8");
addVertex(26.2467041015627, -26.2468659827973, -3354.33056525896, "9");
addVertex(26.2467041015627, -18.3728501746919, -3354.33056560315, "10");
addVertex(18.3726806640627, -26.2468659827973, -3354.33056525896, "11");
addFace(["1", "2", "0"], "0");
addFace(["4", "5", "3"], "1");
addFace(["7", "8", "6"], "2");
addFace(["10", "11", "9"], "3");
}
}
}//package bunker
Section 88
//Ventilation (bunker.Ventilation)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
import alternativa.utils.*;
import flash.net.*;
import flash.system.*;
public class Ventilation extends Mesh {
private var alpha:BitmapData;
public var material:TextureMaterial;
private var onLoadMethod:Function;
private var loader:Loader;
private var counter:uint;// = 0
private static const texture:Texture = new Texture(new Bmp().bitmapData);
private static const Bmp:Class = Ventilation_Bmp;
public function Ventilation(){
material = new TextureMaterial(texture, 1, false, true, BlendMode.NORMAL, 1);
super("Ventilation");
coords = new Point3D(6.01790806856878E-13, 2322.83471679688, -629.921264648438);
addVertex(529.133911132812, 78.739990234375, 214.181640625, "0");
addVertex(529.133911132812, -78.740234375, 214.181671142578, "1");
addVertex(417.77847290039, 78.739990234375, 102.826171875, "2");
addVertex(417.778503417968, -78.740234375, 102.826171875, "3");
addVertex(-417.778442382813, 78.740234375, 102.826171875, "4");
addVertex(-529.133850097657, 78.740234375, 214.181671142578, "5");
addVertex(-529.133850097657, -78.739990234375, 214.181640625, "6");
addVertex(-417.778350830079, -78.739990234375, 102.826171875, "7");
addVertex(78.7402877807611, 417.7783203125, 102.826171875, "8");
addVertex(78.740257263183, 529.1337890625, 214.181671142578, "9");
addVertex(-78.7399978637701, 529.1337890625, 214.181640625, "10");
addVertex(-78.7399368286139, 417.7783203125, 102.826171875, "11");
addFace(["8", "9", "10", "11"], "0");
setUVsToFace(new Point(0.499001704509106, 0.501001579179785), new Point(0.49899822473526, 0.999001741409302), new Point(0.000998258590698242, 0.998998165130615), "0");
addFace(["3", "1", "0", "2"], "2");
setUVsToFace(new Point(0.500999850645753, 0.00100000004749745), new Point(0.999000012874603, 0.00100000004749745), new Point(0.999000012874603, 0.499000012874603), "2");
addFace(["6", "7", "4", "5"], "6");
setUVsToFace(new Point(0.000999089679680765, 0.00100088119506836), new Point(0.498999118804932, 0.000999003648757935), new Point(0.499000541976106, 0.498998969794863), "6");
addSurface(["0", "2", "6"], "Ventilation");
setMaterialToSurface(material, "Ventilation");
}
private function onLoadError(_arg1:IOErrorEvent):void{
complete();
}
public function load(_arg1:Function):String{
this.onLoadMethod = _arg1;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
loader.load(new URLRequest("ventilationalpha.gif"), new LoaderContext(false, ApplicationDomain.currentDomain));
return ("Loading ventilation texture");
}
private function complete():void{
onLoadMethod.call();
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.NETWORK_ERROR, onLoadError);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.VERIFY_ERROR, onLoadError);
onLoadMethod = null;
loader = null;
}
private function onLoadComplete(_arg1:Event):void{
counter++;
if (counter < 2){
switch (counter){
case 1:
alpha = Bitmap(loader.content).bitmapData;
loader.load(new URLRequest("ventilation.jpg"), new LoaderContext(false, ApplicationDomain.currentDomain));
break;
};
} else {
material.texture = new Texture(BitmapUtils.mergeBitmapAlpha(Bitmap(loader.content).bitmapData, alpha, true));
complete();
};
}
}
}//package bunker
Section 89
//Ventilation_Bmp (bunker.Ventilation_Bmp)
package bunker {
import mx.core.*;
public class Ventilation_Bmp extends BitmapAsset {
}
}//package bunker
Section 90
//Ventilators (bunker.Ventilators)
package bunker {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import alternativa.engine3d.materials.*;
import flash.geom.*;
import flash.display.*;
public class Ventilators extends Mesh {
public var material:TextureMaterial;
private var angle:Number;// = 0
private static const Bmp:Class = Ventilators_Bmp;
private static const texture:Texture = new Texture(new BitmapData(276, 276, false, 0xFF0000));
private static const ventilator:BitmapData = new Bmp().bitmapData;
private static var sprite:Sprite = new Sprite();
public function Ventilators(){
material = new TextureMaterial(texture, 1, false, false, BlendMode.NORMAL, 15);
super("Ventilators");
coords = new Point3D(6.01790806856878E-13, 2322.83471679688, -629.921264648438);
addVertex(548.614685058593, -78.740234375, 194.700866699219, "v0");
addVertex(548.614685058593, 78.739990234375, 194.700836181641, "v1");
addVertex(437.259277343749, 78.739990234375, 83.3453979492188, "v2");
addVertex(437.259307861328, -78.740234375, 83.3453979492188, "v3");
addVertex(-437.259246826173, 78.740234375, 83.3453979492188, "v4");
addVertex(-548.614624023438, 78.740234375, 194.700866699219, "v5");
addVertex(-548.614624023438, -78.739990234375, 194.700866699219, "v6");
addVertex(-437.259155273438, -78.739990234375, 83.3453979492188, "v7");
addVertex(78.7402877807611, 437.25927734375, 83.3453979492188, "v8");
addVertex(78.740257263183, 548.614501953125, 194.700866699219, "v9");
addVertex(-78.7399978637701, 548.614501953125, 194.700866699219, "v10");
addVertex(-78.7399368286139, 437.259033203125, 83.3453979492188, "v11");
addFace(["v9", "v10", "v11", "v8"], "v0");
setUVsToFace(new Point(0, 0.999999821186066), new Point(1.93786661384365E-7, 0), new Point(1, 3.87573322768731E-7), "v0");
addFace(["v6", "v7", "v4", "v5"], "v1");
setUVsToFace(new Point(0, -4.46318892954878E-8), new Point(1, 1.93786689806075E-7), new Point(1, 1), "v1");
addFace(["v3", "v0", "v1", "v2"], "v6");
setUVsToFace(new Point(0.999999983375498, 0.99999951581969), new Point(0, 0.999999225139618), new Point(2.90679992076548E-7, 0), "v6");
addSurface(["v0", "v6", "v1"], "Ventilators");
setMaterialToSurface(material, "Ventilators");
addVertex(529.133911132812, 78.739990234375, 214.181640625, "0");
addVertex(529.133911132812, -78.740234375, 214.181671142578, "1");
addVertex(417.77847290039, 78.739990234375, 102.826171875, "2");
addVertex(417.778503417968, -78.740234375, 102.826171875, "3");
addVertex(-417.778442382813, 78.740234375, 102.826171875, "4");
addVertex(-529.133850097657, 78.740234375, 214.181671142578, "5");
addVertex(-529.133850097657, -78.739990234375, 214.181640625, "6");
addVertex(-417.778350830079, -78.739990234375, 102.826171875, "7");
addVertex(78.7402877807611, 417.7783203125, 102.826171875, "8");
addVertex(78.740257263183, 529.1337890625, 214.181671142578, "9");
addVertex(-78.7399978637701, 529.1337890625, 214.181640625, "10");
addVertex(-78.7399368286139, 417.7783203125, 102.826171875, "11");
addVertex(548.621093749999, -78.740234375, 194.694458007813, "12");
addVertex(548.621093749999, 78.739990234375, 194.694427490234, "13");
addVertex(437.265686035156, 78.739990234375, 83.3389892578125, "14");
addVertex(437.265686035156, -78.740234375, 83.3389892578125, "15");
addVertex(-437.265625000001, 78.740234375, 83.3389892578125, "16");
addVertex(-548.621032714844, 78.740234375, 194.694458007813, "17");
addVertex(-548.621032714844, -78.739990234375, 194.694458007813, "18");
addVertex(-437.265563964844, -78.739990234375, 83.3389892578125, "19");
addVertex(78.7402877807611, 437.265625, 83.3389892578125, "20");
addVertex(78.740257263183, 548.620849609375, 194.694458007813, "21");
addVertex(-78.7399978637701, 548.620849609375, 194.694458007813, "22");
addVertex(-78.7399368286139, 437.265380859375, 83.3389892578125, "23");
addFace(["17", "5", "6", "18"], "0");
addFace(["20", "8", "9", "21"], "1");
addFace(["19", "7", "4", "16"], "2");
addFace(["4", "5", "17", "16"], "24");
addFace(["8", "20", "23", "11"], "4");
addFace(["0", "2", "14", "13"], "5");
addFace(["12", "1", "0", "13"], "6");
addFace(["21", "9", "10", "22"], "7");
addFace(["3", "1", "12", "15"], "8");
addFace(["6", "7", "19", "18"], "9");
addFace(["11", "23", "22", "10"], "10");
addFace(["14", "2", "3", "15"], "11");
addSurface(["2", "5", "11", "10", "9", "7", "1", "0", "6", "4", "24", "8"], "BlackBox");
setMaterialToSurface(new FillMaterial(0), "BlackBox");
}
private function onEnterFrame(_arg1:Event):void{
angle = (angle + 0.05);
var _local2:Matrix = new Matrix(1, 0, 0, 1, -138, -138);
_local2.rotate(angle);
_local2.translate(138, 138);
texture.bitmapData.draw(ventilator, _local2);
}
public function rotate(_arg1:Number):void{
angle = (angle + (0.05 * _arg1));
var _local2:Matrix = new Matrix(1, 0, 0, 1, -138, -138);
_local2.rotate(angle);
_local2.translate(138, 138);
texture.bitmapData.draw(ventilator, _local2);
}
}
}//package bunker
Section 91
//Ventilators_Bmp (bunker.Ventilators_Bmp)
package bunker {
import mx.core.*;
public class Ventilators_Bmp extends BitmapAsset {
}
}//package bunker
Section 92
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.0.0.0";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 93
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 94
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 95
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 96
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 97
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 98
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 99
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.geom.*;
import flash.display.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 100
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 101
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 102
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 103
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 104
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 105
//Bunker (Bunker)
package {
import flash.events.*;
import alternativa.engine3d.core.*;
import alternativa.types.*;
import flash.geom.*;
import alternativa.engine3d.physics.*;
import flash.display.*;
import flash.utils.*;
import bunker.*;
import flash.text.*;
import alternativa.utils.*;
import flash.ui.*;
public class Bunker extends Sprite {
private const offsetTreshold:Number = 0.01;
private const gravity:Number = 1;
private const maxVelocity:Number = 4;
private const acceleration:Number = 3;
private const REACTOR:uint = 3;
private const radius:Number;
private const stature:Number = 62.992;
private const tick:Number = 20;
private const coordsTreshold:Number = 0.25;
private const runMultiplier:Number = 2.5;
private const ENTRANCE:uint = 1;
private const maxAngle:Number;
private const friction:Number = 0.8;
private const BUNKER:uint = 2;
private var entranceAmbient:Sound3D;
private var ventilator1:Sound3D;
private var ventilator3:Sound3D;
private var place:int;// = 0
private var screenLight:ScreenLight;
private var ventilator2:Sound3D;
private var prevDragCoords:Point;
private var left:Boolean;// = false
private var right:Boolean;// = false
private var loadingCounter:int;// = -1
private var loadingInfo:TextField;
private var camera:Camera3D;
private var loadingSequence:Array;
private var coords:Point3D;
private var ventilators:Ventilators;
private var grid:Grid;
private var timer:uint;
private var screenMultiplier:uint;// = 10
private var passage:Passage;
private var debug:Boolean;// = false
private var low:Boolean;// = false
private var ventilation:Ventilation;
private var screen:Screen;
private var startDragCoords:Point;
private var icon:Bitmap;
private var fly:Boolean;// = false
private var precision:Number;// = 20
private var qualityTimer:uint;// = 0
private var energy:Energy;
private var bunkerMesh:BunkerMesh;
private var run:Boolean;// = false
private var reactorLight:ReactorLight;
private var reactorAmbient:Sound3D;
private var splits:Splits;
private var scene:Scene3D;
private var core:Core;
private var reactor:Reactor;
private var up:Boolean;// = false
private var slope:Slope;
private var down:Boolean;// = false
private var entrance:Entrance;
private var moveSound:MoveSound;
private var bunkerWindows:BunkerWindows;
private var currentDragCoords:Point;
private var bunkerAmbient:Sound3D;
private var velocity:Point3D;
private var startRotX:Number;
private var startRotZ:Number;
private var entranceWindows:EntranceWindows;
private var previousCollision:Collision;
private var qualityTimerMax:uint;// = 50
private static const bmpFly:Class = Bunker_bmpFly;
private static const bmpLogo:Class = Bunker_bmpLogo;
private static const flyBmp:BitmapData = new bmpFly().bitmapData;
private static const bmpWalk:Class = Bunker_bmpWalk;
private static const logoBmp:BitmapData = new bmpLogo().bitmapData;
private static const walkBmp:BitmapData = new bmpWalk().bitmapData;
public function Bunker(){
splits = new Splits();
entrance = new Entrance();
entranceWindows = new EntranceWindows();
screen = new Screen();
screenLight = new ScreenLight();
passage = new Passage();
bunkerMesh = new BunkerMesh();
bunkerWindows = new BunkerWindows();
grid = new Grid();
slope = new Slope();
core = new Core();
reactor = new Reactor();
reactorLight = new ReactorLight();
ventilation = new Ventilation();
ventilators = new Ventilators();
moveSound = new MoveSound();
entranceAmbient = new Sound3D(new Point3D(362, -1945, 0), 370, 690, "entrance.mp3", "Loading entrance ambient");
bunkerAmbient = new Sound3D(new Point3D(0, -315, 0), 770, 1270, "bunker.mp3", "Loading bunker ambient");
reactorAmbient = new Sound3D(new Point3D(0, 2323, -250), 607, 1615, "reactor.mp3", "Loading reactor ambient");
ventilator1 = new Sound3D(new Point3D(472, 2322, -470), 300, 450, "ventilator.mp3", "Loading ventilator sound", 2);
ventilator2 = new Sound3D(new Point3D(-472, 2322, -470), 300, 450, "ventilator.mp3", "Loading ventilator sound", 2);
ventilator3 = new Sound3D(new Point3D(0, 2795, -470), 300, 450, "ventilator.mp3", "Loading ventilator soun", 2);
currentDragCoords = new Point();
radius = (15.748 + 5);
maxAngle = MathUtils.toRadian(40);
velocity = new Point3D();
coords = new Point3D(362.205, -2120, (fly) ? stature : radius);
loadingSequence = [moveSound, entrance, passage, entranceAmbient, bunkerMesh, grid, bunkerAmbient, slope, reactor, ventilation, reactorAmbient, ventilator1, ventilator2, ventilator3];
super();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 100;
MouseUtils.init(stage);
scene = new Scene3D();
scene.root = new Object3D("root");
energy = new Energy();
scene.root.addChild(splits);
scene.calculate();
changePlace(1);
camera = new Camera3D("camera");
camera.fov = MathUtils.toRadian(110);
camera.rotationX = -1.79;
camera.x = coords.x;
camera.y = coords.y;
camera.z = (coords.z + (fly) ? 0 : (stature - radius));
scene.root.addChild(camera);
addChild(camera.view);
FPS.init(this);
var _local1:Bitmap = new Bitmap(logoBmp);
_local1.x = 3;
_local1.y = 3;
addChild(_local1);
icon = new Bitmap((fly) ? flyBmp : walkBmp);
icon.alpha = 0.4;
icon.blendMode = BlendMode.ADD;
addChild(icon);
var _local2:TestInfo = new TestInfo();
_local2.x = 3;
_local2.y = 46;
_local2.write("Drag — look");
_local2.write("WSAD or arrows — move");
_local2.write("F — on/off fly mode");
_local2.write("Wheel or [ ] — change FOV");
_local2.write("+/- — change screen size");
_local2.write("T — show triangulation");
addChild(_local2);
loadingInfo = new TextField();
loadingInfo.x = 3;
loadingInfo.text = " ";
loadingInfo.autoSize = TextFieldAutoSize.LEFT;
loadingInfo.selectable = false;
loadingInfo.setTextFormat(new TextFormat("Tahoma", 10, 0xFF0000));
loadingInfo.defaultTextFormat = new TextFormat("Tahoma", 10, 0xFF0000);
addChild(loadingInfo);
loadNext();
onResize(null);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel);
stage.addEventListener(Event.RESIZE, onResize);
}
private function changePlace(_arg1:uint):void{
if (_arg1 == 1){
switch (place){
case 0:
scene.root.addChild(entrance);
scene.root.addChild(entranceWindows);
scene.root.addChild(screen);
scene.root.addChild(screenLight);
scene.calculate();
scene.root.addChild(passage);
scene.calculate();
break;
case 2:
scene.root.removeChild(slope);
scene.root.removeChild(bunkerMesh);
scene.root.removeChild(bunkerWindows);
scene.root.removeChild(grid);
scene.root.addChild(entrance);
scene.root.addChild(entranceWindows);
scene.root.addChild(screen);
scene.root.addChild(screenLight);
scene.calculate();
break;
case 3:
break;
};
screen.startAnimation();
};
if (_arg1 == 2){
switch (place){
case 0:
scene.root.addChild(bunkerMesh);
scene.root.addChild(bunkerWindows);
scene.root.addChild(grid);
scene.calculate();
scene.root.addChild(passage);
scene.calculate();
scene.root.addChild(slope);
scene.calculate();
break;
case 1:
scene.root.removeChild(entrance);
scene.root.removeChild(entranceWindows);
scene.root.removeChild(screen);
scene.root.removeChild(screenLight);
scene.root.addChild(bunkerMesh);
scene.root.addChild(bunkerWindows);
scene.root.addChild(grid);
scene.calculate();
scene.root.addChild(slope);
scene.calculate();
screen.stopAnimation();
break;
case 3:
scene.root.removeChild(core);
scene.root.removeChild(reactor);
scene.root.removeChild(ventilation);
scene.root.removeChild(ventilators);
scene.root.removeChild(reactorLight);
scene.root.removeChild(energy);
scene.root.addChild(bunkerMesh);
scene.root.addChild(bunkerWindows);
scene.root.addChild(grid);
scene.calculate();
scene.root.addChild(passage);
scene.calculate();
break;
};
};
if (_arg1 == 3){
switch (place){
case 0:
scene.root.addChild(core);
scene.root.addChild(reactor);
scene.root.addChild(ventilation);
scene.root.addChild(ventilators);
scene.root.addChild(reactorLight);
scene.root.addChild(energy);
scene.calculate();
scene.root.addChild(slope);
scene.calculate();
break;
case 1:
break;
case 2:
scene.root.removeChild(passage);
scene.root.removeChild(bunkerMesh);
scene.root.removeChild(bunkerWindows);
scene.root.removeChild(grid);
scene.root.addChild(core);
scene.root.addChild(reactor);
scene.root.addChild(ventilation);
scene.root.addChild(ventilators);
scene.root.addChild(reactorLight);
scene.root.addChild(energy);
scene.calculate();
break;
};
};
place = _arg1;
}
private function onMouseUp(_arg1:MouseEvent):void{
startDragCoords = null;
stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
private function changeDebug():void{
debug = !(debug);
entrance.material.debug = debug;
screen.material.debug = debug;
passage.material.debug = debug;
bunkerMesh.material.debug = debug;
grid.material.debug = debug;
slope.material.debug = debug;
reactor.material1.debug = debug;
reactor.material2.debug = debug;
reactor.material3.debug = debug;
reactor.material4.debug = debug;
ventilation.material.debug = debug;
energy.material.debug = debug;
}
private function addFOV(_arg1:Number):void{
var _local2:Number = (camera.fov - _arg1);
camera.fov = ((_local2)<MathUtils.DEG30) ? MathUtils.DEG30 : ((_local2)>MathUtils.toRadian(170)) ? MathUtils.toRadian(170) : _local2;
}
private function onResize(_arg1:Event):void{
var _local2:Number = ((stage.stageWidth * screenMultiplier) / 10);
var _local3:Number = ((stage.stageHeight * screenMultiplier) / 10);
var _local4:Number = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
camera.view.x = ((stage.stageWidth - _local2) >> 1);
camera.view.y = ((stage.stageHeight - _local3) >> 1);
camera.view.width = _local2;
camera.view.height = _local3;
camera.viewRadius = _local4;
loadingInfo.y = ((stage.stageHeight - loadingInfo.height) - 1);
icon.x = ((stage.stageWidth - icon.width) - 5);
icon.y = ((stage.stageHeight - icon.height) - 5);
}
private function changeMove():void{
var _local1:Point3D;
var _local2:Point3D;
var _local3:*;
var _local4:*;
fly = !(fly);
if (fly){
coords.z = camera.z;
} else {
_local1 = new Point3D(0, 0, (-(stature) + radius));
_local2 = Point3D.sum(coords, _local1);
do {
_local3 = scene.calculateCollision(coords, _local1, radius);
} while (_local3 == null);
coords.x = _local2.x;
coords.y = _local2.y;
coords.z = _local2.z;
velocity.z = (-(gravity) - coordsTreshold);
};
icon.bitmapData = (fly) ? flyBmp : walkBmp;
}
private function onEnterFrame(_arg1:Event):void{
var _local6:Number;
var _local9:Number;
var _local10:Number;
var _local11:Matrix3D;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Collision;
var _local16:Point3D;
var _local17:*;
var _local18:*;
var _local2:Number = ((getTimer() - timer) / tick);
if (_local2 > 10){
_local2 = 10;
};
timer = getTimer();
if (startDragCoords != null){
prevDragCoords = currentDragCoords;
currentDragCoords = MouseUtils.globalCoords(false);
if (!startDragCoords.equals(currentDragCoords)){
camera.rotationZ = (startRotZ + (((startDragCoords.x - currentDragCoords.x) / screenMultiplier) / 10));
camera.rotationX = (startRotX + (((startDragCoords.y - currentDragCoords.y) / screenMultiplier) / 10));
camera.rotationX = ((camera.rotationX)>0) ? 0 : ((camera.rotationX)<-(MathUtils.DEG180)) ? -(MathUtils.DEG180) : camera.rotationX;
};
};
var _local3:Point3D = camera.coords;
var _local4:Number = (fly) ? 250 : 200;
var _local5:Number = (fly) ? 1.6 : 1.9;
var _local7:Point3D = new Point3D();
_local6 = (ventilator1.getStrength(_local3, _local4) * _local5);
_local7.x = ((-0.707 * _local2) * _local6);
_local7.z = ((0.707 * _local2) * _local6);
velocity.add(_local7);
_local6 = (ventilator2.getStrength(_local3, _local4) * _local5);
_local7.x = ((0.707 * _local2) * _local6);
_local7.z = ((0.707 * _local2) * _local6);
velocity.add(_local7);
_local6 = (ventilator3.getStrength(_local3, _local4) * _local5);
_local7.y = ((-0.707 * _local2) * _local6);
_local7.z = ((0.707 * _local2) * _local6);
velocity.add(_local7);
if (place == 3){
ventilators.rotate(_local2);
energy.onEnterFrame(null);
};
if (((((((up) || (down))) || (left))) || (right))){
_local9 = (acceleration * _local2);
_local10 = (maxVelocity * _local2);
if (run){
_local9 = (_local9 * runMultiplier);
_local10 = (_local10 * runMultiplier);
};
if (fly){
_local11 = Matrix3D.rotationMatrix(camera.rotationX, camera.rotationY, camera.rotationZ);
if (up){
velocity.x = (velocity.x + (_local11.c * _local9));
velocity.y = (velocity.y + (_local11.g * _local9));
velocity.z = (velocity.z + (_local11.k * _local9));
} else {
if (down){
velocity.x = (velocity.x - (_local11.c * _local9));
velocity.y = (velocity.y - (_local11.g * _local9));
velocity.z = (velocity.z - (_local11.k * _local9));
};
};
if (right){
velocity.x = (velocity.x + (_local11.a * _local9));
velocity.y = (velocity.y + (_local11.e * _local9));
velocity.z = (velocity.z + (_local11.i * _local9));
} else {
if (left){
velocity.x = (velocity.x - (_local11.a * _local9));
velocity.y = (velocity.y - (_local11.e * _local9));
velocity.z = (velocity.z - (_local11.i * _local9));
};
};
if (velocity.length > _local10){
velocity.length = _local10;
};
} else {
if (up){
velocity.x = (velocity.x - (Math.sin(camera.rotationZ) * _local9));
velocity.y = (velocity.y + (Math.cos(camera.rotationZ) * _local9));
} else {
if (down){
velocity.x = (velocity.x + (Math.sin(camera.rotationZ) * _local9));
velocity.y = (velocity.y - (Math.cos(camera.rotationZ) * _local9));
};
};
if (right){
velocity.x = (velocity.x + (Math.cos(camera.rotationZ) * _local9));
velocity.y = (velocity.y + (Math.sin(camera.rotationZ) * _local9));
} else {
if (left){
velocity.x = (velocity.x - (Math.cos(camera.rotationZ) * _local9));
velocity.y = (velocity.y - (Math.sin(camera.rotationZ) * _local9));
};
};
_local12 = Math.sqrt(((velocity.x * velocity.x) + (velocity.y * velocity.y)));
if (_local12 > _local10){
velocity.x = (velocity.x * (_local10 / _local12));
velocity.y = (velocity.y * (_local10 / _local12));
};
moveSound.setMode((run) ? MoveSound.RUN : MoveSound.WALK);
};
} else {
_local13 = Math.pow(friction, _local2);
velocity.x = (velocity.x * _local13);
velocity.y = (velocity.y * _local13);
velocity.z = (velocity.z * (fly) ? _local13 : 1);
if (!fly){
moveSound.setMode(MoveSound.NONE);
};
};
if (!fly){
_local14 = (-(gravity) * _local2);
_local15 = scene.calculateCollision(coords, new Point3D(0, 0, _local14), radius);
if ((((((_local15 == null)) || ((_local15.normal.z <= 0)))) || ((Math.acos(_local15.normal.z) > maxAngle)))){
velocity.z = (velocity.z + _local14);
previousCollision = null;
} else {
if (previousCollision == null){
moveSound.setMode(MoveSound.WALK);
};
previousCollision = _local15;
};
};
if ((((((((((((velocity.x > coordsTreshold)) || ((velocity.x < -(coordsTreshold))))) || ((velocity.y > coordsTreshold)))) || ((velocity.y < -(coordsTreshold))))) || ((velocity.z > coordsTreshold)))) || ((velocity.z < -(coordsTreshold))))){
_local16 = Point3D.sum(coords, velocity);
do {
_local17 = scene.calculateCollision(coords, velocity, radius);
} while (_local17 == null);
coords.x = _local16.x;
coords.y = _local16.y;
coords.z = _local16.z;
if (((((((((((camera.x - coords.x) > coordsTreshold)) || (((camera.x - coords.x) < -(coordsTreshold))))) || (((camera.y - coords.y) > coordsTreshold)))) || (((camera.y - coords.y) < -(coordsTreshold))))) || ((fly) ? ((((camera.z - coords.z) > coordsTreshold)) || (((camera.z - coords.z) < -(coordsTreshold)))) : ((((((camera.z - coords.z) - stature) + radius) > coordsTreshold)) || (((((camera.z - coords.z) - stature) + radius) < -(coordsTreshold))))))){
camera.x = coords.x;
camera.y = coords.y;
camera.z = (coords.z + (fly) ? 0 : (stature - radius));
if (place == 3){
energy.rotationZ = -(Math.atan2((energy.x - coords.x), (energy.y - coords.y)));
};
checkPlace();
};
} else {
velocity.x = 0;
velocity.y = 0;
velocity.z = 0;
};
var _local8:Point3D = new Point3D(Math.cos(camera.rotationZ), Math.sin(camera.rotationZ), 0);
entranceAmbient.checkVolume(_local3, _local8);
bunkerAmbient.checkVolume(_local3, _local8);
reactorAmbient.checkVolume(_local3, _local8);
ventilator1.checkVolume(_local3, _local8);
ventilator2.checkVolume(_local3, _local8);
ventilator3.checkVolume(_local3, _local8);
screen.checkVolume(_local3, _local8);
if (fly){
moveSound.setMode(MoveSound.FLY, (velocity.length / maxVelocity));
};
checkQuality();
scene.calculate();
}
private function onMouseDown(_arg1:MouseEvent):void{
startDragCoords = MouseUtils.globalCoords(false);
currentDragCoords = startDragCoords.clone();
prevDragCoords = startDragCoords.clone();
startRotX = camera.rotationX;
startRotZ = camera.rotationZ;
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
}
private function onKeyDown(_arg1:KeyboardEvent):void{
var _local2:*;
switch (_arg1.keyCode){
case Keyboard.SHIFT:
run = true;
break;
case 70:
changeMove();
break;
case 84:
changeDebug();
break;
case 107:
case 187:
if (screenMultiplier < 10){
screenMultiplier++;
onResize(null);
};
break;
case 109:
case 189:
if (screenMultiplier > 1){
screenMultiplier--;
onResize(null);
};
break;
case 219:
addFOV((-3 / 20));
break;
case 221:
addFOV((3 / 20));
break;
case 87:
case Keyboard.UP:
up = true;
break;
case 83:
case Keyboard.DOWN:
down = true;
break;
case 65:
case Keyboard.LEFT:
left = true;
break;
case 68:
case Keyboard.RIGHT:
right = true;
break;
};
}
private function onKeyUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.SHIFT:
run = false;
break;
case 87:
case Keyboard.UP:
up = false;
break;
case 83:
case Keyboard.DOWN:
down = false;
break;
case 65:
case Keyboard.LEFT:
left = false;
break;
case 68:
case Keyboard.RIGHT:
right = false;
break;
};
}
private function checkQuality():void{
if (((((!((startDragCoords == null))) && (!(prevDragCoords.equals(currentDragCoords))))) || ((velocity.length > coordsTreshold)))){
if (qualityTimer != qualityTimerMax){
qualityTimer = qualityTimerMax;
stage.quality = StageQuality.LOW;
entrance.material.precision = precision;
screen.material.precision = precision;
passage.material.precision = precision;
bunkerMesh.material.precision = precision;
grid.material.precision = precision;
slope.material.precision = precision;
reactor.material1.precision = precision;
reactor.material2.precision = precision;
reactor.material3.precision = precision;
reactor.material4.precision = precision;
ventilation.material.precision = precision;
energy.material.precision = precision;
};
} else {
if (qualityTimer > 0){
qualityTimer--;
if (qualityTimer == 0){
stage.quality = StageQuality.HIGH;
entrance.material.precision = 1;
screen.material.precision = 5;
passage.material.precision = 1;
bunkerMesh.material.precision = 1;
grid.material.precision = 1;
slope.material.precision = 1;
reactor.material1.precision = 1;
reactor.material2.precision = 1;
reactor.material3.precision = 1;
reactor.material4.precision = 1;
ventilation.material.precision = 1;
energy.material.precision = 15;
};
};
};
}
private function checkPlace():void{
var _local1:Number;
if ((((coords.y > -1582.677)) && ((coords.y < -1062.992)))){
if ((((place == 1)) && ((coords.x < 117.645)))){
changePlace(2);
};
if ((((place == 2)) && ((coords.x > 246.789)))){
changePlace(1);
};
} else {
if ((((coords.y > 629.921)) && ((coords.y < 1574.803)))){
_local1 = ((-0.533399937770007 * coords.y) + 335.999822200021);
if ((((place == 2)) && ((camera.z <= (_local1 - 15))))){
changePlace(3);
} else {
if ((((place == 3)) && ((camera.z > (_local1 + 15))))){
changePlace(2);
};
};
};
};
}
private function onMouseWheel(_arg1:MouseEvent):void{
addFOV((_arg1.delta / 20));
}
public function loadNext():void{
loadingInfo.text = " ";
loadingCounter++;
if (loadingCounter < loadingSequence.length){
loadingInfo.text = loadingSequence[loadingCounter].load(loadNext);
};
}
}
}//package
import flash.text.*;
class TestInfo extends TextField {
private function TestInfo(){
autoSize = TextFieldAutoSize.LEFT;
selectable = false;
text = ("Alternativa3D 5.0\nDemo \"Bunker\"" + "\n");
setTextFormat(new TextFormat("Tahoma", 10, 12281395));
defaultTextFormat = new TextFormat("Tahoma", 10, 0x7F7F7F);
}
public function write(_arg1:String):void{
appendText(("\n" + _arg1));
}
}
Section 106
//Bunker_bmpFly (Bunker_bmpFly)
package {
import mx.core.*;
public class Bunker_bmpFly extends BitmapAsset {
}
}//package
Section 107
//Bunker_bmpLogo (Bunker_bmpLogo)
package {
import mx.core.*;
public class Bunker_bmpLogo extends BitmapAsset {
}
}//package
Section 108
//Bunker_bmpWalk (Bunker_bmpWalk)
package {
import mx.core.*;
public class Bunker_bmpWalk extends BitmapAsset {
}
}//package