@number10/jsx-phaser 5.0.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 +667 -0
- package/README.md +44 -0
- package/dist/_virtual/_commonjsHelpers.cjs +7 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.cjs +7 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/animation/index.d.ts +7 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/camera/index.d.ts +5 -0
- package/dist/camera/index.d.ts.map +1 -0
- package/dist/camera/use-camera-fx.cjs +49 -0
- package/dist/camera/use-camera-fx.cjs.map +1 -0
- package/dist/camera/use-camera-fx.d.ts +25 -0
- package/dist/camera/use-camera-fx.d.ts.map +1 -0
- package/dist/camera/use-camera-fx.js +49 -0
- package/dist/camera/use-camera-fx.js.map +1 -0
- package/dist/clip/index.cjs +8 -0
- package/dist/clip/index.cjs.map +1 -0
- package/dist/clip/index.d.ts +3 -0
- package/dist/clip/index.d.ts.map +1 -0
- package/dist/clip/index.js +9 -0
- package/dist/clip/index.js.map +1 -0
- package/dist/clip/stencil-clip-depth.cjs +24 -0
- package/dist/clip/stencil-clip-depth.cjs.map +1 -0
- package/dist/clip/stencil-clip-depth.d.ts +10 -0
- package/dist/clip/stencil-clip-depth.d.ts.map +1 -0
- package/dist/clip/stencil-clip-depth.js +24 -0
- package/dist/clip/stencil-clip-depth.js.map +1 -0
- package/dist/clip/stencil-clip-extension.cjs +113 -0
- package/dist/clip/stencil-clip-extension.cjs.map +1 -0
- package/dist/clip/stencil-clip-extension.d.ts +18 -0
- package/dist/clip/stencil-clip-extension.d.ts.map +1 -0
- package/dist/clip/stencil-clip-extension.js +96 -0
- package/dist/clip/stencil-clip-extension.js.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.cjs +46 -0
- package/dist/clip/stencil-clip-fbo-bridge.cjs.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.d.ts +7 -0
- package/dist/clip/stencil-clip-fbo-bridge.d.ts.map +1 -0
- package/dist/clip/stencil-clip-fbo-bridge.js +46 -0
- package/dist/clip/stencil-clip-fbo-bridge.js.map +1 -0
- package/dist/clip/stencil-clip-renderer.cjs +300 -0
- package/dist/clip/stencil-clip-renderer.cjs.map +1 -0
- package/dist/clip/stencil-clip-renderer.d.ts +7 -0
- package/dist/clip/stencil-clip-renderer.d.ts.map +1 -0
- package/dist/clip/stencil-clip-renderer.js +300 -0
- package/dist/clip/stencil-clip-renderer.js.map +1 -0
- package/dist/clip/stencil-clip-state.cjs +84 -0
- package/dist/clip/stencil-clip-state.cjs.map +1 -0
- package/dist/clip/stencil-clip-state.d.ts +28 -0
- package/dist/clip/stencil-clip-state.d.ts.map +1 -0
- package/dist/clip/stencil-clip-state.js +84 -0
- package/dist/clip/stencil-clip-state.js.map +1 -0
- package/dist/clip/stencil-clip-types.d.ts +67 -0
- package/dist/clip/stencil-clip-types.d.ts.map +1 -0
- package/dist/clip/stencil-clip.cjs +138 -0
- package/dist/clip/stencil-clip.cjs.map +1 -0
- package/dist/clip/stencil-clip.d.ts +53 -0
- package/dist/clip/stencil-clip.d.ts.map +1 -0
- package/dist/clip/stencil-clip.js +122 -0
- package/dist/clip/stencil-clip.js.map +1 -0
- package/dist/colors/use-color-mode.cjs +28 -0
- package/dist/colors/use-color-mode.cjs.map +1 -0
- package/dist/colors/use-color-mode.d.ts +22 -0
- package/dist/colors/use-color-mode.d.ts.map +1 -0
- package/dist/colors/use-color-mode.js +28 -0
- package/dist/colors/use-color-mode.js.map +1 -0
- package/dist/colors/use-colors.cjs +45 -0
- package/dist/colors/use-colors.cjs.map +1 -0
- package/dist/colors/use-colors.d.ts +36 -0
- package/dist/colors/use-colors.d.ts.map +1 -0
- package/dist/colors/use-colors.js +45 -0
- package/dist/colors/use-colors.js.map +1 -0
- package/dist/components/DebugPanel.cjs +88 -0
- package/dist/components/DebugPanel.cjs.map +1 -0
- package/dist/components/DebugPanel.d.ts +45 -0
- package/dist/components/DebugPanel.d.ts.map +1 -0
- package/dist/components/DebugPanel.js +71 -0
- package/dist/components/DebugPanel.js.map +1 -0
- package/dist/components/appliers/applyBackground.cjs +89 -0
- package/dist/components/appliers/applyBackground.cjs.map +1 -0
- package/dist/components/appliers/applyBackground.d.ts +18 -0
- package/dist/components/appliers/applyBackground.d.ts.map +1 -0
- package/dist/components/appliers/applyBackground.js +89 -0
- package/dist/components/appliers/applyBackground.js.map +1 -0
- package/dist/components/appliers/applyGestures.cjs +85 -0
- package/dist/components/appliers/applyGestures.cjs.map +1 -0
- package/dist/components/appliers/applyGestures.d.ts +12 -0
- package/dist/components/appliers/applyGestures.d.ts.map +1 -0
- package/dist/components/appliers/applyGestures.js +68 -0
- package/dist/components/appliers/applyGestures.js.map +1 -0
- package/dist/components/appliers/applyGraphics.cjs +21 -0
- package/dist/components/appliers/applyGraphics.cjs.map +1 -0
- package/dist/components/appliers/applyGraphics.d.ts +13 -0
- package/dist/components/appliers/applyGraphics.d.ts.map +1 -0
- package/dist/components/appliers/applyGraphics.js +21 -0
- package/dist/components/appliers/applyGraphics.js.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.cjs +18 -0
- package/dist/components/appliers/applyGraphicsLayout.cjs.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.d.ts +13 -0
- package/dist/components/appliers/applyGraphicsLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyGraphicsLayout.js +18 -0
- package/dist/components/appliers/applyGraphicsLayout.js.map +1 -0
- package/dist/components/appliers/applyImage.cjs +92 -0
- package/dist/components/appliers/applyImage.cjs.map +1 -0
- package/dist/components/appliers/applyImage.d.ts +47 -0
- package/dist/components/appliers/applyImage.d.ts.map +1 -0
- package/dist/components/appliers/applyImage.js +92 -0
- package/dist/components/appliers/applyImage.js.map +1 -0
- package/dist/components/appliers/applyImageLayout.cjs +18 -0
- package/dist/components/appliers/applyImageLayout.cjs.map +1 -0
- package/dist/components/appliers/applyImageLayout.d.ts +18 -0
- package/dist/components/appliers/applyImageLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyImageLayout.js +18 -0
- package/dist/components/appliers/applyImageLayout.js.map +1 -0
- package/dist/components/appliers/applyLayout.cjs +108 -0
- package/dist/components/appliers/applyLayout.cjs.map +1 -0
- package/dist/components/appliers/applyLayout.d.ts +19 -0
- package/dist/components/appliers/applyLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyLayout.js +91 -0
- package/dist/components/appliers/applyLayout.js.map +1 -0
- package/dist/components/appliers/applyNineSlice.cjs +37 -0
- package/dist/components/appliers/applyNineSlice.cjs.map +1 -0
- package/dist/components/appliers/applyNineSlice.d.ts +14 -0
- package/dist/components/appliers/applyNineSlice.d.ts.map +1 -0
- package/dist/components/appliers/applyNineSlice.js +37 -0
- package/dist/components/appliers/applyNineSlice.js.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.cjs +18 -0
- package/dist/components/appliers/applyNineSliceLayout.cjs.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.d.ts +18 -0
- package/dist/components/appliers/applyNineSliceLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyNineSliceLayout.js +18 -0
- package/dist/components/appliers/applyNineSliceLayout.js.map +1 -0
- package/dist/components/appliers/applyParticles.cjs +46 -0
- package/dist/components/appliers/applyParticles.cjs.map +1 -0
- package/dist/components/appliers/applyParticles.d.ts +7 -0
- package/dist/components/appliers/applyParticles.d.ts.map +1 -0
- package/dist/components/appliers/applyParticles.js +46 -0
- package/dist/components/appliers/applyParticles.js.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.cjs +7 -0
- package/dist/components/appliers/applyParticlesLayout.cjs.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.d.ts +11 -0
- package/dist/components/appliers/applyParticlesLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyParticlesLayout.js +7 -0
- package/dist/components/appliers/applyParticlesLayout.js.map +1 -0
- package/dist/components/appliers/applyPhaser.cjs +40 -0
- package/dist/components/appliers/applyPhaser.cjs.map +1 -0
- package/dist/components/appliers/applyPhaser.d.ts +24 -0
- package/dist/components/appliers/applyPhaser.d.ts.map +1 -0
- package/dist/components/appliers/applyPhaser.js +40 -0
- package/dist/components/appliers/applyPhaser.js.map +1 -0
- package/dist/components/appliers/applySprite.cjs +124 -0
- package/dist/components/appliers/applySprite.cjs.map +1 -0
- package/dist/components/appliers/applySprite.d.ts +13 -0
- package/dist/components/appliers/applySprite.d.ts.map +1 -0
- package/dist/components/appliers/applySprite.js +124 -0
- package/dist/components/appliers/applySprite.js.map +1 -0
- package/dist/components/appliers/applySpriteLayout.cjs +7 -0
- package/dist/components/appliers/applySpriteLayout.cjs.map +1 -0
- package/dist/components/appliers/applySpriteLayout.d.ts +17 -0
- package/dist/components/appliers/applySpriteLayout.d.ts.map +1 -0
- package/dist/components/appliers/applySpriteLayout.js +7 -0
- package/dist/components/appliers/applySpriteLayout.js.map +1 -0
- package/dist/components/appliers/applyText.cjs +142 -0
- package/dist/components/appliers/applyText.cjs.map +1 -0
- package/dist/components/appliers/applyText.d.ts +32 -0
- package/dist/components/appliers/applyText.d.ts.map +1 -0
- package/dist/components/appliers/applyText.js +142 -0
- package/dist/components/appliers/applyText.js.map +1 -0
- package/dist/components/appliers/applyTextLayout.cjs +16 -0
- package/dist/components/appliers/applyTextLayout.cjs.map +1 -0
- package/dist/components/appliers/applyTextLayout.d.ts +18 -0
- package/dist/components/appliers/applyTextLayout.d.ts.map +1 -0
- package/dist/components/appliers/applyTextLayout.js +16 -0
- package/dist/components/appliers/applyTextLayout.js.map +1 -0
- package/dist/components/appliers/applyTooltip.cjs +247 -0
- package/dist/components/appliers/applyTooltip.cjs.map +1 -0
- package/dist/components/appliers/applyTooltip.d.ts +16 -0
- package/dist/components/appliers/applyTooltip.d.ts.map +1 -0
- package/dist/components/appliers/applyTooltip.js +247 -0
- package/dist/components/appliers/applyTooltip.js.map +1 -0
- package/dist/components/appliers/applyTransform.cjs +61 -0
- package/dist/components/appliers/applyTransform.cjs.map +1 -0
- package/dist/components/appliers/applyTransform.d.ts +24 -0
- package/dist/components/appliers/applyTransform.d.ts.map +1 -0
- package/dist/components/appliers/applyTransform.js +61 -0
- package/dist/components/appliers/applyTransform.js.map +1 -0
- package/dist/components/backgroundImage.cjs +411 -0
- package/dist/components/backgroundImage.cjs.map +1 -0
- package/dist/components/backgroundImage.d.ts +14 -0
- package/dist/components/backgroundImage.d.ts.map +1 -0
- package/dist/components/backgroundImage.js +411 -0
- package/dist/components/backgroundImage.js.map +1 -0
- package/dist/components/creators/createBackground.cjs +18 -0
- package/dist/components/creators/createBackground.cjs.map +1 -0
- package/dist/components/creators/createBackground.d.ts +20 -0
- package/dist/components/creators/createBackground.d.ts.map +1 -0
- package/dist/components/creators/createBackground.js +18 -0
- package/dist/components/creators/createBackground.js.map +1 -0
- package/dist/components/creators/createGestures.cjs +51 -0
- package/dist/components/creators/createGestures.cjs.map +1 -0
- package/dist/components/creators/createGestures.d.ts +11 -0
- package/dist/components/creators/createGestures.d.ts.map +1 -0
- package/dist/components/creators/createGestures.js +34 -0
- package/dist/components/creators/createGestures.js.map +1 -0
- package/dist/components/creators/createGraphicsLayout.cjs +24 -0
- package/dist/components/creators/createGraphicsLayout.cjs.map +1 -0
- package/dist/components/creators/createGraphicsLayout.d.ts +12 -0
- package/dist/components/creators/createGraphicsLayout.d.ts.map +1 -0
- package/dist/components/creators/createGraphicsLayout.js +24 -0
- package/dist/components/creators/createGraphicsLayout.js.map +1 -0
- package/dist/components/creators/createImageLayout.cjs +16 -0
- package/dist/components/creators/createImageLayout.cjs.map +1 -0
- package/dist/components/creators/createImageLayout.d.ts +17 -0
- package/dist/components/creators/createImageLayout.d.ts.map +1 -0
- package/dist/components/creators/createImageLayout.js +16 -0
- package/dist/components/creators/createImageLayout.js.map +1 -0
- package/dist/components/creators/createLayout.cjs +61 -0
- package/dist/components/creators/createLayout.cjs.map +1 -0
- package/dist/components/creators/createLayout.d.ts +15 -0
- package/dist/components/creators/createLayout.d.ts.map +1 -0
- package/dist/components/creators/createLayout.js +61 -0
- package/dist/components/creators/createLayout.js.map +1 -0
- package/dist/components/creators/createNineSliceLayout.cjs +16 -0
- package/dist/components/creators/createNineSliceLayout.cjs.map +1 -0
- package/dist/components/creators/createNineSliceLayout.d.ts +17 -0
- package/dist/components/creators/createNineSliceLayout.d.ts.map +1 -0
- package/dist/components/creators/createNineSliceLayout.js +16 -0
- package/dist/components/creators/createNineSliceLayout.js.map +1 -0
- package/dist/components/creators/createParticlesLayout.cjs +8 -0
- package/dist/components/creators/createParticlesLayout.cjs.map +1 -0
- package/dist/components/creators/createParticlesLayout.d.ts +14 -0
- package/dist/components/creators/createParticlesLayout.d.ts.map +1 -0
- package/dist/components/creators/createParticlesLayout.js +8 -0
- package/dist/components/creators/createParticlesLayout.js.map +1 -0
- package/dist/components/creators/createPhaser.cjs +36 -0
- package/dist/components/creators/createPhaser.cjs.map +1 -0
- package/dist/components/creators/createPhaser.d.ts +14 -0
- package/dist/components/creators/createPhaser.d.ts.map +1 -0
- package/dist/components/creators/createPhaser.js +36 -0
- package/dist/components/creators/createPhaser.js.map +1 -0
- package/dist/components/creators/createSpriteLayout.cjs +10 -0
- package/dist/components/creators/createSpriteLayout.cjs.map +1 -0
- package/dist/components/creators/createSpriteLayout.d.ts +18 -0
- package/dist/components/creators/createSpriteLayout.d.ts.map +1 -0
- package/dist/components/creators/createSpriteLayout.js +10 -0
- package/dist/components/creators/createSpriteLayout.js.map +1 -0
- package/dist/components/creators/createTextLayout.cjs +16 -0
- package/dist/components/creators/createTextLayout.cjs.map +1 -0
- package/dist/components/creators/createTextLayout.d.ts +17 -0
- package/dist/components/creators/createTextLayout.d.ts.map +1 -0
- package/dist/components/creators/createTextLayout.js +16 -0
- package/dist/components/creators/createTextLayout.js.map +1 -0
- package/dist/components/creators/createTransform.cjs +83 -0
- package/dist/components/creators/createTransform.cjs.map +1 -0
- package/dist/components/creators/createTransform.d.ts +26 -0
- package/dist/components/creators/createTransform.d.ts.map +1 -0
- package/dist/components/creators/createTransform.js +83 -0
- package/dist/components/creators/createTransform.js.map +1 -0
- package/dist/components/custom/Graphics.cjs +13 -0
- package/dist/components/custom/Graphics.cjs.map +1 -0
- package/dist/components/custom/Graphics.d.ts +50 -0
- package/dist/components/custom/Graphics.d.ts.map +1 -0
- package/dist/components/custom/Graphics.js +13 -0
- package/dist/components/custom/Graphics.js.map +1 -0
- package/dist/components/custom/NineSlice.cjs +13 -0
- package/dist/components/custom/NineSlice.cjs.map +1 -0
- package/dist/components/custom/NineSlice.d.ts +87 -0
- package/dist/components/custom/NineSlice.d.ts.map +1 -0
- package/dist/components/custom/NineSlice.js +13 -0
- package/dist/components/custom/NineSlice.js.map +1 -0
- package/dist/components/custom/Particles.cjs +8 -0
- package/dist/components/custom/Particles.cjs.map +1 -0
- package/dist/components/custom/Particles.d.ts +28 -0
- package/dist/components/custom/Particles.d.ts.map +1 -0
- package/dist/components/custom/Particles.js +8 -0
- package/dist/components/custom/Particles.js.map +1 -0
- package/dist/components/custom/RefOriginView.cjs +67 -0
- package/dist/components/custom/RefOriginView.cjs.map +1 -0
- package/dist/components/custom/RefOriginView.d.ts +49 -0
- package/dist/components/custom/RefOriginView.d.ts.map +1 -0
- package/dist/components/custom/RefOriginView.js +67 -0
- package/dist/components/custom/RefOriginView.js.map +1 -0
- package/dist/components/custom/Sprite.cjs +13 -0
- package/dist/components/custom/Sprite.cjs.map +1 -0
- package/dist/components/custom/Sprite.d.ts +79 -0
- package/dist/components/custom/Sprite.d.ts.map +1 -0
- package/dist/components/custom/Sprite.js +13 -0
- package/dist/components/custom/Sprite.js.map +1 -0
- package/dist/components/custom/TileSprite.cjs +13 -0
- package/dist/components/custom/TileSprite.cjs.map +1 -0
- package/dist/components/custom/TileSprite.d.ts +65 -0
- package/dist/components/custom/TileSprite.d.ts.map +1 -0
- package/dist/components/custom/TileSprite.js +13 -0
- package/dist/components/custom/TileSprite.js.map +1 -0
- package/dist/components/custom/index.d.ts +15 -0
- package/dist/components/custom/index.d.ts.map +1 -0
- package/dist/components/index.cjs +33 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +33 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/internal/SceneWrapper.cjs +10 -0
- package/dist/components/internal/SceneWrapper.cjs.map +1 -0
- package/dist/components/internal/SceneWrapper.d.ts +20 -0
- package/dist/components/internal/SceneWrapper.d.ts.map +1 -0
- package/dist/components/internal/SceneWrapper.js +10 -0
- package/dist/components/internal/SceneWrapper.js.map +1 -0
- package/dist/components/primitives/graphics.cjs +29 -0
- package/dist/components/primitives/graphics.cjs.map +1 -0
- package/dist/components/primitives/graphics.d.ts +146 -0
- package/dist/components/primitives/graphics.d.ts.map +1 -0
- package/dist/components/primitives/graphics.js +29 -0
- package/dist/components/primitives/graphics.js.map +1 -0
- package/dist/components/primitives/image.cjs +110 -0
- package/dist/components/primitives/image.cjs.map +1 -0
- package/dist/components/primitives/image.d.ts +170 -0
- package/dist/components/primitives/image.d.ts.map +1 -0
- package/dist/components/primitives/image.js +110 -0
- package/dist/components/primitives/image.js.map +1 -0
- package/dist/components/primitives/nineslice.cjs +42 -0
- package/dist/components/primitives/nineslice.cjs.map +1 -0
- package/dist/components/primitives/nineslice.d.ts +271 -0
- package/dist/components/primitives/nineslice.d.ts.map +1 -0
- package/dist/components/primitives/nineslice.js +42 -0
- package/dist/components/primitives/nineslice.js.map +1 -0
- package/dist/components/primitives/particles.cjs +77 -0
- package/dist/components/primitives/particles.cjs.map +1 -0
- package/dist/components/primitives/particles.d.ts +47 -0
- package/dist/components/primitives/particles.d.ts.map +1 -0
- package/dist/components/primitives/particles.js +77 -0
- package/dist/components/primitives/particles.js.map +1 -0
- package/dist/components/primitives/sprite.cjs +100 -0
- package/dist/components/primitives/sprite.cjs.map +1 -0
- package/dist/components/primitives/sprite.d.ts +147 -0
- package/dist/components/primitives/sprite.d.ts.map +1 -0
- package/dist/components/primitives/sprite.js +100 -0
- package/dist/components/primitives/sprite.js.map +1 -0
- package/dist/components/primitives/text.cjs +73 -0
- package/dist/components/primitives/text.cjs.map +1 -0
- package/dist/components/primitives/text.d.ts +155 -0
- package/dist/components/primitives/text.d.ts.map +1 -0
- package/dist/components/primitives/text.js +73 -0
- package/dist/components/primitives/text.js.map +1 -0
- package/dist/components/primitives/tilesprite.cjs +77 -0
- package/dist/components/primitives/tilesprite.cjs.map +1 -0
- package/dist/components/primitives/tilesprite.d.ts +157 -0
- package/dist/components/primitives/tilesprite.d.ts.map +1 -0
- package/dist/components/primitives/tilesprite.js +77 -0
- package/dist/components/primitives/tilesprite.js.map +1 -0
- package/dist/components/primitives/vectorDraw.cjs +73 -0
- package/dist/components/primitives/vectorDraw.cjs.map +1 -0
- package/dist/components/primitives/vectorDraw.d.ts +4 -0
- package/dist/components/primitives/vectorDraw.d.ts.map +1 -0
- package/dist/components/primitives/vectorDraw.js +73 -0
- package/dist/components/primitives/vectorDraw.js.map +1 -0
- package/dist/components/primitives/view.cjs +105 -0
- package/dist/components/primitives/view.cjs.map +1 -0
- package/dist/components/primitives/view.d.ts +23 -0
- package/dist/components/primitives/view.d.ts.map +1 -0
- package/dist/components/primitives/view.js +105 -0
- package/dist/components/primitives/view.js.map +1 -0
- package/dist/core-props.d.ts +105 -0
- package/dist/core-props.d.ts.map +1 -0
- package/dist/core-types.d.ts +71 -0
- package/dist/core-types.d.ts.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.cjs +27 -0
- package/dist/design-tokens/resolve-theme-tokens.cjs.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.d.ts +9 -0
- package/dist/design-tokens/resolve-theme-tokens.d.ts.map +1 -0
- package/dist/design-tokens/resolve-theme-tokens.js +27 -0
- package/dist/design-tokens/resolve-theme-tokens.js.map +1 -0
- package/dist/design-tokens/use-theme-tokens.cjs +26 -0
- package/dist/design-tokens/use-theme-tokens.cjs.map +1 -0
- package/dist/design-tokens/use-theme-tokens.d.ts +28 -0
- package/dist/design-tokens/use-theme-tokens.d.ts.map +1 -0
- package/dist/design-tokens/use-theme-tokens.js +26 -0
- package/dist/design-tokens/use-theme-tokens.js.map +1 -0
- package/dist/effects/index.d.ts +2 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/phaser-effects-bridge.cjs +48 -0
- package/dist/effects/phaser-effects-bridge.cjs.map +1 -0
- package/dist/effects/phaser-effects-bridge.d.ts +2 -0
- package/dist/effects/phaser-effects-bridge.d.ts.map +1 -0
- package/dist/effects/phaser-effects-bridge.js +30 -0
- package/dist/effects/phaser-effects-bridge.js.map +1 -0
- package/dist/effects/use-effect.cjs +155 -0
- package/dist/effects/use-effect.cjs.map +1 -0
- package/dist/effects/use-effect.d.ts +30 -0
- package/dist/effects/use-effect.d.ts.map +1 -0
- package/dist/effects/use-effect.js +155 -0
- package/dist/effects/use-effect.js.map +1 -0
- package/dist/fx/convenience-hooks/index.d.ts +7 -0
- package/dist/fx/convenience-hooks/index.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.cjs +18 -0
- package/dist/fx/convenience-hooks/use-blur.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-blur.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-blur.js +18 -0
- package/dist/fx/convenience-hooks/use-blur.js.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.cjs +18 -0
- package/dist/fx/convenience-hooks/use-glow.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-glow.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-glow.js +18 -0
- package/dist/fx/convenience-hooks/use-glow.js.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.cjs +18 -0
- package/dist/fx/convenience-hooks/use-shadow.cjs.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.d.ts +21 -0
- package/dist/fx/convenience-hooks/use-shadow.d.ts.map +1 -0
- package/dist/fx/convenience-hooks/use-shadow.js +18 -0
- package/dist/fx/convenience-hooks/use-shadow.js.map +1 -0
- package/dist/fx/fx-creators/blur.cjs +20 -0
- package/dist/fx/fx-creators/blur.cjs.map +1 -0
- package/dist/fx/fx-creators/blur.d.ts +37 -0
- package/dist/fx/fx-creators/blur.d.ts.map +1 -0
- package/dist/fx/fx-creators/blur.js +20 -0
- package/dist/fx/fx-creators/blur.js.map +1 -0
- package/dist/fx/fx-creators/color-matrix.cjs +47 -0
- package/dist/fx/fx-creators/color-matrix.cjs.map +1 -0
- package/dist/fx/fx-creators/color-matrix.d.ts +31 -0
- package/dist/fx/fx-creators/color-matrix.d.ts.map +1 -0
- package/dist/fx/fx-creators/color-matrix.js +47 -0
- package/dist/fx/fx-creators/color-matrix.js.map +1 -0
- package/dist/fx/fx-creators/glow.cjs +27 -0
- package/dist/fx/fx-creators/glow.cjs.map +1 -0
- package/dist/fx/fx-creators/glow.d.ts +36 -0
- package/dist/fx/fx-creators/glow.d.ts.map +1 -0
- package/dist/fx/fx-creators/glow.js +27 -0
- package/dist/fx/fx-creators/glow.js.map +1 -0
- package/dist/fx/fx-creators/index.d.ts +10 -0
- package/dist/fx/fx-creators/index.d.ts.map +1 -0
- package/dist/fx/fx-creators/pixelate.cjs +20 -0
- package/dist/fx/fx-creators/pixelate.cjs.map +1 -0
- package/dist/fx/fx-creators/pixelate.d.ts +24 -0
- package/dist/fx/fx-creators/pixelate.d.ts.map +1 -0
- package/dist/fx/fx-creators/pixelate.js +20 -0
- package/dist/fx/fx-creators/pixelate.js.map +1 -0
- package/dist/fx/fx-creators/shadow.cjs +28 -0
- package/dist/fx/fx-creators/shadow.cjs.map +1 -0
- package/dist/fx/fx-creators/shadow.d.ts +43 -0
- package/dist/fx/fx-creators/shadow.d.ts.map +1 -0
- package/dist/fx/fx-creators/shadow.js +28 -0
- package/dist/fx/fx-creators/shadow.js.map +1 -0
- package/dist/fx/fx-creators/vignette.cjs +20 -0
- package/dist/fx/fx-creators/vignette.cjs.map +1 -0
- package/dist/fx/fx-creators/vignette.d.ts +33 -0
- package/dist/fx/fx-creators/vignette.d.ts.map +1 -0
- package/dist/fx/fx-creators/vignette.js +20 -0
- package/dist/fx/fx-creators/vignette.js.map +1 -0
- package/dist/fx/fx-registry.cjs +43 -0
- package/dist/fx/fx-registry.cjs.map +1 -0
- package/dist/fx/fx-registry.d.ts +59 -0
- package/dist/fx/fx-registry.d.ts.map +1 -0
- package/dist/fx/fx-registry.js +43 -0
- package/dist/fx/fx-registry.js.map +1 -0
- package/dist/fx/index.d.ts +51 -0
- package/dist/fx/index.d.ts.map +1 -0
- package/dist/fx/use-fx.cjs +54 -0
- package/dist/fx/use-fx.cjs.map +1 -0
- package/dist/fx/use-fx.d.ts +53 -0
- package/dist/fx/use-fx.d.ts.map +1 -0
- package/dist/fx/use-fx.js +54 -0
- package/dist/fx/use-fx.js.map +1 -0
- package/dist/gestures/gesture-manager.cjs +773 -0
- package/dist/gestures/gesture-manager.cjs.map +1 -0
- package/dist/gestures/gesture-manager.d.ts +158 -0
- package/dist/gestures/gesture-manager.d.ts.map +1 -0
- package/dist/gestures/gesture-manager.js +773 -0
- package/dist/gestures/gesture-manager.js.map +1 -0
- package/dist/gestures/gesture-types.cjs +9 -0
- package/dist/gestures/gesture-types.cjs.map +1 -0
- package/dist/gestures/gesture-types.d.ts +232 -0
- package/dist/gestures/gesture-types.d.ts.map +1 -0
- package/dist/gestures/gesture-types.js +9 -0
- package/dist/gestures/gesture-types.js.map +1 -0
- package/dist/hooks.cjs +193 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.d.ts +151 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +146 -0
- package/dist/hooks.js.map +1 -0
- package/dist/host.cjs +85 -0
- package/dist/host.cjs.map +1 -0
- package/dist/host.d.ts +78 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +85 -0
- package/dist/host.js.map +1 -0
- package/dist/index.cjs +614 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +273 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-dev-runtime.cjs +20 -0
- package/dist/jsx-dev-runtime.cjs.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +8 -0
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +8 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.cjs +16 -0
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/jsx-runtime.d.ts +9 -0
- package/dist/jsx-runtime.d.ts.map +1 -0
- package/dist/jsx-runtime.js +7 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/jsx-types.d.ts +40 -0
- package/dist/jsx-types.d.ts.map +1 -0
- package/dist/layout/appliers/background-applier.cjs +40 -0
- package/dist/layout/appliers/background-applier.cjs.map +1 -0
- package/dist/layout/appliers/background-applier.d.ts +16 -0
- package/dist/layout/appliers/background-applier.d.ts.map +1 -0
- package/dist/layout/appliers/background-applier.js +40 -0
- package/dist/layout/appliers/background-applier.js.map +1 -0
- package/dist/layout/index.d.ts +5 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/layout-engine-test-utils.d.ts +24 -0
- package/dist/layout/layout-engine-test-utils.d.ts.map +1 -0
- package/dist/layout/phaser-layout-bridge.cjs +41 -0
- package/dist/layout/phaser-layout-bridge.cjs.map +1 -0
- package/dist/layout/phaser-layout-bridge.d.ts +9 -0
- package/dist/layout/phaser-layout-bridge.d.ts.map +1 -0
- package/dist/layout/phaser-layout-bridge.js +40 -0
- package/dist/layout/phaser-layout-bridge.js.map +1 -0
- package/dist/layout/types.d.ts +14 -0
- package/dist/layout/types.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs +39 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +39 -0
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/particles/emit-zone.cjs +205 -0
- package/dist/particles/emit-zone.cjs.map +1 -0
- package/dist/particles/emit-zone.d.ts +88 -0
- package/dist/particles/emit-zone.d.ts.map +1 -0
- package/dist/particles/emit-zone.js +205 -0
- package/dist/particles/emit-zone.js.map +1 -0
- package/dist/particles/index.d.ts +8 -0
- package/dist/particles/index.d.ts.map +1 -0
- package/dist/particles/particle-types.d.ts +25 -0
- package/dist/particles/particle-types.d.ts.map +1 -0
- package/dist/particles/preset-registry.cjs +57 -0
- package/dist/particles/preset-registry.cjs.map +1 -0
- package/dist/particles/preset-registry.d.ts +49 -0
- package/dist/particles/preset-registry.d.ts.map +1 -0
- package/dist/particles/preset-registry.js +57 -0
- package/dist/particles/preset-registry.js.map +1 -0
- package/dist/particles/use-particles.cjs +67 -0
- package/dist/particles/use-particles.cjs.map +1 -0
- package/dist/particles/use-particles.d.ts +19 -0
- package/dist/particles/use-particles.d.ts.map +1 -0
- package/dist/particles/use-particles.js +67 -0
- package/dist/particles/use-particles.js.map +1 -0
- package/dist/particles/utils.cjs +82 -0
- package/dist/particles/utils.cjs.map +1 -0
- package/dist/particles/utils.d.ts +10 -0
- package/dist/particles/utils.d.ts.map +1 -0
- package/dist/particles/utils.js +82 -0
- package/dist/particles/utils.js.map +1 -0
- package/dist/phaser-bridges.cjs +148 -0
- package/dist/phaser-bridges.cjs.map +1 -0
- package/dist/phaser-bridges.d.ts +78 -0
- package/dist/phaser-bridges.d.ts.map +1 -0
- package/dist/phaser-bridges.js +131 -0
- package/dist/phaser-bridges.js.map +1 -0
- package/dist/phaser-host-adapter.cjs +148 -0
- package/dist/phaser-host-adapter.cjs.map +1 -0
- package/dist/phaser-host-adapter.d.ts +30 -0
- package/dist/phaser-host-adapter.d.ts.map +1 -0
- package/dist/phaser-host-adapter.js +148 -0
- package/dist/phaser-host-adapter.js.map +1 -0
- package/dist/phaser-runtime-types.d.ts +89 -0
- package/dist/phaser-runtime-types.d.ts.map +1 -0
- package/dist/phaser-surface-adapter.cjs +488 -0
- package/dist/phaser-surface-adapter.cjs.map +1 -0
- package/dist/phaser-surface-adapter.d.ts +74 -0
- package/dist/phaser-surface-adapter.d.ts.map +1 -0
- package/dist/phaser-surface-adapter.js +471 -0
- package/dist/phaser-surface-adapter.js.map +1 -0
- package/dist/phaser-vdom-runtime.cjs +63 -0
- package/dist/phaser-vdom-runtime.cjs.map +1 -0
- package/dist/phaser-vdom-runtime.d.ts +2 -0
- package/dist/phaser-vdom-runtime.d.ts.map +1 -0
- package/dist/phaser-vdom-runtime.js +63 -0
- package/dist/phaser-vdom-runtime.js.map +1 -0
- package/dist/plugin.cjs +182 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.ts +161 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +165 -0
- package/dist/plugin.js.map +1 -0
- package/dist/render-context.cjs +106 -0
- package/dist/render-context.cjs.map +1 -0
- package/dist/render-context.d.ts +66 -0
- package/dist/render-context.d.ts.map +1 -0
- package/dist/render-context.js +106 -0
- package/dist/render-context.js.map +1 -0
- package/dist/scene-backgrounds.cjs +285 -0
- package/dist/scene-backgrounds.cjs.map +1 -0
- package/dist/scene-backgrounds.d.ts +69 -0
- package/dist/scene-backgrounds.d.ts.map +1 -0
- package/dist/scene-backgrounds.js +268 -0
- package/dist/scene-backgrounds.js.map +1 -0
- package/dist/theme-base.d.ts +133 -0
- package/dist/theme-base.d.ts.map +1 -0
- package/dist/theme-custom.d.ts +13 -0
- package/dist/theme-custom.d.ts.map +1 -0
- package/dist/theme-defaults.cjs +29 -0
- package/dist/theme-defaults.cjs.map +1 -0
- package/dist/theme-defaults.d.ts +1 -0
- package/dist/theme-defaults.d.ts.map +1 -0
- package/dist/theme-defaults.js +28 -0
- package/dist/theme-defaults.js.map +1 -0
- package/dist/theme.cjs +34 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.ts +36 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +32 -0
- package/dist/theme.js.map +1 -0
- package/dist/tooltip/tooltip-types.d.ts +6 -0
- package/dist/tooltip/tooltip-types.d.ts.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/KeyboardInputManager.cjs +112 -0
- package/dist/utils/KeyboardInputManager.cjs.map +1 -0
- package/dist/utils/KeyboardInputManager.d.ts +48 -0
- package/dist/utils/KeyboardInputManager.d.ts.map +1 -0
- package/dist/utils/KeyboardInputManager.js +112 -0
- package/dist/utils/KeyboardInputManager.js.map +1 -0
- package/dist/utils/dom-input-manager.cjs +253 -0
- package/dist/utils/dom-input-manager.cjs.map +1 -0
- package/dist/utils/dom-input-manager.d.ts +113 -0
- package/dist/utils/dom-input-manager.d.ts.map +1 -0
- package/dist/utils/dom-input-manager.js +253 -0
- package/dist/utils/dom-input-manager.js.map +1 -0
- package/dist/utils/fast-deep-equal.cjs +7 -0
- package/dist/utils/fast-deep-equal.cjs.map +1 -0
- package/dist/utils/fast-deep-equal.d.ts +4 -0
- package/dist/utils/fast-deep-equal.d.ts.map +1 -0
- package/dist/utils/fast-deep-equal.js +7 -0
- package/dist/utils/fast-deep-equal.js.map +1 -0
- package/dist/utils/image-subtexture-registry.cjs +98 -0
- package/dist/utils/image-subtexture-registry.cjs.map +1 -0
- package/dist/utils/image-subtexture-registry.d.ts +17 -0
- package/dist/utils/image-subtexture-registry.d.ts.map +1 -0
- package/dist/utils/image-subtexture-registry.js +98 -0
- package/dist/utils/image-subtexture-registry.js.map +1 -0
- package/dist/utils/phaser-guards.cjs +15 -0
- package/dist/utils/phaser-guards.cjs.map +1 -0
- package/dist/utils/phaser-guards.d.ts +7 -0
- package/dist/utils/phaser-guards.d.ts.map +1 -0
- package/dist/utils/phaser-guards.js +15 -0
- package/dist/utils/phaser-guards.js.map +1 -0
- package/dist/utils/svg-texture.cjs +48 -0
- package/dist/utils/svg-texture.cjs.map +1 -0
- package/dist/utils/svg-texture.d.ts +34 -0
- package/dist/utils/svg-texture.d.ts.map +1 -0
- package/dist/utils/svg-texture.js +48 -0
- package/dist/utils/svg-texture.js.map +1 -0
- package/dist/utils/texture-registry.cjs +117 -0
- package/dist/utils/texture-registry.cjs.map +1 -0
- package/dist/utils/texture-registry.d.ts +53 -0
- package/dist/utils/texture-registry.d.ts.map +1 -0
- package/dist/utils/texture-registry.js +117 -0
- package/dist/utils/texture-registry.js.map +1 -0
- package/dist/vdom-host-types.d.ts +12 -0
- package/dist/vdom-host-types.d.ts.map +1 -0
- package/dist/vdom-registry.d.ts +27 -0
- package/dist/vdom-registry.d.ts.map +1 -0
- package/dist/vdom-utils.d.ts +16 -0
- package/dist/vdom-utils.d.ts.map +1 -0
- package/dist/vdom.cjs +36 -0
- package/dist/vdom.cjs.map +1 -0
- package/dist/vdom.d.ts +23 -0
- package/dist/vdom.d.ts.map +1 -0
- package/dist/vdom.js +36 -0
- package/dist/vdom.js.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.cjs +97 -0
- package/dist/vector/PhaserVectorDrawContext.cjs.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.d.ts +27 -0
- package/dist/vector/PhaserVectorDrawContext.d.ts.map +1 -0
- package/dist/vector/PhaserVectorDrawContext.js +97 -0
- package/dist/vector/PhaserVectorDrawContext.js.map +1 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as Phaser from 'phaser';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in decorative background variants that can be attached to a Phaser scene.
|
|
4
|
+
*/
|
|
5
|
+
export type SceneBackgroundType = 'grid' | 'logo' | 'gradient' | 'particles' | 'none';
|
|
6
|
+
/**
|
|
7
|
+
* Optional animation applied to a scene background after it is created.
|
|
8
|
+
*/
|
|
9
|
+
export type BackgroundAnimation = 'lemniscate' | 'wave' | 'pulse' | 'rotate' | 'static';
|
|
10
|
+
/**
|
|
11
|
+
* Configuration for {@link addSceneBackground}.
|
|
12
|
+
*/
|
|
13
|
+
export interface BackgroundConfig {
|
|
14
|
+
/** Background variant to create. Use `'none'` to disable background creation. */
|
|
15
|
+
type: SceneBackgroundType;
|
|
16
|
+
/** Animation preset applied to the created background. Defaults depend on caller config. */
|
|
17
|
+
animation?: BackgroundAnimation;
|
|
18
|
+
/** Background opacity, usually between `0` and `1`. */
|
|
19
|
+
opacity?: number;
|
|
20
|
+
/** Primary color as a Phaser numeric color, for example `0x4a9eff`. */
|
|
21
|
+
color?: number;
|
|
22
|
+
/** Secondary color used by gradient backgrounds. */
|
|
23
|
+
colorSecondary?: number;
|
|
24
|
+
/** Texture key used by the logo background. Defaults to the built-in logo key. */
|
|
25
|
+
logoKey?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Handle returned by {@link addSceneBackground}.
|
|
29
|
+
*/
|
|
30
|
+
export interface SceneBackgroundHandle {
|
|
31
|
+
/** Root game object created for the background. */
|
|
32
|
+
background: BackgroundTarget;
|
|
33
|
+
/** Stops animations, destroys game objects, removes generated textures, and detaches listeners. */
|
|
34
|
+
destroy: () => void;
|
|
35
|
+
/** Manually resize the background to match an external viewport size. */
|
|
36
|
+
resize: (width: number, height: number) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default scene background used when no explicit config is provided.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DEFAULT_BACKGROUND: BackgroundConfig;
|
|
42
|
+
type BackgroundTarget = Phaser.GameObjects.Container | Phaser.GameObjects.Image | Phaser.GameObjects.TileSprite;
|
|
43
|
+
/**
|
|
44
|
+
* Adds a decorative background object to a Phaser scene.
|
|
45
|
+
*
|
|
46
|
+
* The helper owns all game objects, tweens, resize listeners, and generated textures it creates.
|
|
47
|
+
* It automatically cleans up on scene shutdown or destroy. Call `handle.destroy()` when removing
|
|
48
|
+
* the background earlier.
|
|
49
|
+
*
|
|
50
|
+
* @param scene - Phaser scene that receives the background.
|
|
51
|
+
* @param config - Background type, colors, opacity, animation, and optional logo texture key.
|
|
52
|
+
* @returns A handle for manual resize and cleanup, or `null` when `config.type` is `'none'`.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const handle = addSceneBackground(scene, {
|
|
57
|
+
* type: 'grid',
|
|
58
|
+
* animation: 'wave',
|
|
59
|
+
* color: 0x4a9eff,
|
|
60
|
+
* opacity: 0.12,
|
|
61
|
+
* })
|
|
62
|
+
*
|
|
63
|
+
* // Later, if the background should be removed before scene shutdown:
|
|
64
|
+
* handle?.destroy()
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function addSceneBackground(scene: Phaser.Scene, config?: BackgroundConfig): SceneBackgroundHandle | null;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=scene-backgrounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene-backgrounds.d.ts","sourceRoot":"","sources":["../src/scene-backgrounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAA;AAErF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEvF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,IAAI,EAAE,mBAAmB,CAAA;IAEzB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,mBAAmB,CAAA;IAE/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,oDAAoD;IACpD,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,UAAU,EAAE,gBAAgB,CAAA;IAE5B,mGAAmG;IACnG,OAAO,EAAE,MAAM,IAAI,CAAA;IAEnB,yEAAyE;IACzE,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAChD;AAID;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAKhC,CAAA;AAED,KAAK,gBAAgB,GACjB,MAAM,CAAC,WAAW,CAAC,SAAS,GAC5B,MAAM,CAAC,WAAW,CAAC,KAAK,GACxB,MAAM,CAAC,WAAW,CAAC,UAAU,CAAA;AA4CjC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,GAAE,gBAAqC,GAC5C,qBAAqB,GAAG,IAAI,CA6L9B"}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import * as Phaser from "phaser";
|
|
2
|
+
const DEFAULT_LOGO_KEY = "phaser-jsx-logo";
|
|
3
|
+
const DEFAULT_BACKGROUND = {
|
|
4
|
+
type: "grid",
|
|
5
|
+
animation: "lemniscate",
|
|
6
|
+
opacity: 0.15,
|
|
7
|
+
color: 4890367
|
|
8
|
+
};
|
|
9
|
+
let sceneBackgroundTextureId = 0;
|
|
10
|
+
function colorToCss(color) {
|
|
11
|
+
return `#${color.toString(16).padStart(6, "0")}`;
|
|
12
|
+
}
|
|
13
|
+
function createCanvasTexture(scene, width, height, draw) {
|
|
14
|
+
const textureKey = `__phaserjsx_scene_bg_${sceneBackgroundTextureId++}`;
|
|
15
|
+
const textureWidth = Math.max(1, Math.ceil(width));
|
|
16
|
+
const textureHeight = Math.max(1, Math.ceil(height));
|
|
17
|
+
const texture = scene.textures.createCanvas(textureKey, textureWidth, textureHeight);
|
|
18
|
+
if (!texture) {
|
|
19
|
+
throw new Error("Unable to create scene background texture");
|
|
20
|
+
}
|
|
21
|
+
const canvas = texture.getSourceImage();
|
|
22
|
+
const ctx = canvas.getContext("2d");
|
|
23
|
+
if (!ctx) {
|
|
24
|
+
throw new Error("Unable to create scene background canvas texture");
|
|
25
|
+
}
|
|
26
|
+
ctx.clearRect(0, 0, textureWidth, textureHeight);
|
|
27
|
+
draw(ctx, textureWidth, textureHeight);
|
|
28
|
+
texture.refresh();
|
|
29
|
+
return textureKey;
|
|
30
|
+
}
|
|
31
|
+
function removeTexture(scene, textureKey) {
|
|
32
|
+
if (textureKey && scene.textures.exists(textureKey)) {
|
|
33
|
+
scene.textures.remove(textureKey);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function addSceneBackground(scene, config = DEFAULT_BACKGROUND) {
|
|
37
|
+
const bgConfig = config ?? DEFAULT_BACKGROUND;
|
|
38
|
+
if (bgConfig.type === "none") return null;
|
|
39
|
+
let background;
|
|
40
|
+
let backgroundTween;
|
|
41
|
+
const particleTweens = [];
|
|
42
|
+
const textureKeys = /* @__PURE__ */ new Set();
|
|
43
|
+
let resizeFn;
|
|
44
|
+
let destroyed = false;
|
|
45
|
+
const createGridBackground = () => {
|
|
46
|
+
const gridSize = 40;
|
|
47
|
+
const color = bgConfig.color ?? 4890367;
|
|
48
|
+
const opacity = bgConfig.opacity ?? 0.15;
|
|
49
|
+
const textureKey = createCanvasTexture(scene, gridSize, gridSize, (ctx, width, height) => {
|
|
50
|
+
ctx.globalAlpha = opacity;
|
|
51
|
+
ctx.strokeStyle = colorToCss(color);
|
|
52
|
+
ctx.lineWidth = 1;
|
|
53
|
+
ctx.beginPath();
|
|
54
|
+
ctx.moveTo(0.5, 0);
|
|
55
|
+
ctx.lineTo(0.5, height);
|
|
56
|
+
ctx.moveTo(0, 0.5);
|
|
57
|
+
ctx.lineTo(width, 0.5);
|
|
58
|
+
ctx.stroke();
|
|
59
|
+
});
|
|
60
|
+
textureKeys.add(textureKey);
|
|
61
|
+
const tile = scene.add.tileSprite(0, 0, scene.scale.width, scene.scale.height, textureKey);
|
|
62
|
+
tile.setOrigin(0, 0);
|
|
63
|
+
const moveGrid = (offsetX, offsetY) => {
|
|
64
|
+
tile.tilePositionX = -offsetX;
|
|
65
|
+
tile.tilePositionY = -offsetY;
|
|
66
|
+
};
|
|
67
|
+
tile.__redrawFn = moveGrid;
|
|
68
|
+
background = tile;
|
|
69
|
+
resizeFn = (width, height) => {
|
|
70
|
+
tile.setSize(width, height);
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
const createLogoBackground = () => {
|
|
74
|
+
const container = scene.add.container(scene.scale.width / 2, scene.scale.height / 2);
|
|
75
|
+
const opacity = bgConfig.opacity ?? 0.1;
|
|
76
|
+
const logoKey = bgConfig.logoKey ?? DEFAULT_LOGO_KEY;
|
|
77
|
+
const logo = scene.add.image(0, 0, logoKey);
|
|
78
|
+
logo.setAlpha(opacity);
|
|
79
|
+
logo.setScale(0.5);
|
|
80
|
+
container.add(logo);
|
|
81
|
+
background = container;
|
|
82
|
+
resizeFn = (width, height) => {
|
|
83
|
+
container.setPosition(width / 2, height / 2);
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
const createGradientBackground = () => {
|
|
87
|
+
const color1 = bgConfig.color ?? 4890367;
|
|
88
|
+
const color2 = bgConfig.colorSecondary ?? 7031551;
|
|
89
|
+
const opacity = bgConfig.opacity ?? 0.2;
|
|
90
|
+
const createGradientTexture = (width, height) => createCanvasTexture(scene, width, height, (ctx, textureWidth, textureHeight) => {
|
|
91
|
+
const gradient = ctx.createLinearGradient(0, 0, 0, textureHeight);
|
|
92
|
+
gradient.addColorStop(0, colorToCss(color1));
|
|
93
|
+
gradient.addColorStop(1, colorToCss(color2));
|
|
94
|
+
ctx.globalAlpha = opacity;
|
|
95
|
+
ctx.fillStyle = gradient;
|
|
96
|
+
ctx.fillRect(0, 0, textureWidth, textureHeight);
|
|
97
|
+
});
|
|
98
|
+
let textureKey = createGradientTexture(scene.scale.width, scene.scale.height);
|
|
99
|
+
textureKeys.add(textureKey);
|
|
100
|
+
const image = scene.add.image(0, 0, textureKey);
|
|
101
|
+
image.setOrigin(0, 0);
|
|
102
|
+
resizeFn = (width, height) => {
|
|
103
|
+
const previousTextureKey = textureKey;
|
|
104
|
+
textureKey = createGradientTexture(width, height);
|
|
105
|
+
textureKeys.add(textureKey);
|
|
106
|
+
image.setTexture(textureKey);
|
|
107
|
+
image.setDisplaySize(width, height);
|
|
108
|
+
textureKeys.delete(previousTextureKey);
|
|
109
|
+
removeTexture(scene, previousTextureKey);
|
|
110
|
+
};
|
|
111
|
+
background = image;
|
|
112
|
+
};
|
|
113
|
+
const createParticlesBackground = () => {
|
|
114
|
+
const container = scene.add.container(0, 0);
|
|
115
|
+
const particleCount = 20;
|
|
116
|
+
const color = bgConfig.color ?? 4890367;
|
|
117
|
+
const opacity = bgConfig.opacity ?? 0.1;
|
|
118
|
+
const particles = [];
|
|
119
|
+
for (let i = 0; i < particleCount; i += 1) {
|
|
120
|
+
const size = Phaser.Math.Between(2, 6);
|
|
121
|
+
const x = Phaser.Math.Between(0, scene.scale.width);
|
|
122
|
+
const y = Phaser.Math.Between(0, scene.scale.height);
|
|
123
|
+
const particle = scene.add.circle(x, y, size, color, opacity);
|
|
124
|
+
container.add(particle);
|
|
125
|
+
particles.push(particle);
|
|
126
|
+
particleTweens.push(
|
|
127
|
+
scene.tweens.add({
|
|
128
|
+
targets: particle,
|
|
129
|
+
y: particle.y + Phaser.Math.Between(-50, 50),
|
|
130
|
+
x: particle.x + Phaser.Math.Between(-50, 50),
|
|
131
|
+
alpha: opacity * 1.5,
|
|
132
|
+
duration: Phaser.Math.Between(2e3, 4e3),
|
|
133
|
+
yoyo: true,
|
|
134
|
+
repeat: -1,
|
|
135
|
+
ease: "Sine.easeInOut"
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
background = container;
|
|
140
|
+
resizeFn = (width, height) => {
|
|
141
|
+
for (const particle of particles) {
|
|
142
|
+
particle.setPosition(Phaser.Math.Between(0, width), Phaser.Math.Between(0, height));
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
switch (bgConfig.type) {
|
|
147
|
+
case "grid":
|
|
148
|
+
createGridBackground();
|
|
149
|
+
break;
|
|
150
|
+
case "logo":
|
|
151
|
+
createLogoBackground();
|
|
152
|
+
break;
|
|
153
|
+
case "gradient":
|
|
154
|
+
createGradientBackground();
|
|
155
|
+
break;
|
|
156
|
+
case "particles":
|
|
157
|
+
createParticlesBackground();
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
if (!background) return null;
|
|
161
|
+
if (bgConfig.animation && bgConfig.animation !== "static") {
|
|
162
|
+
backgroundTween = applyAnimation(scene, background, bgConfig.animation);
|
|
163
|
+
}
|
|
164
|
+
const onResize = () => {
|
|
165
|
+
if (resizeFn) resizeFn(scene.scale.width, scene.scale.height);
|
|
166
|
+
};
|
|
167
|
+
const cleanup = () => {
|
|
168
|
+
if (destroyed) return;
|
|
169
|
+
destroyed = true;
|
|
170
|
+
backgroundTween?.stop();
|
|
171
|
+
for (const tween of particleTweens) {
|
|
172
|
+
tween.stop();
|
|
173
|
+
}
|
|
174
|
+
background?.destroy();
|
|
175
|
+
background = void 0;
|
|
176
|
+
for (const textureKey of textureKeys) {
|
|
177
|
+
removeTexture(scene, textureKey);
|
|
178
|
+
}
|
|
179
|
+
textureKeys.clear();
|
|
180
|
+
scene.scale.off(Phaser.Scale.Events.RESIZE, onResize);
|
|
181
|
+
scene.events.off(Phaser.Scenes.Events.SHUTDOWN, cleanup);
|
|
182
|
+
scene.events.off(Phaser.Scenes.Events.DESTROY, cleanup);
|
|
183
|
+
};
|
|
184
|
+
scene.scale.on(Phaser.Scale.Events.RESIZE, onResize);
|
|
185
|
+
scene.events.once(Phaser.Scenes.Events.SHUTDOWN, cleanup);
|
|
186
|
+
scene.events.once(Phaser.Scenes.Events.DESTROY, cleanup);
|
|
187
|
+
return {
|
|
188
|
+
background,
|
|
189
|
+
destroy: cleanup,
|
|
190
|
+
resize: (width, height) => {
|
|
191
|
+
if (resizeFn) resizeFn(width, height);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function applyAnimation(scene, target, animation) {
|
|
196
|
+
const redrawFn = target.__redrawFn;
|
|
197
|
+
switch (animation) {
|
|
198
|
+
case "lemniscate":
|
|
199
|
+
return redrawFn ? animateLemniscate(scene, redrawFn) : animatePulse(scene, target);
|
|
200
|
+
case "wave":
|
|
201
|
+
return redrawFn ? animateWave(scene, redrawFn) : animatePulse(scene, target);
|
|
202
|
+
case "pulse":
|
|
203
|
+
return animatePulse(scene, target);
|
|
204
|
+
case "rotate":
|
|
205
|
+
return animateRotate(scene, target);
|
|
206
|
+
case "static":
|
|
207
|
+
default:
|
|
208
|
+
return void 0;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function animateLemniscate(scene, drawFn) {
|
|
212
|
+
const amplitude = 30;
|
|
213
|
+
const duration = 8e3;
|
|
214
|
+
return scene.tweens.addCounter({
|
|
215
|
+
from: 0,
|
|
216
|
+
to: Math.PI * 2,
|
|
217
|
+
duration,
|
|
218
|
+
repeat: -1,
|
|
219
|
+
onUpdate: (tween) => {
|
|
220
|
+
const t = tween.getValue();
|
|
221
|
+
if (t !== null) {
|
|
222
|
+
const offsetX = amplitude * Math.cos(t);
|
|
223
|
+
const offsetY = amplitude * Math.sin(2 * t) / 2;
|
|
224
|
+
drawFn(offsetX, offsetY);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function animateWave(scene, drawFn) {
|
|
230
|
+
return scene.tweens.addCounter({
|
|
231
|
+
from: 0,
|
|
232
|
+
to: 40,
|
|
233
|
+
duration: 3e3,
|
|
234
|
+
yoyo: true,
|
|
235
|
+
repeat: -1,
|
|
236
|
+
onUpdate: (tween) => {
|
|
237
|
+
const offset = tween.getValue();
|
|
238
|
+
if (offset !== null) {
|
|
239
|
+
drawFn(offset, 0);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
function animatePulse(scene, target) {
|
|
245
|
+
return scene.tweens.add({
|
|
246
|
+
targets: target,
|
|
247
|
+
scaleX: 1.1,
|
|
248
|
+
scaleY: 1.1,
|
|
249
|
+
duration: 2e3,
|
|
250
|
+
yoyo: true,
|
|
251
|
+
repeat: -1,
|
|
252
|
+
ease: "Sine.easeInOut"
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
function animateRotate(scene, target) {
|
|
256
|
+
return scene.tweens.add({
|
|
257
|
+
targets: target,
|
|
258
|
+
angle: 360,
|
|
259
|
+
duration: 2e4,
|
|
260
|
+
repeat: -1,
|
|
261
|
+
ease: "Linear"
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
export {
|
|
265
|
+
DEFAULT_BACKGROUND,
|
|
266
|
+
addSceneBackground
|
|
267
|
+
};
|
|
268
|
+
//# sourceMappingURL=scene-backgrounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene-backgrounds.js","sources":["../src/scene-backgrounds.ts"],"sourcesContent":["import * as Phaser from 'phaser'\n\n/**\n * Built-in decorative background variants that can be attached to a Phaser scene.\n */\nexport type SceneBackgroundType = 'grid' | 'logo' | 'gradient' | 'particles' | 'none'\n\n/**\n * Optional animation applied to a scene background after it is created.\n */\nexport type BackgroundAnimation = 'lemniscate' | 'wave' | 'pulse' | 'rotate' | 'static'\n\n/**\n * Configuration for {@link addSceneBackground}.\n */\nexport interface BackgroundConfig {\n /** Background variant to create. Use `'none'` to disable background creation. */\n type: SceneBackgroundType\n\n /** Animation preset applied to the created background. Defaults depend on caller config. */\n animation?: BackgroundAnimation\n\n /** Background opacity, usually between `0` and `1`. */\n opacity?: number\n\n /** Primary color as a Phaser numeric color, for example `0x4a9eff`. */\n color?: number\n\n /** Secondary color used by gradient backgrounds. */\n colorSecondary?: number\n\n /** Texture key used by the logo background. Defaults to the built-in logo key. */\n logoKey?: string\n}\n\n/**\n * Handle returned by {@link addSceneBackground}.\n */\nexport interface SceneBackgroundHandle {\n /** Root game object created for the background. */\n background: BackgroundTarget\n\n /** Stops animations, destroys game objects, removes generated textures, and detaches listeners. */\n destroy: () => void\n\n /** Manually resize the background to match an external viewport size. */\n resize: (width: number, height: number) => void\n}\n\nconst DEFAULT_LOGO_KEY = 'phaser-jsx-logo'\n\n/**\n * Default scene background used when no explicit config is provided.\n */\nexport const DEFAULT_BACKGROUND: BackgroundConfig = {\n type: 'grid',\n animation: 'lemniscate',\n opacity: 0.15,\n color: 0x4a9eff,\n}\n\ntype BackgroundTarget =\n | Phaser.GameObjects.Container\n | Phaser.GameObjects.Image\n | Phaser.GameObjects.TileSprite\ntype RedrawableTarget = BackgroundTarget & { __redrawFn?: (x: number, y: number) => void }\n\nlet sceneBackgroundTextureId = 0\n\nfunction colorToCss(color: number): string {\n return `#${color.toString(16).padStart(6, '0')}`\n}\n\nfunction createCanvasTexture(\n scene: Phaser.Scene,\n width: number,\n height: number,\n draw: (ctx: CanvasRenderingContext2D, width: number, height: number) => void\n): string {\n const textureKey = `__phaserjsx_scene_bg_${sceneBackgroundTextureId++}`\n const textureWidth = Math.max(1, Math.ceil(width))\n const textureHeight = Math.max(1, Math.ceil(height))\n const texture = scene.textures.createCanvas(textureKey, textureWidth, textureHeight)\n\n if (!texture) {\n throw new Error('Unable to create scene background texture')\n }\n\n const canvas = texture.getSourceImage() as HTMLCanvasElement\n const ctx = canvas.getContext('2d')\n\n if (!ctx) {\n throw new Error('Unable to create scene background canvas texture')\n }\n\n ctx.clearRect(0, 0, textureWidth, textureHeight)\n draw(ctx, textureWidth, textureHeight)\n texture.refresh()\n\n return textureKey\n}\n\nfunction removeTexture(scene: Phaser.Scene, textureKey: string | undefined): void {\n if (textureKey && scene.textures.exists(textureKey)) {\n scene.textures.remove(textureKey)\n }\n}\n\n/**\n * Adds a decorative background object to a Phaser scene.\n *\n * The helper owns all game objects, tweens, resize listeners, and generated textures it creates.\n * It automatically cleans up on scene shutdown or destroy. Call `handle.destroy()` when removing\n * the background earlier.\n *\n * @param scene - Phaser scene that receives the background.\n * @param config - Background type, colors, opacity, animation, and optional logo texture key.\n * @returns A handle for manual resize and cleanup, or `null` when `config.type` is `'none'`.\n *\n * @example\n * ```ts\n * const handle = addSceneBackground(scene, {\n * type: 'grid',\n * animation: 'wave',\n * color: 0x4a9eff,\n * opacity: 0.12,\n * })\n *\n * // Later, if the background should be removed before scene shutdown:\n * handle?.destroy()\n * ```\n */\nexport function addSceneBackground(\n scene: Phaser.Scene,\n config: BackgroundConfig = DEFAULT_BACKGROUND\n): SceneBackgroundHandle | null {\n const bgConfig = config ?? DEFAULT_BACKGROUND\n if (bgConfig.type === 'none') return null\n\n let background: BackgroundTarget | undefined\n let backgroundTween: Phaser.Tweens.Tween | undefined\n const particleTweens: Phaser.Tweens.Tween[] = []\n const textureKeys = new Set<string>()\n let resizeFn: ((width: number, height: number) => void) | undefined\n let destroyed = false\n\n const createGridBackground = () => {\n const gridSize = 40\n const color = bgConfig.color ?? 0x4a9eff\n const opacity = bgConfig.opacity ?? 0.15\n const textureKey = createCanvasTexture(scene, gridSize, gridSize, (ctx, width, height) => {\n ctx.globalAlpha = opacity\n ctx.strokeStyle = colorToCss(color)\n ctx.lineWidth = 1\n ctx.beginPath()\n ctx.moveTo(0.5, 0)\n ctx.lineTo(0.5, height)\n ctx.moveTo(0, 0.5)\n ctx.lineTo(width, 0.5)\n ctx.stroke()\n })\n textureKeys.add(textureKey)\n\n const tile = scene.add.tileSprite(0, 0, scene.scale.width, scene.scale.height, textureKey)\n tile.setOrigin(0, 0)\n\n const moveGrid = (offsetX: number, offsetY: number) => {\n tile.tilePositionX = -offsetX\n tile.tilePositionY = -offsetY\n }\n\n ;(tile as RedrawableTarget).__redrawFn = moveGrid\n background = tile\n resizeFn = (width, height) => {\n tile.setSize(width, height)\n }\n }\n\n const createLogoBackground = () => {\n const container = scene.add.container(scene.scale.width / 2, scene.scale.height / 2)\n const opacity = bgConfig.opacity ?? 0.1\n const logoKey = bgConfig.logoKey ?? DEFAULT_LOGO_KEY\n\n const logo = scene.add.image(0, 0, logoKey)\n logo.setAlpha(opacity)\n logo.setScale(0.5)\n\n container.add(logo)\n background = container\n resizeFn = (width, height) => {\n container.setPosition(width / 2, height / 2)\n }\n }\n\n const createGradientBackground = () => {\n const color1 = bgConfig.color ?? 0x4a9eff\n const color2 = bgConfig.colorSecondary ?? 0x6b4aff\n const opacity = bgConfig.opacity ?? 0.2\n\n const createGradientTexture = (width: number, height: number) =>\n createCanvasTexture(scene, width, height, (ctx, textureWidth, textureHeight) => {\n const gradient = ctx.createLinearGradient(0, 0, 0, textureHeight)\n gradient.addColorStop(0, colorToCss(color1))\n gradient.addColorStop(1, colorToCss(color2))\n\n ctx.globalAlpha = opacity\n ctx.fillStyle = gradient\n ctx.fillRect(0, 0, textureWidth, textureHeight)\n })\n\n let textureKey = createGradientTexture(scene.scale.width, scene.scale.height)\n textureKeys.add(textureKey)\n\n const image = scene.add.image(0, 0, textureKey)\n image.setOrigin(0, 0)\n\n resizeFn = (width, height) => {\n const previousTextureKey = textureKey\n textureKey = createGradientTexture(width, height)\n textureKeys.add(textureKey)\n image.setTexture(textureKey)\n image.setDisplaySize(width, height)\n textureKeys.delete(previousTextureKey)\n removeTexture(scene, previousTextureKey)\n }\n\n background = image\n }\n\n const createParticlesBackground = () => {\n const container = scene.add.container(0, 0)\n const particleCount = 20\n const color = bgConfig.color ?? 0x4a9eff\n const opacity = bgConfig.opacity ?? 0.1\n const particles: Phaser.GameObjects.Arc[] = []\n\n for (let i = 0; i < particleCount; i += 1) {\n const size = Phaser.Math.Between(2, 6)\n const x = Phaser.Math.Between(0, scene.scale.width)\n const y = Phaser.Math.Between(0, scene.scale.height)\n\n const particle = scene.add.circle(x, y, size, color, opacity)\n container.add(particle)\n particles.push(particle)\n\n particleTweens.push(\n scene.tweens.add({\n targets: particle,\n y: particle.y + Phaser.Math.Between(-50, 50),\n x: particle.x + Phaser.Math.Between(-50, 50),\n alpha: opacity * 1.5,\n duration: Phaser.Math.Between(2000, 4000),\n yoyo: true,\n repeat: -1,\n ease: 'Sine.easeInOut',\n })\n )\n }\n\n background = container\n resizeFn = (width, height) => {\n for (const particle of particles) {\n particle.setPosition(Phaser.Math.Between(0, width), Phaser.Math.Between(0, height))\n }\n }\n }\n\n switch (bgConfig.type) {\n case 'grid':\n createGridBackground()\n break\n case 'logo':\n createLogoBackground()\n break\n case 'gradient':\n createGradientBackground()\n break\n case 'particles':\n createParticlesBackground()\n break\n }\n\n if (!background) return null\n\n if (bgConfig.animation && bgConfig.animation !== 'static') {\n backgroundTween = applyAnimation(scene, background, bgConfig.animation)\n }\n\n const onResize = () => {\n if (resizeFn) resizeFn(scene.scale.width, scene.scale.height)\n }\n\n const cleanup = () => {\n if (destroyed) return\n destroyed = true\n\n backgroundTween?.stop()\n for (const tween of particleTweens) {\n tween.stop()\n }\n\n background?.destroy()\n background = undefined\n for (const textureKey of textureKeys) {\n removeTexture(scene, textureKey)\n }\n textureKeys.clear()\n\n scene.scale.off(Phaser.Scale.Events.RESIZE, onResize)\n scene.events.off(Phaser.Scenes.Events.SHUTDOWN, cleanup)\n scene.events.off(Phaser.Scenes.Events.DESTROY, cleanup)\n }\n\n scene.scale.on(Phaser.Scale.Events.RESIZE, onResize)\n scene.events.once(Phaser.Scenes.Events.SHUTDOWN, cleanup)\n scene.events.once(Phaser.Scenes.Events.DESTROY, cleanup)\n\n return {\n background,\n destroy: cleanup,\n resize: (width, height) => {\n if (resizeFn) resizeFn(width, height)\n },\n }\n}\n\nfunction applyAnimation(\n scene: Phaser.Scene,\n target: BackgroundTarget,\n animation: BackgroundAnimation\n): Phaser.Tweens.Tween | undefined {\n const redrawFn = (target as RedrawableTarget).__redrawFn\n\n switch (animation) {\n case 'lemniscate':\n return redrawFn ? animateLemniscate(scene, redrawFn) : animatePulse(scene, target)\n case 'wave':\n return redrawFn ? animateWave(scene, redrawFn) : animatePulse(scene, target)\n case 'pulse':\n return animatePulse(scene, target)\n case 'rotate':\n return animateRotate(scene, target)\n case 'static':\n default:\n return undefined\n }\n}\n\nfunction animateLemniscate(\n scene: Phaser.Scene,\n drawFn: (x: number, y: number) => void\n): Phaser.Tweens.Tween {\n const amplitude = 30\n const duration = 8000\n\n return scene.tweens.addCounter({\n from: 0,\n to: Math.PI * 2,\n duration,\n repeat: -1,\n onUpdate: (tween) => {\n const t = tween.getValue()\n if (t !== null) {\n const offsetX = amplitude * Math.cos(t)\n const offsetY = (amplitude * Math.sin(2 * t)) / 2\n drawFn(offsetX, offsetY)\n }\n },\n })\n}\n\nfunction animateWave(\n scene: Phaser.Scene,\n drawFn: (x: number, y: number) => void\n): Phaser.Tweens.Tween {\n return scene.tweens.addCounter({\n from: 0,\n to: 40,\n duration: 3000,\n yoyo: true,\n repeat: -1,\n onUpdate: (tween) => {\n const offset = tween.getValue()\n if (offset !== null) {\n drawFn(offset, 0)\n }\n },\n })\n}\n\nfunction animatePulse(scene: Phaser.Scene, target: BackgroundTarget): Phaser.Tweens.Tween {\n return scene.tweens.add({\n targets: target,\n scaleX: 1.1,\n scaleY: 1.1,\n duration: 2000,\n yoyo: true,\n repeat: -1,\n ease: 'Sine.easeInOut',\n })\n}\n\nfunction animateRotate(scene: Phaser.Scene, target: BackgroundTarget): Phaser.Tweens.Tween {\n return scene.twe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d,cAAM,UAAU,YAAY,KAAK,IAAI,CAAC;AACtC,cAAM,UAAW,YAAY,KAAK,IAAI,IAAI,CAAC,IAAK;AAChD,eAAO,SAAS,OAAO;AAAA,MACzB;AAAA,IACF;AAAA,EAAA,CACD;AACH;AAEA,SAAS,YACP,OACA,QACqB;AACrB,SAAO,MAAM,OAAO,WAAW;AAAA,IAC7B,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU,CAAC,UAAU;AACnB,YAAM,SAAS,MAAM,SAAA;AACrB,UAAI,WAAW,MAAM;AACnB,eAAO,QAAQ,CAAC;AAAA,MAClB;AAAA,IACF;AAAA,EAAA,CACD;AACH;AAEA,SAAS,aAAa,OAAqB,QAA+C;AACxF,SAAO,MAAM,OAAO,IAAI;AAAA,IACtB,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;AAEA,SAAS,cAAc,OAAqB,QAA+C;AACzF,SAAO,MAAM,OAAO,IAAI;AAAA,IACtB,SAAS;AAAA,IACT,OAAO;AAAA,IACP,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA,CACP;AACH;"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { IconProps } from './components/custom';
|
|
2
|
+
import { BackgroundProps, LayoutProps, PhaserProps, TextSpecificProps, TransformProps } from './core-props';
|
|
3
|
+
import { CustomComponentThemes } from './theme-custom';
|
|
4
|
+
import { PartialTheme as CorePartialTheme, PortableTextStyle } from '@number10/jsx-core';
|
|
5
|
+
/**
|
|
6
|
+
* Type helper for nested component themes
|
|
7
|
+
* Allows a component theme to include nested themes for child components
|
|
8
|
+
* Excludes lowercase primitives to avoid conflicts with prop names
|
|
9
|
+
*/
|
|
10
|
+
export type NestedComponentThemes = {
|
|
11
|
+
[K in Exclude<keyof ComponentThemes, 'view' | 'text' | 'nineslice' | 'sprite' | 'image' | 'graphics' | 'vectorDraw' | 'tilesprite' | 'particles'>]?: Partial<ComponentThemes[K]>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Theme definition for View component
|
|
15
|
+
* Includes all visual props that can be themed, plus nested component themes
|
|
16
|
+
*/
|
|
17
|
+
export interface ViewTheme extends Partial<TransformProps>, Partial<PhaserProps>, Partial<LayoutProps>, Partial<BackgroundProps>, NestedComponentThemes {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Theme definition for Text component
|
|
21
|
+
* Includes all text-specific visual props that can be themed, plus nested component themes
|
|
22
|
+
*/
|
|
23
|
+
export interface TextTheme extends Partial<TransformProps>, Partial<PhaserProps>, Partial<TextSpecificProps>, NestedComponentThemes {
|
|
24
|
+
visible?: boolean | import('./core-props').Display;
|
|
25
|
+
style?: PortableTextStyle;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Theme definition for NineSlice component
|
|
29
|
+
*/
|
|
30
|
+
export interface NineSliceTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
31
|
+
visible?: boolean | import('./core-props').Display;
|
|
32
|
+
texture?: string;
|
|
33
|
+
leftWidth?: number;
|
|
34
|
+
rightWidth?: number;
|
|
35
|
+
topHeight?: number;
|
|
36
|
+
bottomHeight?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Theme definition for Sprite component (dummy - minimal theme support)
|
|
40
|
+
*/
|
|
41
|
+
export interface SpriteTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
42
|
+
visible?: boolean | import('./core-props').Display;
|
|
43
|
+
texture?: string;
|
|
44
|
+
tint?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Theme definition for Image component (dummy - minimal theme support)
|
|
48
|
+
*/
|
|
49
|
+
export interface ImageTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
50
|
+
visible?: boolean | import('./core-props').Display;
|
|
51
|
+
texture?: string;
|
|
52
|
+
tint?: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Theme definition for Graphics component (dummy - minimal theme support)
|
|
56
|
+
*/
|
|
57
|
+
export interface GraphicsTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
58
|
+
visible?: boolean | import('./core-props').Display;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Theme definition for portable vector drawing content.
|
|
62
|
+
*/
|
|
63
|
+
export interface VectorDrawTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
64
|
+
visible?: boolean | import('./core-props').Display;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Theme definition for TileSprite component (dummy - minimal theme support)
|
|
68
|
+
*/
|
|
69
|
+
export interface TileSpriteTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
70
|
+
visible?: boolean | import('./core-props').Display;
|
|
71
|
+
texture?: string;
|
|
72
|
+
tint?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Theme definition for Particles component (minimal support)
|
|
76
|
+
*/
|
|
77
|
+
export interface ParticlesTheme extends Partial<TransformProps>, Partial<PhaserProps>, NestedComponentThemes {
|
|
78
|
+
visible?: boolean | import('./core-props').Display;
|
|
79
|
+
texture?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface IconTheme extends Partial<IconProps> {
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Built-in component theme definitions
|
|
85
|
+
*/
|
|
86
|
+
export interface BuiltInComponentThemes {
|
|
87
|
+
view: ViewTheme;
|
|
88
|
+
text: TextTheme;
|
|
89
|
+
nineslice: NineSliceTheme;
|
|
90
|
+
sprite: SpriteTheme;
|
|
91
|
+
image: ImageTheme;
|
|
92
|
+
graphics: GraphicsTheme;
|
|
93
|
+
vectorDraw: VectorDrawTheme;
|
|
94
|
+
tilesprite: TileSpriteTheme;
|
|
95
|
+
particles: ParticlesTheme;
|
|
96
|
+
View: ViewTheme;
|
|
97
|
+
Text: TextTheme;
|
|
98
|
+
NineSlice: NineSliceTheme;
|
|
99
|
+
Sprite: SpriteTheme;
|
|
100
|
+
Image: ImageTheme;
|
|
101
|
+
Graphics: GraphicsTheme;
|
|
102
|
+
TileSprite: TileSpriteTheme;
|
|
103
|
+
Particles: ParticlesTheme;
|
|
104
|
+
Icon: IconTheme;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Complete theme definition combining built-in and custom components
|
|
108
|
+
*/
|
|
109
|
+
export interface ComponentThemes extends BuiltInComponentThemes, CustomComponentThemes {
|
|
110
|
+
}
|
|
111
|
+
export type { CustomComponentThemes };
|
|
112
|
+
/**
|
|
113
|
+
* Phaser-specific theme override map.
|
|
114
|
+
*
|
|
115
|
+
* When a component moves from Phaser to core, its theme interface moves into
|
|
116
|
+
* core's ComponentThemes generic and is removed from this instantiation.
|
|
117
|
+
*
|
|
118
|
+
* A hypothetical Pixi renderer would define:
|
|
119
|
+
* type PixiPartialTheme = CorePartialTheme<PixiComponentThemes>
|
|
120
|
+
*/
|
|
121
|
+
export type PhaserPartialTheme = CorePartialTheme<ComponentThemes>;
|
|
122
|
+
/** @deprecated Prefer PhaserPartialTheme for renderer-specific theme overrides. */
|
|
123
|
+
export type PartialTheme = PhaserPartialTheme;
|
|
124
|
+
/**
|
|
125
|
+
* Complete theme with all component styles defined
|
|
126
|
+
* Built-in components are required, custom components are optional
|
|
127
|
+
*/
|
|
128
|
+
export type Theme = {
|
|
129
|
+
[K in keyof BuiltInComponentThemes]: BuiltInComponentThemes[K];
|
|
130
|
+
} & {
|
|
131
|
+
[K in keyof Omit<ComponentThemes, keyof BuiltInComponentThemes>]?: ComponentThemes[K];
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=theme-base.d.ts.map
|
|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AACnF,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;KACjB,CAAC,IAAI,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,CAAC,CAAC;CAC/D,GAAG;KACD,CAAC,IAAI,MAAM,IAAI,CAAC,eAAe,EAAE,MAAM,sBAAsB,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;CACtF,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PortableComponentThemes } from '@number10/jsx-components';
|
|
2
|
+
import { EffectName } from '@number10/jsx-core';
|
|
3
|
+
import { NestedComponentThemes, ViewTheme } from './theme-base';
|
|
4
|
+
type PortablePrimitiveThemeKeys = 'View' | 'Text' | 'Image' | 'Sprite' | 'Icon';
|
|
5
|
+
type PortableCustomComponentThemes = Omit<PortableComponentThemes, PortablePrimitiveThemeKeys>;
|
|
6
|
+
export interface CustomComponentThemes extends PortableCustomComponentThemes {
|
|
7
|
+
NineSliceButton: ViewTheme & {
|
|
8
|
+
effect?: EffectName;
|
|
9
|
+
effectConfig?: Record<string, unknown>;
|
|
10
|
+
} & NestedComponentThemes;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=theme-custom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-custom.d.ts","sourceRoot":"","sources":["../src/theme-custom.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEpE,KAAK,0BAA0B,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAC/E,KAAK,6BAA6B,GAAG,IAAI,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,CAAA;AAE9F,MAAM,WAAW,qBAAsB,SAAQ,6BAA6B;IAC1E,eAAe,EAAE,SAAS,GAAG;QAC3B,MAAM,CAAC,EAAE,UAAU,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KACvC,GAAG,qBAAqB,CAAA;CAC1B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxCore = require("@number10/jsx-core");
|
|
3
|
+
function registerPrimitiveDefaults(name) {
|
|
4
|
+
jsxCore.registerComponentThemeDefaults(name, () => ({ alpha: 1, visible: true }));
|
|
5
|
+
}
|
|
6
|
+
function registerTextDefaults(name) {
|
|
7
|
+
jsxCore.registerComponentThemeDefaults(name, (colors) => ({
|
|
8
|
+
text: "",
|
|
9
|
+
alpha: 1,
|
|
10
|
+
visible: true,
|
|
11
|
+
style: jsxCore.createTextStyleTokens(colors.text.DEFAULT.toString()).DEFAULT
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
function registerPhaserThemeDefaults() {
|
|
15
|
+
registerPrimitiveDefaults("view");
|
|
16
|
+
registerTextDefaults("text");
|
|
17
|
+
registerPrimitiveDefaults("nineslice");
|
|
18
|
+
registerPrimitiveDefaults("NineSlice");
|
|
19
|
+
registerPrimitiveDefaults("graphics");
|
|
20
|
+
registerPrimitiveDefaults("Graphics");
|
|
21
|
+
registerPrimitiveDefaults("vectorDraw");
|
|
22
|
+
registerPrimitiveDefaults("tilesprite");
|
|
23
|
+
registerPrimitiveDefaults("TileSprite");
|
|
24
|
+
registerPrimitiveDefaults("particles");
|
|
25
|
+
registerPrimitiveDefaults("Particles");
|
|
26
|
+
jsxCore.registerComponentThemeDefaults("NineSliceButton", () => ({}));
|
|
27
|
+
}
|
|
28
|
+
registerPhaserThemeDefaults();
|
|
29
|
+
//# sourceMappingURL=theme-defaults.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-defaults.cjs","sources":["../src/theme-defaults.ts"],"sourcesContent":["/**\n * Phaser-specific theme default registration.\n *\n * Portable component defaults live in @number10/jsx-components. This module only\n * contributes Phaser host primitives and Phaser-only custom component themes.\n */\nimport {\n createTextStyleTokens,\n registerComponentThemeDefaults,\n type ColorTokens,\n} from '@number10/jsx-core'\nimport './theme-custom' // Import to activate declaration merging\n\nfunction registerPrimitiveDefaults(name: string): void {\n registerComponentThemeDefaults(name, () => ({ alpha: 1, visible: true }))\n}\n\nfunction registerTextDefaults(name: string): void {\n registerComponentThemeDefaults(name, (colors: ColorTokens) => ({\n text: '',\n alpha: 1,\n visible: true,\n style: createTextStyleTokens(colors.text.DEFAULT.toString()).DEFAULT,\n }))\n}\n\nfunction registerPhaserThemeDefaults(): void {\n registerPrimitiveDefaults('view')\n registerTextDefaults('text')\n registerPrimitiveDefaults('nineslice')\n registerPrimitiveDefaults('NineSlice')\n registerPrimitiveDefaults('graphics')\n registerPrimitiveDefaults('Graphics')\n registerPrimitiveDefaults('vectorDraw')\n registerPrimitiveDefaults('tilesprite')\n registerPrimitiveDefaults('TileSprite')\n registerPrimitiveDefaults('particles')\n registerPrimitiveDefaults('Particles')\n\n registerComponentThemeDefaults('NineSliceButton', () => ({}))\n}\n\nregisterPhaserThemeDefaults()\n"],"names":["registerComponentThemeDefaults","createTextStyleTokens"],"mappings":";;AAaA,SAAS,0BAA0B,MAAoB;AACrDA,UAAAA,+BAA+B,MAAM,OAAO,EAAE,OAAO,GAAG,SAAS,OAAO;AAC1E;AAEA,SAAS,qBAAqB,MAAoB;AAChDA,yCAA+B,MAAM,CAAC,YAAyB;AAAA,IAC7D,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAOC,QAAAA,sBAAsB,OAAO,KAAK,QAAQ,SAAA,CAAU,EAAE;AAAA,EAAA,EAC7D;AACJ;AAEA,SAAS,8BAAoC;AAC3C,4BAA0B,MAAM;AAChC,uBAAqB,MAAM;AAC3B,4BAA0B,WAAW;AACrC,4BAA0B,WAAW;AACrC,4BAA0B,UAAU;AACpC,4BAA0B,UAAU;AACpC,4BAA0B,YAAY;AACtC,4BAA0B,YAAY;AACtC,4BAA0B,YAAY;AACtC,4BAA0B,WAAW;AACrC,4BAA0B,WAAW;AAErCD,yCAA+B,mBAAmB,OAAO,CAAA,EAAG;AAC9D;AAEA,4BAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=theme-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-defaults.d.ts","sourceRoot":"","sources":["../src/theme-defaults.ts"],"names":[],"mappings":"AAWA,OAAO,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { registerComponentThemeDefaults, createTextStyleTokens } from "@number10/jsx-core";
|
|
2
|
+
function registerPrimitiveDefaults(name) {
|
|
3
|
+
registerComponentThemeDefaults(name, () => ({ alpha: 1, visible: true }));
|
|
4
|
+
}
|
|
5
|
+
function registerTextDefaults(name) {
|
|
6
|
+
registerComponentThemeDefaults(name, (colors) => ({
|
|
7
|
+
text: "",
|
|
8
|
+
alpha: 1,
|
|
9
|
+
visible: true,
|
|
10
|
+
style: createTextStyleTokens(colors.text.DEFAULT.toString()).DEFAULT
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
function registerPhaserThemeDefaults() {
|
|
14
|
+
registerPrimitiveDefaults("view");
|
|
15
|
+
registerTextDefaults("text");
|
|
16
|
+
registerPrimitiveDefaults("nineslice");
|
|
17
|
+
registerPrimitiveDefaults("NineSlice");
|
|
18
|
+
registerPrimitiveDefaults("graphics");
|
|
19
|
+
registerPrimitiveDefaults("Graphics");
|
|
20
|
+
registerPrimitiveDefaults("vectorDraw");
|
|
21
|
+
registerPrimitiveDefaults("tilesprite");
|
|
22
|
+
registerPrimitiveDefaults("TileSprite");
|
|
23
|
+
registerPrimitiveDefaults("particles");
|
|
24
|
+
registerPrimitiveDefaults("Particles");
|
|
25
|
+
registerComponentThemeDefaults("NineSliceButton", () => ({}));
|
|
26
|
+
}
|
|
27
|
+
registerPhaserThemeDefaults();
|
|
28
|
+
//# sourceMappingURL=theme-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-defaults.js","sources":["../src/theme-defaults.ts"],"sourcesContent":["/**\n * Phaser-specific theme default registration.\n *\n * Portable component defaults live in @number10/jsx-components. This module only\n * contributes Phaser host primitives and Phaser-only custom component themes.\n */\nimport {\n createTextStyleTokens,\n registerComponentThemeDefaults,\n type ColorTokens,\n} from '@number10/jsx-core'\nimport './theme-custom' // Import to activate declaration merging\n\nfunction registerPrimitiveDefaults(name: string): void {\n registerComponentThemeDefaults(name, () => ({ alpha: 1, visible: true }))\n}\n\nfunction registerTextDefaults(name: string): void {\n registerComponentThemeDefaults(name, (colors: ColorTokens) => ({\n text: '',\n alpha: 1,\n visible: true,\n style: createTextStyleTokens(colors.text.DEFAULT.toString()).DEFAULT,\n }))\n}\n\nfunction registerPhaserThemeDefaults(): void {\n registerPrimitiveDefaults('view')\n registerTextDefaults('text')\n registerPrimitiveDefaults('nineslice')\n registerPrimitiveDefaults('NineSlice')\n registerPrimitiveDefaults('graphics')\n registerPrimitiveDefaults('Graphics')\n registerPrimitiveDefaults('vectorDraw')\n registerPrimitiveDefaults('tilesprite')\n registerPrimitiveDefaults('TileSprite')\n registerPrimitiveDefaults('particles')\n registerPrimitiveDefaults('Particles')\n\n registerComponentThemeDefaults('NineSliceButton', () => ({}))\n}\n\nregisterPhaserThemeDefaults()\n"],"names":[],"mappings":";AAaA,SAAS,0BAA0B,MAAoB;AACrD,iCAA+B,MAAM,OAAO,EAAE,OAAO,GAAG,SAAS,OAAO;AAC1E;AAEA,SAAS,qBAAqB,MAAoB;AAChD,iCAA+B,MAAM,CAAC,YAAyB;AAAA,IAC7D,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OAAO,sBAAsB,OAAO,KAAK,QAAQ,SAAA,CAAU,EAAE;AAAA,EAAA,EAC7D;AACJ;AAEA,SAAS,8BAAoC;AAC3C,4BAA0B,MAAM;AAChC,uBAAqB,MAAM;AAC3B,4BAA0B,WAAW;AACrC,4BAA0B,WAAW;AACrC,4BAA0B,UAAU;AACpC,4BAA0B,UAAU;AACpC,4BAA0B,YAAY;AACtC,4BAA0B,YAAY;AACtC,4BAA0B,YAAY;AACtC,4BAA0B,WAAW;AACrC,4BAA0B,WAAW;AAErC,iCAA+B,mBAAmB,OAAO,CAAA,EAAG;AAC9D;AAEA,4BAAA;"}
|
package/dist/theme.cjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxCore = require("@number10/jsx-core");
|
|
4
|
+
require("@number10/jsx-components");
|
|
5
|
+
require("./theme-defaults.cjs");
|
|
6
|
+
const themeRegistry = jsxCore.themeRegistry;
|
|
7
|
+
const defaultTheme = jsxCore.defaultTheme;
|
|
8
|
+
function createDefaultTheme(presetName = "oceanBlue", mode = "light") {
|
|
9
|
+
return jsxCore.createDefaultTheme(presetName, mode);
|
|
10
|
+
}
|
|
11
|
+
function mergeThemes(base, override) {
|
|
12
|
+
return jsxCore.mergeThemes(base, override);
|
|
13
|
+
}
|
|
14
|
+
function createTheme(theme, colorPreset) {
|
|
15
|
+
return jsxCore.createTheme(theme, colorPreset);
|
|
16
|
+
}
|
|
17
|
+
function getThemedProps(componentName, localTheme, explicitProps) {
|
|
18
|
+
return jsxCore.getThemedProps(
|
|
19
|
+
componentName,
|
|
20
|
+
localTheme,
|
|
21
|
+
explicitProps
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(exports, "setThemeRemountHandler", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: () => jsxCore.setThemeRemountHandler
|
|
27
|
+
});
|
|
28
|
+
exports.createDefaultTheme = createDefaultTheme;
|
|
29
|
+
exports.createTheme = createTheme;
|
|
30
|
+
exports.defaultTheme = defaultTheme;
|
|
31
|
+
exports.getThemedProps = getThemedProps;
|
|
32
|
+
exports.mergeThemes = mergeThemes;
|
|
33
|
+
exports.themeRegistry = themeRegistry;
|
|
34
|
+
//# sourceMappingURL=theme.cjs.map
|