@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,189 @@
|
|
|
1
|
+
import { PixiEngine } from '../../engine/PixiEngine';
|
|
2
|
+
import type { EnginePlugin } from '../Plugin.types';
|
|
3
|
+
import '@esotericsoftware/spine-pixi-v8';
|
|
4
|
+
import type { ResourcePluginConfig, LoadingProgress } from './ResourcePlugin.types';
|
|
5
|
+
/**
|
|
6
|
+
* Asset loading and management plugin for PixiJS games.
|
|
7
|
+
*
|
|
8
|
+
* ResourcePlugin manages game assets with automatic resolution selection,
|
|
9
|
+
* platform-specific loading, and priority-based strategies. It uses PixiJS
|
|
10
|
+
* native features (isMobile, detectWebp) for device detection.
|
|
11
|
+
*
|
|
12
|
+
* ## Features
|
|
13
|
+
*
|
|
14
|
+
* - **Automatic Resolution Selection**: Based on devicePixelRatio
|
|
15
|
+
* - **Platform-Specific Assets**: Desktop vs mobile asset variants
|
|
16
|
+
* - **Priority-Based Loading**: Critical, high, medium, low priority bundles
|
|
17
|
+
* - **Lazy Loading**: Load assets on-demand
|
|
18
|
+
* - **WebP Support**: Automatic WebP format detection
|
|
19
|
+
* - **Font Loading**: Integrated font asset management
|
|
20
|
+
* - **Progress Tracking**: Per-bundle loading progress callbacks
|
|
21
|
+
*
|
|
22
|
+
* ## Asset Resolution Strategy
|
|
23
|
+
*
|
|
24
|
+
* Assets are organized in directories with resolution variants:
|
|
25
|
+
* ```
|
|
26
|
+
* /assets/graphics/
|
|
27
|
+
* package-name/
|
|
28
|
+
* package-name-0@0.25x.webp.json // Low quality
|
|
29
|
+
* package-name-0@0.5x.webp.json // Medium quality
|
|
30
|
+
* package-name-0@1x.webp.json // High quality
|
|
31
|
+
* package-name-0@2x.webp.json // Ultra quality
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const resourcePlugin = new ResourcePlugin({
|
|
37
|
+
* basePath: '/assets/graphics/',
|
|
38
|
+
* devicePixelRatio: window.devicePixelRatio,
|
|
39
|
+
* bundles: [
|
|
40
|
+
* {
|
|
41
|
+
* name: 'ui',
|
|
42
|
+
* packages: ['buttons', 'icons'],
|
|
43
|
+
* priority: 0 // Critical
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
46
|
+
* name: 'game',
|
|
47
|
+
* packages: ['symbols', 'backgrounds'],
|
|
48
|
+
* priority: 1, // High
|
|
49
|
+
* isLazy: false
|
|
50
|
+
* }
|
|
51
|
+
* ]
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* engine.registerPlugin(resourcePlugin);
|
|
55
|
+
* await engine.initialize();
|
|
56
|
+
*
|
|
57
|
+
* // Load critical assets
|
|
58
|
+
* await resourcePlugin.loadCriticalAssets();
|
|
59
|
+
*
|
|
60
|
+
* // Load all non-lazy bundles
|
|
61
|
+
* await resourcePlugin.preloadAssets();
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @category Plugins
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export declare class ResourcePlugin implements EnginePlugin {
|
|
68
|
+
name: string;
|
|
69
|
+
priority: number;
|
|
70
|
+
dependencies: string[];
|
|
71
|
+
private config;
|
|
72
|
+
private engine;
|
|
73
|
+
private isInitialized;
|
|
74
|
+
private bundleStates;
|
|
75
|
+
private manifest;
|
|
76
|
+
private resolution;
|
|
77
|
+
private resolutionSuffix;
|
|
78
|
+
private textureFormat;
|
|
79
|
+
/** Sound alias -> channel mapping collected from bundle configs */
|
|
80
|
+
private _soundChannelMappings;
|
|
81
|
+
constructor(config: ResourcePluginConfig);
|
|
82
|
+
initialize(engine: PixiEngine): Promise<void>;
|
|
83
|
+
onReady(engine: PixiEngine): void;
|
|
84
|
+
/**
|
|
85
|
+
* Calculates optimal asset resolution based on device screen size and DPR.
|
|
86
|
+
* Uses diagonal ratio between device physical resolution and design resolution (1920x1080).
|
|
87
|
+
*
|
|
88
|
+
* Formula: requiredScale = deviceDiagonal / designDiagonal
|
|
89
|
+
*
|
|
90
|
+
* Strategy:
|
|
91
|
+
* - Mobile: Round DOWN to nearest available resolution (performance priority)
|
|
92
|
+
* - Desktop: Round UP to nearest available resolution (quality priority)
|
|
93
|
+
*
|
|
94
|
+
* @param dpr - Device pixel ratio
|
|
95
|
+
* @param platform - 'mobile' or 'desktop'
|
|
96
|
+
* @param forceResolution - Optional forced scale value (bypasses diagonal calculation)
|
|
97
|
+
*/
|
|
98
|
+
private calculateOptimalResolution;
|
|
99
|
+
isReady(): boolean;
|
|
100
|
+
cleanup(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Check if a package config is a Spine package
|
|
103
|
+
*/
|
|
104
|
+
private isSpinePackage;
|
|
105
|
+
/**
|
|
106
|
+
* Check if a package config is a Sound package
|
|
107
|
+
*/
|
|
108
|
+
private isSoundPackage;
|
|
109
|
+
private generateManifest;
|
|
110
|
+
/**
|
|
111
|
+
* Check if a package should be loaded on current platform
|
|
112
|
+
*/
|
|
113
|
+
private shouldLoadPackage;
|
|
114
|
+
/**
|
|
115
|
+
* Generate asset URL based on resolution support and texture format.
|
|
116
|
+
*/
|
|
117
|
+
private generateAssetURL;
|
|
118
|
+
/**
|
|
119
|
+
* Generate Spine asset URLs (skeleton + atlas) with resolution support.
|
|
120
|
+
*
|
|
121
|
+
* @param pkg - Spine package configuration
|
|
122
|
+
* @returns Array of AssetItems for skeleton and atlas, or null if platform doesn't match
|
|
123
|
+
*/
|
|
124
|
+
private generateSpineAssets;
|
|
125
|
+
/**
|
|
126
|
+
* Generate Sound asset URL with format fallback support.
|
|
127
|
+
*
|
|
128
|
+
* @param pkg - Sound package configuration
|
|
129
|
+
* @returns AssetItem for the sound, or null if platform doesn't match
|
|
130
|
+
*/
|
|
131
|
+
private generateSoundAsset;
|
|
132
|
+
/**
|
|
133
|
+
* Returns sound alias -> channel mappings collected from bundle configs.
|
|
134
|
+
*/
|
|
135
|
+
get soundChannelMappings(): ReadonlyMap<string, string>;
|
|
136
|
+
private initializePixiAssets;
|
|
137
|
+
/**
|
|
138
|
+
* Loads a specific asset bundle.
|
|
139
|
+
*
|
|
140
|
+
* @param bundleName - Name of the bundle to load
|
|
141
|
+
* @param onProgress - Optional progress callback
|
|
142
|
+
* @throws Error if bundle not found
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```typescript
|
|
146
|
+
* await resourcePlugin.loadBundle('ui', (progress) => {
|
|
147
|
+
* console.log(`Loading: ${progress.percentage}%`);
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
loadBundle(bundleName: string, onProgress?: (progress: LoadingProgress) => void, globalContext?: {
|
|
152
|
+
bundleIndex: number;
|
|
153
|
+
totalBundles: number;
|
|
154
|
+
}): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* Loads all critical priority assets (priority 0).
|
|
157
|
+
*
|
|
158
|
+
* Should be called during initial loading screen before game starts.
|
|
159
|
+
*
|
|
160
|
+
* @param onProgress - Optional progress callback
|
|
161
|
+
*/
|
|
162
|
+
loadCriticalAssets(onProgress?: (progress: LoadingProgress) => void): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Preloads all non-lazy bundles.
|
|
165
|
+
*
|
|
166
|
+
* Loads all bundles that are not marked as lazy, typically called
|
|
167
|
+
* after critical assets are loaded.
|
|
168
|
+
*
|
|
169
|
+
* @param onProgress - Optional progress callback
|
|
170
|
+
*/
|
|
171
|
+
preloadAssets(onProgress?: (progress: LoadingProgress) => void): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Checks if a bundle has been loaded.
|
|
174
|
+
*
|
|
175
|
+
* @param bundleName - Name of the bundle
|
|
176
|
+
* @returns True if loaded, false otherwise
|
|
177
|
+
*/
|
|
178
|
+
isBundleLoaded(bundleName: string): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Returns the count of critical bundles (priority 0).
|
|
181
|
+
*/
|
|
182
|
+
getCriticalBundleCount(): number;
|
|
183
|
+
/**
|
|
184
|
+
* Returns the count of non-lazy bundles to preload.
|
|
185
|
+
*/
|
|
186
|
+
getPreloadBundleCount(): number;
|
|
187
|
+
[key: symbol]: any;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=ResourcePlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourcePlugin.d.ts","sourceRoot":"","sources":["../../../plugins/resource/ResourcePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,OAAO,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,oBAAoB,EAGpB,eAAe,EAKhB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,cAAe,YAAW,YAAY;IAC1C,IAAI,EAAE,MAAM,CAAoB;IAChC,QAAQ,EAAE,MAAM,CAAM;IACtB,YAAY,EAAE,MAAM,EAAE,CAAM;IAEnC,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAS;IAG9B,OAAO,C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UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAW3F;;;;;OAKG;IACI,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAKlD;;OAEG;IACI,sBAAsB,IAAI,MAAM;IAKvC;;OAEG;IACI,qBAAqB,IAAI,MAAM;IAKtC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { PluginConfig } from '../Plugin.types';
|
|
2
|
+
/**
|
|
3
|
+
* Supported texture formats for asset loading.
|
|
4
|
+
*/
|
|
5
|
+
export type TextureFormat = 'png' | 'webp' | 'avif';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for an asset package within a bundle.
|
|
8
|
+
*
|
|
9
|
+
* Allows fine-grained control over package loading behavior including
|
|
10
|
+
* resolution support and platform targeting.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export interface PackageConfig {
|
|
15
|
+
/** Package name (must match directory name) */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Whether package has resolution variants (default: true) */
|
|
18
|
+
hasResolutions?: boolean;
|
|
19
|
+
/** Optional alias override for asset loading */
|
|
20
|
+
alias?: string;
|
|
21
|
+
/** Target platform for this package (default: 'both') */
|
|
22
|
+
platform?: 'desktop' | 'mobile' | 'both';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Sound channel types for audio categorization.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export type SoundChannel = 'music' | 'voice' | 'sfx' | 'ui';
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for a sound package.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export interface SoundPackageConfig {
|
|
36
|
+
/** Sound file name (without extension) */
|
|
37
|
+
name: string;
|
|
38
|
+
/** Must be 'sound' to identify as sound package */
|
|
39
|
+
type: 'sound';
|
|
40
|
+
/** Optional alias override for asset loading */
|
|
41
|
+
alias?: string;
|
|
42
|
+
/** Direct source path with format pattern e.g. 'ambiance.{ogg,mp3}' */
|
|
43
|
+
src?: string;
|
|
44
|
+
/** Channel assignment for SoundPlugin */
|
|
45
|
+
channel?: SoundChannel;
|
|
46
|
+
/** Target platform for this package (default: 'both') */
|
|
47
|
+
platform?: 'desktop' | 'mobile' | 'both';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Configuration for a Spine animation package.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export interface SpinePackageConfig {
|
|
55
|
+
/** Package name (must match Spine export name) */
|
|
56
|
+
name: string;
|
|
57
|
+
/** Must be 'spine' to identify as Spine package */
|
|
58
|
+
type: 'spine';
|
|
59
|
+
/** Optional alias override for asset loading */
|
|
60
|
+
alias?: string;
|
|
61
|
+
/** Whether package has resolution variants (default: true) */
|
|
62
|
+
hasResolutions?: boolean;
|
|
63
|
+
/** Skeleton file format: 'skel' (binary) or 'json' (default: 'skel') */
|
|
64
|
+
skeletonFormat?: 'skel' | 'json';
|
|
65
|
+
/** Target platform for this package (default: 'both') */
|
|
66
|
+
platform?: 'desktop' | 'mobile' | 'both';
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Asset bundle configuration.
|
|
70
|
+
*
|
|
71
|
+
* Bundles group related assets together for efficient loading.
|
|
72
|
+
* Supports priority-based loading and lazy loading.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export interface AssetBundle {
|
|
77
|
+
name: string;
|
|
78
|
+
packages: (string | PackageConfig | SpinePackageConfig | SoundPackageConfig)[];
|
|
79
|
+
path?: string;
|
|
80
|
+
priority?: number;
|
|
81
|
+
isLazy?: boolean;
|
|
82
|
+
}
|
|
83
|
+
export interface AssetPackage {
|
|
84
|
+
type: 'spritesheet' | 'spine-skel' | 'spine-data' | 'spine-atlas' | 'font';
|
|
85
|
+
name: string;
|
|
86
|
+
alias?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface AssetItem {
|
|
89
|
+
alias: string;
|
|
90
|
+
src: string;
|
|
91
|
+
data?: any;
|
|
92
|
+
preferred?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface AssetManifestEntry {
|
|
95
|
+
name: string;
|
|
96
|
+
assets: AssetItem[];
|
|
97
|
+
priority?: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Configuration for ResourcePlugin.
|
|
101
|
+
*
|
|
102
|
+
* Defines asset bundles and loading strategies. ResourcePlugin automatically
|
|
103
|
+
* detects device capabilities using PixiJS native features (isMobile, detectWebp)
|
|
104
|
+
* and calculates optimal asset resolution based on devicePixelRatio.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
export interface ResourcePluginConfig extends PluginConfig {
|
|
109
|
+
/** Base path for asset loading (default: '/assets/graphics/') */
|
|
110
|
+
basePath?: string;
|
|
111
|
+
/** Base path for Spine assets (default: '/assets/spine/') */
|
|
112
|
+
spineBasePath?: string;
|
|
113
|
+
/** Base path for sound assets (default: '/assets/sounds/') */
|
|
114
|
+
audioBasePath?: string;
|
|
115
|
+
/** Asset bundles to load */
|
|
116
|
+
bundles: AssetBundle[];
|
|
117
|
+
/** Available resolution scales for assets (default: [0.25, 0.5, 1.0, 2.0]) */
|
|
118
|
+
availableResolutions?: number[];
|
|
119
|
+
/** Force specific resolution, bypassing automatic calculation */
|
|
120
|
+
forceResolution?: number;
|
|
121
|
+
/** Available texture formats in the game (default: ['png', 'webp']) */
|
|
122
|
+
availableTextureFormats?: TextureFormat[];
|
|
123
|
+
/** Font assets to load */
|
|
124
|
+
fonts?: FontAsset[];
|
|
125
|
+
}
|
|
126
|
+
export interface LoadingProgress {
|
|
127
|
+
bundleName: string;
|
|
128
|
+
loaded: number;
|
|
129
|
+
total: number;
|
|
130
|
+
percentage: number;
|
|
131
|
+
globalPercentage: number;
|
|
132
|
+
bundleIndex: number;
|
|
133
|
+
totalBundles: number;
|
|
134
|
+
}
|
|
135
|
+
export interface AssetBundleState {
|
|
136
|
+
name: string;
|
|
137
|
+
status: 'pending' | 'loading' | 'loaded' | 'error';
|
|
138
|
+
priority: number;
|
|
139
|
+
assets: AssetItem[];
|
|
140
|
+
error?: Error;
|
|
141
|
+
}
|
|
142
|
+
export type LoadPriority = 0 | 1 | 2 | 3;
|
|
143
|
+
export interface FontAsset {
|
|
144
|
+
alias: string;
|
|
145
|
+
src: string;
|
|
146
|
+
data?: {
|
|
147
|
+
family: string;
|
|
148
|
+
weights?: string[];
|
|
149
|
+
style?: string;
|
|
150
|
+
display?: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=ResourcePlugin.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResourcePlugin.types.d.ts","sourceRoot":"","sources":["../../../plugins/resource/ResourcePlugin.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,IA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AAC;AAEzC,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../plugins/resource/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACf,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { PixiEngine } from '../../engine';
|
|
3
|
+
/**
|
|
4
|
+
* Abstract base class for all game scenes.
|
|
5
|
+
*
|
|
6
|
+
* Scene provides a structured lifecycle for game screens (menus, gameplay, etc.).
|
|
7
|
+
* Extends PixiJS Container, so all display objects can be added as children.
|
|
8
|
+
*
|
|
9
|
+
* ## Lifecycle Methods
|
|
10
|
+
*
|
|
11
|
+
* 1. **onInitialize()** - Called once when scene is first entered
|
|
12
|
+
* 2. **onEnter()** - Called every time scene becomes active (async, for animations)
|
|
13
|
+
* 3. **update()** - Called every frame while scene is active
|
|
14
|
+
* 4. **onResize()** - Called when window is resized
|
|
15
|
+
* 5. **onExit()** - Called when leaving scene (async, for exit animations)
|
|
16
|
+
* 6. **cleanup()** - Called after exit for resource cleanup
|
|
17
|
+
*
|
|
18
|
+
* ## Usage Pattern
|
|
19
|
+
*
|
|
20
|
+
* 1. Create a class extending Scene
|
|
21
|
+
* 2. Override lifecycle methods as needed
|
|
22
|
+
* 3. Register scene with ScenePlugin
|
|
23
|
+
* 4. Switch to scene using ScenePlugin.switchScene()
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* class MainMenuScene extends Scene {
|
|
28
|
+
* private logo: Sprite;
|
|
29
|
+
*
|
|
30
|
+
* constructor() {
|
|
31
|
+
* super('MainMenu');
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* protected onInitialize(): void {
|
|
35
|
+
* // Create UI elements
|
|
36
|
+
* this.logo = new Sprite(texture);
|
|
37
|
+
* this.addChild(this.logo);
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* protected async onEnter(): Promise<void> {
|
|
41
|
+
* // Fade in animation
|
|
42
|
+
* await gsap.to(this, { alpha: 1, duration: 0.5 });
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* public update(deltaTime: number): void {
|
|
46
|
+
* // Update logic
|
|
47
|
+
* this.logo.rotation += deltaTime * 0.001;
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* protected async onExit(): Promise<void> {
|
|
51
|
+
* // Fade out animation
|
|
52
|
+
* await gsap.to(this, { alpha: 0, duration: 0.3 });
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* protected cleanup(): void {
|
|
56
|
+
* // Clean up resources
|
|
57
|
+
* this.logo.destroy();
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export declare abstract class Scene extends Container {
|
|
65
|
+
sceneName: string;
|
|
66
|
+
protected engine: PixiEngine;
|
|
67
|
+
constructor(sceneName: string);
|
|
68
|
+
/**
|
|
69
|
+
* Sets the engine reference.
|
|
70
|
+
*
|
|
71
|
+
* Called automatically by ScenePlugin when scene is registered.
|
|
72
|
+
*
|
|
73
|
+
* @param engine - PixiEngine instance
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
setEngine(engine: PixiEngine): void;
|
|
77
|
+
/**
|
|
78
|
+
* Enters the scene.
|
|
79
|
+
*
|
|
80
|
+
* Calls onInitialize() and onEnter() in sequence.
|
|
81
|
+
* Called automatically by ScenePlugin when switching to this scene.
|
|
82
|
+
*
|
|
83
|
+
* @param params - Optional parameters passed from switchScene()
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
enter(params?: unknown): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Exits the scene.
|
|
89
|
+
*
|
|
90
|
+
* Calls onExit() and cleanup() in sequence.
|
|
91
|
+
* Called automatically by ScenePlugin when switching away from this scene.
|
|
92
|
+
*
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
exit(): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Initializes the scene.
|
|
98
|
+
*
|
|
99
|
+
* Called once when the scene is first entered.
|
|
100
|
+
* Override to create UI elements and set up initial state.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* protected onInitialize(): void {
|
|
105
|
+
* this.background = new Sprite(bgTexture);
|
|
106
|
+
* this.addChild(this.background);
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
protected onInitialize(): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Called when the scene becomes active.
|
|
113
|
+
*
|
|
114
|
+
* Override to implement entry animations.
|
|
115
|
+
* This method is async, so you can await animations.
|
|
116
|
+
*
|
|
117
|
+
* @param _params - Optional parameters passed from switchScene()
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* protected async onEnter(params?: { level: number }): Promise<void> {
|
|
122
|
+
* this.alpha = 0;
|
|
123
|
+
* if (params) {
|
|
124
|
+
* this.level = params.level;
|
|
125
|
+
* }
|
|
126
|
+
* await gsap.to(this, { alpha: 1, duration: 0.5 });
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
protected onEnter(_params?: unknown): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Called when leaving the scene.
|
|
133
|
+
*
|
|
134
|
+
* Override to implement exit animations.
|
|
135
|
+
* This method is async, so you can await animations.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```typescript
|
|
139
|
+
* protected async onExit(): Promise<void> {
|
|
140
|
+
* await gsap.to(this, { alpha: 0, duration: 0.3 });
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
protected onExit(): Promise<void>;
|
|
145
|
+
/**
|
|
146
|
+
* Cleans up scene resources.
|
|
147
|
+
*
|
|
148
|
+
* Called after onExit() when the scene is removed.
|
|
149
|
+
* Override to destroy textures, remove event listeners, etc.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* protected cleanup(): void {
|
|
154
|
+
* this.background.destroy();
|
|
155
|
+
* this.removeAllListeners();
|
|
156
|
+
* }
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
protected cleanup(): void;
|
|
160
|
+
/**
|
|
161
|
+
* Updates the scene every frame.
|
|
162
|
+
*
|
|
163
|
+
* Override to implement per-frame logic like animations,
|
|
164
|
+
* physics, or input handling.
|
|
165
|
+
*
|
|
166
|
+
* @param _deltaTime - Time elapsed since last frame in milliseconds
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* public update(deltaTime: number): void {
|
|
171
|
+
* this.player.x += this.velocity * deltaTime;
|
|
172
|
+
* this.checkCollisions();
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
update(_deltaTime: number): void;
|
|
177
|
+
/**
|
|
178
|
+
* Called when the window is resized.
|
|
179
|
+
*
|
|
180
|
+
* Override to reposition or scale UI elements.
|
|
181
|
+
*
|
|
182
|
+
* @param _width - New window width
|
|
183
|
+
* @param _height - New window height
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```typescript
|
|
187
|
+
* public onResize(width: number, height: number): void {
|
|
188
|
+
* this.background.width = width;
|
|
189
|
+
* this.background.height = height;
|
|
190
|
+
* this.centerLogo(width, height);
|
|
191
|
+
* }
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
onResize(_width: number, _height: number): void;
|
|
195
|
+
/**
|
|
196
|
+
* Get the stage (root container) by traversing up the parent chain.
|
|
197
|
+
* Useful for attaching global event listeners.
|
|
198
|
+
*
|
|
199
|
+
* @returns The stage container or null if not attached to stage
|
|
200
|
+
*/
|
|
201
|
+
getStage(): Container | null;
|
|
202
|
+
}
|
|
203
|
+
//# sourceMappingURL=Scene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scene.d.ts","sourceRoot":"","sources":["../../../plugins/scene/Scene.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,8BAAsB,KAAM,SAAQ,SAAS;IAGxB,SAAS,EAAE,MAAM;IAFpC,SAAS,CAAC,MAAM,EAAG,UAAU,CAAC;gBAEX,SAAS,EAAE,MAAM;IAMpC;;;;;;;OAOG;IACI,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAI1C;;;;;;;;OAQG;IACU,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnD;;;;;;;OAOG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC;;;;;;;;;;;;;OAaG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7C;;;;;;;;;;;;;;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