Skip to content

Scene

Defined in: display/Scene.ts:36

Interface for the Container class.

Extends

Type Parameters

T extends Application = Application

Implements

Constructors

new Scene()

new Scene<T>(): Scene<T>

Defined in: display/Scene.ts:40

Returns

Scene<T>

Overrides

Container.constructor

Properties

__dill_pixel_method_binding_root

__dill_pixel_method_binding_root: boolean = true

Defined in: display/Container.ts:61

Inherited from

Container.__dill_pixel_method_binding_root


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

Container.add


autoUnloadAssets

autoUnloadAssets: boolean = false

Defined in: display/Scene.ts:38

Implementation of

IScene.autoUnloadAssets


id

readonly id: string

Defined in: display/Scene.ts:37

Implementation of

IScene.id


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

Container.make


onAnimationComplete

onAnimationComplete: Signal<(entity) => void>

Defined in: mixins/animated.ts:21

Inherited from

Container.onAnimationComplete


onAnimationStart

onAnimationStart: Signal<(entity) => void>

Defined in: mixins/animated.ts:19

Inherited from

Container.onAnimationStart


onAnimationUpdate

onAnimationUpdate: Signal<(entity) => void>

Defined in: mixins/animated.ts:20

Inherited from

Container.onAnimationUpdate


onDestroy

onDestroy: Signal<() => void>

Defined in: display/Container.ts:60

Implementation of

IScene.onDestroy

Inherited from

Container.onDestroy


signalConnections

signalConnections: SignalConnections

Defined in: mixins/signals.ts:9

Inherited from

Container.signalConnections

Accessors

app

Get Signature

get app(): A

Defined in: display/Container.ts:82

Get the application instance.

Returns

A

Implementation of

IScene.app

Inherited from

Container.app


assets

Get Signature

get assets(): AssetLoadingOptions

Defined in: display/Scene.ts:64

Returns

AssetLoadingOptions

Set Signature

set assets(value): void

Defined in: display/Scene.ts:68

Parameters
value

AssetLoadingOptions

Returns

void

Implementation of

IScene.assets

Methods

addColoredBackground()

addColoredBackground(colorOrConfig, alpha): Sprite

Defined in: display/Container.ts:86

Parameters

colorOrConfig

number | Partial<BackgroundConfig>

alpha

number = 1

Returns

Sprite

Implementation of

IScene.addColoredBackground

Inherited from

Container.addColoredBackground


added()

added(): void

Defined in: display/Container.ts:144

This method is called when the container is added to the stage. It is meant to be overridden by subclasses.

Returns

void

Implementation of

IScene.added

Inherited from

Container.added


addSignalConnection()

addSignalConnection(…args): void

Defined in: mixins/signals.ts:13

Parameters

args

SignalConnection[]

Returns

void

Inherited from

Container.addSignalConnection


animate()

animate(animationProps, instance?): Tween

Defined in: mixins/animated.ts:23

Parameters

animationProps

GSAPAnimationConfigExtended

instance?

any

Returns

Tween

Inherited from

Container.animate


animateFrom()

animateFrom(animationProps, instance?): Tween

Defined in: mixins/animated.ts:25

Parameters

animationProps

GSAPAnimationConfigExtended

instance?

any

Returns

Tween

Inherited from

Container.animateFrom


animateFromTo()

animateFromTo(fromProps, toProps, instance?): Tween

Defined in: mixins/animated.ts:27

Parameters

fromProps

GSAPAnimationConfigExtended

toProps

GSAPAnimationConfigExtended

instance?

any

Returns

Tween

Inherited from

Container.animateFromTo


animateSequence()

animateSequence(sequences, instance?): Timeline

Defined in: mixins/animated.ts:33

Parameters

sequences

GSAPAnimationConfigExtended[]

instance?

any

Returns

Timeline

Inherited from

Container.animateSequence


bob()

bob(config?, instance?): Tween

Defined in: mixins/animated.ts:50

Parameters

config?
duration

number

intensity

number

instance?

any

Returns

Tween

Inherited from

Container.bob


connectAction()

connectAction(…args): void

Defined in: mixins/signals.ts:15

Parameters

args

SignalConnection[]

Returns

void

Inherited from

Container.connectAction


connectSignal()

connectSignal(…args): void

Defined in: mixins/signals.ts:14

Parameters

args

SignalConnection[]

Returns

void

Inherited from

Container.connectSignal


destroy()

destroy(): void

Defined in: display/Scene.ts:124

Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.

Returns

void

Implementation of

IScene.destroy

Overrides

Container.destroy


destroyAnimations()

destroyAnimations(): void

Defined in: mixins/animated.ts:39

Returns

void

Inherited from

Container.destroyAnimations


enter()

enter(): Promise<any>

Defined in: display/Scene.ts:86

Called to animate the scene in

Returns

Promise<any>

Implementation of

IScene.enter


exit()

exit(): Promise<any>

Defined in: display/Scene.ts:94

Called to animate the scene out

Returns

Promise<any>

Implementation of

IScene.exit


initialize()

initialize(): void | Promise<void>

Defined in: display/Scene.ts:78

Called to initialize the scene Called before the scene is added to the stage and before the scene is animated in

Returns

void | Promise<void>

Implementation of

IScene.initialize


isAnimationPlaying()

isAnimationPlaying(): boolean

Defined in: mixins/animated.ts:43

Returns

boolean

Inherited from

Container.isAnimationPlaying


pauseAnimations()

pauseAnimations(): void

Defined in: mixins/animated.ts:35

Returns

void

Inherited from

Container.pauseAnimations


pulse()

pulse(config?, instance?): Tween

Defined in: mixins/animated.ts:48

Parameters

config?
duration

number

intensity

number

times

number

instance?

any

Returns

Tween

Inherited from

Container.pulse


removed()

removed(): void

Defined in: display/Container.ts:154

Returns

void

Inherited from

Container.removed


resize()

resize(size?): void

Defined in: display/Scene.ts:120

Called when the window is resized

Parameters

size?

Size

Returns

void

Implementation of

IScene.resize

Overrides

Container.resize


resumeAnimations()

resumeAnimations(): void

Defined in: mixins/animated.ts:37

Returns

void

Inherited from

Container.resumeAnimations


reverseAnimation()

reverseAnimation(): void

Defined in: mixins/animated.ts:41

Returns

void

Inherited from

Container.reverseAnimation


shake()

shake(config?, instance?): Tween

Defined in: mixins/animated.ts:46

Parameters

config?
duration

number

intensity

number

times

number

instance?

any

Returns

Tween

Inherited from

Container.shake


start()

start(): void | Promise<void>

Defined in: display/Scene.ts:103

Called after the enter resolves If enter doesn’t return a promise, this is called immediately after enter

Returns

void | Promise<void>

Implementation of

IScene.start


update()

update(ticker?): void

Defined in: display/Scene.ts:111

Called every frame

Parameters

ticker?

Ticker

Returns

void

Implementation of

IScene.update

Overrides

Container.update