threedog 0.7.0 → 1.0.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/CHANGELOG.md +411 -1
- package/README.md +8 -11
- package/core/{Animator.js → assets/Animator.js} +30 -18
- package/core/{Assets.js → assets/Assets.js} +131 -56
- package/core/{Baked.js → assets/Baked.js} +4 -4
- package/core/assets/assetEntry.js +302 -0
- package/core/{assetHot.js → assets/assetHot.js} +9 -7
- package/core/{assetLoad.js → assets/assetLoad.js} +55 -16
- package/core/assets/assetLod.js +113 -0
- package/core/{assetManifest.js → assets/assetManifest.js} +19 -11
- package/core/{assetReport.js → assets/assetReport.js} +7 -14
- package/core/{namedModel.js → assets/namedModel.js} +17 -13
- package/core/{Audio.js → audio/Audio.js} +47 -25
- package/core/{audioRules.js → audio/audioRules.js} +8 -5
- package/core/{audioVoice.js → audio/audioVoice.js} +17 -30
- package/core/{Events.js → base/Events.js} +3 -3
- package/core/{I18n.js → base/I18n.js} +15 -12
- package/core/{Random.js → base/Random.js} +7 -4
- package/core/{Vars.js → base/Vars.js} +14 -4
- package/core/{easing.js → base/easing.js} +1 -1
- package/core/{errorCodes.js → base/errorCodes.js} +151 -125
- package/core/{errorHints.js → base/errorHints.js} +17 -10
- package/core/{errors.js → base/errors.js} +12 -10
- package/core/{events.generated.js → base/events.generated.js} +11 -0
- package/core/base/follows.js +26 -0
- package/core/base/math.js +66 -0
- package/core/{params.js → base/params.js} +5 -6
- package/core/base/saveValues.js +81 -0
- package/core/base/sections.js +97 -0
- package/core/base/spelling.js +32 -0
- package/core/base/util.js +32 -0
- package/core/{validate.js → base/validate.js} +34 -34
- package/core/{Engine.js → engine/Engine.js} +137 -91
- package/core/{Loading.js → engine/Loading.js} +34 -5
- package/core/{copies.js → engine/copies.js} +4 -4
- package/core/{headlessLoad.js → engine/headlessLoad.js} +32 -15
- package/core/{lifecycle.js → engine/lifecycle.js} +41 -34
- package/core/{loop.js → engine/loop.js} +88 -49
- package/core/engine/moduleSlots.js +176 -0
- package/core/{moduleTypes.js → engine/moduleTypes.js} +26 -14
- package/core/engine/modules.js +503 -0
- package/core/{page.js → engine/page.js} +59 -29
- package/core/{plugins.js → engine/plugins.js} +21 -12
- package/core/{services.js → engine/services.js} +50 -40
- package/core/{startup.js → engine/startup.js} +66 -54
- package/core/{Input.js → input/Input.js} +67 -39
- package/core/{inputContext.js → input/inputContext.js} +14 -5
- package/core/input/inputKeyboard.js +39 -0
- package/core/{inputPad.js → input/inputPad.js} +24 -3
- package/core/{inputPointer.js → input/inputPointer.js} +11 -3
- package/core/input/inputSeat.js +66 -0
- package/core/{inputTouch.js → input/inputTouch.js} +24 -7
- package/core/{Budget.js → inspect/Budget.js} +21 -20
- package/core/{DebugOverrides.js → inspect/DebugOverrides.js} +43 -18
- package/core/{Describe.js → inspect/Describe.js} +34 -26
- package/core/{Inspect.js → inspect/Inspect.js} +39 -10
- package/core/{InspectMaterials.js → inspect/InspectMaterials.js} +7 -8
- package/core/{InspectPerf.js → inspect/InspectPerf.js} +19 -13
- package/core/{InspectScene.js → inspect/InspectScene.js} +8 -5
- package/core/{MaterialInfo.js → inspect/MaterialInfo.js} +3 -2
- package/core/{UrlState.js → inspect/UrlState.js} +60 -24
- package/core/{catalog.js → inspect/catalog.js} +15 -8
- package/core/{checks.js → inspect/checks.js} +7 -5
- package/core/{debugView.js → inspect/debugView.js} +4 -4
- package/core/{describeRender.js → inspect/describeRender.js} +24 -22
- package/core/{describeText.js → inspect/describeText.js} +17 -8
- package/core/inspect/geometryWatch.js +38 -0
- package/core/{lightWatch.js → inspect/lightWatch.js} +8 -8
- package/core/inspect/metadata.generated.js +4140 -0
- package/core/{pictureWriters.js → inspect/pictureWriters.js} +130 -47
- package/core/{shaderCost.js → inspect/shaderCost.js} +1 -1
- package/core/inspect/toolDoor.js +21 -0
- package/core/inspect/valueHistory.js +35 -0
- package/core/{Ops.js → ops/Ops.js} +44 -14
- package/core/{control.js → ops/control.js} +57 -31
- package/core/ops/holds.js +140 -0
- package/core/{opsAtomic.js → ops/opsAtomic.js} +18 -5
- package/core/{opsCheck.js → ops/opsCheck.js} +11 -10
- package/core/{opsFail.js → ops/opsFail.js} +5 -7
- package/core/{opsGuard.js → ops/opsGuard.js} +3 -3
- package/core/{opsRun.js → ops/opsRun.js} +9 -6
- package/core/{owned.js → ops/owned.js} +33 -19
- package/core/{sharedPoint.js → ops/sharedPoint.js} +13 -16
- package/core/{stackFrames.js → ops/stackFrames.js} +2 -2
- package/core/{stacks.js → ops/stacks.js} +34 -15
- package/core/{wrap.js → ops/wrap.js} +8 -6
- package/core/{SaveStore.js → saves/SaveStore.js} +53 -27
- package/core/{Saves.js → saves/Saves.js} +171 -54
- package/core/saves/saveApply.js +312 -0
- package/core/{saveFiles.js → saves/saveFiles.js} +45 -38
- package/core/{saveVersions.js → saves/saveVersions.js} +24 -23
- package/core/saves/session.js +231 -0
- package/core/saves/stateReplace.js +184 -0
- package/core/{Rays.js → scene/Rays.js} +44 -30
- package/core/{Views.js → scene/Views.js} +16 -8
- package/core/{adaptive.js → scene/adaptive.js} +19 -9
- package/core/{canvasBox.js → scene/canvasBox.js} +4 -3
- package/core/scene/compositeGround.js +72 -0
- package/core/scene/floor.js +17 -0
- package/core/{gameLights.js → scene/gameLights.js} +17 -7
- package/core/{grayMap.js → scene/grayMap.js} +8 -2
- package/core/{grid.js → scene/grid.js} +6 -4
- package/core/{gridLoad.js → scene/gridLoad.js} +1 -1
- package/core/scene/ground.contract.js +14 -0
- package/core/scene/ground.js +139 -0
- package/core/{movement.js → scene/movement.js} +3 -3
- package/core/{pictureSlots.js → scene/pictureSlots.js} +2 -2
- package/core/scene/pixel.js +154 -0
- package/core/scene/pixelRatio.js +167 -0
- package/core/{sceneDelta.js → scene/sceneDelta.js} +5 -5
- package/core/{sceneMethods.js → scene/sceneMethods.js} +43 -15
- package/core/scene/stepPoses.js +60 -0
- package/core/{targeting.js → scene/targeting.js} +4 -5
- package/core/{thingExplain.js → scene/thingExplain.js} +7 -6
- package/core/{thingOps.js → scene/thingOps.js} +25 -16
- package/core/{things.js → scene/things.js} +18 -5
- package/core/{threePatches.js → scene/threePatches.js} +1 -1
- package/core/{tier.js → scene/tier.js} +10 -0
- package/core/scene/view.js +161 -0
- package/core/{Batching.js → stream/Batching.js} +85 -28
- package/core/{Stream.js → stream/Stream.js} +80 -38
- package/core/{batchGroups.js → stream/batchGroups.js} +11 -9
- package/core/{chunkStream.js → stream/chunkStream.js} +40 -0
- package/core/{scatter.js → stream/scatter.js} +7 -4
- package/core/{streamSources.js → stream/streamSources.js} +14 -8
- package/core/{Commits.js → threads/Commits.js} +17 -11
- package/core/{Jobs.js → threads/Jobs.js} +25 -13
- package/core/{Threads.js → threads/Threads.js} +21 -18
- package/core/{threadPure.js → threads/threadPure.js} +7 -5
- package/core/{threadServe.js → threads/threadServe.js} +3 -3
- package/core/{Clock.js → time/Clock.js} +20 -11
- package/core/{dayTime.js → time/dayTime.js} +5 -1
- package/core/{skip.js → time/skip.js} +28 -21
- package/core/{time.js → time/time.js} +32 -20
- package/core/{uiClock.js → time/uiClock.js} +4 -4
- package/docs/AI.md +92 -72
- package/docs/API.md +33 -28
- package/docs/CODEMAP.md +121 -200
- package/docs/COMMANDS.md +77 -70
- package/docs/CONVENTIONS.md +167 -24
- package/docs/MIGRATING-0.8.md +171 -0
- package/docs/MIGRATING-1.0.md +101 -0
- package/docs/THREE.md +140 -38
- package/docs/api/assets.md +12 -13
- package/docs/api/audio.md +6 -5
- package/docs/api/budget.md +4 -4
- package/docs/api/calendar.md +10 -11
- package/docs/api/cameraRig.md +32 -29
- package/docs/api/characters.md +35 -24
- package/docs/api/clock.md +1 -1
- package/docs/api/collider3d.md +9 -0
- package/docs/api/collision.md +12 -9
- package/docs/api/content.md +18 -17
- package/docs/api/dialogue.md +5 -4
- package/docs/api/engine.md +58 -54
- package/docs/api/events.md +17 -6
- package/docs/api/flow.md +1 -1
- package/docs/api/grids.md +1 -1
- package/docs/api/ground.md +6 -7
- package/docs/api/hud.md +2 -2
- package/docs/api/i18n.md +6 -6
- package/docs/api/input.md +9 -8
- package/docs/api/interactions.md +5 -5
- package/docs/api/inventory.md +10 -10
- package/docs/api/jobs.md +5 -5
- package/docs/api/level.md +10 -9
- package/docs/api/lightPool.md +1 -6
- package/docs/api/music.md +3 -3
- package/docs/api/nav.md +14 -12
- package/docs/api/openWorld.md +1 -1
- package/docs/api/particles.md +10 -7
- package/docs/api/photo.md +4 -2
- package/docs/api/pickups.md +3 -3
- package/docs/api/post.md +21 -5
- package/docs/api/quests.md +7 -5
- package/docs/api/rays.md +7 -7
- package/docs/api/rigid.md +29 -19
- package/docs/api/saves.md +13 -11
- package/docs/api/settings.md +9 -8
- package/docs/api/sky.md +8 -7
- package/docs/api/stream.md +8 -9
- package/docs/api/swarm.md +34 -0
- package/docs/api/terrain.md +6 -8
- package/docs/api/terrainDraw.md +2 -2
- package/docs/api/timeline.md +4 -4
- package/docs/api/tools.md +27 -22
- package/docs/api/triggers.md +2 -0
- package/docs/api/vars.md +1 -1
- package/docs/api/vegetation.md +4 -3
- package/docs/api/vegetationDraw.md +2 -2
- package/docs/api/water.md +7 -3
- package/docs/api/weather.md +27 -12
- package/docs/api/weatherDraw.md +4 -4
- package/docs/api/world.md +6 -6
- package/docs/recipes/01-new-game.md +28 -43
- package/docs/recipes/02-npc.md +21 -23
- package/docs/recipes/03-items-pickups.md +37 -53
- package/docs/recipes/04-quests.md +5 -4
- package/docs/recipes/05-props-bake.md +34 -44
- package/docs/recipes/06-clock-events.md +31 -22
- package/docs/recipes/07-flow-scenes-pause.md +30 -32
- package/docs/recipes/08-weather-sky.md +91 -37
- package/docs/recipes/09-materials-lights-models.md +25 -39
- package/docs/recipes/10-blender-level.md +22 -11
- package/docs/recipes/11-vehicles.md +44 -24
- package/docs/recipes/12-navmesh.md +60 -15
- package/docs/recipes/13-animation.md +70 -22
- package/docs/recipes/14-custom-module.md +33 -20
- package/docs/recipes/15-perf.md +51 -28
- package/docs/recipes/16-dev-bridge.md +39 -58
- package/docs/recipes/18-world.md +49 -28
- package/docs/recipes/19-shooting-picking.md +7 -4
- package/docs/recipes/20-content-actions-save.md +55 -40
- package/docs/recipes/21-camera.md +47 -25
- package/docs/recipes/22-shop-gold.md +21 -16
- package/docs/recipes/23-ops.md +28 -24
- package/docs/recipes/26-ui-parts.md +25 -14
- package/docs/recipes/27-net.md +3 -5
- package/docs/recipes/28-terrain.md +119 -23
- package/docs/recipes/29-grid.md +3 -3
- package/docs/recipes/30-templates.md +63 -30
- package/docs/recipes/31-audio.md +7 -7
- package/docs/recipes/32-action-game.md +21 -11
- package/docs/recipes/33-stream-sources.md +6 -3
- package/docs/recipes/34-environment-lighting.md +72 -25
- package/docs/recipes/35-picture-from-reference.md +20 -23
- package/docs/recipes/36-ground-plants.md +106 -0
- package/docs/recipes/40-scene.md +18 -21
- package/docs/recipes/43-shader-patches-surfaces.md +27 -48
- package/docs/recipes/44-water-weather-hooks.md +56 -50
- package/docs/recipes/45-cascaded-shadows.md +41 -20
- package/docs/recipes/46-blender-art-route.md +9 -10
- package/docs/recipes/49-game-module-contract.md +7 -6
- package/docs/recipes/50-own-renderer.md +3 -2
- package/docs/recipes/51-capability-catalog.md +14 -8
- package/docs/recipes/52-around-the-picture.md +56 -100
- package/docs/recipes/53-ground-up-close.md +61 -24
- package/docs/recipes/55-mods-time-wrap.md +17 -20
- package/docs/recipes/56-webgpu-tsl.md +28 -15
- package/docs/recipes/57-control.md +39 -12
- package/docs/recipes/58-input.md +15 -2
- package/docs/recipes/59-depth-post-effects.md +1 -1
- package/docs/recipes/60-judge-the-picture.md +30 -25
- package/docs/recipes/62-picture-code.md +129 -39
- package/docs/recipes/63-third-person-start.md +19 -5
- package/docs/recipes/64-particles.md +54 -5
- package/docs/recipes/65-swarm.md +140 -0
- package/docs/recipes/66-common-tasks.md +313 -0
- package/examples/action/.threedog/content-index.json +1 -1
- package/examples/action/GAMEMAP.md +5 -5
- package/examples/perf-island/.threedog/content-index.json +1 -0
- package/examples/{sheepisland → perf-island}/GAMEMAP.md +15 -14
- package/examples/{sheepisland → perf-island}/assets.js +1 -1
- package/examples/{sheepisland → perf-island}/main.js +8 -8
- package/examples/{sheepisland → perf-island}/models.js +1 -1
- package/examples/{sheepisland → perf-island}/params.js +1 -1
- package/examples/{sheepisland → perf-island}/picture/index.js +1 -1
- package/examples/{sheepisland → perf-island}/picture/palette.js +2 -2
- package/examples/{sheepisland → perf-island}/views.js +1 -1
- package/examples/plain-picture/GAMEMAP.md +4 -1
- package/examples/rc2d/GAMEMAP.md +4 -3
- package/examples/rc2d/main.js +1 -3
- package/examples/rc2d/rc2d.js +1 -1
- package/examples/styletest/.threedog/content-index.json +1 -1
- package/examples/styletest/GAMEMAP.md +6 -5
- package/examples/techniques/contact-shadows/contactShadows.js +1 -1
- package/examples/techniques/contact-shadows/main.js +1 -1
- package/examples/techniques/interior-light/main.js +1 -1
- package/examples/techniques/modular-building/README.md +7 -6
- package/examples/techniques/outlines-and-rim/picture/post.js +1 -1
- package/examples/techniques/procedural-animation/README.md +1 -1
- package/examples/webgpu-tsl/GAMEMAP.md +2 -1
- package/examples/world/.threedog/content-index.json +1 -1
- package/examples/world/GAMEMAP.md +9 -7
- package/examples/world/main.js +3 -3
- package/examples/world/picture/sky.js +1 -1
- package/index.d.ts +16 -12
- package/index.js +53 -32
- package/llms.txt +11 -14
- package/modules/ambience/Ambience.js +16 -11
- package/modules/calendar/Calendar.js +19 -19
- package/modules/calendar/index.js +18 -16
- package/modules/calendar/schedule.js +11 -6
- package/modules/calendar/seasons.js +7 -7
- package/modules/camera/FirstPersonCamera.js +5 -5
- package/modules/camera/FixedCamera.js +43 -30
- package/modules/camera/FollowCamera.js +24 -15
- package/modules/camera/RtsCamera.js +12 -11
- package/modules/camera/common.js +72 -37
- package/modules/camera/contract.js +1 -0
- package/modules/camera/pixelSnap.js +62 -0
- package/modules/characters/Character.js +166 -70
- package/modules/characters/NPC.js +84 -44
- package/modules/characters/assetModel.js +16 -12
- package/modules/characters/astar.js +48 -27
- package/modules/characters/behaviors.js +4 -5
- package/modules/characters/character.contract.js +21 -0
- package/modules/characters/contract.js +17 -3
- package/modules/characters/index.js +240 -226
- package/modules/characters/moveHelpers.js +88 -12
- package/modules/characters/mover.contract.js +14 -0
- package/modules/characters/movers/common.js +22 -18
- package/modules/characters/movers/manual.js +1 -1
- package/modules/characters/movers/rapier.js +18 -10
- package/modules/characters/movers/simple.js +26 -13
- package/modules/characters/movers/support.js +24 -13
- package/modules/characters/npcAvoid.js +19 -16
- package/modules/characters/npcSim.js +88 -32
- package/modules/characters/npcView.js +19 -11
- package/modules/characters/pathAsync.js +81 -29
- package/modules/characters/pathJob.js +38 -21
- package/modules/characters/pathWorker.js +1 -1
- package/modules/characters/player.js +120 -0
- package/modules/characters/playerStrings.js +2 -2
- package/modules/characters/proceduralRig.js +2 -2
- package/modules/characters/seat.js +56 -0
- package/modules/characters/useModel.js +3 -3
- package/modules/characters/vehicle.contract.js +8 -5
- package/modules/characters/walkTo.js +40 -33
- package/modules/collision/Collision.js +69 -45
- package/modules/collision/contract.js +15 -0
- package/modules/collision/grid.js +6 -1
- package/modules/content/explain.js +2 -3
- package/modules/content/fields.js +24 -3
- package/modules/content/ids.js +5 -3
- package/modules/content/index.js +132 -114
- package/modules/content/loader.js +117 -140
- package/modules/content/markers.js +25 -0
- package/modules/content/models.js +54 -17
- package/modules/content/packs.js +5 -4
- package/modules/content/parts.js +2 -2
- package/modules/content/places.js +36 -0
- package/modules/content/props.js +22 -17
- package/modules/content/rules.js +47 -61
- package/modules/content/stages.js +7 -7
- package/modules/content/templates.js +80 -49
- package/modules/content/words.js +47 -0
- package/modules/debug/DebugPanel.js +14 -45
- package/modules/flow/contract.js +2 -1
- package/modules/flow/index.js +30 -16
- package/modules/gameplay/Container.js +17 -13
- package/modules/gameplay/Containers.js +23 -6
- package/modules/gameplay/Dialogue.js +93 -34
- package/modules/gameplay/Interactions.js +93 -51
- package/modules/gameplay/Inventory.js +64 -22
- package/modules/gameplay/Quests.js +146 -30
- package/modules/gameplay/boxOps.js +8 -1
- package/modules/gameplay/dialogueBubbles.js +16 -12
- package/modules/gameplay/inventoryOps.js +11 -8
- package/modules/gameplay/pickups.js +63 -37
- package/modules/gameplay/questLog.js +4 -2
- package/modules/gameplay/questSave.js +9 -4
- package/modules/gameplay/quests.contract.js +1 -1
- package/modules/grid/Grid.js +2 -2
- package/modules/grid/Layer.js +12 -8
- package/modules/grid/index.js +28 -23
- package/modules/grid/ops.js +43 -46
- package/modules/grid/preview.js +7 -7
- package/modules/grid/tiles.js +6 -6
- package/modules/hlod/index.js +42 -57
- package/modules/hud/index.js +22 -14
- package/modules/hud/parts.js +8 -8
- package/modules/level/contract.js +16 -0
- package/modules/level/heightfield.js +29 -31
- package/modules/level/index.js +113 -161
- package/modules/level/load.js +196 -0
- package/modules/level/meshes.js +65 -0
- package/modules/level/nodes.js +40 -23
- package/modules/lights/index.js +33 -183
- package/modules/lights/slots.js +93 -0
- package/modules/lights/sources.js +90 -0
- package/modules/music/Music.js +34 -28
- package/modules/music/rules.js +1 -1
- package/modules/nav/contract.js +16 -0
- package/modules/nav/index.js +180 -49
- package/modules/nav/navPath.js +45 -10
- package/modules/net/Client.js +7 -7
- package/modules/net/Host.js +7 -7
- package/modules/net/Net.js +1 -1
- package/modules/net/index.js +6 -5
- package/modules/net/sync.js +2 -2
- package/modules/net/transports.js +2 -2
- package/modules/particles/Particles.js +95 -29
- package/modules/particles/effect.js +86 -32
- package/modules/particles/shaders.js +19 -1
- package/modules/photo/Photo.js +23 -23
- package/modules/rigid/RigidBodies.js +255 -89
- package/modules/rigid/Vehicles.js +17 -8
- package/modules/rigid/collider3d.contract.js +26 -0
- package/modules/rigid/ragdoll.js +298 -0
- package/modules/rigid/ragdollBones.js +209 -0
- package/modules/rigid/refresh.js +10 -0
- package/modules/rigid/sync.js +51 -20
- package/modules/settings/Settings.js +177 -61
- package/modules/settings/apply.js +20 -13
- package/modules/settings/sections.js +19 -14
- package/modules/settings/strings.js +2 -2
- package/modules/settings/view.js +3 -3
- package/modules/sky/Sky.js +29 -22
- package/modules/sky/clouds.js +7 -7
- package/modules/sky/dome.js +33 -20
- package/modules/sky/domeLayers.js +9 -9
- package/modules/sky/environment.js +6 -6
- package/modules/sky/frame.js +19 -10
- package/modules/sky/season.js +7 -1
- package/modules/sky/shader.js +24 -25
- package/modules/sky/skyModule.js +17 -28
- package/modules/sky/tint.js +1 -1
- package/modules/swarm/Swarm.js +356 -0
- package/modules/swarm/draw.js +68 -0
- package/modules/swarm/grid.js +63 -0
- package/modules/terrain/ChunkManager.js +71 -59
- package/modules/terrain/chunkQueries.js +7 -24
- package/modules/terrain/chunkWorker.js +1 -1
- package/modules/terrain/draw.js +14 -11
- package/modules/terrain/index.js +42 -42
- package/modules/terrain/terrainColorMap.js +6 -3
- package/modules/terrain/terrainDefaults.js +2 -1
- package/modules/terrain/terrainEdit.js +45 -29
- package/modules/terrain/terrainGen.js +19 -12
- package/modules/terrain/terrainIsland.js +2 -2
- package/modules/terrain/terrainMesh.js +7 -6
- package/modules/terrain/terrainShape.js +8 -10
- package/modules/terrain/terrainShapeMain.js +3 -3
- package/modules/timeline/Timeline.js +83 -43
- package/modules/timeline/Tween.js +25 -19
- package/modules/timeline/shots.js +24 -17
- package/modules/triggers/index.js +95 -28
- package/modules/vegetation/Vegetation.js +34 -26
- package/modules/vegetation/densityMap.js +4 -7
- package/modules/vegetation/draw.js +39 -18
- package/modules/vegetation/groundChunks.js +21 -38
- package/modules/vegetation/index.js +37 -12
- package/modules/vegetation/modelGeometry.js +3 -6
- package/modules/vegetation/nearFade.js +1 -1
- package/modules/water/Water.js +20 -16
- package/modules/water/surface.js +3 -3
- package/modules/weather/Weather.js +52 -40
- package/modules/weather/particles.js +8 -8
- package/modules/weather/weatherDraw.js +28 -23
- package/modules/world/World.js +28 -15
- package/modules/world/explain.js +1 -1
- package/modules/world/index.js +30 -17
- package/modules/world/persist.js +90 -27
- package/modules/world/pos.js +5 -5
- package/modules/world/records.js +37 -11
- package/modules/world/sim.js +78 -27
- package/modules/world/simFar.js +2 -2
- package/modules/world/state.js +43 -11
- package/modules/world/thingSource.js +20 -5
- package/modules/world/views.js +27 -14
- package/package.json +48 -7
- package/presets.js +1 -3
- package/render/PostFX.js +83 -53
- package/render/backend.js +31 -33
- package/render/cascades.js +17 -12
- package/render/cascades.tsl.js +5 -8
- package/render/daylight.js +20 -3
- package/render/detail.js +8 -7
- package/render/effects.js +28 -25
- package/render/fuse.js +3 -3
- package/render/fx/cloudShadow.tsl.js +3 -3
- package/render/fx/detail.tsl.js +1 -1
- package/render/fx/index.js +5 -10
- package/render/fx/library.tsl.js +11 -0
- package/render/fx/lighting.tsl.js +2 -1
- package/render/fx/nodeErrors.tsl.js +2 -2
- package/render/fx/objectOrigin.tsl.js +1 -2
- package/render/fx/particles.tsl.js +8 -6
- package/render/fx/patchNodes.tsl.js +5 -15
- package/render/fx/postWebGPU.tsl.js +30 -26
- package/render/fx/sky.tsl.js +15 -17
- package/render/fx/uniforms.tsl.js +4 -4
- package/render/fx/wind.tsl.js +1 -1
- package/render/fxNumbers.js +3 -0
- package/render/layers.js +2 -2
- package/render/lighting.js +5 -3
- package/render/lightmap.js +41 -21
- package/render/lights.js +6 -6
- package/render/lit.js +24 -0
- package/render/materials.js +8 -7
- package/render/mergeCommon.js +22 -0
- package/render/modeling.js +2 -2
- package/render/occlusion.js +62 -15
- package/render/ownFrame.js +4 -4
- package/render/patches.js +15 -15
- package/render/postWebGL.js +15 -12
- package/render/probes.js +41 -19
- package/render/recordSweep.js +117 -0
- package/render/shaderErrors.js +10 -9
- package/render/shadowCache.tsl.js +107 -0
- package/render/shadowTypes.js +9 -0
- package/{core → render}/shadows.js +59 -13
- package/render/slots.js +7 -7
- package/render/terms.js +22 -24
- package/render/uniformDecl.js +1 -1
- package/types/core.d.ts +336 -202
- package/types/gameplay.d.ts +254 -130
- package/types/generated/core/{Audio.d.ts → audio/Audio.d.ts} +22 -7
- package/types/generated/core/{audioVoice.d.ts → audio/audioVoice.d.ts} +2 -2
- package/types/generated/core/{Events.d.ts → base/Events.d.ts} +4 -4
- package/types/generated/core/{I18n.d.ts → base/I18n.d.ts} +8 -16
- package/types/generated/core/{Random.d.ts → base/Random.d.ts} +4 -3
- package/types/generated/core/{page.d.ts → engine/page.d.ts} +8 -9
- package/types/generated/core/{Input.d.ts → input/Input.d.ts} +28 -10
- package/types/generated/core/input/inputSeat.d.ts +26 -0
- package/types/generated/core/{Budget.d.ts → inspect/Budget.d.ts} +36 -26
- package/types/generated/core/{DebugOverrides.d.ts → inspect/DebugOverrides.d.ts} +17 -3
- package/types/generated/core/{Ops.d.ts → ops/Ops.d.ts} +6 -4
- package/types/generated/core/{control.d.ts → ops/control.d.ts} +14 -10
- package/types/generated/core/{Saves.d.ts → saves/Saves.d.ts} +62 -18
- package/types/generated/core/{session.d.ts → saves/session.d.ts} +3 -2
- package/types/generated/core/{Rays.d.ts → scene/Rays.d.ts} +8 -27
- package/types/generated/core/{Views.d.ts → scene/Views.d.ts} +2 -2
- package/types/generated/core/{Batching.d.ts → stream/Batching.d.ts} +7 -7
- package/types/generated/core/{Stream.d.ts → stream/Stream.d.ts} +22 -18
- package/types/generated/core/{Commits.d.ts → threads/Commits.d.ts} +1 -1
- package/types/generated/core/{Jobs.d.ts → threads/Jobs.d.ts} +6 -6
- package/types/generated/core/{Threads.d.ts → threads/Threads.d.ts} +4 -4
- package/types/generated/modules/calendar/Calendar.d.ts +10 -11
- package/types/generated/modules/debug/DebugPanel.d.ts +1 -9
- package/types/generated/modules/grid/Grid.d.ts +1 -0
- package/types/generated/modules/grid/Layer.d.ts +1 -1
- package/types/generated/modules/grid/index.d.ts +3 -3
- package/types/generated/modules/music/Music.d.ts +7 -5
- package/types/generated/modules/particles/Particles.d.ts +5 -4
- package/types/generated/modules/sky/Sky.d.ts +21 -10
- package/types/generated/modules/swarm/Swarm.d.ts +80 -0
- package/types/generated/modules/timeline/Timeline.d.ts +7 -5
- package/types/generated/modules/water/Water.d.ts +1 -0
- package/types/generated/modules/weather/Weather.d.ts +14 -16
- package/types/generated/modules/weather/weatherDraw.d.ts +3 -3
- package/types/generated/modules/world/World.d.ts +11 -7
- package/types/generated/render/PostFX.d.ts +21 -23
- package/types/generated/render/materials.d.ts +1 -0
- package/types/generated/render/occlusion.d.ts +9 -0
- package/types/generated/render/patches.d.ts +1 -0
- package/types/generated/ui/Focus.d.ts +1 -0
- package/types/generated/ui/UI.d.ts +1 -0
- package/types/nav.d.ts +47 -15
- package/types/physics.d.ts +150 -73
- package/types/pixel.d.ts +75 -0
- package/types/tsl.d.ts +37 -4
- package/types/world.d.ts +48 -75
- package/ui/Focus.js +10 -9
- package/ui/Parts.js +13 -5
- package/ui/UI.js +7 -7
- package/ui/defaults.js +3 -2
- package/ui/theme.js +7 -5
- package/core/assetEntry.js +0 -109
- package/core/engineCamera.js +0 -32
- package/core/ground.js +0 -104
- package/core/holds.js +0 -134
- package/core/math.js +0 -48
- package/core/moduleSlots.js +0 -100
- package/core/modules.js +0 -314
- package/core/saveApply.js +0 -210
- package/core/saveValues.js +0 -46
- package/core/session.js +0 -174
- package/core/shadowTypes.js +0 -16
- package/core/util.js +0 -17
- package/core/view.js +0 -43
- package/docs/MIGRATING-0.3.md +0 -248
- package/docs/MIGRATING-0.4.md +0 -320
- package/docs/MIGRATING-0.5.md +0 -68
- package/docs/MIGRATING-0.6.md +0 -126
- package/docs/PERF.md +0 -245
- package/docs/recipes/36-sky-ground-plants.md +0 -158
- package/docs/recipes/37-terrain-hooks.md +0 -115
- package/docs/recipes/38-environment-hooks.md +0 -67
- package/docs/recipes/42-terrain-shape.md +0 -64
- package/docs/recipes/47-island-snow-backdrop.md +0 -43
- package/docs/recipes/54-three-idioms.md +0 -88
- package/examples/plain-picture/FINDINGS.md +0 -53
- package/examples/sheepisland/.threedog/content-index.json +0 -1
- package/modules/camera/projection.js +0 -21
- /package/core/{mulberry32.js → base/mulberry32.js} +0 -0
- /package/core/{inputDefaults.js → input/inputDefaults.js} +0 -0
- /package/core/{textureBytes.js → inspect/textureBytes.js} +0 -0
- /package/core/{actor.js → ops/actor.js} +0 -0
- /package/core/{opsHistory.js → ops/opsHistory.js} +0 -0
- /package/core/{saveIds.js → saves/saveIds.js} +0 -0
- /package/core/{screenToGround.js → scene/screenToGround.js} +0 -0
- /package/core/{cells.js → stream/cells.js} +0 -0
- /package/core/{streamCells.js → stream/streamCells.js} +0 -0
- /package/core/{pureWorker.js → threads/pureWorker.js} +0 -0
- /package/examples/{sheepisland → perf-island}/content/index.js +0 -0
- /package/examples/{sheepisland → perf-island}/content/props.js +0 -0
- /package/examples/{sheepisland → perf-island}/content/templates.js +0 -0
- /package/examples/{sheepisland → perf-island}/content/vegetation.js +0 -0
- /package/examples/{sheepisland → perf-island}/picture/lights.js +0 -0
- /package/examples/{sheepisland → perf-island}/picture/materials.js +0 -0
- /package/examples/{sheepisland → perf-island}/picture/sky.js +0 -0
|
@@ -0,0 +1,4140 @@
|
|
|
1
|
+
// Generated by npm run map, do not edit by hand. Source: packages/tools/metadata.mjs reads the module definitions, contracts and api pages.
|
|
2
|
+
/** section name -> what it holds, as its owner wrote it */
|
|
3
|
+
export const sectionDocs = {
|
|
4
|
+
"actions": "own key actions of the game (action name -> default key, label)",
|
|
5
|
+
"audio": "sounds by asset name, ambience and music rules as data, footsteps (sounds, ambience, music: { tracks, rules }, footsteps)",
|
|
6
|
+
"containers": "chests / shelves (container id -> { capacity, items: starting goods }; starting goods are placed only the first time, then saved)",
|
|
7
|
+
"dialogues": "dialogues (id -> speaker, nodes)",
|
|
8
|
+
"grids": "placement grids (name -> { cell, origin, size, zone?, flat? }); layout rules, not saved",
|
|
9
|
+
"items": "items (id -> name, icon, description); also export startItems for starting items",
|
|
10
|
+
"level": "level markers (spawn point, NPCs, trigger zones) of a code-built level: for the tools (content checks, GAMEMAP); load() reads no markers from it. A file or asset name here switches level, as engine.level.load does",
|
|
11
|
+
"npcs": "NPCs (id -> name, schedule, interact)",
|
|
12
|
+
"pickups": "pickups on the ground (list)",
|
|
13
|
+
"places": "place names (name -> { x, z, y?, rot? }; rot turns everything placed there about Y; coordinates may be computed at runtime in main.js)",
|
|
14
|
+
"props": "props (list: model, position, facing, collision; or { template, x, z } = an instance of a template; or { id, grid, item, cell } = a grid item), streamed in on demand",
|
|
15
|
+
"quests": "quests (id -> title, steps, reward; a step can have a target position)",
|
|
16
|
+
"renames": "renamed or deleted authored ids (old id -> new id, or null = deleted on purpose): the player's saved changes follow the new id",
|
|
17
|
+
"rules": "condition words and data kinds added by the game ({ conditions, kinds }); actions are ops, not effect words",
|
|
18
|
+
"startItems": "starting items (exported from items.js)",
|
|
19
|
+
"templates": "reusable objects (name -> model, collide, interact, container, sound, animate, state defaults, physics body); shared read-only definitions",
|
|
20
|
+
"triggers": "trigger zones (tag -> position / from level, enter/exit effects)",
|
|
21
|
+
"vegetation": "vegetation (name -> model, growth rule)",
|
|
22
|
+
"views": "named fixed camera views (name -> { position: [x, y, z], target?: [x, y, z], fov? }); engine.views.show(name), ?view=name, npm run shot -- -w game --view name"
|
|
23
|
+
};
|
|
24
|
+
/** effect word of a section -> ref, desc, describe ({v} is the value), as its owner wrote them */
|
|
25
|
+
export const sectionEffects = {
|
|
26
|
+
"startQuest": {
|
|
27
|
+
"ref": "quest",
|
|
28
|
+
"desc": "start a quest",
|
|
29
|
+
"describe": "start quest {v}"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/** section name -> the module call that reads it */
|
|
33
|
+
export const sectionHomes = {
|
|
34
|
+
"actions": "content()",
|
|
35
|
+
"audio": "content()",
|
|
36
|
+
"containers": "inventory()",
|
|
37
|
+
"dialogues": "dialogue()",
|
|
38
|
+
"grids": "grids() after world()",
|
|
39
|
+
"items": "inventory()",
|
|
40
|
+
"level": "level()",
|
|
41
|
+
"npcs": "characters()",
|
|
42
|
+
"pickups": "pickups() after world()",
|
|
43
|
+
"places": "content()",
|
|
44
|
+
"props": "content()",
|
|
45
|
+
"quests": "quests()",
|
|
46
|
+
"renames": "content()",
|
|
47
|
+
"rules": "content()",
|
|
48
|
+
"startItems": "inventory()",
|
|
49
|
+
"templates": "content()",
|
|
50
|
+
"triggers": "triggers()",
|
|
51
|
+
"vegetation": "vegetation()",
|
|
52
|
+
"views": "content()"
|
|
53
|
+
};
|
|
54
|
+
/** Modules, content sections, contracts and placement fields of the engine */
|
|
55
|
+
export const metadata = {
|
|
56
|
+
"modules": {
|
|
57
|
+
"ambience": {
|
|
58
|
+
"call": "ambience",
|
|
59
|
+
"file": "packages/engine/modules/ambience/Ambience.js",
|
|
60
|
+
"label": "Ambience",
|
|
61
|
+
"needs": [],
|
|
62
|
+
"type": "picture",
|
|
63
|
+
"provides": [],
|
|
64
|
+
"requires": [],
|
|
65
|
+
"handRolled": "none: sounds by place are data, and a hand-made version has no one shape in code",
|
|
66
|
+
"stage": "late",
|
|
67
|
+
"before": [],
|
|
68
|
+
"after": [],
|
|
69
|
+
"optional": [],
|
|
70
|
+
"params": {
|
|
71
|
+
"rules": {
|
|
72
|
+
"type": "any",
|
|
73
|
+
"optional": true,
|
|
74
|
+
"docType": "import('./core').AmbienceRule[]"
|
|
75
|
+
},
|
|
76
|
+
"interval": {
|
|
77
|
+
"type": "any",
|
|
78
|
+
"optional": true,
|
|
79
|
+
"docType": "number"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"page": true,
|
|
83
|
+
"documented": true,
|
|
84
|
+
"names": [
|
|
85
|
+
"add",
|
|
86
|
+
"rules",
|
|
87
|
+
"nearWater",
|
|
88
|
+
"position"
|
|
89
|
+
],
|
|
90
|
+
"sections": [],
|
|
91
|
+
"saves": [],
|
|
92
|
+
"time": {
|
|
93
|
+
"kind": "none",
|
|
94
|
+
"hooks": [
|
|
95
|
+
"frame"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"calendar": {
|
|
100
|
+
"call": "calendar",
|
|
101
|
+
"file": "packages/engine/modules/calendar/index.js",
|
|
102
|
+
"label": "Calendar",
|
|
103
|
+
"needs": [],
|
|
104
|
+
"type": "world",
|
|
105
|
+
"provides": [
|
|
106
|
+
"calendar"
|
|
107
|
+
],
|
|
108
|
+
"requires": [],
|
|
109
|
+
"handRolled": "none: a day counter of its own is a plain number that looks like any other",
|
|
110
|
+
"stage": "environment",
|
|
111
|
+
"before": [
|
|
112
|
+
"sky"
|
|
113
|
+
],
|
|
114
|
+
"after": [],
|
|
115
|
+
"optional": [],
|
|
116
|
+
"params": {
|
|
117
|
+
"time": {
|
|
118
|
+
"type": "any",
|
|
119
|
+
"optional": true,
|
|
120
|
+
"docType": "string | number",
|
|
121
|
+
"desc": "Time of day at start: 'HH:MM' or fraction of a day 0–1 (0.5 noon), default 0.33 (afterwards read / write engine.calendar.timeOfDay)"
|
|
122
|
+
},
|
|
123
|
+
"dayLength": {
|
|
124
|
+
"type": "any",
|
|
125
|
+
"optional": true,
|
|
126
|
+
"docType": "number",
|
|
127
|
+
"desc": "Calendar seconds per day, default Infinity: the time of day never moves until the game sets a length (presets.calendar.cycle has 360) (one hour = dayLength / hoursPerDay calendar seconds; with clock.rate 1 calendar seconds are real seconds)"
|
|
128
|
+
},
|
|
129
|
+
"day": {
|
|
130
|
+
"type": "any",
|
|
131
|
+
"optional": true,
|
|
132
|
+
"docType": "number",
|
|
133
|
+
"desc": "Which day to start from, default 1"
|
|
134
|
+
},
|
|
135
|
+
"daysPerSeason": {
|
|
136
|
+
"type": "any",
|
|
137
|
+
"optional": true,
|
|
138
|
+
"docType": "number",
|
|
139
|
+
"desc": "Days of each season given by name only, default 7"
|
|
140
|
+
},
|
|
141
|
+
"seasons": {
|
|
142
|
+
"type": "any",
|
|
143
|
+
"optional": true,
|
|
144
|
+
"docType": "(string | { name: string, days: number })[]",
|
|
145
|
+
"desc": "Seasons, default none ([]): names (each daysPerSeason days) or { name, days } for seasons of their own length, e.g. ['spring', 'summer', 'autumn', 'winter'], [{ name: 'wet', days: 10 }, { name: 'dry', days: 20 }], or ['q1', 'q2', 'q3', 'q4'] for a business year"
|
|
146
|
+
},
|
|
147
|
+
"hoursPerDay": {
|
|
148
|
+
"type": "any",
|
|
149
|
+
"optional": true,
|
|
150
|
+
"docType": "number",
|
|
151
|
+
"desc": "Hours per day of the displayed clock and of clock notation ('18:30'), default 24"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"page": true,
|
|
155
|
+
"documented": true,
|
|
156
|
+
"names": [
|
|
157
|
+
"at",
|
|
158
|
+
"between",
|
|
159
|
+
"daily",
|
|
160
|
+
"onSeason",
|
|
161
|
+
"untilMark",
|
|
162
|
+
"hoursPerDay",
|
|
163
|
+
"seasons",
|
|
164
|
+
"timeOfDay",
|
|
165
|
+
"day",
|
|
166
|
+
"dayLength",
|
|
167
|
+
"clock",
|
|
168
|
+
"daylight",
|
|
169
|
+
"isDay",
|
|
170
|
+
"seasonIndex",
|
|
171
|
+
"season",
|
|
172
|
+
"dayOfSeason",
|
|
173
|
+
"seasonProgress",
|
|
174
|
+
"totalDays"
|
|
175
|
+
],
|
|
176
|
+
"sections": [],
|
|
177
|
+
"saves": [
|
|
178
|
+
"calendar"
|
|
179
|
+
],
|
|
180
|
+
"time": {
|
|
181
|
+
"kind": "exact",
|
|
182
|
+
"hooks": [
|
|
183
|
+
"skip"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"cameraRig": {
|
|
188
|
+
"call": "rigModule",
|
|
189
|
+
"file": "packages/engine/modules/camera/common.js",
|
|
190
|
+
"aliases": [
|
|
191
|
+
{
|
|
192
|
+
"call": "firstPersonCamera",
|
|
193
|
+
"file": "packages/engine/modules/camera/FirstPersonCamera.js"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"call": "fixedCamera",
|
|
197
|
+
"file": "packages/engine/modules/camera/FixedCamera.js"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"call": "followCamera",
|
|
201
|
+
"file": "packages/engine/modules/camera/FollowCamera.js"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"call": "rtsCamera",
|
|
205
|
+
"file": "packages/engine/modules/camera/RtsCamera.js"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"label": "Camera",
|
|
209
|
+
"needs": [],
|
|
210
|
+
"type": "picture",
|
|
211
|
+
"provides": [
|
|
212
|
+
"cameraRig"
|
|
213
|
+
],
|
|
214
|
+
"requires": [],
|
|
215
|
+
"handRolled": [
|
|
216
|
+
"follow"
|
|
217
|
+
],
|
|
218
|
+
"stage": "control",
|
|
219
|
+
"before": [],
|
|
220
|
+
"after": [],
|
|
221
|
+
"optional": [
|
|
222
|
+
"collision",
|
|
223
|
+
"characters"
|
|
224
|
+
],
|
|
225
|
+
"params": null,
|
|
226
|
+
"page": true,
|
|
227
|
+
"documented": false,
|
|
228
|
+
"names": [
|
|
229
|
+
"follow",
|
|
230
|
+
"forward",
|
|
231
|
+
"right",
|
|
232
|
+
"focusPoint",
|
|
233
|
+
"screenToGround",
|
|
234
|
+
"update",
|
|
235
|
+
"onOverride",
|
|
236
|
+
"onEnter",
|
|
237
|
+
"onExit",
|
|
238
|
+
"kind",
|
|
239
|
+
"target",
|
|
240
|
+
"pixelSnap",
|
|
241
|
+
"frame",
|
|
242
|
+
"setView",
|
|
243
|
+
"getView",
|
|
244
|
+
"focus",
|
|
245
|
+
"lockPitch",
|
|
246
|
+
"avoidOcclusion",
|
|
247
|
+
"framing",
|
|
248
|
+
"arm",
|
|
249
|
+
"lookAt",
|
|
250
|
+
"eye",
|
|
251
|
+
"add",
|
|
252
|
+
"cut",
|
|
253
|
+
"blend",
|
|
254
|
+
"nearest",
|
|
255
|
+
"shots",
|
|
256
|
+
"current",
|
|
257
|
+
"auto",
|
|
258
|
+
"autoInterval",
|
|
259
|
+
"hysteresis",
|
|
260
|
+
"triggerBlend",
|
|
261
|
+
"trackHeight",
|
|
262
|
+
"trackSmoothing",
|
|
263
|
+
"holdDirection",
|
|
264
|
+
"ease",
|
|
265
|
+
"moveTo",
|
|
266
|
+
"following",
|
|
267
|
+
"rotate"
|
|
268
|
+
],
|
|
269
|
+
"sections": [],
|
|
270
|
+
"saves": [
|
|
271
|
+
"cameraRig"
|
|
272
|
+
],
|
|
273
|
+
"time": {
|
|
274
|
+
"kind": "none",
|
|
275
|
+
"hooks": [
|
|
276
|
+
"frame"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
"characters": {
|
|
281
|
+
"call": "characters",
|
|
282
|
+
"file": "packages/engine/modules/characters/index.js",
|
|
283
|
+
"label": "Characters",
|
|
284
|
+
"needs": [],
|
|
285
|
+
"type": "actor",
|
|
286
|
+
"provides": [
|
|
287
|
+
"characters"
|
|
288
|
+
],
|
|
289
|
+
"requires": [],
|
|
290
|
+
"handRolled": "none: walking code is game movement, and any code shape would match ordinary maths",
|
|
291
|
+
"stage": "late",
|
|
292
|
+
"before": [
|
|
293
|
+
"rigid"
|
|
294
|
+
],
|
|
295
|
+
"after": [],
|
|
296
|
+
"optional": [
|
|
297
|
+
"cameraRig",
|
|
298
|
+
"calendar",
|
|
299
|
+
"interactions",
|
|
300
|
+
"dialogue",
|
|
301
|
+
"nav",
|
|
302
|
+
"collision",
|
|
303
|
+
"rigid",
|
|
304
|
+
"world"
|
|
305
|
+
],
|
|
306
|
+
"params": {
|
|
307
|
+
"npcs": {
|
|
308
|
+
"type": "any",
|
|
309
|
+
"optional": true,
|
|
310
|
+
"docType": "boolean",
|
|
311
|
+
"desc": "Whether to enable NPCs (engine.npcs), default true"
|
|
312
|
+
},
|
|
313
|
+
"npcTiers": {
|
|
314
|
+
"type": "any",
|
|
315
|
+
"optional": true,
|
|
316
|
+
"docType": "{ fullRadius: number; nearEvery: number }",
|
|
317
|
+
"desc": "(experimental) Near tiers for large NPC crowds, off by default (every near NPC walks every fixed step); same as engine.npcs.tiers(opts)"
|
|
318
|
+
},
|
|
319
|
+
"animation": {
|
|
320
|
+
"type": "any",
|
|
321
|
+
"optional": true,
|
|
322
|
+
"docType": "AnimatorOptions",
|
|
323
|
+
"desc": "What every character's Animator starts from, e.g. { fade: 0.15 }; a model's manifest mapping and the character's own animation win over it"
|
|
324
|
+
},
|
|
325
|
+
"fall": {
|
|
326
|
+
"type": "any",
|
|
327
|
+
"optional": true,
|
|
328
|
+
"docType": "'rescue' | false | ((facts, engine) => 'rescue' | false)",
|
|
329
|
+
"desc": "The rule 'fall' for everyone: 'rescue' brings what falls out of the world back; left out, the engine rescues nothing. engine.mod('fall', ...) from the game sits above it"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"page": true,
|
|
333
|
+
"documented": true,
|
|
334
|
+
"names": [
|
|
335
|
+
"findSpawn",
|
|
336
|
+
"createPlayer",
|
|
337
|
+
"moveInput",
|
|
338
|
+
"addVehicle",
|
|
339
|
+
"support",
|
|
340
|
+
"removePlayer",
|
|
341
|
+
"findPath",
|
|
342
|
+
"findPathAsync",
|
|
343
|
+
"material",
|
|
344
|
+
"kit",
|
|
345
|
+
"pathsPerStep",
|
|
346
|
+
"linkPose"
|
|
347
|
+
],
|
|
348
|
+
"sections": [
|
|
349
|
+
"npcs"
|
|
350
|
+
],
|
|
351
|
+
"saves": [],
|
|
352
|
+
"time": {
|
|
353
|
+
"kind": "none",
|
|
354
|
+
"hooks": [
|
|
355
|
+
"fixed",
|
|
356
|
+
"frame"
|
|
357
|
+
],
|
|
358
|
+
"noSkip": "fixed steps paths, control holders and riders, none of which a time jump moves; schedules read the calendar clock"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"collision": {
|
|
362
|
+
"call": "collision",
|
|
363
|
+
"file": "packages/engine/modules/collision/Collision.js",
|
|
364
|
+
"label": "Collision",
|
|
365
|
+
"needs": [],
|
|
366
|
+
"type": "world",
|
|
367
|
+
"provides": [
|
|
368
|
+
"collision"
|
|
369
|
+
],
|
|
370
|
+
"requires": [],
|
|
371
|
+
"handRolled": [
|
|
372
|
+
"collision"
|
|
373
|
+
],
|
|
374
|
+
"stage": "late",
|
|
375
|
+
"before": [],
|
|
376
|
+
"after": [],
|
|
377
|
+
"optional": [],
|
|
378
|
+
"params": {
|
|
379
|
+
"maxClimb": {
|
|
380
|
+
"type": "any",
|
|
381
|
+
"optional": true,
|
|
382
|
+
"docType": "number",
|
|
383
|
+
"desc": "Max walkable slope (height difference / horizontal distance), default 1.1"
|
|
384
|
+
},
|
|
385
|
+
"canopyHeight": {
|
|
386
|
+
"type": "any",
|
|
387
|
+
"optional": true,
|
|
388
|
+
"docType": "number",
|
|
389
|
+
"desc": "A camera above this height (meters) is not considered blocked by trees, default 5"
|
|
390
|
+
},
|
|
391
|
+
"cameraPad": {
|
|
392
|
+
"type": "any",
|
|
393
|
+
"optional": true,
|
|
394
|
+
"docType": "number",
|
|
395
|
+
"desc": "(experimental) Margin between the camera and obstacles (meters), default 0.5"
|
|
396
|
+
},
|
|
397
|
+
"cameraMin": {
|
|
398
|
+
"type": "any",
|
|
399
|
+
"optional": true,
|
|
400
|
+
"docType": "number",
|
|
401
|
+
"desc": "Nearest camera distance (meters), default 1.5"
|
|
402
|
+
},
|
|
403
|
+
"walkableWaterMargin": {
|
|
404
|
+
"type": "any",
|
|
405
|
+
"optional": true,
|
|
406
|
+
"docType": "number",
|
|
407
|
+
"desc": "(experimental) Height above the water surface (meters) at which it counts as walkable, default 0.2"
|
|
408
|
+
},
|
|
409
|
+
"cameraOcclusion": {
|
|
410
|
+
"type": "any",
|
|
411
|
+
"optional": true,
|
|
412
|
+
"docType": "'colliders' | 'meshes' | 'both'",
|
|
413
|
+
"desc": "What camera occlusion checks: 'both' (default) / 'colliders' / 'meshes' = static meshes registered with engine.rays.addStatic(mesh, { occluder: true })"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"page": true,
|
|
417
|
+
"documented": true,
|
|
418
|
+
"names": [
|
|
419
|
+
"addCircle",
|
|
420
|
+
"addBox",
|
|
421
|
+
"addSegment",
|
|
422
|
+
"addBlocked",
|
|
423
|
+
"blockedAt",
|
|
424
|
+
"addObject",
|
|
425
|
+
"forEachStatic",
|
|
426
|
+
"mirror",
|
|
427
|
+
"walkable",
|
|
428
|
+
"walkableAt",
|
|
429
|
+
"lineClear",
|
|
430
|
+
"maxClimb",
|
|
431
|
+
"canopyHeight",
|
|
432
|
+
"cameraPad",
|
|
433
|
+
"cameraMin",
|
|
434
|
+
"walkableWaterMargin",
|
|
435
|
+
"cameraOcclusion",
|
|
436
|
+
"version"
|
|
437
|
+
],
|
|
438
|
+
"sections": [],
|
|
439
|
+
"saves": [],
|
|
440
|
+
"time": {
|
|
441
|
+
"kind": "none",
|
|
442
|
+
"hooks": []
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"content": {
|
|
446
|
+
"call": "content",
|
|
447
|
+
"file": "packages/engine/modules/content/index.js",
|
|
448
|
+
"label": "Content",
|
|
449
|
+
"needs": [],
|
|
450
|
+
"type": "rules",
|
|
451
|
+
"provides": [],
|
|
452
|
+
"requires": [],
|
|
453
|
+
"handRolled": "none: game data in plain objects is the normal way to start, not a bypass",
|
|
454
|
+
"stage": "late",
|
|
455
|
+
"before": [],
|
|
456
|
+
"after": [],
|
|
457
|
+
"optional": [
|
|
458
|
+
"level",
|
|
459
|
+
"calendar",
|
|
460
|
+
"inventory",
|
|
461
|
+
"pickups",
|
|
462
|
+
"quests",
|
|
463
|
+
"particles",
|
|
464
|
+
"hud",
|
|
465
|
+
"vegetation",
|
|
466
|
+
"dialogue",
|
|
467
|
+
"triggers",
|
|
468
|
+
"collision",
|
|
469
|
+
"world",
|
|
470
|
+
"interactions",
|
|
471
|
+
"grids",
|
|
472
|
+
"rigid"
|
|
473
|
+
],
|
|
474
|
+
"params": null,
|
|
475
|
+
"page": true,
|
|
476
|
+
"documented": false,
|
|
477
|
+
"names": [
|
|
478
|
+
"load",
|
|
479
|
+
"condition",
|
|
480
|
+
"test",
|
|
481
|
+
"run",
|
|
482
|
+
"place",
|
|
483
|
+
"where",
|
|
484
|
+
"template",
|
|
485
|
+
"fields",
|
|
486
|
+
"spawn",
|
|
487
|
+
"ready",
|
|
488
|
+
"markers"
|
|
489
|
+
],
|
|
490
|
+
"sections": [
|
|
491
|
+
"templates",
|
|
492
|
+
"props",
|
|
493
|
+
"actions",
|
|
494
|
+
"places",
|
|
495
|
+
"audio",
|
|
496
|
+
"views",
|
|
497
|
+
"renames",
|
|
498
|
+
"rules"
|
|
499
|
+
],
|
|
500
|
+
"saves": [
|
|
501
|
+
"content"
|
|
502
|
+
],
|
|
503
|
+
"time": {
|
|
504
|
+
"kind": "none",
|
|
505
|
+
"hooks": []
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"debugPanel": {
|
|
509
|
+
"call": "debug",
|
|
510
|
+
"file": "packages/engine/modules/debug/DebugPanel.js",
|
|
511
|
+
"label": "Debug panel",
|
|
512
|
+
"needs": [],
|
|
513
|
+
"type": "ui",
|
|
514
|
+
"provides": [],
|
|
515
|
+
"requires": [],
|
|
516
|
+
"handRolled": "none: a dev overlay is ordinary DOM with no shape of its own",
|
|
517
|
+
"stage": "late",
|
|
518
|
+
"before": [],
|
|
519
|
+
"after": [],
|
|
520
|
+
"optional": [
|
|
521
|
+
"calendar",
|
|
522
|
+
"weather",
|
|
523
|
+
"terrain"
|
|
524
|
+
],
|
|
525
|
+
"params": {
|
|
526
|
+
"open": {
|
|
527
|
+
"type": "any",
|
|
528
|
+
"optional": true
|
|
529
|
+
}
|
|
530
|
+
},
|
|
531
|
+
"page": false,
|
|
532
|
+
"documented": false,
|
|
533
|
+
"names": [],
|
|
534
|
+
"sections": [],
|
|
535
|
+
"saves": [],
|
|
536
|
+
"time": {
|
|
537
|
+
"kind": "none",
|
|
538
|
+
"hooks": [
|
|
539
|
+
"frame",
|
|
540
|
+
"afterRender"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"dialogue": {
|
|
545
|
+
"call": "dialogue",
|
|
546
|
+
"file": "packages/engine/modules/gameplay/Dialogue.js",
|
|
547
|
+
"label": "Dialogue",
|
|
548
|
+
"needs": [],
|
|
549
|
+
"type": "rules",
|
|
550
|
+
"provides": [
|
|
551
|
+
"dialogue"
|
|
552
|
+
],
|
|
553
|
+
"requires": [],
|
|
554
|
+
"handRolled": [
|
|
555
|
+
"dialogue"
|
|
556
|
+
],
|
|
557
|
+
"stage": "gameplay",
|
|
558
|
+
"before": [],
|
|
559
|
+
"after": [
|
|
560
|
+
"interactions"
|
|
561
|
+
],
|
|
562
|
+
"optional": [],
|
|
563
|
+
"params": {
|
|
564
|
+
"charsPerSecond": {
|
|
565
|
+
"type": "any",
|
|
566
|
+
"optional": true,
|
|
567
|
+
"docType": "number",
|
|
568
|
+
"desc": "Typing speed (characters/second, game time: advanced by engine.step), default 40"
|
|
569
|
+
},
|
|
570
|
+
"advanceActions": {
|
|
571
|
+
"type": "any",
|
|
572
|
+
"optional": true,
|
|
573
|
+
"docType": "string[]",
|
|
574
|
+
"desc": "Actions that advance the dialogue, default ['confirm'] (a basic key); e.g. ['confirm', 'interact'] to also advance on the game's interact key. Choices: the cursor, clicks, and the actions choice1..choice9 (context 'dialog', no keys of their own: presets.bindings.dialogNumbers binds 1-9)"
|
|
575
|
+
},
|
|
576
|
+
"holdSeconds": {
|
|
577
|
+
"type": "any",
|
|
578
|
+
"optional": true,
|
|
579
|
+
"docType": "number",
|
|
580
|
+
"desc": "A bubble line stays this many seconds plus its reading time (about 15 characters a second) unless say() gives seconds, default 2"
|
|
581
|
+
},
|
|
582
|
+
"bubbleChoice": {
|
|
583
|
+
"type": "any",
|
|
584
|
+
"optional": true,
|
|
585
|
+
"docType": "'end' | 'ask'",
|
|
586
|
+
"desc": "A bubble script reaching a node with choices: 'end' (default: warn, the script ends there) or 'ask' (the line stays with its choices until engine.ops.run('dialogue.choose', { index, run }); run is in dialogue.bubbles())"
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"page": true,
|
|
590
|
+
"documented": true,
|
|
591
|
+
"names": [
|
|
592
|
+
"define",
|
|
593
|
+
"start",
|
|
594
|
+
"say",
|
|
595
|
+
"bubbles",
|
|
596
|
+
"end",
|
|
597
|
+
"state",
|
|
598
|
+
"scripts",
|
|
599
|
+
"active",
|
|
600
|
+
"speaking",
|
|
601
|
+
"charsPerSecond"
|
|
602
|
+
],
|
|
603
|
+
"sections": [
|
|
604
|
+
"dialogues"
|
|
605
|
+
],
|
|
606
|
+
"saves": [],
|
|
607
|
+
"time": {
|
|
608
|
+
"kind": "none",
|
|
609
|
+
"hooks": [
|
|
610
|
+
"frame",
|
|
611
|
+
"afterLoad"
|
|
612
|
+
]
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"flow": {
|
|
616
|
+
"call": "flow",
|
|
617
|
+
"file": "packages/engine/modules/flow/index.js",
|
|
618
|
+
"label": "Game flow",
|
|
619
|
+
"needs": [],
|
|
620
|
+
"type": "rules",
|
|
621
|
+
"provides": [
|
|
622
|
+
"flow"
|
|
623
|
+
],
|
|
624
|
+
"requires": [],
|
|
625
|
+
"handRolled": "none: a scene change is a few ordinary calls in any order",
|
|
626
|
+
"stage": "late",
|
|
627
|
+
"before": [],
|
|
628
|
+
"after": [],
|
|
629
|
+
"optional": [
|
|
630
|
+
"music"
|
|
631
|
+
],
|
|
632
|
+
"params": {
|
|
633
|
+
"start": {
|
|
634
|
+
"type": "any",
|
|
635
|
+
"optional": true,
|
|
636
|
+
"docType": "string",
|
|
637
|
+
"desc": "Starting state, default 'playing'; other states are entered on engine:ready (so you can define after use())"
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"page": true,
|
|
641
|
+
"documented": true,
|
|
642
|
+
"names": [
|
|
643
|
+
"define",
|
|
644
|
+
"go",
|
|
645
|
+
"transition",
|
|
646
|
+
"state",
|
|
647
|
+
"transitioning"
|
|
648
|
+
],
|
|
649
|
+
"sections": [],
|
|
650
|
+
"saves": [],
|
|
651
|
+
"time": {
|
|
652
|
+
"kind": "none",
|
|
653
|
+
"hooks": []
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"grids": {
|
|
657
|
+
"call": "grids",
|
|
658
|
+
"file": "packages/engine/modules/grid/index.js",
|
|
659
|
+
"label": "Grid placement",
|
|
660
|
+
"needs": [],
|
|
661
|
+
"type": "world",
|
|
662
|
+
"provides": [],
|
|
663
|
+
"requires": [
|
|
664
|
+
"world"
|
|
665
|
+
],
|
|
666
|
+
"handRolled": "none: cell maths is one Math.floor that any other code writes too",
|
|
667
|
+
"stage": "gameplay",
|
|
668
|
+
"before": [],
|
|
669
|
+
"after": [],
|
|
670
|
+
"optional": [],
|
|
671
|
+
"params": {
|
|
672
|
+
"ok": {
|
|
673
|
+
"type": "any",
|
|
674
|
+
"optional": true,
|
|
675
|
+
"default": 14737632,
|
|
676
|
+
"desc": "preview color where it can be placed"
|
|
677
|
+
},
|
|
678
|
+
"bad": {
|
|
679
|
+
"type": "any",
|
|
680
|
+
"optional": true,
|
|
681
|
+
"default": 3815994,
|
|
682
|
+
"desc": "preview color where it cannot be placed"
|
|
683
|
+
},
|
|
684
|
+
"previewOpacity": {
|
|
685
|
+
"type": "number",
|
|
686
|
+
"optional": true,
|
|
687
|
+
"default": 0.45,
|
|
688
|
+
"min": 0,
|
|
689
|
+
"max": 1,
|
|
690
|
+
"desc": "opacity of the preview box"
|
|
691
|
+
},
|
|
692
|
+
"previewHeight": {
|
|
693
|
+
"type": "number",
|
|
694
|
+
"optional": true,
|
|
695
|
+
"default": 0.08,
|
|
696
|
+
"min": 0,
|
|
697
|
+
"desc": "height of the preview box (meters)"
|
|
698
|
+
},
|
|
699
|
+
"tiles": {
|
|
700
|
+
"type": "any",
|
|
701
|
+
"optional": true,
|
|
702
|
+
"default": {},
|
|
703
|
+
"desc": "tile colors by layer name: { layer: { field: color } }, first truthy field of a cell wins; a layer named here draws tiles"
|
|
704
|
+
},
|
|
705
|
+
"tileLift": {
|
|
706
|
+
"type": "number",
|
|
707
|
+
"optional": true,
|
|
708
|
+
"default": 0.03,
|
|
709
|
+
"desc": "height of tiles above the ground (meters)"
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
"page": true,
|
|
713
|
+
"documented": false,
|
|
714
|
+
"names": [
|
|
715
|
+
"add",
|
|
716
|
+
"get",
|
|
717
|
+
"list",
|
|
718
|
+
"define",
|
|
719
|
+
"preview",
|
|
720
|
+
"ok",
|
|
721
|
+
"bad",
|
|
722
|
+
"previewOpacity",
|
|
723
|
+
"previewHeight",
|
|
724
|
+
"tiles",
|
|
725
|
+
"tileLift"
|
|
726
|
+
],
|
|
727
|
+
"sections": [
|
|
728
|
+
"grids"
|
|
729
|
+
],
|
|
730
|
+
"saves": [
|
|
731
|
+
"grids"
|
|
732
|
+
],
|
|
733
|
+
"time": {
|
|
734
|
+
"kind": "none",
|
|
735
|
+
"hooks": [
|
|
736
|
+
"frame"
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"hlod": {
|
|
741
|
+
"call": "hlod",
|
|
742
|
+
"file": "packages/engine/modules/hlod/index.js",
|
|
743
|
+
"label": "HLOD",
|
|
744
|
+
"needs": [],
|
|
745
|
+
"type": "picture",
|
|
746
|
+
"provides": [],
|
|
747
|
+
"requires": [],
|
|
748
|
+
"handRolled": "none: merging far meshes is plain three.js, used on purpose",
|
|
749
|
+
"stage": "late",
|
|
750
|
+
"before": [],
|
|
751
|
+
"after": [],
|
|
752
|
+
"optional": [
|
|
753
|
+
"terrain",
|
|
754
|
+
"level"
|
|
755
|
+
],
|
|
756
|
+
"params": {
|
|
757
|
+
"level": {
|
|
758
|
+
"type": "any",
|
|
759
|
+
"optional": true,
|
|
760
|
+
"docType": "boolean",
|
|
761
|
+
"desc": "Handle levels automatically (adds the level on level:loaded), default true"
|
|
762
|
+
},
|
|
763
|
+
"cell": {
|
|
764
|
+
"type": "any",
|
|
765
|
+
"optional": true,
|
|
766
|
+
"docType": "number",
|
|
767
|
+
"desc": "Merge cell edge length (meters), default 64"
|
|
768
|
+
},
|
|
769
|
+
"near": {
|
|
770
|
+
"type": "any",
|
|
771
|
+
"optional": true,
|
|
772
|
+
"docType": "number",
|
|
773
|
+
"desc": "Beyond this distance (meters) the merged proxy is shown, default 160"
|
|
774
|
+
},
|
|
775
|
+
"castShadow": {
|
|
776
|
+
"type": "any",
|
|
777
|
+
"optional": true,
|
|
778
|
+
"docType": "boolean",
|
|
779
|
+
"desc": "Proxy casts shadows, default false"
|
|
780
|
+
},
|
|
781
|
+
"include": {
|
|
782
|
+
"type": "any",
|
|
783
|
+
"optional": true,
|
|
784
|
+
"docType": "(mesh: Object3D) => boolean",
|
|
785
|
+
"desc": "Which meshes to merge (return false to skip)"
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
"page": true,
|
|
789
|
+
"documented": true,
|
|
790
|
+
"names": [
|
|
791
|
+
"add",
|
|
792
|
+
"cells"
|
|
793
|
+
],
|
|
794
|
+
"sections": [],
|
|
795
|
+
"saves": [],
|
|
796
|
+
"time": {
|
|
797
|
+
"kind": "none",
|
|
798
|
+
"hooks": [
|
|
799
|
+
"frame"
|
|
800
|
+
]
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"hud": {
|
|
804
|
+
"call": "hud",
|
|
805
|
+
"file": "packages/engine/modules/hud/index.js",
|
|
806
|
+
"label": "Objective markers",
|
|
807
|
+
"needs": [],
|
|
808
|
+
"type": "ui",
|
|
809
|
+
"provides": [],
|
|
810
|
+
"requires": [],
|
|
811
|
+
"handRolled": "none: a score line is ordinary DOM that the game owns",
|
|
812
|
+
"stage": "effects",
|
|
813
|
+
"before": [],
|
|
814
|
+
"after": [
|
|
815
|
+
"particles",
|
|
816
|
+
"settings"
|
|
817
|
+
],
|
|
818
|
+
"optional": [
|
|
819
|
+
"pickups",
|
|
820
|
+
"content",
|
|
821
|
+
"level",
|
|
822
|
+
"quests"
|
|
823
|
+
],
|
|
824
|
+
"params": {
|
|
825
|
+
"questMarkers": {
|
|
826
|
+
"type": "any",
|
|
827
|
+
"optional": true,
|
|
828
|
+
"docType": "boolean",
|
|
829
|
+
"desc": "Show a marker automatically when the current quest step has a target, default true"
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
"page": true,
|
|
833
|
+
"documented": true,
|
|
834
|
+
"names": [
|
|
835
|
+
"marker",
|
|
836
|
+
"counter",
|
|
837
|
+
"bump",
|
|
838
|
+
"value",
|
|
839
|
+
"bar",
|
|
840
|
+
"remove",
|
|
841
|
+
"markers"
|
|
842
|
+
],
|
|
843
|
+
"sections": [],
|
|
844
|
+
"saves": [],
|
|
845
|
+
"time": {
|
|
846
|
+
"kind": "none",
|
|
847
|
+
"hooks": [
|
|
848
|
+
"frame"
|
|
849
|
+
]
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"interactions": {
|
|
853
|
+
"call": "interactions",
|
|
854
|
+
"file": "packages/engine/modules/gameplay/Interactions.js",
|
|
855
|
+
"label": "Interactions",
|
|
856
|
+
"needs": [
|
|
857
|
+
"pick"
|
|
858
|
+
],
|
|
859
|
+
"type": "rules",
|
|
860
|
+
"provides": [
|
|
861
|
+
"interactions"
|
|
862
|
+
],
|
|
863
|
+
"requires": [],
|
|
864
|
+
"handRolled": [
|
|
865
|
+
"reach"
|
|
866
|
+
],
|
|
867
|
+
"stage": "gameplay",
|
|
868
|
+
"before": [],
|
|
869
|
+
"after": [],
|
|
870
|
+
"optional": [
|
|
871
|
+
"hud"
|
|
872
|
+
],
|
|
873
|
+
"params": {
|
|
874
|
+
"action": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"optional": true,
|
|
877
|
+
"default": "interact",
|
|
878
|
+
"desc": "input action that uses the interaction"
|
|
879
|
+
},
|
|
880
|
+
"pick": {
|
|
881
|
+
"type": "any",
|
|
882
|
+
"optional": true,
|
|
883
|
+
"desc": "which one counts as in front of you: 'nearest' | 'facing' | 'aim' | a function (required; checked with a fix hint on install)",
|
|
884
|
+
"docType": "InteractionPick"
|
|
885
|
+
},
|
|
886
|
+
"radius": {
|
|
887
|
+
"type": "number",
|
|
888
|
+
"optional": true,
|
|
889
|
+
"default": 2.5,
|
|
890
|
+
"min": 0,
|
|
891
|
+
"desc": "reach in meters (add() can set its own)"
|
|
892
|
+
},
|
|
893
|
+
"promptHeight": {
|
|
894
|
+
"type": "number",
|
|
895
|
+
"optional": true,
|
|
896
|
+
"desc": "prompt height above the target (meters)"
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"page": true,
|
|
900
|
+
"documented": true,
|
|
901
|
+
"names": [
|
|
902
|
+
"add",
|
|
903
|
+
"get",
|
|
904
|
+
"promptHeight",
|
|
905
|
+
"items",
|
|
906
|
+
"radius",
|
|
907
|
+
"pickMode",
|
|
908
|
+
"current",
|
|
909
|
+
"options",
|
|
910
|
+
"holding"
|
|
911
|
+
],
|
|
912
|
+
"sections": [],
|
|
913
|
+
"saves": [
|
|
914
|
+
"interactions"
|
|
915
|
+
],
|
|
916
|
+
"time": {
|
|
917
|
+
"kind": "none",
|
|
918
|
+
"hooks": [
|
|
919
|
+
"fixed",
|
|
920
|
+
"frame"
|
|
921
|
+
],
|
|
922
|
+
"noSkip": "input and prompt state only"
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"inventory": {
|
|
926
|
+
"call": "inventory",
|
|
927
|
+
"file": "packages/engine/modules/gameplay/Inventory.js",
|
|
928
|
+
"label": "Inventory",
|
|
929
|
+
"needs": [],
|
|
930
|
+
"type": "rules",
|
|
931
|
+
"provides": [
|
|
932
|
+
"inventory"
|
|
933
|
+
],
|
|
934
|
+
"requires": [],
|
|
935
|
+
"handRolled": [
|
|
936
|
+
"inventory"
|
|
937
|
+
],
|
|
938
|
+
"stage": "late",
|
|
939
|
+
"before": [],
|
|
940
|
+
"after": [],
|
|
941
|
+
"optional": [],
|
|
942
|
+
"params": {
|
|
943
|
+
"action": {
|
|
944
|
+
"type": "string",
|
|
945
|
+
"optional": true,
|
|
946
|
+
"default": "inventory",
|
|
947
|
+
"desc": "input action that opens the bag"
|
|
948
|
+
},
|
|
949
|
+
"capacity": {
|
|
950
|
+
"type": "number",
|
|
951
|
+
"optional": true,
|
|
952
|
+
"min": 0,
|
|
953
|
+
"desc": "slot limit of the player inventory (default Infinity = no limit)"
|
|
954
|
+
},
|
|
955
|
+
"maxWeight": {
|
|
956
|
+
"type": "number",
|
|
957
|
+
"optional": true,
|
|
958
|
+
"min": 0,
|
|
959
|
+
"desc": "weight limit of the player inventory (default Infinity = no limit)"
|
|
960
|
+
},
|
|
961
|
+
"defaultStack": {
|
|
962
|
+
"type": "number",
|
|
963
|
+
"optional": true,
|
|
964
|
+
"default": 99,
|
|
965
|
+
"min": 1,
|
|
966
|
+
"desc": "stack limit of items that set none"
|
|
967
|
+
},
|
|
968
|
+
"pauseGame": {
|
|
969
|
+
"type": "bool",
|
|
970
|
+
"optional": true,
|
|
971
|
+
"desc": "true: gameplay freezes while the window is open (default false)"
|
|
972
|
+
}
|
|
973
|
+
},
|
|
974
|
+
"page": true,
|
|
975
|
+
"documented": true,
|
|
976
|
+
"names": [
|
|
977
|
+
"of",
|
|
978
|
+
"define",
|
|
979
|
+
"item",
|
|
980
|
+
"count",
|
|
981
|
+
"has",
|
|
982
|
+
"list",
|
|
983
|
+
"get",
|
|
984
|
+
"add",
|
|
985
|
+
"remove",
|
|
986
|
+
"trade",
|
|
987
|
+
"setData",
|
|
988
|
+
"container",
|
|
989
|
+
"transfer",
|
|
990
|
+
"removeContainer",
|
|
991
|
+
"contents",
|
|
992
|
+
"setContents",
|
|
993
|
+
"pauseGame",
|
|
994
|
+
"capacity",
|
|
995
|
+
"bag",
|
|
996
|
+
"defaultStack"
|
|
997
|
+
],
|
|
998
|
+
"sections": [
|
|
999
|
+
"items",
|
|
1000
|
+
"startItems",
|
|
1001
|
+
"containers"
|
|
1002
|
+
],
|
|
1003
|
+
"saves": [
|
|
1004
|
+
"inventory",
|
|
1005
|
+
"containers"
|
|
1006
|
+
],
|
|
1007
|
+
"time": {
|
|
1008
|
+
"kind": "none",
|
|
1009
|
+
"hooks": [
|
|
1010
|
+
"frame"
|
|
1011
|
+
],
|
|
1012
|
+
"noSkip": "no timers or spatial state"
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
"level": {
|
|
1016
|
+
"call": "level",
|
|
1017
|
+
"file": "packages/engine/modules/level/index.js",
|
|
1018
|
+
"label": "Level",
|
|
1019
|
+
"needs": [],
|
|
1020
|
+
"type": "world",
|
|
1021
|
+
"provides": [
|
|
1022
|
+
"level",
|
|
1023
|
+
"ground"
|
|
1024
|
+
],
|
|
1025
|
+
"requires": [],
|
|
1026
|
+
"handRolled": "none: loading a map by hand is one model load that looks like any other",
|
|
1027
|
+
"stage": "ground",
|
|
1028
|
+
"before": [],
|
|
1029
|
+
"after": [],
|
|
1030
|
+
"optional": [
|
|
1031
|
+
"world",
|
|
1032
|
+
"content",
|
|
1033
|
+
"collision"
|
|
1034
|
+
],
|
|
1035
|
+
"params": {
|
|
1036
|
+
"url": {
|
|
1037
|
+
"type": "any",
|
|
1038
|
+
"optional": true,
|
|
1039
|
+
"docType": "string | null",
|
|
1040
|
+
"desc": "glTF path (or asset name); pick one of this and scene"
|
|
1041
|
+
},
|
|
1042
|
+
"scene": {
|
|
1043
|
+
"type": "any",
|
|
1044
|
+
"optional": true,
|
|
1045
|
+
"docType": "Object3D | null",
|
|
1046
|
+
"desc": "THREE.Object3D built in code; pick one of this and url"
|
|
1047
|
+
},
|
|
1048
|
+
"walkable": {
|
|
1049
|
+
"type": "any",
|
|
1050
|
+
"optional": true,
|
|
1051
|
+
"docType": "((mesh: Object3D) => boolean) | null",
|
|
1052
|
+
"desc": "Decide yourself which meshes are walkable"
|
|
1053
|
+
},
|
|
1054
|
+
"colliders": {
|
|
1055
|
+
"type": "any",
|
|
1056
|
+
"optional": true,
|
|
1057
|
+
"docType": "'named' | 'auto' | false",
|
|
1058
|
+
"desc": "'named' only col_ meshes block the player / 'auto' every tall mesh that is not walkable blocks / false"
|
|
1059
|
+
},
|
|
1060
|
+
"cellSize": {
|
|
1061
|
+
"type": "any",
|
|
1062
|
+
"optional": true,
|
|
1063
|
+
"docType": "number",
|
|
1064
|
+
"desc": "Heightfield cell size (meters), default 0.5"
|
|
1065
|
+
},
|
|
1066
|
+
"outside": {
|
|
1067
|
+
"type": "any",
|
|
1068
|
+
"optional": true,
|
|
1069
|
+
"docType": "number",
|
|
1070
|
+
"desc": "Ground height outside the level (meters), default 0"
|
|
1071
|
+
},
|
|
1072
|
+
"waterLevel": {
|
|
1073
|
+
"type": "any",
|
|
1074
|
+
"optional": true,
|
|
1075
|
+
"docType": "number",
|
|
1076
|
+
"desc": "Water surface height (meters), default no water"
|
|
1077
|
+
},
|
|
1078
|
+
"colliderPad": {
|
|
1079
|
+
"type": "any",
|
|
1080
|
+
"optional": true,
|
|
1081
|
+
"docType": "number",
|
|
1082
|
+
"desc": "(experimental) Expand the collision box outward by this much (meters)"
|
|
1083
|
+
},
|
|
1084
|
+
"colliderHeight": {
|
|
1085
|
+
"type": "any",
|
|
1086
|
+
"optional": true,
|
|
1087
|
+
"docType": "number",
|
|
1088
|
+
"desc": "(experimental) Minimum height of the collision box (meters)"
|
|
1089
|
+
},
|
|
1090
|
+
"sharpEdge": {
|
|
1091
|
+
"type": "any",
|
|
1092
|
+
"optional": true,
|
|
1093
|
+
"docType": "number",
|
|
1094
|
+
"desc": "(experimental) Treat it as a step edge when the height difference between adjacent grid points exceeds this (meters), default 0.6"
|
|
1095
|
+
},
|
|
1096
|
+
"hideMarkers": {
|
|
1097
|
+
"type": "any",
|
|
1098
|
+
"optional": true,
|
|
1099
|
+
"docType": "boolean",
|
|
1100
|
+
"desc": "(experimental) Hide the marker placeholder meshes, default true"
|
|
1101
|
+
},
|
|
1102
|
+
"addToScene": {
|
|
1103
|
+
"type": "any",
|
|
1104
|
+
"optional": true,
|
|
1105
|
+
"docType": "boolean",
|
|
1106
|
+
"desc": "(experimental) Add the scene to engine.scene, default true"
|
|
1107
|
+
},
|
|
1108
|
+
"part": {
|
|
1109
|
+
"type": "any",
|
|
1110
|
+
"optional": true,
|
|
1111
|
+
"docType": "boolean",
|
|
1112
|
+
"desc": "true: do not take the ground slot; compositeGround({ parts: [{ of: 'level' }] }) does and reads level.ground"
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
"page": true,
|
|
1116
|
+
"documented": true,
|
|
1117
|
+
"names": [
|
|
1118
|
+
"marker",
|
|
1119
|
+
"markersWith",
|
|
1120
|
+
"unload",
|
|
1121
|
+
"load",
|
|
1122
|
+
"track",
|
|
1123
|
+
"root",
|
|
1124
|
+
"markers",
|
|
1125
|
+
"spawn",
|
|
1126
|
+
"heightfield",
|
|
1127
|
+
"ready"
|
|
1128
|
+
],
|
|
1129
|
+
"sections": [
|
|
1130
|
+
"level"
|
|
1131
|
+
],
|
|
1132
|
+
"saves": [
|
|
1133
|
+
"level"
|
|
1134
|
+
],
|
|
1135
|
+
"time": {
|
|
1136
|
+
"kind": "none",
|
|
1137
|
+
"hooks": []
|
|
1138
|
+
}
|
|
1139
|
+
},
|
|
1140
|
+
"lightPool": {
|
|
1141
|
+
"call": "lightPool",
|
|
1142
|
+
"file": "packages/engine/modules/lights/index.js",
|
|
1143
|
+
"label": "Light pool",
|
|
1144
|
+
"needs": [],
|
|
1145
|
+
"type": "picture",
|
|
1146
|
+
"provides": [],
|
|
1147
|
+
"requires": [],
|
|
1148
|
+
"handRolled": "none: lights in the scene are plain three.js, used on purpose",
|
|
1149
|
+
"stage": "late",
|
|
1150
|
+
"before": [],
|
|
1151
|
+
"after": [],
|
|
1152
|
+
"optional": [],
|
|
1153
|
+
"params": {
|
|
1154
|
+
"point": {
|
|
1155
|
+
"type": "any",
|
|
1156
|
+
"optional": true,
|
|
1157
|
+
"docType": "number",
|
|
1158
|
+
"desc": "Real PointLights, default 8"
|
|
1159
|
+
},
|
|
1160
|
+
"spot": {
|
|
1161
|
+
"type": "any",
|
|
1162
|
+
"optional": true,
|
|
1163
|
+
"docType": "number",
|
|
1164
|
+
"desc": "Real SpotLights, default 0 (sources added with type: 'spot' use them)"
|
|
1165
|
+
},
|
|
1166
|
+
"shadows": {
|
|
1167
|
+
"type": "any",
|
|
1168
|
+
"optional": true,
|
|
1169
|
+
"docType": "number",
|
|
1170
|
+
"desc": "How many of the point lights cast shadows, default 0; only sources added with castShadow: true get them"
|
|
1171
|
+
},
|
|
1172
|
+
"every": {
|
|
1173
|
+
"type": "any",
|
|
1174
|
+
"optional": true,
|
|
1175
|
+
"docType": "number",
|
|
1176
|
+
"desc": "Seconds between choosing which sources get the lights, default 0.1 (fading and following run every frame)"
|
|
1177
|
+
},
|
|
1178
|
+
"fade": {
|
|
1179
|
+
"type": "any",
|
|
1180
|
+
"optional": true,
|
|
1181
|
+
"docType": "number",
|
|
1182
|
+
"desc": "Seconds a light takes to fade in or out when it moves to another source, default 0.3"
|
|
1183
|
+
},
|
|
1184
|
+
"focus": {
|
|
1185
|
+
"type": "any",
|
|
1186
|
+
"optional": true,
|
|
1187
|
+
"docType": "PositionLike | null",
|
|
1188
|
+
"desc": "Measure distance from this object / position instead of the camera (e.g. the player in a top-down game)"
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
"page": true,
|
|
1192
|
+
"documented": true,
|
|
1193
|
+
"names": [
|
|
1194
|
+
"add",
|
|
1195
|
+
"lights",
|
|
1196
|
+
"focus"
|
|
1197
|
+
],
|
|
1198
|
+
"sections": [],
|
|
1199
|
+
"saves": [],
|
|
1200
|
+
"time": {
|
|
1201
|
+
"kind": "none",
|
|
1202
|
+
"hooks": [
|
|
1203
|
+
"frame"
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"music": {
|
|
1208
|
+
"call": "music",
|
|
1209
|
+
"file": "packages/engine/modules/music/Music.js",
|
|
1210
|
+
"label": "Music",
|
|
1211
|
+
"needs": [],
|
|
1212
|
+
"type": "picture",
|
|
1213
|
+
"provides": [],
|
|
1214
|
+
"requires": [],
|
|
1215
|
+
"handRolled": "none: a song by hand is the audio hint already",
|
|
1216
|
+
"stage": "audio",
|
|
1217
|
+
"before": [],
|
|
1218
|
+
"after": [],
|
|
1219
|
+
"optional": [
|
|
1220
|
+
"dialogue"
|
|
1221
|
+
],
|
|
1222
|
+
"params": {
|
|
1223
|
+
"tracks": {
|
|
1224
|
+
"type": "any",
|
|
1225
|
+
"optional": true,
|
|
1226
|
+
"docType": "Record<string, MusicTrack>",
|
|
1227
|
+
"desc": "Tracks: name -> path or { url, volume, loop, stems }"
|
|
1228
|
+
},
|
|
1229
|
+
"rules": {
|
|
1230
|
+
"type": "any",
|
|
1231
|
+
"optional": true,
|
|
1232
|
+
"docType": "MusicRule[]",
|
|
1233
|
+
"desc": "Auto track rules (same as engine.music.rules(list))"
|
|
1234
|
+
},
|
|
1235
|
+
"fade": {
|
|
1236
|
+
"type": "any",
|
|
1237
|
+
"optional": true,
|
|
1238
|
+
"default": 2,
|
|
1239
|
+
"docType": "number",
|
|
1240
|
+
"desc": "Default crossfade seconds, default 2"
|
|
1241
|
+
},
|
|
1242
|
+
"duckDialogue": {
|
|
1243
|
+
"type": "any",
|
|
1244
|
+
"optional": true,
|
|
1245
|
+
"default": false,
|
|
1246
|
+
"docType": "number | false",
|
|
1247
|
+
"desc": "Duck the music bus during dialogue to this (0-1, e.g. 0.35); default false = no duck (the game opts in)"
|
|
1248
|
+
},
|
|
1249
|
+
"duckFade": {
|
|
1250
|
+
"type": "any",
|
|
1251
|
+
"optional": true,
|
|
1252
|
+
"default": 0.4,
|
|
1253
|
+
"docType": "number",
|
|
1254
|
+
"desc": "(experimental) Fade seconds for the ducking"
|
|
1255
|
+
},
|
|
1256
|
+
"hold": {
|
|
1257
|
+
"type": "any",
|
|
1258
|
+
"optional": true,
|
|
1259
|
+
"default": 2,
|
|
1260
|
+
"docType": "number",
|
|
1261
|
+
"desc": "Rule debounce seconds, default 2"
|
|
1262
|
+
},
|
|
1263
|
+
"interval": {
|
|
1264
|
+
"type": "any",
|
|
1265
|
+
"optional": true,
|
|
1266
|
+
"default": 1,
|
|
1267
|
+
"docType": "number",
|
|
1268
|
+
"desc": "Rule check interval (seconds), default 1"
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"page": true,
|
|
1272
|
+
"documented": true,
|
|
1273
|
+
"names": [
|
|
1274
|
+
"define",
|
|
1275
|
+
"play",
|
|
1276
|
+
"stop",
|
|
1277
|
+
"stinger",
|
|
1278
|
+
"rules",
|
|
1279
|
+
"override",
|
|
1280
|
+
"pick",
|
|
1281
|
+
"tracks",
|
|
1282
|
+
"current",
|
|
1283
|
+
"intensity",
|
|
1284
|
+
"ready",
|
|
1285
|
+
"ruled",
|
|
1286
|
+
"state"
|
|
1287
|
+
],
|
|
1288
|
+
"sections": [],
|
|
1289
|
+
"saves": [
|
|
1290
|
+
"music"
|
|
1291
|
+
],
|
|
1292
|
+
"time": {
|
|
1293
|
+
"kind": "none",
|
|
1294
|
+
"hooks": [
|
|
1295
|
+
"frame"
|
|
1296
|
+
]
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
"nav": {
|
|
1300
|
+
"call": "nav",
|
|
1301
|
+
"file": "packages/engine/modules/nav/index.js",
|
|
1302
|
+
"label": "Navmesh",
|
|
1303
|
+
"needs": [],
|
|
1304
|
+
"type": "world",
|
|
1305
|
+
"provides": [
|
|
1306
|
+
"nav"
|
|
1307
|
+
],
|
|
1308
|
+
"requires": [],
|
|
1309
|
+
"handRolled": "none: a pathfinder of its own is explicitly allowed",
|
|
1310
|
+
"stage": "late",
|
|
1311
|
+
"before": [],
|
|
1312
|
+
"after": [],
|
|
1313
|
+
"optional": [
|
|
1314
|
+
"collision",
|
|
1315
|
+
"level"
|
|
1316
|
+
],
|
|
1317
|
+
"params": {
|
|
1318
|
+
"cellSize": {
|
|
1319
|
+
"type": "any",
|
|
1320
|
+
"optional": true,
|
|
1321
|
+
"docType": "number",
|
|
1322
|
+
"desc": "Voxel cell size (meters), default 0.3; smaller is more accurate but slower to build"
|
|
1323
|
+
},
|
|
1324
|
+
"agentRadius": {
|
|
1325
|
+
"type": "any",
|
|
1326
|
+
"optional": true,
|
|
1327
|
+
"docType": "number",
|
|
1328
|
+
"desc": "Character radius (meters), default reads engine.movement.radius (this is an override). The mesh built at load; a path with another radius gets a mesh of its own, on first ask"
|
|
1329
|
+
},
|
|
1330
|
+
"agentHeight": {
|
|
1331
|
+
"type": "any",
|
|
1332
|
+
"optional": true,
|
|
1333
|
+
"docType": "number",
|
|
1334
|
+
"desc": "Character height (meters), default reads engine.movement.height"
|
|
1335
|
+
},
|
|
1336
|
+
"maxClimb": {
|
|
1337
|
+
"type": "any",
|
|
1338
|
+
"optional": true,
|
|
1339
|
+
"docType": "number",
|
|
1340
|
+
"desc": "Step height that can be climbed (meters), default reads engine.movement.stepHeight"
|
|
1341
|
+
},
|
|
1342
|
+
"maxSlope": {
|
|
1343
|
+
"type": "any",
|
|
1344
|
+
"optional": true,
|
|
1345
|
+
"docType": "number",
|
|
1346
|
+
"desc": "Max walkable slope (degrees), default reads engine.movement.maxSlope"
|
|
1347
|
+
},
|
|
1348
|
+
"tileSize": {
|
|
1349
|
+
"type": "any",
|
|
1350
|
+
"optional": true,
|
|
1351
|
+
"docType": "number",
|
|
1352
|
+
"desc": "(experimental) Tile size (in cells), default 32"
|
|
1353
|
+
},
|
|
1354
|
+
"crowd": {
|
|
1355
|
+
"type": "any",
|
|
1356
|
+
"optional": true,
|
|
1357
|
+
"docType": "boolean",
|
|
1358
|
+
"desc": "NPCs use Recast crowd avoidance, default false"
|
|
1359
|
+
},
|
|
1360
|
+
"debug": {
|
|
1361
|
+
"type": "any",
|
|
1362
|
+
"optional": true,
|
|
1363
|
+
"docType": "boolean",
|
|
1364
|
+
"desc": "Show the navmesh (debug), default false"
|
|
1365
|
+
},
|
|
1366
|
+
"maxObstacles": {
|
|
1367
|
+
"type": "any",
|
|
1368
|
+
"optional": true,
|
|
1369
|
+
"docType": "number",
|
|
1370
|
+
"desc": "(experimental) Most TileCache obstacles (collision boxes are cut into several), default 1024"
|
|
1371
|
+
},
|
|
1372
|
+
"maxAgents": {
|
|
1373
|
+
"type": "any",
|
|
1374
|
+
"optional": true,
|
|
1375
|
+
"docType": "number",
|
|
1376
|
+
"desc": "(experimental) Most crowd agents (with crowd: true), default 128"
|
|
1377
|
+
},
|
|
1378
|
+
"arrive": {
|
|
1379
|
+
"type": "any",
|
|
1380
|
+
"optional": true,
|
|
1381
|
+
"docType": "number",
|
|
1382
|
+
"desc": "Meters past the character's radius a path may end short of its goal and still count as arrived, default 0.6"
|
|
1383
|
+
},
|
|
1384
|
+
"links": {
|
|
1385
|
+
"type": "any",
|
|
1386
|
+
"optional": true,
|
|
1387
|
+
"docType": "NavLink[]",
|
|
1388
|
+
"desc": "(experimental) Places joined by a jump or a climb instead of walking (Recast off-mesh connections); walkers cross them straight unless the game says otherwise"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
"page": true,
|
|
1392
|
+
"documented": true,
|
|
1393
|
+
"names": [
|
|
1394
|
+
"findPath",
|
|
1395
|
+
"dispose",
|
|
1396
|
+
"ready",
|
|
1397
|
+
"links",
|
|
1398
|
+
"navMesh",
|
|
1399
|
+
"query",
|
|
1400
|
+
"tileCache",
|
|
1401
|
+
"crowd",
|
|
1402
|
+
"helper",
|
|
1403
|
+
"version",
|
|
1404
|
+
"agent"
|
|
1405
|
+
],
|
|
1406
|
+
"sections": [],
|
|
1407
|
+
"saves": [],
|
|
1408
|
+
"time": {
|
|
1409
|
+
"kind": "none",
|
|
1410
|
+
"hooks": [
|
|
1411
|
+
"fixed"
|
|
1412
|
+
]
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"net": {
|
|
1416
|
+
"call": "net",
|
|
1417
|
+
"file": "packages/engine/modules/net/index.js",
|
|
1418
|
+
"label": "Multiplayer",
|
|
1419
|
+
"needs": [
|
|
1420
|
+
"role",
|
|
1421
|
+
"transport"
|
|
1422
|
+
],
|
|
1423
|
+
"type": "net",
|
|
1424
|
+
"provides": [],
|
|
1425
|
+
"requires": [],
|
|
1426
|
+
"handRolled": "none: an own connection is a plain WebSocket, used on purpose",
|
|
1427
|
+
"stage": "late",
|
|
1428
|
+
"before": [],
|
|
1429
|
+
"after": [],
|
|
1430
|
+
"optional": [
|
|
1431
|
+
"world",
|
|
1432
|
+
"inventory"
|
|
1433
|
+
],
|
|
1434
|
+
"params": {
|
|
1435
|
+
"role": {
|
|
1436
|
+
"type": "any",
|
|
1437
|
+
"optional": true
|
|
1438
|
+
},
|
|
1439
|
+
"transport": {
|
|
1440
|
+
"type": "any",
|
|
1441
|
+
"optional": true
|
|
1442
|
+
},
|
|
1443
|
+
"sync": {
|
|
1444
|
+
"type": "any",
|
|
1445
|
+
"optional": true
|
|
1446
|
+
},
|
|
1447
|
+
"syncEvery": {
|
|
1448
|
+
"type": "any",
|
|
1449
|
+
"optional": true
|
|
1450
|
+
},
|
|
1451
|
+
"keepAlive": {
|
|
1452
|
+
"type": "any",
|
|
1453
|
+
"optional": true
|
|
1454
|
+
},
|
|
1455
|
+
"rate": {
|
|
1456
|
+
"type": "any",
|
|
1457
|
+
"optional": true
|
|
1458
|
+
},
|
|
1459
|
+
"burst": {
|
|
1460
|
+
"type": "any",
|
|
1461
|
+
"optional": true
|
|
1462
|
+
},
|
|
1463
|
+
"maxSpeed": {
|
|
1464
|
+
"type": "any",
|
|
1465
|
+
"optional": true
|
|
1466
|
+
},
|
|
1467
|
+
"posEvery": {
|
|
1468
|
+
"type": "any",
|
|
1469
|
+
"optional": true
|
|
1470
|
+
},
|
|
1471
|
+
"actorFor": {
|
|
1472
|
+
"type": "any",
|
|
1473
|
+
"optional": true
|
|
1474
|
+
},
|
|
1475
|
+
"actorFields": {
|
|
1476
|
+
"type": "any",
|
|
1477
|
+
"optional": true
|
|
1478
|
+
},
|
|
1479
|
+
"avatarFields": {
|
|
1480
|
+
"type": "any",
|
|
1481
|
+
"optional": true
|
|
1482
|
+
},
|
|
1483
|
+
"interpolate": {
|
|
1484
|
+
"type": "any",
|
|
1485
|
+
"optional": true
|
|
1486
|
+
},
|
|
1487
|
+
"avatar": {
|
|
1488
|
+
"type": "any",
|
|
1489
|
+
"optional": true
|
|
1490
|
+
},
|
|
1491
|
+
"onJoin": {
|
|
1492
|
+
"type": "any",
|
|
1493
|
+
"optional": true
|
|
1494
|
+
},
|
|
1495
|
+
"onLeave": {
|
|
1496
|
+
"type": "any",
|
|
1497
|
+
"optional": true
|
|
1498
|
+
}
|
|
1499
|
+
},
|
|
1500
|
+
"page": true,
|
|
1501
|
+
"documented": false,
|
|
1502
|
+
"names": [
|
|
1503
|
+
"reconnect",
|
|
1504
|
+
"role",
|
|
1505
|
+
"actor",
|
|
1506
|
+
"connected",
|
|
1507
|
+
"peers",
|
|
1508
|
+
"pending",
|
|
1509
|
+
"stats"
|
|
1510
|
+
],
|
|
1511
|
+
"sections": [],
|
|
1512
|
+
"saves": [],
|
|
1513
|
+
"time": {
|
|
1514
|
+
"kind": "none",
|
|
1515
|
+
"hooks": [
|
|
1516
|
+
"fixed",
|
|
1517
|
+
"frame"
|
|
1518
|
+
]
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
"particles": {
|
|
1522
|
+
"call": "particles",
|
|
1523
|
+
"file": "packages/engine/modules/particles/Particles.js",
|
|
1524
|
+
"label": "Particles",
|
|
1525
|
+
"needs": [],
|
|
1526
|
+
"type": "picture",
|
|
1527
|
+
"provides": [
|
|
1528
|
+
"particles"
|
|
1529
|
+
],
|
|
1530
|
+
"requires": [],
|
|
1531
|
+
"handRolled": [
|
|
1532
|
+
"particles"
|
|
1533
|
+
],
|
|
1534
|
+
"stage": "effects",
|
|
1535
|
+
"before": [],
|
|
1536
|
+
"after": [],
|
|
1537
|
+
"optional": [],
|
|
1538
|
+
"params": {
|
|
1539
|
+
"effects": {
|
|
1540
|
+
"type": "object",
|
|
1541
|
+
"optional": true,
|
|
1542
|
+
"desc": "effect params by name: under what define() gives, and defined on the first emit / attach when define() never ran"
|
|
1543
|
+
},
|
|
1544
|
+
"default": {
|
|
1545
|
+
"type": "object",
|
|
1546
|
+
"optional": true,
|
|
1547
|
+
"desc": "params every effect starts from"
|
|
1548
|
+
}
|
|
1549
|
+
},
|
|
1550
|
+
"page": true,
|
|
1551
|
+
"documented": true,
|
|
1552
|
+
"names": [
|
|
1553
|
+
"define",
|
|
1554
|
+
"has",
|
|
1555
|
+
"emit",
|
|
1556
|
+
"attach",
|
|
1557
|
+
"count",
|
|
1558
|
+
"clear",
|
|
1559
|
+
"effects"
|
|
1560
|
+
],
|
|
1561
|
+
"sections": [],
|
|
1562
|
+
"saves": [],
|
|
1563
|
+
"time": {
|
|
1564
|
+
"kind": "none",
|
|
1565
|
+
"hooks": [
|
|
1566
|
+
"frame"
|
|
1567
|
+
]
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
"photo": {
|
|
1571
|
+
"call": "photo",
|
|
1572
|
+
"file": "packages/engine/modules/photo/Photo.js",
|
|
1573
|
+
"label": "Photo mode",
|
|
1574
|
+
"needs": [],
|
|
1575
|
+
"type": "tool",
|
|
1576
|
+
"provides": [],
|
|
1577
|
+
"requires": [],
|
|
1578
|
+
"handRolled": "none: a screenshot is one browser call, and a hint would add nothing to it",
|
|
1579
|
+
"stage": "late",
|
|
1580
|
+
"before": [],
|
|
1581
|
+
"after": [],
|
|
1582
|
+
"optional": [
|
|
1583
|
+
"cameraRig",
|
|
1584
|
+
"sky",
|
|
1585
|
+
"calendar",
|
|
1586
|
+
"vegetation",
|
|
1587
|
+
"characters"
|
|
1588
|
+
],
|
|
1589
|
+
"params": {
|
|
1590
|
+
"maxAlbum": {
|
|
1591
|
+
"type": "any",
|
|
1592
|
+
"optional": true,
|
|
1593
|
+
"docType": "number",
|
|
1594
|
+
"desc": "(experimental) How many photos the album keeps at most, default 50"
|
|
1595
|
+
},
|
|
1596
|
+
"scale": {
|
|
1597
|
+
"type": "any",
|
|
1598
|
+
"optional": true
|
|
1599
|
+
},
|
|
1600
|
+
"shadowMapSize": {
|
|
1601
|
+
"type": "any",
|
|
1602
|
+
"optional": true
|
|
1603
|
+
},
|
|
1604
|
+
"bloom": {
|
|
1605
|
+
"type": "any",
|
|
1606
|
+
"optional": true
|
|
1607
|
+
},
|
|
1608
|
+
"quality": {
|
|
1609
|
+
"type": "any",
|
|
1610
|
+
"optional": true
|
|
1611
|
+
},
|
|
1612
|
+
"format": {
|
|
1613
|
+
"type": "any",
|
|
1614
|
+
"optional": true
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
"page": true,
|
|
1618
|
+
"documented": true,
|
|
1619
|
+
"names": [
|
|
1620
|
+
"take",
|
|
1621
|
+
"subject",
|
|
1622
|
+
"album",
|
|
1623
|
+
"canTake",
|
|
1624
|
+
"format",
|
|
1625
|
+
"maxAlbum"
|
|
1626
|
+
],
|
|
1627
|
+
"sections": [],
|
|
1628
|
+
"saves": [],
|
|
1629
|
+
"time": {
|
|
1630
|
+
"kind": "none",
|
|
1631
|
+
"hooks": [
|
|
1632
|
+
"frame"
|
|
1633
|
+
]
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
"pickups": {
|
|
1637
|
+
"call": "pickups",
|
|
1638
|
+
"file": "packages/engine/modules/gameplay/pickups.js",
|
|
1639
|
+
"label": "Pickups",
|
|
1640
|
+
"needs": [],
|
|
1641
|
+
"type": "rules",
|
|
1642
|
+
"provides": [],
|
|
1643
|
+
"requires": [
|
|
1644
|
+
"world"
|
|
1645
|
+
],
|
|
1646
|
+
"handRolled": "none: a pickup by hand is a distance check with no word that sets it apart",
|
|
1647
|
+
"stage": "gameplay",
|
|
1648
|
+
"before": [],
|
|
1649
|
+
"after": [],
|
|
1650
|
+
"optional": [
|
|
1651
|
+
"interactions",
|
|
1652
|
+
"inventory",
|
|
1653
|
+
"net"
|
|
1654
|
+
],
|
|
1655
|
+
"params": {
|
|
1656
|
+
"radius": {
|
|
1657
|
+
"type": "number",
|
|
1658
|
+
"optional": true,
|
|
1659
|
+
"default": 2,
|
|
1660
|
+
"min": 0,
|
|
1661
|
+
"desc": "reach of pickups that set no radius (meters); auto pickups are taken within it"
|
|
1662
|
+
},
|
|
1663
|
+
"showDistance": {
|
|
1664
|
+
"type": "number",
|
|
1665
|
+
"optional": true,
|
|
1666
|
+
"default": 60,
|
|
1667
|
+
"min": 0,
|
|
1668
|
+
"desc": "pickups have a model, float and spin only within this distance of the stream sources (meters)"
|
|
1669
|
+
},
|
|
1670
|
+
"takers": {
|
|
1671
|
+
"type": "any",
|
|
1672
|
+
"optional": true,
|
|
1673
|
+
"desc": "e => actor ids that walk into auto pickups (default engine.actor and the seats, plus net peers on a host)",
|
|
1674
|
+
"docType": "(e: Engine) => string[]"
|
|
1675
|
+
},
|
|
1676
|
+
"color": {
|
|
1677
|
+
"type": "any",
|
|
1678
|
+
"optional": true,
|
|
1679
|
+
"default": 13421772,
|
|
1680
|
+
"desc": "color of the placeholder box and geometry-only models when the pickup and its item set none",
|
|
1681
|
+
"docType": "ColorLike"
|
|
1682
|
+
},
|
|
1683
|
+
"size": {
|
|
1684
|
+
"type": "number",
|
|
1685
|
+
"optional": true,
|
|
1686
|
+
"default": 0.25,
|
|
1687
|
+
"min": 0,
|
|
1688
|
+
"desc": "edge of the placeholder box (meters)"
|
|
1689
|
+
},
|
|
1690
|
+
"lift": {
|
|
1691
|
+
"type": "number",
|
|
1692
|
+
"optional": true,
|
|
1693
|
+
"default": 0.4,
|
|
1694
|
+
"desc": "height above the ground a pickup floats at (meters)"
|
|
1695
|
+
}
|
|
1696
|
+
},
|
|
1697
|
+
"page": true,
|
|
1698
|
+
"documented": true,
|
|
1699
|
+
"names": [
|
|
1700
|
+
"spawn",
|
|
1701
|
+
"nearest",
|
|
1702
|
+
"radius",
|
|
1703
|
+
"takers",
|
|
1704
|
+
"material",
|
|
1705
|
+
"size",
|
|
1706
|
+
"lift"
|
|
1707
|
+
],
|
|
1708
|
+
"sections": [
|
|
1709
|
+
"pickups"
|
|
1710
|
+
],
|
|
1711
|
+
"saves": [],
|
|
1712
|
+
"time": {
|
|
1713
|
+
"kind": "exact",
|
|
1714
|
+
"hooks": [
|
|
1715
|
+
"fixed"
|
|
1716
|
+
],
|
|
1717
|
+
"noSkip": "auto pickups are spatial; respawn follows the game clock"
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
"quests": {
|
|
1721
|
+
"call": "quests",
|
|
1722
|
+
"file": "packages/engine/modules/gameplay/Quests.js",
|
|
1723
|
+
"label": "Quests",
|
|
1724
|
+
"needs": [],
|
|
1725
|
+
"type": "rules",
|
|
1726
|
+
"provides": [
|
|
1727
|
+
"quests"
|
|
1728
|
+
],
|
|
1729
|
+
"requires": [],
|
|
1730
|
+
"handRolled": [
|
|
1731
|
+
"quests"
|
|
1732
|
+
],
|
|
1733
|
+
"stage": "late",
|
|
1734
|
+
"before": [],
|
|
1735
|
+
"after": [],
|
|
1736
|
+
"optional": [],
|
|
1737
|
+
"params": {
|
|
1738
|
+
"action": {
|
|
1739
|
+
"type": "string",
|
|
1740
|
+
"optional": true,
|
|
1741
|
+
"default": "quests",
|
|
1742
|
+
"desc": "input action that opens the quest log"
|
|
1743
|
+
},
|
|
1744
|
+
"checkInterval": {
|
|
1745
|
+
"type": "number",
|
|
1746
|
+
"optional": true,
|
|
1747
|
+
"default": 0.5,
|
|
1748
|
+
"min": 0,
|
|
1749
|
+
"desc": "real seconds between quest condition checks"
|
|
1750
|
+
},
|
|
1751
|
+
"notify": {
|
|
1752
|
+
"type": "any",
|
|
1753
|
+
"optional": true,
|
|
1754
|
+
"default": true,
|
|
1755
|
+
"desc": "true = toast, false = silent, or a function ({ type, id, text }) => void",
|
|
1756
|
+
"docType": "boolean | ((msg) => void)"
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
"page": true,
|
|
1760
|
+
"documented": true,
|
|
1761
|
+
"names": [
|
|
1762
|
+
"define",
|
|
1763
|
+
"start",
|
|
1764
|
+
"state",
|
|
1765
|
+
"advance",
|
|
1766
|
+
"isDone",
|
|
1767
|
+
"isActive",
|
|
1768
|
+
"isFailed",
|
|
1769
|
+
"check",
|
|
1770
|
+
"list",
|
|
1771
|
+
"win"
|
|
1772
|
+
],
|
|
1773
|
+
"sections": [
|
|
1774
|
+
"quests"
|
|
1775
|
+
],
|
|
1776
|
+
"saves": [
|
|
1777
|
+
"quests"
|
|
1778
|
+
],
|
|
1779
|
+
"time": {
|
|
1780
|
+
"kind": "approx",
|
|
1781
|
+
"hooks": [
|
|
1782
|
+
"fixed",
|
|
1783
|
+
"frame",
|
|
1784
|
+
"skip"
|
|
1785
|
+
]
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
"rigid": {
|
|
1789
|
+
"call": "rigid",
|
|
1790
|
+
"file": "packages/engine/modules/rigid/RigidBodies.js",
|
|
1791
|
+
"label": "Physics",
|
|
1792
|
+
"needs": [],
|
|
1793
|
+
"type": "world",
|
|
1794
|
+
"provides": [
|
|
1795
|
+
"rigid",
|
|
1796
|
+
"collider3d"
|
|
1797
|
+
],
|
|
1798
|
+
"requires": [
|
|
1799
|
+
"collision"
|
|
1800
|
+
],
|
|
1801
|
+
"handRolled": [
|
|
1802
|
+
"physics"
|
|
1803
|
+
],
|
|
1804
|
+
"stage": "late",
|
|
1805
|
+
"before": [],
|
|
1806
|
+
"after": [],
|
|
1807
|
+
"optional": [
|
|
1808
|
+
"interactions",
|
|
1809
|
+
"cameraRig",
|
|
1810
|
+
"characters"
|
|
1811
|
+
],
|
|
1812
|
+
"params": {
|
|
1813
|
+
"gravity": {
|
|
1814
|
+
"type": "any",
|
|
1815
|
+
"optional": true,
|
|
1816
|
+
"docType": "number",
|
|
1817
|
+
"desc": "Gravity (m/s², negative points down), default -9.81"
|
|
1818
|
+
},
|
|
1819
|
+
"terrainRing": {
|
|
1820
|
+
"type": "any",
|
|
1821
|
+
"optional": true,
|
|
1822
|
+
"docType": "number",
|
|
1823
|
+
"desc": "How many rings of chunks around the player get terrain colliders, default 1. A body outside them freezes until the player comes near (entry.enabled false, describe().rigid.frozen), because it would fall through the ground: raise this for a car or ball that must keep moving far away"
|
|
1824
|
+
},
|
|
1825
|
+
"buoyancy": {
|
|
1826
|
+
"type": "any",
|
|
1827
|
+
"optional": true,
|
|
1828
|
+
"docType": "boolean",
|
|
1829
|
+
"desc": "Whether there is buoyancy, default true"
|
|
1830
|
+
},
|
|
1831
|
+
"buoyancyForce": {
|
|
1832
|
+
"type": "any",
|
|
1833
|
+
"optional": true,
|
|
1834
|
+
"docType": "number",
|
|
1835
|
+
"desc": "(experimental) Buoyancy strength (1 = just floats), default 1.6"
|
|
1836
|
+
},
|
|
1837
|
+
"waterDrag": {
|
|
1838
|
+
"type": "any",
|
|
1839
|
+
"optional": true,
|
|
1840
|
+
"docType": "number",
|
|
1841
|
+
"desc": "(experimental) Drag in water, default 2.5"
|
|
1842
|
+
},
|
|
1843
|
+
"floatLine": {
|
|
1844
|
+
"type": "any",
|
|
1845
|
+
"optional": true,
|
|
1846
|
+
"docType": "number",
|
|
1847
|
+
"desc": "(experimental) Buoyancy \"waterline\": an object starts floating when its center is this many meters below the water surface, default 0.3"
|
|
1848
|
+
},
|
|
1849
|
+
"floatDepth": {
|
|
1850
|
+
"type": "any",
|
|
1851
|
+
"optional": true,
|
|
1852
|
+
"docType": "number",
|
|
1853
|
+
"desc": "(experimental) Buoyancy reaches its maximum this many meters further down, default 0.8"
|
|
1854
|
+
},
|
|
1855
|
+
"treeColliderHeight": {
|
|
1856
|
+
"type": "any",
|
|
1857
|
+
"optional": true,
|
|
1858
|
+
"docType": "number",
|
|
1859
|
+
"desc": "(experimental) Height (meters) of vegetation collision pillars (tree trunks), default 6"
|
|
1860
|
+
},
|
|
1861
|
+
"treeRadius": {
|
|
1862
|
+
"type": "any",
|
|
1863
|
+
"optional": true,
|
|
1864
|
+
"docType": "number",
|
|
1865
|
+
"desc": "(experimental) Trunks get collision cylinders only in chunks within this many meters of the player or a moving rigid body (the rest are covered by engine.collision for characters), default 16"
|
|
1866
|
+
},
|
|
1867
|
+
"playerCapsule": {
|
|
1868
|
+
"type": "any",
|
|
1869
|
+
"optional": true,
|
|
1870
|
+
"docType": "{ halfHeight: number; radius: number }",
|
|
1871
|
+
"desc": "(experimental) Player capsule size (meters), default computed from engine.movement radius / height"
|
|
1872
|
+
},
|
|
1873
|
+
"fallbackFloor": {
|
|
1874
|
+
"type": "any",
|
|
1875
|
+
"optional": true,
|
|
1876
|
+
"docType": "boolean",
|
|
1877
|
+
"desc": "The flat plane at y = 0 when the ground has no collision of its own, default true. false: only your own bodies and colliders are there (a sky of islands)"
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
"page": true,
|
|
1881
|
+
"documented": true,
|
|
1882
|
+
"names": [
|
|
1883
|
+
"addBox",
|
|
1884
|
+
"addBall",
|
|
1885
|
+
"addHull",
|
|
1886
|
+
"ragdoll",
|
|
1887
|
+
"impulse",
|
|
1888
|
+
"setPosition",
|
|
1889
|
+
"addWheeled",
|
|
1890
|
+
"ready",
|
|
1891
|
+
"bodies",
|
|
1892
|
+
"terrainRing",
|
|
1893
|
+
"buoyancy",
|
|
1894
|
+
"buoyancyForce",
|
|
1895
|
+
"waterDrag",
|
|
1896
|
+
"floatLine",
|
|
1897
|
+
"floatDepth",
|
|
1898
|
+
"treeColliderHeight",
|
|
1899
|
+
"treeRadius",
|
|
1900
|
+
"rapier",
|
|
1901
|
+
"world",
|
|
1902
|
+
"playerBody",
|
|
1903
|
+
"playerCollider",
|
|
1904
|
+
"playerCapsule",
|
|
1905
|
+
"vehicles",
|
|
1906
|
+
"stats"
|
|
1907
|
+
],
|
|
1908
|
+
"sections": [],
|
|
1909
|
+
"saves": [
|
|
1910
|
+
"rigid"
|
|
1911
|
+
],
|
|
1912
|
+
"time": {
|
|
1913
|
+
"kind": "none",
|
|
1914
|
+
"hooks": [
|
|
1915
|
+
"fixed",
|
|
1916
|
+
"afterLoad"
|
|
1917
|
+
],
|
|
1918
|
+
"noSkip": "bodies rest while time jumps (stepping seconds of physics would only scatter them)"
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
"settings": {
|
|
1922
|
+
"call": "settings",
|
|
1923
|
+
"file": "packages/engine/modules/settings/Settings.js",
|
|
1924
|
+
"label": "Settings",
|
|
1925
|
+
"needs": [],
|
|
1926
|
+
"type": "ui",
|
|
1927
|
+
"provides": [],
|
|
1928
|
+
"requires": [],
|
|
1929
|
+
"handRolled": [
|
|
1930
|
+
"pause",
|
|
1931
|
+
"settings"
|
|
1932
|
+
],
|
|
1933
|
+
"stage": "effects",
|
|
1934
|
+
"before": [],
|
|
1935
|
+
"after": [],
|
|
1936
|
+
"optional": [
|
|
1937
|
+
"flow",
|
|
1938
|
+
"cameraRig"
|
|
1939
|
+
],
|
|
1940
|
+
"params": {
|
|
1941
|
+
"action": {
|
|
1942
|
+
"type": "any",
|
|
1943
|
+
"optional": true,
|
|
1944
|
+
"docType": "string",
|
|
1945
|
+
"desc": "Action that opens the menu, default the basic 'cancel' (Esc / pad B on an empty UI focus stack); another name is declared and the game binds it"
|
|
1946
|
+
},
|
|
1947
|
+
"storageKey": {
|
|
1948
|
+
"type": "any",
|
|
1949
|
+
"optional": true,
|
|
1950
|
+
"docType": "string",
|
|
1951
|
+
"desc": "Browser storage key"
|
|
1952
|
+
},
|
|
1953
|
+
"presets": {
|
|
1954
|
+
"type": "any",
|
|
1955
|
+
"optional": true,
|
|
1956
|
+
"docType": "Record<string, QualityPreset>",
|
|
1957
|
+
"desc": "Override the graphics presets: { low: {...}, medium: {...}, high: {...} }"
|
|
1958
|
+
},
|
|
1959
|
+
"sections": {
|
|
1960
|
+
"type": "any",
|
|
1961
|
+
"optional": true,
|
|
1962
|
+
"docType": "boolean | (string | { id: 'graphics'; omit: string[] })[]",
|
|
1963
|
+
"desc": "Tabs: true (default) graphics, audio, controls, language, saves; false none; or a list by name, which may include the optional 'game' (resume, load a save, back to title) and 'camera' (mouse sensitivity, invert Y, field of view; saved as camera.sensitivity / camera.invertY / camera.fov). Example: `settings({ sections: ['game', 'graphics', 'audio', 'controls', 'camera'] })`"
|
|
1964
|
+
},
|
|
1965
|
+
"freezeWorld": {
|
|
1966
|
+
"type": "any",
|
|
1967
|
+
"optional": true,
|
|
1968
|
+
"docType": "boolean",
|
|
1969
|
+
"desc": "Pause gameplay while the menu is open (with flow installed it switches to flow's 'paused' and returns to the previous state on close; without flow it uses engine.freeze); the picture keeps running, default false"
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
"page": true,
|
|
1973
|
+
"documented": true,
|
|
1974
|
+
"names": [
|
|
1975
|
+
"get",
|
|
1976
|
+
"set",
|
|
1977
|
+
"preset",
|
|
1978
|
+
"define",
|
|
1979
|
+
"addSection",
|
|
1980
|
+
"reset",
|
|
1981
|
+
"resetBindings",
|
|
1982
|
+
"rebind",
|
|
1983
|
+
"actionList",
|
|
1984
|
+
"save",
|
|
1985
|
+
"values",
|
|
1986
|
+
"presets",
|
|
1987
|
+
"sections",
|
|
1988
|
+
"isOpen"
|
|
1989
|
+
],
|
|
1990
|
+
"sections": [],
|
|
1991
|
+
"saves": [],
|
|
1992
|
+
"time": {
|
|
1993
|
+
"kind": "none",
|
|
1994
|
+
"hooks": [
|
|
1995
|
+
"frame"
|
|
1996
|
+
]
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
"sky": {
|
|
2000
|
+
"call": "sky",
|
|
2001
|
+
"file": "packages/engine/modules/sky/skyModule.js",
|
|
2002
|
+
"label": "Sky",
|
|
2003
|
+
"needs": [],
|
|
2004
|
+
"type": "picture",
|
|
2005
|
+
"provides": [
|
|
2006
|
+
"sky"
|
|
2007
|
+
],
|
|
2008
|
+
"requires": [],
|
|
2009
|
+
"handRolled": "none: a sky of its own is plain three.js, used on purpose",
|
|
2010
|
+
"stage": "environment",
|
|
2011
|
+
"before": [],
|
|
2012
|
+
"after": [],
|
|
2013
|
+
"optional": [
|
|
2014
|
+
"weather",
|
|
2015
|
+
"calendar"
|
|
2016
|
+
],
|
|
2017
|
+
"params": {
|
|
2018
|
+
"time": {
|
|
2019
|
+
"type": "any",
|
|
2020
|
+
"optional": true,
|
|
2021
|
+
"docType": "string | number",
|
|
2022
|
+
"desc": "The fixed time of day drawn while no calendar() is installed: 'HH:MM' or 0–1 (0.5 noon), default 0.33 (a sunset arena: sky({ time: '18:30' })). With calendar() the sky draws engine.calendar.timeOfDay and this option throws (start the day with calendar({ time }))"
|
|
2023
|
+
},
|
|
2024
|
+
"clouds": {
|
|
2025
|
+
"type": "any",
|
|
2026
|
+
"optional": true
|
|
2027
|
+
},
|
|
2028
|
+
"backdrop": {
|
|
2029
|
+
"type": "any",
|
|
2030
|
+
"optional": true
|
|
2031
|
+
},
|
|
2032
|
+
"keyframes": {
|
|
2033
|
+
"type": "any",
|
|
2034
|
+
"optional": true
|
|
2035
|
+
},
|
|
2036
|
+
"sunSize": {
|
|
2037
|
+
"type": "any",
|
|
2038
|
+
"optional": true
|
|
2039
|
+
},
|
|
2040
|
+
"sunGlow": {
|
|
2041
|
+
"type": "any",
|
|
2042
|
+
"optional": true
|
|
2043
|
+
},
|
|
2044
|
+
"sunBrightness": {
|
|
2045
|
+
"type": "any",
|
|
2046
|
+
"optional": true
|
|
2047
|
+
},
|
|
2048
|
+
"moonColor": {
|
|
2049
|
+
"type": "any",
|
|
2050
|
+
"optional": true
|
|
2051
|
+
},
|
|
2052
|
+
"moonBrightness": {
|
|
2053
|
+
"type": "any",
|
|
2054
|
+
"optional": true
|
|
2055
|
+
},
|
|
2056
|
+
"starDensity": {
|
|
2057
|
+
"type": "any",
|
|
2058
|
+
"optional": true
|
|
2059
|
+
},
|
|
2060
|
+
"dim": {
|
|
2061
|
+
"type": "any",
|
|
2062
|
+
"optional": true
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
"page": true,
|
|
2066
|
+
"documented": true,
|
|
2067
|
+
"names": [
|
|
2068
|
+
"keyframes",
|
|
2069
|
+
"clouds",
|
|
2070
|
+
"layer",
|
|
2071
|
+
"replace",
|
|
2072
|
+
"environment",
|
|
2073
|
+
"fixedTime",
|
|
2074
|
+
"seasonTints",
|
|
2075
|
+
"dim",
|
|
2076
|
+
"top",
|
|
2077
|
+
"horizon",
|
|
2078
|
+
"uniforms",
|
|
2079
|
+
"dome",
|
|
2080
|
+
"orbit",
|
|
2081
|
+
"sunDir",
|
|
2082
|
+
"backdrop",
|
|
2083
|
+
"drawnTime",
|
|
2084
|
+
"sunHeight",
|
|
2085
|
+
"isDay",
|
|
2086
|
+
"daylight"
|
|
2087
|
+
],
|
|
2088
|
+
"sections": [],
|
|
2089
|
+
"saves": [],
|
|
2090
|
+
"time": {
|
|
2091
|
+
"kind": "none",
|
|
2092
|
+
"hooks": [
|
|
2093
|
+
"frame"
|
|
2094
|
+
]
|
|
2095
|
+
}
|
|
2096
|
+
},
|
|
2097
|
+
"swarm": {
|
|
2098
|
+
"call": "swarm",
|
|
2099
|
+
"file": "packages/engine/modules/swarm/Swarm.js",
|
|
2100
|
+
"label": "Swarm",
|
|
2101
|
+
"needs": [],
|
|
2102
|
+
"type": "rules",
|
|
2103
|
+
"provides": [
|
|
2104
|
+
"swarm"
|
|
2105
|
+
],
|
|
2106
|
+
"requires": [],
|
|
2107
|
+
"handRolled": [
|
|
2108
|
+
"pool"
|
|
2109
|
+
],
|
|
2110
|
+
"stage": "gameplay",
|
|
2111
|
+
"before": [],
|
|
2112
|
+
"after": [],
|
|
2113
|
+
"optional": [],
|
|
2114
|
+
"params": null,
|
|
2115
|
+
"page": true,
|
|
2116
|
+
"documented": false,
|
|
2117
|
+
"names": [],
|
|
2118
|
+
"sections": [],
|
|
2119
|
+
"saves": [
|
|
2120
|
+
"swarm"
|
|
2121
|
+
],
|
|
2122
|
+
"time": {
|
|
2123
|
+
"kind": "none",
|
|
2124
|
+
"hooks": [
|
|
2125
|
+
"fixed"
|
|
2126
|
+
]
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
"terrain": {
|
|
2130
|
+
"call": "terrain",
|
|
2131
|
+
"file": "packages/engine/modules/terrain/index.js",
|
|
2132
|
+
"label": "Terrain",
|
|
2133
|
+
"needs": [],
|
|
2134
|
+
"type": "world",
|
|
2135
|
+
"provides": [
|
|
2136
|
+
"terrain",
|
|
2137
|
+
"ground"
|
|
2138
|
+
],
|
|
2139
|
+
"requires": [],
|
|
2140
|
+
"handRolled": "none: a ground of its own is plain three.js, used on purpose",
|
|
2141
|
+
"stage": "ground",
|
|
2142
|
+
"before": [],
|
|
2143
|
+
"after": [],
|
|
2144
|
+
"optional": [
|
|
2145
|
+
"vegetation",
|
|
2146
|
+
"settings"
|
|
2147
|
+
],
|
|
2148
|
+
"params": {
|
|
2149
|
+
"viewChunks": {
|
|
2150
|
+
"type": "any",
|
|
2151
|
+
"optional": true,
|
|
2152
|
+
"default": 4,
|
|
2153
|
+
"docType": "number",
|
|
2154
|
+
"desc": "View distance (in chunks), default 4"
|
|
2155
|
+
},
|
|
2156
|
+
"density": {
|
|
2157
|
+
"type": "any",
|
|
2158
|
+
"optional": true,
|
|
2159
|
+
"default": 1,
|
|
2160
|
+
"docType": "number",
|
|
2161
|
+
"desc": "Vegetation density multiplier, default 1"
|
|
2162
|
+
},
|
|
2163
|
+
"material": {
|
|
2164
|
+
"type": "any",
|
|
2165
|
+
"optional": true,
|
|
2166
|
+
"docType": "Material | ((engine: Engine) => Material)",
|
|
2167
|
+
"desc": "Ground material (default neutral gray with vertex colors); chunks have position, normal, color and uv = world xz / chunk size. Cloud shadows, season tint and detail are added"
|
|
2168
|
+
},
|
|
2169
|
+
"effects": {
|
|
2170
|
+
"type": "any",
|
|
2171
|
+
"optional": true,
|
|
2172
|
+
"docType": "boolean",
|
|
2173
|
+
"desc": "With material: false = draw it exactly as given, no cloud shadow / season / detail patch"
|
|
2174
|
+
},
|
|
2175
|
+
"detail": {
|
|
2176
|
+
"type": "any",
|
|
2177
|
+
"optional": true,
|
|
2178
|
+
"docType": "MaterialDetail | null",
|
|
2179
|
+
"desc": "Detail layer over the ground: a noise, a texture asset name or your own glsl; defaults scale 0.25, strength 0.35, top-down world projection, multiply. Change it with engine.terrain.recolor({ detail })"
|
|
2180
|
+
},
|
|
2181
|
+
"variation": {
|
|
2182
|
+
"type": "any",
|
|
2183
|
+
"optional": true,
|
|
2184
|
+
"docType": "TerrainVariation",
|
|
2185
|
+
"desc": "Ground color noise, baked into the chunks"
|
|
2186
|
+
},
|
|
2187
|
+
"viewFog": {
|
|
2188
|
+
"type": "any",
|
|
2189
|
+
"optional": true,
|
|
2190
|
+
"default": false,
|
|
2191
|
+
"docType": "boolean",
|
|
2192
|
+
"desc": "true: the signal engine.uniforms.uViewDistance follows the view distance, so a game's fog can read it and fade the far chunk edge out (openWorld() sets true)"
|
|
2193
|
+
},
|
|
2194
|
+
"part": {
|
|
2195
|
+
"type": "any",
|
|
2196
|
+
"optional": true,
|
|
2197
|
+
"docType": "boolean",
|
|
2198
|
+
"desc": "true: do not take the ground slot; compositeGround({ parts: [{ of: 'terrain' }] }) does and reads terrain.ground (so a terrain and a level can both run)"
|
|
2199
|
+
},
|
|
2200
|
+
"seed": {
|
|
2201
|
+
"type": "any",
|
|
2202
|
+
"optional": true,
|
|
2203
|
+
"default": 1337
|
|
2204
|
+
},
|
|
2205
|
+
"chunkSize": {
|
|
2206
|
+
"type": "any",
|
|
2207
|
+
"optional": true,
|
|
2208
|
+
"default": 64
|
|
2209
|
+
},
|
|
2210
|
+
"resolution": {
|
|
2211
|
+
"type": "any",
|
|
2212
|
+
"optional": true,
|
|
2213
|
+
"default": 16
|
|
2214
|
+
},
|
|
2215
|
+
"waterLevel": {
|
|
2216
|
+
"type": "any",
|
|
2217
|
+
"optional": true,
|
|
2218
|
+
"default": null
|
|
2219
|
+
},
|
|
2220
|
+
"flatten": {
|
|
2221
|
+
"type": "any",
|
|
2222
|
+
"optional": true,
|
|
2223
|
+
"default": []
|
|
2224
|
+
},
|
|
2225
|
+
"heightmap": {
|
|
2226
|
+
"type": "any",
|
|
2227
|
+
"optional": true,
|
|
2228
|
+
"default": null
|
|
2229
|
+
},
|
|
2230
|
+
"height": {
|
|
2231
|
+
"type": "any",
|
|
2232
|
+
"optional": true,
|
|
2233
|
+
"default": null
|
|
2234
|
+
},
|
|
2235
|
+
"groundType": {
|
|
2236
|
+
"type": "any",
|
|
2237
|
+
"optional": true,
|
|
2238
|
+
"default": null
|
|
2239
|
+
},
|
|
2240
|
+
"params": {
|
|
2241
|
+
"type": "any",
|
|
2242
|
+
"optional": true,
|
|
2243
|
+
"default": null
|
|
2244
|
+
},
|
|
2245
|
+
"shading": {
|
|
2246
|
+
"type": "any",
|
|
2247
|
+
"optional": true,
|
|
2248
|
+
"default": "smooth"
|
|
2249
|
+
},
|
|
2250
|
+
"colorResolution": {
|
|
2251
|
+
"type": "any",
|
|
2252
|
+
"optional": true,
|
|
2253
|
+
"default": 128
|
|
2254
|
+
},
|
|
2255
|
+
"normals": {
|
|
2256
|
+
"type": "any",
|
|
2257
|
+
"optional": true,
|
|
2258
|
+
"default": null
|
|
2259
|
+
},
|
|
2260
|
+
"normalFn": {
|
|
2261
|
+
"type": "any",
|
|
2262
|
+
"optional": true,
|
|
2263
|
+
"default": null
|
|
2264
|
+
},
|
|
2265
|
+
"diagonal": {
|
|
2266
|
+
"type": "any",
|
|
2267
|
+
"optional": true,
|
|
2268
|
+
"default": "fixed"
|
|
2269
|
+
},
|
|
2270
|
+
"shape": {
|
|
2271
|
+
"type": "any",
|
|
2272
|
+
"optional": true,
|
|
2273
|
+
"default": null
|
|
2274
|
+
},
|
|
2275
|
+
"boundsPad": {
|
|
2276
|
+
"type": "any",
|
|
2277
|
+
"optional": true,
|
|
2278
|
+
"default": {
|
|
2279
|
+
"up": 3,
|
|
2280
|
+
"radius": 8
|
|
2281
|
+
}
|
|
2282
|
+
},
|
|
2283
|
+
"colors": {
|
|
2284
|
+
"type": "any",
|
|
2285
|
+
"optional": true,
|
|
2286
|
+
"default": {}
|
|
2287
|
+
},
|
|
2288
|
+
"biomeColors": {
|
|
2289
|
+
"type": "any",
|
|
2290
|
+
"optional": true,
|
|
2291
|
+
"default": {}
|
|
2292
|
+
},
|
|
2293
|
+
"steep": {
|
|
2294
|
+
"type": "any",
|
|
2295
|
+
"optional": true,
|
|
2296
|
+
"default": []
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
"page": true,
|
|
2300
|
+
"documented": true,
|
|
2301
|
+
"names": [
|
|
2302
|
+
"recolor",
|
|
2303
|
+
"view",
|
|
2304
|
+
"retry",
|
|
2305
|
+
"rebuild",
|
|
2306
|
+
"edit",
|
|
2307
|
+
"generator",
|
|
2308
|
+
"material",
|
|
2309
|
+
"patches",
|
|
2310
|
+
"uniforms",
|
|
2311
|
+
"chunkSize",
|
|
2312
|
+
"voidY",
|
|
2313
|
+
"chunks",
|
|
2314
|
+
"viewChunks",
|
|
2315
|
+
"density",
|
|
2316
|
+
"applyBudgetMs",
|
|
2317
|
+
"stats",
|
|
2318
|
+
"cellSize"
|
|
2319
|
+
],
|
|
2320
|
+
"sections": [],
|
|
2321
|
+
"saves": [],
|
|
2322
|
+
"time": {
|
|
2323
|
+
"kind": "none",
|
|
2324
|
+
"hooks": [
|
|
2325
|
+
"fixed",
|
|
2326
|
+
"frame"
|
|
2327
|
+
],
|
|
2328
|
+
"noSkip": "void-fall watch only; nothing accumulates over time"
|
|
2329
|
+
}
|
|
2330
|
+
},
|
|
2331
|
+
"terrainDraw": {
|
|
2332
|
+
"call": "terrain",
|
|
2333
|
+
"file": "packages/engine/modules/terrain/index.js",
|
|
2334
|
+
"label": "Terrain drawing",
|
|
2335
|
+
"needs": [],
|
|
2336
|
+
"type": "picture",
|
|
2337
|
+
"provides": [
|
|
2338
|
+
"terrain-draw"
|
|
2339
|
+
],
|
|
2340
|
+
"requires": [
|
|
2341
|
+
"terrain"
|
|
2342
|
+
],
|
|
2343
|
+
"handRolled": "none: a ground of its own is plain three.js, used on purpose",
|
|
2344
|
+
"stage": "effects",
|
|
2345
|
+
"before": [],
|
|
2346
|
+
"after": [],
|
|
2347
|
+
"optional": [],
|
|
2348
|
+
"params": {
|
|
2349
|
+
"viewChunks": {
|
|
2350
|
+
"type": "any",
|
|
2351
|
+
"optional": true,
|
|
2352
|
+
"default": 4
|
|
2353
|
+
},
|
|
2354
|
+
"density": {
|
|
2355
|
+
"type": "any",
|
|
2356
|
+
"optional": true,
|
|
2357
|
+
"default": 1
|
|
2358
|
+
},
|
|
2359
|
+
"material": {
|
|
2360
|
+
"type": "any",
|
|
2361
|
+
"optional": true
|
|
2362
|
+
},
|
|
2363
|
+
"effects": {
|
|
2364
|
+
"type": "any",
|
|
2365
|
+
"optional": true
|
|
2366
|
+
},
|
|
2367
|
+
"detail": {
|
|
2368
|
+
"type": "any",
|
|
2369
|
+
"optional": true
|
|
2370
|
+
},
|
|
2371
|
+
"variation": {
|
|
2372
|
+
"type": "any",
|
|
2373
|
+
"optional": true
|
|
2374
|
+
},
|
|
2375
|
+
"viewFog": {
|
|
2376
|
+
"type": "any",
|
|
2377
|
+
"optional": true,
|
|
2378
|
+
"default": false
|
|
2379
|
+
},
|
|
2380
|
+
"part": {
|
|
2381
|
+
"type": "any",
|
|
2382
|
+
"optional": true
|
|
2383
|
+
},
|
|
2384
|
+
"seed": {
|
|
2385
|
+
"type": "any",
|
|
2386
|
+
"optional": true,
|
|
2387
|
+
"default": 1337
|
|
2388
|
+
},
|
|
2389
|
+
"chunkSize": {
|
|
2390
|
+
"type": "any",
|
|
2391
|
+
"optional": true,
|
|
2392
|
+
"default": 64
|
|
2393
|
+
},
|
|
2394
|
+
"resolution": {
|
|
2395
|
+
"type": "any",
|
|
2396
|
+
"optional": true,
|
|
2397
|
+
"default": 16
|
|
2398
|
+
},
|
|
2399
|
+
"waterLevel": {
|
|
2400
|
+
"type": "any",
|
|
2401
|
+
"optional": true,
|
|
2402
|
+
"default": null
|
|
2403
|
+
},
|
|
2404
|
+
"flatten": {
|
|
2405
|
+
"type": "any",
|
|
2406
|
+
"optional": true,
|
|
2407
|
+
"default": []
|
|
2408
|
+
},
|
|
2409
|
+
"heightmap": {
|
|
2410
|
+
"type": "any",
|
|
2411
|
+
"optional": true,
|
|
2412
|
+
"default": null
|
|
2413
|
+
},
|
|
2414
|
+
"height": {
|
|
2415
|
+
"type": "any",
|
|
2416
|
+
"optional": true,
|
|
2417
|
+
"default": null
|
|
2418
|
+
},
|
|
2419
|
+
"groundType": {
|
|
2420
|
+
"type": "any",
|
|
2421
|
+
"optional": true,
|
|
2422
|
+
"default": null
|
|
2423
|
+
},
|
|
2424
|
+
"params": {
|
|
2425
|
+
"type": "any",
|
|
2426
|
+
"optional": true,
|
|
2427
|
+
"default": null
|
|
2428
|
+
},
|
|
2429
|
+
"shading": {
|
|
2430
|
+
"type": "any",
|
|
2431
|
+
"optional": true,
|
|
2432
|
+
"default": "smooth"
|
|
2433
|
+
},
|
|
2434
|
+
"colorResolution": {
|
|
2435
|
+
"type": "any",
|
|
2436
|
+
"optional": true,
|
|
2437
|
+
"default": 128
|
|
2438
|
+
},
|
|
2439
|
+
"normals": {
|
|
2440
|
+
"type": "any",
|
|
2441
|
+
"optional": true,
|
|
2442
|
+
"default": null
|
|
2443
|
+
},
|
|
2444
|
+
"normalFn": {
|
|
2445
|
+
"type": "any",
|
|
2446
|
+
"optional": true,
|
|
2447
|
+
"default": null
|
|
2448
|
+
},
|
|
2449
|
+
"diagonal": {
|
|
2450
|
+
"type": "any",
|
|
2451
|
+
"optional": true,
|
|
2452
|
+
"default": "fixed"
|
|
2453
|
+
},
|
|
2454
|
+
"shape": {
|
|
2455
|
+
"type": "any",
|
|
2456
|
+
"optional": true,
|
|
2457
|
+
"default": null
|
|
2458
|
+
},
|
|
2459
|
+
"boundsPad": {
|
|
2460
|
+
"type": "any",
|
|
2461
|
+
"optional": true,
|
|
2462
|
+
"default": {
|
|
2463
|
+
"up": 3,
|
|
2464
|
+
"radius": 8
|
|
2465
|
+
}
|
|
2466
|
+
},
|
|
2467
|
+
"colors": {
|
|
2468
|
+
"type": "any",
|
|
2469
|
+
"optional": true,
|
|
2470
|
+
"default": {}
|
|
2471
|
+
},
|
|
2472
|
+
"biomeColors": {
|
|
2473
|
+
"type": "any",
|
|
2474
|
+
"optional": true,
|
|
2475
|
+
"default": {}
|
|
2476
|
+
},
|
|
2477
|
+
"steep": {
|
|
2478
|
+
"type": "any",
|
|
2479
|
+
"optional": true,
|
|
2480
|
+
"default": []
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"page": true,
|
|
2484
|
+
"documented": false,
|
|
2485
|
+
"names": [
|
|
2486
|
+
"recolor",
|
|
2487
|
+
"material",
|
|
2488
|
+
"patches",
|
|
2489
|
+
"uniforms",
|
|
2490
|
+
"meshes"
|
|
2491
|
+
],
|
|
2492
|
+
"sections": [],
|
|
2493
|
+
"saves": [],
|
|
2494
|
+
"time": {
|
|
2495
|
+
"kind": "none",
|
|
2496
|
+
"hooks": []
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
"timeline": {
|
|
2500
|
+
"call": "timeline",
|
|
2501
|
+
"file": "packages/engine/modules/timeline/Timeline.js",
|
|
2502
|
+
"label": "Timeline",
|
|
2503
|
+
"needs": [],
|
|
2504
|
+
"type": "rules",
|
|
2505
|
+
"provides": [],
|
|
2506
|
+
"requires": [],
|
|
2507
|
+
"handRolled": [
|
|
2508
|
+
"tween"
|
|
2509
|
+
],
|
|
2510
|
+
"stage": "control",
|
|
2511
|
+
"before": [
|
|
2512
|
+
"cameraRig"
|
|
2513
|
+
],
|
|
2514
|
+
"after": [],
|
|
2515
|
+
"optional": [
|
|
2516
|
+
"dialogue"
|
|
2517
|
+
],
|
|
2518
|
+
"params": {},
|
|
2519
|
+
"page": true,
|
|
2520
|
+
"documented": true,
|
|
2521
|
+
"names": [
|
|
2522
|
+
"tween",
|
|
2523
|
+
"play",
|
|
2524
|
+
"skip",
|
|
2525
|
+
"skipAll",
|
|
2526
|
+
"playing"
|
|
2527
|
+
],
|
|
2528
|
+
"sections": [],
|
|
2529
|
+
"saves": [],
|
|
2530
|
+
"time": {
|
|
2531
|
+
"kind": "none",
|
|
2532
|
+
"hooks": [
|
|
2533
|
+
"frame",
|
|
2534
|
+
"afterLoad"
|
|
2535
|
+
]
|
|
2536
|
+
}
|
|
2537
|
+
},
|
|
2538
|
+
"triggers": {
|
|
2539
|
+
"call": "triggers",
|
|
2540
|
+
"file": "packages/engine/modules/triggers/index.js",
|
|
2541
|
+
"label": "Triggers",
|
|
2542
|
+
"needs": [],
|
|
2543
|
+
"type": "rules",
|
|
2544
|
+
"provides": [],
|
|
2545
|
+
"requires": [],
|
|
2546
|
+
"handRolled": "none: a zone check by hand is the same maths as any distance or box test",
|
|
2547
|
+
"stage": "gameplay",
|
|
2548
|
+
"before": [],
|
|
2549
|
+
"after": [
|
|
2550
|
+
"interactions"
|
|
2551
|
+
],
|
|
2552
|
+
"optional": [
|
|
2553
|
+
"level"
|
|
2554
|
+
],
|
|
2555
|
+
"params": {
|
|
2556
|
+
"action": {
|
|
2557
|
+
"type": "string",
|
|
2558
|
+
"optional": true,
|
|
2559
|
+
"default": "triggersDebug",
|
|
2560
|
+
"desc": "input action that toggles the debug view 'triggers' (engine.debug.view)"
|
|
2561
|
+
},
|
|
2562
|
+
"debugColor": {
|
|
2563
|
+
"type": "color",
|
|
2564
|
+
"optional": true,
|
|
2565
|
+
"default": 10132122,
|
|
2566
|
+
"desc": "line color of the debug view 'triggers'"
|
|
2567
|
+
},
|
|
2568
|
+
"debugOpacity": {
|
|
2569
|
+
"type": "number",
|
|
2570
|
+
"optional": true,
|
|
2571
|
+
"default": 0.8,
|
|
2572
|
+
"desc": "line opacity of the debug view 'triggers'"
|
|
2573
|
+
}
|
|
2574
|
+
},
|
|
2575
|
+
"page": true,
|
|
2576
|
+
"documented": true,
|
|
2577
|
+
"names": [
|
|
2578
|
+
"list",
|
|
2579
|
+
"add",
|
|
2580
|
+
"clear",
|
|
2581
|
+
"byTag",
|
|
2582
|
+
"fromMarkers"
|
|
2583
|
+
],
|
|
2584
|
+
"sections": [
|
|
2585
|
+
"triggers"
|
|
2586
|
+
],
|
|
2587
|
+
"saves": [
|
|
2588
|
+
"triggers"
|
|
2589
|
+
],
|
|
2590
|
+
"time": {
|
|
2591
|
+
"kind": "none",
|
|
2592
|
+
"hooks": [
|
|
2593
|
+
"fixed",
|
|
2594
|
+
"frame"
|
|
2595
|
+
],
|
|
2596
|
+
"noSkip": "zone enter/exit is re-evaluated on the next fixed step"
|
|
2597
|
+
}
|
|
2598
|
+
},
|
|
2599
|
+
"vegetation": {
|
|
2600
|
+
"call": "vegetation",
|
|
2601
|
+
"file": "packages/engine/modules/vegetation/index.js",
|
|
2602
|
+
"label": "Vegetation",
|
|
2603
|
+
"needs": [],
|
|
2604
|
+
"type": "world",
|
|
2605
|
+
"provides": [
|
|
2606
|
+
"vegetation"
|
|
2607
|
+
],
|
|
2608
|
+
"requires": [],
|
|
2609
|
+
"handRolled": "none: plants of its own are plain three.js, used on purpose",
|
|
2610
|
+
"stage": "ground",
|
|
2611
|
+
"before": [],
|
|
2612
|
+
"after": [
|
|
2613
|
+
"terrain",
|
|
2614
|
+
"level"
|
|
2615
|
+
],
|
|
2616
|
+
"optional": [
|
|
2617
|
+
"terrain",
|
|
2618
|
+
"level",
|
|
2619
|
+
"settings"
|
|
2620
|
+
],
|
|
2621
|
+
"params": {
|
|
2622
|
+
"chunkSize": {
|
|
2623
|
+
"type": "any",
|
|
2624
|
+
"optional": true,
|
|
2625
|
+
"default": 32,
|
|
2626
|
+
"docType": "number",
|
|
2627
|
+
"desc": "Chunk edge (meters), default 32"
|
|
2628
|
+
},
|
|
2629
|
+
"viewChunks": {
|
|
2630
|
+
"type": "any",
|
|
2631
|
+
"optional": true,
|
|
2632
|
+
"default": 3,
|
|
2633
|
+
"docType": "number",
|
|
2634
|
+
"desc": "Rings of chunks drawn around each stream source, default 3"
|
|
2635
|
+
},
|
|
2636
|
+
"density": {
|
|
2637
|
+
"type": "any",
|
|
2638
|
+
"optional": true,
|
|
2639
|
+
"default": 1,
|
|
2640
|
+
"docType": "number",
|
|
2641
|
+
"desc": "Placement attempts multiplier, default 1"
|
|
2642
|
+
},
|
|
2643
|
+
"area": {
|
|
2644
|
+
"type": "any",
|
|
2645
|
+
"optional": true,
|
|
2646
|
+
"docType": "{ min: number[]; max: number[] } | null",
|
|
2647
|
+
"desc": "Where it may grow: { min: [x, z], max: [x, z] }; default anywhere the ground is"
|
|
2648
|
+
},
|
|
2649
|
+
"seed": {
|
|
2650
|
+
"type": "any",
|
|
2651
|
+
"optional": true,
|
|
2652
|
+
"default": 1,
|
|
2653
|
+
"docType": "number",
|
|
2654
|
+
"desc": "Placement seed, default 1"
|
|
2655
|
+
}
|
|
2656
|
+
},
|
|
2657
|
+
"page": true,
|
|
2658
|
+
"documented": true,
|
|
2659
|
+
"names": [
|
|
2660
|
+
"sway",
|
|
2661
|
+
"color",
|
|
2662
|
+
"view",
|
|
2663
|
+
"rebuild",
|
|
2664
|
+
"setShadowRing",
|
|
2665
|
+
"define",
|
|
2666
|
+
"isRemoved",
|
|
2667
|
+
"removeInstance",
|
|
2668
|
+
"restoreInstance",
|
|
2669
|
+
"instanceAt",
|
|
2670
|
+
"material",
|
|
2671
|
+
"patches"
|
|
2672
|
+
],
|
|
2673
|
+
"sections": [
|
|
2674
|
+
"vegetation"
|
|
2675
|
+
],
|
|
2676
|
+
"saves": [
|
|
2677
|
+
"vegetation"
|
|
2678
|
+
],
|
|
2679
|
+
"time": {
|
|
2680
|
+
"kind": "approx",
|
|
2681
|
+
"hooks": [
|
|
2682
|
+
"fixed",
|
|
2683
|
+
"frame",
|
|
2684
|
+
"skip"
|
|
2685
|
+
]
|
|
2686
|
+
}
|
|
2687
|
+
},
|
|
2688
|
+
"vegetationDraw": {
|
|
2689
|
+
"call": "vegetation",
|
|
2690
|
+
"file": "packages/engine/modules/vegetation/index.js",
|
|
2691
|
+
"label": "Vegetation drawing",
|
|
2692
|
+
"needs": [],
|
|
2693
|
+
"type": "picture",
|
|
2694
|
+
"provides": [
|
|
2695
|
+
"vegetation-draw"
|
|
2696
|
+
],
|
|
2697
|
+
"requires": [
|
|
2698
|
+
"vegetation"
|
|
2699
|
+
],
|
|
2700
|
+
"handRolled": "none: plants of its own are plain three.js, used on purpose",
|
|
2701
|
+
"stage": "effects",
|
|
2702
|
+
"before": [],
|
|
2703
|
+
"after": [],
|
|
2704
|
+
"optional": [],
|
|
2705
|
+
"params": {
|
|
2706
|
+
"chunkSize": {
|
|
2707
|
+
"type": "any",
|
|
2708
|
+
"optional": true,
|
|
2709
|
+
"default": 32
|
|
2710
|
+
},
|
|
2711
|
+
"viewChunks": {
|
|
2712
|
+
"type": "any",
|
|
2713
|
+
"optional": true,
|
|
2714
|
+
"default": 3
|
|
2715
|
+
},
|
|
2716
|
+
"density": {
|
|
2717
|
+
"type": "any",
|
|
2718
|
+
"optional": true,
|
|
2719
|
+
"default": 1
|
|
2720
|
+
},
|
|
2721
|
+
"area": {
|
|
2722
|
+
"type": "any",
|
|
2723
|
+
"optional": true
|
|
2724
|
+
},
|
|
2725
|
+
"seed": {
|
|
2726
|
+
"type": "any",
|
|
2727
|
+
"optional": true,
|
|
2728
|
+
"default": 1
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
"page": true,
|
|
2732
|
+
"documented": false,
|
|
2733
|
+
"names": [
|
|
2734
|
+
"mesh",
|
|
2735
|
+
"kind",
|
|
2736
|
+
"meshes"
|
|
2737
|
+
],
|
|
2738
|
+
"sections": [],
|
|
2739
|
+
"saves": [
|
|
2740
|
+
"vegetation"
|
|
2741
|
+
],
|
|
2742
|
+
"time": {
|
|
2743
|
+
"kind": "none",
|
|
2744
|
+
"hooks": [
|
|
2745
|
+
"frame"
|
|
2746
|
+
]
|
|
2747
|
+
}
|
|
2748
|
+
},
|
|
2749
|
+
"water": {
|
|
2750
|
+
"call": "water",
|
|
2751
|
+
"file": "packages/engine/modules/water/Water.js",
|
|
2752
|
+
"label": "Water",
|
|
2753
|
+
"needs": [],
|
|
2754
|
+
"type": "picture",
|
|
2755
|
+
"provides": [],
|
|
2756
|
+
"requires": [],
|
|
2757
|
+
"handRolled": "none: water of its own is plain three.js, used on purpose",
|
|
2758
|
+
"stage": "environment",
|
|
2759
|
+
"before": [],
|
|
2760
|
+
"after": [],
|
|
2761
|
+
"optional": [
|
|
2762
|
+
"sky"
|
|
2763
|
+
],
|
|
2764
|
+
"params": {
|
|
2765
|
+
"sea": {
|
|
2766
|
+
"type": "any",
|
|
2767
|
+
"optional": true,
|
|
2768
|
+
"docType": "boolean",
|
|
2769
|
+
"desc": "false: do not draw the global water surface (sea)"
|
|
2770
|
+
},
|
|
2771
|
+
"level": {
|
|
2772
|
+
"type": "any",
|
|
2773
|
+
"optional": true,
|
|
2774
|
+
"docType": "number",
|
|
2775
|
+
"desc": "Global water level (meters); if omitted, the terrain's water level is used"
|
|
2776
|
+
},
|
|
2777
|
+
"flat": {
|
|
2778
|
+
"type": "any",
|
|
2779
|
+
"optional": true,
|
|
2780
|
+
"docType": "boolean",
|
|
2781
|
+
"desc": "Flat shading (low poly), default true"
|
|
2782
|
+
},
|
|
2783
|
+
"size": {
|
|
2784
|
+
"type": "any",
|
|
2785
|
+
"optional": true,
|
|
2786
|
+
"docType": "number",
|
|
2787
|
+
"desc": "Edge length of the global water plane (meters), default 900"
|
|
2788
|
+
},
|
|
2789
|
+
"segments": {
|
|
2790
|
+
"type": "any",
|
|
2791
|
+
"optional": true,
|
|
2792
|
+
"docType": "number",
|
|
2793
|
+
"desc": "Mesh subdivision of the global water, default 150"
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
"page": true,
|
|
2797
|
+
"documented": true,
|
|
2798
|
+
"names": [
|
|
2799
|
+
"shader",
|
|
2800
|
+
"normalMap",
|
|
2801
|
+
"normalTexture",
|
|
2802
|
+
"patches",
|
|
2803
|
+
"uniforms",
|
|
2804
|
+
"bodies",
|
|
2805
|
+
"sea",
|
|
2806
|
+
"material"
|
|
2807
|
+
],
|
|
2808
|
+
"sections": [],
|
|
2809
|
+
"saves": [],
|
|
2810
|
+
"time": {
|
|
2811
|
+
"kind": "none",
|
|
2812
|
+
"hooks": [
|
|
2813
|
+
"frame"
|
|
2814
|
+
]
|
|
2815
|
+
}
|
|
2816
|
+
},
|
|
2817
|
+
"weather": {
|
|
2818
|
+
"call": "weather",
|
|
2819
|
+
"file": "packages/engine/modules/weather/Weather.js",
|
|
2820
|
+
"label": "Weather",
|
|
2821
|
+
"needs": [],
|
|
2822
|
+
"type": "world",
|
|
2823
|
+
"provides": [
|
|
2824
|
+
"weather"
|
|
2825
|
+
],
|
|
2826
|
+
"requires": [],
|
|
2827
|
+
"handRolled": "none: weather by hand is plain values with no one shape",
|
|
2828
|
+
"stage": "environment",
|
|
2829
|
+
"before": [
|
|
2830
|
+
"sky"
|
|
2831
|
+
],
|
|
2832
|
+
"after": [],
|
|
2833
|
+
"optional": [],
|
|
2834
|
+
"params": {
|
|
2835
|
+
"start": {
|
|
2836
|
+
"type": "any",
|
|
2837
|
+
"optional": true,
|
|
2838
|
+
"docType": "WeatherName",
|
|
2839
|
+
"desc": "Starting weather, default 'clear' (or the first of the game's types when it has no 'clear')"
|
|
2840
|
+
},
|
|
2841
|
+
"auto": {
|
|
2842
|
+
"type": "any",
|
|
2843
|
+
"optional": true,
|
|
2844
|
+
"docType": "boolean",
|
|
2845
|
+
"desc": "Automatic weather changes"
|
|
2846
|
+
},
|
|
2847
|
+
"particles": {
|
|
2848
|
+
"type": "any",
|
|
2849
|
+
"optional": true,
|
|
2850
|
+
"docType": "number",
|
|
2851
|
+
"desc": "Rain / snow particle count, default 6000"
|
|
2852
|
+
},
|
|
2853
|
+
"types": {
|
|
2854
|
+
"type": "any",
|
|
2855
|
+
"optional": true,
|
|
2856
|
+
"docType": "Record<string, Partial<WeatherPreset> & Record<string, numb…",
|
|
2857
|
+
"desc": "The game's weather table, the whole list (default only a calm 'clear'; seven temperate ones in presets.weather.temperate.types, extend them with { ...presets.weather.temperate.types, dust: {...} }). Left-out fields are calm; extra numeric fields of the game's own blend too and show in weather.current"
|
|
2858
|
+
},
|
|
2859
|
+
"autoPool": {
|
|
2860
|
+
"type": "any",
|
|
2861
|
+
"optional": true,
|
|
2862
|
+
"docType": "string[]",
|
|
2863
|
+
"desc": "Candidates for automatic changes (repeat an entry for higher probability)"
|
|
2864
|
+
},
|
|
2865
|
+
"autoInterval": {
|
|
2866
|
+
"type": "any",
|
|
2867
|
+
"optional": true,
|
|
2868
|
+
"docType": "number[]",
|
|
2869
|
+
"desc": "Interval between automatic changes [shortest, longest] seconds"
|
|
2870
|
+
},
|
|
2871
|
+
"transition": {
|
|
2872
|
+
"type": "any",
|
|
2873
|
+
"optional": true,
|
|
2874
|
+
"docType": "number",
|
|
2875
|
+
"desc": "Transition seconds of automatic changes, default 25"
|
|
2876
|
+
},
|
|
2877
|
+
"area": {
|
|
2878
|
+
"type": "any",
|
|
2879
|
+
"optional": true,
|
|
2880
|
+
"docType": "number",
|
|
2881
|
+
"desc": "Rain / snow coverage (meters)"
|
|
2882
|
+
},
|
|
2883
|
+
"lightningFirst": {
|
|
2884
|
+
"type": "any",
|
|
2885
|
+
"optional": true,
|
|
2886
|
+
"docType": "number",
|
|
2887
|
+
"desc": "Seconds to the first bolt once a type with lightning > 0.5 holds, default 5"
|
|
2888
|
+
},
|
|
2889
|
+
"lightningInterval": {
|
|
2890
|
+
"type": "any",
|
|
2891
|
+
"optional": true,
|
|
2892
|
+
"docType": "number[]",
|
|
2893
|
+
"desc": "Seconds between later bolts [shortest, longest], default [6, 20]"
|
|
2894
|
+
},
|
|
2895
|
+
"lightning": {
|
|
2896
|
+
"type": "any",
|
|
2897
|
+
"optional": true,
|
|
2898
|
+
"docType": "(flash: number, engine: Engine) => number",
|
|
2899
|
+
"desc": "Strike picture: flash (1 at the strike, fading in a third of a second) -> sky flash amount; default flickers. Return 0 and draw your own bolt on the weather:lightning event for a whole replacement. Example: `lightning: f => f * f * 0.8`"
|
|
2900
|
+
},
|
|
2901
|
+
"lightningBrightness": {
|
|
2902
|
+
"type": "any",
|
|
2903
|
+
"optional": true,
|
|
2904
|
+
"docType": "number",
|
|
2905
|
+
"desc": "Multiplies the sky flash of every strike, default 1"
|
|
2906
|
+
},
|
|
2907
|
+
"overcastColor": {
|
|
2908
|
+
"type": "any",
|
|
2909
|
+
"optional": true,
|
|
2910
|
+
"docType": "ColorLike",
|
|
2911
|
+
"desc": "Color the sky turns as a weather type raises grey, default 0x8c8c8c"
|
|
2912
|
+
},
|
|
2913
|
+
"rain": {
|
|
2914
|
+
"type": "any",
|
|
2915
|
+
"optional": true,
|
|
2916
|
+
"docType": "WeatherParticles",
|
|
2917
|
+
"desc": "Rain particles (default streaks: color 0xc8c8c8, opacity 0.55, length 0.7 m, speed 22 m/s, slant 1); a texture or a sprite shape draws drops"
|
|
2918
|
+
},
|
|
2919
|
+
"snow": {
|
|
2920
|
+
"type": "any",
|
|
2921
|
+
"optional": true,
|
|
2922
|
+
"docType": "WeatherParticles & { cover?: SnowCover }",
|
|
2923
|
+
"desc": "Snow particles (default round sprites: color 0xffffff, opacity 0.9, size 20, maxSize 5 px, speed 1.6 m/s, sway 1.5 m), plus the cover it leaves"
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
"page": true,
|
|
2927
|
+
"documented": true,
|
|
2928
|
+
"names": [
|
|
2929
|
+
"defineField",
|
|
2930
|
+
"set",
|
|
2931
|
+
"label",
|
|
2932
|
+
"types",
|
|
2933
|
+
"current",
|
|
2934
|
+
"name",
|
|
2935
|
+
"autoPool",
|
|
2936
|
+
"autoInterval",
|
|
2937
|
+
"autoTransition",
|
|
2938
|
+
"lightningFirst",
|
|
2939
|
+
"lightningInterval",
|
|
2940
|
+
"lightning",
|
|
2941
|
+
"lightningBrightness",
|
|
2942
|
+
"overcastColor",
|
|
2943
|
+
"particles",
|
|
2944
|
+
"auto"
|
|
2945
|
+
],
|
|
2946
|
+
"sections": [],
|
|
2947
|
+
"saves": [
|
|
2948
|
+
"weather",
|
|
2949
|
+
"time"
|
|
2950
|
+
],
|
|
2951
|
+
"time": {
|
|
2952
|
+
"kind": "step",
|
|
2953
|
+
"hooks": [
|
|
2954
|
+
"fixed",
|
|
2955
|
+
"frame",
|
|
2956
|
+
"skip"
|
|
2957
|
+
]
|
|
2958
|
+
}
|
|
2959
|
+
},
|
|
2960
|
+
"weatherDraw": {
|
|
2961
|
+
"call": "weather",
|
|
2962
|
+
"file": "packages/engine/modules/weather/Weather.js",
|
|
2963
|
+
"label": "Weather drawing",
|
|
2964
|
+
"needs": [],
|
|
2965
|
+
"type": "picture",
|
|
2966
|
+
"provides": [
|
|
2967
|
+
"weatherDraw"
|
|
2968
|
+
],
|
|
2969
|
+
"requires": [
|
|
2970
|
+
"weather"
|
|
2971
|
+
],
|
|
2972
|
+
"handRolled": "none: weather by hand is plain values with no one shape",
|
|
2973
|
+
"stage": "environment",
|
|
2974
|
+
"before": [
|
|
2975
|
+
"sky"
|
|
2976
|
+
],
|
|
2977
|
+
"after": [
|
|
2978
|
+
"weather"
|
|
2979
|
+
],
|
|
2980
|
+
"optional": [
|
|
2981
|
+
"sky"
|
|
2982
|
+
],
|
|
2983
|
+
"params": {
|
|
2984
|
+
"particles": {
|
|
2985
|
+
"type": "any",
|
|
2986
|
+
"optional": true
|
|
2987
|
+
},
|
|
2988
|
+
"area": {
|
|
2989
|
+
"type": "any",
|
|
2990
|
+
"optional": true
|
|
2991
|
+
},
|
|
2992
|
+
"rain": {
|
|
2993
|
+
"type": "any",
|
|
2994
|
+
"optional": true
|
|
2995
|
+
},
|
|
2996
|
+
"snow": {
|
|
2997
|
+
"type": "any",
|
|
2998
|
+
"optional": true
|
|
2999
|
+
}
|
|
3000
|
+
},
|
|
3001
|
+
"page": true,
|
|
3002
|
+
"documented": false,
|
|
3003
|
+
"names": [
|
|
3004
|
+
"flash",
|
|
3005
|
+
"particles",
|
|
3006
|
+
"systems"
|
|
3007
|
+
],
|
|
3008
|
+
"sections": [],
|
|
3009
|
+
"saves": [
|
|
3010
|
+
"weather",
|
|
3011
|
+
"time"
|
|
3012
|
+
],
|
|
3013
|
+
"time": {
|
|
3014
|
+
"kind": "none",
|
|
3015
|
+
"hooks": [
|
|
3016
|
+
"frame"
|
|
3017
|
+
]
|
|
3018
|
+
}
|
|
3019
|
+
},
|
|
3020
|
+
"world": {
|
|
3021
|
+
"call": "world",
|
|
3022
|
+
"file": "packages/engine/modules/world/index.js",
|
|
3023
|
+
"label": "World data",
|
|
3024
|
+
"needs": [],
|
|
3025
|
+
"type": "world",
|
|
3026
|
+
"provides": [
|
|
3027
|
+
"world"
|
|
3028
|
+
],
|
|
3029
|
+
"requires": [],
|
|
3030
|
+
"handRolled": "none: far records by hand are ordinary objects in ordinary lists",
|
|
3031
|
+
"stage": "ground",
|
|
3032
|
+
"before": [],
|
|
3033
|
+
"after": [],
|
|
3034
|
+
"optional": [],
|
|
3035
|
+
"params": {
|
|
3036
|
+
"cellSize": {
|
|
3037
|
+
"type": "any",
|
|
3038
|
+
"optional": true
|
|
3039
|
+
},
|
|
3040
|
+
"radius": {
|
|
3041
|
+
"type": "any",
|
|
3042
|
+
"optional": true
|
|
3043
|
+
},
|
|
3044
|
+
"farEvery": {
|
|
3045
|
+
"type": "any",
|
|
3046
|
+
"optional": true
|
|
3047
|
+
},
|
|
3048
|
+
"farMaxPerTick": {
|
|
3049
|
+
"type": "any",
|
|
3050
|
+
"optional": true
|
|
3051
|
+
},
|
|
3052
|
+
"buildPerFrame": {
|
|
3053
|
+
"type": "any",
|
|
3054
|
+
"optional": true
|
|
3055
|
+
}
|
|
3056
|
+
},
|
|
3057
|
+
"page": true,
|
|
3058
|
+
"documented": false,
|
|
3059
|
+
"names": [
|
|
3060
|
+
"add",
|
|
3061
|
+
"origin",
|
|
3062
|
+
"idOf",
|
|
3063
|
+
"get",
|
|
3064
|
+
"set",
|
|
3065
|
+
"move",
|
|
3066
|
+
"remove",
|
|
3067
|
+
"query",
|
|
3068
|
+
"forEachNear",
|
|
3069
|
+
"present",
|
|
3070
|
+
"view",
|
|
3071
|
+
"refresh",
|
|
3072
|
+
"simulate",
|
|
3073
|
+
"pauseSimulation",
|
|
3074
|
+
"records",
|
|
3075
|
+
"radius",
|
|
3076
|
+
"farEvery",
|
|
3077
|
+
"farMaxPerTick",
|
|
3078
|
+
"buildPerFrame",
|
|
3079
|
+
"anchor",
|
|
3080
|
+
"zone",
|
|
3081
|
+
"ready",
|
|
3082
|
+
"whenReady",
|
|
3083
|
+
"steps"
|
|
3084
|
+
],
|
|
3085
|
+
"sections": [],
|
|
3086
|
+
"saves": [
|
|
3087
|
+
"world"
|
|
3088
|
+
],
|
|
3089
|
+
"time": {
|
|
3090
|
+
"kind": "approx",
|
|
3091
|
+
"hooks": [
|
|
3092
|
+
"fixed",
|
|
3093
|
+
"frame",
|
|
3094
|
+
"skip",
|
|
3095
|
+
"afterLoad"
|
|
3096
|
+
]
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
},
|
|
3100
|
+
"members": {
|
|
3101
|
+
"collider3d": {
|
|
3102
|
+
"module": "rigid",
|
|
3103
|
+
"by": "install"
|
|
3104
|
+
},
|
|
3105
|
+
"npcs": {
|
|
3106
|
+
"module": "characters",
|
|
3107
|
+
"by": "install"
|
|
3108
|
+
},
|
|
3109
|
+
"player": {
|
|
3110
|
+
"module": "characters",
|
|
3111
|
+
"by": "createPlayer"
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
"sections": {
|
|
3115
|
+
"actions": {
|
|
3116
|
+
"owner": "content"
|
|
3117
|
+
},
|
|
3118
|
+
"audio": {
|
|
3119
|
+
"owner": "content"
|
|
3120
|
+
},
|
|
3121
|
+
"containers": {
|
|
3122
|
+
"owner": "inventory"
|
|
3123
|
+
},
|
|
3124
|
+
"dialogues": {
|
|
3125
|
+
"owner": "dialogue"
|
|
3126
|
+
},
|
|
3127
|
+
"grids": {
|
|
3128
|
+
"owner": "grids"
|
|
3129
|
+
},
|
|
3130
|
+
"items": {
|
|
3131
|
+
"owner": "inventory"
|
|
3132
|
+
},
|
|
3133
|
+
"level": {
|
|
3134
|
+
"owner": "level"
|
|
3135
|
+
},
|
|
3136
|
+
"npcs": {
|
|
3137
|
+
"owner": "characters"
|
|
3138
|
+
},
|
|
3139
|
+
"pickups": {
|
|
3140
|
+
"owner": "pickups",
|
|
3141
|
+
"live": true
|
|
3142
|
+
},
|
|
3143
|
+
"places": {
|
|
3144
|
+
"owner": "content"
|
|
3145
|
+
},
|
|
3146
|
+
"props": {
|
|
3147
|
+
"owner": "content",
|
|
3148
|
+
"live": true
|
|
3149
|
+
},
|
|
3150
|
+
"quests": {
|
|
3151
|
+
"owner": "quests"
|
|
3152
|
+
},
|
|
3153
|
+
"renames": {
|
|
3154
|
+
"owner": "content"
|
|
3155
|
+
},
|
|
3156
|
+
"rules": {
|
|
3157
|
+
"owner": "content"
|
|
3158
|
+
},
|
|
3159
|
+
"startItems": {
|
|
3160
|
+
"owner": "inventory"
|
|
3161
|
+
},
|
|
3162
|
+
"templates": {
|
|
3163
|
+
"owner": "content"
|
|
3164
|
+
},
|
|
3165
|
+
"triggers": {
|
|
3166
|
+
"owner": "triggers"
|
|
3167
|
+
},
|
|
3168
|
+
"vegetation": {
|
|
3169
|
+
"owner": "vegetation"
|
|
3170
|
+
},
|
|
3171
|
+
"views": {
|
|
3172
|
+
"owner": "content"
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
"contracts": {
|
|
3176
|
+
"calendar": {
|
|
3177
|
+
"file": "packages/engine/modules/calendar/contract.js",
|
|
3178
|
+
"api": [
|
|
3179
|
+
"at",
|
|
3180
|
+
"between",
|
|
3181
|
+
"daily",
|
|
3182
|
+
"onSeason",
|
|
3183
|
+
"untilMark"
|
|
3184
|
+
],
|
|
3185
|
+
"internal": [],
|
|
3186
|
+
"fields": [
|
|
3187
|
+
"timeOfDay",
|
|
3188
|
+
"day",
|
|
3189
|
+
"dayLength",
|
|
3190
|
+
"hoursPerDay",
|
|
3191
|
+
"clock",
|
|
3192
|
+
"seasons",
|
|
3193
|
+
"season",
|
|
3194
|
+
"seasonIndex",
|
|
3195
|
+
"seasonProgress",
|
|
3196
|
+
"totalDays",
|
|
3197
|
+
"isDay",
|
|
3198
|
+
"daylight"
|
|
3199
|
+
]
|
|
3200
|
+
},
|
|
3201
|
+
"cameraRig": {
|
|
3202
|
+
"file": "packages/engine/modules/camera/contract.js",
|
|
3203
|
+
"api": [
|
|
3204
|
+
"forward",
|
|
3205
|
+
"right",
|
|
3206
|
+
"follow",
|
|
3207
|
+
"focusPoint",
|
|
3208
|
+
"screenToGround"
|
|
3209
|
+
],
|
|
3210
|
+
"internal": [],
|
|
3211
|
+
"fields": [
|
|
3212
|
+
"target"
|
|
3213
|
+
]
|
|
3214
|
+
},
|
|
3215
|
+
"character": {
|
|
3216
|
+
"file": "packages/engine/modules/characters/character.contract.js",
|
|
3217
|
+
"kind": "object",
|
|
3218
|
+
"api": [
|
|
3219
|
+
"move",
|
|
3220
|
+
"placeAt",
|
|
3221
|
+
"enter",
|
|
3222
|
+
"exit",
|
|
3223
|
+
"walkTo",
|
|
3224
|
+
"placeRecord",
|
|
3225
|
+
"takePose",
|
|
3226
|
+
"poseProblem",
|
|
3227
|
+
"seatProblem",
|
|
3228
|
+
"backInSeat",
|
|
3229
|
+
"syncRecord"
|
|
3230
|
+
],
|
|
3231
|
+
"internal": [
|
|
3232
|
+
"backInSeat",
|
|
3233
|
+
"poseProblem",
|
|
3234
|
+
"seatProblem",
|
|
3235
|
+
"takePose"
|
|
3236
|
+
],
|
|
3237
|
+
"fields": [
|
|
3238
|
+
"id",
|
|
3239
|
+
"root",
|
|
3240
|
+
"position",
|
|
3241
|
+
"state",
|
|
3242
|
+
"anim",
|
|
3243
|
+
"channel",
|
|
3244
|
+
"vehicle",
|
|
3245
|
+
"seat",
|
|
3246
|
+
"facing",
|
|
3247
|
+
"disposed",
|
|
3248
|
+
"cameraFollow",
|
|
3249
|
+
"limp",
|
|
3250
|
+
"bodyHeld",
|
|
3251
|
+
"velocity",
|
|
3252
|
+
"vy",
|
|
3253
|
+
"moveAmount",
|
|
3254
|
+
"stateMark",
|
|
3255
|
+
"mover"
|
|
3256
|
+
]
|
|
3257
|
+
},
|
|
3258
|
+
"characters": {
|
|
3259
|
+
"file": "packages/engine/modules/characters/contract.js",
|
|
3260
|
+
"api": [
|
|
3261
|
+
"createPlayer",
|
|
3262
|
+
"removePlayer",
|
|
3263
|
+
"findSpawn",
|
|
3264
|
+
"findPath",
|
|
3265
|
+
"findPathAsync",
|
|
3266
|
+
"support",
|
|
3267
|
+
"moveInput",
|
|
3268
|
+
"carryRiders",
|
|
3269
|
+
"addVehicle"
|
|
3270
|
+
],
|
|
3271
|
+
"internal": [
|
|
3272
|
+
"carryRiders"
|
|
3273
|
+
],
|
|
3274
|
+
"fields": [
|
|
3275
|
+
"kit"
|
|
3276
|
+
]
|
|
3277
|
+
},
|
|
3278
|
+
"collider3d": {
|
|
3279
|
+
"file": "packages/engine/modules/rigid/collider3d.contract.js",
|
|
3280
|
+
"kind": "object",
|
|
3281
|
+
"api": [
|
|
3282
|
+
"addSolid",
|
|
3283
|
+
"overlap",
|
|
3284
|
+
"sweep"
|
|
3285
|
+
],
|
|
3286
|
+
"internal": [],
|
|
3287
|
+
"fields": []
|
|
3288
|
+
},
|
|
3289
|
+
"collision": {
|
|
3290
|
+
"file": "packages/engine/modules/collision/contract.js",
|
|
3291
|
+
"api": [
|
|
3292
|
+
"addBox",
|
|
3293
|
+
"addCircle",
|
|
3294
|
+
"walkableAt",
|
|
3295
|
+
"blockedAt",
|
|
3296
|
+
"groundWalkable",
|
|
3297
|
+
"resolve",
|
|
3298
|
+
"cameraDistance",
|
|
3299
|
+
"forEachStatic",
|
|
3300
|
+
"mirror"
|
|
3301
|
+
],
|
|
3302
|
+
"internal": [
|
|
3303
|
+
"cameraDistance",
|
|
3304
|
+
"groundWalkable",
|
|
3305
|
+
"resolve"
|
|
3306
|
+
],
|
|
3307
|
+
"fields": [
|
|
3308
|
+
"version",
|
|
3309
|
+
"blockedVersion",
|
|
3310
|
+
"maxClimb",
|
|
3311
|
+
"grid"
|
|
3312
|
+
]
|
|
3313
|
+
},
|
|
3314
|
+
"dialogue": {
|
|
3315
|
+
"file": "packages/engine/modules/gameplay/dialogue.contract.js",
|
|
3316
|
+
"api": [
|
|
3317
|
+
"define",
|
|
3318
|
+
"start",
|
|
3319
|
+
"say",
|
|
3320
|
+
"end"
|
|
3321
|
+
],
|
|
3322
|
+
"internal": [],
|
|
3323
|
+
"fields": [
|
|
3324
|
+
"active",
|
|
3325
|
+
"state"
|
|
3326
|
+
]
|
|
3327
|
+
},
|
|
3328
|
+
"flow": {
|
|
3329
|
+
"file": "packages/engine/modules/flow/contract.js",
|
|
3330
|
+
"api": [
|
|
3331
|
+
"define",
|
|
3332
|
+
"go",
|
|
3333
|
+
"transition"
|
|
3334
|
+
],
|
|
3335
|
+
"internal": [],
|
|
3336
|
+
"fields": [
|
|
3337
|
+
"state"
|
|
3338
|
+
]
|
|
3339
|
+
},
|
|
3340
|
+
"ground": {
|
|
3341
|
+
"file": "packages/engine/core/scene/ground.contract.js",
|
|
3342
|
+
"kind": "object",
|
|
3343
|
+
"api": [
|
|
3344
|
+
"height",
|
|
3345
|
+
"slope",
|
|
3346
|
+
"type"
|
|
3347
|
+
],
|
|
3348
|
+
"internal": [],
|
|
3349
|
+
"fields": [
|
|
3350
|
+
"waterLevel"
|
|
3351
|
+
]
|
|
3352
|
+
},
|
|
3353
|
+
"interactions": {
|
|
3354
|
+
"file": "packages/engine/modules/gameplay/interactions.contract.js",
|
|
3355
|
+
"api": [
|
|
3356
|
+
"add",
|
|
3357
|
+
"get",
|
|
3358
|
+
"pick"
|
|
3359
|
+
],
|
|
3360
|
+
"internal": [
|
|
3361
|
+
"pick"
|
|
3362
|
+
],
|
|
3363
|
+
"fields": []
|
|
3364
|
+
},
|
|
3365
|
+
"inventory": {
|
|
3366
|
+
"file": "packages/engine/modules/gameplay/inventory.contract.js",
|
|
3367
|
+
"api": [
|
|
3368
|
+
"define",
|
|
3369
|
+
"item",
|
|
3370
|
+
"add",
|
|
3371
|
+
"remove",
|
|
3372
|
+
"count",
|
|
3373
|
+
"has",
|
|
3374
|
+
"list",
|
|
3375
|
+
"get",
|
|
3376
|
+
"container",
|
|
3377
|
+
"of",
|
|
3378
|
+
"transfer",
|
|
3379
|
+
"trade",
|
|
3380
|
+
"contents",
|
|
3381
|
+
"setContents",
|
|
3382
|
+
"renameIds"
|
|
3383
|
+
],
|
|
3384
|
+
"internal": [
|
|
3385
|
+
"renameIds"
|
|
3386
|
+
],
|
|
3387
|
+
"fields": []
|
|
3388
|
+
},
|
|
3389
|
+
"level": {
|
|
3390
|
+
"file": "packages/engine/modules/level/contract.js",
|
|
3391
|
+
"api": [
|
|
3392
|
+
"marker",
|
|
3393
|
+
"track",
|
|
3394
|
+
"load"
|
|
3395
|
+
],
|
|
3396
|
+
"internal": [],
|
|
3397
|
+
"fields": [
|
|
3398
|
+
"root",
|
|
3399
|
+
"markers",
|
|
3400
|
+
"ready",
|
|
3401
|
+
"heightfield"
|
|
3402
|
+
]
|
|
3403
|
+
},
|
|
3404
|
+
"mover": {
|
|
3405
|
+
"file": "packages/engine/modules/characters/mover.contract.js",
|
|
3406
|
+
"kind": "object",
|
|
3407
|
+
"api": [
|
|
3408
|
+
"move"
|
|
3409
|
+
],
|
|
3410
|
+
"internal": [],
|
|
3411
|
+
"fields": [
|
|
3412
|
+
"name"
|
|
3413
|
+
]
|
|
3414
|
+
},
|
|
3415
|
+
"nav": {
|
|
3416
|
+
"file": "packages/engine/modules/nav/contract.js",
|
|
3417
|
+
"api": [
|
|
3418
|
+
"findPath",
|
|
3419
|
+
"point",
|
|
3420
|
+
"reach",
|
|
3421
|
+
"mesh",
|
|
3422
|
+
"exportMesh"
|
|
3423
|
+
],
|
|
3424
|
+
"internal": [
|
|
3425
|
+
"exportMesh",
|
|
3426
|
+
"mesh",
|
|
3427
|
+
"point",
|
|
3428
|
+
"reach"
|
|
3429
|
+
],
|
|
3430
|
+
"fields": [
|
|
3431
|
+
"ready",
|
|
3432
|
+
"crowd",
|
|
3433
|
+
"query",
|
|
3434
|
+
"navMesh",
|
|
3435
|
+
"links",
|
|
3436
|
+
"meshes",
|
|
3437
|
+
"version",
|
|
3438
|
+
"revision"
|
|
3439
|
+
]
|
|
3440
|
+
},
|
|
3441
|
+
"particles": {
|
|
3442
|
+
"file": "packages/engine/modules/particles/contract.js",
|
|
3443
|
+
"api": [
|
|
3444
|
+
"define",
|
|
3445
|
+
"emit",
|
|
3446
|
+
"attach",
|
|
3447
|
+
"count"
|
|
3448
|
+
],
|
|
3449
|
+
"internal": [],
|
|
3450
|
+
"fields": []
|
|
3451
|
+
},
|
|
3452
|
+
"quests": {
|
|
3453
|
+
"file": "packages/engine/modules/gameplay/quests.contract.js",
|
|
3454
|
+
"api": [
|
|
3455
|
+
"define",
|
|
3456
|
+
"start",
|
|
3457
|
+
"advance",
|
|
3458
|
+
"state",
|
|
3459
|
+
"list"
|
|
3460
|
+
],
|
|
3461
|
+
"internal": [],
|
|
3462
|
+
"fields": []
|
|
3463
|
+
},
|
|
3464
|
+
"vehicle": {
|
|
3465
|
+
"file": "packages/engine/modules/characters/vehicle.contract.js",
|
|
3466
|
+
"kind": "object",
|
|
3467
|
+
"api": [
|
|
3468
|
+
"seatPosition",
|
|
3469
|
+
"exitPosition",
|
|
3470
|
+
"drive"
|
|
3471
|
+
],
|
|
3472
|
+
"internal": [],
|
|
3473
|
+
"fields": [
|
|
3474
|
+
"speed",
|
|
3475
|
+
"driver",
|
|
3476
|
+
"object"
|
|
3477
|
+
]
|
|
3478
|
+
}
|
|
3479
|
+
},
|
|
3480
|
+
"actions": [
|
|
3481
|
+
{
|
|
3482
|
+
"action": "rotateLeft",
|
|
3483
|
+
"context": "walk",
|
|
3484
|
+
"label": "camera.rotateLeft",
|
|
3485
|
+
"optional": true,
|
|
3486
|
+
"file": "packages/engine/modules/camera/RtsCamera.js"
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
"action": "rotateRight",
|
|
3490
|
+
"context": "walk",
|
|
3491
|
+
"label": "camera.rotateRight",
|
|
3492
|
+
"optional": true,
|
|
3493
|
+
"file": "packages/engine/modules/camera/RtsCamera.js"
|
|
3494
|
+
},
|
|
3495
|
+
{
|
|
3496
|
+
"action": "jump",
|
|
3497
|
+
"context": "walk",
|
|
3498
|
+
"label": "input.jump",
|
|
3499
|
+
"optional": true,
|
|
3500
|
+
"file": "packages/engine/modules/characters/index.js"
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
"action": "run",
|
|
3504
|
+
"context": "walk",
|
|
3505
|
+
"label": "input.run",
|
|
3506
|
+
"optional": true,
|
|
3507
|
+
"file": "packages/engine/modules/characters/index.js"
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
"action": "brake",
|
|
3511
|
+
"context": "vehicle",
|
|
3512
|
+
"label": "input.brake",
|
|
3513
|
+
"optional": true,
|
|
3514
|
+
"file": "packages/engine/modules/characters/index.js"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"action": "debugPanel",
|
|
3518
|
+
"context": "walk",
|
|
3519
|
+
"label": "debug.toggle",
|
|
3520
|
+
"optional": true,
|
|
3521
|
+
"file": "packages/engine/modules/debug/DebugPanel.js"
|
|
3522
|
+
},
|
|
3523
|
+
{
|
|
3524
|
+
"action": "'choice'+i",
|
|
3525
|
+
"context": "dialog",
|
|
3526
|
+
"label": "dialogue.choice",
|
|
3527
|
+
"optional": true,
|
|
3528
|
+
"file": "packages/engine/modules/gameplay/Dialogue.js"
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"action": "interact",
|
|
3532
|
+
"param": "action",
|
|
3533
|
+
"context": "walk",
|
|
3534
|
+
"label": "input.interact",
|
|
3535
|
+
"file": "packages/engine/modules/gameplay/Interactions.js"
|
|
3536
|
+
},
|
|
3537
|
+
{
|
|
3538
|
+
"action": "inventory",
|
|
3539
|
+
"param": "action",
|
|
3540
|
+
"context": "walk",
|
|
3541
|
+
"label": "inventory.action",
|
|
3542
|
+
"file": "packages/engine/modules/gameplay/Inventory.js"
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
"action": "quests",
|
|
3546
|
+
"param": "action",
|
|
3547
|
+
"context": "walk",
|
|
3548
|
+
"label": "quests.action",
|
|
3549
|
+
"file": "packages/engine/modules/gameplay/Quests.js"
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
"action": "rotate",
|
|
3553
|
+
"param": "rotate",
|
|
3554
|
+
"context": "walk",
|
|
3555
|
+
"label": "grid.rotate",
|
|
3556
|
+
"optional": true,
|
|
3557
|
+
"file": "packages/engine/modules/grid/preview.js"
|
|
3558
|
+
},
|
|
3559
|
+
{
|
|
3560
|
+
"action": "photo",
|
|
3561
|
+
"context": "walk",
|
|
3562
|
+
"label": "photo.action",
|
|
3563
|
+
"file": "packages/engine/modules/photo/Photo.js"
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
"action": "cancel",
|
|
3567
|
+
"param": "action",
|
|
3568
|
+
"context": "walk",
|
|
3569
|
+
"label": "settings.action",
|
|
3570
|
+
"hasKey": true,
|
|
3571
|
+
"file": "packages/engine/modules/settings/Settings.js"
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
"action": "skip",
|
|
3575
|
+
"context": "cutscene",
|
|
3576
|
+
"label": "timeline.skipAction",
|
|
3577
|
+
"optional": true,
|
|
3578
|
+
"file": "packages/engine/modules/timeline/Timeline.js"
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
"action": "triggersDebug",
|
|
3582
|
+
"param": "action",
|
|
3583
|
+
"context": "walk",
|
|
3584
|
+
"label": "triggers.debug",
|
|
3585
|
+
"optional": true,
|
|
3586
|
+
"file": "packages/engine/modules/triggers/index.js"
|
|
3587
|
+
}
|
|
3588
|
+
],
|
|
3589
|
+
"fields": {
|
|
3590
|
+
"props": {
|
|
3591
|
+
"id": {
|
|
3592
|
+
"type": "string",
|
|
3593
|
+
"optional": true,
|
|
3594
|
+
"desc": "stable id (needed when entries are later inserted in the middle)"
|
|
3595
|
+
},
|
|
3596
|
+
"model": {
|
|
3597
|
+
"type": "any",
|
|
3598
|
+
"desc": "model name, or [name, ...args] for a generated model"
|
|
3599
|
+
},
|
|
3600
|
+
"place": {
|
|
3601
|
+
"type": "string",
|
|
3602
|
+
"optional": true,
|
|
3603
|
+
"desc": "place name (places.js / level marker); x and z are then offsets from it and turn with the place's rot",
|
|
3604
|
+
"label": "Place",
|
|
3605
|
+
"rare": true
|
|
3606
|
+
},
|
|
3607
|
+
"x": {
|
|
3608
|
+
"type": "number",
|
|
3609
|
+
"optional": true,
|
|
3610
|
+
"desc": "meters along x (offset from place when place is given)"
|
|
3611
|
+
},
|
|
3612
|
+
"z": {
|
|
3613
|
+
"type": "number",
|
|
3614
|
+
"optional": true,
|
|
3615
|
+
"desc": "meters along z (offset from place when place is given)"
|
|
3616
|
+
},
|
|
3617
|
+
"floor": {
|
|
3618
|
+
"type": "number",
|
|
3619
|
+
"optional": true,
|
|
3620
|
+
"desc": "reference height of the storey it stands on (multi-layer ground)",
|
|
3621
|
+
"label": "Storey height",
|
|
3622
|
+
"rare": true
|
|
3623
|
+
},
|
|
3624
|
+
"y": {
|
|
3625
|
+
"type": "number",
|
|
3626
|
+
"optional": true,
|
|
3627
|
+
"desc": "meters above the ground it stands on (the height itself when ground is false)",
|
|
3628
|
+
"label": "Height"
|
|
3629
|
+
},
|
|
3630
|
+
"rot": {
|
|
3631
|
+
"type": "number|position",
|
|
3632
|
+
"optional": true,
|
|
3633
|
+
"desc": "facing around the vertical axis, radians; or [x, y, z] radians to tilt it (a tilted collide needs a collider3d provider)",
|
|
3634
|
+
"label": "Facing"
|
|
3635
|
+
},
|
|
3636
|
+
"scale": {
|
|
3637
|
+
"type": "number|position",
|
|
3638
|
+
"optional": true,
|
|
3639
|
+
"desc": "uniform scale (1 = model size), or [x, y, z] per axis",
|
|
3640
|
+
"label": "Size"
|
|
3641
|
+
},
|
|
3642
|
+
"source": {
|
|
3643
|
+
"type": "string",
|
|
3644
|
+
"optional": true,
|
|
3645
|
+
"desc": "name of the arrangement this entry was copied from; queryable, no other effect",
|
|
3646
|
+
"label": "Copied from",
|
|
3647
|
+
"rare": true
|
|
3648
|
+
},
|
|
3649
|
+
"ground": {
|
|
3650
|
+
"type": "bool",
|
|
3651
|
+
"optional": true,
|
|
3652
|
+
"desc": "false = do not snap to the ground: y is the height in the world"
|
|
3653
|
+
},
|
|
3654
|
+
"collide": {
|
|
3655
|
+
"type": "any",
|
|
3656
|
+
"optional": true,
|
|
3657
|
+
"desc": "collision: 'box', 'circle', { circle: radius, occluder?: false }, or false = none",
|
|
3658
|
+
"label": "Collision",
|
|
3659
|
+
"rare": true
|
|
3660
|
+
},
|
|
3661
|
+
"occluder": {
|
|
3662
|
+
"type": "bool",
|
|
3663
|
+
"optional": true,
|
|
3664
|
+
"desc": "false = a solid prop the follow camera may pass through (walkers are still stopped)",
|
|
3665
|
+
"label": "Blocks camera",
|
|
3666
|
+
"rare": true
|
|
3667
|
+
},
|
|
3668
|
+
"static": {
|
|
3669
|
+
"type": "bool",
|
|
3670
|
+
"optional": true,
|
|
3671
|
+
"desc": "never moves (may be merged into one draw call)",
|
|
3672
|
+
"label": "Never moves",
|
|
3673
|
+
"rare": true
|
|
3674
|
+
},
|
|
3675
|
+
"batch": {
|
|
3676
|
+
"type": "bool",
|
|
3677
|
+
"optional": true,
|
|
3678
|
+
"desc": "false = never batch this copy",
|
|
3679
|
+
"label": "Merge copies",
|
|
3680
|
+
"rare": true
|
|
3681
|
+
},
|
|
3682
|
+
"lod": {
|
|
3683
|
+
"type": "any",
|
|
3684
|
+
"optional": true,
|
|
3685
|
+
"desc": "true = lower-detail levels far away (threedog assets optimize --lod), or rising distances in meters like [40, 120]; such a copy is never batched",
|
|
3686
|
+
"label": "Far detail",
|
|
3687
|
+
"rare": true
|
|
3688
|
+
}
|
|
3689
|
+
},
|
|
3690
|
+
"props.template": {
|
|
3691
|
+
"template": {
|
|
3692
|
+
"type": "string",
|
|
3693
|
+
"desc": "template name (content/templates.js)"
|
|
3694
|
+
},
|
|
3695
|
+
"id": {
|
|
3696
|
+
"type": "string",
|
|
3697
|
+
"optional": true,
|
|
3698
|
+
"desc": "stable id; instances with state should have one"
|
|
3699
|
+
},
|
|
3700
|
+
"place": {
|
|
3701
|
+
"type": "string",
|
|
3702
|
+
"optional": true,
|
|
3703
|
+
"desc": "place name (places.js / level marker); x and z are then offsets from it and turn with the place's rot",
|
|
3704
|
+
"label": "Place",
|
|
3705
|
+
"rare": true
|
|
3706
|
+
},
|
|
3707
|
+
"x": {
|
|
3708
|
+
"type": "number",
|
|
3709
|
+
"optional": true,
|
|
3710
|
+
"desc": "meters along x (offset from place when place is given)"
|
|
3711
|
+
},
|
|
3712
|
+
"z": {
|
|
3713
|
+
"type": "number",
|
|
3714
|
+
"optional": true,
|
|
3715
|
+
"desc": "meters along z (offset from place when place is given)"
|
|
3716
|
+
},
|
|
3717
|
+
"floor": {
|
|
3718
|
+
"type": "number",
|
|
3719
|
+
"optional": true,
|
|
3720
|
+
"desc": "reference height of the storey it stands on (multi-layer ground)",
|
|
3721
|
+
"label": "Storey height",
|
|
3722
|
+
"rare": true
|
|
3723
|
+
},
|
|
3724
|
+
"y": {
|
|
3725
|
+
"type": "number",
|
|
3726
|
+
"optional": true,
|
|
3727
|
+
"desc": "meters above the ground it stands on (the height itself when ground is false)",
|
|
3728
|
+
"label": "Height"
|
|
3729
|
+
},
|
|
3730
|
+
"rot": {
|
|
3731
|
+
"type": "number|position",
|
|
3732
|
+
"optional": true,
|
|
3733
|
+
"desc": "facing around the vertical axis, radians; or [x, y, z] radians to tilt it (a tilted collide needs a collider3d provider)",
|
|
3734
|
+
"label": "Facing"
|
|
3735
|
+
},
|
|
3736
|
+
"scale": {
|
|
3737
|
+
"type": "number|position",
|
|
3738
|
+
"optional": true,
|
|
3739
|
+
"desc": "uniform scale (1 = model size), or [x, y, z] per axis",
|
|
3740
|
+
"label": "Size"
|
|
3741
|
+
},
|
|
3742
|
+
"source": {
|
|
3743
|
+
"type": "string",
|
|
3744
|
+
"optional": true,
|
|
3745
|
+
"desc": "name of the arrangement this entry was copied from; queryable, no other effect",
|
|
3746
|
+
"label": "Copied from",
|
|
3747
|
+
"rare": true
|
|
3748
|
+
},
|
|
3749
|
+
"items": {
|
|
3750
|
+
"type": "object",
|
|
3751
|
+
"optional": true,
|
|
3752
|
+
"desc": "starting goods of the instance's container { itemId: count }",
|
|
3753
|
+
"label": "Starts with",
|
|
3754
|
+
"rare": true
|
|
3755
|
+
}
|
|
3756
|
+
},
|
|
3757
|
+
"props.grid": {
|
|
3758
|
+
"id": {
|
|
3759
|
+
"type": "string",
|
|
3760
|
+
"desc": "stable id (the player can move or pick it up)"
|
|
3761
|
+
},
|
|
3762
|
+
"grid": {
|
|
3763
|
+
"type": "string",
|
|
3764
|
+
"desc": "grid name (content/grids.js)"
|
|
3765
|
+
},
|
|
3766
|
+
"item": {
|
|
3767
|
+
"type": "string",
|
|
3768
|
+
"desc": "grid item name"
|
|
3769
|
+
},
|
|
3770
|
+
"cell": {
|
|
3771
|
+
"type": "position",
|
|
3772
|
+
"desc": "grid cell [col, row]"
|
|
3773
|
+
},
|
|
3774
|
+
"rotation": {
|
|
3775
|
+
"type": "int",
|
|
3776
|
+
"optional": true,
|
|
3777
|
+
"values": [
|
|
3778
|
+
0,
|
|
3779
|
+
1,
|
|
3780
|
+
2,
|
|
3781
|
+
3
|
|
3782
|
+
],
|
|
3783
|
+
"desc": "quarter turns",
|
|
3784
|
+
"label": "Quarter turns"
|
|
3785
|
+
},
|
|
3786
|
+
"fields": {
|
|
3787
|
+
"type": "object",
|
|
3788
|
+
"optional": true,
|
|
3789
|
+
"desc": "record fields of this copy",
|
|
3790
|
+
"label": "Own fields",
|
|
3791
|
+
"rare": true
|
|
3792
|
+
}
|
|
3793
|
+
},
|
|
3794
|
+
"pickups": {
|
|
3795
|
+
"id": {
|
|
3796
|
+
"type": "string",
|
|
3797
|
+
"optional": true,
|
|
3798
|
+
"desc": "stable id"
|
|
3799
|
+
},
|
|
3800
|
+
"item": {
|
|
3801
|
+
"type": "string",
|
|
3802
|
+
"desc": "item id (items.js)"
|
|
3803
|
+
},
|
|
3804
|
+
"place": {
|
|
3805
|
+
"type": "string",
|
|
3806
|
+
"optional": true,
|
|
3807
|
+
"desc": "place name (places.js / level marker); x and z are then offsets from it and turn with the place's rot",
|
|
3808
|
+
"label": "Place",
|
|
3809
|
+
"rare": true
|
|
3810
|
+
},
|
|
3811
|
+
"x": {
|
|
3812
|
+
"type": "number",
|
|
3813
|
+
"optional": true,
|
|
3814
|
+
"desc": "meters along x (offset from place when place is given)"
|
|
3815
|
+
},
|
|
3816
|
+
"z": {
|
|
3817
|
+
"type": "number",
|
|
3818
|
+
"optional": true,
|
|
3819
|
+
"desc": "meters along z (offset from place when place is given)"
|
|
3820
|
+
},
|
|
3821
|
+
"floor": {
|
|
3822
|
+
"type": "number",
|
|
3823
|
+
"optional": true,
|
|
3824
|
+
"desc": "reference height of the storey it stands on (multi-layer ground)",
|
|
3825
|
+
"label": "Storey height",
|
|
3826
|
+
"rare": true
|
|
3827
|
+
},
|
|
3828
|
+
"y": {
|
|
3829
|
+
"type": "number",
|
|
3830
|
+
"optional": true,
|
|
3831
|
+
"desc": "meters above the ground it stands on (the height itself when ground is false)",
|
|
3832
|
+
"label": "Height"
|
|
3833
|
+
},
|
|
3834
|
+
"count": {
|
|
3835
|
+
"type": "int",
|
|
3836
|
+
"optional": true,
|
|
3837
|
+
"min": 1,
|
|
3838
|
+
"desc": "how many one pickup gives"
|
|
3839
|
+
},
|
|
3840
|
+
"data": {
|
|
3841
|
+
"type": "any",
|
|
3842
|
+
"optional": true,
|
|
3843
|
+
"desc": "extra data handed to the game",
|
|
3844
|
+
"label": "Extra data",
|
|
3845
|
+
"rare": true
|
|
3846
|
+
},
|
|
3847
|
+
"radius": {
|
|
3848
|
+
"type": "number",
|
|
3849
|
+
"optional": true,
|
|
3850
|
+
"min": 0,
|
|
3851
|
+
"desc": "pickup reach in meters",
|
|
3852
|
+
"label": "Reach",
|
|
3853
|
+
"rare": true
|
|
3854
|
+
},
|
|
3855
|
+
"auto": {
|
|
3856
|
+
"type": "bool",
|
|
3857
|
+
"optional": true,
|
|
3858
|
+
"desc": "taken by walking into it, no key",
|
|
3859
|
+
"label": "Walk to take",
|
|
3860
|
+
"rare": true
|
|
3861
|
+
},
|
|
3862
|
+
"respawn": {
|
|
3863
|
+
"type": "number",
|
|
3864
|
+
"optional": true,
|
|
3865
|
+
"min": 0,
|
|
3866
|
+
"desc": "seconds until it comes back (0 = never)",
|
|
3867
|
+
"label": "Comes back after",
|
|
3868
|
+
"rare": true
|
|
3869
|
+
}
|
|
3870
|
+
},
|
|
3871
|
+
"views": {
|
|
3872
|
+
"position": {
|
|
3873
|
+
"type": "position",
|
|
3874
|
+
"optional": true,
|
|
3875
|
+
"desc": "camera position [x, y, z]"
|
|
3876
|
+
},
|
|
3877
|
+
"target": {
|
|
3878
|
+
"type": "position",
|
|
3879
|
+
"optional": true,
|
|
3880
|
+
"desc": "point looked at [x, y, z]"
|
|
3881
|
+
},
|
|
3882
|
+
"fov": {
|
|
3883
|
+
"type": "number",
|
|
3884
|
+
"optional": true,
|
|
3885
|
+
"min": 1,
|
|
3886
|
+
"max": 179,
|
|
3887
|
+
"desc": "vertical field of view, degrees"
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
},
|
|
3891
|
+
"skipKinds": [
|
|
3892
|
+
"exact",
|
|
3893
|
+
"approx",
|
|
3894
|
+
"step",
|
|
3895
|
+
"none"
|
|
3896
|
+
],
|
|
3897
|
+
"hints": {
|
|
3898
|
+
"animation": {
|
|
3899
|
+
"kind": "animation",
|
|
3900
|
+
"seen": "an AnimationMixer of its own",
|
|
3901
|
+
"use": "engine.assets.animate(model, { states }): states, crossfades, sync with game time and pause (recipe 13)",
|
|
3902
|
+
"quiet": "/\\bassets\\.animate\\b/",
|
|
3903
|
+
"code": "/\\bnew\\s+(?:THREE\\.)?AnimationMixer\\s*\\(|\\bmixer\\.update\\s*\\(/i",
|
|
3904
|
+
"file": "packages/engine/core/assets/Animator.js"
|
|
3905
|
+
},
|
|
3906
|
+
"audio": {
|
|
3907
|
+
"kind": "audio",
|
|
3908
|
+
"seen": "an AudioContext / Audio element of its own",
|
|
3909
|
+
"use": "engine.audio: engine.audio.play(url, { bus, volume }) or named sounds, with buses and volume settings (recipe 31)",
|
|
3910
|
+
"code": "/\\bnew\\s+(?:window\\.)?(?:AudioContext|webkitAudioContext)\\b|\\bnew\\s+Audio\\s*\\(/",
|
|
3911
|
+
"file": "packages/engine/core/audio/Audio.js"
|
|
3912
|
+
},
|
|
3913
|
+
"collision": {
|
|
3914
|
+
"kind": "collision",
|
|
3915
|
+
"seen": "a hand-written box overlap",
|
|
3916
|
+
"use": "engine.collision.addBox / addCircle for walls and props (movement, rays and physics read them); engine.collision.walkable to ask",
|
|
3917
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.collision\\b/",
|
|
3918
|
+
"code": "/Math\\.abs\\([^)]*\\)\\s*<=?[^&|;]*&&\\s*Math\\.abs\\([^)]*\\)\\s*<=?|[<>]=?\\s*[\\w.]*\\bmin[XYZ]?\\b[^;]*&&[^;]*[<>]=?\\s*[\\w.]*\\bmax[XYZ]?\\b/i",
|
|
3919
|
+
"file": "packages/engine/modules/collision/Collision.js"
|
|
3920
|
+
},
|
|
3921
|
+
"dialogue": {
|
|
3922
|
+
"kind": "dialogue",
|
|
3923
|
+
"seen": "a dialogue box of its own",
|
|
3924
|
+
"use": "engine.dialogue.define(speaker, nodes) and the dialogue part: typing on game time, choices, input lock (recipe 02, recipe 26)",
|
|
3925
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.dialogue\\b|\\bdialogue\\(\\s*[{)]/",
|
|
3926
|
+
"code": "/\\b(createElement|innerHTML|className|classList|getElementById|querySelector|\\.id)\\b/",
|
|
3927
|
+
"raw": "/(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)[^,;{}]*(?:dialog(?:ue)?|speech|subtitle|textbox|conversation)|(?:dialog(?:ue)?|speech|subtitle|textbox|conversation)[^,;{}]*(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)/i",
|
|
3928
|
+
"file": "packages/engine/modules/gameplay/Dialogue.js"
|
|
3929
|
+
},
|
|
3930
|
+
"follow": {
|
|
3931
|
+
"kind": "follow",
|
|
3932
|
+
"seen": "a camera follow of its own",
|
|
3933
|
+
"use": "followCamera() or openWorld({ camera }): collision, smoothing and switching are handled; a shot of your own: engine.takeCamera(owner) (recipe 21)",
|
|
3934
|
+
"quiet": "/\\b(?:follow|firstPerson|fixed|rts)Camera\\(|\\bopenWorld\\(|\\b(engine|e|eng|ctx)\\.(takeCamera|cameraRig|setCamera)\\b/",
|
|
3935
|
+
"code": "/\\bcamera\\.position\\.(?:lerp|copy|set)\\s*\\(/",
|
|
3936
|
+
"raw": "/player|hero|target|character|avatar/i",
|
|
3937
|
+
"near": [
|
|
3938
|
+
{
|
|
3939
|
+
"re": "/\\bonFrame\\b|\\bonRender\\b|\\bonFixed\\b|requestAnimationFrame|\\bupdate\\b|\\btick\\b|\\banimate\\b/",
|
|
3940
|
+
"lines": 12
|
|
3941
|
+
}
|
|
3942
|
+
],
|
|
3943
|
+
"file": "packages/engine/modules/camera/common.js"
|
|
3944
|
+
},
|
|
3945
|
+
"grid": {
|
|
3946
|
+
"kind": "grid",
|
|
3947
|
+
"seen": "blending over a height / field array by hand",
|
|
3948
|
+
"use": "sampleGrid(data, { width, height, size, interp }) -> (x, z) => value; engine.assets.gridFromImage reads one from a PNG",
|
|
3949
|
+
"quiet": "/\\bsampleGrid\\b/",
|
|
3950
|
+
"code": "/\\b(heights?|heightmap|hm|elevation|terrainData|heightData|field)\\w*\\s*\\[/i",
|
|
3951
|
+
"near": [
|
|
3952
|
+
{
|
|
3953
|
+
"re": "/Math\\.floor\\(/",
|
|
3954
|
+
"lines": 6
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
"re": "/\\(\\s*1\\s*-\\s*\\w+\\s*\\)|\\blerp\\s*\\(|\\bmix\\s*\\(/",
|
|
3958
|
+
"lines": 6
|
|
3959
|
+
}
|
|
3960
|
+
],
|
|
3961
|
+
"tags": false,
|
|
3962
|
+
"file": "packages/engine/core/scene/grid.js"
|
|
3963
|
+
},
|
|
3964
|
+
"inventory": {
|
|
3965
|
+
"kind": "inventory",
|
|
3966
|
+
"seen": "a hand-made inventory (items kept in your own array / object)",
|
|
3967
|
+
"use": "the inventory module: engine.use(inventory()), engine.inventory.add / remove / has (counts, containers, events, saved with the game)",
|
|
3968
|
+
"quiet": "/\\b(engine|e|eng)\\.inventory\\b|\\binventory\\(\\s*[{)]/",
|
|
3969
|
+
"code": "/(?:\\b(?:const|let|var)\\s+|\\bthis\\.)(inventory|backpack|bag|pockets|inv)(?:Items|Slots|List|Contents|Data|Map|Counts?|s)?\\s*=\\s*(\\[\\s*\\]|\\{\\s*\\}|new Map\\b|new Set\\b)/i",
|
|
3970
|
+
"tags": false,
|
|
3971
|
+
"file": "packages/engine/modules/gameplay/Inventory.js"
|
|
3972
|
+
},
|
|
3973
|
+
"keys": {
|
|
3974
|
+
"kind": "keys",
|
|
3975
|
+
"seen": "a raw keydown / keyup listener",
|
|
3976
|
+
"use": "engine.input.action('jump', { label, keys }) in a module, the game binds keys with engine.input.bind (rebinding, contexts, gamepad); read engine.input.pressed(name) (recipe 58)",
|
|
3977
|
+
"raw": "/(?:^|[^\\w.])(?:(?:window|document|self|globalThis|canvas|document\\.body|[\\w.]*domElement)\\.)?(?:addEventListener\\s*\\(\\s*['\"]|on)key(?:down|up)\\b/",
|
|
3978
|
+
"yields": {
|
|
3979
|
+
"kind": "pause",
|
|
3980
|
+
"raw": "/['\"]Escape['\"]/"
|
|
3981
|
+
},
|
|
3982
|
+
"file": "packages/engine/core/input/Input.js"
|
|
3983
|
+
},
|
|
3984
|
+
"language": {
|
|
3985
|
+
"kind": "language",
|
|
3986
|
+
"seen": "a language table of its own",
|
|
3987
|
+
"use": "engine.i18n: tables per language, the language setting, and text that follows a switch",
|
|
3988
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.i18n\\b/",
|
|
3989
|
+
"code": "/\\b(?:const|let|var)\\s+(?:i18n|translations?|strings|locales?|languages?|lang|messages|texts?)\\w*\\s*=\\s*\\{/i",
|
|
3990
|
+
"near": [
|
|
3991
|
+
{
|
|
3992
|
+
"re": "/\\b(?:en|zh|fr|de|es|ja|ko|ru)(?:[-_]\\w+)?['\"]?\\s*:\\s*[{'\"`]/",
|
|
3993
|
+
"lines": 3,
|
|
3994
|
+
"on": "raw"
|
|
3995
|
+
}
|
|
3996
|
+
],
|
|
3997
|
+
"file": "packages/engine/core/base/I18n.js"
|
|
3998
|
+
},
|
|
3999
|
+
"loading": {
|
|
4000
|
+
"kind": "loading",
|
|
4001
|
+
"seen": "a loading screen of its own",
|
|
4002
|
+
"use": "engine.loading: tracks what is loading, shows progress and has a view you can replace (recipe 07)",
|
|
4003
|
+
"quiet": "/\\bengine\\.loading\\b/",
|
|
4004
|
+
"code": "/\\b(createElement|innerHTML|className|classList|getElementById|querySelector|\\.id)\\b/",
|
|
4005
|
+
"raw": "/(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)[^,;{}]*(?:loading|loader|load-?bar|progress-?bar)|(?:loading|loader|load-?bar|progress-?bar)[^,;{}]*(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)/i",
|
|
4006
|
+
"file": "packages/engine/core/engine/Loading.js"
|
|
4007
|
+
},
|
|
4008
|
+
"lock": {
|
|
4009
|
+
"kind": "lock",
|
|
4010
|
+
"seen": "an input lock of its own",
|
|
4011
|
+
"use": "engine.input.push('ride', { owner }) takes the keys and h.remove() gives them back: no key sticks, and describe().holds.input shows who holds them (recipe 07 §2b)",
|
|
4012
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.input\\.(push|gate)\\b|\\blockInput\\b/",
|
|
4013
|
+
"code": "/\\b(?:let|var)\\s+(?:input|controls?|keys)(?:Locked|Disabled|Enabled|Frozen)\\s*=/i",
|
|
4014
|
+
"tags": false,
|
|
4015
|
+
"file": "packages/engine/core/input/Input.js"
|
|
4016
|
+
},
|
|
4017
|
+
"loop": {
|
|
4018
|
+
"kind": "loop",
|
|
4019
|
+
"seen": "a requestAnimationFrame game loop of its own",
|
|
4020
|
+
"use": "engine.onFrame(dt => ...) for what is seen, engine.onFixed(dt => ...) for rules: pause, step, tests and saves follow them",
|
|
4021
|
+
"code": "/\\brequestAnimationFrame\\s*\\(\\s*[\\w.]+\\s*\\)|\\.setAnimationLoop\\s*\\(/",
|
|
4022
|
+
"file": "packages/engine/core/engine/loop.js"
|
|
4023
|
+
},
|
|
4024
|
+
"particles": {
|
|
4025
|
+
"kind": "particles",
|
|
4026
|
+
"seen": "a particle loop of its own",
|
|
4027
|
+
"use": "engine.particles: emitters on game time, one draw call, budgets (recipe 64)",
|
|
4028
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.particles\\b|\\bparticles\\(\\s*[{)]/",
|
|
4029
|
+
"code": "/\\bfor\\s*\\([^)]*\\bof\\s+[\\w.]*(?:particles|sparks|embers)\\b|\\b(?:particles|sparks|embers)\\.(?:forEach|filter)\\s*\\(/i",
|
|
4030
|
+
"near": [
|
|
4031
|
+
{
|
|
4032
|
+
"re": "/\\.(?:life|age|ttl|vel\\w*|v[xyz])\\b/",
|
|
4033
|
+
"lines": 5
|
|
4034
|
+
}
|
|
4035
|
+
],
|
|
4036
|
+
"file": "packages/engine/modules/particles/Particles.js"
|
|
4037
|
+
},
|
|
4038
|
+
"pause": {
|
|
4039
|
+
"kind": "pause",
|
|
4040
|
+
"seen": "a pause or Esc handler of its own",
|
|
4041
|
+
"use": "settings({ freezeWorld: true }): Esc stops every system and opens the menu (recipe 63); engine.freeze(why) for a pause with no menu",
|
|
4042
|
+
"quiet": "/\\bsettings\\(|\\bengine\\.(freeze|flow|settings)\\b|\\buiFocus\\(/",
|
|
4043
|
+
"code": "/\\b(?:let|var)\\s+(?:is|game)?paused\\s*=/i",
|
|
4044
|
+
"orRaw": "/(?:\\.key|\\.code)\\s*===?\\s*['\"]Escape['\"]/",
|
|
4045
|
+
"tags": false,
|
|
4046
|
+
"file": "packages/engine/modules/settings/Settings.js"
|
|
4047
|
+
},
|
|
4048
|
+
"physics": {
|
|
4049
|
+
"kind": "physics",
|
|
4050
|
+
"seen": "a physics library of its own",
|
|
4051
|
+
"use": "rigid(): bodies, joints and vehicles on the engine step, shared with collision and saves (recipe 11)",
|
|
4052
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.rigid\\b|\\brigid\\(\\s*[{)]/",
|
|
4053
|
+
"raw": "/\\bfrom\\s+['\"](?:cannon-es|cannon|ammo\\.js|@dimforge\\/rapier3d(?:-compat)?|oimo|matter-js)['\"]/",
|
|
4054
|
+
"file": "packages/engine/modules/rigid/RigidBodies.js"
|
|
4055
|
+
},
|
|
4056
|
+
"picking": {
|
|
4057
|
+
"kind": "picking",
|
|
4058
|
+
"seen": "a pointer-to-object raycast of its own",
|
|
4059
|
+
"use": "engine.pick(x, y), or engine.raycast / engine.rays: colliders and moving things are in the same query (recipe 19)",
|
|
4060
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.(rays|raycast|pick)\\b/",
|
|
4061
|
+
"code": "/\\.setFromCamera\\s*\\(/",
|
|
4062
|
+
"file": "packages/engine/core/scene/Rays.js"
|
|
4063
|
+
},
|
|
4064
|
+
"pool": {
|
|
4065
|
+
"kind": "pool",
|
|
4066
|
+
"seen": "a pool or list of many shots of its own",
|
|
4067
|
+
"use": "engine.swarm: thousands of shots, crowds and debris in one draw, with reuse and hits (recipe 65)",
|
|
4068
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.swarm\\b|\\bswarm\\(\\s*[{)]/",
|
|
4069
|
+
"code": "/(?:\\b(?:const|let|var)\\s+|\\bthis\\.)(?:pool|\\w*(?:bullet|projectile|shot|enemy|particle|mesh|object)pool|bullets|projectiles)\\s*=\\s*(?:\\[\\s*\\]|new Map\\b|new Set\\b)/i",
|
|
4070
|
+
"file": "packages/engine/modules/swarm/Swarm.js"
|
|
4071
|
+
},
|
|
4072
|
+
"quests": {
|
|
4073
|
+
"kind": "quests",
|
|
4074
|
+
"seen": "a quest list of its own",
|
|
4075
|
+
"use": "the quests module: steps, rewards, markers and the log, saved with the game (recipe 04)",
|
|
4076
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.quests\\b|\\bquests\\(\\s*[{)]/",
|
|
4077
|
+
"code": "/(?:\\b(?:const|let|var)\\s+|\\bthis\\.)(?:quests?|questLog|missions?|objectives?)(?:List|Log|Data|s)?\\s*=\\s*(?:\\[\\s*\\]|\\{\\s*\\}|new Map\\b)/i",
|
|
4078
|
+
"file": "packages/engine/modules/gameplay/Quests.js"
|
|
4079
|
+
},
|
|
4080
|
+
"random": {
|
|
4081
|
+
"kind": "random",
|
|
4082
|
+
"seen": "Math.random() in game code",
|
|
4083
|
+
"use": "engine.random (seeded: next / range / int / pick / chance; replays, tests and saves get the same numbers)",
|
|
4084
|
+
"code": "/\\bMath\\.random\\s*\\(/",
|
|
4085
|
+
"notRaw": "/particle|spark|dust|confetti|debris|twinkle|flicker|jitter|smoke|puff|droplet|bubble|petal|glitter|wobble/i",
|
|
4086
|
+
"gameplayOnly": true,
|
|
4087
|
+
"file": "packages/engine/core/base/Random.js"
|
|
4088
|
+
},
|
|
4089
|
+
"reach": {
|
|
4090
|
+
"kind": "reach",
|
|
4091
|
+
"seen": "a hand-made reach check for interacting",
|
|
4092
|
+
"use": "engine.interactions.add(target, { ... }): prompt, range and the interact action are handled (recipe 20)",
|
|
4093
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.interactions\\b/",
|
|
4094
|
+
"code": "/(?:\\bdistanceTo(?:Squared)?\\(|\\bMath\\.hypot\\(|\\bdist(?:ance)?\\w*)[^;]*<=?\\s*\\d/",
|
|
4095
|
+
"near": [
|
|
4096
|
+
{
|
|
4097
|
+
"re": "/KeyE|['\"]e['\"]|interact|press e\\b|talk/i",
|
|
4098
|
+
"lines": 3,
|
|
4099
|
+
"on": "raw"
|
|
4100
|
+
}
|
|
4101
|
+
],
|
|
4102
|
+
"file": "packages/engine/modules/gameplay/Interactions.js"
|
|
4103
|
+
},
|
|
4104
|
+
"save": {
|
|
4105
|
+
"kind": "save",
|
|
4106
|
+
"seen": "a save of its own in localStorage",
|
|
4107
|
+
"use": "engine.saves: autosave(minutes), register('game', { version: 1, save, load }), and Continue on the start screen (recipe 63); versions, slots and a corrupt save are handled",
|
|
4108
|
+
"quiet": "/\\bengine\\.saves\\b/",
|
|
4109
|
+
"code": "/\\blocalStorage\\.setItem\\s*\\(/",
|
|
4110
|
+
"notRaw": "/setItem\\s*\\(\\s*(?![^,)]*(?:save|progress))[^,)]*(?:volume|mute|lang|locale|theme|music|sfx|quality|sensitiv|brightness|fullscreen|tutorial|dismiss|setting|pref|option|keybind)/i",
|
|
4111
|
+
"file": "packages/engine/core/saves/Saves.js"
|
|
4112
|
+
},
|
|
4113
|
+
"settings": {
|
|
4114
|
+
"kind": "settings",
|
|
4115
|
+
"seen": "a settings menu of its own",
|
|
4116
|
+
"use": "the settings module: volume, keys, quality and language in one menu that remembers itself; settings.define adds your own (recipe 26)",
|
|
4117
|
+
"quiet": "/\\bsettings\\(|\\bengine\\.settings\\b/",
|
|
4118
|
+
"code": "/\\b(createElement|innerHTML|className|classList|getElementById|querySelector|\\.id)\\b/",
|
|
4119
|
+
"raw": "/(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)[^,;{}]*(?:settings|options-?(?:menu|panel|screen)|pause-?menu)|(?:settings|options|pause)-?(?:menu|panel|screen)[^,;{}]*(?:createElement|innerHTML|className|classList|getElementById|querySelector|\\.id\\b)/i",
|
|
4120
|
+
"file": "packages/engine/modules/settings/Settings.js"
|
|
4121
|
+
},
|
|
4122
|
+
"timers": {
|
|
4123
|
+
"kind": "timers",
|
|
4124
|
+
"seen": "setInterval / setTimeout used for game timing",
|
|
4125
|
+
"use": "engine.clock.after(seconds, fn) / engine.clock.every(seconds, fn), or accumulate dt in engine.onFixed (they follow pause, step and saves); to await one: new Promise(r => engine.clock.after(s, r))",
|
|
4126
|
+
"code": "/\\b(setInterval|setTimeout)\\s*\\(/",
|
|
4127
|
+
"not": "/setTimeout\\s*\\([^,]*,\\s*0\\s*\\)/",
|
|
4128
|
+
"file": "packages/engine/core/time/Clock.js"
|
|
4129
|
+
},
|
|
4130
|
+
"tween": {
|
|
4131
|
+
"kind": "tween",
|
|
4132
|
+
"seen": "a tween of its own",
|
|
4133
|
+
"use": "await engine.timeline.tween(target, to, { duration, ease }): on game time, stops with pause (recipe 07)",
|
|
4134
|
+
"quiet": "/\\b(engine|e|eng|ctx)\\.timeline\\b/",
|
|
4135
|
+
"code": "/\\b(?:elapsed|time|timer|age|t)\\s*\\/\\s*(?:\\w+\\.)?(?:dur|duration)\\b/i",
|
|
4136
|
+
"orRaw": "/\\bfrom\\s+['\"](?:gsap|@tweenjs\\/tween\\.js|tween\\.js|animejs)['\"]/",
|
|
4137
|
+
"file": "packages/engine/modules/timeline/Timeline.js"
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
};
|