Skip to content

Commit

Permalink
Rename gradientX to gradient2. Document
Browse files Browse the repository at this point in the history
  • Loading branch information
jqueraltmo committed Jun 21, 2023
1 parent ad56397 commit 2dcdfbe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,29 @@ await loadScript("https://hydrated.savamala.top/hydra-gradient.js")

## hydra-gradient

At this moment there is only one funcion, `gradientX`, which allows to create gradients between two colors:
These are functions to make gradients with the specified colors.

`gradientX(r0=1,g0=0,b0=,r1=0,g1=0,b1=1,speed=0)`
Use `gradient2` to create a gradient between two colors:

`gradient2(r0=1,g0=0,b0=,r1=0,g1=0,b1=1,speed=0)`

Examples:

`gradientX(1,0,0,0.8,0,0.8,0).out()` creates a gradient from red to purple.
`gradient2(1,0,0,0.8,0,0.8,0).out()` creates a gradient from red to purple.

`gradient2(1,0,0,0.8,0,0.8,2).out()` the same gradient, but now animated.

`gradient2(1,0,0,1,0,1,2).scale(0.4).kaleid(100).out()`.

Use `gradient3` to create a gradient involving three colors:

`gradient3(r0=1,g0=0,b0=,r1=0,g1=0,b1=1,r2=0,g2=1,b2=0,speed=0)`

Examples:

`gradientX(1,0,0,0.8,0,0.8,2).out()` the same gradient, but now animated.
`gradient3(1,0,1,0,1,0,0,0,1,0).out()`

`gradientX(1,0,0,1,0,1,2).scale(0.4).kaleid(100).out()`.
`gradient3(0.8,0,1,0.7,0.7,0,1,0,0,0.2).scale(0.2).out()`

---
`gradient3(0.8,0,1,0.7,0.7,0,1,0,0,0.2).scale(0.2)
.blend(gradient2(0,0.6,0,0.7,0,0.3,-0.4)).out()`
2 changes: 1 addition & 1 deletion hydra-gradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

[
{
name: "gradientX",
name: "gradient2",
type: "src",
inputs: [
{
Expand Down

0 comments on commit 2dcdfbe

Please sign in to comment.