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,57 @@
|
|
|
1
|
+
class h {
|
|
2
|
+
constructor(e, t) {
|
|
3
|
+
this.volume = e, this.makeVoice = t;
|
|
4
|
+
}
|
|
5
|
+
volume;
|
|
6
|
+
makeVoice;
|
|
7
|
+
voice = null;
|
|
8
|
+
url = null;
|
|
9
|
+
level = 1;
|
|
10
|
+
/** The url of the track playing (or fading in), if any. */
|
|
11
|
+
get current() {
|
|
12
|
+
return this.url;
|
|
13
|
+
}
|
|
14
|
+
/** Plays `url`, crossfading from what plays now; the track already playing only takes the new `volume`. */
|
|
15
|
+
play(e, t = {}) {
|
|
16
|
+
const s = Math.min(1, Math.max(0, t.volume ?? 1));
|
|
17
|
+
if (e === this.url) {
|
|
18
|
+
s !== this.level && (this.level = s, this.refresh());
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (typeof Audio > "u") return;
|
|
22
|
+
const o = Math.max(0, t.fadeMs ?? 1200);
|
|
23
|
+
this.fadeOut(o), this.url = e, this.level = s;
|
|
24
|
+
const i = new Audio(e);
|
|
25
|
+
i.loop = t.loop !== !1, i.preload = "auto";
|
|
26
|
+
const l = this.makeVoice(i);
|
|
27
|
+
l.set(0), this.voice = l, i.play().catch(() => {
|
|
28
|
+
}), l.fade(this.target(), o);
|
|
29
|
+
}
|
|
30
|
+
/** Fades this channel out and stops it. */
|
|
31
|
+
stop(e = 1200) {
|
|
32
|
+
this.fadeOut(Math.max(0, e)), this.url = null;
|
|
33
|
+
}
|
|
34
|
+
/** Retries a start the browser refused, and follows the music volume. */
|
|
35
|
+
refresh() {
|
|
36
|
+
const e = this.voice;
|
|
37
|
+
e && (e.el.paused && e.el.play().catch(() => {
|
|
38
|
+
}), e.busy || e.set(this.target()));
|
|
39
|
+
}
|
|
40
|
+
/** Stops where it is (the app went to the background); `refresh` picks it up again. */
|
|
41
|
+
pause() {
|
|
42
|
+
this.voice?.el.pause();
|
|
43
|
+
}
|
|
44
|
+
dispose() {
|
|
45
|
+
this.voice?.dispose(), this.voice = null, this.url = null;
|
|
46
|
+
}
|
|
47
|
+
target() {
|
|
48
|
+
return Math.max(0, Math.min(1, this.volume() * this.level));
|
|
49
|
+
}
|
|
50
|
+
fadeOut(e) {
|
|
51
|
+
const t = this.voice;
|
|
52
|
+
this.voice = null, t && t.fade(0, e, () => t.dispose());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
h as MusicChannel
|
|
57
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function n() {
|
|
2
|
+
if (typeof Audio > "u") return !1;
|
|
3
|
+
const e = typeof navigator < "u" ? navigator : null;
|
|
4
|
+
if (e && (/iPhone|iPad|iPod/.test(e.userAgent) || /Macintosh/.test(e.userAgent) && e.maxTouchPoints > 1)) return !0;
|
|
5
|
+
const t = new Audio();
|
|
6
|
+
return t.volume = 0.5, Math.abs(t.volume - 0.5) > 0.01;
|
|
7
|
+
}
|
|
8
|
+
const o = (e) => Math.max(0, Math.min(1, e));
|
|
9
|
+
export {
|
|
10
|
+
o as clamp01,
|
|
11
|
+
n as elementVolumeLocked
|
|
12
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { cleanSamples as d } from "./cleanTake.js";
|
|
2
|
+
const c = {};
|
|
3
|
+
function k(e) {
|
|
4
|
+
for (const [n, t] of Object.entries(e)) {
|
|
5
|
+
const r = /(?:^|\/)([a-z_]+?)(?:_\d+)?\.mp3$/.exec(n);
|
|
6
|
+
r && (c[r[1]] ??= []).push(t);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const y = (e) => !!c[e];
|
|
10
|
+
class M {
|
|
11
|
+
decoded = /* @__PURE__ */ new Map();
|
|
12
|
+
loading = /* @__PURE__ */ new Set();
|
|
13
|
+
last = /* @__PURE__ */ new Map();
|
|
14
|
+
names() {
|
|
15
|
+
return Object.keys(c);
|
|
16
|
+
}
|
|
17
|
+
/** A decoded take, or null while none is ready (the caller then synthesises); starts loading on first ask. */
|
|
18
|
+
take(n, t) {
|
|
19
|
+
const r = this.decoded.get(t);
|
|
20
|
+
if (!r?.length)
|
|
21
|
+
return this.load(n, t), null;
|
|
22
|
+
let s = Math.floor(Math.random() * r.length);
|
|
23
|
+
return r.length > 1 && s === this.last.get(t) && (s = (s + 1) % r.length), this.last.set(t, s), r[s];
|
|
24
|
+
}
|
|
25
|
+
load(n, t) {
|
|
26
|
+
const r = c[t];
|
|
27
|
+
if (!r || this.loading.has(t)) return;
|
|
28
|
+
this.loading.add(t);
|
|
29
|
+
const s = [];
|
|
30
|
+
this.decoded.set(t, s);
|
|
31
|
+
for (const l of r)
|
|
32
|
+
fetch(l).then((a) => a.arrayBuffer()).then((a) => n.decodeAudioData(a)).then((a) => p(a)).then((a) => {
|
|
33
|
+
if (!a) return;
|
|
34
|
+
const h = n.createBuffer(1, a.length, n.sampleRate);
|
|
35
|
+
h.copyToChannel(a, 0), s.push(h);
|
|
36
|
+
}).catch(() => {
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
let o, f = 0;
|
|
41
|
+
const i = /* @__PURE__ */ new Map();
|
|
42
|
+
function m() {
|
|
43
|
+
if (o !== void 0) return o;
|
|
44
|
+
try {
|
|
45
|
+
o = new Worker(new URL(
|
|
46
|
+
/* @vite-ignore */
|
|
47
|
+
"" + new URL("../assets/takeCleanerWorker-DTcI_Jqr.js", import.meta.url).href,
|
|
48
|
+
import.meta.url
|
|
49
|
+
), { type: "module" }), o.onmessage = (e) => {
|
|
50
|
+
i.get(e.data.id)?.(e.data.data), i.delete(e.data.id);
|
|
51
|
+
}, o.onerror = () => {
|
|
52
|
+
o?.terminate(), o = null;
|
|
53
|
+
for (const e of i.values()) e(null);
|
|
54
|
+
i.clear();
|
|
55
|
+
};
|
|
56
|
+
} catch {
|
|
57
|
+
o = null;
|
|
58
|
+
}
|
|
59
|
+
return o;
|
|
60
|
+
}
|
|
61
|
+
let u = Promise.resolve();
|
|
62
|
+
function p(e) {
|
|
63
|
+
return new Promise((n) => {
|
|
64
|
+
u = u.then(() => new Promise((t) => setTimeout(t, 0))).then(() => {
|
|
65
|
+
g(e).then(n, () => n(null));
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function g(e) {
|
|
70
|
+
const n = Array.from({ length: e.numberOfChannels }, (s, l) => e.getChannelData(l).slice()), t = m();
|
|
71
|
+
if (!t) return Promise.resolve(d(n, e.sampleRate));
|
|
72
|
+
const r = f++;
|
|
73
|
+
return new Promise((s) => {
|
|
74
|
+
i.set(r, s), t.postMessage({ id: r, channels: n, sampleRate: e.sampleRate }, { transfer: n.map((l) => l.buffer) });
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
M as SampleBank,
|
|
79
|
+
y as hasTakes,
|
|
80
|
+
k as registerTakes
|
|
81
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const Y = 22050, N = {
|
|
2
|
+
sine: (e) => Math.sin(e * Math.PI * 2),
|
|
3
|
+
square: (e, a) => e < a ? 1 : -1,
|
|
4
|
+
tri: (e) => 1 - 4 * Math.abs(e - 0.5),
|
|
5
|
+
saw: (e) => 2 * e - 1
|
|
6
|
+
}, i = (e, a, n) => e > 0 && a > 0 ? e * Math.pow(a / e, n) : e + (a - e) * n;
|
|
7
|
+
function R(e) {
|
|
8
|
+
return 1 - Math.exp(-2 * Math.PI * Math.min(e, 22050 * 0.45) / 22050);
|
|
9
|
+
}
|
|
10
|
+
function _(e) {
|
|
11
|
+
const a = Math.max(...e.layers.map((t) => (t.d ?? 0) + t.t)), n = new Float32Array(Math.ceil(a * 22050) + 1);
|
|
12
|
+
let s = 2654435769;
|
|
13
|
+
const S = () => (s ^= s << 13, s ^= s >>> 17, s ^= s << 5, (s >>> 0) / 4294967295 * 2 - 1);
|
|
14
|
+
for (const t of e.layers) {
|
|
15
|
+
const u = Math.round((t.d ?? 0) * 22050), f = Math.round(t.t * 22050), l = Math.max(1, Math.round((t.at ?? 4e-3) * 22050));
|
|
16
|
+
let c = 0, A = 0, M = 0, T = 0;
|
|
17
|
+
for (let o = 0; o < f && u + o < n.length; o++) {
|
|
18
|
+
const p = o / f, d = t.f ? i(t.f[0], t.f[1], p) : 0;
|
|
19
|
+
c += d / 22050;
|
|
20
|
+
const E = c - Math.floor(c);
|
|
21
|
+
let h;
|
|
22
|
+
t.w === "noise" ? ((!t.f || E < d / 22050 || o === 0) && (A = S()), h = t.f ? A : S()) : h = N[t.w](E, t.duty ?? 0.5), t.lp && (M += (h - M) * R(i(t.lp[0], t.lp[1], p)), h = M), t.hp && (T += (h - T) * R(i(t.hp[0], t.hp[1], p)), h -= T);
|
|
23
|
+
const H = o < l ? o / l : Math.pow(1 - (o - l) / Math.max(1, f - l), t.c ?? 2);
|
|
24
|
+
n[u + o] += h * H * t.g;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let r = 0;
|
|
28
|
+
for (const t of n) r = Math.max(r, Math.abs(t));
|
|
29
|
+
if (r > 0.95) for (let t = 0; t < n.length; t++) n[t] *= 0.95 / r;
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
Y as SYNTH_RATE,
|
|
34
|
+
_ as renderRecipe
|
|
35
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { DynamicBitmapFont as S, BitmapFont as d, BitmapText as $ } from "pixi.js";
|
|
2
|
+
import { GameObject as h } from "./gameObject.js";
|
|
3
|
+
const m = /* @__PURE__ */ new Set(), u = [[" ", "~"]];
|
|
4
|
+
function w(s) {
|
|
5
|
+
u.push(s);
|
|
6
|
+
}
|
|
7
|
+
const x = 128;
|
|
8
|
+
function b(s, t, e, r, c, a, n = "") {
|
|
9
|
+
const i = `label|${s}|${t}|${e}|${r}|${c}|${a}${n ? `|${n}` : ""}`;
|
|
10
|
+
if (!m.has(i)) {
|
|
11
|
+
const o = S.defaultOptions, l = o.textureSize;
|
|
12
|
+
o.textureSize = x;
|
|
13
|
+
try {
|
|
14
|
+
d.install({
|
|
15
|
+
name: i,
|
|
16
|
+
chars: n ? [...u, n] : u,
|
|
17
|
+
resolution: a,
|
|
18
|
+
style: { fontFamily: s, fontSize: t, fill: e, stroke: { color: r, width: c, join: "round" } }
|
|
19
|
+
});
|
|
20
|
+
} finally {
|
|
21
|
+
o.textureSize = l;
|
|
22
|
+
}
|
|
23
|
+
m.add(i);
|
|
24
|
+
}
|
|
25
|
+
return i;
|
|
26
|
+
}
|
|
27
|
+
class y extends h($) {
|
|
28
|
+
/**
|
|
29
|
+
* `fontFamily` must already be loaded (`document.fonts.load`), or the glyphs bake in the fallback.
|
|
30
|
+
* Styled like `worldText`: the same font, size, colour and outline, rasterised at the same resolution. `glyphs`:
|
|
31
|
+
* letters beyond ASCII it prints (see `installLabelFont`).
|
|
32
|
+
*/
|
|
33
|
+
constructor(t, e, r, c, a, n, i, o, l, f = "") {
|
|
34
|
+
const p = b(c, a, n, i, o, l, f);
|
|
35
|
+
super({ text: r, style: { fontFamily: p, fontSize: a } }), this.position.set(t, e);
|
|
36
|
+
}
|
|
37
|
+
setOrigin(t = 0.5, e = t) {
|
|
38
|
+
return this.anchor.set(t, e), this;
|
|
39
|
+
}
|
|
40
|
+
setText(t) {
|
|
41
|
+
return this.text = t, this;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
y as BitmapLabel,
|
|
46
|
+
w as addLabelGlyphs,
|
|
47
|
+
b as installLabelFont
|
|
48
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { Rectangle as k } from "./Rectangle.js";
|
|
2
|
+
class g {
|
|
3
|
+
constructor(t, s) {
|
|
4
|
+
this.world = t, this.screen = s;
|
|
5
|
+
}
|
|
6
|
+
world;
|
|
7
|
+
screen;
|
|
8
|
+
zoom = 1;
|
|
9
|
+
/** The zoom `reset` goes back to: the engine sets it from its `zoom` option (default 1). */
|
|
10
|
+
defaultZoom = 1;
|
|
11
|
+
/** Backing pixels per screen pixel (the renderer's resolution, `zoomResolution(zoom, devicePixelRatio)`): what `snap` rounds to. */
|
|
12
|
+
resolution = 1;
|
|
13
|
+
/** Lands the view on whole backing pixels (pixel art); off, the world moves smoothly between them. */
|
|
14
|
+
roundPixels = !1;
|
|
15
|
+
scrollX = 0;
|
|
16
|
+
scrollY = 0;
|
|
17
|
+
width = 0;
|
|
18
|
+
height = 0;
|
|
19
|
+
bounds = null;
|
|
20
|
+
shakeUntil = 0;
|
|
21
|
+
shakeMs = 1;
|
|
22
|
+
shakeAngle = void 0;
|
|
23
|
+
shakeIntensity = 0;
|
|
24
|
+
flashRect = null;
|
|
25
|
+
flashStart = 0;
|
|
26
|
+
flashMs = 1;
|
|
27
|
+
flashPeak = 1;
|
|
28
|
+
/** Screen-layer containers laid over the world with its exact transform, shake included (see `follow`). */
|
|
29
|
+
followers = /* @__PURE__ */ new Set();
|
|
30
|
+
target = null;
|
|
31
|
+
trackOpts = { lerp: 1, deadzoneWidth: 0, deadzoneHeight: 0, offsetX: 0, offsetY: 0 };
|
|
32
|
+
lastApply = -1;
|
|
33
|
+
get worldView() {
|
|
34
|
+
const t = this.width / this.zoom, s = this.height / this.zoom;
|
|
35
|
+
return { x: this.scrollX, y: this.scrollY, width: t, height: s, right: this.scrollX + t, bottom: this.scrollY + s };
|
|
36
|
+
}
|
|
37
|
+
setZoom(t) {
|
|
38
|
+
return this.zoom = t, this;
|
|
39
|
+
}
|
|
40
|
+
/** A world coordinate snapped to the nearest backing pixel: one screen pixel, or a half at ×1.5. */
|
|
41
|
+
snap(t) {
|
|
42
|
+
const s = this.zoom * this.resolution;
|
|
43
|
+
return Math.round(t * s) / s;
|
|
44
|
+
}
|
|
45
|
+
setBounds(t, s, h, e) {
|
|
46
|
+
return this.bounds = { x: t, y: s, width: h, height: e }, this;
|
|
47
|
+
}
|
|
48
|
+
/** Lets the view go anywhere again. */
|
|
49
|
+
clearBounds() {
|
|
50
|
+
return this.bounds = null, this;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Back to how the engine made it: no target, no bounds, `defaultZoom`, scrolled to 0, no shake or flash. The camera
|
|
54
|
+
* is the engine's, shared by every scene, so a level's target and bounds would otherwise hold over the next scene
|
|
55
|
+
* (a title screen kept following a hero that no longer existed). `SceneManager.replace` calls it between the old
|
|
56
|
+
* scenes leaving and the new one entering; `push` and `pop` leave the camera alone, since the scene under a pause
|
|
57
|
+
* menu still wants its view when it comes back. Layers added with `follow` are kept: they belong to tools that
|
|
58
|
+
* outlive scenes (a debug overlay), not to a scene.
|
|
59
|
+
*/
|
|
60
|
+
reset() {
|
|
61
|
+
return this.target = null, this.bounds = null, this.zoom = this.defaultZoom, this.scrollX = 0, this.scrollY = 0, this.shakeUntil = 0, this.shakeIntensity = 0, this.flashRect && !this.flashRect.destroyed && this.flashRect.setVisible(!1), this;
|
|
62
|
+
}
|
|
63
|
+
/** The tracked target, if any. */
|
|
64
|
+
get tracking() {
|
|
65
|
+
return this.target;
|
|
66
|
+
}
|
|
67
|
+
/** The bounds the view is kept inside, if any. */
|
|
68
|
+
get boundsRect() {
|
|
69
|
+
return this.bounds;
|
|
70
|
+
}
|
|
71
|
+
centerOn(t, s) {
|
|
72
|
+
return this.scrollX = t - this.width / this.zoom / 2, this.scrollY = s - this.height / this.zoom / 2, this.clamp(), this;
|
|
73
|
+
}
|
|
74
|
+
setScroll(t, s) {
|
|
75
|
+
return this.scrollX = t, this.scrollY = s, this.clamp(), this;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Screen shake: `intensity` is a fraction of the screen size, like before. With an `angle` (the way a blow travelled)
|
|
79
|
+
* the shake runs back and forth along it instead of at random, so a hit is felt coming from somewhere.
|
|
80
|
+
*/
|
|
81
|
+
shake(t, s, h) {
|
|
82
|
+
const e = performance.now();
|
|
83
|
+
e < this.shakeUntil && s < this.shakeIntensity || (this.shakeUntil = e + t, this.shakeMs = t, this.shakeIntensity = s, this.shakeAngle = h);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Keeps a container on the screen layer placed exactly over the world layer — zoom, scroll and this frame's
|
|
87
|
+
* shake — for things drawn in world units above the screen-layer night (fireflies). Written in `apply`, after
|
|
88
|
+
* the scene updated, so it never lags the world by a frame or misses a shake the world takes.
|
|
89
|
+
*/
|
|
90
|
+
follow(t) {
|
|
91
|
+
this.followers.add(t);
|
|
92
|
+
}
|
|
93
|
+
unfollow(t) {
|
|
94
|
+
this.followers.delete(t);
|
|
95
|
+
}
|
|
96
|
+
/** Full-screen colour flash starting at `peak` alpha and fading out over `ms`. */
|
|
97
|
+
flash(t, s, h, e, r = !1, o = 1) {
|
|
98
|
+
(!this.flashRect || this.flashRect.destroyed) && (this.flashRect = new k(1, 1, 16777215).setOrigin(0, 0), this.screen.addChild(this.flashRect)), this.flashRect.resize(this.width, this.height).setFillStyle(s << 16 | h << 8 | e).setAlpha(o).setVisible(!0), this.flashStart = performance.now(), this.flashMs = t, this.flashPeak = o;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Keeps `target` (anything with `x` and `y`, read every frame: an entity's position, a sprite) in view, inside the
|
|
102
|
+
* bounds if there are any. Replaces any target before.
|
|
103
|
+
*/
|
|
104
|
+
track(t, s = {}) {
|
|
105
|
+
return this.target = t, this.trackOpts = { lerp: 1, deadzoneWidth: 0, deadzoneHeight: 0, offsetX: 0, offsetY: 0, ...s }, (s.lerp ?? 1) >= 1 && this.centerOn(t.x + this.trackOpts.offsetX, t.y + this.trackOpts.offsetY), this;
|
|
106
|
+
}
|
|
107
|
+
untrack() {
|
|
108
|
+
return this.target = null, this;
|
|
109
|
+
}
|
|
110
|
+
/** Moves the view toward the tracked target for a frame `dtMs` long. */
|
|
111
|
+
follow1(t) {
|
|
112
|
+
const s = this.target;
|
|
113
|
+
if (!s) return;
|
|
114
|
+
const h = this.trackOpts, e = this.width / this.zoom, r = this.height / this.zoom, o = this.scrollX + e / 2, n = this.scrollY + r / 2, i = s.x + h.offsetX, l = s.y + h.offsetY, a = h.deadzoneWidth / 2, c = h.deadzoneHeight / 2, f = i - o > a ? i - o - a : i - o < -a ? i - o + a : 0, u = l - n > c ? l - n - c : l - n < -c ? l - n + c : 0, d = h.lerp >= 1 ? 1 : 1 - Math.pow(1 - Math.max(0, h.lerp), t / (1e3 / 60));
|
|
115
|
+
this.scrollX += f * d, this.scrollY += u * d, this.clamp();
|
|
116
|
+
}
|
|
117
|
+
/** Writes the camera into the world layer; called once per frame after the scene updated. */
|
|
118
|
+
apply(t) {
|
|
119
|
+
const s = this.lastApply < 0 ? 16.666666666666668 : Math.min(100, t - this.lastApply);
|
|
120
|
+
this.lastApply = t, this.follow1(s);
|
|
121
|
+
let h = 0, e = 0;
|
|
122
|
+
if (t < this.shakeUntil) {
|
|
123
|
+
const i = (this.shakeUntil - t) / this.shakeMs;
|
|
124
|
+
if (this.shakeAngle !== void 0) {
|
|
125
|
+
const l = Math.cos((t - (this.shakeUntil - this.shakeMs)) / 28 * Math.PI) * this.shakeIntensity * this.width * i;
|
|
126
|
+
h = Math.round(Math.cos(this.shakeAngle) * l), e = Math.round(Math.sin(this.shakeAngle) * l);
|
|
127
|
+
} else
|
|
128
|
+
h = Math.round((Math.random() * 2 - 1) * this.shakeIntensity * this.width * i), e = Math.round((Math.random() * 2 - 1) * this.shakeIntensity * this.height * i);
|
|
129
|
+
}
|
|
130
|
+
this.world.scale.set(this.zoom);
|
|
131
|
+
const r = this.zoom * this.resolution, o = this.roundPixels ? Math.round(this.scrollX * r) / this.resolution : this.scrollX * this.zoom, n = this.roundPixels ? Math.round(this.scrollY * r) / this.resolution : this.scrollY * this.zoom;
|
|
132
|
+
this.world.position.set(-o + h, -n + e);
|
|
133
|
+
for (const i of this.followers)
|
|
134
|
+
i.scale.set(this.zoom), i.position.copyFrom(this.world.position);
|
|
135
|
+
if (this.flashRect?.visible) {
|
|
136
|
+
const i = (t - this.flashStart) / this.flashMs;
|
|
137
|
+
i >= 1 ? this.flashRect.setVisible(!1) : this.flashRect.alpha = this.flashPeak * (1 - i);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
clamp() {
|
|
141
|
+
const t = this.bounds;
|
|
142
|
+
if (!t) return;
|
|
143
|
+
const s = this.width / this.zoom, h = this.height / this.zoom;
|
|
144
|
+
this.scrollX = s >= t.width ? t.x + (t.width - s) / 2 : Math.min(Math.max(this.scrollX, t.x), t.x + t.width - s), this.scrollY = h >= t.height ? t.y + (t.height - h) / 2 : Math.min(Math.max(this.scrollY, t.y), t.y + t.height - h);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
g as Camera
|
|
149
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { runDue as o } from "./runDue.js";
|
|
2
|
+
class i {
|
|
3
|
+
constructor(e, r) {
|
|
4
|
+
this.at = e, this.fn = r;
|
|
5
|
+
}
|
|
6
|
+
at;
|
|
7
|
+
fn;
|
|
8
|
+
removed = !1;
|
|
9
|
+
/** An arrow, so a handle's `remove` still works when taken off it (`const { remove } = …`). */
|
|
10
|
+
remove = () => {
|
|
11
|
+
this.removed = !0;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
class h {
|
|
15
|
+
now = performance.now();
|
|
16
|
+
/** Told of every error a timer throws (default: logged). `Stage` routes it into its guarded-step reporting. */
|
|
17
|
+
onError = (e) => console.error("[timer] failed", e);
|
|
18
|
+
timers = [];
|
|
19
|
+
due = [];
|
|
20
|
+
/** Made once, so `update` hands `runDue` no fresh closure; reads `onError` late so it may be swapped any time. */
|
|
21
|
+
report = (e) => this.onError(e);
|
|
22
|
+
delayedCall(e, r) {
|
|
23
|
+
const t = new i(this.now + e, r);
|
|
24
|
+
return this.timers.push(t), t;
|
|
25
|
+
}
|
|
26
|
+
/** Timers waiting to run (removed ones not yet swept included). */
|
|
27
|
+
get pending() {
|
|
28
|
+
return this.timers.length;
|
|
29
|
+
}
|
|
30
|
+
update(e) {
|
|
31
|
+
this.now = e, o(this.timers, this.due, e, this.report);
|
|
32
|
+
}
|
|
33
|
+
clear() {
|
|
34
|
+
for (const e of this.due) e.removed = !0;
|
|
35
|
+
this.timers.length = 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
h as Clock
|
|
40
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Graphics as h, Container as n } from "pixi.js";
|
|
2
|
+
import { GameObject as o } from "./gameObject.js";
|
|
3
|
+
class u extends o(n) {
|
|
4
|
+
g = new h();
|
|
5
|
+
fill = { color: 16777215, alpha: 1 };
|
|
6
|
+
line = { width: 1, color: 16777215, alpha: 1 };
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.addChild(this.g);
|
|
9
|
+
}
|
|
10
|
+
fillStyle(t, i = 1) {
|
|
11
|
+
return this.fill = { color: t, alpha: i }, this;
|
|
12
|
+
}
|
|
13
|
+
lineStyle(t, i, e = 1) {
|
|
14
|
+
return this.line = { width: t, color: i, alpha: e }, this;
|
|
15
|
+
}
|
|
16
|
+
clear() {
|
|
17
|
+
return this.g.clear(), this;
|
|
18
|
+
}
|
|
19
|
+
fillRect(t, i, e, l) {
|
|
20
|
+
return this.g.rect(t, i, e, l).fill(this.fill), this;
|
|
21
|
+
}
|
|
22
|
+
fillEllipse(t, i, e, l) {
|
|
23
|
+
return this.g.ellipse(t, i, e / 2, l / 2).fill(this.fill), this;
|
|
24
|
+
}
|
|
25
|
+
strokeEllipse(t, i, e, l) {
|
|
26
|
+
return this.g.ellipse(t, i, e / 2, l / 2).stroke(this.line), this;
|
|
27
|
+
}
|
|
28
|
+
fillCircle(t, i, e) {
|
|
29
|
+
return this.g.circle(t, i, e).fill(this.fill), this;
|
|
30
|
+
}
|
|
31
|
+
strokeCircle(t, i, e) {
|
|
32
|
+
return this.g.circle(t, i, e).stroke(this.line), this;
|
|
33
|
+
}
|
|
34
|
+
lineBetween(t, i, e, l) {
|
|
35
|
+
return this.g.moveTo(t, i).lineTo(e, l).stroke(this.line), this;
|
|
36
|
+
}
|
|
37
|
+
fillPoints(t, i = !0) {
|
|
38
|
+
return this.g.poly(t.flatMap((e) => [e.x, e.y]), !0).fill(this.fill), this;
|
|
39
|
+
}
|
|
40
|
+
strokePoints(t, i = !1) {
|
|
41
|
+
return this.g.poly(t.flatMap((e) => [e.x, e.y]), i).stroke(this.line), this;
|
|
42
|
+
}
|
|
43
|
+
/** A pie slice from the centre, for cone telegraphs. */
|
|
44
|
+
slice(t, i, e, l, s, r = !1) {
|
|
45
|
+
return this.g.moveTo(t, i).arc(t, i, e, l, s, r).closePath(), this;
|
|
46
|
+
}
|
|
47
|
+
beginPath() {
|
|
48
|
+
return this.g.beginPath(), this;
|
|
49
|
+
}
|
|
50
|
+
moveTo(t, i) {
|
|
51
|
+
return this.g.moveTo(t, i), this;
|
|
52
|
+
}
|
|
53
|
+
lineTo(t, i) {
|
|
54
|
+
return this.g.lineTo(t, i), this;
|
|
55
|
+
}
|
|
56
|
+
closePath() {
|
|
57
|
+
return this.g.closePath(), this;
|
|
58
|
+
}
|
|
59
|
+
fillPath() {
|
|
60
|
+
return this.g.fill(this.fill), this;
|
|
61
|
+
}
|
|
62
|
+
strokePath() {
|
|
63
|
+
return this.g.stroke(this.line), this;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
u as Graphics
|
|
68
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Container as r } from "pixi.js";
|
|
2
|
+
import { GameObject as i } from "./gameObject.js";
|
|
3
|
+
class a extends i(r) {
|
|
4
|
+
get list() {
|
|
5
|
+
return this.children;
|
|
6
|
+
}
|
|
7
|
+
add(t) {
|
|
8
|
+
for (const e of Array.isArray(t) ? t : [t]) this.addChild(e);
|
|
9
|
+
return this;
|
|
10
|
+
}
|
|
11
|
+
addAt(t, e) {
|
|
12
|
+
return this.addChildAt(t, Math.min(e, this.children.length)), this;
|
|
13
|
+
}
|
|
14
|
+
remove(t, e = !1) {
|
|
15
|
+
return t.parent === this && this.removeChild(t), e && t.destroy({ children: !0, context: !0 }), this;
|
|
16
|
+
}
|
|
17
|
+
/** Puts `child` directly below `other` in the draw order. */
|
|
18
|
+
moveBelow(t, e) {
|
|
19
|
+
return t.parent !== this || e.parent !== this || t === e ? this : (this.removeChild(t), this.addChildAt(t, this.getChildIndex(e)), this);
|
|
20
|
+
}
|
|
21
|
+
/** Puts `child` directly above `other` in the draw order. */
|
|
22
|
+
moveAbove(t, e) {
|
|
23
|
+
return t.parent !== this || e.parent !== this || t === e ? this : (this.removeChild(t), this.addChildAt(t, this.getChildIndex(e) + 1), this);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
a as Group
|
|
28
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Sprite as h } from "pixi.js";
|
|
2
|
+
import { GameObject as a } from "./gameObject.js";
|
|
3
|
+
class o extends a(h) {
|
|
4
|
+
constructor(t, e, s, r, i) {
|
|
5
|
+
super(t.get(r, i)), this.registry = t, this.textureKey = r, this.frameName = i === void 0 ? "" : String(i), this.anchor.set(0.5), this.position.set(e, s);
|
|
6
|
+
}
|
|
7
|
+
registry;
|
|
8
|
+
textureKey;
|
|
9
|
+
frameName;
|
|
10
|
+
get originX() {
|
|
11
|
+
return this.anchor.x;
|
|
12
|
+
}
|
|
13
|
+
get originY() {
|
|
14
|
+
return this.anchor.y;
|
|
15
|
+
}
|
|
16
|
+
/** Width of the frame itself, unscaled. */
|
|
17
|
+
get frameWidth() {
|
|
18
|
+
return this.texture.orig.width;
|
|
19
|
+
}
|
|
20
|
+
get frameHeight() {
|
|
21
|
+
return this.texture.orig.height;
|
|
22
|
+
}
|
|
23
|
+
get displayWidth() {
|
|
24
|
+
return Math.abs(this.frameWidth * this.scaleX);
|
|
25
|
+
}
|
|
26
|
+
set displayWidth(t) {
|
|
27
|
+
this.scaleX = t / this.frameWidth;
|
|
28
|
+
}
|
|
29
|
+
get displayHeight() {
|
|
30
|
+
return Math.abs(this.frameHeight * this.scaleY);
|
|
31
|
+
}
|
|
32
|
+
set displayHeight(t) {
|
|
33
|
+
this.scaleY = t / this.frameHeight;
|
|
34
|
+
}
|
|
35
|
+
setOrigin(t = 0.5, e = t) {
|
|
36
|
+
return this.anchor.set(t, e), this;
|
|
37
|
+
}
|
|
38
|
+
setDisplaySize(t, e) {
|
|
39
|
+
return this.setScale(t / this.frameWidth, e / this.frameHeight);
|
|
40
|
+
}
|
|
41
|
+
setFrame(t) {
|
|
42
|
+
return this.frameName = String(t), this.texture = this.registry.get(this.textureKey, t), this;
|
|
43
|
+
}
|
|
44
|
+
setTexture(t, e) {
|
|
45
|
+
return this.textureKey = t, this.frameName = e === void 0 ? "" : String(e), this.texture = this.registry.get(t, e), this;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
o as Image
|
|
50
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BitmapLabel as m } from "./BitmapLabel.js";
|
|
2
|
+
import { Graphics as u } from "./Graphics.js";
|
|
3
|
+
import { Group as g } from "./Group.js";
|
|
4
|
+
import { Image as p } from "./Image.js";
|
|
5
|
+
import { Rectangle as l } from "./Rectangle.js";
|
|
6
|
+
import { Text as x } from "./Text.js";
|
|
7
|
+
class L {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
this.stage = t;
|
|
10
|
+
}
|
|
11
|
+
stage;
|
|
12
|
+
image(t, e, r, a) {
|
|
13
|
+
return this.attach(new p(this.stage.textures, t, e, r, a));
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A copy of `src` as it is drawn right now (afterimages, clones). A live texture, repainted every frame, is
|
|
17
|
+
* snapshotted first, and the snapshot is freed with the copy.
|
|
18
|
+
*/
|
|
19
|
+
still(t, e, r) {
|
|
20
|
+
const a = this.stage.textures;
|
|
21
|
+
if (!a.isLive(r.textureKey)) return this.image(t, e, r.textureKey, r.frameName);
|
|
22
|
+
const s = a.snapshot(r.textureKey, r.frameName), i = this.image(t, e, s, "0");
|
|
23
|
+
return i.once("destroyed", () => a.remove(s)), i;
|
|
24
|
+
}
|
|
25
|
+
graphics(t) {
|
|
26
|
+
const e = this.attach(new u());
|
|
27
|
+
return e.position.set(t?.x ?? 0, t?.y ?? 0), e;
|
|
28
|
+
}
|
|
29
|
+
container(t = 0, e = 0, r = []) {
|
|
30
|
+
const a = this.attach(new g());
|
|
31
|
+
return a.position.set(t, e), a.add(r), a;
|
|
32
|
+
}
|
|
33
|
+
rectangle(t, e, r, a, s, i = 1) {
|
|
34
|
+
const n = this.attach(new l(r, a, s, i));
|
|
35
|
+
return n.position.set(t, e), n;
|
|
36
|
+
}
|
|
37
|
+
text(t, e, r, a) {
|
|
38
|
+
return this.attach(new x(t, e, r, a));
|
|
39
|
+
}
|
|
40
|
+
/** A bitmap-font label (`BitmapLabel`): cheap to change, for text rewritten many times a second. */
|
|
41
|
+
label(t, e, r, a, s, i, n, o, h, c = "") {
|
|
42
|
+
return this.attach(new m(t, e, r, a, s, i, n, o, h, c));
|
|
43
|
+
}
|
|
44
|
+
/** Puts an object made elsewhere on the world layer, as the factory's own are (a `PixelLayer`, a custom class). */
|
|
45
|
+
existing(t) {
|
|
46
|
+
return this.attach(t);
|
|
47
|
+
}
|
|
48
|
+
attach(t) {
|
|
49
|
+
return t.scene = this.stage, this.stage.world.addChild(t), t;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
L as ObjectFactory
|
|
54
|
+
};
|