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.

36 lines 1.59 kB
import { BufferGeometry, Curve, Shape, Vector2, Vector3 } from 'three'; export declare class TubeShapeGeometry extends BufferGeometry { frames: { tangents: Vector3[]; normals: Vector3[]; binormals: Vector3[]; }; parameters: { path: Curve<Vector3>; shape: Shape; shapeScale: Vector2; shapeSegments: number; closed: boolean; tubularSegments: number; primary: 'shape' | 'path'; }; /** * @param shape — closed 2D shape for the cross-section * @param path — 3D curve to extrude along * @param shapeSegments — subdivisions of the shape cross-section * @param tubularSegments — subdivisions along the path * @param closed — whether the path forms a closed loop * @param shapeScale — scale applied to the shape cross-section * @param primary — 'shape' or 'path', controls triangle orientation for optimal rendering */ constructor(shape: Shape, path: Curve<Vector3>, shapeSegments?: number, tubularSegments?: number, closed?: boolean, shapeScale?: Vector2, primary?: 'shape' | 'path'); /** * Split the geometry into material groups at the given normalized positions. * Useful for multi-material tubes (e.g., road with different lane colors). * @param splits Array of normalized positions (0-1) along the primary axis where splits occur * @returns Number of groups created */ createSplits(splits: number[]): number; toJSON(): any; } //# sourceMappingURL=../../src/core/geometry/TubeShapeGeometry.d.ts.map