A compact 2D/3D renderer for WebGL/Canvas