Using WebGL as a Flash Alternative
WebGL has been named as Flash’s successor to move forward with advances in the world of animation and graphics on the web.
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.