mtrl 0.8.0-next.11 → 0.8.0-next.12
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/core/shapes/material.d.ts +6 -3
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +11 -11
- package/dist/index.js.map +3 -3
- package/dist/package.json +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -7,15 +7,18 @@ export declare const materialShape: (name: MaterialShapeName) => RoundedPolygon;
|
|
|
7
7
|
export interface RadialProfile {
|
|
8
8
|
/** Radius at angle i * 2π / radii.length, clockwise from the positive x axis on a y-down canvas */
|
|
9
9
|
radii: Float32Array;
|
|
10
|
+
/** The area centroid the radii are measured from */
|
|
10
11
|
centerX: number;
|
|
11
12
|
centerY: number;
|
|
12
13
|
/** The largest radius, for fitting the shape into a circle */
|
|
13
14
|
maxRadius: number;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
|
-
* Samples the outline at `samples` angles
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Samples the outline at `samples` angles around the shape's area centroid.
|
|
18
|
+
* The centroid, not the bounds centre, is the pivot: a pentagon's mass sits
|
|
19
|
+
* below the middle of its box, and turning it about the box would make it
|
|
20
|
+
* orbit. The shape must be star-shaped around its centroid, which every
|
|
21
|
+
* Material shape is: each ray from the centre crosses the outline once.
|
|
19
22
|
*/
|
|
20
23
|
export declare const radialProfile: (polygon: RoundedPolygon, samples?: number, stepsPerCubic?: number) => RadialProfile;
|
|
21
24
|
export { polygonMaxRadius };
|