The Mirage Engine - A Custom Built Framework for Real Time 3D in the Browser
Unlike general purpose engines such as Unity or Unreal, the Mirage Engine is a lightweight and fully browser based solution designed
for real time 3D applications without dependencies or licensing constraints. It combines essential engine features like rendering,
object management, animation, input handling, and GUI systems, all optimized for the web.
Architecture and Features
At its core, Mirage uses a GLTF / GLB importer to load 3D models exported from 3D-Suites like Blender. Objects are organized in
hierarchies and optimized through instancing, allowing efficient rendering of cloned elements without duplicated geometry.
The engine manages entities such as virtual cameras, players, and lights, all of which support transformation and inheritance.
An integrated animation system ensures smooth, frame accurate motion, and morph targets enable deformation of interactive 3D objects.
The user input is handled through various methods, including mouse, keyboard, touch, and device orientation. Dialogs can be styled with
CSS and displayed in fullscreen or splitscreen layouts, with automatic suspension when the browser tab is inactive.
Mirage uses WebGL 2.0 to offload transformation matrices and 3D scene data to the GPU, enabling efficient rasterization directly in the browser.
Custom shaders extend the pipeline to render advanced effects such as lighting, reflections, shadows, and transparency.
While WebGL serves as the current foundation, the engine is designed to support WebGPU as soon as the new interface becomes reliably
available across browsers. Unlike full-featured game engines that often carry significant overhead, Mirage is built for highly specialized
applications with minimal footprint. It comes in at just a few megabytes, offers tight control over memory usage, and delivers high framerates
by focusing only on the features needed. This lean architecture makes Mirage not only faster, but also more predictable and
efficient-ideal for the web.