Rename MuJoCo WASM output artifacts to mujoco.*.

This change updates the Emscripten build to output files named `mujoco.js`, `mujoco.wasm`, and `mujoco.d.ts` instead of `mujoco_wasm.*`. The internal CMake target name remains `mujoco_wasm` to avoid conflicts. The package name in `package.json` is also updated to `mujoco`. New enum tests are added.

PiperOrigin-RevId: 875140314
Change-Id: Ie03e0d1db2d03dd8582d5bfcb260b3d33549c2c9
This commit is contained in:
Google DeepMind
2026-02-25 06:50:08 -08:00
committed by Copybara-Service
parent 757758dd2e
commit 940cab2508
8 changed files with 32 additions and 14 deletions
+2 -2
View File
@@ -17,9 +17,9 @@ import 'jasmine';
import {MainModule, MjContact, MjContactVec, MjData, MjLROpt, MjModel,
MjOption, MjsGeom, MjSolverStat, MjSpec, MjStatistic, MjTimerStat, MjvCamera,
MjvFigure, MjvGeom, MjvGLCamera, MjvLight, MjvOption, MjvPerturb, MjvScene,
MjWarningStat, MjVFS, Uint8Buffer} from '../dist/mujoco_wasm.js';
MjWarningStat, MjVFS, Uint8Buffer} from '../dist/mujoco.js';
import loadMujoco from '../dist/mujoco_wasm.js'
import loadMujoco from '../dist/mujoco.js'
function assertExists<T>(value: T | null | undefined, message?: string):
asserts value is T {
+14 -2
View File
@@ -14,8 +14,8 @@
import 'jasmine';
import { MainModule } from "../dist/mujoco_wasm"
import loadMujoco from "../dist/mujoco_wasm.js"
import { MainModule } from "../dist/mujoco"
import loadMujoco from "../dist/mujoco.js"
let mujoco: MainModule;
@@ -40,6 +40,10 @@ describe('Enums', () => {
expect(mujoco.mjtGeom).toBeDefined();
});
it('mjtProjection should exist', () => {
expect(mujoco.mjtProjection).toBeDefined();
});
it('mjtCamLight should exist', () => {
expect(mujoco.mjtCamLight).toBeDefined();
});
@@ -120,6 +124,14 @@ describe('Enums', () => {
expect(mujoco.mjtConDataField).toBeDefined();
});
it('mjtRayDataField should exist', () => {
expect(mujoco.mjtRayDataField).toBeDefined();
});
it('mjtCamOutBit should exist', () => {
expect(mujoco.mjtCamOutBit).toBeDefined();
});
it('mjtSameFrame should exist', () => {
expect(mujoco.mjtSameFrame).toBeDefined();
});
+2 -2
View File
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { MainModule, MjData, MjModel } from "../../dist/mujoco_wasm"
import loadMujoco from "../../dist/mujoco_wasm.js"
import { MainModule, MjData, MjModel } from "../../dist/mujoco"
import loadMujoco from "../../dist/mujoco.js"
declare function loadMujoco(): Promise<MainModule>;