@bendyline/molen-tooling 0.0.1 → 0.0.2
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 +22 -4
- package/dist/cli.mjs +26 -4
- package/dist/docs-src/guide/3d-art-guidelines.md +2 -2
- package/dist/docs-src/guide/3d-model-assets.md +15 -11
- package/dist/docs-src/guide/aircraft.md +9 -10
- package/dist/docs-src/guide/browser-mount.md +14 -0
- package/dist/docs-src/guide/building-interiors.md +2 -1
- package/dist/docs-src/guide/determinism.md +16 -11
- package/dist/docs-src/guide/entities.md +16 -5
- package/dist/docs-src/guide/examples.md +38 -23
- package/dist/docs-src/guide/experience-playback.md +2 -3
- package/dist/docs-src/guide/game-samples.md +30 -18
- package/dist/docs-src/guide/project.md +22 -2
- package/dist/docs-src/guide/quickstart.md +37 -28
- package/dist/docs-src/guide/recognizable-places.md +21 -15
- package/dist/docs-src/guide/rendering-backends.md +5 -4
- package/dist/docs-src/guide/scripting.md +4 -2
- package/dist/docs-src/guide/sky.md +10 -9
- package/dist/docs-src/guide/structure-library.md +18 -8
- package/dist/docs-src/guide/terrain.md +6 -4
- package/dist/docs-src/guide/vehicles.md +9 -5
- package/dist/docs-src/guide/worldgen.md +31 -21
- package/dist/docs-src/llms.txt +26 -15
- package/dist/docs-src/schemas/README.md +1 -1
- package/dist/index.d.mts +26 -2
- package/dist/index.mjs +2 -2
- package/dist/{mcp-BFnCWrg0.mjs → mcp-AOfIp89b.mjs} +12 -2
- package/dist/{ops-BGxhSP6w.mjs → ops-C4BvDgP-.mjs} +267 -33
- package/dist/templates/city-courier/README.md +53 -0
- package/dist/templates/city-courier/checks.json +20 -0
- package/dist/templates/city-courier/commands.json +32 -0
- package/dist/templates/city-courier/delivery-run.replay.json +214 -0
- package/dist/templates/city-courier/gen/molen-types.ts +878 -0
- package/dist/templates/city-courier/index.html +2 -0
- package/dist/templates/city-courier/package.json +25 -0
- package/dist/templates/city-courier/project.json +8 -0
- package/dist/templates/city-courier/scene.json +3395 -0
- package/dist/templates/city-courier/scripts/game.ts +127 -0
- package/dist/templates/city-courier/scripts/molen-scripts.d.ts +1125 -0
- package/dist/templates/city-courier/scripts/tsconfig.json +16 -0
- package/dist/templates/city-courier/src/game-shell.css +309 -0
- package/dist/templates/city-courier/src/main.ts +81 -0
- package/dist/templates/city-courier/src/scene.ts +17 -0
- package/dist/templates/city-courier/src/vite-env.d.ts +1 -0
- package/dist/templates/city-courier/src/worker.ts +5 -0
- package/dist/templates/city-courier/test/headless.test.ts +95 -0
- package/dist/templates/city-courier/test/playthrough.test.js +52 -0
- package/dist/templates/city-courier/test/replay.test.ts +22 -0
- package/dist/templates/city-courier/tsconfig.json +17 -0
- package/dist/templates/city-courier/vite.config.ts +19 -0
- package/dist/templates/cubes/README.md +51 -0
- package/dist/templates/cubes/index.html +16 -0
- package/dist/templates/cubes/package.json +24 -0
- package/dist/templates/cubes/scene.json +15 -0
- package/dist/templates/cubes/src/cubes.ts +100 -0
- package/dist/templates/cubes/src/main.ts +21 -0
- package/dist/templates/cubes/src/worker.ts +15 -0
- package/dist/templates/cubes/test/headless.test.ts +98 -0
- package/dist/templates/cubes/tsconfig.json +17 -0
- package/dist/templates/cubes/vite.config.ts +17 -0
- package/dist/templates/data-viz/README.md +47 -0
- package/dist/templates/data-viz/camera-track.json +12 -0
- package/dist/templates/data-viz/data.json +9 -0
- package/dist/templates/data-viz/index.html +16 -0
- package/dist/templates/data-viz/package.json +25 -0
- package/dist/templates/data-viz/scene.json +7 -0
- package/dist/templates/data-viz/src/main.ts +39 -0
- package/dist/templates/data-viz/src/viz.ts +91 -0
- package/dist/templates/data-viz/src/worker.ts +12 -0
- package/dist/templates/data-viz/test/headless.test.ts +75 -0
- package/dist/templates/data-viz/tsconfig.json +17 -0
- package/dist/templates/data-viz/vite.config.ts +16 -0
- package/dist/templates/figures-gallery/README.md +46 -0
- package/dist/templates/figures-gallery/index.html +16 -0
- package/dist/templates/figures-gallery/package.json +25 -0
- package/dist/templates/figures-gallery/scene.json +276 -0
- package/dist/templates/figures-gallery/src/main.ts +44 -0
- package/dist/templates/figures-gallery/src/worker.ts +17 -0
- package/dist/templates/figures-gallery/test/headless.test.ts +90 -0
- package/dist/templates/figures-gallery/tsconfig.json +17 -0
- package/dist/templates/figures-gallery/vite.config.ts +17 -0
- package/dist/templates/index.json +188 -0
- package/dist/templates/skybound/README.md +53 -0
- package/dist/templates/skybound/checks.json +24 -0
- package/dist/templates/skybound/commands.json +32 -0
- package/dist/templates/skybound/first-leap.replay.json +224 -0
- package/dist/templates/skybound/gen/molen-types.ts +878 -0
- package/dist/templates/skybound/index.html +2 -0
- package/dist/templates/skybound/package.json +25 -0
- package/dist/templates/skybound/project.json +8 -0
- package/dist/templates/skybound/scene.json +1737 -0
- package/dist/templates/skybound/scripts/game.ts +119 -0
- package/dist/templates/skybound/scripts/molen-scripts.d.ts +1125 -0
- package/dist/templates/skybound/scripts/tsconfig.json +16 -0
- package/dist/templates/skybound/src/game-shell.css +309 -0
- package/dist/templates/skybound/src/main.ts +60 -0
- package/dist/templates/skybound/src/scene.ts +17 -0
- package/dist/templates/skybound/src/vite-env.d.ts +1 -0
- package/dist/templates/skybound/src/worker.ts +5 -0
- package/dist/templates/skybound/test/headless.test.ts +124 -0
- package/dist/templates/skybound/test/playthrough.test.js +38 -0
- package/dist/templates/skybound/test/replay.test.ts +22 -0
- package/dist/templates/skybound/tsconfig.json +17 -0
- package/dist/templates/skybound/vite.config.ts +19 -0
- package/dist/templates/terrain-flyover/README.md +46 -0
- package/dist/templates/terrain-flyover/index.html +16 -0
- package/dist/templates/terrain-flyover/package.json +26 -0
- package/dist/templates/terrain-flyover/src/flyover.ts +23 -0
- package/dist/templates/terrain-flyover/src/main.ts +93 -0
- package/dist/templates/terrain-flyover/terrain.json +15 -0
- package/dist/templates/terrain-flyover/test/headless.test.ts +72 -0
- package/dist/templates/terrain-flyover/tsconfig.json +17 -0
- package/dist/templates/terrain-flyover/vite.config.ts +15 -0
- package/dist/templates/top-down-arena/README.md +52 -0
- package/dist/templates/top-down-arena/arena-skirmish.replay.json +204 -0
- package/dist/templates/top-down-arena/index.html +16 -0
- package/dist/templates/top-down-arena/package.json +25 -0
- package/dist/templates/top-down-arena/project.json +10 -0
- package/dist/templates/top-down-arena/scene.json +162 -0
- package/dist/templates/top-down-arena/scripts/chase.ts +17 -0
- package/dist/templates/top-down-arena/scripts/combat.ts +12 -0
- package/dist/templates/top-down-arena/scripts/control.ts +8 -0
- package/dist/templates/top-down-arena/scripts/molen-scripts.d.ts +1095 -0
- package/dist/templates/top-down-arena/scripts/spawner.ts +11 -0
- package/dist/templates/top-down-arena/scripts/tsconfig.json +16 -0
- package/dist/templates/top-down-arena/src/arena.ts +8 -0
- package/dist/templates/top-down-arena/src/gen/molen-types.ts +882 -0
- package/dist/templates/top-down-arena/src/main.ts +31 -0
- package/dist/templates/top-down-arena/src/scene.ts +24 -0
- package/dist/templates/top-down-arena/src/vite-env.d.ts +1 -0
- package/dist/templates/top-down-arena/src/worker.ts +7 -0
- package/dist/templates/top-down-arena/test/headless.test.ts +87 -0
- package/dist/templates/top-down-arena/test/replay.test.ts +22 -0
- package/dist/templates/top-down-arena/tsconfig.json +17 -0
- package/dist/templates/top-down-arena/types/arena.types.json +54 -0
- package/dist/templates/top-down-arena/vite.config.ts +21 -0
- package/package.json +14 -14
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
+
Everything here runs from the published npm packages. You never need a clone of the engine
|
|
4
|
+
repository to build on Molen. Node ≥ 22.13.
|
|
5
|
+
|
|
6
|
+
## See it running
|
|
7
|
+
|
|
8
|
+
Every sample plays in the browser at [molen.dev/play](https://molen.dev/play/), with nothing to
|
|
9
|
+
install: three complete games, the capability demos and the small starters.
|
|
10
|
+
|
|
3
11
|
## Start your own project
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Scaffold a project from npm and install it:
|
|
6
14
|
|
|
7
15
|
```
|
|
8
16
|
npx @bendyline/molen-tooling new my-experience
|
|
@@ -15,39 +23,34 @@ npm run dev # the same scene in the browser
|
|
|
15
23
|
|
|
16
24
|
`my-experience/` is a runnable project (project.json + scene + type registry + setup + commands +
|
|
17
25
|
checks), and `new` prints the exact headless-loop commands. Use the scoped package name for the
|
|
18
|
-
first command: the unscoped `molen` on npm is unrelated.
|
|
26
|
+
first command: the unscoped `molen` on npm is unrelated. Inside the project, `npx molen` runs the
|
|
27
|
+
CLI the project installed. See the [agent loop](agent-loop.md) and
|
|
19
28
|
[projects & types](project.md).
|
|
20
29
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
With pnpm, clone the repository and build it:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
pnpm install
|
|
27
|
-
pnpm build
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### The cubes demo in the browser
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
pnpm --filter @bendyline/molen-examples-cubes dev
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Open the printed URL. ~50 cubes spin and drift, simulated at 30 Hz in a Web Worker kernel and
|
|
37
|
-
rendered with interpolation. Press **Space** to spawn a cube — the keypress emits a command that
|
|
38
|
-
the kernel validates and adjudicates; the client never mutates simulation state directly.
|
|
30
|
+
## Start from a sample instead
|
|
39
31
|
|
|
40
|
-
|
|
32
|
+
The smaller samples ship inside `@bendyline/molen-tooling` as templates, locked to the engine
|
|
33
|
+
version you install. `--template` copies one into a standalone npm project that you own:
|
|
41
34
|
|
|
42
35
|
```
|
|
43
|
-
|
|
36
|
+
npx @bendyline/molen-tooling templates # list them
|
|
37
|
+
npx @bendyline/molen-tooling new my-game --template skybound
|
|
38
|
+
cd my-game
|
|
39
|
+
npm install
|
|
40
|
+
npm test # the sample's headless tests, in Node
|
|
41
|
+
npm run dev
|
|
44
42
|
```
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
The cubes template is the whole architecture at minimum size. About 50 cubes spin and drift,
|
|
45
|
+
simulated at 30 Hz in a Web Worker kernel and rendered with interpolation. Press **Space** to
|
|
46
|
+
spawn a cube: the keypress emits a command that the kernel validates and adjudicates, and the
|
|
47
|
+
client never mutates simulation state directly. Its `npm test` runs the same scene in Node for 300
|
|
48
|
+
ticks, asserts on world state, and checks the state hash is identical across runs. That is the
|
|
49
|
+
determinism the browser relies on for smooth interpolation and replay.
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
The [samples gallery](examples.md) lists every template and what each one teaches. The largest
|
|
52
|
+
samples (World Explorer and The Lantern Vault) carry content that npm packages never include, so
|
|
53
|
+
you play them at molen.dev and read their source on GitHub instead.
|
|
51
54
|
|
|
52
55
|
## The shape of things
|
|
53
56
|
|
|
@@ -57,7 +60,13 @@ From a clone, the CLI is `node packages/tooling/dist/cli.mjs`.
|
|
|
57
60
|
only through messages (commands in; keyframes/deltas out).
|
|
58
61
|
- **Schema** (`@bendyline/molen-schema`): every wire and file format, with a validator that produces
|
|
59
62
|
fixable error messages.
|
|
60
|
-
- **Tooling** (`@bendyline/molen-tooling`): the `molen` CLI and MCP server
|
|
61
|
-
|
|
63
|
+
- **Tooling** (`@bendyline/molen-tooling`): the `molen` CLI and MCP server. It validates,
|
|
64
|
+
simulates, screenshots, replays and scaffolds, and answers schema, component and docs questions.
|
|
65
|
+
It also carries this documentation, version-locked, at `dist/docs-src/`.
|
|
66
|
+
|
|
67
|
+
Shared content (entity models, the default building style pack, the Earth catalogs, the star
|
|
68
|
+
table) is not in any npm package. It comes as content packs:
|
|
69
|
+
`npx molen pack fetch https://molen.dev/packs/index.json` downloads them into your project and pins
|
|
70
|
+
them in project.json. See [content packs](project.md#content-packs-packs).
|
|
62
71
|
|
|
63
72
|
Next: the [agent loop](agent-loop.md).
|
|
@@ -12,7 +12,7 @@ The Earth catalog recognizes **44 mapped source businesses** by exact aliases an
|
|
|
12
12
|
IDs. Each match selects a generic descriptor model rather than a source-business sign: for example,
|
|
13
13
|
Walmart maps to `sign.mart_store`, Taco Bell maps to `sign.taco_place`, Best Buy maps to
|
|
14
14
|
`sign.electronics_store`, and The Home Depot maps to `sign.hardware_store`. The
|
|
15
|
-
[retail catalog](
|
|
15
|
+
[retail catalog](https://github.com/bendyline/molen/blob/main/content/earth/businesses/README.md) documents the
|
|
16
16
|
source data and mapping policy.
|
|
17
17
|
|
|
18
18
|
Nine generic treatments cover grocery, restaurant, cafe, pharmacy, shop, department store, shopping
|
|
@@ -21,7 +21,7 @@ Unknown identities keep the normal architectural fallback. This is a stylized de
|
|
|
21
21
|
not a complete global business database.
|
|
22
22
|
|
|
23
23
|
Matching lives in
|
|
24
|
-
[the Earth business catalog](
|
|
24
|
+
[the Earth business catalog](https://github.com/bendyline/molen/blob/main/content/earth/businesses/catalog.json).
|
|
25
25
|
A stable canonical ID selects an appearance; aliases and verified brand:wikidata IDs map source
|
|
26
26
|
records onto it. Explicit source IDs take precedence. An explicit conflicting ID blocks name-based
|
|
27
27
|
guesses. Name aliases must match exactly after punctuation/spacing normalization and pass category
|
|
@@ -50,17 +50,18 @@ generally absent from the archive.
|
|
|
50
50
|
|
|
51
51
|
The reusable definitions are JSON content, not package code. The landmarks ship in the
|
|
52
52
|
`molen.worldgen.default` content pack (role `landmarks`) and the business catalog in the
|
|
53
|
-
`molen.earth` pack (role `businesses`)
|
|
53
|
+
`molen.earth` pack (role `businesses`). `npx molen pack fetch https://molen.dev/packs/index.json`
|
|
54
|
+
brings both into a project. Their sources are in the engine repository's `content/`:
|
|
54
55
|
|
|
55
56
|
| What to edit | Source |
|
|
56
57
|
| --- | --- |
|
|
57
|
-
| Model index and file paths | [Landmark catalog](
|
|
58
|
-
| Burger-restaurant descriptor, source-inspired palette and frontage | [burger_restaurant.landmark.json](
|
|
59
|
-
| Unbranded grocery treatment | [grocery.landmark.json](
|
|
60
|
-
| Store aliases, source IDs and category matching | [Business catalog](
|
|
61
|
-
| Lamp, bench, rack and charger geometry recipes | [Landmark library](
|
|
62
|
-
| Base building proportions and architectural rules | [Generic store style](
|
|
63
|
-
| Shared surface patterns | [Material library](
|
|
58
|
+
| Model index and file paths | [Landmark catalog](https://github.com/bendyline/molen/blob/main/content/worldgen/landmarks/catalog.json) |
|
|
59
|
+
| Burger-restaurant descriptor, source-inspired palette and frontage | [burger_restaurant.landmark.json](https://github.com/bendyline/molen/blob/main/content/worldgen/landmarks/burger_restaurant.landmark.json) |
|
|
60
|
+
| Unbranded grocery treatment | [grocery.landmark.json](https://github.com/bendyline/molen/blob/main/content/worldgen/landmarks/grocery.landmark.json) |
|
|
61
|
+
| Store aliases, source IDs and category matching | [Business catalog](https://github.com/bendyline/molen/blob/main/content/earth/businesses/catalog.json) |
|
|
62
|
+
| Lamp, bench, rack and charger geometry recipes | [Landmark library](https://github.com/bendyline/molen/blob/main/content/worldgen/landmarks/README.md) |
|
|
63
|
+
| Base building proportions and architectural rules | [Generic store style](https://github.com/bendyline/molen/blob/main/content/worldgen/styles/generic/store.archstyle.json) |
|
|
64
|
+
| Shared surface patterns | [Material library](https://github.com/bendyline/molen/blob/main/content/worldgen/materials/README.md) |
|
|
64
65
|
|
|
65
66
|
A `molen/landmark@1` sign manifest contains its stable model ID, text, initial-based emblem, palette,
|
|
66
67
|
wall/accent appearance and default standalone/shared storefront widths. Its optional
|
|
@@ -88,11 +89,16 @@ Landmarks alone are `createLandmarkLibrary({ catalog, models })` from
|
|
|
88
89
|
`@bendyline/molen-worldgen/kernel`, or `resolveLandmarkCatalogDocuments(catalog, readDocument)` for
|
|
89
90
|
just the definitions; pass definitions to `generateLandmarkModel(id, definitions, tier)` or
|
|
90
91
|
`new ModelLibrary(assetLoader, definitions)`. A `ModelLibrary` without definitions serves no
|
|
91
|
-
landmark models.
|
|
92
|
-
|
|
92
|
+
landmark models. Editing is not runtime hot reload: change the documents, rebuild the pack with
|
|
93
|
+
`molen pack build`, and reload.
|
|
93
94
|
|
|
94
95
|
## Extending the library
|
|
95
96
|
|
|
97
|
+
In your own project, put new or overriding landmark and catalog documents in a content pack of
|
|
98
|
+
your own (`molen pack build <dir>`) and list it in project.json `packs` after the default packs:
|
|
99
|
+
when two packs provide the same id, the later one wins. The steps below are how the engine's own
|
|
100
|
+
catalogs are extended in the engine repository.
|
|
101
|
+
|
|
96
102
|
1. Copy the nearest `.landmark.json`, assign a stable ID, and edit its parameters.
|
|
97
103
|
Add the ID and relative file path to the landmark catalog. Adding a design that uses an
|
|
98
104
|
existing generator needs no manual TypeScript registration.
|
|
@@ -134,17 +140,17 @@ The ordinary Protomaps extract usually supplies position/category, not detailed
|
|
|
134
140
|
|
|
135
141
|
## Repeatable visual review
|
|
136
142
|
|
|
137
|
-
|
|
143
|
+
Open [World Explorer with `?synthetic=1&stores=1&style=default`](https://molen.dev/play/world-explorer/?synthetic=1&stores=1&style=default)
|
|
138
144
|
to inspect all 44 mapped descriptor variants, four additional retail-center treatments, mixed tenants and outdoor
|
|
139
145
|
props. The original eight stores and interior walkthrough coordinates remain in place; the new
|
|
140
146
|
chains occupy the southern blocks and the retail centers flank them.
|
|
141
|
-
|
|
147
|
+
In the engine repository, the [store-library batch fixture](https://github.com/bendyline/molen/blob/main/packages/worldgen-earth/test/fixtures/store-library.batch.json)
|
|
142
148
|
supports deterministic close views:
|
|
143
149
|
|
|
144
150
|
```sh
|
|
145
151
|
molen worldgen preview --batch packages/worldgen-earth/test/fixtures/store-library.batch.json --out .artifacts/store-library.png --angles 4
|
|
146
152
|
```
|
|
147
|
-
The [U.S. retail batch](
|
|
153
|
+
The [U.S. retail batch](https://github.com/bendyline/molen/blob/main/packages/worldgen-earth/test/fixtures/us-retail-library.batch.json)
|
|
148
154
|
includes all 40 additions plus Target, including a courtyard mall and independent mixed tenants:
|
|
149
155
|
|
|
150
156
|
```sh
|
|
@@ -169,8 +169,9 @@ The world explorer also accepts `gpuOptimizations=0` for an uncached WebGPU comp
|
|
|
169
169
|
|
|
170
170
|
## Testing the world explorer
|
|
171
171
|
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
Open [World Explorer](https://molen.dev/play/world-explorer/), then compare the same location
|
|
173
|
+
and settings using [`?backend=webgpu`](https://molen.dev/play/world-explorer/?backend=webgpu) and
|
|
174
|
+
[`?backend=webgl`](https://molen.dev/play/world-explorer/?backend=webgl). Omitting the
|
|
174
175
|
parameter, or using `?backend=auto`, enables automatic selection. The performance HUD displays
|
|
175
176
|
the backend that actually rendered and any automatic fallback reason; its
|
|
176
177
|
`#performance-status` element also exposes `data-backend` and `data-fallback-reason` for tests.
|
|
@@ -194,8 +195,8 @@ API/shader correctness and fallback testing, but their timings do not predict ha
|
|
|
194
195
|
Keep WebGL reference screenshots pinned to `backend=webgl`; test WebGPU separately rather than
|
|
195
196
|
silently regenerating a backend's visual baseline from another renderer.
|
|
196
197
|
|
|
197
|
-
|
|
198
|
-
suite. That suite's default launch uses explicit SwiftShader flags for portable software
|
|
198
|
+
In the engine repository, after building, `pnpm -r test:golden` runs browser regression coverage,
|
|
199
|
+
including the backend suite. That suite's default launch uses explicit SwiftShader flags for portable software
|
|
199
200
|
execution; WebGPU cases report a skip if Chromium cannot create an adapter/device, while the
|
|
200
201
|
WebGL and fallback cases still run. Require WebGPU and use the browser's normal hardware
|
|
201
202
|
selection with these PowerShell commands:
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A molen experience is **data plus scripts**. The scene manifest declares the world, the commands
|
|
4
4
|
it accepts, and its scripts; the scripts hold the logic. A code setup module exists for the rare
|
|
5
|
-
things scripts cannot express, and for typed TypeScript authoring inside a
|
|
5
|
+
things scripts cannot express, and for typed TypeScript authoring inside a project that installs
|
|
6
|
+
the engine packages.
|
|
6
7
|
|
|
7
8
|
## 1. Scene-data scripts (the default)
|
|
8
9
|
|
|
@@ -309,7 +310,8 @@ export default setup;
|
|
|
309
310
|
A setup module loaded from an arbitrary folder can't import the kernel (no `node_modules`
|
|
310
311
|
there), so it uses `world.spawnRaw(componentMap)`, `world.registerCommand`, `world.addSystem`,
|
|
311
312
|
and string-named component handles (`w.patch(id, { name: 'kinematicBody' }, …)`). Inside a
|
|
312
|
-
|
|
313
|
+
project that installs `@bendyline/molen-kernel` (anything `molen new` scaffolds) you can import
|
|
314
|
+
handles from it and use the typed
|
|
313
315
|
`world` API or `defineExperience({...})` (see [project.md](project.md)).
|
|
314
316
|
|
|
315
317
|
A command type may carry many handlers: a scene-declared `move` can be handled by a script and by
|
|
@@ -133,9 +133,11 @@ Orthographic views use a 60° perspective sky oriented along the orthographic ca
|
|
|
133
133
|
|
|
134
134
|
## The star catalog is content
|
|
135
135
|
|
|
136
|
-
No package ships star data. The Earth catalog is the `molen.sky` content pack
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
No package ships star data. The Earth catalog is the `molen.sky` content pack: `stars.bin`, 8,404
|
|
137
|
+
stars in the 50 KB `molen/stars@1` binary format. Get it with
|
|
138
|
+
`npx molen pack fetch https://molen.dev/packs/index.json molen.sky`, serve the zip with your
|
|
139
|
+
app, load it once and hand it to the renderer; until then skies have no stars. Its source is
|
|
140
|
+
[`content/sky/`](https://github.com/bendyline/molen/tree/main/content/sky) in the engine repository.
|
|
139
141
|
|
|
140
142
|
```ts
|
|
141
143
|
import { createClient, decodeStarCatalog } from '@bendyline/molen-client';
|
|
@@ -167,9 +169,9 @@ from **Hoffleit, D. & Warren, W. H. Jr. (1991), Bright Star Catalogue, 5th Revis
|
|
|
167
169
|
The default magnitude cutoff is 6. Stellar colors approximate B−V; visual splat sizes are
|
|
168
170
|
exaggerated for visibility. J2000 coordinates receive precession and rotate with local sidereal
|
|
169
171
|
time. Proper motion, variability, stellar parallax and nutation are omitted. Positions are
|
|
170
|
-
quantized to about 0.005° and magnitudes to 0.04.
|
|
171
|
-
`node packages/client/scripts/generate-star-catalog.mjs
|
|
172
|
-
records the input checksum.
|
|
172
|
+
quantized to about 0.005° and magnitudes to 0.04. The engine repository regenerates
|
|
173
|
+
`content/sky/stars.bin` with `node packages/client/scripts/generate-star-catalog.mjs
|
|
174
|
+
/path/to/catalog.gz`; the pack's NOTICE records the input checksum.
|
|
173
175
|
|
|
174
176
|
No atmospheric refraction, horizon dip, terrain horizon calculation, eclipses, planetary bodies,
|
|
175
177
|
Milky Way texture, lunar libration or photographic lunar map are modeled. The procedural lunar
|
|
@@ -180,12 +182,11 @@ Volumetric atmospheric scattering remains future work.
|
|
|
180
182
|
|
|
181
183
|
## Try it
|
|
182
184
|
|
|
183
|
-
|
|
184
|
-
`http://localhost:5225/sky.html`. Choose a location, UTC date, time speed,
|
|
185
|
+
Open the [sky observatory](https://molen.dev/play/world-explorer/sky.html). Choose a location, UTC date, time speed,
|
|
185
186
|
or the authored Amethyst world; drag to look around and use **Face Sun** / **Face Moon**.
|
|
186
187
|
**Use current time** reads the host clock once and starts normal time flow.
|
|
187
188
|
`?backend=webgl` / `?backend=webgpu` select a backend; `?hud=0` hides controls for capture.
|
|
188
|
-
The terrain explorer
|
|
189
|
+
The terrain explorer, [World Explorer](https://molen.dev/play/world-explorer/), includes a 24-hour slider, date picker and Now button.
|
|
189
190
|
It starts at noon today and shows times in the browser's labeled local time zone. Scrubbing
|
|
190
191
|
keeps the camera fixed while the sky, celestial bodies and scene lighting follow the selected
|
|
191
192
|
instant and camera location. Use `?date=2024-03-25T05:00:00Z` for a repeatable instant or
|
|
@@ -7,18 +7,22 @@ details, and a representative footprint and floor count. These are original styl
|
|
|
7
7
|
not surveyed replicas or static meshes stretched to fit a parcel.
|
|
8
8
|
|
|
9
9
|
The generated runtime index is
|
|
10
|
-
[`structures/catalog.json`](
|
|
10
|
+
[`structures/catalog.json`](https://github.com/bendyline/molen/blob/main/content/worldgen/structures/catalog.json), shipped in the
|
|
11
11
|
`molen.worldgen.default` content pack (role `structures`). All 120 styles are
|
|
12
12
|
registered in the default style pack. The editable source for each logical building lives in its
|
|
13
13
|
own copyable directory under
|
|
14
|
-
[`source/structures/`](
|
|
14
|
+
[`source/structures/`](https://github.com/bendyline/molen/tree/main/content/worldgen/source/structures); its `source.json` inventories
|
|
15
15
|
the local recipe or archstyle and definition metadata. Supporting architectural references are
|
|
16
16
|
maintained in the collection-wide
|
|
17
|
-
[`catalog.json`](
|
|
17
|
+
[`catalog.json`](https://github.com/bendyline/molen/blob/main/content/worldgen/source/shared/structure-library/catalog.json)
|
|
18
|
+
in the engine repository. Get the pack itself with
|
|
19
|
+
`npx molen pack fetch https://molen.dev/packs/index.json`.
|
|
18
20
|
|
|
19
21
|
## See and reshape every structure
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Open the [structure library](https://molen.dev/play/world-explorer/structures.html) in the
|
|
24
|
+
browser, or use the **Explore 120 structures** link in
|
|
25
|
+
[World Explorer](https://molen.dev/play/world-explorer/).
|
|
22
26
|
The collection renders the actual shipped generators and shared material graphs. Search by name,
|
|
23
27
|
country, construction material or description; filter by taxonomy; select any card to change
|
|
24
28
|
width, depth and storeys, orbit, compare front and rear, or inspect the silhouette without textures.
|
|
@@ -26,7 +30,7 @@ The detail menu uses the production geometry tiers. The sheet shows complete ext
|
|
|
26
30
|
enterable interiors are generated separately by the world renderer.
|
|
27
31
|
|
|
28
32
|
**Download model sheet** exports all 120 rendered entries as a labeled PNG. For reproducible
|
|
29
|
-
captures, build once and run:
|
|
33
|
+
captures in the engine repository, build once and run:
|
|
30
34
|
|
|
31
35
|
```sh
|
|
32
36
|
pnpm -r build
|
|
@@ -91,14 +95,20 @@ Details use the actual facade rhythm, a bounded perimeter allocation, and the ex
|
|
|
91
95
|
precedence. Dormers use `roof.features.dormers` on eligible pitched wings. Simplified budget
|
|
92
96
|
representations omit ornament while retaining their footprint, primary roof and measured envelope.
|
|
93
97
|
|
|
94
|
-
The [standard material catalog](
|
|
98
|
+
The [standard material catalog](https://github.com/bendyline/molen/blob/main/content/worldgen/materials/README.md)
|
|
95
99
|
groups all 45 shared graphs by construction. It includes several brick bonds, cut/rubble stone,
|
|
96
100
|
clapboard and board-and-batten, shingles, clay tiles, slate, thatch, rammed earth and metal roofs.
|
|
97
101
|
Physical repeat sizes live in `scripts/standard-materials.mjs`. Common textures are 256² and
|
|
98
102
|
prepared once per shared material set. Window graphs use cell UVs; solid surfaces use meter UVs.
|
|
99
103
|
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
To vary a structure in your own project, copy its `archstyle.json` (or write a new one), preview
|
|
105
|
+
it with `npx molen worldgen preview my.archstyle.json --out preview.png`, and ship your styles as
|
|
106
|
+
your own style pack with `molen pack build`. [Worldgen](worldgen.md) covers the format.
|
|
107
|
+
|
|
108
|
+
The library itself is maintained in the engine repository. Edit the applicable
|
|
109
|
+
`content/worldgen/source/structures/<style>/` bundle there. Generated styles use `recipe.json`;
|
|
110
|
+
the original styles carry their complete `archstyle.json`. After editing, from the repository
|
|
111
|
+
root:
|
|
102
112
|
|
|
103
113
|
```sh
|
|
104
114
|
node packages/worldgen/scripts/generate-structures.mjs
|
|
@@ -172,7 +172,9 @@ molen shot scene.json --out island.png --camera 256,160,580 --look 256,20,256 --
|
|
|
172
172
|
```
|
|
173
173
|
|
|
174
174
|
(The `screenshotScene` op / `screenshot_scene` MCP tool also accept a `terrain` payload so the
|
|
175
|
-
flyover renders without any live entities.)
|
|
175
|
+
flyover renders without any live entities.) The terrain-flyover sample is the full slice:
|
|
176
|
+
[play it](https://molen.dev/play/terrain-flyover/), or copy it with
|
|
177
|
+
`npx @bendyline/molen-tooling new my-terrain --template terrain-flyover`.
|
|
176
178
|
|
|
177
179
|
### Walk through the world explorer
|
|
178
180
|
|
|
@@ -181,7 +183,7 @@ backends. At low altitude, the fade spans 2 to 20 kilometres, preserving nearby
|
|
|
181
183
|
while softening the horizon. Both distances extend at flight altitude and stay inside the streamed
|
|
182
184
|
range; it does not otherwise change with the terrain quality preset.
|
|
183
185
|
|
|
184
|
-
In
|
|
186
|
+
In [World Explorer](https://molen.dev/play/world-explorer/), select **Walk mode** to move from the aerial viewer to open ground
|
|
185
187
|
near your current position. The camera sits 1.7 meters above your feet, with a 5 cm near clipping
|
|
186
188
|
plane, so nearby buildings retain their real, human-scale dimensions. Human features turn on
|
|
187
189
|
when available; the terrain layer buttons remain independent of navigation.
|
|
@@ -334,8 +336,8 @@ matrix, guarded horizontal-cone selection ahead of exact six-plane/horizon culli
|
|
|
334
336
|
decoder for unknown MVT/PNG8 profiles alongside the explicit built-in Protomaps MVT profile. TMS Y
|
|
335
337
|
addresses,
|
|
336
338
|
sidecar-header validation, normalized semantic meshes, and parent-safe adaptive refinement are
|
|
337
|
-
handled automatically. See the binding roadmap in
|
|
338
|
-
|
|
339
|
+
handled automatically. See the binding roadmap in the design plan,
|
|
340
|
+
[`docs/10-earth-terrain.md`](https://github.com/bendyline/molen/blob/main/docs/10-earth-terrain.md).
|
|
339
341
|
|
|
340
342
|
With parent fallback enabled, a package pyramid may extend above the elevation archive's
|
|
341
343
|
maximum zoom. For example, a zoom-15 vector archive can use cropped/resampled zoom-14 elevation
|
|
@@ -100,11 +100,15 @@ terrain-alignment `pitch` and `roll`. IDs derive from world-space bay positions
|
|
|
100
100
|
than tile IDs. Instance meshes retain `userData.vehicleIds` for promotion and duplicate suppression.
|
|
101
101
|
The worker transports the same placement records as synchronous generation.
|
|
102
102
|
|
|
103
|
-
For repeatable visual review
|
|
104
|
-
`
|
|
105
|
-
|
|
103
|
+
For repeatable visual review open
|
|
104
|
+
[World Explorer with `?synthetic=1&parking=1`](https://molen.dev/play/world-explorer/?synthetic=1&parking=1).
|
|
105
|
+
In the engine repository, the browser scenario
|
|
106
|
+
[`vehicles.play.json`](https://github.com/bendyline/molen/blob/main/examples/world-explorer/test/visual/vehicles.play.json)
|
|
107
|
+
visits a car, enters the cockpit, drives, turns in chase view, brakes, and exits; it is also a
|
|
108
|
+
working reference for scripting [`molen play`](experience-playback.md) against your own build:
|
|
106
109
|
|
|
107
110
|
```sh
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
# in the engine repository, from examples/world-explorer/
|
|
112
|
+
pnpm build
|
|
113
|
+
npx molen play dist --scenario test/visual/vehicles.play.json --out-dir .artifacts/vehicles
|
|
110
114
|
```
|
|
@@ -25,12 +25,17 @@ For enterable buildings and lazy ground-floor furnishings, see [Building interio
|
|
|
25
25
|
/kernel molen/region-atlas@1, tile adapter, tile-edge ownership, budgets by quality
|
|
26
26
|
/client TerrainSemanticTileRenderer implementations, atlas loader
|
|
27
27
|
|
|
28
|
-
content
|
|
29
|
-
content
|
|
28
|
+
molen.worldgen.default content pack: the shipped looks (styles, scatter rules, structures)
|
|
29
|
+
molen.earth content pack: world.atlas.json (which style applies where), business catalog
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
The npm packages carry code only. The default looks are content packs (`molen/pack@1` zips)
|
|
33
|
-
|
|
32
|
+
The npm packages carry code only. The default looks are content packs (`molen/pack@1` zips),
|
|
33
|
+
published with each release at `https://molen.dev/packs/`. In a project,
|
|
34
|
+
`npx molen pack fetch https://molen.dev/packs/index.json` downloads them into `packs/` and pins
|
|
35
|
+
them in project.json, and an app serves the same zips from wherever it hosts them. Their sources
|
|
36
|
+
are [`content/worldgen`](https://github.com/bendyline/molen/tree/main/content/worldgen) and
|
|
37
|
+
[`content/earth`](https://github.com/bendyline/molen/tree/main/content/earth) in the engine
|
|
38
|
+
repository.
|
|
34
39
|
|
|
35
40
|
The core package has no terrain dependency and a test forbids map vocabulary in its sources. Core
|
|
36
41
|
inputs are `BuildingRequest` (identity, labels, outline, optional height/levels/minHeight) and
|
|
@@ -40,14 +45,13 @@ inputs are `BuildingRequest` (identity, labels, outline, optional height/levels/
|
|
|
40
45
|
|
|
41
46
|
## 2. Quick start
|
|
42
47
|
|
|
43
|
-
World explorer, real data:
|
|
48
|
+
World explorer, real data, in the browser:
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```
|
|
50
|
+
- [molen.dev/play/world-explorer](https://molen.dev/play/world-explorer/): styled Sammamish
|
|
51
|
+
buildings in the Human mode.
|
|
52
|
+
- [`?synthetic=1&lineup=1`](https://molen.dev/play/world-explorer/?synthetic=1&lineup=1): one
|
|
53
|
+
building of every footprint class along a road.
|
|
54
|
+
- [`?style=none`](https://molen.dev/play/world-explorer/?style=none): flat extrusions, no pack.
|
|
51
55
|
|
|
52
56
|
From code, one building from one outline, no map involved:
|
|
53
57
|
|
|
@@ -82,15 +86,15 @@ const glb = encodeGlb(out.buildings); // core glTF 2.0, one primitive per mate
|
|
|
82
86
|
|
|
83
87
|
From the command line (or the MCP tools of the same names), without writing code. The commands
|
|
84
88
|
need a style pack: pass `--pack` (a content pack zip, a pack source directory, or a
|
|
85
|
-
`stylepack.json`), list one in the project's `packs`, or set `MOLEN_PACKS`. In
|
|
89
|
+
`stylepack.json`), list one in the project's `packs`, or set `MOLEN_PACKS`. In a project:
|
|
86
90
|
|
|
87
91
|
```sh
|
|
88
|
-
|
|
89
|
-
molen worldgen preview --out preview.png --angles 4 # the lineup of every shape class
|
|
90
|
-
molen worldgen preview my.archstyle.json --out preview.png # a style file, injected into the pack
|
|
91
|
-
molen worldgen bake
|
|
92
|
-
molen worldgen bake
|
|
93
|
-
molen worldgen stats
|
|
92
|
+
npx molen pack fetch https://molen.dev/packs/index.json # once: packs/ + project.json pins
|
|
93
|
+
npx molen worldgen preview --out preview.png --angles 4 # the lineup of every shape class
|
|
94
|
+
npx molen worldgen preview my.archstyle.json --out preview.png # a style file, injected into the pack
|
|
95
|
+
npx molen worldgen bake --outline "0,0;18,0;18,9;10,9;10,14;0,14" --style molen.worldgen.fantasy.hall --out assets --id keep
|
|
96
|
+
npx molen worldgen bake hall.batch.json --out assets --id hall # a molen/worldgen-batch@1 document
|
|
97
|
+
npx molen worldgen stats path/to/terrain-package.json --auto --dump tile.batch.json
|
|
94
98
|
```
|
|
95
99
|
|
|
96
100
|
`preview` generates in Node and renders the buffers, props, and scatter in headless Chromium
|
|
@@ -102,8 +106,10 @@ footprint and roof histograms, sizes, timings, and whether both runs hashed the
|
|
|
102
106
|
writes the adapted batch (`molen/worldgen-batch@1`, identities of clipped pieces suffixed so
|
|
103
107
|
they stay unique) for `preview` and `bake`. A `molen/worldgen-batch@1` document is the
|
|
104
108
|
interchange: ground (`flat` or `slope`), building requests, optional mapped props and a scatter request, rules,
|
|
105
|
-
and a detail tier. Two example batches live
|
|
106
|
-
|
|
109
|
+
and a detail tier; `molen schema get worldgen-batch` prints its schema. Two example batches live
|
|
110
|
+
in the engine repository's
|
|
111
|
+
[`content/worldgen/fixtures/`](https://github.com/bendyline/molen/tree/main/content/worldgen/fixtures),
|
|
112
|
+
beside the pack source but not packed.
|
|
107
113
|
|
|
108
114
|
## 3. Authoring a look: `molen/archstyle@1`
|
|
109
115
|
|
|
@@ -234,8 +240,12 @@ seeds are unchanged.
|
|
|
234
240
|
|
|
235
241
|
## 6. Packs: `molen/stylepack@1`
|
|
236
242
|
|
|
243
|
+
A style pack's source directory looks like this (the default pack's is
|
|
244
|
+
[`content/worldgen/`](https://github.com/bendyline/molen/tree/main/content/worldgen) in the engine
|
|
245
|
+
repository); `molen pack build <dir>` turns one into a content pack.
|
|
246
|
+
|
|
237
247
|
```
|
|
238
|
-
|
|
248
|
+
my-stylepack/
|
|
239
249
|
stylepack.json name, version (seeds), namespace, id → path maps, defaults, imports
|
|
240
250
|
styles/**/*.archstyle.json
|
|
241
251
|
scatter/*.scatter.json
|
package/dist/docs-src/llms.txt
CHANGED
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
> three.js rendering client, authored through JSON schemas, a small typed API, and a headless
|
|
5
5
|
> dev loop. This bundle is version-locked to the engine release.
|
|
6
6
|
|
|
7
|
-
Engine version: 0.0.
|
|
7
|
+
Engine version: 0.0.2. three.js peer range: >=0.184.0 <0.187.0 (developed against 0.184.0). Node ≥ 22.13, ESM only.
|
|
8
8
|
|
|
9
9
|
## Start here
|
|
10
10
|
|
|
11
|
+
This bundle ships inside `@bendyline/molen-tooling` at `dist/docs-src/` (in a project:
|
|
12
|
+
`node_modules/@bendyline/molen-tooling/dist/docs-src/llms.txt`) and is published at
|
|
13
|
+
https://molen.dev/llms.txt. Everything it describes works from the npm packages; no clone of the
|
|
14
|
+
engine repository is needed. `npx @bendyline/molen-tooling new <name>` scaffolds a project, and
|
|
15
|
+
`--template <sample>` copies one of the samples instead (`molen templates` lists them). Every
|
|
16
|
+
sample plays at https://molen.dev/play/. Content packs (entity models, the default style pack,
|
|
17
|
+
Earth catalogs, stars) are never in npm packages: `npx molen pack fetch https://molen.dev/packs/index.json`
|
|
18
|
+
downloads them into a project and pins them in project.json.
|
|
19
|
+
|
|
20
|
+
- [Quickstart](guide/quickstart.md): npm-first — scaffold, run the headless loop, open the browser; start from a sample template.
|
|
11
21
|
- [Agent loop](guide/agent-loop.md): the author → validate → simulate → assert → screenshot loop, with copy-paste commands.
|
|
12
22
|
- [Browser experience playback](guide/experience-playback.md): host any built sample, drive real keyboard/pointer navigation, and capture screenshots plus diagnostics.
|
|
13
23
|
- [Projects & types](guide/project.md): project.json, the namespaced entity type registry, reservations, and typed TS authoring (`defineExperience` + `molen types gen`).
|
|
@@ -21,7 +31,6 @@ Engine version: 0.0.1. three.js peer range: >=0.184.0 <0.187.0 (developed agains
|
|
|
21
31
|
- [Earth and authored skies](guide/sky.md): day/night cycles, geographic Sun/Moon positions and lunar phases, catalog stars, simulation clocks, custom-world palettes, and the sky observatory.
|
|
22
32
|
- [Weather and physical atmosphere](guide/weather.md): independent clouds, precipitation and visibility; profiles, temperature/pressure/wind for simulation and aircraft physics; cloud/rain/snow rendering.
|
|
23
33
|
- [Graphics performance](guide/graphics-performance.md): sparse transforms, static instancing, worker preparation, staged uploads, animation/light policy and terrain transitions.
|
|
24
|
-
- [Quickstart](guide/quickstart.md): zero-to-cubes in Node and the browser.
|
|
25
34
|
- [Terrain and world explorer](guide/terrain.md): fixed-grid and screen-space pyramid streaming,
|
|
26
35
|
projected Earth coordinates, optional semantic tile layers, the installable tiled-world package
|
|
27
36
|
contract, and sample app.
|
|
@@ -42,7 +51,7 @@ Engine version: 0.0.1. three.js peer range: >=0.184.0 <0.187.0 (developed agains
|
|
|
42
51
|
- [Vehicle interiors and model signals](guide/vehicle-interiors.md): model-owned cabins, declarative simulation-to-GLB bindings, script-owned telemetry, and nearby detail loading.
|
|
43
52
|
- [Figures](guide/figures.md): stylized humans, bipeds and quadrupeds: presets and descriptors, canonical rigs and sockets, deterministic gaits, `figureAttachment` accessories, riders, and `molen figure preview`.
|
|
44
53
|
- [Complete game samples](guide/game-samples.md): city driving, first-person dungeon, and platformer; shared follow cameras and XY platform physics.
|
|
45
|
-
- [
|
|
54
|
+
- [Samples gallery](guide/examples.md): every sample with its molen.dev/play link and `--template` id, plus the capability layers (kinematics,
|
|
46
55
|
character, pathfinding, physics-rapier, terrain) — copy-and-modify starting points.
|
|
47
56
|
|
|
48
57
|
> **Script trust:** a scene manifest's `scripts` are evaluated **in-process** — by the `molen`
|
|
@@ -55,10 +64,12 @@ Engine version: 0.0.1. three.js peer range: >=0.184.0 <0.187.0 (developed agains
|
|
|
55
64
|
> [guide/scripting.md](guide/scripting.md) "Script trust". Path arguments to the CLI and MCP tools
|
|
56
65
|
> are likewise trusted user intent: they are read, written or imported as given, wherever they point.
|
|
57
66
|
|
|
58
|
-
> **Truth rule for agents:**
|
|
59
|
-
> The `docs/` folder is the original *design plan*: historical,
|
|
60
|
-
> code — treat it as intent, not fact. `molen docs search`
|
|
61
|
-
>
|
|
67
|
+
> **Truth rule for agents:** this bundle and the published packages (their `.d.mts` types) are the
|
|
68
|
+
> shipped engine. The engine repository's `docs/` folder is the original *design plan*: historical,
|
|
69
|
+
> not maintained, and it may lag the code — treat it as intent, not fact. `molen docs search`
|
|
70
|
+
> searches this bundle (inside the engine repository, `--design` adds `docs/`, tagged). Agents
|
|
71
|
+
> working *on* the engine start at the repository's [AGENTS.md](https://github.com/bendyline/molen/blob/main/AGENTS.md). Scaffold
|
|
72
|
+
> a starter with `molen new`.
|
|
62
73
|
|
|
63
74
|
## Schema reference (autogenerated)
|
|
64
75
|
|
|
@@ -83,11 +94,11 @@ Schema + example, generated from the registry) live in [schemas/](schemas/README
|
|
|
83
94
|
- Component vocabulary: [schemas/components.md](schemas/components.md) or `molen components`.
|
|
84
95
|
- three.js surface + escape hatch (peer range 0.184–0.186): [guide/three-surface.md](guide/three-surface.md).
|
|
85
96
|
- Writing a capability package: [guide/capability-authoring.md](guide/capability-authoring.md).
|
|
86
|
-
- Kernel & ECS design notes: [02-packages-and-apis.md §3](
|
|
97
|
+
- Kernel & ECS design notes: [02-packages-and-apis.md §3](https://github.com/bendyline/molen/blob/main/docs/02-packages-and-apis.md) (design plan).
|
|
87
98
|
|
|
88
|
-
## Tooling — CLI (`npx molen <cmd>` in a project that installs `@bendyline/molen-tooling
|
|
99
|
+
## Tooling — CLI (`npx molen <cmd>` in a project that installs `@bendyline/molen-tooling`)
|
|
89
100
|
|
|
90
|
-
- `molen new <name
|
|
101
|
+
- `molen new <name> [--template <id>]` — scaffold a runnable project (project.json + scene + type registry + setup + checks), or copy a sample · `molen templates` — list the sample templates
|
|
91
102
|
- `molen validate <file> [--kind k] [--project p]` — validate an asset (pinpoint, fixable errors; scene `type` refs resolve through the project)
|
|
92
103
|
- `molen sim run <scene|name> --ticks N [--setup m] [--commands f] [--assert f] [--hash]`
|
|
93
104
|
- `molen asset import <file.glb> [--id <id>] [--trimesh]` · `asset inspect <ref> [--verify]` · `asset list` · `asset shot <ref> --out-dir d [--variant ktx2]`
|
|
@@ -113,17 +124,17 @@ Schema + example, generated from the registry) live in [schemas/](schemas/README
|
|
|
113
124
|
|
|
114
125
|
`validate_asset`, `run_simulation`, `screenshot_scene`, `export_frames`, `rasterize_material`,
|
|
115
126
|
`run_replay`, `diff_snapshots`, `apply_uv_paint`, `list_schemas`, `get_schema`, `list_components`,
|
|
116
|
-
`get_component`, `search_docs`, `describe_op`, `new_experience`, `get_project`, `list_types`,
|
|
127
|
+
`get_component`, `search_docs`, `describe_op`, `new_experience`, `list_templates`, `get_project`, `list_types`,
|
|
117
128
|
`check_types`, `reserve_type`, `generate_types`, `import_asset`, `inspect_asset`, `pack_asset`, `stage_assets`,
|
|
118
129
|
`list_assets`, `drive_scene` (returns frames as IMAGES), `play_experience` (plays a built browser app and returns frames as IMAGES), `screenshot_asset` (turntable images),
|
|
119
130
|
`test_types`, `worldgen_preview` (generated buildings as IMAGES), `worldgen_bake`, `worldgen_stats`,
|
|
120
131
|
`figure_preview` (figures as IMAGES), `list_figure_presets`. Call `describe_op` for I/O contracts.
|
|
121
132
|
|
|
122
133
|
|
|
123
|
-
## Design reference (for deeper questions)
|
|
134
|
+
## Design reference (for deeper questions; the historical design plan, on GitHub)
|
|
124
135
|
|
|
125
|
-
- [Kernel design](
|
|
126
|
-
- [Materials & assets](
|
|
127
|
-
- [Phase plan](
|
|
136
|
+
- [Kernel design](https://github.com/bendyline/molen/blob/main/docs/04-kernel-design.md) · [Client design](https://github.com/bendyline/molen/blob/main/docs/05-client-design.md)
|
|
137
|
+
- [Materials & assets](https://github.com/bendyline/molen/blob/main/docs/06-materials-and-assets.md) · [Tooling & testing](https://github.com/bendyline/molen/blob/main/docs/07-tooling-and-testing.md)
|
|
138
|
+
- [Phase plan](https://github.com/bendyline/molen/blob/main/docs/08-phase-plan.md) · [Questions & risks](https://github.com/bendyline/molen/blob/main/docs/09-questions-and-risks.md)
|
|
128
139
|
|
|
129
140
|
- [Adaptive rendering performance](guide/adaptive-performance.md) — device feedback, frame/GPU timing, live terrain budgets, screen-space object LOD and worker boundaries.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Schema reference
|
|
2
2
|
|
|
3
|
-
Autogenerated from the
|
|
3
|
+
Autogenerated from the schema registry `molen validate` checks against; `molen schema list` and `molen schema get <kind>` print the same set at runtime.
|
|
4
4
|
|
|
5
5
|
- [Components](components.md) — the component vocabulary (`molen components`)
|
|
6
6
|
- [Architectural style](archstyle.md) — `molen/archstyle@1`
|