mujoco-react 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mujoco-react",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Composable React Three Fiber building blocks for MuJoCo WASM simulations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -154,9 +154,7 @@ export async function loadScene(
154
154
  try { mujoco.FS.unmount('/working'); } catch { /* ignore */ }
155
155
  try { mujoco.FS.mkdir('/working'); } catch { /* ignore */ }
156
156
 
157
- const baseUrl =
158
- config.baseUrl ||
159
- `https://raw.githubusercontent.com/google-deepmind/mujoco_menagerie/main/${config.modelId}/`;
157
+ const baseUrl = config.src.endsWith('/') ? config.src : config.src + '/';
160
158
 
161
159
  const downloaded = new Set<string>();
162
160
  const queue: string[] = [config.sceneFile];
package/src/types.ts CHANGED
@@ -284,9 +284,10 @@ export interface XmlPatch {
284
284
  }
285
285
 
286
286
  export interface SceneConfig {
287
- modelId: string;
287
+ /** Base URL for fetching model files. The loader fetches `src + sceneFile` and follows dependencies. */
288
+ src: string;
289
+ /** Entry MJCF XML file name, e.g. 'scene.xml'. */
288
290
  sceneFile: string;
289
- baseUrl?: string;
290
291
  sceneObjects?: SceneObject[];
291
292
  homeJoints?: number[];
292
293
  xmlPatches?: XmlPatch[];