own-the-canvas 1.0.5 → 1.0.7
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/README.md +3 -1
- package/lib/components/BlackHole/BlackHole.d.ts +31 -0
- package/lib/components/BlackHole/index.d.ts +2 -0
- package/lib/components/BlackHole/useBlackHole.d.ts +16 -0
- package/lib/components/BubbleUniverse/BubbleUniverse.d.ts +31 -0
- package/lib/components/BubbleUniverse/index.d.ts +2 -0
- package/lib/components/BubbleUniverse/useBubbleUniverse.d.ts +16 -0
- package/lib/components/DragonCursor/DragonCursor.d.ts +29 -0
- package/lib/components/DragonCursor/index.d.ts +2 -0
- package/lib/components/DragonCursor/useDragonCursor.d.ts +15 -0
- package/{dist → lib}/components/FireEffect/FireEffect.d.ts +2 -0
- package/{dist → lib}/components/FireEffect/useFireEffect.d.ts +1 -0
- package/{dist → lib}/components/FlowField/FlowField.d.ts +9 -0
- package/{dist → lib}/components/FlowField/index.d.ts +1 -1
- package/{dist → lib}/components/FluidSimulation/FluidSimulation.d.ts +15 -0
- package/{dist → lib}/components/FluidSimulation/index.d.ts +1 -1
- package/lib/components/GalaxySpiral/GalaxySpiral.d.ts +31 -0
- package/lib/components/GalaxySpiral/index.d.ts +2 -0
- package/lib/components/GalaxySpiral/useGalaxySpiral.d.ts +16 -0
- package/{dist → lib}/components/GlitchOverlay/GlitchOverlay.d.ts +3 -1
- package/{dist → lib}/components/GlitchOverlay/useGlitchOverlay.d.ts +1 -0
- package/lib/components/KoiPond/KoiPond.d.ts +29 -0
- package/lib/components/KoiPond/index.d.ts +2 -0
- package/lib/components/KoiPond/useKoiPond.d.ts +15 -0
- package/{dist → lib}/components/MagneticBlob/MagneticBlob.d.ts +16 -0
- package/{dist → lib}/components/MagneticBlob/index.d.ts +1 -1
- package/{dist → lib}/components/ParticleField/ParticleField.d.ts +25 -4
- package/lib/components/ParticleField/index.d.ts +2 -0
- package/{dist → lib}/components/ParticleField/useParticleField.d.ts +10 -0
- package/lib/components/SakuraBlossom/SakuraBlossom.d.ts +27 -0
- package/lib/components/SakuraBlossom/index.d.ts +2 -0
- package/lib/components/SakuraBlossom/useSakuraBlossom.d.ts +14 -0
- package/lib/components/SolarFlare/SolarFlare.d.ts +35 -0
- package/lib/components/SolarFlare/index.d.ts +2 -0
- package/lib/components/SolarFlare/useSolarFlare.d.ts +18 -0
- package/{dist → lib}/components/Spirograph/Spirograph.d.ts +2 -7
- package/{dist → lib}/components/Spirograph/index.d.ts +0 -1
- package/{dist → lib}/components/Spirograph/useSpirograph.d.ts +1 -4
- package/{dist → lib}/components/Starfield/Starfield.d.ts +2 -0
- package/{dist → lib}/components/Starfield/useStarfield.d.ts +1 -0
- package/lib/components/TornadoVortex/TornadoVortex.d.ts +33 -0
- package/lib/components/TornadoVortex/index.d.ts +2 -0
- package/lib/components/TornadoVortex/useTornadoVortex.d.ts +17 -0
- package/lib/index.cjs.js +1 -0
- package/{dist → lib}/index.d.ts +18 -4
- package/lib/index.es.js +10844 -0
- package/package.json +8 -8
- package/dist/components/ConstellationMap/ConstellationMap.d.ts +0 -42
- package/dist/components/ConstellationMap/ConstellationMap.stories.d.ts +0 -9
- package/dist/components/ConstellationMap/index.d.ts +0 -3
- package/dist/components/ConstellationMap/useConstellationMap.d.ts +0 -22
- package/dist/components/ParticleField/index.d.ts +0 -2
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -9077
- package/dist/logo.png +0 -0
- package/dist/robots.txt +0 -4
- package/dist/sitemap.xml +0 -168
- /package/{dist → lib}/components/AntColony/AntColony.d.ts +0 -0
- /package/{dist → lib}/components/AntColony/index.d.ts +0 -0
- /package/{dist → lib}/components/AntColony/useAntColony.d.ts +0 -0
- /package/{dist → lib}/components/AudioVisualizer/AudioVisualizer.d.ts +0 -0
- /package/{dist → lib}/components/AudioVisualizer/AudioVisualizer.stories.d.ts +0 -0
- /package/{dist → lib}/components/AudioVisualizer/index.d.ts +0 -0
- /package/{dist → lib}/components/AudioVisualizer/useAudioVisualizer.d.ts +0 -0
- /package/{dist → lib}/components/AuroraBorealis/AuroraBorealis.d.ts +0 -0
- /package/{dist → lib}/components/AuroraBorealis/index.d.ts +0 -0
- /package/{dist → lib}/components/AuroraBorealis/useAuroraBorealis.d.ts +0 -0
- /package/{dist → lib}/components/Boids/Boids.d.ts +0 -0
- /package/{dist → lib}/components/Boids/index.d.ts +0 -0
- /package/{dist → lib}/components/Boids/useBoids.d.ts +0 -0
- /package/{dist → lib}/components/ClothSimulation/ClothSimulation.d.ts +0 -0
- /package/{dist → lib}/components/ClothSimulation/index.d.ts +0 -0
- /package/{dist → lib}/components/ClothSimulation/useClothSimulation.d.ts +0 -0
- /package/{dist → lib}/components/Confetti/Confetti.d.ts +0 -0
- /package/{dist → lib}/components/Confetti/Confetti.stories.d.ts +0 -0
- /package/{dist → lib}/components/Confetti/index.d.ts +0 -0
- /package/{dist → lib}/components/Confetti/useConfetti.d.ts +0 -0
- /package/{dist → lib}/components/CrystalGrowth/CrystalGrowth.d.ts +0 -0
- /package/{dist → lib}/components/CrystalGrowth/index.d.ts +0 -0
- /package/{dist → lib}/components/CrystalGrowth/useCrystalGrowth.d.ts +0 -0
- /package/{dist → lib}/components/DiffusionAggregation/DiffusionAggregation.d.ts +0 -0
- /package/{dist → lib}/components/DiffusionAggregation/index.d.ts +0 -0
- /package/{dist → lib}/components/DiffusionAggregation/useDiffusionAggregation.d.ts +0 -0
- /package/{dist → lib}/components/FireEffect/FireEffect.stories.d.ts +0 -0
- /package/{dist → lib}/components/FireEffect/index.d.ts +0 -0
- /package/{dist → lib}/components/Fireworks/Fireworks.d.ts +0 -0
- /package/{dist → lib}/components/Fireworks/index.d.ts +0 -0
- /package/{dist → lib}/components/Fireworks/useFireworks.d.ts +0 -0
- /package/{dist → lib}/components/FlowField/useFlowField.d.ts +0 -0
- /package/{dist → lib}/components/FluidSimulation/useFluidSimulation.d.ts +0 -0
- /package/{dist → lib}/components/GameOfLife/GameOfLife.d.ts +0 -0
- /package/{dist → lib}/components/GameOfLife/index.d.ts +0 -0
- /package/{dist → lib}/components/GameOfLife/useGameOfLife.d.ts +0 -0
- /package/{dist → lib}/components/GlitchOverlay/index.d.ts +0 -0
- /package/{dist → lib}/components/InkBleed/InkBleed.d.ts +0 -0
- /package/{dist → lib}/components/InkBleed/index.d.ts +0 -0
- /package/{dist → lib}/components/InkBleed/useInkBleed.d.ts +0 -0
- /package/{dist → lib}/components/Kaleidoscope/Kaleidoscope.d.ts +0 -0
- /package/{dist → lib}/components/Kaleidoscope/index.d.ts +0 -0
- /package/{dist → lib}/components/Kaleidoscope/useKaleidoscope.d.ts +0 -0
- /package/{dist → lib}/components/LSystem/LSystem.d.ts +0 -0
- /package/{dist → lib}/components/LSystem/index.d.ts +0 -0
- /package/{dist → lib}/components/LSystem/useLSystem.d.ts +0 -0
- /package/{dist → lib}/components/Lightning/Lightning.d.ts +0 -0
- /package/{dist → lib}/components/Lightning/index.d.ts +0 -0
- /package/{dist → lib}/components/Lightning/useLightning.d.ts +0 -0
- /package/{dist → lib}/components/Lissajous/Lissajous.d.ts +0 -0
- /package/{dist → lib}/components/Lissajous/index.d.ts +0 -0
- /package/{dist → lib}/components/Lissajous/useLissajous.d.ts +0 -0
- /package/{dist → lib}/components/LiveChart/LiveChart.d.ts +0 -0
- /package/{dist → lib}/components/LiveChart/index.d.ts +0 -0
- /package/{dist → lib}/components/LiveChart/useLiveChart.d.ts +0 -0
- /package/{dist → lib}/components/MagneticBlob/useMagneticBlob.d.ts +0 -0
- /package/{dist → lib}/components/MagneticField/MagneticField.d.ts +0 -0
- /package/{dist → lib}/components/MagneticField/index.d.ts +0 -0
- /package/{dist → lib}/components/MagneticField/useMagneticField.d.ts +0 -0
- /package/{dist → lib}/components/Mandala/Mandala.d.ts +0 -0
- /package/{dist → lib}/components/Mandala/index.d.ts +0 -0
- /package/{dist → lib}/components/Mandala/useMandala.d.ts +0 -0
- /package/{dist → lib}/components/MatrixRain/MatrixRain.d.ts +0 -0
- /package/{dist → lib}/components/MatrixRain/MatrixRain.stories.d.ts +0 -0
- /package/{dist → lib}/components/MatrixRain/index.d.ts +0 -0
- /package/{dist → lib}/components/MatrixRain/useMatrixRain.d.ts +0 -0
- /package/{dist → lib}/components/Metaballs/Metaballs.d.ts +0 -0
- /package/{dist → lib}/components/Metaballs/index.d.ts +0 -0
- /package/{dist → lib}/components/Metaballs/useMetaballs.d.ts +0 -0
- /package/{dist → lib}/components/NeuralWeb/NeuralWeb.d.ts +0 -0
- /package/{dist → lib}/components/NeuralWeb/index.d.ts +0 -0
- /package/{dist → lib}/components/NeuralWeb/useNeuralWeb.d.ts +0 -0
- /package/{dist → lib}/components/NoiseGradient/NoiseGradient.d.ts +0 -0
- /package/{dist → lib}/components/NoiseGradient/NoiseGradient.stories.d.ts +0 -0
- /package/{dist → lib}/components/NoiseGradient/index.d.ts +0 -0
- /package/{dist → lib}/components/NoiseGradient/useNoiseGradient.d.ts +0 -0
- /package/{dist → lib}/components/ParticleField/ParticleField.stories.d.ts +0 -0
- /package/{dist → lib}/components/ParticleText/ParticleText.d.ts +0 -0
- /package/{dist → lib}/components/ParticleText/index.d.ts +0 -0
- /package/{dist → lib}/components/ParticleText/useParticleText.d.ts +0 -0
- /package/{dist → lib}/components/PendulaWave/PendulaWave.d.ts +0 -0
- /package/{dist → lib}/components/PendulaWave/index.d.ts +0 -0
- /package/{dist → lib}/components/PendulaWave/usePendulaWave.d.ts +0 -0
- /package/{dist → lib}/components/PixelDissolve/PixelDissolve.d.ts +0 -0
- /package/{dist → lib}/components/PixelDissolve/PixelDissolve.stories.d.ts +0 -0
- /package/{dist → lib}/components/PixelDissolve/index.d.ts +0 -0
- /package/{dist → lib}/components/PixelDissolve/usePixelDissolve.d.ts +0 -0
- /package/{dist → lib}/components/Rain/Rain.d.ts +0 -0
- /package/{dist → lib}/components/Rain/index.d.ts +0 -0
- /package/{dist → lib}/components/Rain/useRain.d.ts +0 -0
- /package/{dist → lib}/components/ReactionDiffusion/ReactionDiffusion.d.ts +0 -0
- /package/{dist → lib}/components/ReactionDiffusion/index.d.ts +0 -0
- /package/{dist → lib}/components/ReactionDiffusion/useReactionDiffusion.d.ts +0 -0
- /package/{dist → lib}/components/SandSimulation/SandSimulation.d.ts +0 -0
- /package/{dist → lib}/components/SandSimulation/index.d.ts +0 -0
- /package/{dist → lib}/components/SandSimulation/useSandSimulation.d.ts +0 -0
- /package/{dist → lib}/components/Shockwave/Shockwave.d.ts +0 -0
- /package/{dist → lib}/components/Shockwave/index.d.ts +0 -0
- /package/{dist → lib}/components/Shockwave/useShockwave.d.ts +0 -0
- /package/{dist → lib}/components/SlimeMold/SlimeMold.d.ts +0 -0
- /package/{dist → lib}/components/SlimeMold/index.d.ts +0 -0
- /package/{dist → lib}/components/SlimeMold/useSlimeMold.d.ts +0 -0
- /package/{dist → lib}/components/Spotlight/Spotlight.d.ts +0 -0
- /package/{dist → lib}/components/Spotlight/index.d.ts +0 -0
- /package/{dist → lib}/components/Spotlight/useSpotlight.d.ts +0 -0
- /package/{dist → lib}/components/Starfield/Starfield.stories.d.ts +0 -0
- /package/{dist → lib}/components/Starfield/index.d.ts +0 -0
- /package/{dist → lib}/components/TerrainMesh/TerrainMesh.d.ts +0 -0
- /package/{dist → lib}/components/TerrainMesh/index.d.ts +0 -0
- /package/{dist → lib}/components/TerrainMesh/useTerrainMesh.d.ts +0 -0
- /package/{dist → lib}/components/VoronoiCells/VoronoiCells.d.ts +0 -0
- /package/{dist → lib}/components/VoronoiCells/index.d.ts +0 -0
- /package/{dist → lib}/components/VoronoiCells/useVoronoiCells.d.ts +0 -0
- /package/{dist → lib}/components/WatercolorBloom/WatercolorBloom.d.ts +0 -0
- /package/{dist → lib}/components/WatercolorBloom/index.d.ts +0 -0
- /package/{dist → lib}/components/WatercolorBloom/useWatercolorBloom.d.ts +0 -0
- /package/{dist → lib}/components/WaveInterference/WaveInterference.d.ts +0 -0
- /package/{dist → lib}/components/WaveInterference/index.d.ts +0 -0
- /package/{dist → lib}/components/WaveInterference/useWaveInterference.d.ts +0 -0
- /package/{dist → lib}/components/Wormhole/Wormhole.d.ts +0 -0
- /package/{dist → lib}/components/Wormhole/index.d.ts +0 -0
- /package/{dist → lib}/components/Wormhole/useWormhole.d.ts +0 -0
- /package/{dist → lib}/hooks/useCanvasSetup.d.ts +0 -0
- /package/{dist → lib}/types/index.d.ts +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# own-the-canvas
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**50+ canvas-based React visual components. Zero dependencies. TypeScript.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/own-the-canvas)
|
|
10
10
|
[](LICENSE)
|
|
@@ -190,6 +190,7 @@ import { GlitchOverlay } from "own-the-canvas";
|
|
|
190
190
|
| --- | --- | --- | --- |
|
|
191
191
|
| `intensity` | `number` | `0.6` | Glitch probability 0–1 |
|
|
192
192
|
| `rgbShift` | `number` | `8` | RGB color shift in px |
|
|
193
|
+
| `rgbShiftColor` | `string` | `"#ff0000"` | RGB split primary color — complement used for opposing channel |
|
|
193
194
|
| `scanlines` | `boolean` | `true` | CRT scanline overlay |
|
|
194
195
|
| `blockGlitch` | `boolean` | `true` | Block-slice glitch artifacts |
|
|
195
196
|
| `flickerRate` | `number` | `0.02` | Screen flicker rate 0–1 |
|
|
@@ -255,6 +256,7 @@ import { FireEffect } from "own-the-canvas";
|
|
|
255
256
|
| Prop | Type | Default | Description |
|
|
256
257
|
| --- | --- | --- | --- |
|
|
257
258
|
| `palette` | `"smoke" \| "inferno" \| "toxic" \| "ice" \| "plasma"` | `"smoke"` | Color theme |
|
|
259
|
+
| `customColors` | `string[]` | `undefined` | Custom gradient — overrides palette when ≥2 colors |
|
|
258
260
|
| `intensity` | `number` | `0.95` | Flame intensity 0–1 |
|
|
259
261
|
| `windStrength` | `number` | `0.3` | Horizontal wind -1 to 1 |
|
|
260
262
|
| `cooling` | `number` | `0.3` | Cooling rate — higher = shorter flames |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type BlackHolePreset = "default" | "cosmic" | "inferno" | "neon" | "void";
|
|
4
|
+
export interface BlackHoleProps extends BaseCanvasProps {
|
|
5
|
+
/** Accretion disk particle color (default: "#ffffff") */
|
|
6
|
+
diskColor?: string;
|
|
7
|
+
/** Canvas background (default: "#111111") */
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
/** Number of disk particles (default: 300) */
|
|
10
|
+
particleCount?: number;
|
|
11
|
+
/** Gravitational pull strength (default: 200) */
|
|
12
|
+
gravity?: number;
|
|
13
|
+
/** Event horizon radius in px (default: 30) */
|
|
14
|
+
eventHorizonRadius?: number;
|
|
15
|
+
/** Accretion disk radial extent in px (default: 120) */
|
|
16
|
+
diskWidth?: number;
|
|
17
|
+
/** Polar jet stream color (default: "#6b7280") */
|
|
18
|
+
jetColor?: string;
|
|
19
|
+
/** Show polar particle jets (default: true) */
|
|
20
|
+
showJets?: boolean;
|
|
21
|
+
/** Background grid lensing distortion (default: true) */
|
|
22
|
+
lensing?: boolean;
|
|
23
|
+
/** Animation speed multiplier (default: 1) */
|
|
24
|
+
speed?: number;
|
|
25
|
+
/** Cursor shifts the singularity position (default: true) */
|
|
26
|
+
interactive?: boolean;
|
|
27
|
+
/** Named preset */
|
|
28
|
+
preset?: BlackHolePreset | string;
|
|
29
|
+
}
|
|
30
|
+
export declare const BlackHole: import('react').ForwardRefExoticComponent<BlackHoleProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseBlackHoleOptions {
|
|
4
|
+
diskColor: string;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
particleCount: number;
|
|
7
|
+
gravity: number;
|
|
8
|
+
eventHorizonRadius: number;
|
|
9
|
+
diskWidth: number;
|
|
10
|
+
jetColor: string;
|
|
11
|
+
showJets: boolean;
|
|
12
|
+
lensing: boolean;
|
|
13
|
+
speed: number;
|
|
14
|
+
interactive: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function useBlackHole(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseBlackHoleOptions): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type BubbleUniversePreset = "default" | "soap" | "neon" | "deep" | "minimal";
|
|
4
|
+
export interface BubbleUniverseProps extends BaseCanvasProps {
|
|
5
|
+
/** Number of simultaneous bubbles (default: 15) */
|
|
6
|
+
bubbleCount?: number;
|
|
7
|
+
/** Minimum bubble radius in px (default: 20) */
|
|
8
|
+
minRadius?: number;
|
|
9
|
+
/** Maximum bubble radius in px (default: 50) */
|
|
10
|
+
maxRadius?: number;
|
|
11
|
+
/** Canvas background (default: "#111111") */
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
/** Specular highlight color (default: "#ffffff") */
|
|
14
|
+
shimmerColor?: string;
|
|
15
|
+
/** Click to pop bubbles with particle burst (default: true) */
|
|
16
|
+
popEffect?: boolean;
|
|
17
|
+
/** Downward gravity force (default: 0.02) */
|
|
18
|
+
gravity?: number;
|
|
19
|
+
/** Velocity friction per frame (default: 0.995) */
|
|
20
|
+
friction?: number;
|
|
21
|
+
/** Hover pushes bubbles; click to pop (default: true) */
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
/** Bubbles merge when overlapping significantly (default: true) */
|
|
24
|
+
mergeOnCollide?: boolean;
|
|
25
|
+
/** Iridescent glow on bubbles (default: true) */
|
|
26
|
+
glowEffect?: boolean;
|
|
27
|
+
/** Named preset */
|
|
28
|
+
preset?: BubbleUniversePreset | string;
|
|
29
|
+
}
|
|
30
|
+
export declare const BubbleUniverse: import('react').ForwardRefExoticComponent<BubbleUniverseProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseBubbleUniverseOptions {
|
|
4
|
+
bubbleCount: number;
|
|
5
|
+
minRadius: number;
|
|
6
|
+
maxRadius: number;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
shimmerColor: string;
|
|
9
|
+
popEffect: boolean;
|
|
10
|
+
gravity: number;
|
|
11
|
+
friction: number;
|
|
12
|
+
interactive: boolean;
|
|
13
|
+
mergeOnCollide: boolean;
|
|
14
|
+
glowEffect: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function useBubbleUniverse(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseBubbleUniverseOptions): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type DragonCursorPreset = "default" | "emerald" | "inferno" | "void" | "ice";
|
|
4
|
+
export interface DragonCursorProps extends BaseCanvasProps {
|
|
5
|
+
/** Body joint count (default: 20) */
|
|
6
|
+
segmentCount?: number;
|
|
7
|
+
/** Head radius in px (default: 18) */
|
|
8
|
+
segmentSize?: number;
|
|
9
|
+
/** Dragon body color (default: "#ffffff") */
|
|
10
|
+
bodyColor?: string;
|
|
11
|
+
/** Eye pupil color (default: "#111111") */
|
|
12
|
+
eyeColor?: string;
|
|
13
|
+
/** Fire breath color (default: "#ffffff") */
|
|
14
|
+
fireColor?: string;
|
|
15
|
+
/** Canvas background (default: "transparent") */
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/** Cursor follow lerp speed 0–1 (default: 0.15) */
|
|
18
|
+
followSpeed?: number;
|
|
19
|
+
/** Wing length in px (default: 60) */
|
|
20
|
+
wingSpan?: number;
|
|
21
|
+
/** Show fire breath particles (default: true) */
|
|
22
|
+
showFire?: boolean;
|
|
23
|
+
/** Dragon follows cursor (default: true) */
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
/** Named preset */
|
|
26
|
+
preset?: DragonCursorPreset | string;
|
|
27
|
+
}
|
|
28
|
+
export declare const DragonCursor: import('react').ForwardRefExoticComponent<DragonCursorProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseDragonCursorOptions {
|
|
4
|
+
segmentCount: number;
|
|
5
|
+
segmentSize: number;
|
|
6
|
+
bodyColor: string;
|
|
7
|
+
eyeColor: string;
|
|
8
|
+
fireColor: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
followSpeed: number;
|
|
11
|
+
wingSpan: number;
|
|
12
|
+
showFire: boolean;
|
|
13
|
+
interactive: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function useDragonCursor(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseDragonCursorOptions): void;
|
|
@@ -5,6 +5,8 @@ type FirePreset = "default" | "inferno" | "toxic" | "ice" | "plasma";
|
|
|
5
5
|
export interface FireEffectProps extends BaseCanvasProps {
|
|
6
6
|
/** Color theme (default: "smoke") */
|
|
7
7
|
palette?: FirePalette;
|
|
8
|
+
/** Custom gradient colors — overrides palette when ≥2 colors provided (default: undefined) */
|
|
9
|
+
customColors?: string[];
|
|
8
10
|
/** Flame intensity 0–1 (default: 0.95) */
|
|
9
11
|
intensity?: number;
|
|
10
12
|
/** Wind horizontal strength -1 to 1 (default: 0.3) */
|
|
@@ -3,6 +3,7 @@ import { RefObject } from 'react';
|
|
|
3
3
|
export type FirePalette = "inferno" | "toxic" | "ice" | "plasma" | "smoke";
|
|
4
4
|
export interface UseFireEffectOptions {
|
|
5
5
|
palette: FirePalette;
|
|
6
|
+
customColors?: string[];
|
|
6
7
|
intensity: number;
|
|
7
8
|
windStrength: number;
|
|
8
9
|
windDirection: number;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { BaseCanvasProps } from '../../types';
|
|
2
2
|
|
|
3
3
|
type FlowFieldPreset = "default" | "neon" | "ocean" | "lava" | "forest" | "monochrome";
|
|
4
|
+
interface FlowFieldPresetValues {
|
|
5
|
+
particleCount?: number;
|
|
6
|
+
colors?: string[];
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
noiseScale?: number;
|
|
9
|
+
speed?: number;
|
|
10
|
+
curl?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const PRESETS: Record<FlowFieldPreset, FlowFieldPresetValues>;
|
|
4
13
|
export interface FlowFieldProps extends BaseCanvasProps {
|
|
5
14
|
/** Number of flow particles (default: 800) */
|
|
6
15
|
particleCount?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FlowField } from './FlowField';
|
|
1
|
+
export { FlowField, PRESETS } from './FlowField';
|
|
2
2
|
export type { FlowFieldProps } from './FlowField';
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { BaseCanvasProps } from '../../types';
|
|
2
2
|
|
|
3
3
|
type FluidPreset = "default" | "ink" | "neon" | "lava" | "ocean" | "smoke";
|
|
4
|
+
interface FluidPresetValues {
|
|
5
|
+
resolution?: number;
|
|
6
|
+
viscosity?: number;
|
|
7
|
+
diffusion?: number;
|
|
8
|
+
dissipation?: number;
|
|
9
|
+
inkColors?: string[];
|
|
10
|
+
glowEffect?: boolean;
|
|
11
|
+
glowBlur?: number;
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
autoInk?: boolean;
|
|
14
|
+
autoInkInterval?: number;
|
|
15
|
+
mouseForce?: number;
|
|
16
|
+
inkRadius?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const PRESETS: Record<FluidPreset, FluidPresetValues>;
|
|
4
19
|
export interface FluidSimulationProps extends BaseCanvasProps {
|
|
5
20
|
/** Grid resolution (32–128) — lower is faster (default: 80) */
|
|
6
21
|
resolution?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FluidSimulation } from './FluidSimulation';
|
|
1
|
+
export { FluidSimulation, PRESETS } from './FluidSimulation';
|
|
2
2
|
export type { FluidSimulationProps } from './FluidSimulation';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type GalaxySpiralPreset = "default" | "andromeda" | "neon" | "void" | "golden";
|
|
4
|
+
export interface GalaxySpiralProps extends BaseCanvasProps {
|
|
5
|
+
/** Total star particle count (default: 3000) */
|
|
6
|
+
starCount?: number;
|
|
7
|
+
/** Number of spiral arms (default: 2) */
|
|
8
|
+
armCount?: number;
|
|
9
|
+
/** Arm winding tightness (default: 0.5) */
|
|
10
|
+
armTightness?: number;
|
|
11
|
+
/** Galactic core color (default: "#ffffff") */
|
|
12
|
+
coreColor?: string;
|
|
13
|
+
/** Outer disk star color (default: "#6b7280") */
|
|
14
|
+
diskColor?: string;
|
|
15
|
+
/** Canvas background (default: "#111111") */
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/** Rotation speed in radians/frame (default: 0.0003) */
|
|
18
|
+
rotationSpeed?: number;
|
|
19
|
+
/** Initial viewing tilt in radians (default: 0.3) */
|
|
20
|
+
tiltX?: number;
|
|
21
|
+
/** Cursor tilts viewing angle (default: true) */
|
|
22
|
+
interactive?: boolean;
|
|
23
|
+
/** Core radial glow overlay (default: true) */
|
|
24
|
+
coreGlow?: boolean;
|
|
25
|
+
/** Core glow shadow blur (default: 30) */
|
|
26
|
+
glowBlur?: number;
|
|
27
|
+
/** Named preset */
|
|
28
|
+
preset?: GalaxySpiralPreset | string;
|
|
29
|
+
}
|
|
30
|
+
export declare const GalaxySpiral: import('react').ForwardRefExoticComponent<GalaxySpiralProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseGalaxySpiralOptions {
|
|
4
|
+
starCount: number;
|
|
5
|
+
armCount: number;
|
|
6
|
+
armTightness: number;
|
|
7
|
+
coreColor: string;
|
|
8
|
+
diskColor: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
rotationSpeed: number;
|
|
11
|
+
tiltX: number;
|
|
12
|
+
interactive: boolean;
|
|
13
|
+
coreGlow: boolean;
|
|
14
|
+
glowBlur: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function useGalaxySpiral(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseGalaxySpiralOptions): void;
|
|
@@ -22,8 +22,10 @@ export interface GlitchOverlayProps extends BaseCanvasProps {
|
|
|
22
22
|
noiseOpacity?: number;
|
|
23
23
|
/** Screen flicker rate 0–1 (default: 0.02) */
|
|
24
24
|
flickerRate?: number;
|
|
25
|
-
/** Glitch bar color (default: "#
|
|
25
|
+
/** Glitch bar color (default: "#ffffff") */
|
|
26
26
|
color?: string;
|
|
27
|
+
/** RGB channel split color — complement is used for the opposing channel (default: "#ff0000") */
|
|
28
|
+
rgbShiftColor?: string;
|
|
27
29
|
/** Enable animation (default: true) */
|
|
28
30
|
animated?: boolean;
|
|
29
31
|
/** Canvas background (default: "transparent") */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type KoiPondPreset = "default" | "koi" | "night" | "lotus" | "neon";
|
|
4
|
+
export interface KoiPondProps extends BaseCanvasProps {
|
|
5
|
+
/** Number of koi fish (default: 6) */
|
|
6
|
+
fishCount?: number;
|
|
7
|
+
/** Primary fish body color (default: "#ffffff") */
|
|
8
|
+
fishColor?: string;
|
|
9
|
+
/** Scale accent color (default: "#6b7280") */
|
|
10
|
+
scaleColor?: string;
|
|
11
|
+
/** Water background color (default: "#111111") */
|
|
12
|
+
waterColor?: string;
|
|
13
|
+
/** Ripple ring color (default: "#6b7280") */
|
|
14
|
+
rippleColor?: string;
|
|
15
|
+
/** Lily pad color (default: "#ffffff") */
|
|
16
|
+
lilyColor?: string;
|
|
17
|
+
/** Fish movement speed multiplier (default: 1) */
|
|
18
|
+
speed?: number;
|
|
19
|
+
/** Cursor causes ripples (default: true) */
|
|
20
|
+
interactive?: boolean;
|
|
21
|
+
/** Show lily pads (default: true) */
|
|
22
|
+
showLilies?: boolean;
|
|
23
|
+
/** Animated caustic light patterns (default: true) */
|
|
24
|
+
caustics?: boolean;
|
|
25
|
+
/** Named preset */
|
|
26
|
+
preset?: KoiPondPreset | string;
|
|
27
|
+
}
|
|
28
|
+
export declare const KoiPond: import('react').ForwardRefExoticComponent<KoiPondProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseKoiPondOptions {
|
|
4
|
+
fishCount: number;
|
|
5
|
+
fishColor: string;
|
|
6
|
+
scaleColor: string;
|
|
7
|
+
waterColor: string;
|
|
8
|
+
rippleColor: string;
|
|
9
|
+
lilyColor: string;
|
|
10
|
+
speed: number;
|
|
11
|
+
interactive: boolean;
|
|
12
|
+
showLilies: boolean;
|
|
13
|
+
caustics: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function useKoiPond(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseKoiPondOptions): void;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { BaseCanvasProps } from '../../types';
|
|
2
2
|
|
|
3
3
|
type MagneticBlobPreset = "default" | "neon" | "plasma" | "ocean" | "lava" | "minimal";
|
|
4
|
+
interface MagneticBlobPresetValues {
|
|
5
|
+
count?: number;
|
|
6
|
+
colors?: string[];
|
|
7
|
+
radius?: number;
|
|
8
|
+
speed?: number;
|
|
9
|
+
magnetStrength?: number;
|
|
10
|
+
magnetRadius?: number;
|
|
11
|
+
threshold?: number;
|
|
12
|
+
glowEffect?: boolean;
|
|
13
|
+
glowBlur?: number;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
animated?: boolean;
|
|
16
|
+
followMouse?: boolean;
|
|
17
|
+
wanderStrength?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const PRESETS: Record<MagneticBlobPreset, MagneticBlobPresetValues>;
|
|
4
20
|
export interface MagneticBlobProps extends BaseCanvasProps {
|
|
5
21
|
/** Number of blobs (default: 5) */
|
|
6
22
|
count?: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MagneticBlob } from './MagneticBlob';
|
|
1
|
+
export { MagneticBlob, PRESETS } from './MagneticBlob';
|
|
2
2
|
export type { MagneticBlobProps } from './MagneticBlob';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BaseCanvasProps } from '../../types';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
export type ParticleLineStyle = "solid" | "dashed";
|
|
4
|
+
type ParticlePreset = "default" | "galaxy" | "snow" | "minimal" | "ocean" | "cosmos" | "aurora" | "gold";
|
|
4
5
|
export interface ParticleFieldProps extends BaseCanvasProps {
|
|
5
6
|
/** Number of particles (default: 120) */
|
|
6
7
|
particleCount?: number;
|
|
7
|
-
/** Particle fill color (default: "#
|
|
8
|
+
/** Particle fill color (default: "#ffffff") */
|
|
8
9
|
particleColor?: string;
|
|
9
|
-
/** Connection line color (default: "#
|
|
10
|
+
/** Connection line color (default: "#6b7280") */
|
|
10
11
|
lineColor?: string;
|
|
11
12
|
/** Max distance for drawing lines (default: 120) */
|
|
12
13
|
lineDistance?: number;
|
|
@@ -32,7 +33,27 @@ export interface ParticleFieldProps extends BaseCanvasProps {
|
|
|
32
33
|
lineWidth?: number;
|
|
33
34
|
/** Connection line max opacity (default: 0.6) */
|
|
34
35
|
lineOpacity?: number;
|
|
35
|
-
/**
|
|
36
|
+
/** Wrap particles around edges instead of bouncing (default: false) */
|
|
37
|
+
wrapEdges?: boolean;
|
|
38
|
+
/** Enable twinkling opacity animation (default: false) */
|
|
39
|
+
twinkle?: boolean;
|
|
40
|
+
/** Twinkling animation speed (default: 0.03) */
|
|
41
|
+
twinkleSpeed?: number;
|
|
42
|
+
/** Twinkling opacity amplitude 0–1 (default: 0.4) */
|
|
43
|
+
twinkleAmplitude?: number;
|
|
44
|
+
/** Enable glow shadow on particles (default: false) */
|
|
45
|
+
glowParticles?: boolean;
|
|
46
|
+
/** Glow shadow blur in px (default: 15) */
|
|
47
|
+
glowBlur?: number;
|
|
48
|
+
/** Connection line stroke style (default: "solid") */
|
|
49
|
+
lineStyle?: ParticleLineStyle;
|
|
50
|
+
/** Enable drag-to-reposition individual particles (default: false) */
|
|
51
|
+
dragParticles?: boolean;
|
|
52
|
+
/** Drag detection radius in px (default: 20) */
|
|
53
|
+
dragRadius?: number;
|
|
54
|
+
/** Initial velocity multiplier — scales vx/vy at spawn (default: 2) */
|
|
55
|
+
velocityMultiplier?: number;
|
|
56
|
+
/** Named preset: "default" | "galaxy" | "snow" | "minimal" | "ocean" | "cosmos" | "aurora" | "gold" */
|
|
36
57
|
preset?: ParticlePreset | string;
|
|
37
58
|
}
|
|
38
59
|
export declare const ParticleField: import('react').ForwardRefExoticComponent<ParticleFieldProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
@@ -16,5 +16,15 @@ export interface UseParticleFieldOptions {
|
|
|
16
16
|
maxVelocityMultiplier: number;
|
|
17
17
|
lineWidth: number;
|
|
18
18
|
lineOpacity: number;
|
|
19
|
+
wrapEdges: boolean;
|
|
20
|
+
twinkle: boolean;
|
|
21
|
+
twinkleSpeed: number;
|
|
22
|
+
twinkleAmplitude: number;
|
|
23
|
+
glowParticles: boolean;
|
|
24
|
+
glowBlur: number;
|
|
25
|
+
lineStyle: "solid" | "dashed";
|
|
26
|
+
dragParticles: boolean;
|
|
27
|
+
dragRadius: number;
|
|
28
|
+
velocityMultiplier: number;
|
|
19
29
|
}
|
|
20
30
|
export declare function useParticleField(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseParticleFieldOptions): void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type SakuraBlossomPreset = "default" | "sakura" | "autumn" | "snow" | "neon";
|
|
4
|
+
export interface SakuraBlossomProps extends BaseCanvasProps {
|
|
5
|
+
/** Number of petals (default: 80) */
|
|
6
|
+
petalCount?: number;
|
|
7
|
+
/** Petal color (default: "#ffffff") */
|
|
8
|
+
petalColor?: string;
|
|
9
|
+
/** Petal size in px (default: 8) */
|
|
10
|
+
petalSize?: number;
|
|
11
|
+
/** Canvas background (default: "#111111") */
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
/** Downward gravity force (default: 0.06) */
|
|
14
|
+
gravity?: number;
|
|
15
|
+
/** Base horizontal wind strength (default: 0.8) */
|
|
16
|
+
windStrength?: number;
|
|
17
|
+
/** Random wind gusts (default: true) */
|
|
18
|
+
windGusts?: boolean;
|
|
19
|
+
/** Petals accumulate at bottom (default: true) */
|
|
20
|
+
showAccumulation?: boolean;
|
|
21
|
+
/** Max accumulation height in px (default: 40) */
|
|
22
|
+
maxAccumulation?: number;
|
|
23
|
+
/** Named preset */
|
|
24
|
+
preset?: SakuraBlossomPreset | string;
|
|
25
|
+
}
|
|
26
|
+
export declare const SakuraBlossom: import('react').ForwardRefExoticComponent<SakuraBlossomProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseSakuraBlossomOptions {
|
|
4
|
+
petalCount: number;
|
|
5
|
+
petalColor: string;
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
gravity: number;
|
|
8
|
+
windStrength: number;
|
|
9
|
+
windGusts: boolean;
|
|
10
|
+
showAccumulation: boolean;
|
|
11
|
+
maxAccumulation: number;
|
|
12
|
+
petalSize: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function useSakuraBlossom(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseSakuraBlossomOptions): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseCanvasProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type SolarFlarePreset = "default" | "inferno" | "plasma" | "neon" | "white-dwarf";
|
|
4
|
+
export interface SolarFlareProps extends BaseCanvasProps {
|
|
5
|
+
/** Photosphere color (default: "#ffffff") */
|
|
6
|
+
sunColor?: string;
|
|
7
|
+
/** Corona glow color (default: "#6b7280") */
|
|
8
|
+
coronaColor?: string;
|
|
9
|
+
/** Eruption/flare color (default: "#ffffff") */
|
|
10
|
+
flareColor?: string;
|
|
11
|
+
/** Canvas background (default: "#111111") */
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
/** Sun radius as fraction of min(w,h)/2 (default: 0.35) */
|
|
14
|
+
sunRadius?: number;
|
|
15
|
+
/** Number of convection cells on surface (default: 20) */
|
|
16
|
+
convectionCells?: number;
|
|
17
|
+
/** Simultaneous active flares (default: 3) */
|
|
18
|
+
flareCount?: number;
|
|
19
|
+
/** Auto-spawn flares (default: true) */
|
|
20
|
+
autoFlare?: boolean;
|
|
21
|
+
/** Interval between auto-flares in ms (default: 3000) */
|
|
22
|
+
autoFlareInterval?: number;
|
|
23
|
+
/** Click to trigger flare at cursor angle (default: true) */
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
/** Iridescent glow (default: true) */
|
|
26
|
+
glowEffect?: boolean;
|
|
27
|
+
/** Glow blur radius in px (default: 40) */
|
|
28
|
+
glowBlur?: number;
|
|
29
|
+
/** Animation speed multiplier (default: 1) */
|
|
30
|
+
speed?: number;
|
|
31
|
+
/** Named preset */
|
|
32
|
+
preset?: SolarFlarePreset | string;
|
|
33
|
+
}
|
|
34
|
+
export declare const SolarFlare: import('react').ForwardRefExoticComponent<SolarFlareProps & import('react').RefAttributes<HTMLCanvasElement>>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface UseSolarFlareOptions {
|
|
4
|
+
sunColor: string;
|
|
5
|
+
coronaColor: string;
|
|
6
|
+
flareColor: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
sunRadius: number;
|
|
9
|
+
convectionCells: number;
|
|
10
|
+
flareCount: number;
|
|
11
|
+
autoFlare: boolean;
|
|
12
|
+
autoFlareInterval: number;
|
|
13
|
+
interactive: boolean;
|
|
14
|
+
glowEffect: boolean;
|
|
15
|
+
glowBlur: number;
|
|
16
|
+
speed: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function useSolarFlare(canvasRef: RefObject<HTMLCanvasElement | null>, options: UseSolarFlareOptions): void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BaseCanvasProps } from '../../types';
|
|
2
|
-
import { SpirographColorMode } from './useSpirograph';
|
|
3
2
|
|
|
4
3
|
type SpirographPreset = "default" | "neon" | "prismatic" | "mandala" | "cosmic" | "minimal";
|
|
5
4
|
export interface SpirographProps extends BaseCanvasProps {
|
|
@@ -11,10 +10,8 @@ export interface SpirographProps extends BaseCanvasProps {
|
|
|
11
10
|
penDistance?: number;
|
|
12
11
|
/** Degrees drawn per frame (default: 2) */
|
|
13
12
|
speed?: number;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/** Secondary color for gradient colorMode (default: "#6b7280") */
|
|
17
|
-
color2?: string;
|
|
13
|
+
/** Stroke colors — each layer picks cyclically (default: ["#ffffff"]) */
|
|
14
|
+
colors?: string[];
|
|
18
15
|
/** Background fill color (default: "#111111") */
|
|
19
16
|
backgroundColor?: string;
|
|
20
17
|
/** Stroke line width (default: 1) */
|
|
@@ -27,8 +24,6 @@ export interface SpirographProps extends BaseCanvasProps {
|
|
|
27
24
|
autoReset?: boolean;
|
|
28
25
|
/** Number of overlapping curve layers with slight radius offsets (default: 1) */
|
|
29
26
|
layerCount?: number;
|
|
30
|
-
/** Color mode: "solid" | "cycle" | "gradient" (default: "solid") */
|
|
31
|
-
colorMode?: SpirographColorMode;
|
|
32
27
|
/** Rotational symmetry — draw N copies around center (default: 1) */
|
|
33
28
|
symmetry?: number;
|
|
34
29
|
/** Enable glow/shadow effect (default: false) */
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
|
|
3
|
-
export type SpirographColorMode = "solid" | "cycle" | "gradient";
|
|
4
3
|
export interface UseSpirographOptions {
|
|
5
4
|
outerRadius: number;
|
|
6
5
|
innerRadius: number;
|
|
7
6
|
penDistance: number;
|
|
8
7
|
speed: number;
|
|
9
|
-
|
|
10
|
-
color2: string;
|
|
8
|
+
colors: string[];
|
|
11
9
|
backgroundColor: string;
|
|
12
10
|
lineWidth: number;
|
|
13
11
|
trailFade: number;
|
|
14
12
|
animated: boolean;
|
|
15
13
|
autoReset: boolean;
|
|
16
14
|
layerCount: number;
|
|
17
|
-
colorMode: SpirographColorMode;
|
|
18
15
|
symmetry: number;
|
|
19
16
|
glowEffect: boolean;
|
|
20
17
|
glowBlur: number;
|