1681-engine 0.0.0-stage → 0.5.9
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 +357 -0
- package/LICENSE +21 -0
- package/README.md +164 -2
- package/dist/1681-engine.js +471 -0
- package/dist/ambient/ColorGrade.js +40 -0
- package/dist/ambient/DayClock.js +56 -0
- package/dist/ambient/WeatherLayer.js +90 -0
- package/dist/ambient/grade.js +12 -0
- package/dist/ambient/weather.js +51 -0
- package/dist/anim/AnimStateMachine.js +163 -0
- package/dist/anim/Animator.js +66 -0
- package/dist/anim/animStateCompile.js +112 -0
- package/dist/anim/animStateSystem.js +16 -0
- package/dist/anim/animationSystem.js +14 -0
- package/dist/anim/asepriteSlices.js +21 -0
- package/dist/anim/asepriteTags.js +34 -0
- package/dist/anim/parseAseprite.js +82 -0
- package/dist/assets/AssetLoader.js +202 -0
- package/dist/assets/loadAseprite.js +49 -0
- package/dist/assets/takeCleanerWorker-DTcI_Jqr.js +30 -0
- package/dist/assets/textureAtlas.js +58 -0
- package/dist/audio/Footsteps.js +25 -0
- package/dist/audio/MusicPlayer.js +77 -0
- package/dist/audio/SoundEngine.js +125 -0
- package/dist/audio/cleanTake.js +29 -0
- package/dist/audio/music/ElementVoice.js +34 -0
- package/dist/audio/music/GraphVoice.js +38 -0
- package/dist/audio/music/MusicChannel.js +57 -0
- package/dist/audio/music/musicVoice.js +12 -0
- package/dist/audio/sampleBank.js +81 -0
- package/dist/audio/soundTable.js +8 -0
- package/dist/audio/synth.js +35 -0
- package/dist/core/BitmapLabel.js +48 -0
- package/dist/core/Camera.js +149 -0
- package/dist/core/Clock.js +40 -0
- package/dist/core/Graphics.js +68 -0
- package/dist/core/Group.js +28 -0
- package/dist/core/Image.js +50 -0
- package/dist/core/ObjectFactory.js +54 -0
- package/dist/core/Pointer.js +80 -0
- package/dist/core/Rectangle.js +50 -0
- package/dist/core/Stage.js +85 -0
- package/dist/core/Text.js +21 -0
- package/dist/core/TextureRegistry.js +141 -0
- package/dist/core/Timeline.js +210 -0
- package/dist/core/TimelineBuilder.js +72 -0
- package/dist/core/TimelineChild.js +83 -0
- package/dist/core/Tweener.js +135 -0
- package/dist/core/atlas.js +37 -0
- package/dist/core/atlasPlan.js +21 -0
- package/dist/core/blendLayer.js +11 -0
- package/dist/core/eases.js +20 -0
- package/dist/core/gameObject.js +117 -0
- package/dist/core/pixelZoom.js +43 -0
- package/dist/core/pixiPatches.js +17 -0
- package/dist/core/runDue.js +28 -0
- package/dist/core/silhouette.js +49 -0
- package/dist/core/timelinePlace.js +23 -0
- package/dist/core/tweenProps.js +11 -0
- package/dist/debug/DebugOverlay.js +93 -0
- package/dist/debug/DrawCallCounter.js +44 -0
- package/dist/debug/ErrorLog.js +21 -0
- package/dist/debug/FrameStats.js +41 -0
- package/dist/debug/inspectWorld.js +28 -0
- package/dist/diagnostics/ErrorDeduper.js +26 -0
- package/dist/diagnostics/FrameSampler.js +41 -0
- package/dist/diagnostics/bootWatch.js +20 -0
- package/dist/diagnostics/captureErrors.js +26 -0
- package/dist/diagnostics/contextLoss.js +24 -0
- package/dist/diagnostics/frameStats.js +30 -0
- package/dist/diagnostics/gpuInfo.js +21 -0
- package/dist/diagnostics/renderGuard.js +23 -0
- package/dist/ecs/SparseSet.js +54 -0
- package/dist/ecs/World.js +306 -0
- package/dist/ecs/fields.js +25 -0
- package/dist/engine/Engine.js +106 -0
- package/dist/engine/FixedLoop.js +36 -0
- package/dist/engine/HiddenPause.js +27 -0
- package/dist/engine/Scene.js +78 -0
- package/dist/engine/SceneManager.js +72 -0
- package/dist/events/EventBus.js +41 -0
- package/dist/fx/Afterimages.js +82 -0
- package/dist/fx/FloatingText.js +71 -0
- package/dist/fx/hitStop.js +27 -0
- package/dist/fx/viewCull.js +9 -0
- package/dist/i18n/Translator.js +71 -0
- package/dist/i18n/extractStrings.js +57 -0
- package/dist/i18n/formatMessage.js +18 -0
- package/dist/input/Actions.js +139 -0
- package/dist/input/AimGesture.js +74 -0
- package/dist/input/Keyboard.js +53 -0
- package/dist/input/Keymap.js +170 -0
- package/dist/input/TargetLock.js +72 -0
- package/dist/input/aimAxis.js +7 -0
- package/dist/input/keyChord.js +28 -0
- package/dist/input/longPress.js +31 -0
- package/dist/input/rumble.js +42 -0
- package/dist/input/stickAxis.js +22 -0
- package/dist/input/touchDetect.js +6 -0
- package/dist/light/LightLayer.js +83 -0
- package/dist/nav/MinHeap.js +38 -0
- package/dist/nav/findPath.js +77 -0
- package/dist/nav/navGrid.js +35 -0
- package/dist/nav/nearestOpen.js +18 -0
- package/dist/nav/straightenPath.js +50 -0
- package/dist/net/Connection.js +107 -0
- package/dist/net/InterpolationBuffer.js +56 -0
- package/dist/net/PredictedMover.js +60 -0
- package/dist/net/Room.js +91 -0
- package/dist/net/RoomHost.js +100 -0
- package/dist/net/cadence.js +21 -0
- package/dist/net/constants.js +10 -0
- package/dist/net/lobby/LobbyClient.js +123 -0
- package/dist/net/lobby/LobbyHost.js +365 -0
- package/dist/net/lobby/LobbyRooms.js +65 -0
- package/dist/net/lobby/Matchmaker.js +105 -0
- package/dist/net/movement.js +84 -0
- package/dist/net/protocol.js +10 -0
- package/dist/net/reconnect.js +10 -0
- package/dist/net/serverClock.js +21 -0
- package/dist/net/snapshotCodec.js +91 -0
- package/dist/parallax/Parallax.js +31 -0
- package/dist/parallax/ParallaxLayer.js +69 -0
- package/dist/parallax/parallaxMath.js +26 -0
- package/dist/particles/Emitter.js +107 -0
- package/dist/particles/ParticleBudget.js +31 -0
- package/dist/particles/ParticleSim.js +59 -0
- package/dist/particles/particleCurves.js +47 -0
- package/dist/particles/particleSampling.js +29 -0
- package/dist/physics/Body.js +201 -0
- package/dist/physics/BroadPhase.js +55 -0
- package/dist/physics/Contact.js +75 -0
- package/dist/physics/ContactSolver.js +69 -0
- package/dist/physics/PhysicsWorld.js +220 -0
- package/dist/physics/SpatialHash.js +38 -0
- package/dist/physics/collide.js +75 -0
- package/dist/physics/collidePolygon.js +93 -0
- package/dist/physics/contactReport.js +13 -0
- package/dist/physics/drawColliders.js +30 -0
- package/dist/physics/physicsSystem.js +7 -0
- package/dist/physics/polygon.js +79 -0
- package/dist/physics/raycast.js +61 -0
- package/dist/physics/syncToBody.js +18 -0
- package/dist/physics/tileBodies.js +58 -0
- package/dist/physics/types.js +7 -0
- package/dist/pixel/Darkness.js +169 -0
- package/dist/pixel/DitherVignette.js +56 -0
- package/dist/pixel/Evaporation.js +84 -0
- package/dist/pixel/NightShade.js +33 -0
- package/dist/pixel/PixelLayer.js +210 -0
- package/dist/pixel/PixelMarks.js +99 -0
- package/dist/pixel/SwayProp.js +74 -0
- package/dist/pixel/aimPixels.js +67 -0
- package/dist/pixel/lights.js +43 -0
- package/dist/pixel/nineSlice.js +61 -0
- package/dist/pixel/paintLayer.js +35 -0
- package/dist/pixel/palette.js +56 -0
- package/dist/pixel/pixel.js +277 -0
- package/dist/pixel/pixelPaint.js +197 -0
- package/dist/pixel/pixelParticles.js +35 -0
- package/dist/pixel/pixelTone.js +163 -0
- package/dist/pixel/propKit.js +40 -0
- package/dist/pixel/ramp.js +101 -0
- package/dist/pixel/selout.js +34 -0
- package/dist/pixel/spritePixels.js +58 -0
- package/dist/pixel/swayRig.js +86 -0
- package/dist/pixel/vignetteMask.js +23 -0
- package/dist/pixel/weatherArt.js +60 -0
- package/dist/pixel.js +96 -0
- package/dist/platform/appResume.js +18 -0
- package/dist/platform/fullscreen.js +52 -0
- package/dist/platform/orientation.js +26 -0
- package/dist/platform/pointerLock.js +37 -0
- package/dist/platform/reducedMotion.js +23 -0
- package/dist/platform/timeoutSignal.js +14 -0
- package/dist/platform/touch.js +32 -0
- package/dist/postfx/BloomFilter.js +64 -0
- package/dist/postfx/ChromaticAberrationFilter.js +24 -0
- package/dist/postfx/ColorAdjustFilter.js +75 -0
- package/dist/postfx/CrtFilter.js +41 -0
- package/dist/postfx/PixelateFilter.js +26 -0
- package/dist/postfx/PostFx.js +122 -0
- package/dist/postfx/ShockwaveFilter.js +48 -0
- package/dist/postfx/VignetteFilter.js +36 -0
- package/dist/postfx/fxAnimator.js +37 -0
- package/dist/postfx/fxShader.js +127 -0
- package/dist/postfx.js +25 -0
- package/dist/react/ChoiceDialog.js +50 -0
- package/dist/react/ConfirmDialog.js +52 -0
- package/dist/react/Glyph.js +62 -0
- package/dist/react/Modal.js +37 -0
- package/dist/react/Panel.js +23 -0
- package/dist/react/PixelImage.js +23 -0
- package/dist/react/Select.js +98 -0
- package/dist/react/Slider.js +61 -0
- package/dist/react/SplitPane.js +23 -0
- package/dist/react/TabStrip.js +31 -0
- package/dist/react/TitleTips.js +41 -0
- package/dist/react/Tooltip.js +27 -0
- package/dist/react/UiProvider.js +49 -0
- package/dist/react/baseCss.js +221 -0
- package/dist/react/choiceStore.js +22 -0
- package/dist/react/classNames.js +18 -0
- package/dist/react/confirmStore.js +29 -0
- package/dist/react/labels.js +17 -0
- package/dist/react/placement.js +48 -0
- package/dist/react/useFillSheet.js +22 -0
- package/dist/react/useFitToViewport.js +28 -0
- package/dist/react/usePicked.js +12 -0
- package/dist/react/useStore.js +8 -0
- package/dist/react/useViewport.js +16 -0
- package/dist/react.js +77 -0
- package/dist/rig/PosePlayer.js +91 -0
- package/dist/rig/RigView.js +124 -0
- package/dist/rig/Skeleton.js +30 -0
- package/dist/rig/humanoid.js +5 -0
- package/dist/rig/humanoid.json.js +29 -0
- package/dist/rig/humanoidPoses.js +29 -0
- package/dist/rig/poseMath.js +53 -0
- package/dist/rig/poses.json.js +149 -0
- package/dist/save/Autosaver.js +53 -0
- package/dist/save/MemoryBackend.js +18 -0
- package/dist/save/SaveStore.js +102 -0
- package/dist/save/WebStorageBackend.js +26 -0
- package/dist/save/checksum.js +9 -0
- package/dist/save/migrateSave.js +26 -0
- package/dist/settings.js +26 -0
- package/dist/tilemap/TilemapView.js +68 -0
- package/dist/tilemap/collision.js +24 -0
- package/dist/tilemap/tiled.js +137 -0
- package/dist/transitions/CrossfadeTransition.js +23 -0
- package/dist/transitions/DitherWipeTransition.js +69 -0
- package/dist/transitions/FadeTransition.js +33 -0
- package/dist/transitions/Letterbox.js +41 -0
- package/dist/transitions/ditherMask.js +14 -0
- package/dist/transitions/transitionTo.js +27 -0
- package/dist/transitions/tweenDone.js +14 -0
- package/dist/types/ambient/ColorGrade.d.ts +41 -0
- package/dist/types/ambient/ColorGrade.d.ts.map +1 -0
- package/dist/types/ambient/DayClock.d.ts +80 -0
- package/dist/types/ambient/DayClock.d.ts.map +1 -0
- package/dist/types/ambient/WeatherLayer.d.ts +78 -0
- package/dist/types/ambient/WeatherLayer.d.ts.map +1 -0
- package/dist/types/ambient/grade.d.ts +22 -0
- package/dist/types/ambient/grade.d.ts.map +1 -0
- package/dist/types/ambient/weather.d.ts +49 -0
- package/dist/types/ambient/weather.d.ts.map +1 -0
- package/dist/types/anim/AnimStateMachine.d.ts +80 -0
- package/dist/types/anim/AnimStateMachine.d.ts.map +1 -0
- package/dist/types/anim/Animator.d.ts +50 -0
- package/dist/types/anim/Animator.d.ts.map +1 -0
- package/dist/types/anim/animStateCompile.d.ts +52 -0
- package/dist/types/anim/animStateCompile.d.ts.map +1 -0
- package/dist/types/anim/animStateSystem.d.ts +10 -0
- package/dist/types/anim/animStateSystem.d.ts.map +1 -0
- package/dist/types/anim/animStateTypes.d.ts +50 -0
- package/dist/types/anim/animStateTypes.d.ts.map +1 -0
- package/dist/types/anim/animationSystem.d.ts +13 -0
- package/dist/types/anim/animationSystem.d.ts.map +1 -0
- package/dist/types/anim/asepriteSlices.d.ts +19 -0
- package/dist/types/anim/asepriteSlices.d.ts.map +1 -0
- package/dist/types/anim/asepriteTags.d.ts +16 -0
- package/dist/types/anim/asepriteTags.d.ts.map +1 -0
- package/dist/types/anim/asepriteTypes.d.ts +159 -0
- package/dist/types/anim/asepriteTypes.d.ts.map +1 -0
- package/dist/types/anim/parseAseprite.d.ts +21 -0
- package/dist/types/anim/parseAseprite.d.ts.map +1 -0
- package/dist/types/assets/AssetLoader.d.ts +140 -0
- package/dist/types/assets/AssetLoader.d.ts.map +1 -0
- package/dist/types/assets/loadAseprite.d.ts +27 -0
- package/dist/types/assets/loadAseprite.d.ts.map +1 -0
- package/dist/types/assets/textureAtlas.d.ts +35 -0
- package/dist/types/assets/textureAtlas.d.ts.map +1 -0
- package/dist/types/audio/Footsteps.d.ts +33 -0
- package/dist/types/audio/Footsteps.d.ts.map +1 -0
- package/dist/types/audio/MusicPlayer.d.ts +65 -0
- package/dist/types/audio/MusicPlayer.d.ts.map +1 -0
- package/dist/types/audio/SoundEngine.d.ts +47 -0
- package/dist/types/audio/SoundEngine.d.ts.map +1 -0
- package/dist/types/audio/cleanTake.d.ts +3 -0
- package/dist/types/audio/cleanTake.d.ts.map +1 -0
- package/dist/types/audio/music/ElementVoice.d.ts +14 -0
- package/dist/types/audio/music/ElementVoice.d.ts.map +1 -0
- package/dist/types/audio/music/GraphVoice.d.ts +22 -0
- package/dist/types/audio/music/GraphVoice.d.ts.map +1 -0
- package/dist/types/audio/music/MusicChannel.d.ts +35 -0
- package/dist/types/audio/music/MusicChannel.d.ts.map +1 -0
- package/dist/types/audio/music/musicVoice.d.ts +26 -0
- package/dist/types/audio/music/musicVoice.d.ts.map +1 -0
- package/dist/types/audio/sampleBank.d.ts +27 -0
- package/dist/types/audio/sampleBank.d.ts.map +1 -0
- package/dist/types/audio/soundTable.d.ts +14 -0
- package/dist/types/audio/soundTable.d.ts.map +1 -0
- package/dist/types/audio/synth.d.ts +34 -0
- package/dist/types/audio/synth.d.ts.map +1 -0
- package/dist/types/audio/takeCleanerWorker.d.ts +2 -0
- package/dist/types/audio/takeCleanerWorker.d.ts.map +1 -0
- package/dist/types/core/BitmapLabel.d.ts +36 -0
- package/dist/types/core/BitmapLabel.d.ts.map +1 -0
- package/dist/types/core/Camera.d.ts +115 -0
- package/dist/types/core/Camera.d.ts.map +1 -0
- package/dist/types/core/Clock.d.ts +23 -0
- package/dist/types/core/Clock.d.ts.map +1 -0
- package/dist/types/core/Graphics.d.ts +37 -0
- package/dist/types/core/Graphics.d.ts.map +1 -0
- package/dist/types/core/Group.d.ts +15 -0
- package/dist/types/core/Group.d.ts.map +1 -0
- package/dist/types/core/Image.d.ts +25 -0
- package/dist/types/core/Image.d.ts.map +1 -0
- package/dist/types/core/ObjectFactory.d.ts +34 -0
- package/dist/types/core/ObjectFactory.d.ts.map +1 -0
- package/dist/types/core/Pointer.d.ts +45 -0
- package/dist/types/core/Pointer.d.ts.map +1 -0
- package/dist/types/core/Rectangle.d.ts +26 -0
- package/dist/types/core/Rectangle.d.ts.map +1 -0
- package/dist/types/core/Stage.d.ts +58 -0
- package/dist/types/core/Stage.d.ts.map +1 -0
- package/dist/types/core/Text.d.ts +22 -0
- package/dist/types/core/Text.d.ts.map +1 -0
- package/dist/types/core/TextureRegistry.d.ts +90 -0
- package/dist/types/core/TextureRegistry.d.ts.map +1 -0
- package/dist/types/core/Timeline.d.ts +115 -0
- package/dist/types/core/Timeline.d.ts.map +1 -0
- package/dist/types/core/TimelineBuilder.d.ts +53 -0
- package/dist/types/core/TimelineBuilder.d.ts.map +1 -0
- package/dist/types/core/TimelineChild.d.ts +51 -0
- package/dist/types/core/TimelineChild.d.ts.map +1 -0
- package/dist/types/core/Tweener.d.ts +70 -0
- package/dist/types/core/Tweener.d.ts.map +1 -0
- package/dist/types/core/atlas.d.ts +16 -0
- package/dist/types/core/atlas.d.ts.map +1 -0
- package/dist/types/core/atlasPlan.d.ts +34 -0
- package/dist/types/core/atlasPlan.d.ts.map +1 -0
- package/dist/types/core/blendLayer.d.ts +23 -0
- package/dist/types/core/blendLayer.d.ts.map +1 -0
- package/dist/types/core/eases.d.ts +3 -0
- package/dist/types/core/eases.d.ts.map +1 -0
- package/dist/types/core/gameObject.d.ts +42 -0
- package/dist/types/core/gameObject.d.ts.map +1 -0
- package/dist/types/core/pixelZoom.d.ts +45 -0
- package/dist/types/core/pixelZoom.d.ts.map +1 -0
- package/dist/types/core/pixiPatches.d.ts +9 -0
- package/dist/types/core/pixiPatches.d.ts.map +1 -0
- package/dist/types/core/runDue.d.ts +15 -0
- package/dist/types/core/runDue.d.ts.map +1 -0
- package/dist/types/core/silhouette.d.ts +16 -0
- package/dist/types/core/silhouette.d.ts.map +1 -0
- package/dist/types/core/timelinePlace.d.ts +23 -0
- package/dist/types/core/timelinePlace.d.ts.map +1 -0
- package/dist/types/core/tweenProps.d.ts +8 -0
- package/dist/types/core/tweenProps.d.ts.map +1 -0
- package/dist/types/core/types.d.ts +4 -0
- package/dist/types/core/types.d.ts.map +1 -0
- package/dist/types/debug/DebugOverlay.d.ts +63 -0
- package/dist/types/debug/DebugOverlay.d.ts.map +1 -0
- package/dist/types/debug/DrawCallCounter.d.ts +20 -0
- package/dist/types/debug/DrawCallCounter.d.ts.map +1 -0
- package/dist/types/debug/ErrorLog.d.ts +20 -0
- package/dist/types/debug/ErrorLog.d.ts.map +1 -0
- package/dist/types/debug/FrameStats.d.ts +21 -0
- package/dist/types/debug/FrameStats.d.ts.map +1 -0
- package/dist/types/debug/inspectWorld.d.ts +14 -0
- package/dist/types/debug/inspectWorld.d.ts.map +1 -0
- package/dist/types/diagnostics/ErrorDeduper.d.ts +17 -0
- package/dist/types/diagnostics/ErrorDeduper.d.ts.map +1 -0
- package/dist/types/diagnostics/FrameSampler.d.ts +37 -0
- package/dist/types/diagnostics/FrameSampler.d.ts.map +1 -0
- package/dist/types/diagnostics/bootWatch.d.ts +25 -0
- package/dist/types/diagnostics/bootWatch.d.ts.map +1 -0
- package/dist/types/diagnostics/captureErrors.d.ts +24 -0
- package/dist/types/diagnostics/captureErrors.d.ts.map +1 -0
- package/dist/types/diagnostics/contextLoss.d.ts +35 -0
- package/dist/types/diagnostics/contextLoss.d.ts.map +1 -0
- package/dist/types/diagnostics/frameStats.d.ts +30 -0
- package/dist/types/diagnostics/frameStats.d.ts.map +1 -0
- package/dist/types/diagnostics/gpuInfo.d.ts +9 -0
- package/dist/types/diagnostics/gpuInfo.d.ts.map +1 -0
- package/dist/types/diagnostics/renderGuard.d.ts +12 -0
- package/dist/types/diagnostics/renderGuard.d.ts.map +1 -0
- package/dist/types/ecs/SparseSet.d.ts +25 -0
- package/dist/types/ecs/SparseSet.d.ts.map +1 -0
- package/dist/types/ecs/World.d.ts +137 -0
- package/dist/types/ecs/World.d.ts.map +1 -0
- package/dist/types/ecs/fields.d.ts +34 -0
- package/dist/types/ecs/fields.d.ts.map +1 -0
- package/dist/types/engine/Engine.d.ts +96 -0
- package/dist/types/engine/Engine.d.ts.map +1 -0
- package/dist/types/engine/FixedLoop.d.ts +32 -0
- package/dist/types/engine/FixedLoop.d.ts.map +1 -0
- package/dist/types/engine/HiddenPause.d.ts +22 -0
- package/dist/types/engine/HiddenPause.d.ts.map +1 -0
- package/dist/types/engine/Scene.d.ts +67 -0
- package/dist/types/engine/Scene.d.ts.map +1 -0
- package/dist/types/engine/SceneManager.d.ts +36 -0
- package/dist/types/engine/SceneManager.d.ts.map +1 -0
- package/dist/types/events/EventBus.d.ts +20 -0
- package/dist/types/events/EventBus.d.ts.map +1 -0
- package/dist/types/fx/Afterimages.d.ts +62 -0
- package/dist/types/fx/Afterimages.d.ts.map +1 -0
- package/dist/types/fx/FloatingText.d.ts +71 -0
- package/dist/types/fx/FloatingText.d.ts.map +1 -0
- package/dist/types/fx/hitStop.d.ts +20 -0
- package/dist/types/fx/hitStop.d.ts.map +1 -0
- package/dist/types/fx/viewCull.d.ts +14 -0
- package/dist/types/fx/viewCull.d.ts.map +1 -0
- package/dist/types/i18n/Translator.d.ts +52 -0
- package/dist/types/i18n/Translator.d.ts.map +1 -0
- package/dist/types/i18n/extractStrings.d.ts +25 -0
- package/dist/types/i18n/extractStrings.d.ts.map +1 -0
- package/dist/types/i18n/formatMessage.d.ts +10 -0
- package/dist/types/i18n/formatMessage.d.ts.map +1 -0
- package/dist/types/index.d.ts +164 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/input/Actions.d.ts +100 -0
- package/dist/types/input/Actions.d.ts.map +1 -0
- package/dist/types/input/AimGesture.d.ts +106 -0
- package/dist/types/input/AimGesture.d.ts.map +1 -0
- package/dist/types/input/Keyboard.d.ts +30 -0
- package/dist/types/input/Keyboard.d.ts.map +1 -0
- package/dist/types/input/Keymap.d.ts +85 -0
- package/dist/types/input/Keymap.d.ts.map +1 -0
- package/dist/types/input/TargetLock.d.ts +56 -0
- package/dist/types/input/TargetLock.d.ts.map +1 -0
- package/dist/types/input/aimAxis.d.ts +9 -0
- package/dist/types/input/aimAxis.d.ts.map +1 -0
- package/dist/types/input/keyChord.d.ts +15 -0
- package/dist/types/input/keyChord.d.ts.map +1 -0
- package/dist/types/input/longPress.d.ts +21 -0
- package/dist/types/input/longPress.d.ts.map +1 -0
- package/dist/types/input/rumble.d.ts +41 -0
- package/dist/types/input/rumble.d.ts.map +1 -0
- package/dist/types/input/stickAxis.d.ts +26 -0
- package/dist/types/input/stickAxis.d.ts.map +1 -0
- package/dist/types/input/touchDetect.d.ts +18 -0
- package/dist/types/input/touchDetect.d.ts.map +1 -0
- package/dist/types/light/LightLayer.d.ts +65 -0
- package/dist/types/light/LightLayer.d.ts.map +1 -0
- package/dist/types/nav/MinHeap.d.ts +15 -0
- package/dist/types/nav/MinHeap.d.ts.map +1 -0
- package/dist/types/nav/findPath.d.ts +38 -0
- package/dist/types/nav/findPath.d.ts.map +1 -0
- package/dist/types/nav/navGrid.d.ts +48 -0
- package/dist/types/nav/navGrid.d.ts.map +1 -0
- package/dist/types/nav/nearestOpen.d.ts +8 -0
- package/dist/types/nav/nearestOpen.d.ts.map +1 -0
- package/dist/types/nav/straightenPath.d.ts +13 -0
- package/dist/types/nav/straightenPath.d.ts.map +1 -0
- package/dist/types/net/Connection.d.ts +88 -0
- package/dist/types/net/Connection.d.ts.map +1 -0
- package/dist/types/net/InterpolationBuffer.d.ts +36 -0
- package/dist/types/net/InterpolationBuffer.d.ts.map +1 -0
- package/dist/types/net/PredictedMover.d.ts +43 -0
- package/dist/types/net/PredictedMover.d.ts.map +1 -0
- package/dist/types/net/Room.d.ts +69 -0
- package/dist/types/net/Room.d.ts.map +1 -0
- package/dist/types/net/RoomHost.d.ts +74 -0
- package/dist/types/net/RoomHost.d.ts.map +1 -0
- package/dist/types/net/cadence.d.ts +22 -0
- package/dist/types/net/cadence.d.ts.map +1 -0
- package/dist/types/net/constants.d.ts +33 -0
- package/dist/types/net/constants.d.ts.map +1 -0
- package/dist/types/net/lobby/LobbyClient.d.ts +107 -0
- package/dist/types/net/lobby/LobbyClient.d.ts.map +1 -0
- package/dist/types/net/lobby/LobbyHost.d.ts +147 -0
- package/dist/types/net/lobby/LobbyHost.d.ts.map +1 -0
- package/dist/types/net/lobby/LobbyRooms.d.ts +56 -0
- package/dist/types/net/lobby/LobbyRooms.d.ts.map +1 -0
- package/dist/types/net/lobby/Matchmaker.d.ts +57 -0
- package/dist/types/net/lobby/Matchmaker.d.ts.map +1 -0
- package/dist/types/net/lobby/index.d.ts +6 -0
- package/dist/types/net/lobby/index.d.ts.map +1 -0
- package/dist/types/net/lobby/lobbyProtocol.d.ts +143 -0
- package/dist/types/net/lobby/lobbyProtocol.d.ts.map +1 -0
- package/dist/types/net/movement.d.ts +50 -0
- package/dist/types/net/movement.d.ts.map +1 -0
- package/dist/types/net/protocol.d.ts +59 -0
- package/dist/types/net/protocol.d.ts.map +1 -0
- package/dist/types/net/reconnect.d.ts +14 -0
- package/dist/types/net/reconnect.d.ts.map +1 -0
- package/dist/types/net/serverClock.d.ts +14 -0
- package/dist/types/net/serverClock.d.ts.map +1 -0
- package/dist/types/net/snapshotCodec.d.ts +55 -0
- package/dist/types/net/snapshotCodec.d.ts.map +1 -0
- package/dist/types/parallax/Parallax.d.ts +37 -0
- package/dist/types/parallax/Parallax.d.ts.map +1 -0
- package/dist/types/parallax/ParallaxLayer.d.ts +80 -0
- package/dist/types/parallax/ParallaxLayer.d.ts.map +1 -0
- package/dist/types/parallax/parallaxMath.d.ts +50 -0
- package/dist/types/parallax/parallaxMath.d.ts.map +1 -0
- package/dist/types/particles/Emitter.d.ts +97 -0
- package/dist/types/particles/Emitter.d.ts.map +1 -0
- package/dist/types/particles/ParticleBudget.d.ts +28 -0
- package/dist/types/particles/ParticleBudget.d.ts.map +1 -0
- package/dist/types/particles/ParticleSim.d.ts +38 -0
- package/dist/types/particles/ParticleSim.d.ts.map +1 -0
- package/dist/types/particles/particleCurves.d.ts +21 -0
- package/dist/types/particles/particleCurves.d.ts.map +1 -0
- package/dist/types/particles/particleSampling.d.ts +20 -0
- package/dist/types/particles/particleSampling.d.ts.map +1 -0
- package/dist/types/physics/Body.d.ts +130 -0
- package/dist/types/physics/Body.d.ts.map +1 -0
- package/dist/types/physics/BroadPhase.d.ts +26 -0
- package/dist/types/physics/BroadPhase.d.ts.map +1 -0
- package/dist/types/physics/Contact.d.ts +62 -0
- package/dist/types/physics/Contact.d.ts.map +1 -0
- package/dist/types/physics/ContactSolver.d.ts +29 -0
- package/dist/types/physics/ContactSolver.d.ts.map +1 -0
- package/dist/types/physics/PhysicsWorld.d.ts +78 -0
- package/dist/types/physics/PhysicsWorld.d.ts.map +1 -0
- package/dist/types/physics/PhysicsWorldOptions.d.ts +24 -0
- package/dist/types/physics/PhysicsWorldOptions.d.ts.map +1 -0
- package/dist/types/physics/SpatialHash.d.ts +23 -0
- package/dist/types/physics/SpatialHash.d.ts.map +1 -0
- package/dist/types/physics/collide.d.ts +27 -0
- package/dist/types/physics/collide.d.ts.map +1 -0
- package/dist/types/physics/collidePolygon.d.ts +14 -0
- package/dist/types/physics/collidePolygon.d.ts.map +1 -0
- package/dist/types/physics/contactReport.d.ts +8 -0
- package/dist/types/physics/contactReport.d.ts.map +1 -0
- package/dist/types/physics/drawColliders.d.ts +43 -0
- package/dist/types/physics/drawColliders.d.ts.map +1 -0
- package/dist/types/physics/physicsSystem.d.ts +5 -0
- package/dist/types/physics/physicsSystem.d.ts.map +1 -0
- package/dist/types/physics/polygon.d.ts +28 -0
- package/dist/types/physics/polygon.d.ts.map +1 -0
- package/dist/types/physics/raycast.d.ts +19 -0
- package/dist/types/physics/raycast.d.ts.map +1 -0
- package/dist/types/physics/syncToBody.d.ts +16 -0
- package/dist/types/physics/syncToBody.d.ts.map +1 -0
- package/dist/types/physics/tileBodies.d.ts +36 -0
- package/dist/types/physics/tileBodies.d.ts.map +1 -0
- package/dist/types/physics/types.d.ts +116 -0
- package/dist/types/physics/types.d.ts.map +1 -0
- package/dist/types/pixel/Darkness.d.ts +90 -0
- package/dist/types/pixel/Darkness.d.ts.map +1 -0
- package/dist/types/pixel/DitherVignette.d.ts +35 -0
- package/dist/types/pixel/DitherVignette.d.ts.map +1 -0
- package/dist/types/pixel/Evaporation.d.ts +30 -0
- package/dist/types/pixel/Evaporation.d.ts.map +1 -0
- package/dist/types/pixel/NightShade.d.ts +38 -0
- package/dist/types/pixel/NightShade.d.ts.map +1 -0
- package/dist/types/pixel/PixelLayer.d.ts +85 -0
- package/dist/types/pixel/PixelLayer.d.ts.map +1 -0
- package/dist/types/pixel/PixelMarks.d.ts +68 -0
- package/dist/types/pixel/PixelMarks.d.ts.map +1 -0
- package/dist/types/pixel/SwayProp.d.ts +52 -0
- package/dist/types/pixel/SwayProp.d.ts.map +1 -0
- package/dist/types/pixel/aimPixels.d.ts +23 -0
- package/dist/types/pixel/aimPixels.d.ts.map +1 -0
- package/dist/types/pixel/index.d.ts +33 -0
- package/dist/types/pixel/index.d.ts.map +1 -0
- package/dist/types/pixel/lights.d.ts +34 -0
- package/dist/types/pixel/lights.d.ts.map +1 -0
- package/dist/types/pixel/nineSlice.d.ts +71 -0
- package/dist/types/pixel/nineSlice.d.ts.map +1 -0
- package/dist/types/pixel/paintLayer.d.ts +35 -0
- package/dist/types/pixel/paintLayer.d.ts.map +1 -0
- package/dist/types/pixel/palette.d.ts +58 -0
- package/dist/types/pixel/palette.d.ts.map +1 -0
- package/dist/types/pixel/pixel.d.ts +80 -0
- package/dist/types/pixel/pixel.d.ts.map +1 -0
- package/dist/types/pixel/pixelPaint.d.ts +44 -0
- package/dist/types/pixel/pixelPaint.d.ts.map +1 -0
- package/dist/types/pixel/pixelParticles.d.ts +21 -0
- package/dist/types/pixel/pixelParticles.d.ts.map +1 -0
- package/dist/types/pixel/pixelTone.d.ts +51 -0
- package/dist/types/pixel/pixelTone.d.ts.map +1 -0
- package/dist/types/pixel/propKit.d.ts +26 -0
- package/dist/types/pixel/propKit.d.ts.map +1 -0
- package/dist/types/pixel/ramp.d.ts +57 -0
- package/dist/types/pixel/ramp.d.ts.map +1 -0
- package/dist/types/pixel/selout.d.ts +3 -0
- package/dist/types/pixel/selout.d.ts.map +1 -0
- package/dist/types/pixel/spritePixels.d.ts +29 -0
- package/dist/types/pixel/spritePixels.d.ts.map +1 -0
- package/dist/types/pixel/swayRig.d.ts +72 -0
- package/dist/types/pixel/swayRig.d.ts.map +1 -0
- package/dist/types/pixel/vignetteMask.d.ts +16 -0
- package/dist/types/pixel/vignetteMask.d.ts.map +1 -0
- package/dist/types/pixel/weatherArt.d.ts +29 -0
- package/dist/types/pixel/weatherArt.d.ts.map +1 -0
- package/dist/types/platform/appResume.d.ts +25 -0
- package/dist/types/platform/appResume.d.ts.map +1 -0
- package/dist/types/platform/fullscreen.d.ts +37 -0
- package/dist/types/platform/fullscreen.d.ts.map +1 -0
- package/dist/types/platform/orientation.d.ts +19 -0
- package/dist/types/platform/orientation.d.ts.map +1 -0
- package/dist/types/platform/pointerLock.d.ts +26 -0
- package/dist/types/platform/pointerLock.d.ts.map +1 -0
- package/dist/types/platform/reducedMotion.d.ts +20 -0
- package/dist/types/platform/reducedMotion.d.ts.map +1 -0
- package/dist/types/platform/timeoutSignal.d.ts +6 -0
- package/dist/types/platform/timeoutSignal.d.ts.map +1 -0
- package/dist/types/platform/touch.d.ts +10 -0
- package/dist/types/platform/touch.d.ts.map +1 -0
- package/dist/types/postfx/BloomFilter.d.ts +33 -0
- package/dist/types/postfx/BloomFilter.d.ts.map +1 -0
- package/dist/types/postfx/ChromaticAberrationFilter.d.ts +11 -0
- package/dist/types/postfx/ChromaticAberrationFilter.d.ts.map +1 -0
- package/dist/types/postfx/ColorAdjustFilter.d.ts +32 -0
- package/dist/types/postfx/ColorAdjustFilter.d.ts.map +1 -0
- package/dist/types/postfx/CrtFilter.d.ts +16 -0
- package/dist/types/postfx/CrtFilter.d.ts.map +1 -0
- package/dist/types/postfx/PixelateFilter.d.ts +8 -0
- package/dist/types/postfx/PixelateFilter.d.ts.map +1 -0
- package/dist/types/postfx/PostFx.d.ts +92 -0
- package/dist/types/postfx/PostFx.d.ts.map +1 -0
- package/dist/types/postfx/ShockwaveFilter.d.ts +20 -0
- package/dist/types/postfx/ShockwaveFilter.d.ts.map +1 -0
- package/dist/types/postfx/VignetteFilter.d.ts +19 -0
- package/dist/types/postfx/VignetteFilter.d.ts.map +1 -0
- package/dist/types/postfx/fxAnimator.d.ts +32 -0
- package/dist/types/postfx/fxAnimator.d.ts.map +1 -0
- package/dist/types/postfx/fxShader.d.ts +49 -0
- package/dist/types/postfx/fxShader.d.ts.map +1 -0
- package/dist/types/postfx/index.d.ts +11 -0
- package/dist/types/postfx/index.d.ts.map +1 -0
- package/dist/types/react/ChoiceDialog.d.ts +8 -0
- package/dist/types/react/ChoiceDialog.d.ts.map +1 -0
- package/dist/types/react/ConfirmDialog.d.ts +9 -0
- package/dist/types/react/ConfirmDialog.d.ts.map +1 -0
- package/dist/types/react/Glyph.d.ts +54 -0
- package/dist/types/react/Glyph.d.ts.map +1 -0
- package/dist/types/react/Modal.d.ts +22 -0
- package/dist/types/react/Modal.d.ts.map +1 -0
- package/dist/types/react/Panel.d.ts +29 -0
- package/dist/types/react/Panel.d.ts.map +1 -0
- package/dist/types/react/PixelImage.d.ts +19 -0
- package/dist/types/react/PixelImage.d.ts.map +1 -0
- package/dist/types/react/Select.d.ts +27 -0
- package/dist/types/react/Select.d.ts.map +1 -0
- package/dist/types/react/Slider.d.ts +24 -0
- package/dist/types/react/Slider.d.ts.map +1 -0
- package/dist/types/react/SplitPane.d.ts +26 -0
- package/dist/types/react/SplitPane.d.ts.map +1 -0
- package/dist/types/react/TabStrip.d.ts +31 -0
- package/dist/types/react/TabStrip.d.ts.map +1 -0
- package/dist/types/react/TitleTips.d.ts +15 -0
- package/dist/types/react/TitleTips.d.ts.map +1 -0
- package/dist/types/react/Tooltip.d.ts +22 -0
- package/dist/types/react/Tooltip.d.ts.map +1 -0
- package/dist/types/react/UiProvider.d.ts +52 -0
- package/dist/types/react/UiProvider.d.ts.map +1 -0
- package/dist/types/react/baseCss.d.ts +27 -0
- package/dist/types/react/baseCss.d.ts.map +1 -0
- package/dist/types/react/choiceStore.d.ts +34 -0
- package/dist/types/react/choiceStore.d.ts.map +1 -0
- package/dist/types/react/classNames.d.ts +12 -0
- package/dist/types/react/classNames.d.ts.map +1 -0
- package/dist/types/react/confirmStore.d.ts +30 -0
- package/dist/types/react/confirmStore.d.ts.map +1 -0
- package/dist/types/react/index.d.ts +33 -0
- package/dist/types/react/index.d.ts.map +1 -0
- package/dist/types/react/labels.d.ts +24 -0
- package/dist/types/react/labels.d.ts.map +1 -0
- package/dist/types/react/placement.d.ts +59 -0
- package/dist/types/react/placement.d.ts.map +1 -0
- package/dist/types/react/useFillSheet.d.ts +9 -0
- package/dist/types/react/useFillSheet.d.ts.map +1 -0
- package/dist/types/react/useFitToViewport.d.ts +20 -0
- package/dist/types/react/useFitToViewport.d.ts.map +1 -0
- package/dist/types/react/usePicked.d.ts +9 -0
- package/dist/types/react/usePicked.d.ts.map +1 -0
- package/dist/types/react/useStore.d.ts +8 -0
- package/dist/types/react/useStore.d.ts.map +1 -0
- package/dist/types/react/useViewport.d.ts +4 -0
- package/dist/types/react/useViewport.d.ts.map +1 -0
- package/dist/types/rig/PosePlayer.d.ts +64 -0
- package/dist/types/rig/PosePlayer.d.ts.map +1 -0
- package/dist/types/rig/RigView.d.ts +68 -0
- package/dist/types/rig/RigView.d.ts.map +1 -0
- package/dist/types/rig/Skeleton.d.ts +14 -0
- package/dist/types/rig/Skeleton.d.ts.map +1 -0
- package/dist/types/rig/humanoid.d.ts +4 -0
- package/dist/types/rig/humanoid.d.ts.map +1 -0
- package/dist/types/rig/humanoidPoses.d.ts +117 -0
- package/dist/types/rig/humanoidPoses.d.ts.map +1 -0
- package/dist/types/rig/poseMath.d.ts +14 -0
- package/dist/types/rig/poseMath.d.ts.map +1 -0
- package/dist/types/rig/rigTypes.d.ts +82 -0
- package/dist/types/rig/rigTypes.d.ts.map +1 -0
- package/dist/types/save/Autosaver.d.ts +43 -0
- package/dist/types/save/Autosaver.d.ts.map +1 -0
- package/dist/types/save/MemoryBackend.d.ts +10 -0
- package/dist/types/save/MemoryBackend.d.ts.map +1 -0
- package/dist/types/save/SaveBackend.d.ts +14 -0
- package/dist/types/save/SaveBackend.d.ts.map +1 -0
- package/dist/types/save/SaveStore.d.ts +73 -0
- package/dist/types/save/SaveStore.d.ts.map +1 -0
- package/dist/types/save/WebStorageBackend.d.ts +14 -0
- package/dist/types/save/WebStorageBackend.d.ts.map +1 -0
- package/dist/types/save/checksum.d.ts +7 -0
- package/dist/types/save/checksum.d.ts.map +1 -0
- package/dist/types/save/migrateSave.d.ts +17 -0
- package/dist/types/save/migrateSave.d.ts.map +1 -0
- package/dist/types/settings.d.ts +25 -0
- package/dist/types/settings.d.ts.map +1 -0
- package/dist/types/tilemap/TilemapView.d.ts +42 -0
- package/dist/types/tilemap/TilemapView.d.ts.map +1 -0
- package/dist/types/tilemap/collision.d.ts +16 -0
- package/dist/types/tilemap/collision.d.ts.map +1 -0
- package/dist/types/tilemap/tiled.d.ts +104 -0
- package/dist/types/tilemap/tiled.d.ts.map +1 -0
- package/dist/types/transitions/CrossfadeTransition.d.ts +20 -0
- package/dist/types/transitions/CrossfadeTransition.d.ts.map +1 -0
- package/dist/types/transitions/DitherWipeTransition.d.ts +35 -0
- package/dist/types/transitions/DitherWipeTransition.d.ts.map +1 -0
- package/dist/types/transitions/FadeTransition.d.ts +20 -0
- package/dist/types/transitions/FadeTransition.d.ts.map +1 -0
- package/dist/types/transitions/Letterbox.d.ts +33 -0
- package/dist/types/transitions/Letterbox.d.ts.map +1 -0
- package/dist/types/transitions/Transition.d.ts +22 -0
- package/dist/types/transitions/Transition.d.ts.map +1 -0
- package/dist/types/transitions/ditherMask.d.ts +13 -0
- package/dist/types/transitions/ditherMask.d.ts.map +1 -0
- package/dist/types/transitions/transitionTo.d.ts +16 -0
- package/dist/types/transitions/transitionTo.d.ts.map +1 -0
- package/dist/types/transitions/tweenDone.d.ts +5 -0
- package/dist/types/transitions/tweenDone.d.ts.map +1 -0
- package/dist/types/ui/Bar.d.ts +41 -0
- package/dist/types/ui/Bar.d.ts.map +1 -0
- package/dist/types/ui/Button.d.ts +47 -0
- package/dist/types/ui/Button.d.ts.map +1 -0
- package/dist/types/ui/Dialog.d.ts +47 -0
- package/dist/types/ui/Dialog.d.ts.map +1 -0
- package/dist/types/ui/FocusManager.d.ts +53 -0
- package/dist/types/ui/FocusManager.d.ts.map +1 -0
- package/dist/types/ui/Label.d.ts +24 -0
- package/dist/types/ui/Label.d.ts.map +1 -0
- package/dist/types/ui/List.d.ts +23 -0
- package/dist/types/ui/List.d.ts.map +1 -0
- package/dist/types/ui/Panel.d.ts +38 -0
- package/dist/types/ui/Panel.d.ts.map +1 -0
- package/dist/types/ui/ScrollView.d.ts +56 -0
- package/dist/types/ui/ScrollView.d.ts.map +1 -0
- package/dist/types/ui/Slider.d.ts +47 -0
- package/dist/types/ui/Slider.d.ts.map +1 -0
- package/dist/types/ui/Stack.d.ts +16 -0
- package/dist/types/ui/Stack.d.ts.map +1 -0
- package/dist/types/ui/Toggle.d.ts +31 -0
- package/dist/types/ui/Toggle.d.ts.map +1 -0
- package/dist/types/ui/UiHost.d.ts +18 -0
- package/dist/types/ui/UiHost.d.ts.map +1 -0
- package/dist/types/ui/UiPointerGate.d.ts +17 -0
- package/dist/types/ui/UiPointerGate.d.ts.map +1 -0
- package/dist/types/ui/UiRoot.d.ts +73 -0
- package/dist/types/ui/UiRoot.d.ts.map +1 -0
- package/dist/types/ui/Widget.d.ts +56 -0
- package/dist/types/ui/Widget.d.ts.map +1 -0
- package/dist/types/ui/dom/DomOverlay.d.ts +52 -0
- package/dist/types/ui/dom/DomOverlay.d.ts.map +1 -0
- package/dist/types/ui/dom/DomWorldAnchors.d.ts +50 -0
- package/dist/types/ui/dom/DomWorldAnchors.d.ts.map +1 -0
- package/dist/types/ui/dom/InputShield.d.ts +20 -0
- package/dist/types/ui/dom/InputShield.d.ts.map +1 -0
- package/dist/types/ui/dom/createStore.d.ts +22 -0
- package/dist/types/ui/dom/createStore.d.ts.map +1 -0
- package/dist/types/ui/dom/shieldDecision.d.ts +34 -0
- package/dist/types/ui/dom/shieldDecision.d.ts.map +1 -0
- package/dist/types/ui/dom/worldToScreen.d.ts +24 -0
- package/dist/types/ui/dom/worldToScreen.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +42 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/dist/types/ui/layout/anchor.d.ts +9 -0
- package/dist/types/ui/layout/anchor.d.ts.map +1 -0
- package/dist/types/ui/layout/barDrain.d.ts +25 -0
- package/dist/types/ui/layout/barDrain.d.ts.map +1 -0
- package/dist/types/ui/layout/fitToViewport.d.ts +32 -0
- package/dist/types/ui/layout/fitToViewport.d.ts.map +1 -0
- package/dist/types/ui/layout/focusNav.d.ts +13 -0
- package/dist/types/ui/layout/focusNav.d.ts.map +1 -0
- package/dist/types/ui/layout/geometry.d.ts +35 -0
- package/dist/types/ui/layout/geometry.d.ts.map +1 -0
- package/dist/types/ui/layout/listWidth.d.ts +13 -0
- package/dist/types/ui/layout/listWidth.d.ts.map +1 -0
- package/dist/types/ui/layout/placeTooltip.d.ts +23 -0
- package/dist/types/ui/layout/placeTooltip.d.ts.map +1 -0
- package/dist/types/ui/layout/scroll.d.ts +17 -0
- package/dist/types/ui/layout/scroll.d.ts.map +1 -0
- package/dist/types/ui/layout/slider.d.ts +7 -0
- package/dist/types/ui/layout/slider.d.ts.map +1 -0
- package/dist/types/ui/layout/stack.d.ts +26 -0
- package/dist/types/ui/layout/stack.d.ts.map +1 -0
- package/dist/types/ui/layout/wrapRow.d.ts +6 -0
- package/dist/types/ui/layout/wrapRow.d.ts.map +1 -0
- package/dist/types/ui/rich/RichText.d.ts +48 -0
- package/dist/types/ui/rich/RichText.d.ts.map +1 -0
- package/dist/types/ui/rich/richFonts.d.ts +70 -0
- package/dist/types/ui/rich/richFonts.d.ts.map +1 -0
- package/dist/types/ui/rich/richLayout.d.ts +76 -0
- package/dist/types/ui/rich/richLayout.d.ts.map +1 -0
- package/dist/types/ui/rich/richMarkup.d.ts +48 -0
- package/dist/types/ui/rich/richMarkup.d.ts.map +1 -0
- package/dist/ui/Bar.js +53 -0
- package/dist/ui/Button.js +57 -0
- package/dist/ui/Dialog.js +55 -0
- package/dist/ui/FocusManager.js +96 -0
- package/dist/ui/Label.js +35 -0
- package/dist/ui/List.js +44 -0
- package/dist/ui/Panel.js +37 -0
- package/dist/ui/ScrollView.js +95 -0
- package/dist/ui/Slider.js +54 -0
- package/dist/ui/Stack.js +27 -0
- package/dist/ui/Toggle.js +36 -0
- package/dist/ui/UiHost.js +8 -0
- package/dist/ui/UiPointerGate.js +24 -0
- package/dist/ui/UiRoot.js +92 -0
- package/dist/ui/Widget.js +89 -0
- package/dist/ui/dom/DomOverlay.js +58 -0
- package/dist/ui/dom/DomWorldAnchors.js +58 -0
- package/dist/ui/dom/InputShield.js +26 -0
- package/dist/ui/dom/createStore.js +41 -0
- package/dist/ui/dom/shieldDecision.js +35 -0
- package/dist/ui/dom/worldToScreen.js +10 -0
- package/dist/ui/layout/anchor.js +19 -0
- package/dist/ui/layout/barDrain.js +24 -0
- package/dist/ui/layout/fitToViewport.js +16 -0
- package/dist/ui/layout/focusNav.js +41 -0
- package/dist/ui/layout/geometry.js +20 -0
- package/dist/ui/layout/listWidth.js +9 -0
- package/dist/ui/layout/placeTooltip.js +27 -0
- package/dist/ui/layout/scroll.js +23 -0
- package/dist/ui/layout/slider.js +19 -0
- package/dist/ui/layout/stack.js +26 -0
- package/dist/ui/layout/wrapRow.js +12 -0
- package/dist/ui/rich/RichText.js +87 -0
- package/dist/ui/rich/richFonts.js +105 -0
- package/dist/ui/rich/richLayout.js +132 -0
- package/dist/ui/rich/richMarkup.js +67 -0
- package/dist/ui.js +95 -0
- package/package.json +112 -4
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A limb of two bones: [upper angle, upper length, lower angle relative to the upper, lower length]. Angles in
|
|
3
|
+
* degrees in sprite space of a character facing right (0 = forward, 90 = down), lengths in grid pixels.
|
|
4
|
+
*/
|
|
5
|
+
export type Limb = [number, number, number, number];
|
|
6
|
+
export type Face = 'blink' | 'happy' | 'tired' | 'dizzy';
|
|
7
|
+
/**
|
|
8
|
+
* A pose of the humanoid rig (a JSON object of bone angles). Every field is optional: a pose that leaves one
|
|
9
|
+
* out takes it from the pose it is laid over (a guard only moves the weapon arm, an attack keeps the running legs).
|
|
10
|
+
*/
|
|
11
|
+
export interface RigPose {
|
|
12
|
+
/** Pixels the chest (torso, head, shoulders) sits below its rest height; negative rises. */
|
|
13
|
+
by?: number;
|
|
14
|
+
armF?: Limb;
|
|
15
|
+
armB?: Limb;
|
|
16
|
+
legF?: Limb;
|
|
17
|
+
legB?: Limb;
|
|
18
|
+
/** Offset of both hips from their rest place. */
|
|
19
|
+
hipDx?: number;
|
|
20
|
+
hipDy?: number;
|
|
21
|
+
/** Offset of the head from the chest. */
|
|
22
|
+
headDx?: number;
|
|
23
|
+
headDy?: number;
|
|
24
|
+
face?: Face;
|
|
25
|
+
/** The head faces backwards. */
|
|
26
|
+
lookBack?: boolean;
|
|
27
|
+
/** Pixels the cape and ponytail stream behind while running. */
|
|
28
|
+
trail?: number;
|
|
29
|
+
/** Chest expansion and delayed cloth sway of the breathing cycle. */
|
|
30
|
+
breathe?: boolean;
|
|
31
|
+
sway?: number;
|
|
32
|
+
/** The far arm crosses in front of the body (drawing a bow with both hands). */
|
|
33
|
+
armBFront?: boolean;
|
|
34
|
+
/** Arm the front arm just swept through, left as a translucent smear. */
|
|
35
|
+
smearArm?: Limb;
|
|
36
|
+
/** Tumbling: the torso is a curled ball centred here (grid pixels) instead of standing. */
|
|
37
|
+
curl?: [number, number];
|
|
38
|
+
}
|
|
39
|
+
/** The rig's proportions (`rig/humanoid.json`), in grid pixels of the 20x24 character frame. */
|
|
40
|
+
export interface RigDef {
|
|
41
|
+
/** Art pixels per grid pixel of the rendered body. */
|
|
42
|
+
scale: number;
|
|
43
|
+
width: number;
|
|
44
|
+
height: number;
|
|
45
|
+
/** Top centre of the torso at rest. */
|
|
46
|
+
chest: [number, number];
|
|
47
|
+
shoulderF: [number, number];
|
|
48
|
+
shoulderB: [number, number];
|
|
49
|
+
/** How much further out both shoulders sit on a bulky body. */
|
|
50
|
+
bulkyShoulder: number;
|
|
51
|
+
hipF: [number, number];
|
|
52
|
+
hipB: [number, number];
|
|
53
|
+
/** Thickness of the arms and legs. */
|
|
54
|
+
limbWidth: number;
|
|
55
|
+
/** Brightness of the far leg and the far arm, which stand in the torso's shadow. */
|
|
56
|
+
backShade: number;
|
|
57
|
+
backArmShade: number;
|
|
58
|
+
}
|
|
59
|
+
export interface Point {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}
|
|
63
|
+
/** Joint positions of one solved pose, in grid pixels (fractional). */
|
|
64
|
+
export interface Joints {
|
|
65
|
+
chest: Point;
|
|
66
|
+
head: Point;
|
|
67
|
+
shoulderF: Point;
|
|
68
|
+
elbowF: Point;
|
|
69
|
+
wristF: Point;
|
|
70
|
+
shoulderB: Point;
|
|
71
|
+
elbowB: Point;
|
|
72
|
+
wristB: Point;
|
|
73
|
+
hipF: Point;
|
|
74
|
+
kneeF: Point;
|
|
75
|
+
ankleF: Point;
|
|
76
|
+
hipB: Point;
|
|
77
|
+
kneeB: Point;
|
|
78
|
+
ankleB: Point;
|
|
79
|
+
/** Direction the front forearm points (radians, sprite space facing right): the line a held weapon follows. */
|
|
80
|
+
forearm: number;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=rigTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rigTypes.d.ts","sourceRoot":"","sources":["../../../src/rig/rigTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,IAAI,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,4FAA4F;IAC5F,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzB;AAED,gGAAgG;AAChG,MAAM,WAAW,MAAM;IACrB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,+DAA+D;IAC/D,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,uEAAuE;AACvE,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,KAAK,CAAC;IACd,+GAA+G;IAC/G,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { SaveStore } from './SaveStore.js';
|
|
2
|
+
/** The clock and timers the autosaver uses; tests hand in fake ones. */
|
|
3
|
+
export interface AutosaveTimers {
|
|
4
|
+
now(): number;
|
|
5
|
+
setTimeout(fn: () => void, ms: number): unknown;
|
|
6
|
+
clearTimeout(handle: unknown): void;
|
|
7
|
+
}
|
|
8
|
+
export interface AutosaverOptions {
|
|
9
|
+
/** Least time between two saves, ms (default 30,000). */
|
|
10
|
+
intervalMs?: number;
|
|
11
|
+
/** Small summary stored beside each save (see `SaveStore.save`). */
|
|
12
|
+
meta?: () => unknown;
|
|
13
|
+
/** Told when a save fails; autosaving carries on. */
|
|
14
|
+
onError?: (err: unknown) => void;
|
|
15
|
+
timers?: AutosaveTimers;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Saves a slot when the game says something changed, but never more often than `intervalMs`: a burst of changes
|
|
19
|
+
* (every pickup in a fight) becomes one save now and one trailing save at the end of the interval with the newest
|
|
20
|
+
* state. `snapshot` is read when the save happens, not when it was asked for, so the trailing save is never stale.
|
|
21
|
+
*/
|
|
22
|
+
export declare class Autosaver {
|
|
23
|
+
private readonly store;
|
|
24
|
+
private readonly slot;
|
|
25
|
+
private readonly snapshot;
|
|
26
|
+
private readonly options;
|
|
27
|
+
private readonly intervalMs;
|
|
28
|
+
private readonly timers;
|
|
29
|
+
private lastSave;
|
|
30
|
+
private dirty;
|
|
31
|
+
private timer;
|
|
32
|
+
private inFlight;
|
|
33
|
+
private disposed;
|
|
34
|
+
constructor(store: SaveStore, slot: string, snapshot: () => unknown, options?: AutosaverOptions);
|
|
35
|
+
/** Something worth saving changed. */
|
|
36
|
+
request(): void;
|
|
37
|
+
/** Saves now if anything is waiting (leaving the game, a scene change); resolves when it is written. */
|
|
38
|
+
flush(): Promise<void>;
|
|
39
|
+
/** Stops autosaving; a pending trailing save is dropped (call `flush` first to keep it). */
|
|
40
|
+
dispose(): void;
|
|
41
|
+
private run;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=Autosaver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Autosaver.d.ts","sourceRoot":"","sources":["../../../src/save/Autosaver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,GAAG,IAAI,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;IAChD,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC;IACrB,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAQD;;;;GAIG;AACH,qBAAa,SAAS;IAUlB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAZ1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,QAAQ,CAAS;gBAGN,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,OAAO,EACvB,OAAO,GAAE,gBAAqB;IAMjD,sCAAsC;IACtC,OAAO,IAAI,IAAI;IAYf,wGAAwG;IAClG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B,4FAA4F;IAC5F,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,GAAG;CAsBZ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SaveBackend } from './SaveBackend.js';
|
|
2
|
+
/** Slots kept in a map for the life of the page: for tests, tools and a browser that refuses storage. */
|
|
3
|
+
export declare class MemoryBackend implements SaveBackend {
|
|
4
|
+
readonly entries: Map<string, string>;
|
|
5
|
+
read(key: string): Promise<string | null>;
|
|
6
|
+
write(key: string, value: string): Promise<void>;
|
|
7
|
+
remove(key: string): Promise<void>;
|
|
8
|
+
keys(prefix: string): Promise<string[]>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=MemoryBackend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryBackend.d.ts","sourceRoot":"","sources":["../../../src/save/MemoryBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,yGAAyG;AACzG,qBAAa,aAAc,YAAW,WAAW;IAC/C,QAAQ,CAAC,OAAO,sBAA6B;IAEvC,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAG9C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where save slots are kept. Asynchronous so a game can plug in IndexedDB, a file through Electron, or a native
|
|
3
|
+
* key–value store (Capacitor Preferences, a secure store) behind the same `SaveStore`; the synchronous ones
|
|
4
|
+
* (`WebStorageBackend`, `MemoryBackend`) simply answer at once.
|
|
5
|
+
*/
|
|
6
|
+
export interface SaveBackend {
|
|
7
|
+
/** The text stored under `key`, or null when there is none. */
|
|
8
|
+
read(key: string): Promise<string | null>;
|
|
9
|
+
write(key: string, value: string): Promise<void>;
|
|
10
|
+
remove(key: string): Promise<void>;
|
|
11
|
+
/** Every stored key starting with `prefix`. */
|
|
12
|
+
keys(prefix: string): Promise<string[]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=SaveBackend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveBackend.d.ts","sourceRoot":"","sources":["../../../src/save/SaveBackend.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,+DAA+D;IAC/D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1C,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,+CAA+C;IAC/C,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type Migrations } from './migrateSave.js';
|
|
2
|
+
import type { SaveBackend } from './SaveBackend.js';
|
|
3
|
+
export interface SaveStoreOptions {
|
|
4
|
+
/** The schema version this build writes; older saves go through `migrations` on load. */
|
|
5
|
+
version: number;
|
|
6
|
+
/** `migrations[n]` turns data of version n into version n + 1. */
|
|
7
|
+
migrations?: Migrations;
|
|
8
|
+
/** Where slots are kept (default `localStorage`, or memory where there is none). */
|
|
9
|
+
backend?: SaveBackend;
|
|
10
|
+
/** Prepended to every slot's key, so two games (or a game and its tools) on one origin never share slots. */
|
|
11
|
+
prefix?: string;
|
|
12
|
+
/** Keep the slot's previous good save beside it and fall back to it when the slot is corrupt (default true). */
|
|
13
|
+
backup?: boolean;
|
|
14
|
+
/** Wall clock for `savedAt` (default `Date.now`). */
|
|
15
|
+
now?: () => number;
|
|
16
|
+
}
|
|
17
|
+
/** What a slot holds besides the game's data: shown on a load screen without loading the save. */
|
|
18
|
+
export interface SaveInfo {
|
|
19
|
+
slot: string;
|
|
20
|
+
version: number;
|
|
21
|
+
savedAt: number;
|
|
22
|
+
/** Whatever small summary the game passed to `save` (level reached, play time, a title). */
|
|
23
|
+
meta: unknown;
|
|
24
|
+
}
|
|
25
|
+
export type LoadFailure = 'missing' | 'corrupt' | 'too-new' | 'no-migration' | 'migration-failed';
|
|
26
|
+
export type LoadResult<T> = {
|
|
27
|
+
ok: true;
|
|
28
|
+
data: T;
|
|
29
|
+
info: SaveInfo;
|
|
30
|
+
migrated: boolean;
|
|
31
|
+
fromBackup: boolean;
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
slot: string;
|
|
35
|
+
reason: LoadFailure;
|
|
36
|
+
error?: unknown;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Named save slots with a schema version, migrations from older versions, a checksum to catch a damaged slot, and a
|
|
40
|
+
* backup of the previous save to fall back to. Data must be JSON-safe (plain objects, arrays, strings, finite
|
|
41
|
+
* numbers, booleans, null).
|
|
42
|
+
*
|
|
43
|
+
* ```ts
|
|
44
|
+
* const saves = new SaveStore({ version: 3, migrations: { 1: addInventory, 2: renameGold } });
|
|
45
|
+
* await saves.save('slot1', state, { level: 4 });
|
|
46
|
+
* const r = await saves.load<GameState>('slot1');
|
|
47
|
+
* if (r.ok) start(r.data); else if (r.reason !== 'missing') warn(r.reason);
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Writes to one slot are queued in order, so an autosave and a manual save never land the wrong way round.
|
|
51
|
+
*/
|
|
52
|
+
export declare class SaveStore {
|
|
53
|
+
readonly version: number;
|
|
54
|
+
private readonly backend;
|
|
55
|
+
private readonly prefix;
|
|
56
|
+
private readonly migrations;
|
|
57
|
+
private readonly backup;
|
|
58
|
+
private readonly now;
|
|
59
|
+
private readonly queues;
|
|
60
|
+
constructor(options: SaveStoreOptions);
|
|
61
|
+
/** Writes `data` to `slot` at the current version. Rejects when the backend does (a full disk, a quota). */
|
|
62
|
+
save(slot: string, data: unknown, meta?: unknown): Promise<SaveInfo>;
|
|
63
|
+
/** Reads `slot`, brought to the current version. Never throws for a bad slot: the result says what went wrong. */
|
|
64
|
+
load<T>(slot: string): Promise<LoadResult<T>>;
|
|
65
|
+
/** Removes a slot and its backup. */
|
|
66
|
+
delete(slot: string): Promise<void>;
|
|
67
|
+
/** Every slot that reads, newest first, without migrating its data. A damaged slot is left out. */
|
|
68
|
+
list(): Promise<SaveInfo[]>;
|
|
69
|
+
private open;
|
|
70
|
+
private key;
|
|
71
|
+
private queued;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=SaveStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SaveStore.d.ts","sourceRoot":"","sources":["../../../src/save/SaveStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oFAAoF;IACpF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,6GAA6G;IAC7G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gHAAgH;IAChH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,kGAAkG;AAClG,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,4FAA4F;IAC5F,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAElG,MAAM,MAAM,UAAU,CAAC,CAAC,IACpB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAC7E;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAmBtE;;;;;;;;;;;;;GAaG;AACH,qBAAa,SAAS;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;gBAElD,OAAO,EAAE,gBAAgB;IAUrC,4GAA4G;IAC5G,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAE,OAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiB1E,kHAAkH;IAClH,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAU7C,qCAAqC;IACrC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnC,mGAAmG;IAC7F,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YAYnB,IAAI;IAclB,OAAO,CAAC,GAAG;IAKX,OAAO,CAAC,MAAM;CAUf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SaveBackend } from './SaveBackend.js';
|
|
2
|
+
/**
|
|
3
|
+
* Slots in a Web Storage area, `localStorage` by default. Small and synchronous, so keep saves to a few hundred KB:
|
|
4
|
+
* browsers allow about 5 MB a site, and a write over that throws (reported to the caller of `save`).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WebStorageBackend implements SaveBackend {
|
|
7
|
+
private readonly storage;
|
|
8
|
+
constructor(storage?: Storage);
|
|
9
|
+
read(key: string): Promise<string | null>;
|
|
10
|
+
write(key: string, value: string): Promise<void>;
|
|
11
|
+
remove(key: string): Promise<void>;
|
|
12
|
+
keys(prefix: string): Promise<string[]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=WebStorageBackend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebStorageBackend.d.ts","sourceRoot":"","sources":["../../../src/save/WebStorageBackend.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,WAAW;IACvC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,OAAiC;IAIjE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIzC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlC,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAQ9C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FNV-1a over the UTF-16 code units of `text`, as 8 hex digits. Not a defence against tampering (anyone can
|
|
3
|
+
* recompute it); it catches a slot cut short by a full disk, a crash mid-write or a hand edit gone wrong, which is
|
|
4
|
+
* what a save needs to tell before it loads half a world.
|
|
5
|
+
*/
|
|
6
|
+
export declare function checksum(text: string): string;
|
|
7
|
+
//# sourceMappingURL=checksum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checksum.d.ts","sourceRoot":"","sources":["../../../src/save/checksum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO7C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Steps that bring saved data forward one schema version each: `migrations[n]` turns version n into n + 1. */
|
|
2
|
+
export type Migrations = Readonly<Record<number, (data: unknown) => unknown>>;
|
|
3
|
+
/** Why data could not be brought to the current version. */
|
|
4
|
+
export declare class MigrationError extends Error {
|
|
5
|
+
readonly reason: 'too-new' | 'no-migration' | 'migration-failed';
|
|
6
|
+
readonly fromVersion: number;
|
|
7
|
+
constructor(message: string, reason: 'too-new' | 'no-migration' | 'migration-failed', fromVersion: number, options?: {
|
|
8
|
+
cause?: unknown;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Runs the chain from `from` up to `to`, one step at a time, so a save three versions old goes through every step
|
|
13
|
+
* written since rather than needing a direct path from each old version. Data newer than the game (a save from a
|
|
14
|
+
* later build, then a downgrade) is refused rather than read wrong.
|
|
15
|
+
*/
|
|
16
|
+
export declare function migrateSave(data: unknown, from: number, to: number, migrations: Migrations): unknown;
|
|
17
|
+
//# sourceMappingURL=migrateSave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrateSave.d.ts","sourceRoot":"","sources":["../../../src/save/migrateSave.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;AAE9E,4DAA4D;AAC5D,qBAAa,cAAe,SAAQ,KAAK;IAGrC,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB;IAChE,QAAQ,CAAC,WAAW,EAAE,MAAM;gBAF5B,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,SAAS,GAAG,cAAc,GAAG,kBAAkB,EACvD,WAAW,EAAE,MAAM,EAC5B,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAKhC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAepG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The few player settings the engine itself reads. A game keeps its own settings store and mirrors these fields
|
|
3
|
+
* into this one (`engineSettings.set`) whenever they change; the engine never reads the game's store.
|
|
4
|
+
*/
|
|
5
|
+
export interface EngineSettings {
|
|
6
|
+
/** Fewer particles and lighter effects. */
|
|
7
|
+
reducedFx: boolean;
|
|
8
|
+
/** Turns off everything that only costs battery: transient lights, heavy particles. */
|
|
9
|
+
batterySaver: boolean;
|
|
10
|
+
/** Short-lived lights a fight throws into the dark (`pixel/lights.ts`). */
|
|
11
|
+
combatLights: boolean;
|
|
12
|
+
/** 0–1, the combat sounds' volume (`audio/SoundEngine.ts`). */
|
|
13
|
+
sfxVolume: number;
|
|
14
|
+
/** 0–1, the music's volume. */
|
|
15
|
+
musicVolume: number;
|
|
16
|
+
}
|
|
17
|
+
export type SettingsListener = (s: EngineSettings) => void;
|
|
18
|
+
/** Same shape as the zustand stores the game used (`getState`, `subscribe`), so moved code reads it unchanged. */
|
|
19
|
+
export declare const engineSettings: {
|
|
20
|
+
getState(): EngineSettings;
|
|
21
|
+
set(patch: Partial<EngineSettings>): void;
|
|
22
|
+
subscribe(listener: SettingsListener): () => void;
|
|
23
|
+
reset(): void;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,YAAY,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,YAAY,EAAE,OAAO,CAAC;IACtB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AAa3D,kHAAkH;AAClH,eAAO,MAAM,cAAc;gBACb,cAAc;eAGf,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;wBAIrB,gBAAgB,GAAG,MAAM,IAAI;aAIxC,IAAI;CAGd,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import type { Stage } from '../core/Stage.js';
|
|
3
|
+
import { type TileMap, type Tileset } from './tiled.js';
|
|
4
|
+
export interface TilemapViewOptions {
|
|
5
|
+
/** The texture key holding a tileset's image (loaded with `AssetLoader.image`, or painted). Default: `tileset.name`. */
|
|
6
|
+
textureFor?: (tileset: Tileset) => string;
|
|
7
|
+
/** Tiles per chunk side (default 32): each chunk is painted once into a texture of its own. */
|
|
8
|
+
chunkTiles?: number;
|
|
9
|
+
/** Only these tile layers, by name; default every visible tile layer. */
|
|
10
|
+
layers?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Depth of the first layer in the world layer; each layer after it one higher. Bodies are usually drawn at their y,
|
|
13
|
+
* so the default keeps the map under every one of them. A layer with a numeric `depth` property is drawn there
|
|
14
|
+
* instead (a roof layer over the bodies: `depth` = 1e6).
|
|
15
|
+
*/
|
|
16
|
+
baseDepth?: number;
|
|
17
|
+
/** Where the layers go (default the stage's world layer); a scene passes its `root` so they leave with it. */
|
|
18
|
+
parent?: Container;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Draws a Tiled map's tile layers. Each layer is cut into chunks painted once into textures; a frame only toggles
|
|
22
|
+
* which chunks are in view (`update`), so a map of any size costs a handful of sprites a frame.
|
|
23
|
+
*
|
|
24
|
+
* Animated tiles are drawn on their first frame.
|
|
25
|
+
*/
|
|
26
|
+
export declare class TilemapView {
|
|
27
|
+
private readonly stage;
|
|
28
|
+
readonly map: TileMap;
|
|
29
|
+
/** One container per drawn tile layer, by name, each at its own depth among the bodies. */
|
|
30
|
+
readonly layers: Map<string, Container<import("pixi.js").ContainerChild>>;
|
|
31
|
+
private readonly chunks;
|
|
32
|
+
private readonly id;
|
|
33
|
+
constructor(stage: Stage, map: TileMap, options?: TilemapViewOptions);
|
|
34
|
+
/** Shows only the chunks in the camera's view (plus a margin in world px). Call once a frame. */
|
|
35
|
+
update(margin?: number): void;
|
|
36
|
+
/** World size of the map in px. */
|
|
37
|
+
get widthPx(): number;
|
|
38
|
+
get heightPx(): number;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
private paintChunk;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=TilemapView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TilemapView.d.ts","sourceRoot":"","sources":["../../../src/tilemap/TilemapView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAU,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAA4D,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAE/G,MAAM,WAAW,kBAAkB;IACjC,wHAAwH;IACxH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC1C,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8GAA8G;IAC9G,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAID;;;;;GAKG;AACH,qBAAa,WAAW;IAOpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,QAAQ,CAAC,GAAG,EAAE,OAAO;IAPvB,2FAA2F;IAC3F,QAAQ,CAAC,MAAM,2DAAgC;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqF;IAC5G,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAc;gBAGd,KAAK,EAAE,KAAK,EACpB,GAAG,EAAE,OAAO,EACrB,OAAO,GAAE,kBAAuB;IA0BlC,iGAAiG;IACjG,MAAM,CAAC,MAAM,SAAK,GAAG,IAAI;IAOzB,mCAAmC;IACnC,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,OAAO,IAAI,IAAI;IAOf,OAAO,CAAC,UAAU;CA0CnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CollisionGrid, type CollisionGridOptions } from '../net/movement.js';
|
|
2
|
+
import { type TileMap } from './tiled.js';
|
|
3
|
+
export interface TiledCollisionOptions extends Omit<CollisionGridOptions, 'ground'> {
|
|
4
|
+
/**
|
|
5
|
+
* What makes a cell solid:
|
|
6
|
+
* - a layer name: every non-empty cell of that tile layer is solid (a hidden "collision" layer is the usual way);
|
|
7
|
+
* - `{ property }`: a cell is solid when its tile has that custom property set to true, on any tile layer.
|
|
8
|
+
* Default: the layer named "collision" if there is one, else tiles with a `solid` property.
|
|
9
|
+
*/
|
|
10
|
+
solid?: string | {
|
|
11
|
+
property: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** The `CollisionGrid` of a Tiled map, for `stepMover`; cells are the map's tiles. */
|
|
15
|
+
export declare function collisionFromTiled(map: TileMap, options?: TiledCollisionOptions): CollisionGrid;
|
|
16
|
+
//# sourceMappingURL=collision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision.d.ts","sourceRoot":"","sources":["../../../src/tilemap/collision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAiB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC;IACjF;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACvC;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,qBAA0B,GAAG,aAAa,CAsBnG"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps made in Tiled (https://www.mapeditor.org), read from its JSON format (`.tmj`, or `.json`). Supported:
|
|
3
|
+
* orthogonal, finite maps; tile layers as CSV arrays or uncompressed base64; object layers; group layers (flattened);
|
|
4
|
+
* custom properties; flipped tiles. Not supported (refused with a message saying so): infinite maps, compressed layer
|
|
5
|
+
* data, isometric and hexagonal maps, external `.tsj` tilesets (embed them: Map → Embed Tilesets).
|
|
6
|
+
*
|
|
7
|
+
* Pure: no Pixi, no DOM, so a server can read the same map for collision.
|
|
8
|
+
*/
|
|
9
|
+
/** The three flags Tiled keeps in a gid's high bits; the rest is the tile id. */
|
|
10
|
+
export declare const FLIP_H = 2147483648;
|
|
11
|
+
export declare const FLIP_V = 1073741824;
|
|
12
|
+
export declare const FLIP_D = 536870912;
|
|
13
|
+
export type TiledPropertyValue = string | number | boolean;
|
|
14
|
+
export type Properties = Record<string, TiledPropertyValue>;
|
|
15
|
+
export interface TileLayer {
|
|
16
|
+
kind: 'tiles';
|
|
17
|
+
name: string;
|
|
18
|
+
/** Row-major gids (0 = empty), flip flags kept. Read the tile id with `gidOf`. */
|
|
19
|
+
data: Uint32Array;
|
|
20
|
+
visible: boolean;
|
|
21
|
+
opacity: number;
|
|
22
|
+
offsetX: number;
|
|
23
|
+
offsetY: number;
|
|
24
|
+
properties: Properties;
|
|
25
|
+
}
|
|
26
|
+
export interface MapObject {
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
type: string;
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
rotation: number;
|
|
35
|
+
/** A tile object's gid, if it is one. */
|
|
36
|
+
gid?: number;
|
|
37
|
+
point: boolean;
|
|
38
|
+
ellipse: boolean;
|
|
39
|
+
polygon?: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
}[];
|
|
43
|
+
properties: Properties;
|
|
44
|
+
}
|
|
45
|
+
export interface ObjectLayer {
|
|
46
|
+
kind: 'objects';
|
|
47
|
+
name: string;
|
|
48
|
+
objects: MapObject[];
|
|
49
|
+
visible: boolean;
|
|
50
|
+
properties: Properties;
|
|
51
|
+
}
|
|
52
|
+
export type MapLayer = TileLayer | ObjectLayer;
|
|
53
|
+
export interface Tileset {
|
|
54
|
+
name: string;
|
|
55
|
+
firstGid: number;
|
|
56
|
+
/** The image's path as written in the map, relative to the map file. */
|
|
57
|
+
image: string;
|
|
58
|
+
imageWidth: number;
|
|
59
|
+
imageHeight: number;
|
|
60
|
+
tileWidth: number;
|
|
61
|
+
tileHeight: number;
|
|
62
|
+
columns: number;
|
|
63
|
+
tileCount: number;
|
|
64
|
+
margin: number;
|
|
65
|
+
spacing: number;
|
|
66
|
+
/** Per local tile id: its custom properties. */
|
|
67
|
+
tileProperties: Map<number, Properties>;
|
|
68
|
+
/** Per local tile id: an animation (local tile ids and how long each shows, ms). */
|
|
69
|
+
animations: Map<number, {
|
|
70
|
+
tileId: number;
|
|
71
|
+
duration: number;
|
|
72
|
+
}[]>;
|
|
73
|
+
properties: Properties;
|
|
74
|
+
}
|
|
75
|
+
export interface TileMap {
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
tileWidth: number;
|
|
79
|
+
tileHeight: number;
|
|
80
|
+
layers: MapLayer[];
|
|
81
|
+
tilesets: Tileset[];
|
|
82
|
+
properties: Properties;
|
|
83
|
+
backgroundColor?: string;
|
|
84
|
+
}
|
|
85
|
+
/** The tile id of a gid, without its flip flags. */
|
|
86
|
+
export declare const gidOf: (raw: number) => number;
|
|
87
|
+
/** Which tileset a gid belongs to, and the tile's id inside it; null for an empty cell or an unknown gid. */
|
|
88
|
+
export declare function tileAt(map: TileMap, raw: number): {
|
|
89
|
+
tileset: Tileset;
|
|
90
|
+
local: number;
|
|
91
|
+
} | null;
|
|
92
|
+
/** Where tile `local` sits in its tileset image. */
|
|
93
|
+
export declare function tileRect(ts: Tileset, local: number): {
|
|
94
|
+
x: number;
|
|
95
|
+
y: number;
|
|
96
|
+
w: number;
|
|
97
|
+
h: number;
|
|
98
|
+
};
|
|
99
|
+
export declare function layerByName(map: TileMap, name: string): MapLayer | undefined;
|
|
100
|
+
/** Every object of every object layer (optionally only those of one `type`/class). */
|
|
101
|
+
export declare function objectsOf(map: TileMap, type?: string): MapObject[];
|
|
102
|
+
/** Reads a Tiled JSON map (already parsed with `JSON.parse`). Throws a `Tiled map: …` error saying what is wrong. */
|
|
103
|
+
export declare function parseTiled(json: unknown): TileMap;
|
|
104
|
+
//# sourceMappingURL=tiled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiled.d.ts","sourceRoot":"","sources":["../../../src/tilemap/tiled.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iFAAiF;AACjF,eAAO,MAAM,MAAM,aAAa,CAAC;AACjC,eAAO,MAAM,MAAM,aAAa,CAAC;AACjC,eAAO,MAAM,MAAM,YAAa,CAAC;AAGjC,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAE5D,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACrC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/C,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,oFAAoF;IACpF,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC,CAAC;IAChE,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,oDAAoD;AACpD,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,KAAG,MAAwB,CAAC;AAE7D,6GAA6G;AAC7G,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAO5F;AAED,oDAAoD;AACpD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAInG;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAE5E;AAED,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAIlE;AAoHD,qHAAqH;AACrH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAoBjD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Transition, TransitionContext } from './Transition.js';
|
|
2
|
+
export interface CrossfadeOptions {
|
|
3
|
+
/** Ms the old scene takes to fade out over the new one (default 400). */
|
|
4
|
+
duration?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The old scene's last frame laid over the new scene and faded out. Two live scenes cannot both be drawn (the old
|
|
8
|
+
* one is gone once the new one enters), so the old frame is captured into one screen-sized render texture, freed
|
|
9
|
+
* when the transition ends. The new scene's `onEnter` runs under the still frame, so a long load reads as a pause.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CrossfadeTransition implements Transition {
|
|
12
|
+
private readonly options;
|
|
13
|
+
private still;
|
|
14
|
+
private texture;
|
|
15
|
+
constructor(options?: CrossfadeOptions);
|
|
16
|
+
cover(ctx: TransitionContext): Promise<void>;
|
|
17
|
+
reveal(ctx: TransitionContext): Promise<void>;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=CrossfadeTransition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossfadeTransition.d.ts","sourceRoot":"","sources":["../../../src/transitions/CrossfadeTransition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,UAAU;IAIxC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,OAAO,CAA8B;gBAEhB,OAAO,GAAE,gBAAqB;IAErD,KAAK,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAS5C,MAAM,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Transition, TransitionContext } from './Transition.js';
|
|
2
|
+
export interface DitherWipeOptions {
|
|
3
|
+
/** `0xrrggbb` (default black). */
|
|
4
|
+
color?: number;
|
|
5
|
+
/** Ms for each half (default 450). */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** The way the wipe travels, or 'none' for the whole screen dissolving at once (default 'right'). */
|
|
8
|
+
direction?: 'left' | 'right' | 'up' | 'down' | 'none';
|
|
9
|
+
/** Screen pixels per dither cell (default the main camera's zoom, so a cell is one world pixel). */
|
|
10
|
+
cell?: number;
|
|
11
|
+
/** Share of the screen the dithered edge spans (default 0.35). */
|
|
12
|
+
softness?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A pixel-friendly wipe: the screen fills with an ordered-dither pattern whose density sweeps across it, in hard
|
|
16
|
+
* whole cells rather than a smooth gradient. The screen is cut into bands along the direction of travel, each a
|
|
17
|
+
* tiling sprite of one dither level, so a frame costs a texture swap per band rather than a rect per cell (a
|
|
18
|
+
* 1080p screen at 2-px cells is half a million cells). Bands are whole tiles wide so the pattern runs on unbroken.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DitherWipeTransition implements Transition {
|
|
21
|
+
private readonly options;
|
|
22
|
+
private readonly bands;
|
|
23
|
+
private root;
|
|
24
|
+
private stopResize;
|
|
25
|
+
private readonly state;
|
|
26
|
+
private reversed;
|
|
27
|
+
constructor(options?: DitherWipeOptions);
|
|
28
|
+
cover(ctx: TransitionContext): Promise<void>;
|
|
29
|
+
reveal(ctx: TransitionContext): Promise<void>;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
private run;
|
|
32
|
+
private layout;
|
|
33
|
+
private paint;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=DitherWipeTransition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DitherWipeTransition.d.ts","sourceRoot":"","sources":["../../../src/transitions/DitherWipeTransition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIlE,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IACtD,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAoBD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,UAAU;IAOzC,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,UAAU,CAA6B;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;IAClC,OAAO,CAAC,QAAQ,CAAS;gBAEI,OAAO,GAAE,iBAAsB;IAEtD,KAAK,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAU5C,MAAM,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOnD,OAAO,IAAI,IAAI;IAQf,OAAO,CAAC,GAAG;IAUX,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,KAAK;CAed"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Transition, TransitionContext } from './Transition.js';
|
|
2
|
+
export interface FadeOptions {
|
|
3
|
+
/** `0xrrggbb` (default black). */
|
|
4
|
+
color?: number;
|
|
5
|
+
/** Ms for each half (default 300). */
|
|
6
|
+
duration?: number;
|
|
7
|
+
/** Ms to rest fully covered before revealing (default 0). */
|
|
8
|
+
hold?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Fades to a colour, swaps the scene, fades back. */
|
|
11
|
+
export declare class FadeTransition implements Transition {
|
|
12
|
+
private readonly options;
|
|
13
|
+
private sheet;
|
|
14
|
+
private stopResize;
|
|
15
|
+
constructor(options?: FadeOptions);
|
|
16
|
+
cover(ctx: TransitionContext): Promise<void>;
|
|
17
|
+
reveal(ctx: TransitionContext): Promise<void>;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=FadeTransition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FadeTransition.d.ts","sourceRoot":"","sources":["../../../src/transitions/FadeTransition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,qBAAa,cAAe,YAAW,UAAU;IAInC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAHpC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,UAAU,CAA6B;gBAElB,OAAO,GAAE,WAAgB;IAEhD,KAAK,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAe5C,MAAM,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAWnD,OAAO,IAAI,IAAI;CAMhB"}
|