Fix XML loading in wasm demo app. Fixes #2960
PiperOrigin-RevId: 853635752 Change-Id: I20226de32f3141d40ec56956451f91ec7299e727
This commit is contained in:
committed by
Copybara-Service
parent
07deca990a
commit
a92574837e
@@ -208,7 +208,7 @@ class App {
|
|||||||
// Write xml as a file so that mujoco can find it
|
// Write xml as a file so that mujoco can find it
|
||||||
(mujoco as any).FS.writeFile('/working/model.xml', xmlContent);
|
(mujoco as any).FS.writeFile('/working/model.xml', xmlContent);
|
||||||
|
|
||||||
this.mjModel = mujoco.MjModel.loadFromXML('/working/model.xml');
|
this.mjModel = mujoco.MjModel.mj_loadXML('/working/model.xml');
|
||||||
if (!app.mjModel) {
|
if (!app.mjModel) {
|
||||||
throw new Error('Failed to load model');
|
throw new Error('Failed to load model');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user