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
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package are written here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
4
|
+
and versions follow [Semantic Versioning](https://semver.org/); before 1.0 a minor version may break the API.
|
|
5
|
+
|
|
6
|
+
## Unreleased
|
|
7
|
+
|
|
8
|
+
## 0.5.9
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Platform helpers**: `enterFullscreen`/`exitFullscreen`/`toggleFullscreen`/`isFullscreen`/`fullscreenSupported`/
|
|
13
|
+
`onFullscreenChange` (with webkit fallbacks), `lockOrientation`/`unlockOrientation`/`currentOrientationKind`,
|
|
14
|
+
`prefersReducedMotion`/`onReducedMotionChange`/`followReducedMotion`, `requestPointerLock`/`exitPointerLock`/
|
|
15
|
+
`isPointerLocked`/`onPointerLockChange`, `onAppResume` and `timeoutSignal` (an `AbortSignal.timeout` stand-in for
|
|
16
|
+
older iOS); each does nothing safely where unsupported.
|
|
17
|
+
- `Engine.create({ pauseWhenHidden, followReducedMotion })` (both off by default): pause while the page is hidden with
|
|
18
|
+
no catch-up steps on return, and copy the system's reduced-motion setting into `engineSettings.reducedFx`.
|
|
19
|
+
`HiddenPause` holds the rule on its own.
|
|
20
|
+
- **Gamepad rumble**: `rumble`, `rumblePad`, `stopRumble`, `rumbleParams` and `Actions.rumble`. `Pointer` gains
|
|
21
|
+
`lock`, `unlock`, `locked` and `takeMovement` for mouse-look.
|
|
22
|
+
- **`AssetLoader`** loads `atlas` (TexturePacker/Pixi JSON, hash or array, multipack, trimmed and rotated frames;
|
|
23
|
+
`getAtlas`), `font` (a `FontFace` into `document.fonts`) and `audio` (`getAudio`/`decodeAudio`, decoded through the
|
|
24
|
+
sound context or kept until one exists). `parseAtlas`, `collectAtlasPages`, `duplicateFrames`,
|
|
25
|
+
`TextureRegistry.addAtlas`, `CanvasTexture.addPacked`, `SoundEngine.audioContext`.
|
|
26
|
+
- **`RichText`** (`1681-engine/ui`): inline markup for colour, bold, italic, size and icons, wrapped and aligned, on
|
|
27
|
+
canvas or bitmap fonts; the pure `parseRichText`, `escapeRichText`, `stripRichText` and `layoutRichText`.
|
|
28
|
+
- **Hit flashes and dash ghosts without a filter pass**: `solidSilhouette`, `fillSolid`, `clearSilhouettes` and pooled
|
|
29
|
+
`Afterimages`.
|
|
30
|
+
- **Pixel-art zoom maths**: `worldZoom`, `baseZoom`, `zoomSteps`, `zoomResolution`, `fitScale` (whole steps and an
|
|
31
|
+
optional half step with the resolution that keeps a world pixel whole).
|
|
32
|
+
- `blendLayer`: one container per stage for additive sprites, so they do not split batches.
|
|
33
|
+
- In `1681-engine/pixel`: `spark`, `tail`, `pixelOn`; `PixelMarks` and `aimPixels` (chevron aim lines and lock rings
|
|
34
|
+
in world pixels).
|
|
35
|
+
- `Connection`: `fatalCloseCodes` (close codes that never reconnect) and `resumeProbeMs` (a socket that does not answer
|
|
36
|
+
a ping after the app returns from the background is dropped with `CLOSE_NO_ANSWER` and reconnected);
|
|
37
|
+
`reconnectDelay` and `shouldReconnect`.
|
|
38
|
+
- Guide pages: assets, platform, ECS, rig, tilemaps, audio, rich text, netcode.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- Movement numbers no longer need a fork: `MovementParams` takes `dashFlag` and `stepDt` (defaults `INPUT_FLAG_DASH`,
|
|
43
|
+
1/60 s); the tile size and body half extents were already the grid's. `TILE_SIZE`, `BODY_HALF_*` and
|
|
44
|
+
`INPUT_FLAG_DASH` are kept as the defaults.
|
|
45
|
+
- `Darkness` takes `{ carriedLight }` (default `CARRIED_LIGHT`, 80) and `update()`'s radius defaults to it; the pixel
|
|
46
|
+
module no longer imports `net/`.
|
|
47
|
+
- `Clock` runs timers without allocating a frame; a timer that throws is reported to `Clock.onError` and dropped.
|
|
48
|
+
- `DrawCallCounter` counts `drawRangeElements` and leaves a later wrapper in place when it uninstalls.
|
|
49
|
+
- A socket replaced by a newer one no longer emits a stale `close`.
|
|
50
|
+
- The package ships no source maps (`ENGINE_SOURCEMAP=1` builds them; they pointed at an unpublished `src/`) and no
|
|
51
|
+
longer declares `engines.node`; `Room`, `RoomHost` and `LobbyHost` on a server need Node 22 or later. The tarball went
|
|
52
|
+
from 931 kB to about 420 kB.
|
|
53
|
+
- Typechecks against pixi.js 8.6, the peer floor, tested in CI along with the examples build. Workflows use v5 actions;
|
|
54
|
+
publishing pins npm 11 and uses no cache.
|
|
55
|
+
|
|
56
|
+
### Tests
|
|
57
|
+
|
|
58
|
+
- Golden bytes for the snapshot codec, cadence, `LobbyRooms`, `Connection`, the platform helpers, sparse sets, field
|
|
59
|
+
columns, sticks, long press, eases, synth, view culling, touch detection, the spatial hash and transient lights.
|
|
60
|
+
|
|
61
|
+
## 0.5.8
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- **Bodies that turn**: `PhysicsWorld` bodies made with `rotates: true` have an `angle`, an `angularVelocity`, a moment
|
|
66
|
+
of inertia from their shape and are turned by contacts (each with one or two contact points: `ContactInfo.points`),
|
|
67
|
+
`applyImpulse`/`applyForce` at a point, `applyTorque`, `applyAngularImpulse`; `angularDamping`, `setAngle`,
|
|
68
|
+
`velocityAt`, `toWorld`/`toLocal`. Convex **polygons** (`polygonShape`, `polygonCentroid`, `regularPolygon`, up to 16
|
|
69
|
+
corners) and boxes at an angle collide by the separating axis test with clipped edges; turning bodies never push out
|
|
70
|
+
of a merged tile box's internal face, so seams stay snag-free. Kinematic spinners, rolling balls, raycasts against
|
|
71
|
+
turned shapes, sleep that counts spin. `syncToBody` turns a view with its body. Bodies that do not rotate behave
|
|
72
|
+
exactly as before.
|
|
73
|
+
- **`1681-engine/postfx`**: `PostFx` lays a chain of full-screen filters over the whole picture or the world layer,
|
|
74
|
+
switched one by one, with `flash`, `shockwave` and `animate` for effects that come and go (skipped under reduced
|
|
75
|
+
effects); `BloomFilter`, `VignetteFilter`, `ColorAdjustFilter`, `ChromaticAberrationFilter`, `CrtFilter`,
|
|
76
|
+
`PixelateFilter`, `ShockwaveFilter`; `FxFilter` builds an effect from one spec in GLSL and WGSL with shared helpers.
|
|
77
|
+
- **Lobby and matchmaking**: `LobbyHost` (transport-free like `RoomHost`): rooms with a host, a share code, private
|
|
78
|
+
rooms, ready flags, kick and promote, chat, the game's settings, a room starting its own game; a queue per mode
|
|
79
|
+
filled by `Matchmaker` (pure: rating windows widening with the wait, both sides' windows respected, parties never
|
|
80
|
+
split, teams balanced by `balanceTeams`); ready checks with a deadline, decline lockouts and requeueing at the old
|
|
81
|
+
place; `onStart` hands each player where to go, `finish` opens the rooms again; message rate limits. `LobbyClient`
|
|
82
|
+
keeps the state for a lobby screen over a `Connection`.
|
|
83
|
+
- React kit: `UiProvider classNames` hangs a game's own class names beside the kit's (`{ tabs: 'tabs', button: 'btn',
|
|
84
|
+
picked: 'active' }`), states included, so a game whose stylesheet already styles its own names takes the kit without
|
|
85
|
+
rewriting it; `useCx` / `UiSettings.cx` join them, `classJoiner` is the pure rule.
|
|
86
|
+
- `DebugOverlay`'s `colliders` callback also gets a line drawer, and `drawColliders` draws turned shapes as outlines.
|
|
87
|
+
- Examples: `physics-toys` (turning bodies under every post effect) and `lobby` (a React lobby screen, a server with
|
|
88
|
+
bots). Guide pages: post-processing, lobby and matchmaking; the physics page covers turning bodies.
|
|
89
|
+
|
|
90
|
+
## 0.5.7
|
|
91
|
+
|
|
92
|
+
### Added
|
|
93
|
+
|
|
94
|
+
- **Aseprite import**: `parseAseprite` reads Aseprite's sprite-sheet JSON (hash or array frames) into `Animator`
|
|
95
|
+
clips, one per tag, with every tag direction and repeat count, per-frame durations, trimmed frames, slices with their
|
|
96
|
+
9-slice centre and pivot (`sliceAt`, `sliceBorders`), layers, and cel user data as frame markers (`clipMarkers`);
|
|
97
|
+
`loadAseprite` / `addAsepriteTextures` register the sheet's frames as textures.
|
|
98
|
+
- **`AnimStateMachine`** drives an `Animator` from named states: transitions on bool, number and trigger parameters,
|
|
99
|
+
clip-end and exit-time transitions, any-state transitions by priority, events on frame markers (a footstep on
|
|
100
|
+
frame 3), no allocation per update; `AnimStateComponent` and `animStateSystem` run it in the ECS.
|
|
101
|
+
- **`Timeline`**: sequenced and overlapping tweens and calls with positions (`'<'`, `'+=200'`, labels), `parallel`
|
|
102
|
+
groups, nesting, repeat/yoyo/repeatDelay, timeScale, pause/seek/reverse/restart, `finished`; made with
|
|
103
|
+
`stage.tweens.timeline()` or stepped by hand. `Tweener` gains `run(steppable)` and `timeline()`.
|
|
104
|
+
- **`Parallax` / `ParallaxLayer`**: scenery that scrolls at a share of the camera's travel on x and y, tiled textures
|
|
105
|
+
repeating forever (covering only the view), offset and drift, whole-pixel snapping on pixel-perfect engines,
|
|
106
|
+
culling and depth; works with the camera's zoom.
|
|
107
|
+
- Examples: `aseprite` (a generated sheet, the state machine and its events); the platformer's hills are a
|
|
108
|
+
`Parallax` and reaching the goal plays a `Timeline`.
|
|
109
|
+
- Documentation: a guide page for every module (input, animation, physics, navigation, particles, game feel, ambient,
|
|
110
|
+
tweens and parallax, transitions, UI, React kit, localisation, saves, diagnostics and debug); the API reference
|
|
111
|
+
covers `1681-engine/ui` and `1681-engine/react`.
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
|
|
115
|
+
- The docs build no longer fails on `{{` quoted in inline code of the API reference.
|
|
116
|
+
|
|
117
|
+
## 0.5.6
|
|
118
|
+
|
|
119
|
+
### Added
|
|
120
|
+
|
|
121
|
+
- **React kit** (`1681-engine/react`, React 19 as an optional peer dependency): `Panel` (a window fitted into the
|
|
122
|
+
screen by `fitToViewport`, its body scrolling; a full-screen sheet on touch), `TabStrip` (wraps with `wrap`),
|
|
123
|
+
`SplitPane` with `usePicked` and `useFillSheet` (list beside detail, one pane at a time on a narrow touch screen),
|
|
124
|
+
`Select` (a drop-down whose list opens in a portal as wide as its longest label, placed by `listWidth` and
|
|
125
|
+
`placeTooltip`), `Tooltip` and `TitleTips` (every `title=` drawn as the kit's tooltip, flipped at the edges, desktop
|
|
126
|
+
only), `Modal`, `ConfirmDialog` / `askConfirm` / `askQuantity`, `ChoiceDialog` / `askChoice`, `Slider`, `PixelImage`
|
|
127
|
+
(sprites at whole multiples), `Glyph` (pixel marks a pixel font lacks, `registerGlyph`), `UiProvider` (touch mode,
|
|
128
|
+
window scale, viewport, portal, labels) and `useStore` over `createStore`. Themed by CSS custom properties
|
|
129
|
+
(`--e1681-*`, frames as 9-slice `border-image`s) in `baseCss` / `injectBaseCss()`; every word is a prop or a label
|
|
130
|
+
with an English default. Pure placement helpers (`windowStyle`, `cursorTip`, `listPlacement`, `pixelFit`,
|
|
131
|
+
`splitModeFor`) are exported and tested under node.
|
|
132
|
+
- `Scene.delay(ms, fn)`: timers owned by the scene, cancelled when it exits (`stage.time.delayedCall` timers belong to
|
|
133
|
+
the stage and fire after the scene has gone). `Scene.useInput(actions)` registers input to flush when a scene pushed
|
|
134
|
+
over this one pops.
|
|
135
|
+
- `Actions.flush()` drops pending press and release edges; held keys stay held but are not pressed again.
|
|
136
|
+
- Key chords in bindings: `Shift+Tab`, `Ctrl+KeyS` (`Shift`, `Ctrl`, `Alt`, `Meta`, either side). A held chord keeps
|
|
137
|
+
the bare key's action off until that key comes up. `parseChord`, `chordHeld`; `keyLabel` reads a chord.
|
|
138
|
+
- `Keymap` takes `fixed` inputs per action (gamepad, touch, a reserved key such as Escape for pause), laid after the
|
|
139
|
+
player's keys by `applyTo` and never saved; `fixedFor(action)`.
|
|
140
|
+
- `Camera.clearBounds()`, `Camera.reset()` (no target, no bounds, `defaultZoom`, scroll 0, no shake or flash),
|
|
141
|
+
`Camera.defaultZoom` (set from the engine's `zoom`), `tracking` and `boundsRect`.
|
|
142
|
+
- `PhysicsWorld.bodies` (read-only), and `drawColliders(world, draw, colors?, colorOf?)` for `DebugOverlay`'s
|
|
143
|
+
`colliders` callback.
|
|
144
|
+
- `parent` options: `FloatingText` (labels under a scene's `root`) and `UiRoot` (under a scene's `hud`, destroyed
|
|
145
|
+
with it). `ColorGrade` takes `parent` and `placement: 'bottom'`, which keeps it under every HUD whatever the order
|
|
146
|
+
they were made in.
|
|
147
|
+
- `ColourSkin.fillAlpha` and `borderAlpha`: a bare ring is `fillAlpha: 0`.
|
|
148
|
+
- `Dialog` without a `height` takes its content's, padding included, measured again on every layout.
|
|
149
|
+
- `installLabelFont`, `BitmapLabel`, `Label.bitmap`, `ObjectFactory.label` and `FloatingText` take `glyphs` a font
|
|
150
|
+
bakes besides ASCII.
|
|
151
|
+
|
|
152
|
+
### Changed
|
|
153
|
+
|
|
154
|
+
- `SceneManager.replace` resets the shared camera between the old scenes leaving and the new one entering, so a
|
|
155
|
+
level's follow target and bounds no longer hold over the next scene. `push` and `pop` leave it alone; `pop` flushes
|
|
156
|
+
the resumed scene's registered input before `onResume`.
|
|
157
|
+
- `Keymap.applyTo` accepts an `Actions` with more actions than the keymap's and binds only the keymap's.
|
|
158
|
+
- A `ColourSkin` border is drawn as four strips round its fill rather than a box under it, so a see-through fill no
|
|
159
|
+
longer shows the border colour through it (opaque skins look the same).
|
|
160
|
+
- `Button` centres its content again when the content (a `Label` given new text) changes size; widgets tell their
|
|
161
|
+
parent through `Widget.childResized`.
|
|
162
|
+
- Documented: `Scene`'s `world`/`root`/`hud` and Pixi's `Container.label` are taken names for subclass fields; a
|
|
163
|
+
`Keyboard` knows only keys pressed after it was made; bitmap label fonts bake ASCII unless given more; the save
|
|
164
|
+
envelope keeps its `'lantern-save'` tag so existing saves still load.
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- `DebugOverlay` prevents its toggle key's browser action (F3 opened find-in-page).
|
|
169
|
+
- `Slider` draws its focus face under the knob, not over it.
|
|
170
|
+
|
|
171
|
+
## 0.5.5
|
|
172
|
+
|
|
173
|
+
### Changed
|
|
174
|
+
|
|
175
|
+
- **Renamed to 1681 Engine**: the package is `1681-engine` (`1681-engine/pixel`, `1681-engine/ui`) and the repository
|
|
176
|
+
`Phadec/1681-engine`. The pixel module keeps its name, Dither.
|
|
177
|
+
- `World.entities()` and `World.componentsOf(e)` list live entities and what they hold, for tools.
|
|
178
|
+
|
|
179
|
+
### Added
|
|
180
|
+
|
|
181
|
+
- **UI** (`1681-engine/ui`): canvas widgets on the stage's screen layer (`UiRoot`, `Panel` 9-slice or colour box,
|
|
182
|
+
`Button`, `Label`, `Bar` with a delayed drain, `Slider`, `Toggle`, `Stack`, `ScrollView`, `List`, modal `Dialog`),
|
|
183
|
+
keyboard and gamepad focus through `Actions`, screen anchoring that follows resizes, whole-pixel layout, presses on
|
|
184
|
+
widgets kept from the world (`UiPointerGate`); a DOM/React bridge (`DomOverlay`, `DomWorldAnchors`, `createStore`,
|
|
185
|
+
`InputShield`); pure layout maths shared by both (`stackLayout`, `anchorPosition`, `fitToViewport`,
|
|
186
|
+
`placeTooltip`, `wrapRow`, `listWidth`, scrolling, focus navigation).
|
|
187
|
+
- **Physics**: `PhysicsWorld`, rigid circles and axis-aligned boxes (dynamic, static, kinematic) with restitution,
|
|
188
|
+
friction, damping, gravity scale, sensors and layers; a grid broad phase, warm-started impulses, sub-steps against
|
|
189
|
+
tunnelling, optional sleeping; contact events, `grounded`, `raycast`, a `preSolve` hook; `tileBodies` merges a tile
|
|
190
|
+
grid into static boxes; `syncToBody` draws a view between steps. Not deterministic across machines.
|
|
191
|
+
- **Particles**: `Emitter` (bursts and rates, spread, gravity, drag, size/alpha/tint over life, normal or additive) on
|
|
192
|
+
one pooled `ParticleContainer`, a shared `ParticleBudget` that thins under `reducedFx`/`batterySaver`, culled off
|
|
193
|
+
screen; pure `ParticleSim` and curves.
|
|
194
|
+
- **Navigation**: A* `findPath` on any tile grid or `CollisionGrid` (reach radius, extra cost, end-only tiles, no
|
|
195
|
+
corner cutting), `straightenPath`, `simplifyPath`, `floodFill`, `nearestOpen`, `MinHeap`.
|
|
196
|
+
- **Saves**: `SaveStore` (versioned slots over a pluggable `SaveBackend`, a migration chain, a checksum, the last good
|
|
197
|
+
copy kept), `Autosaver`.
|
|
198
|
+
- **Scene transitions**: `transitionTo(engine, next, transition, mode)` with `FadeTransition`,
|
|
199
|
+
`CrossfadeTransition`, `DitherWipeTransition`; `Letterbox`.
|
|
200
|
+
- **Localisation**: `Translator` (English source as key, `|context`, plurals, missing-key callback, runtime switching),
|
|
201
|
+
`extractStrings`.
|
|
202
|
+
- **Ambient**: `DayClock`, deterministic `weatherAt`, `WeatherLayer`, `ColorGrade`; pixel `NightShade`,
|
|
203
|
+
`paintWeatherArt`, `SwayProp` (sprites swaying by whole pixels), `DitherVignette`, `nineSlice`/`frameSvg` UI frames.
|
|
204
|
+
- **Input**: `Keymap` (rebinding, reserved keys, saved sets), `AimGesture` (drag-to-aim), `TargetLock`.
|
|
205
|
+
- **Diagnostics and debug**: `watchContextLoss`, `guardRender`, `bootWatch`, `maxTextureSize`, `FrameSampler`,
|
|
206
|
+
`captureErrors`; `DebugOverlay` (FPS graph, draw calls, entities, collision boxes, the last errors).
|
|
207
|
+
- **`FloatingText`**: pooled bitmap labels for damage numbers and pickups, fonts baked ahead.
|
|
208
|
+
|
|
209
|
+
## 0.5.3
|
|
210
|
+
|
|
211
|
+
### Added
|
|
212
|
+
|
|
213
|
+
- Music in layers: `music.channel(name)` plays one looping track per channel (a score and an ambience under it),
|
|
214
|
+
each crossfaded on its own at its own level; `music.play` is the `'music'` channel. `music.configure({ route,
|
|
215
|
+
pauseInBackground })`: the `<audio>` element's own volume by default, a Web Audio gain only where that volume is
|
|
216
|
+
read-only (iOS) or when asked, and the music stopped while the page is hidden. `MusicChannel`, `elementVolumeLocked`.
|
|
217
|
+
- `paintLayer(stage, { at, duration, paint, depth, alive, every, fps, onCreate })` in `1681-engine/pixel`: one
|
|
218
|
+
effect as its own pixel layer redrawn at 12 fps, following its anchor, dithered away at the end and skipped off
|
|
219
|
+
screen.
|
|
220
|
+
- `Footsteps`: steps and hooves by the surface under the feet, the surface named by the game (`setSurfaceAt`).
|
|
221
|
+
- `detectTouch` and `TouchEnv` are exported; `setTouchOverrideKey` names the `localStorage` key that forces touch.
|
|
222
|
+
|
|
223
|
+
### Changed
|
|
224
|
+
|
|
225
|
+
- `MusicOptions` is now the player's configuration; a track's options are `MusicPlayOptions`.
|
|
226
|
+
- Music plays on the element's own volume where it works, instead of always through Web Audio: a file from another
|
|
227
|
+
origin no longer plays silent there.
|
|
228
|
+
|
|
229
|
+
## 0.5.2
|
|
230
|
+
|
|
231
|
+
### Added
|
|
232
|
+
|
|
233
|
+
- `registerMaterial(name, { light, factors })`: a game adds its own materials to the hue-shifted ramps, or changes a
|
|
234
|
+
built-in one. `Material` is the built-in set (`BuiltinMaterial`) or any registered name; `MATERIALS` and
|
|
235
|
+
`RAMP_FACTOR_SET` (now exported) include what is registered.
|
|
236
|
+
- `registerHandRamps(…)`: ramps picked by hand for a game's own effect colours.
|
|
237
|
+
- `1681-engine/pixel/tone` and `1681-engine/pixel/paint`: the pixel shapes and the colour/dither helpers as
|
|
238
|
+
named exports (`pixelPaint` and `pixelTone` remain namespaces of `1681-engine/pixel`).
|
|
239
|
+
- `selectiveOutline(g, width, dark)` and `groundShadow(g, cx, cy, rx, ry, core, rim)` take their colours.
|
|
240
|
+
- A test that fails on a game's names or language anywhere in the engine, and "The engine knows no game" in the
|
|
241
|
+
architecture guide.
|
|
242
|
+
|
|
243
|
+
### Changed
|
|
244
|
+
|
|
245
|
+
- `pixelTone.ramp` has no hand-picked ramps built in any more (they were one game's effect colours): every colour is
|
|
246
|
+
`derivedRamp` until a game registers its own.
|
|
247
|
+
|
|
248
|
+
## 0.5.1
|
|
249
|
+
|
|
250
|
+
### Changed
|
|
251
|
+
|
|
252
|
+
- The library ships one file per source module (`dist/core/Stage.js`, `dist/pixel/pixel.js`…) behind the same two
|
|
253
|
+
entry points, and declares no side effects, so a game's bundler keeps only what it imports: a web worker that wants
|
|
254
|
+
the colour helpers no longer takes Pixi, the audio engine and every other module with it.
|
|
255
|
+
|
|
256
|
+
## 0.5.0
|
|
257
|
+
|
|
258
|
+
### Fixed
|
|
259
|
+
|
|
260
|
+
- The bundled audio worker (`takeCleanerWorker`) is found again by a game's own bundler: 0.4.0 wrote its URL as an
|
|
261
|
+
absolute `/assets/…`, so Vite failed to build any game importing the engine (`Could not resolve entry module`). The
|
|
262
|
+
library is now built with a relative base and the worker sits beside the module that loads it.
|
|
263
|
+
|
|
264
|
+
## 0.4.0
|
|
265
|
+
|
|
266
|
+
### Changed
|
|
267
|
+
|
|
268
|
+
- Node 22 or later (Node 20 reached its end of life; Pixi reads `navigator`, which Node 20 lacks, as it loads).
|
|
269
|
+
|
|
270
|
+
### Added
|
|
271
|
+
|
|
272
|
+
- A documentation site (VitePress): home, guide, an API reference generated from the source by TypeDoc, the changelog,
|
|
273
|
+
and the examples running live; `npm run docs:dev` / `docs:build`, published by a GitHub Pages workflow.
|
|
274
|
+
- Examples `pixel-dungeon` (dithered torchlight, a carried light, evaporating slimes) and `ecs-stress` (tens of
|
|
275
|
+
thousands of bodies with the frame rate and step time).
|
|
276
|
+
- Types the public API refers to are exported too: `ComponentValues`, `ArrayOf`, `SettingsListener`, `Tween`,
|
|
277
|
+
`TweenConfig`, `TweenTarget`, `EaseFn`, `Vec2`, `AtlasPlan`, `AtlasPage`, `CameraLike`, `SoundEngine`,
|
|
278
|
+
`SoundOptions`, `TiledPropertyValue`; `PackedPixels` is exported as a class from the pixel module.
|
|
279
|
+
|
|
280
|
+
## 0.3.0
|
|
281
|
+
|
|
282
|
+
### Added
|
|
283
|
+
|
|
284
|
+
- Characters: `RigView` draws a rig from cut-out images or vector shapes (origin at the feet, mirrored by `facing`,
|
|
285
|
+
joints readable for held items); `PosePlayer` blends key poses with crossfades between clips; `HUMANOID_POSES` (72)
|
|
286
|
+
and `HUMANOID_CLIPS`.
|
|
287
|
+
- `LightLayer`: smooth darkness with soft lights, colour washes and flicker.
|
|
288
|
+
- `music` / `MusicPlayer`: streamed tracks, crossfaded, looping, at the music volume, iOS-safe.
|
|
289
|
+
- Multiplayer: the netcode protocol, `PredictedMover` (prediction and reconciliation), `InterpolationBuffer`, an
|
|
290
|
+
authoritative `Room` with input validation and flood limits, `RoomHost` for any Node WebSocket library, and a
|
|
291
|
+
client `Connection` with batching, clock sync and reconnection. Tested end to end with simulated latency and jitter,
|
|
292
|
+
and through real sockets in the example.
|
|
293
|
+
- Examples `night-garden` (smooth art, rig, lights) and `multiplayer` (`npm run example:server`).
|
|
294
|
+
|
|
295
|
+
## 0.2.0
|
|
296
|
+
|
|
297
|
+
The engine is now **1681 Engine** (`1681-engine`), for 2D games in any art style; the pixel-art tools moved to
|
|
298
|
+
their own module, **Dither** (`1681-engine/pixel`).
|
|
299
|
+
|
|
300
|
+
### Breaking
|
|
301
|
+
|
|
302
|
+
- Pixel-art exports moved to `1681-engine/pixel`: `PixelLayer`, `pixelPaint`, `pixelTone`, the colour and pixel-grid
|
|
303
|
+
helpers, `PALETTE`, the prop kit, `ramp`/`selectiveOutline`, `Darkness` and the transient lights, `Evaporation`,
|
|
304
|
+
`spritePixels`.
|
|
305
|
+
- `stage.add.pixels()` is gone: use `addPixelLayer(stage)` from the pixel module, or `stage.add.existing(obj)` for any
|
|
306
|
+
object made elsewhere.
|
|
307
|
+
- `EngineOptions.pixelArt` (default on) is now `pixelPerfect` (default off). Off, textures are smooth, antialiased and
|
|
308
|
+
drawn at the screen's density; on, they are sharp, at one backing pixel per CSS pixel, and the camera lands on
|
|
309
|
+
whole pixels (`Camera.roundPixels`).
|
|
310
|
+
- `createCollisionGrid`'s fifth argument is an options object (`ground`, `shotOverTiles`, `bodyHalfWidth`,
|
|
311
|
+
`bodyHalfHeight`); `setShotOverTiles` is gone.
|
|
312
|
+
|
|
313
|
+
### Added
|
|
314
|
+
|
|
315
|
+
- `AssetLoader`: images, sprite sheets, JSON, text and Tiled maps with their tileset images, progress, a concurrency
|
|
316
|
+
limit, errors that name the URL.
|
|
317
|
+
- Tiled maps: `parseTiled` (CSV and base64 layers, groups, objects, properties, flips, tile animations; clear refusals
|
|
318
|
+
for what is not supported), `collisionFromTiled` (a layer or a tile property), `TilemapView` (layers drawn in culled
|
|
319
|
+
chunks, each at its own depth among the bodies).
|
|
320
|
+
- `Animator` (fps or per-frame durations, loop or finish, speed) and `animationSystem` with `SpriteComponent` and
|
|
321
|
+
`AnimationComponent`.
|
|
322
|
+
- `Actions`: named input bound to keys, gamepad buttons and sticks (with a dead zone), and virtual touch buttons; per-step
|
|
323
|
+
edges, analog values, rebinding.
|
|
324
|
+
- `Camera.track`: a soft follow that is the same at any frame rate, a deadzone, an offset, the bounds kept.
|
|
325
|
+
- Example `top-down` with a Tiled map, written by `examples/top-down/make-assets.mjs`.
|
|
326
|
+
- `world.each(A, B, fn)`: walks without allocating a row per entity.
|
|
327
|
+
- `defineFields(name, { x: 'f32', … })`: numeric components kept in typed-array columns (`world.columns`).
|
|
328
|
+
- `world.slots(A, B)`: the matching slot indices as a cached `Int32Array`, rebuilt only when membership changes.
|
|
329
|
+
With field components a step over 50,000 bodies takes 0.1 ms, 200 times the first release.
|
|
330
|
+
- `world.count(type)`, `entityIndex(e)`, `npm run bench`.
|
|
331
|
+
|
|
332
|
+
### Changed
|
|
333
|
+
|
|
334
|
+
- `World` stores components in sparse sets instead of maps: a query over 50,000 bodies went from 21 ms to 2 ms a
|
|
335
|
+
step, and spawning and destroying makes a third of the garbage. Entity ids are recycled with a generation, so a
|
|
336
|
+
stale id never matches the entity that reuses its slot. Entities are walked last-added first.
|
|
337
|
+
- Removing a component while a walk is in progress is deferred like destroying an entity, so nothing is skipped.
|
|
338
|
+
|
|
339
|
+
## 0.1.0 (as Dither Engine)
|
|
340
|
+
|
|
341
|
+
First release, split out of a shipped game's client.
|
|
342
|
+
|
|
343
|
+
### Added
|
|
344
|
+
|
|
345
|
+
- `Engine`, `Scene`, `SceneManager` (replace, push, pop, async `onEnter`) and `FixedLoop` (fixed-step simulation with
|
|
346
|
+
interpolation and a cap on catch-up steps).
|
|
347
|
+
- `World` ECS: typed components, queries, `fixed` and `frame` systems, deferred destruction, error isolation.
|
|
348
|
+
- `EventBus` with `once`, `off`, `listenerCount` and listener error isolation.
|
|
349
|
+
- Rendering core: `Stage`, `Camera`, `PixelLayer`, display objects, tweens, timers, bitmap labels, texture atlas.
|
|
350
|
+
- Pixel effects: `pixelPaint`, `pixelTone`, `Evaporation`, hit-stop and recoil curves.
|
|
351
|
+
- Lighting: `Darkness` with dithered lamps and transient lights.
|
|
352
|
+
- Skeleton rig, pose blending, material ramps, selective outline and `HUMANOID_RIG`.
|
|
353
|
+
- Audio: `sound`, synthesized recipes (`registerSounds`), recorded takes (`registerTakes`).
|
|
354
|
+
- Input: `Keyboard`, stick maths, long press, touch detection.
|
|
355
|
+
- Networking: deterministic `stepMover` with a configurable body box, binary snapshot codec, cadence rules, server
|
|
356
|
+
clock.
|
|
357
|
+
- Example: `walk-room`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Phadec
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,165 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 1681 Engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/Phadec/1681-engine/actions/workflows/ci.yml)
|
|
4
|
+
[](https://phadec.github.io/1681-engine/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
A 2D game engine for the web, built on [PixiJS 8](https://pixijs.com) and written in TypeScript, for games in any
|
|
8
|
+
art style: hand-drawn, HD, vector or pixel art. Pixel art gets a module of its own, **Dither**.
|
|
9
|
+
|
|
10
|
+
It grew out of a shipped online action RPG, so its pieces were made for a real game under real load: a fast ECS,
|
|
11
|
+
a fixed-step simulation a server can replay **bit for bit**, Tiled maps, input that works the same on keyboard,
|
|
12
|
+
gamepad and touch, and for pixel art, effects painted on the world's own pixel grid and dithered lighting.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { Engine, Scene, defineComponent, system } from '1681-engine';
|
|
16
|
+
|
|
17
|
+
const Position = defineComponent<{ x: number; y: number }>('Position');
|
|
18
|
+
|
|
19
|
+
class Level extends Scene {
|
|
20
|
+
override onEnter() {
|
|
21
|
+
this.world.spawn([Position, { x: 0, y: 0 }]);
|
|
22
|
+
this.world.addSystem(
|
|
23
|
+
system('drift', 'fixed', ({ world, dt }) => {
|
|
24
|
+
world.each(Position, (_e, p) => (p.x += 30 * dt));
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const engine = await Engine.create({ parent: document.body });
|
|
31
|
+
await engine.scenes.replace(new Level());
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
> **Status: 0.x, early.** The API will change between minor versions until 1.0. See [CHANGELOG.md](CHANGELOG.md).
|
|
35
|
+
|
|
36
|
+
## Entry points
|
|
37
|
+
|
|
38
|
+
| Import | For | Holds |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `1681-engine` | every 2D game | engine, scenes, ECS, rendering core, assets, Tiled maps, animation, input, camera, rig maths, audio, networking |
|
|
41
|
+
| `1681-engine/pixel` | pixel-art games | `PixelLayer`, `pixelPaint` shapes, colour ramps, dithered `Darkness` lighting, `Evaporation`, sprite pixel tools |
|
|
42
|
+
| `1681-engine/ui` | games with menus and a HUD | canvas widgets, focus, the pure layout maths, the DOM/React bridge (`DomOverlay`, `createStore`, `InputShield`) |
|
|
43
|
+
| `1681-engine/postfx` | full-screen effects | `PostFx` (a chain of filters, flashes, shockwaves, animated uniforms), bloom, vignette, colour adjust, chromatic aberration, CRT, pixelate, shockwave, and `FxFilter` to write your own in GLSL and WGSL |
|
|
44
|
+
| `1681-engine/react` | a UI written in React | `Panel`, `TabStrip`, `SplitPane`, `Select`, `Tooltip`/`TitleTips`, `ConfirmDialog`, `ChoiceDialog`, `Slider`, `PixelImage`, `Glyph`, `UiProvider`, `useStore`, themed by CSS custom properties (`baseCss`) |
|
|
45
|
+
|
|
46
|
+
The core never imports the pixel module (a test holds it to that), so a game that does not use it does not ship it.
|
|
47
|
+
React and React DOM (19) are optional peer dependencies needed only by `1681-engine/react`; nothing else imports React.
|
|
48
|
+
Start a pixel-art game with `Engine.create({ pixelPerfect: true })`: sharp textures and a camera that lands on whole
|
|
49
|
+
pixels. Without it, textures are smooth and drawn at the screen's own density.
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
| Area | What you get |
|
|
54
|
+
|---|---|
|
|
55
|
+
| **Engine** | `Engine` (canvas, renderer, frame loop), a stack of `Scene`s (`replace`, `push`, `pop`, async loading), a fixed-step `FixedLoop` with interpolation and spiral-of-death protection, typed `EventBus`. |
|
|
56
|
+
| **ECS** | `World` on sparse sets: typed components, `query`, allocation-free `each`, numeric components in typed-array columns (`defineFields`) walked through a cached `slots()` list — a step over 50,000 bodies in 0.1 ms. Systems in `fixed` and `frame` phases, recycled ids with generations, error isolation. |
|
|
57
|
+
| **Assets** | `AssetLoader`: images, sprite sheets, JSON, text and Tiled maps with their tilesets, with progress and a concurrency limit. |
|
|
58
|
+
| **Tilemaps** | Tiled JSON maps (CSV or base64 layers, groups, objects, properties, flipped tiles), drawn in culled chunks by `TilemapView`, with collision from a layer or a tile property. |
|
|
59
|
+
| **Animation** | `Animator` clips (fps or per-frame durations, looping or finishing) and an animation system for sprites. |
|
|
60
|
+
| **Input** | `Actions`: named actions bound to keys, chords, gamepad buttons and sticks, and on-screen touch buttons, with per-step edges and analog values. `Keymap` rebinding, `AimGesture` and `TargetLock` for touch, stick maths, touch detection. [Guide](docs/guide/input.md) |
|
|
61
|
+
| **Camera** | Zoom, bounds, shake, flash, and `track` with a soft follow that is the same at any frame rate, a deadzone and an offset. |
|
|
62
|
+
| **Rendering** | `Stage` with world and screen layers, display objects, tweens, timers, bitmap labels, a texture atlas that splits pages by the GPU's limit, guards that keep one bad frame from stopping the loop. |
|
|
63
|
+
| **Characters** | A 2D skeleton rig drawn by `RigView` from cut-out images or vector shapes, `PosePlayer` blending key poses with crossfades, and a built-in humanoid with 72 poses and ready clips (idle, walk, run, roll, slash, thrust, cast, throw, emotes). |
|
|
64
|
+
| **Light** | `LightLayer`: smooth darkness with soft radial lights, colour washes and flicker (the pixel module has its own dithered `Darkness`). |
|
|
65
|
+
| **Audio** | Web Audio `sound` engine (synthesized recipes, recorded takes cleaned in a worker, voice limiting, distance muffling, panning) and `music`: streamed tracks crossfaded and looped. iOS unlock handled. |
|
|
66
|
+
| **Multiplayer** | An authoritative `Room` and its socket host for Node, a client `Connection`, `PredictedMover` (prediction and reconciliation over deterministic movement: in tests and in the example the server never has to correct it), `InterpolationBuffer` for everyone else, binary snapshots, clock sync, input validation and flood limits, cadence rules. A `LobbyHost` with rooms (host, codes, ready, chat, settings), a rating `Matchmaker` that keeps parties whole and balances teams, ready checks with decline lockouts, and a `LobbyClient`. [Guide](docs/guide/lobby.md) |
|
|
67
|
+
| **Pixel art** (`/pixel`) | `PixelLayer` (thousands of pixel rects in one pooled texture), `pixelPaint` shapes shaded from hue-shifted ramps and faded by ordered dither, `Darkness` with dithered lamps and transient lights, `Evaporation`, the selective outline. |
|
|
68
|
+
| **UI** (`/ui`) | Canvas widgets with keyboard and gamepad focus, the pure layout maths, and a DOM/React bridge laid over the canvas. [Guide](docs/guide/ui.md) |
|
|
69
|
+
| **React kit** (`/react`) | Windows, tabs, split panes, drop-downs, tooltips and dialogs that never overflow the screen, themed by `--e1681-*` properties. [Guide](docs/guide/react.md) |
|
|
70
|
+
| **Physics** | `PhysicsWorld`: circles, boxes and convex polygons that turn when asked (contact points, torque, rolling), sensors, layers, kinematic platforms and spinners, one-way `preSolve`, raycasts, tiles merged into boxes with snag-free seams. [Guide](docs/guide/physics.md) |
|
|
71
|
+
| **Post-processing** (`/postfx`) | Bloom, vignette, colour grade and flash, chromatic aberration, CRT, pixelate, shockwaves; WebGL and WebGPU. [Guide](docs/guide/post-processing.md) |
|
|
72
|
+
| **Particles** | `Emitter` on one pooled `ParticleContainer`, curves over life, a shared budget that thins under reduced effects. [Guide](docs/guide/particles.md) |
|
|
73
|
+
| **Navigation** | A* `findPath` with reach, costs and end-only tiles, `straightenPath`, `floodFill`, `nearestOpen`. [Guide](docs/guide/navigation.md) |
|
|
74
|
+
| **Saves** | `SaveStore` slots with migrations, checksums and a backup, pluggable backends, `Autosaver`. [Guide](docs/guide/saves.md) |
|
|
75
|
+
| **Transitions** | `transitionTo` with fade, crossfade and dithered wipe, `Letterbox`. [Guide](docs/guide/transitions.md) |
|
|
76
|
+
| **Localisation** | `Translator` with the English source as key, contexts, plurals, live switching; `extractStrings`. [Guide](docs/guide/i18n.md) |
|
|
77
|
+
| **Ambient** | `DayClock`, deterministic `weatherAt` and `WeatherLayer`, `ColorGrade`; in `/pixel`, `NightShade`, `SwayProp`, `DitherVignette`. [Guide](docs/guide/ambient.md) |
|
|
78
|
+
| **Game feel** | Pooled `FloatingText` for damage numbers, hit-stop, recoil and flash curves. [Guide](docs/guide/game-feel.md) |
|
|
79
|
+
| **Diagnostics** | Error capture, WebGL context loss, a boot watch, frame sampling, and a `DebugOverlay` with collision boxes. [Guide](docs/guide/diagnostics-and-debug.md) |
|
|
80
|
+
|
|
81
|
+
### A React UI
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
import { createRoot } from 'react-dom/client';
|
|
85
|
+
import { ConfirmDialog, Panel, TitleTips, UiProvider, askConfirm, injectBaseCss } from '1681-engine/react';
|
|
86
|
+
|
|
87
|
+
injectBaseCss(); // the base stylesheet, first in <head>, so the game's own CSS wins
|
|
88
|
+
// theme it with custom properties: frames are 9-slice border-images the game draws
|
|
89
|
+
document.documentElement.style.cssText += `
|
|
90
|
+
--e1681-font: 'My Pixel Font'; --e1681-accent: #f0c060;
|
|
91
|
+
--e1681-frame: url(/ui/frame.svg); --e1681-frame-slice: 16 20 20 16 fill; --e1681-frame-width: 16px 20px 20px 16px;`;
|
|
92
|
+
|
|
93
|
+
createRoot(document.getElementById('ui')!).render(
|
|
94
|
+
<UiProvider labels={{ cancel: 'Annuler', ok: 'OK' }}>
|
|
95
|
+
<Panel title="Inventory" onClose={close} width={420}>…</Panel>
|
|
96
|
+
<ConfirmDialog />
|
|
97
|
+
<TitleTips />
|
|
98
|
+
</UiProvider>,
|
|
99
|
+
);
|
|
100
|
+
if (await askConfirm('Drop the sword?')) drop();
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Windows and dialogs are fitted into the screen by `fitToViewport` and placed in whole pixels; tooltips and the
|
|
104
|
+
select's list by `placeTooltip` and `listWidth`. On a touch device (`isTouchUi`, or `UiProvider touch`) a `Panel` is a
|
|
105
|
+
full-screen sheet and tooltips are off. Every word the kit prints is a prop or a `labels` entry with an English default.
|
|
106
|
+
|
|
107
|
+
## Install
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
npm install 1681-engine pixi.js
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`pixi.js` (8.6 or later) is a peer dependency. The package is ESM only and ships its TypeScript types. On a server
|
|
114
|
+
(the multiplayer `Room`) it needs Node 22 or later.
|
|
115
|
+
|
|
116
|
+
The engine renders with **WebGL 2** by default. `Engine.create({ preference: 'webgpu' })` opts into WebGPU, which
|
|
117
|
+
is experimental here: it falls back to WebGL where the browser lacks it, but has not been profiled the way the WebGL
|
|
118
|
+
path has.
|
|
119
|
+
|
|
120
|
+
## Documentation
|
|
121
|
+
|
|
122
|
+
**https://phadec.github.io/1681-engine/** — the guide, the API reference and the examples running live.
|
|
123
|
+
|
|
124
|
+
The documentation site (guide, API reference generated from the source, live examples) is built with
|
|
125
|
+
`npm run docs:build` and published to GitHub Pages by `.github/workflows/docs.yml`; `npm run docs:dev` serves it
|
|
126
|
+
locally.
|
|
127
|
+
|
|
128
|
+
- [Getting started](docs/guide/getting-started.md): an engine, a scene, entities and systems, assets, a Tiled map, input,
|
|
129
|
+
the camera, a rigged character, light and music, and multiplayer, step by step.
|
|
130
|
+
- [Architecture](docs/guide/architecture.md): how the frame loop, scenes, ECS and rendering fit together, and the rules that keep it fast.
|
|
131
|
+
- A page per module: [input](docs/guide/input.md), [physics](docs/guide/physics.md), [navigation](docs/guide/navigation.md),
|
|
132
|
+
[particles](docs/guide/particles.md), [game feel](docs/guide/game-feel.md), [ambient](docs/guide/ambient.md),
|
|
133
|
+
[transitions](docs/guide/transitions.md), [post-processing](docs/guide/post-processing.md),
|
|
134
|
+
[lobby and matchmaking](docs/guide/lobby.md), [UI](docs/guide/ui.md), [React kit](docs/guide/react.md),
|
|
135
|
+
[localisation](docs/guide/i18n.md), [saves](docs/guide/saves.md), [diagnostics and debug](docs/guide/diagnostics-and-debug.md).
|
|
136
|
+
- [Examples](examples/), run with `npm run dev`:
|
|
137
|
+
- `top-down`: a Tiled map, asset loading, an animated hero, input actions on keyboard, gamepad and touch, camera follow.
|
|
138
|
+
- `platformer`: physics from a tile grid (crates, a moving platform, one-way planks, sensor coins), particles, a canvas
|
|
139
|
+
HUD and pause dialog, a versioned save, scene transitions, two languages, rebindable keys and a debug overlay.
|
|
140
|
+
- `night-garden`: smooth vector art, a rigged hero animated by blended poses, a lantern and fireflies in the dark.
|
|
141
|
+
- `pixel-dungeon`: the pixel module: dithered torchlight, a carried light, slimes that evaporate into their own pixels.
|
|
142
|
+
- `ecs-stress`: tens of thousands of bodies on typed-array components, with the frame rate and step time.
|
|
143
|
+
- `multiplayer`: `npm run example:server`, then two tabs: prediction, reconciliation and interpolation.
|
|
144
|
+
- `physics-toys`: bodies that turn (crates, balls, polygons, a spinning bar) under bloom, a vignette and the other effects.
|
|
145
|
+
- `lobby`: `npm run example:lobby`, then the page: rooms, codes, ready flags, chat, the queue and a ready check.
|
|
146
|
+
- `walk-room`: the smallest whole game, with pixel effects.
|
|
147
|
+
|
|
148
|
+
## Develop
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
npm install
|
|
152
|
+
npm run dev # examples at http://127.0.0.1:5180/
|
|
153
|
+
npm test # unit tests under node
|
|
154
|
+
npm run typecheck # sources and tests
|
|
155
|
+
npm run bench # ECS benchmark
|
|
156
|
+
npm run build # dist/: both ESM bundles and their .d.ts files
|
|
157
|
+
npm run check # typecheck, test and build, as CI runs it
|
|
158
|
+
npm run docs:dev # the documentation site, with the API reference and examples
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Contributions are welcome: read [CONTRIBUTING.md](CONTRIBUTING.md) first.
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
[MIT](LICENSE)
|