Skip to content

Application

Defined in: Application.ts:73

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: Application.ts:141

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: Application.ts:84


config

config: Partial<IApplicationOptions<D>>

Defined in: Application.ts:86

Implementation of

IApplication.config


manifest

manifest: undefined | string | AssetsManifest

Defined in: Application.ts:89

Implementation of

IApplication.manifest


onPause

onPause: Signal<() => void>

Defined in: Application.ts:90

Implementation of

IApplication.onPause


onResize

onResize: Signal<(size) => void>

Defined in: Application.ts:93


onResume

onResume: Signal<() => void>

Defined in: Application.ts:91

Implementation of

IApplication.onResume


plugins

plugins: ImportList<IPlugin>

Defined in: Application.ts:87


storageAdapters

storageAdapters: ImportList<IStorageAdapter>

Defined in: Application.ts:88


containerElement

static containerElement: HTMLElement

Defined in: Application.ts:82

Accessors

actionContext

Get Signature

get actionContext(): C

Defined in: Application.ts:284

Returns

C

Set Signature

set actionContext(context): void

Defined in: Application.ts:288

Parameters
context

C

Returns

void

Implementation of

IApplication.actionContext


actionsPlugin

Get Signature

get actionsPlugin(): IActionsPlugin<C>

Defined in: Application.ts:192

Returns

IActionsPlugin<C>


appName

Get Signature

get appName(): string

Defined in: Application.ts:160

Returns

string

Implementation of

IApplication.appName


appVersion

Get Signature

get appVersion(): string | number

Defined in: Application.ts:148

Returns

string | number

Implementation of

IApplication.appVersion


assets

Get Signature

get assets(): IAssetsPlugin

Defined in: Application.ts:231

Returns

IAssetsPlugin

Implementation of

IApplication.assets


audio

Get Signature

get audio(): IAudioManagerPlugin

Defined in: Application.ts:277

Returns

IAudioManagerPlugin

Implementation of

IApplication.audio


captions

Get Signature

get captions(): ICaptionsPlugin

Defined in: Application.ts:302

Returns

ICaptionsPlugin


center

Get Signature

get center(): Point

Defined in: Application.ts:227

Returns

Point

Implementation of

IApplication.center


controls

Get Signature

get controls(): IControls

Defined in: Application.ts:210

Returns

IControls

Implementation of

IApplication.controls


data

Get Signature

get data(): IDataAdapter<D>

Defined in: Application.ts:564

Get a storage adapter by id

Returns

IDataAdapter<D>

Implementation of

IApplication.data


env

Get Signature

get env(): Record<string, string>

Defined in: Application.ts:111

Returns

Record<string, string>

Implementation of

IApplication.env


exec

Get Signature

get exec(): ICoreFunctions

Defined in: Application.ts:325

Returns

ICoreFunctions

Implementation of

IApplication.exec


focus

Get Signature

get focus(): IFocusManagerPlugin

Defined in: Application.ts:259

Returns

IFocusManagerPlugin

Implementation of

IApplication.focus


func

Get Signature

get func(): ICoreFunctions

Defined in: Application.ts:321

Returns

ICoreFunctions

Implementation of

IApplication.func


i18n

Get Signature

get i18n(): Ii18nPlugin

Defined in: Application.ts:173

Returns

Ii18nPlugin

Implementation of

IApplication.i18n


input

Get Signature

get input(): IInputPlugin

Defined in: Application.ts:202

Returns

IInputPlugin

Implementation of

IApplication.input


isMobile

Get Signature

get isMobile(): boolean

Defined in: Application.ts:309

Returns

boolean


isTouch

Get Signature

get isTouch(): boolean

Defined in: Application.ts:313

Returns

boolean


keyboard

Get Signature

get keyboard(): IKeyboardPlugin

Defined in: Application.ts:252

Returns

IKeyboardPlugin

Implementation of

IApplication.keyboard


paused

Get Signature

get paused(): boolean

Defined in: Application.ts:116

Returns

boolean

Set Signature

set paused(paused): void

Defined in: Application.ts:120

Parameters
paused

boolean

Returns

void

Implementation of

IApplication.paused


popups

Get Signature

get popups(): IPopupManagerPlugin

Defined in: Application.ts:270

Returns

IPopupManagerPlugin

Implementation of

IApplication.popups


resizer

Get Signature

get resizer(): IResizerPlugin

Defined in: Application.ts:182

Returns

IResizerPlugin

Implementation of

IApplication.resizer


scenes

Get Signature

get scenes(): ISceneManagerPlugin

Defined in: Application.ts:238

Returns

ISceneManagerPlugin

Implementation of

IApplication.scenes


signal

Get Signature

get signal(): ICoreSignals

Defined in: Application.ts:317

Returns

ICoreSignals

Implementation of

IApplication.signal


size

Get Signature

get size(): Size

Defined in: Application.ts:266

Returns

Size

Implementation of

IApplication.size


store

Get Signature

get store(): IStore

Defined in: Application.ts:220

Returns

IStore

Implementation of

IApplication.store


voiceover

Get Signature

get voiceover(): IVoiceOverPlugin

Defined in: Application.ts:292

Returns

IVoiceOverPlugin


webEvents

Get Signature

get webEvents(): IWebEventsPlugin

Defined in: Application.ts:245

Returns

IWebEventsPlugin

Implementation of

IApplication.webEvents

Methods

action()

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

Defined in: Application.ts:532

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: Application.ts:505

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: Application.ts:358

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: Application.ts:448

Type Parameters

T extends IPlugin

Parameters

pluginName

string

debug

boolean = false

Returns

T

Implementation of

IApplication.getPlugin


getStorageAdapter()

getStorageAdapter(adapterId): IStorageAdapter

Defined in: Application.ts:555

Get a storage adapter by id

Parameters

adapterId

string

Returns

IStorageAdapter


getUnloadedPlugin()

getUnloadedPlugin(id): undefined | ImportListItem<IPlugin>

Defined in: Application.ts:474

Parameters

id

string

Returns

undefined | ImportListItem<IPlugin>


initialize()

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

Defined in: Application.ts:372

Parameters

config

AppConfig<D>

Returns

Promise<IApplication<D, C, A>>

Implementation of

IApplication.initialize


isActionActive()

isActionActive(action): boolean

Defined in: Application.ts:546

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: Application.ts:478

Parameters

listItem

ImportListItem

isDefault

boolean = false

Returns

Promise<void>


pause()

pause(): void

Defined in: Application.ts:133

Returns

void

Implementation of

IApplication.pause


postInitialize()

postInitialize(): Promise<void>

Defined in: Application.ts:456

Returns

Promise<void>

Implementation of

IApplication.postInitialize


resume()

resume(): void

Defined in: Application.ts:129

Returns

void

Implementation of

IApplication.resume


sendAction()

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

Defined in: Application.ts:518

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: Application.ts:366

Parameters

container

HTMLElement

Returns

void

Implementation of

IApplication.setContainer


togglePause()

togglePause(): void

Defined in: Application.ts:137

Returns

void


getInstance()

static getInstance<T>(): T

Defined in: Application.ts:348

Type Parameters

T extends Application = Application

Returns

T