@remotion/vercel 4.0.512 → 4.0.513

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.
Files changed (2) hide show
  1. package/dist/esm/index.mjs +12 -4
  2. package/package.json +4 -4
@@ -1076,7 +1076,9 @@ var interpolateString = ({
1076
1076
  }) => {
1077
1077
  const initiallyParsedOutputRange = outputRange.map(parseStringInterpolationValue);
1078
1078
  const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
1079
- const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed) => {
1079
+ const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
1080
+ const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
1081
+ const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
1080
1082
  if (parsed.kind !== "rotate") {
1081
1083
  return parsed;
1082
1084
  }
@@ -1086,9 +1088,11 @@ var interpolateString = ({
1086
1088
  if (parsed.dimensions !== 1) {
1087
1089
  throw new TypeError("Cannot interpolate a multi-angle rotate value with an axis rotation");
1088
1090
  }
1091
+ const adjacentAxisRotation = parsed.values[0] === 0 ? index === segmentIndex ? initiallyParsedOutputRange[index + 1] : index === segmentIndex + 1 ? initiallyParsedOutputRange[index - 1] : undefined : undefined;
1092
+ const axis = adjacentAxisRotation?.axisRotation ? adjacentAxisRotation.values : [0, 0, 1];
1089
1093
  return {
1090
1094
  kind: "rotate",
1091
- values: [0, 0, 1, parsed.values[0]],
1095
+ values: [axis[0], axis[1], axis[2], parsed.values[0]],
1092
1096
  units: [null, null, null, parsed.units[0]],
1093
1097
  dimensions: 4,
1094
1098
  axisRotation: true
@@ -3434,7 +3438,9 @@ var interpolateString = ({
3434
3438
  }) => {
3435
3439
  const initiallyParsedOutputRange = outputRange.map(parseStringInterpolationValue);
3436
3440
  const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
3437
- const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed) => {
3441
+ const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
3442
+ const segmentIndex = inputRange.length === 1 ? 0 : findRange(posterizedInput, inputRange);
3443
+ const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
3438
3444
  if (parsed.kind !== "rotate") {
3439
3445
  return parsed;
3440
3446
  }
@@ -3444,9 +3450,11 @@ var interpolateString = ({
3444
3450
  if (parsed.dimensions !== 1) {
3445
3451
  throw new TypeError("Cannot interpolate a multi-angle rotate value with an axis rotation");
3446
3452
  }
3453
+ const adjacentAxisRotation = parsed.values[0] === 0 ? index === segmentIndex ? initiallyParsedOutputRange[index + 1] : index === segmentIndex + 1 ? initiallyParsedOutputRange[index - 1] : undefined : undefined;
3454
+ const axis = adjacentAxisRotation?.axisRotation ? adjacentAxisRotation.values : [0, 0, 1];
3447
3455
  return {
3448
3456
  kind: "rotate",
3449
- values: [0, 0, 1, parsed.values[0]],
3457
+ values: [axis[0], axis[1], axis[2], parsed.values[0]],
3450
3458
  units: [null, null, null, parsed.units[0]],
3451
3459
  dimensions: 4,
3452
3460
  axisRotation: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/vercel",
3
- "version": "4.0.512",
3
+ "version": "4.0.513",
4
4
  "description": "Render Remotion videos on Vercel Sandbox",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "url": "https://github.com/remotion-dev/remotion/issues"
24
24
  },
25
25
  "dependencies": {
26
- "@remotion/renderer": "4.0.512",
27
- "remotion": "4.0.512"
26
+ "@remotion/renderer": "4.0.513",
27
+ "remotion": "4.0.513"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@vercel/sandbox": ">=1.0.0"
@@ -38,7 +38,7 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "devDependencies": {
41
- "@remotion/eslint-config-internal": "4.0.512",
41
+ "@remotion/eslint-config-internal": "4.0.513",
42
42
  "@vercel/blob": "2.3.0",
43
43
  "@vercel/sandbox": "1.6.0",
44
44
  "eslint": "9.19.0",