Skip to content

Commit

Permalink
NURBSCurve: Add toJSON() and fromJSON(). (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Oct 24, 2024
1 parent dcefd2a commit b7e80ff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion types/three/examples/jsm/curves/NURBSCurve.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Curve, Vector2, Vector3, Vector4 } from "three";
import { Curve, CurveJSON, Vector2, Vector3, Vector4 } from "three";

export interface NURBSCurveJSON extends CurveJSON {
degree: number;
knots: number[];
controlPoints: number[][];
startKnot: number;
endKnot: number;
}

export class NURBSCurve extends Curve<Vector3> {
degree: number;
Expand All @@ -14,4 +22,7 @@ export class NURBSCurve extends Curve<Vector3> {
startKnot?: number,
endKnot?: number,
);

toJSON(): NURBSCurveJSON;
fromJSON(json: NURBSCurveJSON): this;
}

0 comments on commit b7e80ff

Please sign in to comment.