Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

SimpleEase: (time: number) => number

Type declaration

    • (time: number): number
    • The basic easing function used. Takes in a value between 0-1, and outputs another value between 0-1. For example, a basic quadratic in ease would be (time) => time * time

      Parameters

      • time: number

      Returns number

Variables

DEG_TO_RADS: number = ...
verbose: false = false

If errors and warnings should be logged within the library.

Functions

  • GetTextureFromString(d: string): Texture<Resource>
  • The method used by behaviors to fetch textures. Defaults to Texture.from.

    Parameters

    • d: string

    Returns Texture<Resource>

  • combineRGBComponents(r: number, g: number, b: number): number
  • Combines separate color components (0-255) into a single uint color.

    Parameters

    • r: number

      The red value of the color

    • g: number

      The green value of the color

    • b: number

      The blue value of the color

    Returns number

    The color in the form of 0xRRGGBB

  • Converts a list of {value, time} objects starting at time 0 and ending at time 1 into an evenly spaced stepped list of PropertyNodes for color values. This is primarily to handle conversion of linear gradients to fewer colors, allowing for some optimization for Canvas2d fallbacks.

    Parameters

    • list: ValueStep<string>[]

      The list of data to convert.

    • numSteps: number = 10

    Returns PropertyNode<Color>

    The blend mode as specified in the PIXI.blendModes enumeration.

  • getBlendMode(name: string): number
  • Gets a blend mode, ensuring that it is valid.

    Parameters

    • name: string

      The name of the blend mode to get.

    Returns number

    The blend mode as specified in the PIXI.BLEND_MODES enumeration.

  • Converts a hex string from "#AARRGGBB", "#RRGGBB", "0xAARRGGBB", "0xRRGGBB", "AARRGGBB", or "RRGGBB" to an object of ints of 0-255, as {r, g, b, (a)}.

    Parameters

    • color: string

      The input color string.

    • Optional output: Color

      An object to put the output in. If omitted, a new object is created.

    Returns Color

    The object with r, g, and b properties, possibly with an a property.

  • length(point: IPointData): number
  • Returns the length (or magnitude) of this point.

    Parameters

    • point: IPointData

      The point to measure length

    Returns number

    The length of this point.

  • normalize(point: IPointData): void
  • Reduces the point to a length of 1.

    Parameters

    • point: IPointData

      The point to normalize

    Returns void

  • rotatePoint(angle: number, p: IPointData): void
  • Rotates a point by a given angle.

    Parameters

    • angle: number

      The angle to rotate by in radians

    • p: IPointData

      The point to rotate around 0,0.

    Returns void

  • scaleBy(point: IPointData, value: number): void
  • Multiplies the x and y values of this point by a value.

    Parameters

    • point: IPointData

      The point to scaleBy

    • value: number

      The value to scale by.

    Returns void

Generated using TypeDoc