A Bouncing Ball and Three.js

I have been experimenting with Three.js and, indirectly, webgl. Making the move from 2d to 3d has been interesting. It certainly is a whole new world.

Along with just messing around I have also been working my way through Udacity’s 3d graphics course which has been helpful.

I haven’t really produced anything of any great note. I do feel like I should however post what I have been tinkering with.

Right now all there is is a ball that you control. A and W move left and right. Holding space will make the ball bounce. Pressing W will toggle the lighting through red, green and blue. The platforms are either red, green, blue or white.

While the light is blue only blue and white platforms are visible. While the light is green only green or white platforms are visible. The platforms are always there, you just can’t always see the non-white platforms.

It is a somewhat interesting concept that I can see myself working on further. I need to come up with a few interesting puzzles that use the concept. If nothing else I quite like the disco effect created by rapidly toggling through the colors.

Bouncing Ball

Leave a Reply