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,102 @@
|
|
|
1
|
+
import { checksum as u } from "./checksum.js";
|
|
2
|
+
import { MemoryBackend as f } from "./MemoryBackend.js";
|
|
3
|
+
import { migrateSave as k, MigrationError as m } from "./migrateSave.js";
|
|
4
|
+
import { WebStorageBackend as l } from "./WebStorageBackend.js";
|
|
5
|
+
const a = ".bak";
|
|
6
|
+
class S {
|
|
7
|
+
version;
|
|
8
|
+
backend;
|
|
9
|
+
prefix;
|
|
10
|
+
migrations;
|
|
11
|
+
backup;
|
|
12
|
+
now;
|
|
13
|
+
queues = /* @__PURE__ */ new Map();
|
|
14
|
+
constructor(e) {
|
|
15
|
+
if (!Number.isInteger(e.version) || e.version < 1) throw new Error("SaveStore: version must be a whole number from 1");
|
|
16
|
+
this.version = e.version, this.backend = e.backend ?? w(), this.prefix = e.prefix ?? "save:", this.migrations = e.migrations ?? {}, this.backup = e.backup ?? !0, this.now = e.now ?? Date.now;
|
|
17
|
+
}
|
|
18
|
+
/** Writes `data` to `slot` at the current version. Rejects when the backend does (a full disk, a quota). */
|
|
19
|
+
save(e, n, r = null) {
|
|
20
|
+
return this.queued(e, async () => {
|
|
21
|
+
const t = this.key(e), i = JSON.stringify(n);
|
|
22
|
+
if (i === void 0) throw new Error(`SaveStore: data for "${e}" is not JSON`);
|
|
23
|
+
const s = { slot: e, version: this.version, savedAt: this.now(), meta: r }, d = { format: "lantern-save", version: s.version, savedAt: s.savedAt, meta: r, checksum: u(i), data: n };
|
|
24
|
+
if (this.backup) {
|
|
25
|
+
const c = await this.backend.read(t);
|
|
26
|
+
c !== null && v(c) && await this.backend.write(t + a, c);
|
|
27
|
+
}
|
|
28
|
+
return await this.backend.write(t, JSON.stringify(d)), s;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Reads `slot`, brought to the current version. Never throws for a bad slot: the result says what went wrong. */
|
|
32
|
+
load(e) {
|
|
33
|
+
return this.queued(e, async () => {
|
|
34
|
+
const n = this.key(e), r = await this.open(e, await this.backend.read(n), !1);
|
|
35
|
+
if (r.ok || !this.backup || r.reason !== "corrupt") return r;
|
|
36
|
+
const t = await this.open(e, await this.backend.read(n + a), !0);
|
|
37
|
+
return t.ok ? t : r;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Removes a slot and its backup. */
|
|
41
|
+
delete(e) {
|
|
42
|
+
return this.queued(e, async () => {
|
|
43
|
+
const n = this.key(e);
|
|
44
|
+
await this.backend.remove(n), await this.backend.remove(n + a);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/** Every slot that reads, newest first, without migrating its data. A damaged slot is left out. */
|
|
48
|
+
async list() {
|
|
49
|
+
const e = await this.backend.keys(this.prefix), n = [];
|
|
50
|
+
for (const r of e) {
|
|
51
|
+
if (r.endsWith(a)) continue;
|
|
52
|
+
const t = await this.backend.read(r), i = t === null ? null : h(t);
|
|
53
|
+
i && v(t) && n.push({ slot: r.slice(this.prefix.length), version: i.version, savedAt: i.savedAt, meta: i.meta });
|
|
54
|
+
}
|
|
55
|
+
return n.sort((r, t) => t.savedAt - r.savedAt);
|
|
56
|
+
}
|
|
57
|
+
async open(e, n, r) {
|
|
58
|
+
if (n === null) return { ok: !1, slot: e, reason: r ? "corrupt" : "missing" };
|
|
59
|
+
const t = h(n);
|
|
60
|
+
if (!t || u(JSON.stringify(t.data)) !== t.checksum) return { ok: !1, slot: e, reason: "corrupt" };
|
|
61
|
+
try {
|
|
62
|
+
const i = k(t.data, t.version, this.version, this.migrations), s = { slot: e, version: t.version, savedAt: t.savedAt, meta: t.meta };
|
|
63
|
+
return { ok: !0, data: i, info: s, migrated: t.version !== this.version, fromBackup: r };
|
|
64
|
+
} catch (i) {
|
|
65
|
+
if (i instanceof m) return { ok: !1, slot: e, reason: i.reason, error: i };
|
|
66
|
+
throw i;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
key(e) {
|
|
70
|
+
if (!e || e.endsWith(a)) throw new Error(`SaveStore: "${e}" is not a usable slot name`);
|
|
71
|
+
return this.prefix + e;
|
|
72
|
+
}
|
|
73
|
+
queued(e, n) {
|
|
74
|
+
const r = (this.queues.get(e) ?? Promise.resolve()).then(n), t = r.catch(() => {
|
|
75
|
+
});
|
|
76
|
+
return this.queues.set(e, t), t.then(() => {
|
|
77
|
+
this.queues.get(e) === t && this.queues.delete(e);
|
|
78
|
+
}), r;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function h(o) {
|
|
82
|
+
try {
|
|
83
|
+
const e = JSON.parse(o);
|
|
84
|
+
return !e || e.format !== "lantern-save" || typeof e.version != "number" || typeof e.checksum != "string" || !("data" in e) ? null : e;
|
|
85
|
+
} catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function v(o) {
|
|
90
|
+
const e = h(o);
|
|
91
|
+
return e !== null && u(JSON.stringify(e.data)) === e.checksum;
|
|
92
|
+
}
|
|
93
|
+
function w() {
|
|
94
|
+
try {
|
|
95
|
+
if (typeof globalThis.localStorage < "u") return new l(globalThis.localStorage);
|
|
96
|
+
} catch {
|
|
97
|
+
}
|
|
98
|
+
return new f();
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
S as SaveStore
|
|
102
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class a {
|
|
2
|
+
constructor(e = globalThis.localStorage) {
|
|
3
|
+
if (this.storage = e, !e) throw new Error("WebStorageBackend: no Web Storage here; pass one or use another backend");
|
|
4
|
+
}
|
|
5
|
+
storage;
|
|
6
|
+
async read(e) {
|
|
7
|
+
return this.storage.getItem(e);
|
|
8
|
+
}
|
|
9
|
+
async write(e, t) {
|
|
10
|
+
this.storage.setItem(e, t);
|
|
11
|
+
}
|
|
12
|
+
async remove(e) {
|
|
13
|
+
this.storage.removeItem(e);
|
|
14
|
+
}
|
|
15
|
+
async keys(e) {
|
|
16
|
+
const t = [];
|
|
17
|
+
for (let r = 0; r < this.storage.length; r++) {
|
|
18
|
+
const s = this.storage.key(r);
|
|
19
|
+
s !== null && s.startsWith(e) && t.push(s);
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
a as WebStorageBackend
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class o extends Error {
|
|
2
|
+
constructor(r, i, t, n) {
|
|
3
|
+
super(r, n), this.reason = i, this.fromVersion = t, this.name = "MigrationError";
|
|
4
|
+
}
|
|
5
|
+
reason;
|
|
6
|
+
fromVersion;
|
|
7
|
+
}
|
|
8
|
+
function v(s, r, i, t) {
|
|
9
|
+
if (!Number.isInteger(r) || r > i)
|
|
10
|
+
throw new o(`save version ${r} is newer than this build reads (${i})`, "too-new", r);
|
|
11
|
+
let n = s;
|
|
12
|
+
for (let e = r; e < i; e++) {
|
|
13
|
+
const a = t[e];
|
|
14
|
+
if (!a) throw new o(`no migration from save version ${e} to ${e + 1}`, "no-migration", r);
|
|
15
|
+
try {
|
|
16
|
+
n = a(n);
|
|
17
|
+
} catch (h) {
|
|
18
|
+
throw new o(`migration from save version ${e} failed`, "migration-failed", r, { cause: h });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
o as MigrationError,
|
|
25
|
+
v as migrateSave
|
|
26
|
+
};
|
package/dist/settings.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
reducedFx: !1,
|
|
3
|
+
batterySaver: !1,
|
|
4
|
+
combatLights: !0,
|
|
5
|
+
sfxVolume: 0.8,
|
|
6
|
+
musicVolume: 0.6
|
|
7
|
+
};
|
|
8
|
+
let t = { ...r };
|
|
9
|
+
const s = /* @__PURE__ */ new Set(), o = {
|
|
10
|
+
getState() {
|
|
11
|
+
return t;
|
|
12
|
+
},
|
|
13
|
+
set(e) {
|
|
14
|
+
t = { ...t, ...e };
|
|
15
|
+
for (const n of [...s]) n(t);
|
|
16
|
+
},
|
|
17
|
+
subscribe(e) {
|
|
18
|
+
return s.add(e), () => s.delete(e);
|
|
19
|
+
},
|
|
20
|
+
reset() {
|
|
21
|
+
o.set(r);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
o as engineSettings
|
|
26
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Container as M, Sprite as P } from "pixi.js";
|
|
2
|
+
import { tileAt as F, tileRect as H, FLIP_D as V, FLIP_H as $, FLIP_V as L } from "./tiled.js";
|
|
3
|
+
let S = 0;
|
|
4
|
+
class T {
|
|
5
|
+
constructor(s, i, e = {}) {
|
|
6
|
+
this.stage = s, this.map = i;
|
|
7
|
+
const p = e.textureFor ?? ((t) => t.name), r = Math.max(1, e.chunkTiles ?? 32), m = e.baseDepth ?? -1e6, w = e.layers ? new Set(e.layers) : null, c = i.layers.filter((t) => t.kind === "tiles" && (w ? w.has(t.name) : t.visible)), f = e.parent ?? s.world;
|
|
8
|
+
c.forEach((t, y) => {
|
|
9
|
+
const x = typeof t.properties.depth == "number" ? t.properties.depth : m + y, l = new M();
|
|
10
|
+
l.zIndex = x, l.alpha = t.opacity, l.position.set(t.offsetX, t.offsetY), this.layers.set(t.name, l), f.addChild(l);
|
|
11
|
+
for (let n = 0; n < i.height; n += r)
|
|
12
|
+
for (let a = 0; a < i.width; a += r) {
|
|
13
|
+
const o = Math.min(r, i.width - a), d = Math.min(r, i.height - n);
|
|
14
|
+
this.paintChunk(t, l, a, n, o, d, p);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
stage;
|
|
19
|
+
map;
|
|
20
|
+
/** One container per drawn tile layer, by name, each at its own depth among the bodies. */
|
|
21
|
+
layers = /* @__PURE__ */ new Map();
|
|
22
|
+
chunks = [];
|
|
23
|
+
id = S++;
|
|
24
|
+
/** Shows only the chunks in the camera's view (plus a margin in world px). Call once a frame. */
|
|
25
|
+
update(s = 32) {
|
|
26
|
+
const i = this.stage.cameras.main.worldView;
|
|
27
|
+
for (const e of this.chunks)
|
|
28
|
+
e.sprite.visible = e.x < i.right + s && e.x + e.w > i.x - s && e.y < i.bottom + s && e.y + e.h > i.y - s;
|
|
29
|
+
}
|
|
30
|
+
/** World size of the map in px. */
|
|
31
|
+
get widthPx() {
|
|
32
|
+
return this.map.width * this.map.tileWidth;
|
|
33
|
+
}
|
|
34
|
+
get heightPx() {
|
|
35
|
+
return this.map.height * this.map.tileHeight;
|
|
36
|
+
}
|
|
37
|
+
destroy() {
|
|
38
|
+
for (const s of this.chunks) this.stage.textures.remove(s.key);
|
|
39
|
+
this.chunks.length = 0;
|
|
40
|
+
for (const s of this.layers.values()) s.destroy({ children: !0 });
|
|
41
|
+
this.layers.clear();
|
|
42
|
+
}
|
|
43
|
+
paintChunk(s, i, e, p, r, m, w) {
|
|
44
|
+
const { map: c } = this, f = c.tileWidth, t = c.tileHeight;
|
|
45
|
+
let y = !1;
|
|
46
|
+
const x = `tilemap:${this.id}:${s.name}:${e},${p}`, n = Math.max(t, ...c.tilesets.map((u) => u.tileHeight)) - t, a = this.stage.textures.createCanvas(x, r * f, m * t + n), o = a.context;
|
|
47
|
+
o.imageSmoothingEnabled = !1;
|
|
48
|
+
for (let u = 0; u < m; u++)
|
|
49
|
+
for (let k = 0; k < r; k++) {
|
|
50
|
+
const v = s.data[(p + u) * c.width + (e + k)], g = F(c, v);
|
|
51
|
+
if (!g) continue;
|
|
52
|
+
const b = this.stage.textures.exists(w(g.tileset)) ? this.stage.textures.get(w(g.tileset)).source.resource : null;
|
|
53
|
+
if (!b) continue;
|
|
54
|
+
const h = H(g.tileset, g.local), C = k * f, I = n + (u + 1) * t - h.h;
|
|
55
|
+
o.save(), o.translate(C + h.w / 2, I + h.h / 2), v & V && o.transform(0, 1, 1, 0, 0, 0), o.scale(v & $ ? -1 : 1, v & L ? -1 : 1), o.drawImage(b, h.x, h.y, h.w, h.h, -h.w / 2, -h.h / 2, h.w, h.h), o.restore(), y = !0;
|
|
56
|
+
}
|
|
57
|
+
if (!y) {
|
|
58
|
+
this.stage.textures.remove(x);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
a.refresh();
|
|
62
|
+
const d = new P(a.whole);
|
|
63
|
+
d.position.set(e * f, p * t - n), i.addChild(d), this.chunks.push({ sprite: d, x: d.x + s.offsetX, y: d.y + s.offsetY, w: r * f, h: m * t + n, key: x });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
T as TilemapView
|
|
68
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createCollisionGrid as c } from "../net/movement.js";
|
|
2
|
+
import { gidOf as h, tileAt as y } from "./tiled.js";
|
|
3
|
+
function w(i, s = {}) {
|
|
4
|
+
if (i.tileWidth !== i.tileHeight) throw new Error(`Tiled map: collision needs square tiles, not ${i.tileWidth}x${i.tileHeight}`);
|
|
5
|
+
const l = s.solid ?? (i.layers.some((e) => e.kind === "tiles" && e.name === "collision") ? "collision" : { property: "solid" }), o = i.width * i.height, r = new Uint8Array(o);
|
|
6
|
+
if (typeof l == "string") {
|
|
7
|
+
const e = i.layers.find((t) => t.kind === "tiles" && t.name === l);
|
|
8
|
+
if (!e || e.kind !== "tiles") throw new Error(`Tiled map: no tile layer named "${l}"`);
|
|
9
|
+
for (let t = 0; t < o; t++) h(e.data[t]) !== 0 && (r[t] = 1);
|
|
10
|
+
} else
|
|
11
|
+
for (const e of i.layers)
|
|
12
|
+
if (e.kind === "tiles")
|
|
13
|
+
for (let t = 0; t < o; t++) {
|
|
14
|
+
const n = y(i, e.data[t]);
|
|
15
|
+
n && n.tileset.tileProperties.get(n.local)?.[l.property] === !0 && (r[t] = 1);
|
|
16
|
+
}
|
|
17
|
+
let d = "";
|
|
18
|
+
for (let e = 0; e < o; e++) d += r[e] ? "1" : "0";
|
|
19
|
+
const { solid: g, ...f } = s;
|
|
20
|
+
return c(i.width, i.height, i.tileWidth, d, f);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
w as collisionFromTiled
|
|
24
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
const b = 2147483648, w = 1073741824, A = 536870912;
|
|
2
|
+
const g = (e) => e & 536870911;
|
|
3
|
+
function j(e, t) {
|
|
4
|
+
const i = g(t);
|
|
5
|
+
if (i === 0) return null;
|
|
6
|
+
let n = null;
|
|
7
|
+
for (const r of e.tilesets) r.firstGid <= i && (!n || r.firstGid > n.firstGid) && (n = r);
|
|
8
|
+
return !n || i - n.firstGid >= n.tileCount ? null : { tileset: n, local: i - n.firstGid };
|
|
9
|
+
}
|
|
10
|
+
function x(e, t) {
|
|
11
|
+
const i = t % e.columns, n = Math.floor(t / e.columns);
|
|
12
|
+
return { x: e.margin + i * (e.tileWidth + e.spacing), y: e.margin + n * (e.tileHeight + e.spacing), w: e.tileWidth, h: e.tileHeight };
|
|
13
|
+
}
|
|
14
|
+
function $(e, t) {
|
|
15
|
+
return e.layers.find((i) => i.name === t);
|
|
16
|
+
}
|
|
17
|
+
function N(e, t) {
|
|
18
|
+
const i = [];
|
|
19
|
+
for (const n of e.layers) if (n.kind === "objects")
|
|
20
|
+
for (const r of n.objects) (t === void 0 || r.type === t) && i.push(r);
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
class a extends Error {
|
|
24
|
+
constructor(t) {
|
|
25
|
+
super(`Tiled map: ${t}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function l(e) {
|
|
29
|
+
const t = {};
|
|
30
|
+
if (!Array.isArray(e)) return t;
|
|
31
|
+
for (const i of e) i && typeof i.name == "string" && ["string", "number", "boolean"].includes(typeof i.value) && (t[i.name] = i.value);
|
|
32
|
+
return t;
|
|
33
|
+
}
|
|
34
|
+
function o(e, t) {
|
|
35
|
+
if (typeof e != "number" || !Number.isFinite(e)) throw new a(`${t} must be a number`);
|
|
36
|
+
return e;
|
|
37
|
+
}
|
|
38
|
+
function d(e) {
|
|
39
|
+
if (typeof atob == "function") {
|
|
40
|
+
const t = atob(e.trim()), i = new Uint8Array(t.length);
|
|
41
|
+
for (let n = 0; n < t.length; n++) i[n] = t.charCodeAt(n);
|
|
42
|
+
return i;
|
|
43
|
+
}
|
|
44
|
+
return new Uint8Array(globalThis.Buffer.from(e, "base64"));
|
|
45
|
+
}
|
|
46
|
+
function h(e, t) {
|
|
47
|
+
if (e.compression) throw new a(`layer "${e.name}" is ${e.compression}-compressed; save it as CSV or uncompressed base64`);
|
|
48
|
+
let i;
|
|
49
|
+
if (e.encoding === "base64") {
|
|
50
|
+
const n = d(String(e.data));
|
|
51
|
+
if (n.length !== t * 4) throw new a(`layer "${e.name}" holds ${n.length / 4} cells, not ${t}`);
|
|
52
|
+
const r = new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
53
|
+
i = new Uint32Array(t);
|
|
54
|
+
for (let s = 0; s < t; s++) i[s] = r.getUint32(s * 4, !0);
|
|
55
|
+
} else {
|
|
56
|
+
if (!Array.isArray(e.data) || e.data.length !== t) throw new a(`layer "${e.name}" must hold ${t} cells`);
|
|
57
|
+
i = Uint32Array.from(e.data);
|
|
58
|
+
}
|
|
59
|
+
return i;
|
|
60
|
+
}
|
|
61
|
+
function m(e) {
|
|
62
|
+
const t = {
|
|
63
|
+
id: o(e.id, "object id"),
|
|
64
|
+
name: String(e.name ?? ""),
|
|
65
|
+
type: String(e.type ?? e.class ?? ""),
|
|
66
|
+
x: o(e.x, "object x"),
|
|
67
|
+
y: o(e.y, "object y"),
|
|
68
|
+
width: Number(e.width ?? 0),
|
|
69
|
+
height: Number(e.height ?? 0),
|
|
70
|
+
rotation: Number(e.rotation ?? 0),
|
|
71
|
+
point: e.point === !0,
|
|
72
|
+
ellipse: e.ellipse === !0,
|
|
73
|
+
properties: l(e.properties)
|
|
74
|
+
};
|
|
75
|
+
return typeof e.gid == "number" && (t.gid = e.gid), Array.isArray(e.polygon) && (t.polygon = e.polygon.map((i) => ({ x: o(i.x, "polygon x"), y: o(i.y, "polygon y") }))), t;
|
|
76
|
+
}
|
|
77
|
+
function u(e, t, i, n = { visible: !0, opacity: 1, x: 0, y: 0 }) {
|
|
78
|
+
if (Array.isArray(e))
|
|
79
|
+
for (const r of e) {
|
|
80
|
+
const s = n.visible && r.visible !== !1, c = n.opacity * (typeof r.opacity == "number" ? r.opacity : 1), f = n.x + Number(r.offsetx ?? 0), p = n.y + Number(r.offsety ?? 0);
|
|
81
|
+
r.type === "tilelayer" ? i.push({ kind: "tiles", name: String(r.name ?? ""), data: h(r, t.width * t.height), visible: s, opacity: c, offsetX: f, offsetY: p, properties: l(r.properties) }) : r.type === "objectgroup" ? i.push({ kind: "objects", name: String(r.name ?? ""), objects: (r.objects ?? []).map(m), visible: s, properties: l(r.properties) }) : r.type === "group" && u(r.layers, t, i, { visible: s, opacity: c, x: f, y: p });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function y(e) {
|
|
85
|
+
if (typeof e.source == "string") throw new a(`tileset "${e.source}" is external; embed it in the map (Map → Embed Tilesets)`);
|
|
86
|
+
if (typeof e.image != "string") throw new a(`tileset "${e.name}" is a collection of images; use a single-image tileset`);
|
|
87
|
+
const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
88
|
+
for (const n of e.tiles ?? []) {
|
|
89
|
+
const r = o(n.id, "tile id");
|
|
90
|
+
n.properties && t.set(r, l(n.properties)), Array.isArray(n.animation) && i.set(r, n.animation.map((s) => ({ tileId: o(s.tileid, "animation tileid"), duration: o(s.duration, "animation duration") })));
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
name: String(e.name ?? ""),
|
|
94
|
+
firstGid: o(e.firstgid, "tileset firstgid"),
|
|
95
|
+
image: e.image,
|
|
96
|
+
imageWidth: o(e.imagewidth, "tileset imagewidth"),
|
|
97
|
+
imageHeight: o(e.imageheight, "tileset imageheight"),
|
|
98
|
+
tileWidth: o(e.tilewidth, "tileset tilewidth"),
|
|
99
|
+
tileHeight: o(e.tileheight, "tileset tileheight"),
|
|
100
|
+
columns: o(e.columns, "tileset columns"),
|
|
101
|
+
tileCount: o(e.tilecount, "tileset tilecount"),
|
|
102
|
+
margin: Number(e.margin ?? 0),
|
|
103
|
+
spacing: Number(e.spacing ?? 0),
|
|
104
|
+
tileProperties: t,
|
|
105
|
+
animations: i,
|
|
106
|
+
properties: l(e.properties)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function S(e) {
|
|
110
|
+
const t = e;
|
|
111
|
+
if (!t || typeof t != "object") throw new a("not a JSON object");
|
|
112
|
+
if (t.infinite) throw new a("infinite maps are not supported; uncheck Map → Map Properties → Infinite");
|
|
113
|
+
if (t.orientation && t.orientation !== "orthogonal") throw new a(`${t.orientation} maps are not supported, only orthogonal`);
|
|
114
|
+
const i = o(t.width, "width"), n = o(t.height, "height"), r = [];
|
|
115
|
+
u(t.layers, { width: i, height: n }, r);
|
|
116
|
+
const s = {
|
|
117
|
+
width: i,
|
|
118
|
+
height: n,
|
|
119
|
+
tileWidth: o(t.tilewidth, "tilewidth"),
|
|
120
|
+
tileHeight: o(t.tileheight, "tileheight"),
|
|
121
|
+
layers: r,
|
|
122
|
+
tilesets: (t.tilesets ?? []).map(y),
|
|
123
|
+
properties: l(t.properties)
|
|
124
|
+
};
|
|
125
|
+
return typeof t.backgroundcolor == "string" && (s.backgroundColor = t.backgroundcolor), s;
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
A as FLIP_D,
|
|
129
|
+
b as FLIP_H,
|
|
130
|
+
w as FLIP_V,
|
|
131
|
+
g as gidOf,
|
|
132
|
+
$ as layerByName,
|
|
133
|
+
N as objectsOf,
|
|
134
|
+
S as parseTiled,
|
|
135
|
+
j as tileAt,
|
|
136
|
+
x as tileRect
|
|
137
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RenderTexture as s, Sprite as i } from "pixi.js";
|
|
2
|
+
import { tweenDone as n } from "./tweenDone.js";
|
|
3
|
+
class h {
|
|
4
|
+
constructor(t = {}) {
|
|
5
|
+
this.options = t;
|
|
6
|
+
}
|
|
7
|
+
options;
|
|
8
|
+
still = null;
|
|
9
|
+
texture = null;
|
|
10
|
+
async cover(t) {
|
|
11
|
+
const { app: e } = t, r = s.create({ width: e.screen.width, height: e.screen.height, resolution: e.renderer.resolution });
|
|
12
|
+
e.renderer.render({ container: e.stage, target: r }), this.texture = r, this.still = new i(r), t.layer.addChild(this.still);
|
|
13
|
+
}
|
|
14
|
+
async reveal(t) {
|
|
15
|
+
this.still && await n(t.stage, { targets: this.still, alpha: 0, duration: this.options.duration ?? 400, ease: "Sine.InOut" });
|
|
16
|
+
}
|
|
17
|
+
dispose() {
|
|
18
|
+
this.still?.destroy(), this.still = null, this.texture?.destroy(!0), this.texture = null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
h as CrossfadeTransition
|
|
23
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Container as b, TilingSprite as y, Texture as z, CanvasSource as C } from "pixi.js";
|
|
2
|
+
import { DITHER_LEVELS as g, wipeLevel as M, ditherCovered as R } from "./ditherMask.js";
|
|
3
|
+
import { tweenDone as S } from "./tweenDone.js";
|
|
4
|
+
let d = null;
|
|
5
|
+
function f() {
|
|
6
|
+
if (d) return d;
|
|
7
|
+
d = [];
|
|
8
|
+
for (let u = 0; u <= g; u++) {
|
|
9
|
+
const t = document.createElement("canvas");
|
|
10
|
+
t.width = 4, t.height = 4;
|
|
11
|
+
const n = t.getContext("2d");
|
|
12
|
+
n.fillStyle = "#ffffff";
|
|
13
|
+
for (let o = 0; o < 4; o++) for (let e = 0; e < 4; e++) R(u, e, o) && n.fillRect(e, o, 1, 1);
|
|
14
|
+
d.push(new z({ source: new C({ resource: t, scaleMode: "nearest" }) }));
|
|
15
|
+
}
|
|
16
|
+
return d;
|
|
17
|
+
}
|
|
18
|
+
class L {
|
|
19
|
+
constructor(t = {}) {
|
|
20
|
+
this.options = t;
|
|
21
|
+
}
|
|
22
|
+
options;
|
|
23
|
+
bands = [];
|
|
24
|
+
root = null;
|
|
25
|
+
stopResize = null;
|
|
26
|
+
state = { p: 0 };
|
|
27
|
+
reversed = !1;
|
|
28
|
+
async cover(t) {
|
|
29
|
+
this.root = new b(), t.layer.addChild(this.root), this.layout(t), this.stopResize = t.stage.onResize(() => this.layout(t)), this.state.p = 0, this.reversed = !1, await this.run(t, 1);
|
|
30
|
+
}
|
|
31
|
+
async reveal(t) {
|
|
32
|
+
this.root && (this.reversed = !0, await this.run(t, 0));
|
|
33
|
+
}
|
|
34
|
+
dispose() {
|
|
35
|
+
this.stopResize?.(), this.stopResize = null, this.root?.destroy({ children: !0 }), this.root = null, this.bands.length = 0;
|
|
36
|
+
}
|
|
37
|
+
run(t, n) {
|
|
38
|
+
return S(t.stage, {
|
|
39
|
+
targets: this.state,
|
|
40
|
+
p: n,
|
|
41
|
+
duration: this.options.duration ?? 450,
|
|
42
|
+
ease: "Linear",
|
|
43
|
+
onUpdate: () => this.paint()
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
layout(t) {
|
|
47
|
+
const n = this.root;
|
|
48
|
+
for (const h of n.removeChildren()) h.destroy();
|
|
49
|
+
this.bands.length = 0;
|
|
50
|
+
const o = Math.max(1, Math.round(this.options.cell ?? t.stage.cameras.main.zoom)), e = o * 4, r = t.stage.width, i = t.stage.height, s = this.options.direction ?? "right", a = s === "left" || s === "right", p = s === "none" ? 0 : a ? r : i, c = s === "none" ? 0 : Math.max(e, Math.ceil(p / 32 / e) * e), v = s === "none" ? 1 : Math.ceil(p / c);
|
|
51
|
+
for (let h = 0; h < v; h++) {
|
|
52
|
+
const m = s === "none" || !a ? r : c, w = s === "none" || a ? i : c, l = new y({ texture: f()[0], width: m, height: w });
|
|
53
|
+
l.tileScale.set(o, o), s !== "none" && (a ? l.x = h * c : l.y = h * c), l.tint = this.options.color ?? 0, n.addChild(l), this.bands.push(l);
|
|
54
|
+
}
|
|
55
|
+
this.paint();
|
|
56
|
+
}
|
|
57
|
+
paint() {
|
|
58
|
+
const t = this.options.direction ?? "right", n = t === "none" ? 1 : this.options.softness ?? 0.35, o = f(), e = this.bands.length;
|
|
59
|
+
for (let r = 0; r < e; r++) {
|
|
60
|
+
let i = t === "none" ? 0.5 : (r + 0.5) / e;
|
|
61
|
+
(t === "left" || t === "up") && (i = 1 - i), this.reversed && (i = 1 - i);
|
|
62
|
+
const s = t === "none" ? Math.round(this.state.p * g) : M(this.state.p, i, n), a = this.bands[r];
|
|
63
|
+
a.visible = s > 0, a.texture = o[s];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
L as DitherWipeTransition
|
|
69
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Sprite as o, Texture as a } from "pixi.js";
|
|
2
|
+
import { tweenDone as i } from "./tweenDone.js";
|
|
3
|
+
class l {
|
|
4
|
+
constructor(t = {}) {
|
|
5
|
+
this.options = t;
|
|
6
|
+
}
|
|
7
|
+
options;
|
|
8
|
+
sheet = null;
|
|
9
|
+
stopResize = null;
|
|
10
|
+
async cover(t) {
|
|
11
|
+
const e = new o(a.WHITE);
|
|
12
|
+
e.tint = this.options.color ?? 0, e.alpha = 0, this.sheet = e, t.layer.addChild(e);
|
|
13
|
+
const s = () => {
|
|
14
|
+
e.width = t.stage.width, e.height = t.stage.height;
|
|
15
|
+
};
|
|
16
|
+
s(), this.stopResize = t.stage.onResize(s), await i(t.stage, { targets: e, alpha: 1, duration: this.options.duration ?? 300, ease: "Sine.InOut" });
|
|
17
|
+
}
|
|
18
|
+
async reveal(t) {
|
|
19
|
+
this.sheet && await i(t.stage, {
|
|
20
|
+
targets: this.sheet,
|
|
21
|
+
alpha: 0,
|
|
22
|
+
delay: this.options.hold ?? 0,
|
|
23
|
+
duration: this.options.duration ?? 300,
|
|
24
|
+
ease: "Sine.InOut"
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
dispose() {
|
|
28
|
+
this.stopResize?.(), this.stopResize = null, this.sheet?.destroy(), this.sheet = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
l as FadeTransition
|
|
33
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Container as h, Sprite as i, Texture as o } from "pixi.js";
|
|
2
|
+
import { tweenDone as r } from "./tweenDone.js";
|
|
3
|
+
class l {
|
|
4
|
+
constructor(t, s = {}) {
|
|
5
|
+
this.stage = t, this.options = s;
|
|
6
|
+
for (const e of [this.top, this.bottom]) e.tint = s.color ?? 0;
|
|
7
|
+
this.view.addChild(this.top, this.bottom), this.view.visible = !1, t.screen.addChild(this.view), this.stopResize = t.onResize(() => this.layout()), this.layout();
|
|
8
|
+
}
|
|
9
|
+
stage;
|
|
10
|
+
options;
|
|
11
|
+
view = new h();
|
|
12
|
+
top = new i(o.WHITE);
|
|
13
|
+
bottom = new i(o.WHITE);
|
|
14
|
+
/** 0 hidden, 1 fully in. */
|
|
15
|
+
state = { k: 0 };
|
|
16
|
+
stopResize;
|
|
17
|
+
/** Whether the bars are (partly) in. */
|
|
18
|
+
get shown() {
|
|
19
|
+
return this.state.k > 0;
|
|
20
|
+
}
|
|
21
|
+
/** Slides the bars in over `ms` (0: at once). */
|
|
22
|
+
show(t = 400) {
|
|
23
|
+
return this.to(1, t);
|
|
24
|
+
}
|
|
25
|
+
hide(t = 400) {
|
|
26
|
+
return this.to(0, t);
|
|
27
|
+
}
|
|
28
|
+
destroy() {
|
|
29
|
+
this.stage.tweens.killTweensOf(this.state), this.stopResize(), this.view.destroy({ children: !0 });
|
|
30
|
+
}
|
|
31
|
+
to(t, s) {
|
|
32
|
+
return this.stage.tweens.killTweensOf(this.state), s <= 0 ? (this.state.k = t, this.layout(), Promise.resolve()) : r(this.stage, { targets: this.state, k: t, duration: s, ease: "Sine.InOut", onUpdate: () => this.layout() });
|
|
33
|
+
}
|
|
34
|
+
layout() {
|
|
35
|
+
const t = this.stage.width, s = this.stage.height, e = Math.round(s * (this.options.share ?? 0.12) * this.state.k);
|
|
36
|
+
this.view.visible = e > 0, this.top.width = t, this.top.height = e, this.bottom.width = t, this.bottom.height = e, this.bottom.y = s - e;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
l as Letterbox
|
|
41
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const s = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5], f = 16;
|
|
2
|
+
function a(t, n, o) {
|
|
3
|
+
return s[(o & 3) * 4 + (n & 3)] < t;
|
|
4
|
+
}
|
|
5
|
+
function i(t, n, o) {
|
|
6
|
+
const r = Math.max(1e-3, o), e = (t * (1 + r) - n) / r, c = e <= 0 ? 0 : e >= 1 ? 1 : e;
|
|
7
|
+
return Math.round(c * f);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as BAYER4,
|
|
11
|
+
f as DITHER_LEVELS,
|
|
12
|
+
a as ditherCovered,
|
|
13
|
+
i as wipeLevel
|
|
14
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Container as l } from "pixi.js";
|
|
2
|
+
const c = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function f(t, a, e, s = "replace") {
|
|
4
|
+
const o = (c.get(t) ?? Promise.resolve()).then(() => i(t, a, e, s)), p = o.catch(() => {
|
|
5
|
+
});
|
|
6
|
+
return c.set(t, p), p.then(() => {
|
|
7
|
+
c.get(t) === p && c.delete(t);
|
|
8
|
+
}), o;
|
|
9
|
+
}
|
|
10
|
+
async function i(t, a, e, s) {
|
|
11
|
+
const r = new l();
|
|
12
|
+
t.app.stage.addChild(r);
|
|
13
|
+
const o = { stage: t.stage, app: t.app, layer: r };
|
|
14
|
+
try {
|
|
15
|
+
if (await e.cover(o), s === "pop") await t.scenes.pop();
|
|
16
|
+
else {
|
|
17
|
+
if (!a) throw new Error(`transitionTo: '${s}' needs a scene`);
|
|
18
|
+
await (s === "push" ? t.scenes.push(a) : t.scenes.replace(a));
|
|
19
|
+
}
|
|
20
|
+
await e.reveal(o);
|
|
21
|
+
} finally {
|
|
22
|
+
e.dispose(), r.destroy({ children: !0 });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
f as transitionTo
|
|
27
|
+
};
|