mjswan 0.6.0 → 0.7.0-beta.1
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/README.md +19 -1
- package/dist/assets/{index-CfYNGtHq.js → index-Bx4wz487.js} +414 -414
- package/dist/assets/{mujoco-BSW5sYi-.js → mujoco-CSmtoTxq.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/mjswan-engine-BrqJA_5D.wasm +0 -0
- package/dist/mjswan-engine-C887KxcQ.wasm +0 -0
- package/dist/mjswan-engine-CmckSge4.wasm +0 -0
- package/dist/mjswan.js +78332 -0
- package/dist/mujoco--NkVzcP_.js +4618 -0
- package/dist/mujoco-5FTsXq0z.js +4614 -0
- package/lib.d.ts +22 -0
- package/package.json +17 -5
- package/src/core/appConfig.ts +132 -0
- package/src/core/command/TrackingCommand.ts +52 -2
- package/src/core/dsl/interpreter.ts +80 -0
- package/src/core/dsl/primitives.ts +549 -0
- package/src/core/dsl/types.ts +23 -0
- package/src/core/engine/runtime.ts +122 -25
- package/src/core/event/DslEvent.ts +185 -0
- package/src/core/event/EventManager.ts +16 -0
- package/src/core/event/events.ts +3 -154
- package/src/core/observation/DslObservation.ts +86 -0
- package/src/core/observation/ObservationBase.ts +3 -0
- package/src/core/observation/observations.ts +8 -1245
- package/src/core/policy/PolicyRunner.ts +63 -8
- package/src/core/policy/PolicyStateBuilder.ts +44 -0
- package/src/core/policy/types.ts +14 -5
- package/src/core/scene/npz.ts +34 -1
- package/src/core/scene/scene.ts +3 -3
- package/src/core/termination/DslTermination.ts +45 -0
- package/src/core/termination/TerminationManager.ts +24 -1
- package/src/core/termination/terminations.ts +4 -87
- package/src/core/utils/mujocoAssetCollector.ts +4 -2
- package/src/core/utils/pathUtils.ts +20 -0
- package/src/core/observation/CommandObservation.ts +0 -223
package/README.md
CHANGED
|
@@ -31,6 +31,24 @@ A React + TypeScript application that runs MuJoCo physics simulations entirely i
|
|
|
31
31
|
npm install mjswan
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
## Embedding a published simulation (`mount`)
|
|
35
|
+
|
|
36
|
+
The package ships a self-contained library build (`dist/mjswan.js`) that renders
|
|
37
|
+
a published mjswan simulation into any element. It bundles every dependency and
|
|
38
|
+
co-locates its WASM, so it can be loaded directly from a CDN:
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
const { mount } = await import(
|
|
42
|
+
'https://cdn.jsdelivr.net/npm/mjswan@<version>/dist/mjswan.js'
|
|
43
|
+
);
|
|
44
|
+
// configUrl points at a published simulation's config.json; every other asset
|
|
45
|
+
// (scene.mjz, policy.onnx/json, motion.npz, splats) resolves relative to it.
|
|
46
|
+
await mount(container, 'https://cdn.mjswan.com/mjswan/scenes/<id>/config.json');
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
It runs single-threaded by default (no COOP/COEP needed) and works cross-origin.
|
|
50
|
+
See mjswan-cloud ADR 0001.
|
|
51
|
+
|
|
34
52
|
## Development
|
|
35
53
|
|
|
36
54
|
```bash
|
|
@@ -150,4 +168,4 @@ Apache-2.0
|
|
|
150
168
|
## Links
|
|
151
169
|
|
|
152
170
|
- **Repository**: [github.com/ttktjmt/mjswan](https://github.com/ttktjmt/mjswan)
|
|
153
|
-
- **Author**: Tatsuki Tsujimoto
|
|
171
|
+
- **Author**: Tatsuki Tsujimoto
|