Skip to content

Commit

Permalink
refactor(geom-api): minor update SubdivKernel
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jan 25, 2019
1 parent 598fca5 commit 87fddb8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/geom-api/src/subdiv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ export interface SubdivKernel {
*/
fn: (pts: ReadonlyVec[], i: number, nump: number) => Vec[];
/**
* Optional function to pre-process the original curve points prior to subdivision and yield a point iteratable (e.g. for closed curves / polygons to prepend the last point before the first).
* Optional function to pre-process the original curve points prior
* to each subdivision iteration and MUST yield an iterable of
* points (e.g. for closed curves / polygons to prepend the last
* point before the first). If omitted, the curve points are
* processed as is.
*/
iter?: (pts: ReadonlyVec[]) => Iterable<ReadonlyVec>;
pre?: (pts: ReadonlyVec[]) => Iterable<ReadonlyVec>;
/**
* Kernal size. The subdivision function `fn` always receives `size`
* number consecutive points.
Expand Down

0 comments on commit 87fddb8

Please sign in to comment.