Options
All
  • Public
  • Public/Protected
  • All
Menu

Class XStage

Hierarchy

Index

Constructors

constructor

  • new XStage(config?: object): XStage
  • Parameters

    • Default value config: object = XGameObjectDefaults
      • alpha: number
      • anchorX: number
      • anchorY: number
      • height: number
      • id: string
      • interactable: boolean
      • rotation: number
      • scaleX: number
      • scaleY: number
      • width: number
      • x: number
      • y: number
      • zIndex: number

    Returns XStage

Properties

acceleration

acceleration: Vector

anchorX

anchorX: number

anchorY

anchorY: number

children

children: Array<XGameObject>

debugObject

debugObject: boolean

id

id: string

interactable

interactable: boolean

naturalHeight

naturalHeight: number

naturalScaleX

naturalScaleX: number

naturalScaleY

naturalScaleY: number

naturalWidth

naturalWidth: number

onMouseDown

onMouseDown: Function | null

onMouseMove

onMouseMove: Function | null

onMouseUp

onMouseUp: Function | null

position

position: Vector

rotation

rotation: number

texture

texture: XTexture | null

velocity

velocity: Vector

visible

visible: boolean

zIndex

zIndex: number

Accessors

alpha

alpha:

anchorGx

anchorGx:

anchorGy

anchorGy:

anchorOffsetVector

anchorOffsetVector:

anchorXOffset

anchorXOffset:

anchorYOffset

anchorYOffset:

ax

ax:

ay

ay:

gcx

gcx:

gcy

gcy:

globalCenterVector

globalCenterVector:

globalComputedBox

globalComputedBox:

gx

gx:

gy

gy:

height

height:

naturalAnchorXOffset

naturalAnchorXOffset:

naturalAnchorYOffset

naturalAnchorYOffset:

scaleX

scaleX:

scaleY

scaleY:

vx

vx:

vy

vy:

width

width:

x

x:

y

y:

Methods

addChild

attachToCanvas

  • attachToCanvas(canvas: HTMLCanvasElement): void
  • Parameters

    • canvas: HTMLCanvasElement

    Returns void

orderChildrenByZIndex

  • orderChildrenByZIndex(): void

removeChild

render

  • render(context: CanvasRenderingContext2D): void

renderDebuggingOutlines

  • renderDebuggingOutlines(context: CanvasRenderingContext2D): void

setPosition

  • setPosition(x: number, y: number): void

setTexture

updatePositions

  • updatePositions(): void