Class: Context

Context

メインコンテキスト、ViewとViewModelのunbind、bindをコントロールします。
Controls unbind and bind of the main context, View and ViewModel.

new Context (width, height, fps, options)

NameTypeDefaultDescription
widthnumber240optional
heightnumber240optional
fpsnumber30optional
optionsobjectnulloptional

Classes

Context

Members

root readonly

StageクラスにセットされたrootのSpriteを返却します。
Returns the Sprite of the root set in the Stage class.

view readonly

現在のシーンで利用中のViewクラスを返却します。
Returns the View class that is being used in the current scene.

Default Value:
  • null

viewModel readonly

現在のシーンで利用中のViewModelクラスを返却します。
Returns the ViewModel class that is being used in the current scene.

Default Value:
  • null

viewName readonly

現在のシーンで利用中のViewクラス名を返却します。
Returns the name of the View class currently being used in the current scene.

Default Value:
  • "Top"

Methods

addChild (name)Promise.<(View|void)>

ViewクラスをrootのSpriteにアタッチします。
Attach the View class to the root Sprite.

NameTypeDescription
namestring
Returns:
TypeDescription
Promise.<(View|void)>