Skip to Content
defold-typescript libraries
britzlmonarch

britzl/monarch/monarch.transitions.gui

Monarch comes with a system for setting up transitions easily in a gui_script using the monarch.transitions.gui module.

  • GitHub: britzl/monarch — pinned to 6.0.3
    1. Pick a release from britzl/monarch releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as transitions_gui from "monarch.transitions.gui"

Functions

slide_in_right(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_in_left(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_in_top(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_in_bottom(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_out_right(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_out_left(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_out_top(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

slide_out_bottom(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

scale_in(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

scale_out(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

fade_in(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

fade_out(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Parameters

  • node: Opaque<"node">
  • from: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

in_right_out_left(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)U

Create transition where the screen slides in from the right when shown and out to the left when hidden (and the reverse when going back)

Parameters

  • node: Opaque<"node">
  • duration: number
  • delay?: number — Optional. Defaults to 0
  • easing?: Easing — Optional. A constant from monarch.transitions.easing

in_left_out_right(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)

Parameters

  • node: Opaque<"node">
  • duration: number
  • delay?: number
  • easing?: Easing

in_left_out_left(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)

Parameters

  • node: Opaque<"node">
  • duration: number
  • delay?: number
  • easing?: Easing

in_right_out_right(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)

Parameters

  • node: Opaque<"node">
  • duration: number
  • delay?: number
  • easing?: Easing

fade_in_out(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)

Parameters

  • node: Opaque<"node">
  • duration: number
  • delay?: number
  • easing?: Easing

window_resized(width: number, height: number)

Notify the transition system that the window size has changed

Parameters

  • width: number
  • height: number

instant(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)

Calls complete_function

Parameters

  • node: Opaque<"node">
  • to: Vector3
  • easing: GuiEasing
  • duration: number
  • delay?: number
  • complete_function?: (this: any, node: Opaque<"node">) => void

create(2 overloads)

  1. (node: Opaque<"node">): Transition

    Parameters

    • node: Opaque<"node">

    Returns

    • Transition
  2. (): TransitionNodeless

    Returns

    • TransitionNodeless

Types

type GuiEasing = typeof gui.EASING_INBACK | typeof gui.EASING_INBOUNCE | typeof gui.EASING_INCIRC | typeof gui.EASING_INCUBIC | typeof gui.EASING_INELASTIC | typeof gui.EASING_INEXPO | typeof gui.EASING_INOUTBACK | typeof gui.EASING_INOUTBOUNCE | typeof gui.EASING_INOUTCIRC | typeof gui.EASING_INOUTCUBIC | typeof gui.EASING_INOUTELASTIC | typeof gui.EASING_INOUTEXPO | typeof gui.EASING_INOUTQUAD | typeof gui.EASING_INOUTQUART | typeof gui.EASING_INOUTQUINT | typeof gui.EASING_INOUTSINE | typeof gui.EASING_INQUAD | typeof gui.EASING_INQUART | typeof gui.EASING_INQUINT | typeof gui.EASING_INSINE | typeof gui.EASING_LINEAR | typeof gui.EASING_OUTBACK | typeof gui.EASING_OUTBOUNCE | typeof gui.EASING_OUTCIRC | typeof gui.EASING_OUTCUBIC | typeof gui.EASING_OUTELASTIC | typeof gui.EASING_OUTEXPO | typeof gui.EASING_OUTINBACK | typeof gui.EASING_OUTINBOUNCE | typeof gui.EASING_OUTINCIRC | typeof gui.EASING_OUTINCUBIC | typeof gui.EASING_OUTINELASTIC | typeof gui.EASING_OUTINEXPO | typeof gui.EASING_OUTINQUAD | typeof gui.EASING_OUTINQUART | typeof gui.EASING_OUTINQUINT | typeof gui.EASING_OUTINSINE | typeof gui.EASING_OUTQUAD | typeof gui.EASING_OUTQUART | typeof gui.EASING_OUTQUINT | typeof gui.EASING_OUTSINE

type TransitionInFn = (node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void) => void

type TransitionOutFn = (node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void) => void

Easing

Easing.IN: GuiEasing

Easing.OUT: GuiEasing

Transition

Transition.handle: (message_id: Hash | string, message: unknown, sender: Url) => void

Transition.show_in: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

Transition.show_out: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

Transition.back_in: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

Transition.back_out: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

TransitionNodeless

TransitionNodeless.handle: (message_id: Hash | string, message: unknown, sender: Url) => void

TransitionNodeless.show_in: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

TransitionNodeless.show_out: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

TransitionNodeless.back_in: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

TransitionNodeless.back_out: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void

On this page

Functionsslide_in_right(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_in_left(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_in_top(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_in_bottom(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_out_right(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_out_left(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_out_top(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)slide_out_bottom(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)scale_in(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)scale_out(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)fade_in(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)fade_out(node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)in_right_out_left(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)in_left_out_right(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)in_left_out_left(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)in_right_out_right(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)fade_in_out(node: Opaque<"node">, duration: number, delay?: number, easing?: Easing)window_resized(width: number, height: number)instant(node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void)create(2 overloads)Typestype GuiEasing = typeof gui.EASING_INBACK | typeof gui.EASING_INBOUNCE | typeof gui.EASING_INCIRC | typeof gui.EASING_INCUBIC | typeof gui.EASING_INELASTIC | typeof gui.EASING_INEXPO | typeof gui.EASING_INOUTBACK | typeof gui.EASING_INOUTBOUNCE | typeof gui.EASING_INOUTCIRC | typeof gui.EASING_INOUTCUBIC | typeof gui.EASING_INOUTELASTIC | typeof gui.EASING_INOUTEXPO | typeof gui.EASING_INOUTQUAD | typeof gui.EASING_INOUTQUART | typeof gui.EASING_INOUTQUINT | typeof gui.EASING_INOUTSINE | typeof gui.EASING_INQUAD | typeof gui.EASING_INQUART | typeof gui.EASING_INQUINT | typeof gui.EASING_INSINE | typeof gui.EASING_LINEAR | typeof gui.EASING_OUTBACK | typeof gui.EASING_OUTBOUNCE | typeof gui.EASING_OUTCIRC | typeof gui.EASING_OUTCUBIC | typeof gui.EASING_OUTELASTIC | typeof gui.EASING_OUTEXPO | typeof gui.EASING_OUTINBACK | typeof gui.EASING_OUTINBOUNCE | typeof gui.EASING_OUTINCIRC | typeof gui.EASING_OUTINCUBIC | typeof gui.EASING_OUTINELASTIC | typeof gui.EASING_OUTINEXPO | typeof gui.EASING_OUTINQUAD | typeof gui.EASING_OUTINQUART | typeof gui.EASING_OUTINQUINT | typeof gui.EASING_OUTINSINE | typeof gui.EASING_OUTQUAD | typeof gui.EASING_OUTQUART | typeof gui.EASING_OUTQUINT | typeof gui.EASING_OUTSINEtype TransitionInFn = (node: Opaque<"node">, to: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void) => voidtype TransitionOutFn = (node: Opaque<"node">, from: Vector3, easing: GuiEasing, duration: number, delay?: number, complete_function?: (this: any, node: Opaque<"node">) => void) => voidEasingEasing.IN: GuiEasingEasing.OUT: GuiEasingTransitionTransition.handle: (message_id: Hash | string, message: unknown, sender: Url) => voidTransition.show_in: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransition.show_out: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransition.back_in: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransition.back_out: (fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransitionNodelessTransitionNodeless.handle: (message_id: Hash | string, message: unknown, sender: Url) => voidTransitionNodeless.show_in: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransitionNodeless.show_out: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransitionNodeless.back_in: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => voidTransitionNodeless.back_out: (node: Opaque<"node">, fn: TransitionInFn | TransitionOutFn, easing: GuiEasing, duration: number, delay: number) => void