Canvas Play 04: The Little Things
In the last demo I introduced object pooling, colour pooling and 1000 orbs. This demo shows how the little things can make a big difference. The small change in this demo is that a black rectangle is drawn over all of the orbs on every update to give the effect that they’re leaving a trail behind them. Click the image below to see it in action.

[Please note that this demo hasn't been optimised to work on all machines, so you may experience some slow down]
View Source
Below, I’ve included the source code of the demo. You can have a look through all of the code properly on GitHub, but I’ll give a quick overview.
As I mentioned before, the only change is the introduction of a black Rectangle, which is added to the CanvasController. To add the rectangle a Rectangle class was created. The Rectangle is created at the same dimensions as the Canvas and is added with 5% alpha, changing the alpha value will effect the length of the trail for each Orb. You can grab the source code from GitHub and have a play.

day after day you go UP
))) great!
March 16th, 2011Thanks Patrizio, there’s more on the way too! I’m trying to get through these so I can show off some of the cooler demos later.
Mark
March 17th, 2011[...] last demo introduced concepts from the HYPE Framework; object pooling and colour pooling. This demo [...]
March 17th, 2011