Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

EasingFunction: (progress: float) => float

Type declaration

    • (progress: float): float
    • Parameters

      • progress: float

      Returns float

Functions

  • addLayerValueTween(runtimeScene: RuntimeScene, identifier: string, fromValue: number, toValue: number, easing: string, duration: number, useExponentialInterpolation: boolean, layerName: string): void
  • Add a layer value tween. The layer time scale is taken into account.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • fromValue: number

      Start value

    • toValue: number

      End value

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    • useExponentialInterpolation: boolean

      Set it to true to use a exponential It's useful for values that are factors like a scale or a zoom.

    • layerName: string

      The name of layer

    Returns void

  • addLayoutValueTween(runtimeScene: RuntimeScene, identifier: string, fromValue: number, toValue: number, easing: string, duration: number, useExponentialInterpolation: boolean): void
  • Add a layout value tween.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • fromValue: number

      Start value

    • toValue: number

      End value

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    • useExponentialInterpolation: boolean

      Set it to true to use a exponential It's useful for values that are factors like a scale or a zoom.

    Returns void

  • ease(easingValue: string, fromValue: number, toValue: number, weighting: number): number
  • Tween between 2 values according to an easing function.

    Parameters

    • easingValue: string

      Type of easing

    • fromValue: number

      Start value

    • toValue: number

      End value

    • weighting: number

      from 0 to 1

    Returns number

  • getProgress(runtimeScene: RuntimeScene, identifier: string): number
  • getValue(runtimeScene: RuntimeScene, identifier: string): number
  • hslToRgb(h: number, s: number, l: number): number[]
  • pauseSceneTween(runtimeScene: RuntimeScene, id: string): void
  • removeSceneTween(runtimeScene: RuntimeScene, id: string): void
  • resumeSceneTween(runtimeScene: RuntimeScene, id: string): void
  • rgbToHsl(r: number, g: number, b: number): number[]
  • sceneTweenExists(runtimeScene: RuntimeScene, id: string): boolean
  • sceneTweenHasFinished(runtimeScene: RuntimeScene, id: string): boolean
  • sceneTweenIsPlaying(runtimeScene: RuntimeScene, id: string): boolean
  • stopSceneTween(runtimeScene: RuntimeScene, id: string, shouldGoToEnd: boolean): void
  • tweenCamera(runtimeScene: RuntimeScene, identifier: string, toX: number, toY: number, layerName: string, duration: number, easing: string): void
  • tweenCamera2(runtimeScene: RuntimeScene, identifier: string, toX: number, toY: number, layerName: string, easing: string, duration: number): void
  • Tween a layer camera position.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • toX: number

      The targeted position on X axis

    • toY: number

      The targeted position on Y axis

    • layerName: string

      The name of the layer to move

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

  • tweenCameraRotation(runtimeScene: RuntimeScene, identifier: string, toRotation: number, layerName: string, duration: number, easing: string): void
  • tweenCameraRotation2(runtimeScene: RuntimeScene, identifier: string, toRotation: number, layerName: string, easing: string, duration: number): void
  • Tween a layer camera rotation angle.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • toRotation: number

      The targeted angle in degrees

    • layerName: string

      The name of the layer to rotate

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

  • tweenCameraZoom(runtimeScene: RuntimeScene, identifier: string, toZoom: number, layerName: string, duration: number, easing: string): void
  • tweenCameraZoom2(runtimeScene: RuntimeScene, identifier: string, toZoom: number, layerName: string, easing: string, duration: number): void
  • Tween a layer camera zoom factor.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • toZoom: number

      The targeted zoom factor

    • layerName: string

      The name of the layer to zoom

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

  • tweenColorEffectPropertyTween(runtimeScene: RuntimeScene, identifier: string, toColorStr: string, layerName: string, effectName: string, propertyName: string, easing: string, duration: number): void
  • Tween a color object effect property.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • toColorStr: string

      The target RGB color (format "128;200;255" with values between 0 and 255 for red, green and blue)

    • layerName: string

      Layer name

    • effectName: string

      Effect name

    • propertyName: string

      Property name

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

  • tweenNumberEffectPropertyTween(runtimeScene: RuntimeScene, identifier: string, toValue: number, layerName: string, effectName: string, propertyName: string, easing: string, duration: number): void
  • Tween a numeric object effect property.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • toValue: number

      The targeted value

    • layerName: string

      Layer name

    • effectName: string

      Effect name

    • propertyName: string

      Property name

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

  • tweenVariableNumber(runtimeScene: RuntimeScene, identifier: string, variable: Variable, from: number, to: number, duration: number, easing: string): void
  • deprecated

    Use tweenVariableNumber3 instead. This function is misleading since one could think that the tween starts right at the moment this function is called whereas the value of the variable will change at the next frame only. Moreover, the variable will not start from the start value exactly since time will have passed at the moment the next frame is rendered. See https://github.com/4ian/GDevelop/issues/4270

    Parameters

    • runtimeScene: RuntimeScene
    • identifier: string
    • variable: Variable
    • from: number
    • to: number
    • duration: number
    • easing: string

    Returns void

  • tweenVariableNumber2(runtimeScene: RuntimeScene, identifier: string, variable: Variable, toValue: number, duration: number, easing: string): void
  • tweenVariableNumber3(runtimeScene: RuntimeScene, identifier: string, variable: Variable, toValue: number, easing: string, duration: number): void
  • Tween a scene variable.

    Parameters

    • runtimeScene: RuntimeScene

      The scene

    • identifier: string

      Unique id to identify the tween

    • variable: Variable

      The scene variable which is set to the tweened value

    • toValue: number

      End value

    • easing: string

      Easing function identifier

    • duration: number

      Duration in seconds

    Returns void

Variables

easingFunctions: Record<string, EasingFunction> = ...

Generated using TypeDoc