Showing posts with label canvas. Show all posts
Showing posts with label canvas. Show all posts

Wednesday, February 20, 2008

Tuesday, January 15, 2008

My Canvas Project

For a math class, I used canvas to make a cool little program about gates and inverters etc

Monday, January 7, 2008

Javascript helps avoid code duplication

I love javascript because it helps against code duplication

insead of long chain if statements you can call the right function based on properties


eg
//draw the correct shape according to element type
function redraw(elem,x)
{
cir[elem.type](elem.coor.x,elem.coor.y)
//......
}
see www.thinknumber.com/dismat

Can you do that in any other language