@toolpath/viewer 1.5.0 → 2.1.0

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,4 +1,5 @@
1
1
  import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { Group, Mesh, LineSegments, Box3, Plane, BufferGeometry, Vector3, Raycaster, Object3D, Intersection, Camera } from 'three';
3
4
 
4
5
  /**
@@ -851,6 +852,11 @@ interface PartMeshProps {
851
852
  showEdges?: boolean;
852
853
  /** Wireframe shows region boundaries and any hovered/painted faces, with no triangle diagonals. */
853
854
  display?: PartDisplay;
855
+ /**
856
+ * Objects drawn on the part, such as `<ToolMarks>`. They can read its model
857
+ * and mesh with `usePartContext`.
858
+ */
859
+ children?: ReactNode;
854
860
  }
855
861
  /**
856
862
  * The part, as one mesh with one material.
@@ -862,7 +868,7 @@ interface PartMeshProps {
862
868
  * React render at all: the hovered face lives in a ref, and routing it through
863
869
  * state is what this rewrite exists to stop doing.
864
870
  */
865
- declare const PartMesh: ({ model, geometry, selection, focus, candidates, highlights, regionHighlights, pickedRegions, hoveredFeatureIds, hover, activeDirection, section, onSectionChange, onAdjacency, focusFeature, onHover, onPick, theme, showEdges, display, }: PartMeshProps) => react.JSX.Element;
871
+ declare const PartMesh: ({ model, geometry, selection, focus, candidates, highlights, regionHighlights, pickedRegions, hoveredFeatureIds, hover, activeDirection, section, onSectionChange, onAdjacency, focusFeature, onHover, onPick, theme, showEdges, display, children, }: PartMeshProps) => react.JSX.Element;
866
872
 
867
873
  interface EnginePartProps extends Omit<PartMeshProps, 'model' | 'geometry'> {
868
874
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolpath/viewer",
3
- "version": "1.5.0",
3
+ "version": "2.1.0",
4
4
  "description": "React Three Fiber viewer for Toolpath Engine part reports",
5
5
  "license": "MIT",
6
6
  "engines": {