Dr. Mark Humphrys

School of Computing. Dublin City University.

Home      Blog      Teaching      Research      Contact

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

CA170      CA668      CA686

Online AI coding exercises

Project ideas


JavaScript graphics

If Ajax is JavaScript's 2nd life, then maybe graphics is JavaScript's 3rd life.

Javascript is entering a new future as a graphics language.
3D graphics rendering on client side in Javascript.

Client side rendering of course scales very well. Server CPU is overloaded. Client has idle CPU and dedicated GPU.


Example of JavaScript graphics



canvas



WebGL

  


JavaScript libraries

If you are not a graphics specialist, you will probably want to use a high-level Javascript library that wraps WebGL in higher-level objects and methods.


Three.js

  

Get three.js

  


Books





Test of Three.js

For all these demos, "View Source" to see the entire thing!







Debugging



Resources (colors, textures, skyboxes, music, key codes)

  

Colors


Textures


Cube maps (Skyboxes)


Music


Mouse and keyboard control



More advanced demo






ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.

Wikipedia: Sometimes I link to Wikipedia. I have written something In defence of Wikipedia. It is often a useful starting point but you cannot trust it. Linking to it is like linking to a Google search. A starting point, not a destination. I automatically highlight in red all links to Wikipedia and Google search and other possibly-unreliable user-generated content.