threedog 0.1.0 → 0.2.0
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/core/Animator.js +1 -0
- package/core/Assets.js +16 -0
- package/core/DebugOverrides.js +143 -0
- package/core/Describe.js +14 -3
- package/core/Engine.js +32 -69
- package/core/Events.js +59 -1
- package/core/I18n.js +2 -2
- package/core/Inspect.js +12 -32
- package/core/InspectScene.js +7 -3
- package/core/MaterialInfo.js +32 -0
- package/core/Ops.js +43 -59
- package/core/Saves.js +5 -4
- package/core/UrlState.js +3 -2
- package/core/Vars.js +1 -0
- package/core/Views.js +49 -0
- package/core/actor.js +2 -2
- package/core/assetReport.js +83 -0
- package/core/catalog.js +169 -0
- package/core/checks.js +67 -0
- package/core/claims.js +51 -0
- package/core/debugView.js +76 -0
- package/core/describeRender.js +45 -0
- package/core/describeText.js +11 -4
- package/core/errorCodes.js +33 -0
- package/core/errorHints.js +6 -1
- package/core/holds.js +106 -0
- package/core/lifecycle.js +1 -0
- package/core/lightWatch.js +23 -3
- package/core/look/coreParts.js +112 -0
- package/core/look/layers.js +136 -0
- package/core/look/part.js +173 -0
- package/core/look/report.js +79 -0
- package/core/look/write.js +86 -0
- package/core/loop.js +15 -14
- package/core/modules.js +19 -5
- package/core/opsAtomic.js +31 -0
- package/core/opsCheck.js +25 -14
- package/core/opsFail.js +20 -0
- package/core/opsHistory.js +6 -6
- package/core/opsRun.js +77 -0
- package/core/params.js +132 -0
- package/core/renamed.js +21 -0
- package/core/saveApply.js +2 -2
- package/core/sceneMethods.js +9 -34
- package/core/services.js +73 -0
- package/core/startup.js +3 -1
- package/core/styleParts.js +2 -2
- package/core/thingExplain.js +68 -0
- package/core/thingOps.js +35 -24
- package/core/things.js +15 -1
- package/core/util.js +11 -0
- package/core/validate.js +23 -7
- package/docs/AI.md +83 -109
- package/docs/API.md +7 -8
- package/docs/CODEMAP.md +63 -51
- package/docs/COMMANDS.md +17 -5
- package/docs/CONVENTIONS.md +17 -6
- package/docs/THREE.md +3 -3
- package/docs/api/assets.md +2 -0
- package/docs/api/characters.md +2 -0
- package/docs/api/collision.md +4 -0
- package/docs/api/content.md +1 -0
- package/docs/api/engine.md +20 -11
- package/docs/api/events.md +5 -1
- package/docs/api/post.md +5 -4
- package/docs/api/saves.md +2 -1
- package/docs/api/sky.md +3 -3
- package/docs/api/style.md +3 -3
- package/docs/api/tools.md +2 -0
- package/docs/api/weather.md +1 -1
- package/docs/recipes/02-npc.md +16 -0
- package/docs/recipes/03-items-pickups.md +1 -1
- package/docs/recipes/06-clock-events.md +13 -0
- package/docs/recipes/07-flow-scenes-pause.md +4 -0
- package/docs/recipes/08-weather-sky.md +1 -1
- package/docs/recipes/09-style-pack.md +5 -5
- package/docs/recipes/12-navmesh.md +22 -0
- package/docs/recipes/13-animation.md +3 -0
- package/docs/recipes/15-perf.md +1 -1
- package/docs/recipes/16-dev-bridge.md +51 -17
- package/docs/recipes/21-camera.md +51 -2
- package/docs/recipes/23-ops.md +45 -9
- package/docs/recipes/27-net.md +1 -1
- package/docs/recipes/29-grid.md +1 -1
- package/docs/recipes/34-environment-lighting.md +9 -8
- package/docs/recipes/38-environment-look-hooks.md +8 -6
- package/docs/recipes/40-scene.md +29 -0
- package/docs/recipes/41-thing-registry.md +29 -0
- package/docs/recipes/43-shader-patches-surface-looks.md +2 -0
- package/docs/recipes/44-water-weather-look-hooks.md +6 -4
- package/docs/recipes/45-cascaded-shadows.md +1 -1
- package/docs/recipes/46-blender-art-route.md +22 -0
- package/docs/recipes/48-make-material.md +70 -0
- package/docs/recipes/49-game-module-contract.md +71 -0
- package/docs/recipes/50-own-renderer.md +12 -0
- package/docs/recipes/51-capability-catalog.md +63 -0
- package/docs/recipes/52-look.md +108 -0
- package/examples/action/GAMEMAP.md +5 -5
- package/examples/action/content/index.js +2 -1
- package/examples/action/content/views.js +6 -0
- package/examples/sheepisland/GAMEMAP.md +2 -3
- package/examples/styletest/GAMEMAP.md +3 -3
- package/examples/styletest/main.js +1 -1
- package/examples/styletest/panel.js +3 -3
- package/examples/world/GAMEMAP.md +3 -3
- package/index.d.ts +27 -0
- package/index.js +3 -1
- package/llms.txt +5 -0
- package/modules/ambience/Ambience.js +5 -2
- package/modules/camera/FirstPersonCamera.js +3 -5
- package/modules/camera/FixedCamera.js +19 -12
- package/modules/camera/FollowCamera.js +14 -8
- package/modules/camera/RtsCamera.js +3 -5
- package/modules/camera/common.js +40 -10
- package/modules/camera/index.js +1 -1
- package/modules/camera/projection.js +34 -0
- package/modules/characters/Character.js +29 -17
- package/modules/characters/astar.js +14 -7
- package/modules/characters/index.js +6 -3
- package/modules/characters/movers/simple.js +6 -1
- package/modules/characters/npcSim.js +8 -2
- package/modules/characters/pathAsync.js +12 -6
- package/modules/characters/pathJob.js +2 -1
- package/modules/characters/proceduralRig.js +5 -1
- package/modules/characters/useModel.js +22 -0
- package/modules/characters/walkTo.js +58 -0
- package/modules/collision/Collision.js +102 -4
- package/modules/content/explain.js +13 -0
- package/modules/content/index.js +2 -0
- package/modules/content/loader.js +3 -0
- package/modules/content/rules.js +1 -0
- package/modules/debug/DebugPanel.js +11 -5
- package/modules/entities/Entities.js +6 -2
- package/modules/flow/index.js +5 -2
- package/modules/gameplay/Dialogue.js +5 -2
- package/modules/gameplay/Interactions.js +12 -2
- package/modules/gameplay/Inventory.js +21 -11
- package/modules/gameplay/Quests.js +13 -3
- package/modules/gameplay/pickups.js +5 -3
- package/modules/grid/Layer.js +1 -1
- package/modules/grid/index.js +1 -1
- package/modules/grid/tiles.js +9 -5
- package/modules/hlod/index.js +5 -2
- package/modules/hud/index.js +5 -2
- package/modules/level/index.js +5 -3
- package/modules/lights/index.js +5 -2
- package/modules/music/Music.js +6 -2
- package/modules/nav/index.js +5 -3
- package/modules/net/Client.js +4 -3
- package/modules/net/Host.js +2 -2
- package/modules/net/index.js +5 -3
- package/modules/particles/Particles.js +1 -1
- package/modules/photo/Photo.js +10 -7
- package/modules/rigid/RigidBodies.js +5 -2
- package/modules/settings/Settings.js +6 -3
- package/modules/settings/apply.js +2 -1
- package/modules/sky/Sky.js +21 -19
- package/modules/sky/cascades.js +6 -6
- package/modules/sky/domeLayers.js +1 -1
- package/modules/sky/environment.js +39 -13
- package/modules/sky/fog.js +9 -6
- package/modules/sky/frame.js +4 -3
- package/modules/sky/look.js +3 -2
- package/modules/sky/lookFog.js +80 -0
- package/modules/sky/lookShadow.js +50 -0
- package/modules/sky/lookSky.js +108 -0
- package/modules/sky/shader.js +2 -2
- package/modules/sky/shadow.js +4 -10
- package/modules/sky/skyModule.js +4 -3
- package/modules/terrain/ChunkManager.js +2 -33
- package/modules/terrain/chunkLevels.js +40 -0
- package/modules/terrain/index.js +10 -2
- package/modules/terrain/lookGround.js +61 -0
- package/modules/timeline/Timeline.js +7 -3
- package/modules/timeline/Tween.js +3 -7
- package/modules/timeline/shots.js +6 -4
- package/modules/triggers/index.js +9 -2
- package/modules/vegetation/Vegetation.js +2 -1
- package/modules/vegetation/index.js +6 -3
- package/modules/vegetation/lookWind.js +37 -0
- package/modules/water/Water.js +19 -3
- package/modules/water/look.js +80 -0
- package/modules/weather/Weather.js +22 -31
- package/modules/weather/look.js +75 -0
- package/modules/weather/particles.js +1 -1
- package/modules/weather/strings.js +15 -0
- package/modules/world/explain.js +11 -0
- package/modules/world/index.js +11 -4
- package/modules/world/thingSource.js +44 -0
- package/package.json +1 -1
- package/render/PostFX.js +48 -51
- package/render/effects.js +4 -2
- package/render/fuse.js +12 -0
- package/render/lights.js +4 -2
- package/render/lookSurface.js +161 -0
- package/render/materials.js +27 -10
- package/render/postLook.js +86 -0
- package/render/surface.js +3 -1
- package/types/core.d.ts +216 -24
- package/types/gameplay.d.ts +10 -0
- package/types/generated/core/DebugOverrides.d.ts +52 -0
- package/types/generated/core/Events.d.ts +43 -0
- package/types/generated/core/Ops.d.ts +62 -21
- package/types/generated/core/Saves.d.ts +1 -0
- package/types/generated/core/Views.d.ts +33 -0
- package/types/generated/modules/debug/DebugPanel.d.ts +2 -2
- package/types/generated/modules/grid/Layer.d.ts +1 -0
- package/types/generated/modules/sky/Sky.d.ts +10 -17
- package/types/generated/modules/weather/Weather.d.ts +5 -15
- package/types/generated/render/PostFX.d.ts +20 -23
- package/types/generated/render/materials.d.ts +10 -0
- package/types/physics.d.ts +8 -0
- package/types/style.d.ts +16 -6
- package/ui/Parts.js +6 -2
- package/ui/UI.js +1 -1
- package/ui/defaults.js +1 -1
- package/docs/api/debug.md +0 -10
package/core/validate.js
CHANGED
|
@@ -92,16 +92,32 @@ export function warnMissing(kind, name, list) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
95
|
+
* The one unknown-option rule, shared by readParams (strict) and checkOptions (loose): text for a key not in known, or null when it is fine.
|
|
96
|
+
* Why one function: the "did you mean" search and the wording must not drift between the two readers.
|
|
97
|
+
* soft: a key with no close match is not reported (data like items and entities, where games add their own fields).
|
|
98
|
+
*/
|
|
99
|
+
export function unknownOptionText(where, key, known, { soft = false } = {}) {
|
|
100
|
+
if (known.includes(key)) return null;
|
|
101
|
+
const c = closest(key, known);
|
|
102
|
+
if (!c && soft) return null;
|
|
103
|
+
return fmt(STRINGS.unknownKey, { where, key, hint: c ? fmt(STRINGS.didYouMean, { name: c }) : fmt(STRINGS.available, { list: known.join(', ') }) });
|
|
104
|
+
}
|
|
105
|
+
/** Is options an object a game passed (not a Three.js object, array or missing)? */
|
|
106
|
+
export const isOptionsObject = o => !!o && typeof o === 'object' && !Array.isArray(o) && !o.isObject3D && !o.isVector3;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Check an options object for unknown keys (the loose mode of readParams: same detection, same hint, but nothing is read or filled in).
|
|
110
|
+
* where is the origin (such as 'npcs.add()'), known are the keys the code actually reads.
|
|
111
|
+
* It only warns (once), in every build: the callers are hand-written checks of data and style objects that games and tests deliberately feed
|
|
112
|
+
* misspellings, and their known lists can lag behind the code. The module factories that went through readParams (the strict mode: dev throws,
|
|
113
|
+
* release warns once, decision 2026-11-01) get the throw there. loose: report only near-misses (items and entities, where games add their own fields).
|
|
97
114
|
*/
|
|
98
115
|
export function checkOptions(where, opts, known, { loose = false } = {}) {
|
|
99
|
-
if (!enabled || !
|
|
116
|
+
if (!enabled || !isOptionsObject(opts)) return;
|
|
100
117
|
for (const k of Object.keys(opts)) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
warnOnce(fmt(STRINGS.unknownKey, { where, key: k, hint: c ? fmt(STRINGS.didYouMean, { name: c }) : fmt(STRINGS.available, { list: known.join(', ') }) }));
|
|
118
|
+
const msg = unknownOptionText(where, k, known, { soft: loose });
|
|
119
|
+
if (!msg) continue;
|
|
120
|
+
warnOnce(msg);
|
|
105
121
|
}
|
|
106
122
|
}
|
|
107
123
|
|
package/docs/AI.md
CHANGED
|
@@ -4,146 +4,120 @@ threedog.js is a web 3D game engine on top of three.js 0.187 (plain three.js, no
|
|
|
4
4
|
demand with `engine.use`) -> **style pack** (all art, an optional separate package; the engine ships none and draws gray placeholders without one).
|
|
5
5
|
This file is the index for the AI that builds a game on the engine. Paths are relative to this `docs/` folder (`node_modules/threedog/docs/`).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## Most common mistakes
|
|
8
|
+
- Hand-writing a system the table lists (inventory, saves, quests, grids, collision): find the row first.
|
|
9
|
+
- `Math.random()`, `setTimeout`, `performance.now()` in game logic: use `engine.random`, `engine.clock.after / every`, fixed `dt`.
|
|
10
|
+
- `addEventListener('keydown')` for gameplay: define an action with `input.define` and read it in the fixed step.
|
|
11
|
+
- Changing gameplay state from a frame hook or a raw callback: do it in `onFixed`, in an op, or via `engine.nextFixed(fn)`.
|
|
12
|
+
- Saving positions or object references: save stable ids; `await` every `saves.*` call.
|
|
13
|
+
- A mesh added with plain `scene.add` and no id: `engine.add(obj, { id })` is what makes it saveable and inspectable.
|
|
14
|
+
- Changing a look by editing `renderer` / `scene.fog` / materials directly, or in logic: `engine.look.<part>` (recipe 52), values in the style pack.
|
|
15
|
+
- Putting game content (dialogue, quests, items, layout) inside the engine package: it lives in the game's `content/`.
|
|
16
|
+
- Editing generated docs (GAMEMAP, API.md, api/, CODEMAP, `types/generated/`): change the code, run `npm run map`.
|
|
17
|
+
- Guessing a name: look it up in `api/<module>.md`; an engine error carries `err.code` / `err.fix` / `err.docs`.
|
|
9
18
|
|
|
10
19
|
## What to read, in order (stop when you have enough)
|
|
11
20
|
1. This file: find the task in the entry table below.
|
|
12
21
|
2. The recipe the row points to (`recipes/NN-*.md`): how to do the task, with a working pattern.
|
|
13
|
-
3. `api/<module>.md` for signatures, options and data shapes (
|
|
22
|
+
3. `api/<module>.md` for signatures, options and data shapes (`API.md` is the index, `api/events.md` the events).
|
|
14
23
|
4. The game's own `GAMEMAP.md` (generated): what this game has, and "Read for this game".
|
|
15
|
-
5. When needed: `CODEMAP.md`
|
|
16
|
-
`COMMANDS.md` (commands, scenarios, folders) · `CONVENTIONS.md` (the conventions below in detail).
|
|
24
|
+
5. When needed: `CODEMAP.md` · `THREE.md` (what the engine lacks: use three.js) · `PERF.md` · `COMMANDS.md` · `CONVENTIONS.md`.
|
|
17
25
|
|
|
18
|
-
|
|
26
|
+
What can I do here: `threedog catalog`, `threedog how "<task>"` (ranks these rows and recipes for a task in your own words).
|
|
19
27
|
|
|
20
28
|
## One thing, one entry point (don't build another)
|
|
21
|
-
Three outward concepts: **Scene** (what is in the world
|
|
22
|
-
|
|
23
|
-
Patches, ops and world records are the scene's inner machinery.
|
|
29
|
+
Three outward concepts: **Scene** (what is in the world; content packs are part of it), **Assets** (models, textures, sounds, fonts),
|
|
30
|
+
**Style** (the look; material roles are labels inside it). Patches, ops and world records are the scene's inner machinery.
|
|
24
31
|
|
|
25
32
|
### Scene
|
|
26
33
|
| To do | Use | Recipe |
|
|
27
34
|
|---|---|---|
|
|
28
|
-
| New game, project layout | `npm run new-game name`, `createEngine({ canvas, style })`, `engine.use(...)`, `engine.start()` | `recipes/01-new-game.md` |
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
| Grass and trees without terrain | `vegetation({ area })`, rule `biomes` by ground type, `engine.vegetation.rebuild()` | `recipes/10-blender-level.md` §4 |
|
|
41
|
-
| Terrain generator, ground height, terrain editing | `terrain({ height, groundType })` or `terrainPreset()` (`@threedog/terrain-noise`; none = flat), `engine.surface(x, z)`, `engine.ground`, `engine.terrain.edit()` | `recipes/28-terrain.md` |
|
|
42
|
-
| Ground color borders (river banks), mesh cut, lighting normals | `terrain({ shading: 'texture', colorResolution, normals, normalFn, diagonal, boundsPad })` | `recipes/37-terrain-look-hooks.md` |
|
|
35
|
+
| New game, project layout, canvas inside a page or editor panel | `npm run new-game name`, `createEngine({ canvas, style })`, `engine.use(...)`, `engine.start()` | `recipes/01-new-game.md` |
|
|
36
|
+
| Preset parts on / off, blank game | `openWorld({ camera: 'follow', sky: {...}, debug: false })`, `new-game name --blank` | `recipes/01-new-game.md` |
|
|
37
|
+
| Put something in the scene | `engine.add(obj, { id })`, `engine.spawn(name, at)`, content props | `recipes/40-scene.md` |
|
|
38
|
+
| Game content data, content packs | `engine.content.load(data, { places })`, `load([base, dlc])`, rules in `content/rules.js` | `recipes/20-content-actions-save.md` |
|
|
39
|
+
| Reusable object definitions (prefabs) | content `templates`; props `{ template, x, z }` | `recipes/30-templates.md` |
|
|
40
|
+
| Props, many repeated objects, delete an object, static batching | content `props` / `vegetation`, `engine.remove(obj)`, `engine.batching` (`batch: false`, `tint`) | `recipes/05-props-bake.md` |
|
|
41
|
+
| What is this thing, where is it defined (point -> id) | `engine.pick(x, y).thing`, `engine.world.origin(id)`, `engine.thing(id).explain()` | `recipes/30-templates.md` §5 |
|
|
42
|
+
| Saved / far-away objects, the player record, stream in, teleport | `engine.world`, `player.placeAt()`, `engine.stream.add / teleport / source` | `recipes/18-world.md` |
|
|
43
|
+
| Blender level, grass and trees without terrain | `engine.level`, `npm run assets -- check`, `vegetation({ area })`, `engine.vegetation.rebuild()` | `recipes/10-blender-level.md` |
|
|
44
|
+
| Terrain generator, ground height, terrain editing | `terrain({ height, groundType })`, `terrainPreset()`, `engine.surface(x, z)`, `engine.ground`, `engine.terrain.edit()` | `recipes/28-terrain.md` |
|
|
45
|
+
| Ground color borders, mesh cut, lighting normals | `terrain({ shading: 'texture', colorResolution, normals, diagonal })` | `recipes/37-terrain-look-hooks.md` |
|
|
46
|
+
| Island, floating rock, world with an edge | `terrain({ shape: { mask, edge, side, bottom } })`, `engine.ground.has`, event `terrain:void` | `recipes/42-terrain-shape.md` |
|
|
43
47
|
| Grid placement, per-cell soil state | `engine.grids.add / define`, ops `grid.place / move / remove` | `recipes/29-grid.md` |
|
|
44
|
-
| Collision, physics, vehicles | `engine.collision
|
|
45
|
-
| Pathfinding, navmesh, "can walk there" | `engine.characters.findPath
|
|
46
|
-
| Interaction prompts (talk, pick up, open) | `engine.interactions
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| Items, pickups, inventory | content `items` / `pickups`, `engine.inventory` | `recipes/03-items-pickups.md` |
|
|
52
|
-
| Chests, corpses, shelves, transfers | `engine.inventory.container(id, { capacity, items })`, `inventory.transfer(from, to, item, n)` | `recipes/22-shop-gold.md` |
|
|
53
|
-
| Shops, gold | currency item + ops | `recipes/22-shop-gold.md` |
|
|
54
|
-
| Quests, objective markers | content `quests` (a step's `target` is marked automatically), `engine.quests`, `engine.hud.marker()` | `recipes/04-quests.md` |
|
|
48
|
+
| Collision, fences, rivers, physics, vehicles | `engine.collision` (`addSegment`, `addBlocked`, `lineClear`), `engine.rigid` | `recipes/11-vehicles.md` |
|
|
49
|
+
| Pathfinding, navmesh, "can walk there" | `engine.characters.findPath`, `engine.nav`, `createEngine({ movement })` | `recipes/12-navmesh.md` |
|
|
50
|
+
| Interaction prompts (talk, pick up, open a door or chest), trigger zones | `engine.interactions`, `interactions({ ...presets.interactions.nearest })`, `engine.triggers` | `recipes/20-content-actions-save.md` |
|
|
51
|
+
| Ray / mouse picking, shooting, lock-on | `engine.raycast / pick`, `engine.rays.addStatic`, `engine.entities`, `engine.particles` | `recipes/19-shooting-picking.md` |
|
|
52
|
+
| NPCs and what they do, dialogue | content `npcs` (`behavior`), `engine.npcs.behavior`, content `dialogues`, `engine.dialogue` | `recipes/02-npc.md` |
|
|
53
|
+
| Items, pickups, inventory, chests, shops, gold | content `items` / `pickups`, `engine.inventory` (`container`, `transfer`), currency item + ops | `recipes/03-items-pickups.md`, `22-shop-gold.md` |
|
|
54
|
+
| Quests, objective markers | content `quests`, `engine.quests`, `engine.hud.marker()` | `recipes/04-quests.md` |
|
|
55
55
|
| Player and characters | `engine.player`, `engine.characters.createPlayer({ ...presets.player.thirdPerson, model })` | `recipes/13-animation.md` |
|
|
56
|
-
| Camera | `openWorld({ camera })` (required), `engine.setCamera(...)`, `engine.cameraRig` | `recipes/21-camera.md` |
|
|
57
|
-
| Action game: hp, attacks, enemy AI, drops
|
|
56
|
+
| Camera, orthographic camera | `openWorld({ camera })` (required), `engine.setCamera(...)`, `engine.cameraRig`, `engine.takeCamera` | `recipes/21-camera.md` |
|
|
57
|
+
| Action game: hp, attacks, enemy AI, drops | your ops + `world.simulate` + `inventory.spawnPickup`; `examples/action/` | `recipes/32-action-game.md` |
|
|
58
|
+
| Use three.js directly, own renderer, no default lights | `engine.scene / renderer / camera`, `createEngine({ lights: false, renderer })` | `recipes/40-scene.md` §8, `50-own-renderer.md` |
|
|
58
59
|
|
|
59
60
|
### Assets
|
|
60
61
|
| To do | Use | Recipe |
|
|
61
62
|
|---|---|---|
|
|
62
|
-
| Art assets, asset packs, fonts, loading, what failed | `engine.assets.manifest({ models, textures, sounds, fonts })
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
| Sound, buses, ambience
|
|
63
|
+
| Art assets, asset packs, fonts, loading, what failed | `engine.assets.manifest({ models, textures, sounds, fonts })`, `engine.loading`, `threedog loading` | `recipes/05-props-bake.md` |
|
|
64
|
+
| Real art assets: Blender -> GLB, baked textures | `threedog assets check [--against old.glb]`, `engine.assets.manifest({ models })` | `recipes/46-blender-art-route.md` |
|
|
65
|
+
| Skeletal animation, far detail (HLOD) | `engine.assets.animate(model, config)`, `anim.sync`, `character.onPose(fn)`, `engine.hlod` | `recipes/13-animation.md`, `15-perf.md` |
|
|
66
|
+
| Sound, buses, ambience, music, footsteps | `createEngine({ audio })`, `engine.audio.sfx(name)`, `engine.ambience`, `engine.music` | `recipes/31-audio.md` |
|
|
66
67
|
|
|
67
|
-
### Style
|
|
68
|
+
### Style and look
|
|
68
69
|
| To do | Use | Recipe |
|
|
69
70
|
|---|---|---|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
| Water depth
|
|
74
|
-
| Shadows too blurry near the camera | `
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
| Environment lighting (PBR reflections, ambient from the sky or an HDR) | `engine.sky.setEnvironment({ source: 'sky' \| asset name })` | `recipes/34-environment-lighting.md` |
|
|
82
|
-
| Color grading, grain, vignette, depth of field; outline modes | `@threedog/post-effects`: `bloom`, `ao`, `outline`, `dof`, `lut`… (`style: [lowpoly, postAdd(vignette({ enabled: true }), grain({ enabled: true }))]`); a style pack never imports another style pack, shared effects come from post-effects (R34) | `recipes/09-style-pack.md` |
|
|
83
|
-
| Many lights (torches, lamps, muzzle flashes) | `lightPool({ point })`, `engine.lightPool.add(obj, { color, intensity, distance, flicker, glow })` | `recipes/09-style-pack.md` |
|
|
84
|
-
| Day, night, seasons, sky, weather | `engine.sky` (`at / between / daily / onSeason`, `isDay`; fixed unless `sky({ dayLength })`), `engine.weather` (`weather({ types })`) | `recipes/08-weather-sky.md` |
|
|
85
|
-
| Water | `engine.water` | `recipes/08-weather-sky.md` |
|
|
86
|
-
| Shadow type and softness | `createEngine({ shadowType: 'basic' \| 'pcf' \| 'vsm' })`, `engine.sky.setShadow({ type, radius })`; switching recompiles materials | `recipes/15-perf.md` |
|
|
71
|
+
| Change any look at run time: tone, lights, fog, sky, clouds, shadow, wind, ground, water, weather, post | `engine.look.<part>.set / patch / replace` (`engine.catalog('look')`); own plain three.js: when to | `recipes/52-look.md`, `40-scene.md` §8 |
|
|
72
|
+
| Set the starting look: pack, materials, mixing packs, exposure, sky layers | style pack (`style: [lowpoly, { sky }]`), `engine.makeMaterial('role', {...})`, `style.palette`, `postAdd` / `postRemove` | `recipes/09-style-pack.md`, `36-sky-ground-plant-looks.md`, `48-make-material.md` |
|
|
73
|
+
| Material and lighting shader patches, toon ramp, wind, fog hooks | `applyEffects`, `look.surface.patch`, `look.wind.patch`, `look.fog.patch` | `recipes/43-shader-patches-surface-looks.md`, `38-environment-look-hooks.md` |
|
|
74
|
+
| Water depth / foam, rain and snow shapes, own weather particles, snow cover, backdrop | `look.water`, `look.weather`, `style.weather.snow.cover`, `style.sky.backdrop` | `recipes/44-water-weather-look-hooks.md`, `47-island-snow-backdrop.md` |
|
|
75
|
+
| Shadows too blurry near the camera; shadow type | `look.shadow.set({ cascades: 3, type })` | `recipes/45-cascaded-shadows.md`, `15-perf.md` |
|
|
76
|
+
| Environment lighting (PBR reflections, HDR) | `look.env.replace('sky' | asset)`, `look.env.set({ intensity })`\| asset })`, `look.env` | `recipes/34-environment-lighting.md` |
|
|
77
|
+
| Color grading, grain, vignette, DOF, outline, bloom | `@threedog/post-effects`, `postAdd(vignette())`, `engine.post`, `look.post.set` | `recipes/09-style-pack.md`, `52-look.md` |
|
|
78
|
+
| Many lights (torches, lamps, muzzle flashes) | `lightPool({ point })`, `engine.lightPool.add(obj, { color, intensity, distance, flicker })` | `recipes/09-style-pack.md` |
|
|
79
|
+
| Day, night, seasons, sky, weather, water, isDay | `engine.sky` (`at / between / daily / onSeason`), `engine.weather`, `engine.water` | `recipes/08-weather-sky.md` |
|
|
80
|
+
| Who set tone / post / lights; why does it look like this | `engine.describe().look` (value, by, at), `describe().render`, `debug.view('albedo'\|'lighting'\|'shadow'\|'normals')` | `recipes/52-look.md`, `16-dev-bridge.md` |
|
|
81
|
+
| New style from a reference image | `threedog style palette <image>`, `npm run new-style`, `style check`, `style compare <ref> <shot>` | `recipes/35-style-from-reference.md` |
|
|
87
82
|
|
|
88
83
|
### Rules and flow
|
|
89
84
|
| To do | Use | Recipe |
|
|
90
85
|
|---|---|---|
|
|
91
|
-
| Player actions, UI buttons that change state | `engine.ops.define('noun.verb', { can, run, undo })`, `ops.run(name, args)
|
|
92
|
-
|
|
|
86
|
+
| Player actions, UI buttons that change state | `engine.ops.define('noun.verb', { can, run, undo })`, `ops.run(name, args)` | `recipes/23-ops.md` |
|
|
87
|
+
| What can this game do (modules, ops, saves, time) | `engine.catalog(id?)`, `threedog catalog [id]` | `recipes/51-capability-catalog.md` |
|
|
88
|
+
| Why can't / what can the player do here | `engine.explain(...)`, `engine.inspect(at?)`, `describeText()`, scenario tests | `recipes/23-ops.md` |
|
|
93
89
|
| Story flags, counters | `engine.vars` (`setFlag / flag / bump / counter`, saved) | `recipes/20-content-actions-save.md` |
|
|
94
|
-
| Saves | `engine.saves.register(key, { save, load })
|
|
95
|
-
| New game / continue / back to title / retry | `await engine.session.newGame() / load(slot)`, `quit()
|
|
96
|
-
| Scene flow, fades, pausing
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
| Drive the game from an MCP client (Claude Code, Cursor) | `claude mcp add threedog -- npx threedog mcp` (`js` only with `--allow-js`) | `recipes/16-dev-bridge.md` §10 |
|
|
108
|
-
| Describe state for tests | `engine.describe()`, `engine.describe.add(name, fn)`, `describeText()` | `recipes/16-dev-bridge.md` |
|
|
109
|
-
| An engine error: what to do | `err.code` / `err.fix` / `err.docs` (also `engine.error`, `.threedog/errors.log`) | `recipes/16-dev-bridge.md` §8 |
|
|
110
|
-
| What is this thing / will a save keep it | `engine.add(obj, { id })` (only an id makes it saveable), `engine.thing(id \| obj)`, `pick().thing`, ops `thing.set` / `thing.remove` (undoable) | `recipes/41-thing-registry.md` |
|
|
111
|
-
| Your own module | `{ name, install, fixed, frame, describe, afterLoad }` + `engine.use` | `recipes/14-custom-module.md` |
|
|
112
|
-
| A module will not install, or runs in the wrong order | `engine.use(a, b)` installs a batch atomically; `before` / `after` sort inside one `stage`; `critical: true` | `recipes/14-custom-module.md` |
|
|
113
|
-
| Heavy loops, workers, background results | `engine.jobs.add(function* () {})`, `engine.threads.lane(...)`, `engine.commits` | `recipes/15-perf.md` |
|
|
114
|
-
| Performance budget, debug panel, where the time goes | `engine.budget`, `engine.debug`, `describe().perf`, `threedog capture` | `recipes/15-perf.md` |
|
|
115
|
-
| Random operation sequences, order-dependent bugs | the engine repository's `Properties` specs (fast-check) | `recipes/23-ops.md` |
|
|
90
|
+
| Saves: save game, load game, progress, slot, autosave, 存档 | `engine.saves.register(key, { save, load })`, `saves.autosave(minutes)` | `recipes/20-content-actions-save.md` |
|
|
91
|
+
| New game / continue / back to title / retry | `await engine.session.newGame() / load(slot)`, `quit()`, `session.track(h)` | `recipes/07-flow-scenes-pause.md` |
|
|
92
|
+
| Scene flow, fades, pausing, cutscenes, tweens | `engine.flow`, `fadeScreen(engine, to, s)`, `engine.pause(owner)`, `engine.timeline.tween` | `recipes/07-flow-scenes-pause.md` |
|
|
93
|
+
| Time, timers, skipping time | `engine.clock` (`after / every`), `await engine.skip({ to: '06:00' })`, `checkSkip`, `checkSave` | `recipes/06-clock-events.md` |
|
|
94
|
+
| Events, cause chain, randomness | `engine.events.on / emit`, `engine.random` (saved), `events.trace(name)`, `traceFocus(id)` | `recipes/06-clock-events.md` |
|
|
95
|
+
| Keys, input contexts, open / interact key; text and languages (`engine.t`, `engine.i18n`) | `input.define('action', keys, label)`, `engine.input.push('menu')`, `input.simulate` | `recipes/26-ui-parts.md` |
|
|
96
|
+
| Screen UI parts, Esc layering, settings menu, labels over the world, photo mode | `createEngine({ ui })`, `engine.ui.set`, `engine.hud`, `engine.settings`, `worldToScreen()`, `engine.photo` | `recipes/26-ui-parts.md` |
|
|
97
|
+
| Drive and test the running game | dev bridge: `applyState`, `defineState`, `status`, `verify <scenario>`, `scene --hidden`, `state`, `step`, `skip` | `recipes/16-dev-bridge.md` |
|
|
98
|
+
| Fixed camera views, same shot before / after | `engine.views.define`, `shot --view name --compare` | `recipes/46-blender-art-route.md` |
|
|
99
|
+
| Drive the game from an MCP client | `claude mcp add threedog -- npx threedog mcp` | `recipes/16-dev-bridge.md` §10 |
|
|
100
|
+
| Will a save keep it; hide / recolor on screen only | `engine.add(obj, { id })`, `engine.thing(id)`, ops `thing.set / remove`, `debug.override(owner, id, {...})` | `recipes/41-thing-registry.md` |
|
|
101
|
+
| Your own module, own game system (crop, machine) | `{ name, install, fixed, frame, describe, afterLoad }`, `engine.use`; `before` / `after`, `critical`; save, `skip` hook, ops `can` | `recipes/14-custom-module.md`, `49-game-module-contract.md` |
|
|
102
|
+
| Heavy loops, workers; performance budget, debug panel | `engine.jobs.add`, `engine.threads.lane`, `engine.commits`, `engine.budget`, `engine.debug.panel`, `threedog capture` | `recipes/15-perf.md` |
|
|
116
103
|
| Co-op multiplayer | `engine.use(net({ role, transport }))`, `engine.net` | `recipes/27-net.md` |
|
|
117
104
|
|
|
118
|
-
## Commands
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
## Commands
|
|
106
|
+
Drive the running game with the MCP tools or `node node_modules/@threedog/tools/bin/threedog.mjs <cmd>` (avoid npx: +2.5 s per call); details
|
|
107
|
+
in `COMMANDS.md`. `npm run dev` · `npm run check` (after every change) · `npm test -- name` (related tests only) · `npm run map` (after code,
|
|
108
|
+
JSDoc or content changes). Browser errors go to `.threedog/errors.log`: **read it first when something breaks**.
|
|
121
109
|
|
|
122
110
|
## Verification rules for AI
|
|
123
|
-
1. Order: `npm run map`
|
|
124
|
-
2. Check logic with `describeText()`, not screenshots;
|
|
125
|
-
|
|
126
|
-
3. Screenshots only for what the eye must judge. A known error names the recipe to read.
|
|
111
|
+
1. Order: `npm run map` -> `npm run check` -> the related tests.
|
|
112
|
+
2. Check logic with `describeText()`, not screenshots; screenshots only for what the eye must judge. Ops run through the bridge change this
|
|
113
|
+
session only; a lasting change is an edit to `content/*.js`. `main.js` sets `window.engine = engine` before `start()`.
|
|
127
114
|
|
|
128
|
-
## Conventions (
|
|
115
|
+
## Conventions (detailed in `CONVENTIONS.md`)
|
|
129
116
|
- **A position is one argument** (Vector3, Object3D, `[x, y, z]` or `{ x, z }`); sizes and counts go in the options object after it.
|
|
130
|
-
- **Registrations return a handle**; `h.remove()` undoes it.
|
|
131
|
-
- **
|
|
132
|
-
- **
|
|
133
|
-
- **
|
|
134
|
-
- **Input**: gameplay keys in the fixed step, UI keys in the frame hook; never `addEventListener('keydown')` for gameplay.
|
|
135
|
-
- **Gameplay state** (world, containers, vars, quests) changes only in fixed steps or ops.
|
|
136
|
-
- **The engine owns** sky lights, fog and the camera every frame; adjust with `engine.sky.modify` / `engine.cameraOverride`.
|
|
137
|
-
- **Two doors, one scene**: plain three.js (`engine.add(mesh, { id })`) and templates (`engine.spawn`, content props) land in the same
|
|
138
|
-
scene (`recipes/40-scene.md`). Put what must be saved and edited without code in content (stable ids: `npx threedog content ids --write`,
|
|
139
|
-
`content/renames.js`); <!-- r18-ignore-line --> the check (R33) flags only startup calls that would repeat after a load. <!-- r18-ignore-line -->
|
|
140
|
-
- **Look parameters** belong in the style pack or content, never in logic; materials via `makeMaterial`.
|
|
141
|
-
- **Units** are meters, Y up, north -Z; characters face +Z.
|
|
142
|
-
- **Errors say how to fix it**: an old form throws with the fix.
|
|
117
|
+
- **Registrations return a handle**; `h.remove()` undoes it. **Ready is the boolean `ready`**. **Event names are `noun:action`**.
|
|
118
|
+
- **Fixed step vs frame**: `onFixed` runs game time (damage, AI, timers); `onFrame` is presentation (animation, camera feel, HUD).
|
|
119
|
+
- **The engine owns** sky lights, fog and the camera every frame: see CONVENTIONS "Adjusting sky brightness".
|
|
120
|
+
- **Units** are meters, Y up, north -Z; characters face +Z. **Errors say how to fix it**: an old form throws with the fix.
|
|
143
121
|
|
|
144
122
|
## Stability
|
|
145
|
-
Tested but may change before 1.0 (
|
|
146
|
-
`grids()` · `engine.terrain.edit` · `world.simulate(kind, { worker: true })` · `engine.post.add` · `engine.stream.source` · `hlod()` · `engine.ops.guard / allow`.
|
|
147
|
-
|
|
148
|
-
## Hard rule for game content
|
|
149
|
-
Game content (dialogues, quests, items, map layout) lives in the game's own `content/` folder, never inside the engine.
|
|
123
|
+
Tested but may change before 1.0: `net()` · `engine.threads` · `grids()` · `terrain.edit` · `world.simulate({ worker })` · `look.post.add` · `stream.source` · `hlod()` · `ops.guard / allow`.
|
package/docs/API.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Engine API index (generated, do not edit by hand; produced by npm run map)
|
|
2
2
|
|
|
3
|
-
> **To do something, first look at the recipe in `recipes/` whose file name matches** (it has a ready-made pattern, faster than browsing the API): 01-new-game · 02-npc · 03-items-pickups · 04-quests · 05-props-bake · 06-clock-events · 07-flow-scenes-pause · 08-weather-sky · 09-style-pack · 10-blender-level · 11-vehicles · 12-navmesh · 13-animation · 14-custom-module · 15-perf · 16-dev-bridge · 18-world · 19-shooting-picking · 20-content-actions-save · 21-camera · 22-shop-gold · 23-ops · 26-ui-parts · 27-net · 28-terrain · 29-grid · 30-templates · 31-audio · 32-action-game · 33-stream-sources · 34-environment-lighting · 35-style-from-reference · 36-sky-ground-plant-looks · 37-terrain-look-hooks · 38-environment-look-hooks · 40-scene · 41-thing-registry · 42-terrain-shape · 43-shader-patches-surface-looks · 44-water-weather-look-hooks · 45-cascaded-shadows · 46-blender-art-route · 47-island-snow-backdrop
|
|
3
|
+
> **To do something, first look at the recipe in `recipes/` whose file name matches** (it has a ready-made pattern, faster than browsing the API): 01-new-game · 02-npc · 03-items-pickups · 04-quests · 05-props-bake · 06-clock-events · 07-flow-scenes-pause · 08-weather-sky · 09-style-pack · 10-blender-level · 11-vehicles · 12-navmesh · 13-animation · 14-custom-module · 15-perf · 16-dev-bridge · 18-world · 19-shooting-picking · 20-content-actions-save · 21-camera · 22-shop-gold · 23-ops · 26-ui-parts · 27-net · 28-terrain · 29-grid · 30-templates · 31-audio · 32-action-game · 33-stream-sources · 34-environment-lighting · 35-style-from-reference · 36-sky-ground-plant-looks · 37-terrain-look-hooks · 38-environment-look-hooks · 40-scene · 41-thing-registry · 42-terrain-shape · 43-shader-patches-surface-looks · 44-water-weather-look-hooks · 45-cascaded-shadows · 46-blender-art-route · 47-island-snow-backdrop · 48-make-material · 49-game-module-contract · 50-own-renderer · 51-capability-catalog · 52-look
|
|
4
4
|
> The api pages are generated too, do not edit them by hand; `?` in a signature means optional, what follows `→` is the return value; the full types are in `types/*.d.ts`.
|
|
5
5
|
> With no matching recipe: read this page first: the core everyday API + one line per core object / module (listing method names). For the one you need, **read only that page** `api/<name>.md` (methods, parameters, properties and data structures are all in it).
|
|
6
6
|
> Paths are relative to the package (`node_modules/threedog/`). Entry: `import { createEngine, openWorld, … } from 'threedog'` (the engine package's own examples use relative paths); a module that is not installed is undefined, so use `engine.xxx?.method()`.
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
- `engine.snapToGround(obj: T, offset?: number) → T` — Put an object on the ground under it (y = ground height + offset) and return the object
|
|
22
22
|
- `engine.raycast(origin: Vec3Like, dir: Vec3Like, opts?: RaycastOptions) → RayHit | null` — Ray: shoot from origin along dir, returns the nearest hit or null…
|
|
23
23
|
- `engine.pick(ndcX: number, ndcY: number, opts?: RaycastOptions) → RayHit | null` — Shoot a ray through the camera from screen coordinates (-1..1, e.g. input.pointer.ndcX/ndcY)
|
|
24
|
-
- `engine.freeze(owner?: string)` — Gameplay pause (menu, flow's paused): fixed steps are skipped entirely…
|
|
25
|
-
- `engine.pause()` — Pause the real-time loop: the picture stops and even rendering stops, only step() advances…
|
|
24
|
+
- `engine.freeze(owner?: string | { owner?, kind? }, opts?: { kind?: 'title' }) → ChainedHandle` — Gameplay pause (menu, flow's paused): fixed steps are skipped entirely…
|
|
25
|
+
- `engine.pause(owner?: string | { owner?, kind? }, opts?: { kind?: 'test' }) → ChainedHandle` — Pause the real-time loop: the picture stops and even rendering stops, only step() advances…
|
|
26
26
|
- `engine.stateApplied` — Scenario is ready: start() completed, and the URL parameters / the latest applyState have all been …
|
|
27
27
|
- `engine.ready` — True once start() completes and the loading screen is gone…
|
|
28
28
|
- `engine.player` — The player (exists only after characters.createPlayer())
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
- `engine.camera` — three.js perspective camera
|
|
31
31
|
|
|
32
32
|
## Core objects (engine.xxx, no install needed)
|
|
33
|
-
- [`engine.events`](api/events.md) the event bus: recent on once emit; event table
|
|
33
|
+
- [`engine.events`](api/events.md) the event bus: traceFocus note trace recent on once emit; event table
|
|
34
34
|
- [`engine.input`](api/input.md) Input: read by "action": define touchButton simulate rebind keysOf label down pressed released pressedRaw push
|
|
35
35
|
- [`engine.clock`](api/clock.md) game seconds and "after how long / every how long": after every
|
|
36
36
|
- [`engine.vars`](api/vars.md) story flags and counters (autosaved): flag setFlag counter bump
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
- [`engine.jobs`](api/jobs.md) engine.jobs queues build work in a binary heap: add run
|
|
43
43
|
- [`engine.stream`](api/stream.md) engine.stream builds on demand by space: only entries n…: add setRadius source teleport readyCheck sources
|
|
44
44
|
- [`engine.budget`](api/budget.md) performance budget (turned on by createEngine: enable disable metric limitOf report checkStartup values byTag
|
|
45
|
-
- [`engine.post`](api/post.md) PostFX: add get enable list
|
|
45
|
+
- [`engine.post`](api/post.md) PostFX: add get enable setAntialias list
|
|
46
46
|
- [`engine.ground`](api/ground.md) Ground: whoever provides the ground height is the "terr…: height slope type has voidY forEachCollider viewRange chunkCollision staticTrimeshes staticVersion navGeometry
|
|
47
47
|
|
|
48
48
|
## Modules (installed with engine.use; the openWorld preset installs only world and environment, see [api/openWorld.md](api/openWorld.md))
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
- [`engine.world`](api/world.md) World data: add origin idOf get set move remove query forEachNear present view refresh …
|
|
55
55
|
- [`engine.net`](api/net.md) net: reconnect
|
|
56
56
|
- [`engine.grids`](api/grids.md) grids: add get list define preview
|
|
57
|
-
- [`engine.collision`](api/collision.md) collision() Lightweight collision: addCircle addBox addObject forEachStatic walkable walkableAt
|
|
57
|
+
- [`engine.collision`](api/collision.md) collision() Lightweight collision: addCircle addBox addSegment addBlocked blockedAt addObject forEachStatic walkable walkableAt lineClear
|
|
58
58
|
- [`engine.rigid`](api/rigid.md) rigid() Real physics, Rapier: addBox addBall addHull impulse setPosition groundReady addVehicle
|
|
59
59
|
- [`engine.cameraRig`](api/cameraRig.md) followCamera() / firstPersonCamera() / fixedCamera() / rtsCamera() Current camera: follow forward right focusPoint update onOverride onEnter onExit
|
|
60
60
|
- [`engine.timeline`](api/timeline.md) timeline() Cutscenes, tweens: tween play skip
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
- [`engine.quests`](api/quests.md) quests() Quests: define start isDone isActive isFailed check list
|
|
72
72
|
- [`engine.photo`](api/photo.md) photo() Photo mode: take subject
|
|
73
73
|
- [`engine.ambience`](api/ambience.md) ambience() Ambience: add rules nearWater
|
|
74
|
-
- [`engine.debug`](api/debug.md) debug() F3 debug panel: startBench
|
|
75
74
|
- [`engine.nav`](api/nav.md) nav() Navmesh: findPath dispose
|
|
76
75
|
- [`engine.hlod`](api/hlod.md) hlod() hlod: add
|
|
77
76
|
- [`engine.lightPool`](api/lightPool.md) lightPool() Light pool: add usage
|
|
@@ -81,4 +80,4 @@
|
|
|
81
80
|
|
|
82
81
|
## Other
|
|
83
82
|
- [Style pack Style](api/style.md): all look options (sky, weather, water, terrain, UI, materials, particles, sound, models)
|
|
84
|
-
- [Utility functions](api/tools.md): postAdd postRemove presets world net fakeNetwork webSocket grids screenToGround EASINGS ease checkOptions createTerrain terrainMaterial mergeColored applyEffects MATERIAL_PURPOSES makeMaterial materialPatches toast makeWindow worldToScreen
|
|
83
|
+
- [Utility functions](api/tools.md): postAdd postRemove presets world net fakeNetwork webSocket grids screenToGround EASINGS ease checkOptions readParams defineLookPart createTerrain terrainMaterial mergeColored applyEffects MATERIAL_PURPOSES makeMaterial materialPatches toast makeWindow worldToScreen …
|