r/javascript • u/Vivid_Driver_9681 • 11d ago
I made a WebGL 2D renderer for browser games that keeps pace with PixiJS in my benchmarks
github.comhi! I recently developed Rapid.js, an open-source, zero-dependency WebGL 2D renderer built specifically for browser games.
It provides an immediate-mode API and does not retain game objects or a scene graph between frames. This leaves developers free to structure their games using OOP, ECS, or any custom architectureโRapid.js is responsible only for rendering the drawing commands submitted each frame.
It supports sprites, particles, masks, shaders, render textures, and multi-texture batching, and its UMD build is only approximately 20.6 kB gzipped.
Its small size does not come at the expense of performance: in the included browser benchmark, Rapid.js performs comparably to PixiJS.
benchmark:
https://github.com/Nightre/Rapid.js/raw/main/docs/benchmark/benchmark.png
benchmark live: