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,83 @@
|
|
|
1
|
+
import { writeProp as f, readProp as u } from "./tweenProps.js";
|
|
2
|
+
class m {
|
|
3
|
+
constructor(s, t, i, e = [], h = [], a = [], r = [], n = null, o = null, l = null) {
|
|
4
|
+
this.kind = s, this.start = t, this.duration = i, this.targets = e, this.props = h, this.ends = a, this.givenFrom = r, this.ease = n, this.fn = o, this.nested = l;
|
|
5
|
+
}
|
|
6
|
+
kind;
|
|
7
|
+
start;
|
|
8
|
+
duration;
|
|
9
|
+
targets;
|
|
10
|
+
props;
|
|
11
|
+
ends;
|
|
12
|
+
givenFrom;
|
|
13
|
+
ease;
|
|
14
|
+
fn;
|
|
15
|
+
nested;
|
|
16
|
+
/** Every target × prop start value, captured once (`inited`). */
|
|
17
|
+
froms = [];
|
|
18
|
+
inited = !1;
|
|
19
|
+
/** Progress (tween) or own time (nested) last written; NaN before the first, so the first always writes. */
|
|
20
|
+
last = Number.NaN;
|
|
21
|
+
get end() {
|
|
22
|
+
return this.start + this.duration;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The playhead moved from `a` to `b` (the parent's own time, either way). Calls fire when `fire` is set and their
|
|
26
|
+
* time lies in the span with its start left out and its end kept — so a call met at the end of one frame does not
|
|
27
|
+
* fire again at the start of the next — unless `includeStart` keeps the start too (a run or a repeat beginning).
|
|
28
|
+
*/
|
|
29
|
+
play(s, t, i, e) {
|
|
30
|
+
switch (this.kind) {
|
|
31
|
+
case "tween":
|
|
32
|
+
this.playTween(t);
|
|
33
|
+
break;
|
|
34
|
+
case "call":
|
|
35
|
+
i && this.fn && p(s, t, this.start, e) && this.fn();
|
|
36
|
+
break;
|
|
37
|
+
case "nested":
|
|
38
|
+
this.playNested(s, t, i, e);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
playTween(s) {
|
|
43
|
+
if (!this.inited) {
|
|
44
|
+
if (s < this.start) return;
|
|
45
|
+
this.capture();
|
|
46
|
+
}
|
|
47
|
+
let t;
|
|
48
|
+
if (this.duration > 0 ? t = Math.min(1, Math.max(0, (s - this.start) / this.duration)) : t = s >= this.start ? 1 : 0, t === this.last) return;
|
|
49
|
+
this.last = t;
|
|
50
|
+
const i = this.ease ? this.ease(t) : t, e = this.props, h = e.length, a = this.targets;
|
|
51
|
+
for (let r = 0; r < a.length; r++) {
|
|
52
|
+
const n = a[r];
|
|
53
|
+
if (n.destroyed !== !0)
|
|
54
|
+
for (let o = 0; o < h; o++) {
|
|
55
|
+
const l = this.froms[r * h + o];
|
|
56
|
+
f(n, e[o], l + (this.ends[o] - l) * i);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
capture() {
|
|
61
|
+
this.inited = !0;
|
|
62
|
+
const s = this.props;
|
|
63
|
+
for (const t of this.targets)
|
|
64
|
+
for (let i = 0; i < s.length; i++) this.froms.push(this.givenFrom[i] ?? u(t, s[i]));
|
|
65
|
+
}
|
|
66
|
+
playNested(s, t, i, e) {
|
|
67
|
+
const h = this.nested;
|
|
68
|
+
if (!h) return;
|
|
69
|
+
if (!this.inited) {
|
|
70
|
+
if (t < this.start) return;
|
|
71
|
+
this.inited = !0;
|
|
72
|
+
}
|
|
73
|
+
const a = h.totalDuration, r = Math.min(a, Math.max(0, s - this.start)), n = Math.min(a, Math.max(0, t - this.start)), l = t >= s ? s < this.start || s === this.start && e : s > this.end || s === this.end && e;
|
|
74
|
+
r === n && n === this.last && !l || (this.last = n, h.playNested(r, n, i, l));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function p(d, s, t, i) {
|
|
78
|
+
return t === d ? i : s >= d ? t > d && t <= s : t < d && t >= s;
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
m as TimelineChild,
|
|
82
|
+
p as crossed
|
|
83
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { easeByName as m } from "./eases.js";
|
|
2
|
+
import { Timeline as y } from "./Timeline.js";
|
|
3
|
+
import { readProp as w, writeProp as g } from "./tweenProps.js";
|
|
4
|
+
const v = /* @__PURE__ */ new Set([
|
|
5
|
+
"targets",
|
|
6
|
+
"duration",
|
|
7
|
+
"delay",
|
|
8
|
+
"hold",
|
|
9
|
+
"yoyo",
|
|
10
|
+
"repeat",
|
|
11
|
+
"ease",
|
|
12
|
+
"props",
|
|
13
|
+
"onStart",
|
|
14
|
+
"onUpdate",
|
|
15
|
+
"onComplete"
|
|
16
|
+
]);
|
|
17
|
+
class k {
|
|
18
|
+
constructor(e, t) {
|
|
19
|
+
this.cfg = e, this.ends = t;
|
|
20
|
+
const s = e.targets;
|
|
21
|
+
this.targets = Array.isArray(s) ? s : [s];
|
|
22
|
+
}
|
|
23
|
+
cfg;
|
|
24
|
+
ends;
|
|
25
|
+
tracks = null;
|
|
26
|
+
elapsed = 0;
|
|
27
|
+
plays = 0;
|
|
28
|
+
removed = !1;
|
|
29
|
+
targets;
|
|
30
|
+
/**
|
|
31
|
+
* Every target is a destroyed display object: nothing is left to move. A forever tween (`repeat: -1`) on a sprite
|
|
32
|
+
* its owner freed used to stay in the list for good, holding the sprite, and the list grew with every map loaded.
|
|
33
|
+
* A plain object (a clock a callback reads) has no `destroyed` and is never taken for one. Only a forever tween is
|
|
34
|
+
* dropped this way: a finite one still runs out and calls its `onComplete`, which may clean up more than the sprite.
|
|
35
|
+
*/
|
|
36
|
+
orphaned() {
|
|
37
|
+
if (this.cfg.repeat !== -1) return !1;
|
|
38
|
+
const e = this.targets;
|
|
39
|
+
if (e.length === 0) return !1;
|
|
40
|
+
for (const t of e) if (t.destroyed !== !0) return !1;
|
|
41
|
+
return !0;
|
|
42
|
+
}
|
|
43
|
+
remove() {
|
|
44
|
+
this.removed = !0;
|
|
45
|
+
}
|
|
46
|
+
stop() {
|
|
47
|
+
this.removed = !0;
|
|
48
|
+
}
|
|
49
|
+
/** Advances by `dt` ms; returns false once the tween is finished. */
|
|
50
|
+
step(e) {
|
|
51
|
+
if (this.removed) return !1;
|
|
52
|
+
if (this.orphaned())
|
|
53
|
+
return this.removed = !0, !1;
|
|
54
|
+
const t = this.cfg, s = t.delay ?? 0;
|
|
55
|
+
if (this.elapsed += e, this.elapsed < s) return !0;
|
|
56
|
+
if (!this.tracks) {
|
|
57
|
+
this.tracks = [];
|
|
58
|
+
for (const i of this.targets)
|
|
59
|
+
for (const [p, u] of Object.entries(this.ends)) this.tracks.push({ target: i, prop: p, from: w(i, p), to: u });
|
|
60
|
+
t.onStart?.();
|
|
61
|
+
}
|
|
62
|
+
const n = Math.max(1, t.duration ?? 1e3), a = t.yoyo ? t.hold ?? 0 : 0, o = t.yoyo ? n * 2 + a : n;
|
|
63
|
+
let r = this.elapsed - s - this.plays * o;
|
|
64
|
+
const f = t.repeat ?? 0;
|
|
65
|
+
let h = !1;
|
|
66
|
+
r >= o && (f === -1 || this.plays < f ? (this.plays++, r -= o) : (r = o, h = !0));
|
|
67
|
+
let l;
|
|
68
|
+
t.yoyo ? r <= n ? l = r / n : r <= n + a ? l = 1 : l = 1 - (r - n - a) / n : l = r / n;
|
|
69
|
+
const d = m(t.ease)(Math.min(1, Math.max(0, l)));
|
|
70
|
+
for (const i of this.tracks) i.target.destroyed || g(i.target, i.prop, i.from + (i.to - i.from) * d);
|
|
71
|
+
return t.onUpdate?.(), h ? (this.removed = !0, t.onComplete?.(), !1) : !0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class O {
|
|
75
|
+
/** Global speed factor; hit-stop slows every tween at once. */
|
|
76
|
+
timeScale = 1;
|
|
77
|
+
tweens = [];
|
|
78
|
+
add(e) {
|
|
79
|
+
const t = { ...e.props ?? {} }, s = {};
|
|
80
|
+
for (const [o, r] of Object.entries(e))
|
|
81
|
+
if (!v.has(o)) {
|
|
82
|
+
if (typeof r == "number") t[o] = r;
|
|
83
|
+
else if (r && typeof r == "object" && "to" in r) {
|
|
84
|
+
const f = r;
|
|
85
|
+
t[o] = f.to, f.from !== void 0 && (s[o] = f.from);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const n = Array.isArray(e.targets) ? e.targets : [e.targets];
|
|
89
|
+
for (const o of n) for (const [r, f] of Object.entries(s)) o[r] = f;
|
|
90
|
+
const a = new k(e, t);
|
|
91
|
+
return this.tweens.push(a), a;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Steps `item` every frame from the next one on, at this manager's `timeScale`, until its `step` answers false or
|
|
95
|
+
* the manager is cleared (a stage's manager is cleared when the stage is destroyed).
|
|
96
|
+
*/
|
|
97
|
+
run(e) {
|
|
98
|
+
return this.tweens.push(e), e;
|
|
99
|
+
}
|
|
100
|
+
/** A `Timeline` driven by this manager: it follows `timeScale` and stops with `clear`. */
|
|
101
|
+
timeline(e = {}) {
|
|
102
|
+
return new y({ ...e, tweens: this });
|
|
103
|
+
}
|
|
104
|
+
killTweensOf(e) {
|
|
105
|
+
const t = new Set(Array.isArray(e) ? e : [e]);
|
|
106
|
+
for (const s of this.tweens) s.targets.some((n) => t.has(n)) && s.remove();
|
|
107
|
+
}
|
|
108
|
+
update(e) {
|
|
109
|
+
const t = e * this.timeScale, s = this.tweens, n = s.length;
|
|
110
|
+
let a = 0;
|
|
111
|
+
for (let o = 0; o < n; o++) {
|
|
112
|
+
const r = s[o];
|
|
113
|
+
S(r, t) && (s[a++] = r);
|
|
114
|
+
}
|
|
115
|
+
if (this.tweens === s) {
|
|
116
|
+
for (let o = n; o < s.length; o++) s[a++] = s[o];
|
|
117
|
+
s.length = a;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
clear() {
|
|
121
|
+
for (const e of this.tweens) e.remove();
|
|
122
|
+
this.tweens = [];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function S(c, e) {
|
|
126
|
+
try {
|
|
127
|
+
return c.step(e);
|
|
128
|
+
} catch (t) {
|
|
129
|
+
return console.error("[tween] dropped after an error", t), !1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
k as Tween,
|
|
134
|
+
O as Tweener
|
|
135
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ATLAS_PAGE_FULL as x, planAtlas as u } from "./atlasPlan.js";
|
|
2
|
+
class H {
|
|
3
|
+
items = [];
|
|
4
|
+
add(n, s) {
|
|
5
|
+
this.items.push({ name: n, canvas: s });
|
|
6
|
+
}
|
|
7
|
+
addSheet(n, s, r, c) {
|
|
8
|
+
this.items.push({ name: n, canvas: s, frameWidth: r, frameHeight: c });
|
|
9
|
+
}
|
|
10
|
+
build(n, s, r = x) {
|
|
11
|
+
const c = this.items, d = u(c.map((a) => ({ w: a.canvas.width, h: a.canvas.height })), r), g = d.pages.map((a, t) => {
|
|
12
|
+
const e = document.createElement("canvas");
|
|
13
|
+
return e.width = a.width, e.height = a.height, { canvas: e, ctx: e.getContext("2d", { willReadFrequently: !0 }), key: t === 0 ? s : `${s}~${t}` };
|
|
14
|
+
});
|
|
15
|
+
c.forEach((a, t) => {
|
|
16
|
+
const e = d.places[t];
|
|
17
|
+
g[e.page].ctx.drawImage(a.canvas, e.x, e.y);
|
|
18
|
+
});
|
|
19
|
+
const i = n.addCanvas(s, g[0].canvas), p = g.map((a, t) => t === 0 ? i : n.addCanvas(a.key, a.canvas));
|
|
20
|
+
c.forEach((a, t) => {
|
|
21
|
+
const e = d.places[t], f = p[e.page], l = (o, m, h, $, w) => {
|
|
22
|
+
f.add(o, 0, m, h, $, w), e.page > 0 && i.adopt(o, f);
|
|
23
|
+
};
|
|
24
|
+
if (a.frameWidth && a.frameHeight) {
|
|
25
|
+
const o = Math.floor(a.canvas.width / a.frameWidth), m = Math.max(1, Math.floor(a.canvas.height / a.frameHeight));
|
|
26
|
+
for (let h = 0; h < o * m; h++)
|
|
27
|
+
l(`${a.name}#${h}`, e.x + h % o * a.frameWidth, e.y + Math.floor(h / o) * a.frameHeight, a.frameWidth, a.frameHeight);
|
|
28
|
+
} else
|
|
29
|
+
l(a.name, e.x, e.y, a.canvas.width, a.canvas.height);
|
|
30
|
+
});
|
|
31
|
+
const v = d.pages.map((a) => `${a.width}x${a.height}`).join(" + ");
|
|
32
|
+
console.info(`[atlas] ${s}: ${c.length} images packed into ${v}${d.pages.length > 1 ? ` (pages of ${r})` : ""}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
H as AtlasBuilder
|
|
37
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const g = 2;
|
|
2
|
+
const p = 8192;
|
|
3
|
+
function w(t) {
|
|
4
|
+
return t === null || t >= 8192 ? 8192 : Math.min(4096, 2 ** Math.floor(Math.log2(Math.max(1, t))));
|
|
5
|
+
}
|
|
6
|
+
function D(t, _) {
|
|
7
|
+
const e = t.map((a, A) => A).sort((a, A) => t[A].h - t[a].h), P = t.reduce((a, A) => a + (A.w + 2) * (A.h + 2), 0), f = Math.max(1, ...t.map((a) => a.w + 2)), c = Math.min(_, Math.max(1024, 2 ** Math.ceil(Math.log2(Math.max(f, Math.sqrt(P)))))), l = new Array(t.length), M = [];
|
|
8
|
+
let r = 0, n = 0, h = 0, o = 0, L = c;
|
|
9
|
+
const S = () => M.push({ width: L, height: h + o });
|
|
10
|
+
for (const a of e) {
|
|
11
|
+
const A = t[a].w + 2, T = t[a].h + 2;
|
|
12
|
+
n > 0 && n + A > L && (n = 0, h += o, o = 0), h > 0 && h + T > _ && (S(), r++, n = 0, h = 0, o = 0, L = c), A > L && (L = A), l[a] = { page: r, x: n, y: h }, n += A, o = Math.max(o, T);
|
|
13
|
+
}
|
|
14
|
+
return t.length > 0 && S(), { pages: M, places: l };
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
g as ATLAS_PAD,
|
|
18
|
+
p as ATLAS_PAGE_FULL,
|
|
19
|
+
w as atlasPageLimit,
|
|
20
|
+
D as planAtlas
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const h = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
function r(n, d = {}) {
|
|
3
|
+
const a = d.blend ?? "add", l = d.name ?? a;
|
|
4
|
+
let t = h.get(n);
|
|
5
|
+
t || (t = /* @__PURE__ */ new Map(), h.set(n, t));
|
|
6
|
+
let e = t.get(l);
|
|
7
|
+
return !e || e.destroyed ? (e = n.add.container(0, 0).setDepth(d.depth ?? 999e3), e.blendMode = a, t.set(l, e)) : d.depth !== void 0 && e.depth !== d.depth && e.setDepth(d.depth), e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
r as blendLayer
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const a = (n) => n, e = {
|
|
2
|
+
Linear: a,
|
|
3
|
+
"Quad.In": (n) => n * n,
|
|
4
|
+
"Quad.Out": (n) => n * (2 - n),
|
|
5
|
+
"Cubic.Out": (n) => 1 - Math.pow(1 - n, 3),
|
|
6
|
+
"Sine.In": (n) => 1 - Math.cos(n * Math.PI / 2),
|
|
7
|
+
"Sine.InOut": (n) => -(Math.cos(Math.PI * n) - 1) / 2,
|
|
8
|
+
"Back.Out": (n) => {
|
|
9
|
+
const u = n - 1;
|
|
10
|
+
return u * u * (2.70158 * u + 1.70158) + 1;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function o(n) {
|
|
14
|
+
if (!n) return e["Quad.Out"];
|
|
15
|
+
const t = e[n];
|
|
16
|
+
return t || console.warn(`[tween] unknown ease ${n}`), t ?? a;
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
o as easeByName
|
|
20
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { ColorMatrixFilter as a } from "pixi.js";
|
|
2
|
+
const e = /* @__PURE__ */ new Map();
|
|
3
|
+
function o(s) {
|
|
4
|
+
let t = e.get(s);
|
|
5
|
+
if (t) return t;
|
|
6
|
+
const i = new a();
|
|
7
|
+
i.antialias = "off";
|
|
8
|
+
const r = (s >> 16 & 255) / 255, h = (s >> 8 & 255) / 255, n = (s & 255) / 255;
|
|
9
|
+
return i.matrix = [0, 0, 0, 0, r, 0, 0, 0, 0, h, 0, 0, 0, 0, n, 0, 0, 0, 1, 0], e.set(s, t = [i]), t;
|
|
10
|
+
}
|
|
11
|
+
function l(s) {
|
|
12
|
+
s.filters = null;
|
|
13
|
+
}
|
|
14
|
+
function f(s) {
|
|
15
|
+
return class extends s {
|
|
16
|
+
scene;
|
|
17
|
+
sx = 1;
|
|
18
|
+
sy = 1;
|
|
19
|
+
fx = !1;
|
|
20
|
+
fy = !1;
|
|
21
|
+
/** The colour this object is filled with (`setTintFill`), or null. */
|
|
22
|
+
solidFillColor = null;
|
|
23
|
+
/** False once destroyed. */
|
|
24
|
+
get active() {
|
|
25
|
+
return !this.destroyed;
|
|
26
|
+
}
|
|
27
|
+
get depth() {
|
|
28
|
+
return this.zIndex;
|
|
29
|
+
}
|
|
30
|
+
set depth(t) {
|
|
31
|
+
this.zIndex = t;
|
|
32
|
+
}
|
|
33
|
+
get scaleX() {
|
|
34
|
+
return this.sx;
|
|
35
|
+
}
|
|
36
|
+
set scaleX(t) {
|
|
37
|
+
this.sx = t, this.applyScale();
|
|
38
|
+
}
|
|
39
|
+
get scaleY() {
|
|
40
|
+
return this.sy;
|
|
41
|
+
}
|
|
42
|
+
set scaleY(t) {
|
|
43
|
+
this.sy = t, this.applyScale();
|
|
44
|
+
}
|
|
45
|
+
get flipX() {
|
|
46
|
+
return this.fx;
|
|
47
|
+
}
|
|
48
|
+
set flipX(t) {
|
|
49
|
+
this.fx = t, this.applyScale();
|
|
50
|
+
}
|
|
51
|
+
get flipY() {
|
|
52
|
+
return this.fy;
|
|
53
|
+
}
|
|
54
|
+
set flipY(t) {
|
|
55
|
+
this.fy = t, this.applyScale();
|
|
56
|
+
}
|
|
57
|
+
applyScale() {
|
|
58
|
+
this.destroyed || this.scale.set(this.sx * (this.fx ? -1 : 1), this.sy * (this.fy ? -1 : 1));
|
|
59
|
+
}
|
|
60
|
+
setScale(t, i = t) {
|
|
61
|
+
return this.sx = t, this.sy = i, this.applyScale(), this;
|
|
62
|
+
}
|
|
63
|
+
setFlipX(t) {
|
|
64
|
+
return this.flipX = t, this;
|
|
65
|
+
}
|
|
66
|
+
setFlipY(t) {
|
|
67
|
+
return this.flipY = t, this;
|
|
68
|
+
}
|
|
69
|
+
setFlip(t, i) {
|
|
70
|
+
return this.fx = t, this.fy = i, this.applyScale(), this;
|
|
71
|
+
}
|
|
72
|
+
setDepth(t) {
|
|
73
|
+
return this.zIndex = t, this;
|
|
74
|
+
}
|
|
75
|
+
setAlpha(t = 1) {
|
|
76
|
+
return this.alpha = t, this;
|
|
77
|
+
}
|
|
78
|
+
setVisible(t) {
|
|
79
|
+
return this.visible = t, this;
|
|
80
|
+
}
|
|
81
|
+
setPosition(t = 0, i = t) {
|
|
82
|
+
return this.position.set(t, i), this;
|
|
83
|
+
}
|
|
84
|
+
setRotation(t = 0) {
|
|
85
|
+
return this.rotation = t, this;
|
|
86
|
+
}
|
|
87
|
+
setAngle(t = 0) {
|
|
88
|
+
return this.angle = t, this;
|
|
89
|
+
}
|
|
90
|
+
setBlendMode(t) {
|
|
91
|
+
return this.blendMode = t, this;
|
|
92
|
+
}
|
|
93
|
+
setTint(t = 16777215) {
|
|
94
|
+
return this.clearFill(), this.tint = t, this;
|
|
95
|
+
}
|
|
96
|
+
/** Paints every opaque pixel in one solid colour (hit flash, silhouettes). */
|
|
97
|
+
setTintFill(t) {
|
|
98
|
+
return this.tint = 16777215, this.solidFillColor === t ? this : (this.solidFillColor = t, this.filters = o(t), this);
|
|
99
|
+
}
|
|
100
|
+
clearTint() {
|
|
101
|
+
return this.clearFill(), this.tint = 16777215, this;
|
|
102
|
+
}
|
|
103
|
+
clearFill() {
|
|
104
|
+
this.solidFillColor !== null && (l(this), this.solidFillColor = null);
|
|
105
|
+
}
|
|
106
|
+
/** 0 pins the object to the screen instead of the world (full-screen flashes). */
|
|
107
|
+
setScrollFactor(t) {
|
|
108
|
+
return t === 0 && this.scene.screen.addChild(this), this;
|
|
109
|
+
}
|
|
110
|
+
destroy() {
|
|
111
|
+
this.destroyed || (this.solidFillColor !== null && l(this), this.solidFillColor = null, super.destroy({ children: !0, context: !0 }));
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export {
|
|
116
|
+
f as GameObject
|
|
117
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const h = { pxPerStep: 290, baseMin: 2, baseMax: 5, min: 1, max: 6, halfZoom: 1.5 };
|
|
2
|
+
function u(o) {
|
|
3
|
+
return o ? { ...h, ...o } : h;
|
|
4
|
+
}
|
|
5
|
+
function M(o, r) {
|
|
6
|
+
const n = u(r);
|
|
7
|
+
return Math.max(n.baseMin, Math.min(n.baseMax, Math.round(o / n.pxPerStep)));
|
|
8
|
+
}
|
|
9
|
+
function c(o, r = 0, n) {
|
|
10
|
+
const e = u(n), t = Math.max(e.min, Math.min(e.max, M(o, e) + Math.round(r * 2) / 2));
|
|
11
|
+
return Number.isInteger(t) || t === e.halfZoom ? t : Math.round(t);
|
|
12
|
+
}
|
|
13
|
+
function l(o, r = [-2, -1, 0, 1], n = -2.5, e) {
|
|
14
|
+
const t = u(e), f = [...r];
|
|
15
|
+
if (t.halfZoom !== null) {
|
|
16
|
+
const a = t.halfZoom - M(o, t);
|
|
17
|
+
a < 0 && a >= n && f.push(a);
|
|
18
|
+
}
|
|
19
|
+
const m = /* @__PURE__ */ new Map();
|
|
20
|
+
for (const a of f) {
|
|
21
|
+
const s = c(o, a, t), i = m.get(s);
|
|
22
|
+
(i === void 0 || Math.abs(a) < Math.abs(i)) && m.set(s, a);
|
|
23
|
+
}
|
|
24
|
+
return [...m].map(([a, s]) => ({ offset: s, zoom: a })).sort((a, s) => a.zoom - s.zoom);
|
|
25
|
+
}
|
|
26
|
+
function b(o, r, n = 1.5, e = 4) {
|
|
27
|
+
if (Number.isInteger(o) || r < n) return 1;
|
|
28
|
+
for (let t = 2; t <= e; t++) {
|
|
29
|
+
const f = o * t;
|
|
30
|
+
if (Math.abs(f - Math.round(f)) < 1e-9) return t;
|
|
31
|
+
}
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
34
|
+
function p(o, r, n, e) {
|
|
35
|
+
return o <= 0 || r <= 0 ? 1 : Math.max(1, Math.floor(Math.min(n / o, e / r)));
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
M as baseZoom,
|
|
39
|
+
p as fitScale,
|
|
40
|
+
c as worldZoom,
|
|
41
|
+
b as zoomResolution,
|
|
42
|
+
l as zoomSteps
|
|
43
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BatchTextureArray as n } from "pixi.js";
|
|
2
|
+
let i = !1;
|
|
3
|
+
function l() {
|
|
4
|
+
if (i) return !0;
|
|
5
|
+
const e = n.prototype, r = new n();
|
|
6
|
+
return !(typeof e.clear == "function" && typeof r.ids == "object" && Array.isArray(r.textures) && typeof r.count == "number") || !/ids\[[^\]]+\]\s*=\s*null/.test(String(e.clear)) ? !1 : (e.clear = function() {
|
|
7
|
+
const c = this.ids, o = this.textures;
|
|
8
|
+
for (let t = 0; t < this.count; t++) {
|
|
9
|
+
const s = o[t];
|
|
10
|
+
o[t] = null, s && delete c[s.uid];
|
|
11
|
+
}
|
|
12
|
+
this.count = 0;
|
|
13
|
+
}, i = !0, !0);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
l as patchPixi
|
|
17
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function g(t, r, i, l) {
|
|
2
|
+
let o = 0;
|
|
3
|
+
for (let e = 0; e < t.length; e++) {
|
|
4
|
+
const n = t[e];
|
|
5
|
+
n.removed || (n.at <= i ? r.push(n) : t[o++] = n);
|
|
6
|
+
}
|
|
7
|
+
if (t.length = o, !!r.length)
|
|
8
|
+
try {
|
|
9
|
+
for (let e = 0; e < r.length; e++) {
|
|
10
|
+
const n = r[e];
|
|
11
|
+
if (!n.removed)
|
|
12
|
+
try {
|
|
13
|
+
n.fn();
|
|
14
|
+
} catch (f) {
|
|
15
|
+
try {
|
|
16
|
+
l(f);
|
|
17
|
+
} catch (u) {
|
|
18
|
+
console.error("[runDue] error handler failed", u);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
} finally {
|
|
23
|
+
r.length = 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
g as runDue
|
|
28
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Texture as h, CanvasSource as g } from "pixi.js";
|
|
2
|
+
let c = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
const l = /* @__PURE__ */ new Set();
|
|
4
|
+
function p(t, o = 16777215) {
|
|
5
|
+
let e = c.get(t);
|
|
6
|
+
const n = e?.get(o);
|
|
7
|
+
if (n && !n.destroyed) return n;
|
|
8
|
+
const u = t.source.resource, i = t.frame, s = Math.round(i.width), a = Math.round(i.height);
|
|
9
|
+
if (!u || s <= 0 || a <= 0 || t.rotate || typeof document > "u") return null;
|
|
10
|
+
const r = document.createElement("canvas");
|
|
11
|
+
r.width = s, r.height = a;
|
|
12
|
+
const f = r.getContext("2d");
|
|
13
|
+
if (!f) return null;
|
|
14
|
+
try {
|
|
15
|
+
f.drawImage(u, Math.round(i.x), Math.round(i.y), s, a, 0, 0, s, a);
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
m(r, o);
|
|
20
|
+
const d = new h({
|
|
21
|
+
source: new g({ resource: r, scaleMode: t.source.scaleMode }),
|
|
22
|
+
orig: t.orig.clone(),
|
|
23
|
+
trim: t.trim ? t.trim.clone() : void 0
|
|
24
|
+
});
|
|
25
|
+
return e || (e = /* @__PURE__ */ new Map(), c.set(t, e)), e.set(o, d), l.add(d), d;
|
|
26
|
+
}
|
|
27
|
+
function m(t, o = 16777215) {
|
|
28
|
+
const e = t;
|
|
29
|
+
if (!e || typeof e.getContext != "function") return;
|
|
30
|
+
const n = e.getContext("2d");
|
|
31
|
+
n && (n.save(), n.globalCompositeOperation = "source-in", n.fillStyle = `#${(o & 16777215).toString(16).padStart(6, "0")}`, n.fillRect(0, 0, e.width, e.height), n.restore());
|
|
32
|
+
}
|
|
33
|
+
function y(t) {
|
|
34
|
+
if (t) {
|
|
35
|
+
const o = c.get(t);
|
|
36
|
+
if (!o) return;
|
|
37
|
+
for (const e of o.values())
|
|
38
|
+
l.delete(e), e.destroy(!0);
|
|
39
|
+
c.delete(t);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
for (const o of l) o.destroy(!0);
|
|
43
|
+
l.clear(), c = /* @__PURE__ */ new WeakMap();
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
y as clearSilhouettes,
|
|
47
|
+
m as fillSolid,
|
|
48
|
+
p as solidSilhouette
|
|
49
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const f = /^(.*?)(?:([+-])=(\d+(?:\.\d+)?))?$/, i = /^\d+(?:\.\d+)?$/;
|
|
2
|
+
function b(s, e) {
|
|
3
|
+
if (s === void 0) return e.fallback;
|
|
4
|
+
if (typeof s == "number") return Math.max(0, s);
|
|
5
|
+
const a = s.trim();
|
|
6
|
+
if (i.test(a)) return Number(a);
|
|
7
|
+
const n = f.exec(a);
|
|
8
|
+
if (!n) return e.fallback;
|
|
9
|
+
const t = n[1] ?? "";
|
|
10
|
+
let l;
|
|
11
|
+
if (t === "") l = e.fallback;
|
|
12
|
+
else if (t === "<") l = e.lastStart;
|
|
13
|
+
else if (t === ">") l = e.lastEnd;
|
|
14
|
+
else {
|
|
15
|
+
const r = e.labels.get(t);
|
|
16
|
+
r === void 0 ? (e.labels.set(t, e.end), l = e.end) : l = r;
|
|
17
|
+
}
|
|
18
|
+
const o = n[3] === void 0 ? 0 : Number(n[3]) * (n[2] === "-" ? -1 : 1);
|
|
19
|
+
return Math.max(0, l + o);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
b as placeAt
|
|
23
|
+
};
|