@paper-design/shaders-react 0.0.32 → 0.0.33
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/shader-mount.js +6 -0
- package/dist/shader-mount.js.map +2 -2
- package/dist/shaders/dithering.js +40 -49
- package/dist/shaders/dithering.js.map +2 -2
- package/dist/shaders/dot-grid.js +28 -28
- package/dist/shaders/dot-grid.js.map +1 -1
- package/dist/shaders/dot-orbit.js +1 -1
- package/dist/shaders/dot-orbit.js.map +2 -2
- package/dist/shaders/god-rays.js +10 -10
- package/dist/shaders/god-rays.js.map +2 -2
- package/dist/shaders/grain-gradient.js +19 -18
- package/dist/shaders/grain-gradient.js.map +2 -2
- package/dist/shaders/mesh-gradient.js +3 -3
- package/dist/shaders/mesh-gradient.js.map +2 -2
- package/dist/shaders/metaballs.js +1 -1
- package/dist/shaders/metaballs.js.map +2 -2
- package/dist/shaders/neuro-noise.js +4 -4
- package/dist/shaders/neuro-noise.js.map +1 -1
- package/dist/shaders/perlin-noise.js +12 -12
- package/dist/shaders/perlin-noise.js.map +1 -1
- package/dist/shaders/pulsing-border.js +6 -6
- package/dist/shaders/pulsing-border.js.map +2 -2
- package/dist/shaders/simplex-noise.js +1 -1
- package/dist/shaders/simplex-noise.js.map +2 -2
- package/dist/shaders/smoke-ring.js +8 -8
- package/dist/shaders/smoke-ring.js.map +2 -2
- package/dist/shaders/spiral.js +14 -14
- package/dist/shaders/spiral.js.map +1 -1
- package/dist/shaders/swirl.js +4 -11
- package/dist/shaders/swirl.js.map +2 -2
- package/dist/shaders/voronoi.js +6 -6
- package/dist/shaders/voronoi.js.map +2 -2
- package/dist/shaders/warp.d.ts +7 -7
- package/dist/shaders/warp.js +115 -111
- package/dist/shaders/warp.js.map +2 -2
- package/dist/shaders/waves.js +12 -12
- package/dist/shaders/waves.js.map +1 -1
- package/package.json +2 -2
package/dist/shaders/spiral.js
CHANGED
|
@@ -17,8 +17,8 @@ const defaultPreset = {
|
|
|
17
17
|
name: "Default",
|
|
18
18
|
params: {
|
|
19
19
|
...defaultPatternSizing,
|
|
20
|
-
color1: "
|
|
21
|
-
color2: "
|
|
20
|
+
color1: "#fafafa",
|
|
21
|
+
color2: "#808080",
|
|
22
22
|
density: 0,
|
|
23
23
|
distortion: 0,
|
|
24
24
|
strokeWidth: 0.5,
|
|
@@ -35,8 +35,8 @@ const noisyPreset = {
|
|
|
35
35
|
name: "Noisy",
|
|
36
36
|
params: {
|
|
37
37
|
...defaultPatternSizing,
|
|
38
|
-
color1: "
|
|
39
|
-
color2: "
|
|
38
|
+
color1: "#a1ef2a",
|
|
39
|
+
color2: "#288918",
|
|
40
40
|
scale: 1.3,
|
|
41
41
|
density: 0.5,
|
|
42
42
|
distortion: 0,
|
|
@@ -54,8 +54,8 @@ const dropletPreset = {
|
|
|
54
54
|
name: "Droplet",
|
|
55
55
|
params: {
|
|
56
56
|
...defaultPatternSizing,
|
|
57
|
-
color1: "
|
|
58
|
-
color2: "
|
|
57
|
+
color1: "#bf40a0",
|
|
58
|
+
color2: "#effafe",
|
|
59
59
|
scale: 0.65,
|
|
60
60
|
density: 0,
|
|
61
61
|
distortion: 0,
|
|
@@ -73,8 +73,8 @@ const sandPreset = {
|
|
|
73
73
|
name: "Sand",
|
|
74
74
|
params: {
|
|
75
75
|
...defaultPatternSizing,
|
|
76
|
-
color1: "
|
|
77
|
-
color2: "
|
|
76
|
+
color1: "#a09560",
|
|
77
|
+
color2: "#dedede",
|
|
78
78
|
scale: 3,
|
|
79
79
|
density: 0,
|
|
80
80
|
distortion: 0,
|
|
@@ -92,8 +92,8 @@ const swirlPreset = {
|
|
|
92
92
|
name: "Swirl",
|
|
93
93
|
params: {
|
|
94
94
|
...defaultPatternSizing,
|
|
95
|
-
color1: "
|
|
96
|
-
color2: "
|
|
95
|
+
color1: "#b3e6d9",
|
|
96
|
+
color2: "#1a2b4d",
|
|
97
97
|
scale: 4,
|
|
98
98
|
density: 0.8,
|
|
99
99
|
distortion: 0,
|
|
@@ -111,8 +111,8 @@ const hookPreset = {
|
|
|
111
111
|
name: "Hook",
|
|
112
112
|
params: {
|
|
113
113
|
...defaultPatternSizing,
|
|
114
|
-
color1: "
|
|
115
|
-
color2: "
|
|
114
|
+
color1: "#000000",
|
|
115
|
+
color2: "#85c2e0",
|
|
116
116
|
scale: 0.8,
|
|
117
117
|
density: 0,
|
|
118
118
|
distortion: 0,
|
|
@@ -130,8 +130,8 @@ const vinylPreset = {
|
|
|
130
130
|
name: "Vinyl",
|
|
131
131
|
params: {
|
|
132
132
|
...defaultPatternSizing,
|
|
133
|
-
color1: "
|
|
134
|
-
color2: "
|
|
133
|
+
color1: "#262626",
|
|
134
|
+
color2: "#c2babb",
|
|
135
135
|
density: 0,
|
|
136
136
|
distortion: 0.3,
|
|
137
137
|
strokeWidth: 0.95,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/shaders/spiral.tsx"],
|
|
4
|
-
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\nimport {\n defaultPatternSizing,\n getShaderColorFromString,\n ShaderFitOptions,\n spiralFragmentShader,\n type ShaderPreset,\n type SpiralParams,\n type SpiralUniforms,\n} from '@paper-design/shaders';\n\nexport interface SpiralProps extends ShaderComponentProps, SpiralParams {}\n\ntype SpiralPreset = ShaderPreset<SpiralParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highmidIntensity bug)\n\nexport const defaultPreset: SpiralPreset = {\n name: 'Default',\n params: {\n ...defaultPatternSizing,\n color1: '
|
|
4
|
+
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\nimport {\n defaultPatternSizing,\n getShaderColorFromString,\n ShaderFitOptions,\n spiralFragmentShader,\n type ShaderPreset,\n type SpiralParams,\n type SpiralUniforms,\n} from '@paper-design/shaders';\n\nexport interface SpiralProps extends ShaderComponentProps, SpiralParams {}\n\ntype SpiralPreset = ShaderPreset<SpiralParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highmidIntensity bug)\n\nexport const defaultPreset: SpiralPreset = {\n name: 'Default',\n params: {\n ...defaultPatternSizing,\n color1: '#fafafa',\n color2: '#808080',\n density: 0,\n distortion: 0,\n strokeWidth: 0.5,\n strokeTaper: 0,\n strokeCap: 0,\n noiseFrequency: 0,\n noisePower: 0,\n softness: 0.01,\n speed: 1,\n frame: 0,\n },\n};\n\nexport const noisyPreset: SpiralPreset = {\n name: 'Noisy',\n params: {\n ...defaultPatternSizing,\n color1: '#a1ef2a',\n color2: '#288918',\n scale: 1.3,\n density: 0.5,\n distortion: 0,\n strokeWidth: 0.5,\n strokeTaper: 0,\n strokeCap: 0.5,\n noiseFrequency: 0.1,\n noisePower: 1,\n softness: 0,\n speed: 1,\n frame: 0,\n },\n};\n\nexport const dropletPreset: SpiralPreset = {\n name: 'Droplet',\n params: {\n ...defaultPatternSizing,\n color1: '#bf40a0',\n color2: '#effafe',\n scale: 0.65,\n density: 0,\n distortion: 0,\n strokeWidth: 0.05,\n strokeTaper: 0,\n strokeCap: 1,\n noiseFrequency: 0,\n noisePower: 0,\n softness: 0,\n speed: 1,\n frame: 0,\n },\n};\n\nexport const sandPreset: SpiralPreset = {\n name: 'Sand',\n params: {\n ...defaultPatternSizing,\n color1: '#a09560',\n color2: '#dedede',\n scale: 3,\n density: 0,\n distortion: 0,\n strokeWidth: 0.15,\n strokeTaper: 0,\n strokeCap: 0,\n noiseFrequency: 30,\n noisePower: 1,\n softness: 0.2,\n speed: 0,\n frame: 0,\n },\n};\n\nexport const swirlPreset: SpiralPreset = {\n name: 'Swirl',\n params: {\n ...defaultPatternSizing,\n color1: '#b3e6d9',\n color2: '#1a2b4d',\n scale: 4,\n density: 0.8,\n distortion: 0,\n strokeWidth: 0.5,\n strokeTaper: 0,\n strokeCap: 0,\n noiseFrequency: 0,\n noisePower: 0,\n softness: 0.5,\n speed: 1,\n frame: 0,\n },\n};\n\nexport const hookPreset: SpiralPreset = {\n name: 'Hook',\n params: {\n ...defaultPatternSizing,\n color1: '#000000',\n color2: '#85c2e0',\n scale: 0.8,\n density: 0,\n distortion: 0,\n strokeWidth: 0.5,\n strokeTaper: 0.5,\n strokeCap: 0,\n noiseFrequency: 0,\n noisePower: 0,\n softness: 0.02,\n speed: 3,\n frame: 0,\n },\n};\n\nexport const vinylPreset: SpiralPreset = {\n name: 'Vinyl',\n params: {\n ...defaultPatternSizing,\n color1: '#262626',\n color2: '#c2babb',\n density: 0,\n distortion: 0.3,\n strokeWidth: 0.95,\n strokeTaper: 0,\n strokeCap: 1,\n noiseFrequency: 0,\n noisePower: 0,\n softness: 0.11,\n speed: 1,\n frame: 0,\n },\n};\n\nexport const spiralPresets: SpiralPreset[] = [\n defaultPreset,\n noisyPreset,\n dropletPreset,\n swirlPreset,\n sandPreset,\n hookPreset,\n vinylPreset,\n];\n\nexport const Spiral: React.FC<SpiralProps> = memo(function SpiralImpl({\n // Own props\n speed = defaultPreset.params.speed,\n frame = defaultPreset.params.frame,\n color1 = defaultPreset.params.color1,\n color2 = defaultPreset.params.color2,\n density = defaultPreset.params.density,\n distortion = defaultPreset.params.distortion,\n strokeWidth = defaultPreset.params.strokeWidth,\n strokeTaper = defaultPreset.params.strokeTaper,\n strokeCap = defaultPreset.params.strokeCap,\n noiseFrequency = defaultPreset.params.noiseFrequency,\n noisePower = defaultPreset.params.noisePower,\n softness = defaultPreset.params.softness,\n\n // Sizing props\n fit = defaultPreset.params.fit,\n rotation = defaultPreset.params.rotation,\n scale = defaultPreset.params.scale,\n originX = defaultPreset.params.originX,\n originY = defaultPreset.params.originY,\n offsetX = defaultPreset.params.offsetX,\n offsetY = defaultPreset.params.offsetY,\n worldWidth = defaultPreset.params.worldWidth,\n worldHeight = defaultPreset.params.worldHeight,\n ...props\n}: SpiralProps) {\n const uniforms = {\n // Own uniforms\n u_color1: getShaderColorFromString(color1),\n u_color2: getShaderColorFromString(color2),\n u_density: density,\n u_distortion: distortion,\n u_strokeWidth: strokeWidth,\n u_strokeTaper: strokeTaper,\n u_strokeCap: strokeCap,\n u_noiseFrequency: noiseFrequency,\n u_noisePower: noisePower,\n u_softness: softness,\n\n // Sizing uniforms\n u_fit: ShaderFitOptions[fit],\n u_scale: scale,\n u_rotation: rotation,\n u_offsetX: offsetX,\n u_offsetY: offsetY,\n u_originX: originX,\n u_originY: originY,\n u_worldWidth: worldWidth,\n u_worldHeight: worldHeight,\n } satisfies SpiralUniforms;\n\n return (\n <ShaderMount {...props} speed={speed} frame={frame} fragmentShader={spiralFragmentShader} uniforms={uniforms} />\n );\n}, colorPropsAreEqual);\n"],
|
|
5
5
|
"mappings": ";;;;;AAAA,SAAS,YAAY;AACrB,SAAS,mBAA8C;AACvD,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAmNH;AAzMG,MAAM,gBAA8B;AAAA,EACzC,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,EACT;AACF;AAEO,MAAM,cAA4B;AAAA,EACvC,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,I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,OAAO;AAAA,EAC/B,aAAa,cAAc,OAAO;AAAA,EAClC,cAAc,cAAc,OAAO;AAAA,EACnC,GAAG;AACL,GAAgB;AACd,QAAM,WAAW;AAAA;AAAA,IAEf,UAAU,yBAAyB,MAAM;AAAA,IACzC,UAAU,yBAAyB,MAAM;AAAA,IACzC,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;AAAA,IACf,eAAe;AAAA,IACf,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,YAAY;AAAA;AAAA,IAGZ,OAAO,iBAAiB,GAAG;AAAA,IAC3B,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;AAAA,EACjB;AAEA,SACE,oBAAC,eAAa,GAAG,OAAO,OAAc,OAAc,gBAAgB,sBAAsB,UAAoB;AAElH,GAAG,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/shaders/swirl.js
CHANGED
|
@@ -22,7 +22,7 @@ const defaultPreset = {
|
|
|
22
22
|
offsetY: 0.3,
|
|
23
23
|
speed: 0.32,
|
|
24
24
|
frame: 0,
|
|
25
|
-
colors: ["
|
|
25
|
+
colors: ["#452424", "#0b7f05", "#ffe785", "#ff335c"],
|
|
26
26
|
bandCount: 5,
|
|
27
27
|
twist: 0.11,
|
|
28
28
|
softness: 0.01,
|
|
@@ -38,14 +38,7 @@ const openingPreset = {
|
|
|
38
38
|
offsetY: 0.86,
|
|
39
39
|
speed: 0.6,
|
|
40
40
|
frame: 0,
|
|
41
|
-
colors: [
|
|
42
|
-
"hsla(330, 49%, 36%, 1)",
|
|
43
|
-
"hsla(336, 47%, 50%, 1)",
|
|
44
|
-
"hsla(6, 72%, 66%, 1)",
|
|
45
|
-
"hsla(20, 100%, 68%, 1)",
|
|
46
|
-
"hsla(45, 100%, 68%, 1)",
|
|
47
|
-
"hsla(60, 94%, 75%, 1)"
|
|
48
|
-
],
|
|
41
|
+
colors: ["#8b2e5f", "#b14467", "#e67a62", "#ff715c", "#ffc55c", "#f9f97c"],
|
|
49
42
|
bandCount: 3,
|
|
50
43
|
twist: 0.3,
|
|
51
44
|
softness: 0,
|
|
@@ -59,7 +52,7 @@ const jamesBondPreset = {
|
|
|
59
52
|
...defaultObjectSizing,
|
|
60
53
|
speed: 1,
|
|
61
54
|
frame: 0,
|
|
62
|
-
colors: ["
|
|
55
|
+
colors: ["#000000", "#2e2e2e", "#000000", "#ffffff"],
|
|
63
56
|
bandCount: 4,
|
|
64
57
|
twist: 0.4,
|
|
65
58
|
softness: 0,
|
|
@@ -73,7 +66,7 @@ const candyPreset = {
|
|
|
73
66
|
...defaultObjectSizing,
|
|
74
67
|
speed: 1,
|
|
75
68
|
frame: 0,
|
|
76
|
-
colors: ["
|
|
69
|
+
colors: ["#ffcd66", "#6bbceb", "#8a1fff"],
|
|
77
70
|
bandCount: 2.5,
|
|
78
71
|
twist: 0.2,
|
|
79
72
|
softness: 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/shaders/swirl.tsx"],
|
|
4
|
-
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport {\n defaultObjectSizing,\n getShaderColorFromString,\n ShaderFitOptions,\n swirlFragmentShader,\n type ShaderPreset,\n type SwirlParams,\n type SwirlUniforms,\n} from '@paper-design/shaders';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\n\nexport interface SwirlProps extends ShaderComponentProps, SwirlParams {}\n\ntype SwirlPreset = ShaderPreset<SwirlParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highmidIntensity bug)\n\nexport const defaultPreset: SwirlPreset = {\n name: 'Default',\n params: {\n ...defaultObjectSizing,\n scale: 2.28,\n offsetX: -0.4,\n offsetY: 0.3,\n speed: 0.32,\n frame: 0,\n colors: ['
|
|
5
|
-
"mappings": ";;;;;AAAA,SAAS,YAAY;AACrB,SAAS,mBAA8C;AACvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,0BAA0B;
|
|
4
|
+
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport {\n defaultObjectSizing,\n getShaderColorFromString,\n ShaderFitOptions,\n swirlFragmentShader,\n type ShaderPreset,\n type SwirlParams,\n type SwirlUniforms,\n} from '@paper-design/shaders';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\n\nexport interface SwirlProps extends ShaderComponentProps, SwirlParams {}\n\ntype SwirlPreset = ShaderPreset<SwirlParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highmidIntensity bug)\n\nexport const defaultPreset: SwirlPreset = {\n name: 'Default',\n params: {\n ...defaultObjectSizing,\n scale: 2.28,\n offsetX: -0.4,\n offsetY: 0.3,\n speed: 0.32,\n frame: 0,\n colors: ['#452424', '#0b7f05', '#ffe785', '#ff335c'],\n bandCount: 5,\n twist: 0.11,\n softness: 0.01,\n noiseFrequency: 1.2,\n noisePower: 0.46,\n },\n};\n\nexport const openingPreset: SwirlPreset = {\n name: 'Opening',\n params: {\n ...defaultObjectSizing,\n offsetX: -0.4,\n offsetY: 0.86,\n speed: 0.6,\n frame: 0,\n colors: ['#8b2e5f', '#b14467', '#e67a62', '#ff715c', '#ffc55c', '#f9f97c'],\n bandCount: 3,\n twist: 0.3,\n softness: 0,\n noiseFrequency: 2,\n noisePower: 0,\n },\n} as const;\n\nexport const jamesBondPreset: SwirlPreset = {\n name: '007',\n params: {\n ...defaultObjectSizing,\n speed: 1,\n frame: 0,\n colors: ['#000000', '#2e2e2e', '#000000', '#ffffff'],\n bandCount: 4,\n twist: 0.4,\n softness: 0,\n noiseFrequency: 0,\n noisePower: 0,\n },\n} as const;\n\nexport const candyPreset: SwirlPreset = {\n name: 'Candy',\n params: {\n ...defaultObjectSizing,\n speed: 1,\n frame: 0,\n colors: ['#ffcd66', '#6bbceb', '#8a1fff'],\n bandCount: 2.5,\n twist: 0.2,\n softness: 1,\n noiseFrequency: 0,\n noisePower: 0,\n },\n} as const;\n\nexport const swirlPresets: SwirlPreset[] = [defaultPreset, openingPreset, jamesBondPreset, candyPreset];\n\nexport const Swirl: React.FC<SwirlProps> = memo(function SwirlImpl({\n // Own props\n speed = defaultPreset.params.speed,\n frame = defaultPreset.params.frame,\n colors = defaultPreset.params.colors,\n bandCount = defaultPreset.params.bandCount,\n twist = defaultPreset.params.twist,\n softness = defaultPreset.params.softness,\n noiseFrequency = defaultPreset.params.noiseFrequency,\n noisePower = defaultPreset.params.noisePower,\n\n // Sizing props\n fit = defaultPreset.params.fit,\n rotation = defaultPreset.params.rotation,\n scale = defaultPreset.params.scale,\n originX = defaultPreset.params.originX,\n originY = defaultPreset.params.originY,\n offsetX = defaultPreset.params.offsetX,\n offsetY = defaultPreset.params.offsetY,\n worldWidth = defaultPreset.params.worldWidth,\n worldHeight = defaultPreset.params.worldHeight,\n ...props\n}: SwirlProps) {\n const uniforms = {\n // Own uniforms\n u_colors: colors.map(getShaderColorFromString),\n u_colorsCount: colors.length,\n u_bandCount: bandCount,\n u_twist: twist,\n u_softness: softness,\n u_noiseFrequency: noiseFrequency,\n u_noisePower: noisePower,\n\n // Sizing uniforms\n u_fit: ShaderFitOptions[fit],\n u_scale: scale,\n u_rotation: rotation,\n u_offsetX: offsetX,\n u_offsetY: offsetY,\n u_originX: originX,\n u_originY: originY,\n u_worldWidth: worldWidth,\n u_worldHeight: worldHeight,\n } satisfies SwirlUniforms;\n\n return (\n <ShaderMount {...props} speed={speed} frame={frame} fragmentShader={swirlFragmentShader} uniforms={uniforms} />\n );\n}, colorPropsAreEqual);\n"],
|
|
5
|
+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@ -20,10 +20,10 @@ const defaultPreset = {
|
|
|
20
20
|
...defaultPatternSizing,
|
|
21
21
|
speed: 0.5,
|
|
22
22
|
frame: 0,
|
|
23
|
-
colors: ["
|
|
23
|
+
colors: ["#e65c1a", "#e6c31a", "#1aace6"],
|
|
24
24
|
stepsPerColor: 1,
|
|
25
|
-
colorGlow: "
|
|
26
|
-
colorBack: "
|
|
25
|
+
colorGlow: "#5500ff",
|
|
26
|
+
colorBack: "#ffffff",
|
|
27
27
|
distortion: 0.42,
|
|
28
28
|
gap: 0.06,
|
|
29
29
|
innerGlow: 0
|
|
@@ -35,10 +35,10 @@ const shadowPreset = {
|
|
|
35
35
|
...defaultPatternSizing,
|
|
36
36
|
speed: 0.5,
|
|
37
37
|
frame: 0,
|
|
38
|
-
colors: ["
|
|
38
|
+
colors: ["#faf7fe", "#fefdf7", "#fbf7fe"],
|
|
39
39
|
stepsPerColor: 1,
|
|
40
|
-
colorGlow: "
|
|
41
|
-
colorBack: "
|
|
40
|
+
colorGlow: "#76587a",
|
|
41
|
+
colorBack: "#ffffff",
|
|
42
42
|
distortion: 0.23,
|
|
43
43
|
gap: 0,
|
|
44
44
|
innerGlow: 0.8
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/shaders/voronoi.tsx"],
|
|
4
|
-
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\nimport {\n defaultPatternSizing,\n getShaderColorFromString,\n getShaderNoiseTexture,\n voronoiFragmentShader,\n ShaderFitOptions,\n type VoronoiParams,\n type VoronoiUniforms,\n type ShaderPreset,\n} from '@paper-design/shaders';\n\nexport interface VoronoiProps extends ShaderComponentProps, VoronoiParams {}\n\ntype VoronoiPreset = ShaderPreset<VoronoiParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highlight bug)\n\nexport const defaultPreset: VoronoiPreset = {\n name: 'Default',\n params: {\n ...defaultPatternSizing,\n speed: 0.5,\n frame: 0,\n colors: ['
|
|
5
|
-
"mappings": ";;;;;AAAA,SAAS,YAAY;AACrB,SAAS,mBAA8C;AACvD,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AA+FH;AArFG,MAAM,gBAA+B;AAAA,EAC1C,MAAM;AAAA,EACN,QAAQ;AAAA,IACN,GAAG;AAAA,IACH,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ,CAAC,
|
|
4
|
+
"sourcesContent": ["import { memo } from 'react';\nimport { ShaderMount, type ShaderComponentProps } from '../shader-mount';\nimport { colorPropsAreEqual } from '../color-props-are-equal';\nimport {\n defaultPatternSizing,\n getShaderColorFromString,\n getShaderNoiseTexture,\n voronoiFragmentShader,\n ShaderFitOptions,\n type VoronoiParams,\n type VoronoiUniforms,\n type ShaderPreset,\n} from '@paper-design/shaders';\n\nexport interface VoronoiProps extends ShaderComponentProps, VoronoiParams {}\n\ntype VoronoiPreset = ShaderPreset<VoronoiParams>;\n\n// Due to Leva controls limitation:\n// 1) keep default colors in HSLA format to keep alpha channel\n// 2) don't use decimal values on HSL values (to avoid button highlight bug)\n\nexport const defaultPreset: VoronoiPreset = {\n name: 'Default',\n params: {\n ...defaultPatternSizing,\n speed: 0.5,\n frame: 0,\n colors: ['#e65c1a', '#e6c31a', '#1aace6'],\n stepsPerColor: 1,\n colorGlow: '#5500ff',\n colorBack: '#ffffff',\n distortion: 0.42,\n gap: 0.06,\n innerGlow: 0,\n },\n};\n\nexport const shadowPreset: VoronoiPreset = {\n name: 'Shadow',\n params: {\n ...defaultPatternSizing,\n speed: 0.5,\n frame: 0,\n colors: ['#faf7fe', '#fefdf7', '#fbf7fe'],\n stepsPerColor: 1,\n colorGlow: '#76587a',\n colorBack: '#ffffff',\n distortion: 0.23,\n gap: 0,\n innerGlow: 0.8,\n },\n};\n\nexport const voronoiPresets: VoronoiPreset[] = [defaultPreset, shadowPreset];\n\nexport const Voronoi: React.FC<VoronoiProps> = memo(function VoronoiImpl({\n // Own props\n speed = defaultPreset.params.speed,\n frame = defaultPreset.params.frame,\n colors = defaultPreset.params.colors,\n stepsPerColor = defaultPreset.params.stepsPerColor,\n colorGlow = defaultPreset.params.colorGlow,\n colorBack = defaultPreset.params.colorBack,\n distortion = defaultPreset.params.distortion,\n gap = defaultPreset.params.gap,\n innerGlow = defaultPreset.params.innerGlow,\n\n // Sizing props\n fit = defaultPreset.params.fit,\n scale = defaultPreset.params.scale,\n rotation = defaultPreset.params.rotation,\n originX = defaultPreset.params.originX,\n originY = defaultPreset.params.originY,\n offsetX = defaultPreset.params.offsetX,\n offsetY = defaultPreset.params.offsetY,\n worldWidth = defaultPreset.params.worldWidth,\n worldHeight = defaultPreset.params.worldHeight,\n ...props\n}: VoronoiProps) {\n const noiseTexture = typeof window !== 'undefined' && { u_noiseTexture: getShaderNoiseTexture() };\n\n const uniforms = {\n // Own uniforms\n u_colors: colors.map(getShaderColorFromString),\n u_colorsCount: colors.length,\n u_stepsPerColor: stepsPerColor,\n u_colorGlow: getShaderColorFromString(colorGlow),\n u_colorBack: getShaderColorFromString(colorBack),\n u_distortion: distortion,\n u_gap: gap,\n u_innerGlow: innerGlow,\n ...noiseTexture,\n\n // Sizing uniforms\n u_fit: ShaderFitOptions[fit],\n u_scale: scale,\n u_rotation: rotation,\n u_offsetX: offsetX,\n u_offsetY: offsetY,\n u_originX: originX,\n u_originY: originY,\n u_worldWidth: worldWidth,\n u_worldHeight: worldHeight,\n } satisfies VoronoiUniforms;\n\n return (\n <ShaderMount {...props} speed={speed} frame={frame} fragmentShader={voronoiFragmentShader} uniforms={uniforms} />\n );\n}, colorPropsAreEqual);\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA,SAAS,YAAY;AACrB,SAAS,mBAA8C;AACvD,SAAS,0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cAAc,OAAO;AAAA,EAClC,cAAc,cAAc,OAAO;AAAA,EACnC,GAAG;AACL,GAAiB;AACf,QAAM,eAAe,OAAO,WAAW,eAAe,EAAE,gBAAgB,sBAAsB,EAAE;AAEhG,QAAM,WAAW;AAAA;AAAA,IAEf,UAAU,OAAO,IAAI,wBAAwB;AAAA,IAC7C,eAAe,OAAO;AAAA,IACtB,iBAAiB;AAAA,IACjB,aAAa,yBAAyB,SAAS;AAAA,IAC/C,aAAa,yBAAyB,SAAS;AAAA,IAC/C,cAAc;AAAA,IACd,OAAO;AAAA,IACP,aAAa;AAAA,IACb,GAAG;AAAA;AAAA,IAGH,OAAO,iBAAiB,GAAG;AAAA,IAC3B,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,cAAc;AAAA,IACd,eAAe;AAAA,EACjB;AAEA,SACE,oBAAC,eAAa,GAAG,OAAO,OAAc,OAAc,gBAAgB,uBAAuB,UAAoB;AAEnH,GAAG,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/shaders/warp.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export interface WarpProps extends ShaderComponentProps, WarpParams {
|
|
|
4
4
|
}
|
|
5
5
|
type WarpPreset = ShaderPreset<WarpParams>;
|
|
6
6
|
export declare const defaultPreset: WarpPreset;
|
|
7
|
-
export declare const presetCauldron: WarpPreset;
|
|
8
|
-
export declare const presetSilk: WarpPreset;
|
|
9
|
-
export declare const presetPassion: WarpPreset;
|
|
10
|
-
export declare const presetPhantom: WarpPreset;
|
|
11
7
|
export declare const presetAbyss: WarpPreset;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const presetIceberg: WarpPreset;
|
|
14
|
-
export declare const presetNectar: WarpPreset;
|
|
8
|
+
export declare const presetCauldron: WarpPreset;
|
|
15
9
|
export declare const presetFilteredLight: WarpPreset;
|
|
10
|
+
export declare const presetIceberg: WarpPreset;
|
|
11
|
+
export declare const presetInk: WarpPreset;
|
|
16
12
|
export declare const presetKelp: WarpPreset;
|
|
13
|
+
export declare const presetNectar: WarpPreset;
|
|
14
|
+
export declare const presetPassion: WarpPreset;
|
|
15
|
+
export declare const presetPhantom: WarpPreset;
|
|
16
|
+
export declare const presetSilk: WarpPreset;
|
|
17
17
|
export declare const warpPresets: WarpPreset[];
|
|
18
18
|
export declare const Warp: React.FC<WarpProps>;
|
|
19
19
|
export {};
|
package/dist/shaders/warp.js
CHANGED
|
@@ -21,13 +21,31 @@ const defaultPreset = {
|
|
|
21
21
|
rotation: 0,
|
|
22
22
|
speed: 1,
|
|
23
23
|
frame: 0,
|
|
24
|
-
colors: ["
|
|
24
|
+
colors: ["#262626", "#7accf2", "#ffffff"],
|
|
25
25
|
proportion: 0.35,
|
|
26
26
|
softness: 1,
|
|
27
27
|
distortion: 0.25,
|
|
28
28
|
swirl: 0.8,
|
|
29
29
|
swirlIterations: 10,
|
|
30
30
|
shapeScale: 0.1,
|
|
31
|
+
shape: "checks"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const presetAbyss = {
|
|
35
|
+
name: "The Abyss",
|
|
36
|
+
params: {
|
|
37
|
+
...defaultPatternSizing,
|
|
38
|
+
scale: 3,
|
|
39
|
+
rotation: 2,
|
|
40
|
+
speed: 0.6,
|
|
41
|
+
frame: 0,
|
|
42
|
+
colors: ["#15122e", "#7b89f2", "#ffffff"],
|
|
43
|
+
proportion: 0,
|
|
44
|
+
softness: 1,
|
|
45
|
+
distortion: 0.09,
|
|
46
|
+
swirl: 0.48,
|
|
47
|
+
swirlIterations: 5,
|
|
48
|
+
shapeScale: 0.85,
|
|
31
49
|
shape: "edge"
|
|
32
50
|
}
|
|
33
51
|
};
|
|
@@ -35,179 +53,165 @@ const presetCauldron = {
|
|
|
35
53
|
name: "Cauldron Pot",
|
|
36
54
|
params: {
|
|
37
55
|
...defaultPatternSizing,
|
|
38
|
-
scale:
|
|
39
|
-
rotation:
|
|
40
|
-
speed:
|
|
56
|
+
scale: 0.9,
|
|
57
|
+
rotation: 160,
|
|
58
|
+
speed: 20,
|
|
41
59
|
frame: 0,
|
|
42
|
-
colors: ["
|
|
60
|
+
colors: ["#a7e58b", "#324472", "#0a180d"],
|
|
43
61
|
proportion: 0.64,
|
|
44
|
-
softness:
|
|
62
|
+
softness: 1.5,
|
|
45
63
|
distortion: 0.2,
|
|
46
64
|
swirl: 0.86,
|
|
47
65
|
swirlIterations: 7,
|
|
48
|
-
shapeScale: 0,
|
|
66
|
+
shapeScale: 0.6,
|
|
49
67
|
shape: "edge"
|
|
50
68
|
}
|
|
51
69
|
};
|
|
52
|
-
const
|
|
53
|
-
name: "
|
|
54
|
-
params: {
|
|
55
|
-
...defaultPatternSizing,
|
|
56
|
-
scale: 1 / 0.26,
|
|
57
|
-
rotation: 0,
|
|
58
|
-
speed: 5,
|
|
59
|
-
frame: 0,
|
|
60
|
-
colors: ["hsla(0, 9%, 7%, 1)", "hsla(8, 13%, 34%, 1)", "hsla(5, 8%, 71%, 1)"],
|
|
61
|
-
proportion: 0,
|
|
62
|
-
softness: 1,
|
|
63
|
-
distortion: 0.3,
|
|
64
|
-
swirl: 0.6,
|
|
65
|
-
swirlIterations: 11,
|
|
66
|
-
shapeScale: 0.05,
|
|
67
|
-
shape: "stripes"
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const presetPassion = {
|
|
71
|
-
name: "Passion",
|
|
70
|
+
const presetFilteredLight = {
|
|
71
|
+
name: "Filtered Light",
|
|
72
72
|
params: {
|
|
73
73
|
...defaultPatternSizing,
|
|
74
|
-
scale:
|
|
75
|
-
rotation:
|
|
76
|
-
speed: 3,
|
|
74
|
+
scale: 0.3,
|
|
75
|
+
rotation: 45,
|
|
76
|
+
speed: 3.2,
|
|
77
77
|
frame: 0,
|
|
78
|
-
colors: ["
|
|
79
|
-
proportion: 0.
|
|
78
|
+
colors: ["#171714", "#d4d8be", "#f9f9e0"],
|
|
79
|
+
proportion: 0.4,
|
|
80
80
|
softness: 1,
|
|
81
81
|
distortion: 0.09,
|
|
82
|
-
swirl: 0.
|
|
83
|
-
swirlIterations:
|
|
84
|
-
shapeScale: 0.
|
|
85
|
-
shape: "
|
|
82
|
+
swirl: 0.1,
|
|
83
|
+
swirlIterations: 0,
|
|
84
|
+
shapeScale: 0.1,
|
|
85
|
+
shape: "stripes"
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
const
|
|
89
|
-
name: "
|
|
88
|
+
const presetIceberg = {
|
|
89
|
+
name: "Iceberg",
|
|
90
90
|
params: {
|
|
91
91
|
...defaultPatternSizing,
|
|
92
|
-
scale:
|
|
93
|
-
rotation:
|
|
94
|
-
|
|
92
|
+
scale: 0.8,
|
|
93
|
+
rotation: 190,
|
|
94
|
+
offsetX: 0.3,
|
|
95
|
+
speed: 0.5,
|
|
95
96
|
frame: 0,
|
|
96
|
-
colors: ["
|
|
97
|
-
proportion: 0.
|
|
98
|
-
softness: 1,
|
|
99
|
-
distortion: 0.
|
|
100
|
-
swirl: 0.
|
|
97
|
+
colors: ["#ffffff", "#324771", "#0a180d"],
|
|
98
|
+
proportion: 0.3,
|
|
99
|
+
softness: 1.2,
|
|
100
|
+
distortion: 0.2,
|
|
101
|
+
swirl: 0.86,
|
|
101
102
|
swirlIterations: 7,
|
|
102
|
-
shapeScale: 0
|
|
103
|
+
shapeScale: 0,
|
|
103
104
|
shape: "checks"
|
|
104
105
|
}
|
|
105
106
|
};
|
|
106
|
-
const presetAbyss = {
|
|
107
|
-
name: "The Abyss",
|
|
108
|
-
params: {
|
|
109
|
-
...defaultPatternSizing,
|
|
110
|
-
scale: 1 / 0.1,
|
|
111
|
-
rotation: 2,
|
|
112
|
-
speed: 0.6,
|
|
113
|
-
frame: 0,
|
|
114
|
-
colors: ["hsla(242.2, 44.3%, 12%, 1)", "hsla(236.1, 80.4%, 70%, 1)", "hsla(0, 0%, 100%, 1)"],
|
|
115
|
-
proportion: 0,
|
|
116
|
-
softness: 1,
|
|
117
|
-
distortion: 0.09,
|
|
118
|
-
swirl: 0.48,
|
|
119
|
-
swirlIterations: 4,
|
|
120
|
-
shapeScale: 0.1,
|
|
121
|
-
shape: "edge"
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
107
|
const presetInk = {
|
|
125
108
|
name: "Live Ink",
|
|
126
109
|
params: {
|
|
127
110
|
...defaultPatternSizing,
|
|
128
|
-
scale: 1
|
|
129
|
-
rotation:
|
|
130
|
-
|
|
111
|
+
scale: 1.2,
|
|
112
|
+
rotation: 44,
|
|
113
|
+
offsetY: -0.3,
|
|
114
|
+
speed: 10,
|
|
131
115
|
frame: 0,
|
|
132
|
-
colors: ["
|
|
116
|
+
colors: ["#111314", "#9faeab", "#f3fee7"],
|
|
133
117
|
proportion: 0.35,
|
|
134
118
|
softness: 0,
|
|
135
119
|
distortion: 0.25,
|
|
136
120
|
swirl: 0.8,
|
|
137
121
|
swirlIterations: 10,
|
|
138
|
-
shapeScale: 0.
|
|
122
|
+
shapeScale: 0.28,
|
|
139
123
|
shape: "checks"
|
|
140
124
|
}
|
|
141
125
|
};
|
|
142
|
-
const
|
|
143
|
-
name: "
|
|
126
|
+
const presetKelp = {
|
|
127
|
+
name: "Kelp",
|
|
144
128
|
params: {
|
|
145
129
|
...defaultPatternSizing,
|
|
146
|
-
scale:
|
|
147
|
-
rotation:
|
|
148
|
-
speed:
|
|
130
|
+
scale: 0.88,
|
|
131
|
+
rotation: 50,
|
|
132
|
+
speed: 80,
|
|
149
133
|
frame: 0,
|
|
150
|
-
colors: ["
|
|
151
|
-
proportion: 0.
|
|
152
|
-
softness:
|
|
153
|
-
distortion: 0
|
|
154
|
-
swirl: 0.
|
|
155
|
-
swirlIterations:
|
|
156
|
-
shapeScale: 0,
|
|
157
|
-
shape: "
|
|
134
|
+
colors: ["#dbff8f", "#404f3e", "#091316"],
|
|
135
|
+
proportion: 0.93,
|
|
136
|
+
softness: 0.05,
|
|
137
|
+
distortion: 0,
|
|
138
|
+
swirl: 0.15,
|
|
139
|
+
swirlIterations: 0,
|
|
140
|
+
shapeScale: 0.74,
|
|
141
|
+
shape: "stripes"
|
|
158
142
|
}
|
|
159
143
|
};
|
|
160
144
|
const presetNectar = {
|
|
161
145
|
name: "Nectar",
|
|
162
146
|
params: {
|
|
163
147
|
...defaultPatternSizing,
|
|
164
|
-
scale:
|
|
148
|
+
scale: 2,
|
|
149
|
+
offsetY: 0.6,
|
|
165
150
|
rotation: 0,
|
|
166
|
-
speed:
|
|
151
|
+
speed: 30,
|
|
167
152
|
frame: 0,
|
|
168
|
-
colors: ["
|
|
153
|
+
colors: ["#151310", "#d3a86b", "#f0edea"],
|
|
169
154
|
proportion: 0.24,
|
|
170
155
|
softness: 1,
|
|
171
156
|
distortion: 0.21,
|
|
172
157
|
swirl: 0.57,
|
|
173
158
|
swirlIterations: 10,
|
|
174
|
-
shapeScale: 0.
|
|
159
|
+
shapeScale: 0.75,
|
|
175
160
|
shape: "edge"
|
|
176
161
|
}
|
|
177
162
|
};
|
|
178
|
-
const
|
|
179
|
-
name: "
|
|
163
|
+
const presetPassion = {
|
|
164
|
+
name: "Passion",
|
|
180
165
|
params: {
|
|
181
166
|
...defaultPatternSizing,
|
|
182
|
-
scale: 2,
|
|
183
|
-
rotation:
|
|
184
|
-
speed:
|
|
167
|
+
scale: 2.5,
|
|
168
|
+
rotation: 1.35,
|
|
169
|
+
speed: 15,
|
|
185
170
|
frame: 0,
|
|
186
|
-
colors: ["
|
|
187
|
-
proportion: 0.
|
|
171
|
+
colors: ["#3b1515", "#954751", "#ffc085"],
|
|
172
|
+
proportion: 0.5,
|
|
188
173
|
softness: 1,
|
|
189
|
-
distortion: 0.
|
|
190
|
-
swirl: 0,
|
|
191
|
-
swirlIterations:
|
|
192
|
-
shapeScale: 0,
|
|
193
|
-
shape: "
|
|
174
|
+
distortion: 0.09,
|
|
175
|
+
swirl: 0.9,
|
|
176
|
+
swirlIterations: 6,
|
|
177
|
+
shapeScale: 0.25,
|
|
178
|
+
shape: "checks"
|
|
194
179
|
}
|
|
195
180
|
};
|
|
196
|
-
const
|
|
197
|
-
name: "
|
|
181
|
+
const presetPhantom = {
|
|
182
|
+
name: "Phantom",
|
|
198
183
|
params: {
|
|
199
184
|
...defaultPatternSizing,
|
|
200
|
-
scale:
|
|
201
|
-
rotation:
|
|
202
|
-
|
|
185
|
+
scale: 1.2,
|
|
186
|
+
rotation: 180,
|
|
187
|
+
offsetY: -0.2,
|
|
188
|
+
speed: 30,
|
|
203
189
|
frame: 0,
|
|
204
|
-
colors: ["
|
|
205
|
-
proportion:
|
|
206
|
-
softness:
|
|
207
|
-
distortion: 0,
|
|
208
|
-
swirl: 0.
|
|
209
|
-
swirlIterations:
|
|
210
|
-
shapeScale: 0.
|
|
190
|
+
colors: ["#12112c", "#7b89f2", "#d7dcfb"],
|
|
191
|
+
proportion: 0.5,
|
|
192
|
+
softness: 1,
|
|
193
|
+
distortion: 0.2,
|
|
194
|
+
swirl: 0.3,
|
|
195
|
+
swirlIterations: 7,
|
|
196
|
+
shapeScale: 0.1,
|
|
197
|
+
shape: "checks"
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const presetSilk = {
|
|
201
|
+
name: "Silk",
|
|
202
|
+
params: {
|
|
203
|
+
...defaultPatternSizing,
|
|
204
|
+
scale: 2,
|
|
205
|
+
rotation: 0,
|
|
206
|
+
speed: 5,
|
|
207
|
+
frame: 0,
|
|
208
|
+
colors: ["#141111", "#665551", "#baaea9"],
|
|
209
|
+
proportion: 0,
|
|
210
|
+
softness: 1,
|
|
211
|
+
distortion: 0.3,
|
|
212
|
+
swirl: 0.6,
|
|
213
|
+
swirlIterations: 11,
|
|
214
|
+
shapeScale: 0.25,
|
|
211
215
|
shape: "stripes"
|
|
212
216
|
}
|
|
213
217
|
};
|