@remotion/effects 4.0.483 → 4.0.485
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/corner-pin/corner-pin-shaders.d.ts +1 -1
- package/dist/esm/corner-pin.mjs +38 -35
- package/dist/esm/index.mjs +642 -57
- package/dist/esm/linear-gradient-tint.mjs +426 -0
- package/dist/esm/linear-gradient.mjs +372 -0
- package/dist/esm/venetian-blinds.mjs +389 -0
- package/dist/index.d.ts +2 -0
- package/dist/linear-gradient-tint.d.ts +26 -0
- package/dist/linear-gradient.d.ts +22 -0
- package/dist/venetian-blinds.d.ts +43 -0
- package/package.json +27 -3
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
// src/venetian-blinds.ts
|
|
2
|
+
import { Internals } from "remotion";
|
|
3
|
+
|
|
4
|
+
// src/validate-effect-param.ts
|
|
5
|
+
var assertEffectParamsObject = (params, effectLabel) => {
|
|
6
|
+
if (params === null || typeof params !== "object") {
|
|
7
|
+
throw new TypeError(`${effectLabel} effect requires a parameters object, but got ${JSON.stringify(params)}`);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var assertRequiredFiniteNumber = (value, name) => {
|
|
11
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
12
|
+
throw new TypeError(`"${name}" must be a finite number, but got ${JSON.stringify(value)}`);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var assertRequiredColor = (value, name) => {
|
|
16
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
17
|
+
throw new TypeError(`"${name}" must be a non-empty string, but got ${JSON.stringify(value)}`);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var assertOptionalColor = (value, name) => {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
assertRequiredColor(value, name);
|
|
25
|
+
};
|
|
26
|
+
var assertOptionalBoolean = (value, name) => {
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value !== "boolean") {
|
|
31
|
+
throw new TypeError(`"${name}" must be a boolean, but got ${JSON.stringify(value)}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/color-utils.ts
|
|
36
|
+
var DEFAULT_AMOUNT = 1;
|
|
37
|
+
var DEFAULT_BRIGHTNESS_AMOUNT = 0;
|
|
38
|
+
var DEFAULT_HUE_DEGREES = 0;
|
|
39
|
+
var colorAmountSchema = {
|
|
40
|
+
type: "number",
|
|
41
|
+
min: 0,
|
|
42
|
+
max: 1,
|
|
43
|
+
step: 0.01,
|
|
44
|
+
default: DEFAULT_AMOUNT,
|
|
45
|
+
description: "Amount",
|
|
46
|
+
hiddenFromList: false
|
|
47
|
+
};
|
|
48
|
+
var colorMultiplierSchema = {
|
|
49
|
+
type: "number",
|
|
50
|
+
min: 0,
|
|
51
|
+
step: 0.01,
|
|
52
|
+
default: DEFAULT_AMOUNT,
|
|
53
|
+
description: "Amount",
|
|
54
|
+
hiddenFromList: false
|
|
55
|
+
};
|
|
56
|
+
var brightnessAmountSchema = {
|
|
57
|
+
type: "number",
|
|
58
|
+
min: -1,
|
|
59
|
+
max: 1,
|
|
60
|
+
step: 0.01,
|
|
61
|
+
default: DEFAULT_BRIGHTNESS_AMOUNT,
|
|
62
|
+
description: "Amount",
|
|
63
|
+
hiddenFromList: false
|
|
64
|
+
};
|
|
65
|
+
var hueDegreesSchema = {
|
|
66
|
+
type: "rotation-degrees",
|
|
67
|
+
step: 1,
|
|
68
|
+
default: DEFAULT_HUE_DEGREES,
|
|
69
|
+
description: "Degrees"
|
|
70
|
+
};
|
|
71
|
+
var assertOptionalFiniteNumber = (value, name) => {
|
|
72
|
+
if (value === undefined) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
assertRequiredFiniteNumber(value, name);
|
|
76
|
+
};
|
|
77
|
+
var validateUnitInterval = (value, name) => {
|
|
78
|
+
if (value < 0) {
|
|
79
|
+
throw new TypeError(`"${name}" must be >= 0, but got ${JSON.stringify(value)}`);
|
|
80
|
+
}
|
|
81
|
+
if (value > 1) {
|
|
82
|
+
throw new TypeError(`"${name}" must be <= 1, but got ${JSON.stringify(value)}`);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var validateNonNegative = (value, name) => {
|
|
86
|
+
if (value < 0) {
|
|
87
|
+
throw new TypeError(`"${name}" must be >= 0, but got ${JSON.stringify(value)}`);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
var validateSignedUnitInterval = (value, name) => {
|
|
91
|
+
if (value < -1) {
|
|
92
|
+
throw new TypeError(`"${name}" must be >= -1, but got ${JSON.stringify(value)}`);
|
|
93
|
+
}
|
|
94
|
+
if (value > 1) {
|
|
95
|
+
throw new TypeError(`"${name}" must be <= 1, but got ${JSON.stringify(value)}`);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var clampColorChannel = (value) => {
|
|
99
|
+
return Math.max(0, Math.min(255, value));
|
|
100
|
+
};
|
|
101
|
+
var parseColorRgba = (ctx, color) => {
|
|
102
|
+
ctx.clearRect(0, 0, 1, 1);
|
|
103
|
+
ctx.fillStyle = color;
|
|
104
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
105
|
+
const { data } = ctx.getImageData(0, 0, 1, 1);
|
|
106
|
+
return [data[0], data[1], data[2], data[3]];
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// src/venetian-blinds.ts
|
|
110
|
+
var { createEffect, createWebGL2ContextError } = Internals;
|
|
111
|
+
var VENETIAN_BLINDS_DIRECTIONS = ["vertical", "horizontal"];
|
|
112
|
+
var DEFAULT_PROGRESS = 0.5;
|
|
113
|
+
var DEFAULT_DIRECTION = "vertical";
|
|
114
|
+
var DEFAULT_SLATS = 12;
|
|
115
|
+
var venetianBlindsSchema = {
|
|
116
|
+
progress: {
|
|
117
|
+
type: "number",
|
|
118
|
+
min: 0,
|
|
119
|
+
max: 1,
|
|
120
|
+
step: 0.01,
|
|
121
|
+
default: DEFAULT_PROGRESS,
|
|
122
|
+
description: "Progress",
|
|
123
|
+
hiddenFromList: false
|
|
124
|
+
},
|
|
125
|
+
direction: {
|
|
126
|
+
type: "enum",
|
|
127
|
+
variants: {
|
|
128
|
+
vertical: {},
|
|
129
|
+
horizontal: {}
|
|
130
|
+
},
|
|
131
|
+
default: DEFAULT_DIRECTION,
|
|
132
|
+
description: "Direction"
|
|
133
|
+
},
|
|
134
|
+
slats: {
|
|
135
|
+
type: "number",
|
|
136
|
+
min: 1,
|
|
137
|
+
max: 100,
|
|
138
|
+
step: 1,
|
|
139
|
+
default: DEFAULT_SLATS,
|
|
140
|
+
description: "Slats",
|
|
141
|
+
hiddenFromList: false
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var formatEnum = (variants) => {
|
|
145
|
+
if (variants.length === 2) {
|
|
146
|
+
return `"${variants[0]}" or "${variants[1]}"`;
|
|
147
|
+
}
|
|
148
|
+
return `${variants.slice(0, -1).map((variant) => `"${variant}"`).join(", ")} or "${variants[variants.length - 1]}"`;
|
|
149
|
+
};
|
|
150
|
+
var assertOptionalEnum = (value, name, variants) => {
|
|
151
|
+
if (value === undefined) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (!variants.includes(value)) {
|
|
155
|
+
throw new TypeError(`"${name}" must be ${formatEnum(variants)}, but got ${JSON.stringify(value)}`);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
var resolve = (p) => ({
|
|
159
|
+
progress: p.progress ?? DEFAULT_PROGRESS,
|
|
160
|
+
direction: p.direction ?? DEFAULT_DIRECTION,
|
|
161
|
+
slats: p.slats ?? DEFAULT_SLATS
|
|
162
|
+
});
|
|
163
|
+
var validatePositiveInteger = (value, name) => {
|
|
164
|
+
if (!Number.isInteger(value)) {
|
|
165
|
+
throw new TypeError(`"${name}" must be an integer, but got ${JSON.stringify(value)}`);
|
|
166
|
+
}
|
|
167
|
+
if (value < 1) {
|
|
168
|
+
throw new TypeError(`"${name}" must be >= 1, but got ${JSON.stringify(value)}`);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
var validateVenetianBlindsParams = (params) => {
|
|
172
|
+
assertEffectParamsObject(params, "Venetian blinds");
|
|
173
|
+
assertOptionalFiniteNumber(params.progress, "progress");
|
|
174
|
+
assertOptionalFiniteNumber(params.slats, "slats");
|
|
175
|
+
assertOptionalEnum(params.direction, "direction", VENETIAN_BLINDS_DIRECTIONS);
|
|
176
|
+
const r = resolve(params);
|
|
177
|
+
validateUnitInterval(r.progress, "progress");
|
|
178
|
+
validatePositiveInteger(r.slats, "slats");
|
|
179
|
+
};
|
|
180
|
+
var VENETIAN_BLINDS_VS = `#version 300 es
|
|
181
|
+
in vec2 aPos;
|
|
182
|
+
in vec2 aUv;
|
|
183
|
+
out vec2 vUv;
|
|
184
|
+
|
|
185
|
+
void main() {
|
|
186
|
+
vUv = aUv;
|
|
187
|
+
gl_Position = vec4(aPos, 0.0, 1.0);
|
|
188
|
+
}
|
|
189
|
+
`;
|
|
190
|
+
var VENETIAN_BLINDS_FS = `#version 300 es
|
|
191
|
+
precision highp float;
|
|
192
|
+
|
|
193
|
+
in vec2 vUv;
|
|
194
|
+
out vec4 fragColor;
|
|
195
|
+
|
|
196
|
+
uniform sampler2D uSource;
|
|
197
|
+
uniform float uProgress;
|
|
198
|
+
uniform int uDirection;
|
|
199
|
+
uniform float uSlats;
|
|
200
|
+
|
|
201
|
+
float maskValue(float distanceToCenter, float progress) {
|
|
202
|
+
float p = clamp(progress, 0.0, 1.0);
|
|
203
|
+
|
|
204
|
+
if (p <= 0.000001) {
|
|
205
|
+
return 0.0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
if (p >= 0.999999) {
|
|
209
|
+
return 1.0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return step(distanceToCenter, p);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
void main() {
|
|
216
|
+
vec4 source = texture(uSource, vUv);
|
|
217
|
+
float axis = uDirection == 0 ? vUv.x : vUv.y;
|
|
218
|
+
float local = fract(axis * max(uSlats, 1.0));
|
|
219
|
+
float distanceToCenter = abs(local - 0.5) * 2.0;
|
|
220
|
+
float mask = maskValue(distanceToCenter, uProgress);
|
|
221
|
+
|
|
222
|
+
fragColor = vec4(source.rgb * mask, source.a * mask);
|
|
223
|
+
}
|
|
224
|
+
`;
|
|
225
|
+
var compileShader = (gl, type, source) => {
|
|
226
|
+
const shader = gl.createShader(type);
|
|
227
|
+
if (!shader) {
|
|
228
|
+
throw new Error("Failed to create WebGL shader");
|
|
229
|
+
}
|
|
230
|
+
gl.shaderSource(shader, source);
|
|
231
|
+
gl.compileShader(shader);
|
|
232
|
+
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
|
233
|
+
const log = gl.getShaderInfoLog(shader);
|
|
234
|
+
gl.deleteShader(shader);
|
|
235
|
+
throw new Error(`Venetian blinds shader compile failed: ${log ?? "(no log)"}`);
|
|
236
|
+
}
|
|
237
|
+
return shader;
|
|
238
|
+
};
|
|
239
|
+
var linkProgram = (gl, vs, fs) => {
|
|
240
|
+
const program = gl.createProgram();
|
|
241
|
+
if (!program) {
|
|
242
|
+
throw new Error("Failed to create WebGL program");
|
|
243
|
+
}
|
|
244
|
+
gl.attachShader(program, vs);
|
|
245
|
+
gl.attachShader(program, fs);
|
|
246
|
+
gl.linkProgram(program);
|
|
247
|
+
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
248
|
+
const log = gl.getProgramInfoLog(program);
|
|
249
|
+
gl.deleteProgram(program);
|
|
250
|
+
throw new Error(`Venetian blinds program link failed: ${log ?? "(no log)"}`);
|
|
251
|
+
}
|
|
252
|
+
return program;
|
|
253
|
+
};
|
|
254
|
+
var setupVenetianBlinds = (target) => {
|
|
255
|
+
const gl = target.getContext("webgl2", {
|
|
256
|
+
premultipliedAlpha: true,
|
|
257
|
+
alpha: true,
|
|
258
|
+
preserveDrawingBuffer: true
|
|
259
|
+
});
|
|
260
|
+
if (!gl) {
|
|
261
|
+
throw createWebGL2ContextError("venetian blinds effect");
|
|
262
|
+
}
|
|
263
|
+
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
264
|
+
const vs = compileShader(gl, gl.VERTEX_SHADER, VENETIAN_BLINDS_VS);
|
|
265
|
+
const fs = compileShader(gl, gl.FRAGMENT_SHADER, VENETIAN_BLINDS_FS);
|
|
266
|
+
const program = linkProgram(gl, vs, fs);
|
|
267
|
+
gl.deleteShader(vs);
|
|
268
|
+
gl.deleteShader(fs);
|
|
269
|
+
const vao = gl.createVertexArray();
|
|
270
|
+
if (!vao) {
|
|
271
|
+
throw new Error("Failed to create WebGL vertex array");
|
|
272
|
+
}
|
|
273
|
+
gl.bindVertexArray(vao);
|
|
274
|
+
const data = new Float32Array([
|
|
275
|
+
-1,
|
|
276
|
+
-1,
|
|
277
|
+
0,
|
|
278
|
+
0,
|
|
279
|
+
1,
|
|
280
|
+
-1,
|
|
281
|
+
1,
|
|
282
|
+
0,
|
|
283
|
+
-1,
|
|
284
|
+
1,
|
|
285
|
+
0,
|
|
286
|
+
1,
|
|
287
|
+
1,
|
|
288
|
+
1,
|
|
289
|
+
1,
|
|
290
|
+
1
|
|
291
|
+
]);
|
|
292
|
+
const vbo = gl.createBuffer();
|
|
293
|
+
if (!vbo) {
|
|
294
|
+
throw new Error("Failed to create WebGL buffer");
|
|
295
|
+
}
|
|
296
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
|
|
297
|
+
gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);
|
|
298
|
+
const aPos = gl.getAttribLocation(program, "aPos");
|
|
299
|
+
const aUv = gl.getAttribLocation(program, "aUv");
|
|
300
|
+
gl.enableVertexAttribArray(aPos);
|
|
301
|
+
gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 16, 0);
|
|
302
|
+
gl.enableVertexAttribArray(aUv);
|
|
303
|
+
gl.vertexAttribPointer(aUv, 2, gl.FLOAT, false, 16, 8);
|
|
304
|
+
gl.bindVertexArray(null);
|
|
305
|
+
const texture = gl.createTexture();
|
|
306
|
+
if (!texture) {
|
|
307
|
+
throw new Error("Failed to create WebGL texture");
|
|
308
|
+
}
|
|
309
|
+
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
310
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
311
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
312
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
313
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
314
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
315
|
+
return {
|
|
316
|
+
gl,
|
|
317
|
+
program,
|
|
318
|
+
vao,
|
|
319
|
+
vbo,
|
|
320
|
+
texture,
|
|
321
|
+
uniforms: {
|
|
322
|
+
uSource: gl.getUniformLocation(program, "uSource"),
|
|
323
|
+
uProgress: gl.getUniformLocation(program, "uProgress"),
|
|
324
|
+
uDirection: gl.getUniformLocation(program, "uDirection"),
|
|
325
|
+
uSlats: gl.getUniformLocation(program, "uSlats")
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
var directionToInt = (direction) => {
|
|
330
|
+
switch (direction) {
|
|
331
|
+
case "vertical":
|
|
332
|
+
return 0;
|
|
333
|
+
case "horizontal":
|
|
334
|
+
return 1;
|
|
335
|
+
default: {
|
|
336
|
+
const exhaustiveCheck = direction;
|
|
337
|
+
return exhaustiveCheck;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
var venetianBlinds = createEffect({
|
|
342
|
+
type: "dev.remotion.effects.venetianBlinds",
|
|
343
|
+
label: "venetianBlinds()",
|
|
344
|
+
documentationLink: "https://www.remotion.dev/docs/effects/venetian-blinds",
|
|
345
|
+
backend: "webgl2",
|
|
346
|
+
calculateKey: (params) => {
|
|
347
|
+
const r = resolve(params);
|
|
348
|
+
return `venetian-blinds-${r.progress}-${r.direction}-${r.slats}`;
|
|
349
|
+
},
|
|
350
|
+
setup: (target) => setupVenetianBlinds(target),
|
|
351
|
+
apply: ({ source, width, height, params, state, flipSourceY }) => {
|
|
352
|
+
const r = resolve(params);
|
|
353
|
+
const { gl, program, texture, uniforms, vao } = state;
|
|
354
|
+
gl.viewport(0, 0, width, height);
|
|
355
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
356
|
+
gl.clearColor(0, 0, 0, 0);
|
|
357
|
+
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
358
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
359
|
+
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
360
|
+
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipSourceY);
|
|
361
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);
|
|
362
|
+
gl.useProgram(program);
|
|
363
|
+
if (uniforms.uSource)
|
|
364
|
+
gl.uniform1i(uniforms.uSource, 0);
|
|
365
|
+
if (uniforms.uProgress)
|
|
366
|
+
gl.uniform1f(uniforms.uProgress, r.progress);
|
|
367
|
+
if (uniforms.uDirection)
|
|
368
|
+
gl.uniform1i(uniforms.uDirection, directionToInt(r.direction));
|
|
369
|
+
if (uniforms.uSlats)
|
|
370
|
+
gl.uniform1f(uniforms.uSlats, r.slats);
|
|
371
|
+
gl.bindVertexArray(vao);
|
|
372
|
+
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
|
373
|
+
gl.bindVertexArray(null);
|
|
374
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
375
|
+
gl.useProgram(null);
|
|
376
|
+
},
|
|
377
|
+
cleanup: ({ gl, program, vao, vbo, texture }) => {
|
|
378
|
+
gl.deleteTexture(texture);
|
|
379
|
+
gl.deleteBuffer(vbo);
|
|
380
|
+
gl.deleteProgram(program);
|
|
381
|
+
gl.deleteVertexArray(vao);
|
|
382
|
+
},
|
|
383
|
+
schema: venetianBlindsSchema,
|
|
384
|
+
validateParams: validateVenetianBlindsParams
|
|
385
|
+
});
|
|
386
|
+
export {
|
|
387
|
+
venetianBlindsSchema,
|
|
388
|
+
venetianBlinds
|
|
389
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,6 @@ export { pattern, type PatternOrigin, type PatternParams } from './pattern.js';
|
|
|
3
3
|
export { rings, type RingsCenter, type RingsParams } from './rings.js';
|
|
4
4
|
export { gridlines, type GridlinesParams } from './gridlines.js';
|
|
5
5
|
export { zigzag, type ZigzagDirection, type ZigzagParams } from './zigzag.js';
|
|
6
|
+
export { linearGradient, type LinearGradientParams, type LinearGradientUvCoordinate, } from './linear-gradient.js';
|
|
7
|
+
export { linearGradientTint, type LinearGradientTintParams, type LinearGradientTintUvCoordinate, } from './linear-gradient-tint.js';
|
|
6
8
|
export { cornerPin, type CornerPinParams, type CornerPinUvCoordinate, } from './corner-pin/index.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type LinearGradientTintUvCoordinate = readonly [number, number];
|
|
2
|
+
export type LinearGradientTintParams = {
|
|
3
|
+
/**
|
|
4
|
+
* UV coordinate where `startColor` is reached. Defaults to `[0, 0.5]`.
|
|
5
|
+
*/
|
|
6
|
+
readonly start?: LinearGradientTintUvCoordinate;
|
|
7
|
+
/**
|
|
8
|
+
* UV coordinate where `endColor` is reached. Defaults to `[1, 0.5]`.
|
|
9
|
+
*/
|
|
10
|
+
readonly end?: LinearGradientTintUvCoordinate;
|
|
11
|
+
/**
|
|
12
|
+
* Tint color at `start`. Defaults to black.
|
|
13
|
+
*/
|
|
14
|
+
readonly startColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Tint color at `end`. Defaults to white.
|
|
17
|
+
*/
|
|
18
|
+
readonly endColor?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Tint blend amount from `0` to `1`. Defaults to `0.5`.
|
|
21
|
+
*/
|
|
22
|
+
readonly amount?: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const linearGradientTint: (params?: (LinearGradientTintParams & {
|
|
25
|
+
readonly disabled?: boolean | undefined;
|
|
26
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type LinearGradientUvCoordinate = readonly [number, number];
|
|
2
|
+
export type LinearGradientParams = {
|
|
3
|
+
/**
|
|
4
|
+
* UV coordinate where `startColor` is reached. Defaults to `[0, 0.5]`.
|
|
5
|
+
*/
|
|
6
|
+
readonly start?: LinearGradientUvCoordinate;
|
|
7
|
+
/**
|
|
8
|
+
* UV coordinate where `endColor` is reached. Defaults to `[1, 0.5]`.
|
|
9
|
+
*/
|
|
10
|
+
readonly end?: LinearGradientUvCoordinate;
|
|
11
|
+
/**
|
|
12
|
+
* Color at `start`. Defaults to black.
|
|
13
|
+
*/
|
|
14
|
+
readonly startColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Color at `end`. Defaults to white.
|
|
17
|
+
*/
|
|
18
|
+
readonly endColor?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const linearGradient: (params?: (LinearGradientParams & {
|
|
21
|
+
readonly disabled?: boolean | undefined;
|
|
22
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const VENETIAN_BLINDS_DIRECTIONS: readonly ["vertical", "horizontal"];
|
|
2
|
+
export type VenetianBlindsDirection = (typeof VENETIAN_BLINDS_DIRECTIONS)[number];
|
|
3
|
+
export declare const venetianBlindsSchema: {
|
|
4
|
+
readonly progress: {
|
|
5
|
+
readonly type: "number";
|
|
6
|
+
readonly min: 0;
|
|
7
|
+
readonly max: 1;
|
|
8
|
+
readonly step: 0.01;
|
|
9
|
+
readonly default: 0.5;
|
|
10
|
+
readonly description: "Progress";
|
|
11
|
+
readonly hiddenFromList: false;
|
|
12
|
+
};
|
|
13
|
+
readonly direction: {
|
|
14
|
+
readonly type: "enum";
|
|
15
|
+
readonly variants: {
|
|
16
|
+
readonly vertical: {};
|
|
17
|
+
readonly horizontal: {};
|
|
18
|
+
};
|
|
19
|
+
readonly default: "vertical";
|
|
20
|
+
readonly description: "Direction";
|
|
21
|
+
};
|
|
22
|
+
readonly slats: {
|
|
23
|
+
readonly type: "number";
|
|
24
|
+
readonly min: 1;
|
|
25
|
+
readonly max: 100;
|
|
26
|
+
readonly step: 1;
|
|
27
|
+
readonly default: 12;
|
|
28
|
+
readonly description: "Slats";
|
|
29
|
+
readonly hiddenFromList: false;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type VenetianBlindsParams = {
|
|
33
|
+
/** Reveal progress from `0` (hidden) to `1` (fully revealed). Defaults to `0.5`. */
|
|
34
|
+
readonly progress?: number;
|
|
35
|
+
/** Slat orientation. Defaults to `vertical`. */
|
|
36
|
+
readonly direction?: VenetianBlindsDirection;
|
|
37
|
+
/** Number of blinds across the source. Defaults to `12`. */
|
|
38
|
+
readonly slats?: number;
|
|
39
|
+
};
|
|
40
|
+
export declare const venetianBlinds: (params?: (VenetianBlindsParams & {
|
|
41
|
+
readonly disabled?: boolean | undefined;
|
|
42
|
+
}) | undefined) => import("remotion").EffectDescriptor<unknown>;
|
|
43
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/effects",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.485",
|
|
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.485"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
@@ -159,6 +159,16 @@
|
|
|
159
159
|
"module": "./dist/esm/lines.mjs",
|
|
160
160
|
"import": "./dist/esm/lines.mjs"
|
|
161
161
|
},
|
|
162
|
+
"./linear-gradient": {
|
|
163
|
+
"types": "./dist/linear-gradient.d.ts",
|
|
164
|
+
"module": "./dist/esm/linear-gradient.mjs",
|
|
165
|
+
"import": "./dist/esm/linear-gradient.mjs"
|
|
166
|
+
},
|
|
167
|
+
"./linear-gradient-tint": {
|
|
168
|
+
"types": "./dist/linear-gradient-tint.d.ts",
|
|
169
|
+
"module": "./dist/esm/linear-gradient-tint.mjs",
|
|
170
|
+
"import": "./dist/esm/linear-gradient-tint.mjs"
|
|
171
|
+
},
|
|
162
172
|
"./linear-progressive-blur": {
|
|
163
173
|
"types": "./dist/linear-progressive-blur.d.ts",
|
|
164
174
|
"module": "./dist/esm/linear-progressive-blur.mjs",
|
|
@@ -254,6 +264,11 @@
|
|
|
254
264
|
"module": "./dist/esm/tv-signal-off.mjs",
|
|
255
265
|
"import": "./dist/esm/tv-signal-off.mjs"
|
|
256
266
|
},
|
|
267
|
+
"./venetian-blinds": {
|
|
268
|
+
"types": "./dist/venetian-blinds.d.ts",
|
|
269
|
+
"module": "./dist/esm/venetian-blinds.mjs",
|
|
270
|
+
"import": "./dist/esm/venetian-blinds.mjs"
|
|
271
|
+
},
|
|
257
272
|
"./vignette": {
|
|
258
273
|
"types": "./dist/vignette.d.ts",
|
|
259
274
|
"module": "./dist/esm/vignette.mjs",
|
|
@@ -363,6 +378,12 @@
|
|
|
363
378
|
"lines": [
|
|
364
379
|
"dist/lines.d.ts"
|
|
365
380
|
],
|
|
381
|
+
"linear-gradient": [
|
|
382
|
+
"dist/linear-gradient.d.ts"
|
|
383
|
+
],
|
|
384
|
+
"linear-gradient-tint": [
|
|
385
|
+
"dist/linear-gradient-tint.d.ts"
|
|
386
|
+
],
|
|
366
387
|
"linear-progressive-blur": [
|
|
367
388
|
"dist/linear-progressive-blur.d.ts"
|
|
368
389
|
],
|
|
@@ -420,6 +441,9 @@
|
|
|
420
441
|
"tv-signal-off": [
|
|
421
442
|
"dist/tv-signal-off.d.ts"
|
|
422
443
|
],
|
|
444
|
+
"venetian-blinds": [
|
|
445
|
+
"dist/venetian-blinds.d.ts"
|
|
446
|
+
],
|
|
423
447
|
"vignette": [
|
|
424
448
|
"dist/vignette.d.ts"
|
|
425
449
|
],
|
|
@@ -442,7 +466,7 @@
|
|
|
442
466
|
},
|
|
443
467
|
"homepage": "https://www.remotion.dev/docs/effects/api",
|
|
444
468
|
"devDependencies": {
|
|
445
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
469
|
+
"@remotion/eslint-config-internal": "4.0.485",
|
|
446
470
|
"@vitest/browser-playwright": "4.0.9",
|
|
447
471
|
"eslint": "9.19.0",
|
|
448
472
|
"vitest": "4.0.9",
|