Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Draw

Hierarchy

Index

Constructors

constructor

Properties

attrs

canvas

canvas: HTMLCanvasElement

ctx

ctx: CanvasRenderingContext2D

parent

parent: IContainer

shape

shape: Sprite

Methods

clean

  • clean(): void
  • Returns void

draw

  • draw(): void
  • Returns void

getAttr

  • getAttr(attr: string): any
  • Parameters

    • attr: string

    Returns any

hide

  • hide(): void
  • Returns void

move

  • move(offsetX: number, offsetY: number): void
  • Parameters

    • offsetX: number
    • offsetY: number

    Returns void

redraw

  • redraw(draw: function): void
  • Parameters

    • draw: function
        • (ctx: CanvasRenderingContext2D): void
        • Parameters

          • ctx: CanvasRenderingContext2D

          Returns void

    Returns void

rotate

  • rotate(offsetAngle: number): void
  • Parameters

    • offsetAngle: number

    Returns void

scale

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

    • x: number
    • y: number

    Returns void

setAttrs

setPivot

  • setPivot(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

setPostion

  • setPostion(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

setRotation

  • setRotation(angle: number): void
  • Parameters

    • angle: number

    Returns void

show

  • show(): void
  • Returns void

tween

  • tween(duration: number, to: any, easing?: function): Tween
  • Parameters

    • duration: number
    • to: any
    • Optional easing: function
        • (t: number, b: number, c: number, d: number): number
        • Parameters

          • t: number
          • b: number
          • c: number
          • d: number

          Returns number

    Returns Tween

Generated using TypeDoc