@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
49 lines (48 loc) • 1.72 kB
TypeScript
import { CubicInterpolant } from 'three';
export interface RampPointJson {
position: number;
value: number;
}
export interface RampValueJson {
points: RampPointJson[];
interpolation: RampInterpolation;
}
export declare class RampPoint {
private _position;
private _value;
constructor(_position?: number, _value?: number);
toJSON(): RampPointJson;
position(): number;
value(): number;
copy(point: RampPoint): void;
clone(): RampPoint;
isEqual(other_point: RampPoint): boolean;
isEqualJSON(json: RampPointJson): boolean;
fromJSON(json: RampPointJson): void;
static areEqualJSON(json1: RampPointJson, json2: RampPointJson): boolean;
static fromJSON(json: RampPointJson): RampPoint;
}
export declare enum RampInterpolation {
CUBIC = "cubic"
}
export declare const RAMP_INTERPOLATIONS: RampInterpolation[];
export declare class RampValue {
private _interpolation;
private _points;
private _uuid;
constructor(_interpolation?: RampInterpolation, _points?: RampPoint[]);
uuid(): string;
interpolation(): RampInterpolation;
points(): RampPoint[];
static createInterpolantFromValues(positions: Float32Array, values: Float32Array): CubicInterpolant;
createInterpolant(): CubicInterpolant;
static createInterpolant(rampValue: RampValue): CubicInterpolant;
static fromJSON(json: RampValueJson): RampValue;
toJSON(): RampValueJson;
clone(): RampValue;
copy(ramp: RampValue): void;
isEqual(other_ramp_value: RampValue): boolean;
isEqualJSON(json: RampValueJson): boolean;
static are_json_equal(json1: RampValueJson, json2: RampValueJson): boolean;
fromJSON(json: RampValueJson): void;
}