@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,899 @@
|
|
|
1
|
+
import { cloneDeep, merge, set, get } from 'lodash';
|
|
2
|
+
import { Rectangle, Color } from 'pixi.js';
|
|
3
|
+
|
|
4
|
+
// utils/Logger.ts
|
|
5
|
+
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
6
|
+
LogLevel2[LogLevel2["ERROR"] = 0] = "ERROR";
|
|
7
|
+
LogLevel2[LogLevel2["WARN"] = 1] = "WARN";
|
|
8
|
+
LogLevel2[LogLevel2["INFO"] = 2] = "INFO";
|
|
9
|
+
LogLevel2[LogLevel2["DEBUG"] = 3] = "DEBUG";
|
|
10
|
+
LogLevel2[LogLevel2["TRACE"] = 4] = "TRACE";
|
|
11
|
+
return LogLevel2;
|
|
12
|
+
})(LogLevel || {});
|
|
13
|
+
var Logger = class _Logger {
|
|
14
|
+
static instance;
|
|
15
|
+
config;
|
|
16
|
+
// Terminal colors (for Node.js environment)
|
|
17
|
+
terminalColors = {
|
|
18
|
+
reset: "\x1B[0m",
|
|
19
|
+
red: "\x1B[31m",
|
|
20
|
+
yellow: "\x1B[33m",
|
|
21
|
+
blue: "\x1B[34m",
|
|
22
|
+
green: "\x1B[32m",
|
|
23
|
+
gray: "\x1B[90m",
|
|
24
|
+
cyan: "\x1B[36m",
|
|
25
|
+
magenta: "\x1B[35m",
|
|
26
|
+
white: "\x1B[37m"
|
|
27
|
+
};
|
|
28
|
+
// Browser console colors (using CSS)
|
|
29
|
+
browserColors = {
|
|
30
|
+
timestamp: "color: gray",
|
|
31
|
+
context: "color: cyan; font-weight: bold",
|
|
32
|
+
message: "color: white",
|
|
33
|
+
error: "color: red; font-weight: bold",
|
|
34
|
+
warn: "color: orange; font-weight: bold",
|
|
35
|
+
info: "color: dodgerblue; font-weight: bold",
|
|
36
|
+
debug: "color: green",
|
|
37
|
+
trace: "color: gray"
|
|
38
|
+
};
|
|
39
|
+
levelLabels = {
|
|
40
|
+
[0 /* ERROR */]: "ERROR",
|
|
41
|
+
[1 /* WARN */]: "WARN",
|
|
42
|
+
[2 /* INFO */]: "INFO",
|
|
43
|
+
[3 /* DEBUG */]: "DEBUG",
|
|
44
|
+
[4 /* TRACE */]: "TRACE"
|
|
45
|
+
};
|
|
46
|
+
levelColors = {
|
|
47
|
+
[0 /* ERROR */]: this.terminalColors.red,
|
|
48
|
+
[1 /* WARN */]: this.terminalColors.yellow,
|
|
49
|
+
[2 /* INFO */]: this.terminalColors.blue,
|
|
50
|
+
[3 /* DEBUG */]: this.terminalColors.green,
|
|
51
|
+
[4 /* TRACE */]: this.terminalColors.gray
|
|
52
|
+
};
|
|
53
|
+
levelBrowserColors = {
|
|
54
|
+
[0 /* ERROR */]: this.browserColors.error,
|
|
55
|
+
[1 /* WARN */]: this.browserColors.warn,
|
|
56
|
+
[2 /* INFO */]: this.browserColors.info,
|
|
57
|
+
[3 /* DEBUG */]: this.browserColors.debug,
|
|
58
|
+
[4 /* TRACE */]: this.browserColors.trace
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Private constructor for singleton pattern
|
|
62
|
+
*/
|
|
63
|
+
constructor() {
|
|
64
|
+
var _a;
|
|
65
|
+
this.config = {
|
|
66
|
+
level: 3 /* DEBUG */,
|
|
67
|
+
// Default log level
|
|
68
|
+
enabled: true,
|
|
69
|
+
// Logging enabled by default
|
|
70
|
+
showTimestamp: false,
|
|
71
|
+
// Show timestamps by default
|
|
72
|
+
showColors: true
|
|
73
|
+
// Show colors by default
|
|
74
|
+
};
|
|
75
|
+
if ((_a = import.meta.env) == null ? void 0 : _a.DEV) {
|
|
76
|
+
console.warn(
|
|
77
|
+
"[Logger] For better debugging experience, add Logger.ts to DevTools ignore list:\nDevTools \u2192 Settings (F1) \u2192 Ignore List \u2192 Add pattern: /Logger\\.ts$"
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get the singleton instance of the Logger
|
|
83
|
+
*/
|
|
84
|
+
static getInstance() {
|
|
85
|
+
if (!_Logger.instance) {
|
|
86
|
+
_Logger.instance = new _Logger();
|
|
87
|
+
}
|
|
88
|
+
return _Logger.instance;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Configure the logger
|
|
92
|
+
* @param config Configuration options
|
|
93
|
+
*/
|
|
94
|
+
configure(config) {
|
|
95
|
+
this.config = { ...this.config, ...config };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Enable or disable logging
|
|
99
|
+
* @param enabled Whether logging is enabled
|
|
100
|
+
*/
|
|
101
|
+
setEnabled(enabled) {
|
|
102
|
+
this.config.enabled = enabled;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Set the log level
|
|
106
|
+
* @param level The log level to set
|
|
107
|
+
*/
|
|
108
|
+
setLevel(level) {
|
|
109
|
+
this.config.level = level;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get the current log level
|
|
113
|
+
*/
|
|
114
|
+
getLevel() {
|
|
115
|
+
return this.config.level;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Log an error message
|
|
119
|
+
* @param message The message to log
|
|
120
|
+
* @param args Additional arguments to log
|
|
121
|
+
*/
|
|
122
|
+
error(message, ...args) {
|
|
123
|
+
this.log(0 /* ERROR */, message, ...args);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Log a warning message
|
|
127
|
+
* @param message The message to log
|
|
128
|
+
* @param args Additional arguments to log
|
|
129
|
+
*/
|
|
130
|
+
warn(message, ...args) {
|
|
131
|
+
this.log(1 /* WARN */, message, ...args);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Log an info message
|
|
135
|
+
* @param message The message to log
|
|
136
|
+
* @param args Additional arguments to log
|
|
137
|
+
*/
|
|
138
|
+
info(message, ...args) {
|
|
139
|
+
this.log(2 /* INFO */, message, ...args);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Log a debug message
|
|
143
|
+
* @param message The message to log
|
|
144
|
+
* @param args Additional arguments to log
|
|
145
|
+
*/
|
|
146
|
+
debug(message, ...args) {
|
|
147
|
+
this.log(3 /* DEBUG */, message, ...args);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Log a trace message
|
|
151
|
+
* @param message The message to log
|
|
152
|
+
* @param args Additional arguments to log
|
|
153
|
+
*/
|
|
154
|
+
trace(message, ...args) {
|
|
155
|
+
this.log(4 /* TRACE */, message, ...args);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Log a message with a specific log level
|
|
159
|
+
* @param level The log level
|
|
160
|
+
* @param message The message to log
|
|
161
|
+
* @param args Additional arguments to log
|
|
162
|
+
*/
|
|
163
|
+
log(level, message, ...args) {
|
|
164
|
+
if (!this.config.enabled || level > this.config.level) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
if (!this.shouldLogMessage(message)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const isBrowser = typeof window !== "undefined";
|
|
171
|
+
if (isBrowser && this.config.showColors) {
|
|
172
|
+
this.logBrowser(level, message, ...args);
|
|
173
|
+
} else {
|
|
174
|
+
this.logTerminal(level, message, ...args);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
extractContext(message) {
|
|
178
|
+
const contextMatch = message.match(/^\[([^\]]+)\]\s(.*)$/);
|
|
179
|
+
if (!contextMatch) {
|
|
180
|
+
return {
|
|
181
|
+
context: "",
|
|
182
|
+
messageContent: message
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
context: contextMatch[1],
|
|
187
|
+
messageContent: contextMatch[2]
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
matchesFilter(value, matchers) {
|
|
191
|
+
if (!(matchers == null ? void 0 : matchers.length)) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
return matchers.some((matcher) => {
|
|
195
|
+
if (typeof matcher === "string") {
|
|
196
|
+
return value.includes(matcher);
|
|
197
|
+
}
|
|
198
|
+
matcher.lastIndex = 0;
|
|
199
|
+
return matcher.test(value);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
shouldLogMessage(message) {
|
|
203
|
+
var _a, _b;
|
|
204
|
+
const filter = this.config.filter;
|
|
205
|
+
if (!filter) {
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
const hasFilters = Boolean(((_a = filter.contexts) == null ? void 0 : _a.length) || ((_b = filter.messages) == null ? void 0 : _b.length));
|
|
209
|
+
if (!hasFilters) {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
const { context, messageContent } = this.extractContext(message);
|
|
213
|
+
const contextMatches = this.matchesFilter(context, filter.contexts);
|
|
214
|
+
const messageMatches = this.matchesFilter(messageContent, filter.messages);
|
|
215
|
+
const matches = contextMatches || messageMatches;
|
|
216
|
+
return filter.mode === "exclude" ? !matches : matches;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Log a message in terminal/node environment
|
|
220
|
+
*/
|
|
221
|
+
logTerminal(level, message, ...args) {
|
|
222
|
+
let timestamp = "";
|
|
223
|
+
let levelStr = "";
|
|
224
|
+
let contextPart = "";
|
|
225
|
+
const contextMatch = message.match(/^\[([^\]]+)\]\s(.*)$/);
|
|
226
|
+
let messageContent = message;
|
|
227
|
+
if (contextMatch) {
|
|
228
|
+
contextPart = `[${contextMatch[1]}] `;
|
|
229
|
+
messageContent = contextMatch[2];
|
|
230
|
+
}
|
|
231
|
+
if (this.config.showTimestamp) {
|
|
232
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
233
|
+
timestamp = `[${now}] `;
|
|
234
|
+
}
|
|
235
|
+
levelStr = `[${this.levelLabels[level]}] `;
|
|
236
|
+
if (this.config.showColors) {
|
|
237
|
+
const levelColor = this.levelColors[level];
|
|
238
|
+
const contextColor = this.terminalColors.cyan;
|
|
239
|
+
const timestampColor = this.terminalColors.gray;
|
|
240
|
+
const messageColor = this.terminalColors.white;
|
|
241
|
+
timestamp = `${timestampColor}${timestamp}${this.terminalColors.reset}`;
|
|
242
|
+
levelStr = `${levelColor}${levelStr}${this.terminalColors.reset}`;
|
|
243
|
+
if (contextPart) {
|
|
244
|
+
contextPart = `${contextColor}${contextPart}${this.terminalColors.reset}`;
|
|
245
|
+
}
|
|
246
|
+
messageContent = `${messageColor}${messageContent}${this.terminalColors.reset}`;
|
|
247
|
+
}
|
|
248
|
+
const formattedMessage = timestamp + levelStr + contextPart + messageContent;
|
|
249
|
+
switch (level) {
|
|
250
|
+
case 0 /* ERROR */:
|
|
251
|
+
console.error(formattedMessage, ...args);
|
|
252
|
+
break;
|
|
253
|
+
case 1 /* WARN */:
|
|
254
|
+
console.warn(formattedMessage, ...args);
|
|
255
|
+
break;
|
|
256
|
+
case 2 /* INFO */:
|
|
257
|
+
console.info(formattedMessage, ...args);
|
|
258
|
+
break;
|
|
259
|
+
case 3 /* DEBUG */:
|
|
260
|
+
case 4 /* TRACE */:
|
|
261
|
+
default:
|
|
262
|
+
console.log(formattedMessage, ...args);
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Log a message in browser environment with CSS styling
|
|
268
|
+
*/
|
|
269
|
+
logBrowser(level, message, ...args) {
|
|
270
|
+
const contextMatch = message.match(/^\[([^\]]+)\]\s(.*)$/);
|
|
271
|
+
let context = "";
|
|
272
|
+
let messageContent = message;
|
|
273
|
+
if (contextMatch) {
|
|
274
|
+
context = contextMatch[1];
|
|
275
|
+
messageContent = contextMatch[2];
|
|
276
|
+
}
|
|
277
|
+
let format = "";
|
|
278
|
+
const formatArgs = [];
|
|
279
|
+
if (this.config.showTimestamp) {
|
|
280
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
281
|
+
format += "%c[" + now + "] ";
|
|
282
|
+
formatArgs.push(this.browserColors.timestamp);
|
|
283
|
+
}
|
|
284
|
+
format += "%c[" + this.levelLabels[level] + "] ";
|
|
285
|
+
formatArgs.push(this.levelBrowserColors[level]);
|
|
286
|
+
if (context) {
|
|
287
|
+
format += "%c[" + context + "] ";
|
|
288
|
+
formatArgs.push(this.browserColors.context);
|
|
289
|
+
}
|
|
290
|
+
format += "%c" + messageContent;
|
|
291
|
+
formatArgs.push(this.browserColors.message);
|
|
292
|
+
switch (level) {
|
|
293
|
+
case 0 /* ERROR */:
|
|
294
|
+
console.error(format, ...formatArgs, ...args);
|
|
295
|
+
break;
|
|
296
|
+
case 1 /* WARN */:
|
|
297
|
+
console.warn(format, ...formatArgs, ...args);
|
|
298
|
+
break;
|
|
299
|
+
case 2 /* INFO */:
|
|
300
|
+
console.info(format, ...formatArgs, ...args);
|
|
301
|
+
break;
|
|
302
|
+
case 3 /* DEBUG */:
|
|
303
|
+
case 4 /* TRACE */:
|
|
304
|
+
default:
|
|
305
|
+
console.log(format, ...formatArgs, ...args);
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Creates a context-specific logger.
|
|
311
|
+
*
|
|
312
|
+
* Context loggers automatically prefix all log messages with a context tag.
|
|
313
|
+
* Commonly used in plugins and classes to identify log sources.
|
|
314
|
+
*
|
|
315
|
+
* @param context - Context name (e.g., 'MyPlugin', 'SceneManager')
|
|
316
|
+
* @returns ContextLogger instance
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```typescript
|
|
320
|
+
* class DisplayPlugin {
|
|
321
|
+
* private logger = logger.createContextLogger('DisplayPlugin');
|
|
322
|
+
*
|
|
323
|
+
* initialize() {
|
|
324
|
+
* this.logger.info('Initializing display');
|
|
325
|
+
* // Output: [INFO] [DisplayPlugin] Initializing display
|
|
326
|
+
* }
|
|
327
|
+
* }
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
createContextLogger(context) {
|
|
331
|
+
return new ContextLogger(this, context);
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
var ContextLogger = class {
|
|
335
|
+
logger;
|
|
336
|
+
context;
|
|
337
|
+
constructor(logger2, context) {
|
|
338
|
+
this.logger = logger2;
|
|
339
|
+
this.context = context;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Log an error message
|
|
343
|
+
* @param message The message to log
|
|
344
|
+
* @param args Additional arguments to log
|
|
345
|
+
*/
|
|
346
|
+
error(message, ...args) {
|
|
347
|
+
this.logger.error(`[${this.context}] ${message}`, ...args);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Log a warning message
|
|
351
|
+
* @param message The message to log
|
|
352
|
+
* @param args Additional arguments to log
|
|
353
|
+
*/
|
|
354
|
+
warn(message, ...args) {
|
|
355
|
+
this.logger.warn(`[${this.context}] ${message}`, ...args);
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Log an info message
|
|
359
|
+
* @param message The message to log
|
|
360
|
+
* @param args Additional arguments to log
|
|
361
|
+
*/
|
|
362
|
+
info(message, ...args) {
|
|
363
|
+
this.logger.info(`[${this.context}] ${message}`, ...args);
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Log a debug message
|
|
367
|
+
* @param message The message to log
|
|
368
|
+
* @param args Additional arguments to log
|
|
369
|
+
*/
|
|
370
|
+
debug(message, ...args) {
|
|
371
|
+
this.logger.debug(`[${this.context}] ${message}`, ...args);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Log a trace message
|
|
375
|
+
* @param message The message to log
|
|
376
|
+
* @param args Additional arguments to log
|
|
377
|
+
*/
|
|
378
|
+
trace(message, ...args) {
|
|
379
|
+
this.logger.trace(`[${this.context}] ${message}`, ...args);
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
var logger = Logger.getInstance();
|
|
383
|
+
var contextLoggers = /* @__PURE__ */ new Map();
|
|
384
|
+
function getLogger(context) {
|
|
385
|
+
let cached = contextLoggers.get(context);
|
|
386
|
+
if (!cached) {
|
|
387
|
+
cached = new ContextLogger(logger, context);
|
|
388
|
+
contextLoggers.set(context, cached);
|
|
389
|
+
}
|
|
390
|
+
return cached;
|
|
391
|
+
}
|
|
392
|
+
function DataInjector(obj, path, data, replace = false) {
|
|
393
|
+
const result = cloneDeep(obj);
|
|
394
|
+
if (path === "" || path === void 0 || path === null) {
|
|
395
|
+
return merge({}, result, cloneDeep(data));
|
|
396
|
+
}
|
|
397
|
+
if (replace) {
|
|
398
|
+
set(result, path, cloneDeep(data));
|
|
399
|
+
return result;
|
|
400
|
+
}
|
|
401
|
+
const current = get(result, path);
|
|
402
|
+
const merged = merge({}, current ?? {}, data);
|
|
403
|
+
set(result, path, merged);
|
|
404
|
+
return result;
|
|
405
|
+
}
|
|
406
|
+
function adjustColor(color, amount, sign) {
|
|
407
|
+
const colorObj = new Color(color);
|
|
408
|
+
const rgb = {
|
|
409
|
+
r: colorObj.red * 255,
|
|
410
|
+
g: colorObj.green * 255,
|
|
411
|
+
b: colorObj.blue * 255
|
|
412
|
+
};
|
|
413
|
+
const delta = 255 * amount * sign;
|
|
414
|
+
const newR = Math.max(0, Math.min(255, rgb.r + delta));
|
|
415
|
+
const newG = Math.max(0, Math.min(255, rgb.g + delta));
|
|
416
|
+
const newB = Math.max(0, Math.min(255, rgb.b + delta));
|
|
417
|
+
return new Color([newR / 255, newG / 255, newB / 255]);
|
|
418
|
+
}
|
|
419
|
+
function lightenColor(color, amount) {
|
|
420
|
+
return adjustColor(color, amount, 1);
|
|
421
|
+
}
|
|
422
|
+
function darkenColor(color, amount) {
|
|
423
|
+
return adjustColor(color, amount, -1);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// utils/NumberFormatter.ts
|
|
427
|
+
var DEFAULT_CONFIG = {
|
|
428
|
+
mask: "#,##0.##",
|
|
429
|
+
denom: 1,
|
|
430
|
+
expressThreshold: 1e3,
|
|
431
|
+
expressUnits: ["K", "M", "B", "T", "Q"],
|
|
432
|
+
decimalPrecision: 2,
|
|
433
|
+
roundedSymbol: "+"
|
|
434
|
+
};
|
|
435
|
+
var NumberFormatter = class _NumberFormatter {
|
|
436
|
+
static instance;
|
|
437
|
+
config;
|
|
438
|
+
maskCache = /* @__PURE__ */ new Map();
|
|
439
|
+
/**
|
|
440
|
+
* Private constructor for singleton pattern
|
|
441
|
+
*/
|
|
442
|
+
constructor(config) {
|
|
443
|
+
this.config = config;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Configure the NumberFormatter singleton.
|
|
447
|
+
*
|
|
448
|
+
* @param config - Configuration options
|
|
449
|
+
* @returns NumberFormatter instance
|
|
450
|
+
*/
|
|
451
|
+
static configure(config) {
|
|
452
|
+
const finalConfig = { ...DEFAULT_CONFIG, ...config };
|
|
453
|
+
if (!_NumberFormatter.instance) {
|
|
454
|
+
_NumberFormatter.instance = new _NumberFormatter(finalConfig);
|
|
455
|
+
} else {
|
|
456
|
+
_NumberFormatter.instance.config = finalConfig;
|
|
457
|
+
_NumberFormatter.instance.maskCache.clear();
|
|
458
|
+
}
|
|
459
|
+
return _NumberFormatter.instance;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Get the singleton instance.
|
|
463
|
+
*
|
|
464
|
+
* If not configured yet, initializes with default configuration.
|
|
465
|
+
*
|
|
466
|
+
* @returns NumberFormatter instance
|
|
467
|
+
*/
|
|
468
|
+
static getInstance() {
|
|
469
|
+
if (!_NumberFormatter.instance) {
|
|
470
|
+
_NumberFormatter.instance = new _NumberFormatter(DEFAULT_CONFIG);
|
|
471
|
+
}
|
|
472
|
+
return _NumberFormatter.instance;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Format a number using the configured mask.
|
|
476
|
+
*
|
|
477
|
+
* @param value - Number to format
|
|
478
|
+
* @param options - Optional formatting options
|
|
479
|
+
* @returns Formatted string
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```typescript
|
|
483
|
+
* formatter.format(1500); // "$ 15.00"
|
|
484
|
+
* formatter.format(1500, { forceDecimals: true }); // "$ 15.00"
|
|
485
|
+
* formatter.format(1500, { ignoreDenom: true }); // "$ 1,500.00"
|
|
486
|
+
* ```
|
|
487
|
+
*/
|
|
488
|
+
format(value, options = {}) {
|
|
489
|
+
const { prefix = "", forceDecimals = false, ignoreDenom = false } = options;
|
|
490
|
+
const actualValue = ignoreDenom ? value : value * this.config.denom;
|
|
491
|
+
let mask = this.config.mask;
|
|
492
|
+
if (forceDecimals) {
|
|
493
|
+
mask = mask.replace(/\.##/g, ".00");
|
|
494
|
+
}
|
|
495
|
+
return this.applyMask(mask, actualValue) + prefix;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Format a number in express mode (shortened with K/M/B/T).
|
|
499
|
+
*
|
|
500
|
+
* @param value - Number to format
|
|
501
|
+
* @param options - Optional formatting options
|
|
502
|
+
* @returns Formatted string with unit suffix
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```typescript
|
|
506
|
+
* formatter.express(150000); // "$ 1.5K"
|
|
507
|
+
* formatter.express(2500000); // "$ 2.5M"
|
|
508
|
+
* formatter.express(500, { threshold: 100 }); // "$ 0.5K"
|
|
509
|
+
* ```
|
|
510
|
+
*/
|
|
511
|
+
express(value, options = {}) {
|
|
512
|
+
const {
|
|
513
|
+
prefix = "",
|
|
514
|
+
forceDecimals = false,
|
|
515
|
+
ignoreDenom = false,
|
|
516
|
+
threshold = this.config.expressThreshold
|
|
517
|
+
} = options;
|
|
518
|
+
const actualValue = ignoreDenom ? value : value * this.config.denom;
|
|
519
|
+
if (actualValue < threshold) {
|
|
520
|
+
return this.format(value, { prefix, forceDecimals, ignoreDenom });
|
|
521
|
+
}
|
|
522
|
+
let unitIndex = -1;
|
|
523
|
+
let shortenedNum = actualValue;
|
|
524
|
+
while (shortenedNum >= 1e3 && unitIndex < this.config.expressUnits.length - 1) {
|
|
525
|
+
shortenedNum /= 1e3;
|
|
526
|
+
unitIndex++;
|
|
527
|
+
}
|
|
528
|
+
const factor = Math.pow(10, this.config.decimalPrecision);
|
|
529
|
+
const roundedNum = Math.floor(shortenedNum * factor) / factor;
|
|
530
|
+
const isRounded = roundedNum < shortenedNum;
|
|
531
|
+
let mask = this.config.mask;
|
|
532
|
+
if (forceDecimals) {
|
|
533
|
+
mask = mask.replace(/\.##/g, ".00");
|
|
534
|
+
}
|
|
535
|
+
const parsed = this.parseMask(mask);
|
|
536
|
+
const formattedNumber = this.applyMask(parsed.pattern, roundedNum) + (this.config.expressUnits[unitIndex] || "") + (isRounded ? this.config.roundedSymbol : "");
|
|
537
|
+
return parsed.prefix + formattedNumber + parsed.suffix + prefix;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Parse a mask string into its components.
|
|
541
|
+
*
|
|
542
|
+
* @param mask - Mask string to parse
|
|
543
|
+
* @returns Parsed mask information
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
parseMask(mask) {
|
|
547
|
+
if (this.maskCache.has(mask)) {
|
|
548
|
+
return this.maskCache.get(mask);
|
|
549
|
+
}
|
|
550
|
+
const len = mask.length;
|
|
551
|
+
const start = mask.search(/[0-9\-\+#]/);
|
|
552
|
+
const prefix = start > 0 ? mask.substring(0, start).trim() : "";
|
|
553
|
+
const str = mask.split("").reverse().join("");
|
|
554
|
+
const end = str.search(/[0-9\-\+#]/);
|
|
555
|
+
const offset = len - end;
|
|
556
|
+
const indx = offset + (mask.substring(offset, offset + 1) === "." ? 1 : 0);
|
|
557
|
+
const suffix = end > 0 ? mask.substring(indx, len).trim() : "";
|
|
558
|
+
const pattern = mask.substring(start, indx);
|
|
559
|
+
const result = pattern.match(/[^\d\-\+#]/g);
|
|
560
|
+
const decimal = result && result[result.length - 1] || ".";
|
|
561
|
+
const group = result && result[1] && result[0] || ",";
|
|
562
|
+
const parts = pattern.split(decimal);
|
|
563
|
+
const decimalPlaces = parts[1] ? parts[1].length : 0;
|
|
564
|
+
const szSep = parts[0].split(group);
|
|
565
|
+
const groupSize = szSep[1] ? szSep[szSep.length - 1].length : 0;
|
|
566
|
+
const cleanPattern = parts[0].replace(new RegExp(`\\${group}`, "g"), "");
|
|
567
|
+
const posLeadZero = cleanPattern.indexOf("0");
|
|
568
|
+
const parsed = {
|
|
569
|
+
pattern,
|
|
570
|
+
prefix,
|
|
571
|
+
suffix,
|
|
572
|
+
decimal,
|
|
573
|
+
group,
|
|
574
|
+
decimalPlaces,
|
|
575
|
+
posLeadZero,
|
|
576
|
+
groupSize
|
|
577
|
+
};
|
|
578
|
+
this.maskCache.set(mask, parsed);
|
|
579
|
+
return parsed;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Apply a mask to a number value.
|
|
583
|
+
*
|
|
584
|
+
* @param mask - Mask pattern
|
|
585
|
+
* @param value - Number to format
|
|
586
|
+
* @returns Formatted string
|
|
587
|
+
* @internal
|
|
588
|
+
*/
|
|
589
|
+
applyMask(mask, value) {
|
|
590
|
+
if (!mask || isNaN(+value) || value === "") return value;
|
|
591
|
+
const parsed = this.parseMask(mask);
|
|
592
|
+
let isNegative = value < 0;
|
|
593
|
+
value = Math.abs(value);
|
|
594
|
+
const maskParts = parsed.pattern.split(parsed.decimal);
|
|
595
|
+
value = value.toFixed(maskParts[1] ? maskParts[1].length : 0);
|
|
596
|
+
value = +value + "";
|
|
597
|
+
const posTrailZero = maskParts[1] ? maskParts[1].lastIndexOf("0") : -1;
|
|
598
|
+
let parts = value.split(".");
|
|
599
|
+
if (!parts[1] || parts[1] && parts[1].length <= posTrailZero) {
|
|
600
|
+
value = (+value).toFixed(posTrailZero + 1);
|
|
601
|
+
}
|
|
602
|
+
const szSep = maskParts[0].split(parsed.group);
|
|
603
|
+
const cleanMask = szSep.join("");
|
|
604
|
+
if (parsed.posLeadZero > -1) {
|
|
605
|
+
while (parts[0].length < cleanMask.length - parsed.posLeadZero) {
|
|
606
|
+
parts[0] = "0" + parts[0];
|
|
607
|
+
}
|
|
608
|
+
} else if (+parts[0] === 0) {
|
|
609
|
+
parts[0] = "";
|
|
610
|
+
}
|
|
611
|
+
const valueParts = value.split(".");
|
|
612
|
+
valueParts[0] = parts[0];
|
|
613
|
+
if (parsed.groupSize) {
|
|
614
|
+
const integer = valueParts[0];
|
|
615
|
+
let str = "";
|
|
616
|
+
const offset = integer.length % parsed.groupSize;
|
|
617
|
+
const len = integer.length;
|
|
618
|
+
for (let i = 0; i < len; i++) {
|
|
619
|
+
str += integer.charAt(i);
|
|
620
|
+
if (!((i - offset + 1) % parsed.groupSize) && i < len - parsed.groupSize) {
|
|
621
|
+
str += parsed.group;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
valueParts[0] = str;
|
|
625
|
+
}
|
|
626
|
+
valueParts[1] = maskParts[1] && valueParts[1] ? parsed.decimal + valueParts[1] : "";
|
|
627
|
+
const result = valueParts.join("");
|
|
628
|
+
if (result === "0" || result === "") {
|
|
629
|
+
isNegative = false;
|
|
630
|
+
}
|
|
631
|
+
return parsed.prefix + (isNegative ? "-" : "") + result + parsed.suffix;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Decimal/group separators and fraction length from the configured mask.
|
|
635
|
+
* Use for free-form numeric inputs (e.g. bet multipliers) that are not currency amounts.
|
|
636
|
+
*/
|
|
637
|
+
getMaskLocale() {
|
|
638
|
+
const parsed = this.parseMask(this.config.mask);
|
|
639
|
+
return {
|
|
640
|
+
decimal: parsed.decimal,
|
|
641
|
+
group: parsed.group,
|
|
642
|
+
decimalPlaces: parsed.decimalPlaces > 0 ? parsed.decimalPlaces : this.config.decimalPrecision
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Format a number using only the numeric portion of the mask (no prefix/suffix, no denom).
|
|
647
|
+
* Suitable for multipliers and limits (e.g. autoplay 10.5× bet).
|
|
648
|
+
*/
|
|
649
|
+
formatPlainNumber(value, options = {}) {
|
|
650
|
+
const { forceDecimals = false } = options;
|
|
651
|
+
const parsed = this.parseMask(this.config.mask);
|
|
652
|
+
let pattern = parsed.pattern;
|
|
653
|
+
if (forceDecimals) {
|
|
654
|
+
pattern = pattern.replace(/\.##/g, ".00");
|
|
655
|
+
}
|
|
656
|
+
return this.applyMask(pattern, value);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Get current configuration.
|
|
660
|
+
*
|
|
661
|
+
* @returns Current configuration
|
|
662
|
+
*/
|
|
663
|
+
getConfig() {
|
|
664
|
+
return { ...this.config };
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
// utils/ArrayUtils.ts
|
|
669
|
+
Object.defineProperty(Array.prototype, "exclude", {
|
|
670
|
+
value: function(...indexToExclude) {
|
|
671
|
+
return this.filter((_, index) => !indexToExclude.includes(index));
|
|
672
|
+
},
|
|
673
|
+
enumerable: false
|
|
674
|
+
});
|
|
675
|
+
Object.defineProperty(Array.prototype, "random", {
|
|
676
|
+
value: function() {
|
|
677
|
+
const randomIndex = Math.floor(Math.random() * this.length);
|
|
678
|
+
return this[randomIndex];
|
|
679
|
+
},
|
|
680
|
+
enumerable: false
|
|
681
|
+
});
|
|
682
|
+
Object.defineProperty(Array.prototype, "lastItem", {
|
|
683
|
+
value: function() {
|
|
684
|
+
return this[this.length - 1];
|
|
685
|
+
},
|
|
686
|
+
enumerable: false
|
|
687
|
+
});
|
|
688
|
+
Object.defineProperty(Array.prototype, "firstItem", {
|
|
689
|
+
value: function() {
|
|
690
|
+
return this[0];
|
|
691
|
+
},
|
|
692
|
+
enumerable: false
|
|
693
|
+
});
|
|
694
|
+
Object.defineProperty(Array.prototype, "clone", {
|
|
695
|
+
value: function() {
|
|
696
|
+
return [...this];
|
|
697
|
+
},
|
|
698
|
+
enumerable: false
|
|
699
|
+
});
|
|
700
|
+
Object.defineProperty(Array.prototype, "shuffle", {
|
|
701
|
+
value: function() {
|
|
702
|
+
const array = [...this];
|
|
703
|
+
for (let i = array.length - 1; i > 0; i--) {
|
|
704
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
705
|
+
[array[i], array[j]] = [array[j], array[i]];
|
|
706
|
+
}
|
|
707
|
+
return array;
|
|
708
|
+
},
|
|
709
|
+
enumerable: false
|
|
710
|
+
});
|
|
711
|
+
var __arrayUtilsLoaded = true;
|
|
712
|
+
|
|
713
|
+
// utils/ObjectUtils.ts
|
|
714
|
+
function getNestedValue(obj, path) {
|
|
715
|
+
return path.split(".").reduce((current, key) => current == null ? void 0 : current[key], obj);
|
|
716
|
+
}
|
|
717
|
+
function setNestedValue(obj, path, value) {
|
|
718
|
+
const keys = path.split(".");
|
|
719
|
+
const lastKey = keys.pop();
|
|
720
|
+
const target = keys.reduce((current, key) => {
|
|
721
|
+
if (current[key] === void 0 || current[key] === null) {
|
|
722
|
+
current[key] = {};
|
|
723
|
+
}
|
|
724
|
+
return current[key];
|
|
725
|
+
}, obj);
|
|
726
|
+
target[lastKey] = value;
|
|
727
|
+
}
|
|
728
|
+
function hasNestedProperty(obj, path) {
|
|
729
|
+
return getNestedValue(obj, path) !== void 0;
|
|
730
|
+
}
|
|
731
|
+
function deepClone(obj) {
|
|
732
|
+
return structuredClone(obj);
|
|
733
|
+
}
|
|
734
|
+
function calculateAnimationSpeed(exportedFps = 12, speed = 1) {
|
|
735
|
+
return exportedFps / 60 * speed;
|
|
736
|
+
}
|
|
737
|
+
function applyAnchor(element, anchor, defaultAnchor) {
|
|
738
|
+
if (!("anchor" in element)) return;
|
|
739
|
+
const elementWithAnchor = element;
|
|
740
|
+
if (anchor) {
|
|
741
|
+
elementWithAnchor.anchor.set(anchor.x, anchor.y);
|
|
742
|
+
} else if (defaultAnchor) {
|
|
743
|
+
elementWithAnchor.anchor.set(defaultAnchor.x, defaultAnchor.y);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
function applyScale(element, scale) {
|
|
747
|
+
if (scale === void 0) return;
|
|
748
|
+
if (typeof scale === "number") {
|
|
749
|
+
element.scale.set(scale);
|
|
750
|
+
} else {
|
|
751
|
+
element.scale.set(scale.x, scale.y);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
function applyCommonProperties(element, config) {
|
|
755
|
+
if (config.alpha !== void 0) {
|
|
756
|
+
element.alpha = config.alpha;
|
|
757
|
+
}
|
|
758
|
+
if (config.blendMode) {
|
|
759
|
+
element.blendMode = config.blendMode;
|
|
760
|
+
}
|
|
761
|
+
applyScale(element, config.scale);
|
|
762
|
+
}
|
|
763
|
+
function updateBounds(existingBounds, x, y, width, height) {
|
|
764
|
+
if (existingBounds instanceof Rectangle) {
|
|
765
|
+
existingBounds.x = x;
|
|
766
|
+
existingBounds.y = y;
|
|
767
|
+
existingBounds.width = width;
|
|
768
|
+
existingBounds.height = height;
|
|
769
|
+
return existingBounds;
|
|
770
|
+
}
|
|
771
|
+
return new Rectangle(x, y, width, height);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// utils/Throttle.ts
|
|
775
|
+
function debounce(func, wait = 0, options = {}) {
|
|
776
|
+
let lastArgs;
|
|
777
|
+
let lastThis;
|
|
778
|
+
const maxWait = options.maxWait ? options.maxWait : wait;
|
|
779
|
+
let result;
|
|
780
|
+
let timerId;
|
|
781
|
+
let lastCallTime;
|
|
782
|
+
let lastInvokeTime = 0;
|
|
783
|
+
const leading = !!options.leading;
|
|
784
|
+
const maxing = "maxWait" in options;
|
|
785
|
+
const trailing = options.trailing ?? true;
|
|
786
|
+
const useRAF = wait !== 0 && typeof globalThis.requestAnimationFrame === "function";
|
|
787
|
+
if (typeof func !== "function") {
|
|
788
|
+
throw new TypeError("Expected a function");
|
|
789
|
+
}
|
|
790
|
+
function invokeFunc(time) {
|
|
791
|
+
const args = lastArgs;
|
|
792
|
+
const thisArg = lastThis;
|
|
793
|
+
lastArgs = lastThis = void 0;
|
|
794
|
+
lastInvokeTime = time;
|
|
795
|
+
result = func.apply(thisArg, args);
|
|
796
|
+
return result;
|
|
797
|
+
}
|
|
798
|
+
function startTimer(pendingFunc, milliseconds) {
|
|
799
|
+
if (useRAF) {
|
|
800
|
+
if (typeof timerId === "number") {
|
|
801
|
+
globalThis.cancelAnimationFrame(timerId);
|
|
802
|
+
}
|
|
803
|
+
return globalThis.requestAnimationFrame(pendingFunc);
|
|
804
|
+
}
|
|
805
|
+
return setTimeout(pendingFunc, milliseconds);
|
|
806
|
+
}
|
|
807
|
+
function cancelTimer(id) {
|
|
808
|
+
if (useRAF) {
|
|
809
|
+
globalThis.cancelAnimationFrame(id);
|
|
810
|
+
return;
|
|
811
|
+
}
|
|
812
|
+
clearTimeout(id);
|
|
813
|
+
}
|
|
814
|
+
function leadingEdge(time) {
|
|
815
|
+
lastInvokeTime = time;
|
|
816
|
+
timerId = startTimer(timerExpired, wait);
|
|
817
|
+
return leading ? invokeFunc(time) : result;
|
|
818
|
+
}
|
|
819
|
+
function remainingWait(time) {
|
|
820
|
+
const timeSinceLastCall = time - (lastCallTime || 0);
|
|
821
|
+
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
822
|
+
const timeWaiting = wait - timeSinceLastCall;
|
|
823
|
+
return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
824
|
+
}
|
|
825
|
+
function shouldInvoke(time) {
|
|
826
|
+
const timeSinceLastCall = time - (lastCallTime || 0);
|
|
827
|
+
const timeSinceLastInvoke = time - lastInvokeTime;
|
|
828
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
829
|
+
}
|
|
830
|
+
function timerExpired() {
|
|
831
|
+
const time = Date.now();
|
|
832
|
+
if (shouldInvoke(time)) {
|
|
833
|
+
return trailingEdge(time);
|
|
834
|
+
}
|
|
835
|
+
timerId = startTimer(timerExpired, remainingWait(time));
|
|
836
|
+
return void 0;
|
|
837
|
+
}
|
|
838
|
+
function trailingEdge(time) {
|
|
839
|
+
timerId = void 0;
|
|
840
|
+
if (trailing && lastArgs) {
|
|
841
|
+
return invokeFunc(time);
|
|
842
|
+
}
|
|
843
|
+
lastArgs = lastThis = void 0;
|
|
844
|
+
return result;
|
|
845
|
+
}
|
|
846
|
+
function cancel() {
|
|
847
|
+
if (timerId !== void 0) {
|
|
848
|
+
cancelTimer(timerId);
|
|
849
|
+
}
|
|
850
|
+
lastInvokeTime = 0;
|
|
851
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
852
|
+
}
|
|
853
|
+
function flush() {
|
|
854
|
+
return timerId === void 0 ? result : trailingEdge(Date.now());
|
|
855
|
+
}
|
|
856
|
+
function pending() {
|
|
857
|
+
return timerId !== void 0;
|
|
858
|
+
}
|
|
859
|
+
function debounced(...args) {
|
|
860
|
+
const time = Date.now();
|
|
861
|
+
const isInvoking = shouldInvoke(time);
|
|
862
|
+
lastArgs = args;
|
|
863
|
+
lastThis = this;
|
|
864
|
+
lastCallTime = time;
|
|
865
|
+
if (isInvoking) {
|
|
866
|
+
if (timerId === void 0) {
|
|
867
|
+
return leadingEdge(lastCallTime);
|
|
868
|
+
}
|
|
869
|
+
if (maxing) {
|
|
870
|
+
timerId = startTimer(timerExpired, wait);
|
|
871
|
+
return invokeFunc(lastCallTime);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
if (timerId === void 0) {
|
|
875
|
+
timerId = startTimer(timerExpired, wait);
|
|
876
|
+
}
|
|
877
|
+
return result;
|
|
878
|
+
}
|
|
879
|
+
debounced.cancel = cancel;
|
|
880
|
+
debounced.flush = flush;
|
|
881
|
+
debounced.pending = pending;
|
|
882
|
+
return debounced;
|
|
883
|
+
}
|
|
884
|
+
function throttle(func, wait, options = {}) {
|
|
885
|
+
const leading = options.leading ?? true;
|
|
886
|
+
const trailing = options.trailing ?? true;
|
|
887
|
+
if (typeof func !== "function") {
|
|
888
|
+
throw new TypeError("Expected a function");
|
|
889
|
+
}
|
|
890
|
+
return debounce(func, wait, {
|
|
891
|
+
leading,
|
|
892
|
+
trailing,
|
|
893
|
+
maxWait: wait
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export { ContextLogger, DataInjector, LogLevel, Logger, NumberFormatter, __arrayUtilsLoaded, applyAnchor, applyCommonProperties, applyScale, calculateAnimationSpeed, darkenColor, debounce, deepClone, getLogger, getNestedValue, hasNestedProperty, lightenColor, logger, setNestedValue, throttle, updateBounds };
|
|
898
|
+
//# sourceMappingURL=index.js.map
|
|
899
|
+
//# sourceMappingURL=index.js.map
|