@caperjs/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/LICENSE +22 -0
- package/README.md +62 -0
- package/cli/add.mjs +197 -0
- package/cli/audio/cc.mjs +128 -0
- package/cli/audio/index.mjs +42 -0
- package/cli/audio/utils.mjs +56 -0
- package/cli/create-caper.mjs +8 -0
- package/cli/create.mjs +351 -0
- package/cli/install-peerdeps.mjs +57 -0
- package/cli/update.mjs +9 -0
- package/cli/utils.mjs +81 -0
- package/cli/vite.mjs +55 -0
- package/cli/voiceover/generateVoiceoverCSV.mjs +158 -0
- package/cli/voiceover/index.mjs +1 -0
- package/cli.mjs +157 -0
- package/client.d.ts +7 -0
- package/config/assetpack.mjs +212 -0
- package/config/tsconfig.base.json +28 -0
- package/config/vite.mjs +2464 -0
- package/extras/css/accessibility.css +9 -0
- package/extras/css/fullscreen.css +28 -0
- package/extras/css/loader.css +67 -0
- package/extras/llms.txt +1602 -0
- package/lib/CaptionsPlugin-Dc8fIrjy.js +277 -0
- package/lib/CaptionsPlugin-Dc8fIrjy.js.map +1 -0
- package/lib/DataAdapter-BY2114sp.js +84 -0
- package/lib/DataAdapter-BY2114sp.js.map +1 -0
- package/lib/DebugRenderer-BJMLILqI.js +1385 -0
- package/lib/DebugRenderer-BJMLILqI.js.map +1 -0
- package/lib/DevToolsPlugin-wQ5rOkn0.js +31 -0
- package/lib/DevToolsPlugin-wQ5rOkn0.js.map +1 -0
- package/lib/GSAPPlugin-DHhSZKv8.js +350 -0
- package/lib/GSAPPlugin-DHhSZKv8.js.map +1 -0
- package/lib/LayoutPlugin-B-DF9SYM.js +1271 -0
- package/lib/LayoutPlugin-B-DF9SYM.js.map +1 -0
- package/lib/SpinePlugin-Dz_3dljz.js +6077 -0
- package/lib/SpinePlugin-Dz_3dljz.js.map +1 -0
- package/lib/StatsPlugin-Cg82JMBD.js +70 -0
- package/lib/StatsPlugin-Cg82JMBD.js.map +1 -0
- package/lib/VoiceOverPlugin-BR3ImT8C.js +114 -0
- package/lib/VoiceOverPlugin-BR3ImT8C.js.map +1 -0
- package/lib/caper.mjs +1233 -0
- package/lib/caper.mjs.map +1 -0
- package/lib/core/Application.d.ts +268 -0
- package/lib/core/Application.d.ts.map +1 -0
- package/lib/core/config.d.ts +39 -0
- package/lib/core/config.d.ts.map +1 -0
- package/lib/core/create.d.ts +41 -0
- package/lib/core/create.d.ts.map +1 -0
- package/lib/core/globals.d.ts +51 -0
- package/lib/core/globals.d.ts.map +1 -0
- package/lib/core/index.d.ts +7 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/interfaces/IApplication.d.ts +566 -0
- package/lib/core/interfaces/IApplication.d.ts.map +1 -0
- package/lib/core/interfaces/IApplicationOptions.d.ts +65 -0
- package/lib/core/interfaces/IApplicationOptions.d.ts.map +1 -0
- package/lib/core/interfaces/ICoreFunctions.d.ts +49 -0
- package/lib/core/interfaces/ICoreFunctions.d.ts.map +1 -0
- package/lib/core/interfaces/ICoreSignals.d.ts +57 -0
- package/lib/core/interfaces/ICoreSignals.d.ts.map +1 -0
- package/lib/core/interfaces/IStorageCapability.d.ts +20 -0
- package/lib/core/interfaces/IStorageCapability.d.ts.map +1 -0
- package/lib/core/interfaces/IStorageCapability.test.d.ts +2 -0
- package/lib/core/interfaces/IStorageCapability.test.d.ts.map +1 -0
- package/lib/core/interfaces/index.d.ts +7 -0
- package/lib/core/interfaces/index.d.ts.map +1 -0
- package/lib/core/registries.d.ts +8 -0
- package/lib/core/registries.d.ts.map +1 -0
- package/lib/core/types.d.ts +12 -0
- package/lib/core/types.d.ts.map +1 -0
- package/lib/display/AnimatedSprite.d.ts +40 -0
- package/lib/display/AnimatedSprite.d.ts.map +1 -0
- package/lib/display/Camera.d.ts +102 -0
- package/lib/display/Camera.d.ts.map +1 -0
- package/lib/display/Container.d.ts +115 -0
- package/lib/display/Container.d.ts.map +1 -0
- package/lib/display/Entity.d.ts +46 -0
- package/lib/display/Entity.d.ts.map +1 -0
- package/lib/display/ParticleContainer.d.ts +58 -0
- package/lib/display/ParticleContainer.d.ts.map +1 -0
- package/lib/display/Scene.d.ts +250 -0
- package/lib/display/Scene.d.ts.map +1 -0
- package/lib/display/SceneTransition.d.ts +41 -0
- package/lib/display/SceneTransition.d.ts.map +1 -0
- package/lib/display/SpineAnimation.d.ts +76 -0
- package/lib/display/SpineAnimation.d.ts.map +1 -0
- package/lib/display/Svg.d.ts +5 -0
- package/lib/display/Svg.d.ts.map +1 -0
- package/lib/display/index.d.ts +10 -0
- package/lib/display/index.d.ts.map +1 -0
- package/lib/env.d.ts +6 -0
- package/lib/hello.d.ts +2 -0
- package/lib/hello.d.ts.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/mixins/animated.d.ts +53 -0
- package/lib/mixins/animated.d.ts.map +1 -0
- package/lib/mixins/factory/Factory.d.ts +8 -0
- package/lib/mixins/factory/Factory.d.ts.map +1 -0
- package/lib/mixins/factory/const.d.ts +67 -0
- package/lib/mixins/factory/const.d.ts.map +1 -0
- package/lib/mixins/factory/index.d.ts +8 -0
- package/lib/mixins/factory/index.d.ts.map +1 -0
- package/lib/mixins/factory/methods.d.ts +3 -0
- package/lib/mixins/factory/methods.d.ts.map +1 -0
- package/lib/mixins/factory/props.d.ts +160 -0
- package/lib/mixins/factory/props.d.ts.map +1 -0
- package/lib/mixins/factory/registry.d.ts +27 -0
- package/lib/mixins/factory/registry.d.ts.map +1 -0
- package/lib/mixins/factory/registry.test.d.ts +2 -0
- package/lib/mixins/factory/registry.test.d.ts.map +1 -0
- package/lib/mixins/factory/schema.d.ts +71 -0
- package/lib/mixins/factory/schema.d.ts.map +1 -0
- package/lib/mixins/factory/ui-registry.d.ts +20 -0
- package/lib/mixins/factory/ui-registry.d.ts.map +1 -0
- package/lib/mixins/factory/utils.d.ts +11 -0
- package/lib/mixins/factory/utils.d.ts.map +1 -0
- package/lib/mixins/focus.d.ts +15 -0
- package/lib/mixins/focus.d.ts.map +1 -0
- package/lib/mixins/index.d.ts +6 -0
- package/lib/mixins/index.d.ts.map +1 -0
- package/lib/mixins/interaction.d.ts +20 -0
- package/lib/mixins/interaction.d.ts.map +1 -0
- package/lib/mixins/signals.d.ts +15 -0
- package/lib/mixins/signals.d.ts.map +1 -0
- package/lib/plugins/AssetsPlugin.d.ts +79 -0
- package/lib/plugins/AssetsPlugin.d.ts.map +1 -0
- package/lib/plugins/DataAdapter.d.ts +95 -0
- package/lib/plugins/DataAdapter.d.ts.map +1 -0
- package/lib/plugins/DevToolsPlugin.d.ts +97 -0
- package/lib/plugins/DevToolsPlugin.d.ts.map +1 -0
- package/lib/plugins/FullScreenPlugin.d.ts +240 -0
- package/lib/plugins/FullScreenPlugin.d.ts.map +1 -0
- package/lib/plugins/GSAPPlugin.d.ts +634 -0
- package/lib/plugins/GSAPPlugin.d.ts.map +1 -0
- package/lib/plugins/KeyboardPlugin.d.ts +53 -0
- package/lib/plugins/KeyboardPlugin.d.ts.map +1 -0
- package/lib/plugins/LayoutPlugin.d.ts +100 -0
- package/lib/plugins/LayoutPlugin.d.ts.map +1 -0
- package/lib/plugins/LookupPlugin.d.ts +223 -0
- package/lib/plugins/LookupPlugin.d.ts.map +1 -0
- package/lib/plugins/Plugin.d.ts +132 -0
- package/lib/plugins/Plugin.d.ts.map +1 -0
- package/lib/plugins/Plugin.test.d.ts +2 -0
- package/lib/plugins/Plugin.test.d.ts.map +1 -0
- package/lib/plugins/PopupManagerPlugin.d.ts +108 -0
- package/lib/plugins/PopupManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/ResizerPlugin.d.ts +62 -0
- package/lib/plugins/ResizerPlugin.d.ts.map +1 -0
- package/lib/plugins/SceneManagerPlugin.d.ts +122 -0
- package/lib/plugins/SceneManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/StatsPlugin.d.ts +8 -0
- package/lib/plugins/StatsPlugin.d.ts.map +1 -0
- package/lib/plugins/TimerPlugin.d.ts +401 -0
- package/lib/plugins/TimerPlugin.d.ts.map +1 -0
- package/lib/plugins/WebEventsPlugin.d.ts +60 -0
- package/lib/plugins/WebEventsPlugin.d.ts.map +1 -0
- package/lib/plugins/actions/ActionsPlugin.d.ts +39 -0
- package/lib/plugins/actions/ActionsPlugin.d.ts.map +1 -0
- package/lib/plugins/actions/constants.d.ts +52 -0
- package/lib/plugins/actions/constants.d.ts.map +1 -0
- package/lib/plugins/actions/index.d.ts +5 -0
- package/lib/plugins/actions/index.d.ts.map +1 -0
- package/lib/plugins/actions/methods.d.ts +11 -0
- package/lib/plugins/actions/methods.d.ts.map +1 -0
- package/lib/plugins/actions/types.d.ts +25 -0
- package/lib/plugins/actions/types.d.ts.map +1 -0
- package/lib/plugins/audio/AudioChannel.d.ts +46 -0
- package/lib/plugins/audio/AudioChannel.d.ts.map +1 -0
- package/lib/plugins/audio/AudioChannel.test.d.ts +2 -0
- package/lib/plugins/audio/AudioChannel.test.d.ts.map +1 -0
- package/lib/plugins/audio/AudioInstance.d.ts +79 -0
- package/lib/plugins/audio/AudioInstance.d.ts.map +1 -0
- package/lib/plugins/audio/AudioManagerPlugin.d.ts +323 -0
- package/lib/plugins/audio/AudioManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/audio/VoiceOverPlugin.d.ts +69 -0
- package/lib/plugins/audio/VoiceOverPlugin.d.ts.map +1 -0
- package/lib/plugins/audio/index.d.ts +4 -0
- package/lib/plugins/audio/index.d.ts.map +1 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.d.ts +109 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.d.ts.map +1 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.test.d.ts +2 -0
- package/lib/plugins/breakpoints/BreakpointPlugin.test.d.ts.map +1 -0
- package/lib/plugins/breakpoints/evaluate.d.ts +53 -0
- package/lib/plugins/breakpoints/evaluate.d.ts.map +1 -0
- package/lib/plugins/breakpoints/evaluate.test.d.ts +2 -0
- package/lib/plugins/breakpoints/evaluate.test.d.ts.map +1 -0
- package/lib/plugins/breakpoints/index.d.ts +4 -0
- package/lib/plugins/breakpoints/index.d.ts.map +1 -0
- package/lib/plugins/breakpoints/methods.d.ts +23 -0
- package/lib/plugins/breakpoints/methods.d.ts.map +1 -0
- package/lib/plugins/breakpoints/types.d.ts +70 -0
- package/lib/plugins/breakpoints/types.d.ts.map +1 -0
- package/lib/plugins/captions/CaptionsPlugin.d.ts +150 -0
- package/lib/plugins/captions/CaptionsPlugin.d.ts.map +1 -0
- package/lib/plugins/captions/CaptionsRenderer.d.ts +37 -0
- package/lib/plugins/captions/CaptionsRenderer.d.ts.map +1 -0
- package/lib/plugins/captions/index.d.ts +3 -0
- package/lib/plugins/captions/index.d.ts.map +1 -0
- package/lib/plugins/defaults.d.ts +4 -0
- package/lib/plugins/defaults.d.ts.map +1 -0
- package/lib/plugins/focus/FocusManagerPlugin.d.ts +148 -0
- package/lib/plugins/focus/FocusManagerPlugin.d.ts.map +1 -0
- package/lib/plugins/focus/FocusOutliner.d.ts +32 -0
- package/lib/plugins/focus/FocusOutliner.d.ts.map +1 -0
- package/lib/plugins/focus/index.d.ts +3 -0
- package/lib/plugins/focus/index.d.ts.map +1 -0
- package/lib/plugins/i18nPlugin.d.ts +128 -0
- package/lib/plugins/i18nPlugin.d.ts.map +1 -0
- package/lib/plugins/index.d.ts +18 -0
- package/lib/plugins/index.d.ts.map +1 -0
- package/lib/plugins/input/AbstractControls.d.ts +8 -0
- package/lib/plugins/input/AbstractControls.d.ts.map +1 -0
- package/lib/plugins/input/Controls.d.ts +16 -0
- package/lib/plugins/input/Controls.d.ts.map +1 -0
- package/lib/plugins/input/InputPlugin.d.ts +52 -0
- package/lib/plugins/input/InputPlugin.d.ts.map +1 -0
- package/lib/plugins/input/constants.d.ts +8 -0
- package/lib/plugins/input/constants.d.ts.map +1 -0
- package/lib/plugins/input/index.d.ts +10 -0
- package/lib/plugins/input/index.d.ts.map +1 -0
- package/lib/plugins/input/interfaces.d.ts +30 -0
- package/lib/plugins/input/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts +28 -0
- package/lib/plugins/input/keyboard/KeyboardContols.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/index.d.ts +3 -0
- package/lib/plugins/input/keyboard/index.d.ts.map +1 -0
- package/lib/plugins/input/keyboard/interfaces.d.ts +18 -0
- package/lib/plugins/input/keyboard/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/methods.d.ts +4 -0
- package/lib/plugins/input/methods.d.ts.map +1 -0
- package/lib/plugins/input/touch/TouchControls.d.ts +35 -0
- package/lib/plugins/input/touch/TouchControls.d.ts.map +1 -0
- package/lib/plugins/input/touch/constants.d.ts +14 -0
- package/lib/plugins/input/touch/constants.d.ts.map +1 -0
- package/lib/plugins/input/touch/index.d.ts +4 -0
- package/lib/plugins/input/touch/index.d.ts.map +1 -0
- package/lib/plugins/input/touch/interfaces.d.ts +15 -0
- package/lib/plugins/input/touch/interfaces.d.ts.map +1 -0
- package/lib/plugins/input/types.d.ts +32 -0
- package/lib/plugins/input/types.d.ts.map +1 -0
- package/lib/plugins/input/utils.d.ts +23 -0
- package/lib/plugins/input/utils.d.ts.map +1 -0
- package/lib/plugins/spine/SpinePlugin.d.ts +6 -0
- package/lib/plugins/spine/SpinePlugin.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/BatchableSpineSlot.d.ts +31 -0
- package/lib/plugins/spine/pixi-spine/BatchableSpineSlot.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/Spine.d.ts +211 -0
- package/lib/plugins/spine/pixi-spine/Spine.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpineDebugRenderer.d.ts +81 -0
- package/lib/plugins/spine/pixi-spine/SpineDebugRenderer.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpinePipe.d.ts +21 -0
- package/lib/plugins/spine/pixi-spine/SpinePipe.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/SpineTexture.d.ts +16 -0
- package/lib/plugins/spine/pixi-spine/SpineTexture.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/assets/atlasLoader.d.ts +10 -0
- package/lib/plugins/spine/pixi-spine/assets/atlasLoader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/assets/skeletonLoader.d.ts +6 -0
- package/lib/plugins/spine/pixi-spine/assets/skeletonLoader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.d.ts +5 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatcher.d.ts +22 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintBatcher.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintShader.d.ts +5 -0
- package/lib/plugins/spine/pixi-spine/darktint/DarkTintShader.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/darktint/darkTintBit.d.ts +51 -0
- package/lib/plugins/spine/pixi-spine/darktint/darkTintBit.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/index.d.ts +9 -0
- package/lib/plugins/spine/pixi-spine/index.d.ts.map +1 -0
- package/lib/plugins/spine/pixi-spine/require-shim.d.ts +34 -0
- package/lib/plugins/spine/pixi-spine/require-shim.d.ts.map +1 -0
- package/lib/registries-CYCaYKZI.js +6885 -0
- package/lib/registries-CYCaYKZI.js.map +1 -0
- package/lib/signals/Signal.d.ts +16 -0
- package/lib/signals/Signal.d.ts.map +1 -0
- package/lib/signals/Signal.test.d.ts +2 -0
- package/lib/signals/Signal.test.d.ts.map +1 -0
- package/lib/signals/index.d.ts +3 -0
- package/lib/signals/index.d.ts.map +1 -0
- package/lib/store/Store.d.ts +56 -0
- package/lib/store/Store.d.ts.map +1 -0
- package/lib/store/Store.test.d.ts +2 -0
- package/lib/store/Store.test.d.ts.map +1 -0
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/types/framework.d.ts +46 -0
- package/lib/types/gsap.d.ts +23 -0
- package/lib/ui/Button.d.ts +162 -0
- package/lib/ui/Button.d.ts.map +1 -0
- package/lib/ui/FlexContainer.d.ts +109 -0
- package/lib/ui/FlexContainer.d.ts.map +1 -0
- package/lib/ui/Input.d.ts +384 -0
- package/lib/ui/Input.d.ts.map +1 -0
- package/lib/ui/Joystick.d.ts +61 -0
- package/lib/ui/Joystick.d.ts.map +1 -0
- package/lib/ui/Popup.d.ts +109 -0
- package/lib/ui/Popup.d.ts.map +1 -0
- package/lib/ui/Toast.d.ts +131 -0
- package/lib/ui/Toast.d.ts.map +1 -0
- package/lib/ui/Toaster.d.ts +188 -0
- package/lib/ui/Toaster.d.ts.map +1 -0
- package/lib/ui/UICanvas.d.ts +155 -0
- package/lib/ui/UICanvas.d.ts.map +1 -0
- package/lib/ui/index.d.ts +9 -0
- package/lib/ui/index.d.ts.map +1 -0
- package/lib/utils/array.d.ts +11 -0
- package/lib/utils/array.d.ts.map +1 -0
- package/lib/utils/bind.d.ts +21 -0
- package/lib/utils/bind.d.ts.map +1 -0
- package/lib/utils/canvas.d.ts +2 -0
- package/lib/utils/canvas.d.ts.map +1 -0
- package/lib/utils/color.d.ts +66 -0
- package/lib/utils/color.d.ts.map +1 -0
- package/lib/utils/console/Logger.d.ts +15 -0
- package/lib/utils/console/Logger.d.ts.map +1 -0
- package/lib/utils/console/index.d.ts +2 -0
- package/lib/utils/console/index.d.ts.map +1 -0
- package/lib/utils/debug.d.ts +34 -0
- package/lib/utils/debug.d.ts.map +1 -0
- package/lib/utils/define.d.ts +100 -0
- package/lib/utils/define.d.ts.map +1 -0
- package/lib/utils/env.d.ts +4 -0
- package/lib/utils/env.d.ts.map +1 -0
- package/lib/utils/events.d.ts +12 -0
- package/lib/utils/events.d.ts.map +1 -0
- package/lib/utils/framework.d.ts +12 -0
- package/lib/utils/framework.d.ts.map +1 -0
- package/lib/utils/index.d.ts +28 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/map.d.ts +31 -0
- package/lib/utils/map.d.ts.map +1 -0
- package/lib/utils/math.d.ts +15 -0
- package/lib/utils/math.d.ts.map +1 -0
- package/lib/utils/misc.d.ts +13 -0
- package/lib/utils/misc.d.ts.map +1 -0
- package/lib/utils/number.d.ts +2 -0
- package/lib/utils/number.d.ts.map +1 -0
- package/lib/utils/object.d.ts +21 -0
- package/lib/utils/object.d.ts.map +1 -0
- package/lib/utils/padding.d.ts +4 -0
- package/lib/utils/padding.d.ts.map +1 -0
- package/lib/utils/pixi.d.ts +42 -0
- package/lib/utils/pixi.d.ts.map +1 -0
- package/lib/utils/platform.d.ts +20 -0
- package/lib/utils/platform.d.ts.map +1 -0
- package/lib/utils/point.d.ts +66 -0
- package/lib/utils/point.d.ts.map +1 -0
- package/lib/utils/promise/Queue.d.ts +60 -0
- package/lib/utils/promise/Queue.d.ts.map +1 -0
- package/lib/utils/promise/functions.d.ts +14 -0
- package/lib/utils/promise/functions.d.ts.map +1 -0
- package/lib/utils/promise/index.d.ts +3 -0
- package/lib/utils/promise/index.d.ts.map +1 -0
- package/lib/utils/random.d.ts +42 -0
- package/lib/utils/random.d.ts.map +1 -0
- package/lib/utils/rect.d.ts +26 -0
- package/lib/utils/rect.d.ts.map +1 -0
- package/lib/utils/set.d.ts +15 -0
- package/lib/utils/set.d.ts.map +1 -0
- package/lib/utils/string.d.ts +3 -0
- package/lib/utils/string.d.ts.map +1 -0
- package/lib/utils/text.d.ts +3 -0
- package/lib/utils/text.d.ts.map +1 -0
- package/lib/utils/typefilters.d.ts +4 -0
- package/lib/utils/typefilters.d.ts.map +1 -0
- package/lib/utils/types.d.ts +209 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/vite.d.ts +25 -0
- package/lib/utils/vite.d.ts.map +1 -0
- package/lib/utils/web.d.ts +3 -0
- package/lib/utils/web.d.ts.map +1 -0
- package/lib/version.d.ts +3 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/webgl-check.d.ts +2 -0
- package/lib/webgl-check.d.ts.map +1 -0
- package/package.json +138 -0
- package/src/core/Application.ts +1091 -0
- package/src/core/config.ts +168 -0
- package/src/core/create.ts +186 -0
- package/src/core/globals.ts +299 -0
- package/src/core/index.ts +6 -0
- package/src/core/interfaces/IApplication.ts +628 -0
- package/src/core/interfaces/IApplicationOptions.ts +81 -0
- package/src/core/interfaces/ICoreFunctions.ts +86 -0
- package/src/core/interfaces/ICoreSignals.ts +77 -0
- package/src/core/interfaces/IStorageCapability.test.ts +27 -0
- package/src/core/interfaces/IStorageCapability.ts +26 -0
- package/src/core/interfaces/index.ts +6 -0
- package/src/core/registries.ts +7 -0
- package/src/core/types.ts +13 -0
- package/src/display/AnimatedSprite.ts +227 -0
- package/src/display/Camera.ts +371 -0
- package/src/display/Container.ts +240 -0
- package/src/display/Entity.ts +50 -0
- package/src/display/ParticleContainer.ts +107 -0
- package/src/display/Scene.ts +305 -0
- package/src/display/SceneTransition.ts +108 -0
- package/src/display/SpineAnimation.ts +170 -0
- package/src/display/Svg.ts +9 -0
- package/src/display/index.ts +11 -0
- package/src/env.d.ts +6 -0
- package/src/hello.ts +20 -0
- package/src/index.ts +17 -0
- package/src/mixins/animated.ts +340 -0
- package/src/mixins/factory/Factory.ts +24 -0
- package/src/mixins/factory/const.ts +363 -0
- package/src/mixins/factory/index.ts +7 -0
- package/src/mixins/factory/methods.ts +21 -0
- package/src/mixins/factory/props.ts +207 -0
- package/src/mixins/factory/registry.test.ts +83 -0
- package/src/mixins/factory/registry.ts +61 -0
- package/src/mixins/factory/schema.ts +153 -0
- package/src/mixins/factory/ui-registry.ts +54 -0
- package/src/mixins/factory/utils.ts +130 -0
- package/src/mixins/focus.ts +124 -0
- package/src/mixins/index.ts +5 -0
- package/src/mixins/interaction.ts +74 -0
- package/src/mixins/signals.ts +49 -0
- package/src/plugins/AssetsPlugin.ts +407 -0
- package/src/plugins/DataAdapter.ts +259 -0
- package/src/plugins/DevToolsPlugin.ts +103 -0
- package/src/plugins/FullScreenPlugin.ts +359 -0
- package/src/plugins/GSAPPlugin.ts +811 -0
- package/src/plugins/KeyboardPlugin.ts +160 -0
- package/src/plugins/LayoutPlugin.ts +127 -0
- package/src/plugins/LookupPlugin.ts +308 -0
- package/src/plugins/Plugin.test.ts +73 -0
- package/src/plugins/Plugin.ts +200 -0
- package/src/plugins/PopupManagerPlugin.ts +263 -0
- package/src/plugins/ResizerPlugin.ts +220 -0
- package/src/plugins/SceneManagerPlugin.ts +669 -0
- package/src/plugins/StatsPlugin.ts +24 -0
- package/src/plugins/TimerPlugin.ts +841 -0
- package/src/plugins/WebEventsPlugin.ts +132 -0
- package/src/plugins/actions/ActionsPlugin.ts +113 -0
- package/src/plugins/actions/constants.ts +45 -0
- package/src/plugins/actions/index.ts +4 -0
- package/src/plugins/actions/methods.ts +28 -0
- package/src/plugins/actions/types.ts +47 -0
- package/src/plugins/audio/AudioChannel.test.ts +101 -0
- package/src/plugins/audio/AudioChannel.ts +164 -0
- package/src/plugins/audio/AudioInstance.ts +228 -0
- package/src/plugins/audio/AudioManagerPlugin.ts +903 -0
- package/src/plugins/audio/VoiceOverPlugin.ts +354 -0
- package/src/plugins/audio/index.ts +3 -0
- package/src/plugins/breakpoints/BreakpointPlugin.test.ts +228 -0
- package/src/plugins/breakpoints/BreakpointPlugin.ts +293 -0
- package/src/plugins/breakpoints/evaluate.test.ts +239 -0
- package/src/plugins/breakpoints/evaluate.ts +201 -0
- package/src/plugins/breakpoints/index.ts +3 -0
- package/src/plugins/breakpoints/methods.ts +22 -0
- package/src/plugins/breakpoints/types.ts +86 -0
- package/src/plugins/captions/CaptionsPlugin.ts +468 -0
- package/src/plugins/captions/CaptionsRenderer.ts +184 -0
- package/src/plugins/captions/font/Sans.fnt +116 -0
- package/src/plugins/captions/font/Sans.png +0 -0
- package/src/plugins/captions/index.ts +2 -0
- package/src/plugins/defaults.ts +95 -0
- package/src/plugins/focus/FocusManagerPlugin.ts +773 -0
- package/src/plugins/focus/FocusOutliner.ts +111 -0
- package/src/plugins/focus/index.ts +2 -0
- package/src/plugins/i18nPlugin.ts +284 -0
- package/src/plugins/index.ts +17 -0
- package/src/plugins/input/AbstractControls.ts +15 -0
- package/src/plugins/input/Controls.ts +55 -0
- package/src/plugins/input/InputPlugin.ts +168 -0
- package/src/plugins/input/constants.ts +12 -0
- package/src/plugins/input/index.ts +9 -0
- package/src/plugins/input/interfaces.ts +37 -0
- package/src/plugins/input/keyboard/KeyboardContols.ts +182 -0
- package/src/plugins/input/keyboard/index.ts +2 -0
- package/src/plugins/input/keyboard/interfaces.ts +21 -0
- package/src/plugins/input/methods.ts +9 -0
- package/src/plugins/input/touch/TouchControls.ts +237 -0
- package/src/plugins/input/touch/constants.ts +34 -0
- package/src/plugins/input/touch/index.ts +3 -0
- package/src/plugins/input/touch/interfaces.ts +15 -0
- package/src/plugins/input/types.ts +41 -0
- package/src/plugins/input/utils.ts +10 -0
- package/src/plugins/spine/SpinePlugin.ts +14 -0
- package/src/plugins/spine/pixi-spine/BatchableSpineSlot.ts +138 -0
- package/src/plugins/spine/pixi-spine/Spine.ts +897 -0
- package/src/plugins/spine/pixi-spine/SpineDebugRenderer.ts +615 -0
- package/src/plugins/spine/pixi-spine/SpinePipe.ts +197 -0
- package/src/plugins/spine/pixi-spine/SpineTexture.ts +143 -0
- package/src/plugins/spine/pixi-spine/assets/atlasLoader.ts +156 -0
- package/src/plugins/spine/pixi-spine/assets/skeletonLoader.ts +80 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintBatchGeometry.ts +92 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintBatcher.ts +186 -0
- package/src/plugins/spine/pixi-spine/darktint/DarkTintShader.ts +74 -0
- package/src/plugins/spine/pixi-spine/darktint/darkTintBit.ts +77 -0
- package/src/plugins/spine/pixi-spine/index.ts +43 -0
- package/src/plugins/spine/pixi-spine/require-shim.ts +43 -0
- package/src/signals/Signal.test.ts +54 -0
- package/src/signals/Signal.ts +68 -0
- package/src/signals/index.ts +10 -0
- package/src/store/Store.test.ts +146 -0
- package/src/store/Store.ts +192 -0
- package/src/store/index.ts +1 -0
- package/src/types/framework.d.ts +47 -0
- package/src/types/gsap.d.ts +26 -0
- package/src/ui/Button.ts +454 -0
- package/src/ui/FlexContainer.ts +526 -0
- package/src/ui/Input.ts +1274 -0
- package/src/ui/Joystick.ts +288 -0
- package/src/ui/Popup.ts +242 -0
- package/src/ui/Toast.ts +399 -0
- package/src/ui/Toaster.ts +409 -0
- package/src/ui/UICanvas.ts +812 -0
- package/src/ui/index.ts +8 -0
- package/src/utils/array.ts +24 -0
- package/src/utils/bind.ts +79 -0
- package/src/utils/canvas.ts +26 -0
- package/src/utils/color.ts +126 -0
- package/src/utils/console/Logger.ts +86 -0
- package/src/utils/console/index.ts +1 -0
- package/src/utils/debug.ts +69 -0
- package/src/utils/define.ts +120 -0
- package/src/utils/env.ts +3 -0
- package/src/utils/events.ts +10 -0
- package/src/utils/framework.ts +45 -0
- package/src/utils/index.ts +27 -0
- package/src/utils/map.ts +59 -0
- package/src/utils/math.ts +19 -0
- package/src/utils/misc.ts +45 -0
- package/src/utils/number.ts +3 -0
- package/src/utils/object.ts +43 -0
- package/src/utils/padding.ts +43 -0
- package/src/utils/pixi.ts +116 -0
- package/src/utils/platform.ts +33 -0
- package/src/utils/point.ts +123 -0
- package/src/utils/promise/Queue.ts +125 -0
- package/src/utils/promise/functions.ts +16 -0
- package/src/utils/promise/index.ts +2 -0
- package/src/utils/random.ts +69 -0
- package/src/utils/rect.ts +50 -0
- package/src/utils/set.ts +32 -0
- package/src/utils/string.ts +9 -0
- package/src/utils/text.ts +30 -0
- package/src/utils/typefilters.ts +29 -0
- package/src/utils/types.ts +426 -0
- package/src/utils/vite.ts +41 -0
- package/src/utils/web.ts +7 -0
- package/src/version.ts +3 -0
- package/src/webgl-check.ts +12 -0
- package/templates/app/default/.eslintrc.json +21 -0
- package/templates/app/default/.meta.json +4 -0
- package/templates/app/default/.nvmrc +1 -0
- package/templates/app/default/.prettierrc.json +7 -0
- package/templates/app/default/README.md +8 -0
- package/templates/app/default/assets/audio{m}/music/Cheerful Annoyance.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Drumming Sticks.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Game Over.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Mishief Stroll.ogg +0 -0
- package/templates/app/default/assets/audio{m}/music/Night at the Beach.ogg +0 -0
- package/templates/app/default/assets/audio{m}/sfx/click.ogg +0 -0
- package/templates/app/default/assets/audio{m}/sfx/hover.ogg +0 -0
- package/templates/app/default/assets/required{m}/caper.png +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Bold{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Medium{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/SpaceGrotesk-Regular{family=Space Grotesk}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/fonts{fix}/Syncopate-Bold{family=Syncopate}{wf}.ttf +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/blue.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/green.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/grey.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/orange.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/purple.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/red.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn/yellow.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/down.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/over.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_a/up.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/down.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/over.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/btn_b/up.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/joystick/base.png +0 -0
- package/templates/app/default/assets/required{m}/ui{tps}/joystick/handle.png +0 -0
- package/templates/app/default/assets/required{m}/wordmark.svg +1 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro.png +0 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro.skel +0 -0
- package/templates/app/default/assets/spine{m}/spineboy-pro{fix}.atlas +94 -0
- package/templates/app/default/caper.config.ts +60 -0
- package/templates/app/default/index.html +23 -0
- package/templates/app/default/package.template.json +17 -0
- package/templates/app/default/public/favicon.ico +0 -0
- package/templates/app/default/src/__APPLICATION_NAME__.ts +3 -0
- package/templates/app/default/src/main.ts +9 -0
- package/templates/app/default/src/scenes/Base.ts +39 -0
- package/templates/app/default/src/scenes/Game.ts +34 -0
- package/templates/app/default/src/scenes/Splash.ts +70 -0
- package/templates/app/default/src/scenes/Start.ts +90 -0
- package/templates/app/default/src/utils/Constants.ts +3 -0
- package/templates/app/default/tsconfig.json +1 -0
- package/templates/plugin/package.template.json +33 -0
- package/templates/plugin/src/Plugin.template.ts +24 -0
- package/templates/plugin/src/index.template.ts +3 -0
- package/templates/plugin/tsconfig.template.json +43 -0
- package/templates/plugin/vite-env.template.d.ts +16 -0
- package/templates/plugin/vite.config.template.ts +19 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { LayoutOptions } from '@pixi/layout';
|
|
2
|
+
import { GraphicsContext, HTMLTextStyleOptions, TextStyleOptions } from 'pixi.js';
|
|
3
|
+
import { ContainerConfig } from '../../display';
|
|
4
|
+
import { ParticleContainerConfig } from '../../display/ParticleContainer';
|
|
5
|
+
import { ButtonConfig, FlexContainerConfig, UICanvasProps } from '../../ui';
|
|
6
|
+
import { BitmapFontFamilyAsset, FontFamilyAsset, PointLike, SpineAsset, SpritesheetAsset, TextureAsset, WithRequiredProps } from '../../utils';
|
|
7
|
+
export interface AbstractProps {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export interface TextureProps {
|
|
11
|
+
asset: TextureAsset;
|
|
12
|
+
sheet: SpritesheetAsset;
|
|
13
|
+
}
|
|
14
|
+
export interface PositionProps {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
position: PointLike;
|
|
18
|
+
}
|
|
19
|
+
export interface ScaleProps {
|
|
20
|
+
scaleX: number;
|
|
21
|
+
scaleY: number;
|
|
22
|
+
scale: PointLike;
|
|
23
|
+
}
|
|
24
|
+
export interface PivotProps {
|
|
25
|
+
pivot: PointLike;
|
|
26
|
+
}
|
|
27
|
+
export interface VisibilityProps {
|
|
28
|
+
alpha: number;
|
|
29
|
+
visible: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface LayoutProps {
|
|
32
|
+
layout?: Omit<LayoutOptions, 'target'> | null | boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ExistingProps extends AbstractProps, PositionProps, ScaleProps, VisibilityProps, LayoutProps {
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Layout-ish props the `this.add.entity(id, props)` factory applies after
|
|
38
|
+
* construction — intentionally narrow (no `AbstractProps` index signature)
|
|
39
|
+
* so TypeScript can still narrow entity-specific props at the call site.
|
|
40
|
+
*/
|
|
41
|
+
export interface EntityFactoryProps extends Partial<PositionProps>, Partial<ScaleProps>, Partial<PivotProps>, Partial<VisibilityProps> {
|
|
42
|
+
}
|
|
43
|
+
export interface GraphicsProps extends AbstractProps, PositionProps, ScaleProps, PivotProps, VisibilityProps {
|
|
44
|
+
}
|
|
45
|
+
export interface SvgProps extends GraphicsProps {
|
|
46
|
+
ctx: string | GraphicsContext;
|
|
47
|
+
}
|
|
48
|
+
export interface SpriteProps extends AbstractProps, TextureProps, ScaleProps, PositionProps, VisibilityProps, LayoutProps {
|
|
49
|
+
anchor: PointLike;
|
|
50
|
+
}
|
|
51
|
+
export interface TilingSpriteProps extends SpriteProps {
|
|
52
|
+
tilePosition?: PointLike;
|
|
53
|
+
/**
|
|
54
|
+
* Scaling of the image that is being tiled.
|
|
55
|
+
* @default {x: 1, y: 1}
|
|
56
|
+
*/
|
|
57
|
+
tileScale?: PointLike;
|
|
58
|
+
/**
|
|
59
|
+
* The rotation of the image that is being tiled.
|
|
60
|
+
* @default 0
|
|
61
|
+
*/
|
|
62
|
+
tileRotation?: number;
|
|
63
|
+
/**
|
|
64
|
+
* The texture to use for the sprite.
|
|
65
|
+
* @default Texture.WHITE
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* The width of the tiling sprite. #
|
|
69
|
+
* @default 256
|
|
70
|
+
*/
|
|
71
|
+
width?: number;
|
|
72
|
+
/**
|
|
73
|
+
* The height of the tiling sprite.
|
|
74
|
+
* @default 256
|
|
75
|
+
*/
|
|
76
|
+
height?: number;
|
|
77
|
+
/**
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
applyAnchorToTexture?: boolean;
|
|
81
|
+
/** Whether or not to round the x/y position. */
|
|
82
|
+
roundPixels?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface AnimatedSpriteAnimationProps extends AbstractProps, ScaleProps, PositionProps, VisibilityProps, LayoutProps {
|
|
85
|
+
texturePrefix: string;
|
|
86
|
+
sheet: SpritesheetAsset;
|
|
87
|
+
startIndex: number;
|
|
88
|
+
numFrames: number;
|
|
89
|
+
zeroPad: number;
|
|
90
|
+
autoUpdate: boolean;
|
|
91
|
+
updateAnchor: boolean;
|
|
92
|
+
loop: boolean;
|
|
93
|
+
animationSpeed: number;
|
|
94
|
+
}
|
|
95
|
+
export interface AnimatedSpriteProps extends AbstractProps, ScaleProps, PositionProps, VisibilityProps, LayoutProps {
|
|
96
|
+
sheet: SpritesheetAsset;
|
|
97
|
+
texturePrefix: string;
|
|
98
|
+
zeroPad: number;
|
|
99
|
+
animations: {
|
|
100
|
+
[animationName: string]: Partial<AnimatedSpriteAnimationProps>;
|
|
101
|
+
};
|
|
102
|
+
autoPlay: boolean;
|
|
103
|
+
autoUpdate: boolean;
|
|
104
|
+
defaultAnimation: string;
|
|
105
|
+
reversible: boolean;
|
|
106
|
+
animationSpeed: number;
|
|
107
|
+
startIndex: number;
|
|
108
|
+
}
|
|
109
|
+
export type TextStyle = Partial<Omit<TextStyleOptions, 'fontFamily'> & {
|
|
110
|
+
fontFamily: FontFamilyAsset;
|
|
111
|
+
}>;
|
|
112
|
+
export interface TextProps extends AbstractProps, PositionProps, ScaleProps, VisibilityProps, LayoutProps {
|
|
113
|
+
text: string;
|
|
114
|
+
anchor: PointLike;
|
|
115
|
+
resolution: number;
|
|
116
|
+
roundPixels: boolean;
|
|
117
|
+
style: TextStyle;
|
|
118
|
+
}
|
|
119
|
+
export interface BitmapTextProps extends AbstractProps, PositionProps, ScaleProps, VisibilityProps, LayoutProps {
|
|
120
|
+
text: string;
|
|
121
|
+
anchor: PointLike;
|
|
122
|
+
resolution: number;
|
|
123
|
+
roundPixels: boolean;
|
|
124
|
+
style: Partial<Omit<TextStyleOptions, 'fontFamily'> & {
|
|
125
|
+
fontFamily: BitmapFontFamilyAsset;
|
|
126
|
+
}>;
|
|
127
|
+
}
|
|
128
|
+
export interface HTMLTextProps extends AbstractProps, PositionProps, ScaleProps, VisibilityProps, LayoutProps {
|
|
129
|
+
text: string;
|
|
130
|
+
anchor: PointLike;
|
|
131
|
+
resolution: number;
|
|
132
|
+
roundPixels: boolean;
|
|
133
|
+
style: Partial<Omit<HTMLTextStyleOptions, 'fontFamily'> & {
|
|
134
|
+
fontFamily: FontFamilyAsset;
|
|
135
|
+
}>;
|
|
136
|
+
}
|
|
137
|
+
export interface OmittedTextProps extends AbstractProps, PositionProps, ScaleProps, VisibilityProps {
|
|
138
|
+
}
|
|
139
|
+
export declare const TextPropsKeys: (keyof TextProps)[];
|
|
140
|
+
export interface ContainerProps extends AbstractProps, PositionProps, ScaleProps, PivotProps, VisibilityProps, LayoutProps, ContainerConfig {
|
|
141
|
+
}
|
|
142
|
+
export interface ParticleContainerProps extends AbstractProps, ParticleContainerConfig {
|
|
143
|
+
}
|
|
144
|
+
export interface FlexContainerProps extends ContainerProps, FlexContainerConfig {
|
|
145
|
+
}
|
|
146
|
+
export interface UICanvasFactoryProps extends ContainerProps, UICanvasProps {
|
|
147
|
+
}
|
|
148
|
+
export interface SpineProps extends AbstractProps, ScaleProps, PositionProps, VisibilityProps, LayoutProps {
|
|
149
|
+
data: SpineAsset;
|
|
150
|
+
autoUpdate: boolean;
|
|
151
|
+
animationName: string;
|
|
152
|
+
trackIndex: number;
|
|
153
|
+
loop: boolean;
|
|
154
|
+
paused: boolean;
|
|
155
|
+
}
|
|
156
|
+
interface _ButtonProps extends AbstractProps, ScaleProps, PositionProps, PivotProps, VisibilityProps, ButtonConfig, LayoutProps {
|
|
157
|
+
}
|
|
158
|
+
export type ButtonProps = WithRequiredProps<_ButtonProps, 'textures'>;
|
|
159
|
+
export {};
|
|
160
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,CAA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ACV,eAAe,EACf,WAAW,EACX,eAAe;CAAG;AAEtB,MAAM,WAAW,sBAAuB,SAAQ,aAAa,EAAE,uBAAuB;CAAG;AAEzF,MAAM,WAAW,kBAAmB,SAAQ,cAAc,EAAE,mBAAmB;CAAG;AAElF,MAAM,WAAW,oBAAqB,SAAQ,cAAc,EAAE,aAAa;CAAG;AAG9E,MAAM,WAAW,UAAW,SAAQ,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW;IACxG,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,YACR,SAAQ,aAAa,EACnB,UAAU,EACV,aAAa,EACb,UAAU,EACV,eAAe,EACf,YAAY,EACZ,WAAW;CAAG;AAElB,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime registry for `this.add.entity(id, props)` lookups.
|
|
3
|
+
*
|
|
4
|
+
* The Vite plugin's entity discovery emits a `virtual:caper-entities` module
|
|
5
|
+
* with static imports by default (`defaultDynamic: false` in
|
|
6
|
+
* `discoverLocalClassFiles`). The `caper-runtime` virtual module pulls that
|
|
7
|
+
* list onto `globalThis.Caper.entityList` before the Application starts, so
|
|
8
|
+
* by the time any scene fires `initialize()` and calls `this.add.entity`,
|
|
9
|
+
* the list is in place.
|
|
10
|
+
*
|
|
11
|
+
* This registry is populated lazily on first lookup — no explicit bootstrap
|
|
12
|
+
* step needed. Entities declared with `defineEntity({ dynamic: true })` have
|
|
13
|
+
* an async `module` function and are skipped: the sync factory API can't
|
|
14
|
+
* wait for them. That's an intentional tradeoff — if a project needs code-
|
|
15
|
+
* split entities, they use `add.existing(new Foo(...), props)` with a
|
|
16
|
+
* manual lazy import instead.
|
|
17
|
+
*/
|
|
18
|
+
type EntityConstructor = new (props?: unknown) => unknown;
|
|
19
|
+
export declare function getEntityCtor(id: string): EntityConstructor | undefined;
|
|
20
|
+
export declare function getRegisteredEntityIds(): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Reset the registry. Test-only — production code should rely on the lazy
|
|
23
|
+
* initialization from `globalThis.Caper.entityList`.
|
|
24
|
+
*/
|
|
25
|
+
export declare function _resetEntityRegistry(): void;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,KAAK,iBAAiB,GAAG,KAAK,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AA4B1D,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAEvE;AAED,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAEjD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.test.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/registry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common prop resolvers the schema helper can apply after constructing an
|
|
3
|
+
* instance. Each entry corresponds to one of the `resolveXxx` utilities and
|
|
4
|
+
* reads its inputs from the raw props object — so `'position'` consumes
|
|
5
|
+
* `{ position, x, y }`, `'scale'` consumes `{ scale, scaleX, scaleY }`,
|
|
6
|
+
* etc.
|
|
7
|
+
*/
|
|
8
|
+
export type FactoryApply = 'position' | 'scale' | 'pivot' | 'anchor';
|
|
9
|
+
/**
|
|
10
|
+
* Schema describing a single factory method. Owned by the method's entry in
|
|
11
|
+
* `defaultFactoryMethods`; `buildFactoryMethod` consumes it to produce a
|
|
12
|
+
* typed `(props?: Props) => Instance` function with the standard
|
|
13
|
+
* resolve-position / resolve-scale / resolve-pivot / resolve-anchor
|
|
14
|
+
* post-construct pipeline and an automatic unknown-keys passthrough.
|
|
15
|
+
*
|
|
16
|
+
* The point of pushing every method through this shape is to collapse the
|
|
17
|
+
* copy-paste construction boilerplate in [const.ts](./const.ts): each
|
|
18
|
+
* method becomes (a) `build` — the bespoke constructor call that may
|
|
19
|
+
* reshape the props before handing them to Pixi — and (b) a list of which
|
|
20
|
+
* common resolvers to run. Everything else (unknowns passthrough, optional
|
|
21
|
+
* props guard, etc.) is centralized.
|
|
22
|
+
*/
|
|
23
|
+
export interface FactorySchema<Props, Instance> {
|
|
24
|
+
/**
|
|
25
|
+
* Bespoke construction. Receives the raw Caper-shaped props (possibly
|
|
26
|
+
* undefined) and returns a new instance. Any reshaping Caper does for DX
|
|
27
|
+
* — Sprite's `{asset, sheet}` → texture resolution, Text's top-level
|
|
28
|
+
* style flattening, Container's config/extras split — lives here.
|
|
29
|
+
*/
|
|
30
|
+
build: (props: Props | undefined) => Instance;
|
|
31
|
+
/**
|
|
32
|
+
* Which common resolvers to run on the instance after `build` returns.
|
|
33
|
+
* Defaults to `['position', 'scale', 'pivot']` when omitted — the lowest
|
|
34
|
+
* common denominator that every display object supports. Classes with an
|
|
35
|
+
* `anchor` field (Sprite, Text, AnimatedSprite, Spine) opt in to
|
|
36
|
+
* `'anchor'` explicitly.
|
|
37
|
+
*/
|
|
38
|
+
applies?: readonly FactoryApply[];
|
|
39
|
+
/**
|
|
40
|
+
* Keys the `build` callback already consumed — excluded from the
|
|
41
|
+
* unknown-keys passthrough so Caper doesn't try to set them on the
|
|
42
|
+
* instance a second time. For example, Sprite's schema excludes `asset`
|
|
43
|
+
* and `sheet` (consumed by `resolveTexture`), Text's schema excludes
|
|
44
|
+
* `text`, `roundPixels`, `resolution`, `style`, `anchor`, and `pivot`.
|
|
45
|
+
*/
|
|
46
|
+
exclude?: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build a typed factory method from a schema. The return type preserves
|
|
50
|
+
* the `(props?: Props) => Instance` shape TypeScript uses to drive
|
|
51
|
+
* autocomplete on `this.add.*({...})` call sites.
|
|
52
|
+
*
|
|
53
|
+
* Behavior mirrors the hand-written factory method pattern:
|
|
54
|
+
* 1. Call `schema.build(props)` to get the instance.
|
|
55
|
+
* 2. If props were passed, apply each resolver in `schema.applies`
|
|
56
|
+
* (position / scale / pivot / anchor).
|
|
57
|
+
* 3. Forward any remaining keys to `resolveUnknownKeys` for the common
|
|
58
|
+
* pass-through surface (`alpha`, `visible`, `label`, `eventMode`, etc.)
|
|
59
|
+
* minus any keys the `build` callback already consumed.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* sprite: buildFactoryMethod<Partial<SpriteProps>, Sprite>({
|
|
64
|
+
* build: (props) => new Sprite(props ? resolveTexture(props) : undefined),
|
|
65
|
+
* applies: ['position', 'scale', 'pivot', 'anchor'],
|
|
66
|
+
* exclude: ['asset', 'sheet'],
|
|
67
|
+
* }),
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function buildFactoryMethod<Props, Instance>(schema: FactorySchema<Props, Instance>): (props?: Props) => Instance;
|
|
71
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/schema.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,KAAK,QAAQ,CAAC;IAE9C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAElC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAqBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAChD,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,GACrC,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,QAAQ,CA6C7B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime registry for `this.add.ui(id, props)` lookups.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the entity registry pattern exactly. The Vite plugin's UI
|
|
5
|
+
* discovery emits a `virtual:caper-uis` module with static imports by
|
|
6
|
+
* default (`defaultDynamic: false`). The `caper-runtime` virtual module
|
|
7
|
+
* pulls that list onto `globalThis.Caper.uiList` before the Application
|
|
8
|
+
* starts.
|
|
9
|
+
*
|
|
10
|
+
* Populated lazily on first lookup — no explicit bootstrap step needed.
|
|
11
|
+
*/
|
|
12
|
+
type UIConstructor = new (props?: unknown) => unknown;
|
|
13
|
+
export declare function getUICtor(id: string): UIConstructor | undefined;
|
|
14
|
+
export declare function getRegisteredUIIds(): string[];
|
|
15
|
+
/**
|
|
16
|
+
* Reset the registry. Test-only.
|
|
17
|
+
*/
|
|
18
|
+
export declare function _resetUIRegistry(): void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=ui-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-registry.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/ui-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,KAAK,aAAa,GAAG,KAAK,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AA4BtD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE/D;AAED,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Texture } from 'pixi.js';
|
|
2
|
+
import { PointLike } from '../../utils';
|
|
3
|
+
import { PositionProps, ScaleProps, TextureProps } from './props';
|
|
4
|
+
export declare function resolveUnknownKeys(props: any, entity: any): void;
|
|
5
|
+
export declare function getErrorTexture(): Texture<import('pixi.js').TextureSource<any>>;
|
|
6
|
+
export declare function resolveTexture(props?: Partial<TextureProps>): Texture;
|
|
7
|
+
export declare function resolvePosition(props: Partial<PositionProps>, entity: any): void;
|
|
8
|
+
export declare function resolveScale(props: Partial<ScaleProps>, entity: any): void;
|
|
9
|
+
export declare function resolveAnchor(anchor: PointLike | undefined, entity: any): void;
|
|
10
|
+
export declare function resolvePivot(pivot: PointLike | undefined, entity: any): void;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/mixins/factory/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAU,SAAS,EAAoB,MAAM,aAAa,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIlE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,QAQzD;AAED,wBAAgB,eAAe,kDAgB9B;AAED,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAsDrE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,QAIzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,QAiBnE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,QAKvE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,GAAG,QAKrE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { Constructor } from '../utils';
|
|
3
|
+
import { IFocusable } from '../plugins';
|
|
4
|
+
/**
|
|
5
|
+
* The Focusable function is a higher-order function that adds focus-related functionality to a given class.
|
|
6
|
+
*
|
|
7
|
+
* @param {TBase extends Constructor<Container>} Base - The base class to add focus functionality to.
|
|
8
|
+
*
|
|
9
|
+
* @returns {TBase & Constructor<IFocusable>} The modified class with focus functionality.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Focusable<TBase extends Constructor<Container>>(Base: TBase): TBase & Constructor<IFocusable>;
|
|
12
|
+
export declare namespace Focusable {
|
|
13
|
+
var INITTED: boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/mixins/focus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkB,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,UAAU,CAAC;AAGvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,SAAS,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,CA0G5G;yBA1Ge,SAAS"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mixins/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AllFederatedEventMap, Container, FederatedEvent } from 'pixi.js';
|
|
2
|
+
import { Signal } from '../signals';
|
|
3
|
+
import { Constructor } from '../utils';
|
|
4
|
+
type InteractionEventName = keyof AllFederatedEventMap;
|
|
5
|
+
export type InteractionSignal = Signal<(event: FederatedEvent) => void>;
|
|
6
|
+
/**
|
|
7
|
+
* Represents an interactive element.
|
|
8
|
+
*/
|
|
9
|
+
export interface IInteractive {
|
|
10
|
+
onInteraction: (eventName: InteractionEventName) => InteractionSignal;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Adds interactive functionality to a container.
|
|
14
|
+
*
|
|
15
|
+
* @param {Constructor<Container>} Base - The base container class.
|
|
16
|
+
* @returns {Constructor<IInteractive>} - The extended container class with interactive functionality.
|
|
17
|
+
*/
|
|
18
|
+
export declare function Interactive<TBase extends Constructor<Container>>(Base: TBase): TBase & Constructor<IInteractive>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=interaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../src/mixins/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAkB,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,KAAK,oBAAoB,GAAG,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,CAAC,SAAS,EAAE,oBAAoB,KAAK,iBAAiB,CAAC;CACvE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,SAAS,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,CAiDhH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DestroyOptions } from 'pixi.js';
|
|
2
|
+
import { SignalConnection, SignalConnections } from '../signals';
|
|
3
|
+
import { Constructor } from '../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Interface for animated entities.
|
|
6
|
+
*/
|
|
7
|
+
export interface ISignalContainer {
|
|
8
|
+
signalConnections: SignalConnections;
|
|
9
|
+
destroy(options?: DestroyOptions): void;
|
|
10
|
+
addSignalConnection(...args: SignalConnection[]): void;
|
|
11
|
+
connectSignal(...args: SignalConnection[]): void;
|
|
12
|
+
connectAction(...args: SignalConnection[]): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function WithSignals<TBase extends Constructor<any>>(Base: TBase): TBase & Constructor<ISignalContainer>;
|
|
15
|
+
//# sourceMappingURL=signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/mixins/signals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IAErC,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAExC,mBAAmB,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACvD,aAAa,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACjD,aAAa,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;CAClD;AAED,wBAAgB,WAAW,CAAC,KAAK,SAAS,WAAW,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC,gBAAgB,CAAC,CA+B9G"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { UnresolvedAsset } from 'pixi.js';
|
|
2
|
+
import { IScene } from '../display';
|
|
3
|
+
import { Signal } from '../signals';
|
|
4
|
+
import { AssetLike, AssetLoadingOptions, AssetTypes, BundleTypes, SceneImportListItem } from '../utils';
|
|
5
|
+
import { IPlugin, Plugin } from './Plugin';
|
|
6
|
+
export interface IAssetsPlugin extends IPlugin {
|
|
7
|
+
onLoadStart: Signal<() => void>;
|
|
8
|
+
onLoadProgress: Signal<(progress: number) => void>;
|
|
9
|
+
onLoadComplete: Signal<() => void>;
|
|
10
|
+
onLoadRequiredStart: Signal<() => void>;
|
|
11
|
+
onLoadRequiredProgress: Signal<(progress: number) => void>;
|
|
12
|
+
onLoadRequiredComplete: Signal<() => void>;
|
|
13
|
+
onBackgroundLoadStart: Signal<() => void>;
|
|
14
|
+
onBackgroundAssetLoaded: Signal<(asset: string) => void>;
|
|
15
|
+
onBackgroundBundlesLoaded: Signal<(bundles: BundleTypes) => void>;
|
|
16
|
+
webStartEvent: Event;
|
|
17
|
+
webProgressEvent: CustomEvent<{
|
|
18
|
+
progress: number;
|
|
19
|
+
}>;
|
|
20
|
+
webCompleteEvent: Event;
|
|
21
|
+
webRequiredStartEvent: Event;
|
|
22
|
+
webRequiredProgressEvent: CustomEvent<{
|
|
23
|
+
progress: number;
|
|
24
|
+
}>;
|
|
25
|
+
webRequiredCompleteEvent: Event;
|
|
26
|
+
loadAssets(assets: string | string[] | UnresolvedAsset | UnresolvedAsset[] | AssetLike | AssetLike[], reportProgress?: boolean): Promise<void>;
|
|
27
|
+
loadBundles(bundle: BundleTypes, reportProgress?: boolean): Promise<void>;
|
|
28
|
+
loadSceneAssets(scene: IScene | SceneImportListItem<any>, background?: boolean): Promise<void>;
|
|
29
|
+
unloadSceneAssets(scene: IScene | SceneImportListItem<any>): Promise<void>;
|
|
30
|
+
loadRequired(): Promise<void>;
|
|
31
|
+
loadBackground(): void;
|
|
32
|
+
}
|
|
33
|
+
export declare class AssetsPlugin extends Plugin<AssetLoadingOptions> implements IAssetsPlugin {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
onLoadStart: Signal<() => void>;
|
|
36
|
+
onLoadProgress: Signal<(progress: number) => void>;
|
|
37
|
+
onLoadComplete: Signal<() => void>;
|
|
38
|
+
onLoadRequiredStart: Signal<() => void>;
|
|
39
|
+
onLoadRequiredProgress: Signal<(progress: number) => void>;
|
|
40
|
+
onLoadRequiredComplete: Signal<() => void>;
|
|
41
|
+
onBackgroundLoadStart: Signal<() => void>;
|
|
42
|
+
onBackgroundAssetLoaded: Signal<(asset: string) => void>;
|
|
43
|
+
onBackgroundBundlesLoaded: Signal<(bundles: BundleTypes) => void>;
|
|
44
|
+
private _loadedBundles;
|
|
45
|
+
private _loadedAssets;
|
|
46
|
+
private _required;
|
|
47
|
+
private _background;
|
|
48
|
+
private _isLoadingRequired;
|
|
49
|
+
webRequiredStartEvent: Event;
|
|
50
|
+
webRequiredProgressEvent: CustomEvent<{
|
|
51
|
+
progress: number;
|
|
52
|
+
}>;
|
|
53
|
+
webRequiredCompleteEvent: Event;
|
|
54
|
+
webStartEvent: Event;
|
|
55
|
+
webProgressEvent: CustomEvent<{
|
|
56
|
+
progress: number;
|
|
57
|
+
}>;
|
|
58
|
+
webCompleteEvent: Event;
|
|
59
|
+
initialize(options?: AssetLoadingOptions): Promise<void> | void;
|
|
60
|
+
loadRequired(): Promise<void>;
|
|
61
|
+
loadBackground(): void;
|
|
62
|
+
loadAssets(assets: AssetTypes, reportProgress?: boolean): Promise<void>;
|
|
63
|
+
loadBundles(bundles: BundleTypes, reportProgress?: boolean): Promise<void>;
|
|
64
|
+
unloadSceneAssets(scene: IScene | SceneImportListItem<any>): Promise<void>;
|
|
65
|
+
loadSceneAssets(scene: IScene | SceneImportListItem<any>, background?: boolean): Promise<void>;
|
|
66
|
+
protected getCoreFunctions(): string[];
|
|
67
|
+
protected getCoreSignals(): string[];
|
|
68
|
+
private _isAssetLoaded;
|
|
69
|
+
private _isBundleLoaded;
|
|
70
|
+
private _markAssetsLoaded;
|
|
71
|
+
private _markBundlesLoaded;
|
|
72
|
+
private _markAssetsUnloaded;
|
|
73
|
+
private _markBundlesUnloaded;
|
|
74
|
+
private _handleLoadStart;
|
|
75
|
+
private _handleLoadProgress;
|
|
76
|
+
private _handleLoadComplete;
|
|
77
|
+
private dispatchWebEvent;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=AssetsPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetsPlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/AssetsPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoC,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,WAAW,EAGX,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,MAA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,qBAAqB,EAAE,KAAK,CAGhC;IACI,wBAAwB,EAAE,WAAW,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAShE;IACK,wBAAwB,EAAE,KAAK,CAGnC;IAEI,aAAa,EAAE,KAAK,CAGxB;IACI,gBAAgB,EAAE,WAAW,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CASxD;IACK,gBAAgB,EAAE,KAAK,CAG3B;IAEI,UAAU,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAUzD,YAAY;IAsBlB,cAAc;IAyBR,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,cAAc,GAAE,OAAc;IAO7D,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,GAAE,OAAc;IAMhE,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC;IAiB1D,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,EAAE,UAAU,UAAQ;IAqDzF,SAAS,CAAC,gBAAgB,IAAI,MAAM,EAAE;IAItC,SAAS,CAAC,cAAc,IAAI,MAAM,EAAE;IAcpC,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;CAazB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Signal } from '../signals';
|
|
2
|
+
import { AppTypeOverrides, DeepPartial } from '../utils';
|
|
3
|
+
import { Plugin } from './Plugin';
|
|
4
|
+
export type DataSchema = {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Interface for the options of the DataAdapter.
|
|
9
|
+
*/
|
|
10
|
+
export interface IDataAdapterOptions {
|
|
11
|
+
initial: Partial<AppTypeOverrides['Data']>;
|
|
12
|
+
/**
|
|
13
|
+
* The namespace to use for the keys in local storage.
|
|
14
|
+
*/
|
|
15
|
+
namespace: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to override the data with the data from local storage.
|
|
18
|
+
*/
|
|
19
|
+
overrideWithLocalStorage: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to backup all data to local storage.
|
|
22
|
+
*/
|
|
23
|
+
backupAll: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The keys to backup to local storage.
|
|
26
|
+
*/
|
|
27
|
+
backupKeys: Array<keyof AppTypeOverrides['Data']>;
|
|
28
|
+
}
|
|
29
|
+
export interface DataChangeSignalDetail {
|
|
30
|
+
key?: any;
|
|
31
|
+
value?: any;
|
|
32
|
+
restore?: boolean;
|
|
33
|
+
clear?: boolean;
|
|
34
|
+
}
|
|
35
|
+
type DataAdapterType = AppTypeOverrides['Data'];
|
|
36
|
+
export interface IDataAdapter {
|
|
37
|
+
get(): DataAdapterType;
|
|
38
|
+
get<K extends keyof DataAdapterType>(key: K): DataAdapterType[K] | undefined;
|
|
39
|
+
set<K extends keyof DataAdapterType>(key: K, data: DataAdapterType[K]): DataAdapterType;
|
|
40
|
+
set(data: DeepPartial<DataAdapterType>, merge?: boolean): DataAdapterType;
|
|
41
|
+
clear(): void;
|
|
42
|
+
clear<K extends keyof DataAdapterType>(key: K): void;
|
|
43
|
+
increment<K extends keyof DataAdapterType & {
|
|
44
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends number ? P : never;
|
|
45
|
+
}[keyof DataAdapterType]>(key: K, amount?: number): DataAdapterType[K];
|
|
46
|
+
concat<K extends keyof DataAdapterType & {
|
|
47
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends any[] ? P : never;
|
|
48
|
+
}[keyof DataAdapterType]>(key: K, value: DataAdapterType[K] extends (infer E)[] ? E | E[] : never): DataAdapterType[K];
|
|
49
|
+
append<K extends keyof DataAdapterType & {
|
|
50
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends string ? P : never;
|
|
51
|
+
}[keyof DataAdapterType]>(key: K, value: string, separator?: string): DataAdapterType[K];
|
|
52
|
+
snapshot(): DataAdapterType;
|
|
53
|
+
snapshot<K extends keyof DataAdapterType>(key?: K): DataAdapterType[K];
|
|
54
|
+
onDataChange: Signal<(detail: DataChangeSignalDetail) => void>;
|
|
55
|
+
clearOnResume?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export declare function defineData<T extends DataSchema>(data: T): T;
|
|
58
|
+
/**
|
|
59
|
+
* An in-memory game-data plugin with optional localStorage backup.
|
|
60
|
+
*
|
|
61
|
+
* Not `IStorageCapability` — its API (`get`/`set`/`increment`/...) is richer
|
|
62
|
+
* than the generic save/load contract. Accessed directly via `app.data`.
|
|
63
|
+
*/
|
|
64
|
+
export declare class DataAdapter extends Plugin<Partial<IDataAdapterOptions>> implements IDataAdapter {
|
|
65
|
+
data: DataAdapterType;
|
|
66
|
+
onDataChange: Signal<(detail: DataChangeSignalDetail) => void>;
|
|
67
|
+
private backupKeys;
|
|
68
|
+
private backupAll;
|
|
69
|
+
private namespace;
|
|
70
|
+
private overrideWithLocalStorage;
|
|
71
|
+
constructor(id?: string);
|
|
72
|
+
getCoreSignals(): string[];
|
|
73
|
+
destroy(): void;
|
|
74
|
+
initialize(options?: Partial<IDataAdapterOptions>): void;
|
|
75
|
+
set<K extends keyof DataAdapterType>(key: K, data: DataAdapterType[K]): DataAdapterType;
|
|
76
|
+
set(data: DeepPartial<DataAdapterType>, merge?: boolean): DataAdapterType;
|
|
77
|
+
get(): DataAdapterType;
|
|
78
|
+
get<K extends keyof DataAdapterType>(key?: K): DataAdapterType[K] | undefined;
|
|
79
|
+
increment<K extends keyof DataAdapterType & {
|
|
80
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends number ? P : never;
|
|
81
|
+
}[keyof DataAdapterType]>(key: K, amount?: number): DataAdapterType[K];
|
|
82
|
+
concat<K extends keyof DataAdapterType & {
|
|
83
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends any[] ? P : never;
|
|
84
|
+
}[keyof DataAdapterType]>(key: K, value: DataAdapterType[K] extends (infer E)[] ? E | E[] : never): DataAdapterType[K];
|
|
85
|
+
append<K extends keyof DataAdapterType & {
|
|
86
|
+
[P in keyof DataAdapterType]: DataAdapterType[P] extends string ? P : never;
|
|
87
|
+
}[keyof DataAdapterType]>(key: K, value: string, separator?: string): DataAdapterType[K];
|
|
88
|
+
clear(): void;
|
|
89
|
+
snapshot(): DataAdapterType;
|
|
90
|
+
snapshot<K extends keyof DataAdapterType>(key?: K): DataAdapterType[K];
|
|
91
|
+
private backupToLocalStorage;
|
|
92
|
+
private restoreFromLocalStorage;
|
|
93
|
+
}
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=DataAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataAdapter.d.ts","sourceRoot":"","sources":["../../src/plugins/DataAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAa,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,SAA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