@hatiolab/things-scene 10.1.65 → 10.1.66

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.
@@ -1,12 +1,7 @@
1
1
  import * as THREE from 'three';
2
- import { type FigureSection } from '@hatiolab/figure-model';
2
+ import { figureSectionOutline, type FigureSection } from '@hatiolab/figure-model';
3
+ export { figureSectionOutline };
3
4
  type Axis = 'x' | 'y' | 'z';
4
- type P2 = [number, number];
5
- /**
6
- * A section's outline in its plane (u, v) -- `FIGURE_SECTION_PLANE`, right-handed with the push axis -- counter-
7
- * clockwise, offset by `centre` (an inside's middle).
8
- */
9
- export declare function figureSectionOutline(section: FigureSection, axis: Axis, segments: number, centre?: Partial<Record<Axis, number>>): P2[];
10
5
  /** A pushed section, with its inside if it has one, in the part's own frame. */
11
6
  export declare function extrusionGeometry(shape: {
12
7
  extrusion?: {
@@ -53,5 +48,4 @@ export declare function revolutionGeometry(revolution: {
53
48
  }, segments: number): THREE.BufferGeometry;
54
49
  /** A section's outline as points in the part's own frame, at `at` along its push axis. */
55
50
  export declare function figureSectionLoop(section: FigureSection, axis: Axis, at: number, segments: number, centre?: Partial<Record<Axis, number>>): Array<[number, number, number]>;
56
- export {};
57
51
  //# sourceMappingURL=figure-shape-mesh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"figure-shape-mesh.d.ts","sourceRoot":"","sources":["../../src/figure/figure-shape-mesh.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAgE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEzH,KAAK,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAC3B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAO1B;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ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AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE;IACjC,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,aAAa,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAA;CACpC,GAAG,KAAK,CAAC,cAAc,CAgBvB;AAED,iGAAiG;AACjG,wBAAgB,kBAAkB,CAChC,UAAU,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACpL,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC,cAAc,CAatB;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAM,GACzC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAMjC"}
@@ -1,27 +1,8 @@
1
+ import { figureConvexHull, type FigureTopShape, type FigureTopView } from '@hatiolab/figure-model';
1
2
  import type { RegisteredFigureFigure } from './figure-registry.js';
2
- export interface FigureTopShape {
3
- /** The body it is. */
4
- id: string;
5
- color: string;
6
- /** The outline on the plan, in mm, x along the figure's X and y along its Z, centred on the figure's origin. */
7
- outline: Array<[number, number]>;
8
- /** Openings inside the outline, seen through from above: a hollow box's inside. */
9
- holes: Array<Array<[number, number]>>;
10
- /** The highest point of the body, for the painting order. */
11
- top: number;
12
- transparent: boolean;
13
- }
14
- export interface FigureTopView {
15
- shapes: FigureTopShape[];
16
- /** The size it was evaluated at, after clamping to the sizes the figure declares; null at the authored size. */
17
- size: {
18
- x: number;
19
- y: number;
20
- z: number;
21
- } | null;
22
- }
23
- /** The outline of points on a plane: their convex hull, counter-clockwise (Andrew's monotone chain). */
24
- export declare function convexHull(points: ReadonlyArray<readonly [number, number]>): Array<[number, number]>;
3
+ export type { FigureTopShape, FigureTopView };
4
+ /** The outline of points on a plane: their convex hull, counter-clockwise. figure-model's own. */
5
+ export declare const convexHull: typeof figureConvexHull;
25
6
  /**
26
7
  * The figure's plan at a size (mm; null for its authored size). A body the asset does not show, or a shape with no
27
8
  * sample points, is left out.
@@ -1 +1 @@
1
- {"version":3,"file":"figure-top-view.d.ts","sourceRoot":"","sources":["../../src/figure/figure-top-view.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,gHAAgH;IAChH,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAChC,mFAAmF;IACnF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACrC,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,gHAAgH;IAChH,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD;AAED,wGAAwG;AACxG,wBAAgB,UAAU,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAgBpG;AAKD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,aAAa,CAiD7H"}
1
+ {"version":3,"file":"figure-top-view.d.ts","sourceRoot":"","sources":["../../src/figure/figure-top-view.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAqB,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGrH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA;AAE7C,kGAAkG;AAClG,eAAO,MAAM,UAAU,yBAAmB,CAAA;AAE1C;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,EAAE,IAAI,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,aAAa,CAK7H"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatiolab/things-scene",
3
- "version": "10.1.65",
3
+ "version": "10.1.66",
4
4
  "description": "A high-performance 2D/3D scene graph library for building interactive visual editors, combining HTML5 Canvas and Three.js to enable facility visualization, data-driven animations, and real-time monitoring dashboards",
5
5
  "main": "things-scene-min.js",
6
6
  "module": "things-scene.mjs",
@@ -91,7 +91,7 @@
91
91
  },
92
92
  "homepage": "https://github.com/hatiolab/things-scene#readme",
93
93
  "dependencies": {
94
- "@hatiolab/figure-model": "^0.2.7",
94
+ "@hatiolab/figure-model": "^0.2.10",
95
95
  "@wizpanda/super-gif": "^0.0.6",
96
96
  "dompurify": "^3.3.1",
97
97
  "jsonata": "^1.8.6",