Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/5argon/GradientGenerator
A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve`.
https://github.com/5argon/GradientGenerator
Last synced: 4 months ago
JSON representation
A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve`.
- Host: GitHub
- URL: https://github.com/5argon/GradientGenerator
- Owner: 5argon
- License: mit
- Created: 2019-04-30T23:43:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-30T23:51:19.000Z (about 5 years ago)
- Last Synced: 2024-02-17T02:34:16.978Z (4 months ago)
- Language: C#
- Size: 373 KB
- Stars: 34
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-unity3d - GradientGenerator - A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve`. (Open Source Repositories / Utilities)
- awesome-opensource-unity - GradientGenerator - A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve`. (Open Source Packages / Utilities)
- awesome - 5argon/GradientGenerator - A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve`. (C\#)
README
# Gradient Generator
![how2](.howto/2.png)
A Unity script to generate multiple variants of evenly distributed `Gradient` based on input `AnimationCurve` of HSV and alpha. Skew the distribution with `timeRemap` `AnimationCurve`.
The generated gradients can be copied by the right click menu, then you could fine tune the color. You can keep the generated gradient in the generator since it is a `ScriptableObject` file.
## How to use
- Click on the `GradientGenerator` scriptable object file. If you lose it, uncomment `[CreateAssetMenu]`, then right click create a new one.
- Provide `AnimationCurve` in the `gradientSpecs`. All curve values has to be in 0 to 1 range. To get a simple rainbow, use 0 to 1 "/" curve preset for Hue and `timeRemap`, then use a constant graph for S and V.
- Right click the header and select `Generate` context menu.![how1](.howto/1.png)
`generatedGradients` will be replaced with a new set. Each spec generates 7 `Blend` and 7 `Fixed` type of gradients.
![how2](.howto/2.png)
An example when using the `timeRemap` curve, the distribution could be skewed.
![how3](.howto/3.png)