Bezier-rs: Add Euclidean parameterization to Bezier::evaluate (#828)

* Add enum to evaluate for differenciating compute type

* Add euclidean parameterization and update styling in the UI

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Update usage of evaluate in graphite

* Add description

* Code review changes

* Update tests

* Improve ComputeType ergonomics

* Large code review/cleanup pass

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Hannah Li
2022-11-18 20:37:52 -08:00
committed by GitHub
co-authored by Rob Nadal Keavon Chambers
parent 96457bab9f
commit 647e555487
15 changed files with 341 additions and 276 deletions
@@ -5,6 +5,8 @@
</div>
</template>
<style></style>
<script lang="ts">
import { defineComponent, PropType } from "vue";
@@ -16,20 +18,10 @@ const POINT_INDEX_TO_MANIPULATOR: WasmSubpathManipulatorKey[] = ["set_anchor", "
export default defineComponent({
props: {
title: String,
triples: {
type: Array as PropType<Array<Array<number[] | undefined>>>,
required: true,
mutable: true,
},
closed: {
type: Boolean as PropType<boolean>,
default: false,
},
callback: {
type: Function as PropType<SubpathCallback>,
required: true,
},
title: { type: String as PropType<string>, required: true },
triples: { type: Array as PropType<Array<Array<number[] | undefined>>>, mutable: true, required: true },
closed: { type: Boolean as PropType<boolean>, default: false },
callback: { type: Function as PropType<SubpathCallback>, required: true },
},
data() {
const subpath = WasmSubpath.from_triples(this.triples, this.closed) as WasmSubpathInstance;
@@ -69,11 +61,3 @@ export default defineComponent({
},
});
</script>
<style scoped>
.example-figure {
border: solid 1px black;
width: 200px;
height: 200px;
}
</style>