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,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - `crown`: a tree; the canopy above the trunk sways, the trunk found in the pixels (`trunkPivot`);
|
|
3
|
+
* - `top`: the top `top` share of the frame sways (a bush, a reed clump);
|
|
4
|
+
* - `hang`: a cloth hanging off a bar (`cloth`), each pair of rows swinging wider and later down it;
|
|
5
|
+
* - `tufts`: only the given rects move (reeds painted into a bigger sprite), per variant.
|
|
6
|
+
*/
|
|
7
|
+
export type SwayMode = 'crown' | 'top' | 'hang' | 'tufts';
|
|
8
|
+
/** [x0, y0, x1, y1) in the frame's pixels, and an optional weight (share of the full reach, default 1). */
|
|
9
|
+
export type TuftRect = readonly [number, number, number, number] | readonly [number, number, number, number, number];
|
|
10
|
+
export interface SwayDef {
|
|
11
|
+
mode: SwayMode;
|
|
12
|
+
/** `top`: the share of the frame's height, from its top, that moves. */
|
|
13
|
+
top?: number;
|
|
14
|
+
/** `hang`: the cloth, [x0, y0, x1, y1) in the frame's pixels. */
|
|
15
|
+
cloth?: readonly [number, number, number, number];
|
|
16
|
+
/** `tufts`: the moving rects per variant ("*" for every variant without its own). */
|
|
17
|
+
tufts?: Readonly<Record<string, readonly TuftRect[]>>;
|
|
18
|
+
/** Whole world pixels of reach at wind 1. */
|
|
19
|
+
amp: number;
|
|
20
|
+
/** Sway cycles a second. */
|
|
21
|
+
speed: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Rect {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
w: number;
|
|
27
|
+
h: number;
|
|
28
|
+
}
|
|
29
|
+
export interface SwayStrip {
|
|
30
|
+
rect: Rect;
|
|
31
|
+
/** Share of the full reach this strip moves (the crown's top moves furthest, a banner's hem most). */
|
|
32
|
+
weight: number;
|
|
33
|
+
/** How far behind the top of the prop this strip swings, in cycles: the wave runs down a banner. */
|
|
34
|
+
lag: number;
|
|
35
|
+
}
|
|
36
|
+
export interface SwayRig {
|
|
37
|
+
pieces: Rect[];
|
|
38
|
+
strips: SwayStrip[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The first row of a tree's trunk (the canopy is every row above it), from the width of the opaque run on each row
|
|
42
|
+
* of its sprite (0 = empty). The trunk is the longest run of narrow rows in the lower part of the sprite, "narrow"
|
|
43
|
+
* meaning within two pixels of the narrowest row there — so a root flare at the foot does not end it. Null when
|
|
44
|
+
* the sprite has no trunk worth the name (a bush, a heap of reeds).
|
|
45
|
+
*/
|
|
46
|
+
export declare function trunkPivot(widths: readonly number[]): number | null;
|
|
47
|
+
/**
|
|
48
|
+
* The frame `w`x`h` less the given rects (which must not overlap), as rects: cut into row bands at every rect's
|
|
49
|
+
* top and bottom, and each band into the runs no rect covers.
|
|
50
|
+
*/
|
|
51
|
+
export declare function complement(w: number, h: number, holes: Rect[]): Rect[];
|
|
52
|
+
/**
|
|
53
|
+
* The rig for one prop frame `w`x`h`. `rowWidths` is only read by a `crown`, whose pivot comes from the pixels
|
|
54
|
+
* (without it, or without a trunk in them, the crown falls back to the top 60%). `variant` is only read by
|
|
55
|
+
* `tufts`, whose rects are drawn per variant.
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildRig(def: SwayDef, w: number, h: number, rowWidths?: readonly number[], variant?: number): SwayRig;
|
|
58
|
+
/** A stable [0, 1) per tile (or any two integers), so each prop keeps its own phase and pace from one visit to the next. */
|
|
59
|
+
export declare function tileHash(tx: number, ty: number, salt?: number): number;
|
|
60
|
+
/** A gust rolling across the world from the west: every tree it passes bends a little further, then less. */
|
|
61
|
+
export declare function gustAt(tSec: number, worldX: number, gustSeconds: number, gustPx: number): number;
|
|
62
|
+
/**
|
|
63
|
+
* How many whole pixels a strip stands off at `tSec`: a main swing with a slower second one riding it (so no two
|
|
64
|
+
* trees ever meet in step), leaning a little downwind as the wind rises, scaled by the reach, the wind, the gust
|
|
65
|
+
* and the strip's weight, and rounded — the sway moves in pixel steps, 0 → 1 → 0, never smeared between them.
|
|
66
|
+
*
|
|
67
|
+
* `minReach` is the least that reach × wind × gust may come to while any wind blows (a still place's
|
|
68
|
+
* floor, chosen by the game): without it a faint breeze never rounds to a whole pixel and the trees stand dead still, and
|
|
69
|
+
* rounding is the rule, so the floor is what lets the crest of a swing tick one pixel over and back.
|
|
70
|
+
*/
|
|
71
|
+
export declare function swayOffset(tSec: number, speed: number, phase: number, lag: number, amp: number, wind: number, gust: number, weight: number, minReach?: number): number;
|
|
72
|
+
//# sourceMappingURL=swayRig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swayRig.d.ts","sourceRoot":"","sources":["../../../src/pixel/swayRig.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,2GAA2G;AAC3G,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,KAAK,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAClD,qFAAqF;IACrF,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC,CAAC,CAAC;IACtD,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,oGAAoG;IACpG,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,IAAI,EAAE,CAAC;IACf,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAoBnE;AAcD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAgBtE;AAgBD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,SAAI,GAAG,OAAO,CA6BhH;AAED,4HAA4H;AAC5H,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,SAAI,GAAG,MAAM,CAMjE;AAED,6GAA6G;AAC7G,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,SAAI,GACX,MAAM,CAOR"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pure half of `DitherVignette`: which pixels of a `w`×`h` screen (in world pixels) the edge sets, its falloff an
|
|
3
|
+
* ordered 4×4 Bayer dither rather than a gradient — the grammar `Darkness` lights the night in, so the edge reads as
|
|
4
|
+
* pixel art and not as a blur over it.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* One byte a pixel, 1 where the edge is set. `strength` (0..1) is the share of pixels set at the very corner; `from`
|
|
8
|
+
* (0..1) is how far from the centre toward a corner the edge begins.
|
|
9
|
+
*/
|
|
10
|
+
export declare function vignetteMask(w: number, h: number, strength: number, from?: number): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* A pulse's opacity at `now` (ms): a quick rise and a slower fall, a beat every `slowMs` at `urgency` 0 quickening to
|
|
13
|
+
* every `fastMs` at 1, deeper as it quickens, in `steps` levels rather than a smooth swell (0 for smooth).
|
|
14
|
+
*/
|
|
15
|
+
export declare function heartbeat(now: number, urgency: number, steps?: number, slowMs?: number, fastMs?: number): number;
|
|
16
|
+
//# sourceMappingURL=vignetteMask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vignetteMask.d.ts","sourceRoot":"","sources":["../../../src/pixel/vignetteMask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,UAAU,CAe5F;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,EAAE,MAAM,SAAO,EAAE,MAAM,SAAM,GAAG,MAAM,CAOtG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TextureRegistry } from '../core/TextureRegistry.js';
|
|
2
|
+
import type { WeatherLook } from '../ambient/WeatherLayer.js';
|
|
3
|
+
/** A pixel of weather art: x, y and a CSS colour. */
|
|
4
|
+
export type WeatherPixel = readonly [x: number, y: number, color: string];
|
|
5
|
+
/** The colours the weather is painted in; every one may be replaced to suit a game's palette. */
|
|
6
|
+
export interface WeatherColors {
|
|
7
|
+
rainHead: string;
|
|
8
|
+
rainBody: string;
|
|
9
|
+
rainTail: string;
|
|
10
|
+
snow: string;
|
|
11
|
+
snowShade: string;
|
|
12
|
+
ashLight: string;
|
|
13
|
+
ash: string;
|
|
14
|
+
ashDark: string;
|
|
15
|
+
ember: string;
|
|
16
|
+
emberDeep: string;
|
|
17
|
+
mist: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const WEATHER_COLORS: WeatherColors;
|
|
20
|
+
/** A bank of mist: pixels on a checkerboard, denser toward its middle, ragged at every edge. Pure and seeded. */
|
|
21
|
+
export declare function mistPixels(w: number, h: number, seed: number, color: string): WeatherPixel[];
|
|
22
|
+
/**
|
|
23
|
+
* Paints a set of weather in whole world pixels, flat colours and never a soft glow (a rain streak is the size of a
|
|
24
|
+
* pixel of the roof it falls past; light from the up-left, so a flake's lit pixel is its top-left one), and returns
|
|
25
|
+
* looks ready for `WeatherLayer`: `rain`, `snow`, `ash` (with an ember now and then) and `fog`. Painted once; a key
|
|
26
|
+
* already in the registry is kept.
|
|
27
|
+
*/
|
|
28
|
+
export declare function paintWeatherArt(textures: TextureRegistry, colors?: Partial<WeatherColors>, prefix?: string): Record<'rain' | 'snow' | 'ash' | 'fog', WeatherLook>;
|
|
29
|
+
//# sourceMappingURL=weatherArt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weatherArt.d.ts","sourceRoot":"","sources":["../../../src/pixel/weatherArt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAE1E,iGAAiG;AACjG,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,cAAc,EAAE,aAY5B,CAAC;AAEF,iHAAiH;AACjH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,EAAE,CAgB5F;AAgBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,EACzB,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,EACnC,MAAM,SAAQ,GACb,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,EAAE,WAAW,CAAC,CAgCtD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** What `onAppResume` listens on: `document` and `window` in a browser; a test passes its own. */
|
|
2
|
+
export interface ResumeEnv {
|
|
3
|
+
document?: {
|
|
4
|
+
readonly visibilityState?: string;
|
|
5
|
+
addEventListener(type: string, cb: () => void): void;
|
|
6
|
+
removeEventListener(type: string, cb: () => void): void;
|
|
7
|
+
};
|
|
8
|
+
window?: {
|
|
9
|
+
addEventListener(type: string, cb: (e: {
|
|
10
|
+
persisted?: boolean;
|
|
11
|
+
}) => void): void;
|
|
12
|
+
removeEventListener(type: string, cb: (e: {
|
|
13
|
+
persisted?: boolean;
|
|
14
|
+
}) => void): void;
|
|
15
|
+
};
|
|
16
|
+
now?: () => number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Calls `cb` when the app comes back to the foreground: the tab shown again (`visibilitychange`) or the page restored
|
|
20
|
+
* from the back/forward cache (`pageshow` with `persisted`). A phone freezes a background tab — timers stop, a socket
|
|
21
|
+
* may be dead without having closed — so this is the moment to check what survived. `cb` gets how long the app was
|
|
22
|
+
* hidden, ms (0 when the hiding was not seen). Returns the unsubscribe; does nothing where there is no document.
|
|
23
|
+
*/
|
|
24
|
+
export declare function onAppResume(cb: (hiddenMs: number) => void, env?: ResumeEnv): () => void;
|
|
25
|
+
//# sourceMappingURL=appResume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appResume.d.ts","sourceRoot":"","sources":["../../../src/platform/appResume.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;QAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC;IAChK,MAAM,CAAC,EAAE;QAAE,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,OAAO,CAAA;SAAE,KAAK,IAAI,GAAG,IAAI,CAAC;QAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,OAAO,CAAA;SAAE,KAAK,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC;IAC/K,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,EAAE,GAAG,GAAE,SAAmC,GAAG,MAAM,IAAI,CAwBhH"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fullscreen through the standard API, with the `webkit` names older Safari (and iPadOS before 16.4) still use. Where
|
|
3
|
+
* neither exists (iPhone Safari never offers an element fullscreen) every call is a safe no-op: `enterFullscreen`
|
|
4
|
+
* resolves false and `isFullscreen` stays false, so a game can show its button only when `fullscreenSupported()`.
|
|
5
|
+
*/
|
|
6
|
+
/** The slice of `Document` the helpers read; tests pass their own. */
|
|
7
|
+
export interface FullscreenDocument {
|
|
8
|
+
readonly fullscreenElement?: Element | null;
|
|
9
|
+
readonly webkitFullscreenElement?: Element | null;
|
|
10
|
+
readonly fullscreenEnabled?: boolean;
|
|
11
|
+
readonly webkitFullscreenEnabled?: boolean;
|
|
12
|
+
readonly documentElement?: Element;
|
|
13
|
+
exitFullscreen?(): Promise<void>;
|
|
14
|
+
webkitExitFullscreen?(): void;
|
|
15
|
+
addEventListener(type: string, fn: () => void): void;
|
|
16
|
+
removeEventListener(type: string, fn: () => void): void;
|
|
17
|
+
}
|
|
18
|
+
/** True when this page may put an element in fullscreen at all. */
|
|
19
|
+
export declare function fullscreenSupported(doc?: FullscreenDocument | null): boolean;
|
|
20
|
+
/** True while something is in fullscreen. */
|
|
21
|
+
export declare function isFullscreen(doc?: FullscreenDocument | null): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Puts `element` (default the whole page) in fullscreen; resolves true once it is. Browsers allow it only inside a
|
|
24
|
+
* user gesture, so call it from a click or key handler. A refusal resolves false instead of throwing: a game's
|
|
25
|
+
* fullscreen button should never take the frame down with it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function enterFullscreen(element?: Element, doc?: FullscreenDocument | null): Promise<boolean>;
|
|
28
|
+
/** Leaves fullscreen; resolves false when nothing was in it or the browser refused. */
|
|
29
|
+
export declare function exitFullscreen(doc?: FullscreenDocument | null): Promise<boolean>;
|
|
30
|
+
/** Enters or leaves; resolves whether the page is in fullscreen afterwards (as far as the call could tell). */
|
|
31
|
+
export declare function toggleFullscreen(element?: Element, doc?: FullscreenDocument | null): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Calls `fn(isFullscreen)` whenever the page enters or leaves fullscreen — by the game or by the player pressing Esc,
|
|
34
|
+
* which no game code sees otherwise. Returns the unsubscribe.
|
|
35
|
+
*/
|
|
36
|
+
export declare function onFullscreenChange(fn: (fullscreen: boolean) => void, doc?: FullscreenDocument | null): () => void;
|
|
37
|
+
//# sourceMappingURL=fullscreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fullscreen.d.ts","sourceRoot":"","sources":["../../../src/platform/fullscreen.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,oBAAoB,CAAC,IAAI,IAAI,CAAC;IAC9B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IACrD,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACzD;AAWD,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,OAAO,CAE/F;AAED,6CAA6C;AAC7C,wBAAgB,YAAY,CAAC,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,OAAO,CAGxF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAY7H;AAED,uFAAuF;AACvF,wBAAsB,cAAc,CAAC,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAUzG;AAED,+GAA+G;AAC/G,wBAAsB,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9H;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,EAAE,GAAG,GAAE,kBAAkB,GAAG,IAAwB,GAAG,MAAM,IAAI,CASpI"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locks the screen's orientation where the platform allows it: Android Chrome in fullscreen or as an installed app,
|
|
3
|
+
* Electron and Capacitor shells. Desktop browsers and iPhone Safari refuse or lack the API; then `lockOrientation`
|
|
4
|
+
* resolves false, so a game asks once and falls back to a "turn your phone" hint without try/catch of its own.
|
|
5
|
+
*/
|
|
6
|
+
export type OrientationLock = 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary';
|
|
7
|
+
/** The slice of `ScreenOrientation` used here (`lock` is missing from some DOM typings); tests pass their own. */
|
|
8
|
+
export interface OrientationTarget {
|
|
9
|
+
readonly type?: string;
|
|
10
|
+
lock?(orientation: OrientationLock): Promise<void>;
|
|
11
|
+
unlock?(): void;
|
|
12
|
+
}
|
|
13
|
+
/** Resolves true once the screen is locked to `orientation`, false where the platform refuses or cannot. */
|
|
14
|
+
export declare function lockOrientation(orientation: OrientationLock, target?: OrientationTarget | null): Promise<boolean>;
|
|
15
|
+
/** Lets the screen turn freely again; a no-op where nothing could be locked. */
|
|
16
|
+
export declare function unlockOrientation(target?: OrientationTarget | null): void;
|
|
17
|
+
/** 'landscape', 'portrait', or null where the platform does not say. */
|
|
18
|
+
export declare function currentOrientationKind(target?: OrientationTarget | null): 'landscape' | 'portrait' | null;
|
|
19
|
+
//# sourceMappingURL=orientation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orientation.d.ts","sourceRoot":"","sources":["../../../src/platform/orientation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAErK,kHAAkH;AAClH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,CAAC,WAAW,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAOD,4GAA4G;AAC5G,wBAAsB,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,GAAE,iBAAiB,GAAG,IAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAS7I;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,iBAAiB,GAAG,IAA2B,GAAG,IAAI,CAM/F;AAED,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,MAAM,GAAE,iBAAiB,GAAG,IAA2B,GAAG,WAAW,GAAG,UAAU,GAAG,IAAI,CAK/H"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pointer lock for mouse-look and twin-stick aiming with the mouse: the cursor hides and movement comes as
|
|
3
|
+
* `movementX`/`movementY` deltas. Browsers grant it only inside a user gesture and the player can always leave it with
|
|
4
|
+
* Esc, so a game listens with `onPointerLockChange` rather than assuming it holds.
|
|
5
|
+
*/
|
|
6
|
+
/** The slice of `Document` used here; tests pass their own. */
|
|
7
|
+
export interface PointerLockDocument {
|
|
8
|
+
readonly pointerLockElement?: Element | null;
|
|
9
|
+
exitPointerLock?(): void;
|
|
10
|
+
addEventListener(type: string, fn: () => void): void;
|
|
11
|
+
removeEventListener(type: string, fn: () => void): void;
|
|
12
|
+
}
|
|
13
|
+
/** True while `element` (or, with none named, anything) holds the pointer. */
|
|
14
|
+
export declare function isPointerLocked(element?: Element, doc?: PointerLockDocument | null): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Asks to lock the pointer to `element` (the game canvas); resolves whether it holds afterwards. `raw` asks for
|
|
17
|
+
* unaccelerated movement where the browser offers it, and falls back to the plain lock where it refuses that option.
|
|
18
|
+
*/
|
|
19
|
+
export declare function requestPointerLock(element: Element, options?: {
|
|
20
|
+
raw?: boolean;
|
|
21
|
+
}, doc?: PointerLockDocument | null): Promise<boolean>;
|
|
22
|
+
/** Releases the pointer; a no-op when nothing holds it. */
|
|
23
|
+
export declare function exitPointerLock(doc?: PointerLockDocument | null): void;
|
|
24
|
+
/** Calls `fn(locked)` whenever the lock is taken or lost (Esc included). Returns the unsubscribe. */
|
|
25
|
+
export declare function onPointerLockChange(fn: (locked: boolean) => void, doc?: PointerLockDocument | null): () => void;
|
|
26
|
+
//# sourceMappingURL=pointerLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointerLock.d.ts","sourceRoot":"","sources":["../../../src/platform/pointerLock.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+DAA+D;AAC/D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7C,eAAe,CAAC,IAAI,IAAI,CAAC;IACzB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IACrD,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACzD;AAUD,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,GAAE,mBAAmB,GAAG,IAAwB,GAAG,OAAO,CAG/G;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,EAAE,GAAG,GAAE,mBAAmB,GAAG,IAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAcjK;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,GAAG,GAAE,mBAAmB,GAAG,IAAwB,GAAG,IAAI,CAEzF;AAED,qGAAqG;AACrG,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,EAAE,GAAG,GAAE,mBAAmB,GAAG,IAAwB,GAAG,MAAM,IAAI,CAKlI"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The slice of `MediaQueryList` used here; tests pass their own. */
|
|
2
|
+
export interface MotionQuery {
|
|
3
|
+
readonly matches: boolean;
|
|
4
|
+
addEventListener?(type: 'change', fn: () => void): void;
|
|
5
|
+
removeEventListener?(type: 'change', fn: () => void): void;
|
|
6
|
+
/** Safari before 14 only has the old names. */
|
|
7
|
+
addListener?(fn: () => void): void;
|
|
8
|
+
removeListener?(fn: () => void): void;
|
|
9
|
+
}
|
|
10
|
+
/** True when the system asks for reduced motion; false where it cannot be read. */
|
|
11
|
+
export declare function prefersReducedMotion(query?: MotionQuery | null): boolean;
|
|
12
|
+
/** Calls `fn(reduced)` when the system setting changes (not at once). Returns the unsubscribe. */
|
|
13
|
+
export declare function onReducedMotionChange(fn: (reduced: boolean) => void, query?: MotionQuery | null): () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Sets `engineSettings.reducedFx` from the system setting now and whenever it changes. Returns the unsubscribe; the
|
|
16
|
+
* setting keeps its last value afterwards. A game with its own "reduced effects" toggle should not call this, or
|
|
17
|
+
* the system would overwrite the player's choice — mirror its own store instead.
|
|
18
|
+
*/
|
|
19
|
+
export declare function followReducedMotion(query?: MotionQuery | null): () => void;
|
|
20
|
+
//# sourceMappingURL=reducedMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducedMotion.d.ts","sourceRoot":"","sources":["../../../src/platform/reducedMotion.ts"],"names":[],"mappings":"AAUA,qEAAqE;AACrE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IACxD,mBAAmB,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC3D,+CAA+C;IAC/C,WAAW,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CACvC;AAMD,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,KAAK,GAAE,WAAW,GAAG,IAAqB,GAAG,OAAO,CAExF;AAED,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,EAAE,KAAK,GAAE,WAAW,GAAG,IAAqB,GAAG,MAAM,IAAI,CAS5H;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,GAAE,WAAW,GAAG,IAAqB,GAAG,MAAM,IAAI,CAI1F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An `AbortSignal` that aborts after `ms` — `AbortSignal.timeout`, which iOS Safari only has from 16 and older
|
|
3
|
+
* WebViews not at all: there an `AbortController` and a timer stand in, aborting with the same `TimeoutError`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function timeoutSignal(ms: number): AbortSignal;
|
|
6
|
+
//# sourceMappingURL=timeoutSignal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeoutSignal.d.ts","sourceRoot":"","sources":["../../../src/platform/timeoutSignal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAQrD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** A native shell (Capacitor, Electron touch kiosk…) tells the engine it is one; browsers leave it false. */
|
|
2
|
+
export declare function setNativeShell(native: boolean): void;
|
|
3
|
+
/**
|
|
4
|
+
* The `localStorage` key that forces the touch controls on or off (`'1'`/`'0'`, beside `?touch=1|0` in the URL), for
|
|
5
|
+
* trying them on a desktop browser. A game names its own so its players' saved choice carries over.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setTouchOverrideKey(key: string): void;
|
|
8
|
+
/** True when the game is played with fingers (decided once per launch, `detectTouch`). */
|
|
9
|
+
export declare function isTouchUi(): boolean;
|
|
10
|
+
//# sourceMappingURL=touch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/platform/touch.ts"],"names":[],"mappings":"AAMA,6GAA6G;AAC7G,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAGpD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGrD;AAqBD,0FAA0F;AAC1F,wBAAgB,SAAS,IAAI,OAAO,CAGnC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type FilterSystem, type RenderSurface, type Texture } from 'pixi.js';
|
|
2
|
+
import { FxFilter } from './fxShader.js';
|
|
3
|
+
export interface BloomOptions {
|
|
4
|
+
/** Brightness (0–1, the brightest channel) from which a pixel glows (default 0.7). */
|
|
5
|
+
threshold?: number;
|
|
6
|
+
/** How gradually the glow comes in above the threshold (default 0.2). */
|
|
7
|
+
knee?: number;
|
|
8
|
+
/** How strongly the glow is added back (default 1). */
|
|
9
|
+
intensity?: number;
|
|
10
|
+
/** Blur strength of the glow, pixels (default 8). */
|
|
11
|
+
blur?: number;
|
|
12
|
+
/** Blur quality: passes (default 4). */
|
|
13
|
+
quality?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Bright things glow: the pixels above a threshold are blurred and added back over the picture. Three passes (bright,
|
|
17
|
+
* blur, combine) on textures from Pixi's pool; costlier than the one-pass effects, so give it a `filterArea` or put it
|
|
18
|
+
* on the world layer only.
|
|
19
|
+
*/
|
|
20
|
+
export declare class BloomFilter extends FxFilter {
|
|
21
|
+
private readonly bright;
|
|
22
|
+
private readonly blurPass;
|
|
23
|
+
constructor(options?: BloomOptions);
|
|
24
|
+
get intensity(): number;
|
|
25
|
+
set intensity(v: number);
|
|
26
|
+
get threshold(): number;
|
|
27
|
+
set threshold(v: number);
|
|
28
|
+
get blur(): number;
|
|
29
|
+
set blur(v: number);
|
|
30
|
+
apply(filterManager: FilterSystem, input: Texture, output: RenderSurface, clearMode: boolean): void;
|
|
31
|
+
destroy(): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=BloomFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BloomFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/BloomFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAuBD;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;gBAE1B,OAAO,GAAE,YAAiB;IActC,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAEtB;IACD,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAEtB;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,EAEjB;IAEQ,KAAK,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI;IAWnG,OAAO,IAAI,IAAI;CAKzB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
/**
|
|
3
|
+
* Splits red and blue apart towards the edges, `offset` pixels at a corner: a hit's jolt, a dream, a cheap lens.
|
|
4
|
+
* Nothing at the centre of the screen moves.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChromaticAberrationFilter extends FxFilter {
|
|
7
|
+
constructor(offset?: number);
|
|
8
|
+
get offset(): number;
|
|
9
|
+
set offset(v: number);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ChromaticAberrationFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChromaticAberrationFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/ChromaticAberrationFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,QAAQ;gBACzC,MAAM,SAAI;IAatB,IAAI,MAAM,IAAI,MAAM,CAEnB;IACD,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,EAEnB;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
export interface ColorAdjustOptions {
|
|
3
|
+
/** Multiplies every channel (default 1). */
|
|
4
|
+
brightness?: number;
|
|
5
|
+
/** 1 unchanged, 0 flat grey, above 1 punchier (default 1). */
|
|
6
|
+
contrast?: number;
|
|
7
|
+
/** 1 unchanged, 0 greyscale (default 1). */
|
|
8
|
+
saturation?: number;
|
|
9
|
+
/** A colour multiplied in by `tintAmount` (default white, 0). */
|
|
10
|
+
tint?: number;
|
|
11
|
+
tintAmount?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Brightness, contrast, saturation and a tint, all animatable, plus a flash: the whole screen washed towards a colour
|
|
15
|
+
* (`flash` 0–1, `flashColor`), for a hit, a pickup or lightning. `PostFx.flash` drives it.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ColorAdjustFilter extends FxFilter {
|
|
18
|
+
constructor(options?: ColorAdjustOptions);
|
|
19
|
+
get brightness(): number;
|
|
20
|
+
set brightness(v: number);
|
|
21
|
+
get contrast(): number;
|
|
22
|
+
set contrast(v: number);
|
|
23
|
+
get saturation(): number;
|
|
24
|
+
set saturation(v: number);
|
|
25
|
+
get flash(): number;
|
|
26
|
+
set flash(v: number);
|
|
27
|
+
set flashColor(c: number);
|
|
28
|
+
set tint(c: number);
|
|
29
|
+
get tintAmount(): number;
|
|
30
|
+
set tintAmount(v: number);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ColorAdjustFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorAdjustFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/ColorAdjustFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAO,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,GAAE,kBAAuB;IAkC5C,IAAI,UAAU,IAAI,MAAM,CAEvB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,EAEvB;IACD,IAAI,QAAQ,IAAI,MAAM,CAErB;IACD,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAErB;IACD,IAAI,UAAU,IAAI,MAAM,CAEvB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,EAEvB;IACD,IAAI,KAAK,IAAI,MAAM,CAElB;IACD,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,EAElB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,EAEvB;IACD,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,EAEjB;IACD,IAAI,UAAU,IAAI,MAAM,CAEvB;IACD,IAAI,UAAU,CAAC,CAAC,EAAE,MAAM,EAEvB;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
export interface CrtOptions {
|
|
3
|
+
/** 0–1, how dark the gaps between scanlines are (default 0.3). */
|
|
4
|
+
scanlines?: number;
|
|
5
|
+
/** Screen pixels per scanline (default 3). */
|
|
6
|
+
lineHeight?: number;
|
|
7
|
+
/** How much the glass bulges, 0 flat (default 0.08). */
|
|
8
|
+
curvature?: number;
|
|
9
|
+
/** 0–1, how much darker the bulged corners are (default 0.25). */
|
|
10
|
+
cornerShade?: number;
|
|
11
|
+
}
|
|
12
|
+
/** An old television: scanlines, a bulging glass with black beyond its edge, darker corners. */
|
|
13
|
+
export declare class CrtFilter extends FxFilter {
|
|
14
|
+
constructor(options?: CrtOptions);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=CrtFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrtFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/CrtFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,UAAU;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gGAAgG;AAChG,qBAAa,SAAU,SAAQ,QAAQ;gBACzB,OAAO,GAAE,UAAe;CAmCrC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
/** Shows the screen in blocks of `size` pixels: a transition's dissolve, a retro mode, a censor box. 1 is off. */
|
|
3
|
+
export declare class PixelateFilter extends FxFilter {
|
|
4
|
+
constructor(size?: number);
|
|
5
|
+
get size(): number;
|
|
6
|
+
set size(v: number);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=PixelateFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PixelateFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/PixelateFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,kHAAkH;AAClH,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,IAAI,SAAI;IAepB,IAAI,IAAI,IAAI,MAAM,CAEjB;IACD,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,EAEjB;CACF"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Container, Rectangle, type Filter } from 'pixi.js';
|
|
2
|
+
import { type EaseFn } from '../core/eases.js';
|
|
3
|
+
import type { Engine } from '../engine/Engine.js';
|
|
4
|
+
import { ColorAdjustFilter } from './ColorAdjustFilter.js';
|
|
5
|
+
import { FxAnimator } from './fxAnimator.js';
|
|
6
|
+
import { type ShockwaveOptions } from './ShockwaveFilter.js';
|
|
7
|
+
export interface PostFxOptions {
|
|
8
|
+
/**
|
|
9
|
+
* What the effects lie over: 'all' (default) the whole picture, HUD included; 'world' the camera's layer only, so
|
|
10
|
+
* the HUD stays sharp; or any container.
|
|
11
|
+
*/
|
|
12
|
+
layer?: 'all' | 'world' | Container;
|
|
13
|
+
/**
|
|
14
|
+
* Fills the screen behind the picture with this colour (default the renderer's background when `layer` is 'all').
|
|
15
|
+
* Effects only see what is drawn: without a backdrop the empty background stays untouched by a vignette or a flash.
|
|
16
|
+
* `false` for none.
|
|
17
|
+
*/
|
|
18
|
+
backdrop?: number | false;
|
|
19
|
+
/** Skip flashes and shockwaves while the player asked for reduced effects (default true). */
|
|
20
|
+
honourReducedFx?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface FlashOptions {
|
|
23
|
+
color?: number;
|
|
24
|
+
/** Peak strength, 0–1 (default 0.6). */
|
|
25
|
+
strength?: number;
|
|
26
|
+
ms?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ShockwaveRun extends ShockwaveOptions {
|
|
29
|
+
/** How far the ring travels, as a share of the screen's height (default 0.6). */
|
|
30
|
+
reach?: number;
|
|
31
|
+
ms?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Full-screen effects over a game: a chain of filters (vignette, bloom, a colour grade, CRT, pixelate…) laid over the
|
|
35
|
+
* picture in the order added, switched on and off one by one, and short effects that come and go — a flash, a
|
|
36
|
+
* shockwave, any uniform animated over time. One per engine is plenty; give it to the scenes that want it.
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* const post = PostFx.forEngine(engine);
|
|
40
|
+
* const vignette = post.add(new VignetteFilter({ strength: 0.4 }));
|
|
41
|
+
* post.add(new BloomFilter({ threshold: 0.75 }));
|
|
42
|
+
* post.flash({ color: 0xffffff, ms: 120 }); // a hit
|
|
43
|
+
* post.shockwave(x, y); // screen pixels: an explosion
|
|
44
|
+
* post.animate((v) => (vignette.strength = v), 0.4, 0.8, 300, 'Sine.InOut'); // a heartbeat
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare class PostFx {
|
|
48
|
+
readonly target: Container;
|
|
49
|
+
/** The screen rectangle, live (the renderer's `screen`): what is filtered, and how screen points map to it. */
|
|
50
|
+
private readonly screen;
|
|
51
|
+
private readonly options;
|
|
52
|
+
readonly animator: FxAnimator;
|
|
53
|
+
private readonly chain;
|
|
54
|
+
private transient;
|
|
55
|
+
private colorFx;
|
|
56
|
+
private backdropSprite;
|
|
57
|
+
private offFrame;
|
|
58
|
+
/** The screen in the target's own coordinates: the filtered area, refreshed every frame as a camera moves. */
|
|
59
|
+
private readonly area;
|
|
60
|
+
constructor(target: Container,
|
|
61
|
+
/** The screen rectangle, live (the renderer's `screen`): what is filtered, and how screen points map to it. */
|
|
62
|
+
screen: Rectangle, options?: PostFxOptions);
|
|
63
|
+
/** A `PostFx` over an engine's picture, stepped on its frames. */
|
|
64
|
+
static forEngine(engine: Engine, options?: PostFxOptions): PostFx;
|
|
65
|
+
/** Adds an effect at the end of the chain (or at `index`) and returns it. */
|
|
66
|
+
add<T extends Filter>(filter: T, index?: number): T;
|
|
67
|
+
/** Takes an effect out (it is not destroyed: add it back later, or destroy it yourself). */
|
|
68
|
+
remove(filter: Filter): void;
|
|
69
|
+
/** Turns an effect on or off without taking it out of its place. */
|
|
70
|
+
setEnabled(filter: Filter, on: boolean): void;
|
|
71
|
+
isEnabled(filter: Filter): boolean;
|
|
72
|
+
/** Every effect in the chain, in order. */
|
|
73
|
+
get filters(): readonly Filter[];
|
|
74
|
+
/** Animates any number (a uniform, an effect's property) from `from` to `to` over `ms`. */
|
|
75
|
+
animate(set: (v: number) => void, from: number, to: number, ms: number, ease?: EaseFn | string, done?: () => void): void;
|
|
76
|
+
/** The whole picture washed towards a colour, fading out over `ms`. Skipped under reduced effects. */
|
|
77
|
+
flash(options?: FlashOptions): void;
|
|
78
|
+
/** A ring of bent picture spreading from a screen point (screen pixels). Skipped under reduced effects. */
|
|
79
|
+
shockwave(x: number, y: number, options?: ShockwaveRun): void;
|
|
80
|
+
/** The colour adjustment `flash` uses, made and put first in the chain the first time: brightness, saturation, a tint. */
|
|
81
|
+
get color(): ColorAdjustFilter;
|
|
82
|
+
/** Steps the animations; `forEngine` calls it on every frame. */
|
|
83
|
+
update(ms: number): void;
|
|
84
|
+
destroy(): void;
|
|
85
|
+
/** The screen rectangle mapped into the target's local space (a camera's layer is scaled and moved). */
|
|
86
|
+
private fitArea;
|
|
87
|
+
private get reduced();
|
|
88
|
+
private ensureColor;
|
|
89
|
+
private setBackdrop;
|
|
90
|
+
private apply;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=PostFx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PostFx.d.ts","sourceRoot":"","sources":["../../../src/postfx/PostFx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAmB,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1B,6FAA6F;IAC7F,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,MAAM;IAWf,QAAQ,CAAC,MAAM,EAAE,SAAS;IAC1B,+GAA+G;IAC/G,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAb1B,QAAQ,CAAC,QAAQ,aAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyC;IAC/D,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAA6B;IAC7C,8GAA8G;IAC9G,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;gBAG7B,MAAM,EAAE,SAAS;IAC1B,+GAA+G;IAC9F,MAAM,EAAE,SAAS,EACjB,OAAO,GAAE,aAAkB;IAQ9C,kEAAkE;IAClE,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM;IASrE,6EAA6E;IAC7E,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,SAAoB,GAAG,CAAC;IAM9D,4FAA4F;IAC5F,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAO5B,oEAAoE;IACpE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,IAAI;IAO7C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIlC,2CAA2C;IAC3C,IAAI,OAAO,IAAI,SAAS,MAAM,EAAE,CAE/B;IAED,2FAA2F;IAC3F,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAIxH,sGAAsG;IACtG,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,IAAI;IAOvC,2GAA2G;IAC3G,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,IAAI;IAwBjE,0HAA0H;IAC1H,IAAI,KAAK,IAAI,iBAAiB,CAE7B;IAED,iEAAiE;IACjE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxB,OAAO,IAAI,IAAI;IAWf,wGAAwG;IACxG,OAAO,CAAC,OAAO;IAiBf,OAAO,KAAK,OAAO,GAElB;IAED,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,KAAK;CAMd"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
export interface ShockwaveOptions {
|
|
3
|
+
/** Ring's width as a share of the screen's height (default 0.06). */
|
|
4
|
+
width?: number;
|
|
5
|
+
/** How far the ring pushes the picture, screen pixels (default 12). */
|
|
6
|
+
amplitude?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A ring that bends the picture as it passes: an explosion's blast, a landing's thump. Set `centerX/Y` (0–1 across the
|
|
10
|
+
* filtered area) and grow `radius` (a share of its height) over time; `PostFx.shockwave` does both and removes it.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ShockwaveFilter extends FxFilter {
|
|
13
|
+
constructor(options?: ShockwaveOptions);
|
|
14
|
+
setCenter(x: number, y: number): void;
|
|
15
|
+
get radius(): number;
|
|
16
|
+
set radius(v: number);
|
|
17
|
+
get amplitude(): number;
|
|
18
|
+
set amplitude(v: number);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ShockwaveFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShockwaveFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/ShockwaveFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,QAAQ;gBAC/B,OAAO,GAAE,gBAAqB;IA4B1C,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAGrC,IAAI,MAAM,IAAI,MAAM,CAEnB;IACD,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM,EAEnB;IACD,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,IAAI,SAAS,CAAC,CAAC,EAAE,MAAM,EAEtB;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FxFilter } from './fxShader.js';
|
|
2
|
+
export interface VignetteOptions {
|
|
3
|
+
/** 0–1, how dark the corners go (default 0.5). */
|
|
4
|
+
strength?: number;
|
|
5
|
+
/** Where the darkening starts, as a share of the way from the centre to a corner (default 0.55). */
|
|
6
|
+
radius?: number;
|
|
7
|
+
/** How far beyond `radius` it reaches full strength (default 0.45). */
|
|
8
|
+
softness?: number;
|
|
9
|
+
/** What the edges fade to (default black); a red one is a classic low-health warning. */
|
|
10
|
+
color?: number;
|
|
11
|
+
}
|
|
12
|
+
/** Darkens the edges of the screen towards a colour, round whatever its shape. */
|
|
13
|
+
export declare class VignetteFilter extends FxFilter {
|
|
14
|
+
constructor(options?: VignetteOptions);
|
|
15
|
+
get strength(): number;
|
|
16
|
+
set strength(v: number);
|
|
17
|
+
set color(c: number);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=VignetteFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VignetteFilter.d.ts","sourceRoot":"","sources":["../../../src/postfx/VignetteFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAO,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oGAAoG;IACpG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,kFAAkF;AAClF,qBAAa,cAAe,SAAQ,QAAQ;gBAC9B,OAAO,GAAE,eAAoB;IAsBzC,IAAI,QAAQ,IAAI,MAAM,CAErB;IACD,IAAI,QAAQ,CAAC,CAAC,EAAE,MAAM,EAErB;IAED,IAAI,KAAK,CAAC,CAAC,EAAE,MAAM,EAElB;CACF"}
|