@remotion/starburst 4.0.470 → 4.0.471
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/color-to-rgb.d.ts +1 -0
- package/dist/esm/index.mjs +14 -20
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const colorToRgb: (color: string) => [number, number, number];
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
// src/starburst-effect.ts
|
|
2
2
|
import { Internals } from "remotion";
|
|
3
3
|
|
|
4
|
-
// src/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return [
|
|
11
|
-
parseInt(result[1], 16) / 255,
|
|
12
|
-
parseInt(result[2], 16) / 255,
|
|
13
|
-
parseInt(result[3], 16) / 255
|
|
14
|
-
];
|
|
4
|
+
// src/color-to-rgb.ts
|
|
5
|
+
import { NoReactInternals } from "remotion/no-react";
|
|
6
|
+
var colorToRgb = (color) => {
|
|
7
|
+
const packed = NoReactInternals.processColor(color);
|
|
8
|
+
return [packed >>> 16 & 255, packed >>> 8 & 255, packed & 255];
|
|
15
9
|
};
|
|
16
10
|
|
|
17
11
|
// src/starburst-effect.ts
|
|
@@ -91,7 +85,7 @@ var validateStarburstEffectParams = (params) => {
|
|
|
91
85
|
throw new RangeError(`"origin" must contain coordinates between 0 and 1, but got ${JSON.stringify(r.origin)}`);
|
|
92
86
|
}
|
|
93
87
|
for (const c of r.colors) {
|
|
94
|
-
|
|
88
|
+
colorToRgb(c);
|
|
95
89
|
}
|
|
96
90
|
};
|
|
97
91
|
var STARBURST_VS = `#version 300 es
|
|
@@ -292,10 +286,10 @@ var starburst = createEffect({
|
|
|
292
286
|
}
|
|
293
287
|
const { palettePixelData } = state;
|
|
294
288
|
for (let i = 0;i < r.colors.length; i++) {
|
|
295
|
-
const rgb =
|
|
296
|
-
palettePixelData[i * 4] =
|
|
297
|
-
palettePixelData[i * 4 + 1] =
|
|
298
|
-
palettePixelData[i * 4 + 2] =
|
|
289
|
+
const rgb = colorToRgb(r.colors[i]);
|
|
290
|
+
palettePixelData[i * 4] = rgb[0];
|
|
291
|
+
palettePixelData[i * 4 + 1] = rgb[1];
|
|
292
|
+
palettePixelData[i * 4 + 2] = rgb[2];
|
|
299
293
|
palettePixelData[i * 4 + 3] = 255;
|
|
300
294
|
}
|
|
301
295
|
}
|
|
@@ -494,10 +488,10 @@ var StarburstCanvas = ({
|
|
|
494
488
|
const rotationRad = rotation * Math.PI / 180;
|
|
495
489
|
const pixelData = new Uint8Array(colors.length * 4);
|
|
496
490
|
for (let i = 0;i < colors.length; i++) {
|
|
497
|
-
const rgb =
|
|
498
|
-
pixelData[i * 4] =
|
|
499
|
-
pixelData[i * 4 + 1] =
|
|
500
|
-
pixelData[i * 4 + 2] =
|
|
491
|
+
const rgb = colorToRgb(colors[i]);
|
|
492
|
+
pixelData[i * 4] = rgb[0];
|
|
493
|
+
pixelData[i * 4 + 1] = rgb[1];
|
|
494
|
+
pixelData[i * 4 + 2] = rgb[2];
|
|
501
495
|
pixelData[i * 4 + 3] = 255;
|
|
502
496
|
}
|
|
503
497
|
gl.activeTexture(gl.TEXTURE0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/starburst",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.471",
|
|
4
4
|
"description": "Starburst ray effect for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"remotion": "4.0.
|
|
27
|
+
"remotion": "4.0.471",
|
|
28
28
|
"zod": "4.3.6"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"react": "19.2.3",
|
|
44
44
|
"react-dom": "19.2.3",
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
45
|
+
"@remotion/eslint-config-internal": "4.0.471",
|
|
46
46
|
"eslint": "9.19.0",
|
|
47
47
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
48
48
|
},
|