chroma-noise 0.0.3 → 0.0.4
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/Gradient.svelte +4 -1
- package/package.json +1 -1
package/dist/Gradient.svelte
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { onMount, onDestroy } from 'svelte';
|
|
4
4
|
import type { Warp, Grain, GradientOptions } from './index.js';
|
|
5
5
|
import { hexToRgb, isBrowser } from './utils.js';
|
|
6
|
+
import gradientWorker from './gradient.worker.js?url';
|
|
6
7
|
|
|
7
8
|
let {
|
|
8
9
|
points = [],
|
|
@@ -100,7 +101,9 @@
|
|
|
100
101
|
if (!canvas || !isBrowser()) return;
|
|
101
102
|
currentState = 'loading';
|
|
102
103
|
|
|
103
|
-
worker = new Worker(
|
|
104
|
+
worker = new Worker(gradientWorker, {
|
|
105
|
+
type: 'module'
|
|
106
|
+
});
|
|
104
107
|
|
|
105
108
|
worker.onmessage = (event: MessageEvent) => {
|
|
106
109
|
const { type } = event.data;
|