ThreePipe
    Preparing search index...

    Class TubeShapeGeometry

    Hierarchy

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • shape: Shape

        — closed 2D shape for the cross-section

      • path: Curve<Vector3>

        — 3D curve to extrude along

      • shapeSegments: number = 32

        — subdivisions of the shape cross-section

      • tubularSegments: number = 64

        — subdivisions along the path

      • closed: boolean = false

        — whether the path forms a closed loop

      • shapeScale: Vector2 = ...

        — scale applied to the shape cross-section

      • primary: "path" | "shape" = 'shape'

        — 'shape' or 'path', controls triangle orientation for optimal rendering

      Returns TubeShapeGeometry

    Properties

    frames: { binormals: Vector3[]; normals: Vector3[]; tangents: Vector3[] }
    parameters: {
        closed: boolean;
        path: Curve<Vector3>;
        primary: "path" | "shape";
        shape: Shape;
        shapeScale: Vector2;
        shapeSegments: number;
        tubularSegments: number;
    }

    Methods

    • Split the geometry into material groups at the given normalized positions. Useful for multi-material tubes (e.g., road with different lane colors).

      Parameters

      • splits: number[]

        Array of normalized positions (0-1) along the primary axis where splits occur

      Returns number

      Number of groups created