Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new TextureSheet(texture: HTMLImageElement, frameWidth: number, frameHeight: number, rows: number, cols: number): TextureSheet

Properties

Readonly cols

cols: undefined | number

Readonly dataType

dataType: DataType
memberof

TextureBase

description

The data type of texture, 'sheet' | 'base' | 'atlas' | 'list'

since

2.1.0

Readonly frameHeight

frameHeight: undefined | number

Readonly frameWidth

frameWidth: undefined | number

Readonly id

id: string
memberof

TextureBase

description

The unique identifier for the texture

since

2.1.0

Readonly rows

rows: undefined | number

scale

scale: Vector2
memberof

Texture

description

The scale of the texture

since

2.1.0

texture

texture: HTMLImageElement
memberof

TextureBase

description

The texture itself, can be an image or color

since

2.1.0

type

memberof

TextureBase

description

The type of texture source, 'image' | 'color' | 'either'

since

2.1.0

Methods

setFillColor

  • setFillColor(color: string | number): void

setImagePath

  • setImagePath(imagePath: string): void

setScale

Static fromColor

  • fromColor(color: string, w: number, h: number): TextureBase<"color">

Static fromEither

  • fromEither(fillColorOrIMGPath: string, w: number, h: number): TextureBase<"either">

Static fromTexture

  • fromTexture(imgpath: string, w: number, h: number): TextureBase<"image">

Generated using TypeDoc