Runtime
JSAR: browser engine library designed for the Spatial Web. You can use it to mix-render different modern Web 2D and 3D contents together.
Install / Use
/learn @jsar-project/RuntimeREADME
Table of Contents
Introduction
JSAR (/dʒ:-sar/) is a Web browser engine designed for the spatial Web. It enables you to create and present immersive Web contents using the modern Web technologies ([HTML5][], [CSS3][], TypeScript) and seamlessly integrate them into mainstream 3D engines like [Unity][], [UnrealEngine][], and other 3D engines.
To understand the architectural decisions and core concepts behind JSAR, read our comprehensive guide: Understanding the Spatial Web Browser Engine.
Spatial Web
The Spatial Web represents the next evolution of the Web, where every HTML element exists in three-dimensional space with real 3D coordinates, rather than being confined to flat 2D screens. This spatial transformation enables developers to freely leverage Web technologies to create truly immersive experiences, seamlessly blending virtual reality (VR), augmented reality (AR), and mixed reality (MR) into both our physical world and any digital virtual environments.
Key characteristics of the Spatial Web include:
- 3D-First Design: Content and interfaces are designed to exist in 3D space
- Natural Interaction: Users can interact with digital content using natural gestures and movements
- Contextual Awareness: Digital experiences that understand and respond to their physical surroundings
- Persistent: Digital content can remain anchored in physical space across sessions
Key Features
- Designed for the spatial Web - Every HTML element (including 2D & 3D) is spatially rendered in the browser.
- Web Standards Compliant - Supports modern Web standards, including HTML5, CSS3, DOM, WebGL, WebXR and others.
- High Performance - Dynamically batches all spatialized HTML elements into ≤10 GPU draw calls per frame.
- Cross-Platform - Delivers flawless performance across every platform (desktop, mobile, and XR) with pixel-perfect consistency.
- Web Developer Friendly - Deep Chrome DevTools integration for seamless debugging and profiling.
Web Compatibility Overview
Supported URL Formats to Request
Like the classic Web browser, it supports not only the HTML document, but also lots of formats, such as SVG, 3D models, etc. The following formats is expected to support:
| Format | Status | Recommended Use Case | | -------- | ----------- | -------------------------- | | HTML | Partially | Browsing classic Web pages | | GLTF | OK | Displaying 3D models | | JPEG/PNG | OK | Displaying images | | SVG | OK | Displaying SVG images |
Scripting & Modules
| API | Status | Test Suite | | --------------------- | ------ | ---------- | | JavaScript | Ok | - | | TypeScript | Ok | - | | ECMAScript Module | Ok | - | | WebAssembly | Ok | - | | Web Worker | Ok | - |
3D Graphics
| API | Status | Test Suite | | ---------- | ----------- | ---------------------------------------------------------------------- | | WebGL1 | Ok | https://github.com/KhronosGroup/WebGL/tree/main/sdk/tests/conformance | | WebGL2 | Ok | https://github.com/KhronosGroup/WebGL/tree/main/sdk/tests/conformance2 | | WebGPU | Not started | https://github.com/gpuweb/cts |
Rendering Backends
The following are supported renderer backends:
| Backend | OS | Status | Test Suite | | ------------- | ------- | ----------- | ---------- | | OpenGLES3 | Android | Ok | - | | OpenGL | macOS | Partially | - | | Metal | macOS | Not started | - | | D3D11 | Windows | Not started | - |
WebXR Device APIs
| API | Status | Test Suite | | ----------------------------------------------------------------------------------------------------------------- | ------ | ---------- | | Spaces and Reference Spaces | Ok | - | | Stereo Rendering | Ok | - | | Inputs and Input Sources | Ok | - |
Supported Input Sources
| Input Source | Status | Target Ray Mode | Gamepad | Profiles | | --------------- | --------------- | ---------------------- | ------- | -------- | | gaze | Ok | gaze | No | - | | hand(2) | Ok | tracked-pointer | No | - | | main controller | Ok | tracked-pointer/screen | Yes | - | | transient | Not implemented | transient-pointer | No | - |
Note: Gamepad is not supported in the current version.
Features
| Feature | Status | Test Suite | | ------------------ | --------------- | ---------- | | Hit Test | Not implemented | - | | Anchors | Not implemented | - | | Hand Tracking | Ok | - | | Eye Tracking | Not implemented | - | | Depth Sensing | Not implemented | - | | Face Tracking | Not implemented | - | | Body Tracking | Not implemented | - | | Environment Probes | Not implemented | - | | Light Estimation | Not implemented | - |
Multimedia APIs
In Web multimedia, there are the following APIs that JSAR would support:
- Playback: play audio and video, and use Web Audio API to create audio effects.
- Capture: capture audio and video from the device.
Playback
| API | Status | Test Suite |
| ---------------------- | ----------- | ---------- |
| HTMLAudioElement | Ok | - |
| HTMLVideoElement | Not started | - |
| Web Audio API | Not started | - |
Capture
| API | Status | Test Suite |
| ------------------- | ----------- | ---------- |
| MediaDevices | Not started | - |
| MediaRecorder | Not started | - |
Canvas
| API | Status | Test Suite |
| ------------------------ | ----------- | ---------- |
| RenderingContext2D | Ok | - |
| PDFRenderingContext | Not started | - |
| HTMLRenderingContext | Not started | - |
Note:
PDFRenderingContextandHTMLRenderingContextare introduced by JSAR, which is used to customize the P
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
Flyaro-waffle-app
Waffle Delight - Full Stack MERN Application Rules & Documentation Project Overview A comprehensive waffle delivery application built with MERN stack featuring premium UI/UX, admin management, a
