Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Fader

An asset by MadCatVR
The page banner background of a mountain and forest
Fader hero image

Quick Information

0 ratings
Fader icon image
MadCatVR
Fader

Addon offers easy to use fader. The most typical usage is for transitions:func _transition():await $Fader.fade_to_black()# hide/unload old stuff# show/load new stuff$Fader.fade_to_clear()Noteworthy features:- blocks mouse input on fade out (but allows on fade in)- fading can be awaited- allows fading out to any color in addition to standard fade_to_black and fade_to_white- allows fade speed customization

Supported Engine Version
4.3
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
5 months ago
Git URL
Issue URL

Overview

Addon offers easy to use fader. The most typical usage is for transitions:

func _transition():
    await $Fader.fade_to_black()
    # hide/unload old stuff
    # show/load new stuff
    $Fader.fade_to_clear()

Noteworthy features:

  • blocks mouse input on fade out (but allows on fade in)
  • fading can be awaited
  • allows fading out to any color in addition to standard fade_to_black and fade_to_white
  • allows fade speed customization

Usage

To add fader to your game, just make sure there's an instance of addons/fader/fader.tscn in your scene. Then you can use the Fader node using the following API:

func snap_to_black()
func snap_to_white()
func snap_to_clear()
func snap_to(color : Color)

func fade_to_black()
func fade_to_white()
func fade_to_clear()
func fade_to(color : Color)

func fade_to_black_at(speed : float)
func fade_to_white_at(speed : float)
func fade_to_clear_at(speed : float)

func fade(to_color : Color, at_speed : float)

To fade in on the game start, you can use snap_* function followed by fade_to_clear:

func _ready():
    $Fader.snap_to_black()
    $Fader.fade_to_clear()

Settings

By default, fading happens with the speed of 1, which means that the transition from fully transparent to fully opaque state will take 1 second.

In additional to specifying custom fade speed in the fade_to_*_at(speed : float) You can modify ALPHA_SPEED constant in addons/fader/fader.gd script to change global fading speed.

You'll also find some other constants for modification, like easing curve selection.

Demo

Try playing demo.tscn, you'll be able to transition through some example screens using different fade colors. Also, on the demo start screen fades from black.

Addon offers easy to use fader. The most typical usage is for transitions:

func _transition():
await $Fader.fade_to_black()
# hide/unload old stuff
# show/load new stuff
$Fader.fade_to_clear()

Noteworthy features:
- blocks mouse input on fade out (but allows on fade in)
- fading can be awaited
- allows fading out to any color in addition to standard fade_to_black and fade_to_white
- allows fade speed customization

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Fader icon image
MadCatVR
Fader

Addon offers easy to use fader. The most typical usage is for transitions:func _transition():await $Fader.fade_to_black()# hide/unload old stuff# show/load new stuff$Fader.fade_to_clear()Noteworthy features:- blocks mouse input on fade out (but allows on fade in)- fading can be awaited- allows fading out to any color in addition to standard fade_to_black and fade_to_white- allows fade speed customization

Supported Engine Version
4.3
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
5 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers