With Flash support waning for many years and finally now defunct, developers have had to move to other graphical interfaces to keep up with advances in the world of animation and graphics. WebGL is one such JavaScript API; it is fully integrated with other web standards and can be mixed with other HTML elements for a combined approach. Adobe actually named WebGL has a successor to Flash for the next generation of rich and interactive browser applications.

WebGL is a relative newcomer to the scene; the first version was released in 2011 with the most stable release in 2017. Whilst 1.0 provided an API for 3D graphics, 2.0 exposed new APIs and made the availability of many optional extensions guaranteed.

All modern web browsers (desktop and mobile) can run WebGL 1.0, although only the most recent releases can support 2.0.

What can WebGL offer?

WebGL has a number of advantages over Flash; these include:

  • Can offer the same and higher end 2D interactive graphics
  • High end 3D and GPU acceleration; this enables further rich visualization, VR and gaming on the web
  • Works on both mobile and desktop browsers
    It is implemented directly in the browser instead of being a plug-in
  • Greater security and convenience
  • No need for third party security patches and updates

Uses for WebGL

  • Gaming – there are many game engines that use WebGL, both 2D and 3D.
  • Content – WebGL scenes require the use of a 3D content creation tool; common examples include Blender, SimLab Composer or Autodesk Maya. These scenes are then exported to a format readable by the viewer.
  • Utilities – The WebGL API has contributed to the creation of many libraries that are used to build things up in 3D, such as PlayCanvas, three.js, CopperLicht and A-Frame (VR).
  • Built-in tools – Firefox has a host of built-in WebGL tools to allow the editing of fragment and vertex shaders.

Related Resources

http://webglinsights.com/ – free, comprehensive getting started guide to WebGL
What is three.js and what can we do with it? – CobwebMedia blog