Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

game

game: Game

Methods

Abstract clearFrame

  • clearFrame(): void

Abstract drawCircle

  • drawCircle(x: number, y: number, r: number, color: string): void

Abstract drawRect

  • drawRect(x: number, y: number, w: number, h: number, color: string): void

Abstract drawRoundRect

  • drawRoundRect(x: number, y: number, w: number, h: number, r: number, color: string): void

Abstract drawSprite

  • drawSprite(x: number, y: number, w: number, h: number, texture: TextureBase<"image">, frameWidth?: number, frameHeight?: number, currentRow?: number, currentCol?: number): void
  • Parameters

    • x: number
    • y: number
    • w: number
    • h: number
    • texture: TextureBase<"image">
    • Optional frameWidth: number
    • Optional frameHeight: number
    • Optional currentRow: number
    • Optional currentCol: number

    Returns void

Abstract drawText

  • drawText(text: string, x: number, y: number, maxWidth?: number): void

Abstract measureText

  • measureText(font: string, text: string): void

Abstract restore

  • restore(): void

Abstract save

  • save(): void

Abstract scale

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

Abstract setBlendMode

  • setBlendMode(blendMode: "color" | "multiply" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "lighter" | "copy" | "xor" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity"): void
  • Parameters

    • blendMode: "color" | "multiply" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "lighter" | "copy" | "xor" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity"

    Returns void

Abstract setFillColor

  • setFillColor(color: string): void

Abstract setFont

  • setFont(font: string): void

Abstract setLineWidth

  • setLineWidth(width: number): void

Abstract setStrokeColor

  • setStrokeColor(color: string): void

Abstract strokeText

  • strokeText(text: string, x: number, y: number, maxWidth?: number): void

Abstract transform

  • transform(a: number, b: number, c: number, d: number, e: number, f: number): void

Abstract translate

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

Generated using TypeDoc