@threenative/core 0.3.10 → 0.3.12
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/capabilities.json +1096 -26
- package/dist/camera-shake-CZKOfGn4.d.ts +46 -0
- package/dist/{canvas-layer-vCtanIeB.d.ts → canvas-layer-CWuFRT7G.d.ts} +1 -1
- package/dist/chunk-2Z44XSI2.js +35 -0
- package/dist/chunk-5O73CDMR.js +1849 -0
- package/dist/chunk-6KLNISRJ.js +153 -0
- package/dist/chunk-7UUT3TY5.js +133 -0
- package/dist/chunk-CFGTPFUH.js +231 -0
- package/dist/chunk-DBELTTTM.js +615 -0
- package/dist/chunk-GMHATRPW.js +7701 -0
- package/dist/chunk-GXY7B3JG.js +46 -0
- package/dist/chunk-KIRUKTBQ.js +187 -0
- package/dist/chunk-N5LRP4BR.js +220 -0
- package/dist/chunk-OKXUCASC.js +2238 -0
- package/dist/chunk-QWJEMUUT.js +94 -0
- package/dist/chunk-VAZM36TV.js +497 -0
- package/dist/{game-DzMcitDO.d.ts → game-D7pAzZUY.d.ts} +15 -3
- package/dist/hot.d.ts +3 -3
- package/dist/hot.js +2 -46
- package/dist/index.d.ts +329 -302
- package/dist/index.js +10565 -22533
- package/dist/{model-lod-CTpZ6imz.d.ts → model-lod-B6BMqS1r.d.ts} +33 -3
- package/dist/playtest.d.ts +3 -3
- package/dist/playtest.js +24 -75
- package/dist/react-css.js +1 -215
- package/dist/react.d.ts +2 -2
- package/dist/{renderer-rZm0hVqq.d.ts → renderer-DvFVoAgj.d.ts} +13 -4
- package/dist/spells/index.d.ts +643 -0
- package/dist/spells/index.js +1558 -0
- package/dist/spells/ultra/index.d.ts +1600 -0
- package/dist/spells/ultra/index.js +6804 -0
- package/dist/terrain-jobs-worker.js +1 -123
- package/dist/two-sided-foliage-W523J3UM.js +1 -0
- package/dist/ui-layer.js +5 -384
- package/dist/worker.js +4 -41
- package/dist/world.d.ts +725 -259
- package/dist/world.js +16714 -18284
- package/mcp/animation-server.mjs +1 -1
- package/mcp/animation.mjs +2 -3
- package/mcp/engine-server.mjs +142 -47
- package/mcp/servers.mjs +9 -2
- package/mcp/terrain.mjs +8 -0
- package/package.json +14 -6
- package/patches/three@0.187.0-prd269-upgrade.patch +2102 -0
- package/patches/three@0.187.0.patch +2004 -407
- package/src/assets.ts +9 -2
- package/src/card-lod.ts +152 -0
- package/src/compressed-texture-preparation.ts +1008 -0
- package/src/frame-budget.ts +31 -20
- package/src/game-dev-tools.ts +93 -0
- package/src/game-frame-loop.ts +995 -0
- package/src/game-renderer-metrics.ts +77 -0
- package/src/game-startup.ts +1001 -0
- package/src/game-validate.ts +70 -0
- package/src/game.ts +253 -1935
- package/src/index.ts +27 -2
- package/src/launch-diagnostics.ts +22 -12
- package/src/look/ao-admission.ts +24 -0
- package/src/look/filmic-tone-mapping.ts +15 -13
- package/src/look/look-diagnostics.ts +3 -3
- package/src/look/quality.ts +10 -5
- package/src/look/world-environment.ts +76 -9
- package/src/loop.ts +29 -0
- package/src/model-lod.ts +42 -3
- package/src/particle-kinds.ts +515 -0
- package/src/picking.ts +17 -3
- package/src/playtest.ts +27 -1
- package/src/projection-apply.ts +4 -1
- package/src/projection-plan.ts +9 -6
- package/src/render/mesh-pool.ts +1 -1
- package/src/render/resolution-subrect.ts +2 -0
- package/src/render/rough-diffuse.ts +46 -12
- package/src/render/soft-shadow.ts +27 -12
- package/src/render/virtual-shadow-adaptive.ts +55 -0
- package/src/render/virtual-shadow-casters.ts +175 -0
- package/src/render/virtual-shadow-layers.ts +76 -0
- package/src/render/virtual-shadow-level.ts +224 -0
- package/src/render/virtual-shadow-markers.ts +193 -0
- package/src/render/virtual-shadow-options.ts +370 -0
- package/src/render/virtual-shadow-pages.ts +5 -0
- package/src/render/virtual-shadow.ts +213 -992
- package/src/render/world-impostor-surface.ts +293 -34
- package/src/render-camera-cull.ts +32 -1
- package/src/render-pass-budget.ts +34 -7
- package/src/renderProjection.ts +22 -0
- package/src/renderer.ts +92 -37
- package/src/snow-field.ts +1 -1
- package/src/spells/cast-pool.ts +361 -0
- package/src/spells/index.ts +177 -0
- package/src/spells/mechanisms.ts +295 -0
- package/src/spells/reaction-field.ts +415 -0
- package/src/spells/spell-lights.ts +139 -0
- package/src/spells/spell-world.ts +187 -0
- package/src/spells/spell.ts +397 -0
- package/src/spells/spells.ts +283 -0
- package/src/spells/ultra/engine/camera.ts +184 -0
- package/src/spells/ultra/engine/quality.ts +96 -0
- package/src/spells/ultra/index.ts +52 -0
- package/src/spells/ultra/main.ts +305 -0
- package/src/spells/ultra/scene/arenaMaterial.ts +325 -0
- package/src/spells/ultra/spells/cast.ts +233 -0
- package/src/spells/ultra/spells/fire.ts +1267 -0
- package/src/spells/ultra/vfx/FluidVolume.ts +816 -0
- package/src/spells/ultra/vfx/FluidVolume.tsl.ts +855 -0
- package/src/spells/ultra/vfx/FxTarget.ts +61 -0
- package/src/spells/ultra/vfx/GroundField.ts +1399 -0
- package/src/spells/ultra/vfx/Particles.ts +1475 -0
- package/src/spells/ultra/vfx/Ribbons.ts +645 -0
- package/src/spells/ultra/vfx/Shockwaves.ts +286 -0
- package/src/spells/ultra/vfx/Volumes.ts +489 -0
- package/src/spells/ultra/vfx/common.ts +1195 -0
- package/src/spells/ultra/vfx/noise.ts +441 -0
- package/src/startup-readiness.ts +128 -34
- package/src/version.ts +1 -1
- package/src/warmup.ts +56 -8
- package/src/water-surface.ts +9 -3
- package/src/world-bundle-safety.ts +401 -0
- package/src/world-cell-batches.ts +1216 -0
- package/src/world-cell-chunks.ts +1132 -0
- package/src/world-cell-data.ts +995 -0
- package/src/world-cell-impostors.ts +1449 -0
- package/src/world-cell-lod-bias.ts +151 -0
- package/src/world-cell-models.ts +1074 -0
- package/src/world-cell-options.ts +189 -0
- package/src/world-cell-placements.ts +694 -0
- package/src/world-cell-prewarm.ts +557 -0
- package/src/world-cell-readiness.ts +357 -0
- package/src/world-cell-render-bundles.ts +459 -0
- package/src/world-cell-render-gpu-dress.ts +714 -0
- package/src/world-cell-render-main-cull.ts +484 -0
- package/src/world-cell-render-shadow-claims.ts +198 -0
- package/src/world-cell-render-util.ts +246 -0
- package/src/world-cell-render.ts +1493 -0
- package/src/world-cell-residency.ts +745 -0
- package/src/world-cells.ts +1318 -10418
- package/src/world-chunk-shadow.ts +308 -0
- package/src/world-collar.ts +315 -0
- package/src/world-gpu-flags.ts +163 -0
- package/src/world-gpu-readback.ts +881 -0
- package/src/world-gpu-reference.ts +510 -0
- package/src/world-gpu-scene.ts +214 -2264
- package/src/world-gpu-shadow.ts +190 -0
- package/src/world-gpu-types.ts +381 -0
- package/src/world-gpu-validation.ts +518 -0
- package/src/world-heightfield.ts +802 -0
- package/src/world-load-limiter.ts +106 -0
- package/src/world-noise.ts +241 -0
- package/src/world-package.ts +42 -0
- package/src/world-region.ts +1 -1
- package/src/world-terrain-splat.ts +365 -149
- package/src/world-tile-budget.ts +256 -0
- package/src/world-tile-geometry.ts +469 -0
- package/src/world-tile-lod.ts +408 -0
- package/src/world-tile-observation.ts +566 -0
- package/src/world-tile-stitch.ts +166 -0
- package/src/world-tiles.ts +170 -1745
- package/src/world-water-bodies.ts +359 -0
- package/src/world.ts +35 -741
package/capabilities.json
CHANGED
|
@@ -84,6 +84,23 @@
|
|
|
84
84
|
"supersedes": [],
|
|
85
85
|
"symbol": "compileAssets"
|
|
86
86
|
},
|
|
87
|
+
{
|
|
88
|
+
"aliases": [],
|
|
89
|
+
"constraints": [],
|
|
90
|
+
"example": "await cookTerrainWorld({ state, species, out: \"assets/world\" });",
|
|
91
|
+
"importPath": "@threenative/assets",
|
|
92
|
+
"kind": "function",
|
|
93
|
+
"overrides": [],
|
|
94
|
+
"package": "@threenative/assets",
|
|
95
|
+
"signature": "export function cookTerrainWorld( options: IPreparedTerrainWorldOptions, ): Promise< { … }",
|
|
96
|
+
"situations": [
|
|
97
|
+
"bake a terrain world headlessly into a GLB with instanced trees and rocks",
|
|
98
|
+
"generate a forest world for my game"
|
|
99
|
+
],
|
|
100
|
+
"summary": "Bake evaluated terrain and static species into an instanced GLB and streaming world package.",
|
|
101
|
+
"supersedes": [],
|
|
102
|
+
"symbol": "cookTerrainWorld"
|
|
103
|
+
},
|
|
87
104
|
{
|
|
88
105
|
"aliases": [],
|
|
89
106
|
"constraints": [
|
|
@@ -431,6 +448,22 @@
|
|
|
431
448
|
"supersedes": [],
|
|
432
449
|
"symbol": "texturePass"
|
|
433
450
|
},
|
|
451
|
+
{
|
|
452
|
+
"aliases": [],
|
|
453
|
+
"constraints": [
|
|
454
|
+
"mutates the supplied document; rejects unsupported MASK topology and invalid ratios"
|
|
455
|
+
],
|
|
456
|
+
"example": "thinFoliageCards(document, 0.14);",
|
|
457
|
+
"importPath": "@threenative/assets",
|
|
458
|
+
"kind": "function",
|
|
459
|
+
"overrides": [],
|
|
460
|
+
"package": "@threenative/assets",
|
|
461
|
+
"signature": "export function thinFoliageCards(document: Document, keepRatio: number): number { … }",
|
|
462
|
+
"situations": ["prepare a far foliage mesh by thinning whole cards instead of triangles"],
|
|
463
|
+
"summary": "Build a standalone card-thinned foliage mesh, preserving opaque parts and vertex attributes.",
|
|
464
|
+
"supersedes": [],
|
|
465
|
+
"symbol": "thinFoliageCards"
|
|
466
|
+
},
|
|
434
467
|
{
|
|
435
468
|
"aliases": [],
|
|
436
469
|
"constraints": [
|
|
@@ -569,7 +602,7 @@
|
|
|
569
602
|
"add hundreds of built objects to the scene without one multi-second frame",
|
|
570
603
|
"stream a detail tier in behind a loading curtain without the page looking hung"
|
|
571
604
|
],
|
|
572
|
-
"summary": "Attach hundreds of built objects to the scene in slices, presenting a frame between each.",
|
|
605
|
+
"summary": "Attach hundreds of built objects to the scene in slices with an 8 ms default budget, presenting a frame between each.",
|
|
573
606
|
"supersedes": [],
|
|
574
607
|
"symbol": "addInSlices"
|
|
575
608
|
},
|
|
@@ -2343,6 +2376,22 @@
|
|
|
2343
2376
|
"supersedes": [],
|
|
2344
2377
|
"symbol": "loadAll"
|
|
2345
2378
|
},
|
|
2379
|
+
{
|
|
2380
|
+
"aliases": [],
|
|
2381
|
+
"constraints": ["a geometry the loader built no chain for returns undefined"],
|
|
2382
|
+
"example": "const chain = lodChainOf(baseGeometryOf(mesh)); const far = chain?.levels.at(-1);",
|
|
2383
|
+
"importPath": "@threenative/core",
|
|
2384
|
+
"kind": "function",
|
|
2385
|
+
"overrides": [],
|
|
2386
|
+
"package": "@threenative/core",
|
|
2387
|
+
"signature": "export function lodChainOf(geometry: BufferGeometry): ILodChain | undefined { … }",
|
|
2388
|
+
"situations": [
|
|
2389
|
+
"draw a cooked reduced level of a model in an instanced batch or streamed world level"
|
|
2390
|
+
],
|
|
2391
|
+
"summary": "The cooked automatic LOD chain (`TN_discrete_lod`) a loaded geometry carries, or `undefined`. Its levels share the base's vertex attributes and differ only in index, and `errors` are each level's world-unit error in the base's own space. A caller that draws one geometry many times (an instanced batch, a streamed world level) reads the reduced shapes here instead of re-cooking.",
|
|
2392
|
+
"supersedes": [],
|
|
2393
|
+
"symbol": "lodChainOf"
|
|
2394
|
+
},
|
|
2346
2395
|
{
|
|
2347
2396
|
"aliases": [],
|
|
2348
2397
|
"constraints": [
|
|
@@ -3677,6 +3726,24 @@
|
|
|
3677
3726
|
"supersedes": [],
|
|
3678
3727
|
"symbol": "SurfaceLights"
|
|
3679
3728
|
},
|
|
3729
|
+
{
|
|
3730
|
+
"aliases": [],
|
|
3731
|
+
"constraints": [
|
|
3732
|
+
"the geometry must be indexed and carry no material groups, else it throws",
|
|
3733
|
+
"keep is in (0, 1]; a share that drops nothing returns the same geometry",
|
|
3734
|
+
"the choice is deterministic, and the source geometry is left untouched"
|
|
3735
|
+
],
|
|
3736
|
+
"example": "const far = thinCards(needles.geometry, 0.4); // 40% of the cards, same area",
|
|
3737
|
+
"importPath": "@threenative/core",
|
|
3738
|
+
"kind": "function",
|
|
3739
|
+
"overrides": [],
|
|
3740
|
+
"package": "@threenative/core",
|
|
3741
|
+
"signature": "export function thinCards(geometry: BufferGeometry, keep: number): BufferGeometry { … }",
|
|
3742
|
+
"situations": ["far trees draw too many alpha-tested needle or leaf card triangles"],
|
|
3743
|
+
"summary": "A far level for a card mesh (needle or leaf quads): keep a share of its cards and grow each kept card about its own centre, so the crown holds its total surface area, as Unreal's Nanite \"Preserve Area\" foliage does. A simplifier cannot reduce disconnected cards, so the cooked chain leaves them at full count.",
|
|
3744
|
+
"supersedes": [],
|
|
3745
|
+
"symbol": "thinCards"
|
|
3746
|
+
},
|
|
3680
3747
|
{
|
|
3681
3748
|
"aliases": ["lumen reflections", "dedicated reflection rays"],
|
|
3682
3749
|
"constraints": [
|
|
@@ -3920,6 +3987,7 @@
|
|
|
3920
3987
|
"overrides": [
|
|
3921
3988
|
"bias, biasNode, normalBias, intensity, radius, blurSamples, mapType and filterNode stay on `light.shadow`; mapSize and the other options here have defaults, and `marker: false` silences the TN_VIRTUAL_SHADOW line, not the measurement",
|
|
3922
3989
|
"bias, biasNode, normalBias, intensity, radius, blurSamples, mapType and filterNode stay on `light.shadow`; mapSize and the other options here have defaults",
|
|
3990
|
+
"setFocus(point) centres every window on a subject (a third-person hero) instead of the eye, so an orbiting eye moves no shadow; setFocus(undefined) hands them back",
|
|
3923
3991
|
"followViewFocus: false keeps eye follow; receiverPlaneBias: false uses only authored bias",
|
|
3924
3992
|
"minWindowAspect: below 1, a level is as high as `sin(sun elevation)` times its width, never under this, so a low sun's floor shadows keep the texel density of a high sun's; the default 1 keeps square levels"
|
|
3925
3993
|
],
|
|
@@ -3929,7 +3997,8 @@
|
|
|
3929
3997
|
"crisp shadows close to the player across a large outdoor level",
|
|
3930
3998
|
"shadow map too coarse over a big terrain",
|
|
3931
3999
|
"one directional light shadow for a whole open world",
|
|
3932
|
-
"shadows shimmer when the camera moves"
|
|
4000
|
+
"shadows shimmer when the camera moves",
|
|
4001
|
+
"shadow edges, tree lighting or level sharpness change while a third-person camera turns around its hero"
|
|
3933
4002
|
],
|
|
3934
4003
|
"summary": "One directional shadow for a whole open world: camera-centred clip levels, each snapped to its own texel grid and re-rendered only when its window moves. Tracked casters draw into a per-level mover map every frame, so animated casters do not invalidate the cached levels after the one refresh caused by tracking or untracking them. Plugs into three's own `light.shadow.shadowNode` slot, so every material receives it.",
|
|
3935
4004
|
"supersedes": [],
|
|
@@ -4254,6 +4323,329 @@
|
|
|
4254
4323
|
"supersedes": [],
|
|
4255
4324
|
"symbol": "View"
|
|
4256
4325
|
},
|
|
4326
|
+
{
|
|
4327
|
+
"aliases": [],
|
|
4328
|
+
"constraints": [
|
|
4329
|
+
"the pool is fixed and recycles the cast alive longest; it never grows",
|
|
4330
|
+
"a ball that has passed its target lands on the target, however late the frame notices"
|
|
4331
|
+
],
|
|
4332
|
+
"example": "const casts = new CastPool(world);\ncasts.cast(fireball, target, { from: hand });\ncasts.update(dt);",
|
|
4333
|
+
"importPath": "@threenative/core/spells",
|
|
4334
|
+
"kind": "class",
|
|
4335
|
+
"overrides": [
|
|
4336
|
+
"timing, shape, speed and radius come from the spell; a cast may override shape and seed"
|
|
4337
|
+
],
|
|
4338
|
+
"package": "@threenative/core",
|
|
4339
|
+
"signature": "export class CastPool { … }",
|
|
4340
|
+
"situations": [
|
|
4341
|
+
"a fireball or a lightning bolt that charges, flies, lands and lingers",
|
|
4342
|
+
"several spells mid-flight, with no allocation per cast"
|
|
4343
|
+
],
|
|
4344
|
+
"summary": "Step a spell's timeline: charge, release, travel, impact, linger, done.",
|
|
4345
|
+
"supersedes": [],
|
|
4346
|
+
"symbol": "CastPool"
|
|
4347
|
+
},
|
|
4348
|
+
{
|
|
4349
|
+
"aliases": [],
|
|
4350
|
+
"constraints": ["every colour, size, count and timing is a named override on the call"],
|
|
4351
|
+
"example": "const aegis = createAegis(world);\ncasts.cast(aegis, world.focus);",
|
|
4352
|
+
"importPath": "@threenative/core/spells",
|
|
4353
|
+
"kind": "function",
|
|
4354
|
+
"overrides": [
|
|
4355
|
+
"core, highlight, charge, impact, linger, radius, light",
|
|
4356
|
+
"core, highlight, charge, impact, linger, radius, light, shake"
|
|
4357
|
+
],
|
|
4358
|
+
"package": "@threenative/core",
|
|
4359
|
+
"signature": "export function createAegis(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4360
|
+
"situations": [
|
|
4361
|
+
"a shield spell a player casts on themselves",
|
|
4362
|
+
"a magic barrier that forms around the caster",
|
|
4363
|
+
"make a protective bubble spell",
|
|
4364
|
+
"a defensive bubble that flashes when it breaks"
|
|
4365
|
+
],
|
|
4366
|
+
"summary": "A ward around the caster: it forms, holds, and breaks outward when it expires.",
|
|
4367
|
+
"supersedes": [],
|
|
4368
|
+
"symbol": "createAegis"
|
|
4369
|
+
},
|
|
4370
|
+
{
|
|
4371
|
+
"aliases": [],
|
|
4372
|
+
"constraints": ["every colour, size, count and timing is a named override on the call"],
|
|
4373
|
+
"example": "const barrage = createArcaneBarrage(world);\ncasts.cast(barrage, target);",
|
|
4374
|
+
"importPath": "@threenative/core/spells",
|
|
4375
|
+
"kind": "function",
|
|
4376
|
+
"overrides": ["core, highlight, speed, charge, impact, linger, radius, burst, light"],
|
|
4377
|
+
"package": "@threenative/core",
|
|
4378
|
+
"signature": "export function createArcaneBarrage(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4379
|
+
"situations": [
|
|
4380
|
+
"an arcane missile spell that fires projectiles at a target",
|
|
4381
|
+
"a magic barrage a mage class spams",
|
|
4382
|
+
"a magic missile spell",
|
|
4383
|
+
"make an arcane bolt spell",
|
|
4384
|
+
"an arcane missile spell that fires several projectiles at a target",
|
|
4385
|
+
"a pink energy bolt with a short charge"
|
|
4386
|
+
],
|
|
4387
|
+
"summary": "A volley of arcane missiles: fast, precise, and each one pops on arrival.",
|
|
4388
|
+
"supersedes": [],
|
|
4389
|
+
"symbol": "createArcaneBarrage"
|
|
4390
|
+
},
|
|
4391
|
+
{
|
|
4392
|
+
"aliases": [],
|
|
4393
|
+
"constraints": [
|
|
4394
|
+
"every colour, size, count and timing is a named override on the call",
|
|
4395
|
+
"the first cast costs what the hundredth does: nothing is built at cast time",
|
|
4396
|
+
"the stock look ships as the default, and no override rebuilds a pipeline"
|
|
4397
|
+
],
|
|
4398
|
+
"example": "const fireball = createFireball(world);\ncasts.cast(fireball, target);",
|
|
4399
|
+
"importPath": "@threenative/core/spells",
|
|
4400
|
+
"kind": "function",
|
|
4401
|
+
"overrides": [
|
|
4402
|
+
"core, highlight, speed, charge, impact, linger, radius, burst, trail, lingerBurst, light, shake, scorch"
|
|
4403
|
+
],
|
|
4404
|
+
"package": "@threenative/core",
|
|
4405
|
+
"signature": "export function createFireball(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4406
|
+
"situations": [
|
|
4407
|
+
"a fireball spell the player casts at an enemy",
|
|
4408
|
+
"a burning projectile that explodes and scorches the ground",
|
|
4409
|
+
"a wizard's fire attack with a wind-up, a flight and an aftermath",
|
|
4410
|
+
"make a fireball",
|
|
4411
|
+
"a fireball spell a player casts at an enemy"
|
|
4412
|
+
],
|
|
4413
|
+
"summary": "A ball of fire that charges, crosses the room and leaves the floor burning.",
|
|
4414
|
+
"supersedes": [],
|
|
4415
|
+
"symbol": "createFireball"
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
"aliases": [],
|
|
4419
|
+
"constraints": ["every colour, size, count and timing is a named override on the call"],
|
|
4420
|
+
"example": "const spike = createGlacialSpike(world);\ncasts.cast(spike, target);",
|
|
4421
|
+
"importPath": "@threenative/core/spells",
|
|
4422
|
+
"kind": "function",
|
|
4423
|
+
"overrides": ["core, highlight, speed, charge, impact, linger, radius, burst, trail, light"],
|
|
4424
|
+
"package": "@threenative/core",
|
|
4425
|
+
"signature": "export function createGlacialSpike(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4426
|
+
"situations": [
|
|
4427
|
+
"an ice spike spell that flies at a target and shatters",
|
|
4428
|
+
"a freezing projectile that leaves frost on the floor",
|
|
4429
|
+
"make an ice spell",
|
|
4430
|
+
"a cold spell with a charge, a flight and a lingering chill"
|
|
4431
|
+
],
|
|
4432
|
+
"summary": "A shard of ice that flies flat and fast, and freezes the ground it breaks on.",
|
|
4433
|
+
"supersedes": [],
|
|
4434
|
+
"symbol": "createGlacialSpike"
|
|
4435
|
+
},
|
|
4436
|
+
{
|
|
4437
|
+
"aliases": [],
|
|
4438
|
+
"constraints": ["every colour, size, count and timing is a named override on the call"],
|
|
4439
|
+
"example": "const inferno = createInferno(world);\ncasts.cast(inferno, target);",
|
|
4440
|
+
"importPath": "@threenative/core/spells",
|
|
4441
|
+
"kind": "function",
|
|
4442
|
+
"overrides": [
|
|
4443
|
+
"core, highlight, charge, impact, linger, radius, burst, trail, light, shake, scorch"
|
|
4444
|
+
],
|
|
4445
|
+
"package": "@threenative/core",
|
|
4446
|
+
"signature": "export function createInferno(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4447
|
+
"situations": [
|
|
4448
|
+
"a fire area spell that erupts at a point and burns there",
|
|
4449
|
+
"an inferno column a boss drops on the arena",
|
|
4450
|
+
"make a sustained fire area spell",
|
|
4451
|
+
"a sustained flame that scorches the ground for seconds"
|
|
4452
|
+
],
|
|
4453
|
+
"summary": "A pillar of fire that erupts where it lands and keeps burning.",
|
|
4454
|
+
"supersedes": [],
|
|
4455
|
+
"symbol": "createInferno"
|
|
4456
|
+
},
|
|
4457
|
+
{
|
|
4458
|
+
"aliases": [],
|
|
4459
|
+
"constraints": [
|
|
4460
|
+
"read the world through SpellWorld only, so a game can swap the scene and the floor"
|
|
4461
|
+
],
|
|
4462
|
+
"example": "const spell = createSpell(world, recipe);",
|
|
4463
|
+
"importPath": "@threenative/core/spells",
|
|
4464
|
+
"kind": "function",
|
|
4465
|
+
"overrides": [],
|
|
4466
|
+
"package": "@threenative/core",
|
|
4467
|
+
"signature": "export function createSpell(world: SpellWorld, recipe: ISpellRecipe): ISpell { … }",
|
|
4468
|
+
"situations": ["author a spell the catalog does not cover, out of the same beats"],
|
|
4469
|
+
"summary": "Build a spell from a recipe: four beats, a tint, and the numbers between them.",
|
|
4470
|
+
"supersedes": [],
|
|
4471
|
+
"symbol": "createSpell"
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"aliases": [],
|
|
4475
|
+
"constraints": ["every colour, size, count and timing is a named override on the call"],
|
|
4476
|
+
"example": "const bolt = createThunderstrike(world);\ncasts.cast(bolt, target);",
|
|
4477
|
+
"importPath": "@threenative/core/spells",
|
|
4478
|
+
"kind": "function",
|
|
4479
|
+
"overrides": ["core, highlight, charge, impact, linger, radius, light, shake, scorch"],
|
|
4480
|
+
"package": "@threenative/core",
|
|
4481
|
+
"signature": "export function createThunderstrike(world: SpellWorld, overrides: IFireSpellOverrides = { … }",
|
|
4482
|
+
"situations": [
|
|
4483
|
+
"a lightning strike spell that hits a point immediately",
|
|
4484
|
+
"a thunderbolt with a wind-up and a burnt mark where it lands",
|
|
4485
|
+
"make a lightning spell",
|
|
4486
|
+
"an electrical spell with a column of light from above"
|
|
4487
|
+
],
|
|
4488
|
+
"summary": "A bolt out of the sky: it charges, strikes the point instantly, and the ground remembers it.",
|
|
4489
|
+
"supersedes": [],
|
|
4490
|
+
"symbol": "createThunderstrike"
|
|
4491
|
+
},
|
|
4492
|
+
{
|
|
4493
|
+
"aliases": [],
|
|
4494
|
+
"constraints": [
|
|
4495
|
+
"set writes uniforms; no kernel, material or pipeline is rebuilt",
|
|
4496
|
+
"a table knows only the kinds it was asked for, so an unused kind costs nothing"
|
|
4497
|
+
],
|
|
4498
|
+
"example": "const kinds = new ParticleKindTable([\"flame\", \"smoke\"]);\nkinds.set(\"flame\", { lifetime: [0.3, 0.6], colour: [0.4, 0.8, 1] });",
|
|
4499
|
+
"importPath": "@threenative/core/spells",
|
|
4500
|
+
"kind": "class",
|
|
4501
|
+
"overrides": [
|
|
4502
|
+
"lifetime, size, speed, cone, gravity, drag, buoyancy, alpha, colour and highlight"
|
|
4503
|
+
],
|
|
4504
|
+
"package": "@threenative/core",
|
|
4505
|
+
"signature": "export class ParticleKindTable { … }",
|
|
4506
|
+
"situations": [
|
|
4507
|
+
"retune a spell's particles at run time from a settings screen",
|
|
4508
|
+
"change how long, how fast or how heavy a kind of particle is without a new pipeline"
|
|
4509
|
+
],
|
|
4510
|
+
"summary": "Tune what a particle kind does, as data rather than a shader.",
|
|
4511
|
+
"supersedes": [],
|
|
4512
|
+
"symbol": "ParticleKindTable"
|
|
4513
|
+
},
|
|
4514
|
+
{
|
|
4515
|
+
"aliases": [],
|
|
4516
|
+
"constraints": [
|
|
4517
|
+
"it draws nothing; the game decides what a mark looks like",
|
|
4518
|
+
"the patch is finite and every channel decays on its own half-life"
|
|
4519
|
+
],
|
|
4520
|
+
"example": "field.splat({ heat: 1, char: 0.6, radius: 2.5, x: hit.x, z: hit.z });\nfield.update(dt);",
|
|
4521
|
+
"importPath": "@threenative/core/spells",
|
|
4522
|
+
"kind": "class",
|
|
4523
|
+
"overrides": [
|
|
4524
|
+
"halfLife, resolution and size tune the patch; pattern, radius, seed and angle set each mark"
|
|
4525
|
+
],
|
|
4526
|
+
"package": "@threenative/core",
|
|
4527
|
+
"signature": "export class ReactionField { … }",
|
|
4528
|
+
"situations": [
|
|
4529
|
+
"a fireball impact that leaves a scorch and fades over time",
|
|
4530
|
+
"ice that melts where lightning spread, or a lava geyser's crack"
|
|
4531
|
+
],
|
|
4532
|
+
"summary": "The marks a spell leaves on the floor: heat, char, wet, frost, crack and glow.",
|
|
4533
|
+
"supersedes": [],
|
|
4534
|
+
"symbol": "ReactionField"
|
|
4535
|
+
},
|
|
4536
|
+
{
|
|
4537
|
+
"aliases": [],
|
|
4538
|
+
"constraints": [
|
|
4539
|
+
"the whole pool exists before the first cast; a cast changes intensity, never the list",
|
|
4540
|
+
"flash returns undefined when the pool is busy; a spell carries on without one"
|
|
4541
|
+
],
|
|
4542
|
+
"example": "lights.flash({ x, y, z, color, intensity: 40, range: 12, seconds: 0.35 });",
|
|
4543
|
+
"importPath": "@threenative/core/spells",
|
|
4544
|
+
"kind": "class",
|
|
4545
|
+
"overrides": [
|
|
4546
|
+
"count is the pool size; each flash supplies position, colour, intensity, range and seconds"
|
|
4547
|
+
],
|
|
4548
|
+
"package": "@threenative/core",
|
|
4549
|
+
"signature": "export class SpellLights { … }",
|
|
4550
|
+
"situations": [
|
|
4551
|
+
"a spell impact that glows without changing the light count",
|
|
4552
|
+
"a charge glow or a falling meteor lighting what it passes"
|
|
4553
|
+
],
|
|
4554
|
+
"summary": "A fixed pool of spell lights, created once at zero intensity.",
|
|
4555
|
+
"supersedes": [],
|
|
4556
|
+
"symbol": "SpellLights"
|
|
4557
|
+
},
|
|
4558
|
+
{
|
|
4559
|
+
"aliases": [],
|
|
4560
|
+
"constraints": [
|
|
4561
|
+
"damage, mana, cooldowns and who the target is stay in the game",
|
|
4562
|
+
"with reducedFlashes on, a fourth flash inside one second is refused, never dimmed"
|
|
4563
|
+
],
|
|
4564
|
+
"example": "const world = new SpellWorld({ scene, groundAt });\nconst casts = new CastPool(world);",
|
|
4565
|
+
"importPath": "@threenative/core/spells",
|
|
4566
|
+
"kind": "class",
|
|
4567
|
+
"overrides": [
|
|
4568
|
+
"groundAt, castSlots, lightCount, reaction, shake and reducedFlashes are named options"
|
|
4569
|
+
],
|
|
4570
|
+
"package": "@threenative/core",
|
|
4571
|
+
"signature": "export class SpellWorld implements ICastEnvironment { … }",
|
|
4572
|
+
"situations": [
|
|
4573
|
+
"cast an engine spell without passing a scene into every call",
|
|
4574
|
+
"honour an accessibility setting that limits flashing"
|
|
4575
|
+
],
|
|
4576
|
+
"summary": "Everything a spell may touch: the scene, the floor, the light pool, the surface field, one shake and one flash limiter.",
|
|
4577
|
+
"supersedes": [],
|
|
4578
|
+
"symbol": "SpellWorld"
|
|
4579
|
+
},
|
|
4580
|
+
{
|
|
4581
|
+
"aliases": [],
|
|
4582
|
+
"constraints": [
|
|
4583
|
+
"costs about 0.6 s at 64^3 and about 5 s at 128^3 on the main thread; bake once at load"
|
|
4584
|
+
],
|
|
4585
|
+
"example": "bakeNoise({ noiseSize: 64 }); // once at load, before createFx draws",
|
|
4586
|
+
"importPath": "@threenative/core/spells/ultra",
|
|
4587
|
+
"kind": "function",
|
|
4588
|
+
"overrides": [],
|
|
4589
|
+
"package": "@threenative/core",
|
|
4590
|
+
"signature": "export function bakeNoise( { … }",
|
|
4591
|
+
"situations": [
|
|
4592
|
+
"the noise and blackbody textures an Ultra Elements spell needs before it first draws"
|
|
4593
|
+
],
|
|
4594
|
+
"summary": "CPU bake of the Ultra Elements 3D noise, curl and blackbody textures that every spell volume samples.",
|
|
4595
|
+
"supersedes": [],
|
|
4596
|
+
"symbol": "bakeNoise"
|
|
4597
|
+
},
|
|
4598
|
+
{
|
|
4599
|
+
"aliases": [],
|
|
4600
|
+
"constraints": [
|
|
4601
|
+
"call bakeNoise first: the volume shaders sample its noise, curl and blackbody textures"
|
|
4602
|
+
],
|
|
4603
|
+
"example": "const ultra = createFx({ camera, size: () => ({ width: innerWidth, height: innerHeight }), seed: 777 }); const fireball = ultra.addSpell(fire); scene.add(ultra.fx.scenes.fx);",
|
|
4604
|
+
"importPath": "@threenative/core/spells/ultra",
|
|
4605
|
+
"kind": "function",
|
|
4606
|
+
"overrides": [],
|
|
4607
|
+
"package": "@threenative/core",
|
|
4608
|
+
"signature": "export function createFx(o: IFxOptions) { … }",
|
|
4609
|
+
"situations": [
|
|
4610
|
+
"an Ultra Elements spell such as the raymarched teardrop Fireball cast at a target",
|
|
4611
|
+
"a volumetric fire spell drawn through the Three.js TSL node API on WebGPU"
|
|
4612
|
+
],
|
|
4613
|
+
"summary": "The shared Ultra Elements spell world: casts, volumes, spell lights and the per-frame CPU tick. Add `fx.scenes.fx` to the scene, `addSpell` each ported spell, call `renderFrame(dt)` each frame.",
|
|
4614
|
+
"supersedes": [],
|
|
4615
|
+
"symbol": "createFx"
|
|
4616
|
+
},
|
|
4617
|
+
{
|
|
4618
|
+
"aliases": [],
|
|
4619
|
+
"constraints": [],
|
|
4620
|
+
"example": "const shade = groundShade(positionWorld, { albedo, rough: float(0.85), metal: float(0) }); floor.colorNode = vec4(shade.color, 1);",
|
|
4621
|
+
"importPath": "@threenative/core/spells/ultra",
|
|
4622
|
+
"kind": "function",
|
|
4623
|
+
"overrides": [],
|
|
4624
|
+
"package": "@threenative/core",
|
|
4625
|
+
"signature": "export function groundShade(wp: V3, surface: IGroundSurface) { … }",
|
|
4626
|
+
"situations": [
|
|
4627
|
+
"a floor that shows the Fireball's scorch and hot ground cooling over seconds"
|
|
4628
|
+
],
|
|
4629
|
+
"summary": "The Ultra Elements arena floor's response to the ground field and spell impacts (scorch, char, wet, glowing hot ground) as nodes for a game's own floor material: `color`, `roughness`, `metalness`, `emissive` from the floor's own surface at a world position.",
|
|
4630
|
+
"supersedes": [],
|
|
4631
|
+
"symbol": "groundShade"
|
|
4632
|
+
},
|
|
4633
|
+
{
|
|
4634
|
+
"aliases": [],
|
|
4635
|
+
"constraints": [],
|
|
4636
|
+
"example": "const flames = ultra.fx.particles.emitter(\"fire.flame\"); // ultra from createFx",
|
|
4637
|
+
"importPath": "@threenative/core/spells/ultra",
|
|
4638
|
+
"kind": "class",
|
|
4639
|
+
"overrides": [],
|
|
4640
|
+
"package": "@threenative/core",
|
|
4641
|
+
"signature": "export class Particles { … }",
|
|
4642
|
+
"situations": [
|
|
4643
|
+
"the flames, embers, sparks, smoke and debris an Ultra Elements spell emits as it charges, flies and hits"
|
|
4644
|
+
],
|
|
4645
|
+
"summary": "The Ultra Elements GPU particle system behind `fx.particles`: a spell's kinds, emitters and field emitters.",
|
|
4646
|
+
"supersedes": [],
|
|
4647
|
+
"symbol": "Particles"
|
|
4648
|
+
},
|
|
4257
4649
|
{
|
|
4258
4650
|
"aliases": [],
|
|
4259
4651
|
"constraints": ["the transport is discovered, never configured; no game names the web view"],
|
|
@@ -4398,6 +4790,58 @@
|
|
|
4398
4790
|
"supersedes": [],
|
|
4399
4791
|
"symbol": "startWorkerGame"
|
|
4400
4792
|
},
|
|
4793
|
+
{
|
|
4794
|
+
"aliases": [],
|
|
4795
|
+
"constraints": [
|
|
4796
|
+
"url names the loaded GLB; tnTerrainSurface extras name a relative world package JSON"
|
|
4797
|
+
],
|
|
4798
|
+
"example": "await applyTerrainSurface(world.scene, { assets: ctx.assets, renderer: ctx.renderer, url: \"world/world.glb\" });",
|
|
4799
|
+
"importPath": "@threenative/core/world",
|
|
4800
|
+
"kind": "function",
|
|
4801
|
+
"overrides": [
|
|
4802
|
+
"`table` may replace `base`, `breakup`, `macro` and `layers`; baked `splat` and `textures` stay package-owned"
|
|
4803
|
+
],
|
|
4804
|
+
"package": "@threenative/core",
|
|
4805
|
+
"signature": "export async function applyTerrainSurface( root: Object3D, options: ILoadTerrainSplatOptions, ): Promise<void> { … }",
|
|
4806
|
+
"situations": ["apply the authored layered terrain surface after loading a cooked world GLB"],
|
|
4807
|
+
"summary": "Apply a cooked GLB's package-authored layered surface to its marked terrain meshes. `url` is the loaded GLB URL; extras pointers are relative to it. Uses the same asset/fetch path as loadTerrainSplat on web and native. The caller owns the assigned materials' lifetime.",
|
|
4808
|
+
"supersedes": [],
|
|
4809
|
+
"symbol": "applyTerrainSurface"
|
|
4810
|
+
},
|
|
4811
|
+
{
|
|
4812
|
+
"aliases": [],
|
|
4813
|
+
"constraints": ["octaves is a build-time number; each octave is one filtered volume read"],
|
|
4814
|
+
"example": "const macro = bakedFractalNoise(vec3(positionWorld.x, 0, positionWorld.z).mul(0.014), 3);",
|
|
4815
|
+
"importPath": "@threenative/core/world",
|
|
4816
|
+
"kind": "function",
|
|
4817
|
+
"overrides": [],
|
|
4818
|
+
"package": "@threenative/core",
|
|
4819
|
+
"signature": "export function bakedFractalNoise( p: Node<\"vec3\">, octaves = 3, lacunarity = 2, diminish = 0.5, amplitude: Scalar = 1, ): Node<\"float\"> { … }",
|
|
4820
|
+
"situations": ["fractal or fbm noise in a material costs too much GPU time per pixel"],
|
|
4821
|
+
"summary": "Drop-in for `mx_fractal_noise_float(p, octaves, lacunarity, diminish, amplitude)`: one read an octave.",
|
|
4822
|
+
"supersedes": [],
|
|
4823
|
+
"symbol": "bakedFractalNoise"
|
|
4824
|
+
},
|
|
4825
|
+
{
|
|
4826
|
+
"aliases": [],
|
|
4827
|
+
"constraints": [
|
|
4828
|
+
"the field tiles every NOISE_PERIOD units of p; at p = world metres x 2.6 that is a 3 m repeat",
|
|
4829
|
+
"vec3 input only: three's 2D Perlin is another function"
|
|
4830
|
+
],
|
|
4831
|
+
"example": "const patch = smoothstep(-0.35, 0.35, bakedNoise(positionWorld.mul(0.025)));",
|
|
4832
|
+
"importPath": "@threenative/core/world",
|
|
4833
|
+
"kind": "function",
|
|
4834
|
+
"overrides": ["keep mx_noise_float where exact analytic noise matters more than the frame"],
|
|
4835
|
+
"package": "@threenative/core",
|
|
4836
|
+
"signature": "export function bakedNoise( p: Node<\"vec3\">, amplitude: Scalar = 1, pivot: Scalar = 0, channel: 0 | 1 | 2 | 3 = 0, ): Node<\"float\"> { … }",
|
|
4837
|
+
"situations": [
|
|
4838
|
+
"a terrain, foliage or water shader calls mx_noise_float per pixel and the frame is GPU bound",
|
|
4839
|
+
"open world ground material with procedural variation that must hold 60 FPS"
|
|
4840
|
+
],
|
|
4841
|
+
"summary": "Drop-in for `mx_noise_float(p, amplitude, pivot)` on a vec3 `p`: one filtered read of the baked volume instead of the per-pixel Perlin. Only the 3D form: three's 2D Perlin is another function (0.66 scale), so a vec2 caller keeps `mx_noise_float`. `channel` 1 to 3 are independent fields.",
|
|
4842
|
+
"supersedes": [],
|
|
4843
|
+
"symbol": "bakedNoise"
|
|
4844
|
+
},
|
|
4401
4845
|
{
|
|
4402
4846
|
"aliases": [],
|
|
4403
4847
|
"constraints": [
|
|
@@ -4461,6 +4905,26 @@
|
|
|
4461
4905
|
"supersedes": [],
|
|
4462
4906
|
"symbol": "Heightfield"
|
|
4463
4907
|
},
|
|
4908
|
+
{
|
|
4909
|
+
"aliases": [],
|
|
4910
|
+
"constraints": [
|
|
4911
|
+
"every ring vertex asks the game's `height` callback; core owns no terrain look",
|
|
4912
|
+
"the collar is a ring of triangles, not a field: `heightAt` answers on it and null off it"
|
|
4913
|
+
],
|
|
4914
|
+
"example": "const collar = new HeightfieldCollar({ resolution: 129, size: 512, rings: 384, ringDistance: (ring) => (ring / 384) ** 1.65 * 2100, walkBand: 200, height: ({ x, z }) => surveyed.heightAt(x, z) });",
|
|
4915
|
+
"importPath": "@threenative/core/world",
|
|
4916
|
+
"kind": "class",
|
|
4917
|
+
"overrides": [],
|
|
4918
|
+
"package": "@threenative/core",
|
|
4919
|
+
"signature": "export class HeightfieldCollar { … }",
|
|
4920
|
+
"situations": [
|
|
4921
|
+
"draw the terrain past the playable square without hand-building a ring grid",
|
|
4922
|
+
"ground a character past the square, out to the walk band, on drawn triangles"
|
|
4923
|
+
],
|
|
4924
|
+
"summary": "A heightfield's far ring: `rings` square rings past its playable square, one vertex per boundary sample, and the index grid that draws them.",
|
|
4925
|
+
"supersedes": [],
|
|
4926
|
+
"symbol": "HeightfieldCollar"
|
|
4927
|
+
},
|
|
4464
4928
|
{
|
|
4465
4929
|
"aliases": [],
|
|
4466
4930
|
"constraints": [
|
|
@@ -4482,15 +4946,46 @@
|
|
|
4482
4946
|
},
|
|
4483
4947
|
{
|
|
4484
4948
|
"aliases": [],
|
|
4485
|
-
"constraints": [
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
"
|
|
4949
|
+
"constraints": [],
|
|
4950
|
+
"example": "const phase = instanceRandom().mul(6.2831);",
|
|
4951
|
+
"importPath": "@threenative/core/world",
|
|
4952
|
+
"kind": "function",
|
|
4953
|
+
"overrides": [],
|
|
4954
|
+
"package": "@threenative/core",
|
|
4955
|
+
"signature": "export function instanceRandom(): Node<\"float\"> { … }",
|
|
4956
|
+
"situations": [
|
|
4957
|
+
"a per-instance random number that stays with each streamed placement as WorldCells repacks",
|
|
4958
|
+
"replace instanceIndex in a WorldCells part material, which WorldCells refuses"
|
|
4959
|
+
],
|
|
4960
|
+
"summary": "A random in [0, 1) that stays with its instance, as UE 5.8.3's PerInstanceRandom: hashed from the instance's world origin, never from its draw slot. WorldCells repacks instances on every refilter, main-pass cull and LOD switch, so `instanceIndex` names another tree from one frame to the next; a wind phase hashed from it re-rolled each crown about every 0.7 s of a walk and snapped its top by a median 0.37 m. Parts of one placement share its translation, so its bark and needles read one value.",
|
|
4961
|
+
"supersedes": [],
|
|
4962
|
+
"symbol": "instanceRandom"
|
|
4963
|
+
},
|
|
4964
|
+
{
|
|
4965
|
+
"aliases": [],
|
|
4966
|
+
"constraints": ["reads the heightfield at every bearing, once per lake, never per frame"],
|
|
4967
|
+
"example": "const reach = lakeReach(field, { ...lake, margin: 1.12 });",
|
|
4968
|
+
"importPath": "@threenative/core/world",
|
|
4969
|
+
"kind": "function",
|
|
4970
|
+
"overrides": [],
|
|
4971
|
+
"package": "@threenative/core",
|
|
4972
|
+
"signature": "export function lakeReach(field: Heightfield, lake: IWaterLake): number { … }",
|
|
4973
|
+
"situations": ["size a lake's footprint from its basin and the cap its biome row names"],
|
|
4974
|
+
"summary": "How far a lake's water reaches: the waterline its basin measures, `margin` times out, capped. The drawn surface and the swim footprint both size themselves here, so the shore a player sees is the shore they stop at.",
|
|
4975
|
+
"supersedes": [],
|
|
4976
|
+
"symbol": "lakeReach"
|
|
4977
|
+
},
|
|
4978
|
+
{
|
|
4979
|
+
"aliases": [],
|
|
4980
|
+
"constraints": [
|
|
4981
|
+
"the package's world.json must carry `terrain.layers.table` and `terrain.layers.splat`, written by `export_terrain_layers` in the `export_world.py` recipe",
|
|
4982
|
+
"WebGPU allows 16 sampled textures per stage: same-size layers stack into one array texture per set, and `TN_TERRAIN_SPLAT samplers=<n>` reports what is left"
|
|
4983
|
+
],
|
|
4984
|
+
"example": "const surface = await loadTerrainSplat({ assets: ctx.assets, renderer: ctx.renderer, url: \"world/world.json\" });\nconst world = await WorldCells.load({ assets: ctx.assets, url: \"world/world.json\", surface, follow, ring: 2 });",
|
|
4490
4985
|
"importPath": "@threenative/core/world",
|
|
4491
4986
|
"kind": "function",
|
|
4492
4987
|
"overrides": [
|
|
4493
|
-
"
|
|
4988
|
+
"`table` may replace `base`, `breakup`, `macro` and `layers` from game source; baked `splat` and `textures` stay package-owned"
|
|
4494
4989
|
],
|
|
4495
4990
|
"package": "@threenative/core",
|
|
4496
4991
|
"signature": "export async function loadTerrainSplat(options: ILoadTerrainSplatOptions): Promise<Material> { … }",
|
|
@@ -4516,6 +5011,22 @@
|
|
|
4516
5011
|
"supersedes": [],
|
|
4517
5012
|
"symbol": "loadWorldHeightmap"
|
|
4518
5013
|
},
|
|
5014
|
+
{
|
|
5015
|
+
"aliases": [],
|
|
5016
|
+
"constraints": [
|
|
5017
|
+
"baked once per page on the main thread (about 0.15 s); every channel is an independent field"
|
|
5018
|
+
],
|
|
5019
|
+
"example": "const volume = noiseVolume();",
|
|
5020
|
+
"importPath": "@threenative/core/world",
|
|
5021
|
+
"kind": "function",
|
|
5022
|
+
"overrides": [],
|
|
5023
|
+
"package": "@threenative/core",
|
|
5024
|
+
"signature": "export function noiseVolume(): Data3DTexture { … }",
|
|
5025
|
+
"situations": ["a material needs the raw baked noise texture to sample in its own TSL"],
|
|
5026
|
+
"summary": "The one volume every material shares: baked on first use, 1 MiB of RGBA8 (it stays in L2).",
|
|
5027
|
+
"supersedes": [],
|
|
5028
|
+
"symbol": "noiseVolume"
|
|
5029
|
+
},
|
|
4519
5030
|
{
|
|
4520
5031
|
"aliases": [],
|
|
4521
5032
|
"constraints": ["radius is metres; the footprint never grows with load, only deeper"],
|
|
@@ -4620,14 +5131,54 @@
|
|
|
4620
5131
|
"supersedes": [],
|
|
4621
5132
|
"symbol": "validateWorldPackage"
|
|
4622
5133
|
},
|
|
5134
|
+
{
|
|
5135
|
+
"aliases": [],
|
|
5136
|
+
"constraints": [
|
|
5137
|
+
"every station, level, extent and speed comes from the game's own bake; a lake is measured on the field passed in"
|
|
5138
|
+
],
|
|
5139
|
+
"example": "const water = new WaterBodies({ ribbons, lakes, field }); const height = water.surfaceAt(x, z);",
|
|
5140
|
+
"importPath": "@threenative/core/world",
|
|
5141
|
+
"kind": "class",
|
|
5142
|
+
"overrides": [],
|
|
5143
|
+
"package": "@threenative/core",
|
|
5144
|
+
"signature": "export class WaterBodies { … }",
|
|
5145
|
+
"situations": [
|
|
5146
|
+
"ask how high the water is where a player swims",
|
|
5147
|
+
"ask which way a current carries a body",
|
|
5148
|
+
"ask which water body covers a point, and how high its surface is",
|
|
5149
|
+
"share one water store between rendering and physics"
|
|
5150
|
+
],
|
|
5151
|
+
"summary": "One world's water, queried: surface height, current and footprint from the baked arrays. Rendering and physics read the same store, as they do for `Heightfield`, so the surface a player sees and the surface a swimmer rests on cannot disagree. Every station, level, extent and speed comes from the game, and the shading stays in the game's own `src/render/`. A river's segments sit in a uniform grid, so a query tests the few that can reach its cell instead of every station of every river.",
|
|
5152
|
+
"supersedes": [],
|
|
5153
|
+
"symbol": "WaterBodies"
|
|
5154
|
+
},
|
|
5155
|
+
{
|
|
5156
|
+
"aliases": [],
|
|
5157
|
+
"constraints": ["returns metres on the furthest bearing; the caller applies its own cap"],
|
|
5158
|
+
"example": "const reach = waterlineRadius(field, lake.at, lake.level) * 1.12;",
|
|
5159
|
+
"importPath": "@threenative/core/world",
|
|
5160
|
+
"kind": "function",
|
|
5161
|
+
"overrides": [],
|
|
5162
|
+
"package": "@threenative/core",
|
|
5163
|
+
"signature": "export function waterlineRadius( field: Heightfield, centre: readonly number[], level: number, ): number { … }",
|
|
5164
|
+
"situations": [
|
|
5165
|
+
"measure where a lake's water meets the ground it floods",
|
|
5166
|
+
"size a lake's drawn surface or the footprint a swimmer may enter"
|
|
5167
|
+
],
|
|
5168
|
+
"summary": "The furthest a lake's basin reaches on a bearing: where the drawn ground crosses its level. Twenty-four bearings step outwards and stop at the first bank, because binary-searching the whole ray can jump a dry ridge into another pond. Eighteen halvings land inside two centimetres at this scale, well under the ground's own sample spacing.",
|
|
5169
|
+
"supersedes": [],
|
|
5170
|
+
"symbol": "waterlineRadius"
|
|
5171
|
+
},
|
|
4623
5172
|
{
|
|
4624
5173
|
"aliases": [],
|
|
4625
5174
|
"constraints": [
|
|
4626
5175
|
"surface is the game's; this class creates no material, colour or geometry",
|
|
4627
5176
|
"a cell's model loads at `soon` priority, so a file the running scene awaits through `ctx.assets` starts first",
|
|
4628
5177
|
"budgets are hard caps that report pressure instead of over-committing",
|
|
5178
|
+
"`whenSpawnReady(position, radius, timeoutMs)` snapshots a fixed region and settles from existing updates or disposal; it does not drive streaming, and `prewarmed` remains the separate draw gate",
|
|
4629
5179
|
"model loads are bounded by `concurrency` (default 12) across every resident cell, not per cell",
|
|
4630
5180
|
"refilters are bounded by `rebuildsPerUpdate` (default 16) per update, nearest cell first",
|
|
5181
|
+
"residency and `placementReach` follow `follow`; levels and `maxDistance` are graded from the render camera, as UE picks instance LODs per view; `lodFrom: \"follow\"`, `?tnLodFromCamera=0` or `TN_LOD_FROM_CAMERA=0` grade from `follow`, reported as `TN_WORLD_MAIN_CULL lodFrom=`",
|
|
4631
5182
|
"admission is bounded by `admissionBudgetMs` (default 2) per update across every path, plus at most one unit each for terrain and props; while props are queued terrain takes at most half, so neither starves the other, and a deferred cell keeps drawing what it has",
|
|
4632
5183
|
"SkinnedMesh parts are skipped; an instanced copy would draw one rest pose",
|
|
4633
5184
|
"a baked chain's switch distances are measured against `autoLod` (default 4 px of error over 60° and 1080 raster rows), because an instanced draw cannot select a level per instance; an asset with nonempty authored `lods` never consults it; explicit empty lists enroll only unchanged static geometry/material parts",
|
|
@@ -4643,7 +5194,7 @@
|
|
|
4643
5194
|
"importPath": "@threenative/core/world",
|
|
4644
5195
|
"kind": "class",
|
|
4645
5196
|
"overrides": [
|
|
4646
|
-
"`hlod: false` keeps source rendering; ring, budgets, terrain tile size/resolution, terrain stream and collider radius, `transparentScatter`, `clusterSize` and `shadows.invalidate`, load `concurrency`, `rebuildsPerUpdate`, `admissionBudgetMs` and the package's per-asset maxDistance"
|
|
5197
|
+
"`hlod: false` keeps source rendering; ring, budgets, terrain tile size/resolution, terrain stream and collider radius, `transparentScatter`, `clusterSize` and `shadows.invalidate`, load `concurrency`, `rebuildsPerUpdate`, `admissionBudgetMs` and the package's per-asset maxDistance; `impostorFar: \"always\"` keeps the far aggregate the near ring's guaranteed radius made unnecessary"
|
|
4647
5198
|
],
|
|
4648
5199
|
"package": "@threenative/core",
|
|
4649
5200
|
"signature": "export class WorldCells extends Group implements IComputeDriven { … }",
|
|
@@ -4878,22 +5429,31 @@
|
|
|
4878
5429
|
"enemy targets cooldown reload win condition",
|
|
4879
5430
|
"platformer double jump",
|
|
4880
5431
|
"first person",
|
|
4881
|
-
"run jump coins goal"
|
|
5432
|
+
"run jump coins goal",
|
|
5433
|
+
"swimming buoyancy water volume wade"
|
|
5434
|
+
],
|
|
5435
|
+
"constraints": [
|
|
5436
|
+
"use moveAndSlide inside the physics update",
|
|
5437
|
+
"pass `water: (x, z) => surfaceHeight | undefined`; the body reads `swimming`, `immersionDepth` and `waterSurface` each moveAndSlide",
|
|
5438
|
+
"pass `waterCurrent: (x, z) => { x, z } | undefined` in m/s to have the water carry the body; it reads `currentVelocity` back"
|
|
4882
5439
|
],
|
|
4883
|
-
"constraints": ["use moveAndSlide inside the physics update"],
|
|
4884
5440
|
"deprecated": [
|
|
4885
5441
|
"Constructor option `world` is deprecated; pass an IPhysicsContext as `physics` instead. CharacterBody3D itself is not deprecated."
|
|
4886
5442
|
],
|
|
4887
5443
|
"example": "const body = new CharacterBody3D({ object: hero, physics: ctx.physics, shape: CollisionShape3D.capsule(0.5, 0.35) });",
|
|
4888
5444
|
"importPath": "@threenative/physics",
|
|
4889
5445
|
"kind": "class",
|
|
4890
|
-
"overrides": [
|
|
5446
|
+
"overrides": [
|
|
5447
|
+
"buoyancy (1.6, floats; Unreal 1.0 sinks), maxSwimSpeed (3 m/s) and fluidFriction (12) tune the Unreal MOVE_Swimming defaults"
|
|
5448
|
+
],
|
|
4891
5449
|
"package": "@threenative/physics",
|
|
4892
5450
|
"requires": ["npm i @threenative/physics"],
|
|
4893
5451
|
"signature": "export class CharacterBody3D { … }",
|
|
4894
5452
|
"situations": [
|
|
4895
5453
|
"move an enemy or player through a level",
|
|
4896
|
-
"keep a character from walking through walls"
|
|
5454
|
+
"keep a character from walking through walls",
|
|
5455
|
+
"swim in a river, lake or sea; float at the surface and wade slower in shallow water",
|
|
5456
|
+
"river current carries a swimmer downstream while it floats"
|
|
4897
5457
|
],
|
|
4898
5458
|
"summary": "Move a character body with collision-aware sliding.",
|
|
4899
5459
|
"supersedes": [],
|
|
@@ -5015,6 +5575,7 @@
|
|
|
5015
5575
|
"signature": "export class RigidBody3D { … }",
|
|
5016
5576
|
"situations": [
|
|
5017
5577
|
"give a crate or prop physical motion",
|
|
5578
|
+
"a ball rolls across the floor",
|
|
5018
5579
|
"create a body that collides with a character",
|
|
5019
5580
|
"fire physical cannonballs that collide with ships or scenery",
|
|
5020
5581
|
"fire a cannonball projectile with cannon smoke particles",
|
|
@@ -5024,6 +5585,28 @@
|
|
|
5024
5585
|
"supersedes": [],
|
|
5025
5586
|
"symbol": "RigidBody3D"
|
|
5026
5587
|
},
|
|
5588
|
+
{
|
|
5589
|
+
"aliases": [],
|
|
5590
|
+
"constraints": [
|
|
5591
|
+
"pass each instance's solid part (stone, bark), not its leaves; shapes are measured: a slender base is a trunk capsule, the rest an 18-DOP hull, and pieces under 0.25 m get none",
|
|
5592
|
+
"call update() every frame; it rescans only after the follow point moves a quarter of `radius` (default 40 m)",
|
|
5593
|
+
"`collision: \"hull\" | \"trunk\" | \"none\"` on an instance overrides the measured shape"
|
|
5594
|
+
],
|
|
5595
|
+
"example": "const solids = new ScatterColliders({ physics: ctx.physics, follow: player, collisionLayer: 4, instances: rocks.map((matrix) => ({ geometry: rockGeometry, matrix })) });",
|
|
5596
|
+
"importPath": "@threenative/physics",
|
|
5597
|
+
"kind": "class",
|
|
5598
|
+
"overrides": [],
|
|
5599
|
+
"package": "@threenative/physics",
|
|
5600
|
+
"requires": ["npm i @threenative/physics"],
|
|
5601
|
+
"signature": "export class ScatterColliders { … }",
|
|
5602
|
+
"situations": [
|
|
5603
|
+
"stop the player walking through scattered rocks and trees",
|
|
5604
|
+
"give instanced or streamed foliage props collision in an open world"
|
|
5605
|
+
],
|
|
5606
|
+
"summary": "Make scattered props solid: fixed bodies for rocks and trunks near a followed point, streamed with it.",
|
|
5607
|
+
"supersedes": [],
|
|
5608
|
+
"symbol": "ScatterColliders"
|
|
5609
|
+
},
|
|
5027
5610
|
{
|
|
5028
5611
|
"aliases": [],
|
|
5029
5612
|
"constraints": [
|
|
@@ -7543,6 +8126,23 @@
|
|
|
7543
8126
|
"supersedes": [],
|
|
7544
8127
|
"symbol": "applyPlacementOverrides"
|
|
7545
8128
|
},
|
|
8129
|
+
{
|
|
8130
|
+
"aliases": [],
|
|
8131
|
+
"constraints": [
|
|
8132
|
+
"every instance's asset must be in `assets`; every instance must land in exactly one cell run"
|
|
8133
|
+
],
|
|
8134
|
+
"example": "const baked = bakeBiome({ state: terrain.evaluate(), spec: validateBiome(json, \"savanna\"), assets });",
|
|
8135
|
+
"importPath": "@threenative/terrain",
|
|
8136
|
+
"kind": "function",
|
|
8137
|
+
"overrides": [],
|
|
8138
|
+
"package": "@threenative/terrain",
|
|
8139
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8140
|
+
"signature": "export function bakeBiome(options: IBakeBiomeOptions): IBakedBiome { … }",
|
|
8141
|
+
"situations": ["bake one biome's world package from an evaluated recipe and a biome file"],
|
|
8142
|
+
"summary": "Bake one biome: the recipe's evaluated state and the world package it streams. This is the composition `terrain_generate` and a game's build script both call, so the file layout a player streams is decided in one place. The biome is validated first — an inline spec from a request is checked here, not trusted — and the package's own placement runs are checked against the state they came from, so a bake can never ship a cell list that lost instances.",
|
|
8143
|
+
"supersedes": [],
|
|
8144
|
+
"symbol": "bakeBiome"
|
|
8145
|
+
},
|
|
7546
8146
|
{
|
|
7547
8147
|
"aliases": [],
|
|
7548
8148
|
"constraints": [
|
|
@@ -7592,10 +8192,46 @@
|
|
|
7592
8192
|
"requires": ["npm i -D @threenative/terrain"],
|
|
7593
8193
|
"signature": "export function bakeWorldPackage( state: ITerrainState, options: IBakeWorldPackageOptions, ): IBakedWorldPackage { … }",
|
|
7594
8194
|
"situations": ["hand an evaluated Strata terrain to a game without a Blender round trip"],
|
|
7595
|
-
"summary": "Bake an evaluated terrain into the engine's world package: a `world.json` manifest, a uint16 heightmap, a splat mask array, a placement buffer of eight float32 per instance, and the square cells that stream them. The encodings and row orders are the ones the Blender recipe `export_world.py` writes, so one runtime streams both without a second reader.",
|
|
8195
|
+
"summary": "Bake an evaluated terrain into the engine's world package: a `world.json` manifest, a uint16 heightmap, a splat mask array, a placement buffer of eight float32 per instance, a placement ID sidecar and the square cells that stream them. The encodings and row orders are the ones the Blender recipe `export_world.py` writes, so one runtime streams both without a second reader.",
|
|
7596
8196
|
"supersedes": [],
|
|
7597
8197
|
"symbol": "bakeWorldPackage"
|
|
7598
8198
|
},
|
|
8199
|
+
{
|
|
8200
|
+
"aliases": [],
|
|
8201
|
+
"constraints": [
|
|
8202
|
+
"the collar decides where a tree stands; this sampler never resamples the square"
|
|
8203
|
+
],
|
|
8204
|
+
"example": "const sampler = collarSampler(collar); const height = sampler.at(x, z);",
|
|
8205
|
+
"importPath": "@threenative/terrain",
|
|
8206
|
+
"kind": "function",
|
|
8207
|
+
"overrides": [],
|
|
8208
|
+
"package": "@threenative/terrain",
|
|
8209
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8210
|
+
"signature": "export function collarSampler(collar: HeightfieldCollar) { … }",
|
|
8211
|
+
"situations": ["plant a far field on a drawn collar and paint the canopy its crowns cover"],
|
|
8212
|
+
"summary": "The collar's height at any (x, z), and a way to raise one of its per-vertex attributes at a placement: both read the collar's own quad grid, so a lane that reshapes the collar moves the trees with it.",
|
|
8213
|
+
"supersedes": [],
|
|
8214
|
+
"symbol": "collarSampler"
|
|
8215
|
+
},
|
|
8216
|
+
{
|
|
8217
|
+
"aliases": [],
|
|
8218
|
+
"constraints": [
|
|
8219
|
+
"headless; the caller decides every placement, its streamed world, its reach and its pose"
|
|
8220
|
+
],
|
|
8221
|
+
"example": "const pkg = compilePropBuckets(entries, { bounds });",
|
|
8222
|
+
"importPath": "@threenative/terrain",
|
|
8223
|
+
"kind": "function",
|
|
8224
|
+
"overrides": ["cellSize and the base extent; the bucket, reach and kind of every entry"],
|
|
8225
|
+
"package": "@threenative/terrain",
|
|
8226
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8227
|
+
"signature": "export function compilePropBuckets( entries: readonly IPropBucketEntry[], options: ICompilePropBucketsOptions = { … }",
|
|
8228
|
+
"situations": [
|
|
8229
|
+
"bake the prop worlds a game streams, once, instead of compiling them at load"
|
|
8230
|
+
],
|
|
8231
|
+
"summary": "Group placements into their streamed worlds and write each world's cells and records. The order is the streamed one: cells sorted by `x` then `z`, assets sorted by name inside a cell, and records in the order the entries arrived inside a run. Same-cell, same-asset placements keep their input order, so a re-run of a seeded bake reproduces the buffer byte for byte.",
|
|
8232
|
+
"supersedes": [],
|
|
8233
|
+
"symbol": "compilePropBuckets"
|
|
8234
|
+
},
|
|
7599
8235
|
{
|
|
7600
8236
|
"aliases": [],
|
|
7601
8237
|
"constraints": [
|
|
@@ -7721,6 +8357,43 @@
|
|
|
7721
8357
|
"supersedes": [],
|
|
7722
8358
|
"symbol": "encodeZIP"
|
|
7723
8359
|
},
|
|
8360
|
+
{
|
|
8361
|
+
"aliases": [],
|
|
8362
|
+
"constraints": [
|
|
8363
|
+
"the row's `far` block decides every density; the caller supplies the collar and layer"
|
|
8364
|
+
],
|
|
8365
|
+
"example": "const trees = farForestPlacements({ size, resolution, collar, treeline, rules, asset, layer });",
|
|
8366
|
+
"importPath": "@threenative/terrain",
|
|
8367
|
+
"kind": "function",
|
|
8368
|
+
"overrides": [],
|
|
8369
|
+
"package": "@threenative/terrain",
|
|
8370
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8371
|
+
"signature": "export function farForestPlacements(options: IFarFieldOptions): IPlacement[] { … }",
|
|
8372
|
+
"situations": ["plant the stand past a game's playable square, out to the drawn collar"],
|
|
8373
|
+
"summary": "Far-field placements on the collar; also paints the collar's `canopy` attribute under each crown.",
|
|
8374
|
+
"supersedes": [],
|
|
8375
|
+
"symbol": "farForestPlacements"
|
|
8376
|
+
},
|
|
8377
|
+
{
|
|
8378
|
+
"aliases": [],
|
|
8379
|
+
"constraints": [
|
|
8380
|
+
"the field is a value, so two worlds sample the same formula with their own numbers"
|
|
8381
|
+
],
|
|
8382
|
+
"example": "const stand = fieldWeight(STAND_FIELD, x, z);",
|
|
8383
|
+
"importPath": "@threenative/terrain",
|
|
8384
|
+
"kind": "function",
|
|
8385
|
+
"overrides": [],
|
|
8386
|
+
"package": "@threenative/terrain",
|
|
8387
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8388
|
+
"signature": "export function fieldWeight(field: ICoverField, x: number, z: number): number { … }",
|
|
8389
|
+
"situations": [
|
|
8390
|
+
"sample the stand field a biome's trees and cover thin on",
|
|
8391
|
+
"measure the drift a biome's blades grow by, or the mat field its cover follows"
|
|
8392
|
+
],
|
|
8393
|
+
"summary": "A field's weight at (x, z), clamped to 0..1.",
|
|
8394
|
+
"supersedes": [],
|
|
8395
|
+
"symbol": "fieldWeight"
|
|
8396
|
+
},
|
|
7724
8397
|
{
|
|
7725
8398
|
"aliases": [],
|
|
7726
8399
|
"constraints": ["authoring data only; the game owns appearance, physics and rendering"],
|
|
@@ -7736,6 +8409,51 @@
|
|
|
7736
8409
|
"supersedes": [],
|
|
7737
8410
|
"symbol": "gradientAt"
|
|
7738
8411
|
},
|
|
8412
|
+
{
|
|
8413
|
+
"aliases": [],
|
|
8414
|
+
"constraints": [
|
|
8415
|
+
"returns an ordinary `Terrain`: add roads, rivers, scatter or more layers, then `evaluate()` in a build script",
|
|
8416
|
+
"shape only; materials, colours and textures belong to the game",
|
|
8417
|
+
"calibrated at size 5000, resolution 513; other sizes keep the same slopes and scale the relief with `size`"
|
|
8418
|
+
],
|
|
8419
|
+
"example": "const terrain = landform(\"alpine\", { size: 5000, resolution: 513, seed: 4 }); const state = terrain.evaluate();",
|
|
8420
|
+
"importPath": "@threenative/terrain",
|
|
8421
|
+
"kind": "function",
|
|
8422
|
+
"overrides": [
|
|
8423
|
+
"`relief` is the highest-minus-lowest height in metres before the finishing passes shave a few percent; `size`, `resolution` and `seed` as in `Terrain`"
|
|
8424
|
+
],
|
|
8425
|
+
"package": "@threenative/terrain",
|
|
8426
|
+
"requires": ["npm i @threenative/terrain"],
|
|
8427
|
+
"signature": "export function landform(kind: LandformKind, options: ILandformOptions = { … }",
|
|
8428
|
+
"situations": [
|
|
8429
|
+
"start an open world, a distant backdrop or a mountain level from a kind of place"
|
|
8430
|
+
],
|
|
8431
|
+
"summary": "One call, one landscape: a calibrated layer recipe for a kind of environment.",
|
|
8432
|
+
"supersedes": [],
|
|
8433
|
+
"symbol": "landform"
|
|
8434
|
+
},
|
|
8435
|
+
{
|
|
8436
|
+
"aliases": [],
|
|
8437
|
+
"constraints": [
|
|
8438
|
+
"resolution up to 513: the window is cut from a world twice as wide at the same spacing; build script only",
|
|
8439
|
+
"shape only; the game places, colours and fades it"
|
|
8440
|
+
],
|
|
8441
|
+
"example": "const { size, resolution, heights } = landformBackdrop(\"temperateMountains\", { seed: 7, centerHeight: 13 });",
|
|
8442
|
+
"importPath": "@threenative/terrain",
|
|
8443
|
+
"kind": "function",
|
|
8444
|
+
"overrides": [
|
|
8445
|
+
"`relief` and `centerHeight` in metres; `size`, `resolution` and `seed` as in `landform`"
|
|
8446
|
+
],
|
|
8447
|
+
"package": "@threenative/terrain",
|
|
8448
|
+
"requires": ["npm i @threenative/terrain"],
|
|
8449
|
+
"signature": "export function landformBackdrop( kind: LandformKind, options: IBackdropOptions = { … }",
|
|
8450
|
+
"situations": [
|
|
8451
|
+
"add a mountain backdrop around a playable area that the game's detail terrain covers"
|
|
8452
|
+
],
|
|
8453
|
+
"summary": "Distant mountains around a playable area: a landform window with a valley floor at its centre.",
|
|
8454
|
+
"supersedes": [],
|
|
8455
|
+
"symbol": "landformBackdrop"
|
|
8456
|
+
},
|
|
7739
8457
|
{
|
|
7740
8458
|
"aliases": [],
|
|
7741
8459
|
"constraints": ["authoring data only; the game owns appearance, physics and rendering"],
|
|
@@ -7745,12 +8463,95 @@
|
|
|
7745
8463
|
"overrides": [],
|
|
7746
8464
|
"package": "@threenative/terrain",
|
|
7747
8465
|
"requires": ["npm i @threenative/terrain"],
|
|
7748
|
-
"signature": "export
|
|
8466
|
+
"signature": "export function makeExport( state: ITerrainState | null, recipe: ITerrainDocument, kind: \"project\", ): Promise<IExportArchive>;",
|
|
7749
8467
|
"situations": ["export a terrain recipe and its numerical runtime data"],
|
|
7750
8468
|
"summary": "Recovered numerical/project exports; GLB/runtime outputs contain terrain only.",
|
|
7751
8469
|
"supersedes": [],
|
|
7752
8470
|
"symbol": "makeExport"
|
|
7753
8471
|
},
|
|
8472
|
+
{
|
|
8473
|
+
"aliases": [],
|
|
8474
|
+
"constraints": [
|
|
8475
|
+
"samples are finite and at least one; a flat field resolves every band onto its one height"
|
|
8476
|
+
],
|
|
8477
|
+
"example": "const bands = measureBands(spec.layers, state.height);",
|
|
8478
|
+
"importPath": "@threenative/terrain",
|
|
8479
|
+
"kind": "function",
|
|
8480
|
+
"overrides": [],
|
|
8481
|
+
"package": "@threenative/terrain",
|
|
8482
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8483
|
+
"signature": "export function measureBands( layers: readonly ILayerInfo[], heights: ArrayLike<number>, ): IMeasuredBands { … }",
|
|
8484
|
+
"situations": [
|
|
8485
|
+
"turn a biome file's height fractions into the metres a world actually measured"
|
|
8486
|
+
],
|
|
8487
|
+
"summary": "Resolve a biome's fraction bands against this world's own height samples.",
|
|
8488
|
+
"supersedes": [],
|
|
8489
|
+
"symbol": "measureBands"
|
|
8490
|
+
},
|
|
8491
|
+
{
|
|
8492
|
+
"aliases": [],
|
|
8493
|
+
"constraints": ["the file carries one foliage row, one grass row and a cover block"],
|
|
8494
|
+
"example": "const rules = orderedScatterRules(spec);",
|
|
8495
|
+
"importPath": "@threenative/terrain",
|
|
8496
|
+
"kind": "function",
|
|
8497
|
+
"overrides": [],
|
|
8498
|
+
"package": "@threenative/terrain",
|
|
8499
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8500
|
+
"signature": "export function orderedScatterRules(spec: IBiomeSpec): IOrderedScatterRules { … }",
|
|
8501
|
+
"situations": ["run a biome file's rows through the ordered scatter"],
|
|
8502
|
+
"summary": "A biome's rows as the ordered generators read them. The rule is short and shared; only these numbers differ between a wood, a barren shoulder, a dune field and a tundra, so the biome file names them rather than the code. A biome whose tree is not one this generator has art for fails here, naming the species, rather than planting nothing.",
|
|
8503
|
+
"supersedes": [],
|
|
8504
|
+
"symbol": "orderedScatterRules"
|
|
8505
|
+
},
|
|
8506
|
+
{
|
|
8507
|
+
"aliases": [],
|
|
8508
|
+
"constraints": [],
|
|
8509
|
+
"example": "const asset = propAssetOf(\"spruce:2\"); // \"spruce\"",
|
|
8510
|
+
"importPath": "@threenative/terrain",
|
|
8511
|
+
"kind": "function",
|
|
8512
|
+
"overrides": [],
|
|
8513
|
+
"package": "@threenative/terrain",
|
|
8514
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8515
|
+
"signature": "export function propAssetOf(modelKey: string): string { … }",
|
|
8516
|
+
"situations": [
|
|
8517
|
+
"count one species across a world's prop buckets, or name the asset a run draws"
|
|
8518
|
+
],
|
|
8519
|
+
"summary": "The asset a package run names. A prop run names the model it draws, `asset:variant[@shape]`; a container written by `bakeWorldPackage` names the asset alone. Both reduce to the asset here, which is what a count, a material or a placement's own `asset` field holds.",
|
|
8520
|
+
"supersedes": [],
|
|
8521
|
+
"symbol": "propAssetOf"
|
|
8522
|
+
},
|
|
8523
|
+
{
|
|
8524
|
+
"aliases": [],
|
|
8525
|
+
"constraints": [],
|
|
8526
|
+
"example": "const file = propPackageFile(\"forest\", \"local:true\", \"props.bin\"); // \"forest.local-true.props.bin\"",
|
|
8527
|
+
"importPath": "@threenative/terrain",
|
|
8528
|
+
"kind": "function",
|
|
8529
|
+
"overrides": [],
|
|
8530
|
+
"package": "@threenative/terrain",
|
|
8531
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8532
|
+
"signature": "export function propPackageFile(world: string, bucket: string, suffix: string): string { … }",
|
|
8533
|
+
"situations": ["name one of a bucket's three files without a bucket key that breaks a path"],
|
|
8534
|
+
"summary": "A path under `world/` that no bucket name can break: `local:true` becomes `local-true`. The bucket's own name is kept in the manifest, so this rename is only a file-system concern.",
|
|
8535
|
+
"supersedes": [],
|
|
8536
|
+
"symbol": "propPackageFile"
|
|
8537
|
+
},
|
|
8538
|
+
{
|
|
8539
|
+
"aliases": [],
|
|
8540
|
+
"constraints": ["the manifest names the files; nothing here touches a file system"],
|
|
8541
|
+
"example": "const { manifest, files } = propPackageFiles(pkg, \"forest\");",
|
|
8542
|
+
"importPath": "@threenative/terrain",
|
|
8543
|
+
"kind": "function",
|
|
8544
|
+
"overrides": [],
|
|
8545
|
+
"package": "@threenative/terrain",
|
|
8546
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8547
|
+
"signature": "export function propPackageFiles(pkg: IPropPackage, world: string): IPropPackageFiles { … }",
|
|
8548
|
+
"situations": [
|
|
8549
|
+
"write a compiled package to disk: one manifest and three files per streamed world"
|
|
8550
|
+
],
|
|
8551
|
+
"summary": "Write a compiled package as the manifest the game fetches and one set of files per bucket. The manifest names the files rather than embedding them, so a loader fetches only the buckets its query flags keep (`?farForest=on` keeps the far field, `?meadow=off` drops the vista cover).",
|
|
8552
|
+
"supersedes": [],
|
|
8553
|
+
"symbol": "propPackageFiles"
|
|
8554
|
+
},
|
|
7754
8555
|
{
|
|
7755
8556
|
"aliases": [],
|
|
7756
8557
|
"constraints": ["authoring data only; the game owns appearance, physics and rendering"],
|
|
@@ -7766,6 +8567,23 @@
|
|
|
7766
8567
|
"supersedes": [],
|
|
7767
8568
|
"symbol": "sampleHeight"
|
|
7768
8569
|
},
|
|
8570
|
+
{
|
|
8571
|
+
"aliases": [],
|
|
8572
|
+
"constraints": [
|
|
8573
|
+
"`data.rules` is the biome's rows, and `data.field` the ground they were graded on"
|
|
8574
|
+
],
|
|
8575
|
+
"example": "const { placements, counts } = scatterProps(data, focus, clearings);",
|
|
8576
|
+
"importPath": "@threenative/terrain",
|
|
8577
|
+
"kind": "function",
|
|
8578
|
+
"overrides": [],
|
|
8579
|
+
"package": "@threenative/terrain",
|
|
8580
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8581
|
+
"signature": "export function scatterProps( data: IOrderedScatterField, focus: { … }",
|
|
8582
|
+
"situations": ["bake a biome that says `\"stream\": \"ordered\"`"],
|
|
8583
|
+
"summary": "Every placement, for one world, from one seed: the game's own rule set, in its own draw order.",
|
|
8584
|
+
"supersedes": [],
|
|
8585
|
+
"symbol": "scatterProps"
|
|
8586
|
+
},
|
|
7769
8587
|
{
|
|
7770
8588
|
"aliases": [],
|
|
7771
8589
|
"constraints": ["authoring data only; the game owns appearance, physics and rendering"],
|
|
@@ -7834,7 +8652,8 @@
|
|
|
7834
8652
|
"signature": "export class Terrain { … }",
|
|
7835
8653
|
"situations": [
|
|
7836
8654
|
"author seeded terrain with noise, sculpting, erosion, roads, rivers and scatter",
|
|
7837
|
-
"generate a procedural heightmap landscape or island for a game"
|
|
8655
|
+
"generate a procedural heightmap landscape or island for a game",
|
|
8656
|
+
"make realistic mountains, hills, desert, coast, tundra or volcano terrain: start from `landform(kind)`, or add `erode({ method: \"fluvial\" })` for dendritic valleys"
|
|
7838
8657
|
],
|
|
7839
8658
|
"summary": "Ordered, stable-ID terrain authoring with synchronous atomic transactions.",
|
|
7840
8659
|
"supersedes": [],
|
|
@@ -7855,6 +8674,42 @@
|
|
|
7855
8674
|
"supersedes": [],
|
|
7856
8675
|
"symbol": "TerrainEvaluator"
|
|
7857
8676
|
},
|
|
8677
|
+
{
|
|
8678
|
+
"aliases": [],
|
|
8679
|
+
"constraints": [
|
|
8680
|
+
"square grids only; compare crops of equal spacing, because slope and curvature depend on it"
|
|
8681
|
+
],
|
|
8682
|
+
"example": "const stats = terrainStats(state.height, state.resolution, state.size);",
|
|
8683
|
+
"importPath": "@threenative/terrain",
|
|
8684
|
+
"kind": "function",
|
|
8685
|
+
"overrides": [],
|
|
8686
|
+
"package": "@threenative/terrain",
|
|
8687
|
+
"requires": ["npm i @threenative/terrain"],
|
|
8688
|
+
"signature": "export function terrainStats(height: ArrayLike<number>, n: number, size: number): ITerrainStats { … }",
|
|
8689
|
+
"situations": ["compare generated terrain with a USGS or SRTM crop on the same footprint"],
|
|
8690
|
+
"summary": "Landform statistics used to calibrate generators against real DEMs.",
|
|
8691
|
+
"supersedes": [],
|
|
8692
|
+
"symbol": "terrainStats"
|
|
8693
|
+
},
|
|
8694
|
+
{
|
|
8695
|
+
"aliases": [],
|
|
8696
|
+
"constraints": [
|
|
8697
|
+
"The file carries no appearance; colours, materials and shading stay game source"
|
|
8698
|
+
],
|
|
8699
|
+
"example": "const spec = validateBiome(JSON.parse(text), \"forest\");",
|
|
8700
|
+
"importPath": "@threenative/terrain",
|
|
8701
|
+
"kind": "function",
|
|
8702
|
+
"overrides": [],
|
|
8703
|
+
"package": "@threenative/terrain",
|
|
8704
|
+
"requires": ["npm i @threenative/terrain"],
|
|
8705
|
+
"signature": "export function validateBiome(spec: unknown, name: string): IBiomeSpec { … }",
|
|
8706
|
+
"situations": [
|
|
8707
|
+
"read a biome's rules from `starter/<biome>/biome.data.json` before a game or a cook uses them"
|
|
8708
|
+
],
|
|
8709
|
+
"summary": "One biome file, checked field by field. The file is `biome.data.json`: `biome.json` is Biome's own configuration name, and a data file called that is parsed as a project config and fails the lint.",
|
|
8710
|
+
"supersedes": [],
|
|
8711
|
+
"symbol": "validateBiome"
|
|
8712
|
+
},
|
|
7858
8713
|
{
|
|
7859
8714
|
"aliases": [],
|
|
7860
8715
|
"constraints": ["authoring data only; the game owns appearance, physics and rendering"],
|
|
@@ -7908,6 +8763,72 @@
|
|
|
7908
8763
|
"supersedes": [],
|
|
7909
8764
|
"symbol": "checkEnvironmentAssets"
|
|
7910
8765
|
},
|
|
8766
|
+
{
|
|
8767
|
+
"aliases": [],
|
|
8768
|
+
"constraints": [
|
|
8769
|
+
"the caller supplies the TransformControls, proxy, controller and every drawing callback"
|
|
8770
|
+
],
|
|
8771
|
+
"example": "const selection = createEditorSelection({ gizmo, proxy, controller, grounding, surface, defaultFootprintSize, refreshPose, drawFootprint, restorePlacement, previewPlacement, setSaving, selectedChanged, setNavigation, message });",
|
|
8772
|
+
"importPath": "@threenative/terrain/editor",
|
|
8773
|
+
"kind": "function",
|
|
8774
|
+
"overrides": [],
|
|
8775
|
+
"package": "@threenative/terrain",
|
|
8776
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8777
|
+
"signature": "export function createEditorSelection( { … }",
|
|
8778
|
+
"situations": ["drive terrain-editor selection, gizmo drags, undo and saved transactions"],
|
|
8779
|
+
"summary": "Gesture and transaction mechanics; the caller owns the controls, proxy and all rendering.",
|
|
8780
|
+
"supersedes": [],
|
|
8781
|
+
"symbol": "createEditorSelection"
|
|
8782
|
+
},
|
|
8783
|
+
{
|
|
8784
|
+
"aliases": [],
|
|
8785
|
+
"constraints": [
|
|
8786
|
+
"the point is multiplied in place; the pose needs finite position, quaternion and scale"
|
|
8787
|
+
],
|
|
8788
|
+
"example": "const centre = editorPlacementCenter(localCentre.clone(), placement);",
|
|
8789
|
+
"importPath": "@threenative/terrain/editor",
|
|
8790
|
+
"kind": "function",
|
|
8791
|
+
"overrides": [],
|
|
8792
|
+
"package": "@threenative/terrain",
|
|
8793
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8794
|
+
"signature": "export function editorPlacementCenter(point: Vector3, pose: IPlacementOverride): Vector3 { … }",
|
|
8795
|
+
"situations": ["find the world-space centre of a placed terrain-editor instance"],
|
|
8796
|
+
"summary": "Transform the caller's measured geometry centre into the evaluated placement's world space.",
|
|
8797
|
+
"supersedes": [],
|
|
8798
|
+
"symbol": "editorPlacementCenter"
|
|
8799
|
+
},
|
|
8800
|
+
{
|
|
8801
|
+
"aliases": [],
|
|
8802
|
+
"constraints": ["the point is projected in place; pass a clone to keep the original"],
|
|
8803
|
+
"example": "const [x, y] = editorPointToClient(point.clone(), camera, canvas.getBoundingClientRect());",
|
|
8804
|
+
"importPath": "@threenative/terrain/editor",
|
|
8805
|
+
"kind": "function",
|
|
8806
|
+
"overrides": [],
|
|
8807
|
+
"package": "@threenative/terrain",
|
|
8808
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8809
|
+
"signature": "export function editorPointToClient( point: Vector3, camera: Camera, box: { … }",
|
|
8810
|
+
"situations": ["convert a terrain-editor world point to viewport client pixels"],
|
|
8811
|
+
"summary": "Project an injected world point to client pixels in the caller's viewport.",
|
|
8812
|
+
"supersedes": [],
|
|
8813
|
+
"symbol": "editorPointToClient"
|
|
8814
|
+
},
|
|
8815
|
+
{
|
|
8816
|
+
"aliases": [],
|
|
8817
|
+
"constraints": [
|
|
8818
|
+
"the supplied mesh and raycast determine the surface; missing intersections return undefined"
|
|
8819
|
+
],
|
|
8820
|
+
"example": "const height = editorSurfaceHeight(ctx, terrainMesh, x, z);",
|
|
8821
|
+
"importPath": "@threenative/terrain/editor",
|
|
8822
|
+
"kind": "function",
|
|
8823
|
+
"overrides": [],
|
|
8824
|
+
"package": "@threenative/terrain",
|
|
8825
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8826
|
+
"signature": "export function editorSurfaceHeight( ctx: { … }",
|
|
8827
|
+
"situations": ["query terrain-editor surface elevation at world X/Z coordinates"],
|
|
8828
|
+
"summary": "Query the rendered heightfield, including its triangulation rather than an interpolated bake.",
|
|
8829
|
+
"supersedes": [],
|
|
8830
|
+
"symbol": "editorSurfaceHeight"
|
|
8831
|
+
},
|
|
7911
8832
|
{
|
|
7912
8833
|
"aliases": [],
|
|
7913
8834
|
"constraints": ["framing only; an unknown target returns a named diagnostic and no camera"],
|
|
@@ -7965,6 +8886,23 @@
|
|
|
7965
8886
|
"supersedes": [],
|
|
7966
8887
|
"symbol": "inspectSpatial"
|
|
7967
8888
|
},
|
|
8889
|
+
{
|
|
8890
|
+
"aliases": [],
|
|
8891
|
+
"constraints": [
|
|
8892
|
+
"the caller supplies world and default footprint sizes; unsupported layers return undefined"
|
|
8893
|
+
],
|
|
8894
|
+
"example": "const pose = landformPose(layer, terrain.size, footprintSize);",
|
|
8895
|
+
"importPath": "@threenative/terrain/editor",
|
|
8896
|
+
"kind": "function",
|
|
8897
|
+
"overrides": [],
|
|
8898
|
+
"package": "@threenative/terrain",
|
|
8899
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8900
|
+
"signature": "export function landformPose(layer: Layer, worldSize: number, defaultSize: number) { … }",
|
|
8901
|
+
"situations": ["derive a terrain-editor gizmo pose from a landform layer"],
|
|
8902
|
+
"summary": "Recipe footprints are heights over X/Z, never independently transformed solids.",
|
|
8903
|
+
"supersedes": [],
|
|
8904
|
+
"symbol": "landformPose"
|
|
8905
|
+
},
|
|
7968
8906
|
{
|
|
7969
8907
|
"aliases": [],
|
|
7970
8908
|
"constraints": [
|
|
@@ -7982,6 +8920,40 @@
|
|
|
7982
8920
|
"supersedes": [],
|
|
7983
8921
|
"symbol": "mountTerrainEditor"
|
|
7984
8922
|
},
|
|
8923
|
+
{
|
|
8924
|
+
"aliases": [],
|
|
8925
|
+
"constraints": [
|
|
8926
|
+
"the caller supplies the raycast context, terrain mesh, instanced meshes and evaluated placements"
|
|
8927
|
+
],
|
|
8928
|
+
"example": "const id = pickEditorPlacement(ctx, terrainMesh, meshes, placements, event.clientX, event.clientY);",
|
|
8929
|
+
"importPath": "@threenative/terrain/editor",
|
|
8930
|
+
"kind": "function",
|
|
8931
|
+
"overrides": [],
|
|
8932
|
+
"package": "@threenative/terrain",
|
|
8933
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8934
|
+
"signature": "export function pickEditorPlacement( ctx: Parameters<typeof pickEditorSurface>[0], terrain: Mesh, meshes: readonly Object3D[], placements: Iterable< { … }",
|
|
8935
|
+
"situations": [
|
|
8936
|
+
"pick a placed instance in the terrain editor from viewport client coordinates"
|
|
8937
|
+
],
|
|
8938
|
+
"summary": "A foreground terrain hit occludes placements; matching uses the evaluated world position.",
|
|
8939
|
+
"supersedes": [],
|
|
8940
|
+
"symbol": "pickEditorPlacement"
|
|
8941
|
+
},
|
|
8942
|
+
{
|
|
8943
|
+
"aliases": [],
|
|
8944
|
+
"constraints": ["the caller supplies the raycast implementation and ordered targets"],
|
|
8945
|
+
"example": "const hit = pickEditorSurface(ctx, [terrainMesh], event.clientX, event.clientY);",
|
|
8946
|
+
"importPath": "@threenative/terrain/editor",
|
|
8947
|
+
"kind": "function",
|
|
8948
|
+
"overrides": [],
|
|
8949
|
+
"package": "@threenative/terrain",
|
|
8950
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
8951
|
+
"signature": "export function pickEditorSurface( ctx: { … }",
|
|
8952
|
+
"situations": ["pick a terrain-editor surface from viewport client coordinates"],
|
|
8953
|
+
"summary": "Convert viewport client coordinates once; the installed picker owns ray intersection.",
|
|
8954
|
+
"supersedes": [],
|
|
8955
|
+
"symbol": "pickEditorSurface"
|
|
8956
|
+
},
|
|
7985
8957
|
{
|
|
7986
8958
|
"aliases": [],
|
|
7987
8959
|
"constraints": ["authoring data only; non-finite, malformed and out-of-extent queries throw"],
|
|
@@ -8088,6 +9060,23 @@
|
|
|
8088
9060
|
"supersedes": [],
|
|
8089
9061
|
"symbol": "TerrainEditorController"
|
|
8090
9062
|
},
|
|
9063
|
+
{
|
|
9064
|
+
"aliases": [],
|
|
9065
|
+
"constraints": [
|
|
9066
|
+
"finite coordinates and positive scales are required; X/Z rotations that overhang throw"
|
|
9067
|
+
],
|
|
9068
|
+
"example": "const next = transformedLandform(layer, position, quaternion, scale, surfaceHeight);",
|
|
9069
|
+
"importPath": "@threenative/terrain/editor",
|
|
9070
|
+
"kind": "function",
|
|
9071
|
+
"overrides": [],
|
|
9072
|
+
"package": "@threenative/terrain",
|
|
9073
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9074
|
+
"signature": "export function transformedLandform( layer: Layer, position: Vector3, quaternion: Quaternion, scale: Vector3, anchor: number, ): Layer { … }",
|
|
9075
|
+
"situations": ["apply a terrain-editor gizmo transform to a landform layer"],
|
|
9076
|
+
"summary": "Convert a terrain-editor gizmo pose into a heightfield landform footprint.",
|
|
9077
|
+
"supersedes": [],
|
|
9078
|
+
"symbol": "transformedLandform"
|
|
9079
|
+
},
|
|
8091
9080
|
{
|
|
8092
9081
|
"aliases": [],
|
|
8093
9082
|
"constraints": [
|
|
@@ -8260,24 +9249,105 @@
|
|
|
8260
9249
|
{
|
|
8261
9250
|
"aliases": [],
|
|
8262
9251
|
"constraints": [
|
|
8263
|
-
"browser authoring
|
|
9252
|
+
"browser authoring FileReader/canvas; all appearance and coherent water come from the game"
|
|
8264
9253
|
],
|
|
8265
|
-
"example": "const
|
|
9254
|
+
"example": "const prepared = await prepareWorldGLTF(input);",
|
|
8266
9255
|
"importPath": "@threenative/terrain/export",
|
|
8267
9256
|
"kind": "function",
|
|
9257
|
+
"overrides": [],
|
|
9258
|
+
"package": "@threenative/terrain",
|
|
9259
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9260
|
+
"signature": "export async function prepareWorldGLTF(input: IWorldGLBInput): Promise< { … }",
|
|
9261
|
+
"situations": [
|
|
9262
|
+
"export the terrain as a glb for another three.js project via the headless cook",
|
|
9263
|
+
"prepare the terrain editor's resolved world for headless portable GLB cooking"
|
|
9264
|
+
],
|
|
9265
|
+
"summary": "Prepare the game's validated, frozen portable scene; the server cook owns GLB encoding.",
|
|
9266
|
+
"supersedes": [],
|
|
9267
|
+
"symbol": "prepareWorldGLTF"
|
|
9268
|
+
},
|
|
9269
|
+
{
|
|
9270
|
+
"aliases": [],
|
|
9271
|
+
"constraints": ["Node authoring only; recipes, asset tables and sky paths stay in the game"],
|
|
9272
|
+
"example": "await bakeKit(import.meta.url, { sky: \"hdri/game-sky.hdr\" });",
|
|
9273
|
+
"importPath": "@threenative/terrain/kit",
|
|
9274
|
+
"kind": "function",
|
|
9275
|
+
"overrides": [],
|
|
9276
|
+
"package": "@threenative/terrain",
|
|
9277
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9278
|
+
"signature": "export async function bakeKit( url: string, { … }",
|
|
9279
|
+
"situations": ["bake a copied terrain starter kit into its offline world package"],
|
|
9280
|
+
"summary": "Bake a copied kit, optionally using the caller's installed world cook.",
|
|
9281
|
+
"supersedes": [],
|
|
9282
|
+
"symbol": "bakeKit"
|
|
9283
|
+
},
|
|
9284
|
+
{
|
|
9285
|
+
"aliases": [],
|
|
9286
|
+
"constraints": [
|
|
9287
|
+
"Node authoring only; verifies archive size and SHA256 before atomic extraction"
|
|
9288
|
+
],
|
|
9289
|
+
"example": "const assets = await starterAssetsDir();",
|
|
9290
|
+
"importPath": "@threenative/terrain/kit",
|
|
9291
|
+
"kind": "function",
|
|
9292
|
+
"overrides": [],
|
|
9293
|
+
"package": "@threenative/terrain",
|
|
9294
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9295
|
+
"signature": "export async function starterAssetsDir(): Promise<string> { … }",
|
|
9296
|
+
"situations": ["resolve terrain kit models and textures for offline baking"],
|
|
9297
|
+
"summary": "Resolve shared starter assets locally, or download the package's pinned archive on demand.",
|
|
9298
|
+
"supersedes": [],
|
|
9299
|
+
"symbol": "starterAssetsDir"
|
|
9300
|
+
},
|
|
9301
|
+
{
|
|
9302
|
+
"aliases": [],
|
|
9303
|
+
"constraints": ["Runtime subpath; the game supplies every appearance and collision choice"],
|
|
9304
|
+
"example": "await addStarterWorld(ctx, follow, spec);",
|
|
9305
|
+
"importPath": "@threenative/terrain/starter",
|
|
9306
|
+
"kind": "function",
|
|
9307
|
+
"overrides": [],
|
|
9308
|
+
"package": "@threenative/terrain",
|
|
9309
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9310
|
+
"signature": "export async function addStarterWorld<Extra extends { … }",
|
|
9311
|
+
"situations": [
|
|
9312
|
+
"attach a baked starter world with game-owned surfaces, prop dressing and water"
|
|
9313
|
+
],
|
|
9314
|
+
"summary": "Load caller-authored starter data with one scene lifetime; all appearance comes from spec.",
|
|
9315
|
+
"supersedes": [],
|
|
9316
|
+
"symbol": "addStarterWorld"
|
|
9317
|
+
},
|
|
9318
|
+
{
|
|
9319
|
+
"aliases": [],
|
|
9320
|
+
"constraints": [],
|
|
9321
|
+
"example": "const edited = editWorldPlacements(data, { remove: [\"scree:candidate:7:41\"] }, (x, z) => field.heightAt(x, z));",
|
|
9322
|
+
"importPath": "@threenative/terrain/starter",
|
|
9323
|
+
"kind": "function",
|
|
8268
9324
|
"overrides": [
|
|
8269
|
-
"
|
|
9325
|
+
"grounding defaults on, while `grounding: false` preserves the authored Y coordinate"
|
|
8270
9326
|
],
|
|
8271
9327
|
"package": "@threenative/terrain",
|
|
8272
9328
|
"requires": ["npm i -D @threenative/terrain"],
|
|
8273
|
-
"signature": "export
|
|
9329
|
+
"signature": "export function editWorldPlacements( data: { … }",
|
|
8274
9330
|
"situations": [
|
|
8275
|
-
"
|
|
8276
|
-
"export the whole terrain world as one glb for another three.js project"
|
|
9331
|
+
"change generated terrain composition from game source without rebaking the world"
|
|
8277
9332
|
],
|
|
8278
|
-
"summary": "
|
|
9333
|
+
"summary": "Apply deterministic startup edits to the decoded placement data before a world is loaded.",
|
|
9334
|
+
"supersedes": [],
|
|
9335
|
+
"symbol": "editWorldPlacements"
|
|
9336
|
+
},
|
|
9337
|
+
{
|
|
9338
|
+
"aliases": [],
|
|
9339
|
+
"constraints": ["Shapes and reach are supplied by the game; detach releases every body"],
|
|
9340
|
+
"example": "new PropColliders(ctx, follow, manifest, records, shapes, reach, name);",
|
|
9341
|
+
"importPath": "@threenative/terrain/starter",
|
|
9342
|
+
"kind": "class",
|
|
9343
|
+
"overrides": [],
|
|
9344
|
+
"package": "@threenative/terrain",
|
|
9345
|
+
"requires": ["npm i -D @threenative/terrain"],
|
|
9346
|
+
"signature": "export class PropColliders extends Object3D implements IComputeDriven { … }",
|
|
9347
|
+
"situations": ["attach nearby prop collision bodies from baked placement records"],
|
|
9348
|
+
"summary": "Stream caller-specified fixed collision shapes around a moving follow object.",
|
|
8279
9349
|
"supersedes": [],
|
|
8280
|
-
"symbol": "
|
|
9350
|
+
"symbol": "PropColliders"
|
|
8281
9351
|
},
|
|
8282
9352
|
{
|
|
8283
9353
|
"aliases": [],
|
|
@@ -9091,7 +10161,7 @@
|
|
|
9091
10161
|
"procedural trees",
|
|
9092
10162
|
"swaying trees",
|
|
9093
10163
|
"tree foliage wind sway",
|
|
9094
|
-
"
|
|
10164
|
+
"grow procedural tree meshes"
|
|
9095
10165
|
]
|
|
9096
10166
|
},
|
|
9097
10167
|
{
|
|
@@ -9112,7 +10182,7 @@
|
|
|
9112
10182
|
"blurb": "A three-room grid dungeon of mannequin fighters: melee, the Arcane Surge, loot, equipment, persistence, and a real character sheet.",
|
|
9113
10183
|
"name": "action-rpg",
|
|
9114
10184
|
"title": "Action RPG",
|
|
9115
|
-
"words": ["action-rpg"]
|
|
10185
|
+
"words": ["action-rpg", "diablo", "arpg", "hack-and-slash", "dungeon-crawler"]
|
|
9116
10186
|
},
|
|
9117
10187
|
{
|
|
9118
10188
|
"blurb": "Wren crosses a sunlit clearing and a three-room moss dungeon with lock-on sword combat, a shield, a block-and-switch puzzle, a small key and the Stone Warden mini-boss.",
|