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 It's basic, and I improve it as needed while I use it, but I think it can be useful for other people too, so here it is. It comes with the MIT license, so don't by shy. I have included a couple of demo samples too, one of which shows how to render 3D objects with shadows, 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


Download piLibs library - latest update 11/7/2018
Download 3D model demo - latest update 27/6/2017
Download Flames demo - latest update 27/6/2017


3D Model: Shadow mapping, supersampling
Flames: Texturing