@remotion/effects 4.0.499 → 4.0.501
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/esm/index.mjs +714 -58
- package/dist/esm/light-leak.mjs +418 -0
- package/dist/esm/starburst.mjs +347 -0
- package/dist/index.d.ts +2 -0
- package/dist/light-leak.d.ts +34 -0
- package/dist/starburst.d.ts +59 -0
- package/package.json +19 -3
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
// src/starburst.ts
|
|
2
|
+
import { Internals } from "remotion";
|
|
3
|
+
import { NoReactInternals } from "remotion/no-react";
|
|
4
|
+
var { createEffect, createWebGL2ContextError } = Internals;
|
|
5
|
+
var colorToRgb = (color) => {
|
|
6
|
+
const packed = NoReactInternals.processColor(color);
|
|
7
|
+
return [packed >>> 16 & 255, packed >>> 8 & 255, packed & 255];
|
|
8
|
+
};
|
|
9
|
+
var DEFAULT_ORIGIN = [0.5, 0.5];
|
|
10
|
+
var starburstEffectSchema = {
|
|
11
|
+
rays: {
|
|
12
|
+
type: "number",
|
|
13
|
+
min: 2,
|
|
14
|
+
max: 100,
|
|
15
|
+
step: 1,
|
|
16
|
+
default: undefined,
|
|
17
|
+
description: "Number of Rays",
|
|
18
|
+
hiddenFromList: false
|
|
19
|
+
},
|
|
20
|
+
colors: {
|
|
21
|
+
type: "array",
|
|
22
|
+
item: {
|
|
23
|
+
type: "color"
|
|
24
|
+
},
|
|
25
|
+
default: undefined,
|
|
26
|
+
minLength: 2,
|
|
27
|
+
newItemDefault: "#ff0000",
|
|
28
|
+
description: "Colors",
|
|
29
|
+
keyframable: false
|
|
30
|
+
},
|
|
31
|
+
rotation: {
|
|
32
|
+
type: "number",
|
|
33
|
+
min: 0,
|
|
34
|
+
max: 360,
|
|
35
|
+
step: 1,
|
|
36
|
+
default: 0,
|
|
37
|
+
description: "Rotation",
|
|
38
|
+
hiddenFromList: false
|
|
39
|
+
},
|
|
40
|
+
smoothness: {
|
|
41
|
+
type: "number",
|
|
42
|
+
min: 0,
|
|
43
|
+
max: 1,
|
|
44
|
+
step: 0.01,
|
|
45
|
+
default: 0,
|
|
46
|
+
description: "Edge Smoothness",
|
|
47
|
+
hiddenFromList: false
|
|
48
|
+
},
|
|
49
|
+
origin: {
|
|
50
|
+
type: "uv-coordinate",
|
|
51
|
+
min: 0,
|
|
52
|
+
max: 1,
|
|
53
|
+
step: 0.01,
|
|
54
|
+
default: DEFAULT_ORIGIN,
|
|
55
|
+
description: "Origin"
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var resolve = (p) => ({
|
|
59
|
+
rays: p.rays,
|
|
60
|
+
colors: p.colors,
|
|
61
|
+
rotation: p.rotation ?? 0,
|
|
62
|
+
smoothness: p.smoothness ?? 0,
|
|
63
|
+
origin: p.origin ?? DEFAULT_ORIGIN
|
|
64
|
+
});
|
|
65
|
+
var validateStarburstEffectParams = (params) => {
|
|
66
|
+
if (params === null || typeof params !== "object") {
|
|
67
|
+
throw new TypeError(`Starburst effect requires a parameters object, but got ${JSON.stringify(params)}`);
|
|
68
|
+
}
|
|
69
|
+
const { rays, colors } = params;
|
|
70
|
+
if (typeof rays !== "number" || !Number.isFinite(rays)) {
|
|
71
|
+
throw new TypeError(`"rays" must be a finite number, but got ${JSON.stringify(rays)}`);
|
|
72
|
+
}
|
|
73
|
+
if (rays < 2 || rays > 100) {
|
|
74
|
+
throw new RangeError(`"rays" must be between 2 and 100, but got ${rays}`);
|
|
75
|
+
}
|
|
76
|
+
if (!Array.isArray(colors) || colors.length < 2) {
|
|
77
|
+
throw new TypeError(`"colors" must be an array with at least 2 colors, but got ${JSON.stringify(colors)}`);
|
|
78
|
+
}
|
|
79
|
+
const r = resolve(params);
|
|
80
|
+
if (typeof r.rotation !== "number" || !Number.isFinite(r.rotation)) {
|
|
81
|
+
throw new TypeError(`"rotation" must be a finite number, but got ${JSON.stringify(params.rotation)}`);
|
|
82
|
+
}
|
|
83
|
+
if (typeof r.smoothness !== "number" || !Number.isFinite(r.smoothness)) {
|
|
84
|
+
throw new TypeError(`"smoothness" must be a finite number, but got ${JSON.stringify(params.smoothness)}`);
|
|
85
|
+
}
|
|
86
|
+
if (r.smoothness < 0 || r.smoothness > 1) {
|
|
87
|
+
throw new RangeError(`"smoothness" must be between 0 and 1, but got ${r.smoothness}`);
|
|
88
|
+
}
|
|
89
|
+
if (!Array.isArray(r.origin) || r.origin.length !== 2 || r.origin.some((coordinate) => {
|
|
90
|
+
return typeof coordinate !== "number" || !Number.isFinite(coordinate);
|
|
91
|
+
})) {
|
|
92
|
+
throw new TypeError('"origin" must be a [number, number] tuple');
|
|
93
|
+
}
|
|
94
|
+
if (r.origin.some((coordinate) => coordinate < 0 || coordinate > 1)) {
|
|
95
|
+
throw new RangeError(`"origin" must contain coordinates between 0 and 1, but got ${JSON.stringify(r.origin)}`);
|
|
96
|
+
}
|
|
97
|
+
for (const c of r.colors) {
|
|
98
|
+
colorToRgb(c);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
var STARBURST_VS = `#version 300 es
|
|
102
|
+
in vec2 aPos;
|
|
103
|
+
in vec2 aUv;
|
|
104
|
+
out vec2 vUv;
|
|
105
|
+
void main() {
|
|
106
|
+
vUv = aUv;
|
|
107
|
+
gl_Position = vec4(aPos, 0.0, 1.0);
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
110
|
+
var STARBURST_FS = `#version 300 es
|
|
111
|
+
precision highp float;
|
|
112
|
+
|
|
113
|
+
uniform sampler2D colorPalette;
|
|
114
|
+
uniform float numRays;
|
|
115
|
+
uniform float rotationOffset;
|
|
116
|
+
uniform float smoothEdge;
|
|
117
|
+
uniform vec2 resolution;
|
|
118
|
+
uniform float numColors;
|
|
119
|
+
uniform vec2 origin;
|
|
120
|
+
|
|
121
|
+
in vec2 vUv;
|
|
122
|
+
out vec4 fragColor;
|
|
123
|
+
|
|
124
|
+
const float Pi = 3.14159265359;
|
|
125
|
+
|
|
126
|
+
void main() {
|
|
127
|
+
vec2 uv = vUv;
|
|
128
|
+
vec2 center = uv - origin;
|
|
129
|
+
center.x *= resolution.x / resolution.y;
|
|
130
|
+
|
|
131
|
+
float angle = atan(center.y, center.x) + rotationOffset;
|
|
132
|
+
float normalizedAngle = (angle + Pi) / (2.0 * Pi);
|
|
133
|
+
float sector = normalizedAngle * numRays;
|
|
134
|
+
float rayIndex = mod(floor(sector), numRays);
|
|
135
|
+
|
|
136
|
+
float colorIndex = mod(rayIndex, numColors);
|
|
137
|
+
float texCoord = (colorIndex + 0.5) / numColors;
|
|
138
|
+
vec3 col = texture(colorPalette, vec2(texCoord, 0.5)).rgb;
|
|
139
|
+
|
|
140
|
+
float fractSector = fract(sector);
|
|
141
|
+
float edgeSmooth = smoothEdge * 0.5;
|
|
142
|
+
float nextColorIndex = mod(rayIndex + 1.0, numColors);
|
|
143
|
+
float nextTexCoord = (nextColorIndex + 0.5) / numColors;
|
|
144
|
+
vec3 nextCol = texture(colorPalette, vec2(nextTexCoord, 0.5)).rgb;
|
|
145
|
+
|
|
146
|
+
float blend = smoothstep(1.0 - edgeSmooth, 1.0, fractSector);
|
|
147
|
+
col = mix(col, nextCol, blend);
|
|
148
|
+
float blendStart = smoothstep(edgeSmooth, 0.0, fractSector);
|
|
149
|
+
float prevColorIndex = mod(rayIndex - 1.0 + numColors, numColors);
|
|
150
|
+
float prevTexCoord = (prevColorIndex + 0.5) / numColors;
|
|
151
|
+
vec3 prevCol = texture(colorPalette, vec2(prevTexCoord, 0.5)).rgb;
|
|
152
|
+
col = mix(col, prevCol, blendStart);
|
|
153
|
+
|
|
154
|
+
fragColor = vec4(col, 1.0);
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
var compileShader = (gl, type, source) => {
|
|
158
|
+
const shader = gl.createShader(type);
|
|
159
|
+
if (!shader) {
|
|
160
|
+
throw new Error("Failed to create WebGL shader");
|
|
161
|
+
}
|
|
162
|
+
gl.shaderSource(shader, source);
|
|
163
|
+
gl.compileShader(shader);
|
|
164
|
+
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
|
165
|
+
const log = gl.getShaderInfoLog(shader);
|
|
166
|
+
gl.deleteShader(shader);
|
|
167
|
+
throw new Error(`Starburst shader compile failed: ${log ?? "(no log)"}`);
|
|
168
|
+
}
|
|
169
|
+
return shader;
|
|
170
|
+
};
|
|
171
|
+
var linkProgram = (gl, vs, fs) => {
|
|
172
|
+
const program = gl.createProgram();
|
|
173
|
+
if (!program) {
|
|
174
|
+
throw new Error("Failed to create WebGL program");
|
|
175
|
+
}
|
|
176
|
+
gl.attachShader(program, vs);
|
|
177
|
+
gl.attachShader(program, fs);
|
|
178
|
+
gl.linkProgram(program);
|
|
179
|
+
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
180
|
+
const log = gl.getProgramInfoLog(program);
|
|
181
|
+
gl.deleteProgram(program);
|
|
182
|
+
throw new Error(`Starburst program link failed: ${log ?? "(no log)"}`);
|
|
183
|
+
}
|
|
184
|
+
return program;
|
|
185
|
+
};
|
|
186
|
+
var starburst = createEffect({
|
|
187
|
+
type: "remotion/starburst",
|
|
188
|
+
label: "starburst()",
|
|
189
|
+
documentationLink: "https://www.remotion.dev/docs/effects/starburst",
|
|
190
|
+
backend: "webgl2",
|
|
191
|
+
calculateKey: (params) => {
|
|
192
|
+
const r = resolve(params);
|
|
193
|
+
return `starburst-${r.rays}-${r.colors.join("|")}-${r.rotation}-${r.smoothness}-${r.origin.join(":")}`;
|
|
194
|
+
},
|
|
195
|
+
setup: (target) => {
|
|
196
|
+
const gl = target.getContext("webgl2", {
|
|
197
|
+
premultipliedAlpha: true,
|
|
198
|
+
alpha: true,
|
|
199
|
+
preserveDrawingBuffer: true
|
|
200
|
+
});
|
|
201
|
+
if (!gl) {
|
|
202
|
+
throw createWebGL2ContextError("starburst effect");
|
|
203
|
+
}
|
|
204
|
+
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
205
|
+
const vs = compileShader(gl, gl.VERTEX_SHADER, STARBURST_VS);
|
|
206
|
+
const fs = compileShader(gl, gl.FRAGMENT_SHADER, STARBURST_FS);
|
|
207
|
+
const program = linkProgram(gl, vs, fs);
|
|
208
|
+
gl.deleteShader(vs);
|
|
209
|
+
gl.deleteShader(fs);
|
|
210
|
+
const vao = gl.createVertexArray();
|
|
211
|
+
if (!vao) {
|
|
212
|
+
throw new Error("Failed to create WebGL vertex array");
|
|
213
|
+
}
|
|
214
|
+
gl.bindVertexArray(vao);
|
|
215
|
+
const data = new Float32Array([
|
|
216
|
+
-1,
|
|
217
|
+
-1,
|
|
218
|
+
0,
|
|
219
|
+
0,
|
|
220
|
+
1,
|
|
221
|
+
-1,
|
|
222
|
+
1,
|
|
223
|
+
0,
|
|
224
|
+
-1,
|
|
225
|
+
1,
|
|
226
|
+
0,
|
|
227
|
+
1,
|
|
228
|
+
1,
|
|
229
|
+
1,
|
|
230
|
+
1,
|
|
231
|
+
1
|
|
232
|
+
]);
|
|
233
|
+
const vbo = gl.createBuffer();
|
|
234
|
+
if (!vbo) {
|
|
235
|
+
throw new Error("Failed to create WebGL buffer");
|
|
236
|
+
}
|
|
237
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
|
|
238
|
+
gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
|
|
239
|
+
const aPos = gl.getAttribLocation(program, "aPos");
|
|
240
|
+
const aUv = gl.getAttribLocation(program, "aUv");
|
|
241
|
+
gl.enableVertexAttribArray(aPos);
|
|
242
|
+
gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);
|
|
243
|
+
gl.enableVertexAttribArray(aUv);
|
|
244
|
+
gl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);
|
|
245
|
+
gl.bindVertexArray(null);
|
|
246
|
+
const paletteTexture = gl.createTexture();
|
|
247
|
+
if (!paletteTexture) {
|
|
248
|
+
throw new Error("Failed to create WebGL palette texture");
|
|
249
|
+
}
|
|
250
|
+
gl.bindTexture(gl.TEXTURE_2D, paletteTexture);
|
|
251
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
252
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
253
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
254
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
255
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
256
|
+
return {
|
|
257
|
+
gl,
|
|
258
|
+
program,
|
|
259
|
+
vao,
|
|
260
|
+
vbo,
|
|
261
|
+
paletteTexture,
|
|
262
|
+
uColorPalette: gl.getUniformLocation(program, "colorPalette"),
|
|
263
|
+
uNumRays: gl.getUniformLocation(program, "numRays"),
|
|
264
|
+
uRotationOffset: gl.getUniformLocation(program, "rotationOffset"),
|
|
265
|
+
uSmoothEdge: gl.getUniformLocation(program, "smoothEdge"),
|
|
266
|
+
uResolution: gl.getUniformLocation(program, "resolution"),
|
|
267
|
+
uNumColors: gl.getUniformLocation(program, "numColors"),
|
|
268
|
+
uOrigin: gl.getUniformLocation(program, "origin"),
|
|
269
|
+
cachedPaletteKey: "",
|
|
270
|
+
palettePixelData: new Uint8Array(0)
|
|
271
|
+
};
|
|
272
|
+
},
|
|
273
|
+
apply: ({ width, height, params, state }) => {
|
|
274
|
+
const r = resolve(params);
|
|
275
|
+
const {
|
|
276
|
+
gl,
|
|
277
|
+
program,
|
|
278
|
+
vao,
|
|
279
|
+
paletteTexture,
|
|
280
|
+
uColorPalette,
|
|
281
|
+
uNumRays,
|
|
282
|
+
uRotationOffset,
|
|
283
|
+
uSmoothEdge,
|
|
284
|
+
uResolution,
|
|
285
|
+
uNumColors,
|
|
286
|
+
uOrigin
|
|
287
|
+
} = state;
|
|
288
|
+
const rotationRad = r.rotation * Math.PI / 180;
|
|
289
|
+
const paletteKey = r.colors.join("|");
|
|
290
|
+
const paletteDirty = state.cachedPaletteKey !== paletteKey;
|
|
291
|
+
if (paletteDirty) {
|
|
292
|
+
state.cachedPaletteKey = paletteKey;
|
|
293
|
+
const len = r.colors.length * 4;
|
|
294
|
+
if (state.palettePixelData.length !== len) {
|
|
295
|
+
state.palettePixelData = new Uint8Array(len);
|
|
296
|
+
}
|
|
297
|
+
const { palettePixelData } = state;
|
|
298
|
+
for (let i = 0;i < r.colors.length; i++) {
|
|
299
|
+
const rgb = colorToRgb(r.colors[i]);
|
|
300
|
+
palettePixelData[i * 4] = rgb[0];
|
|
301
|
+
palettePixelData[i * 4 + 1] = rgb[1];
|
|
302
|
+
palettePixelData[i * 4 + 2] = rgb[2];
|
|
303
|
+
palettePixelData[i * 4 + 3] = 255;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
gl.viewport(0, 0, width, height);
|
|
307
|
+
gl.clearColor(0, 0, 0, 0);
|
|
308
|
+
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
309
|
+
gl.useProgram(program);
|
|
310
|
+
gl.bindVertexArray(vao);
|
|
311
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
312
|
+
gl.bindTexture(gl.TEXTURE_2D, paletteTexture);
|
|
313
|
+
if (paletteDirty) {
|
|
314
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, r.colors.length, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, state.palettePixelData);
|
|
315
|
+
}
|
|
316
|
+
if (uColorPalette)
|
|
317
|
+
gl.uniform1i(uColorPalette, 0);
|
|
318
|
+
if (uNumRays)
|
|
319
|
+
gl.uniform1f(uNumRays, r.rays);
|
|
320
|
+
if (uNumColors)
|
|
321
|
+
gl.uniform1f(uNumColors, r.colors.length);
|
|
322
|
+
if (uRotationOffset)
|
|
323
|
+
gl.uniform1f(uRotationOffset, rotationRad);
|
|
324
|
+
if (uSmoothEdge)
|
|
325
|
+
gl.uniform1f(uSmoothEdge, r.smoothness);
|
|
326
|
+
if (uOrigin)
|
|
327
|
+
gl.uniform2f(uOrigin, r.origin[0], 1 - r.origin[1]);
|
|
328
|
+
if (uResolution)
|
|
329
|
+
gl.uniform2f(uResolution, width, height);
|
|
330
|
+
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
|
331
|
+
gl.bindVertexArray(null);
|
|
332
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
333
|
+
gl.useProgram(null);
|
|
334
|
+
},
|
|
335
|
+
cleanup: ({ gl, program, vao, vbo, paletteTexture }) => {
|
|
336
|
+
gl.deleteBuffer(vbo);
|
|
337
|
+
gl.deleteProgram(program);
|
|
338
|
+
gl.deleteVertexArray(vao);
|
|
339
|
+
gl.deleteTexture(paletteTexture);
|
|
340
|
+
},
|
|
341
|
+
schema: starburstEffectSchema,
|
|
342
|
+
validateParams: validateStarburstEffectParams
|
|
343
|
+
});
|
|
344
|
+
export {
|
|
345
|
+
starburstEffectSchema,
|
|
346
|
+
starburst
|
|
347
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { checkerboard, type CheckerboardParams } from './checkerboard.js';
|
|
2
2
|
export { pattern, type PatternOrigin, type PatternParams } from './pattern.js';
|
|
3
3
|
export { rings, type RingsCenter, type RingsParams } from './rings.js';
|
|
4
|
+
export { starburst, starburstEffectSchema, type StarburstEffectParams, type StarburstOrigin, } from './starburst.js';
|
|
5
|
+
export { lightLeak, lightLeakEffectSchema, type LightLeakEffectParams, } from './light-leak.js';
|
|
4
6
|
export { gridlines, type GridlinesParams } from './gridlines.js';
|
|
5
7
|
export { zigzag, type ZigzagDirection, type ZigzagParams } from './zigzag.js';
|
|
6
8
|
export { linearGradient, type LinearGradientParams, type LinearGradientUvCoordinate, } from './linear-gradient.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const lightLeakEffectSchema: {
|
|
2
|
+
readonly seed: {
|
|
3
|
+
readonly type: "number";
|
|
4
|
+
readonly default: 0;
|
|
5
|
+
readonly description: "Seed";
|
|
6
|
+
readonly hiddenFromList: false;
|
|
7
|
+
};
|
|
8
|
+
readonly hueShift: {
|
|
9
|
+
readonly type: "number";
|
|
10
|
+
readonly min: 0;
|
|
11
|
+
readonly max: 360;
|
|
12
|
+
readonly default: 0;
|
|
13
|
+
readonly description: "Hue Shift";
|
|
14
|
+
readonly hiddenFromList: false;
|
|
15
|
+
};
|
|
16
|
+
readonly progress: {
|
|
17
|
+
readonly type: "number";
|
|
18
|
+
readonly min: 0;
|
|
19
|
+
readonly max: 1;
|
|
20
|
+
readonly step: 0.01;
|
|
21
|
+
readonly default: 0.5;
|
|
22
|
+
readonly description: "Progress";
|
|
23
|
+
readonly hiddenFromList: false;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type LightLeakEffectParams = {
|
|
27
|
+
readonly seed?: number;
|
|
28
|
+
readonly hueShift?: number;
|
|
29
|
+
/** Evolve/retract phase from 0 (start) to 1 (end). Defaults to 0.5. */
|
|
30
|
+
readonly progress?: number;
|
|
31
|
+
};
|
|
32
|
+
export declare const lightLeak: (params?: (LightLeakEffectParams & {
|
|
33
|
+
readonly disabled?: boolean | undefined;
|
|
34
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const starburstEffectSchema: {
|
|
2
|
+
readonly rays: {
|
|
3
|
+
readonly type: "number";
|
|
4
|
+
readonly min: 2;
|
|
5
|
+
readonly max: 100;
|
|
6
|
+
readonly step: 1;
|
|
7
|
+
readonly default: undefined;
|
|
8
|
+
readonly description: "Number of Rays";
|
|
9
|
+
readonly hiddenFromList: false;
|
|
10
|
+
};
|
|
11
|
+
readonly colors: {
|
|
12
|
+
readonly type: "array";
|
|
13
|
+
readonly item: {
|
|
14
|
+
readonly type: "color";
|
|
15
|
+
};
|
|
16
|
+
readonly default: undefined;
|
|
17
|
+
readonly minLength: 2;
|
|
18
|
+
readonly newItemDefault: "#ff0000";
|
|
19
|
+
readonly description: "Colors";
|
|
20
|
+
readonly keyframable: false;
|
|
21
|
+
};
|
|
22
|
+
readonly rotation: {
|
|
23
|
+
readonly type: "number";
|
|
24
|
+
readonly min: 0;
|
|
25
|
+
readonly max: 360;
|
|
26
|
+
readonly step: 1;
|
|
27
|
+
readonly default: 0;
|
|
28
|
+
readonly description: "Rotation";
|
|
29
|
+
readonly hiddenFromList: false;
|
|
30
|
+
};
|
|
31
|
+
readonly smoothness: {
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly min: 0;
|
|
34
|
+
readonly max: 1;
|
|
35
|
+
readonly step: 0.01;
|
|
36
|
+
readonly default: 0;
|
|
37
|
+
readonly description: "Edge Smoothness";
|
|
38
|
+
readonly hiddenFromList: false;
|
|
39
|
+
};
|
|
40
|
+
readonly origin: {
|
|
41
|
+
readonly type: "uv-coordinate";
|
|
42
|
+
readonly min: 0;
|
|
43
|
+
readonly max: 1;
|
|
44
|
+
readonly step: 0.01;
|
|
45
|
+
readonly default: readonly [0.5, 0.5];
|
|
46
|
+
readonly description: "Origin";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type StarburstOrigin = readonly [number, number];
|
|
50
|
+
export type StarburstEffectParams = {
|
|
51
|
+
readonly rays: number;
|
|
52
|
+
readonly colors: readonly string[];
|
|
53
|
+
readonly rotation?: number;
|
|
54
|
+
readonly smoothness?: number;
|
|
55
|
+
readonly origin?: StarburstOrigin;
|
|
56
|
+
};
|
|
57
|
+
export declare const starburst: (params: StarburstEffectParams & {
|
|
58
|
+
readonly disabled?: boolean | undefined;
|
|
59
|
+
}) => import("remotion").EffectDescriptor<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/effects",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.501",
|
|
4
4
|
"description": "Effects that can be applied to Remotion-based canvas components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"remotion": "4.0.
|
|
29
|
+
"remotion": "4.0.501"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
@@ -189,6 +189,11 @@
|
|
|
189
189
|
"module": "./dist/esm/linear-progressive-pixelate.mjs",
|
|
190
190
|
"import": "./dist/esm/linear-progressive-pixelate.mjs"
|
|
191
191
|
},
|
|
192
|
+
"./light-leak": {
|
|
193
|
+
"types": "./dist/light-leak.d.ts",
|
|
194
|
+
"module": "./dist/esm/light-leak.mjs",
|
|
195
|
+
"import": "./dist/esm/light-leak.mjs"
|
|
196
|
+
},
|
|
192
197
|
"./light-trail": {
|
|
193
198
|
"types": "./dist/light-trail.d.ts",
|
|
194
199
|
"module": "./dist/esm/light-trail.mjs",
|
|
@@ -279,6 +284,11 @@
|
|
|
279
284
|
"module": "./dist/esm/speckle.mjs",
|
|
280
285
|
"import": "./dist/esm/speckle.mjs"
|
|
281
286
|
},
|
|
287
|
+
"./starburst": {
|
|
288
|
+
"types": "./dist/starburst.d.ts",
|
|
289
|
+
"module": "./dist/esm/starburst.mjs",
|
|
290
|
+
"import": "./dist/esm/starburst.mjs"
|
|
291
|
+
},
|
|
282
292
|
"./thermal-vision": {
|
|
283
293
|
"types": "./dist/thermal-vision.d.ts",
|
|
284
294
|
"module": "./dist/esm/thermal-vision.mjs",
|
|
@@ -431,6 +441,9 @@
|
|
|
431
441
|
"linear-progressive-pixelate": [
|
|
432
442
|
"dist/linear-progressive-pixelate.d.ts"
|
|
433
443
|
],
|
|
444
|
+
"light-leak": [
|
|
445
|
+
"dist/light-leak.d.ts"
|
|
446
|
+
],
|
|
434
447
|
"light-trail": [
|
|
435
448
|
"dist/light-trail.d.ts"
|
|
436
449
|
],
|
|
@@ -485,6 +498,9 @@
|
|
|
485
498
|
"speckle": [
|
|
486
499
|
"dist/speckle.d.ts"
|
|
487
500
|
],
|
|
501
|
+
"starburst": [
|
|
502
|
+
"dist/starburst.d.ts"
|
|
503
|
+
],
|
|
488
504
|
"thermal-vision": [
|
|
489
505
|
"dist/thermal-vision.d.ts"
|
|
490
506
|
],
|
|
@@ -522,7 +538,7 @@
|
|
|
522
538
|
},
|
|
523
539
|
"homepage": "https://www.remotion.dev/docs/effects/api",
|
|
524
540
|
"devDependencies": {
|
|
525
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
541
|
+
"@remotion/eslint-config-internal": "4.0.501",
|
|
526
542
|
"@vitest/browser-playwright": "4.0.9",
|
|
527
543
|
"eslint": "9.19.0",
|
|
528
544
|
"vitest": "4.0.9",
|