Container
Defined in: display/Container.ts:63
The Container class extends the _Container class (which includes the Animated and Factory mixins) and implements the IContainer interface. It represents a container for PIXI.js display objects.
Extends
Section titled “Extends”IFactory
<{animatedSprite
: (props?
) =>AnimatedSprite
;bitmapText
: (props?
) =>BitmapText
;button
: (props?
) =>Button
;container
: (props?
) =>Container
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>;existing
: <TEntity
>(entity
,props?
) =>TEntity
;flexContainer
: (props?
) =>FlexContainer
;graphics
: (props?
) =>Graphics
;htmlText
: (props?
) =>HTMLText
;particleContainer
: (props?
) =>ParticleContainer
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>;spine
: (props?
) =>Spine
;spineAnimation
: <ANames
,A
>(props?
) =>SpineAnimation
<ANames
,A
>;sprite
: (props?
) =>Sprite
;text
: (props?
) =>Text
;texture
: (props?
) =>Texture
;tilingSprite
: (props?
) =>TilingSprite
;toaster
: (toasterConfig?
,defaultToastConfig
) =>Toaster
;uiCanvas
: (props?
) =>UICanvas
;svg
:Svg
; },this
> &ISignalContainer
&IAnimated
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”A
extends Application
= Application
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Container<
A
>(config
):Container
<A
>
Defined in: display/Container.ts:96
The constructor for the Container class.
Parameters
Section titled “Parameters”config
Section titled “config”Partial
<ContainerConfig
> = {}
The configuration for the container.
Returns
Section titled “Returns”Container
<A
>
Overrides
Section titled “Overrides”Animated(WithSignals(Factory())).constructor
Properties
Section titled “Properties”__dill_pixel_method_binding_root
Section titled “__dill_pixel_method_binding_root”__dill_pixel_method_binding_root:
boolean
=true
Defined in: display/Container.ts:68
add:
object
Defined in: mixins/factory/Factory.ts:6
animatedSprite()
Section titled “animatedSprite()”animatedSprite: (
props?
) =>AnimatedSprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<AnimatedSpriteProps
>
Returns
Section titled “Returns”bitmapText()
Section titled “bitmapText()”bitmapText: (
props?
) =>BitmapText
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextProps
>
Returns
Section titled “Returns”BitmapText
button()
Section titled “button()”button: (
props?
) =>Button
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ButtonProps
>
Returns
Section titled “Returns”container()
Section titled “container()”container: (
props?
) =>Container
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ContainerProps
>
Returns
Section titled “Returns”Container
<Application
<DataSchema
, ActionContext
, Action
, Renderer
>>
existing()
Section titled “existing()”existing: <
TEntity
>(entity
,props?
) =>TEntity
Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity
Parameters
Section titled “Parameters”entity
Section titled “entity”TEntity
props?
Section titled “props?”Partial
<ExistingProps
>
Returns
Section titled “Returns”TEntity
flexContainer()
Section titled “flexContainer()”flexContainer: (
props?
) =>FlexContainer
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<FlexContainerProps
>
Returns
Section titled “Returns”graphics()
Section titled “graphics()”graphics: (
props?
) =>Graphics
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<GraphicsProps
>
Returns
Section titled “Returns”Graphics
htmlText()
Section titled “htmlText()”htmlText: (
props?
) =>HTMLText
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<HTMLTextProps
>
Returns
Section titled “Returns”HTMLText
particleContainer()
Section titled “particleContainer()”particleContainer: (
props?
) =>ParticleContainer
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ParticleContainerProps
>
Returns
Section titled “Returns”ParticleContainer
<Application
<DataSchema
, ActionContext
, Action
, Renderer
>>
spine()
Section titled “spine()”spine: (
props?
) =>Spine
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpineProps
>
Returns
Section titled “Returns”spineAnimation()
Section titled “spineAnimation()”spineAnimation: <
ANames
,A
>(props?
) =>SpineAnimation
<ANames
,A
>
Type Parameters
Section titled “Type Parameters”ANames
Section titled “ANames”ANames
extends string
= string
A
extends Application
<DataSchema
, ActionContext
, Action
, Renderer
> = Application
<DataSchema
, ActionContext
, Action
, Renderer
>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpineProps
>
Returns
Section titled “Returns”SpineAnimation
<ANames
, A
>
sprite()
Section titled “sprite()”sprite: (
props?
) =>Sprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpriteProps
>
Returns
Section titled “Returns”Sprite
text()
Section titled “text()”text: (
props?
) =>Text
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextProps
>
Returns
Section titled “Returns”Text
texture()
Section titled “texture()”texture: (
props?
) =>Texture
=resolveTexture
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextureProps
>
Returns
Section titled “Returns”Texture
tilingSprite()
Section titled “tilingSprite()”tilingSprite: (
props?
) =>TilingSprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TilingSpriteProps
>
Returns
Section titled “Returns”TilingSprite
toaster()
Section titled “toaster()”toaster: (
toasterConfig?
,defaultToastConfig
) =>Toaster
Parameters
Section titled “Parameters”toasterConfig?
Section titled “toasterConfig?”Partial
<ToasterConfig
>
defaultToastConfig?
Section titled “defaultToastConfig?”Partial
<ToastConfig
> = {}
Returns
Section titled “Returns”uiCanvas()
Section titled “uiCanvas()”uiCanvas: (
props?
) =>UICanvas
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<UICanvasFactoryProps
>
Returns
Section titled “Returns”svg(
props
):Svg
Parameters
Section titled “Parameters”WithRequiredProps
<SvgProps
, "ctx"
>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).add
make:
object
Defined in: mixins/factory/Factory.ts:7
animatedSprite()
Section titled “animatedSprite()”animatedSprite: (
props?
) =>AnimatedSprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<AnimatedSpriteProps
>
Returns
Section titled “Returns”bitmapText()
Section titled “bitmapText()”bitmapText: (
props?
) =>BitmapText
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextProps
>
Returns
Section titled “Returns”BitmapText
button()
Section titled “button()”button: (
props?
) =>Button
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ButtonProps
>
Returns
Section titled “Returns”container()
Section titled “container()”container: (
props?
) =>Container
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ContainerProps
>
Returns
Section titled “Returns”Container
<Application
<DataSchema
, ActionContext
, Action
, Renderer
>>
existing()
Section titled “existing()”existing: <
TEntity
>(entity
,props?
) =>TEntity
Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity
Parameters
Section titled “Parameters”entity
Section titled “entity”TEntity
props?
Section titled “props?”Partial
<ExistingProps
>
Returns
Section titled “Returns”TEntity
flexContainer()
Section titled “flexContainer()”flexContainer: (
props?
) =>FlexContainer
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<FlexContainerProps
>
Returns
Section titled “Returns”graphics()
Section titled “graphics()”graphics: (
props?
) =>Graphics
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<GraphicsProps
>
Returns
Section titled “Returns”Graphics
htmlText()
Section titled “htmlText()”htmlText: (
props?
) =>HTMLText
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<HTMLTextProps
>
Returns
Section titled “Returns”HTMLText
particleContainer()
Section titled “particleContainer()”particleContainer: (
props?
) =>ParticleContainer
<Application
<DataSchema
,ActionContext
,Action
,Renderer
>>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<ParticleContainerProps
>
Returns
Section titled “Returns”ParticleContainer
<Application
<DataSchema
, ActionContext
, Action
, Renderer
>>
spine()
Section titled “spine()”spine: (
props?
) =>Spine
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpineProps
>
Returns
Section titled “Returns”spineAnimation()
Section titled “spineAnimation()”spineAnimation: <
ANames
,A
>(props?
) =>SpineAnimation
<ANames
,A
>
Type Parameters
Section titled “Type Parameters”ANames
Section titled “ANames”ANames
extends string
= string
A
extends Application
<DataSchema
, ActionContext
, Action
, Renderer
> = Application
<DataSchema
, ActionContext
, Action
, Renderer
>
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpineProps
>
Returns
Section titled “Returns”SpineAnimation
<ANames
, A
>
sprite()
Section titled “sprite()”sprite: (
props?
) =>Sprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<SpriteProps
>
Returns
Section titled “Returns”Sprite
text()
Section titled “text()”text: (
props?
) =>Text
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextProps
>
Returns
Section titled “Returns”Text
texture()
Section titled “texture()”texture: (
props?
) =>Texture
=resolveTexture
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TextureProps
>
Returns
Section titled “Returns”Texture
tilingSprite()
Section titled “tilingSprite()”tilingSprite: (
props?
) =>TilingSprite
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<TilingSpriteProps
>
Returns
Section titled “Returns”TilingSprite
toaster()
Section titled “toaster()”toaster: (
toasterConfig?
,defaultToastConfig
) =>Toaster
Parameters
Section titled “Parameters”toasterConfig?
Section titled “toasterConfig?”Partial
<ToasterConfig
>
defaultToastConfig?
Section titled “defaultToastConfig?”Partial
<ToastConfig
> = {}
Returns
Section titled “Returns”uiCanvas()
Section titled “uiCanvas()”uiCanvas: (
props?
) =>UICanvas
Parameters
Section titled “Parameters”props?
Section titled “props?”Partial
<UICanvasFactoryProps
>
Returns
Section titled “Returns”svg(
props
):Svg
Parameters
Section titled “Parameters”WithRequiredProps
<SvgProps
, "ctx"
>
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).make
onAnimationComplete
Section titled “onAnimationComplete”onAnimationComplete:
Signal
<(entity
) =>void
>
Defined in: mixins/animated.ts:21
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).onAnimationComplete
onAnimationStart
Section titled “onAnimationStart”onAnimationStart:
Signal
<(entity
) =>void
>
Defined in: mixins/animated.ts:19
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).onAnimationStart
onAnimationUpdate
Section titled “onAnimationUpdate”onAnimationUpdate:
Signal
<(entity
) =>void
>
Defined in: mixins/animated.ts:20
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).onAnimationUpdate
onDestroy
Section titled “onDestroy”onDestroy:
Signal
<() =>void
>
Defined in: display/Container.ts:67
Implementation of
Section titled “Implementation of”signalConnections
Section titled “signalConnections”signalConnections:
SignalConnections
Defined in: mixins/signals.ts:9
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).signalConnections
onGlobalChildAdded
Section titled “onGlobalChildAdded”
static
onGlobalChildAdded:Signal
<(child
) =>void
>
Defined in: display/Container.ts:81
onGlobalChildRemoved
Section titled “onGlobalChildRemoved”
static
onGlobalChildRemoved:Signal
<(child
) =>void
>
Defined in: display/Container.ts:82
Accessors
Section titled “Accessors”animationContext
Section titled “animationContext”Get Signature
Section titled “Get Signature”get animationContext():
undefined
|string
Defined in: display/Container.ts:72
Returns
Section titled “Returns”undefined
| string
Set Signature
Section titled “Set Signature”set animationContext(
value
):void
Defined in: display/Container.ts:75
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Get Signature
Section titled “Get Signature”get app():
A
Defined in: display/Container.ts:111
Get the application instance.
Returns
Section titled “Returns”A
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”addColoredBackground()
Section titled “addColoredBackground()”addColoredBackground(
colorOrConfig
,alpha
):Sprite
Defined in: display/Container.ts:115
Parameters
Section titled “Parameters”colorOrConfig
Section titled “colorOrConfig”number
| Partial
<BackgroundConfig
>
number
= 1
Returns
Section titled “Returns”Sprite
Implementation of
Section titled “Implementation of”IContainer
.addColoredBackground
added()
Section titled “added()”added():
void
Defined in: display/Container.ts:174
This method is called when the container is added to the stage. It is meant to be overridden by subclasses.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”addSignalConnection()
Section titled “addSignalConnection()”addSignalConnection(…
args
):void
Defined in: mixins/signals.ts:13
Parameters
Section titled “Parameters”…SignalConnection
[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).addSignalConnection
animate()
Section titled “animate()”animate(
animationProps
,instance?
):Tween
Defined in: mixins/animated.ts:23
Parameters
Section titled “Parameters”animationProps
Section titled “animationProps”instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).animate
animateFrom()
Section titled “animateFrom()”animateFrom(
animationProps
,instance?
):Tween
Defined in: mixins/animated.ts:25
Parameters
Section titled “Parameters”animationProps
Section titled “animationProps”instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).animateFrom
animateFromTo()
Section titled “animateFromTo()”animateFromTo(
fromProps
,toProps
,instance?
):Tween
Defined in: mixins/animated.ts:27
Parameters
Section titled “Parameters”fromProps
Section titled “fromProps”toProps
Section titled “toProps”instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).animateFromTo
animateSequence()
Section titled “animateSequence()”animateSequence(
sequences
,instance?
):Timeline
Defined in: mixins/animated.ts:33
Parameters
Section titled “Parameters”sequences
Section titled “sequences”instance?
Section titled “instance?”any
Returns
Section titled “Returns”Timeline
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).animateSequence
bob(
config?
,instance?
):Tween
Defined in: mixins/animated.ts:50
Parameters
Section titled “Parameters”config?
Section titled “config?”duration?
Section titled “duration?”number
intensity?
Section titled “intensity?”number
instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).bob
childAdded()
Section titled “childAdded()”childAdded(
child
):void
Defined in: display/Container.ts:176
Parameters
Section titled “Parameters”Container
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”childRemoved()
Section titled “childRemoved()”childRemoved(
child
):void
Defined in: display/Container.ts:191
Parameters
Section titled “Parameters”Container
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”connectAction()
Section titled “connectAction()”connectAction(…
args
):void
Defined in: mixins/signals.ts:15
Parameters
Section titled “Parameters”…SignalConnection
[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).connectAction
connectSignal()
Section titled “connectSignal()”connectSignal(…
args
):void
Defined in: mixins/signals.ts:14
Parameters
Section titled “Parameters”…SignalConnection
[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).connectSignal
destroy()
Section titled “destroy()”destroy(
options?
):void
Defined in: display/Container.ts:180
Removes all internal references and listeners as well as removes children from the display list.
Do not use a Container after calling destroy
.
Parameters
Section titled “Parameters”options?
Section titled “options?”DestroyOptions
Options parameter. A boolean will act as if all options have been set to that value
Returns
Section titled “Returns”void
Example
Section titled “Example”container.destroy();container.destroy(true);container.destroy({ children: true });container.destroy({ children: true, texture: true, textureSource: true });
Implementation of
Section titled “Implementation of”Overrides
Section titled “Overrides”Animated(WithSignals(Factory())).destroy
destroyAnimations()
Section titled “destroyAnimations()”destroyAnimations():
void
Defined in: mixins/animated.ts:39
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).destroyAnimations
isAnimationPlaying()
Section titled “isAnimationPlaying()”isAnimationPlaying():
boolean
Defined in: mixins/animated.ts:43
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).isAnimationPlaying
pauseAnimations()
Section titled “pauseAnimations()”pauseAnimations():
void
Defined in: mixins/animated.ts:35
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).pauseAnimations
pulse()
Section titled “pulse()”pulse(
config?
,instance?
):Tween
Defined in: mixins/animated.ts:48
Parameters
Section titled “Parameters”config?
Section titled “config?”duration?
Section titled “duration?”number
intensity?
Section titled “intensity?”number
times?
Section titled “times?”number
instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).pulse
removed()
Section titled “removed()”removed():
void
Defined in: display/Container.ts:189
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”resize()
Section titled “resize()”resize(
size?
):void
Defined in: display/Container.ts:167
Resize the container. This method is meant to be overridden by subclasses.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”resumeAnimations()
Section titled “resumeAnimations()”resumeAnimations():
void
Defined in: mixins/animated.ts:37
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).resumeAnimations
reverseAnimation()
Section titled “reverseAnimation()”reverseAnimation():
void
Defined in: mixins/animated.ts:41
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).reverseAnimation
shake()
Section titled “shake()”shake(
config?
,instance?
):Tween
Defined in: mixins/animated.ts:46
Parameters
Section titled “Parameters”config?
Section titled “config?”duration?
Section titled “duration?”number
intensity?
Section titled “intensity?”number
times?
Section titled “times?”number
instance?
Section titled “instance?”any
Returns
Section titled “Returns”Tween
Inherited from
Section titled “Inherited from”Animated(WithSignals(Factory())).shake
update()
Section titled “update()”update(
ticker?
):void
Defined in: display/Container.ts:159
Update the container. This method is meant to be overridden by subclasses.
Parameters
Section titled “Parameters”ticker?
Section titled “ticker?”number
| Ticker
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”childAdded()
Section titled “childAdded()”
static
childAdded(child
):void
Defined in: display/Container.ts:84
Parameters
Section titled “Parameters”Container
Returns
Section titled “Returns”void
childRemoved()
Section titled “childRemoved()”
static
childRemoved(child
):void
Defined in: display/Container.ts:88
Parameters
Section titled “Parameters”Container
Returns
Section titled “Returns”void