threedog 0.2.0 → 0.2.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 +4 -4
- package/core/Assets.js +12 -0
- package/core/Engine.js +13 -4
- package/core/describeRender.js +7 -1
- package/core/grid.js +127 -0
- package/core/gridLoad.js +19 -0
- package/core/loop.js +7 -2
- package/core/renamed.js +1 -0
- package/core/styleParts.js +9 -7
- package/docs/AI.md +28 -23
- package/docs/API.md +3 -3
- package/docs/CODEMAP.md +5 -3
- package/docs/COMMANDS.md +5 -3
- package/docs/CONVENTIONS.md +6 -6
- package/docs/api/assets.md +1 -0
- package/docs/api/characters.md +3 -2
- package/docs/api/engine.md +3 -3
- package/docs/api/style.md +7 -7
- package/docs/api/tools.md +3 -2
- package/docs/api/vegetation.md +1 -0
- package/docs/recipes/01-new-game.md +41 -43
- package/docs/recipes/02-npc.md +24 -24
- package/docs/recipes/03-items-pickups.md +4 -4
- package/docs/recipes/04-quests.md +23 -23
- package/docs/recipes/05-props-bake.md +5 -5
- package/docs/recipes/07-flow-scenes-pause.md +2 -2
- package/docs/recipes/08-weather-sky.md +5 -5
- package/docs/recipes/09-style-pack.md +35 -100
- package/docs/recipes/13-animation.md +22 -6
- package/docs/recipes/14-custom-module.md +6 -7
- package/docs/recipes/15-perf.md +8 -0
- package/docs/recipes/16-dev-bridge.md +7 -7
- package/docs/recipes/18-world.md +5 -2
- package/docs/recipes/19-shooting-picking.md +9 -8
- package/docs/recipes/20-content-actions-save.md +10 -10
- package/docs/recipes/22-shop-gold.md +16 -16
- package/docs/recipes/23-ops.md +2 -2
- package/docs/recipes/27-net.md +2 -2
- package/docs/recipes/28-terrain.md +2 -2
- package/docs/recipes/29-grid.md +47 -27
- package/docs/recipes/34-environment-lighting.md +2 -2
- package/docs/recipes/35-style-from-reference.md +41 -46
- package/docs/recipes/36-sky-ground-plant-looks.md +22 -20
- package/docs/recipes/37-terrain-look-hooks.md +34 -13
- package/docs/recipes/38-environment-look-hooks.md +47 -42
- package/docs/recipes/42-terrain-shape.md +1 -1
- package/docs/recipes/43-shader-patches-surface-looks.md +35 -20
- package/docs/recipes/44-water-weather-look-hooks.md +5 -5
- package/docs/recipes/45-cascaded-shadows.md +1 -1
- package/docs/recipes/46-blender-art-route.md +4 -4
- package/docs/recipes/47-island-snow-backdrop.md +4 -3
- package/docs/recipes/48-make-material.md +2 -2
- package/docs/recipes/49-game-module-contract.md +25 -25
- package/docs/recipes/51-capability-catalog.md +2 -2
- package/docs/recipes/52-look.md +43 -5
- package/docs/recipes/53-ground-up-close.md +58 -0
- package/examples/action/GAMEMAP.md +2 -2
- package/examples/action/main.js +3 -2
- package/examples/sheepisland/GAMEMAP.md +1 -1
- package/examples/styletest/content/npcs.js +1 -1
- package/examples/styletest/main.js +1 -1
- package/examples/world/content/npcs.js +1 -1
- package/examples/world/main.js +1 -1
- package/index.d.ts +8 -2
- package/index.js +3 -2
- package/llms.txt +9 -8
- package/modules/characters/Character.js +21 -19
- package/modules/characters/assetModel.js +35 -7
- package/modules/characters/proceduralRig.js +45 -10
- package/modules/content/index.js +1 -1
- package/modules/gameplay/pickups.js +1 -1
- package/modules/vegetation/Vegetation.js +15 -3
- package/modules/vegetation/index.js +1 -1
- package/modules/vegetation/nearFade.js +39 -0
- package/package.json +2 -1
- package/render/detail.js +39 -15
- package/types/core.d.ts +7 -5
- package/types/gameplay.d.ts +12 -6
- package/types/style.d.ts +20 -15
- package/types/world.d.ts +7 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Crisp ground color borders, terrain normals, height from a grid
|
|
2
2
|
|
|
3
3
|
For an AI that wants the ground to look a way the defaults do not: crisp color borders (a river bank, a path edge), a coarse low-poly mesh with
|
|
4
|
-
fine color, a different triangle cut, custom lighting normals. Terrain basics are in `28-terrain.md`, ground
|
|
5
|
-
`36-sky-ground-plant-looks.md
|
|
6
|
-
`tests/specs/terrain-look.mjs`). Each knob has three exits: a parameter, a small pure function, or replacing the whole ground material.
|
|
4
|
+
fine color, a different triangle cut, custom lighting normals, height read from a grid or image. Terrain basics are in `28-terrain.md`, ground
|
|
5
|
+
color noise in `36-sky-ground-plant-looks.md`, the ground up close (detail, variation, symptoms) in `53-ground-up-close.md`. Each knob names its
|
|
6
|
+
default (`tests/specs/terrain-look.mjs` pins them). Each knob has three exits: a parameter, a small pure function, or replacing the whole ground material.
|
|
7
7
|
|
|
8
8
|
## Why the bank is jagged: color lived on the mesh
|
|
9
9
|
With `shading: 'smooth'` or `'flat'` a color is computed at a grid point (or triangle center) and blended across the triangle. At the default
|
|
@@ -11,9 +11,6 @@ With `shading: 'smooth'` or `'flat'` a color is computed at a grid point (or tri
|
|
|
11
11
|
Raising `resolution` fixes it at the price of triangles (and collision, and edit granularity). `shading: 'texture'` cuts the link: color is
|
|
12
12
|
computed per pixel into a per-chunk image, the mesh stays as coarse as you like.
|
|
13
13
|
|
|
14
|
-
Material roles (`makeMaterial('role')`) are free labels: a role the style does not list uses `materials.default`, and the engine warns only on a name
|
|
15
|
-
that looks like a typo of a known one (`09-style-pack.md`). A style that wants a special ground surface adds its own role and ground material.
|
|
16
|
-
|
|
17
14
|
## 1. `shading: 'texture'` (and `colorResolution`)
|
|
18
15
|
```js
|
|
19
16
|
engine.use(terrain({ ...terrainPreset(), shading: 'texture', colorResolution: 128 }));
|
|
@@ -64,21 +61,20 @@ terrain({ normalFn: (i, j, h, cell) => [(h(i - 1, j) - h(i + 1, j)) / cell, 4, (
|
|
|
64
61
|
```js
|
|
65
62
|
terrain({ diagonal: 'adaptive' }) // 'fixed' (default) | 'adaptive' | 'alternate'
|
|
66
63
|
```
|
|
67
|
-
`fixed` cuts every cell the same way
|
|
64
|
+
`fixed` cuts every cell the same way. `adaptive` cuts along the diagonal with the smaller height difference, which removes
|
|
68
65
|
the zigzag ridges a fixed cut leaves on a slope; `alternate` flips every other cell (no directional bias on flat low-poly facets). `engine.surface`,
|
|
69
66
|
collision and vegetation heights follow the chosen cut, so nothing floats. Because it changes the walkable shape, it belongs to the game's
|
|
70
67
|
`terrain({...})`, not to a style (rule R34 and `style check` accept `shading`, `colorResolution`, `normals`, `normalFn` in `style.terrain.config`
|
|
71
68
|
and flag `diagonal`).
|
|
72
69
|
|
|
73
70
|
## 4. `boundsPad`: the chunk bounding sphere margin
|
|
74
|
-
`boundsPad: { up: 3, radius: 8 }` (meters, the
|
|
71
|
+
`boundsPad: { up: 3, radius: 8 }` (meters, the defaults) is the margin of the culling sphere: the center is raised by `up`, the radius grows
|
|
75
72
|
by `radius`. Raise it if a shader moves vertices far (wind on tall ground cover, a vertex-displacement patch) and chunks pop out at the screen edge.
|
|
76
73
|
|
|
77
74
|
## 5. Relation to `style.terrain.variation`
|
|
78
|
-
`variation` shapes *what* color a point gets
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
cell size; in texture mode `patches: { size: 20, levels: 4 }` shows real hard-edged strokes.
|
|
75
|
+
`variation` shapes *what* color a point gets; `shading` decides *where* it is evaluated. In vertex modes every variation is limited to cell size; in
|
|
76
|
+
texture mode it is sampled per pixel, so `patches: { size: 20, levels: 4 }` gives hard-edged color blocks, and a `jitter.size` below the pixel size
|
|
77
|
+
(0.5 m at `colorResolution: 128`) comes out as one grain per pixel, coarser than asked. Choosing a combination, and ground that looks wrong up close: recipe 53.
|
|
82
78
|
|
|
83
79
|
## 6. Example: a river bank
|
|
84
80
|
```js
|
|
@@ -92,6 +88,31 @@ engine.use(terrain({
|
|
|
92
88
|
```
|
|
93
89
|
Using a preset (`riverAt` of `@threedog/terrain-noise`) the same switch gives crisp banks without more triangles: `terrain({ ...terrainPreset(), shading: 'texture' })`.
|
|
94
90
|
|
|
91
|
+
## 7. Height from a grid or image
|
|
92
|
+
`sampleGrid(data, { width, height, size | cellSize, origin, interp })` turns numbers laid out on a regular grid into a function `(x, z) => value`;
|
|
93
|
+
`await engine.assets.gridFromImage(nameOrUrl, { channel, range, bits })` reads such a grid from an image (PNG at full 8 or 16 bits, jpg/webp at 8;
|
|
94
|
+
`channel` is `'r'`/`'g'`/`'b'`/`'a'`; `range: [min, max]` maps the pixel values to world units, default `[0, 1]`). Samples sit on the grid nodes, so
|
|
95
|
+
`width` samples span `width - 1` cells; outside the grid the edge value is used, or `outside: v`. The grid is just a field: height, moisture, a
|
|
96
|
+
ground-type weight, spawn density, a walkable mask, danger, travel cost.
|
|
97
|
+
|
|
98
|
+
`interp` is the look between nodes; none of them is the right one:
|
|
99
|
+
- `'nearest'`: flat steps, one value per cell. Terraces, blocky or voxel-like ground, tile masks, numbers that are ids.
|
|
100
|
+
- `'linear'` (default): plain bilinear blend; smooth enough for most fields, never leaves the range of its four corners.
|
|
101
|
+
- `'cubic'`: smooth slopes without cell creases (rolling hills, soft gradients). It can overshoot beside a sharp step; `clamp: true` keeps the
|
|
102
|
+
result inside the four corner values.
|
|
103
|
+
|
|
104
|
+
```js
|
|
105
|
+
const g = await engine.assets.gridFromImage('/maps/height16.png', { range: [-5, 60] }); // meters, 16-bit file
|
|
106
|
+
const heightAt = sampleGrid(g.data, { ...g, size: [512, 512], origin: [-256, -256], interp: 'cubic', clamp: true });
|
|
107
|
+
heightAt(10, 20); // gameplay side: where to put a camp, a mine, a lighthouse
|
|
108
|
+
const wet = sampleGrid(moisture, { width: 32, height: 32, cellSize: 8 }); // a hand-made field: wetter ground grows reeds, rice, moss
|
|
109
|
+
const walk = sampleGrid(mask, { width: 64, height: 64, cellSize: 1, interp: 'nearest', outside: 0 }); // 0 / 1 per tile; off the map: not walkable
|
|
110
|
+
```
|
|
111
|
+
A terrain `height` function is recompiled in a worker and cannot capture `heightAt`, so the terrain reads the same image through its own
|
|
112
|
+
`heightmap` (bilinear, centered on `center`): `terrain({ heightmap: { ...g, size: [512, 512], min: -5, max: 60 } })` with `g` from `gridFromImage`
|
|
113
|
+
using the default `range` (it expects 0-1 values; `min`/`max` scale them). Use `sampleGrid` for everything outside the terrain module; when you need
|
|
114
|
+
a look the terrain's bilinear read does not give (terraces: `nearest`), bake it into the data first or write the step in a `height` function.
|
|
115
|
+
|
|
95
116
|
## Whole replacement
|
|
96
117
|
Anything beyond this: `terrain({ material })` (or `style.terrain.material`) swaps the ground material and `engine.terrain.T.buildChunk(cx, cz)` returns the
|
|
97
118
|
raw arrays (`pos`, `nor`, `col`, `uv`, and `tex: { data, size }` in texture mode) if you build chunk meshes yourself.
|
|
@@ -1,71 +1,76 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Owning lights, fog and exposure yourself
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The normal way to change lights, fog, exposure and the sky is `engine.look.<part>.set` / `patch` ([recipe 52](52-look.md)): the sky keeps
|
|
4
|
+
driving them over the day, and your values sit on top. This page is the next step, for when that is not enough: your own fog math, exposure over
|
|
5
|
+
the day, extra sky layers, and taking a light or the fog away from the sky entirely. Sky basics are in `08-weather-sky.md`, clouds and ground color in
|
|
6
|
+
`36-sky-ground-plant-looks.md`, environment lighting in `34-environment-lighting.md`. Each section starts with the `look` call and ends with the exit.
|
|
7
7
|
|
|
8
|
-
## Lights:
|
|
8
|
+
## Lights: override, take over, or switch off
|
|
9
9
|
The engine has one directional light (`engine.lights.sun`, also `engine.sky.sun`; moonlight at night, the shadows live on it) and one hemisphere
|
|
10
10
|
ambient (`engine.lights.hemi` = `engine.sky.hemi`). The sky module rewrites their color and intensity every frame from `style.sky.keyframes`,
|
|
11
|
-
so editing
|
|
11
|
+
so editing the three.js objects directly is overwritten (a dev warning says so). **Without the sky module** both lights are a bright placeholder
|
|
12
|
+
(hemi 1.2, white sun 2 at (40, 80, 30), no shadows).
|
|
12
13
|
|
|
13
14
|
```js
|
|
14
|
-
engine.
|
|
15
|
+
engine.look.lights.set({ sun: { color: '#ffd0a0', intensity: 1.4 }, hemi: { intensity: 0.5 } }, { owner: 'dusk' }); // 1. override, any hour
|
|
16
|
+
engine.sky.modify('cave', { sun: 0.3, ambient: 0.4 }); // or a multiplier on top of the day cycle (recipe 52)
|
|
17
|
+
|
|
18
|
+
engine.use(sky({ sun: 'manual' })); // 2. take over: the sky still aims the sun along the time of day and moves the shadow box
|
|
15
19
|
engine.sky.sun.color.set(0xffd0a0); engine.sky.sun.intensity = 1.4; // yours now, never overwritten
|
|
16
20
|
|
|
17
|
-
engine.use(sky({ sun: false, hemisphere: false })); // a dungeon: both hidden, never touched; the dome still shows sun and moon
|
|
21
|
+
engine.use(sky({ sun: false, hemisphere: false })); // 3. switch off (a dungeon): both hidden, never touched; the dome still shows sun and moon
|
|
18
22
|
const torch = new THREE.PointLight(0xffa040, 6, 12); engine.add(torch); // add your own lights before engine.start()
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
- `
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
- Shadows: only the engine sun's shadow is managed (
|
|
26
|
-
|
|
27
|
-
- Add or remove lights before `engine.start()`: a light count that changes mid-play recompiles every material (one long frame). Many
|
|
28
|
-
`lightPool()
|
|
29
|
-
|
|
30
|
-
## Fog: kind, color, density, or your own math
|
|
31
|
-
`style.sky.fog` (a look; `sky({ fog })` overrides it):
|
|
25
|
+
- `sky({ sun, hemisphere })`: `true` (default) the sky drives everything; `'manual'` color and intensity are the game's, the sun keeps its
|
|
26
|
+
direction and shadow box; `false` `visible = false`, no shadows, never touched (lightning no longer flashes the ambient either).
|
|
27
|
+
- `createEngine({ lights: false })` goes one step further: the default sun and hemisphere are never put in the scene, `engine.lights.sun` / `hemi`
|
|
28
|
+
stay as detached objects so nothing reads `undefined`. Use it for a scene lit entirely by your own lights.
|
|
29
|
+
- Shadows: only the engine sun's shadow is managed (`engine.look.shadow.set`). Your own `castShadow` lights work as in three.js, each costing its
|
|
30
|
+
own shadow pass; `engine.setShadows(false)` turns theirs off too and restores them after.
|
|
31
|
+
- Add or remove lights before `engine.start()`: a light count that changes mid-play recompiles every material (one long frame). Many lamps or
|
|
32
|
+
torches: `lightPool({ point: 6 })` keeps a fixed number of real lights and moves them to the nearest sources (recipe 09, "Lights and stalls").
|
|
32
33
|
|
|
34
|
+
## Fog: kind, color, density, your own math, or your own fog
|
|
33
35
|
```js
|
|
34
|
-
fog:
|
|
35
|
-
fog
|
|
36
|
-
fog
|
|
37
|
-
fog: { color: sky => sky.isDay ? 0xc8d0d8 : 0x10141c } // a function, evaluated each frame
|
|
38
|
-
fog: { kind: 'exp', glsl: `vec4 threedogFog(vec3 c, float depth, vec3 p){
|
|
36
|
+
engine.look.fog.set({ far: 220, color: '#9bb' }); // live: color, density, near, far, enabled, linear <-> exp2
|
|
37
|
+
engine.look.fog.set({ kind: 'height', height: 2, falloff: 0.08, density: 0.03 }); // valley mist; before the first frame (below)
|
|
38
|
+
engine.look.fog.patch('fog', `vec4 threedogFog(vec3 c, float depth, vec3 p){
|
|
39
39
|
float f = 1.0 - exp(-fogDensity * depth);
|
|
40
|
-
return vec4(mix(c, vec3(1.0, 0.85, 0.7), f * 0.3), f); }`
|
|
40
|
+
return vec4(mix(c, vec3(1.0, 0.85, 0.7), f * 0.3), f); }`); // warm far haze
|
|
41
|
+
engine.look.fog.replace('manual'); // the exit: the sky stops writing scene.fog (or pass a THREE.Fog)
|
|
41
42
|
```
|
|
43
|
+
The same keys are the style layer `style.sky.fog` (or `sky({ fog })`), e.g. `fog: { kind: 'exp', color: 0xb8c4d0 }` or
|
|
44
|
+
`fog: { color: sky => sky.isDay ? 0xc8d0d8 : 0x10141c }` (a function, evaluated each frame).
|
|
42
45
|
|
|
43
|
-
- `kind`: `'linear'` (default, near = 0.3 x far) | `'exp'` | `'exp2'` | `'height'`. `color`: `'horizon'` (default
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
- `kind`: `'linear'` (default, near = 0.3 x far) | `'exp'` | `'exp2'` | `'height'`. `color`: `'horizon'` (default; the dome's lower band fades to
|
|
47
|
+
the fog color, so the horizon line never shows) | color | `(sky) => color`. `density` per meter (default derived from the fog distance);
|
|
48
|
+
weather fog divides it, `engine.setFogFar` still moves the derived one.
|
|
49
|
+
- The `fog` hook replaces the fog math in every material, built-in or yours: `vec4 threedogFog(vec3 color, float depth, vec3 worldPos)` returns
|
|
46
50
|
(fog rgb, amount 0..1). In scope: `fogColor`, `cameraPosition`, `fogNear` / `fogFar` (linear) or `fogDensity` (other kinds),
|
|
47
51
|
`THREEDOG_FOG_HEIGHT`, `THREEDOG_FOG_FALLOFF`.
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
uniforms into each material when it compiles); write constants. Materials with `fog: false`
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
object); `sky({ fog: false })` sets `scene.fog = null` (leave fog out of your materials with `fog: false` and fog in a
|
|
54
|
-
|
|
55
|
-
- Two engines on one page share three's fog chunks: the same custom `kind` / `height` / `falloff` /
|
|
56
|
-
|
|
52
|
+
- Limits: `'exp'`, `'height'` and the hook replace three's `fog_*` shader chunks once (three caches programs by material settings, not by
|
|
53
|
+
source), so they only work before the first frame (style, `sky({ fog })`, or right after `createEngine`); later they throw. Color and density
|
|
54
|
+
stay live. No custom uniforms (three copies fog uniforms into each material when it compiles); write constants. Materials with `fog: false`
|
|
55
|
+
(the dome) are not fogged. A ShaderMaterial of your own gets the same fog when it sets `fog: true` and includes the fog chunks.
|
|
56
|
+
- Your own fog: `look.fog.replace('manual')` or `sky({ fog: 'manual' })` creates `scene.fog` once and never writes it (set its color / near /
|
|
57
|
+
far, or assign your own object); `sky({ fog: false })` sets `scene.fog = null` (leave fog out of your materials with `fog: false` and fog in a
|
|
58
|
+
post pass).
|
|
59
|
+
- Two engines on one page share three's fog chunks: the same custom `kind` / `height` / `falloff` / hook is fine (reference counted); a different
|
|
60
|
+
custom setting throws. Plain `linear` / `exp2` do not touch the chunks.
|
|
57
61
|
|
|
58
62
|
## Exposure and tone mapping over time
|
|
59
63
|
```js
|
|
60
64
|
exposure: [[0, 1.6], [0.3, 1], [0.75, 1.1]] // style: per time of day (0-1), wraps across midnight
|
|
61
65
|
exposure: sky => sky.isDay ? 1 : 1.5 // or a function, evaluated by the sky module every frame
|
|
62
|
-
engine.look.tone.set({ exposure: 1.3 }); // at run time: number, keyframes or function (replaces the style's)
|
|
66
|
+
engine.look.tone.set({ exposure: 1.3 }); // at run time: number, keyframes or function (replaces the style's)
|
|
63
67
|
engine.look.tone.set({ mapping: 'agx' }); // 'aces' | 'agx' | 'neutral' | 'none'; materials recompile on their next draw
|
|
64
68
|
```
|
|
65
|
-
A plain number
|
|
69
|
+
A plain number is set once (no per-frame work). Keyframes and functions need the sky module (it knows the time of day).
|
|
66
70
|
|
|
67
|
-
## Extra sky layers: rainbow, aurora,
|
|
68
|
-
`style.sky.layers` (or `sky({ layers })
|
|
71
|
+
## Extra sky layers: rainbow, aurora, color bands
|
|
72
|
+
`style.sky.layers` (or `sky({ layers })`; at run time `engine.look.sky.patch('layer:aurora', { glsl, blend })`, recipe 52), drawn on the dome
|
|
73
|
+
after clouds and stars; none by default:
|
|
69
74
|
|
|
70
75
|
```js
|
|
71
76
|
layers: [{ blend: 'add', uniforms: { uAurora: [0.2, 1, 0.6] }, glsl: `vec4 threedogSkyLayer(vec3 d, float time, vec3 sunDir, float night){
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Terrain outline: islands, floating rocks, a world that ends
|
|
2
2
|
|
|
3
|
-
`terrain({ shape })` decides where there is ground at all. Without it the ground goes on forever
|
|
3
|
+
`terrain({ shape })` decides where there is ground at all. Without it (the default) the ground goes on forever. With it, ground exists only
|
|
4
4
|
where `mask > 0`; the rim is cut through the cells in straight lines, walls hang down from it, and an optional underside closes it.
|
|
5
5
|
|
|
6
6
|
## 1. A floating island with a ragged rim (copy this)
|
|
@@ -6,13 +6,14 @@ material** (a function or instance). Use the first that does the job.
|
|
|
6
6
|
|
|
7
7
|
## Material roles are open
|
|
8
8
|
`style.materials` maps a role name to a material. The engine asks for `default terrain vegetation character water pickup prop`; **any other
|
|
9
|
-
name is fine** (`
|
|
9
|
+
name is fine** (`cloth`, `metal`, `glass`): code asks for it with `engine.makeMaterial('cloth', { color })`, an unlisted role uses `materials.default`.
|
|
10
10
|
Only a name very close to an existing one (`props`, `charcter`) warns, as a probable typo.
|
|
11
11
|
|
|
12
12
|
```js
|
|
13
13
|
materials: {
|
|
14
14
|
default: { type: 'lambert' },
|
|
15
|
-
|
|
15
|
+
cloth: { type: 'standard', roughness: 1, detail: { noise: 'grain', projection: 'triplanar', scale: 3, normal: 0.01 } },
|
|
16
|
+
glass: { type: 'physical', transmission: 1, roughness: 0.05, thickness: 0.2 },
|
|
16
17
|
rock: { type: 'standard', map: 'rock.png', normalMap: 'rock_n.png', roughnessMap: 'rock_r.png', repeat: 4 },
|
|
17
18
|
prop: (params, purpose, engine) => new THREE.MeshMatcapMaterial({ matcap: texture, color: params.color }), // any Material
|
|
18
19
|
}
|
|
@@ -22,18 +23,17 @@ three.js Material. A **spec** is plain data (`type: lambert | phong | standard |
|
|
|
22
23
|
`materials.default` when that is a spec too; keys the material has are set, spec keys below are handled by the engine.
|
|
23
24
|
|
|
24
25
|
## Exit 1: parameters in the spec
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`style check` verifies the names against the asset pack (`materials.*.map` and the other slots, `materials.*.detail.texture`).
|
|
26
|
+
The accepted spec keys, texture slots, `repeat` / `wrap` and who wins between pack and call: recipe 48. How texture names load: the engine
|
|
27
|
+
fetches the asset with `engine.assets.texture` (`map`, `emissiveMap` sRGB, the other slots linear), sets anisotropy, wrap and repeat, and a neutral
|
|
28
|
+
stand-in (flat normal, white) sits in the slot until the image arrives. `style check` verifies the names against the asset pack. This page
|
|
29
|
+
covers the keys that add shader code: `detail`, `lighting`, toon `ramp`, seasons.
|
|
30
30
|
|
|
31
|
-
**`detail`**:
|
|
31
|
+
**`detail`**: a noise pattern, a texture or your own GLSL laid over the surface in world space (needs no UVs). Off unless written; every number is a uniform, so
|
|
32
32
|
100 materials with different `scale` / `strength` / `direction` compile **one** program (tested: 8 variants, +0 programs).
|
|
33
33
|
|
|
34
34
|
| key | meaning |
|
|
35
35
|
|---|---|
|
|
36
|
-
| `noise` | `'grain'` (default) `'paper'` `'stroke'
|
|
36
|
+
| `noise` | `'grain'` (default) `'paper'` `'stroke'` `'dabs'` (soft oval dabs, no direction); or `texture: 'name'` (asset name or a Texture), or `glsl` (below) |
|
|
37
37
|
| `projection` | `'world'` top-down (default, fine for ground) or `'triplanar'` (walls, rocks, characters) |
|
|
38
38
|
| `scale` `strength` | repeats per meter (0.25), color effect 0-1 (0.35) |
|
|
39
39
|
| `mode` `tint` | `'multiply'` (default) `'add'` `'mix'`; tint colors the sample |
|
|
@@ -41,9 +41,10 @@ A key the type lacks (`roughnessMap` on `lambert`) warns once with the type to u
|
|
|
41
41
|
| `octaves` | 1-4 noise layers (2) |
|
|
42
42
|
| `normal` | relief height in meters (bumps the normal; 0 = off) |
|
|
43
43
|
| `roughness` | amount the sample moves roughness (`standard` / `physical`) |
|
|
44
|
+
| `fade` | default `true`: the effect fades out where its pattern is smaller than a pixel (far, grazing), so it does not shimmer; `false` keeps it |
|
|
44
45
|
|
|
45
46
|
Which channels (color, normal, roughness) are on is fixed when the material is made (it is part of the program); the numbers can change any time.
|
|
46
|
-
`style.terrain.detail` (
|
|
47
|
+
The ground takes the same object as `style.terrain.detail` / `look.ground.set({ detail })`; which detail suits which ground: recipe 53.
|
|
47
48
|
|
|
48
49
|
**`lighting`** shapes the light after it is summed. three has no "shadow color": a shadow only removes the sun's light. The patch reads the first
|
|
49
50
|
directional light (the sun; three sorts shadow casters first) and its shadow value for the pixel:
|
|
@@ -63,7 +64,7 @@ orange-on-green muddy; `mix` moves the surface `strength` of the way to the colo
|
|
|
63
64
|
|
|
64
65
|
## Exit 2: your own GLSL
|
|
65
66
|
`detail.glsl` replaces the noise: `vec4 threedogDetailSample(vec2 p)` returns `vec4(color, height 0-1)`; `p` is already scaled, turned, stretched;
|
|
66
|
-
`uniforms: { uCells: 6 }` (numbers, colors, arrays, textures) are in scope. `lighting.glsl` replaces the three light effects:
|
|
67
|
+
`uniforms: { uCells: 6 }` (numbers, colors, arrays, textures) are in scope; `threedogDetailFootprint` is one pixel in pattern units (`fade` uses it; read it to fade your own sample). `lighting.glsl` replaces the three light effects:
|
|
67
68
|
`void threedogLighting(inout ReflectedLight light, vec3 normal, vec3 viewDir, vec3 sunDir, float sunShadow, vec3 albedo)` (view space; `sunShadow` 1 lit,
|
|
68
69
|
0 shadowed; change `light.directDiffuse` / `indirectDiffuse`, the lights are already summed).
|
|
69
70
|
|
|
@@ -78,6 +79,21 @@ For anything else write a **named patch** and add it with `applyEffects(material
|
|
|
78
79
|
glsl: { fragment: { pars: 'uniform float uFuzz;', // pars = declarations at the top
|
|
79
80
|
color_fragment: 'diffuseColor.rgb *= 1.0 - uFuzz * 0.5;' } } } // chunk name -> code placed after `#include <chunk>`
|
|
80
81
|
```
|
|
82
|
+
Patches on one material must agree. Each patch declares what it relies on, and a bad combination throws when it is added (or logs once at compile):
|
|
83
|
+
|
|
84
|
+
| Field | Meaning | Checked |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| `needs.data` | Program inputs the code reads: `'instancing'`, `'instancingColor'`, `'vertexColors'`, `'skinning'`, `'batching'` | when the program compiles (console.error once per material) |
|
|
87
|
+
| `needs.patches` | Patches it builds on, e.g. `['world']` for the `vThreedogWorld` varying (world position; `applyEffects` adds `world` itself when a patch needs it) | when added |
|
|
88
|
+
| `conflicts` | Patch names it cannot share a material with | when added, both ways |
|
|
89
|
+
| `uniforms` | A uniform name belongs to one patch; share `engine.uniforms` (`uTime`, `uWind`, `uCloud`...) instead of making your own `uTime` | when added |
|
|
90
|
+
| `shadow` | Render steps: without it the color pass only; `true` also runs its vertex code in the depth (sun / spot shadows) and distance (point-light shadows) passes | - |
|
|
91
|
+
| `cacheKey` | Changes whenever the GLSL text changes (defines, branches), never for uniform values; the program key joins every patch's `name=cacheKey` in order | same name + cacheKey with different code throws |
|
|
92
|
+
```js
|
|
93
|
+
applyEffects(mat, { wind: 0.03, season: 'foliage', patches: [{ name: 'ripple', needs: { patches: ['world'] }, conflicts: ['wind'],
|
|
94
|
+
glsl: { fragment: { color_fragment: 'diffuseColor.rgb *= 0.9 + 0.1 * sin(vThreedogWorld.x);' } } }] }); // throws: 'wind' and 'ripple' cannot be combined
|
|
95
|
+
```
|
|
96
|
+
|
|
81
97
|
A chunk value may be `{ before, after }`. A missing chunk throws when the patch is added (`strict`), not as a silent no-op. Chunk names in three **0.187**
|
|
82
98
|
(read from `three/src/renderers/shaders`), in main-body order:
|
|
83
99
|
|
|
@@ -101,20 +117,19 @@ A `materials` entry that is a Material instance (cloned per use, its patches kep
|
|
|
101
117
|
lit materials returned by it. Nothing else is applied: textures, `detail` and `lighting` keys are only read on specs, so call `applyEffects(material,
|
|
102
118
|
{ detail, patches })` yourself.
|
|
103
119
|
|
|
104
|
-
## Three complete looks
|
|
120
|
+
## Three complete looks (different directions, same mechanism)
|
|
105
121
|
```js
|
|
106
122
|
const looks = {
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
//
|
|
123
|
+
// metal, realistic PBR: a texture set does the work; a fine world-space grain moves only the roughness (smudges), not the color
|
|
124
|
+
metal: { type: 'standard', metalness: 1, roughness: 0.35, map: 'steel.png', normalMap: 'steel_n.png', roughnessMap: 'steel_r.png', repeat: 2,
|
|
125
|
+
detail: { noise: 'grain', projection: 'triplanar', scale: 6, strength: 0, roughness: 0.25 } },
|
|
126
|
+
// poster, flat and unlit: no light or shadow, the color is exactly the given one; a faint grain keeps large areas from looking empty
|
|
127
|
+
poster: { type: 'basic', detail: { noise: 'paper', scale: 2, strength: 0.12 } },
|
|
128
|
+
// leaf, stylized: toon bands, directional strokes along the wind, cool shade, a rim on the side away from the sun
|
|
111
129
|
leaf: { type: 'toon', ramp: [0.45, 0.8, 1], soften: 0.25, detail: { noise: 'stroke', direction: 35, scale: 1.2, strength: 0.3, mode: 'add' },
|
|
112
130
|
lighting: { shadowTint: { color: 0x5a6fb0, strength: 0.7 }, rim: { color: 0xb8e08a, strength: 0.3, shadowSide: 1 } } },
|
|
113
|
-
// rock: a real texture set, plus a world-space grain that also roughens it
|
|
114
|
-
rock: { type: 'standard', map: 'rock.png', normalMap: 'rock_n.png', roughnessMap: 'rock_r.png', repeat: 3,
|
|
115
|
-
detail: { noise: 'paper', projection: 'triplanar', scale: 0.8, strength: 0.2, normal: 0.02, roughness: 0.3 } },
|
|
116
131
|
};
|
|
117
132
|
```
|
|
118
|
-
Fetch them with `engine.makeMaterial('
|
|
133
|
+
Fetch them with `engine.makeMaterial('metal')`. Check a pack with `threedog style check`; the pixel and program-count guarantees are in `tests/specs/surface.mjs`.
|
|
119
134
|
|
|
120
135
|
To change these from code at run time (`materials`, `surface`, `ground`, `wind` look parts), see recipe 52.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# Water and
|
|
1
|
+
# Water and rain/snow looks: depth color, foam, reflections, particles, lightning
|
|
2
2
|
|
|
3
3
|
For an AI that wants water or weather particles to look a way the defaults do not. Water basics are the `water()` module and `style.water` (color, opacity, waves,
|
|
4
|
-
fresnel, normal map); lights, fog and the sky are in `38-environment-look-hooks.md`.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
fresnel, normal map); lights, fog and the sky are in `38-environment-look-hooks.md`. A style that writes none of the keys below keeps the built-in
|
|
5
|
+
shaders and pays nothing for them (`tests/specs/appearance-water.mjs`). Three exits: a parameter, a GLSL function you replace, or your own material.
|
|
6
|
+
At run time the same keys go through `engine.look.water` / `engine.look.weather` (recipe 52).
|
|
7
7
|
|
|
8
8
|
## Water: depth color and crest foam (parameters)
|
|
9
9
|
```js
|
|
@@ -78,7 +78,7 @@ water: { material: () => {
|
|
|
78
78
|
- Tested: `tests/specs/appearance-water.mjs` renders this exact example and finds the reflected box in the mirror texture.
|
|
79
79
|
|
|
80
80
|
## Weather particles: rain and snow parameters
|
|
81
|
-
`style.weather.rain` / `snow` (left-out keys keep the built-in look
|
|
81
|
+
`style.weather.rain` / `snow` (left-out keys keep the built-in look):
|
|
82
82
|
|
|
83
83
|
```js
|
|
84
84
|
weather: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cascaded shadows
|
|
2
2
|
|
|
3
|
-
Off by default: the sun casts one shadow map around the focus (`extent`, default 70 m)
|
|
3
|
+
Off by default: the sun casts one shadow map around the focus (`extent`, default 70 m). Cascades split the sun's shadow
|
|
4
4
|
along the view into 2-4 maps (three's CSM addon): sharp near the camera, coarse far away. Use them when near shadows look blocky and the
|
|
5
5
|
world is bigger than one map covers well.
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Blender to game (GLB) route
|
|
2
2
|
|
|
3
3
|
Code-built geometry (`models.js`, recipe 05) is good for blockout, props and variations, but it cannot reach the finish of hand-made art: painted
|
|
4
4
|
textures, baked shadows, sculpted edges. That finish comes from Blender. This page is the whole path, in order. The level naming rules live in
|
|
@@ -79,11 +79,11 @@ A whole level is `level({ url: '/models/town.glb' })` (recipe 10). Animation cli
|
|
|
79
79
|
|
|
80
80
|
## 5. The GLB's own materials and the style
|
|
81
81
|
**The GLB keeps its own materials.** The engine loads them as they are (textures, colors, roughness) and does not swap them for style roles;
|
|
82
|
-
that is what lets a
|
|
83
|
-
(terrain, vegetation, procedural models, pickups). One scene can mix
|
|
82
|
+
that is what lets a painted or baked texture show. `style.materials` (recipe 43) applies only to what code builds through `engine.makeMaterial(role, ...)`
|
|
83
|
+
(terrain, vegetation, procedural models, pickups). One scene can mix GLB props and styled code-built things.
|
|
84
84
|
|
|
85
85
|
There is no automatic mapping from a GLB material name to a style role and no flag for it. To make a GLB follow the style anyway, do it in your
|
|
86
|
-
game code, per model: name the material in Blender after the role (`
|
|
86
|
+
game code, per model: name the material in Blender after the role (`cloth`, `metal`, `glass`) and look it up:
|
|
87
87
|
```js
|
|
88
88
|
const m = await engine.assets.model('hat');
|
|
89
89
|
m.traverse(o => { if (o.isMesh) o.material = engine.makeMaterial(o.material.name, { color: o.material.color.getHex() }); });
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Snow cover, flat backdrop, rounded terrain rim
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Three independent settings, each for its own situation: a **rounded rim** for terrain with a visible edge (an island, a diorama board, a floating
|
|
4
|
+
level; recipe 42 for the outline), **snow cover** for any outdoor scene where it snows, and a **flat backdrop** for a scene that should have no
|
|
5
|
+
horizon (a menu stage, a board game, a diorama). All are style or scenario settings; none needs a shader of your own.
|
|
5
6
|
|
|
6
7
|
## Round rim
|
|
7
8
|
`terrain({ shape: { edge: { round: 1.2 } } })` bends the top down by up to 1.2 m toward the rim. The side wall follows every bend of the
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
- `type`: `'lambert' | 'phong' | 'standard' | 'physical' | 'toon' | 'basic'` (default `lambert`, or whatever the pack says).
|
|
12
12
|
- Texture slots by asset name (or a `THREE.Texture`): `map`, `emissiveMap` (sRGB), `normalMap`, `roughnessMap`, `metalnessMap`, `aoMap`, `bumpMap`,
|
|
13
13
|
`alphaMap`... The slot must exist on the type (`roughnessMap` needs `standard`). Plus `repeat` (number or `[x, y]`) and `wrap` (`repeat | clamp | mirror`).
|
|
14
|
-
- `detail`: grain
|
|
15
|
-
- `lighting`: extra light shaping (shadow tint, rim, wrap, own GLSL), merged over `style.lighting`; `false` opts out.
|
|
14
|
+
- `detail`: a noise (`grain`, `paper`, `stroke`, `dabs`), a texture or your own GLSL laid over the surface in world space (no UVs); its keys: recipe 43.
|
|
15
|
+
- `lighting`: extra light shaping (shadow tint, rim, wrap, own GLSL), merged over `style.lighting`; `false` opts out (recipe 43).
|
|
16
16
|
- toon only: `steps` (number of bands), or `ramp` (+ `soften`). `ramp` on a non-toon type throws.
|
|
17
17
|
- A key the chosen material does not have (`roughness` on lambert) is skipped on purpose, so one spec works for any type.
|
|
18
18
|
A key that looks like a typo of a real one (`roughnes`) warns once in dev with `did you mean 'roughness'?`. Nothing is ever blocked.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Writing a game system module (
|
|
1
|
+
# Writing a game system module (a smelter, a recharging turret, growing crops) that plugs into the engine's contracts
|
|
2
2
|
|
|
3
3
|
A game system is a module (`{ name, install, ... }`) given to `engine.use(...)`. If it follows the five contracts below it saves, loads, skips time,
|
|
4
|
-
shows in `describe()` and the dev bridge, and can be driven by ops, without special cases. Read recipe 06 (clock, skip), 18 (world records), 23 (ops).
|
|
4
|
+
shows in `describe()` and the dev bridge, and can be driven by ops, without special cases. Read recipe 14 (template, hook cheat sheet), 06 (clock, skip), 18 (world records), 23 (ops).
|
|
5
5
|
|
|
6
6
|
## The five contracts
|
|
7
7
|
1. **State.** Prefer world records (`engine.world.add({ kind, ... })`, recipe 18): saved, streamed and far-simulated for you. State that is not a
|
|
@@ -17,7 +17,7 @@ shows in `describe()` and the dev bridge, and can be driven by ops, without spec
|
|
|
17
17
|
`describeText()` show it). A game without a module uses `engine.describe.add(name, fn)`. The name must be new (it throws on a clash).
|
|
18
18
|
5. **Actions are ops.** `engine.ops.define('noun.verb', { args, can, run, offers, reasons, desc })`. `can` is read-only and returns `true` or a reason
|
|
19
19
|
string (a key of `reasons`); `run` changes state; `offers(e, ctx)` lists the arg sets possible right now (shown by the bridge `ops` command and
|
|
20
|
-
`describe`). Call with `engine.ops.run(name, args)` -> `{ ok, value }` or `{ ok: false,
|
|
20
|
+
`describe`). Call with `engine.ops.run(name, args)` -> `{ ok, value }` or `{ ok: false, code, facts, nextActions }` (read `r.code`). Never mutate state from UI code directly.
|
|
21
21
|
|
|
22
22
|
## Declaring stage and dependencies
|
|
23
23
|
`stage` picks where the hooks run (first to last): `control, world, environment, gameplay, presentation, late (default), audio`; `before / after`
|
|
@@ -25,28 +25,28 @@ shows in `describe()` and the dev bridge, and can be driven by ops, without spec
|
|
|
25
25
|
otherwise: put those `engine.use` calls first). `optional: { sky: 'what is lost without it' }` is a soft dependency (use `engine.sky?.`). Core never imports
|
|
26
26
|
modules. The module `name` must not clash with an existing engine property.
|
|
27
27
|
|
|
28
|
-
## One copyable module: a crop
|
|
28
|
+
## One copyable module: something that finishes after a delay (a smelter, a turret recharge, a crop)
|
|
29
29
|
```js
|
|
30
|
-
export const
|
|
31
|
-
const
|
|
30
|
+
export const jobs = () => {
|
|
31
|
+
const started = new Map(); // id -> startedAt (game seconds)
|
|
32
32
|
return {
|
|
33
|
-
name: '
|
|
33
|
+
name: 'jobs', stage: 'gameplay', requires: [],
|
|
34
34
|
install(e) {
|
|
35
|
-
e.saves.register('
|
|
36
|
-
save: () => [...
|
|
37
|
-
load: d => {
|
|
38
|
-
const
|
|
39
|
-
e.ops.define('
|
|
40
|
-
can: (_, { id }) => (
|
|
41
|
-
run: (_, { id }) => {
|
|
42
|
-
e.ops.define('
|
|
43
|
-
can: (_, { id }) => (!
|
|
44
|
-
offers: () => [...
|
|
45
|
-
run: (_, { id }) => {
|
|
46
|
-
reasons: {
|
|
47
|
-
return {
|
|
35
|
+
e.saves.register('jobs', { version: 1, // contract 1: saved and restored
|
|
36
|
+
save: () => [...started],
|
|
37
|
+
load: d => { started.clear(); for (const [id, t] of d) started.set(id, t); } });
|
|
38
|
+
const progress = id => Math.min(1, (e.clock.now - started.get(id)) / 120); // contracts 2+3: derived from clock.now, so normal == skipped
|
|
39
|
+
e.ops.define('job.start', { args: { id: 'string' }, desc: 'Start a job on a machine', // contract 5
|
|
40
|
+
can: (_, { id }) => (started.has(id) ? 'busy' : true),
|
|
41
|
+
run: (_, { id }) => { started.set(id, e.clock.now); return id; }, reasons: { busy: 'Already running' } });
|
|
42
|
+
e.ops.define('job.collect', { args: { id: 'string' }, desc: 'Collect a finished job',
|
|
43
|
+
can: (_, { id }) => (!started.has(id) ? 'idle' : progress(id) < 1 ? 'notDone' : true),
|
|
44
|
+
offers: () => [...started.keys()].filter(id => progress(id) >= 1).map(id => ({ id })),
|
|
45
|
+
run: (_, { id }) => { started.delete(id); e.inventory.add('item', 2); return id; },
|
|
46
|
+
reasons: { idle: 'Nothing running', notDone: 'Not done yet' } });
|
|
47
|
+
return { progress }; // becomes engine.jobs
|
|
48
48
|
},
|
|
49
|
-
describe: e => ({
|
|
49
|
+
describe: e => ({ running: started.size, done: [...started.keys()].filter(id => e.jobs.progress(id) >= 1) }), // contract 4
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
```
|
|
@@ -55,11 +55,11 @@ module (add `requires: ['inventory']`, or drop the `inventory.add` line).
|
|
|
55
55
|
|
|
56
56
|
## Check "advance 10h normally == skip 10h" (bridge, no new tools)
|
|
57
57
|
```
|
|
58
|
-
npx threedog op
|
|
59
|
-
npx threedog reload ; npx threedog op
|
|
60
|
-
npx threedog js "JSON.stringify(engine.
|
|
58
|
+
npx threedog op job.start id=a ; npx threedog step 36000 ; npx threedog describe jobs # A: normal play
|
|
59
|
+
npx threedog reload ; npx threedog op job.start id=a ; npx threedog op time.skip seconds=36000 ; npx threedog describe jobs # B: skipped
|
|
60
|
+
npx threedog js "JSON.stringify(engine.jobs.progress('a'))" # same number both times; compare whole state with: threedog snap-describe save|diff
|
|
61
61
|
```
|
|
62
|
-
Both runs must give equal `describe
|
|
62
|
+
Both runs must give equal `describe jobs` (and `describe time`); if B differs, the module accumulates in `fixed` and needs a `skip` hook or `far`.
|
|
63
63
|
|
|
64
64
|
## What the engine does NOT check for you
|
|
65
65
|
- That `save` really includes **all** your state, or that `load` is the inverse of `save` (an unsaved field silently resets on load).
|
|
@@ -57,7 +57,7 @@ The schema types are those of op args plus `object`, `array` and `function` (opt
|
|
|
57
57
|
time hooks; a `fixed` hook without `skip` is listed under problems (recipe 49).
|
|
58
58
|
|
|
59
59
|
## 5. "How do I get this effect": `threedog how`
|
|
60
|
-
`npx threedog how "rain"`
|
|
60
|
+
`npx threedog how "rain"` scores the words of the task against the AI.md task rows and the recipe headings with their first sentence, and prints the
|
|
61
61
|
top five: the API in the row, the recipe path with section (`recipes/08-weather-sky.md §1`) and a one-line snippet. It reads the docs only, so it works with no page
|
|
62
62
|
and prints the same list every run. When a dev page runs it adds up to three live catalog modules whose name matches the first English word. Words match at a word
|
|
63
|
-
start (`rain` does not hit `terrain`)
|
|
63
|
+
start (`rain` does not hit `terrain`). No hit means rephrase, or read AI.md.
|