25lines entry - HELLO 3D
My old entry for the 25-Line ActionScript Contest.
/**
* Copyright Bruce_Jawn ( http://wonderfl.net/user/Bruce_Jawn )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9Exl
*/
package
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.geom.*;
[SWF(width=550,height=400,backgroundColor=0x000000,frameRate=12)]
public class Hello3D extends Sprite
{
public function Hello3D():void
{
/**
* 25-Line ActionScript Contest Entry
*
* Project: HELLO 3D !
* Author: Bruce Jawn (http://bruce-lab.blogspot.com/)
* Date: 2009-2-14
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
// 3 free lines! Alter the parameters of the following lines or remove them.
// Do not substitute other code for the three lines in this section
//[SWF(width=550, height=400, backgroundColor=0x000000, frameRate=12)]
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
// 25 lines begins here!
var vtx:Array = [{x: 71, y: -121, z: 0}, {x: 72, y: -126, z: 0}, {x: 76, y: -121, z: 0}, {x: 51, y: -121, z: -50}, {x: 51, y: -126, z: -51}, {x: 54, y: -121, z: -54}, {x: 1, y: -121, z: -71},
{x: 1, y: -126, z: -71}, {x: 1, y: -121, z: -76}, {x: -50, y: -121, z: -50}, {x: -49, y: -126, z: -51}, {x: -52, y: -121, z: -54}, {x: -69, y: -121, z: 0}, {x: -69, y: -126, z: 0}, {x: -74, y: -
121, z: 0}, {x: -49, y: -121, z: 49}, {x: -49, y: -126, z: 49}, {x: -52, y: -121, z: 53}, {x: 1, y: -121, z: 70}, {x: 1, y: -126, z: 70}, {x: 1, y: -121, z: 75}, {x: 51, y: -121, z: 49}, {x: 51, y: -
126, z: 49}, {x: 54, y: -121, z: 53}, {x: 94, y: -81, z: 0}, {x: 102, y: -45, z: 0}, {x: 67, y: -81, z: -66}, {x: 72, y: -45, z: -72}, {x: 1, y: -81, z: -93}, {x: 1, y: -45, z: -101}, {x: -65, y: -81, z: -
66}, {x: -70, y: -45, z: -72}, {x: -92, y: -81, z: 0}, {x: -99, y: -45, z: 0}, {x: -65, y: -81, z: 65}, {x: -70, y: -45, z: 71}, {x: 1, y: -81, z: 92}, {x: 1, y: -45, z: 100}, {x: 67, y: -81, z: 65},
{x: 72, y: -45, z: 71}, {x: 89, y: -19, z: 0}, {x: 76, y: -7, z: 0}, {x: 63, y: -19, z: -63}, {x: 54, y: -7, z: -54}, {x: 1, y: -19, z: -89}, {x: 1, y: -7, z: -76}, {x: -61, y: -19, z: -63}, {x: -52, y: -
7, z: -54}, {x: -87, y: -19, z: 0}, {x: -74, y: -7, z: 0}, {x: -61, y: -19, z: 62}, {x: -52, y: -7, z: 53}, {x: 1, y: -19, z: 87}, {x: 1, y: -7, z: 75}, {x: 63, y: -19, z: 62}, {x: 54, y: -7, z: 53},
{x: 66, y: -2, z: 0}, {x: 1, y: 0, z: 0}, {x: 47, y: -2, z: -46}, {x: 1, y: -2, z: -65}, {x: -44, y: -2, z: -46}, {x: -63, y: -2, z: 0}, {x: -44, y: -2, z: 45}, {x: 1, y: -2, z: 64}, {x: 47, y: -2, z: 45}, {x: -
79, y: -102, z: 0}, {x: -120, y: -100, z: 0}, {x: -135, y: -90, z: 0}, {x: -77, y: -108, z: -12}, {x: -126, y: -105, z: -12}, {x: -142, y: -90, z: -12}, {x: -74, y: -113, z: 0}, {x: -131, y: -
110, z: 0}, {x: -150, y: -90, z: 0}, {x: -77, y: -108, z: 10}, {x: -126, y: -105, z: 10}, {x: -142, y: -90, z: 10}, {x: -127, y: -68, z: 0}, {x: -99, y: -45, z: 0}, {x: -131, y: -63, z: -12}, {x: -97, y:
-37, z: -12}, {x: -136, y: -58, z: 0}, {x: -94, y: -30, z: 0}, {x: -131, y: -63, z: 10}, {x: -97, y: -37, z: 10}, {x: 87, y: -72, z: 0}, {x: 121, y: -90, z: 0}, {x: 137, y: -121, z: 0}, {x: 87, y: -51, z: -
25}, {x: 129, y: -81, z: -17}, {x: 152, y: -121, z: -10}, {x: 87, y: -30, z: 0}, {x: 136, y: -72, z: 0}, {x: 167, y: -121, z: 0}, {x: 87, y: -51, z: 24}, {x: 129, y: -81, z: 16}, {x: 152, y: -121, z: 8},
{x: 143, y: -124, z: 0}, {x: 142, y: -121, z: 0}, {x: 159, y: -124, z: -8}, {x: 152, y: -121, z: -6}, {x: 174, y: -125, z: 0}, {x: 162, y: -121, z: 0}, {x: 159, y: -124, z: 6}, {x: 152, y: -121, z: 4},
{x: 1, y: -159, z: 0}, {x: 17, y: -150, z: 0}, {x: 11, y: -136, z: 0}, {x: 12, y: -150, z: -12}, {x: 8, y: -136, z: -7}, {x: 1, y: -150, z: -17}, {x: 1, y: -136, z: -10}, {x: -10, y: -150, z: -12}, {x: -
6, y: -136, z: -7}, {x: -15, y: -150, z: 0}, {x: -8, y: -136, z: 0}, {x: -10, y: -150, z: 10}, {x: -6, y: -136, z: 6}, {x: 1, y: -150, z: 15}, {x: 1, y: -136, z: 9}, {x: 12, y: -150, z: 10}, {x: 8, y: -
136, z: 6}, {x: 42, y: -128, z: 0}, {x: 66, y: -121, z: 0}, {x: 30, y: -128, z: -30}, {x: 47, y: -121, z: -47}, {x: 1, y: -128, z: -42}, {x: 1, y: -121, z: -66}, {x: -28, y: -128, z: -30}, {x: -45, y: -
121, z: -47}, {x: -40, y: -128, z: 0}, {x: -64, y: -121, z: 0}, {x: -28, y: -128, z: 28}, {x: -45, y: -121, z: 45}, {x: 1, y: -128, z: 40}, {x: 1, y: -121, z: 64}, {x: 30, y: -128, z: 28}, {x: 47, y: -
121, z: 45}];
var fcs:Array = [[0, 3, 4], [4, 1, 0], [1, 4, 5], [5, 2, 1], [3, 6, 7], [7, 4, 3], [4, 7, 8], [8, 5, 4], [6, 9, 10], [10, 7, 6], [7, 10, 11], [11, 8, 7], [9, 12, 13], [13, 10, 9], [10, 13, 14],
[14, 11, 10], [12, 15, 16], [16, 13, 12], [13, 16, 17], [17, 14, 13], [15, 18, 19], [19, 16, 15], [16, 19, 20], [20, 17, 16], [18, 21, 22], [22, 19, 18], [19, 22, 23], [23, 20, 19], [21, 0, 1],
[1, 22, 21], [22, 1, 2], [2, 23, 22], [2, 5, 26], [26, 24, 2], [24, 26, 27], [27, 25, 24], [5, 8, 28], [28, 26, 5], [26, 28, 29], [29, 27, 26], [8, 11, 30], [30, 28, 8], [28, 30, 31], [31, 29, 28],
[11, 14, 32], [32, 30, 11], [30, 32, 33], [33, 31, 30], [14, 17, 34], [34, 32, 14], [32, 34, 35], [35, 33, 32], [17, 20, 36], [36, 34, 17], [34, 36, 37], [37, 35, 34], [20, 23, 38], [38, 36, 20],
[36, 38, 39], [39, 37, 36], [23, 2, 24], [24, 38, 23], [38, 24, 25], [25, 39, 38], [25, 27, 42], [42, 40, 25], [40, 42, 43], [43, 41, 40], [27, 29, 44], [44, 42, 27], [42, 44, 45], [45, 43, 42],
[29, 31, 46], [46, 44, 29], [44, 46, 47], [47, 45, 44], [31, 33, 48], [48, 46, 31], [46, 48, 49], [49, 47, 46], [33, 35, 50], [50, 48, 33], [48, 50, 51], [51, 49, 48], [35, 37, 52], [52, 50, 35],
[50, 52, 53], [53, 51, 50], [37, 39, 54], [54, 52, 37], [52, 54, 55], [55, 53, 52], [39, 25, 40], [40, 54, 39], [54, 40, 41], [41, 55, 54], [41, 43, 58], [58, 56, 41], [56, 58, 57], [57, 57, 56],
[43, 45, 59], [59, 58, 43], [58, 59, 57], [57, 57, 58], [45, 47, 60], [60, 59, 45], [59, 60, 57], [57, 57, 59], [47, 49, 61], [61, 60, 47], [60, 61, 57], [57, 57, 60], [49, 51, 62], [62, 61, 49],
[61, 62, 57], [57, 57, 61], [51, 53, 63], [63, 62, 51], [62, 63, 57], [57, 57, 62], [53, 55, 64], [64, 63, 53], [63, 64, 57], [57, 57, 63], [55, 41, 56], [56, 64, 55], [64, 56, 57], [57, 57, 64],
[65, 68, 69], [69, 66, 65], [66, 69, 70], [70, 67, 66], [68, 71, 72], [72, 69, 68], [69, 72, 73], [73, 70, 69], [71, 74, 75], [75, 72, 71], [72, 75, 76], [76, 73, 72], [74, 65, 66], [66, 75, 74],
[75, 66, 67], [67, 76, 75], [67, 70, 79], [79, 77, 67], [77, 79, 80], [80, 78, 77], [70, 73, 81], [81, 79, 70], [79, 81, 82], [82, 80, 79], [73, 76, 83], [83, 81, 73], [81, 83, 84], [84, 82, 81],
[76, 67, 77], [77, 83, 76], [83, 77, 78], [78, 84, 83], [85, 88, 89], [89, 86, 85], [86, 89, 90], [90, 87, 86], [88, 91, 92], [92, 89, 88], [89, 92, 93], [93, 90, 89], [91, 94, 95], [95, 92, 91],
[92, 95, 96], [96, 93, 92], [94, 85, 86], [86, 95, 94], [95, 86, 87], [87, 96, 95], [87, 90, 99], [99, 97, 87], [97, 99, 100], [100, 98, 97], [90, 93, 101], [101, 99, 90], [99, 101, 102],
[102, 100, 99], [93, 96, 103], [103, 101, 93], [101, 103, 104], [104, 102, 101], [96, 87, 97], [97, 103, 96], [103, 97, 98], [98, 104, 103], [105, 105, 108], [108, 106, 105], [106, 108, 109],
[109, 107, 106], [105, 105, 110], [110, 108, 105], [108, 110, 111], [111, 109, 108], [105, 105, 112], [112, 110, 105], [110, 112, 113], [113, 111, 110], [105, 105, 114], [114, 112, 105],
[112, 114, 115], [115, 113, 112], [105, 105, 116], [116, 114, 105], [114, 116, 117], [117, 115, 114], [105, 105, 118], [118, 116, 105], [116, 118, 119], [119, 117, 116], [105, 105, 120],
[120, 118, 105], [118, 120, 121], [121, 119, 118], [105, 105, 106], [106, 120, 105], [120, 106, 107], [107, 121, 120], [107, 109, 124], [124, 122, 107], [122, 124, 125], [125, 123, 122],
[109, 111, 126], [126, 124, 109], [124, 126, 127], [127, 125, 124], [111, 113, 128], [128, 126, 111], [126, 128, 129], [129, 127, 126], [113, 115, 130], [130, 128, 113], [128, 130, 131],
[131, 129, 128], [115, 117, 132], [132, 130, 115], [130, 132, 133], [133, 131, 130], [117, 119, 134], [134, 132, 117], [132, 134, 135], [135, 133, 132], [119, 121, 136], [136, 134, 119],
[134, 136, 137], [137, 135, 134], [121, 107, 122], [122, 136, 121], [136, 122, 123], [123, 137, 136]];
var tVtx:Array = [{x: 2.0, y: -1.0}, {x: 2.0, y: -0.95}, {x: 2.0, y: -0.9}, {x: 1.5, y: -1.0}, {x: 1.5, y: -0.95}, {x: 1.5, y: -0.9}, {x: 1.0, y: -1.0}, {x: 1.0, y: -0.95}, {x: 1.0, y: -0.9},
{x: 1.0, y: -1.0}, {x: 1.0, y: -0.95}, {x: 1.0, y: -0.9}, {x: 0.5, y: -1.0}, {x: 0.5, y: -0.95}, {x: 0.5, y: -0.9}, {x: 0.0, y: -1.0}, {x: 0.0, y: -0.95}, {x: 0.0, y: -0.9}, {x: 2.0, y: -1.0},
{x: 2.0, y: -0.95}, {x: 2.0, y: -0.9}, {x: 1.5, y: -1.0}, {x: 1.5, y: -0.95}, {x: 1.5, y: -0.9}, {x: 1.0, y: -1.0}, {x: 1.0, y: -0.95}, {x: 1.0, y: -0.9}, {x: 1.0, y: -1.0}, {x: 1.0, y: -0.95},
{x: 1.0, y: -0.9}, {x: 0.5, y: -1.0}, {x: 0.5, y: -0.95}, {x: 0.5, y: -0.9}, {x: 0.0, y: -1.0}, {x: 0.0, y: -0.95}, {x: 0.0, y: -0.9}, {x: 2.0, y: -0.9}, {x: 2.0, y: -0.45}, {x: 2.0, y: 0.0},
{x: 1.5, y: -0.9}, {x: 1.5, y: -0.45}, {x: 1.5, y: 0.0}, {x: 1.0, y: -0.9}, {x: 1.0, y: -0.45}, {x: 1.0, y: 0.0}, {x: 1.0, y: -0.9}, {x: 1.0, y: -0.45}, {x: 1.0, y: 0.0}, {x: 0.5, y: -0.9},
{x: 0.5, y: -0.45}, {x: 0.5, y: 0.0}, {x: 0.0, y: -0.9}, {x: 0.0, y: -0.45}, {x: 0.0, y: 0.0}, {x: 2.0, y: -0.9}, {x: 2.0, y: -0.45}, {x: 2.0, y: 0.0}, {x: 1.5, y: -0.9}, {x: 1.5, y: -0.45},
{x: 1.5, y: 0.0}, {x: 1.0, y: -0.9}, {x: 1.0, y: -0.45}, {x: 1.0, y: 0.0}, {x: 1.0, y: -0.9}, {x: 1.0, y: -0.45}, {x: 1.0, y: 0.0}, {x: 0.5, y: -0.9}, {x: 0.5, y: -0.45}, {x: 0.5, y: 0.0},
{x: 0.0, y: -0.9}, {x: 0.0, y: -0.45}, {x: 0.0, y: 0.0}, {x: 2.0, y: 0.0}, {x: 2.0, y: 0.3}, {x: 2.0, y: 0.6}, {x: 1.5, y: 0.0}, {x: 1.5, y: 0.3}, {x: 1.5, y: 0.6}, {x: 1.0, y: 0.0},
{x: 1.0, y: 0.3}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.3}, {x: 1.0, y: 0.6}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.3}, {x: 0.5, y: 0.6}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.3}, {x: 0.0, y: 0.6},
{x: 2.0, y: 0.0}, {x: 2.0, y: 0.3}, {x: 2.0, y: 0.6}, {x: 1.5, y: 0.0}, {x: 1.5, y: 0.3}, {x: 1.5, y: 0.6}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.3}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.3},
{x: 1.0, y: 0.6}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.3}, {x: 0.5, y: 0.6}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.3}, {x: 0.0, y: 0.6}, {x: 2.0, y: 0.6}, {x: 2.0, y: 0.8}, {x: 2.0, y: 1.0}, {x: 1.5, y: 0.6},
{x: 1.5, y: 0.8}, {x: 1.5, y: 1.0}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.8}, {x: 1.0, y: 1.0}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.8}, {x: 1.0, y: 1.0}, {x: 0.5, y: 0.6}, {x: 0.5, y: 0.8}, {x: 0.5, y: 1.0},
{x: 0.0, y: 0.6}, {x: 0.0, y: 0.8}, {x: 0.0, y: 1.0}, {x: 2.0, y: 0.6}, {x: 2.0, y: 0.8}, {x: 2.0, y: 1.0}, {x: 1.5, y: 0.6}, {x: 1.5, y: 0.8}, {x: 1.5, y: 1.0}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.8},
{x: 1.0, y: 1.0}, {x: 1.0, y: 0.6}, {x: 1.0, y: 0.8}, {x: 1.0, y: 1.0}, {x: 0.5, y: 0.6}, {x: 0.5, y: 0.8}, {x: 0.5, y: 1.0}, {x: 0.0, y: 0.6}, {x: 0.0, y: 0.8}, {x: 0.0, y: 1.0}, {x: 1.0, y: 0.0},
{x: 1.0, y: 0.25}, {x: 1.0, y: 0.5}, {x: 0.75, y: 0.0}, {x: 0.75, y: 0.25}, {x: 0.75, y: 0.5}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.25}, {x: 0.5, y: 0.5}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.25},
{x: 0.5, y: 0.5}, {x: 0.25, y: 0.0}, {x: 0.25, y: 0.25}, {x: 0.25, y: 0.5}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.25}, {x: 0.0, y: 0.5}, {x: 1.0, y: 0.5}, {x: 1.0, y: 0.75}, {x: 1.0, y: 1.0},
{x: 0.75, y: 0.5}, {x: 0.75, y: 0.75}, {x: 0.75, y: 1.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 0.75}, {x: 0.5, y: 1.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 0.75}, {x: 0.5, y: 1.0}, {x: 0.25, y: 0.5},
{x: 0.25, y: 0.75}, {x: 0.25, y: 1.0}, {x: 0.0, y: 0.5}, {x: 0.0, y: 0.75}, {x: 0.0, y: 1.0}, {x: 0.5, y: 1.0}, {x: 0.5, y: 0.55}, {x: 0.5, y: 0.1}, {x: 0.75, y: 1.0}, {x: 0.75, y: 0.55},
{x: 0.75, y: 0.1}, {x: 1.0, y: 1.0}, {x: 1.0, y: 0.55}, {x: 1.0, y: 0.1}, {x: 0.0, y: 1.0}, {x: 0.0, y: 0.55}, {x: 0.0, y: 0.1}, {x: 0.25, y: 1.0}, {x: 0.25, y: 0.55}, {x: 0.25, y: 0.1},
{x: 0.5, y: 1.0}, {x: 0.5, y: 0.55}, {x: 0.5, y: 0.1}, {x: 0.5, y: 0.1}, {x: 0.5, y: 0.05}, {x: 0.5, y: 0.0}, {x: 0.75, y: 0.1}, {x: 0.75, y: 0.05}, {x: 0.75, y: 0.0}, {x: 1.0, y: 0.1},
{x: 1.0, y: 0.05}, {x: 1.0, y: 0.0}, {x: 0.0, y: 0.1}, {x: 0.0, y: 0.05}, {x: 0.0, y: 0.0}, {x: 0.25, y: 0.1}, {x: 0.25, y: 0.05}, {x: 0.25, y: 0.0}, {x: 0.5, y: 0.1}, {x: 0.5, y: 0.05},
{x: 0.5, y: 0.0}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.5}, {x: 1.0, y: 1.0}, {x: 0.75, y: 0.0}, {x: 0.75, y: 0.5}, {x: 0.75, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0},
{x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.25, y: 0.0}, {x: 0.25, y: 0.5}, {x: 0.25, y: 1.0}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.5}, {x: 0.0, y: 1.0}, {x: 1.0, y: 0.0},
{x: 1.0, y: 0.5}, {x: 1.0, y: 1.0}, {x: 0.75, y: 0.0}, {x: 0.75, y: 0.5}, {x: 0.75, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5},
{x: 0.5, y: 1.0}, {x: 0.25, y: 0.0}, {x: 0.25, y: 0.5}, {x: 0.25, y: 1.0}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.5}, {x: 0.0, y: 1.0}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.5}, {x: 1.0, y: 1.0},
{x: 0.75, y: 0.0}, {x: 0.75, y: 0.5}, {x: 0.75, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.25, y: 0.0},
{x: 0.25, y: 0.5}, {x: 0.25, y: 1.0}, {x: 0.0, y: 0.0}, {x: 0.0, y: 0.5}, {x: 0.0, y: 1.0}, {x: 1.0, y: 0.0}, {x: 1.0, y: 0.5}, {x: 1.0, y: 1.0}, {x: 0.75, y: 0.0}, {x: 0.75, y: 0.5},
{x: 0.75, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.5, y: 0.0}, {x: 0.5, y: 0.5}, {x: 0.5, y: 1.0}, {x: 0.25, y: 0.0}, {x: 0.25, y: 0.5}, {x: 0.25, y: 1.0},
{x: 0.0, y: 0.0}, {x: 0.0, y: 0.5}, {x: 0.0, y: 1.0}];
var tFcs:Array = [[0, 3, 4], [4, 1, 0], [1, 4, 5], [5, 2, 1], [3, 6, 7], [7, 4, 3], [4, 7, 8], [8, 5, 4], [9, 12, 13], [13, 10, 9], [10, 13, 14], [14, 11, 10], [12, 15, 16], [16, 13, 12],
[13, 16, 17], [17, 14, 13], [18, 21, 22], [22, 19, 18], [19, 22, 23], [23, 20, 19], [21, 24, 25], [25, 22, 21], [22, 25, 26], [26, 23, 22], [27, 30, 31], [31, 28, 27], [28, 31, 32], [32, 29, 28],
[30, 33, 34], [34, 31, 30], [31, 34, 35], [35, 32, 31], [36, 39, 40], [40, 37, 36], [37, 40, 41], [41, 38, 37], [39, 42, 43], [43, 40, 39], [40, 43, 44], [44, 41, 40], [45, 48, 49], [49, 46, 45],
[46, 49, 50], [50, 47, 46], [48, 51, 52], [52, 49, 48], [49, 52, 53], [53, 50, 49], [54, 57, 58], [58, 55, 54], [55, 58, 59], [59, 56, 55], [57, 60, 61], [61, 58, 57], [58, 61, 62], [62, 59, 58],
[63, 66, 67], [67, 64, 63], [64, 67, 68], [68, 65, 64], [66, 69, 70], [70, 67, 66], [67, 70, 71], [71, 68, 67], [72, 75, 76], [76, 73, 72], [73, 76, 77], [77, 74, 73], [75, 78, 79], [79, 76, 75],
[76, 79, 80], [80, 77, 76], [81, 84, 85], [85, 82, 81], [82, 85, 86], [86, 83, 82], [84, 87, 88], [88, 85, 84], [85, 88, 89], [89, 86, 85], [90, 93, 94], [94, 91, 90], [91, 94, 95], [95, 92, 91],
[93, 96, 97], [97, 94, 93], [94, 97, 98], [98, 95, 94], [99, 102, 103], [103, 100, 99], [100, 103, 104], [104, 101, 100], [102, 105, 106], [106, 103, 102], [103, 106, 107], [107, 104, 103],
[108, 111, 112], [112, 109, 108], [109, 112, 113], [113, 110, 109], [111, 114, 115], [115, 112, 111], [112, 115, 116], [116, 113, 112], [117, 120, 121], [121, 118, 117], [118, 121, 122],
[122, 119, 118], [120, 123, 124], [124, 121, 120], [121, 124, 125], [125, 122, 121], [126, 129, 130], [130, 127, 126], [127, 130, 131], [131, 128, 127], [129, 132, 133], [133, 130, 129],
[130, 133, 134], [134, 131, 130], [135, 138, 139], [139, 136, 135], [136, 139, 140], [140, 137, 136], [138, 141, 142], [142, 139, 138], [139, 142, 143], [143, 140, 139], [144, 147, 148],
[148, 145, 144], [145, 148, 149], [149, 146, 145], [147, 150, 151], [151, 148, 147], [148, 151, 152], [152, 149, 148], [153, 156, 157], [157, 154, 153], [154, 157, 158], [158, 155, 154],
[156, 159, 160], [160, 157, 156], [157, 160, 161], [161, 158, 157], [162, 165, 166], [166, 163, 162], [163, 166, 167], [167, 164, 163], [165, 168, 169], [169, 166, 165], [166, 169, 170],
[170, 167, 166], [171, 174, 175], [175, 172, 171], [172, 175, 176], [176, 173, 172], [174, 177, 178], [178, 175, 174], [175, 178, 179], [179, 176, 175], [180, 183, 184], [184, 181, 180],
[181, 184, 185], [185, 182, 181], [183, 186, 187], [187, 184, 183], [184, 187, 188], [188, 185, 184], [189, 192, 193], [193, 190, 189], [190, 193, 194], [194, 191, 190], [192, 195, 196],
[196, 193, 192], [193, 196, 197], [197, 194, 193], [198, 201, 202], [202, 199, 198], [199, 202, 203], [203, 200, 199], [201, 204, 205], [205, 202, 201], [202, 205, 206], [206, 203, 202],
[207, 210, 211], [211, 208, 207], [208, 211, 212], [212, 209, 208], [210, 213, 214], [214, 211, 210], [211, 214, 215], [215, 212, 211], [216, 219, 220], [220, 217, 216], [217, 220, 221],
[221, 218, 217], [219, 222, 223], [223, 220, 219], [220, 223, 224], [224, 221, 220], [225, 228, 229], [229, 226, 225], [226, 229, 230], [230, 227, 226], [228, 231, 232], [232, 229, 228],
[229, 232, 233], [233, 230, 229], [234, 237, 238], [238, 235, 234], [235, 238, 239], [239, 236, 235], [237, 240, 241], [241, 238, 237], [238, 241, 242], [242, 239, 238], [243, 246, 247],
[247, 244, 243], [244, 247, 248], [248, 245, 244], [246, 249, 250], [250, 247, 246], [247, 250, 251], [251, 248, 247], [252, 255, 256], [256, 253, 252], [253, 256, 257], [257, 254, 253],
[255, 258, 259], [259, 256, 255], [256, 259, 260], [260, 257, 256], [261, 264, 265], [265, 262, 261], [262, 265, 266], [266, 263, 262], [264, 267, 268], [268, 265, 264], [265, 268, 269],
[269, 266, 265], [270, 273, 274], [274, 271, 270], [271, 274, 275], [275, 272, 271], [273, 276, 277], [277, 274, 273], [274, 277, 278], [278, 275, 274], [279, 282, 283], [283, 280, 279],
[280, 283, 284], [284, 281, 280], [282, 285, 286], [286, 283, 282], [283, 286, 287], [287, 284, 283]];
var texture:TextField = new TextField();
addEventListener(Event.ENTER_FRAME, function(event:Event):void
{
var bitmap:BitmapData = new BitmapData(512, 512, true, 0x0);
for each (var pro in[["width", 512], ["height", 512], ["filters", [new BevelFilter()]], ["defaultTextFormat", new TextFormat("_sans", 64, 0x00ff00, true)], ["text", (Math.random() * 0xffffff).toString(2) + (Math.random() * 0xffffff).toString(2) + (Math.random() * 0xffffff).toString(2) + (Math.random() * 0xffffff).toString(2)], ["wordWrap", true]])
texture[pro[0]] = pro[1];
bitmap.draw(texture);
var data:Array = [new Vector.<Number>(), new Vector.<Number>()];
for (var i:int = 0; i < fcs.length; i++)
{
for (var j:int = 0; j < 3; j++)
{
var temp = rotateXY(vtx[fcs[i][j]]);
data[0].push(temp.x * temp.t, temp.y * temp.t);
data[1].push(tVtx[tFcs[i][j]].x, tVtx[tFcs[i][j]].y, temp.t);
}
}
graphics.clear();
graphics.beginBitmapFill(bitmap);
graphics.drawTriangles(data[0], null, data[1], "positive");
});
function rotateXY(vtx)
{
var ca:Number = Math.cos(mouseY * (Math.PI / 180));
var sa:Number = Math.sin(mouseY * (Math.PI / 180));
var cb:Number = Math.cos(mouseX * (Math.PI / 180));
var sb:Number = Math.sin(mouseX * (Math.PI / 180));
var rz:Number = vtx.y * sa + vtx.z * ca;
return ({x: ((vtx.x) * cb + rz * sb) + 275, y: (vtx.y * ca - vtx.z * sa) + 200, t: 500 / (500 + (vtx.x) * -sb + rz * cb)});
};
// 25 lines ends here!
} //end of function
} //end of class
} //end of package