UNPKG

threepipe

Version:

A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.

44 lines 1.75 kB
import { BufferAttribute, Curve, Float32BufferAttribute, Shape, Vector3 } from 'three'; import { AGeometryGenerator } from '../AGeometryGenerator'; import { IGeometry } from '../../../core/IGeometry'; import { UiObjectConfig } from 'uiconfig.js'; export interface TubeShapeGeometryGeneratorParams { path: Curve<Vector3>; shapeType: 'rectangle' | 'circle' | 'polygon' | 'custom'; shape?: Shape; width: number; height: number; circleRadius: number; circleSegments: number; sides: number; polygonRadius: number; shapeSegments: number; tubularSegments: number; closed: boolean; shapeScaleX: number; shapeScaleY: number; primary: 'shape' | 'path'; materialSplits: string; } /** * Generates a tube geometry with arbitrary shape cross-section along a 3D curve path. * Uses the custom TubeShapeGeometry internally, which supports non-circular cross-sections, * shape scaling, and multi-material splits. */ export declare class TubeShapeGeometryGenerator extends AGeometryGenerator<TubeShapeGeometryGeneratorParams> { constructor(type?: string, defaultParams?: Partial<TubeShapeGeometryGeneratorParams>); defaultParams: TubeShapeGeometryGeneratorParams; protected _generateData(params: TubeShapeGeometryGeneratorParams): { indices: number[] | BufferAttribute; vertices: Float32BufferAttribute; normals: Float32BufferAttribute; uvs: Float32BufferAttribute; groups?: { start: number; count: number; materialIndex?: number; }[]; }; createUiConfig(geometry: IGeometry): UiObjectConfig[]; } //# sourceMappingURL=../../../src/plugins/geometry/primitives/TubeShapeGeometryGenerator.d.ts.map