Skip to main content

Planned Features

Multi-robot scenes

Support multiple independent robot configs in a single scene with per-robot IK and control contexts.

Physics worker thread

Move mj_step to a Web Worker for truly independent physics and render rates, enabling higher-fidelity simulations without frame drops.

Mesh decimation

Automatic mesh simplification for visual geoms to reduce GPU load on complex Menagerie models.

useConstraint hook

Declarative equality constraints (weld, connect, joint) that can be added/removed at runtime from React components.

Offscreen rendering

Headless canvas rendering for automated data collection, CI testing, and server-side image generation.

URDF import

Load robots from URDF files (with automatic MJCF conversion) for ROS ecosystem compatibility.

Multiplayer sync

WebSocket-based state synchronization for collaborative simulation viewing and multi-operator teleoperation.

Known Limitations

WASM Binding Gaps (mujoco-js 0.0.7)

These are limitations of the underlying mujoco-js WASM bindings, not mujoco-react itself:
FeatureStatusImpact
flex_faceNot exposedFlexRenderer renders as point cloud, not solid mesh
ten_rgba, ten_widthNot exposedTendonRenderer uses hardcoded color/width
mj_ray body filteringNot exposedRaycasts hit all geoms (no body exclusion)
mjv_scene renderingNot availableNo native MuJoCo rendering pipeline (Three.js only)

Browser Constraints

  • WASM memory: Large models (100+ bodies) may approach browser WASM memory limits
  • Contact reads: Accessing data.contact with high ncon can cause OOM — always check data.ncon first
  • Single thread: Physics runs on the main thread (Web Worker support planned)
  • No GPU compute: MuJoCo’s GPU pipeline is not available in WASM

Architecture Notes

  • SceneConfig.config is read on mount only — prop changes after mount require api.loadScene()
  • All mutable state lives in refs to avoid 60fps re-renders — hooks return RefObject, not state values
  • qfrc_applied is zeroed each frame by the provider — always add to it, never assign