Skip to content

Application

Defined in: core/Application.ts:74

Extends

  • Application<R>

Type Parameters

D extends DataSchema = DataSchema

C extends ActionContext = ActionContext

A extends Action = Action

R extends Renderer = Renderer

Implements

Constructors

new Application()

new Application<D, C, A, R>(): Application<D, C, A, R>

Defined in: core/Application.ts:150

Returns

Application<D, C, A, R>

Overrides

PIXIPApplication<R>.constructor

Properties

__dill_pixel_method_binding_root

__dill_pixel_method_binding_root: boolean = true

Defined in: core/Application.ts:85


config

config: Partial<IApplicationOptions<D>>

Defined in: core/Application.ts:87

Implementation of

IApplication.config


manifest

manifest: undefined | string | AssetsManifest

Defined in: core/Application.ts:90

Implementation of

IApplication.manifest


onPause

onPause: Signal<() => void>

Defined in: core/Application.ts:91

Implementation of

IApplication.onPause


onResize

onResize: Signal<(size) => void>

Defined in: core/Application.ts:94


onResume

onResume: Signal<() => void>

Defined in: core/Application.ts:92

Implementation of

IApplication.onResume


plugins

plugins: ImportList<IPlugin>

Defined in: core/Application.ts:88


storageAdapters

storageAdapters: ImportList<IStorageAdapter>

Defined in: core/Application.ts:89


containerElement

static containerElement: HTMLElement

Defined in: core/Application.ts:83

Accessors

actionContext

Get Signature

get actionContext(): C

Defined in: core/Application.ts:293

Returns

C

Set Signature

set actionContext(context): void

Defined in: core/Application.ts:297

Parameters
context

C

Returns

void

Implementation of

IApplication.actionContext


actionsPlugin

Get Signature

get actionsPlugin(): IActionsPlugin<C>

Defined in: core/Application.ts:201

Returns

IActionsPlugin<C>


appName

Get Signature

get appName(): string

Defined in: core/Application.ts:169

Returns

string

Implementation of

IApplication.appName


appVersion

Get Signature

get appVersion(): string | number

Defined in: core/Application.ts:157

Returns

string | number

Implementation of

IApplication.appVersion


assets

Get Signature

get assets(): IAssetsPlugin

Defined in: core/Application.ts:240

Returns

IAssetsPlugin

Implementation of

IApplication.assets


audio

Get Signature

get audio(): IAudioManagerPlugin

Defined in: core/Application.ts:286

Returns

IAudioManagerPlugin

Implementation of

IApplication.audio


captions

Get Signature

get captions(): ICaptionsPlugin

Defined in: core/Application.ts:311

Returns

ICaptionsPlugin


center

Get Signature

get center(): Point

Defined in: core/Application.ts:236

Returns

Point

Implementation of

IApplication.center


controls

Get Signature

get controls(): IControls

Defined in: core/Application.ts:219

Returns

IControls

Implementation of

IApplication.controls


data

Get Signature

get data(): IDataAdapter<D>

Defined in: core/Application.ts:586

Get a storage adapter by id

Returns

IDataAdapter<D>

Implementation of

IApplication.data


env

Get Signature

get env(): Record<string, string>

Defined in: core/Application.ts:120

Returns

Record<string, string>

Implementation of

IApplication.env


exec

Get Signature

get exec(): ICoreFunctions

Defined in: core/Application.ts:338

Returns

ICoreFunctions

Implementation of

IApplication.exec


focus

Get Signature

get focus(): IFocusManagerPlugin

Defined in: core/Application.ts:268

Returns

IFocusManagerPlugin

Implementation of

IApplication.focus


func

Get Signature

get func(): ICoreFunctions

Defined in: core/Application.ts:334

Returns

ICoreFunctions

Implementation of

IApplication.func


i18n

Get Signature

get i18n(): Ii18nPlugin

Defined in: core/Application.ts:182

Returns

Ii18nPlugin

Implementation of

IApplication.i18n


input

Get Signature

get input(): IInputPlugin

Defined in: core/Application.ts:211

Returns

IInputPlugin

Implementation of

IApplication.input


isMobile

Get Signature

get isMobile(): boolean

Defined in: core/Application.ts:318

Returns

boolean


isTouch

Get Signature

get isTouch(): boolean

Defined in: core/Application.ts:322

Returns

boolean


keyboard

Get Signature

get keyboard(): IKeyboardPlugin

Defined in: core/Application.ts:261

Returns

IKeyboardPlugin

Implementation of

IApplication.keyboard


make

Get Signature

get make(): object

Defined in: core/Application.ts:113

Returns

object

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<Application<DataSchema, ActionContext, Action, Renderer>>

Parameters
props?

Partial<ContainerProps>

Returns

Container<Application<DataSchema, ActionContext, Action, Renderer>>

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<Application<DataSchema, ActionContext, Action, Renderer>>

Parameters
props?

Partial<ParticleContainerProps>

Returns

ParticleContainer<Application<DataSchema, ActionContext, Action, Renderer>>

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

tilingSprite()

tilingSprite: (props?) => TilingSprite

Parameters
props?

Partial<TilingSpriteProps>

Returns

TilingSprite

toaster()

toaster: (toasterConfig?, defaultToastConfig) => Toaster

Parameters
toasterConfig?

Partial<ToasterConfig>

defaultToastConfig?

Partial<ToastConfig> = {}

Returns

Toaster

uiCanvas()

uiCanvas: (props?) => UICanvas

Parameters
props?

Partial<UICanvasFactoryProps>

Returns

UICanvas

svg()
Parameters
props

WithRequiredProps<SvgProps, "ctx">

Returns

Svg


paused

Get Signature

get paused(): boolean

Defined in: core/Application.ts:125

Returns

boolean

Set Signature

set paused(paused): void

Defined in: core/Application.ts:129

Parameters
paused

boolean

Returns

void

Implementation of

IApplication.paused


popups

Get Signature

get popups(): IPopupManagerPlugin

Defined in: core/Application.ts:279

Returns

IPopupManagerPlugin

Implementation of

IApplication.popups


resizer

Get Signature

get resizer(): IResizerPlugin

Defined in: core/Application.ts:191

Returns

IResizerPlugin

Implementation of

IApplication.resizer


scenes

Get Signature

get scenes(): ISceneManagerPlugin

Defined in: core/Application.ts:247

Returns

ISceneManagerPlugin

Implementation of

IApplication.scenes


signal

Get Signature

get signal(): ICoreSignals

Defined in: core/Application.ts:326

Returns

ICoreSignals

Implementation of

IApplication.signal


signals

Get Signature

get signals(): ICoreSignals

Defined in: core/Application.ts:330

Returns

ICoreSignals


size

Get Signature

get size(): Size

Defined in: core/Application.ts:275

Returns

Size

Implementation of

IApplication.size


store

Get Signature

get store(): IStore

Defined in: core/Application.ts:229

Returns

IStore

Implementation of

IApplication.store


voiceover

Get Signature

get voiceover(): IVoiceOverPlugin

Defined in: core/Application.ts:301

Returns

IVoiceOverPlugin


webEvents

Get Signature

get webEvents(): IWebEventsPlugin

Defined in: core/Application.ts:254

Returns

IWebEventsPlugin

Implementation of

IApplication.webEvents

Methods

action()

action<TActionData>(action, data?): void

Defined in: core/Application.ts:554

Dispatches an action with optional data alias for sendAction

Type Parameters

TActionData = any

The type of data to send with the action

Parameters

action

A

The action to dispatch

data?

TActionData

Optional data to send with the action

Returns

void

Example

// Send a 'jump' action with power data
app.action('jump', { power: 100 });

Implementation of

IApplication.action


actions()

actions<TActionData>(action): ActionSignal<TActionData>

Defined in: core/Application.ts:527

Gets an ActionSignal for the specified action type

Type Parameters

TActionData = any

The type of data associated with the action

Parameters

action

A

The action to get the signal for

Returns

ActionSignal<TActionData>

A signal that can be used to listen for the action

Example

// Listen for a 'jump' action
app.actions('jump').connect((data) => {
player.jump(data.power);
});

Implementation of

IApplication.actions


destroy()

destroy(rendererDestroyOptions?, options?): void

Defined in: core/Application.ts:371

Destroy the application This will destroy all plugins and the store

Parameters

rendererDestroyOptions?

RendererDestroyOptions

options?

DestroyOptions

Returns

void

Implementation of

IApplication.destroy

Overrides

PIXIPApplication.destroy


getPlugin()

getPlugin<T>(pluginName, debug): T

Defined in: core/Application.ts:471

Type Parameters

T extends IPlugin

Parameters

pluginName

string

debug

boolean = false

Returns

T

Implementation of

IApplication.getPlugin


getStorageAdapter()

getStorageAdapter(adapterId): IStorageAdapter

Defined in: core/Application.ts:577

Get a storage adapter by id

Parameters

adapterId

string

Returns

IStorageAdapter


getUnloadedPlugin()

getUnloadedPlugin(id): undefined | ImportListItem<IPlugin>

Defined in: core/Application.ts:496

Parameters

id

string

Returns

undefined | ImportListItem<IPlugin>


initialize()

initialize(config, el?): Promise<IApplication<D, C, A>>

Defined in: core/Application.ts:385

Parameters

config

AppConfig<D>

el?

HTMLElement

Returns

Promise<IApplication<D, C, A>>

Implementation of

IApplication.initialize


isActionActive()

isActionActive(action): boolean

Defined in: core/Application.ts:568

Checks if an action is currently active

Parameters

action

A

The action to check

Returns

boolean

True if the action is active, false otherwise

Example

// Check if the 'run' action is active
if (app.isActionActive('run')) {
player.updateSpeed(runningSpeed);
}

Implementation of

IApplication.isActionActive


loadPlugin()

loadPlugin(listItem, isDefault): Promise<void>

Defined in: core/Application.ts:500

Parameters

listItem

ImportListItem

isDefault

boolean = false

Returns

Promise<void>


pause()

pause(): void

Defined in: core/Application.ts:142

Returns

void

Implementation of

IApplication.pause


postInitialize()

postInitialize(): Promise<void>

Defined in: core/Application.ts:479

Returns

Promise<void>

Implementation of

IApplication.postInitialize


resume()

resume(): void

Defined in: core/Application.ts:138

Returns

void

Implementation of

IApplication.resume


sendAction()

sendAction<TActionData>(action, data?): void

Defined in: core/Application.ts:540

Dispatches an action with optional data

Type Parameters

TActionData = any

The type of data to send with the action

Parameters

action

A

The action to dispatch

data?

TActionData

Optional data to send with the action

Returns

void

Example

// Send a 'jump' action with power data
app.sendAction('jump', { power: 100 });

Implementation of

IApplication.sendAction


setContainer()

setContainer(container): void

Defined in: core/Application.ts:379

Parameters

container

HTMLElement

Returns

void

Implementation of

IApplication.setContainer


togglePause()

togglePause(): void

Defined in: core/Application.ts:146

Returns

void


getInstance()

static getInstance<T>(): T

Defined in: core/Application.ts:361

Type Parameters

T extends Application<DataSchema, ActionContext, Action, Renderer> = Application<DataSchema, ActionContext, Action, Renderer>

Returns

T