Bitmap Data in Html/Javascript!

August 5th, 2008

Holy bruce wayne’s ghost!

Here’s two little examples i’ve got for bitmap data in html (eg the canvas tag), just discovered it but it’s great, very slow but great



a slow tunnel raytracer (by my good friend zombywuf who I learnt all about this little tag from)



a slow mandlebrot fractally generator

I see some good uses for this little element, obviously it’s alot slower than flashes eviqivent but i’m sure that can be easily fixed in future browser releases

Maybe it’s be over used, but for simple blurs brightiness filters it could be very nice, just don’t expected papervision imported over anytime soon

Update:

wow found this
seems like this whole canvas thing has been around for a while

Sound Asset Managers

August 4th, 2008

Here’s a little sound asset manager i created for t in the park, another one of those features that was created, not used, but will be very useful for future projects

basically it does three things

1. allow you to set a background sound track and for that to be changable with a nice fade
2. easily (one line) add press/release and rollover noises to a button
3. write an xml file to manage what mp3 goes to what button on what event

Here’s a sample of it merged into the standard swfAddress example
(their should be 4 page each with a annoying and badly choosen bits of completely unlicensed programmer sound)

source here

AI Bots Experiments (Revisited in AS3)

July 16th, 2008

As stated in the last post, i’ve finally finished the T in the Park Channel T flash application, which any second should be going live… any second… any second at all

It was a great project working with good friends and collegues, learning the wonders of away3D, flcikr, swfAddress, and all those nice wee quirks of the flash IDE

One fo my afvourate features unfortunately not ready for release was the bot crowd, the idea was these would wander around in a 3d environment, surrounded by the various music stages of T in the Park, when you rolled over the stage the little bots would swarm towards it, a nice cute effect.

I got pretty close but ultimately what works well for animals, fishes, and mircobes is really hard to get realistic for thinking wandering humans, and with the deadline looming that was that

simple as3 bots

slightly more complex as3 bots

even more complex as3 in 3d pretendign to be humans badly

source

link to AS2 bots

Ps

I’ve now made it a promise to myself to give flex a try

Flash 3D on the Cheap

July 14th, 2008

Many years ago now I bumped into a then young and vibratant little open source project called Sandy.

One of the many cool classes is called DistortImage, it’s been written about many times, and over the year I’ve used it many times by it’s self without the rest of sandy to give rather impressive 3d transitions.

Basically it allows you to do non-alfine transforms in flash and it’s been about for since flash 7, that’s to distort a bitmap between any 4 points on the screen,

best part is it’s only adds 2k to your swf size, compared to away3d which is closer to 300k, so it’s even usable on preloaders and such.

AS2 examples from sandy
link

Some AS3 Examples I knocked up for this year’s T in the Park website
Bouncing wall example
backwards flip
forward flip

Note the as3 version of the code has a slight issue whether the cpu load jumps if the control points intersect

My AS3 Examples Source
source

ps
yes i will eventunely move away from the timeline… it’s just i’ve spent the last few years being rather attached to it, it’s such a shame it’s become a liability in as3

Mash 2008 - BBC Super Search

June 22nd, 2008

Had an idea called bbc super search for mashed 2008 this year,

1. I made a web scraper which successfully crawled and extracted the metadata
on all the 4000 or so root folders on the bbc web site,
2. created a real-time client side search app for them
3. did another one for the iplayer metadata,
4. made a tag cloud version,
5. then put the tag cloud into 3d,
6. then made a end screen in 3d :)

Unfortunately during the actual presentation i only got onto the tag cloud when i ran out of time and Sylvester McCoy
(yes the ex-doctor who) dragged me off the podium with his umbrella handle…
Still great laugh good fun,

Alas here’s links and source of what was achieved, I didn’t even get a chance to thank Cris who parsed and did the proportional weighing of the tag cloud for me…

Sorry Cris, anyway here’s our 24 hour project it’s it’s full glory

My Examples and Source

not a bad bunch if i don’t say so myself, considering we only had 24 hours

BBC Screen Scraper

http://extdev.bbc.co.uk/scotland/test/bbc_super_search/screen_scraper.html

BBC Super Search

http://extdev.bbc.co.uk/scotland/test/bbc_super_search/controller_bbc_co_uk_app.html

iPlayer Super Search

http://extdev.bbc.co.uk/scotland/test/bbc_super_search/controller_iplayer_bbc_co_uk_app.html

Non-3d Tag Cloud (Takes a while to load)

http://extdev.bbc.co.uk/scotland/test/bbc_super_search/controller_tag_clouds_app.html

3d Tag Cloud (Takes a while to load, try searching ‘teenager’!)

http://extdev.bbc.co.uk/scotland/test/bbc_super_search/controller_3dtag_clouds_app.html

End Screen
http://extdev.bbc.co.uk/scotland/test/bbc_super_search/end_3d_app.html

Source

     bbc_super_search.zip

More Photos
http://www.flickr.com/search/?w=all&q=mashed08&m=text
http://www.flickr.com/search/?w=all&q=mashed2008&m=text

jQuery Tickers - fun for all the family

May 22nd, 2008

jQuery is amazing as everyone knows, heres some more proof as if anyone needed it

Hozontial Tickers coded in 15 mins that with cross browser support.

based on this orginal qjuery script found here

Hozontial Example

Vertical Example

Source 

Hack Day Webcam Fun

March 6th, 2008

Me trying to lose wieght

These are some experiments me, Jon Howard, and did for hackday, it turned out to be hackhours as we talked and ate pizza for most of the day.

DISCLAIMER: All this code was based on Jon Howards examples, the man is a genius, whenever i’m down in london I make sure I pop by to see whatever he’s been working on last,

last time it was a small movie of his kid running behind a tree in a forest, no biggie right, then he starts panning in 3D.

.

.

I’ve cleaned up the code, basically the idea was to create 3 flash appilcations which would sit on a website and provide the following apis for the javascript on the html page. All the setup for the webcam was to be one line of code.

here’s what we came up with…

BUTTON WEBCAM API

nudge.jpgmulti_nudge.jpg

source and api docs here

1. Nudge API this was for buttons hit by the person on the webcam:

callback_obj.onWebcamNudgeUp(NUDGE_DIRECTION_CONSTANTS)
callback_obj.onWebcamNudgeDown(NUDGE_DIRECTION_CONSTANTS)

.

MOUSE WEBCAM API

Would of put pictures for the demos did i mention the lack of webcam/Admin Rights I’ve been having

1 pointer demo   multi pointer demo   source and api docs here

2. Mouse API this was for objects moved by the person on the webcam (it would try to find a finger and follow it):

onWebcamPointerMove(x:Number,y:Number, pointer_index:Number)

.

MINORITY REPORT 2 HANDED MOUSE WEBCAM API

here’s a link to jon’s excellent example, didn’t quite manage to get this one done… demo1 demo2

And lastly the ambious minority report style where the code would try to understand where hands are, and we they are crasped together for the onDown and apart for the onUp:

onWebcamGrabMove(x:Number,y:Number)
onWebcamGrabUp()
onWebcamGrabDown()

.

I would of done more cleanup but due to the unique way the IT is setup in PQ, I can’t install a webcam to continue my experiments… alas the pictures/demo movies taken are from a macbook plugged in under someone’s desk (don’t ask)

The “HTML with SWF — through Localconnection To —> HTML with SWF — external interface —> JS on same HTML Page” examples included in source

source and api docs here

Ant

Pretty AS3 Fractals

March 6th, 2008

 fractal.jpg

link here 

rant here

source here 

Spotlight Stylee Debugger

January 31st, 2008

Built this today as an example of a quite cool, debugger with spotlight stylee message sorting

The Debugger

Debugger Client
Message Sender App
Source

Basically open up the sender and the debugger in different browser windows, send a few messages, then try sorting through them

Ant

Hello AS3

January 30th, 2008

It’s official I can now ‘Do’ AS3, after banging my head several times over packages, public classes, public constructors, the needs to import nearly everything you ever needed to, and of course the fact the AS3 compiler messages are written in greek, whoope!

I’ve done a hello AS3 example

AS3 Particle Fun
link

source