Options
All
  • Public
  • Public/Protected
  • All
Menu

Creates and updates PixiObject components based on Draw components.

Hierarchy

  • System
    • PixiSystem

Index

Constructors

constructor

  • new PixiSystem(world: World, ...initArgs: any[]): PixiSystem
  • Parameters

    • world: World
    • Rest ...initArgs: any[]

    Returns PixiSystem

Properties

changes

changes: IComponentChange[]

Private cull

cull: SpatialHash

lastTick

lastTick: number

Private needCull

needCull: boolean = false

Private pixiObjectAddQuery

pixiObjectAddQuery: Query

Private pixiObjectQuery

pixiObjectQuery: Query

Private pixiObjectRemoveQuery

pixiObjectRemoveQuery: Query

queries

queries: Query[]

Private renderer

renderer: Renderer

Private textures

textures: Textures

Private view

view: Viewport<IPlugins>

world

world: World

Static subscriptions

subscriptions: string[]

Methods

Private addPixiObjects

  • addPixiObjects(): void

createQuery

  • createQuery(init?: IQueryConfig): Query
  • Parameters

    • Optional init: IQueryConfig

    Returns Query

init

Private removePixiObjects

  • removePixiObjects(): void

subscribe

  • subscribe(type: string | ComponentClass): void
  • Parameters

    • type: string | ComponentClass

    Returns void

update

  • update(tick: number): void

Private updateDraw

  • updateDraw(draw: Draw, object: PixiObject["object"]): void
  • Updates a PIXI object from a Draw component.

    Parameters

    • draw: Draw

      The Draw component used to update the PIXI object.

    • object: PixiObject["object"]

      The PIXI object being updated.

    Returns void

Private updatePixiObjects

  • updatePixiObjects(tick: number): void

Private updateTexture

  • updateTexture(texture: Texture, sprite: Sprite): void

Static Private updateGraphic

  • updateGraphic(__namedParameters: { anchorX: number; anchorY: number; color: number; height: number; width: number }, graphics: Graphics): void
  • Updates a PIXI graphics object from a Graphic component.

    Parameters

    • __namedParameters: { anchorX: number; anchorY: number; color: number; height: number; width: number }

      The Graphic component used to update the PIXI graphics object.

      • anchorX: number
      • anchorY: number
      • color: number
      • height: number
      • width: number
    • graphics: Graphics

      The PIXI graphics object being updated.

    Returns void

Generated using TypeDoc