@rb-games/core 0.1.0
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/README.md +488 -0
- package/dist/devtools/DraggableController.d.ts +10 -0
- package/dist/devtools/DraggableController.d.ts.map +1 -0
- package/dist/devtools/ResizableController.d.ts +19 -0
- package/dist/devtools/ResizableController.d.ts.map +1 -0
- package/dist/devtools/index.d.ts +7 -0
- package/dist/devtools/index.d.ts.map +1 -0
- package/dist/devtools/index.js +884 -0
- package/dist/devtools/index.js.map +1 -0
- package/dist/devtools/overlayPlugin.d.ts +3 -0
- package/dist/devtools/overlayPlugin.d.ts.map +1 -0
- package/dist/devtools/spinePropertiesPlugin.d.ts +3 -0
- package/dist/devtools/spinePropertiesPlugin.d.ts.map +1 -0
- package/dist/devtools/spriteTextPropertiesPlugin.d.ts +3 -0
- package/dist/devtools/spriteTextPropertiesPlugin.d.ts.map +1 -0
- package/dist/devtools/treePlugin.d.ts +7 -0
- package/dist/devtools/treePlugin.d.ts.map +1 -0
- package/dist/engine/PixiEngine.d.ts +404 -0
- package/dist/engine/PixiEngine.d.ts.map +1 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +1818 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/filters/ChromaKeyFilter.d.ts +64 -0
- package/dist/filters/ChromaKeyFilter.d.ts.map +1 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +248 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/helpers/AssetHelper.d.ts +117 -0
- package/dist/helpers/AssetHelper.d.ts.map +1 -0
- package/dist/helpers/SVGAssetHelper.d.ts +397 -0
- package/dist/helpers/SVGAssetHelper.d.ts.map +1 -0
- package/dist/helpers/SVGLoader.d.ts +46 -0
- package/dist/helpers/SVGLoader.d.ts.map +1 -0
- package/dist/helpers/SVGParser.d.ts +121 -0
- package/dist/helpers/SVGParser.d.ts.map +1 -0
- package/dist/helpers/eventBridge.d.ts +150 -0
- package/dist/helpers/eventBridge.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +8 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +702 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/mergeUtils.d.ts +21 -0
- package/dist/helpers/mergeUtils.d.ts.map +1 -0
- package/dist/helpers/resolvePublicPath.d.ts +6 -0
- package/dist/helpers/resolvePublicPath.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +527 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/sharedI18n.d.ts +11 -0
- package/dist/i18n/sharedI18n.d.ts.map +1 -0
- package/dist/layout/Align.d.ts +126 -0
- package/dist/layout/Align.d.ts.map +1 -0
- package/dist/layout/Bounds.d.ts +120 -0
- package/dist/layout/Bounds.d.ts.map +1 -0
- package/dist/layout/Distribute.d.ts +103 -0
- package/dist/layout/Distribute.d.ts.map +1 -0
- package/dist/layout/Flow.d.ts +213 -0
- package/dist/layout/Flow.d.ts.map +1 -0
- package/dist/layout/PositionUtils.d.ts +57 -0
- package/dist/layout/PositionUtils.d.ts.map +1 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +673 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/particle/Emitter.d.ts +290 -0
- package/dist/particle/Emitter.d.ts.map +1 -0
- package/dist/particle/EmitterConfig.d.ts +228 -0
- package/dist/particle/EmitterConfig.d.ts.map +1 -0
- package/dist/particle/LinkedListContainer.d.ts +7 -0
- package/dist/particle/LinkedListContainer.d.ts.map +1 -0
- package/dist/particle/Particle.d.ts +63 -0
- package/dist/particle/Particle.d.ts.map +1 -0
- package/dist/particle/ParticleUtils.d.ts +97 -0
- package/dist/particle/ParticleUtils.d.ts.map +1 -0
- package/dist/particle/PropertyList.d.ts +40 -0
- package/dist/particle/PropertyList.d.ts.map +1 -0
- package/dist/particle/PropertyNode.d.ts +74 -0
- package/dist/particle/PropertyNode.d.ts.map +1 -0
- package/dist/particle/SpineEmitter.d.ts +55 -0
- package/dist/particle/SpineEmitter.d.ts.map +1 -0
- package/dist/particle/SpineParticle.d.ts +74 -0
- package/dist/particle/SpineParticle.d.ts.map +1 -0
- package/dist/particle/behaviors/AccelerationMovement.d.ts +62 -0
- package/dist/particle/behaviors/AccelerationMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/Alpha.d.ts +60 -0
- package/dist/particle/behaviors/Alpha.d.ts.map +1 -0
- package/dist/particle/behaviors/AnimatedTexture.d.ts +111 -0
- package/dist/particle/behaviors/AnimatedTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/Behaviors.d.ts +71 -0
- package/dist/particle/behaviors/Behaviors.d.ts.map +1 -0
- package/dist/particle/behaviors/BlendMode.d.ts +31 -0
- package/dist/particle/behaviors/BlendMode.d.ts.map +1 -0
- package/dist/particle/behaviors/BurstSpawn.d.ts +43 -0
- package/dist/particle/behaviors/BurstSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/Color.d.ts +60 -0
- package/dist/particle/behaviors/Color.d.ts.map +1 -0
- package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts +99 -0
- package/dist/particle/behaviors/MultiStateAnimatedTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/OrderedTexture.d.ts +33 -0
- package/dist/particle/behaviors/OrderedTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/PathMovement.d.ts +68 -0
- package/dist/particle/behaviors/PathMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/PointSpawn.d.ts +21 -0
- package/dist/particle/behaviors/PointSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/RandomColor.d.ts +17 -0
- package/dist/particle/behaviors/RandomColor.d.ts.map +1 -0
- package/dist/particle/behaviors/RandomTexture.d.ts +32 -0
- package/dist/particle/behaviors/RandomTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/Rotation.d.ts +114 -0
- package/dist/particle/behaviors/Rotation.d.ts.map +1 -0
- package/dist/particle/behaviors/Scale.d.ts +74 -0
- package/dist/particle/behaviors/Scale.d.ts.map +1 -0
- package/dist/particle/behaviors/ShapeSpawn.d.ts +58 -0
- package/dist/particle/behaviors/ShapeSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/SingleTexture.d.ts +32 -0
- package/dist/particle/behaviors/SingleTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/SpeedMovement.d.ts +76 -0
- package/dist/particle/behaviors/SpeedMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/SpineTexture.d.ts +173 -0
- package/dist/particle/behaviors/SpineTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/ZindexBehavior.d.ts +16 -0
- package/dist/particle/behaviors/ZindexBehavior.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/Types.d.ts +104 -0
- package/dist/particle/behaviors/editor/Types.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/AccelerationMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/Alpha.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/AnimatedTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/BlendMode.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/BurstSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/Color.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/Color.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/OrderedTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/PathMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/PointSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/RandomTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/Rotation.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/Scale.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/Scale.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/ShapeSpawn.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/SingleTexture.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts +2 -0
- package/dist/particle/behaviors/editor/behaviors/SpeedMovement.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/behaviors/index.d.ts +15 -0
- package/dist/particle/behaviors/editor/behaviors/index.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/index.d.ts +5 -0
- package/dist/particle/behaviors/editor/index.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts +2 -0
- package/dist/particle/behaviors/editor/shapes/PolygonalChain.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts +2 -0
- package/dist/particle/behaviors/editor/shapes/Rectangle.d.ts.map +1 -0
- package/dist/particle/behaviors/editor/shapes/Torus.d.ts +2 -0
- package/dist/particle/behaviors/editor/shapes/Torus.d.ts.map +1 -0
- package/dist/particle/behaviors/index.d.ts +25 -0
- package/dist/particle/behaviors/index.d.ts.map +1 -0
- package/dist/particle/behaviors/shapes/PolygonalChain.d.ts +57 -0
- package/dist/particle/behaviors/shapes/PolygonalChain.d.ts.map +1 -0
- package/dist/particle/behaviors/shapes/Rectangle.d.ts +59 -0
- package/dist/particle/behaviors/shapes/Rectangle.d.ts.map +1 -0
- package/dist/particle/behaviors/shapes/SpawnShape.d.ts +32 -0
- package/dist/particle/behaviors/shapes/SpawnShape.d.ts.map +1 -0
- package/dist/particle/behaviors/shapes/Torus.d.ts +71 -0
- package/dist/particle/behaviors/shapes/Torus.d.ts.map +1 -0
- package/dist/particle/behaviors/shapes/index.d.ts +5 -0
- package/dist/particle/behaviors/shapes/index.d.ts.map +1 -0
- package/dist/particle/index.d.ts +11 -0
- package/dist/particle/index.d.ts.map +1 -0
- package/dist/particle/index.js +2845 -0
- package/dist/particle/index.js.map +1 -0
- package/dist/plugins/Plugin.types.d.ts +80 -0
- package/dist/plugins/Plugin.types.d.ts.map +1 -0
- package/dist/plugins/device/DeviceOptimizerPlugin.d.ts +187 -0
- package/dist/plugins/device/DeviceOptimizerPlugin.d.ts.map +1 -0
- package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts +134 -0
- package/dist/plugins/device/DeviceOptimizerPlugin.types.d.ts.map +1 -0
- package/dist/plugins/device/index.d.ts +3 -0
- package/dist/plugins/device/index.d.ts.map +1 -0
- package/dist/plugins/display/DisplayPlugin.d.ts +208 -0
- package/dist/plugins/display/DisplayPlugin.d.ts.map +1 -0
- package/dist/plugins/display/DisplayPlugin.types.d.ts +174 -0
- package/dist/plugins/display/DisplayPlugin.types.d.ts.map +1 -0
- package/dist/plugins/display/displayViewport.d.ts +10 -0
- package/dist/plugins/display/displayViewport.d.ts.map +1 -0
- package/dist/plugins/display/index.d.ts +4 -0
- package/dist/plugins/display/index.d.ts.map +1 -0
- package/dist/plugins/eventbus/EventBusPlugin.d.ts +21 -0
- package/dist/plugins/eventbus/EventBusPlugin.d.ts.map +1 -0
- package/dist/plugins/eventbus/EventBusPlugin.types.d.ts +24 -0
- package/dist/plugins/eventbus/EventBusPlugin.types.d.ts.map +1 -0
- package/dist/plugins/eventbus/index.d.ts +3 -0
- package/dist/plugins/eventbus/index.d.ts.map +1 -0
- package/dist/plugins/gsap/GsapPlugin.d.ts +307 -0
- package/dist/plugins/gsap/GsapPlugin.d.ts.map +1 -0
- package/dist/plugins/gsap/index.d.ts +2 -0
- package/dist/plugins/gsap/index.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +13 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +12806 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/input/InputPlugin.const.d.ts +80 -0
- package/dist/plugins/input/InputPlugin.const.d.ts.map +1 -0
- package/dist/plugins/input/InputPlugin.d.ts +141 -0
- package/dist/plugins/input/InputPlugin.d.ts.map +1 -0
- package/dist/plugins/input/InputPlugin.types.d.ts +41 -0
- package/dist/plugins/input/InputPlugin.types.d.ts.map +1 -0
- package/dist/plugins/input/KeyboardManager.d.ts +139 -0
- package/dist/plugins/input/KeyboardManager.d.ts.map +1 -0
- package/dist/plugins/input/KeyboardManager.types.d.ts +27 -0
- package/dist/plugins/input/KeyboardManager.types.d.ts.map +1 -0
- package/dist/plugins/input/index.d.ts +4 -0
- package/dist/plugins/input/index.d.ts.map +1 -0
- package/dist/plugins/language/I18NextPlugin.d.ts +30 -0
- package/dist/plugins/language/I18NextPlugin.d.ts.map +1 -0
- package/dist/plugins/language/I18NextPlugin.types.d.ts +29 -0
- package/dist/plugins/language/I18NextPlugin.types.d.ts.map +1 -0
- package/dist/plugins/language/index.d.ts +3 -0
- package/dist/plugins/language/index.d.ts.map +1 -0
- package/dist/plugins/resource/ResourcePlugin.d.ts +189 -0
- package/dist/plugins/resource/ResourcePlugin.d.ts.map +1 -0
- package/dist/plugins/resource/ResourcePlugin.types.d.ts +153 -0
- package/dist/plugins/resource/ResourcePlugin.types.d.ts.map +1 -0
- package/dist/plugins/resource/index.d.ts +3 -0
- package/dist/plugins/resource/index.d.ts.map +1 -0
- package/dist/plugins/scene/Scene.d.ts +203 -0
- package/dist/plugins/scene/Scene.d.ts.map +1 -0
- package/dist/plugins/scene/ScenePlugin.d.ts +162 -0
- package/dist/plugins/scene/ScenePlugin.d.ts.map +1 -0
- package/dist/plugins/scene/ScenePlugin.types.d.ts +35 -0
- package/dist/plugins/scene/ScenePlugin.types.d.ts.map +1 -0
- package/dist/plugins/scene/index.d.ts +4 -0
- package/dist/plugins/scene/index.d.ts.map +1 -0
- package/dist/plugins/sentry/SentryPlugin.d.ts +66 -0
- package/dist/plugins/sentry/SentryPlugin.d.ts.map +1 -0
- package/dist/plugins/sentry/SentryPlugin.types.d.ts +8 -0
- package/dist/plugins/sentry/SentryPlugin.types.d.ts.map +1 -0
- package/dist/plugins/sentry/index.d.ts +3 -0
- package/dist/plugins/sentry/index.d.ts.map +1 -0
- package/dist/plugins/service/ServiceAdapter.d.ts +88 -0
- package/dist/plugins/service/ServiceAdapter.d.ts.map +1 -0
- package/dist/plugins/service/ServiceEventHelper.d.ts +6 -0
- package/dist/plugins/service/ServiceEventHelper.d.ts.map +1 -0
- package/dist/plugins/service/ServicePlugin.d.ts +135 -0
- package/dist/plugins/service/ServicePlugin.d.ts.map +1 -0
- package/dist/plugins/service/ServicePlugin.types.d.ts +14 -0
- package/dist/plugins/service/ServicePlugin.types.d.ts.map +1 -0
- package/dist/plugins/service/adapters/DevAuthAdapter.d.ts +56 -0
- package/dist/plugins/service/adapters/DevAuthAdapter.d.ts.map +1 -0
- package/dist/plugins/service/adapters/RGSAdapter.d.ts +82 -0
- package/dist/plugins/service/adapters/RGSAdapter.d.ts.map +1 -0
- package/dist/plugins/service/adapters/index.d.ts +7 -0
- package/dist/plugins/service/adapters/index.d.ts.map +1 -0
- package/dist/plugins/service/adapters/resolvePublicIp.d.ts +10 -0
- package/dist/plugins/service/adapters/resolvePublicIp.d.ts.map +1 -0
- package/dist/plugins/service/index.d.ts +10 -0
- package/dist/plugins/service/index.d.ts.map +1 -0
- package/dist/plugins/service/types/api.types.d.ts +299 -0
- package/dist/plugins/service/types/api.types.d.ts.map +1 -0
- package/dist/plugins/service/types/index.d.ts +6 -0
- package/dist/plugins/service/types/index.d.ts.map +1 -0
- package/dist/plugins/skin/ISkin.d.ts +62 -0
- package/dist/plugins/skin/ISkin.d.ts.map +1 -0
- package/dist/plugins/skin/Skin.d.ts +155 -0
- package/dist/plugins/skin/Skin.d.ts.map +1 -0
- package/dist/plugins/skin/SkinPlugin.d.ts +285 -0
- package/dist/plugins/skin/SkinPlugin.d.ts.map +1 -0
- package/dist/plugins/skin/SkinPlugin.types.d.ts +56 -0
- package/dist/plugins/skin/SkinPlugin.types.d.ts.map +1 -0
- package/dist/plugins/skin/index.d.ts +5 -0
- package/dist/plugins/skin/index.d.ts.map +1 -0
- package/dist/plugins/sound/SoundPlugin.d.ts +319 -0
- package/dist/plugins/sound/SoundPlugin.d.ts.map +1 -0
- package/dist/plugins/sound/SoundPlugin.types.d.ts +102 -0
- package/dist/plugins/sound/SoundPlugin.types.d.ts.map +1 -0
- package/dist/plugins/sound/SoundTestGUI.d.ts +42 -0
- package/dist/plugins/sound/SoundTestGUI.d.ts.map +1 -0
- package/dist/plugins/sound/index.d.ts +4 -0
- package/dist/plugins/sound/index.d.ts.map +1 -0
- package/dist/state-machine/ConfigBuilder.d.ts +239 -0
- package/dist/state-machine/ConfigBuilder.d.ts.map +1 -0
- package/dist/state-machine/StateMachine.d.ts +251 -0
- package/dist/state-machine/StateMachine.d.ts.map +1 -0
- package/dist/state-machine/guards.d.ts +151 -0
- package/dist/state-machine/guards.d.ts.map +1 -0
- package/dist/state-machine/index.d.ts +5 -0
- package/dist/state-machine/index.d.ts.map +1 -0
- package/dist/state-machine/index.js +954 -0
- package/dist/state-machine/index.js.map +1 -0
- package/dist/state-machine/types.d.ts +65 -0
- package/dist/state-machine/types.d.ts.map +1 -0
- package/dist/store/DataStore.d.ts +167 -0
- package/dist/store/DataStore.d.ts.map +1 -0
- package/dist/store/index.d.ts +3 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +197 -0
- package/dist/store/index.js.map +1 -0
- package/dist/ui/behaviors/ButtonBehavior.d.ts +245 -0
- package/dist/ui/behaviors/ButtonBehavior.d.ts.map +1 -0
- package/dist/ui/behaviors/InputBehavior.d.ts +169 -0
- package/dist/ui/behaviors/InputBehavior.d.ts.map +1 -0
- package/dist/ui/behaviors/ScrollbarBehavior.d.ts +371 -0
- package/dist/ui/behaviors/ScrollbarBehavior.d.ts.map +1 -0
- package/dist/ui/behaviors/index.d.ts +4 -0
- package/dist/ui/behaviors/index.d.ts.map +1 -0
- package/dist/ui/components/ButtonComp.d.ts +138 -0
- package/dist/ui/components/ButtonComp.d.ts.map +1 -0
- package/dist/ui/components/Comp.utils.d.ts +390 -0
- package/dist/ui/components/Comp.utils.d.ts.map +1 -0
- package/dist/ui/components/Component.types.d.ts +41 -0
- package/dist/ui/components/Component.types.d.ts.map +1 -0
- package/dist/ui/components/InputComp.d.ts +43 -0
- package/dist/ui/components/InputComp.d.ts.map +1 -0
- package/dist/ui/components/LabelBox.d.ts +49 -0
- package/dist/ui/components/LabelBox.d.ts.map +1 -0
- package/dist/ui/components/ListTableComp.d.ts +106 -0
- package/dist/ui/components/ListTableComp.d.ts.map +1 -0
- package/dist/ui/components/Skinable.d.ts +261 -0
- package/dist/ui/components/Skinable.d.ts.map +1 -0
- package/dist/ui/components/SliderComp.d.ts +60 -0
- package/dist/ui/components/SliderComp.d.ts.map +1 -0
- package/dist/ui/components/SpriteTextBBCode.d.ts +16 -0
- package/dist/ui/components/SpriteTextBBCode.d.ts.map +1 -0
- package/dist/ui/components/StepperComp.d.ts +89 -0
- package/dist/ui/components/StepperComp.d.ts.map +1 -0
- package/dist/ui/components/index.d.ts +12 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteText.d.ts +114 -0
- package/dist/ui/components/spriteText/SpriteText.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteText.types.d.ts +109 -0
- package/dist/ui/components/spriteText/SpriteText.types.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts +25 -0
- package/dist/ui/components/spriteText/SpriteTextAlignment.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextBezier.d.ts +20 -0
- package/dist/ui/components/spriteText/SpriteTextBezier.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextCurve.d.ts +4 -0
- package/dist/ui/components/spriteText/SpriteTextCurve.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextKerning.d.ts +7 -0
- package/dist/ui/components/spriteText/SpriteTextKerning.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextTexture.d.ts +16 -0
- package/dist/ui/components/spriteText/SpriteTextTexture.d.ts.map +1 -0
- package/dist/ui/components/spriteText/SpriteTextWrap.d.ts +19 -0
- package/dist/ui/components/spriteText/SpriteTextWrap.d.ts.map +1 -0
- package/dist/ui/components/spriteText/index.d.ts +3 -0
- package/dist/ui/components/spriteText/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +4778 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/ArrayUtils.d.ts +24 -0
- package/dist/utils/ArrayUtils.d.ts.map +1 -0
- package/dist/utils/ColorUtils.d.ts +34 -0
- package/dist/utils/ColorUtils.d.ts.map +1 -0
- package/dist/utils/DataInjector.d.ts +67 -0
- package/dist/utils/DataInjector.d.ts.map +1 -0
- package/dist/utils/Logger.d.ts +332 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/NumberFormatter.d.ts +126 -0
- package/dist/utils/NumberFormatter.d.ts.map +1 -0
- package/dist/utils/ObjectUtils.d.ts +64 -0
- package/dist/utils/ObjectUtils.d.ts.map +1 -0
- package/dist/utils/PixiUtils.d.ts +118 -0
- package/dist/utils/PixiUtils.d.ts.map +1 -0
- package/dist/utils/Throttle.d.ts +103 -0
- package/dist/utils/Throttle.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +899 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/vite/index.d.ts +3 -0
- package/dist/vite/index.d.ts.map +1 -0
- package/dist/vite/index.js +126 -0
- package/dist/vite/index.js.map +1 -0
- package/dist/vite/mergeLocalesPlugin.d.ts +22 -0
- package/dist/vite/mergeLocalesPlugin.d.ts.map +1 -0
- package/package.json +143 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard event constants.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const KEY_EVENTS: {
|
|
7
|
+
/** Fired when a key is pressed down */
|
|
8
|
+
KEY_DOWN: string;
|
|
9
|
+
/** Fired when a key is released */
|
|
10
|
+
KEY_UP: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Mouse event constants (reserved for future implementation).
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare const MOUSE_EVENTS: {
|
|
18
|
+
/** Fired when a mouse button is pressed */
|
|
19
|
+
MOUSE_DOWN: string;
|
|
20
|
+
/** Fired when a mouse button is released */
|
|
21
|
+
MOUSE_UP: string;
|
|
22
|
+
/** Fired while the mouse is moving */
|
|
23
|
+
MOUSE_MOVE: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Touch event constants (reserved for future implementation).
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare const TOUCH_EVENTS: {
|
|
31
|
+
/** Fired when a touch begins */
|
|
32
|
+
TOUCH_START: string;
|
|
33
|
+
/** Fired when a touch ends */
|
|
34
|
+
TOUCH_END: string;
|
|
35
|
+
/** Fired while a touch is moving */
|
|
36
|
+
TOUCH_MOVE: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Combined input event constants.
|
|
40
|
+
*
|
|
41
|
+
* Includes all keyboard, mouse, and touch events.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export declare const INPUT_EVENTS: {
|
|
46
|
+
/** Fired when a touch begins */
|
|
47
|
+
TOUCH_START: string;
|
|
48
|
+
/** Fired when a touch ends */
|
|
49
|
+
TOUCH_END: string;
|
|
50
|
+
/** Fired while a touch is moving */
|
|
51
|
+
TOUCH_MOVE: string;
|
|
52
|
+
/** Fired when a mouse button is pressed */
|
|
53
|
+
MOUSE_DOWN: string;
|
|
54
|
+
/** Fired when a mouse button is released */
|
|
55
|
+
MOUSE_UP: string;
|
|
56
|
+
/** Fired while the mouse is moving */
|
|
57
|
+
MOUSE_MOVE: string;
|
|
58
|
+
/** Fired when a key is pressed down */
|
|
59
|
+
KEY_DOWN: string;
|
|
60
|
+
/** Fired when a key is released */
|
|
61
|
+
KEY_UP: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Keyboard key states.
|
|
65
|
+
*
|
|
66
|
+
* Represents the current state of a keyboard key.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
export declare enum KeyState {
|
|
71
|
+
/** Key is not pressed */
|
|
72
|
+
UP = "up",
|
|
73
|
+
/** Key is currently pressed */
|
|
74
|
+
DOWN = "down",
|
|
75
|
+
/** Key was pressed in the current frame */
|
|
76
|
+
PRESSED = "pressed",
|
|
77
|
+
/** Key was released in the current frame */
|
|
78
|
+
RELEASED = "released"
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=InputPlugin.const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPlugin.const.d.ts","sourceRoot":"","sources":["../../../plugins/input/InputPlugin.const.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU;IACrB,uCAAuC;;IAEvC,mCAAmC;;CAEpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,2CAA2C;;IAE3C,4CAA4C;;IAE5C,sCAAsC;;CAEvC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,gCAAgC;;IAEhC,8BAA8B;;IAE9B,oCAAoC;;CAErC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;IAfvB,gCAAgC;;IAEhC,8BAA8B;;IAE9B,oCAAoC;;IAlBpC,2CAA2C;;IAE3C,4CAA4C;;IAE5C,sCAAsC;;IAhBtC,uCAAuC;;IAEvC,mCAAmC;;CA2CpC,CAAC;AAEF;;;;;;GAMG;AACH,oBAAY,QAAQ;IAClB,yBAAyB;IACzB,EAAE,OAAO;IACT,+BAA+B;IAC/B,IAAI,SAAS;IACb,2CAA2C;IAC3C,OAAO,YAAY;IACnB,4CAA4C;IAC5C,QAAQ,aAAa;CACtB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { EventEmitter } from 'pixi.js';
|
|
2
|
+
import { PixiEngine } from '../../engine/PixiEngine';
|
|
3
|
+
import { KeyboardManager } from './KeyboardManager';
|
|
4
|
+
import { INPUT_EVENTS, KEY_EVENTS, MOUSE_EVENTS, TOUCH_EVENTS } from './InputPlugin.const';
|
|
5
|
+
import type { InputPluginConfig } from './InputPlugin.types';
|
|
6
|
+
import type { EnginePlugin } from '../Plugin.types';
|
|
7
|
+
export { INPUT_EVENTS, KEY_EVENTS, MOUSE_EVENTS, TOUCH_EVENTS };
|
|
8
|
+
/**
|
|
9
|
+
* Input management plugin for PixiJS games.
|
|
10
|
+
*
|
|
11
|
+
* InputPlugin provides a unified interface for handling keyboard, mouse, and touch input.
|
|
12
|
+
* It uses a modular architecture with separate managers for each input type.
|
|
13
|
+
*
|
|
14
|
+
* ## Features
|
|
15
|
+
*
|
|
16
|
+
* - **Keyboard Input**: Full keyboard support with key state tracking
|
|
17
|
+
* - **Event System**: EventEmitter-based for easy event handling
|
|
18
|
+
* - **Frame-Perfect Input**: Distinguishes between held and just-pressed keys
|
|
19
|
+
* - **Browser Default Prevention**: Prevent unwanted browser actions
|
|
20
|
+
* - **Modular Design**: Extensible for mouse, touch, and gamepad support
|
|
21
|
+
*
|
|
22
|
+
* ## Current Implementation
|
|
23
|
+
*
|
|
24
|
+
* Currently supports:
|
|
25
|
+
* - ✅ Keyboard input via KeyboardManager
|
|
26
|
+
*
|
|
27
|
+
* Planned for future:
|
|
28
|
+
* - 🔜 Mouse input
|
|
29
|
+
* - 🔜 Touch input
|
|
30
|
+
* - 🔜 Gamepad input
|
|
31
|
+
*
|
|
32
|
+
* ## Usage Patterns
|
|
33
|
+
*
|
|
34
|
+
* ### Event-Based Input
|
|
35
|
+
* Listen to input events using the EventEmitter API:
|
|
36
|
+
*
|
|
37
|
+
* ```typescript
|
|
38
|
+
* inputPlugin.on(INPUT_EVENTS.KEY_DOWN, (event: KeyEvent) => {
|
|
39
|
+
* console.log('Key pressed:', event.key);
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ### Polling-Based Input
|
|
44
|
+
* Check key states directly in your game loop:
|
|
45
|
+
*
|
|
46
|
+
* ```typescript
|
|
47
|
+
* if (inputPlugin.keyboard.isDown('space')) {
|
|
48
|
+
* player.jump();
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* const inputPlugin = new InputPlugin({
|
|
55
|
+
* preventDefaultKeys: ['space', 'arrowup', 'arrowdown'],
|
|
56
|
+
* debug: true
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* engine.registerPlugin(inputPlugin);
|
|
60
|
+
* await engine.initialize();
|
|
61
|
+
*
|
|
62
|
+
* // Event-based input
|
|
63
|
+
* inputPlugin.on(INPUT_EVENTS.KEY_DOWN, (event) => {
|
|
64
|
+
* if (event.key === 'enter') {
|
|
65
|
+
* console.log('Enter pressed!');
|
|
66
|
+
* }
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* // Polling in game loop
|
|
70
|
+
* function update() {
|
|
71
|
+
* if (inputPlugin.keyboard.isDown('w')) {
|
|
72
|
+
* player.moveUp();
|
|
73
|
+
* }
|
|
74
|
+
* if (inputPlugin.keyboard.isJustPressed('space')) {
|
|
75
|
+
* player.shoot();
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* // Combo detection
|
|
83
|
+
* inputPlugin.on(INPUT_EVENTS.KEY_DOWN, (event) => {
|
|
84
|
+
* if (event.ctrlKey && event.key === 's') {
|
|
85
|
+
* event.original.preventDefault();
|
|
86
|
+
* saveGame();
|
|
87
|
+
* }
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @category Plugins
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export declare class InputPlugin extends EventEmitter implements EnginePlugin {
|
|
95
|
+
name: string;
|
|
96
|
+
priority: number;
|
|
97
|
+
/**
|
|
98
|
+
* No dependencies - this is a core input plugin
|
|
99
|
+
*/
|
|
100
|
+
dependencies: string[];
|
|
101
|
+
keyboard: KeyboardManager;
|
|
102
|
+
private _engine;
|
|
103
|
+
private config;
|
|
104
|
+
private isInitialized;
|
|
105
|
+
private readonly defaultConfig;
|
|
106
|
+
constructor(config?: InputPluginConfig);
|
|
107
|
+
/**
|
|
108
|
+
* Listen to and forward keyboard events
|
|
109
|
+
*/
|
|
110
|
+
private setupKeyboardEvents;
|
|
111
|
+
/**
|
|
112
|
+
* Initialize the plugin
|
|
113
|
+
* @param engine PixiEngine instance
|
|
114
|
+
*/
|
|
115
|
+
initialize(engine: PixiEngine): void;
|
|
116
|
+
/**
|
|
117
|
+
* Plugin is ready immediately after initialization
|
|
118
|
+
*/
|
|
119
|
+
onReady(engine: PixiEngine): void;
|
|
120
|
+
/**
|
|
121
|
+
* Check if plugin is ready for use
|
|
122
|
+
*/
|
|
123
|
+
isReady(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Provides access to the engine instance
|
|
126
|
+
*/
|
|
127
|
+
get engine(): PixiEngine;
|
|
128
|
+
/**
|
|
129
|
+
* Called on every frame update
|
|
130
|
+
* @param _deltaTime Frame duration in ms (currently not used)
|
|
131
|
+
* @returns Should propagation stop? (false = continue)
|
|
132
|
+
*/
|
|
133
|
+
onUpdate(_deltaTime: number): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Called when the plugin is cleaned up
|
|
136
|
+
*/
|
|
137
|
+
cleanup(): void;
|
|
138
|
+
[key: symbol]: any;
|
|
139
|
+
}
|
|
140
|
+
export type { InputPluginConfig } from './InputPlugin.types';
|
|
141
|
+
//# sourceMappingURL=InputPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPlugin.d.ts","sourceRoot":"","sources":["../../../plugins/input/InputPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBAAa,WAAY,SAAQ,YAAa,YAAW,YAAY;IAC5D,IAAI,EAAE,MAAM,CAAiB;IAC7B,QAAQ,EAAE,MAAM,CAAO;IAE9B;;OAEG;IACI,YAAY,EAAE,MAAM,EAAE,CAAM;IAG5B,QAAQ,EAAE,eAAe,CAAC;IAOjC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,aAAa,CAAS;IAG9B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK5B;gBAEU,MAAM,GAAE,iBAAsB;IA2B1C;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;;OAGG;IACI,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAU3C;;OAEG;IACI,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAIxC;;OAEG;IACI,OAAO,IAAI,OAAO;IAIzB;;OAEG;IACH,IAAW,MAAM,IAAI,UAAU,CAE9B;IAED;;;;OAIG;IAEI,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAc5C;;OAEG;IACI,OAAO,IAAI,IAAI;IAYtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PluginConfig } from '../Plugin.types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for InputPlugin.
|
|
4
|
+
*
|
|
5
|
+
* Controls keyboard input handling, key repeat behavior, and browser default prevention.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const config: InputPluginConfig = {
|
|
10
|
+
* repeatRate: 0.2,
|
|
11
|
+
* preventDefaultKeys: ['f11', 'space', 'arrowup', 'arrowdown'],
|
|
12
|
+
* debug: true
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface InputPluginConfig extends PluginConfig {
|
|
19
|
+
/**
|
|
20
|
+
* Repeat rate when a key is held down (in seconds, default: 0.2).
|
|
21
|
+
*
|
|
22
|
+
* Controls how quickly key repeat events fire when a key is held.
|
|
23
|
+
* Lower values = faster repeat rate.
|
|
24
|
+
*/
|
|
25
|
+
repeatRate?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Keys for which the browser's default behavior will be prevented.
|
|
28
|
+
*
|
|
29
|
+
* Useful for preventing unwanted browser actions like:
|
|
30
|
+
* - F11 (fullscreen toggle)
|
|
31
|
+
* - Space (page scroll)
|
|
32
|
+
* - Arrow keys (page scroll)
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* preventDefaultKeys: ['f11', 'space', 'arrowup', 'arrowdown', 'arrowleft', 'arrowright']
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
preventDefaultKeys?: string[];
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=InputPlugin.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/input/InputPlugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { EventEmitter } from 'pixi.js';
|
|
2
|
+
import { InputPluginConfig } from './InputPlugin.types';
|
|
3
|
+
/**
|
|
4
|
+
* Keyboard input manager.
|
|
5
|
+
*
|
|
6
|
+
* KeyboardManager handles keyboard input with frame-perfect state tracking.
|
|
7
|
+
* It distinguishes between keys that are held down and keys that were just
|
|
8
|
+
* pressed or released in the current frame.
|
|
9
|
+
*
|
|
10
|
+
* ## Key State Tracking
|
|
11
|
+
*
|
|
12
|
+
* - **isDown()**: Check if key is currently pressed
|
|
13
|
+
* - **isUp()**: Check if key is not pressed
|
|
14
|
+
* - **isJustPressed()**: Check if key was pressed this frame
|
|
15
|
+
* - **isJustReleased()**: Check if key was released this frame
|
|
16
|
+
*
|
|
17
|
+
* ## Event System
|
|
18
|
+
*
|
|
19
|
+
* Emits events for key presses and releases:
|
|
20
|
+
* - `KEY_DOWN`: When a key is pressed
|
|
21
|
+
* - `KEY_UP`: When a key is released
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const keyboard = new KeyboardManager({
|
|
26
|
+
* preventDefaultKeys: ['space', 'arrowup']
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Event-based
|
|
30
|
+
* keyboard.on(KEY_EVENTS.KEY_DOWN, (event) => {
|
|
31
|
+
* console.log('Key pressed:', event.key);
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* // Polling-based
|
|
35
|
+
* if (keyboard.isDown('w')) {
|
|
36
|
+
* player.moveUp();
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* if (keyboard.isJustPressed('space')) {
|
|
40
|
+
* player.jump();
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare class KeyboardManager extends EventEmitter {
|
|
47
|
+
private keys;
|
|
48
|
+
private justPressed;
|
|
49
|
+
private justReleased;
|
|
50
|
+
private config;
|
|
51
|
+
constructor(config?: InputPluginConfig);
|
|
52
|
+
/**
|
|
53
|
+
* Set up keyboard listeners
|
|
54
|
+
*/
|
|
55
|
+
private setupListeners;
|
|
56
|
+
/**
|
|
57
|
+
* Updates keyboard state.
|
|
58
|
+
*
|
|
59
|
+
* Called at the end of each frame to clear single-frame states
|
|
60
|
+
* (justPressed and justReleased). This ensures these states only
|
|
61
|
+
* last for one frame.
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* This method is called automatically by InputPlugin.onUpdate().
|
|
65
|
+
*/
|
|
66
|
+
update(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Checks if a key is currently pressed.
|
|
69
|
+
*
|
|
70
|
+
* Returns true as long as the key is held down.
|
|
71
|
+
*
|
|
72
|
+
* @param key - Key name to check (case-insensitive)
|
|
73
|
+
* @returns True if the key is pressed, false otherwise
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* if (keyboard.isDown('w')) {
|
|
78
|
+
* player.moveForward();
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
isDown(key: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Checks if a key is not pressed.
|
|
85
|
+
*
|
|
86
|
+
* @param key - Key name to check (case-insensitive)
|
|
87
|
+
* @returns True if the key is not pressed, false if it is pressed
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* if (keyboard.isUp('space')) {
|
|
92
|
+
* // Space is not being pressed
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
isUp(key: string): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Checks if a key was pressed in the current frame.
|
|
99
|
+
*
|
|
100
|
+
* Returns true only on the frame when the key was first pressed.
|
|
101
|
+
* Useful for actions that should trigger once per press.
|
|
102
|
+
*
|
|
103
|
+
* @param key - Key name to check (case-insensitive)
|
|
104
|
+
* @returns True if the key was pressed this frame, false otherwise
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* if (keyboard.isJustPressed('space')) {
|
|
109
|
+
* player.jump(); // Jump only once per press
|
|
110
|
+
* }
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
isJustPressed(key: string): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Checks if a key was released in the current frame.
|
|
116
|
+
*
|
|
117
|
+
* Returns true only on the frame when the key was released.
|
|
118
|
+
* Useful for detecting when a key is let go.
|
|
119
|
+
*
|
|
120
|
+
* @param key - Key name to check (case-insensitive)
|
|
121
|
+
* @returns True if the key was released this frame, false otherwise
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* if (keyboard.isJustReleased('space')) {
|
|
126
|
+
* player.stopCharging(); // Stop charging when space is released
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
isJustReleased(key: string): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Cleans up the keyboard manager.
|
|
133
|
+
*
|
|
134
|
+
* Clears all key states and removes event listeners.
|
|
135
|
+
* Called automatically when the plugin is destroyed.
|
|
136
|
+
*/
|
|
137
|
+
cleanup(): void;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=KeyboardManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardManager.d.ts","sourceRoot":"","sources":["../../../plugins/input/KeyboardManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,OAAO,CAAC,IAAI,CAAoC;IAChD,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,MAAM,CAAoB;gBAEtB,MAAM,GAAE,iBAAsB;IAO1C;;OAEG;IACH,OAAO,CAAC,cAAc;IAyEtB;;;;;;;;;OASG;IACI,MAAM,IAAI,IAAI;IAMrB;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAInC;;;;;;;;;;;;OAYG;IACI,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjC;;;;;;;;;;;;;;;OAeG;IACI,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI1C;;;;;;;;;;;;;;;OAeG;IACI,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI3C;;;;;OAKG;IACI,OAAO,IAAI,IAAI;CAOvB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard event data structure.
|
|
3
|
+
*
|
|
4
|
+
* Contains information about a keyboard event including the key pressed
|
|
5
|
+
* and modifier key states.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export interface KeyEvent {
|
|
10
|
+
/** Key name (normalized to lowercase, e.g., 'a', 'enter', 'escape') */
|
|
11
|
+
key: string;
|
|
12
|
+
/** Physical key code (e.g., 'KeyA', 'Enter', 'Escape') */
|
|
13
|
+
code: string;
|
|
14
|
+
/** True if Alt key is pressed */
|
|
15
|
+
altKey: boolean;
|
|
16
|
+
/** True if Ctrl key is pressed */
|
|
17
|
+
ctrlKey: boolean;
|
|
18
|
+
/** True if Shift key is pressed */
|
|
19
|
+
shiftKey: boolean;
|
|
20
|
+
/** True if Meta key (Windows/Command) is pressed */
|
|
21
|
+
metaKey: boolean;
|
|
22
|
+
/** True when the key is held down continuously (key repeat) */
|
|
23
|
+
repeat: boolean;
|
|
24
|
+
/** Original browser KeyboardEvent */
|
|
25
|
+
original: KeyboardEvent;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=KeyboardManager.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyboardManager.types.d.ts","sourceRoot":"","sources":["../../../plugins/input/KeyboardManager.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,qCAAqC;IACrC,QAAQ,EAAE,aAAa,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PixiEngine } from '../../engine/PixiEngine';
|
|
2
|
+
import type { EnginePlugin } from '../Plugin.types';
|
|
3
|
+
import { I18NextPluginConfig } from './I18NextPlugin.types';
|
|
4
|
+
/**
|
|
5
|
+
* Internationalization (i18n) plugin using i18next.
|
|
6
|
+
*
|
|
7
|
+
* Uses the shared singleton from `@rb-games/core/i18n` so Svelte shell and
|
|
8
|
+
* Pixi engine share the same translations and language state.
|
|
9
|
+
*
|
|
10
|
+
* @category Plugins
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare class I18NextPlugin implements EnginePlugin {
|
|
14
|
+
name: string;
|
|
15
|
+
priority: number;
|
|
16
|
+
dependencies: string[];
|
|
17
|
+
private _engine;
|
|
18
|
+
private config;
|
|
19
|
+
constructor(config?: I18NextPluginConfig);
|
|
20
|
+
initialize(engine: PixiEngine): Promise<void>;
|
|
21
|
+
t(key: string, options?: Record<string, unknown>): string;
|
|
22
|
+
changeLanguage(lng: string): Promise<void>;
|
|
23
|
+
getCurrentLanguage(): string;
|
|
24
|
+
isReady(): boolean;
|
|
25
|
+
get i18n(): import("i18next").i18n;
|
|
26
|
+
cleanup(): void;
|
|
27
|
+
[key: symbol]: any;
|
|
28
|
+
}
|
|
29
|
+
export type { I18NextPluginConfig } from './I18NextPlugin.types';
|
|
30
|
+
//# sourceMappingURL=I18NextPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"I18NextPlugin.d.ts","sourceRoot":"","sources":["../../../plugins/language/I18NextPlugin.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;GAQG;AACH,qBAAa,aAAc,YAAW,YAAY;IACzC,IAAI,EAAE,MAAM,CAAmB;IAC/B,QAAQ,EAAE,MAAM,CAAO;IACvB,YAAY,EAAE,MAAM,EAAE,CAAM;IACnC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,MAAM,CAAsB;gBAExB,MAAM,GAAE,mBAAwB;IAmB/B,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAenD,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;IAInD,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhD,kBAAkB,IAAI,MAAM;IAI5B,OAAO,IAAI,OAAO;IAIzB,IAAW,IAAI,2BAEd;IAEM,OAAO,IAAI,IAAI;IAItB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PluginConfig } from '../Plugin.types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for I18NextPlugin.
|
|
4
|
+
*
|
|
5
|
+
* Currently extends base PluginConfig without additional options.
|
|
6
|
+
* The plugin uses i18next's default configuration with custom formatters.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Runtime loads merged locale files from `public/locales/{language}.json`.
|
|
10
|
+
*
|
|
11
|
+
* Source files are split and merged at build/dev time via `mergeLocalesPlugin`:
|
|
12
|
+
* - `packages/modules/slot-svelte-ui/locales` → shared `ui.*`
|
|
13
|
+
* - `packages/modules/slot/locales` → shared `info.rules.*`
|
|
14
|
+
* - `games/<game>/locales` → game-specific `{game-id}.info.*` and optional `core.*`
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const config: I18NextPluginConfig = {
|
|
19
|
+
* priority: 900,
|
|
20
|
+
* enabled: true,
|
|
21
|
+
* debug: true
|
|
22
|
+
* };
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export interface I18NextPluginConfig extends PluginConfig {
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=I18NextPlugin.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"I18NextPlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/language/I18NextPlugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;CAExD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/language/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
|