Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

Creates a DisplayList that manages Renderable objects

description

The DisplayList Class. Keeps track of all Renderable objects

since

2.0.0

Hierarchy

  • DisplayList

Index

Constructors

constructor

Properties

game

game: Game

list

list: Renderable[] = []

Accessors

length

  • get length(): number

listItems

  • memberof

    DisplayList

    description

    Overwrites the list items with passed parameter

    since

    2.0.0

    Parameters

    • listItems: Renderable[]

      Renderable objects to overwrite with

    Returns void

Methods

add

  • memberof

    DisplayList

    description

    Adds a renderableObject to the list

    since

    2.0.0

    Parameters

    • renderableObject: Renderable

      A renderableObject

      Note: this pools the game's renderer pipeline for instant updates

    Returns void

depthSort

each

  • each<t>(cb: (renderableObject: Renderable, index: number) => t): void
  • memberof

    DisplayList

    description

    Loops through each renderableObject and runs a callback with it passed

    since

    2.0.0

    Type parameters

    • t = void

    Parameters

    • cb: (renderableObject: Renderable, index: number) => t

      Callback

        • Parameters

          Returns t

    Returns void

remove

splice

  • splice(index: number, amount?: number): Renderable[]
  • memberof

    DisplayList

    description

    Removes an item from the list based on passed index

    since

    2.0.0

    Parameters

    • index: number
    • Optional amount: number

    Returns Renderable[]

visibilityFilter

  • memberof

    DisplayList

    description

    Filters all renderableObjects by its visible boolean property

    since

    2.0.0

    Parameters

    • filter: boolean = true

    Returns Renderable[]

Generated using TypeDoc