@remotion/paths 4.0.0-alpha6 → 4.0.0-alpha8
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/package.json +1 -1
- package/dist/get-parts.d.ts +0 -8
- package/dist/get-parts.js +0 -32
package/package.json
CHANGED
package/dist/get-parts.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Part } from './helpers/types';
|
|
2
|
-
/**
|
|
3
|
-
* @description Splits a valid SVG path into it's parts.
|
|
4
|
-
* @param {string} path A valid SVG path
|
|
5
|
-
* @see [Documentation](https://remotion.dev/docs/paths/get-parts)
|
|
6
|
-
* @deprecated In favor of getSubpaths()
|
|
7
|
-
*/
|
|
8
|
-
export declare const getParts: (path: string) => Part[];
|
package/dist/get-parts.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getParts = void 0;
|
|
4
|
-
const construct_1 = require("./helpers/construct");
|
|
5
|
-
/**
|
|
6
|
-
* @description Splits a valid SVG path into it's parts.
|
|
7
|
-
* @param {string} path A valid SVG path
|
|
8
|
-
* @see [Documentation](https://remotion.dev/docs/paths/get-parts)
|
|
9
|
-
* @deprecated In favor of getSubpaths()
|
|
10
|
-
*/
|
|
11
|
-
const getParts = (path) => {
|
|
12
|
-
const parts = [];
|
|
13
|
-
const constructed = (0, construct_1.construct)(path);
|
|
14
|
-
let i = 0;
|
|
15
|
-
for (const fn of constructed.functions) {
|
|
16
|
-
if (!fn) {
|
|
17
|
-
i++;
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
const properties = {
|
|
21
|
-
start: fn.getPointAtLength(0),
|
|
22
|
-
end: fn.getPointAtLength(constructed.partial_lengths[i] - constructed.partial_lengths[i - 1]),
|
|
23
|
-
length: constructed.partial_lengths[i] - constructed.partial_lengths[i - 1],
|
|
24
|
-
getPointAtLength: fn.getPointAtLength,
|
|
25
|
-
getTangentAtLength: fn.getTangentAtLength,
|
|
26
|
-
};
|
|
27
|
-
i++;
|
|
28
|
-
parts.push(properties);
|
|
29
|
-
}
|
|
30
|
-
return parts;
|
|
31
|
-
};
|
|
32
|
-
exports.getParts = getParts;
|