@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
package/README.md
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
# @rb-games/core
|
|
2
|
+
|
|
3
|
+
Core game engine package for RB Games framework. This package provides the foundational engine, plugin system, and utilities for building casino games.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @rb-games/core
|
|
9
|
+
# or
|
|
10
|
+
yarn add @rb-games/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { PixiEngine } from '@rb-games/core/engine';
|
|
17
|
+
import { ScenePlugin, ResourcePlugin } from '@rb-games/core/plugins';
|
|
18
|
+
|
|
19
|
+
const engine = new PixiEngine({
|
|
20
|
+
width: 1920,
|
|
21
|
+
height: 1080,
|
|
22
|
+
backgroundColor: 0x1a1a1a,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Register plugins
|
|
26
|
+
engine.registerPlugin(new ResourcePlugin());
|
|
27
|
+
engine.registerPlugin(new ScenePlugin());
|
|
28
|
+
|
|
29
|
+
// Initialize
|
|
30
|
+
await engine.init(document.getElementById('game-container'));
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
Generate API documentation:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
yarn docs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
View documentation in browser:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
yarn docs:serve
|
|
45
|
+
# Opens at http://localhost:3001
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# Core Engine & Plugin System
|
|
51
|
+
|
|
52
|
+
This document describes the core game engine architecture and the plugin system used in the `@rb-games/core` package.
|
|
53
|
+
It explains:
|
|
54
|
+
|
|
55
|
+
- How the `PixiEngine` works
|
|
56
|
+
- How plugins are defined and initialized
|
|
57
|
+
- The plugin lifecycle
|
|
58
|
+
- A short description of each core plugin
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 1. Overview
|
|
63
|
+
|
|
64
|
+
The core package provides a lightweight game engine on top of [PixiJS].
|
|
65
|
+
Games (e.g. slot games) do not talk to Pixi directly; instead they use:
|
|
66
|
+
|
|
67
|
+
- `PixiEngine` – a wrapper around `Pixi.Application`
|
|
68
|
+
- A **plugin-based architecture** to add features such as:
|
|
69
|
+
- Rendering and layout
|
|
70
|
+
- Asset and resource loading
|
|
71
|
+
- Input handling
|
|
72
|
+
- Scene management
|
|
73
|
+
- Localization
|
|
74
|
+
- Device/network optimization
|
|
75
|
+
- Error tracking, etc.
|
|
76
|
+
|
|
77
|
+
Typical game startup flow (example from a slot game):
|
|
78
|
+
|
|
79
|
+
1. Game calls `setupApplication(container)` from the slot base module.
|
|
80
|
+
2. `setupApplication` creates a `PixiEngine` instance.
|
|
81
|
+
3. Core plugins are registered on the engine.
|
|
82
|
+
4. `engine.initialize()` is called:
|
|
83
|
+
- Pixi application is initialized
|
|
84
|
+
- Plugins are initialized in the correct order
|
|
85
|
+
- Plugins are finalized and marked as ready
|
|
86
|
+
5. Game scenes are registered and the initial scene is activated.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 2. PixiEngine
|
|
91
|
+
|
|
92
|
+
`PixiEngine` is the central runtime object:
|
|
93
|
+
|
|
94
|
+
- Wraps a `Pixi.Application` instance
|
|
95
|
+
- Manages **plugin registration, ordering, initialization, and lifecycle**
|
|
96
|
+
- Exposes shared data storage
|
|
97
|
+
- Handles window resize and per-frame updates
|
|
98
|
+
- Provides access to the underlying Pixi app and stage
|
|
99
|
+
|
|
100
|
+
Key responsibilities:
|
|
101
|
+
|
|
102
|
+
- Initialize Pixi (`_pixiApp.init`) with configured width/height, antialias, etc.
|
|
103
|
+
- Append the canvas to the DOM.
|
|
104
|
+
- Maintain a `Map<string, EnginePlugin>` of registered plugins.
|
|
105
|
+
- Track plugin states (`registered → initializing → initialized → ready`).
|
|
106
|
+
- Sort plugins by **priority** and **dependencies** before initializing.
|
|
107
|
+
- Drive the frame update loop by calling plugin `onUpdate`.
|
|
108
|
+
- Handle global resize logic by calling plugin `onResize` first, then falling back to default resize behavior when not handled.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 3. Plugin Architecture
|
|
113
|
+
|
|
114
|
+
### 3.1 EnginePlugin Interface
|
|
115
|
+
|
|
116
|
+
All engine plugins implement the `EnginePlugin` interface:
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
export interface EnginePlugin {
|
|
120
|
+
name: string; // Unique name of the plugin
|
|
121
|
+
priority: number; // Lower number = higher priority
|
|
122
|
+
state?: PluginState; // Current lifecycle state
|
|
123
|
+
dependencies?: string[]; // Other plugins that must be ready first
|
|
124
|
+
|
|
125
|
+
initialize(engine: PixiEngine): Promise<void> | void;
|
|
126
|
+
|
|
127
|
+
onReady?(engine: PixiEngine): Promise<void> | void;
|
|
128
|
+
|
|
129
|
+
cleanup?(): void;
|
|
130
|
+
|
|
131
|
+
onUpdate?(delta: number): boolean;
|
|
132
|
+
|
|
133
|
+
onResize?(width: number, height: number): boolean;
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This design allows each feature (rendering, resources, input, etc.) to be implemented as a self-contained plugin that can:
|
|
138
|
+
|
|
139
|
+
- Run setup code on initialization,
|
|
140
|
+
- Interact with other plugins after they are ready,
|
|
141
|
+
- Participate in per-frame updates,
|
|
142
|
+
- React to window resize events,
|
|
143
|
+
- Perform cleanup when necessary.
|
|
144
|
+
|
|
145
|
+
### 3.2 PluginState
|
|
146
|
+
|
|
147
|
+
The lifecycle state of a plugin is represented by `PluginState`:
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
export enum PluginState {
|
|
151
|
+
REGISTERED = 'registered',
|
|
152
|
+
INITIALIZING = 'initializing',
|
|
153
|
+
INITIALIZED = 'initialized',
|
|
154
|
+
READY = 'ready',
|
|
155
|
+
ERROR = 'error',
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The engine transitions plugins through these states and logs all transitions for easier debugging.
|
|
160
|
+
|
|
161
|
+
### 3.3 Registration and Ordering
|
|
162
|
+
|
|
163
|
+
Plugins are registered via:
|
|
164
|
+
|
|
165
|
+
```ts
|
|
166
|
+
engine.registerPlugin(pluginInstance);
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
During registration:
|
|
170
|
+
|
|
171
|
+
- Duplicate names are rejected.
|
|
172
|
+
- Plugin state is set to `REGISTERED`.
|
|
173
|
+
- If the engine was already initialized, the new plugin is immediately initialized.
|
|
174
|
+
|
|
175
|
+
When `engine.initialize()` is called, the engine:
|
|
176
|
+
|
|
177
|
+
1. Sorts all plugins primarily by `priority` (ascending; lower = earlier).
|
|
178
|
+
2. Resolves the dependency graph:
|
|
179
|
+
- Ensures that dependencies are initialized before dependants.
|
|
180
|
+
- Detects circular dependencies and logs warnings.
|
|
181
|
+
- Collects missing dependencies and throws an error with a detailed message if any are missing.
|
|
182
|
+
3. Calls the lifecycle methods in order (see below).
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 4. Plugin Lifecycle
|
|
187
|
+
|
|
188
|
+
The engine lifecycle for plugins consists of two main phases: **initialization** and **finalization (ready)**.
|
|
189
|
+
|
|
190
|
+
### 4.1 Initialization Phase
|
|
191
|
+
|
|
192
|
+
For each registered plugin (in sorted order):
|
|
193
|
+
|
|
194
|
+
1. The engine sets the plugin state to `INITIALIZING`.
|
|
195
|
+
2. The engine calls `plugin.initialize(engine)`.
|
|
196
|
+
3. On success, the engine sets the plugin state to `INITIALIZED`.
|
|
197
|
+
4. On error, the plugin state is set to `ERROR` and the error is logged (and may be rethrown).
|
|
198
|
+
|
|
199
|
+
This phase is meant for:
|
|
200
|
+
|
|
201
|
+
- Internal setup
|
|
202
|
+
- Registering data with the engine
|
|
203
|
+
- Preparing resources needed by the plugin itself
|
|
204
|
+
|
|
205
|
+
### 4.2 Ready Phase (onReady)
|
|
206
|
+
|
|
207
|
+
After all plugins have been initialized, the engine runs a second pass:
|
|
208
|
+
|
|
209
|
+
- Calls `plugin.onReady(engine)` for each plugin that implements it.
|
|
210
|
+
- Sets the plugin state to `READY`.
|
|
211
|
+
- Adds the plugin name to the `readyPlugins` set.
|
|
212
|
+
|
|
213
|
+
This phase is designed for:
|
|
214
|
+
|
|
215
|
+
- Cross-plugin integration
|
|
216
|
+
- Accessing other plugins safely (e.g. a Scene plugin waiting for I18N or resources)
|
|
217
|
+
- Hooking into engine events once everything is prepared
|
|
218
|
+
|
|
219
|
+
Plugins can use helper APIs like `engine.waitForPlugins([...])` to wait for certain plugins to be ready before proceeding.
|
|
220
|
+
|
|
221
|
+
### 4.3 Update Phase
|
|
222
|
+
|
|
223
|
+
Every frame, the engine calls:
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
engine.onUpdate(deltaTime);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
which internally:
|
|
230
|
+
|
|
231
|
+
- Fetches the list of plugins, sorted by priority (highest priority first).
|
|
232
|
+
- Calls `plugin.onUpdate(deltaTime)` for each plugin that implements it.
|
|
233
|
+
- If a plugin returns `true`, the engine stops propagating the update to lower priority plugins (the update was “handled”).
|
|
234
|
+
|
|
235
|
+
This allows high-priority plugins to “consume” the update if necessary.
|
|
236
|
+
|
|
237
|
+
### 4.4 Resize Phase
|
|
238
|
+
|
|
239
|
+
On window resize, the engine:
|
|
240
|
+
|
|
241
|
+
1. Fetches the sorted plugin list.
|
|
242
|
+
2. Calls `plugin.onResize(width, height)` for each plugin that implements it.
|
|
243
|
+
3. If any plugin returns `true`, the resize event is considered handled.
|
|
244
|
+
4. If no plugin handles the resize, the engine performs a default `renderer.resize(width, height)`.
|
|
245
|
+
|
|
246
|
+
This pattern lets a display/layout plugin take complete control over how the game area is resized while still providing a safe fallback.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 5. Data Storage in the Engine
|
|
251
|
+
|
|
252
|
+
The engine exposes a small key/value storage API:
|
|
253
|
+
|
|
254
|
+
- `engine.setData(key, value)`
|
|
255
|
+
- `engine.getData(key)`
|
|
256
|
+
- `engine.removeData(key)`
|
|
257
|
+
|
|
258
|
+
Plugins and higher-level systems can use this shared storage to exchange small pieces of data without introducing hard dependencies.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 6. Core Plugin Descriptions
|
|
263
|
+
|
|
264
|
+
Below is a short overview of the main core plugins that are typically used by slot games.
|
|
265
|
+
|
|
266
|
+
> Note: Actual implementation details live under `packages/core/plugins`.
|
|
267
|
+
|
|
268
|
+
### 6.1 DeviceOptimizerPlugin
|
|
269
|
+
|
|
270
|
+
**Purpose**
|
|
271
|
+
|
|
272
|
+
- Collects and/or uses device- and environment-related information:
|
|
273
|
+
- Network characteristics
|
|
274
|
+
- Battery status (where available)
|
|
275
|
+
- Potentially other performance metrics
|
|
276
|
+
|
|
277
|
+
**Typical Responsibilities**
|
|
278
|
+
|
|
279
|
+
- Optimize quality settings or asset resolution based on device capabilities.
|
|
280
|
+
- Enable/disable certain effects or features depending on network and battery conditions.
|
|
281
|
+
- Provide a consistent way for other plugins or game logic to query device/environment data.
|
|
282
|
+
|
|
283
|
+
**Special Notes**
|
|
284
|
+
|
|
285
|
+
- Often configured with debug flags that are only true in development (`NODE_ENV === 'development'`).
|
|
286
|
+
- Typically registered very early (high priority) so other plugins can adapt based on its results.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
### 6.2 ResourcePlugin
|
|
291
|
+
|
|
292
|
+
**Purpose**
|
|
293
|
+
|
|
294
|
+
- Manages loading of all game assets (graphics, spritesheets, fonts, etc.).
|
|
295
|
+
- Provides a higher-level bundle system on top of Pixi’s resources.
|
|
296
|
+
|
|
297
|
+
**Typical Responsibilities**
|
|
298
|
+
|
|
299
|
+
- Configure a `basePath` for all graphic assets (e.g. `/assets/graphics/`).
|
|
300
|
+
- Support multiple resolutions:
|
|
301
|
+
- `availableResolutions: [0.25, 0.5, 1.0, 2.0]`
|
|
302
|
+
- Define **bundles**:
|
|
303
|
+
- `preload-pack` – critical assets needed to boot the game.
|
|
304
|
+
- `game-pack` – main game assets.
|
|
305
|
+
- `gamble-pack` – optional, lazy-loaded assets.
|
|
306
|
+
- Load fonts from remote URLs and register them with aliases.
|
|
307
|
+
|
|
308
|
+
**API Examples**
|
|
309
|
+
|
|
310
|
+
- `resourcePlugin.loadCriticalAssets(onProgress)` – load essential assets, with optional progress callback.
|
|
311
|
+
- `resourcePlugin.preloadAssets()` – preload all non-lazy assets.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
### 6.3 GsapPlugin
|
|
316
|
+
|
|
317
|
+
**Purpose**
|
|
318
|
+
|
|
319
|
+
- Integrates [GSAP] into the engine’s update loop.
|
|
320
|
+
|
|
321
|
+
**Typical Responsibilities**
|
|
322
|
+
|
|
323
|
+
- Manage and tick GSAP timelines each frame.
|
|
324
|
+
- Provide a unified place to configure GSAP and synchronize it with the engine.
|
|
325
|
+
|
|
326
|
+
**Benefits**
|
|
327
|
+
|
|
328
|
+
- Games can use rich animations while staying in sync with the engine’s global timing.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
### 6.4 DisplayPlugin
|
|
333
|
+
|
|
334
|
+
**Purpose**
|
|
335
|
+
|
|
336
|
+
- Manages the main display pipeline:
|
|
337
|
+
- Virtual resolution
|
|
338
|
+
- Scaling behavior
|
|
339
|
+
- Layout of the root stage/container
|
|
340
|
+
|
|
341
|
+
**Typical Responsibilities**
|
|
342
|
+
|
|
343
|
+
- Configure width/height (e.g. 1920x1080).
|
|
344
|
+
- Implement scaling strategies like `contain`, `cover`, etc.
|
|
345
|
+
- Position and scale the main scene container on resize.
|
|
346
|
+
|
|
347
|
+
**Benefits**
|
|
348
|
+
|
|
349
|
+
- Centralize all display and layout logic instead of duplicating it in each game.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
### 6.5 I18NextPlugin
|
|
354
|
+
|
|
355
|
+
**Purpose**
|
|
356
|
+
|
|
357
|
+
- Provides localization support based on [i18next] or a similar solution.
|
|
358
|
+
|
|
359
|
+
**Typical Responsibilities**
|
|
360
|
+
|
|
361
|
+
- Load translation resources.
|
|
362
|
+
- Offer an API for reading localized strings.
|
|
363
|
+
- Manage active language / locale selection.
|
|
364
|
+
|
|
365
|
+
**Benefits**
|
|
366
|
+
|
|
367
|
+
- Games can be localized without each game re-implementing translation handling.
|
|
368
|
+
- Other plugins (e.g. Skin or Scene) can depend on localization being ready.
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
### 6.6 InputPlugin
|
|
373
|
+
|
|
374
|
+
**Purpose**
|
|
375
|
+
|
|
376
|
+
- Centralizes all user input handling (mouse, touch, keyboard, etc.).
|
|
377
|
+
|
|
378
|
+
**Typical Responsibilities**
|
|
379
|
+
|
|
380
|
+
- Normalize different input sources into a set of consistent events.
|
|
381
|
+
- Provide configuration such as:
|
|
382
|
+
- `enabled`: enable/disable input globally.
|
|
383
|
+
- `debug`: whether to log input events.
|
|
384
|
+
- `repeatRate`: control input repetition.
|
|
385
|
+
|
|
386
|
+
**Benefits**
|
|
387
|
+
|
|
388
|
+
- Single source of truth for user input.
|
|
389
|
+
- Easier debugging and control (e.g. disabling input during transitions or modals).
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### 6.7 SkinPlugin
|
|
394
|
+
|
|
395
|
+
**Purpose**
|
|
396
|
+
|
|
397
|
+
- Manages visual skins and themes for the game.
|
|
398
|
+
|
|
399
|
+
**Typical Responsibilities**
|
|
400
|
+
|
|
401
|
+
- Load and apply different skins (e.g. different art packs or themes).
|
|
402
|
+
- Potentially integrate with localization (e.g. language-specific logos or typography).
|
|
403
|
+
|
|
404
|
+
**Benefits**
|
|
405
|
+
|
|
406
|
+
- Allows multiple visual variations of the same game logic (e.g. brand skins) without duplicating the code.
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### 6.8 ScenePlugin
|
|
411
|
+
|
|
412
|
+
**Purpose**
|
|
413
|
+
|
|
414
|
+
- Provides a **scene management system** for the game.
|
|
415
|
+
|
|
416
|
+
**Typical Responsibilities**
|
|
417
|
+
|
|
418
|
+
- Register scenes by name.
|
|
419
|
+
- Switch between scenes (`switchScene('mainMenu')`, etc.).
|
|
420
|
+
- Manage the active scene’s lifecycle and transitions.
|
|
421
|
+
|
|
422
|
+
**Example**
|
|
423
|
+
|
|
424
|
+
- In a typical slot setup:
|
|
425
|
+
- A `mainMenu` scene is registered (e.g. an `EmptyScene` or full main menu scene).
|
|
426
|
+
- The plugin switches to `mainMenu` after all critical assets are ready.
|
|
427
|
+
|
|
428
|
+
**Benefits**
|
|
429
|
+
|
|
430
|
+
- Clear structure for complex games with multiple states (loading, lobby, game, bonus, etc.).
|
|
431
|
+
- Unified approach to scene transitions and cleanup.
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
### 6.9 SentryPlugin (Optional)
|
|
436
|
+
|
|
437
|
+
**Purpose**
|
|
438
|
+
|
|
439
|
+
- Integrates error tracking using [Sentry].
|
|
440
|
+
|
|
441
|
+
**Typical Responsibilities**
|
|
442
|
+
|
|
443
|
+
- Initialize Sentry with a given DSN.
|
|
444
|
+
- Capture and report unhandled errors or custom events.
|
|
445
|
+
- Optionally enrich events with device or game state information.
|
|
446
|
+
|
|
447
|
+
**Notes**
|
|
448
|
+
|
|
449
|
+
- The plugin may be optional and only enabled in certain environments.
|
|
450
|
+
- Setup code is usually small but powerful for monitoring production issues.
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## 7. Adding New Plugins
|
|
455
|
+
|
|
456
|
+
To add a new plugin:
|
|
457
|
+
|
|
458
|
+
1. Implement the `EnginePlugin` interface.
|
|
459
|
+
2. Choose a unique `name` and a sensible `priority`.
|
|
460
|
+
3. Optionally declare `dependencies` on other plugins.
|
|
461
|
+
4. Implement `initialize(engine)` to set up your plugin.
|
|
462
|
+
5. Optionally implement:
|
|
463
|
+
- `onReady(engine)` for cross-plugin integration,
|
|
464
|
+
- `onUpdate(delta)` to participate in the frame loop,
|
|
465
|
+
- `onResize(width, height)` for layout changes,
|
|
466
|
+
- `cleanup()` for teardown.
|
|
467
|
+
6. Register the plugin in your game or base module:
|
|
468
|
+
|
|
469
|
+
```ts
|
|
470
|
+
const myPlugin = new MyCustomPlugin(/* config */);
|
|
471
|
+
engine.registerPlugin(myPlugin);
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
7. Ensure that:
|
|
475
|
+
- Dependencies are also registered,
|
|
476
|
+
- Plugin ordering (priority) does not conflict with other core systems.
|
|
477
|
+
|
|
478
|
+
---
|
|
479
|
+
|
|
480
|
+
## 8. Summary
|
|
481
|
+
|
|
482
|
+
The core engine and plugin system are designed to:
|
|
483
|
+
|
|
484
|
+
- Make casino/slot game development **faster and more consistent**,
|
|
485
|
+
- Provide a reusable, testable, and debuggable foundation,
|
|
486
|
+
- Allow each concern (rendering, input, scenes, resources, localization, optimization, analytics, etc.) to live in its own plugin.
|
|
487
|
+
|
|
488
|
+
By building on this foundation, new games can focus on game-specific rules and content, while relying on `PixiEngine` and its plugins for all shared infrastructure.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Container } from 'pixi.js';
|
|
2
|
+
export interface DraggableContainer extends Container {
|
|
3
|
+
__draggable?: boolean;
|
|
4
|
+
__dragging?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function enableDrag(container: DraggableContainer): void;
|
|
7
|
+
export declare function disableDrag(container: DraggableContainer): void;
|
|
8
|
+
export declare function isDraggable(container: DraggableContainer): boolean;
|
|
9
|
+
export declare function isDragging(container: DraggableContainer): boolean;
|
|
10
|
+
//# sourceMappingURL=DraggableController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggableController.d.ts","sourceRoot":"","sources":["../../devtools/DraggableController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,SAAS,CAAC;AAEhE,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAqDD,wBAAgB,UAAU,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAW9D;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAoB/D;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAElE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Container } from 'pixi.js';
|
|
2
|
+
export interface ResizableContainer extends Container {
|
|
3
|
+
__resizable?: boolean;
|
|
4
|
+
__resizing?: boolean;
|
|
5
|
+
__resizeOverlay?: ResizeOverlay;
|
|
6
|
+
}
|
|
7
|
+
type HandlePosition = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
|
|
8
|
+
interface ResizeOverlay {
|
|
9
|
+
container: HTMLDivElement;
|
|
10
|
+
handles: Map<HandlePosition, HTMLDivElement>;
|
|
11
|
+
border: HTMLDivElement;
|
|
12
|
+
animationId: number | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function enableResize(container: ResizableContainer): void;
|
|
15
|
+
export declare function disableResize(container: ResizableContainer): void;
|
|
16
|
+
export declare function isResizable(container: ResizableContainer): boolean;
|
|
17
|
+
export declare function isResizing(container: ResizableContainer): boolean;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=ResizableController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizableController.d.ts","sourceRoot":"","sources":["../../devtools/ResizableController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,aAAa,CAAC;CACjC;AAED,KAAK,cAAc,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAaxE,UAAU,aAAa;IACrB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAC7C,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AA6RD,wBAAgB,YAAY,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CAchE;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,kBAAkB,GAAG,IAAI,CASjE;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAElE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAEjE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './treePlugin';
|
|
2
|
+
export * from './overlayPlugin';
|
|
3
|
+
export * from './DraggableController';
|
|
4
|
+
export * from './ResizableController';
|
|
5
|
+
export * from './spriteTextPropertiesPlugin';
|
|
6
|
+
export * from './spinePropertiesPlugin';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../devtools/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
|