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,163 @@
|
|
|
1
|
+
import { PixelLayer as y } from "./PixelLayer.js";
|
|
2
|
+
const R = /* @__PURE__ */ new Map();
|
|
3
|
+
function S(t) {
|
|
4
|
+
const n = (t >> 16 & 255) / 255, e = (t >> 8 & 255) / 255, o = (t & 255) / 255, r = Math.max(n, e, o), c = Math.min(n, e, o), s = (r + c) / 2;
|
|
5
|
+
if (r === c) return [0, 0, s];
|
|
6
|
+
const i = r - c, u = s > 0.5 ? i / (2 - r - c) : i / (r + c);
|
|
7
|
+
return [(r === n ? (e - o) / i + (e < o ? 6 : 0) : r === e ? (o - n) / i + 2 : (n - e) / i + 4) / 6, u, s];
|
|
8
|
+
}
|
|
9
|
+
function M(t, n, e) {
|
|
10
|
+
const o = (i, u, h) => {
|
|
11
|
+
const m = (h + 1) % 1;
|
|
12
|
+
return m < 0.16666666666666666 ? i + (u - i) * 6 * m : m < 0.5 ? u : m < 0.6666666666666666 ? i + (u - i) * (0.6666666666666666 - m) * 6 : i;
|
|
13
|
+
}, r = e < 0.5 ? e * (1 + n) : e + n - e * n, c = 2 * e - r, s = (i) => Math.round(Math.max(0, Math.min(1, n === 0 ? e : o(c, r, i))) * 255);
|
|
14
|
+
return s(t + 1 / 3) << 16 | s(t) << 8 | s(t - 1 / 3);
|
|
15
|
+
}
|
|
16
|
+
function g(t, n, e) {
|
|
17
|
+
let o = n - t;
|
|
18
|
+
return o > 0.5 && (o -= 1), o < -0.5 && (o += 1), (t + Math.sign(o) * Math.min(Math.abs(o), e) + 1) % 1;
|
|
19
|
+
}
|
|
20
|
+
const v = /* @__PURE__ */ new Map();
|
|
21
|
+
function P(t) {
|
|
22
|
+
const n = Symbol.iterator in t ? t : Object.entries(t).map(([e, o]) => [Number(e), o]);
|
|
23
|
+
for (const [e, o] of n) v.set(e, { ...o, base: e });
|
|
24
|
+
}
|
|
25
|
+
function G(t) {
|
|
26
|
+
return v.get(t) ?? H(t);
|
|
27
|
+
}
|
|
28
|
+
function H(t) {
|
|
29
|
+
let n = R.get(t);
|
|
30
|
+
if (n) return n;
|
|
31
|
+
const [e, o, r] = S(t), c = g(e, 0.72, 0.06), s = g(e, 0.14, 0.04);
|
|
32
|
+
return n = {
|
|
33
|
+
shade: M(c, Math.min(1, o * 0.85), Math.max(0.08, r * 0.38)),
|
|
34
|
+
deep: M(g(e, 0.72, 0.03), o, Math.max(0.14, r * 0.66)),
|
|
35
|
+
base: t,
|
|
36
|
+
light: M(s, o * 0.9, Math.min(0.9, r + (1 - r) * 0.45)),
|
|
37
|
+
hi: M(s, o * 0.5, Math.min(0.97, r + (1 - r) * 0.8))
|
|
38
|
+
}, R.set(t, n), n;
|
|
39
|
+
}
|
|
40
|
+
const k = /* @__PURE__ */ new Map();
|
|
41
|
+
function C(t) {
|
|
42
|
+
let n = k.get(t);
|
|
43
|
+
if (n !== void 0) return n;
|
|
44
|
+
const [e, o, r] = S(t), c = r > 0.82 ? 0.82 + (r - 0.82) * 0.55 : r;
|
|
45
|
+
return n = M(r > 0.82 ? g(e, 0.12, 0.05) : e, o * (r > 0.82 ? 0.55 : 0.74), c * 0.97), k.set(t, n), n;
|
|
46
|
+
}
|
|
47
|
+
let d = null;
|
|
48
|
+
const b = (t, n) => t + 32768 << 16 | n + 32768 & 65535;
|
|
49
|
+
function N() {
|
|
50
|
+
return d;
|
|
51
|
+
}
|
|
52
|
+
const w = [1, 0, -1, 0, 0, 1, 0, -1];
|
|
53
|
+
function Y() {
|
|
54
|
+
d = /* @__PURE__ */ new Map();
|
|
55
|
+
}
|
|
56
|
+
function j(t, n) {
|
|
57
|
+
const e = d;
|
|
58
|
+
if (d = null, !e) return;
|
|
59
|
+
const o = /* @__PURE__ */ new Set();
|
|
60
|
+
for (const c of e.keys()) {
|
|
61
|
+
const s = (c >>> 16) - 32768, i = (c & 65535) - 32768;
|
|
62
|
+
for (let u = 0; u < 8; u += 2) {
|
|
63
|
+
const h = b(s + w[u], i + w[u + 1]);
|
|
64
|
+
e.has(h) || o.add(h);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const r = C(n);
|
|
68
|
+
x(t, new Map([...o].map((c) => [c, r]))), x(t, e);
|
|
69
|
+
}
|
|
70
|
+
function x(t, n) {
|
|
71
|
+
if (l !== null && t === l) {
|
|
72
|
+
if (a) for (const [e, o] of n) a.stage((e >>> 16) - 32768, (e & 65535) - 32768, 1, o);
|
|
73
|
+
else for (const [e, o] of n) f.set(e, o);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
B(t, n);
|
|
77
|
+
}
|
|
78
|
+
let f = null, a = null, l = null;
|
|
79
|
+
const A = [];
|
|
80
|
+
function z(t) {
|
|
81
|
+
A.push({ batch: f, direct: a, g: l }), t instanceof y ? (f = null, a = t) : (f = /* @__PURE__ */ new Map(), a = null), l = t;
|
|
82
|
+
}
|
|
83
|
+
function F() {
|
|
84
|
+
D();
|
|
85
|
+
const t = A.pop();
|
|
86
|
+
f = t?.batch ?? null, a = t?.direct ?? null, l = t?.g ?? null;
|
|
87
|
+
}
|
|
88
|
+
function I(t) {
|
|
89
|
+
return l === null || t !== l ? null : a ?? f;
|
|
90
|
+
}
|
|
91
|
+
function K(t, n, e, o, r) {
|
|
92
|
+
if (t instanceof y) {
|
|
93
|
+
t.stage(n, e, o, r);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
for (let c = 0; c < o; c++) t.set(b(n + c, e), r);
|
|
97
|
+
}
|
|
98
|
+
function D() {
|
|
99
|
+
if (a) {
|
|
100
|
+
a.commit();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (!f || !l || f.size === 0) return;
|
|
104
|
+
const t = f;
|
|
105
|
+
f = /* @__PURE__ */ new Map(), B(l, t);
|
|
106
|
+
}
|
|
107
|
+
function B(t, n) {
|
|
108
|
+
if (t instanceof y) {
|
|
109
|
+
for (const [i, u] of n) t.stage((i >>> 16) - 32768, (i & 65535) - 32768, 1, u);
|
|
110
|
+
t.commit();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const e = [...n.keys()].sort((i, u) => (i & 65535) - (u & 65535) || (i >>> 16) - (u >>> 16));
|
|
114
|
+
let o = 0, r = 0, c = 0, s = -1;
|
|
115
|
+
for (const i of e) {
|
|
116
|
+
const u = (i >>> 16) - 32768, h = (i & 65535) - 32768, m = n.get(i);
|
|
117
|
+
if (c > 0 && h === r && u === o + c && m === s) {
|
|
118
|
+
c++;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
c > 0 && t.fillStyle(s, 1).fillRect(o, r, c, 1), o = u, r = h, c = 1, s = m;
|
|
122
|
+
}
|
|
123
|
+
c > 0 && t.fillStyle(s, 1).fillRect(o, r, c, 1);
|
|
124
|
+
}
|
|
125
|
+
function L(t, n) {
|
|
126
|
+
return b(t, n);
|
|
127
|
+
}
|
|
128
|
+
function T(t, n, e) {
|
|
129
|
+
d?.set(b(t, n), e);
|
|
130
|
+
}
|
|
131
|
+
const E = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5];
|
|
132
|
+
let p = 1;
|
|
133
|
+
function W(t) {
|
|
134
|
+
p = t;
|
|
135
|
+
}
|
|
136
|
+
function X() {
|
|
137
|
+
return p;
|
|
138
|
+
}
|
|
139
|
+
function _(t, n) {
|
|
140
|
+
if (p >= 1) return !1;
|
|
141
|
+
const e = (Math.round(t) & 3) >>> 0, o = (Math.round(n) & 3) >>> 0;
|
|
142
|
+
return E[o * 4 + e] / 16 >= p;
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
I as batchFor,
|
|
146
|
+
z as beginBatch,
|
|
147
|
+
Y as beginOutline,
|
|
148
|
+
N as capturing,
|
|
149
|
+
X as currentCoverage,
|
|
150
|
+
H as derivedRamp,
|
|
151
|
+
_ as dithered,
|
|
152
|
+
F as endBatch,
|
|
153
|
+
j as endOutline,
|
|
154
|
+
x as fillRuns,
|
|
155
|
+
D as flushBatch,
|
|
156
|
+
C as grade,
|
|
157
|
+
L as pixelKey,
|
|
158
|
+
G as ramp,
|
|
159
|
+
T as record,
|
|
160
|
+
P as registerHandRamps,
|
|
161
|
+
W as setCoverage,
|
|
162
|
+
K as stageRun
|
|
163
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { P as d } from "./palette.js";
|
|
2
|
+
import { rgba as h } from "./pixel.js";
|
|
3
|
+
import { outlineOf as p, hueShade as m } from "./ramp.js";
|
|
4
|
+
function S(e, f, i) {
|
|
5
|
+
return { canvas: e.toCanvas(), anchorX: f, anchorY: i };
|
|
6
|
+
}
|
|
7
|
+
function b(e, f = d.outline) {
|
|
8
|
+
const { w: i, h: c } = e, a = new Uint8Array(i * c);
|
|
9
|
+
for (let t = 0; t < i * c; t++) a[t] = e.data[t] >>> 24 === 255 ? 1 : 0;
|
|
10
|
+
const r = (t, o) => t >= 0 && o >= 0 && t < i && o < c && a[o * i + t] === 1;
|
|
11
|
+
for (let t = 0; t < c; t++)
|
|
12
|
+
for (let o = 0; o < i; o++) {
|
|
13
|
+
if (a[t * i + o]) continue;
|
|
14
|
+
const n = r(o, t - 1), l = r(o - 1, t), s = r(o + 1, t), u = r(o, t + 1);
|
|
15
|
+
(n || l || s || u) && e.px(o, t, n || l ? f : p(e.get(s ? o + 1 : o, s ? t : t + 1)));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function v(e, f, i, c, a, r = w, t = M) {
|
|
19
|
+
for (let o = Math.floor(i - a); o <= Math.ceil(i + a); o++)
|
|
20
|
+
for (let n = Math.floor(f - c); n <= Math.ceil(f + c); n++) {
|
|
21
|
+
if (!e.inBounds(n, o) || e.alphaAt(n, o)) continue;
|
|
22
|
+
const l = (n + 0.5 - f) / c, s = (o + 0.5 - i) / a, u = l * l + s * s;
|
|
23
|
+
u <= 0.55 ? e.px(n, o, r) : u <= 1 && e.px(n, o, t);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const w = h(26, 22, 44, 78), M = h(26, 22, 44, 40);
|
|
27
|
+
function B(e, f, i, c, a, r, t) {
|
|
28
|
+
for (let o = i; o < i + a; o++)
|
|
29
|
+
for (let n = f; n < f + c; n++) {
|
|
30
|
+
if (!e.inBounds(n, o)) continue;
|
|
31
|
+
const l = e.get(n, o);
|
|
32
|
+
!(l >>> 24) || t && !t(n, o) || e.px(n, o, m(l, r, "shadow"));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
S as art,
|
|
37
|
+
v as groundShadow,
|
|
38
|
+
b as litOutline,
|
|
39
|
+
B as shadeBox
|
|
40
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { shade as R, mix as T, channels as $, rgba as x } from "./pixel.js";
|
|
2
|
+
const d = {
|
|
3
|
+
// wool and linen: violet shadows, faintly warm lights
|
|
4
|
+
cloth: { cool: 255, coolDeg: 14, coolSat: 0.06, warm: 50, warmDeg: 6 },
|
|
5
|
+
// hide: its shadows go red-brown, never grey
|
|
6
|
+
leather: { cool: 8, coolDeg: 12, coolSat: 0.08, warm: 45, warmDeg: 8 },
|
|
7
|
+
// steel: blue shadows, lights close to white
|
|
8
|
+
mail: { cool: 232, coolDeg: 16, coolSat: 0.07, warm: 52, warmDeg: 4 },
|
|
9
|
+
plate: { cool: 235, coolDeg: 18, coolSat: 0.08, warm: 50, warmDeg: 6 },
|
|
10
|
+
// scale: crimson-violet shadows, ember-orange lights
|
|
11
|
+
dragon: { cool: 330, coolDeg: 16, coolSat: 0.06, warm: 36, warmDeg: 12 },
|
|
12
|
+
fur: { cool: 262, coolDeg: 10, coolSat: 0.04, warm: 48, warmDeg: 6 },
|
|
13
|
+
// skin: shadows go to blood-red, never to grey or green
|
|
14
|
+
skin: { cool: 350, coolDeg: 14, coolSat: 0.09, warm: 42, warmDeg: 5 },
|
|
15
|
+
hair: { cool: 262, coolDeg: 14, coolSat: 0.05, warm: 46, warmDeg: 10 },
|
|
16
|
+
gold: { cool: 14, coolDeg: 14, coolSat: 0.05, warm: 58, warmDeg: 8 },
|
|
17
|
+
gem: { cool: 262, coolDeg: 8, coolSat: 0.02, warm: 50, warmDeg: 2 },
|
|
18
|
+
// the side turned away from the light, whatever it is made of (the far limbs)
|
|
19
|
+
shadow: { cool: 255, coolDeg: 12, coolSat: 0.04, warm: 50, warmDeg: 0 }
|
|
20
|
+
}, D = {
|
|
21
|
+
cloth: [0.5, 0.66, 0.82, 1.12, 1.25],
|
|
22
|
+
leather: [0.46, 0.62, 0.8, 1.16, 1.3],
|
|
23
|
+
mail: [0.44, 0.6, 0.78, 1.22, 1.42],
|
|
24
|
+
plate: [0.44, 0.56, 0.72, 1.2, 1.45],
|
|
25
|
+
dragon: [0.42, 0.56, 0.74, 1.14, 1.32],
|
|
26
|
+
fur: [0.56, 0.7, 0.84, 1.15, 1.26],
|
|
27
|
+
skin: [0.6, 0.72, 0.86, 1.12, 1.24],
|
|
28
|
+
hair: [0.5, 0.66, 0.8, 1.2, 1.36],
|
|
29
|
+
gold: [0.42, 0.62, 0.8, 1.3, 1.5],
|
|
30
|
+
gem: [0.32, 0.5, 0.78, 1.45, 1.65],
|
|
31
|
+
shadow: [0.5, 0.66, 0.82, 1.12, 1.25]
|
|
32
|
+
}, b = Object.keys(d), E = [...new Set(Object.values(D).flat())];
|
|
33
|
+
function _(t, c) {
|
|
34
|
+
d[t] = c.light, D[t] = c.factors, b.includes(t) || b.push(t);
|
|
35
|
+
const o = E;
|
|
36
|
+
for (const e of c.factors) o.includes(e) || o.push(e);
|
|
37
|
+
for (const e of [p, k]) for (const n of [...e.keys()]) n.endsWith(`:${t}`) && e.delete(n);
|
|
38
|
+
}
|
|
39
|
+
const C = (t) => d[t] ?? d.cloth, H = (t) => D[t] ?? D.cloth;
|
|
40
|
+
function M(t) {
|
|
41
|
+
const [c, o, e] = $(t), n = Math.max(c, o, e), l = Math.min(c, o, e), r = n - l;
|
|
42
|
+
let a = 0;
|
|
43
|
+
return r > 0 && (n === c ? a = ((o - e) / r + 6) % 6 : n === o ? a = (e - c) / r + 2 : a = (c - o) / r + 4), [a * 60, n === 0 ? 0 : r / n, n / 255];
|
|
44
|
+
}
|
|
45
|
+
function w(t, c, o, e) {
|
|
46
|
+
const n = (t % 360 + 360) % 360 / 60, l = Math.floor(n), r = n - l, a = o * (1 - c), s = o * (1 - c * r), i = o * (1 - c * (1 - r)), [g, u, m] = [[o, i, a], [s, o, a], [a, o, i], [a, s, o], [i, a, o], [o, a, s]][l % 6];
|
|
47
|
+
return x(g * 255, u * 255, m * 255, e);
|
|
48
|
+
}
|
|
49
|
+
function A(t, c, o) {
|
|
50
|
+
let e = c - t;
|
|
51
|
+
return e > 180 && (e -= 360), e < -180 && (e += 360), t + Math.sign(e) * Math.min(Math.abs(e), o);
|
|
52
|
+
}
|
|
53
|
+
const h = (t) => Math.max(0, Math.min(1, t)), p = /* @__PURE__ */ new Map();
|
|
54
|
+
function y(t, c, o) {
|
|
55
|
+
if (c === 1) return t;
|
|
56
|
+
const e = `${t}:${c}:${o}`;
|
|
57
|
+
let n = p.get(e);
|
|
58
|
+
if (n !== void 0) return n;
|
|
59
|
+
const l = C(o), r = R(t, c), [a, s, i] = M(r), g = r >>> 24, u = h(1 - M(t)[1] / 0.14);
|
|
60
|
+
let m, S;
|
|
61
|
+
if (c < 1) {
|
|
62
|
+
const f = (1 - c) / 0.5;
|
|
63
|
+
m = w(A(a, l.cool, l.coolDeg * f), h(s + l.coolSat * f), i, g), S = w(l.cool, h(s + l.coolSat * f * 1.2), i, g);
|
|
64
|
+
} else {
|
|
65
|
+
const f = Math.min(1.5, (c - 1) / 0.3);
|
|
66
|
+
m = w(A(a, l.warm, l.warmDeg * f), h(s * 1.08), i, g), S = w(l.warm, h(s + 0.03 * f), i, g);
|
|
67
|
+
}
|
|
68
|
+
return n = u > 0 ? T(m, S, u) : m, p.set(e, n), n;
|
|
69
|
+
}
|
|
70
|
+
const k = /* @__PURE__ */ new Map();
|
|
71
|
+
function P(t, c) {
|
|
72
|
+
const o = `${t}:${c}`;
|
|
73
|
+
let e = k.get(o);
|
|
74
|
+
if (!e) {
|
|
75
|
+
const [n, l, r, a, s] = H(c).map((i) => y(t, i, c));
|
|
76
|
+
e = { deep: n, dark: l, mid: r, base: t, light: a, glint: s }, k.set(o, e);
|
|
77
|
+
}
|
|
78
|
+
return e;
|
|
79
|
+
}
|
|
80
|
+
function j(t, c) {
|
|
81
|
+
const o = P(t, c);
|
|
82
|
+
return [o.deep, o.dark, o.mid, o.base, o.light, o.glint];
|
|
83
|
+
}
|
|
84
|
+
const O = /* @__PURE__ */ new Map();
|
|
85
|
+
function F(t) {
|
|
86
|
+
let c = O.get(t);
|
|
87
|
+
if (c === void 0) {
|
|
88
|
+
const [o, e, n] = M(y(t, 0.42, "shadow"));
|
|
89
|
+
c = w(o, h(e * 1.1 + 0.08), Math.min(n, 0.3), 255), O.set(t, c);
|
|
90
|
+
}
|
|
91
|
+
return c;
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
b as MATERIALS,
|
|
95
|
+
E as RAMP_FACTOR_SET,
|
|
96
|
+
y as hueShade,
|
|
97
|
+
F as outlineOf,
|
|
98
|
+
P as ramp,
|
|
99
|
+
j as rampTones,
|
|
100
|
+
_ as registerMaterial
|
|
101
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { P as d } from "./palette.js";
|
|
2
|
+
import { outlineOf as v } from "./ramp.js";
|
|
3
|
+
function P(w, g = 1, M = d.outline) {
|
|
4
|
+
const { w: n, h: c, data: f } = w, i = new Uint8Array(f.length);
|
|
5
|
+
let m = n, p = c, h = -1, y = -1;
|
|
6
|
+
for (let o = 0; o < c; o++) {
|
|
7
|
+
const e = o * n;
|
|
8
|
+
for (let t = 0; t < n; t++)
|
|
9
|
+
f[e + t] >>> 24 && (i[e + t] = 1, t < m && (m = t), t > h && (h = t), o < p && (p = o), y = o);
|
|
10
|
+
}
|
|
11
|
+
if (h < 0) return;
|
|
12
|
+
let s = [];
|
|
13
|
+
for (let o = Math.max(0, p - 1); o <= Math.min(c - 1, y + 1); o++)
|
|
14
|
+
for (let e = Math.max(0, m - 1); e <= Math.min(n - 1, h + 1); e++) {
|
|
15
|
+
const t = o * n + e;
|
|
16
|
+
if (i[t]) continue;
|
|
17
|
+
const l = o > 0 && i[t - n] === 1, a = e + 1 < n && i[t + 1] === 1, u = e > 0 && i[t - 1] === 1, r = o + 1 < c && i[t + n] === 1;
|
|
18
|
+
(l || a || u || r) && (f[t] = l || a ? M : v(f[u ? t - 1 : t + n]), s.push(t));
|
|
19
|
+
}
|
|
20
|
+
for (const o of s) i[o] = 1;
|
|
21
|
+
for (let o = 1; o < g && s.length; o++) {
|
|
22
|
+
const e = [];
|
|
23
|
+
for (const t of s) {
|
|
24
|
+
const l = t % n, a = t / n | 0, u = f[t], r = (b, x) => {
|
|
25
|
+
!b || i[x] || (i[x] = 1, f[x] = u, e.push(x));
|
|
26
|
+
};
|
|
27
|
+
r(l > 0, t - 1), r(l + 1 < n, t + 1), r(a > 0, t - n), r(a + 1 < c, t + n);
|
|
28
|
+
}
|
|
29
|
+
s = e;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
P as selectiveOutline
|
|
34
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
class C {
|
|
2
|
+
constructor(e, t, a, d) {
|
|
3
|
+
this.dx = e, this.dy = t, this.color = a, this.length = d;
|
|
4
|
+
}
|
|
5
|
+
dx;
|
|
6
|
+
dy;
|
|
7
|
+
color;
|
|
8
|
+
length;
|
|
9
|
+
*[Symbol.iterator]() {
|
|
10
|
+
const e = { dx: 0, dy: 0, color: 0 };
|
|
11
|
+
for (let t = 0; t < this.length; t++)
|
|
12
|
+
e.dx = this.dx[t], e.dy = this.dy[t], e.color = this.color[t], yield e;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const M = new C(new Float32Array(0), new Float32Array(0), new Uint32Array(0), 0), I = M, b = 512 * 512, k = 256, p = 3e5, r = /* @__PURE__ */ new Map();
|
|
16
|
+
let E = 0;
|
|
17
|
+
function v(c, e) {
|
|
18
|
+
for (r.set(c, e), E += e.length; r.size > k || E > p; ) {
|
|
19
|
+
const t = r.keys().next();
|
|
20
|
+
if (t.done) break;
|
|
21
|
+
E -= r.get(t.value).length, r.delete(t.value);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function L(c, e, t) {
|
|
25
|
+
const a = `${c.textureKey}|${c.frameName}|${e}`;
|
|
26
|
+
if (!t) {
|
|
27
|
+
const o = r.get(a);
|
|
28
|
+
if (o)
|
|
29
|
+
return r.delete(a), r.set(a, o), o;
|
|
30
|
+
}
|
|
31
|
+
const d = c.texture, m = d.source.resource;
|
|
32
|
+
if (!(m instanceof HTMLCanvasElement)) return M;
|
|
33
|
+
const f = d.frame, l = Math.round(f.width), u = Math.round(f.height);
|
|
34
|
+
if (l <= 0 || u <= 0 || l * u > b) return M;
|
|
35
|
+
let h;
|
|
36
|
+
try {
|
|
37
|
+
h = m.getContext("2d").getImageData(Math.round(f.x), Math.round(f.y), l, u).data;
|
|
38
|
+
} catch {
|
|
39
|
+
return M;
|
|
40
|
+
}
|
|
41
|
+
const s = Math.max(1, Math.round(e)), A = Math.floor(l / s), g = Math.floor(u / s), y = Math.floor(s / 2);
|
|
42
|
+
let i = 0;
|
|
43
|
+
for (let o = 0; o < g; o++) for (let n = 0; n < A; n++) h[((o * s + y) * l + n * s + y) * 4 + 3] >= 128 && i++;
|
|
44
|
+
const P = new Float32Array(i), F = new Float32Array(i), X = new Uint32Array(i);
|
|
45
|
+
let w = 0;
|
|
46
|
+
for (let o = 0; o < g; o++)
|
|
47
|
+
for (let n = 0; n < A; n++) {
|
|
48
|
+
const x = ((o * s + y) * l + n * s + y) * 4;
|
|
49
|
+
h[x + 3] < 128 || (P[w] = n - A / 2, F[w] = o - g, X[w] = h[x] << 16 | h[x + 1] << 8 | h[x + 2], w++);
|
|
50
|
+
}
|
|
51
|
+
const _ = new C(P, F, X, i);
|
|
52
|
+
return t || v(a, _), _;
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
I as NO_PIXELS,
|
|
56
|
+
C as PackedPixels,
|
|
57
|
+
L as spritePixels
|
|
58
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
function m(n) {
|
|
2
|
+
const r = n.length;
|
|
3
|
+
let i = 1 / 0;
|
|
4
|
+
for (let o = Math.floor(r * 0.4); o < r; o++) n[o] > 0 && (i = Math.min(i, n[o]));
|
|
5
|
+
if (!Number.isFinite(i)) return null;
|
|
6
|
+
const e = i + 2;
|
|
7
|
+
let c = null, t = -1;
|
|
8
|
+
for (let o = Math.floor(r * 0.3); o <= r; o++) {
|
|
9
|
+
const f = o < r && n[o] > 0 && n[o] <= e;
|
|
10
|
+
f && t < 0 && (t = o), !f && t >= 0 && ((!c || o - t > c[1] - c[0]) && (c = [t, o]), t = -1);
|
|
11
|
+
}
|
|
12
|
+
if (!c || c[1] - c[0] < 3) return null;
|
|
13
|
+
let s = 0;
|
|
14
|
+
for (let o = 0; o < c[0]; o++) s = Math.max(s, n[o]);
|
|
15
|
+
return s >= e * 1.5 ? c[0] : null;
|
|
16
|
+
}
|
|
17
|
+
function p(n, r, i) {
|
|
18
|
+
const e = r - n;
|
|
19
|
+
if (e <= 0) return [];
|
|
20
|
+
if (e < 20) return [{ rect: { x: 0, y: n, w: i, h: e }, weight: 1, lag: 0 }];
|
|
21
|
+
const c = n + Math.round(e * 0.5);
|
|
22
|
+
return [
|
|
23
|
+
{ rect: { x: 0, y: n, w: i, h: c - n }, weight: 1, lag: 0 },
|
|
24
|
+
{ rect: { x: 0, y: c, w: i, h: r - c }, weight: 0.55, lag: 0.04 }
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
function g(n, r, i) {
|
|
28
|
+
const e = [.../* @__PURE__ */ new Set([0, r, ...i.flatMap((t) => [t.y, t.y + t.h])])].filter((t) => t >= 0 && t <= r).sort((t, s) => t - s), c = [];
|
|
29
|
+
for (let t = 0; t + 1 < e.length; t++) {
|
|
30
|
+
const s = e[t], o = e[t + 1] - s, f = i.filter((u) => u.y <= s && u.y + u.h >= s + o).sort((u, h) => u.x - h.x);
|
|
31
|
+
let a = 0;
|
|
32
|
+
for (const u of f)
|
|
33
|
+
u.x > a && c.push({ x: a, y: s, w: u.x - a, h: o }), a = Math.max(a, u.x + u.w);
|
|
34
|
+
a < n && c.push({ x: a, y: s, w: n - a, h: o });
|
|
35
|
+
}
|
|
36
|
+
return c.sort((t, s) => s.w * s.h - t.w * t.h);
|
|
37
|
+
}
|
|
38
|
+
function w(n, r, i, e) {
|
|
39
|
+
const c = n.tufts?.[String(e)] ?? n.tufts?.["*"] ?? [], t = [];
|
|
40
|
+
for (const [s, o, f, a, u = 1] of c) {
|
|
41
|
+
const h = Math.min(r, f), l = Math.min(i, a);
|
|
42
|
+
h <= s || l <= o || t.push({ rect: { x: s, y: o, w: h - s, h: l - o }, weight: u, lag: (1 - u) * 0.08 });
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
}
|
|
46
|
+
function b(n, r, i, e, c = 0) {
|
|
47
|
+
if (n.mode === "tufts") {
|
|
48
|
+
const s = w(n, r, i, c);
|
|
49
|
+
return { pieces: s.length ? g(r, i, s.map((o) => o.rect)) : [], strips: s };
|
|
50
|
+
}
|
|
51
|
+
if (n.mode === "hang" && n.cloth) {
|
|
52
|
+
const [s, o, f, a] = n.cloth, u = Math.min(r, f), h = Math.min(i, a), l = o + Math.round((h - o) * 0.3), x = [];
|
|
53
|
+
for (let M = l; M < h; M += 2) {
|
|
54
|
+
const y = Math.min(2, h - M);
|
|
55
|
+
x.push({ rect: { x: s, y: M, w: u - s, h: y }, weight: (M + y - l) / (h - l), lag: (M - l) * 0.03 });
|
|
56
|
+
}
|
|
57
|
+
return { pieces: [
|
|
58
|
+
{ x: 0, y: 0, w: r, h: l },
|
|
59
|
+
{ x: 0, y: h, w: r, h: i - h },
|
|
60
|
+
{ x: 0, y: l, w: s, h: h - l },
|
|
61
|
+
{ x: u, y: l, w: r - u, h: h - l }
|
|
62
|
+
].filter((M) => M.w > 0 && M.h > 0), strips: x };
|
|
63
|
+
}
|
|
64
|
+
let t = null;
|
|
65
|
+
return n.mode === "crown" && e && (t = m(e)), t === null && (t = Math.round(i * Math.min(0.9, n.mode === "top" ? n.top ?? 0.5 : 0.6))), t = Math.max(1, Math.min(i - 1, t)), { pieces: [{ x: 0, y: t, w: r, h: i - t }], strips: p(0, t, r) };
|
|
66
|
+
}
|
|
67
|
+
function I(n, r, i = 0) {
|
|
68
|
+
let e = Math.imul(n + 40503, 2246822507) ^ Math.imul(r + 31161 + i * 131, 3266489909);
|
|
69
|
+
return e ^= e >>> 15, e = Math.imul(e, 668265263), e ^= e >>> 13, (e >>> 0) / 4294967296;
|
|
70
|
+
}
|
|
71
|
+
function P(n, r, i, e) {
|
|
72
|
+
return 0.65 + 0.35 * Math.sin(2 * Math.PI * (n / i - r / e));
|
|
73
|
+
}
|
|
74
|
+
function S(n, r, i, e, c, t, s, o, f = 0) {
|
|
75
|
+
if (t <= 0) return 0;
|
|
76
|
+
const a = n * r + i - e, u = 0.3 * t + 0.72 * Math.sin(2 * Math.PI * a) + 0.28 * Math.sin(2 * Math.PI * (a * 0.43 + i * 1.7)), h = Math.max(c * t * s, f), l = Math.round(h * o * u);
|
|
77
|
+
return l === 0 ? 0 : l;
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
b as buildRig,
|
|
81
|
+
g as complement,
|
|
82
|
+
P as gustAt,
|
|
83
|
+
S as swayOffset,
|
|
84
|
+
I as tileHash,
|
|
85
|
+
m as trunkPivot
|
|
86
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const x = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5].map((n) => (n + 0.5) / 16);
|
|
2
|
+
function d(n, c) {
|
|
3
|
+
if (n <= c) return 0;
|
|
4
|
+
const a = Math.min(1, (n - c) / (1 - c));
|
|
5
|
+
return a * a;
|
|
6
|
+
}
|
|
7
|
+
function f(n, c, a, i = 0.55) {
|
|
8
|
+
const r = Math.max(1, Math.ceil(n)), h = Math.max(1, Math.ceil(c)), e = new Uint8Array(r * h);
|
|
9
|
+
for (let t = 0; t < h; t++)
|
|
10
|
+
for (let o = 0; o < r; o++) {
|
|
11
|
+
const u = (o + 0.5) / r - 0.5, M = (t + 0.5) / h - 0.5, s = (u * u + M * M) * 2;
|
|
12
|
+
s <= i * i || d(Math.sqrt(s), i) * a <= x[(t & 3) * 4 + (o & 3)] || (e[t * r + o] = 1);
|
|
13
|
+
}
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
function l(n, c, a = 6, i = 1e3, r = 500) {
|
|
17
|
+
const h = Math.max(0, Math.min(1, c)), e = i - h * (i - r), t = (n % e + e) % e / e, o = t < 0.15 ? t / 0.15 : Math.max(0, 1 - (t - 0.15) / 0.55), u = (0.35 + h * 0.4) * (0.45 + 0.55 * o);
|
|
18
|
+
return a > 0 ? Math.round(u * a) / a : u;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
l as heartbeat,
|
|
22
|
+
f as vignetteMask
|
|
23
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const d = {
|
|
2
|
+
rainHead: "rgba(214,230,248,0.85)",
|
|
3
|
+
rainBody: "rgba(168,190,216,0.7)",
|
|
4
|
+
rainTail: "rgba(128,150,180,0.5)",
|
|
5
|
+
snow: "#f6f9ff",
|
|
6
|
+
snowShade: "#b8c8e0",
|
|
7
|
+
ashLight: "#8a827c",
|
|
8
|
+
ash: "#5c5652",
|
|
9
|
+
ashDark: "#3e3a38",
|
|
10
|
+
ember: "#ffa040",
|
|
11
|
+
emberDeep: "#c0501c",
|
|
12
|
+
mist: "rgba(226,232,222,0.62)"
|
|
13
|
+
};
|
|
14
|
+
function w(i, t, l, a) {
|
|
15
|
+
const n = [];
|
|
16
|
+
let s = l;
|
|
17
|
+
const _ = () => (s = Math.imul(s, 1103515245) + 12345 & 2147483647, s / 2147483647);
|
|
18
|
+
for (let r = 0; r < t; r++)
|
|
19
|
+
for (let h = 0; h < i; h++) {
|
|
20
|
+
if ((h + r) % 2) continue;
|
|
21
|
+
const c = (h - i / 2) / (i / 2), e = (r - t / 2) / (t / 2), f = 1 - (c * c + e * e);
|
|
22
|
+
f > 0 && _() < f * 0.9 && n.push([h, r, a]);
|
|
23
|
+
}
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
function o(i, t, l, a, n) {
|
|
27
|
+
if (i.exists(t)) return;
|
|
28
|
+
const s = document.createElement("canvas");
|
|
29
|
+
s.width = l, s.height = a;
|
|
30
|
+
const _ = s.getContext("2d");
|
|
31
|
+
if (_) {
|
|
32
|
+
for (const [r, h, c] of n)
|
|
33
|
+
_.fillStyle = c, _.fillRect(r, h, 1, 1);
|
|
34
|
+
i.addCanvas(t, s);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function m(i, t = {}, l = "wx_") {
|
|
38
|
+
const a = { ...d, ...t }, n = (s) => l + s;
|
|
39
|
+
return o(i, n("rain_0"), 2, 5, [[1, 0, a.rainHead], [1, 1, a.rainBody], [1, 2, a.rainBody], [0, 3, a.rainTail], [0, 4, a.rainTail]]), o(i, n("rain_1"), 2, 4, [[1, 0, a.rainHead], [1, 1, a.rainBody], [0, 2, a.rainBody], [0, 3, a.rainTail]]), o(i, n("splash_0"), 5, 2, [[2, 0, a.rainHead], [1, 1, a.rainBody], [3, 1, a.rainBody]]), o(i, n("splash_1"), 5, 2, [[0, 0, a.rainTail], [4, 0, a.rainTail], [2, 1, a.rainTail]]), o(i, n("snow_0"), 1, 1, [[0, 0, a.snow]]), o(i, n("snow_1"), 2, 2, [[0, 0, a.snow], [1, 0, a.snow], [0, 1, a.snow], [1, 1, a.snowShade]]), o(i, n("snow_2"), 3, 3, [[1, 0, a.snow], [0, 1, a.snow], [1, 1, a.snow], [2, 1, a.snowShade], [1, 2, a.snowShade]]), o(i, n("ash_0"), 2, 1, [[0, 0, a.ashLight], [1, 0, a.ash]]), o(i, n("ash_1"), 2, 2, [[0, 0, a.ash], [1, 1, a.ashDark]]), o(i, n("ash_2"), 1, 2, [[0, 0, a.ember], [0, 1, a.emberDeep]]), o(i, n("fog_0"), 72, 14, w(72, 14, 7, a.mist)), o(i, n("fog_1"), 56, 12, w(56, 12, 31, a.mist)), {
|
|
40
|
+
rain: { motion: "fall", max: 170, keys: [n("rain_0"), n("rain_1")], splash: [n("splash_0"), n("splash_1")], tint: 4214890, tintAlpha: 0.1 },
|
|
41
|
+
// the big flake one in five, the big ash an ember one in seven
|
|
42
|
+
snow: { motion: "flake", max: 120, keys: [n("snow_2"), n("snow_1"), n("snow_0"), n("snow_1"), n("snow_0")], sway: 5, tint: 14214384, tintAlpha: 0.08 },
|
|
43
|
+
ash: {
|
|
44
|
+
motion: "flake",
|
|
45
|
+
max: 90,
|
|
46
|
+
keys: [n("ash_2"), n("ash_1"), n("ash_0"), n("ash_1"), n("ash_0"), n("ash_1"), n("ash_0")],
|
|
47
|
+
vx: [12, 24],
|
|
48
|
+
vy: [10, 22],
|
|
49
|
+
sway: 3,
|
|
50
|
+
tint: 5917248,
|
|
51
|
+
tintAlpha: 0.08
|
|
52
|
+
},
|
|
53
|
+
fog: { motion: "bank", max: 12, keys: [n("fog_0"), n("fog_1")], tint: 13160644, tintAlpha: 0.24 }
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
d as WEATHER_COLORS,
|
|
58
|
+
w as mistPixels,
|
|
59
|
+
m as paintWeatherArt
|
|
60
|
+
};
|
package/dist/pixel.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { PixelLayer as i, addPixelLayer as a } from "./pixel/PixelLayer.js";
|
|
2
|
+
import { CLEAR as s, PixelGrid as x, PixelWindow as m, channels as l, hash2 as f, hex as h, makeSheet as n, mix as P, mulberry32 as d, rgba as R, shade as g, toCss as A, upscale as L, valueNoise as u, withAlpha as E } from "./pixel/pixel.js";
|
|
3
|
+
import { P as T } from "./pixel/palette.js";
|
|
4
|
+
import { art as M, groundShadow as O, litOutline as _, shadeBox as v } from "./pixel/propKit.js";
|
|
5
|
+
import { MATERIALS as k, RAMP_FACTOR_SET as w, hueShade as y, outlineOf as C, ramp as W, rampTones as H, registerMaterial as N } from "./pixel/ramp.js";
|
|
6
|
+
import { selectiveOutline as D } from "./pixel/selout.js";
|
|
7
|
+
import { chevronPixels as G, discRuns as V, ellipsePixels as q, ringPixels as B } from "./pixel/aimPixels.js";
|
|
8
|
+
import { PixelMarks as j } from "./pixel/PixelMarks.js";
|
|
9
|
+
import * as e from "./pixel/pixelPaint.js";
|
|
10
|
+
import * as r from "./pixel/pixelTone.js";
|
|
11
|
+
import { registerHandRamps as J } from "./pixel/pixelTone.js";
|
|
12
|
+
import { paintLayer as Q } from "./pixel/paintLayer.js";
|
|
13
|
+
import { Evaporation as Y } from "./pixel/Evaporation.js";
|
|
14
|
+
import { NO_PIXELS as $, PackedPixels as ee, spritePixels as re } from "./pixel/spritePixels.js";
|
|
15
|
+
import { CARRIED_LIGHT as oe, Darkness as ie, LAMP_DIM as ae, WARM_LIGHT as pe } from "./pixel/Darkness.js";
|
|
16
|
+
import { carriedLight as xe, clearLights as me, flashLight as le, liveLights as fe } from "./pixel/lights.js";
|
|
17
|
+
import { NightShade as ne } from "./pixel/NightShade.js";
|
|
18
|
+
import { WEATHER_COLORS as de, mistPixels as Re, paintWeatherArt as ge } from "./pixel/weatherArt.js";
|
|
19
|
+
import { buildRig as Le, complement as ue, gustAt as Ee, swayOffset as Se, tileHash as Te, trunkPivot as ce } from "./pixel/swayRig.js";
|
|
20
|
+
import { SwayProp as Oe, opaqueRowWidths as _e } from "./pixel/SwayProp.js";
|
|
21
|
+
import { heartbeat as Ie, vignetteMask as ke } from "./pixel/vignetteMask.js";
|
|
22
|
+
import { DitherVignette as ye, ditherVignette as Ce } from "./pixel/DitherVignette.js";
|
|
23
|
+
import { FRAME_CORNERS as He, FRAME_TWINS as Ne, frameSvg as be, nineSlice as De } from "./pixel/nineSlice.js";
|
|
24
|
+
export {
|
|
25
|
+
oe as CARRIED_LIGHT,
|
|
26
|
+
s as CLEAR,
|
|
27
|
+
ie as Darkness,
|
|
28
|
+
ye as DitherVignette,
|
|
29
|
+
Y as Evaporation,
|
|
30
|
+
He as FRAME_CORNERS,
|
|
31
|
+
Ne as FRAME_TWINS,
|
|
32
|
+
ae as LAMP_DIM,
|
|
33
|
+
k as MATERIALS,
|
|
34
|
+
$ as NO_PIXELS,
|
|
35
|
+
ne as NightShade,
|
|
36
|
+
T as PALETTE,
|
|
37
|
+
ee as PackedPixels,
|
|
38
|
+
x as PixelGrid,
|
|
39
|
+
i as PixelLayer,
|
|
40
|
+
j as PixelMarks,
|
|
41
|
+
m as PixelWindow,
|
|
42
|
+
w as RAMP_FACTOR_SET,
|
|
43
|
+
Oe as SwayProp,
|
|
44
|
+
pe as WARM_LIGHT,
|
|
45
|
+
de as WEATHER_COLORS,
|
|
46
|
+
a as addPixelLayer,
|
|
47
|
+
M as art,
|
|
48
|
+
Le as buildRig,
|
|
49
|
+
xe as carriedLight,
|
|
50
|
+
l as channels,
|
|
51
|
+
G as chevronPixels,
|
|
52
|
+
me as clearLights,
|
|
53
|
+
ue as complement,
|
|
54
|
+
V as discRuns,
|
|
55
|
+
Ce as ditherVignette,
|
|
56
|
+
q as ellipsePixels,
|
|
57
|
+
le as flashLight,
|
|
58
|
+
be as frameSvg,
|
|
59
|
+
O as groundShadow,
|
|
60
|
+
Ee as gustAt,
|
|
61
|
+
f as hash2,
|
|
62
|
+
Ie as heartbeat,
|
|
63
|
+
h as hex,
|
|
64
|
+
y as hueShade,
|
|
65
|
+
_ as litOutline,
|
|
66
|
+
fe as liveLights,
|
|
67
|
+
n as makeSheet,
|
|
68
|
+
Re as mistPixels,
|
|
69
|
+
P as mix,
|
|
70
|
+
d as mulberry32,
|
|
71
|
+
De as nineSlice,
|
|
72
|
+
_e as opaqueRowWidths,
|
|
73
|
+
C as outlineOf,
|
|
74
|
+
Q as paintLayer,
|
|
75
|
+
ge as paintWeatherArt,
|
|
76
|
+
e as pixelPaint,
|
|
77
|
+
r as pixelTone,
|
|
78
|
+
W as ramp,
|
|
79
|
+
H as rampTones,
|
|
80
|
+
J as registerHandRamps,
|
|
81
|
+
N as registerMaterial,
|
|
82
|
+
R as rgba,
|
|
83
|
+
B as ringPixels,
|
|
84
|
+
D as selectiveOutline,
|
|
85
|
+
g as shade,
|
|
86
|
+
v as shadeBox,
|
|
87
|
+
re as spritePixels,
|
|
88
|
+
Se as swayOffset,
|
|
89
|
+
Te as tileHash,
|
|
90
|
+
A as toCss,
|
|
91
|
+
ce as trunkPivot,
|
|
92
|
+
L as upscale,
|
|
93
|
+
u as valueNoise,
|
|
94
|
+
ke as vignetteMask,
|
|
95
|
+
E as withAlpha
|
|
96
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function r(c, n = globalThis) {
|
|
2
|
+
const i = n.document, o = n.window, s = n.now ?? (() => Date.now());
|
|
3
|
+
let e = null;
|
|
4
|
+
const l = () => {
|
|
5
|
+
const t = e === null ? 0 : Math.max(0, s() - e);
|
|
6
|
+
e = null, c(t);
|
|
7
|
+
}, d = () => {
|
|
8
|
+
i?.visibilityState === "hidden" ? e = s() : e !== null && l();
|
|
9
|
+
}, a = (t) => {
|
|
10
|
+
t.persisted && l();
|
|
11
|
+
};
|
|
12
|
+
return i?.addEventListener("visibilitychange", d), o?.addEventListener("pageshow", a), () => {
|
|
13
|
+
i?.removeEventListener("visibilitychange", d), o?.removeEventListener("pageshow", a);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
r as onAppResume
|
|
18
|
+
};
|