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,84 @@
|
|
|
1
|
+
import { addPixelLayer as E } from "./PixelLayer.js";
|
|
2
|
+
import { engineSettings as P } from "../settings.js";
|
|
3
|
+
import { ramp as I } from "./pixelTone.js";
|
|
4
|
+
const A = 1e3 / 12, _ = 1400, B = 150, D = 420, R = 16, p = { budget: 500, body: 60, big: 160 };
|
|
5
|
+
class G {
|
|
6
|
+
constructor(t, r) {
|
|
7
|
+
this.scene = t, this.track = r;
|
|
8
|
+
}
|
|
9
|
+
scene;
|
|
10
|
+
track;
|
|
11
|
+
clouds = [];
|
|
12
|
+
live = 0;
|
|
13
|
+
play(t, r, n) {
|
|
14
|
+
const m = P.getState(), c = m.reducedFx || m.batterySaver, f = Math.min(t.pixels.length, r ? c ? p.big : D : c ? p.body : B), e = Math.min(f, Math.max(R, (c ? p.budget : _) - this.live));
|
|
15
|
+
if (e <= 0) return;
|
|
16
|
+
const y = Math.max(1, Math.round(Math.abs(t.scaleY))), M = E(this.scene);
|
|
17
|
+
this.track(M);
|
|
18
|
+
const a = {
|
|
19
|
+
g: M,
|
|
20
|
+
x: Math.round(t.x),
|
|
21
|
+
y: Math.round(t.y),
|
|
22
|
+
born: n,
|
|
23
|
+
end: n,
|
|
24
|
+
size: y,
|
|
25
|
+
n: e,
|
|
26
|
+
frame: -1,
|
|
27
|
+
x0: new Float32Array(e),
|
|
28
|
+
y0: new Float32Array(e),
|
|
29
|
+
delay: new Float32Array(e),
|
|
30
|
+
life: new Float32Array(e),
|
|
31
|
+
vx: new Float32Array(e),
|
|
32
|
+
vy: new Float32Array(e),
|
|
33
|
+
phase: new Float32Array(e),
|
|
34
|
+
color: new Uint32Array(e)
|
|
35
|
+
};
|
|
36
|
+
let h = 0, d = -1 / 0, i = 1;
|
|
37
|
+
const o = t.pixels;
|
|
38
|
+
for (let l = 0; l < o.length; l++)
|
|
39
|
+
h = Math.min(h, o.dy[l]), d = Math.max(d, o.dy[l]), i = Math.max(i, Math.abs(o.dx[l] * t.scaleX));
|
|
40
|
+
const x = Math.max(1, d - h), u = r ? 520 : 260, F = r ? 900 : 620, g = e / o.length;
|
|
41
|
+
let s = 0;
|
|
42
|
+
for (let l = 0; l < o.length && s < e; l++) {
|
|
43
|
+
if (g < 1 && Math.random() > g && o.length - l > e - s) continue;
|
|
44
|
+
const v = o.dy[l], b = o.dx[l] * t.scaleX, k = v * Math.abs(t.scaleY), w = (v - h) / x;
|
|
45
|
+
a.x0[s] = b, a.y0[s] = k, a.delay[s] = w * u * 0.6 + Math.random() * u * 0.4, a.life[s] = F * (0.6 + Math.random() * 0.6), a.vx[s] = b / i * 5 + (Math.random() - 0.5) * 10, a.vy[s] = -(10 + Math.random() * 16) * (r ? 1.3 : 1), a.phase[s] = Math.random() * Math.PI * 2, a.color[s] = o.color[l], a.end = Math.max(a.end, n + a.delay[s] + a.life[s]), s++;
|
|
46
|
+
}
|
|
47
|
+
a.n = s, this.live += a.n, this.clouds.push(a), this.draw(a, n);
|
|
48
|
+
}
|
|
49
|
+
update(t) {
|
|
50
|
+
for (let r = this.clouds.length - 1; r >= 0; r--) {
|
|
51
|
+
const n = this.clouds[r];
|
|
52
|
+
if (!n.g.active || t >= n.end) {
|
|
53
|
+
n.g.active && n.g.destroy(), this.live -= n.n, this.clouds.splice(r, 1);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
this.draw(n, t);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
draw(t, r) {
|
|
60
|
+
const n = Math.floor((r - t.born) / A);
|
|
61
|
+
if (n === t.frame) return;
|
|
62
|
+
t.frame = n;
|
|
63
|
+
const m = n * A, c = t.g;
|
|
64
|
+
c.clear(), c.setPosition(t.x, t.y).setDepth(t.y + 2);
|
|
65
|
+
const f = t.size;
|
|
66
|
+
for (let e = 0; e < t.n; e++) {
|
|
67
|
+
const y = m - t.delay[e];
|
|
68
|
+
let M = t.x0[e], a = t.y0[e], h = t.color[e], d = 1;
|
|
69
|
+
if (y > 0) {
|
|
70
|
+
const i = y / t.life[e];
|
|
71
|
+
if (i >= 1) continue;
|
|
72
|
+
const o = y / 1e3;
|
|
73
|
+
M += t.vx[e] * o + Math.sin(t.phase[e] + o * 9) * i * 1.5, a += t.vy[e] * o - 22 * o * o;
|
|
74
|
+
const x = I(h);
|
|
75
|
+
h = i < 0.3 ? h : i < 0.6 ? x.light : x.hi, d = i < 0.55 ? 1 : i < 0.8 ? 0.66 : 0.33;
|
|
76
|
+
}
|
|
77
|
+
c.rect(Math.round(M), Math.round(a), f, f, h, d);
|
|
78
|
+
}
|
|
79
|
+
c.present();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
G as Evaporation
|
|
84
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tintNight as e } from "../ambient/DayClock.js";
|
|
2
|
+
import { Darkness as h } from "./Darkness.js";
|
|
3
|
+
class p {
|
|
4
|
+
constructor(a, t) {
|
|
5
|
+
this.options = t, this.dark = new h(a, 0, 0), this.dark.setShade(0, 0), this.lampScale = t.lampScale ?? 1.6, this.carried = t.carriedLight ?? 64, this.carriedFrom = Math.min(0.99, t.carriedFrom ?? 0.55);
|
|
6
|
+
}
|
|
7
|
+
options;
|
|
8
|
+
dark;
|
|
9
|
+
lampScale;
|
|
10
|
+
carried;
|
|
11
|
+
carriedFrom;
|
|
12
|
+
/** A light the place glows with, `glowSize` the diameter of the glow drawn for it: by night it is what is seen by. */
|
|
13
|
+
addLight(a, t, r, s, i = 0) {
|
|
14
|
+
this.dark.addLamp(a, t, r / 2 * this.lampScale, i, s);
|
|
15
|
+
}
|
|
16
|
+
/** Lamps colour the dark less (a "fewer ambient lights" setting); their holes stay as wide. */
|
|
17
|
+
setLampsDimmed(a) {
|
|
18
|
+
this.dark.setLampsDimmed(a);
|
|
19
|
+
}
|
|
20
|
+
/** `now` the frame's ms, `wallMs` the shared wall time the clock reads (`serverNow()`), `px`/`py` the player. */
|
|
21
|
+
update(a, t, r, s) {
|
|
22
|
+
const i = this.options.clock.at(t);
|
|
23
|
+
this.dark.setShade(e(i, this.options.tint, this.options.tintShare), i.alpha);
|
|
24
|
+
const d = this.carriedFrom;
|
|
25
|
+
this.dark.update(a, r, s, Math.max(0, (i.night - d) / (1 - d)) * this.carried);
|
|
26
|
+
}
|
|
27
|
+
destroy() {
|
|
28
|
+
this.dark.destroy();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
p as NightShade
|
|
33
|
+
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Sprite as R, Texture as Y, BufferImageSource as B } from "pixi.js";
|
|
2
|
+
import { Graphics as C } from "../core/Graphics.js";
|
|
3
|
+
import { patchPixi as D } from "../core/pixiPatches.js";
|
|
4
|
+
D();
|
|
5
|
+
const W = 1024, U = [16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024], G = 24, K = 24 * 1024 * 1024, j = 60, m = /* @__PURE__ */ new Map();
|
|
6
|
+
let S = 0, E = 0;
|
|
7
|
+
const L = (n) => {
|
|
8
|
+
for (const t of U) if (t >= n) return t;
|
|
9
|
+
return Math.ceil(n / 256) * 256;
|
|
10
|
+
}, F = (n, t) => n * 4096 + t;
|
|
11
|
+
function q(n, t) {
|
|
12
|
+
let i = m.get(F(n, t));
|
|
13
|
+
if (!i?.length) {
|
|
14
|
+
let o = 1 / 0;
|
|
15
|
+
for (const [c, a] of m) {
|
|
16
|
+
if (!a.length) continue;
|
|
17
|
+
const p = Math.floor(c / 4096), f = c % 4096, g = p * f;
|
|
18
|
+
p >= n && f >= t && g <= n * t * 2 && g < o && (o = g, i = a);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const s = i?.pop();
|
|
22
|
+
if (s)
|
|
23
|
+
return S -= s.pixels.byteLength, s;
|
|
24
|
+
E++;
|
|
25
|
+
const e = new Uint8Array(n * t * 4), l = new B({
|
|
26
|
+
resource: e,
|
|
27
|
+
width: n,
|
|
28
|
+
height: t,
|
|
29
|
+
format: "rgba8unorm",
|
|
30
|
+
alphaMode: "premultiplied-alpha",
|
|
31
|
+
scaleMode: "nearest"
|
|
32
|
+
});
|
|
33
|
+
return { pixels: e, words: new Uint32Array(e.buffer), source: l, texture: new Y({ source: l }), capW: n, capH: t };
|
|
34
|
+
}
|
|
35
|
+
function z(n) {
|
|
36
|
+
const t = F(n.capW, n.capH);
|
|
37
|
+
let i = m.get(t);
|
|
38
|
+
if (i || m.set(t, i = []), i.length >= G || S + n.pixels.byteLength > K) {
|
|
39
|
+
n.texture.destroy(!0);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
i.push(n), S += n.pixels.byteLength;
|
|
43
|
+
}
|
|
44
|
+
function $(n) {
|
|
45
|
+
return n.add.existing(new J());
|
|
46
|
+
}
|
|
47
|
+
class J extends C {
|
|
48
|
+
/** This frame's rects: x, y, w, h, colour, alpha — six numbers each. */
|
|
49
|
+
rects = [];
|
|
50
|
+
/** Staged solid runs not yet committed: x, y, w, colour — four numbers each; later ones win. */
|
|
51
|
+
staged = [];
|
|
52
|
+
ink = 16777215;
|
|
53
|
+
inkAlpha = 1;
|
|
54
|
+
sprite = new R(Y.EMPTY);
|
|
55
|
+
surface = null;
|
|
56
|
+
/** Where the buffer's first pixel sits in the layer, as of the last `present`. */
|
|
57
|
+
originX = 0;
|
|
58
|
+
originY = 0;
|
|
59
|
+
/** The last frame's size, and how many presents in a row it stayed well inside a quarter of the buffer. */
|
|
60
|
+
lastW = 0;
|
|
61
|
+
lastH = 0;
|
|
62
|
+
small = 0;
|
|
63
|
+
constructor() {
|
|
64
|
+
super(), this.sprite.visible = !1, this.addChild(this.sprite);
|
|
65
|
+
}
|
|
66
|
+
/** Textures made, spent buffers waiting in the pool and their bytes (the leak tools read it). */
|
|
67
|
+
static stats() {
|
|
68
|
+
let t = 0;
|
|
69
|
+
for (const i of m.values()) t += i.length;
|
|
70
|
+
return { made: E, pooled: t, pooledBytes: S };
|
|
71
|
+
}
|
|
72
|
+
/** Lets every pooled buffer go (the world changed map): the next map's effects start a pool of their own. */
|
|
73
|
+
static drainPool() {
|
|
74
|
+
for (const t of m.values()) for (const i of t) i.texture.destroy(!0);
|
|
75
|
+
m.clear(), S = 0;
|
|
76
|
+
}
|
|
77
|
+
fillStyle(t, i = 1) {
|
|
78
|
+
return this.ink = t, this.inkAlpha = i, super.fillStyle(t, i);
|
|
79
|
+
}
|
|
80
|
+
fillRect(t, i, s, e) {
|
|
81
|
+
const l = Math.round(t), o = Math.round(i), c = Math.round(t + s) - l, a = Math.round(i + e) - o;
|
|
82
|
+
return c > 0 && a > 0 && this.inkAlpha > 0 && this.rects.push(l, o, c, a, this.ink, this.inkAlpha), this;
|
|
83
|
+
}
|
|
84
|
+
/** `fillStyle` + `fillRect` on whole pixels in one call, leaving the fill style alone (a hot loop's way in). */
|
|
85
|
+
rect(t, i, s, e, l, o = 1) {
|
|
86
|
+
s > 0 && e > 0 && o > 0 && Number.isFinite(t) && Number.isFinite(i) && Number.isFinite(s) && Number.isFinite(e) && this.rects.push(t, i, s, e, l, o);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A solid run of `w` whole pixels at (x, y) in `color`, held until `commit` lays every staged run in the order given
|
|
90
|
+
* (the later winning where they cross), after whatever was drawn before the commit. What `pixelTone`'s batch writes
|
|
91
|
+
* instead of filing each pixel in a map and sorting it into rects.
|
|
92
|
+
*/
|
|
93
|
+
stage(t, i, s, e) {
|
|
94
|
+
Number.isFinite(t) && Number.isFinite(i) && Number.isFinite(s) && this.staged.push(t, i, s, e);
|
|
95
|
+
}
|
|
96
|
+
/** Lays the staged runs, as opaque rects, after everything drawn so far. */
|
|
97
|
+
commit() {
|
|
98
|
+
const t = this.staged, i = t.length;
|
|
99
|
+
if (i === 0) return;
|
|
100
|
+
const s = this.rects;
|
|
101
|
+
for (let e = 0; e < i; e += 4) s.push(t[e], t[e + 1], t[e + 2], 1, t[e + 3], 1);
|
|
102
|
+
t.length = 0;
|
|
103
|
+
}
|
|
104
|
+
clear() {
|
|
105
|
+
return this.rects.length = 0, this.staged.length = 0, super.clear();
|
|
106
|
+
}
|
|
107
|
+
/** How far the last frame reached from the layer's origin, in world pixels (0 when nothing showed). */
|
|
108
|
+
reach() {
|
|
109
|
+
return this.sprite.visible ? Math.max(Math.abs(this.originX), Math.abs(this.originY), Math.abs(this.originX + this.lastW), Math.abs(this.originY + this.lastH)) : 0;
|
|
110
|
+
}
|
|
111
|
+
/** Writes this frame's rects into the texture and shows it; call once the frame is painted. */
|
|
112
|
+
present() {
|
|
113
|
+
this.commit();
|
|
114
|
+
const t = this.rects;
|
|
115
|
+
if (t.length === 0) {
|
|
116
|
+
this.sprite.visible = !1;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let i = 1 / 0, s = 1 / 0, e = -1 / 0, l = -1 / 0;
|
|
120
|
+
for (let r = 0; r < t.length; r += 6)
|
|
121
|
+
t[r] < i && (i = t[r]), t[r + 1] < s && (s = t[r + 1]), t[r] + t[r + 2] > e && (e = t[r] + t[r + 2]), t[r + 1] + t[r + 3] > l && (l = t[r + 1] + t[r + 3]);
|
|
122
|
+
const o = e - i, c = l - s;
|
|
123
|
+
if (o > W || c > W) {
|
|
124
|
+
this.sprite.visible = !1;
|
|
125
|
+
const r = t.length;
|
|
126
|
+
for (let u = 0; u < r; u += 6)
|
|
127
|
+
super.fillStyle(t[u + 4], t[u + 5]), super.fillRect(t[u], t[u + 1], t[u + 2], t[u + 3]);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const a = this.fit(o, c), { words: p, pixels: f, capW: g } = a;
|
|
131
|
+
p.fill(0);
|
|
132
|
+
for (let r = 0; r < t.length; r += 6) {
|
|
133
|
+
const u = t[r] - i, y = t[r + 1] - s, M = t[r + 2], v = t[r + 3], P = t[r + 4], x = t[r + 5], k = P >> 16 & 255, A = P >> 8 & 255, H = P & 255;
|
|
134
|
+
if (x >= 1) {
|
|
135
|
+
const d = (4278190080 | H << 16 | A << 8 | k) >>> 0;
|
|
136
|
+
if (M === 1 && v === 1) {
|
|
137
|
+
p[y * g + u] = d;
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
for (let h = y; h < y + v; h++) {
|
|
141
|
+
const b = h * g + u;
|
|
142
|
+
if (M < 8) for (let X = b, _ = b + M; X < _; X++) p[X] = d;
|
|
143
|
+
else p.fill(d, b, b + M);
|
|
144
|
+
}
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
const w = 1 - x, I = k * x, N = A * x, O = H * x, T = 255 * x;
|
|
148
|
+
for (let d = y; d < y + v; d++)
|
|
149
|
+
for (let h = (d * g + u) * 4, b = h + M * 4; h < b; h += 4)
|
|
150
|
+
f[h] = I + f[h] * w, f[h + 1] = N + f[h + 1] * w, f[h + 2] = O + f[h + 2] * w, f[h + 3] = T + f[h + 3] * w;
|
|
151
|
+
}
|
|
152
|
+
a.source.update(), this.sprite.texture = a.texture, this.sprite.position.set(i, s), this.sprite.visible = !0, this.originX = i, this.originY = s, this.lastW = o, this.lastH = c;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Shows `other`'s last frame instead of painting one: its texture, placed where it placed it. A frame shared by
|
|
156
|
+
* several bodies (the same aura on two bodies) is painted once and shown by each of their layers.
|
|
157
|
+
*/
|
|
158
|
+
mirror(t) {
|
|
159
|
+
const i = t.surface;
|
|
160
|
+
if (!i || !t.sprite.visible) {
|
|
161
|
+
this.hideMirror();
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.sprite.texture = i.texture, this.sprite.position.set(t.originX, t.originY), this.sprite.visible = !0, this.originX = t.originX, this.originY = t.originY, this.lastW = t.lastW, this.lastH = t.lastH;
|
|
165
|
+
}
|
|
166
|
+
/** Shows nothing and lets go of the texture a `mirror` showed. */
|
|
167
|
+
hideMirror() {
|
|
168
|
+
this.sprite.visible = !1, this.sprite.texture = this.surface?.texture ?? Y.EMPTY;
|
|
169
|
+
}
|
|
170
|
+
/** The premultiplied [r, g, b, a] last presented at layer pixel (x, y); zeros where nothing was (tests read it). */
|
|
171
|
+
pixelAt(t, i) {
|
|
172
|
+
const s = this.surface, e = s?.capW ?? 0, l = s?.capH ?? 0;
|
|
173
|
+
if (this.sprite.width !== e || this.sprite.height !== l) throw new Error("PixelLayer sprite is scaled");
|
|
174
|
+
const o = t - this.originX, c = i - this.originY;
|
|
175
|
+
if (!s || !this.sprite.visible || o < 0 || c < 0 || o >= e || c >= l) return [0, 0, 0, 0];
|
|
176
|
+
const a = (c * e + o) * 4;
|
|
177
|
+
return [s.pixels[a], s.pixels[a + 1], s.pixels[a + 2], s.pixels[a + 3]];
|
|
178
|
+
}
|
|
179
|
+
/** The buffer's size (tests read it). */
|
|
180
|
+
capacity() {
|
|
181
|
+
return { w: this.surface?.capW ?? 0, h: this.surface?.capH ?? 0 };
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A buffer at least `w` × `h`: grown a size class at a time and kept while it fits, traded back to the pool for a
|
|
185
|
+
* smaller one only once the frames have stayed well inside it for `SHRINK_AFTER` presents (a long-lived layer — an
|
|
186
|
+
* aura, a status mark — that once swelled would otherwise hold and upload its largest buffer for good).
|
|
187
|
+
*/
|
|
188
|
+
fit(t, i) {
|
|
189
|
+
const s = this.surface;
|
|
190
|
+
if (s && t <= s.capW && i <= s.capH) {
|
|
191
|
+
const a = s.capW * s.capH >= 16384 && t * 4 <= s.capW && i * 4 <= s.capH;
|
|
192
|
+
if (this.small = a ? this.small + 1 : 0, this.small < j) return s;
|
|
193
|
+
}
|
|
194
|
+
this.small = 0;
|
|
195
|
+
const e = !!s && (t > s.capW || i > s.capH), l = L(Math.max(1, t, e ? s.capW : 0)), o = L(Math.max(1, i, e ? s.capH : 0));
|
|
196
|
+
this.dropSurface();
|
|
197
|
+
const c = q(l, o);
|
|
198
|
+
return this.surface = c, this.sprite.texture = c.texture, c;
|
|
199
|
+
}
|
|
200
|
+
dropSurface() {
|
|
201
|
+
this.sprite.texture = Y.EMPTY, this.surface && z(this.surface), this.surface = null;
|
|
202
|
+
}
|
|
203
|
+
destroy() {
|
|
204
|
+
this.destroyed || (this.dropSurface(), super.destroy());
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
export {
|
|
208
|
+
J as PixelLayer,
|
|
209
|
+
$ as addPixelLayer
|
|
210
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { ringPixels as d, discRuns as k, ellipsePixels as u, chevronPixels as $ } from "./aimPixels.js";
|
|
2
|
+
function n(g, h, t) {
|
|
3
|
+
g.fillStyle(t, 1);
|
|
4
|
+
for (const [s, i] of h) g.fillRect(s, i, 1, 1);
|
|
5
|
+
}
|
|
6
|
+
class P {
|
|
7
|
+
constructor(h, t) {
|
|
8
|
+
this.stage = h, this.tones = t.tones, this.depth = t.depth ?? 0, this.headings = Math.max(4, Math.round(t.headings ?? 32)), this.spacing = Math.max(1, t.spacing ?? 10), this.creep = t.creep ?? 0.02, this.fillAlpha = t.fillAlpha ?? 0.28;
|
|
9
|
+
}
|
|
10
|
+
stage;
|
|
11
|
+
tones;
|
|
12
|
+
depth;
|
|
13
|
+
headings;
|
|
14
|
+
spacing;
|
|
15
|
+
creep;
|
|
16
|
+
fillAlpha;
|
|
17
|
+
cache = /* @__PURE__ */ new Map();
|
|
18
|
+
pool = [];
|
|
19
|
+
used = 0;
|
|
20
|
+
shown = /* @__PURE__ */ new Set();
|
|
21
|
+
next = /* @__PURE__ */ new Set();
|
|
22
|
+
begin() {
|
|
23
|
+
this.used = 0, this.next.clear();
|
|
24
|
+
}
|
|
25
|
+
/** A ring of radius `r` round (x, y): the bright line with dark pixels just inside and outside it. */
|
|
26
|
+
ring(h, t, s, i) {
|
|
27
|
+
const e = this.tones[i];
|
|
28
|
+
s = Math.max(2, Math.round(s)), this.place(`ring:${s}:${i}`, h, t, (l) => {
|
|
29
|
+
n(l, d(s + 1), e.dark), n(l, d(Math.max(1, s - 1)), e.dark), n(l, d(s), e.light);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** A filled disc of radius `r` with a bright rim and a cross at its middle: where a skill aimed at a spot lands. */
|
|
33
|
+
disc(h, t, s, i) {
|
|
34
|
+
const e = this.tones[i];
|
|
35
|
+
s = Math.max(2, Math.round(s)), this.place(`disc:${s}:${i}`, h, t, (l) => {
|
|
36
|
+
l.fillStyle(e.fill, this.fillAlpha);
|
|
37
|
+
for (const [a, o, c] of k(s)) l.fillRect(o, a, c - o + 1, 1);
|
|
38
|
+
n(l, d(s + 1), e.dark), n(l, d(s), e.rim), l.fillStyle(e.light, 1).fillRect(-1, 0, 3, 1).fillRect(0, -1, 1, 3);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/** A ring on the ground in three-quarter view, `rx` wide and `ry` deep, centred on (x, y) — a body's feet. */
|
|
42
|
+
groundRing(h, t, s, i, e) {
|
|
43
|
+
const l = this.tones[e];
|
|
44
|
+
s = Math.max(3, Math.round(s)), i = Math.max(2, Math.round(i)), this.place(`ell:${s}:${i}:${e}`, h, t, (a) => {
|
|
45
|
+
n(a, u(s + 1, i + 1), l.dark), n(a, u(s - 1, i - 1), l.dark), n(a, u(s, i), l.rim), a.fillStyle(l.light, 1).fillRect(-s, 0, 1, 1).fillRect(s, 0, 1, 1).fillRect(-1, i, 3, 1);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* An aim line from (x, y) along `angle`, from `start` to `end` px out: chevrons `size` px across every `spacing`,
|
|
50
|
+
* creeping forward with `now`, and a larger one at the end.
|
|
51
|
+
*/
|
|
52
|
+
chevrons(h, t, s, i, e, l, a, o) {
|
|
53
|
+
const c = this.heading(i), f = c / this.headings * Math.PI * 2, r = Math.cos(i), x = Math.sin(i), m = h * this.creep % this.spacing, M = l - a;
|
|
54
|
+
for (let p = e + m; p < M - this.spacing * 0.5; p += this.spacing) this.chevron(t + r * p, s + x * p, c, f, a, o);
|
|
55
|
+
this.chevron(t + r * M, s + x * M, c, f, a + 2, o);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* One still chevron `dist` px out from (x, y) along `angle`: the way the next blow goes. Unlike `chevrons` it does
|
|
59
|
+
* not creep, so an arrow always under the feet does not keep catching the eye.
|
|
60
|
+
*/
|
|
61
|
+
pointer(h, t, s, i, e, l) {
|
|
62
|
+
const a = this.heading(s);
|
|
63
|
+
this.chevron(h + Math.cos(s) * i, t + Math.sin(s) * i, a, a / this.headings * Math.PI * 2, e, l);
|
|
64
|
+
}
|
|
65
|
+
end() {
|
|
66
|
+
for (let t = this.used; t < this.pool.length; t++) this.pool[t].g.setVisible(!1);
|
|
67
|
+
for (const t of this.shown) this.next.has(t) || t.setVisible(!1);
|
|
68
|
+
for (const t of this.next) t.setVisible(!0);
|
|
69
|
+
const h = this.shown;
|
|
70
|
+
this.shown = this.next, this.next = h;
|
|
71
|
+
}
|
|
72
|
+
destroy() {
|
|
73
|
+
for (const h of this.cache.values()) h.destroy();
|
|
74
|
+
for (const h of this.pool) h.g.destroy();
|
|
75
|
+
this.cache.clear(), this.pool.length = 0, this.shown.clear(), this.next.clear();
|
|
76
|
+
}
|
|
77
|
+
heading(h) {
|
|
78
|
+
const t = this.headings;
|
|
79
|
+
return (Math.round(h / (Math.PI * 2) * t) % t + t) % t;
|
|
80
|
+
}
|
|
81
|
+
chevron(h, t, s, i, e, l) {
|
|
82
|
+
let a = this.pool[this.used];
|
|
83
|
+
a || (a = { g: this.stage.add.graphics().setDepth(this.depth), key: "" }, this.pool.push(a)), this.used++;
|
|
84
|
+
const o = `${s}:${e}:${l}`;
|
|
85
|
+
if (a.key !== o) {
|
|
86
|
+
a.key = o;
|
|
87
|
+
const c = this.tones[l], { lit: f, rim: r } = $(i, e);
|
|
88
|
+
a.g.clear(), n(a.g, r, c.dark), n(a.g, f, c.light);
|
|
89
|
+
}
|
|
90
|
+
a.g.setPosition(Math.round(h), Math.round(t)).setVisible(!0);
|
|
91
|
+
}
|
|
92
|
+
place(h, t, s, i) {
|
|
93
|
+
let e = this.cache.get(h);
|
|
94
|
+
e || (e = this.stage.add.graphics().setDepth(this.depth), i(e), e.setVisible(!1), this.cache.set(h, e)), e.setPosition(Math.round(t), Math.round(s)), this.next.add(e);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
P as PixelMarks
|
|
99
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Sprite as b, Texture as m, Rectangle as I } from "pixi.js";
|
|
2
|
+
import { buildRig as M, gustAt as R, swayOffset as S } from "./swayRig.js";
|
|
3
|
+
const g = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function v(r, t) {
|
|
5
|
+
let s = g.get(r.source);
|
|
6
|
+
s || g.set(r.source, s = /* @__PURE__ */ new Map());
|
|
7
|
+
const h = r.frame, o = `${h.x + t.x},${h.y + t.y},${t.w},${t.h}`;
|
|
8
|
+
let i = s.get(o);
|
|
9
|
+
return i || s.set(o, i = new m({ source: r.source, frame: new I(h.x + t.x, h.y + t.y, t.w, t.h) })), i;
|
|
10
|
+
}
|
|
11
|
+
function $(r) {
|
|
12
|
+
const s = r.source.resource?.getContext?.("2d");
|
|
13
|
+
if (!s) return;
|
|
14
|
+
const { x: h, y: o, width: i, height: c } = r.frame, e = s.getImageData(h, o, i, c).data, n = [];
|
|
15
|
+
for (let u = 0; u < c; u++) {
|
|
16
|
+
let p = -1, d = -1;
|
|
17
|
+
for (let f = 0; f < i; f++)
|
|
18
|
+
e[(u * i + f) * 4 + 3] > 0 && (p < 0 && (p = f), d = f);
|
|
19
|
+
n.push(p < 0 ? 0 : d - p + 1);
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
class k {
|
|
24
|
+
constructor(t, s, h = {}) {
|
|
25
|
+
this.img = t, this.def = s, this.phase = h.phase ?? 0, this.speed = s.speed * (h.pace ?? 1), this.shown = t.visible, this.alpha = t.alpha;
|
|
26
|
+
const o = t.texture, i = o.frame.width, c = o.frame.height, e = t.parent, n = h.rig ?? (i >= 2 && c >= 2 ? M(s, i, c, s.mode === "crown" ? h.rowWidths ?? $(o) : void 0, h.variant ?? 0) : null);
|
|
27
|
+
if (this.active = !!n && !!e && n.pieces.length > 0 && n.strips.length > 0, !this.active || !n || !e) return;
|
|
28
|
+
const u = t.anchor.x * i, p = t.anchor.y * c, d = Math.round(t.x - u), f = Math.round(t.y - p), [w, ...y] = n.pieces;
|
|
29
|
+
t.texture = v(o, w), t.anchor.set((u - w.x) / w.w, (p - w.y) / w.h);
|
|
30
|
+
const x = (a) => {
|
|
31
|
+
const l = new b(v(o, a));
|
|
32
|
+
return l.position.set(d + a.x, f + a.y), l.zIndex = t.zIndex, l.visible = t.visible, l.alpha = t.alpha, e.addChild(l), this.parts.push(l), l;
|
|
33
|
+
};
|
|
34
|
+
for (const a of y) x(a);
|
|
35
|
+
for (const a of n.strips) this.strips.push({ sprite: x(a.rect), homeX: d + a.rect.x, weight: a.weight, lag: a.lag, offset: 0 });
|
|
36
|
+
}
|
|
37
|
+
img;
|
|
38
|
+
def;
|
|
39
|
+
parts = [];
|
|
40
|
+
strips = [];
|
|
41
|
+
phase;
|
|
42
|
+
speed;
|
|
43
|
+
shown;
|
|
44
|
+
alpha;
|
|
45
|
+
/** False when the frame is too small or the rig has nothing to move: `update` then does nothing. */
|
|
46
|
+
active;
|
|
47
|
+
/** `tSec` seconds of any steady clock; `enabled` false stands everything still (an ambient-effects setting). */
|
|
48
|
+
update(t, s, h = !0) {
|
|
49
|
+
if (!this.active) return;
|
|
50
|
+
const o = this.img.visible;
|
|
51
|
+
if (o !== this.shown) {
|
|
52
|
+
this.shown = o;
|
|
53
|
+
for (const e of this.parts) e.visible = o;
|
|
54
|
+
}
|
|
55
|
+
if (!o) return;
|
|
56
|
+
if (this.img.alpha !== this.alpha) {
|
|
57
|
+
this.alpha = this.img.alpha;
|
|
58
|
+
for (const e of this.parts) e.alpha = this.alpha;
|
|
59
|
+
}
|
|
60
|
+
const i = !h || s.wind <= 0, c = i ? 0 : R(t, this.img.x, s.gustSeconds, s.gustPx);
|
|
61
|
+
for (const e of this.strips) {
|
|
62
|
+
const n = i ? 0 : S(t, this.speed, this.phase, e.lag, this.def.amp, s.wind, c, e.weight, s.minReach ?? 0);
|
|
63
|
+
n !== e.offset && (e.offset = n, e.sprite.x = e.homeX + n);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
destroy() {
|
|
67
|
+
for (const t of this.parts) t.destroy();
|
|
68
|
+
this.parts.length = 0, this.strips.length = 0;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
k as SwayProp,
|
|
73
|
+
$ as opaqueRowWidths
|
|
74
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
function w(n) {
|
|
2
|
+
n = Math.max(1, Math.round(n));
|
|
3
|
+
const o = /* @__PURE__ */ new Set(), h = [], l = (e, c) => {
|
|
4
|
+
const r = `${e},${c}`;
|
|
5
|
+
o.has(r) || (o.add(r), h.push([e, c]));
|
|
6
|
+
};
|
|
7
|
+
let u = n, t = 0, s = 1 - n;
|
|
8
|
+
for (; u >= t; ) {
|
|
9
|
+
for (const [e, c] of [[u, t], [t, u], [-t, u], [-u, t], [-u, -t], [-t, -u], [t, -u], [u, -t]]) l(e, c);
|
|
10
|
+
t++, s < 0 ? s += 2 * t + 1 : (u--, s += 2 * (t - u) + 1);
|
|
11
|
+
}
|
|
12
|
+
return h;
|
|
13
|
+
}
|
|
14
|
+
function x(n) {
|
|
15
|
+
n = Math.max(1, Math.round(n));
|
|
16
|
+
const o = [];
|
|
17
|
+
for (let h = -n; h <= n; h++) {
|
|
18
|
+
const l = Math.floor(Math.sqrt(n * n - h * h) + 0.5);
|
|
19
|
+
o.push([h, -l, l]);
|
|
20
|
+
}
|
|
21
|
+
return o;
|
|
22
|
+
}
|
|
23
|
+
function S(n, o) {
|
|
24
|
+
n = Math.max(1, Math.round(n)), o = Math.max(1, Math.round(o));
|
|
25
|
+
const h = /* @__PURE__ */ new Set(), l = [], u = (f, d) => {
|
|
26
|
+
for (const [m, p] of [[f, d], [-f, d], [f, -d], [-f, -d]]) {
|
|
27
|
+
const $ = `${m},${p}`;
|
|
28
|
+
h.has($) || (h.add($), l.push([m, p]));
|
|
29
|
+
}
|
|
30
|
+
}, t = n * n, s = o * o;
|
|
31
|
+
let e = 0, c = o, r = s - t * o + 0.25 * t, M = 2 * s * e, a = 2 * t * c;
|
|
32
|
+
for (; M < a; )
|
|
33
|
+
u(e, c), e++, M += 2 * s, r < 0 ? r += M + s : (c--, a -= 2 * t, r += M - a + s);
|
|
34
|
+
let i = s * (e + 0.5) * (e + 0.5) + t * (c - 1) * (c - 1) - t * s;
|
|
35
|
+
for (; c >= 0; )
|
|
36
|
+
u(e, c), c--, a -= 2 * t, i > 0 ? i += t - a : (e++, M += 2 * s, i += M - a + t);
|
|
37
|
+
return l;
|
|
38
|
+
}
|
|
39
|
+
function b(n, o) {
|
|
40
|
+
const h = Math.cos(n), l = Math.sin(n), u = { u: o * 0.5, v: 0 }, t = [
|
|
41
|
+
{ u: -o * 0.5, v: -o },
|
|
42
|
+
{ u: -o * 0.5, v: o }
|
|
43
|
+
], s = o + 2, e = /* @__PURE__ */ new Set(), c = [];
|
|
44
|
+
for (let a = -s; a <= s; a++)
|
|
45
|
+
for (let i = -s; i <= s; i++) {
|
|
46
|
+
const f = i * h + a * l, d = -i * l + a * h;
|
|
47
|
+
Math.min(...t.map((m) => v(f, d, m.u, m.v, u.u, u.v))) <= 0.72 && (e.add(`${i},${a}`), c.push([i, a]));
|
|
48
|
+
}
|
|
49
|
+
const r = [], M = /* @__PURE__ */ new Set();
|
|
50
|
+
for (const [a, i] of c)
|
|
51
|
+
for (let f = -1; f <= 1; f++)
|
|
52
|
+
for (let d = -1; d <= 1; d++) {
|
|
53
|
+
const m = `${a + d},${i + f}`;
|
|
54
|
+
e.has(m) || M.has(m) || (M.add(m), r.push([a + d, i + f]));
|
|
55
|
+
}
|
|
56
|
+
return { lit: c, rim: r };
|
|
57
|
+
}
|
|
58
|
+
function v(n, o, h, l, u, t) {
|
|
59
|
+
const s = u - h, e = t - l, c = Math.max(0, Math.min(1, ((n - h) * s + (o - l) * e) / (s * s + e * e)));
|
|
60
|
+
return Math.hypot(n - (h + s * c), o - (l + e * c));
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
b as chevronPixels,
|
|
64
|
+
x as discRuns,
|
|
65
|
+
S as ellipsePixels,
|
|
66
|
+
w as ringPixels
|
|
67
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { engineSettings as l } from "../settings.js";
|
|
2
|
+
const s = 16773320, i = [], c = 48;
|
|
3
|
+
function g(n, o, t, e, f = s, r = performance.now()) {
|
|
4
|
+
i.length >= c && i.shift(), i.push({ x: n, y: o, r: t, born: r, until: r + e, fades: !0, color: f });
|
|
5
|
+
}
|
|
6
|
+
const u = 2e4;
|
|
7
|
+
function p(n, o, t = s, e = performance.now()) {
|
|
8
|
+
const f = n(), r = { x: f.x, y: f.y, r: o, born: e, until: e + u, follow: n, fades: !1, color: t };
|
|
9
|
+
return i.length >= c && i.shift(), i.push(r), { end: () => r.until = 0 };
|
|
10
|
+
}
|
|
11
|
+
const h = [];
|
|
12
|
+
function d(n) {
|
|
13
|
+
for (let t = i.length - 1; t >= 0; t--) i[t].until <= n && i.splice(t, 1);
|
|
14
|
+
const o = l.getState();
|
|
15
|
+
if (o.combatLights === !1 || o.batterySaver) return h;
|
|
16
|
+
for (const t of i) {
|
|
17
|
+
if (!t.follow) continue;
|
|
18
|
+
let e;
|
|
19
|
+
try {
|
|
20
|
+
e = t.follow();
|
|
21
|
+
} catch {
|
|
22
|
+
t.until = 0, t.follow = void 0;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
t.x = e.x, t.y = e.y;
|
|
26
|
+
}
|
|
27
|
+
return i;
|
|
28
|
+
}
|
|
29
|
+
function m(n, o) {
|
|
30
|
+
if (!n.fades) return n.r;
|
|
31
|
+
const t = Math.min(1, (o - n.born) / Math.max(1, n.until - n.born));
|
|
32
|
+
return n.r * Math.sqrt(1 - t);
|
|
33
|
+
}
|
|
34
|
+
function L() {
|
|
35
|
+
i.length = 0;
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
p as carriedLight,
|
|
39
|
+
L as clearLights,
|
|
40
|
+
g as flashLight,
|
|
41
|
+
m as lightRadius,
|
|
42
|
+
d as liveLights
|
|
43
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CLEAR as $, channels as m, PixelGrid as p, hex as d } from "./pixel.js";
|
|
2
|
+
const v = {
|
|
3
|
+
/** A window: ink, a two-step brass rim, a gap, a lit bevel, a rivet in the corner. */
|
|
4
|
+
panel: ["..KKKKKK", ".KHHHHHH", "KHHMMMMM", "KHMKGGGG", "KHMGRSSS", "KHMGSFFF", "KHMGSFFF", "KHMGSFFF"],
|
|
5
|
+
/** A raised button: a two-step bevel, notched. Give it shadow [0, 1]; pressed, offset [0, 1] with the bevel's colours swapped. */
|
|
6
|
+
button: [".KKKK", "KHHHH", "KHMMM", "KHMFF", "KHMFF"],
|
|
7
|
+
/** A small raised button. */
|
|
8
|
+
smallButton: [".KKK", "KHHH", "KHMM", "KHMF"],
|
|
9
|
+
/** A text field: a hole in the stone, its lip in shadow top-left (D, G) and lit bottom-right (d, g). */
|
|
10
|
+
field: [".KKKK", "KDDDD", "KDGGG", "KDGFF", "KDGFF"],
|
|
11
|
+
/** A sunk well (slots, bars' tracks). */
|
|
12
|
+
well: [".KK", "KDD", "KDF"],
|
|
13
|
+
/** A list row: a flat slab lit on the top and left. */
|
|
14
|
+
row: [".KK", "KSS", "KSF"],
|
|
15
|
+
/** A thin frame: one pixel of rim (toasts, a cast bar). */
|
|
16
|
+
thin: [".KK", "KHH", "KHF"]
|
|
17
|
+
}, u = { H: "L", S: "s", M: "m", D: "d", G: "g" }, G = (t) => typeof t == "string" ? d(t) : t;
|
|
18
|
+
function x(t, K, l, s, H) {
|
|
19
|
+
const o = t.length, e = o * 2 + 1, i = s > o, r = H > o, M = i ? e - 1 - s : s, F = r ? e - 1 - H : H, w = t[Math.min(F, o - 1)][Math.min(M, o - 1)] ?? ".", h = M >= F, S = i && !h || r && h || i && r, n = l[w];
|
|
20
|
+
return S && n && K[n] !== void 0 ? n : w;
|
|
21
|
+
}
|
|
22
|
+
function y(t) {
|
|
23
|
+
const { corner: K, palette: l } = t, s = K.length;
|
|
24
|
+
if (!s || K.some((n) => n.length !== s)) throw new Error("nineSlice: the corner must be square");
|
|
25
|
+
const H = t.twins ?? u, o = s * 2 + 1, [e, i] = t.shadow ?? [0, 0], [r, M] = t.offset ?? [0, 0], [F, w] = t.pad ?? [e, i], h = new p(o + F, o + w), S = t.shadowColor ?? l.Z ?? 2348810240;
|
|
26
|
+
if (e || i) {
|
|
27
|
+
const n = G(S);
|
|
28
|
+
for (let c = 0; c < o; c++) for (let f = 0; f < o; f++) x(K, l, H, f, c) !== "." && h.px(f + e, c + i, n);
|
|
29
|
+
}
|
|
30
|
+
for (let n = 0; n < o; n++)
|
|
31
|
+
for (let c = 0; c < o; c++) {
|
|
32
|
+
const f = t.overlay?.[n]?.[c], a = f && f !== "." ? f : x(K, l, H, c, n), g = l[a];
|
|
33
|
+
a !== "." && g !== void 0 && h.px(c + r, n + M, G(g));
|
|
34
|
+
}
|
|
35
|
+
return { grid: h, insets: { top: s, left: s, right: s + F, bottom: s + w } };
|
|
36
|
+
}
|
|
37
|
+
function E(t, K = 2) {
|
|
38
|
+
const l = [];
|
|
39
|
+
for (let o = 0; o < t.h; o++) {
|
|
40
|
+
let e = 0;
|
|
41
|
+
for (; e < t.w; ) {
|
|
42
|
+
const i = t.get(e, o);
|
|
43
|
+
let r = e + 1;
|
|
44
|
+
for (; r < t.w && t.get(r, o) === i; ) r++;
|
|
45
|
+
if (i !== $ && i >>> 24 > 0) {
|
|
46
|
+
const [M, F, w, h] = m(i), S = `#${(M << 16 | F << 8 | w).toString(16).padStart(6, "0")}`, n = h < 255 ? ` fill-opacity="${+(h / 255).toFixed(3)}"` : "";
|
|
47
|
+
l.push(`<rect x="${e * K}" y="${o * K}" width="${(r - e) * K}" height="${K}" fill="${S}"${n}/>`);
|
|
48
|
+
}
|
|
49
|
+
e = r;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const s = t.w * K, H = t.h * K;
|
|
53
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${s}" height="${H}" viewBox="0 0 ${s} ${H}" shape-rendering="crispEdges">${l.join("")}</svg>
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
v as FRAME_CORNERS,
|
|
58
|
+
u as FRAME_TWINS,
|
|
59
|
+
E as frameSvg,
|
|
60
|
+
y as nineSlice
|
|
61
|
+
};
|