Skip to content

JSAR: a revolutionary browser engine library designed for the next computing era (Metaverse). You can use it to mix-render different modern Web 2D and 3D contents together.

License

Notifications You must be signed in to change notification settings

M-CreativeLab/jsar-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

JSAR Poster

JSAR: a revolutionary Browser Engine Library designed for Metaverse.

Documentation Β· DeepWiki

GitHub Release GitHub commit activity GitHub License

Table of Contents

  1. Introduction
  2. Overview
  3. Contributing
  4. Loaders

Introduction

✨ Bringing Web Technologies to Life in Metaverse

JSAR is a revolutionary browser engine library designed for the next computing era (Metaverse). It enables you to create immersive Web contents using the modern Web technologies (HTML5, CSS3, TypeScript) and seamlessly integrate them into mainstream 3D engines like Unity, UnrealEngine, and RealityKit.

🌟 Why Choose JSAR?

  • 🎯 3D-First Design - Unlike traditional browsers, JSAR is optimized from the ground up for 3D and spatial computing
  • πŸ”§ Easy Integration - Supports multiple rendering backends and platform integrations
  • πŸ“± Cross-Platform Compatible - Supports both Android and macOS platforms
  • ⚑ High Performance - A builtin ECS to achieve the GPU-driven renderer for elements
  • 🌐 Web Standards Compliant - Supports WebXR, WebGL, Web APIs, and other modern Web standards

Overview

Request Formats

Like the classic Web browser, it supports not only the HTML document, but also lots of formats, such as PDF, SVG, etc. The following formats JSAR is expected to support:

Format Status Recommended Use Case
HTML Partially Browsing classic Web pages
PDF Not started Reading PDF documents
SVG Not started Displaying SVG images
GLTF Ok Displaying 3D models
JPEG/PNG Ok Viewing images
XSML Deprecated Using WebXR applications

XSML: namely eXtensible Spatial Markup Language, is a new format that is designed for spatial applications for HTML developers but deprecated.

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: PDFRenderingContext and HTMLRenderingContext are introduced by JSAR, which is used to customize the PDF and HTML rendering.

Classic Rendering

API Status Test Suite
DOM API Partially -
HTML5 Partially -
CSS3 Partially -
Web Component Not started -

Contributing

To contribute to the project, you need to follow the steps below to build this project from source.

Prerequisites

And you need to add the following targets to your Rust toolchain by your need:

$ rustup target add aarch64-linux-android
$ rustup target add aarch64-apple-darwin
$ rustup target add x86_64-apple-darwin
$ rustup target add x86_64-pc-windows-msvc

Build from source

Firstly, you need to install the dependencies and build the JSAR JavaScript bundle which is used in the runtime.

$ npm install && make jsbundle

Then you can build the runtime library:

$ make darwin    # for macOS universal library
$ make android   # for Android-aarch64 library

If you want to do a clean build, you can run:

$ make darwin CLEAN=yes

Supported parameters:

  • CLEAN: Clean the build directory before building.
  • RELEASE: Build the release version of the library.
  • INSPECTOR: Enable the inspector.

Loaders

The loaders are more convenient way to integrate JSAR into your applications, the following loaders are planned to be developed:

Loader Status Description
jsar-loader-unity Ok Integrates JSAR into Unity applications
jsar-loader-unreal Not started Integrates JSAR into Unreal Engine applications
jsar-loader-visionos Not started Integrates JSAR into visionOS applications

To develop a new loader, you could see the Embedder API Documentation for more details.

About

JSAR: a revolutionary browser engine library designed for the next computing era (Metaverse). You can use it to mix-render different modern Web 2D and 3D contents together.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5