[Brevity] ok my first try !
Keith Peters
kp at bit-101.com
Thu Jun 29 16:37:32 EDT 2006
Nice! Thanks. Maybe I'll have to make a Brevity contest. :)
kp
_____
From: Brevity-bounces at osflash.org [mailto:Brevity-bounces at osflash.org] On
Behalf Of ethan estes
Sent: Thursday, June 29, 2006 3:04 PM
To: Brevity at osflash.org
Subject: Re: [Brevity] ok my first try !
not optimized but i reworked david's piece a little. I wanted to see if i
could get an organic-like effect with just rectangles. It's a start but
still a little stiff. It seems to stutter on mine but there are some cool
moments if you watch it for a while.
// global vars:
var clips:Array;
var clips2:Array;
var theta : Number = 0 ;
function setup()
{
stageWidth = 400;
stageHeight = 400;
backgroundColor = 0x000000;
frameRate = 30;
}
function init()
{
// create the array
clips = new Array();
for(var i:int = 0; i < 66; i++)
{
// make the clips, position them, push them on the array
var clip:Rect = new Rect(random(400),random(500),0xFFFFFF);
clip.edgeBehavior = "bounce" ;
clip.randomPosition();
clip.alpha= 0.1 ;
clips.push(clip);
clip.vy=-clip.width/100 ;
clip.width=10*sin(13*theta-i)*cos(11*theta-i);
clip.move();
}
clips2 = new Array();
for(var k:int = 0; k< 22; k++)
{
// make the clips, position them, push them on the array
var clip2:Rect = new Rect(random(600),random(500),0x000000);
clip2.randomPosition();
clip2.edgeBehavior = "wrap" ;
clip2.alpha= 0.1 ;
clip2.vx=random(13)*sin(13*theta-k)*cos(11*theta-k);
clip2.move();
}
}
// start the loop
run();
}
On 6/27/06, Keith Peters <kp at bit-101.com> wrote:
Wow.
I can't tell you how cool it is to see that! The first piece I've seen done
by someone else, using Brevity. Kind of like seeing your baby grow up and go
off into the world. :) And something that I wouldn't have thought of doing.
Looking forward to see more!
Keith
_____
From: Brevity-bounces at osflash.org [mailto:Brevity-bounces at osflash.org] On
Behalf Of David Simon
Sent: Tuesday, June 27, 2006 3:19 PM
To: Brevity at osflash.org
Subject: [Brevity] ok my first try !
Not really optimised. Just playing with Numbers :-)
// global vars:
var clips:Array;
var theta : Number = 0 ;
function setup()
{
stageWidth = 400;
stageHeight = 400;
backgroundColor = 0x000000;
frameRate = 21;
}
function init()
{
// create the array
clips = new Array();
for(var i:int = 0; i < 80; i++)
{
// make the clips, position them, push them on the array
var clip:Circle = new Circle(40+random(80), randomColor());
clip.alpha= 0.1 ;
clip.edgeBehavior = "wrap" ;
clip.randomPosition();
clips.push(clip);
}
// start the loop
run();
}
function loop()
{
for(var i:int = 0; i <80; i++)
{
var clip:Circle = clips[i];
clip.vx=10*sin(13*theta-i)*cos(11*theta-i);
clip.vy=-clip.width /30 ;
clip.width=clip.height = 90+90*cos(3*theta-i)*sin(7*theta-i) ;
clip.move();
}
theta+=0.01;
}
_______________________________________________
Brevity mailing list
Brevity at osflash.org
http://osflash.org/mailman/listinfo/brevity_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/brevity_osflash.org/attachments/20060629/a553e308/attachment.htm
More information about the Brevity
mailing list