pixi-solid 0.0.7 → 0.0.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pixi-components.js","names":["Pixi","AnimatedSprite","PixiAnimatedSprite","BitmapText","PixiBitmapText","Container","PixiContainer","Graphics","PixiGraphics","HTMLText","PixiHTMLText","MeshPlane","PixiMeshPlane","MeshRope","PixiMeshRope","MeshSimple","PixiMeshSimple","NineSliceSprite","PixiNineSliceSprite","ParticleContainer","PixiParticleContainer","PerspectiveMesh","PixiPerspectiveMesh","RenderContainer","PixiRenderContainer","RenderLayer","PixiRenderLayer","Sprite","PixiSprite","Text","PixiText","TilingSprite","PixiTilingSprite","JSX","Ref","createRenderEffect","splitProps","PixiEventHandlerMap","PIXI_EVENT_HANDLER_NAMES","insert","setProp","ContainerProps","ref","Component","as","children","Element","LeafProps","Omit","SOLID_PROP_KEYS","const","applyProps","InstanceType","instance","props","OptionsType","key","arg","Error","createContainerComponent","PixiClass","runtimeProps","initialisationProps","createLeafComponent","AnimatedSpriteOptions","TextOptions","ContainerOptions","GraphicsOptions","HTMLTextOptions","MeshPlaneOptions","MeshRopeOptions","SimpleMeshOptions","NineSliceSpriteOptions","ParticleContainerOptions","PerspectivePlaneOptions","RenderContainerOptions","RenderLayerOptions","SpriteOptions","CanvasTextOptions","TilingSpriteOptions"],"sources":["../src/pixi-components.tsx"],"sourcesContent":["import type * as Pixi from \"pixi.js\";\nimport {\n AnimatedSprite as PixiAnimatedSprite,\n BitmapText as PixiBitmapText,\n Container as PixiContainer,\n Graphics as PixiGraphics,\n HTMLText as PixiHTMLText,\n MeshPlane as PixiMeshPlane,\n MeshRope as PixiMeshRope,\n MeshSimple as PixiMeshSimple,\n NineSliceSprite as PixiNineSliceSprite,\n ParticleContainer as PixiParticleContainer,\n PerspectiveMesh as PixiPerspectiveMesh,\n RenderContainer as PixiRenderContainer,\n RenderLayer as PixiRenderLayer,\n Sprite as PixiSprite,\n Text as PixiText,\n TilingSprite as PixiTilingSprite,\n} from \"pixi.js\";\nimport type { JSX, Ref } from \"solid-js\";\nimport { createRenderEffect, splitProps } from \"solid-js\";\nimport type { PixiEventHandlerMap } from \"./pixi-events\";\n\nimport { PIXI_EVENT_HANDLER_NAMES } from \"./pixi-events\";\nimport { insert, setProp } from \"./renderer\";\n\n/**\n * Prop definition for components that CAN have children\n */\nexport type ContainerProps<Component> = PixiEventHandlerMap & {\n ref?: Ref<Component>;\n as?: Component;\n children?: JSX.Element;\n};\n\n/**\n * Prop definition for components that CANNOT have children\n */\nexport type LeafProps<Component> = Omit<ContainerProps<Component>, \"children\">;\n\n// Keys that are specific to Solid components and not Pixi props\nexport const SOLID_PROP_KEYS = [\"ref\", \"as\", \"children\"] as const;\n\n/**\n * Apply's the props to a Pixi instance with subsriptions to maintain reactivity.\n *\n * @param instance The Pixi instance we want to apply props to.\n * @param props The props object.\n */\nexport const applyProps = <\n InstanceType extends PixiContainer,\n OptionsType extends ContainerProps<InstanceType>,\n>(\n instance: InstanceType,\n props: OptionsType,\n) => {\n for (const key in props) {\n if (key === \"as\") continue;\n\n if (key === \"ref\") {\n createRenderEffect(() => {\n // Solid converts the ref prop to a callback function\n (props[key] as unknown as (arg: any) => void)(instance);\n });\n } else if (key === \"children\") {\n if (!(\"addChild\" in instance)) {\n throw new Error(`Cannot set children on non-container instance.`);\n }\n createRenderEffect(() => {\n insert(instance, () => props.children);\n });\n } else {\n createRenderEffect(() => {\n setProp(instance, key, props[key as keyof typeof props]);\n });\n }\n }\n};\n\nconst createContainerComponent = <InstanceType extends PixiContainer, OptionsType extends object>(\n PixiClass: new (props: OptionsType) => InstanceType,\n) => {\n return (props: Omit<OptionsType, \"children\"> & ContainerProps<InstanceType>): JSX.Element => {\n const [runtimeProps, initialisationProps] = splitProps(props, [\n ...SOLID_PROP_KEYS,\n ...PIXI_EVENT_HANDLER_NAMES,\n ]);\n\n const instance = props.as || new PixiClass(initialisationProps as any);\n\n applyProps(instance, initialisationProps);\n applyProps(instance, runtimeProps);\n\n return instance as unknown as JSX.Element;\n };\n};\n\nconst createLeafComponent = <InstanceType extends PixiContainer, OptionsType extends object>(\n PixiClass: new (props: OptionsType) => InstanceType,\n) => {\n return (props: Omit<OptionsType, \"children\"> & LeafProps<InstanceType>): JSX.Element => {\n return createContainerComponent<PixiContainer, OptionsType>(PixiClass)(props as any);\n };\n};\n\n/**\n * A SolidJS component that renders a `PIXI.AnimatedSprite`.\n */\nexport const AnimatedSprite = createLeafComponent<PixiAnimatedSprite, Pixi.AnimatedSpriteOptions>(\n PixiAnimatedSprite,\n);\n/**\n * A SolidJS component that renders a `PIXI.BitmapText`.\n */\nexport const BitmapText = createLeafComponent<PixiBitmapText, Pixi.TextOptions>(PixiBitmapText);\n/**\n * A SolidJS component that renders a `PIXI.Container`.\n */\nexport const Container = createContainerComponent<PixiContainer, Pixi.ContainerOptions>(\n PixiContainer,\n);\n/**\n * A SolidJS component that renders a `PIXI.Graphics`.\n * Use a ref to access the underlying graphics instance and draw with it.\n */\nexport const Graphics = createLeafComponent<PixiGraphics, Pixi.GraphicsOptions>(PixiGraphics);\n/**\n * A SolidJS component that renders a `PIXI.HTMLText`.\n */\nexport const HTMLText = createLeafComponent<PixiHTMLText, Pixi.HTMLTextOptions>(PixiHTMLText);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshPlane`.\n */\nexport const MeshPlane = createLeafComponent<PixiMeshPlane, Pixi.MeshPlaneOptions>(PixiMeshPlane);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshRope`.\n */\nexport const MeshRope = createLeafComponent<PixiMeshRope, Pixi.MeshRopeOptions>(PixiMeshRope);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshSimple`.\n */\nexport const MeshSimple = createLeafComponent<PixiMeshSimple, Pixi.SimpleMeshOptions>(\n PixiMeshSimple,\n);\n\n/**\n * A SolidJS component that renders a `PIXI.NineSliceSprite`.\n */\nexport const NineSliceSprite = createLeafComponent<\n PixiNineSliceSprite,\n Pixi.NineSliceSpriteOptions\n>(PixiNineSliceSprite);\n\n/**\n * A SolidJS component that renders a `PIXI.ParticleContainer`.\n *\n * Particles should be added and removed from this component imperatively. Please see the docs for a reference example.\n */\nexport const ParticleContainer = createLeafComponent<\n PixiParticleContainer,\n Pixi.ParticleContainerOptions\n>(PixiParticleContainer);\n\n/**\n * A SolidJS component that renders a `PIXI.PerspectiveMesh`.\n */\nexport const PerspectiveMesh = createLeafComponent<\n PixiPerspectiveMesh,\n Pixi.PerspectivePlaneOptions\n>(PixiPerspectiveMesh);\n\n/**\n * A SolidJS component that renders a `PIXI.RenderContainer`.\n */\nexport const RenderContainer = createContainerComponent<\n PixiRenderContainer,\n Pixi.RenderContainerOptions\n>(PixiRenderContainer);\n\n/**\n * A SolidJS component that renders a `PIXI.RenderLayer`.\n */\nexport const RenderLayer = createContainerComponent<PixiRenderLayer, Pixi.RenderLayerOptions>(\n PixiRenderLayer,\n);\n\n/**\n * A SolidJS component that renders a `PIXI.Sprite`.\n */\nexport const Sprite = createLeafComponent<PixiSprite, Pixi.SpriteOptions>(PixiSprite);\n/**\n * A SolidJS component that renders a `PIXI.Text`.\n */\nexport const Text = createLeafComponent<PixiText, Pixi.CanvasTextOptions>(PixiText);\n\n/**\n * A SolidJS component that renders a `PIXI.TilingSprite`.\n */\nexport const TilingSprite = createLeafComponent<PixiTilingSprite, Pixi.TilingSpriteOptions>(\n PixiTilingSprite,\n);\n\n// export const MeshGeometry = createLeafComponent<PixiMeshGeometry, Pixi.MeshGeometryOptions>(PixiMeshGeometry);\n// export const NineSliceGeometry = createLeafComponent<PixiNineSliceGeometry, Pixi.NineSliceGeometryOptions>(\n// PixiNineSliceGeometry\n// );\n\n// export const Particle = createLeafComponent<PixiParticle, Pixi.ParticleOptions>(PixiParticle);\n// export const PerspectivePlaneGeometry = createLeafComponent<\n// PixiPerspectivePlaneGeometry,\n// Pixi.PerspectivePlaneGeometryOptions\n// >(PixiPerspectivePlaneGeometry);\n// export const PlaneGeometry = createLeafComponent<PixiPlaneGeometry, Pixi.PlaneGeometryOptions>(PixiPlaneGeometry);\n// export const RopeGeometry = createLeafComponent<PixiRopeGeometry, Pixi.RopeGeometryOptions>(PixiRopeGeometry);\n\n// TODO: Don't need a component for the Culler. It needs to interact with the stage directly.\n// export const Culler = createLeafComponent<PixiCuller, Pixi.Culler>(PixiCuller);\n"],"mappings":";;;;;;AAyCA,MAAaiD,kBAAkB;CAAC;CAAO;CAAM;CAAW;;;;;;;AAQxD,MAAaE,cAIXE,UACAC,UACG;AACH,MAAK,MAAME,OAAOF,OAAO;AACvB,MAAIE,QAAQ,KAAM;AAElB,MAAIA,QAAQ,MACVrB,0BAAyB;AAEtBmB,SAAME,KAAuCH,SAAS;IACvD;WACOG,QAAQ,YAAY;AAC7B,OAAI,EAAE,cAAcH,UAClB,OAAM,IAAIK,MAAM,iDAAiD;AAEnEvB,4BAAyB;AACvBI,WAAOc,gBAAgBC,MAAMT,SAAS;KACtC;QAEFV,0BAAyB;AACvBK,WAAQa,UAAUG,KAAKF,MAAME,KAA2B;IACxD;;;AAKR,IAAMG,4BACJC,cACG;AACH,SAAQN,UAAqF;EAC3F,MAAM,CAACO,cAAcC,uBAAuB1B,WAAWkB,OAAO,CAC5D,GAAGL,iBACH,GAAGX,yBACJ,CAAC;EAEF,MAAMe,WAAWC,MAAMV,MAAM,IAAIgB,UAAUE,oBAA2B;AAEtEX,aAAWE,UAAUS,oBAAoB;AACzCX,aAAWE,UAAUQ,aAAa;AAElC,SAAOR;;;AAIX,IAAMU,uBACJH,cACG;AACH,SAAQN,UAAgF;AACtF,SAAOK,yBAAqDC,UAAU,CAACN,MAAa;;;;;;AAOxF,MAAarD,mBAAiB8D,oBAC5B7D,eACD;;;;AAID,MAAaC,eAAa4D,oBAAsD3D,WAAe;;;;AAI/F,MAAaC,cAAYsD,yBACvBrD,UACD;;;;;AAKD,MAAaC,aAAWwD,oBAAwDvD,SAAa;;;;AAI7F,MAAaC,aAAWsD,oBAAwDrD,SAAa;;;;AAK7F,MAAaC,cAAYoD,oBAA0DnD,UAAc;;;;AAKjG,MAAaC,aAAWkD,oBAAwDjD,SAAa;;;;AAK7F,MAAaC,eAAagD,oBACxB/C,WACD;;;;AAKD,MAAaC,oBAAkB8C,oBAG7B7C,gBAAoB;;;;;;AAOtB,MAAaC,sBAAoB4C,oBAG/B3C,kBAAsB;;;;AAKxB,MAAaC,oBAAkB0C,oBAG7BzC,gBAAoB;;;;AAKtB,MAAaC,oBAAkBoC,yBAG7BnC,gBAAoB;;;;AAKtB,MAAaC,gBAAckC,yBACzBjC,YACD;;;;AAKD,MAAaC,WAASoC,oBAAoDnC,OAAW;;;;AAIrF,MAAaC,SAAOkC,oBAAsDjC,KAAS;;;;AAKnF,MAAaC,iBAAegC,oBAC1B/B,aACD"}
|
|
1
|
+
{"version":3,"file":"pixi-components.js","names":["Pixi","AnimatedSprite","PixiAnimatedSprite","BitmapText","PixiBitmapText","Container","PixiContainer","Graphics","PixiGraphics","HTMLText","PixiHTMLText","MeshPlane","PixiMeshPlane","MeshRope","PixiMeshRope","MeshSimple","PixiMeshSimple","NineSliceSprite","PixiNineSliceSprite","ParticleContainer","PixiParticleContainer","PerspectiveMesh","PixiPerspectiveMesh","RenderContainer","PixiRenderContainer","RenderLayer","PixiRenderLayer","Sprite","PixiSprite","Text","PixiText","TilingSprite","PixiTilingSprite","JSX","Ref","createRenderEffect","splitProps","PixiEventHandlerMap","PIXI_EVENT_HANDLER_NAMES","insert","setProp","ContainerProps","ref","Component","as","children","Element","LeafProps","Omit","SOLID_PROP_KEYS","const","applyProps","InstanceType","instance","props","OptionsType","key","arg","Error","createContainerComponent","PixiClass","runtimeProps","initialisationProps","createLeafComponent","AnimatedSpriteOptions","ConstructorParameters","ContainerOptions","GraphicsOptions","HTMLTextOptions","MeshPlaneOptions","MeshRopeOptions","SimpleMeshOptions","NineSliceSpriteOptions","ParticleContainerOptions","PerspectivePlaneOptions","RenderContainerOptions","RenderLayerOptions","SpriteOptions","CanvasTextOptions","TilingSpriteOptions"],"sources":["../src/pixi-components.tsx"],"sourcesContent":["import type * as Pixi from \"pixi.js\";\nimport {\n AnimatedSprite as PixiAnimatedSprite,\n BitmapText as PixiBitmapText,\n Container as PixiContainer,\n Graphics as PixiGraphics,\n HTMLText as PixiHTMLText,\n MeshPlane as PixiMeshPlane,\n MeshRope as PixiMeshRope,\n MeshSimple as PixiMeshSimple,\n NineSliceSprite as PixiNineSliceSprite,\n ParticleContainer as PixiParticleContainer,\n PerspectiveMesh as PixiPerspectiveMesh,\n RenderContainer as PixiRenderContainer,\n RenderLayer as PixiRenderLayer,\n Sprite as PixiSprite,\n Text as PixiText,\n TilingSprite as PixiTilingSprite,\n} from \"pixi.js\";\nimport type { JSX, Ref } from \"solid-js\";\nimport { createRenderEffect, splitProps } from \"solid-js\";\nimport type { PixiEventHandlerMap } from \"./pixi-events\";\n\nimport { PIXI_EVENT_HANDLER_NAMES } from \"./pixi-events\";\nimport { insert, setProp } from \"./renderer\";\n\n/**\n * Prop definition for components that CAN have children\n */\nexport type ContainerProps<Component> = PixiEventHandlerMap & {\n ref?: Ref<Component>;\n as?: Component;\n children?: JSX.Element;\n};\n\n/**\n * Prop definition for components that CANNOT have children\n */\nexport type LeafProps<Component> = Omit<ContainerProps<Component>, \"children\">;\n\n// Keys that are specific to Solid components and not Pixi props\nexport const SOLID_PROP_KEYS = [\"ref\", \"as\", \"children\"] as const;\n\n/**\n * Apply's the props to a Pixi instance with subsriptions to maintain reactivity.\n *\n * @param instance The Pixi instance we want to apply props to.\n * @param props The props object.\n */\nexport const applyProps = <InstanceType extends PixiContainer, OptionsType extends ContainerProps<InstanceType>>(\n instance: InstanceType,\n props: OptionsType\n) => {\n for (const key in props) {\n if (key === \"as\") continue;\n\n if (key === \"ref\") {\n createRenderEffect(() => {\n // Solid converts the ref prop to a callback function\n (props[key] as unknown as (arg: any) => void)(instance);\n });\n } else if (key === \"children\") {\n if (!(\"addChild\" in instance)) {\n throw new Error(`Cannot set children on non-container instance.`);\n }\n createRenderEffect(() => {\n insert(instance, () => props.children);\n });\n } else {\n createRenderEffect(() => {\n setProp(instance, key, props[key as keyof typeof props]);\n });\n }\n }\n};\n\nconst createContainerComponent = <InstanceType extends PixiContainer, OptionsType extends object>(\n PixiClass: new (props: OptionsType) => InstanceType\n) => {\n return (props: Omit<OptionsType, \"children\"> & ContainerProps<InstanceType>): JSX.Element => {\n const [runtimeProps, initialisationProps] = splitProps(props, [...SOLID_PROP_KEYS, ...PIXI_EVENT_HANDLER_NAMES]);\n\n const instance = props.as || new PixiClass(initialisationProps as any);\n\n applyProps(instance, initialisationProps);\n applyProps(instance, runtimeProps);\n\n return instance as unknown as JSX.Element;\n };\n};\n\nconst createLeafComponent = <InstanceType extends PixiContainer, OptionsType extends object>(\n PixiClass: new (props: OptionsType) => InstanceType\n) => {\n return (props: Omit<OptionsType, \"children\"> & LeafProps<InstanceType>): JSX.Element => {\n return createContainerComponent<PixiContainer, OptionsType>(PixiClass)(props as any);\n };\n};\n\n/**\n * A SolidJS component that renders a `PIXI.AnimatedSprite`.\n */\nexport const AnimatedSprite = createLeafComponent<PixiAnimatedSprite, Pixi.AnimatedSpriteOptions>(PixiAnimatedSprite);\n/**\n * A SolidJS component that renders a `PIXI.BitmapText`.\n */\nexport const BitmapText = createLeafComponent<PixiBitmapText, ConstructorParameters<typeof PixiBitmapText>>(\n PixiBitmapText\n);\n/**\n * A SolidJS component that renders a `PIXI.Container`.\n */\nexport const Container = createContainerComponent<PixiContainer, Pixi.ContainerOptions>(PixiContainer);\n/**\n * A SolidJS component that renders a `PIXI.Graphics`.\n * Use a ref to access the underlying graphics instance and draw with it.\n */\nexport const Graphics = createLeafComponent<PixiGraphics, Pixi.GraphicsOptions>(PixiGraphics);\n/**\n * A SolidJS component that renders a `PIXI.HTMLText`.\n */\nexport const HTMLText = createLeafComponent<PixiHTMLText, Pixi.HTMLTextOptions>(PixiHTMLText);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshPlane`.\n */\nexport const MeshPlane = createLeafComponent<PixiMeshPlane, Pixi.MeshPlaneOptions>(PixiMeshPlane);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshRope`.\n */\nexport const MeshRope = createLeafComponent<PixiMeshRope, Pixi.MeshRopeOptions>(PixiMeshRope);\n\n/**\n * A SolidJS component that renders a `PIXI.MeshSimple`.\n */\nexport const MeshSimple = createLeafComponent<PixiMeshSimple, Pixi.SimpleMeshOptions>(PixiMeshSimple);\n\n/**\n * A SolidJS component that renders a `PIXI.NineSliceSprite`.\n */\nexport const NineSliceSprite = createLeafComponent<PixiNineSliceSprite, Pixi.NineSliceSpriteOptions>(\n PixiNineSliceSprite\n);\n\n/**\n * A SolidJS component that renders a `PIXI.ParticleContainer`.\n *\n * Particles should be added and removed from this component imperatively. Please see the docs for a reference example.\n */\nexport const ParticleContainer = createLeafComponent<PixiParticleContainer, Pixi.ParticleContainerOptions>(\n PixiParticleContainer\n);\n\n/**\n * A SolidJS component that renders a `PIXI.PerspectiveMesh`.\n */\nexport const PerspectiveMesh = createLeafComponent<PixiPerspectiveMesh, Pixi.PerspectivePlaneOptions>(\n PixiPerspectiveMesh\n);\n\n/**\n * A SolidJS component that renders a `PIXI.RenderContainer`.\n */\nexport const RenderContainer = createContainerComponent<PixiRenderContainer, Pixi.RenderContainerOptions>(\n PixiRenderContainer\n);\n\n/**\n * A SolidJS component that renders a `PIXI.RenderLayer`.\n */\nexport const RenderLayer = createContainerComponent<PixiRenderLayer, Pixi.RenderLayerOptions>(PixiRenderLayer);\n\n/**\n * A SolidJS component that renders a `PIXI.Sprite`.\n */\nexport const Sprite = createLeafComponent<PixiSprite, Pixi.SpriteOptions>(PixiSprite);\n/**\n * A SolidJS component that renders a `PIXI.Text`.\n */\nexport const Text = createLeafComponent<PixiText, Pixi.CanvasTextOptions>(PixiText);\n\n/**\n * A SolidJS component that renders a `PIXI.TilingSprite`.\n */\nexport const TilingSprite = createLeafComponent<PixiTilingSprite, Pixi.TilingSpriteOptions>(PixiTilingSprite);\n\n// export const MeshGeometry = createLeafComponent<PixiMeshGeometry, Pixi.MeshGeometryOptions>(PixiMeshGeometry);\n// export const NineSliceGeometry = createLeafComponent<PixiNineSliceGeometry, Pixi.NineSliceGeometryOptions>(\n// PixiNineSliceGeometry\n// );\n\n// export const Particle = createLeafComponent<PixiParticle, Pixi.ParticleOptions>(PixiParticle);\n// export const PerspectivePlaneGeometry = createLeafComponent<\n// PixiPerspectivePlaneGeometry,\n// Pixi.PerspectivePlaneGeometryOptions\n// >(PixiPerspectivePlaneGeometry);\n// export const PlaneGeometry = createLeafComponent<PixiPlaneGeometry, Pixi.PlaneGeometryOptions>(PixiPlaneGeometry);\n// export const RopeGeometry = createLeafComponent<PixiRopeGeometry, Pixi.RopeGeometryOptions>(PixiRopeGeometry);\n\n// TODO: Don't need a component for the Culler. It needs to interact with the stage directly.\n// export const Culler = createLeafComponent<PixiCuller, Pixi.Culler>(PixiCuller);\n"],"mappings":";;;;;;AAyCA,MAAaiD,kBAAkB;CAAC;CAAO;CAAM;CAAW;;;;;;;AAQxD,MAAaE,cACXE,UACAC,UACG;AACH,MAAK,MAAME,OAAOF,OAAO;AACvB,MAAIE,QAAQ,KAAM;AAElB,MAAIA,QAAQ,MACVrB,0BAAyB;AAEtBmB,SAAME,KAAuCH,SAAS;IACvD;WACOG,QAAQ,YAAY;AAC7B,OAAI,EAAE,cAAcH,UAClB,OAAM,IAAIK,MAAM,iDAAiD;AAEnEvB,4BAAyB;AACvBI,WAAOc,gBAAgBC,MAAMT,SAAS;KACtC;QAEFV,0BAAyB;AACvBK,WAAQa,UAAUG,KAAKF,MAAME,KAA2B;IACxD;;;AAKR,IAAMG,4BACJC,cACG;AACH,SAAQN,UAAqF;EAC3F,MAAM,CAACO,cAAcC,uBAAuB1B,WAAWkB,OAAO,CAAC,GAAGL,iBAAiB,GAAGX,yBAAyB,CAAC;EAEhH,MAAMe,WAAWC,MAAMV,MAAM,IAAIgB,UAAUE,oBAA2B;AAEtEX,aAAWE,UAAUS,oBAAoB;AACzCX,aAAWE,UAAUQ,aAAa;AAElC,SAAOR;;;AAIX,IAAMU,uBACJH,cACG;AACH,SAAQN,UAAgF;AACtF,SAAOK,yBAAqDC,UAAU,CAACN,MAAa;;;;;;AAOxF,MAAarD,mBAAiB8D,oBAAoE7D,eAAmB;;;;AAIrH,MAAaC,eAAa4D,oBACxB3D,WACD;;;;AAID,MAAaC,cAAYsD,yBAA+DrD,UAAc;;;;;AAKtG,MAAaC,aAAWwD,oBAAwDvD,SAAa;;;;AAI7F,MAAaC,aAAWsD,oBAAwDrD,SAAa;;;;AAK7F,MAAaC,cAAYoD,oBAA0DnD,UAAc;;;;AAKjG,MAAaC,aAAWkD,oBAAwDjD,SAAa;;;;AAK7F,MAAaC,eAAagD,oBAA4D/C,WAAe;;;;AAKrG,MAAaC,oBAAkB8C,oBAC7B7C,gBACD;;;;;;AAOD,MAAaC,sBAAoB4C,oBAC/B3C,kBACD;;;;AAKD,MAAaC,oBAAkB0C,oBAC7BzC,gBACD;;;;AAKD,MAAaC,oBAAkBoC,yBAC7BnC,gBACD;;;;AAKD,MAAaC,gBAAckC,yBAAmEjC,YAAgB;;;;AAK9G,MAAaC,WAASoC,oBAAoDnC,OAAW;;;;AAIrF,MAAaC,SAAOkC,oBAAsDjC,KAAS;;;;AAKnF,MAAaC,iBAAegC,oBAAgE/B,aAAiB"}
|
|
@@ -29,7 +29,7 @@ export declare const AnimatedSprite: (props: Omit<Pixi.AnimatedSpriteOptions, "c
|
|
|
29
29
|
/**
|
|
30
30
|
* A SolidJS component that renders a `PIXI.BitmapText`.
|
|
31
31
|
*/
|
|
32
|
-
export declare const BitmapText: (props: Omit<Pixi.
|
|
32
|
+
export declare const BitmapText: (props: Omit<[text?: Pixi.TextString | undefined, options?: Partial<Pixi.TextStyle> | undefined], "children"> & LeafProps<Pixi.BitmapText>) => JSX.Element;
|
|
33
33
|
/**
|
|
34
34
|
* A SolidJS component that renders a `PIXI.Container`.
|
|
35
35
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixi-solid",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.8",
|
|
5
5
|
"description": "A library to write PixiJS applications with SolidJS",
|
|
6
6
|
"author": "Luke Thompson",
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,17 +22,16 @@
|
|
|
22
22
|
"README.md",
|
|
23
23
|
"LICENSE"
|
|
24
24
|
],
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"pixi.js": "^8.14.3",
|
|
27
|
+
"solid-js": "^1.9.10"
|
|
28
|
+
},
|
|
25
29
|
"scripts": {
|
|
26
30
|
"dev": "vite",
|
|
27
31
|
"prebuild": "rm -rf dist",
|
|
28
32
|
"build": "vite build && tsc --project tsconfig.build.json --emitDeclarationOnly",
|
|
29
33
|
"build:docs": "typedoc --options typedoc.config.js",
|
|
30
|
-
"prepublishOnly": "pnpm run build",
|
|
31
34
|
"preview": "vite preview",
|
|
32
35
|
"preinstall": "npx only-allow pnpm"
|
|
33
|
-
},
|
|
34
|
-
"peerDependencies": {
|
|
35
|
-
"pixi.js": "^8.14.3",
|
|
36
|
-
"solid-js": "^1.9.10"
|
|
37
36
|
}
|
|
38
|
-
}
|
|
37
|
+
}
|