shaders 2.0.626 → 2.0.627
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/react/index.cjs +23 -23
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +5424 -5432
- package/dist/react/index.js.map +1 -1
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/svelte/engine/Shader.svelte +6 -1
- package/dist/vue/engine/Shader.vue.d.ts.map +1 -1
- package/dist/vue/index.js +34 -34
- package/package.json +1 -1
- package/dist/react/engine/PresetRenderer.d.ts +0 -18
- package/dist/react/engine/PresetRenderer.d.ts.map +0 -1
- package/dist/svelte/engine/PresetRenderer.svelte +0 -62
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
interface ComponentConfig {
|
|
4
|
-
type: string;
|
|
5
|
-
id?: string;
|
|
6
|
-
props?: Record<string, any>;
|
|
7
|
-
children?: ComponentConfig[];
|
|
8
|
-
}
|
|
9
|
-
interface PresetConfig {
|
|
10
|
-
components: ComponentConfig[];
|
|
11
|
-
}
|
|
12
|
-
interface PresetRendererProps {
|
|
13
|
-
preset: PresetConfig;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const PresetRenderer: React.FC<PresetRendererProps>;
|
|
17
|
-
export default PresetRenderer;
|
|
18
|
-
//# sourceMappingURL=PresetRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PresetRenderer.d.ts","sourceRoot":"","sources":["../../src/engine/PresetRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAiBzB,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,YAAY,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsCD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAMjD,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Shader from './Shader.svelte'
|
|
3
|
-
import Circle from '../components/Circle.svelte'
|
|
4
|
-
import DotGrid from '../components/DotGrid.svelte'
|
|
5
|
-
import FilmGrain from '../components/FilmGrain.svelte'
|
|
6
|
-
import GlassTiles from '../components/GlassTiles.svelte'
|
|
7
|
-
import Grayscale from '../components/Grayscale.svelte'
|
|
8
|
-
import HueShift from '../components/HueShift.svelte'
|
|
9
|
-
import Invert from '../components/Invert.svelte'
|
|
10
|
-
import LinearGradient from '../components/LinearGradient.svelte'
|
|
11
|
-
import Posterize from '../components/Posterize.svelte'
|
|
12
|
-
import Saturation from '../components/Saturation.svelte'
|
|
13
|
-
import SolidColor from '../components/SolidColor.svelte'
|
|
14
|
-
import Swirl from '../components/Swirl.svelte'
|
|
15
|
-
import Twirl from '../components/Twirl.svelte'
|
|
16
|
-
import Vibrance from '../components/Vibrance.svelte'
|
|
17
|
-
|
|
18
|
-
interface ComponentConfig {
|
|
19
|
-
type: string
|
|
20
|
-
id?: string
|
|
21
|
-
props?: Record<string, any>
|
|
22
|
-
children?: ComponentConfig[]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface PresetConfig {
|
|
26
|
-
components: ComponentConfig[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export let preset: PresetConfig
|
|
30
|
-
export let className: string = ''
|
|
31
|
-
|
|
32
|
-
const componentMap = {
|
|
33
|
-
Circle,
|
|
34
|
-
DotGrid,
|
|
35
|
-
FilmGrain,
|
|
36
|
-
GlassTiles,
|
|
37
|
-
Grayscale,
|
|
38
|
-
HueShift,
|
|
39
|
-
Invert,
|
|
40
|
-
LinearGradient,
|
|
41
|
-
Posterize,
|
|
42
|
-
Saturation,
|
|
43
|
-
SolidColor,
|
|
44
|
-
Swirl,
|
|
45
|
-
Twirl,
|
|
46
|
-
Vibrance
|
|
47
|
-
}
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<Shader class={className}>
|
|
51
|
-
{#each preset.components as config, index (index)}
|
|
52
|
-
<svelte:component
|
|
53
|
-
this={componentMap[config.type]}
|
|
54
|
-
id={config.id}
|
|
55
|
-
{...(config.props || {})}
|
|
56
|
-
>
|
|
57
|
-
{#if config.children && config.children.length > 0}
|
|
58
|
-
<svelte:self preset={{ components: config.children }} />
|
|
59
|
-
{/if}
|
|
60
|
-
</svelte:component>
|
|
61
|
-
{/each}
|
|
62
|
-
</Shader>
|