Class Scene<TBody>

base scene for front end rendering

Type Parameters

  • TBody extends Body = Body

Hierarchy (view full)

Constructors

Properties

animationFrame: number = 0

requestAnimationFrame reference.

children: LifecycleProps[] = []

Lifecycles can have children Lifecycles

children$: Subject<Lifecycle> = ...

When Scene Object has children amount changed, it emits this subject.

destroy$: Subject<void> = ...

When Lifecycle Object is destroyed, it emits and closes this subject. Along with destroying his children, which in turn behave the same.

disableAutoSort$: Subject<void> = ...

When disableAutoSort is called, it emits this subject.

disableDebug$: Subject<void> = ...

When disableDebug is called, it emits this subject.

gameObject: GameObjectParent = undefined

Scene doesn't have parent gameObject

isInitialized: boolean = false
label: string

Each Lifecycle Object has label for pixi debugging.

lastUpdate: number

Scene has last update unix time stored.

options: SceneOptions

Options are assigned at creation.

physics: System<TBody>

Reference to Collision Detection System.

pixi: Application<Renderer>
resources: Resources
stage: Container<ContainerChild> = ...
update$: Subject<number> = ...

When Lifecycle Object is updated, it emits this subject. Along with updating his children, which in turn behave the same.

x: number

position x

y: number

position y

Accessors

  • get scene(): undefined
  • Scene doesn't have parent scene

    Returns undefined

Methods

  • Parameters

    • options: Partial<Record<string, any>>

    Returns Application<Renderer>

  • Parameters

    • Optionaloptions: Partial<Record<string, any>>

    Returns Promise<boolean>

  • Parameters

    • graphics: Graphics

    Returns void

  • add body font family to set font of pixi-stats

    Parameters

    • style: string = 'position: fixed; top: 0; right: 0; z-index: 1000;'

    Returns void

  • Returns Record<string, string>