Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • acosh(arg: number): number
  • angleBetweenPositions(x1: number, y1: number, x2: number, y2: number): number
  • Returns the angle, in degrees, between two positions.

    Parameters

    • x1: number

      First point X position.

    • y1: number

      First point Y position.

    • x2: number

      Second point X position.

    • y2: number

      Second point Y position.

    Returns number

    The angle between the positions, in degrees.

  • angleDifference(angle1: number, angle2: number): number
  • Returns the difference between two angles, in degrees.

    Parameters

    • angle1: number

      First angle, in degrees.

    • angle2: number

      Second angle, in degrees.

    Returns number

    Return the difference of the angles, in degrees.

  • asinh(arg: number): number
  • atanh(arg: number): number
  • cbrt(x: number): number
  • ceilTo(value: number, decimalPlace: number): number
  • clamp(x: number, min: number, max: number): number
  • cosh(arg: number): number
  • cot(arg: number): number
  • csc(arg: number): number
  • distanceBetweenPositions(x1: number, y1: number, x2: number, y2: number): number
  • Returns the distance, in pixels, between two positions.

    Parameters

    • x1: number

      First point X position.

    • y1: number

      First point Y position.

    • x2: number

      Second point X position.

    • y2: number

      Second point Y position.

    Returns number

    The distance between the positions, in pixels.

  • exponentialInterpolation(start: number, end: number, progress: number): number
  • Return an exponential interpolation between start and end.

    For instance, exponentialInterpolation(2, 8, 0.5) is 4.

    Parameters

    • start: number

      Start value.

    • end: number

      End value.

    • progress: number

      The interpolation value between 0 and 1.

    Returns number

    The interpolated value.

  • floorTo(value: number, decimalPlace: number): number
  • getVariableBoolean(variable: Variable, compareWith: boolean): boolean
  • getVariableChildCount(variable: Variable): number
  • getVariableNumber(variable: Variable): number
  • getVariableString(variable: Variable): string
  • getXFromAngleAndDistance(angle: number, distance: number): number
  • Compute the X position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.

    Parameters

    • angle: number

      The angle, in degrees.

    • distance: number

      The distance from the object, in pixels.

    Returns number

  • getYFromAngleAndDistance(angle: number, distance: number): number
  • Compute the Y position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates.

    Parameters

    • angle: number

      The angle, in degrees.

    • distance: number

      The distance from the object, in pixels.

    Returns number

  • isMobile(): boolean
  • Check if the game runs on a mobile device (iPhone, iPad, Android). Note that the distinction between what is a mobile device and what is not is becoming blurry. If you use this for mobile controls, prefer to check if the device has touchscreen support.

    Returns boolean

  • lerp(a: number, b: number, x: number): number
  • Return a linear interpolation between a and b.

    For instance, lerp(2, 8, 0.5) is 5.

    Parameters

    • a: number

      Start value.

    • b: number

      End value.

    • x: number

      The interpolation value between 0 and 1.

    Returns number

    The interpolated value, now between a and b.

  • lerpAngle(angle1: number, angle2: number, x: number): number
  • Linearly interpolates between two angles (in degrees) by taking the shortest direction around the circle.

    Parameters

    • angle1: number

      Starting angle, in degrees.

    • angle2: number

      Destination angle, in degrees.

    • x: number

      The interpolation value between 0 and 1.

    Returns number

    Return the interpolated angle, in degrees.

  • log10(arg: number): number
  • log2(arg: number): number
  • logicalNegation(bool: boolean): boolean
  • mod(x: number, y: number): number
  • Modulo operation (the remainder after dividing one number by another)

    Parameters

    • x: number

      Dividend value.

    • y: number

      Divisor value.

    Returns number

    Return the remainder for the values.

  • normalize(val: number, min: number, max: number): number
  • Normalize a value between min and max to a value between 0 and 1.

    Parameters

    • val: number

      The value to normalize

    • min: number

      The minimum

    • max: number

      The maximum

    Returns number

    The normalized value between 0 and 1

  • nthroot(x: number, n: number): number
  • pi(): number
  • resolveAsyncEventsFunction(eventsFunctionContext: EventsFunctionContext): void
  • roundTo(value: number, decimalPlace: number): number
  • sceneVariableExists(runtimeScene: RuntimeScene, variableName: string): boolean
  • sec(arg: number): number
  • setVariableBoolean(variable: Variable, newValue: boolean): void
  • sign(arg: number): number
  • Returns the sign of the number. This checks if the value is positive, negative or zero.

    Parameters

    • arg: number

      Value.

    Returns number

    Return the sign for the value (1, -1 or 0).

  • sinh(arg: number): number
  • tanh(arg: number): number
  • toNumber(str: string): number
  • toString(num: number): string
  • toggleVariableBoolean(variable: Variable): void
  • trunc(x: number): number
  • valuePush(array: Variable, value: string | number | boolean): void
  • variableChildExists(variable: Variable, childName: string): boolean
  • variableClearChildren(variable: Variable): void
  • variableRemoveAt(array: Variable, index: number): void
  • variableRemoveChild(variable: Variable, childName: string): void

Generated using TypeDoc