@remotion/starburst 4.0.469 → 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.
@@ -0,0 +1 @@
1
+ export declare const colorToRgb: (color: string) => [number, number, number];
@@ -1,17 +1,11 @@
1
1
  // src/starburst-effect.ts
2
2
  import { Internals } from "remotion";
3
3
 
4
- // src/hex-to-rgb.ts
5
- var hexToRgb = (hex) => {
6
- const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
7
- if (!result) {
8
- throw new Error(`Invalid hex color: ${hex}`);
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
- hexToRgb(c);
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 = hexToRgb(r.colors[i]);
296
- palettePixelData[i * 4] = Math.round(rgb[0] * 255);
297
- palettePixelData[i * 4 + 1] = Math.round(rgb[1] * 255);
298
- palettePixelData[i * 4 + 2] = Math.round(rgb[2] * 255);
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 = hexToRgb(colors[i]);
498
- pixelData[i * 4] = Math.round(rgb[0] * 255);
499
- pixelData[i * 4 + 1] = Math.round(rgb[1] * 255);
500
- pixelData[i * 4 + 2] = Math.round(rgb[2] * 255);
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.469",
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.469",
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.469",
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
  },