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.
28 lines • 1.87 kB
TypeScript
import { ArcCurve, CatmullRomCurve3, CubicBezierCurve, CubicBezierCurve3, Curve, CurvePath, EllipseCurve, LineCurve, LineCurve3, QuadraticBezierCurve, QuadraticBezierCurve3, SplineCurve, Vector2, Vector3 } from 'three';
import { UiObjectConfig } from 'uiconfig.js';
import { Class } from 'ts-browser-helpers';
import { CurvePath3 } from '../../../three/utils/curve';
export type SupportedCurveTypes = LineCurve | LineCurve3 | CubicBezierCurve | CubicBezierCurve3 | EllipseCurve | ArcCurve | QuadraticBezierCurve | QuadraticBezierCurve3 | CatmullRomCurve3 | SplineCurve | CurvePath<Vector2> | CurvePath3;
export interface CurveUiEntry {
ctor?: Class<Curve<any>>;
getUiConfig: (curve: any) => UiObjectConfig['children'];
/** Maps semantic property names to actual curve property names, used to copy values when switching curve types */
vals: Record<string, string>;
}
/**
* Registry of curve types with their UI config generators.
* Used by geometry generators that have curve parameters (TubeGeometryGenerator, LineGeometryGenerator, etc.)
*/
export declare const curveUiConfigs: Record<string, CurveUiEntry>;
/**
* Create a curve type dropdown UI config for selecting between curve types.
* @param curve Current curve instance
* @param configs Curve UI config registry to use (defaults to full registry)
* @param onTypeChange Callback when curve type is changed
*/
export declare function createCurveTypeDropdown(curve: Curve<Vector2 | Vector3>, onTypeChange: (newCurve: Curve<any>) => void, configs?: Record<string, CurveUiEntry>): UiObjectConfig;
/**
* Create UI config entries for editing the properties of a curve.
*/
export declare function createCurvePropertyUi(curve: Curve<Vector2 | Vector3>, configs?: Record<string, CurveUiEntry>): UiObjectConfig[];
//# sourceMappingURL=../../../src/plugins/geometry/helpers/CurveUiHelper.d.ts.map