UNPKG

polygonjs-engine

Version:

node-based webgl 3D engine https://polygonjs.com

46 lines (45 loc) 2.21 kB
/** * Resample input lines * */ import { LineSegments } from 'three/src/objects/LineSegments'; import { BufferGeometry } from 'three/src/core/BufferGeometry'; import { CatmullRomCurve3 } from 'three/src/extras/curves/CatmullRomCurve3'; import { TypedSopNode } from './_Base'; export declare enum METHOD { POINTS_COUNT = "pointsCount", SEGMENT_LENGTH = "segmentLength" } export declare const METHODS: METHOD[]; export declare enum CURVE_TYPE { CENTRIPETAL = "centripetal", CHORDAL = "chordal", CATMULLROM = "catmullrom" } export declare const CURVE_TYPES: CURVE_TYPE[]; import { NodeParamsConfig } from '../utils/params/ParamsConfig'; import { CoreGroup } from '../../../core/geometry/Group'; import { CorePoint } from '../../../core/geometry/Point'; import { Vector3 } from 'three/src/math/Vector3'; declare class ResampleSopParamsConfig extends NodeParamsConfig { /** @param resampling method */ method: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param type of curve this will generate */ curveType: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param curve tension */ tension: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; /** @param points count */ pointsCount: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.INTEGER>; /** @param segments length */ segmentLength: import("../utils/params/ParamsConfig").ParamTemplate<import("../../poly/ParamType").ParamType.FLOAT>; } export declare class ResampleSopNode extends TypedSopNode<ResampleSopParamsConfig> { params_config: ResampleSopParamsConfig; static type(): string; initializeNode(): void; cook(input_contents: CoreGroup[]): void; _resample(line_segment: LineSegments): LineSegments<import("three").Geometry | BufferGeometry, import("three").Material | import("three").Material[]>; _create_curve_from_points(points: CorePoint[]): BufferGeometry | undefined; _get_points_from_curve(curve: CatmullRomCurve3): Vector3[]; } export {};