mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-08 11:18:11 +08:00
Bezier-rs: Add lookup table function for subpath and make it support euclidean parameterization (#1082)
* Add euclidean option for lut * Add lut for subpath * Fix rust formatting * Fixed breakages caused by UI updates * Code cleanup * Make ProjectionOptions optional --------- Co-authored-by: Rob Nadal <robnadal44@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Rob Nadal
Keavon Chambers
parent
d0ac86b713
commit
3733804d18
@@ -20,6 +20,20 @@ const subpathFeatures = {
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>, _: undefined): string => subpath.evaluate(options.t, SUBPATH_T_VALUE_VARIANTS[options.TVariant]),
|
||||
inputOptions: [subpathTValueVariantOptions, tSliderOptions],
|
||||
},
|
||||
"lookup-table": {
|
||||
name: "Lookup Table",
|
||||
callback: (subpath: WasmSubpathInstance, options: Record<string, number>, _: undefined): string => subpath.compute_lookup_table(options.steps, SUBPATH_T_VALUE_VARIANTS[options.TVariant]),
|
||||
inputOptions: [
|
||||
subpathTValueVariantOptions,
|
||||
{
|
||||
min: 2,
|
||||
max: 30,
|
||||
step: 1,
|
||||
default: 5,
|
||||
variable: "steps",
|
||||
},
|
||||
],
|
||||
},
|
||||
project: {
|
||||
name: "Project",
|
||||
callback: (subpath: WasmSubpathInstance, _: Record<string, number>, mouseLocation?: [number, number]): string =>
|
||||
|
||||
Reference in New Issue
Block a user