Bezier-rs: Add split for Subpath (#988)

* Add subpath split

* Update comment and colors

* Address comments

* Improve visualization clarity

* Code review

---------

Co-authored-by: Rob Nadal <Robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Hannah Li
2023-01-31 03:17:20 -05:00
committed by Keavon Chambers
co-authored by Rob Nadal Keavon Chambers
parent 511a8aa164
commit a328e7d3ef
4 changed files with 305 additions and 0 deletions
@@ -56,6 +56,12 @@ const subpathFeatures = {
[175, 140],
]),
},
Split: {
callback: (subpath: WasmSubpathInstance, options: Record<string, number>, _: undefined, computeType: ComputeType): string => subpath.split(options.computeArgument, computeType),
sliderOptions: [{ ...tSliderOptions, variable: "computeArgument" }],
// TODO: Uncomment this after implementing the Euclidean version
// chooseComputeType: true,
},
};
export type SubpathFeatureName = keyof typeof subpathFeatures;