mirror of
https://github.com/hydra-synth/hydra.git
synced 2025-12-13 18:30:00 +01:00
add small descriptions, default values and missing args/funcs
This commit is contained in:
165
docs/funcs.md
165
docs/funcs.md
@@ -2,30 +2,35 @@
|
|||||||
|
|
||||||
## Color
|
## Color
|
||||||
|
|
||||||
### .contrast()
|
### .contrast(`amount`)
|
||||||
|
* amount :: float (default 1.6)
|
||||||
|
|
||||||
No Args
|
Larger `amount` value makes higher contrast.
|
||||||
|
|
||||||
### .color( `r`, `g`, `b` )
|
### .color( `r`, `g`, `b` )
|
||||||
* r :: float
|
* r :: float
|
||||||
* g :: float
|
* g :: float
|
||||||
* b :: float
|
* b :: float
|
||||||
|
|
||||||
### .colorama()
|
Colorize texture.
|
||||||
|
|
||||||
No Args
|
### .colorama(`amount`)
|
||||||
|
* amount :: float (default 0.005)
|
||||||
|
|
||||||
### .invert()
|
Shift HSV values.
|
||||||
|
|
||||||
No Args
|
### .invert(`amount`)
|
||||||
|
* amount :: float (default 1.0)
|
||||||
|
|
||||||
|
Invert color.
|
||||||
|
|
||||||
### .luma( `threshold`, `tolerance` )
|
### .luma( `threshold`, `tolerance` )
|
||||||
* threshold :: float
|
* threshold :: float (default 0.5)
|
||||||
* tolerance :: float
|
* tolerance :: float (default 0.1)
|
||||||
|
|
||||||
### .thresh( `threshold`, `tolerance` )
|
### .thresh( `threshold`, `tolerance` )
|
||||||
* threshold :: float
|
* threshold :: float (default 0.5)
|
||||||
* tolerance :: float
|
* tolerance :: float (default 0.04)
|
||||||
|
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
@@ -36,32 +41,39 @@ No Args
|
|||||||
* color :: vec4
|
* color :: vec4
|
||||||
* src
|
* src
|
||||||
* shape
|
* shape
|
||||||
* amount :: float
|
* amount :: float (default 0.5)
|
||||||
|
|
||||||
|
Add textures.
|
||||||
|
|
||||||
### .blend( `texture`, `amount` )
|
### .blend( `texture`, `amount` )
|
||||||
* texture
|
* texture
|
||||||
* color :: vec4
|
* color :: vec4
|
||||||
* src
|
* src
|
||||||
* shape
|
* shape
|
||||||
* amount :: float
|
* amount :: float (default 0.5)
|
||||||
|
|
||||||
### .diff( `texture`, `amount` )
|
Blend textures.
|
||||||
|
|
||||||
|
### .diff( `texture` )
|
||||||
* texture
|
* texture
|
||||||
* color :: vec4
|
* color :: vec4
|
||||||
* src
|
* src
|
||||||
* shape
|
* shape
|
||||||
* amount :: float
|
|
||||||
|
Return difference of textures.
|
||||||
|
|
||||||
### .layer()
|
### .layer()
|
||||||
|
|
||||||
No Args
|
Overlay texture based on alpha value.
|
||||||
|
|
||||||
### .mult( `texture`, `amount` )
|
### .mult( `texture`, `amount` )
|
||||||
* texture
|
* texture
|
||||||
* color :: vec4
|
* color :: vec4
|
||||||
* src
|
* src
|
||||||
* shape
|
* shape
|
||||||
* amount :: float
|
* amount :: float (default 1.0)
|
||||||
|
|
||||||
|
Multiply images and blend with the texture by `amount`.
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
@@ -72,68 +84,133 @@ No Args
|
|||||||
* color :: vec4
|
* color :: vec4
|
||||||
* src
|
* src
|
||||||
* shape
|
* shape
|
||||||
* amount :: float
|
* amount :: float (default 0.1)
|
||||||
|
|
||||||
|
Modulate texture. More about modulation at: <https://lumen-app.com/guide/modulation/>
|
||||||
|
|
||||||
### .modulateHue( `color`, `amount` )
|
### .modulateHue( `color`, `amount` )
|
||||||
* color :: vec4
|
* texture
|
||||||
* amount :: float
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* amount :: float (default 1.0)
|
||||||
|
|
||||||
|
Changes coordinates based on hue of second input. Based on: <https://www.shadertoy.com/view/XtcSWM>
|
||||||
|
|
||||||
|
### .modulateKaleid( `nSides` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* nSides :: float (default 4.0)
|
||||||
|
|
||||||
|
### .modulatePixelate( `multiple`, `offset` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* multiple :: float (default 10.0)
|
||||||
|
* offset :: float (default 3.0)
|
||||||
|
|
||||||
|
### .modulateRotate( `multiple`, `offset` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* multiple :: float (default 1.0)
|
||||||
|
* offset :: float (default 0.0)
|
||||||
|
|
||||||
|
### .modulateScale( `multiple`, `offset` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* multiple :: float (default 1.0)
|
||||||
|
* offset :: float (default 1.0)
|
||||||
|
|
||||||
|
### .modulateScrollX( `multiple`, `scrollX`, `speed` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* scrollX :: float (default 0.5)
|
||||||
|
* speed :: float (default 0.0)
|
||||||
|
|
||||||
|
### .modulateScrollY( `multiple`, `scrollY`, `speed` )
|
||||||
|
* texture
|
||||||
|
* color :: vec4
|
||||||
|
* src
|
||||||
|
* shape
|
||||||
|
* scrollY :: float (default 0.5)
|
||||||
|
* speed :: float (default 0.0)
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
## Coord
|
## Coord
|
||||||
|
|
||||||
### .kaleid()
|
### .kaleid( `nSides`)
|
||||||
|
* nSides :: float (default 4.0)
|
||||||
|
|
||||||
No Args
|
Kaleidoscope effect with `nSides` repetition.
|
||||||
|
|
||||||
### .rotate( `angle`, `speed` )
|
### .rotate( `angle`, `speed` )
|
||||||
* angle :: float
|
* angle :: float (default 10.0)
|
||||||
* speed :: float
|
* speed :: float (default 0.0)
|
||||||
|
|
||||||
### .scale( `size` )
|
Rotate texture.
|
||||||
|
|
||||||
|
### .scale( `size`, `xMult`, `yMult` )
|
||||||
* size :: float
|
* size :: float
|
||||||
|
* xMult :: float (default 1.0)
|
||||||
|
* yMult :: float (default 1.0)
|
||||||
|
|
||||||
|
Scale texture.
|
||||||
|
|
||||||
### .pixelate( `x`, `y` )
|
### .pixelate( `x`, `y` )
|
||||||
* pixelX :: float
|
* pixelX :: float (default 20.0)
|
||||||
* pixelY :: float
|
* pixelY :: float (default 20.0)
|
||||||
|
|
||||||
### scrollX.( `scrollX`, `speed` )
|
Pixelate texture with `pixelX` segments and `pixelY` segments.
|
||||||
* scrollX :: float
|
|
||||||
* speed :: float
|
### .scrollX( `scrollX`, `speed` )
|
||||||
|
* scrollX :: float (default 0.5)
|
||||||
|
* speed :: float (default 0.0)
|
||||||
|
|
||||||
### .scrollY( `scrollY`, `speed` )
|
### .scrollY( `scrollY`, `speed` )
|
||||||
* scrollY :: float
|
* scrollY :: float (default 0.5)
|
||||||
* speed :: float
|
* speed :: float (default 0.0)
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
## Src
|
## Src
|
||||||
|
|
||||||
### osc( `frequency`, `sync`, `offset` )
|
### osc( `frequency`, `sync`, `offset` )
|
||||||
* frequency :: float
|
* frequency :: float (default 60.0)
|
||||||
* sync :: float
|
* sync :: float (default 0.1)
|
||||||
* offset :: float
|
* offset :: float (default 0.0)
|
||||||
|
|
||||||
### render( `output buffer`)
|
### render( `output buffer`)
|
||||||
* default: `o0`
|
* default: `o0`
|
||||||
|
|
||||||
### shape( `sides`, `scale`, `blur`)
|
### shape( `sides`, `radius`, `smoothing`)
|
||||||
* sides :: int
|
* sides :: int (default 3.0)
|
||||||
* scale :: float
|
* radius :: float (default 60.0)
|
||||||
* blur :: float
|
* smoothing :: float (default 0.01)
|
||||||
|
|
||||||
### solid( `r`, `g`, `b`, `a`)
|
### solid( `r`, `g`, `b`, `a`)
|
||||||
* r :: float
|
* r :: float (default 0.0)
|
||||||
* g :: float
|
* g :: float (default 0.0)
|
||||||
* b :: float
|
* b :: float (default 0.0)
|
||||||
* a :: float
|
* a :: float (default 1.0)
|
||||||
|
|
||||||
### src( `input` )
|
### src( `input` )
|
||||||
* input :: examples: `o0`, `s1`
|
* input :: examples: `o0`, `s1`
|
||||||
|
|
||||||
### .noise()
|
### .noise( `scale`, `offset` )
|
||||||
|
* scale :: int (default 10.0)
|
||||||
|
* offset :: float (default 0.1)
|
||||||
|
|
||||||
No Args
|
Generate Perlin noise.
|
||||||
|
|
||||||
### .out( `output buffer` )
|
### .out( `output buffer` )
|
||||||
* output buffer
|
* output buffer
|
||||||
|
|||||||
Reference in New Issue
Block a user