@paper-design/shaders 0.0.31 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +23 -25
- package/dist/shaders/dithering.d.ts +8 -8
- package/dist/shaders/dot-grid.d.ts +1 -1
- package/dist/shaders/dot-orbit.d.ts +3 -6
- package/dist/shaders/god-rays.d.ts +6 -9
- package/dist/shaders/grain-gradient.d.ts +3 -5
- package/dist/shaders/liquid-metal.d.ts +12 -27
- package/dist/shaders/mesh-gradient.d.ts +3 -3
- package/dist/shaders/metaballs.d.ts +3 -6
- package/dist/shaders/neuro-noise.d.ts +6 -12
- package/dist/shaders/perlin-noise.d.ts +10 -10
- package/dist/shaders/pulsing-border.d.ts +3 -3
- package/dist/shaders/simplex-noise.d.ts +3 -3
- package/dist/shaders/smoke-ring.d.ts +3 -3
- package/dist/shaders/spiral.d.ts +8 -8
- package/dist/shaders/swirl.d.ts +3 -5
- package/dist/shaders/voronoi.d.ts +8 -8
- package/dist/shaders/warp.d.ts +3 -3
- package/dist/shaders/waves.d.ts +7 -7
- package/package.json +2 -2
- package/dist/get-shader-color-from-string.js +0 -93
- package/dist/get-shader-color-from-string.js.map +0 -7
- package/dist/get-shader-noise-texture.js +0 -23
- package/dist/get-shader-noise-texture.js.map +0 -7
- package/dist/index.js +0 -118
- package/dist/index.js.map +0 -7
- package/dist/shader-color-spaces.js +0 -96
- package/dist/shader-color-spaces.js.map +0 -7
- package/dist/shader-mount.js +0 -582
- package/dist/shader-mount.js.map +0 -7
- package/dist/shader-sizing.js +0 -193
- package/dist/shader-sizing.js.map +0 -7
- package/dist/shader-utils.js +0 -59
- package/dist/shader-utils.js.map +0 -7
- package/dist/shaders/color-panels.d.ts +0 -48
- package/dist/shaders/color-panels.js +0 -213
- package/dist/shaders/color-panels.js.map +0 -7
- package/dist/shaders/dithering.js +0 -221
- package/dist/shaders/dithering.js.map +0 -7
- package/dist/shaders/dot-grid.js +0 -107
- package/dist/shaders/dot-grid.js.map +0 -7
- package/dist/shaders/dot-orbit.js +0 -124
- package/dist/shaders/dot-orbit.js.map +0 -7
- package/dist/shaders/god-rays.js +0 -133
- package/dist/shaders/god-rays.js.map +0 -7
- package/dist/shaders/grain-gradient.js +0 -243
- package/dist/shaders/grain-gradient.js.map +0 -7
- package/dist/shaders/liquid-metal.js +0 -221
- package/dist/shaders/liquid-metal.js.map +0 -7
- package/dist/shaders/mesh-gradient.js +0 -97
- package/dist/shaders/mesh-gradient.js.map +0 -7
- package/dist/shaders/metaballs.js +0 -110
- package/dist/shaders/metaballs.js.map +0 -7
- package/dist/shaders/neuro-noise.js +0 -81
- package/dist/shaders/neuro-noise.js.map +0 -7
- package/dist/shaders/perlin-noise.js +0 -201
- package/dist/shaders/perlin-noise.js.map +0 -7
- package/dist/shaders/pulsing-border.js +0 -218
- package/dist/shaders/pulsing-border.js.map +0 -7
- package/dist/shaders/simplex-noise.js +0 -103
- package/dist/shaders/simplex-noise.js.map +0 -7
- package/dist/shaders/smoke-ring.js +0 -141
- package/dist/shaders/smoke-ring.js.map +0 -7
- package/dist/shaders/spiral.js +0 -83
- package/dist/shaders/spiral.js.map +0 -7
- package/dist/shaders/swirl.js +0 -91
- package/dist/shaders/swirl.js.map +0 -7
- package/dist/shaders/voronoi.js +0 -143
- package/dist/shaders/voronoi.js.map +0 -7
- package/dist/shaders/warp.js +0 -128
- package/dist/shaders/warp.js.map +0 -7
- package/dist/shaders/waves.js +0 -68
- package/dist/shaders/waves.js.map +0 -7
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,43 @@
|
|
|
1
1
|
/** The core Shader Mount class. Pass it a parent element and a fragment shader to get started. */
|
|
2
|
-
export { ShaderMount, isPaperShaderElement } from './shader-mount
|
|
3
|
-
export type { PaperShaderElement, ShaderMotionParams, ShaderMountUniforms, ShaderPreset } from './shader-mount
|
|
2
|
+
export { ShaderMount, isPaperShaderElement } from './shader-mount';
|
|
3
|
+
export type { PaperShaderElement, ShaderMotionParams, ShaderMountUniforms, ShaderPreset } from './shader-mount';
|
|
4
4
|
/** Shader sizing options and uniforms */
|
|
5
|
-
export { defaultObjectSizing, defaultPatternSizing, ShaderFitOptions, type ShaderFit, type ShaderSizingParams, type ShaderSizingUniforms, } from './shader-sizing
|
|
5
|
+
export { defaultObjectSizing, defaultPatternSizing, ShaderFitOptions, type ShaderFit, type ShaderSizingParams, type ShaderSizingUniforms, } from './shader-sizing';
|
|
6
6
|
/** A shader that renders a mesh gradient with a rotating noise pattern and several layers of fractal noise */
|
|
7
|
-
export { meshGradientFragmentShader, meshGradientMeta, type MeshGradientParams, type MeshGradientUniforms, } from './shaders/mesh-gradient
|
|
7
|
+
export { meshGradientFragmentShader, meshGradientMeta, type MeshGradientParams, type MeshGradientUniforms, } from './shaders/mesh-gradient';
|
|
8
8
|
/** Fractional Brownian motion (fBm) noise over the polar coordinates, masked with ring shape */
|
|
9
|
-
export { smokeRingMeta, smokeRingFragmentShader, type SmokeRingParams, type SmokeRingUniforms, } from './shaders/smoke-ring
|
|
9
|
+
export { smokeRingMeta, smokeRingFragmentShader, type SmokeRingParams, type SmokeRingUniforms, } from './shaders/smoke-ring';
|
|
10
10
|
/** A shader rendering a fractal-like structure made of several layers of since-arches */
|
|
11
|
-
export { neuroNoiseFragmentShader, type NeuroNoiseParams, type NeuroNoiseUniforms } from './shaders/neuro-noise
|
|
11
|
+
export { neuroNoiseFragmentShader, type NeuroNoiseParams, type NeuroNoiseUniforms } from './shaders/neuro-noise';
|
|
12
12
|
/** A shader rendering an animated dot pattern based on Voronoi diagram */
|
|
13
|
-
export { dotOrbitMeta, dotOrbitFragmentShader, type DotOrbitParams, type DotOrbitUniforms
|
|
13
|
+
export { dotOrbitMeta, dotOrbitFragmentShader, type DotOrbitParams, type DotOrbitUniforms } from './shaders/dot-orbit';
|
|
14
14
|
/** A shader rendering a static dot pattern */
|
|
15
|
-
export { dotGridFragmentShader, DotGridShapes, type DotGridShape, type DotGridParams, type DotGridUniforms, } from './shaders/dot-grid
|
|
15
|
+
export { dotGridFragmentShader, DotGridShapes, type DotGridShape, type DotGridParams, type DotGridUniforms, } from './shaders/dot-grid';
|
|
16
16
|
/** A shader that calculates a combination of 2 simplex noises with result rendered as a gradient */
|
|
17
|
-
export { simplexNoiseMeta, simplexNoiseFragmentShader, type SimplexNoiseParams, type SimplexNoiseUniforms, } from './shaders/simplex-noise
|
|
17
|
+
export { simplexNoiseMeta, simplexNoiseFragmentShader, type SimplexNoiseParams, type SimplexNoiseUniforms, } from './shaders/simplex-noise';
|
|
18
18
|
/** A number of circlular shapes blened in a gooey way */
|
|
19
|
-
export { metaballsMeta, metaballsFragmentShader, type MetaballsParams, type MetaballsUniforms, } from './shaders/metaballs
|
|
19
|
+
export { metaballsMeta, metaballsFragmentShader, type MetaballsParams, type MetaballsUniforms, } from './shaders/metaballs';
|
|
20
20
|
/** 2d noise with max number of parameters to be exposed to users */
|
|
21
|
-
export { perlinNoiseFragmentShader, type PerlinNoiseParams, type PerlinNoiseUniforms } from './shaders/perlin-noise
|
|
21
|
+
export { perlinNoiseFragmentShader, type PerlinNoiseParams, type PerlinNoiseUniforms } from './shaders/perlin-noise';
|
|
22
22
|
/** Voronoi diagram: classic + rounded edges */
|
|
23
|
-
export { voronoiMeta, voronoiFragmentShader, type VoronoiParams, type VoronoiUniforms } from './shaders/voronoi
|
|
23
|
+
export { voronoiMeta, voronoiFragmentShader, type VoronoiParams, type VoronoiUniforms } from './shaders/voronoi';
|
|
24
24
|
/** Waves pattern */
|
|
25
|
-
export { wavesFragmentShader, type WavesParams, type WavesUniforms } from './shaders/waves
|
|
25
|
+
export { wavesFragmentShader, type WavesParams, type WavesUniforms } from './shaders/waves';
|
|
26
26
|
/** Warp: distortion + swirl + underlying shapes */
|
|
27
|
-
export { warpMeta, warpFragmentShader, WarpPatterns, type WarpParams, type WarpUniforms, type WarpPattern, } from './shaders/warp
|
|
27
|
+
export { warpMeta, warpFragmentShader, WarpPatterns, type WarpParams, type WarpUniforms, type WarpPattern, } from './shaders/warp';
|
|
28
28
|
/** Radial shape made of randomized stripes */
|
|
29
|
-
export { godRaysMeta, godRaysFragmentShader, type GodRaysParams, type GodRaysUniforms } from './shaders/god-rays
|
|
29
|
+
export { godRaysMeta, godRaysFragmentShader, type GodRaysParams, type GodRaysUniforms } from './shaders/god-rays';
|
|
30
30
|
/** Single-color spiral shape */
|
|
31
|
-
export { spiralFragmentShader, type SpiralParams, type SpiralUniforms } from './shaders/spiral
|
|
31
|
+
export { spiralFragmentShader, type SpiralParams, type SpiralUniforms } from './shaders/spiral';
|
|
32
32
|
/** Multi-color radial swirl */
|
|
33
|
-
export { swirlMeta, swirlFragmentShader, type SwirlParams, type SwirlUniforms } from './shaders/swirl
|
|
33
|
+
export { swirlMeta, swirlFragmentShader, type SwirlParams, type SwirlUniforms } from './shaders/swirl';
|
|
34
34
|
/** Dithering effect applied over abstract shapes */
|
|
35
|
-
export { ditheringFragmentShader, DitheringShapes, DitheringTypes, type DitheringParams, type DitheringUniforms, type DitheringShape, type DitheringType, } from './shaders/dithering
|
|
35
|
+
export { ditheringFragmentShader, DitheringShapes, DitheringTypes, type DitheringParams, type DitheringUniforms, type DitheringShape, type DitheringType, } from './shaders/dithering';
|
|
36
36
|
/** N-color gradient applied to the abstract shapes w/ grainy overlay & distortion */
|
|
37
|
-
export { grainGradientFragmentShader, grainGradientMeta, GrainGradientShapes, type GrainGradientParams, type GrainGradientUniforms, type GrainGradientShape, } from './shaders/grain-gradient
|
|
37
|
+
export { grainGradientFragmentShader, grainGradientMeta, GrainGradientShapes, type GrainGradientParams, type GrainGradientUniforms, type GrainGradientShape, } from './shaders/grain-gradient';
|
|
38
38
|
/** Liquid metal effect applied to the abstract shapes */
|
|
39
|
-
export { liquidMetalFragmentShader,
|
|
39
|
+
export { liquidMetalFragmentShader, type LiquidMetalParams, type LiquidMetalUniforms } from './shaders/liquid-metal';
|
|
40
40
|
/** Border with configurable size & radius ade of rotating pulsing light spots */
|
|
41
|
-
export { pulsingBorderMeta, pulsingBorderFragmentShader, type PulsingBorderParams, type PulsingBorderUniforms, } from './shaders/pulsing-border
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
export { getShaderColorFromString } from './get-shader-color-from-string.js';
|
|
45
|
-
export { getShaderNoiseTexture } from './get-shader-noise-texture.js';
|
|
41
|
+
export { pulsingBorderMeta, pulsingBorderFragmentShader, type PulsingBorderParams, type PulsingBorderUniforms, } from './shaders/pulsing-border';
|
|
42
|
+
export { getShaderColorFromString } from './get-shader-color-from-string';
|
|
43
|
+
export { getShaderNoiseTexture } from './get-shader-noise-texture';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
2
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
2
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
3
3
|
/**
|
|
4
4
|
* Dithering Fragment Shader by Ksenia Kondrashova
|
|
5
5
|
* Applies dithering (4 dithering types available) over the
|
|
6
6
|
* abstract shapes animation (7 animated shapes available)
|
|
7
7
|
*
|
|
8
8
|
* Uniforms include:
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
9
|
+
* - u_color1: background color, RGBA
|
|
10
|
+
* - u_color2: pixels color, RGBA
|
|
11
11
|
*
|
|
12
12
|
* - u_shape (float, used as int, 1 to 7):
|
|
13
13
|
* --- shape = 1: Simplex noise pattern
|
|
@@ -29,15 +29,15 @@ import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-si
|
|
|
29
29
|
*/
|
|
30
30
|
export declare const ditheringFragmentShader: string;
|
|
31
31
|
export interface DitheringUniforms extends ShaderSizingUniforms {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
u_color1: [number, number, number, number];
|
|
33
|
+
u_color2: [number, number, number, number];
|
|
34
34
|
u_shape: (typeof DitheringShapes)[DitheringShape];
|
|
35
35
|
u_type: (typeof DitheringTypes)[DitheringType];
|
|
36
36
|
u_pxSize: number;
|
|
37
37
|
}
|
|
38
38
|
export interface DitheringParams extends ShaderSizingParams, ShaderMotionParams {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
color1?: string;
|
|
40
|
+
color2?: string;
|
|
41
41
|
shape?: DitheringShape;
|
|
42
42
|
type?: DitheringType;
|
|
43
43
|
pxSize?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const dotOrbitMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
};
|
|
@@ -10,7 +10,6 @@ export declare const dotOrbitMeta: {
|
|
|
10
10
|
* Renders a dot pattern with dot placed in the center of each cell of animated Voronoi diagram
|
|
11
11
|
*
|
|
12
12
|
* Uniforms include:
|
|
13
|
-
* - u_colorBack (vec4): the background color of the scene
|
|
14
13
|
* - u_colors (vec4[]): Input RGBA colors
|
|
15
14
|
* - u_colorsCount (float): Number of active colors (`u_colors` length)
|
|
16
15
|
* - u_stepsPerColor (float): Discretization of the color transition
|
|
@@ -20,7 +19,6 @@ export declare const dotOrbitMeta: {
|
|
|
20
19
|
*/
|
|
21
20
|
export declare const dotOrbitFragmentShader: string;
|
|
22
21
|
export interface DotOrbitUniforms extends ShaderSizingUniforms {
|
|
23
|
-
u_colorBack: [number, number, number, number];
|
|
24
22
|
u_colors: vec4[];
|
|
25
23
|
u_colorsCount: number;
|
|
26
24
|
u_size: number;
|
|
@@ -29,7 +27,6 @@ export interface DotOrbitUniforms extends ShaderSizingUniforms {
|
|
|
29
27
|
u_stepsPerColor: number;
|
|
30
28
|
}
|
|
31
29
|
export interface DotOrbitParams extends ShaderSizingParams, ShaderMotionParams {
|
|
32
|
-
colorBack?: string;
|
|
33
30
|
colors?: string[];
|
|
34
31
|
size?: number;
|
|
35
32
|
sizeRange?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const godRaysMeta: {
|
|
5
5
|
readonly maxColorCount: 5;
|
|
6
6
|
};
|
|
@@ -12,19 +12,17 @@ export declare const godRaysMeta: {
|
|
|
12
12
|
* Uniforms include:
|
|
13
13
|
*
|
|
14
14
|
* - u_colorBack: background RGBA color
|
|
15
|
-
* - u_colorBloom:
|
|
16
15
|
* - uColors (vec4[]): Input RGBA colors
|
|
17
16
|
* - u_frequency: the frequency of rays (the number of sectors)
|
|
18
17
|
* - u_spotty: the density of spots in the rings (higher = more spots)
|
|
19
18
|
* - u_midSize: the size of the central shape within the rings
|
|
20
19
|
* - u_midIntensity: the influence of the central shape on the rings
|
|
21
20
|
* - u_density (0 .. 1): the number of visible rays
|
|
22
|
-
* -
|
|
21
|
+
* - u_blending (0 .. 1): normal / additive blending
|
|
23
22
|
*/
|
|
24
23
|
export declare const godRaysFragmentShader: string;
|
|
25
24
|
export interface GodRaysUniforms extends ShaderSizingUniforms {
|
|
26
25
|
u_colorBack: [number, number, number, number];
|
|
27
|
-
u_colorBloom: [number, number, number, number];
|
|
28
26
|
u_colors: vec4[];
|
|
29
27
|
u_colorsCount: number;
|
|
30
28
|
u_spotty: number;
|
|
@@ -32,16 +30,15 @@ export interface GodRaysUniforms extends ShaderSizingUniforms {
|
|
|
32
30
|
u_midIntensity: number;
|
|
33
31
|
u_frequency: number;
|
|
34
32
|
u_density: number;
|
|
35
|
-
|
|
33
|
+
u_blending: number;
|
|
36
34
|
}
|
|
37
35
|
export interface GodRaysParams extends ShaderSizingParams, ShaderMotionParams {
|
|
38
36
|
colorBack?: string;
|
|
39
|
-
colorBloom?: string;
|
|
40
37
|
colors?: string[];
|
|
41
38
|
spotty?: number;
|
|
42
39
|
midSize?: number;
|
|
43
40
|
midIntensity?: number;
|
|
44
41
|
frequency?: number;
|
|
45
42
|
density?: number;
|
|
46
|
-
|
|
43
|
+
blending?: number;
|
|
47
44
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const grainGradientMeta: {
|
|
5
5
|
readonly maxColorCount: 7;
|
|
6
6
|
};
|
|
@@ -9,7 +9,6 @@ export declare const grainGradientMeta: {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const grainGradientFragmentShader: string;
|
|
11
11
|
export interface GrainGradientUniforms extends ShaderSizingUniforms {
|
|
12
|
-
u_colorBack: [number, number, number, number];
|
|
13
12
|
u_colors: vec4[];
|
|
14
13
|
u_colorsCount: number;
|
|
15
14
|
u_softness: number;
|
|
@@ -18,7 +17,6 @@ export interface GrainGradientUniforms extends ShaderSizingUniforms {
|
|
|
18
17
|
u_shape: (typeof GrainGradientShapes)[GrainGradientShape];
|
|
19
18
|
}
|
|
20
19
|
export interface GrainGradientParams extends ShaderSizingParams, ShaderMotionParams {
|
|
21
|
-
colorBack?: string;
|
|
22
20
|
colors?: string[];
|
|
23
21
|
softness?: number;
|
|
24
22
|
intensity?: number;
|
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
2
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
2
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
3
3
|
/**
|
|
4
4
|
*/
|
|
5
5
|
export declare const liquidMetalFragmentShader: string;
|
|
6
6
|
export interface LiquidMetalUniforms extends ShaderSizingUniforms {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
u_shiftBlue: number;
|
|
13
|
-
u_distortion: number;
|
|
14
|
-
u_contour: number;
|
|
15
|
-
u_shape: (typeof LiquidMetalShapes)[LiquidMetalShape];
|
|
7
|
+
u_patternBlur: number;
|
|
8
|
+
u_patternScale: number;
|
|
9
|
+
u_dispersion: number;
|
|
10
|
+
u_liquid: number;
|
|
11
|
+
u_shape: number;
|
|
16
12
|
}
|
|
17
13
|
export interface LiquidMetalParams extends ShaderSizingParams, ShaderMotionParams {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
shiftBlue?: number;
|
|
24
|
-
distortion?: number;
|
|
25
|
-
contour?: number;
|
|
26
|
-
shape?: LiquidMetalShape;
|
|
14
|
+
patternBlur?: number;
|
|
15
|
+
patternScale?: number;
|
|
16
|
+
dispersion?: number;
|
|
17
|
+
liquid?: number;
|
|
18
|
+
shape?: number;
|
|
27
19
|
}
|
|
28
|
-
export declare const LiquidMetalShapes: {
|
|
29
|
-
readonly none: 0;
|
|
30
|
-
readonly circle: 1;
|
|
31
|
-
readonly daisy: 2;
|
|
32
|
-
readonly metaballs: 3;
|
|
33
|
-
};
|
|
34
|
-
export type LiquidMetalShape = keyof typeof LiquidMetalShapes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const meshGradientMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const metaballsMeta: {
|
|
5
5
|
readonly maxColorCount: 8;
|
|
6
6
|
readonly maxBallsCount: 20;
|
|
@@ -10,7 +10,6 @@ export declare const metaballsMeta: {
|
|
|
10
10
|
* The artwork by Ksenia Kondrashova
|
|
11
11
|
*
|
|
12
12
|
* Uniforms include:
|
|
13
|
-
* - u_colorBack: the background color of the scene
|
|
14
13
|
* - uColors (vec4[]): Input RGBA colors
|
|
15
14
|
* - uColorsCount (float): Number of active colors (`uColors` length)
|
|
16
15
|
* - u_count (float)
|
|
@@ -18,14 +17,12 @@ export declare const metaballsMeta: {
|
|
|
18
17
|
*/
|
|
19
18
|
export declare const metaballsFragmentShader: string;
|
|
20
19
|
export interface MetaballsUniforms extends ShaderSizingUniforms {
|
|
21
|
-
u_colorBack: [number, number, number, number];
|
|
22
20
|
u_colors: vec4[];
|
|
23
21
|
u_colorsCount: number;
|
|
24
22
|
u_count: number;
|
|
25
23
|
u_size: number;
|
|
26
24
|
}
|
|
27
25
|
export interface MetaballsParams extends ShaderSizingParams, ShaderMotionParams {
|
|
28
|
-
colorBack?: string;
|
|
29
26
|
colors?: string[];
|
|
30
27
|
count?: number;
|
|
31
28
|
size?: number;
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
2
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
2
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
3
3
|
/**
|
|
4
4
|
* Neuro Noise Pattern
|
|
5
|
-
*
|
|
5
|
+
* The original artwork: https://codepen.io/ksenia-k/full/vYwgrWv by Ksenia Kondrashova
|
|
6
6
|
* Renders a fractal-like structure made of several layers of since-arches
|
|
7
7
|
*
|
|
8
8
|
* Uniforms include:
|
|
9
|
-
* u_colorFront - the
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* u_brightness - increase/decrease the weight of strong lines
|
|
13
|
-
* u_contrast - show/hide the weak pattern lines
|
|
9
|
+
* u_colorFront - the front color of pattern
|
|
10
|
+
* u_colorBack - the back color of pattern
|
|
11
|
+
* u_brightness - the power (brightness) of pattern lines
|
|
14
12
|
*/
|
|
15
13
|
export declare const neuroNoiseFragmentShader: string;
|
|
16
14
|
export interface NeuroNoiseUniforms extends ShaderSizingUniforms {
|
|
17
15
|
u_colorFront: [number, number, number, number];
|
|
18
|
-
u_colorMid: [number, number, number, number];
|
|
19
16
|
u_colorBack: [number, number, number, number];
|
|
20
17
|
u_brightness: number;
|
|
21
|
-
u_contrast: number;
|
|
22
18
|
}
|
|
23
19
|
export interface NeuroNoiseParams extends ShaderSizingParams, ShaderMotionParams {
|
|
24
20
|
colorFront?: string;
|
|
25
|
-
colorMid?: string;
|
|
26
21
|
colorBack?: string;
|
|
27
22
|
brightness?: number;
|
|
28
|
-
contrast?: number;
|
|
29
23
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
2
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
2
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
3
3
|
/**
|
|
4
4
|
* 3d Perlin noise with exposed parameters
|
|
5
5
|
* Based on https://www.shadertoy.com/view/NlSGDz
|
|
6
6
|
*
|
|
7
7
|
* Uniforms include:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* u_proportion (0 .. 1) - the proportion between
|
|
11
|
-
* u_softness - the sharpness of the transition between
|
|
8
|
+
* u_color1 - the first mixed color
|
|
9
|
+
* u_color2 - the second mixed color
|
|
10
|
+
* u_proportion (0 .. 1) - the proportion between u_color1 and u_color2;
|
|
11
|
+
* u_softness - the sharpness of the transition between u_color1 and u_color2 in the noise output
|
|
12
12
|
* u_octaveCount - the number of octaves for Perlin noise;
|
|
13
13
|
* higher values increase the complexity of the noise
|
|
14
14
|
* u_persistence (0 .. 1) - the amplitude of each successive octave of the noise;
|
|
@@ -18,8 +18,8 @@ import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-si
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const perlinNoiseFragmentShader: string;
|
|
20
20
|
export interface PerlinNoiseUniforms extends ShaderSizingUniforms {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
u_color1: [number, number, number, number];
|
|
22
|
+
u_color2: [number, number, number, number];
|
|
23
23
|
u_proportion: number;
|
|
24
24
|
u_softness: number;
|
|
25
25
|
u_octaveCount: number;
|
|
@@ -27,8 +27,8 @@ export interface PerlinNoiseUniforms extends ShaderSizingUniforms {
|
|
|
27
27
|
u_lacunarity: number;
|
|
28
28
|
}
|
|
29
29
|
export interface PerlinNoiseParams extends ShaderSizingParams, ShaderMotionParams {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
color1?: string;
|
|
31
|
+
color2?: string;
|
|
32
32
|
proportion?: number;
|
|
33
33
|
softness?: number;
|
|
34
34
|
octaveCount?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const pulsingBorderMeta: {
|
|
5
5
|
readonly maxColorCount: 5;
|
|
6
6
|
readonly maxSpotsPerColor: 5;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const simplexNoiseMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const smokeRingMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
readonly maxNoiseIterations: 8;
|
package/dist/shaders/spiral.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
2
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
2
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
3
3
|
/**
|
|
4
4
|
* Spiral shape by Ksenia Kondrashova
|
|
5
5
|
* Generates a dynamic spiral shape with configurable parameters
|
|
@@ -9,8 +9,8 @@ import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-si
|
|
|
9
9
|
* u_scale - controls the overall scale of the spiral (u_scale = 1 makes it fit the viewport height)
|
|
10
10
|
* u_offsetX - left / right pan
|
|
11
11
|
* u_offsetY - up / down pan
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* u_color1 - the first color used in the spiral (stroke)
|
|
13
|
+
* u_color2 - the second color used in the spiral (back)
|
|
14
14
|
* u_density (0 .. 1) - the spacing of the spiral arms
|
|
15
15
|
* u_distortion (0 .. 1) - adds a wavy distortion effect to the spiral arms
|
|
16
16
|
* u_strokeWidth (0 .. 1) - defines the thickness of the spiral lines.
|
|
@@ -22,8 +22,8 @@ import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-si
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const spiralFragmentShader: string;
|
|
24
24
|
export interface SpiralUniforms extends ShaderSizingUniforms {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
u_color1: [number, number, number, number];
|
|
26
|
+
u_color2: [number, number, number, number];
|
|
27
27
|
u_density: number;
|
|
28
28
|
u_distortion: number;
|
|
29
29
|
u_strokeWidth: number;
|
|
@@ -34,8 +34,8 @@ export interface SpiralUniforms extends ShaderSizingUniforms {
|
|
|
34
34
|
u_softness: number;
|
|
35
35
|
}
|
|
36
36
|
export interface SpiralParams extends ShaderSizingParams, ShaderMotionParams {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
color1?: string;
|
|
38
|
+
color2?: string;
|
|
39
39
|
density?: number;
|
|
40
40
|
distortion?: number;
|
|
41
41
|
strokeWidth?: number;
|
package/dist/shaders/swirl.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const swirlMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
};
|
|
@@ -8,7 +8,6 @@ export declare const swirlMeta: {
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const swirlFragmentShader: string;
|
|
10
10
|
export interface SwirlUniforms extends ShaderSizingUniforms {
|
|
11
|
-
u_colorBack: [number, number, number, number];
|
|
12
11
|
u_colors: vec4[];
|
|
13
12
|
u_colorsCount: number;
|
|
14
13
|
u_bandCount: number;
|
|
@@ -18,7 +17,6 @@ export interface SwirlUniforms extends ShaderSizingUniforms {
|
|
|
18
17
|
u_noisePower: number;
|
|
19
18
|
}
|
|
20
19
|
export interface SwirlParams extends ShaderSizingParams, ShaderMotionParams {
|
|
21
|
-
colorBack?: string;
|
|
22
20
|
colors?: string[];
|
|
23
21
|
bandCount?: number;
|
|
24
22
|
twist?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const voronoiMeta: {
|
|
5
5
|
readonly maxColorCount: 5;
|
|
6
6
|
};
|
|
@@ -17,7 +17,7 @@ export declare const voronoiMeta: {
|
|
|
17
17
|
* - `u_colorGlow` (`vec4`): RGBA color for the radial shape on the cell edges
|
|
18
18
|
* - `u_distortion` (`float`, 0 – 0.5): Controls how far cell centers can be displaced from the regular grid
|
|
19
19
|
* - `u_gap` (`float`): Width of the gaps between cells (gaps can't be removed completely due to artifacts of Voronoi cells)
|
|
20
|
-
* - `
|
|
20
|
+
* - `u_innerGlow` (`float`): Controls the size of the radial glow inside each cell
|
|
21
21
|
* - `u_stepsPerColor` (`float`): Discretization of the color transition
|
|
22
22
|
* - `u_noiseTexture` (`sampler2D`): Replacement of standard hash function, added for better performance
|
|
23
23
|
*/
|
|
@@ -26,19 +26,19 @@ export interface VoronoiUniforms extends ShaderSizingUniforms {
|
|
|
26
26
|
u_colors: vec4[];
|
|
27
27
|
u_colorsCount: number;
|
|
28
28
|
u_stepsPerColor: number;
|
|
29
|
-
|
|
29
|
+
u_colorBack: [number, number, number, number];
|
|
30
30
|
u_colorGlow: [number, number, number, number];
|
|
31
31
|
u_distortion: number;
|
|
32
32
|
u_gap: number;
|
|
33
|
-
|
|
33
|
+
u_innerGlow: number;
|
|
34
34
|
u_noiseTexture?: HTMLImageElement;
|
|
35
35
|
}
|
|
36
36
|
export interface VoronoiParams extends ShaderSizingParams, ShaderMotionParams {
|
|
37
37
|
colors?: string[];
|
|
38
38
|
stepsPerColor?: number;
|
|
39
|
-
|
|
39
|
+
colorBack?: string;
|
|
40
40
|
colorGlow?: string;
|
|
41
41
|
distortion?: number;
|
|
42
42
|
gap?: number;
|
|
43
|
-
|
|
43
|
+
innerGlow?: number;
|
|
44
44
|
}
|
package/dist/shaders/warp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { vec4 } from '../types
|
|
2
|
-
import type { ShaderMotionParams } from '../shader-mount
|
|
3
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import type { vec4 } from '../types';
|
|
2
|
+
import type { ShaderMotionParams } from '../shader-mount';
|
|
3
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
4
4
|
export declare const warpMeta: {
|
|
5
5
|
readonly maxColorCount: 10;
|
|
6
6
|
};
|
package/dist/shaders/waves.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing
|
|
1
|
+
import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-sizing';
|
|
2
2
|
/**
|
|
3
3
|
* Waves static pattern on the transparent background
|
|
4
4
|
*
|
|
5
5
|
* Uniforms include:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* u_color1 - the first color
|
|
7
|
+
* u_color2 - the second color
|
|
8
8
|
* u_shape (0 ... 3) - the line shaping coefficient, non-integer
|
|
9
9
|
values allowed and produce mixed shapes
|
|
10
10
|
- u_shape = 0 is zigzag
|
|
@@ -19,8 +19,8 @@ import { type ShaderSizingParams, type ShaderSizingUniforms } from '../shader-si
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const wavesFragmentShader: string;
|
|
21
21
|
export interface WavesUniforms extends ShaderSizingUniforms {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
u_color1: [number, number, number, number];
|
|
23
|
+
u_color2: [number, number, number, number];
|
|
24
24
|
u_shape: number;
|
|
25
25
|
u_frequency: number;
|
|
26
26
|
u_amplitude: number;
|
|
@@ -29,8 +29,8 @@ export interface WavesUniforms extends ShaderSizingUniforms {
|
|
|
29
29
|
u_softness: number;
|
|
30
30
|
}
|
|
31
31
|
export interface WavesParams extends ShaderSizingParams {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
color1?: string;
|
|
33
|
+
color2?: string;
|
|
34
34
|
rotation?: number;
|
|
35
35
|
shape?: number;
|
|
36
36
|
frequency?: number;
|
package/package.json
CHANGED