@jgengine/core 0.10.0 → 0.11.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 +13 -2
- package/LICENSE +203 -661
- package/README.md +1 -1
- package/dist/ai/crowd.d.ts +55 -0
- package/dist/ai/crowd.js +114 -0
- package/dist/ai/flock.d.ts +5 -2
- package/dist/ai/flock.js +5 -2
- package/dist/ai/groupAssist.d.ts +1 -0
- package/dist/ai/groupAssist.js +1 -0
- package/dist/ai/heatSystem.d.ts +76 -0
- package/dist/ai/heatSystem.js +97 -0
- package/dist/ai/interestScheduler.d.ts +107 -0
- package/dist/ai/interestScheduler.js +118 -0
- package/dist/ai/jobBoard.d.ts +1 -0
- package/dist/ai/jobBoard.js +1 -0
- package/dist/ai/laneSelect.d.ts +5 -2
- package/dist/ai/laneSelect.js +5 -2
- package/dist/ai/mobBrain.d.ts +1 -0
- package/dist/ai/mobBrain.js +1 -0
- package/dist/ai/spawnDirector.d.ts +7 -2
- package/dist/ai/spawnDirector.js +18 -15
- package/dist/ai/spawnPoint.d.ts +3 -1
- package/dist/ai/spawnPoint.js +3 -1
- package/dist/ai/targetAcquisition.d.ts +84 -0
- package/dist/ai/targetAcquisition.js +92 -0
- package/dist/anim/easing.d.ts +19 -0
- package/dist/anim/easing.js +19 -0
- package/dist/anim/oscillator.d.ts +12 -0
- package/dist/anim/oscillator.js +25 -0
- package/dist/area/areaEffectField.d.ts +127 -0
- package/dist/area/areaEffectField.js +175 -0
- package/dist/area/stackPolicy.d.ts +47 -0
- package/dist/area/stackPolicy.js +99 -0
- package/dist/authoring.d.ts +1 -0
- package/dist/authoring.js +1 -0
- package/dist/board/laneBoard.d.ts +13 -0
- package/dist/board/laneBoard.js +13 -0
- package/dist/board/timelineBoard.d.ts +10 -0
- package/dist/board/timelineBoard.js +10 -0
- package/dist/combat/abilityKit.d.ts +18 -0
- package/dist/combat/abilityKit.js +24 -9
- package/dist/combat/animationState.d.ts +5 -0
- package/dist/combat/animationState.js +5 -0
- package/dist/combat/breakMeters.d.ts +10 -0
- package/dist/combat/breakMeters.js +10 -0
- package/dist/combat/castRunner.d.ts +5 -0
- package/dist/combat/castRunner.js +5 -0
- package/dist/combat/comboPoints.d.ts +5 -0
- package/dist/combat/comboPoints.js +5 -0
- package/dist/combat/comboString.d.ts +5 -0
- package/dist/combat/comboString.js +5 -0
- package/dist/combat/damageInterceptors.d.ts +192 -0
- package/dist/combat/damageInterceptors.js +251 -0
- package/dist/combat/damageMatchup.d.ts +68 -0
- package/dist/combat/damageMatchup.js +42 -0
- package/dist/combat/damageResolution.d.ts +63 -0
- package/dist/combat/damageResolution.js +50 -0
- package/dist/combat/death.d.ts +7 -1
- package/dist/combat/death.js +5 -0
- package/dist/combat/deathReason.d.ts +14 -0
- package/dist/combat/deathReason.js +1 -0
- package/dist/combat/defensiveWindow.d.ts +5 -0
- package/dist/combat/defensiveWindow.js +5 -0
- package/dist/combat/dotField.d.ts +5 -1
- package/dist/combat/dotField.js +5 -1
- package/dist/combat/downed.d.ts +5 -0
- package/dist/combat/downed.js +5 -0
- package/dist/combat/effects.d.ts +5 -0
- package/dist/combat/effects.js +5 -0
- package/dist/combat/encounterSequence.d.ts +258 -0
- package/dist/combat/encounterSequence.js +426 -0
- package/dist/combat/hitReaction.d.ts +57 -1
- package/dist/combat/hitReaction.js +45 -5
- package/dist/combat/magazine.d.ts +54 -0
- package/dist/combat/magazine.js +96 -0
- package/dist/combat/projectiles.d.ts +5 -0
- package/dist/combat/projectiles.js +32 -14
- package/dist/combat/receivedDamage.d.ts +117 -0
- package/dist/combat/receivedDamage.js +92 -0
- package/dist/combat/regenShield.d.ts +5 -1
- package/dist/combat/regenShield.js +5 -1
- package/dist/combat/renderCues.d.ts +51 -0
- package/dist/combat/renderCues.js +44 -0
- package/dist/combat/resourcePool.d.ts +5 -0
- package/dist/combat/resourcePool.js +5 -0
- package/dist/combat/rewardAllocation.d.ts +121 -0
- package/dist/combat/rewardAllocation.js +251 -0
- package/dist/combat/shotOrigin.d.ts +18 -1
- package/dist/combat/shotOrigin.js +39 -0
- package/dist/combat/statusApplication.d.ts +96 -0
- package/dist/combat/statusApplication.js +81 -0
- package/dist/combat/telegraph.d.ts +11 -2
- package/dist/combat/telegraph.js +11 -2
- package/dist/combat/thresholdCrossings.d.ts +85 -0
- package/dist/combat/thresholdCrossings.js +116 -0
- package/dist/combat.d.ts +34 -0
- package/dist/combat.js +34 -0
- package/dist/commands/commandRegistry.d.ts +11 -0
- package/dist/commands/commandRegistry.js +9 -2
- package/dist/crafting/crop.d.ts +18 -0
- package/dist/crafting/crop.js +18 -0
- package/dist/crafting/production.d.ts +5 -0
- package/dist/crafting/production.js +5 -0
- package/dist/devtools/rewriteTunables.d.ts +17 -0
- package/dist/devtools/rewriteTunables.js +276 -0
- package/dist/devtools/saveEndpoint.d.ts +46 -0
- package/dist/devtools/saveEndpoint.js +48 -0
- package/dist/devtools/transformTunables.d.ts +3 -0
- package/dist/devtools/transformTunables.js +3 -0
- package/dist/devtools/tunableSchema.d.ts +31 -0
- package/dist/devtools/tunableSchema.js +31 -0
- package/dist/economy/currency.d.ts +12 -1
- package/dist/economy/currency.js +12 -1
- package/dist/economy/listingBook.d.ts +91 -0
- package/dist/economy/listingBook.js +144 -0
- package/dist/economy/resourceLedger.d.ts +222 -0
- package/dist/economy/resourceLedger.js +353 -0
- package/dist/economy/sharedWallet.d.ts +14 -0
- package/dist/economy/sharedWallet.js +14 -0
- package/dist/economy/techTree.d.ts +12 -0
- package/dist/economy/techTree.js +12 -0
- package/dist/economy/wallet.d.ts +26 -2
- package/dist/economy/wallet.js +35 -6
- package/dist/editor/commands.d.ts +190 -7
- package/dist/editor/commands.js +727 -55
- package/dist/editor/document.d.ts +159 -13
- package/dist/editor/document.js +750 -19
- package/dist/editor/grid.d.ts +229 -0
- package/dist/editor/grid.js +366 -0
- package/dist/editor/gridAdapters.d.ts +80 -0
- package/dist/editor/gridAdapters.js +134 -0
- package/dist/editor/index.d.ts +73 -6
- package/dist/editor/index.js +6 -2
- package/dist/editor/liveSync.d.ts +127 -0
- package/dist/editor/liveSync.js +249 -0
- package/dist/editor/runtimeInspector.d.ts +88 -0
- package/dist/editor/runtimeInspector.js +239 -0
- package/dist/editor/types.d.ts +107 -1
- package/dist/faction/reputation.d.ts +5 -0
- package/dist/faction/reputation.js +5 -0
- package/dist/format/distance.d.ts +17 -0
- package/dist/format/distance.js +18 -0
- package/dist/format/duration.d.ts +27 -0
- package/dist/format/duration.js +45 -0
- package/dist/format/speed.d.ts +17 -0
- package/dist/format/speed.js +25 -0
- package/dist/game/connectedPlayers.d.ts +6 -4
- package/dist/game/connectedPlayers.js +2 -2
- package/dist/game/cosmetics.d.ts +9 -0
- package/dist/game/cosmetics.js +16 -0
- package/dist/game/defineGame.d.ts +100 -2
- package/dist/game/defineGame.js +39 -2
- package/dist/game/defineSystem.d.ts +88 -0
- package/dist/game/defineSystem.js +45 -0
- package/dist/game/dialogue.d.ts +33 -0
- package/dist/game/dialogue.js +21 -0
- package/dist/game/events.d.ts +35 -13
- package/dist/game/events.js +5 -0
- package/dist/game/feed.d.ts +33 -0
- package/dist/game/feed.js +35 -2
- package/dist/game/gamePhase.d.ts +11 -0
- package/dist/game/gamePhase.js +16 -0
- package/dist/game/leaderboard.d.ts +5 -0
- package/dist/game/leaderboard.js +5 -0
- package/dist/game/loadout.d.ts +5 -0
- package/dist/game/loadout.js +5 -0
- package/dist/game/lootFilter.d.ts +2 -0
- package/dist/game/lootFilter.js +2 -0
- package/dist/game/lootPipeline.d.ts +164 -0
- package/dist/game/lootPipeline.js +216 -0
- package/dist/game/lootTable.d.ts +19 -2
- package/dist/game/lootTable.js +15 -5
- package/dist/game/objectives.d.ts +43 -0
- package/dist/game/objectives.js +36 -0
- package/dist/game/paramLayers.d.ts +148 -0
- package/dist/game/paramLayers.js +185 -0
- package/dist/game/ping.d.ts +5 -0
- package/dist/game/ping.js +5 -0
- package/dist/game/playableGame.d.ts +92 -7
- package/dist/game/quest.d.ts +8 -0
- package/dist/game/quest.js +29 -0
- package/dist/game/race.d.ts +141 -0
- package/dist/game/race.js +169 -0
- package/dist/game/recordBook.d.ts +3 -1
- package/dist/game/recordBook.js +4 -1
- package/dist/game/ruleSelection.d.ts +75 -0
- package/dist/game/ruleSelection.js +127 -0
- package/dist/game/runDraft.d.ts +5 -0
- package/dist/game/runDraft.js +5 -0
- package/dist/game/saveStore.d.ts +111 -0
- package/dist/game/saveStore.js +312 -0
- package/dist/game/snapshotHistory.d.ts +67 -0
- package/dist/game/snapshotHistory.js +95 -0
- package/dist/game/social.d.ts +38 -1
- package/dist/game/social.js +71 -0
- package/dist/game/spawnPoints.d.ts +5 -0
- package/dist/game/spawnPoints.js +5 -0
- package/dist/game/systemRuntime.d.ts +50 -0
- package/dist/game/systemRuntime.js +157 -0
- package/dist/game/systemSchedule.d.ts +72 -0
- package/dist/game/systemSchedule.js +242 -0
- package/dist/game/toasts.d.ts +43 -0
- package/dist/game/toasts.js +44 -0
- package/dist/game/trade.d.ts +10 -0
- package/dist/game/trade.js +10 -0
- package/dist/game/unlocks.d.ts +8 -0
- package/dist/game/unlocks.js +16 -0
- package/dist/game/vfxInstance.d.ts +138 -0
- package/dist/game/vfxInstance.js +96 -0
- package/dist/game/worldItem.d.ts +17 -4
- package/dist/game/worldItem.js +17 -4
- package/dist/gameplay.d.ts +91 -0
- package/dist/gameplay.js +91 -0
- package/dist/index.d.ts +5 -14
- package/dist/index.js +5 -14
- package/dist/input/actionBindings.d.ts +23 -6
- package/dist/input/actionBindings.js +23 -6
- package/dist/input/axisInput.d.ts +7 -2
- package/dist/input/axisInput.js +7 -2
- package/dist/input/controlGroups.d.ts +67 -0
- package/dist/input/controlGroups.js +41 -0
- package/dist/input/touchScheme.d.ts +82 -6
- package/dist/input/touchScheme.js +123 -10
- package/dist/interaction/lockpick.d.ts +61 -0
- package/dist/interaction/lockpick.js +168 -0
- package/dist/interaction/proximityPrompt.d.ts +2 -0
- package/dist/interaction/proximityPrompt.js +2 -0
- package/dist/interaction/qte.d.ts +5 -0
- package/dist/interaction/qte.js +5 -0
- package/dist/interaction/skillCheck.d.ts +5 -0
- package/dist/interaction/skillCheck.js +5 -0
- package/dist/inventory/inventoryModel.d.ts +12 -0
- package/dist/inventory/inventoryModel.js +12 -0
- package/dist/inventory/shapedGrid.d.ts +16 -0
- package/dist/inventory/shapedGrid.js +16 -0
- package/dist/inventory/slotModel.d.ts +10 -0
- package/dist/inventory/slotModel.js +10 -0
- package/dist/item/durability.d.ts +5 -0
- package/dist/item/durability.js +5 -0
- package/dist/item/itemIdentity.d.ts +171 -0
- package/dist/item/itemIdentity.js +138 -0
- package/dist/item/itemInstanceRegistry.d.ts +32 -0
- package/dist/item/itemInstanceRegistry.js +34 -0
- package/dist/item/itemgen.d.ts +163 -0
- package/dist/item/itemgen.js +151 -0
- package/dist/item/modularItem.d.ts +5 -0
- package/dist/item/modularItem.js +5 -0
- package/dist/item/use.d.ts +5 -0
- package/dist/item/use.js +5 -0
- package/dist/item/useBehavior.d.ts +142 -0
- package/dist/item/useBehavior.js +105 -0
- package/dist/item/weapon.d.ts +5 -0
- package/dist/item/weapon.js +5 -0
- package/dist/math/scalar.d.ts +25 -0
- package/dist/math/scalar.js +47 -0
- package/dist/meta/changelog.d.ts +4 -1
- package/dist/meta/changelog.js +16 -2
- package/dist/movement/avoidance.d.ts +45 -0
- package/dist/movement/avoidance.js +123 -0
- package/dist/movement/cameraRig.d.ts +8 -0
- package/dist/movement/cameraRig.js +8 -0
- package/dist/movement/dash.d.ts +11 -0
- package/dist/movement/dash.js +11 -0
- package/dist/movement/formation.d.ts +135 -0
- package/dist/movement/formation.js +194 -0
- package/dist/movement/glideModel.d.ts +5 -0
- package/dist/movement/glideModel.js +5 -0
- package/dist/movement/grappleSwing.d.ts +5 -0
- package/dist/movement/grappleSwing.js +5 -0
- package/dist/movement/leaderTrail.d.ts +5 -0
- package/dist/movement/leaderTrail.js +5 -0
- package/dist/movement/movementModel.d.ts +35 -8
- package/dist/movement/movementModel.js +42 -14
- package/dist/movement/playerMovement.js +65 -10
- package/dist/movement/poseState.d.ts +13 -0
- package/dist/movement/poseState.js +16 -0
- package/dist/movement/steering.d.ts +8 -0
- package/dist/movement/steering.js +18 -0
- package/dist/multiplayer/combatSnapshot.d.ts +3 -0
- package/dist/multiplayer/combatSnapshot.js +3 -0
- package/dist/multiplayer/lagCompensation.d.ts +5 -0
- package/dist/multiplayer/lagCompensation.js +5 -0
- package/dist/multiplayer/presenceModel.d.ts +9 -1
- package/dist/multiplayer/presenceModel.js +9 -1
- package/dist/multiplayer/simultaneousCommit.d.ts +3 -0
- package/dist/multiplayer/simultaneousCommit.js +3 -0
- package/dist/multiplayer.d.ts +11 -0
- package/dist/multiplayer.js +11 -0
- package/dist/nav/pathFollow.d.ts +57 -0
- package/dist/nav/pathFollow.js +109 -0
- package/dist/orders/orderKinds.d.ts +156 -0
- package/dist/orders/orderKinds.js +197 -0
- package/dist/orders/orderQueue.d.ts +208 -0
- package/dist/orders/orderQueue.js +211 -0
- package/dist/physics/drivableVehicle.d.ts +29 -0
- package/dist/physics/drivableVehicle.js +16 -0
- package/dist/physics/kinematicVehicle.d.ts +21 -1
- package/dist/physics/kinematicVehicle.js +23 -8
- package/dist/physics/physicsWorld.d.ts +24 -12
- package/dist/physics/physicsWorld.js +11 -5
- package/dist/physics/radialImpulse.d.ts +25 -0
- package/dist/physics/radialImpulse.js +27 -0
- package/dist/procedural.d.ts +3 -0
- package/dist/procedural.js +3 -0
- package/dist/progression/statGraph.d.ts +116 -0
- package/dist/progression/statGraph.js +318 -0
- package/dist/puzzle/cellGrid.d.ts +9 -0
- package/dist/puzzle/cellGrid.js +9 -0
- package/dist/puzzle/fallingPiece.d.ts +9 -0
- package/dist/puzzle/fallingPiece.js +9 -0
- package/dist/puzzle/nonogram.d.ts +39 -0
- package/dist/puzzle/nonogram.js +136 -0
- package/dist/random/nameGen.d.ts +5 -0
- package/dist/random/nameGen.js +5 -0
- package/dist/random/pick.d.ts +8 -0
- package/dist/random/pick.js +31 -0
- package/dist/random/rng.d.ts +22 -0
- package/dist/random/rng.js +28 -8
- package/dist/random/seedLink.d.ts +4 -0
- package/dist/random/seedLink.js +4 -0
- package/dist/relation/keyedValues.d.ts +54 -0
- package/dist/relation/keyedValues.js +115 -0
- package/dist/relation/thresholds.d.ts +62 -0
- package/dist/relation/thresholds.js +62 -0
- package/dist/render/color.d.ts +12 -0
- package/dist/render/color.js +26 -0
- package/dist/render/lookPreset.d.ts +41 -0
- package/dist/render/lookPreset.js +29 -0
- package/dist/render/postProcessing.d.ts +20 -0
- package/dist/render/postProcessing.js +21 -1
- package/dist/rules/predicate.d.ts +53 -0
- package/dist/rules/predicate.js +64 -0
- package/dist/rules/ruleEffects.d.ts +38 -0
- package/dist/rules/ruleEffects.js +37 -0
- package/dist/rules/triggeredRules.d.ts +160 -0
- package/dist/rules/triggeredRules.js +241 -0
- package/dist/runtime/adapter.d.ts +42 -3
- package/dist/runtime/adapter.js +44 -1
- package/dist/runtime/cameraDirector.d.ts +1 -0
- package/dist/runtime/cameraDirector.js +1 -0
- package/dist/runtime/commandRunner.d.ts +1 -0
- package/dist/runtime/commandRunner.js +1 -0
- package/dist/runtime/context/combatFx.d.ts +23 -0
- package/dist/runtime/context/combatFx.js +161 -0
- package/dist/runtime/context/registries.d.ts +13 -0
- package/dist/runtime/context/registries.js +84 -0
- package/dist/runtime/context/worldItems.d.ts +21 -0
- package/dist/runtime/context/worldItems.js +37 -0
- package/dist/runtime/descriptors/baseline.d.ts +48 -0
- package/dist/runtime/descriptors/baseline.js +134 -0
- package/dist/runtime/descriptors/features.d.ts +74 -0
- package/dist/runtime/descriptors/features.js +281 -0
- package/dist/runtime/gameContext.d.ts +114 -13
- package/dist/runtime/gameContext.js +303 -395
- package/dist/runtime/gameRuntime.d.ts +1 -0
- package/dist/runtime/gameRuntime.js +1 -0
- package/dist/runtime/headlessRunner.d.ts +60 -0
- package/dist/runtime/headlessRunner.js +44 -0
- package/dist/runtime/hostPersistence.d.ts +12 -0
- package/dist/runtime/hostPersistence.js +12 -0
- package/dist/runtime/hostedGameRunner.d.ts +8 -3
- package/dist/runtime/hostedGameRunner.js +26 -3
- package/dist/runtime/hostedWorldSession.d.ts +12 -4
- package/dist/runtime/hostedWorldSession.js +11 -4
- package/dist/runtime/inputSnapshot.d.ts +8 -3
- package/dist/runtime/inputSnapshot.js +6 -2
- package/dist/runtime/motionIntents.d.ts +11 -2
- package/dist/runtime/motionIntents.js +16 -2
- package/dist/runtime/perContext.d.ts +15 -0
- package/dist/runtime/perContext.js +21 -0
- package/dist/runtime/runtimeSave.d.ts +79 -0
- package/dist/runtime/runtimeSave.js +105 -0
- package/dist/runtime/save.d.ts +4 -0
- package/dist/runtime/save.js +4 -0
- package/dist/runtime/snapshot.d.ts +7 -0
- package/dist/runtime/snapshot.js +7 -0
- package/dist/runtime/visibility.d.ts +2 -1
- package/dist/runtime/visibility.js +2 -1
- package/dist/runtime/worldChannel.d.ts +7 -3
- package/dist/runtime/worldChannel.js +51 -6
- package/dist/runtime/worldMirror.d.ts +14 -2
- package/dist/runtime/worldMirror.js +15 -2
- package/dist/runtime/worldProjection.d.ts +47 -0
- package/dist/runtime/worldProjection.js +52 -0
- package/dist/runtime/worldReplication.d.ts +30 -7
- package/dist/runtime/worldReplication.js +41 -9
- package/dist/runtime/worldSnapshot.d.ts +30 -3
- package/dist/runtime/worldSnapshot.js +20 -5
- package/dist/scene/assetCatalog.d.ts +21 -0
- package/dist/scene/assetCatalog.js +4 -0
- package/dist/scene/assetDiagnostics.d.ts +69 -0
- package/dist/scene/assetDiagnostics.js +110 -0
- package/dist/scene/assetGenerator.d.ts +65 -0
- package/dist/scene/assetGenerator.js +64 -0
- package/dist/scene/assetSpace.d.ts +137 -0
- package/dist/scene/assetSpace.js +259 -0
- package/dist/scene/authoredTriggers.d.ts +169 -0
- package/dist/scene/authoredTriggers.js +340 -0
- package/dist/scene/behaviorRuntime.d.ts +75 -0
- package/dist/scene/behaviorRuntime.js +217 -0
- package/dist/scene/behaviors.d.ts +14 -2
- package/dist/scene/behaviors.js +7 -2
- package/dist/scene/bodyBind.d.ts +60 -0
- package/dist/scene/bodyBind.js +51 -0
- package/dist/scene/builtinSceneKinds.d.ts +5 -0
- package/dist/scene/builtinSceneKinds.js +62 -0
- package/dist/scene/colliders.d.ts +13 -1
- package/dist/scene/colliders.js +37 -1
- package/dist/scene/entityStats.d.ts +11 -2
- package/dist/scene/entityStats.js +11 -2
- package/dist/scene/entityStore.d.ts +12 -1
- package/dist/scene/entityStore.js +15 -0
- package/dist/scene/facing.d.ts +18 -0
- package/dist/scene/facing.js +26 -0
- package/dist/scene/modelSockets.d.ts +33 -0
- package/dist/scene/modelSockets.js +29 -0
- package/dist/scene/objectQuery.d.ts +2 -0
- package/dist/scene/objectQuery.js +2 -0
- package/dist/scene/objectStore.d.ts +4 -0
- package/dist/scene/objectStore.js +6 -0
- package/dist/scene/possession.d.ts +8 -0
- package/dist/scene/possession.js +14 -0
- package/dist/scene/roster.d.ts +3 -0
- package/dist/scene/roster.js +12 -0
- package/dist/scene/sceneKinds.d.ts +240 -0
- package/dist/scene/sceneKinds.js +214 -0
- package/dist/scene/sceneOwnership.d.ts +169 -0
- package/dist/scene/sceneOwnership.js +179 -0
- package/dist/scene/selectionBookmarks.d.ts +93 -0
- package/dist/scene/selectionBookmarks.js +122 -0
- package/dist/scene/vehicleSeat.d.ts +68 -0
- package/dist/scene/vehicleSeat.js +59 -0
- package/dist/sensor/concealment.d.ts +3 -0
- package/dist/sensor/concealment.js +3 -0
- package/dist/sensor/freezeMonitor.d.ts +1 -0
- package/dist/sensor/freezeMonitor.js +1 -0
- package/dist/sensor/frustumSensor.d.ts +7 -3
- package/dist/sensor/frustumSensor.js +7 -3
- package/dist/sensor/hiddenStateProbe.d.ts +5 -2
- package/dist/sensor/hiddenStateProbe.js +5 -2
- package/dist/sensor/recordingBuffer.d.ts +2 -1
- package/dist/sensor/recordingBuffer.js +2 -1
- package/dist/sensor/replayLoop.d.ts +6 -2
- package/dist/sensor/replayLoop.js +6 -2
- package/dist/sensor/revealQuery.d.ts +2 -1
- package/dist/sensor/revealQuery.js +2 -1
- package/dist/sensor/visionCone.d.ts +10 -3
- package/dist/sensor/visionCone.js +10 -3
- package/dist/session/contestedChannel.d.ts +1 -0
- package/dist/session/contestedChannel.js +1 -0
- package/dist/session/extraction.d.ts +1 -0
- package/dist/session/extraction.js +1 -0
- package/dist/session/roles.d.ts +6 -0
- package/dist/session/roles.js +6 -0
- package/dist/session/roundState.d.ts +8 -0
- package/dist/session/roundState.js +2 -0
- package/dist/settings/settingsModel.d.ts +1 -0
- package/dist/settings/settingsModel.js +1 -0
- package/dist/stats/accumulatorMeter.d.ts +6 -0
- package/dist/stats/accumulatorMeter.js +6 -0
- package/dist/stats/eventMeter.d.ts +5 -0
- package/dist/stats/eventMeter.js +5 -0
- package/dist/stats/rollCheck.d.ts +5 -0
- package/dist/stats/rollCheck.js +5 -0
- package/dist/stats/statModifiers.d.ts +5 -0
- package/dist/stats/statModifiers.js +5 -0
- package/dist/store/defineKeyedStore.d.ts +38 -0
- package/dist/store/defineKeyedStore.js +42 -0
- package/dist/store/defineStore.d.ts +33 -0
- package/dist/store/defineStore.js +35 -0
- package/dist/store/observableKeyedStore.d.ts +5 -0
- package/dist/store/observableKeyedStore.js +34 -2
- package/dist/survival/decayMeter.d.ts +55 -0
- package/dist/survival/decayMeter.js +130 -55
- package/dist/survival/moodle.d.ts +2 -0
- package/dist/survival/regionHealth.d.ts +6 -0
- package/dist/survival/regionHealth.js +5 -0
- package/dist/tactics/fallingGrid.d.ts +4 -2
- package/dist/tactics/fallingGrid.js +4 -2
- package/dist/tactics/predictiveQuery.d.ts +3 -0
- package/dist/tactics/predictiveQuery.js +3 -0
- package/dist/tactics/snapshot.d.ts +2 -0
- package/dist/tactics/snapshot.js +2 -0
- package/dist/tactics/surface.d.ts +1 -0
- package/dist/tactics/surface.js +1 -0
- package/dist/tactics/tacticalGrid.d.ts +1 -0
- package/dist/tactics/tacticalGrid.js +1 -0
- package/dist/time/beatClock.d.ts +14 -4
- package/dist/time/beatClock.js +14 -4
- package/dist/time/calendarClock.d.ts +3 -0
- package/dist/time/calendarClock.js +3 -0
- package/dist/time/idleProgress.d.ts +4 -0
- package/dist/time/idleProgress.js +4 -0
- package/dist/time/simClock.d.ts +2 -0
- package/dist/time/simClock.js +20 -5
- package/dist/ui/actionModel.d.ts +110 -0
- package/dist/ui/actionModel.js +159 -0
- package/dist/ui/gameLayout.d.ts +30 -11
- package/dist/ui/gameLayout.js +30 -11
- package/dist/ui/hudDocument.d.ts +114 -0
- package/dist/ui/hudDocument.js +220 -0
- package/dist/ui/hudLayout.d.ts +33 -1
- package/dist/ui/hudLayout.js +204 -17
- package/dist/ui/selectionModel.d.ts +92 -0
- package/dist/ui/selectionModel.js +88 -0
- package/dist/ui/tooltipModel.d.ts +63 -0
- package/dist/ui/tooltipModel.js +82 -0
- package/dist/ui.d.ts +15 -0
- package/dist/ui.js +15 -0
- package/dist/visibility/bounds.d.ts +8 -1
- package/dist/visibility/bounds.js +8 -1
- package/dist/visibility/frustum.d.ts +12 -3
- package/dist/visibility/frustum.js +12 -3
- package/dist/work/jobQueue.d.ts +201 -0
- package/dist/work/jobQueue.js +253 -0
- package/dist/work/unitTraining.d.ts +58 -0
- package/dist/work/unitTraining.js +52 -0
- package/dist/world/authoredObjects.d.ts +58 -0
- package/dist/world/authoredObjects.js +69 -0
- package/dist/world/buildingGenerator.d.ts +18 -0
- package/dist/world/buildingGenerator.js +62 -0
- package/dist/world/buildings.d.ts +5 -0
- package/dist/world/buildings.js +5 -0
- package/dist/world/catenary.d.ts +22 -0
- package/dist/world/catenary.js +69 -0
- package/dist/world/features.d.ts +115 -7
- package/dist/world/features.js +56 -5
- package/dist/world/footprintGrid.d.ts +59 -0
- package/dist/world/footprintGrid.js +141 -0
- package/dist/world/geometry.d.ts +64 -0
- package/dist/world/geometry.js +94 -0
- package/dist/world/grassKind.d.ts +51 -0
- package/dist/world/grassKind.js +101 -0
- package/dist/world/pathInstances.d.ts +27 -0
- package/dist/world/pathInstances.js +27 -0
- package/dist/world/pathTerrain.d.ts +80 -0
- package/dist/world/pathTerrain.js +142 -0
- package/dist/world/placeAsset.d.ts +81 -0
- package/dist/world/placeAsset.js +77 -0
- package/dist/world/placement.d.ts +4 -0
- package/dist/world/placement.js +4 -0
- package/dist/world/placementController.d.ts +6 -0
- package/dist/world/placementController.js +6 -0
- package/dist/world/polyline.d.ts +34 -0
- package/dist/world/polyline.js +81 -0
- package/dist/world/roads.d.ts +8 -0
- package/dist/world/roads.js +38 -0
- package/dist/world/scatterRegion.d.ts +164 -0
- package/dist/world/scatterRegion.js +409 -0
- package/dist/world/sceneShapes.d.ts +43 -0
- package/dist/world/sceneShapes.js +1 -0
- package/dist/world/segment.d.ts +27 -0
- package/dist/world/segment.js +43 -0
- package/dist/world/soilKind.d.ts +48 -0
- package/dist/world/soilKind.js +92 -0
- package/dist/world/spatialSample.d.ts +241 -0
- package/dist/world/spatialSample.js +465 -0
- package/dist/world/terraform.d.ts +213 -1
- package/dist/world/terraform.js +655 -20
- package/dist/world/terrain.d.ts +119 -20
- package/dist/world/terrain.js +247 -41
- package/dist/world/terrainGuides.d.ts +182 -0
- package/dist/world/terrainGuides.js +343 -0
- package/dist/world/vec2.d.ts +81 -0
- package/dist/world/vec2.js +128 -0
- package/dist/world/vec3.d.ts +49 -0
- package/dist/world/vec3.js +76 -0
- package/dist/world/vegetation.d.ts +71 -0
- package/dist/world/vegetation.js +151 -0
- package/dist/world/visibilityField.d.ts +154 -0
- package/dist/world/visibilityField.js +271 -0
- package/dist/world/volumetricClouds.d.ts +52 -0
- package/dist/world/volumetricClouds.js +43 -0
- package/dist/world/walls.d.ts +9 -0
- package/dist/world/walls.js +9 -0
- package/dist/world/waterKind.d.ts +55 -0
- package/dist/world/waterKind.js +99 -0
- package/dist/world.d.ts +132 -0
- package/dist/world.js +132 -0
- package/package.json +32 -8
- package/skills/jgengine/SKILL.md +51 -0
- package/skills/jgengine/api.md +434 -0
- package/skills/jgengine/capabilities.md +29 -0
- package/skills/jgengine/reference-cartridge.md +72 -0
- package/skills/jgengine-combat/SKILL.md +34 -0
- package/skills/jgengine-combat/api.md +549 -0
- package/skills/jgengine-combat/capabilities.md +169 -0
- package/skills/jgengine-combat/reference.md +98 -0
- package/skills/jgengine-gameplay/SKILL.md +39 -0
- package/skills/jgengine-gameplay/api.md +1794 -0
- package/skills/jgengine-gameplay/capabilities.md +378 -0
- package/skills/jgengine-gameplay/reference-systems.md +60 -0
- package/skills/jgengine-world/SKILL.md +38 -0
- package/skills/jgengine-world/api.md +2652 -0
- package/skills/jgengine-world/capabilities.md +370 -0
- package/skills/jgengine-world/reference.md +222 -0
- package/dist/cartridge/runtime.d.ts +0 -15
- package/dist/cartridge/runtime.js +0 -556
- package/dist/cartridge/spec.d.ts +0 -188
- package/dist/cartridge/spec.js +0 -19
- package/dist/cartridge/validate.d.ts +0 -2
- package/dist/cartridge/validate.js +0 -78
- package/dist/store/engineStore.d.ts +0 -22
- package/dist/store/engineStore.js +0 -50
- package/dist/store/features.d.ts +0 -10
- package/dist/store/features.js +0 -23
- package/llms.txt +0 -5389
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Volumetric cloud layer config for `sky()` — a raymarched cloud slab mounted from the environment
|
|
3
|
+
* `sky` seam. Pure config + defaulting here; the raymarch shader lives in the `shell` renderer
|
|
4
|
+
* (`environment/VolumetricClouds.tsx`), mounted alongside `SkyDome` whenever a sky descriptor carries
|
|
5
|
+
* this field. Off by default — omit `volumetricClouds` on `sky({...})` and no layer mounts.
|
|
6
|
+
*
|
|
7
|
+
* @capability volumetric-clouds raymarched cloud layer sky option
|
|
8
|
+
*/
|
|
9
|
+
/** Volumetric cloud layer params, as authored on `sky({ volumetricClouds })`. All fields optional. */
|
|
10
|
+
export interface VolumetricCloudsConfig {
|
|
11
|
+
/** Fraction of the sky covered by cloud mass, 0..1. Higher = more overcast. Default 0.42. */
|
|
12
|
+
coverage?: number;
|
|
13
|
+
/** Raymarch density multiplier — thicker, more opaque cloud bodies at higher values. Default 1.5. */
|
|
14
|
+
density?: number;
|
|
15
|
+
/** Cloud layer base altitude in world units. Default 90. */
|
|
16
|
+
height?: number;
|
|
17
|
+
/** Cloud layer vertical thickness in world units. Default 55. */
|
|
18
|
+
thickness?: number;
|
|
19
|
+
/** Horizontal drift speed, world units/second. Default 1.1. */
|
|
20
|
+
speed?: number;
|
|
21
|
+
/** Noise feature scale — world units per cloud puff; larger = bigger, fewer puffs. Default 140. */
|
|
22
|
+
scale?: number;
|
|
23
|
+
/** Cloud body base color (shadowed side). Default "#c9d3de". */
|
|
24
|
+
color?: string;
|
|
25
|
+
/** Sun-facing lit edge color (silver-lining / forward scatter). Default "#fff6e0". */
|
|
26
|
+
sunColor?: string;
|
|
27
|
+
/** Forward sun-scatter strength, 0..1 — brighter, more luminous edges toward the sun. Default 0.9. */
|
|
28
|
+
sunScatter?: number;
|
|
29
|
+
/** Seed string; same seed reproduces the same cloud layout. */
|
|
30
|
+
seed?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Fully-defaulted volumetric cloud params, resolved from a `VolumetricCloudsConfig`. */
|
|
33
|
+
export interface VolumetricCloudsRules {
|
|
34
|
+
coverage: number;
|
|
35
|
+
density: number;
|
|
36
|
+
height: number;
|
|
37
|
+
thickness: number;
|
|
38
|
+
speed: number;
|
|
39
|
+
scale: number;
|
|
40
|
+
color: string;
|
|
41
|
+
sunColor: string;
|
|
42
|
+
sunScatter: number;
|
|
43
|
+
seed: string;
|
|
44
|
+
}
|
|
45
|
+
/** Volumetric cloud defaults: a moderate, drifting cumulus layer. */
|
|
46
|
+
export declare const VOLUMETRIC_CLOUDS_DEFAULTS: VolumetricCloudsRules;
|
|
47
|
+
/**
|
|
48
|
+
* Resolve a `VolumetricCloudsConfig` into fully-defaulted, clamped rules — pure, no shader/DOM
|
|
49
|
+
* involved, so the defaulting logic is unit-testable without a renderer.
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveVolumetricClouds(config?: VolumetricCloudsConfig): VolumetricCloudsRules;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Volumetric cloud layer config for `sky()` — a raymarched cloud slab mounted from the environment
|
|
3
|
+
* `sky` seam. Pure config + defaulting here; the raymarch shader lives in the `shell` renderer
|
|
4
|
+
* (`environment/VolumetricClouds.tsx`), mounted alongside `SkyDome` whenever a sky descriptor carries
|
|
5
|
+
* this field. Off by default — omit `volumetricClouds` on `sky({...})` and no layer mounts.
|
|
6
|
+
*
|
|
7
|
+
* @capability volumetric-clouds raymarched cloud layer sky option
|
|
8
|
+
*/
|
|
9
|
+
/** Volumetric cloud defaults: a moderate, drifting cumulus layer. */
|
|
10
|
+
export const VOLUMETRIC_CLOUDS_DEFAULTS = {
|
|
11
|
+
coverage: 0.42,
|
|
12
|
+
density: 1.5,
|
|
13
|
+
height: 90,
|
|
14
|
+
thickness: 55,
|
|
15
|
+
speed: 1.1,
|
|
16
|
+
scale: 140,
|
|
17
|
+
color: "#c9d3de",
|
|
18
|
+
sunColor: "#fff6e0",
|
|
19
|
+
sunScatter: 0.9,
|
|
20
|
+
seed: "",
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Resolve a `VolumetricCloudsConfig` into fully-defaulted, clamped rules — pure, no shader/DOM
|
|
24
|
+
* involved, so the defaulting logic is unit-testable without a renderer.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export function resolveVolumetricClouds(config = {}) {
|
|
28
|
+
return {
|
|
29
|
+
coverage: clamp01(config.coverage ?? VOLUMETRIC_CLOUDS_DEFAULTS.coverage),
|
|
30
|
+
density: Math.max(0, config.density ?? VOLUMETRIC_CLOUDS_DEFAULTS.density),
|
|
31
|
+
height: config.height ?? VOLUMETRIC_CLOUDS_DEFAULTS.height,
|
|
32
|
+
thickness: Math.max(1, config.thickness ?? VOLUMETRIC_CLOUDS_DEFAULTS.thickness),
|
|
33
|
+
speed: config.speed ?? VOLUMETRIC_CLOUDS_DEFAULTS.speed,
|
|
34
|
+
scale: Math.max(1, config.scale ?? VOLUMETRIC_CLOUDS_DEFAULTS.scale),
|
|
35
|
+
color: config.color ?? VOLUMETRIC_CLOUDS_DEFAULTS.color,
|
|
36
|
+
sunColor: config.sunColor ?? VOLUMETRIC_CLOUDS_DEFAULTS.sunColor,
|
|
37
|
+
sunScatter: clamp01(config.sunScatter ?? VOLUMETRIC_CLOUDS_DEFAULTS.sunScatter),
|
|
38
|
+
seed: config.seed ?? VOLUMETRIC_CLOUDS_DEFAULTS.seed,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function clamp01(value) {
|
|
42
|
+
return Math.min(1, Math.max(0, value));
|
|
43
|
+
}
|
package/dist/world/walls.d.ts
CHANGED
|
@@ -27,11 +27,17 @@ export interface RoofConfig {
|
|
|
27
27
|
pitch?: number;
|
|
28
28
|
overhang?: number;
|
|
29
29
|
}
|
|
30
|
+
/** @internal */
|
|
30
31
|
export declare function wallSegments(points: readonly Vec2[], closed: boolean): WallSegment[];
|
|
32
|
+
/** @internal */
|
|
31
33
|
export declare function isEnclosed(points: readonly Vec2[], tolerance?: number): boolean;
|
|
34
|
+
/** @internal */
|
|
32
35
|
export declare function enclosePath(points: readonly Vec2[], tolerance?: number): readonly Vec2[];
|
|
36
|
+
/** @internal */
|
|
33
37
|
export declare function polygonArea(polygon: readonly Vec2[]): number;
|
|
38
|
+
/** @internal */
|
|
34
39
|
export declare function footprintFromWalls(points: readonly Vec2[], tolerance?: number): EnclosedFootprint | null;
|
|
40
|
+
/** @internal */
|
|
35
41
|
export declare function autoRoof(footprint: EnclosedFootprint, config?: RoofConfig): RoofPlan;
|
|
36
42
|
export type PaintTarget = "floor" | "wall";
|
|
37
43
|
export interface SurfacePaintStore {
|
|
@@ -42,6 +48,7 @@ export interface SurfacePaintStore {
|
|
|
42
48
|
snapshot(): Record<PaintTarget, Record<string, string>>;
|
|
43
49
|
restore(snapshot: Record<PaintTarget, Record<string, string>>): void;
|
|
44
50
|
}
|
|
51
|
+
/** @internal */
|
|
45
52
|
export declare function createSurfacePaint(): SurfacePaintStore;
|
|
46
53
|
export interface WallDrawTool {
|
|
47
54
|
addPoint(point: Vec2, snap?: number): Vec2;
|
|
@@ -54,8 +61,10 @@ export interface WallDrawTool {
|
|
|
54
61
|
footprint(): EnclosedFootprint | null;
|
|
55
62
|
roof(config?: RoofConfig): RoofPlan | null;
|
|
56
63
|
}
|
|
64
|
+
/** @internal */
|
|
57
65
|
export declare function createWallDrawTool(config?: {
|
|
58
66
|
snap?: number;
|
|
59
67
|
closeTolerance?: number;
|
|
60
68
|
}): WallDrawTool;
|
|
69
|
+
/** @internal */
|
|
61
70
|
export declare function wallSegmentBounds(segment: WallSegment, thickness: number): Aabb;
|
package/dist/world/walls.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { footprintAabb } from "./geometry.js";
|
|
2
|
+
/** @internal */
|
|
2
3
|
export function wallSegments(points, closed) {
|
|
3
4
|
const segments = [];
|
|
4
5
|
const count = closed ? points.length : points.length - 1;
|
|
@@ -11,6 +12,7 @@ export function wallSegments(points, closed) {
|
|
|
11
12
|
}
|
|
12
13
|
return segments;
|
|
13
14
|
}
|
|
15
|
+
/** @internal */
|
|
14
16
|
export function isEnclosed(points, tolerance = 0.5) {
|
|
15
17
|
if (points.length < 3)
|
|
16
18
|
return false;
|
|
@@ -18,6 +20,7 @@ export function isEnclosed(points, tolerance = 0.5) {
|
|
|
18
20
|
const last = points[points.length - 1];
|
|
19
21
|
return Math.hypot(first[0] - last[0], first[1] - last[1]) <= tolerance;
|
|
20
22
|
}
|
|
23
|
+
/** @internal */
|
|
21
24
|
export function enclosePath(points, tolerance = 0.5) {
|
|
22
25
|
if (points.length < 3)
|
|
23
26
|
return points;
|
|
@@ -25,6 +28,7 @@ export function enclosePath(points, tolerance = 0.5) {
|
|
|
25
28
|
return points;
|
|
26
29
|
return points.slice(0, points.length - 1);
|
|
27
30
|
}
|
|
31
|
+
/** @internal */
|
|
28
32
|
export function polygonArea(polygon) {
|
|
29
33
|
let sum = 0;
|
|
30
34
|
for (let index = 0; index < polygon.length; index += 1) {
|
|
@@ -34,6 +38,7 @@ export function polygonArea(polygon) {
|
|
|
34
38
|
}
|
|
35
39
|
return Math.abs(sum) / 2;
|
|
36
40
|
}
|
|
41
|
+
/** @internal */
|
|
37
42
|
export function footprintFromWalls(points, tolerance = 0.5) {
|
|
38
43
|
const closed = isEnclosed(points, tolerance);
|
|
39
44
|
const polygon = enclosePath(points, tolerance);
|
|
@@ -65,6 +70,7 @@ export function footprintFromWalls(points, tolerance = 0.5) {
|
|
|
65
70
|
closed,
|
|
66
71
|
};
|
|
67
72
|
}
|
|
73
|
+
/** @internal */
|
|
68
74
|
export function autoRoof(footprint, config = {}) {
|
|
69
75
|
const style = config.style ?? "hip";
|
|
70
76
|
const eaveHeight = config.eaveHeight ?? 3;
|
|
@@ -131,6 +137,7 @@ export function autoRoof(footprint, config = {}) {
|
|
|
131
137
|
}
|
|
132
138
|
return { style, ridge, apexHeight, eaveHeight, faces };
|
|
133
139
|
}
|
|
140
|
+
/** @internal */
|
|
134
141
|
export function createSurfacePaint() {
|
|
135
142
|
const maps = {
|
|
136
143
|
floor: new Map(),
|
|
@@ -166,6 +173,7 @@ function snapPoint(point, grid) {
|
|
|
166
173
|
return point;
|
|
167
174
|
return [Math.round(point[0] / grid) * grid, Math.round(point[1] / grid) * grid];
|
|
168
175
|
}
|
|
176
|
+
/** @internal */
|
|
169
177
|
export function createWallDrawTool(config = {}) {
|
|
170
178
|
const defaultSnap = config.snap ?? 0;
|
|
171
179
|
const closeTolerance = config.closeTolerance ?? 0.5;
|
|
@@ -214,6 +222,7 @@ export function createWallDrawTool(config = {}) {
|
|
|
214
222
|
},
|
|
215
223
|
};
|
|
216
224
|
}
|
|
225
|
+
/** @internal */
|
|
217
226
|
export function wallSegmentBounds(segment, thickness) {
|
|
218
227
|
const center = [(segment.from[0] + segment.to[0]) / 2, (segment.from[1] + segment.to[1]) / 2];
|
|
219
228
|
const quarterTurns = Math.abs(Math.round(segment.angle / (Math.PI / 2))) % 2;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `water` studio: a parametric water surface authored as a box volume — its XZ footprint becomes the
|
|
3
|
+
* water plane, its top face the water height. Pure config here (color/wave/foam/opacity params + a
|
|
4
|
+
* footprint resolver); the animated shader plane lives in the `shell` renderer, which maps these
|
|
5
|
+
* params onto the existing Ocean material. A scene kind so a pond or moat is dragged in the editor and
|
|
6
|
+
* tuned with sliders, persisted in `editor.scene.json`. Distinct from the infinite `waterSurface`
|
|
7
|
+
* ocean primitive (`./water`) — this is a bounded, editor-authored patch.
|
|
8
|
+
*
|
|
9
|
+
* @capability water parametric water surface volume
|
|
10
|
+
*/
|
|
11
|
+
import { type ParamSchema, type SceneKindObject } from "../scene/sceneKinds.js";
|
|
12
|
+
/** The editor volume kind marking a box as a water surface. */
|
|
13
|
+
export declare const WATER_VOLUME_KIND = "water";
|
|
14
|
+
/** Fully-defaulted water surface params parsed from a volume's `meta`. */
|
|
15
|
+
export interface WaterRules {
|
|
16
|
+
/** Deep-water base color (hex). */
|
|
17
|
+
color: string;
|
|
18
|
+
/** Shallow/edge tint blended toward the shore (hex). */
|
|
19
|
+
shallowColor: string;
|
|
20
|
+
/** Wave amplitude in meters. */
|
|
21
|
+
waveHeight: number;
|
|
22
|
+
/** Wave scroll speed multiplier. */
|
|
23
|
+
waveSpeed: number;
|
|
24
|
+
/** Spatial wave frequency (waves per meter). */
|
|
25
|
+
waveScale: number;
|
|
26
|
+
/** Foam band width at the shoreline, meters. */
|
|
27
|
+
foam: number;
|
|
28
|
+
/** Surface opacity, 0..1. */
|
|
29
|
+
opacity: number;
|
|
30
|
+
/** Reflection/metalness strength, 0..1. */
|
|
31
|
+
reflectivity: number;
|
|
32
|
+
}
|
|
33
|
+
/** Water defaults: a calm blue-green pond with a soft foam edge. */
|
|
34
|
+
export declare const WATER_DEFAULTS: WaterRules;
|
|
35
|
+
/** The water parameter schema — drives the inspector and `meta` parse via the studio seam. */
|
|
36
|
+
export declare const WATER_SCHEMA: ParamSchema;
|
|
37
|
+
/** Parse a volume's `meta` into fully-defaulted water rules. @internal */
|
|
38
|
+
export declare function readWaterRules(meta: Record<string, unknown> | undefined): WaterRules;
|
|
39
|
+
/** A resolved water surface: world-space plane center/size (XZ) at surface height `y`, plus its params. */
|
|
40
|
+
export interface ResolvedWater {
|
|
41
|
+
center: readonly [number, number, number];
|
|
42
|
+
/** Full width (X) and depth (Z) of the water plane in meters. */
|
|
43
|
+
size: readonly [number, number];
|
|
44
|
+
rules: WaterRules;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Resolve a water volume into a flat surface: the box footprint (`halfExtents`, else `radius`) becomes
|
|
48
|
+
* the plane size, the box top (`center.y + halfExtents.y`) the water height. Returns null for a
|
|
49
|
+
* degenerate footprint. Reads footprint from the object's `halfExtents`/`radius` meta mirror written
|
|
50
|
+
* by the volume, falling back to a 20 m square.
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveWaterObject(object: SceneKindObject): ResolvedWater | null;
|
|
54
|
+
/** Registers the `water` scene kind (schema + resolver). Called by {@link registerBuiltinSceneKinds}. @internal */
|
|
55
|
+
export declare function registerWaterKind(): void;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `water` studio: a parametric water surface authored as a box volume — its XZ footprint becomes the
|
|
3
|
+
* water plane, its top face the water height. Pure config here (color/wave/foam/opacity params + a
|
|
4
|
+
* footprint resolver); the animated shader plane lives in the `shell` renderer, which maps these
|
|
5
|
+
* params onto the existing Ocean material. A scene kind so a pond or moat is dragged in the editor and
|
|
6
|
+
* tuned with sliders, persisted in `editor.scene.json`. Distinct from the infinite `waterSurface`
|
|
7
|
+
* ocean primitive (`./water`) — this is a bounded, editor-authored patch.
|
|
8
|
+
*
|
|
9
|
+
* @capability water parametric water surface volume
|
|
10
|
+
*/
|
|
11
|
+
import { registerSceneKind } from "../scene/sceneKinds.js";
|
|
12
|
+
/** The editor volume kind marking a box as a water surface. */
|
|
13
|
+
export const WATER_VOLUME_KIND = "water";
|
|
14
|
+
/** Water defaults: a calm blue-green pond with a soft foam edge. */
|
|
15
|
+
export const WATER_DEFAULTS = {
|
|
16
|
+
color: "#1c6c86",
|
|
17
|
+
shallowColor: "#4bb6bf",
|
|
18
|
+
waveHeight: 0.12,
|
|
19
|
+
waveSpeed: 0.6,
|
|
20
|
+
waveScale: 0.35,
|
|
21
|
+
foam: 1.2,
|
|
22
|
+
opacity: 0.86,
|
|
23
|
+
reflectivity: 0.4,
|
|
24
|
+
};
|
|
25
|
+
/** The water parameter schema — drives the inspector and `meta` parse via the studio seam. */
|
|
26
|
+
export const WATER_SCHEMA = {
|
|
27
|
+
fields: [
|
|
28
|
+
{ type: "color", key: "color", label: "deep color", default: WATER_DEFAULTS.color },
|
|
29
|
+
{ type: "color", key: "shallowColor", label: "shallow color", default: WATER_DEFAULTS.shallowColor },
|
|
30
|
+
{ type: "range", key: "waveHeight", label: "wave height", min: 0, max: 1, step: 0.01, default: WATER_DEFAULTS.waveHeight, unit: "m" },
|
|
31
|
+
{ type: "range", key: "waveSpeed", label: "wave speed", min: 0, max: 3, step: 0.05, default: WATER_DEFAULTS.waveSpeed },
|
|
32
|
+
{ type: "range", key: "waveScale", label: "wave scale", min: 0.02, max: 2, step: 0.02, default: WATER_DEFAULTS.waveScale },
|
|
33
|
+
{ type: "range", key: "foam", label: "foam edge", min: 0, max: 6, step: 0.1, default: WATER_DEFAULTS.foam, unit: "m" },
|
|
34
|
+
{ type: "range", key: "opacity", label: "opacity", min: 0.1, max: 1, step: 0.01, default: WATER_DEFAULTS.opacity },
|
|
35
|
+
{ type: "range", key: "reflectivity", label: "reflectivity", min: 0, max: 1, step: 0.01, default: WATER_DEFAULTS.reflectivity },
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
function metaNumber(meta, key, fallback) {
|
|
39
|
+
const value = meta?.[key];
|
|
40
|
+
return typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
41
|
+
}
|
|
42
|
+
function metaString(meta, key, fallback) {
|
|
43
|
+
const value = meta?.[key];
|
|
44
|
+
return typeof value === "string" ? value : fallback;
|
|
45
|
+
}
|
|
46
|
+
/** Parse a volume's `meta` into fully-defaulted water rules. @internal */
|
|
47
|
+
export function readWaterRules(meta) {
|
|
48
|
+
return {
|
|
49
|
+
color: metaString(meta, "color", WATER_DEFAULTS.color),
|
|
50
|
+
shallowColor: metaString(meta, "shallowColor", WATER_DEFAULTS.shallowColor),
|
|
51
|
+
waveHeight: Math.max(0, metaNumber(meta, "waveHeight", WATER_DEFAULTS.waveHeight)),
|
|
52
|
+
waveSpeed: Math.max(0, metaNumber(meta, "waveSpeed", WATER_DEFAULTS.waveSpeed)),
|
|
53
|
+
waveScale: Math.max(0.01, metaNumber(meta, "waveScale", WATER_DEFAULTS.waveScale)),
|
|
54
|
+
foam: Math.max(0, metaNumber(meta, "foam", WATER_DEFAULTS.foam)),
|
|
55
|
+
opacity: Math.min(1, Math.max(0, metaNumber(meta, "opacity", WATER_DEFAULTS.opacity))),
|
|
56
|
+
reflectivity: Math.min(1, Math.max(0, metaNumber(meta, "reflectivity", WATER_DEFAULTS.reflectivity))),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** Reads a numeric field off a possibly-untyped `{x,y,z}`-ish object. */
|
|
60
|
+
function axis(value) {
|
|
61
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Resolve a water volume into a flat surface: the box footprint (`halfExtents`, else `radius`) becomes
|
|
65
|
+
* the plane size, the box top (`center.y + halfExtents.y`) the water height. Returns null for a
|
|
66
|
+
* degenerate footprint. Reads footprint from the object's `halfExtents`/`radius` meta mirror written
|
|
67
|
+
* by the volume, falling back to a 20 m square.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export function resolveWaterObject(object) {
|
|
71
|
+
const center = object.center ?? object.position;
|
|
72
|
+
if (center === undefined)
|
|
73
|
+
return null;
|
|
74
|
+
const meta = object.meta;
|
|
75
|
+
const he = object.halfExtents;
|
|
76
|
+
const radius = object.radius ?? axis(meta?.["radius"]);
|
|
77
|
+
const halfX = axis(he?.x) ?? radius ?? 10;
|
|
78
|
+
const halfZ = axis(he?.z) ?? radius ?? 10;
|
|
79
|
+
const halfY = axis(he?.y) ?? 0;
|
|
80
|
+
const width = Math.max(0.1, halfX * 2);
|
|
81
|
+
const depth = Math.max(0.1, halfZ * 2);
|
|
82
|
+
return { center: [center.x, center.y + halfY, center.z], size: [width, depth], rules: readWaterRules(meta) };
|
|
83
|
+
}
|
|
84
|
+
/** Registers the `water` scene kind (schema + resolver). Called by {@link registerBuiltinSceneKinds}. @internal */
|
|
85
|
+
export function registerWaterKind() {
|
|
86
|
+
registerSceneKind({
|
|
87
|
+
kind: WATER_VOLUME_KIND,
|
|
88
|
+
target: "volume",
|
|
89
|
+
label: "Water surface",
|
|
90
|
+
addCategory: "Studios",
|
|
91
|
+
accent: "#38bdf8",
|
|
92
|
+
schema: WATER_SCHEMA,
|
|
93
|
+
resolve: (object) => resolveWaterObject(object),
|
|
94
|
+
note: (object) => {
|
|
95
|
+
const resolved = resolveWaterObject(object);
|
|
96
|
+
return resolved === null ? "Give the volume a box footprint." : `${Math.round(resolved.size[0])}×${Math.round(resolved.size[1])} m surface`;
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
}
|
package/dist/world.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export { type HeatConfig, type HeatGain, type HeatLevelDef, type HeatState } from "./ai/heatSystem.js";
|
|
2
|
+
export { advanceInterestGate, createInterestCensus, createInterestGateState, interestPhase, type InterestCensus, type InterestCensusAccumulator, type InterestGateInput, type InterestGateState, type InterestGateStep, type InterestSchedulerConfig, type InterestState, type InterestTier, } from "./ai/interestScheduler.js";
|
|
3
|
+
export { type Job, type JobDef, type JobReport } from "./ai/jobBoard.js";
|
|
4
|
+
export { advanceSpawnDirector, advanceWave, createSpawnDirectorState, pickSpawnPoint, raiseAlert, type SpawnDirectorConfig, type SpawnDirectorState, type SpawnEntry, type SpawnRequest, type WaveManifest, } from "./ai/spawnDirector.js";
|
|
5
|
+
export { acquireTarget, createTargetAcquirer, type AcquisitionEnvelope, type AcquisitionPolicy, type AcquisitionResult, type AcquisitionRetention, type TargetAcquirer, } from "./ai/targetAcquisition.js";
|
|
6
|
+
export { createThreatTable, type ThreatTable } from "./ai/threat.js";
|
|
7
|
+
export { createAreaEffectField, type AreaEffectEvent, type AreaEffectField, type AreaEventKind, type AreaFieldState, type AreaLeaveReason, type AreaMembership, type AreaShape, type AreaSourceSpec, type AreaStepInput, } from "./area/areaEffectField.js";
|
|
8
|
+
export { cappedStacks, extremumStack, independentStacks, sumMagnitude, uniqueByStackKey, type AreaStackPolicy, type MagnitudeOf, } from "./area/stackPolicy.js";
|
|
9
|
+
export { computeFalloffGain, distance3, resolveEmitterGain, type AudioBusDef, type AudioFalloffConfig, type SoundDef, } from "./audio/audioFalloff.js";
|
|
10
|
+
export { mtof, notesInWindow, themeLoopSeconds, type MusicInstrument, type MusicTheme, type NoteEvent, } from "./audio/music.js";
|
|
11
|
+
export { type NoiseVoice, type SynthPatch, type ToneVoice } from "./audio/synth.js";
|
|
12
|
+
export { createFactionGraph, createFactionRoster, type FactionDef } from "./faction/factions.js";
|
|
13
|
+
export { DEFAULT_REPUTATION_TIERS, createReputationLedger, effectiveRelation, tierForStanding, } from "./faction/reputation.js";
|
|
14
|
+
export { controlGroupKey, resolveControlGroupIntent, type ControlGroupInput, type ControlGroupIntent, type ControlGroupOptions, } from "./input/controlGroups.js";
|
|
15
|
+
export { buildContextMenu, contextVerb, contextVerbInput, type ContextMenu, type ContextVerb, } from "./interaction/contextMenu.js";
|
|
16
|
+
export { LOCK_ACTIONS, generateLock, solveLock, solveLockPath, stepLock, visibleCells, type LockAction, type LockCell, type LockSpec, type LockStepResult, type LockTierSpec, } from "./interaction/lockpick.js";
|
|
17
|
+
export { command, gauge, keybind, label, proximityPrompt, resolveActivePrompt, type PositionedPrompt, type ProximityPrompt, } from "./interaction/proximityPrompt.js";
|
|
18
|
+
export { evaluateQteSequence, pendingQteStep, type QteStep } from "./interaction/qte.js";
|
|
19
|
+
export { evaluateSkillCheck, skillCheckZoneAt, type SkillCheckConfig, type SkillCheckResult, } from "./interaction/skillCheck.js";
|
|
20
|
+
export { resolveLocalAvoidance, type AvoidanceAgent, type LocalAvoidanceOptions } from "./movement/avoidance.js";
|
|
21
|
+
export { assignFormationSlots, boxFormation, circleFormation, facingYaw, lineFormation, placeFormation, wedgeFormation, type BoxFormationOptions, type CircleFormationOptions, type FormationSlotGenerator, type LineFormationOptions, type SlotAssignmentOptions, type WedgeFormationOptions, } from "./movement/formation.js";
|
|
22
|
+
export { createGlideModel } from "./movement/glideModel.js";
|
|
23
|
+
export { createGrappleSwing } from "./movement/grappleSwing.js";
|
|
24
|
+
export { createLeaderTrail } from "./movement/leaderTrail.js";
|
|
25
|
+
export { MOVEMENT_TUNING } from "./movement/movementModel.js";
|
|
26
|
+
export { resolvePlayerMovementTuning, stepPlayerMovement } from "./movement/playerMovement.js";
|
|
27
|
+
export { POSE_HITBOX, createPoseState, type MovementPose } from "./movement/poseState.js";
|
|
28
|
+
export { steerYaw } from "./movement/steering.js";
|
|
29
|
+
export { constrainToNavGrid } from "./nav/navConstrain.js";
|
|
30
|
+
export { populateNavGridFromEnvironment } from "./nav/navFromEnvironment.js";
|
|
31
|
+
export { createNavGrid, findPath, slopeStepCost, type NavGrid, type NavPoint } from "./nav/navGrid.js";
|
|
32
|
+
export { advancePathFollow, createPathFollow, pathFollowProgress, pathFollowSeek, pathFromNav, pathLength, type PathFollowConfig, type PathFollowProgress, type PathFollowState, type PathProgress, type Waypoint, } from "./nav/pathFollow.js";
|
|
33
|
+
export { defineAttackMoveOrder, defineHoldOrder, defineMoveOrder, definePatrolOrder, defineStopOrder, defineTargetedOrder, type AttackMoveOrderPayload, type EmptyOrderPayload, type EngagementKindConfig, type EngagementOrderState, type MoveOrderPayload, type OrderKindConfig, type OrderMoveResult, type OrderMover, type OrderTargeting, type PatrolOrderPayload, type PatrolOrderState, type TargetedOrderPayload, } from "./orders/orderKinds.js";
|
|
34
|
+
export { createOrderQueue, createOrderRegistry, type Order, type OrderCancelReason, type OrderEvent, type OrderIssueResult, type OrderKind, type OrderOutcome, type OrderPhase, type OrderProgress, type OrderQueue, type OrderQueueOptions, type OrderQueuePolicy, type OrderQueueState, type OrderRegistry, type OrderRejection, type OrderRequest, type OrderStartResult, type OrderTickReport, type OrderVec3, } from "./orders/orderQueue.js";
|
|
35
|
+
export { createBallisticSweep, type BallisticSweep, type BallisticSweepHit } from "./physics/ballisticSweep.js";
|
|
36
|
+
export { createBuoyantBody } from "./physics/buoyancy.js";
|
|
37
|
+
export { Carryable, carrySpeedMultiplier } from "./physics/carryable.js";
|
|
38
|
+
export { createDamageModel } from "./physics/damageZones.js";
|
|
39
|
+
export { tickDrivableVehicle } from "./physics/drivableVehicle.js";
|
|
40
|
+
export { ForceVolume, PlatformCarry } from "./physics/forceVolume.js";
|
|
41
|
+
export { createKinematicVehicle, type KinematicVehicle, type KinematicVehicleStep, type KinematicVehicleTuning, } from "./physics/kinematicVehicle.js";
|
|
42
|
+
export { PhysicsWorld, SHAPE_BOX, SHAPE_SPHERE, type AddBodyOptions, type CollisionEvent, type PhysicsStats, } from "./physics/physicsWorld.js";
|
|
43
|
+
export { createRagdoll } from "./physics/ragdoll.js";
|
|
44
|
+
export { SpatialGrid } from "./physics/spatialGrid.js";
|
|
45
|
+
export { StructureGraph, type CollapseEvent, type StructureMaterial } from "./physics/structure.js";
|
|
46
|
+
export { Glide, Grapple } from "./physics/traversal.js";
|
|
47
|
+
export { DEFAULT_GRIP_CURVE, createVehicleBody, sampleGripCurve, type GripCurve } from "./physics/vehicleBody.js";
|
|
48
|
+
export { createAssetCatalog, type AssetCatalog, type ModelAssetRef, type ModelDims } from "./scene/assetCatalog.js";
|
|
49
|
+
export { partsBounds, registerAssetGenerator, type GeneratedAsset, type GeneratedPart } from "./scene/assetGenerator.js";
|
|
50
|
+
export { applyRotationPolicy, headingToRotationY, normalizeDegrees, parseAssetSpace, parseRotationPolicy, resolveAnchorOffset, resolveFacingRotationY, rotatedFootprint, rotationYToHeading, snapHeading, toEngineUnits, validateAssetSpace, type AssetAnchor, type AssetSpace, type AssetSpaceIssue, type PlacementRotationPolicy, } from "./scene/assetSpace.js";
|
|
51
|
+
export { collectAuthoredTriggers, createAuthoredTriggerRuntime, getTriggerAction, listTriggerActions, pointInVolume, registerTriggerAction, type AuthoredTrigger, type AuthoredTriggerRuntime, type TriggerActionDefinition, type TriggerDispatchEvent, type TriggerEvent, type TriggerHandlers, type TriggerSourceKind, } from "./scene/authoredTriggers.js";
|
|
52
|
+
export { selectAutoTarget, type AutoTargetPolicy } from "./scene/autoTarget.js";
|
|
53
|
+
export { advanceBehaviors, behaviorControl, type BehaviorControl, type BehaviorInspection, type BehaviorResumePolicy, type BehaviorSnapshot, type BehaviorStatus, } from "./scene/behaviorRuntime.js";
|
|
54
|
+
export { patrol, player, talkable, wander, type BehaviorDescriptor } from "./scene/behaviors.js";
|
|
55
|
+
export { createBodyBind } from "./scene/bodyBind.js";
|
|
56
|
+
export { type ColliderPurpose, type EntityColliderSet, type ResolvedCollider } from "./scene/colliders.js";
|
|
57
|
+
export { type StatCatalog, type StatValue } from "./scene/entityStats.js";
|
|
58
|
+
export { entityMetaOf, groundSpeed, type EntityPosition, type SceneEntity } from "./scene/entityStore.js";
|
|
59
|
+
export { DEFAULT_FORWARD } from "./scene/facing.js";
|
|
60
|
+
export { readNamedSockets, type ModelNode } from "./scene/modelSockets.js";
|
|
61
|
+
export { MountController, createMountController } from "./scene/mount.js";
|
|
62
|
+
export { objectVisualScale, type ObjectVisual, type SceneObject } from "./scene/objectStore.js";
|
|
63
|
+
export { type PaintStroke } from "./scene/paintLayer.js";
|
|
64
|
+
export { type RosterEntry } from "./scene/roster.js";
|
|
65
|
+
export { parseParams, registerSceneKind, type ParamField, type ParamSchema, type ParsedParams, type SceneKindObject, type SceneKindResolveContext, type WeightedParamEntry, } from "./scene/sceneKinds.js";
|
|
66
|
+
export { firstImpact, hitsUntilBlocked, type SceneRaycastApi, type SceneRaycastHit } from "./scene/sceneRaycast.js";
|
|
67
|
+
export { createSelectionSet, isMarquee, screenRect, selectWithinRect, type ScreenRect, type SelectionSet, } from "./scene/selection.js";
|
|
68
|
+
export { createSelectionBookmarks, recallSelectionBookmark, type BookmarkRecallMode, type RecallBookmarkOptions, type SelectionBookmarkSnapshot, type SelectionBookmarks, type SelectionPruneResult, } from "./scene/selectionBookmarks.js";
|
|
69
|
+
export { type Aim } from "./scene/spatial.js";
|
|
70
|
+
export { createStationClaim, type Station } from "./scene/stationClaim.js";
|
|
71
|
+
export { VehicleSeats, createVehicleSeats } from "./scene/vehicleSeat.js";
|
|
72
|
+
export { type ConcealmentSensor } from "./sensor/concealment.js";
|
|
73
|
+
export { type FreezeMonitor, type FreezeViolation } from "./sensor/freezeMonitor.js";
|
|
74
|
+
export { type FramingConfig, type FrustumProjection, type FrustumSample, type FrustumSensor, type FrustumTarget, } from "./sensor/frustumSensor.js";
|
|
75
|
+
export { type HiddenStateSource, type SensorProbeOptions, type SensorReading } from "./sensor/hiddenStateProbe.js";
|
|
76
|
+
export { type RecordingBuffer, type RecordingBufferOptions } from "./sensor/recordingBuffer.js";
|
|
77
|
+
export { type RevealHit, type RevealQuery } from "./sensor/revealQuery.js";
|
|
78
|
+
export { getCurrentGameTimestamp, sanitizeGameTimeScale } from "./time/gameClock.js";
|
|
79
|
+
export { type ClockSnapshot, type SimClock } from "./time/simClock.js";
|
|
80
|
+
export { type BoundsSpec, type Vec3 } from "./visibility/bounds.js";
|
|
81
|
+
export { type CameraVisibilityContext } from "./visibility/camera.js";
|
|
82
|
+
export { type VisibilityConfig } from "./visibility/config.js";
|
|
83
|
+
export { distance } from "./visibility/distance.js";
|
|
84
|
+
export { type CameraView, type Frustum } from "./visibility/frustum.js";
|
|
85
|
+
export { createVisibilitySystem, type Renderable, type VisibilitySystem } from "./visibility/visibilitySystem.js";
|
|
86
|
+
export { markerCatalogId, placeAuthoredObjects, placeAuthoredObjectsFromDocument, resolveAuthoredObjects, } from "./world/authoredObjects.js";
|
|
87
|
+
export { createContributionPool, createPlotPermissions, type BuildRole } from "./world/buildPermissions.js";
|
|
88
|
+
export { buildingIndex, type BuildingIndex } from "./world/buildingIndex.js";
|
|
89
|
+
export { type BuildingPaletteOverrides, type BuildingStyle } from "./world/buildings.js";
|
|
90
|
+
export { CarvableField, VoxelVolume, carvableTerrain, type VoxelMaterial } from "./world/carve.js";
|
|
91
|
+
export { catenaryCurve, sagCurve } from "./world/catenary.js";
|
|
92
|
+
export { snapToNearest, socketWorldPosition, socketsCompatible, worldSockets } from "./world/connectors.js";
|
|
93
|
+
export { createEnvironmentField, type EnvironmentField, type HeatSource } from "./world/envField.js";
|
|
94
|
+
export { resolveStructureBuildings, summarizeEnvironment } from "./world/environmentSummary.js";
|
|
95
|
+
export { biomes, building, environment, flat, grass, ocean, pad, plots, rain, road, sky, snow, terrain, tilemap, voxel, type BiomeBand, type BuildingEnvironmentDescriptor, type EnvironmentWorldFeature, type GrassEnvironmentDescriptor, type OceanEnvironmentDescriptor, type PadEnvironmentDescriptor, type PadSize, type RainEnvironmentDescriptor, type RoadEnvironmentDescriptor, type SkyEnvironmentDescriptor, type SnowEnvironmentDescriptor, type TerrainCircleRegion, type TerrainDetailConfig, type TerrainDetailMaterialConfig, type TerrainEnvironmentDescriptor, type TerrainFlattenMask, type TerrainMaterialRegion, type TerrainPolylineRegion, type TerrainRectRegion, type TerrainRegionStyle, type WeatherEnvironmentDescriptor, type WorldFeature, type WorldGridCell, type WorldGridConfig, } from "./world/features.js";
|
|
96
|
+
export { createFogField, type FogCells, type FogField } from "./world/fog.js";
|
|
97
|
+
export { boundaryNeighbors, createFootprintGrid, footprintObstacles, hasValidAdjacency } from "./world/footprintGrid.js";
|
|
98
|
+
export { type Aabb, type AvoidZone } from "./world/geometry.js";
|
|
99
|
+
export { GRASS_SCHEMA } from "./world/grassKind.js";
|
|
100
|
+
export { resolveGridInstances } from "./world/gridInstances.js";
|
|
101
|
+
export { createLodScheduler } from "./world/lod.js";
|
|
102
|
+
export { mapLayerColor, type MapCellStates, type MapRoute, type MapZone } from "./world/mapLayers.js";
|
|
103
|
+
export { DEFAULT_MARKER_KINDS, createMarkerSet, markerKindStyle, type MapMarker, type MarkerKindStyle, type MarkerSet, } from "./world/markers.js";
|
|
104
|
+
export { bearingToCardinal, clampToMinimapEdge, compassBearing, headingToBearing, projectToMinimap, relativeBearing, unprojectFromMinimap, type Cardinal, type MinimapView, type WorldXZ, } from "./world/minimap.js";
|
|
105
|
+
export { placeAlongPath } from "./world/pathInstances.js";
|
|
106
|
+
export { withPathProfiles, type PathHeightPolicy, type PathRetaining, type TerrainPathProfile, } from "./world/pathTerrain.js";
|
|
107
|
+
export { placeAssetFromCommit, resolvePlaceAsset, toEditorMarker, toStructureInput, type PlaceAssetResult, } from "./world/placeAsset.js";
|
|
108
|
+
export { createPlacedStructureStore, type PlacedStructure } from "./world/placedStructureStore.js";
|
|
109
|
+
export { validatePlacement, type PlacementRules } from "./world/placement.js";
|
|
110
|
+
export { createPlacementController, quarterTurnsToRotationY, type PlacementCommit, type PlacementController, type PlacementPreview, type SnapMode, } from "./world/placementController.js";
|
|
111
|
+
export { composeRealm } from "./world/realm.js";
|
|
112
|
+
export { createRegionField, isRegionField, type RegionField } from "./world/regions.js";
|
|
113
|
+
export { buildRoadRibbon, dashSegments } from "./world/roads.js";
|
|
114
|
+
export { scatter, type ScatterPoint } from "./world/scatter.js";
|
|
115
|
+
export { pickWeighted, scatterItems, type ScatterInstance } from "./world/scatterItems.js";
|
|
116
|
+
export { SCATTER_PATH_KIND, clearanceZonesFrom, distanceToPolygonEdge, isScatterPath, pointInPolygon, polygonArea, polygonBounds, readScatterPalette, readScatterRules, resolveScatter, resolveScatterRegion, scatterRegionEstimate, scatterRegionFromPath, type ScatterTerrain, } from "./world/scatterRegion.js";
|
|
117
|
+
export { SOIL_KIND, SOIL_SCHEMA, type SoilRules } from "./world/soilKind.js";
|
|
118
|
+
export { annulusRegion, boxRegion, customRegion, discRegion, pointSetRegion, polygonRegion, rectRegion, sampleBatch, samplePoint, sampleStratified, shellRegion, sphereRegion, weightedRegion, type AreaDistribution, type FallbackPolicy, type Point3, type RadialDistribution, type SampleBatchOptions, type SampleBatchResult, type SampleConstraints, type SamplePoint, type SamplePointOptions, type SampleReason, type SampleRegion, type SampleResult, type StratifiedOptions, type VolumeDistribution, type WeightedRegionEntry, } from "./world/spatialSample.js";
|
|
119
|
+
export { furnitureSpots, laneCenters, offsetPath, parkingSpots, sidewalkPoint, sidewalkWidthOf, } from "./world/streets.js";
|
|
120
|
+
export { solveSupport, toDebrisBodies, type SupportResult } from "./world/support.js";
|
|
121
|
+
export { applyDeltaToSnapshot, applySurfaceDeltaToSnapshot, beginSurfaceStroke, beginTerraformStroke, createEditableTerrain, createTerraformBrush, createTerrainSnapshot, editableTerrainFromSnapshot, migrateTerrainSnapshot, revertDeltaFromSnapshot, revertSurfaceDeltaFromSnapshot, type EditableTerrain, type SurfaceDelta, type SurfaceStroke, type TerraformDelta, type TerraformEdit, type TerraformFalloff, type TerraformMode, type TerraformShape, type TerraformSnapshot, type TerraformStroke, type TerrainMaterialLayer, type TerrainSurfaceRule, } from "./world/terraform.js";
|
|
122
|
+
export { TERRAIN_MATERIAL_PALETTES, applyPathProfiles, type NoiseFieldConfig, type ResolvedTerrainDetail, type TerrainField, type TerrainPalette, } from "./world/terrain.js";
|
|
123
|
+
export { chooseContourInterval, drapePolyline, extractContours, sampleElevation, summarizeElevation, surfaceGridLines, surfaceRing, terrainContourGuides, type ContourLine, type ContourOptions, type DrapeOptions, type ElevationReadout, type ElevationSummary, type GroundPoint, type GuideRegion, type HeightSampler, type SurfaceGridLine, type SurfaceGridOptions, } from "./world/terrainGuides.js";
|
|
124
|
+
export { VEGETATION_VOLUME_KIND } from "./world/vegetation.js";
|
|
125
|
+
export { VISIBILITY_HIDDEN, VISIBILITY_OBSERVED, VISIBILITY_REMEMBERED, createVisibilityField, type VisibilityCells, type VisibilityDelta, type VisibilityField, type VisibilityFieldConfig, type VisibilityFieldState, type VisibilityGroupState, type VisibilityMemory, type VisibilityState, } from "./world/visibilityField.js";
|
|
126
|
+
export { type VolumetricCloudsConfig, type VolumetricCloudsRules } from "./world/volumetricClouds.js";
|
|
127
|
+
export { createVoxelField, type VoxelFace } from "./world/voxelField.js";
|
|
128
|
+
export { type EnclosedFootprint, type RoofPlan } from "./world/walls.js";
|
|
129
|
+
export { waterSurface, waterSurfaceFromDescriptor, type WaterSurface } from "./world/water.js";
|
|
130
|
+
export { WATER_SCHEMA, type WaterRules } from "./world/waterKind.js";
|
|
131
|
+
export { createFireGrid, resolveWeather, type FireGrid, type ResolvedWeather, type WeatherModifierTable, type WeatherState, } from "./world/weather.js";
|
|
132
|
+
export { windField, type WindField } from "./world/wind.js";
|
package/dist/world.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export {} from "./ai/heatSystem.js";
|
|
2
|
+
export { advanceInterestGate, createInterestCensus, createInterestGateState, interestPhase, } from "./ai/interestScheduler.js";
|
|
3
|
+
export {} from "./ai/jobBoard.js";
|
|
4
|
+
export { advanceSpawnDirector, advanceWave, createSpawnDirectorState, pickSpawnPoint, raiseAlert, } from "./ai/spawnDirector.js";
|
|
5
|
+
export { acquireTarget, createTargetAcquirer, } from "./ai/targetAcquisition.js";
|
|
6
|
+
export { createThreatTable } from "./ai/threat.js";
|
|
7
|
+
export { createAreaEffectField, } from "./area/areaEffectField.js";
|
|
8
|
+
export { cappedStacks, extremumStack, independentStacks, sumMagnitude, uniqueByStackKey, } from "./area/stackPolicy.js";
|
|
9
|
+
export { computeFalloffGain, distance3, resolveEmitterGain, } from "./audio/audioFalloff.js";
|
|
10
|
+
export { mtof, notesInWindow, themeLoopSeconds, } from "./audio/music.js";
|
|
11
|
+
export {} from "./audio/synth.js";
|
|
12
|
+
export { createFactionGraph, createFactionRoster } from "./faction/factions.js";
|
|
13
|
+
export { DEFAULT_REPUTATION_TIERS, createReputationLedger, effectiveRelation, tierForStanding, } from "./faction/reputation.js";
|
|
14
|
+
export { controlGroupKey, resolveControlGroupIntent, } from "./input/controlGroups.js";
|
|
15
|
+
export { buildContextMenu, contextVerb, contextVerbInput, } from "./interaction/contextMenu.js";
|
|
16
|
+
export { LOCK_ACTIONS, generateLock, solveLock, solveLockPath, stepLock, visibleCells, } from "./interaction/lockpick.js";
|
|
17
|
+
export { command, gauge, keybind, label, proximityPrompt, resolveActivePrompt, } from "./interaction/proximityPrompt.js";
|
|
18
|
+
export { evaluateQteSequence, pendingQteStep } from "./interaction/qte.js";
|
|
19
|
+
export { evaluateSkillCheck, skillCheckZoneAt, } from "./interaction/skillCheck.js";
|
|
20
|
+
export { resolveLocalAvoidance } from "./movement/avoidance.js";
|
|
21
|
+
export { assignFormationSlots, boxFormation, circleFormation, facingYaw, lineFormation, placeFormation, wedgeFormation, } from "./movement/formation.js";
|
|
22
|
+
export { createGlideModel } from "./movement/glideModel.js";
|
|
23
|
+
export { createGrappleSwing } from "./movement/grappleSwing.js";
|
|
24
|
+
export { createLeaderTrail } from "./movement/leaderTrail.js";
|
|
25
|
+
export { MOVEMENT_TUNING } from "./movement/movementModel.js";
|
|
26
|
+
export { resolvePlayerMovementTuning, stepPlayerMovement } from "./movement/playerMovement.js";
|
|
27
|
+
export { POSE_HITBOX, createPoseState } from "./movement/poseState.js";
|
|
28
|
+
export { steerYaw } from "./movement/steering.js";
|
|
29
|
+
export { constrainToNavGrid } from "./nav/navConstrain.js";
|
|
30
|
+
export { populateNavGridFromEnvironment } from "./nav/navFromEnvironment.js";
|
|
31
|
+
export { createNavGrid, findPath, slopeStepCost } from "./nav/navGrid.js";
|
|
32
|
+
export { advancePathFollow, createPathFollow, pathFollowProgress, pathFollowSeek, pathFromNav, pathLength, } from "./nav/pathFollow.js";
|
|
33
|
+
export { defineAttackMoveOrder, defineHoldOrder, defineMoveOrder, definePatrolOrder, defineStopOrder, defineTargetedOrder, } from "./orders/orderKinds.js";
|
|
34
|
+
export { createOrderQueue, createOrderRegistry, } from "./orders/orderQueue.js";
|
|
35
|
+
export { createBallisticSweep } from "./physics/ballisticSweep.js";
|
|
36
|
+
export { createBuoyantBody } from "./physics/buoyancy.js";
|
|
37
|
+
export { Carryable, carrySpeedMultiplier } from "./physics/carryable.js";
|
|
38
|
+
export { createDamageModel } from "./physics/damageZones.js";
|
|
39
|
+
export { tickDrivableVehicle } from "./physics/drivableVehicle.js";
|
|
40
|
+
export { ForceVolume, PlatformCarry } from "./physics/forceVolume.js";
|
|
41
|
+
export { createKinematicVehicle, } from "./physics/kinematicVehicle.js";
|
|
42
|
+
export { PhysicsWorld, SHAPE_BOX, SHAPE_SPHERE, } from "./physics/physicsWorld.js";
|
|
43
|
+
export { createRagdoll } from "./physics/ragdoll.js";
|
|
44
|
+
export { SpatialGrid } from "./physics/spatialGrid.js";
|
|
45
|
+
export { StructureGraph } from "./physics/structure.js";
|
|
46
|
+
export { Glide, Grapple } from "./physics/traversal.js";
|
|
47
|
+
export { DEFAULT_GRIP_CURVE, createVehicleBody, sampleGripCurve } from "./physics/vehicleBody.js";
|
|
48
|
+
export { createAssetCatalog } from "./scene/assetCatalog.js";
|
|
49
|
+
export { partsBounds, registerAssetGenerator } from "./scene/assetGenerator.js";
|
|
50
|
+
export { applyRotationPolicy, headingToRotationY, normalizeDegrees, parseAssetSpace, parseRotationPolicy, resolveAnchorOffset, resolveFacingRotationY, rotatedFootprint, rotationYToHeading, snapHeading, toEngineUnits, validateAssetSpace, } from "./scene/assetSpace.js";
|
|
51
|
+
export { collectAuthoredTriggers, createAuthoredTriggerRuntime, getTriggerAction, listTriggerActions, pointInVolume, registerTriggerAction, } from "./scene/authoredTriggers.js";
|
|
52
|
+
export { selectAutoTarget } from "./scene/autoTarget.js";
|
|
53
|
+
export { advanceBehaviors, behaviorControl, } from "./scene/behaviorRuntime.js";
|
|
54
|
+
export { patrol, player, talkable, wander } from "./scene/behaviors.js";
|
|
55
|
+
export { createBodyBind } from "./scene/bodyBind.js";
|
|
56
|
+
export {} from "./scene/colliders.js";
|
|
57
|
+
export {} from "./scene/entityStats.js";
|
|
58
|
+
export { entityMetaOf, groundSpeed } from "./scene/entityStore.js";
|
|
59
|
+
export { DEFAULT_FORWARD } from "./scene/facing.js";
|
|
60
|
+
export { readNamedSockets } from "./scene/modelSockets.js";
|
|
61
|
+
export { MountController, createMountController } from "./scene/mount.js";
|
|
62
|
+
export { objectVisualScale } from "./scene/objectStore.js";
|
|
63
|
+
export {} from "./scene/paintLayer.js";
|
|
64
|
+
export {} from "./scene/roster.js";
|
|
65
|
+
export { parseParams, registerSceneKind, } from "./scene/sceneKinds.js";
|
|
66
|
+
export { firstImpact, hitsUntilBlocked } from "./scene/sceneRaycast.js";
|
|
67
|
+
export { createSelectionSet, isMarquee, screenRect, selectWithinRect, } from "./scene/selection.js";
|
|
68
|
+
export { createSelectionBookmarks, recallSelectionBookmark, } from "./scene/selectionBookmarks.js";
|
|
69
|
+
export {} from "./scene/spatial.js";
|
|
70
|
+
export { createStationClaim } from "./scene/stationClaim.js";
|
|
71
|
+
export { VehicleSeats, createVehicleSeats } from "./scene/vehicleSeat.js";
|
|
72
|
+
export {} from "./sensor/concealment.js";
|
|
73
|
+
export {} from "./sensor/freezeMonitor.js";
|
|
74
|
+
export {} from "./sensor/frustumSensor.js";
|
|
75
|
+
export {} from "./sensor/hiddenStateProbe.js";
|
|
76
|
+
export {} from "./sensor/recordingBuffer.js";
|
|
77
|
+
export {} from "./sensor/revealQuery.js";
|
|
78
|
+
export { getCurrentGameTimestamp, sanitizeGameTimeScale } from "./time/gameClock.js";
|
|
79
|
+
export {} from "./time/simClock.js";
|
|
80
|
+
export {} from "./visibility/bounds.js";
|
|
81
|
+
export {} from "./visibility/camera.js";
|
|
82
|
+
export {} from "./visibility/config.js";
|
|
83
|
+
export { distance } from "./visibility/distance.js";
|
|
84
|
+
export {} from "./visibility/frustum.js";
|
|
85
|
+
export { createVisibilitySystem } from "./visibility/visibilitySystem.js";
|
|
86
|
+
export { markerCatalogId, placeAuthoredObjects, placeAuthoredObjectsFromDocument, resolveAuthoredObjects, } from "./world/authoredObjects.js";
|
|
87
|
+
export { createContributionPool, createPlotPermissions } from "./world/buildPermissions.js";
|
|
88
|
+
export { buildingIndex } from "./world/buildingIndex.js";
|
|
89
|
+
export {} from "./world/buildings.js";
|
|
90
|
+
export { CarvableField, VoxelVolume, carvableTerrain } from "./world/carve.js";
|
|
91
|
+
export { catenaryCurve, sagCurve } from "./world/catenary.js";
|
|
92
|
+
export { snapToNearest, socketWorldPosition, socketsCompatible, worldSockets } from "./world/connectors.js";
|
|
93
|
+
export { createEnvironmentField } from "./world/envField.js";
|
|
94
|
+
export { resolveStructureBuildings, summarizeEnvironment } from "./world/environmentSummary.js";
|
|
95
|
+
export { biomes, building, environment, flat, grass, ocean, pad, plots, rain, road, sky, snow, terrain, tilemap, voxel, } from "./world/features.js";
|
|
96
|
+
export { createFogField } from "./world/fog.js";
|
|
97
|
+
export { boundaryNeighbors, createFootprintGrid, footprintObstacles, hasValidAdjacency } from "./world/footprintGrid.js";
|
|
98
|
+
export {} from "./world/geometry.js";
|
|
99
|
+
export { GRASS_SCHEMA } from "./world/grassKind.js";
|
|
100
|
+
export { resolveGridInstances } from "./world/gridInstances.js";
|
|
101
|
+
export { createLodScheduler } from "./world/lod.js";
|
|
102
|
+
export { mapLayerColor } from "./world/mapLayers.js";
|
|
103
|
+
export { DEFAULT_MARKER_KINDS, createMarkerSet, markerKindStyle, } from "./world/markers.js";
|
|
104
|
+
export { bearingToCardinal, clampToMinimapEdge, compassBearing, headingToBearing, projectToMinimap, relativeBearing, unprojectFromMinimap, } from "./world/minimap.js";
|
|
105
|
+
export { placeAlongPath } from "./world/pathInstances.js";
|
|
106
|
+
export { withPathProfiles, } from "./world/pathTerrain.js";
|
|
107
|
+
export { placeAssetFromCommit, resolvePlaceAsset, toEditorMarker, toStructureInput, } from "./world/placeAsset.js";
|
|
108
|
+
export { createPlacedStructureStore } from "./world/placedStructureStore.js";
|
|
109
|
+
export { validatePlacement } from "./world/placement.js";
|
|
110
|
+
export { createPlacementController, quarterTurnsToRotationY, } from "./world/placementController.js";
|
|
111
|
+
export { composeRealm } from "./world/realm.js";
|
|
112
|
+
export { createRegionField, isRegionField } from "./world/regions.js";
|
|
113
|
+
export { buildRoadRibbon, dashSegments } from "./world/roads.js";
|
|
114
|
+
export { scatter } from "./world/scatter.js";
|
|
115
|
+
export { pickWeighted, scatterItems } from "./world/scatterItems.js";
|
|
116
|
+
export { SCATTER_PATH_KIND, clearanceZonesFrom, distanceToPolygonEdge, isScatterPath, pointInPolygon, polygonArea, polygonBounds, readScatterPalette, readScatterRules, resolveScatter, resolveScatterRegion, scatterRegionEstimate, scatterRegionFromPath, } from "./world/scatterRegion.js";
|
|
117
|
+
export { SOIL_KIND, SOIL_SCHEMA } from "./world/soilKind.js";
|
|
118
|
+
export { annulusRegion, boxRegion, customRegion, discRegion, pointSetRegion, polygonRegion, rectRegion, sampleBatch, samplePoint, sampleStratified, shellRegion, sphereRegion, weightedRegion, } from "./world/spatialSample.js";
|
|
119
|
+
export { furnitureSpots, laneCenters, offsetPath, parkingSpots, sidewalkPoint, sidewalkWidthOf, } from "./world/streets.js";
|
|
120
|
+
export { solveSupport, toDebrisBodies } from "./world/support.js";
|
|
121
|
+
export { applyDeltaToSnapshot, applySurfaceDeltaToSnapshot, beginSurfaceStroke, beginTerraformStroke, createEditableTerrain, createTerraformBrush, createTerrainSnapshot, editableTerrainFromSnapshot, migrateTerrainSnapshot, revertDeltaFromSnapshot, revertSurfaceDeltaFromSnapshot, } from "./world/terraform.js";
|
|
122
|
+
export { TERRAIN_MATERIAL_PALETTES, applyPathProfiles, } from "./world/terrain.js";
|
|
123
|
+
export { chooseContourInterval, drapePolyline, extractContours, sampleElevation, summarizeElevation, surfaceGridLines, surfaceRing, terrainContourGuides, } from "./world/terrainGuides.js";
|
|
124
|
+
export { VEGETATION_VOLUME_KIND } from "./world/vegetation.js";
|
|
125
|
+
export { VISIBILITY_HIDDEN, VISIBILITY_OBSERVED, VISIBILITY_REMEMBERED, createVisibilityField, } from "./world/visibilityField.js";
|
|
126
|
+
export {} from "./world/volumetricClouds.js";
|
|
127
|
+
export { createVoxelField } from "./world/voxelField.js";
|
|
128
|
+
export {} from "./world/walls.js";
|
|
129
|
+
export { waterSurface, waterSurfaceFromDescriptor } from "./world/water.js";
|
|
130
|
+
export { WATER_SCHEMA } from "./world/waterKind.js";
|
|
131
|
+
export { createFireGrid, resolveWeather, } from "./world/weather.js";
|
|
132
|
+
export { windField } from "./world/wind.js";
|