A barebones, framework-agnostic wrapper to make working with webgl a little simpler, more efficient, and fun!
This library is not an engine. Rather, it's a foundation that an optimized engine would build upon to make its own choices (e.g. culling meshes) - without wishing for different choices at this level.
That's the goal anyway!
The optimizations are generally only low-level things that aren't too opinionated. Specific examples include:
- Grouping functions that always travel together (e.g. shader compilation steps)
- Caching and memoization (e.g. uniform location lookups)
- Preventing native switching (e.g. skipping bindBuffer if its already active, skipping switching a shader if its active, etc.)
That's the basic idea - to keep it simple and help reduce api calls where it's a definite win :)
Since the core of the library is just a thin layer over native webgl, it can be used to render anything, just write a renderer and you're off to the races (see the example source)
-
Builtin Demo - basic renderers test
-
Gltf - Gltf renderer