Skip to content

Commit

Permalink
Merge pull request #1387 from paireks/develop/DrawingCurve_UpdateTypes
Browse files Browse the repository at this point in the history
Updating types for buildPolylineGeometryFromCurve method
  • Loading branch information
xeolabs authored Feb 28, 2024
2 parents 29d5921 + cfe05c2 commit 20aeff3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/scenegraph/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
["buildGridGeometry", "Building grid-shaped wireframe geometry"],
["buildPlaneGeometry", "Building plane-shaped triangle mesh geometry"],
["buildPolylineGeometry", "Building 3D polyline geometry"],
["buildPolylineGeometryFromCurve", "Building 3D polyline geometry from curve"],
["buildTorusGeometry", "Building torus-shaped triangle mesh geometry"],
["buildVectorTextGeometry", "Building vector text geometry"]
],
Expand Down
19 changes: 18 additions & 1 deletion types/viewer/scene/geometry/builders/buildPolylineGeometry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,27 @@ export declare type buildPolylineGeometryConfiguration = {
points?: number[];
};

export declare type buildPolylineGeometryFromCurveConfiguration = {
/* Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
id?: string;
/* Curve for which polyline will be created. */
curve?: Object;
/* The number of divisions. */
divisions?: number;
};

/**
* @desc Creates a 3D polyline {@link Geometry}.
*
* @param {buildBoxLinesGeometryConfiguration} [cfg] Configs
* @returns {Object} Configuration for a {@link Geometry} subtype.
*/
export function buildPolylineGeometry(cfg: buildPolylineGeometryConfiguration): Geometry;
export function buildPolylineGeometry(cfg: buildPolylineGeometryConfiguration): Geometry;

/**
* @desc Creates a 3D polyline from curve {@link Geometry}.
*
* @param {buildBoxLinesGeometryConfiguration} [cfg] Configs
* @returns {Object} Configuration for a {@link Geometry} subtype.
*/
export function buildPolylineGeometryFromCurve(cfg: buildPolylineGeometryFromCurveConfiguration): Geometry;

0 comments on commit 20aeff3

Please sign in to comment.