Skip to content

Commit d40d898

Browse files
committed
feat: update testing framework to Vitest and add comprehensive tests for ColorPoint and Poline classes
- Changed the test script in package.json to use Vitest. - Added a new test file for ColorPoint and Poline with extensive test cases covering initialization, color manipulation, and position functions. - Updated PolineOptions to make anchorColors and numPoints optional. - Added skipLibCheck to tsconfig.json for improved build performance.
1 parent e678c17 commit d40d898

File tree

8 files changed

+5642
-2487
lines changed

8 files changed

+5642
-2487
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ type PositionFunction = (t: number, reverse?: boolean) => number;
429429

430430
// Options for creating a Poline instance
431431
type PolineOptions = {
432-
anchorColors: Vector3[];
433-
numPoints: number;
432+
anchorColors?: Vector3[]; // Optional: defaults to random pair
433+
numPoints?: number; // Optional: defaults to 4
434434
positionFunction?: PositionFunction;
435435
positionFunctionX?: PositionFunction;
436436
positionFunctionY?: PositionFunction;

dist/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export declare class ColorPoint {
6767
shiftHue(angle: number): void;
6868
}
6969
export type PolineOptions = {
70-
anchorColors: Vector3[];
71-
numPoints: number;
70+
anchorColors?: Vector3[];
71+
numPoints?: number;
7272
positionFunction?: (t: number, invert?: boolean) => number;
7373
positionFunctionX?: (t: number, invert?: boolean) => number;
7474
positionFunctionY?: (t: number, invert?: boolean) => number;

dist/index.mjs.map

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)