Skip to content

Commit

Permalink
Merge pull request #1376 from paireks/develop/Polyline_UpdateTypes
Browse files Browse the repository at this point in the history
Adding missing types for Polyline geometry
  • Loading branch information
xeolabs authored Feb 20, 2024
2 parents 297a9ab + 9a67304 commit 6559a30
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/scenegraph/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
["buildCylinderGeometry", "Building cylinder-shaped triangle mesh geometry"],
["buildGridGeometry", "Building grid-shaped wireframe geometry"],
["buildPlaneGeometry", "Building plane-shaped triangle mesh geometry"],
["buildPolylineGeometry", "Building 3D polyline geometry"],
["buildTorusGeometry", "Building torus-shaped triangle mesh geometry"],
["buildVectorTextGeometry", "Building vector text geometry"]
],
Expand Down
7 changes: 7 additions & 0 deletions src/viewer/scene/geometry/builders/buildPolylineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ import {utils} from '../../utils.js';
* emissive: [0, 1,]
* })
* });
* ````
*
* @function buildPolylineGeometry
* @param {*} [cfg] Configs
* @param {String} [cfg.id] Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted.
* @param {Number[]} [cfg.points] 3D points indicating vertices position.
* @returns {Object} Configuration for a {@link Geometry} subtype.
*/
function buildPolylineGeometry(cfg = {}) {

Expand Down
16 changes: 16 additions & 0 deletions types/viewer/scene/geometry/builders/buildPolylineGeometry.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Geometry } from "../Geometry";

export declare type buildPolylineGeometryConfiguration = {
/* Optional ID for the {@link Geometry}, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
id?: string;
/* 3D points indicating vertices position. */
points?: 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;

0 comments on commit 6559a30

Please sign in to comment.