This doesn't have much to do with E8.. but it is vaguely inspired by it...
View the demo... (source code is below)
-
var hw:Number = stage.stageWidth / 2;
-
var hh:Number = stage.stageHeight / 2;
-
-
var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight, false, 0x333333);
-
addChild(new Bitmap(canvas));
-
var vector:Shape = Shape(addChild(new Shape()));
-
-
// contrast
-
var cm:ColorMatrixFilter = new ColorMatrixFilter([2.6,0,0,0,-101.6,0,2.6,0,0,-101.6,0,0,2.6,0,-101.6,0,0,0,1,0]);
-
filters = [cm];
-
-
var over:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight, false, 0x333333);
-
var frm:Bitmap = Bitmap(addChild(new Bitmap(over)));
-
-
frm.blendMode = BlendMode.OVERLAY;
-
-
var dotNum:int = 250;
-
var dotConnected:int = 0;
-
var curr:int = 0;
-
var prevConnected:int = -1;
-
var dots:Vector.<Point> = new Vector.<Point>(dotNum, true);
-
-
// consider altering this value manually
-
var step:Number = Math.random()*10
-
-
var theta:Number = -.5234;
-
for (var i:int= 0; i <dotNum; i++){
-
var r:Number = 280
-
theta += step;
-
var xp:Number = hw + r * Math.cos(theta);
-
var yp:Number = hh + r * Math.sin(theta);
-
dots[i] = new Point(xp, yp);
-
}
-
-
var col:uint = 0xFFFFFF;
-
var a:Point, b:Point;
-
var connections:int = 0;
-
-
var txt:TextField = TextField(addChild(new TextField()));
-
txt.defaultTextFormat = new TextFormat("_sans", 12);
-
txt.textColor = 0x555555, txt.x = 10, txt.y = 10;
-
txt.autoSize = "left";
-
txt.text = step.toString();
-
-
addEventListener(Event.ENTER_FRAME, onLoop);
-
function onLoop(evt:Event):void{
-
-
over.applyFilter(canvas, over.rect, new Point(0,0), new BlurFilter(10,10, 1));
-
-
for (var i:int = 0; i<100; i++){
-
if (dotConnected <dotNum - 1){
-
if (prevConnected != dotConnected){
-
a = dots[dotConnected];
-
}
-
prevConnected = dotConnected;
-
b = dots[curr];
-
curr++;
-
-
if (a != b){
-
connections++;
-
vector.graphics.clear();
-
vector.graphics.lineStyle(0,col,0.05);
-
vector.graphics.moveTo(a.x, a.y);
-
vector.graphics.lineTo(b.x, b.y);
-
canvas.draw(vector);
-
}
-
if (curr> dotNum - 1){
-
curr = 0;
-
dotConnected++;
-
col =[0,0xFFFFFF][int(Math.random()*2)];
-
}
-
}else{
-
break;
-
trace("done");
-
removeEventListener(Event.ENTER_FRAME, onLoop);
-
}
-
}
-
}