Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils

Index

Variables

BaseTextureCache

BaseTextureCache: any

TextureCache

TextureCache: any

premultiplyBlendMode

premultiplyBlendMode: number[][]

Functions

canUseNewCanvasBlendModes

  • canUseNewCanvasBlendModes(): boolean
  • Returns boolean

correctBlendMode

  • correctBlendMode(blendMode: number, premultiplied: boolean): number
  • Parameters

    • blendMode: number
    • premultiplied: boolean

    Returns number

decomposeDataUri

  • Parameters

    • dataUri: string

    Returns DecomposedDataUri | void

getResolutionOfUrl

  • getResolutionOfUrl(url: string, defaultValue?: number): number
  • Parameters

    • url: string
    • Optional defaultValue: number

    Returns number

getSvgSize

  • getSvgSize(svgString: string): any
  • Parameters

    • svgString: string

    Returns any

getUrlFileExtension

  • getUrlFileExtension(url: string): string | void
  • Parameters

    • url: string

    Returns string | void

hex2rgb

  • hex2rgb(hex: number, out?: number[]): number[]
  • Parameters

    • hex: number
    • Optional out: number[]

    Returns number[]

hex2string

  • hex2string(hex: number): string
  • Parameters

    • hex: number

    Returns string

isWebGLSupported

  • isWebGLSupported(): boolean
  • Returns boolean

premultiplyRgba

  • premultiplyRgba(rgb: Float32Array | number[], alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array
  • Parameters

    • rgb: Float32Array | number[]
    • alpha: number
    • Optional out: Float32Array
    • Optional premultiply: boolean

    Returns Float32Array

premultiplyTint

  • premultiplyTint(tint: number, alpha: number): number
  • Parameters

    • tint: number
    • alpha: number

    Returns number

premultiplyTintToRgba

  • premultiplyTintToRgba(tint: number, alpha: number, out?: Float32Array, premultiply?: boolean): Float32Array
  • Parameters

    • tint: number
    • alpha: number
    • Optional out: Float32Array
    • Optional premultiply: boolean

    Returns Float32Array

removeItems

  • removeItems<T>(arr: T[], startIdx: number, removeCount: number): void
  • Type parameters

    • T

    Parameters

    • arr: T[]
    • startIdx: number
    • removeCount: number

    Returns void

rgb2hex

  • rgb2hex(rgb: number[]): number
  • Parameters

    • rgb: number[]

    Returns number

sayHello

  • sayHello(type: string): void
  • Parameters

    • type: string

    Returns void

sign

  • sign(n: number): number
  • Parameters

    • n: number

    Returns number

skipHello

  • skipHello(): void
  • Returns void

uid

  • uid(): number
  • Returns number

Generated using TypeDoc