Converted to Coffeescript
Use WebGL if available