@remotion/svg-3d-engine 4.0.370 → 4.0.372
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.
|
@@ -3,12 +3,13 @@ import type { FaceType } from './map-face';
|
|
|
3
3
|
import type { MatrixTransform4D } from './matrix';
|
|
4
4
|
type ExtrudeElementOptions = {
|
|
5
5
|
depth: number;
|
|
6
|
+
pressInDepth: number;
|
|
6
7
|
sideColor: string;
|
|
7
8
|
points: Instruction[];
|
|
8
9
|
description?: string;
|
|
9
10
|
crispEdges: boolean;
|
|
10
11
|
};
|
|
11
|
-
export declare const extrudeElement: ({ depth, sideColor, points, crispEdges, }: ExtrudeElementOptions) => FaceType[];
|
|
12
|
+
export declare const extrudeElement: ({ depth, sideColor, points, crispEdges, pressInDepth, }: ExtrudeElementOptions) => FaceType[];
|
|
12
13
|
export declare const extrudeAndTransformElement: (options: ExtrudeElementOptions & {
|
|
13
14
|
transformations: MatrixTransform4D;
|
|
14
15
|
}) => FaceType[];
|
|
@@ -42,7 +42,7 @@ const inverseInstruction = (instruction, comingFrom) => {
|
|
|
42
42
|
}
|
|
43
43
|
throw new Error('Unknown instruction type');
|
|
44
44
|
};
|
|
45
|
-
const extrudeElement = ({ depth, sideColor, points, crispEdges, }) => {
|
|
45
|
+
const extrudeElement = ({ depth, sideColor, points, crispEdges, pressInDepth, }) => {
|
|
46
46
|
const threeD = (0, fix_z_1.turnInto3D)(points);
|
|
47
47
|
const instructions = {
|
|
48
48
|
centerPoint: [0, 0, 0, 1],
|
|
@@ -60,10 +60,10 @@ const extrudeElement = ({ depth, sideColor, points, crispEdges, }) => {
|
|
|
60
60
|
const movingOver = [
|
|
61
61
|
nextPoint[0],
|
|
62
62
|
nextPoint[1],
|
|
63
|
-
nextPoint[2] - depth,
|
|
63
|
+
nextPoint[2] - depth + pressInDepth,
|
|
64
64
|
nextPoint[3],
|
|
65
65
|
];
|
|
66
|
-
const translatedInstruction = (0, map_face_1.translateSvgInstruction)(inverseInstruction(nextInstruction, currentPoint), 0, 0, -depth);
|
|
66
|
+
const translatedInstruction = (0, map_face_1.translateSvgInstruction)(inverseInstruction(nextInstruction, currentPoint), 0, 0, -depth + pressInDepth);
|
|
67
67
|
const newInstructions = [
|
|
68
68
|
{
|
|
69
69
|
type: 'M',
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1301,7 +1301,8 @@ var extrudeElement = ({
|
|
|
1301
1301
|
depth,
|
|
1302
1302
|
sideColor,
|
|
1303
1303
|
points,
|
|
1304
|
-
crispEdges
|
|
1304
|
+
crispEdges,
|
|
1305
|
+
pressInDepth
|
|
1305
1306
|
}) => {
|
|
1306
1307
|
const threeD = turnInto3D(points);
|
|
1307
1308
|
const instructions = {
|
|
@@ -1318,10 +1319,10 @@ var extrudeElement = ({
|
|
|
1318
1319
|
const movingOver = [
|
|
1319
1320
|
nextPoint[0],
|
|
1320
1321
|
nextPoint[1],
|
|
1321
|
-
nextPoint[2] - depth,
|
|
1322
|
+
nextPoint[2] - depth + pressInDepth,
|
|
1322
1323
|
nextPoint[3]
|
|
1323
1324
|
];
|
|
1324
|
-
const translatedInstruction = translateSvgInstruction(inverseInstruction(nextInstruction, currentPoint), 0, 0, -depth);
|
|
1325
|
+
const translatedInstruction = translateSvgInstruction(inverseInstruction(nextInstruction, currentPoint), 0, 0, -depth + pressInDepth);
|
|
1325
1326
|
const newInstructions = [
|
|
1326
1327
|
{
|
|
1327
1328
|
type: "M",
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/svg-3d-engine",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@remotion/paths": "4.0.
|
|
4
|
+
"@remotion/paths": "4.0.372"
|
|
5
5
|
},
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
7
|
+
"@remotion/eslint-config-internal": "4.0.372",
|
|
8
8
|
"eslint": "9.19.0"
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/cjs/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"require": "./dist/cjs/index.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
"version": "4.0.
|
|
26
|
+
"version": "4.0.372",
|
|
27
27
|
"repository": {
|
|
28
28
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/svg-3d-engine"
|
|
29
29
|
},
|