@remotion/effects 4.0.484 → 4.0.486
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/paper.mjs +921 -0
- package/dist/esm/venetian-blinds.mjs +389 -0
- package/dist/paper.d.ts +35 -0
- package/dist/venetian-blinds.d.ts +43 -0
- package/package.json +19 -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/paper.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type PaperParams = {
|
|
2
|
+
/** Strength of the paper texture from `0` to `1`. Defaults to `1`. */
|
|
3
|
+
readonly amount?: number;
|
|
4
|
+
/** Light-facing paper color. Defaults to `#9fadbc`. */
|
|
5
|
+
readonly colorFront?: string;
|
|
6
|
+
/** Shadow-facing paper color. Defaults to `#ffffff`. */
|
|
7
|
+
readonly colorBack?: string;
|
|
8
|
+
/** Sharpness of light and color transitions from `0` to `1`. Defaults to `0.3`. */
|
|
9
|
+
readonly contrast?: number;
|
|
10
|
+
/** Fine pixel noise from `0` to `1`. Defaults to `0.4`. */
|
|
11
|
+
readonly roughness?: number;
|
|
12
|
+
/** Curly fiber intensity from `0` to `1`. Defaults to `0.3`. */
|
|
13
|
+
readonly fiber?: number;
|
|
14
|
+
/** Curly fiber scale from `0.01` to `1`. Defaults to `0.2`. */
|
|
15
|
+
readonly fiberSize?: number;
|
|
16
|
+
/** Cell-based crumple intensity from `0` to `1`. Defaults to `0.3`. */
|
|
17
|
+
readonly crumples?: number;
|
|
18
|
+
/** Cell-based crumple scale from `0.01` to `1`. Defaults to `0.35`. */
|
|
19
|
+
readonly crumpleSize?: number;
|
|
20
|
+
/** Fold lighting intensity from `0` to `1`. Defaults to `0.65`. */
|
|
21
|
+
readonly folds?: number;
|
|
22
|
+
/** Number of generated folds from `0` to `15`. Defaults to `5`. */
|
|
23
|
+
readonly foldCount?: number;
|
|
24
|
+
/** Speckle visibility from `0` to `1`. Defaults to `0.2`. */
|
|
25
|
+
readonly drops?: number;
|
|
26
|
+
/** Large-scale mask applied to the paper pattern from `0` to `1`. Defaults to `0`. */
|
|
27
|
+
readonly fade?: number;
|
|
28
|
+
/** Seed for the generated paper pattern from `0` to `1000`. Defaults to `6`. */
|
|
29
|
+
readonly seed?: number;
|
|
30
|
+
/** Scale of the generated paper texture from `0.01` to `4`. Defaults to `0.6`. */
|
|
31
|
+
readonly scale?: number;
|
|
32
|
+
};
|
|
33
|
+
export declare const paper: (params?: (PaperParams & {
|
|
34
|
+
readonly disabled?: boolean | undefined;
|
|
35
|
+
}) | 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.486",
|
|
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.486"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
@@ -199,6 +199,11 @@
|
|
|
199
199
|
"module": "./dist/esm/noise-displacement.mjs",
|
|
200
200
|
"import": "./dist/esm/noise-displacement.mjs"
|
|
201
201
|
},
|
|
202
|
+
"./paper": {
|
|
203
|
+
"types": "./dist/paper.d.ts",
|
|
204
|
+
"module": "./dist/esm/paper.mjs",
|
|
205
|
+
"import": "./dist/esm/paper.mjs"
|
|
206
|
+
},
|
|
202
207
|
"./pattern": {
|
|
203
208
|
"types": "./dist/pattern.d.ts",
|
|
204
209
|
"module": "./dist/esm/pattern.mjs",
|
|
@@ -264,6 +269,11 @@
|
|
|
264
269
|
"module": "./dist/esm/tv-signal-off.mjs",
|
|
265
270
|
"import": "./dist/esm/tv-signal-off.mjs"
|
|
266
271
|
},
|
|
272
|
+
"./venetian-blinds": {
|
|
273
|
+
"types": "./dist/venetian-blinds.d.ts",
|
|
274
|
+
"module": "./dist/esm/venetian-blinds.mjs",
|
|
275
|
+
"import": "./dist/esm/venetian-blinds.mjs"
|
|
276
|
+
},
|
|
267
277
|
"./vignette": {
|
|
268
278
|
"types": "./dist/vignette.d.ts",
|
|
269
279
|
"module": "./dist/esm/vignette.mjs",
|
|
@@ -397,6 +407,9 @@
|
|
|
397
407
|
"noise-displacement": [
|
|
398
408
|
"dist/noise-displacement.d.ts"
|
|
399
409
|
],
|
|
410
|
+
"paper": [
|
|
411
|
+
"dist/paper.d.ts"
|
|
412
|
+
],
|
|
400
413
|
"pattern": [
|
|
401
414
|
"dist/pattern.d.ts"
|
|
402
415
|
],
|
|
@@ -436,6 +449,9 @@
|
|
|
436
449
|
"tv-signal-off": [
|
|
437
450
|
"dist/tv-signal-off.d.ts"
|
|
438
451
|
],
|
|
452
|
+
"venetian-blinds": [
|
|
453
|
+
"dist/venetian-blinds.d.ts"
|
|
454
|
+
],
|
|
439
455
|
"vignette": [
|
|
440
456
|
"dist/vignette.d.ts"
|
|
441
457
|
],
|
|
@@ -458,7 +474,7 @@
|
|
|
458
474
|
},
|
|
459
475
|
"homepage": "https://www.remotion.dev/docs/effects/api",
|
|
460
476
|
"devDependencies": {
|
|
461
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
477
|
+
"@remotion/eslint-config-internal": "4.0.486",
|
|
462
478
|
"@vitest/browser-playwright": "4.0.9",
|
|
463
479
|
"eslint": "9.19.0",
|
|
464
480
|
"vitest": "4.0.9",
|