Skip to content

UICanvas

Defined in: ui/UICanvas.ts:56

Extends

  • _UICanvas

Type Parameters

T extends Application = Application

Constructors

new UICanvas()

new UICanvas<T>(config): UICanvas<T>

Defined in: ui/UICanvas.ts:67

Parameters

config

Partial<UICanvasProps>

Returns

UICanvas<T>

Overrides

_UICanvas.constructor

Properties

add

add: object

Defined in: mixins/factory/Factory.ts:6

animatedSprite()

animatedSprite: (props?) => AnimatedSprite

Parameters
props?

Partial<AnimatedSpriteProps>

Returns

AnimatedSprite

bitmapText()

bitmapText: (props?) => BitmapText

Parameters
props?

Partial<TextProps>

Returns

BitmapText

button()

button: (props?) => Button

Parameters
props?

Partial<ButtonProps>

Returns

Button

container()

container: (props?) => Container

Parameters
props?

Partial<ContainerProps>

Returns

Container

existing()

existing: <TEntity>(entity, props?) => TEntity

Type Parameters

TEntity

Parameters
entity

TEntity

props?

Partial<ExistingProps>

Returns

TEntity

flexContainer()

flexContainer: (props?) => FlexContainer

Parameters
props?

Partial<FlexContainerProps>

Returns

FlexContainer

graphics()

graphics: (props?) => Graphics

Parameters
props?

Partial<GraphicsProps>

Returns

Graphics

htmlText()

htmlText: (props?) => HTMLText

Parameters
props?

Partial<HTMLTextProps>

Returns

HTMLText

particleContainer()

particleContainer: (props?) => ParticleContainer

Parameters
props?

Partial<ParticleContainerProps>

Returns

ParticleContainer

spine()

spine: (props?) => Spine

Parameters
props?

Partial<SpineProps>

Returns

Spine

spineAnimation()

spineAnimation: (props?) => SpineAnimation

Parameters
props?

Partial<SpineProps>

Returns

SpineAnimation

sprite()

sprite: (props?) => Sprite

Parameters
props?

Partial<SpriteProps>

Returns

Sprite

text()

text: (props?) => Text

Parameters
props?

Partial<TextProps>

Returns

Text

texture()

texture: (props?) => Texture = resolveTexture

Parameters
props?

Partial<TextureProps>

Returns

Texture

uiCanvas()

uiCanvas: (props?) => UICanvas

Parameters
props?

Partial<UICanvasFactoryProps>

Returns

UICanvas

svg()

Parameters
props

WithRequiredProps<SvgProps, "ctx">

Returns

Svg

Inherited from

_UICanvas.add


config

config: UICanvasConfig

Defined in: ui/UICanvas.ts:57


make

make: object

Defined in: mixins/factory/Factory.ts:7

animatedSprite()

animatedSprite: (props?) => AnimatedSprite

Parameters
props?

Partial<AnimatedSpriteProps>

Returns

AnimatedSprite

bitmapText()

bitmapText: (props?) => BitmapText

Parameters
props?

Partial<TextProps>

Returns

BitmapText

button()

button: (props?) => Button

Parameters
props?

Partial<ButtonProps>

Returns

Button

container()

container: (props?) => Container

Parameters
props?

Partial<ContainerProps>

Returns

Container

existing()

existing: <TEntity>(entity, props?) => TEntity

Type Parameters

TEntity

Parameters
entity

TEntity

props?

Partial<ExistingProps>

Returns

TEntity

flexContainer()

flexContainer: (props?) => FlexContainer

Parameters
props?

Partial<FlexContainerProps>

Returns

FlexContainer

graphics()

graphics: (props?) => Graphics

Parameters
props?

Partial<GraphicsProps>

Returns

Graphics

htmlText()

htmlText: (props?) => HTMLText

Parameters
props?

Partial<HTMLTextProps>

Returns

HTMLText

particleContainer()

particleContainer: (props?) => ParticleContainer

Parameters
props?

Partial<ParticleContainerProps>

Returns

ParticleContainer

spine()

spine: (props?) => Spine

Parameters
props?

Partial<SpineProps>

Returns

Spine

spineAnimation()

spineAnimation: (props?) => SpineAnimation

Parameters
props?

Partial<SpineProps>

Returns

SpineAnimation

sprite()

sprite: (props?) => Sprite

Parameters
props?

Partial<SpriteProps>

Returns

Sprite

text()

text: (props?) => Text

Parameters
props?

Partial<TextProps>

Returns

Text

texture()

texture: (props?) => Texture = resolveTexture

Parameters
props?

Partial<TextureProps>

Returns

Texture

uiCanvas()

uiCanvas: (props?) => UICanvas

Parameters
props?

Partial<UICanvasFactoryProps>

Returns

UICanvas

svg()

Parameters
props

WithRequiredProps<SvgProps, "ctx">

Returns

Svg

Inherited from

_UICanvas.make


signalConnections

signalConnections: SignalConnections

Defined in: mixins/signals.ts:9

Inherited from

_UICanvas.signalConnections

Accessors

app

Get Signature

get app(): T

Defined in: ui/UICanvas.ts:105

Get the application instance.

Returns

T


bounds

Get Signature

get bounds(): Bounds

Defined in: ui/UICanvas.ts:89

Returns

Bounds


canvasChildren

Get Signature

get canvasChildren(): Container[]

Defined in: ui/UICanvas.ts:98

Returns

Container[]


padding

Set Signature

set padding(value): void

Defined in: ui/UICanvas.ts:115

Parameters
value

PointLike | Partial<Padding>

Returns

void


size

Set Signature

set size(value): void

Defined in: ui/UICanvas.ts:109

Parameters
value

SizeLike

Returns

void

Methods

addChild()

addChild<U>(…children): U[0]

Defined in: ui/UICanvas.ts:176

Adds one or more children to the container.

Multiple items can be added like so: myContainer.addChild(thingOne, thingTwo, thingThree)

Type Parameters

U extends Container[]

Parameters

children

Container[]

The Container(s) to add to the container

Returns

U[0]

  • The first child that was added.

Overrides

_UICanvas.addChild


addChildAt()

addChildAt<U>(child, index): U

Defined in: ui/UICanvas.ts:145

Adds a child to the container at the specified index Override because we need to ensure it sets the child index properly

Type Parameters

U extends Container

Parameters

child

U

index

number

Returns

U

Overrides

_UICanvas.addChildAt


addElement()

addElement<U>(child, settings?): U

Defined in: ui/UICanvas.ts:234

Type Parameters

U extends Container = Container

Parameters

child

Container

settings?

Partial<UICanvasChildProps>

Returns

U


addSignalConnection()

addSignalConnection(…args): void

Defined in: mixins/signals.ts:13

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_UICanvas.addSignalConnection


connectAction()

connectAction(…args): void

Defined in: mixins/signals.ts:15

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_UICanvas.connectAction


connectSignal()

connectSignal(…args): void

Defined in: mixins/signals.ts:14

Parameters

args

SignalConnection[]

Returns

void

Inherited from

_UICanvas.connectSignal


getChildAt()

getChildAt<U>(index): U

Defined in: ui/UICanvas.ts:172

Gets the child at the specified index Override due to re-parenting

Type Parameters

U extends Container

Parameters

index

number

Returns

U

Overrides

_UICanvas.getChildAt


getChildIndex()

getChildIndex<U>(child): number

Defined in: ui/UICanvas.ts:164

Gets the index of a child in the container Override because we need to ensure it targets the parent container that we added

Type Parameters

U extends Container

Parameters

child

U

Returns

number

Overrides

_UICanvas.getChildIndex


layout()

layout(): void

Defined in: ui/UICanvas.ts:224

Returns

void


removeChild()

removeChild(…children): Container

Defined in: ui/UICanvas.ts:192

Removes one or more children from the container Override because we need to ensure it returns the proper re-parented children

Parameters

children

Container[]

Returns

Container

Overrides

_UICanvas.removeChild


removeChildAt()

removeChildAt<U>(index): U

Defined in: ui/UICanvas.ts:137

Removes a child from the container at the specified index Override because we need to remove from the inner container

Type Parameters

U extends Container

Parameters

index

number

Returns

U

Overrides

_UICanvas.removeChildAt


removeChildren()

removeChildren(beginIndex?, endIndex?): ContainerChild[]

Defined in: ui/UICanvas.ts:129

Removes all the children from the container Override because we need to ensure it returns the proper re-parented children

Parameters

beginIndex?

number

endIndex?

number

Returns

ContainerChild[]

Overrides

_UICanvas.removeChildren


resize()

resize(): void

Defined in: ui/UICanvas.ts:207

Returns

void


setChildIndex()

setChildIndex<U>(child, index): void

Defined in: ui/UICanvas.ts:155

Sets the index of the child in the container Override because we need to ensure it targets the parent container that we added

Type Parameters

U extends Container

Parameters

child

U

index

number

Returns

void

Overrides

_UICanvas.setChildIndex