Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ViewPort

This class contain canvas dom operation. Getter and setter for width and height of canvas or percent of innerHeight or innerWidth.

Hierarchy

  • ViewPort

Index

Constructors

constructor

Properties

Private aspectRatio

aspectRatio: number = 1.333

Private canvasDom

canvasDom: any

config

config: ClientConfig

Private reperH

reperH: any

Private reperW

reperW: any

Methods

getCanvasDom

  • getCanvasDom(): HTMLCanvasElement

getCanvasHeight

  • getCanvasHeight(): number

getCanvasWidth

  • getCanvasWidth(): number

getHeight

  • getHeight(percente: number): number

getWidth

  • getWidth(percente: number): number

initCanvasDom

  • initCanvasDom(): void

setAspectRatio

  • setAspectRatio(aspectRatio: number): void

setCanvasHeight

  • setCanvasHeight(height: string): void

setCanvasWidth

  • setCanvasWidth(width: string): void

Generated using TypeDoc