MuJoco Simulation on WebAssembly with Neural networks
See the code
Real-time Interactive RL Simulation in Your Browser
mjswan is a powerful framework for creating interactive MuJoCo simulations with real-time policy control, running entirely in the browser. Built on top of mujoco wasm, onnxruntime, and three.js, it enables easy sharing of RL simulation demos as static sites, perfect for GitHub Pages hosting.
Check out the demo ― ttktjmt.github.io/mjswan
mjlab-to-mjswan skill.mjswan can be installed with pip:
pip install mjswan # or 'mjswan[dev]', 'mjswan[examples]'
or with npm:
npm install mjswan
The demos live in examples/, which the wheel does not ship, so run them with the
mjswan CLI from a clone of this repository (after pip install -e '.[examples]'):
mjswan demo # lists the bundled demos
mjswan demo simple # runs the simple demo
The minimum python script for a sanity check:
import os, mujoco, mjswan
model_path = os.path.join(os.path.dirname(mujoco.__file__), "testdata", "model.xml")
mjspec = mujoco.MjSpec.from_file(model_path)
builder = mjswan.Builder()
builder.add_project(name="Sanity Check").add_scene(name="Test Model", spec=mjspec)
app = builder.build()
app.launch()
For detailed instructions, visit the documentation.
This project was greatly inspired by the Facet project demo from the research group at Tsinghua University.
It is also built upon the excellent work of zalo/mujoco_wasm, one of the earliest efforts to run MuJoCo simulations in a browser.
This project is licensed under the Apache-2.0 License. When using mjswan, please retain attribution notices in the app to help other users discover this project.
578 followers · starred Feb 2026
1,821 followers · starred Jan 2026
0 followers · starred Jan 2026
35 followers · starred Jan 2026
MuJoco Simulation on WebAssembly with Neural networks
See the code
Real-time Interactive RL Simulation in Your Browser
mjswan is a powerful framework for creating interactive MuJoCo simulations with real-time policy control, running entirely in the browser. Built on top of mujoco wasm, onnxruntime, and three.js, it enables easy sharing of RL simulation demos as static sites, perfect for GitHub Pages hosting.
Check out the demo ― ttktjmt.github.io/mjswan
mjlab-to-mjswan skill.mjswan can be installed with pip:
pip install mjswan # or 'mjswan[dev]', 'mjswan[examples]'
or with npm:
npm install mjswan
The demos live in examples/, which the wheel does not ship, so run them with the
mjswan CLI from a clone of this repository (after pip install -e '.[examples]'):
mjswan demo # lists the bundled demos
mjswan demo simple # runs the simple demo
The minimum python script for a sanity check:
import os, mujoco, mjswan
model_path = os.path.join(os.path.dirname(mujoco.__file__), "testdata", "model.xml")
mjspec = mujoco.MjSpec.from_file(model_path)
builder = mjswan.Builder()
builder.add_project(name="Sanity Check").add_scene(name="Test Model", spec=mjspec)
app = builder.build()
app.launch()
For detailed instructions, visit the documentation.
This project was greatly inspired by the Facet project demo from the research group at Tsinghua University.
It is also built upon the excellent work of zalo/mujoco_wasm, one of the earliest efforts to run MuJoCo simulations in a browser.
This project is licensed under the Apache-2.0 License. When using mjswan, please retain attribution notices in the app to help other users discover this project.
578 followers · starred Feb 2026
1,821 followers · starred Jan 2026
0 followers · starred Jan 2026
35 followers · starred Jan 2026