Math.pow() == slow && new Array() == slow

Just yesterday I used the Math.pow() function in a project for work and realized, besides it being a function I rarely use, it’s also a pretty slow function. So i came up with a little algorithm that basicaly does the same thing a the Math.pow() function. Lucky me, I was using rounded values, so the custom function takes ints in the params and returns an int. It’s a lot faster, so I thought I would

Posted at 12am on 06/28/08 | no comments | Filed Under: actionscript 3.0, speed optimization read on

Bitmap face n°2, now with sound

Another particle exepriment, this time, each particle’s motion is set depending on the overall sound frequency level. I’m not sure how acurate this is, it’s actually probably very wrong, but doesn’t look too bad.

[swfobj src='content/actionscript/as3files/bitmapFaces/soundParticles.swf' width='400' height='400' title='soundParticles.swf']
Posted at 11pm on 06/19/08 | 2 comments | Filed Under: actionscript 3.0, bitmapData read on

Bitmap face n°1

Quick bitmapData experiment: load a photo, plot particles out using pixel positions from the image, and move the particles, and also add some filters to the bitmapData to make it look a little nicer.
When you click the stage, all the particles ease back to their original positions.

First experiment of a little series, be adding some sound pretty soon, and try and get more particles too.

1205 particles, runs pretty smoothly.

get the source

[swfobj src=’content/actionscript/as3files/bitmapFaces/getPixel.swf’ title=’getPixel.swf’ width=’400′

Posted at 4pm on 06/15/08 | 1 comment | Filed Under: actionscript 3.0, bitmapData read on

Stars and fake 3D

I’m not sure how interesting this is… just a quick and dirty little trick.
One thing though, the code isn’t optimized, and it might take up quite alot of resource.
Feel free to grab the source.

Lots of little star particles repeled by the mouse:

[swfobj src='content/actionscript/as3files/avoid.swf' title='avoid.swf' width='512' height='300']

more of little star particles repeled by the mouse, this in time in pseudo 3D:

[swfobj src='content/actionscript/as3files/avoid3D.swf' title='avoid3D.swf' width='512' height='300']
Posted at 5pm on 06/01/08 | no comments | Filed Under: actionscript 3.0 read on

About

I'm Dominic, I'm 21, and I like to code.
www.signalsondisplay.com
labs.signalsondisplay.com

View Dominique Dautheribes's profile on LinkedIn