Skip to content

djsime1/GradientDriverEasing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GradientDriverEasing

A ResoniteModLoader mod for Resonite that adds easing function presets to ValueGradientDriver components.

Depends on CustomUILib to add the inspector UI!

Screenshot

Installation

  1. Install ResoniteModLoader.
  2. Place CustomUILib.dll and GradientDriverEasing.dll into your rml_mods folder. This folder should be at C:\Program Files (x86)\Steam\steamapps\common\Resonite\rml_mods for a default install. You can create it if it's missing, or if you launch the game once with ResoniteModLoader installed it will create this folder for you.
  3. Start the game and browse to or create a ValueGradeintDriver component using the Inspector. Two new sections should appear on the component.
  4. Consult the guide below to learn how the mod works.

Usage guide

The additional UI is split into two sections: Easing utilities and Easing functions.

Easing utilities

This section contains general settings and utilities. The first row controls the easing function endpoints.

  • Min position: Defines the minimum interpolation position for easing functions.
  • Max position: Defines the maximum interpolation position for easing functions.

If there are 2 or more points in the Points list, these values will be automatically set to the minimum and maximum positions of the list. Otherwise, they default to 0 and 1 respectively.

  • 01: Sets the min and max fields to 0 and 1 respectively.
  • Auto: Sets the min and max fields to the minimum and maximum positions in the Points list.
  • Swap: Swaps the minimum and maximum fields values.

The second row contains buttons to manipulate the Points list.

  • Sort position: Sorts all Points in ascending order by their Position.
  • -Position: Inverts the Position of every Point (MaxPosition - Position)
  • Subdivide: For each pair of adjacent Points, adds a new Point between the two with values half-interpolated. Good for making easing curves more detailed.

Easing functions

  • Target field: Determines whether the easing function buttons apply to the Points Positions or Values.
    • Position: Applies easing functions to the Position of each point according to its order in the list, with the Min position and Max position fields determining the lowest and highest values.
    • Value: Applies easing functions to the Value of each point according to its Position, using the first and last list items as the curve start and end. This will overwrite all the values inbetween!

The rest of the buttons will apply the corresponding easing function to all the Points Positions or Values, depending on your selection above.

When working with color or colorX, there is a mod configuration option to interpolate the colors by their HSV values instead of RGB, though it is disabled by default.

Additional notes

  • Back, Elastic, Bounce, and Spring easing presets are only available when Target field is set to Value.
  • Back, Elastic, and Spring easing presets should ideally be used with the unclamped interpolation calculations setting enabled, which is true by default.
  • When animating the ValueGradientDriver, you probably want to use ConstantLerpValue instead of SmoothValue; Otherwise the target value will be double-smoothed.
  • Thank you cjddmut for the EasingFunctions.cs code!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages