website code
piLibs JS
This is the library I've been using for my Web exepriments (mostly 3D rendering demos) since 2014, including the development of www.shadertoy.com. I improve them as I use them myself, but I do definitely find them super useful for other people too. It comes with the MIT license, so don't by shy. I also have included a couple of examples, including how to use it to render 3D objects with shadows and antialaising and textures. The library is split into these groups/modules:

piRendererAn abstraction over WebGL and an API simplifier, that has the same interface as my C++ renderer
piMeshUseful functions to manipulate and render meshes
piFileModule to read binary files conveniently
piShadingSome useful shading functions
piVRA module that takes care of VR rendering
piVecTypesSimple math types
piWebUtilsSimple helpers to work-around browser differences
piCameraSimple 3D camera controller


Downloads:

download piLibs library - latest update 27/6/2017
download Flames demo - latest update 27/6/2017
download 3D model demo - latest update 27/6/2017



Demos:

3D model: Shadow mapping, supersampling
Flames: Texturing