@remotion/serverless-client 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.
- package/dist/esm/index.mjs +13 -3
- package/package.json +5 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -80,6 +80,14 @@ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
function assertValidInterpolatePosterizeOption(posterize) {
|
|
84
|
+
if (posterize === undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (typeof posterize !== "number" || !Number.isFinite(posterize) || posterize <= 0) {
|
|
88
|
+
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
83
91
|
function interpolate(input, inputRange, outputRange, options) {
|
|
84
92
|
if (typeof input === "undefined") {
|
|
85
93
|
throw new Error("input can not be undefined");
|
|
@@ -97,6 +105,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
97
105
|
checkInfiniteRange("outputRange", outputRange);
|
|
98
106
|
checkValidInputRange(inputRange);
|
|
99
107
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
108
|
+
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
100
109
|
const easingOption = options?.easing;
|
|
101
110
|
const defaultEasing = (num) => num;
|
|
102
111
|
const resolveEasingForSegment = (segmentIndex) => {
|
|
@@ -122,8 +131,9 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
122
131
|
if (inputRange.length === 1) {
|
|
123
132
|
return outputRange[0];
|
|
124
133
|
}
|
|
125
|
-
const
|
|
126
|
-
|
|
134
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
135
|
+
const range = findRange(posterizedInput, inputRange);
|
|
136
|
+
return interpolateFunction(posterizedInput, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
127
137
|
easing: resolveEasingForSegment(range),
|
|
128
138
|
extrapolateLeft,
|
|
129
139
|
extrapolateRight
|
|
@@ -1139,7 +1149,7 @@ var validateFramesPerFunction = ({
|
|
|
1139
1149
|
import * as tty from "tty";
|
|
1140
1150
|
|
|
1141
1151
|
// ../core/dist/esm/version.mjs
|
|
1142
|
-
var VERSION = "4.0.
|
|
1152
|
+
var VERSION = "4.0.471";
|
|
1143
1153
|
|
|
1144
1154
|
// ../renderer/dist/esm/error-handling.mjs
|
|
1145
1155
|
var isColorSupported = () => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/serverless-client"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/serverless-client",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.471",
|
|
7
7
|
"main": "dist",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"lint": "eslint src",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"remotion": "4.0.
|
|
27
|
-
"@remotion/streaming": "4.0.
|
|
28
|
-
"@remotion/renderer": "4.0.
|
|
29
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"remotion": "4.0.471",
|
|
27
|
+
"@remotion/streaming": "4.0.471",
|
|
28
|
+
"@remotion/renderer": "4.0.471",
|
|
29
|
+
"@remotion/eslint-config-internal": "4.0.471",
|
|
30
30
|
"eslint": "9.19.0",
|
|
31
31
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
32
32
|
},
|