Skip to content

Commit

Permalink
fix(rasterize): update arg types for point/vec arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Oct 24, 2023
1 parent 8d46d93 commit 588aff8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/rasterize/src/draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Shader2D } from "./api.js";

/** @internal */
export const __draw2D = <T extends any[] | TypedArray, P>(
pts: Nullable<Iterable<number[]>>,
pts: Nullable<Iterable<ArrayLike<number>>>,
grid: IGrid2D<T, P>,
val: P | Shader2D<P>
) =>
Expand All @@ -16,7 +16,7 @@ export const __draw2D = <T extends any[] | TypedArray, P>(

/** @internal */
export const __drawSolid2D = <T extends any[] | TypedArray, P>(
pts: Nullable<Iterable<number[]>>,
pts: Nullable<Iterable<ArrayLike<number>>>,
grid: IGrid2D<T, P>,
val: P
) => {
Expand All @@ -40,7 +40,7 @@ export const __drawSolid2D = <T extends any[] | TypedArray, P>(

/** @internal */
export const __drawShader2D = <T extends any[] | TypedArray, P>(
pts: Nullable<Iterable<number[]>>,
pts: Nullable<Iterable<ArrayLike<number>>>,
grid: IGrid2D<T, P>,
shader: Shader2D<P>
) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/rasterize/src/poly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ensureShader2D } from "./checks.js";
*/
export const fillPoly = <T extends any[] | TypedArray, P>(
grid: IGrid2D<T, P>,
pts: number[][],
pts: ArrayLike<number>[],
val: P | Shader2D<P>
) => {
const numP = pts.length;
Expand Down
2 changes: 1 addition & 1 deletion packages/rasterize/src/polyline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { drawLine } from "./line.js";

export const drawPolyLine = <T extends any[] | TypedArray, P>(
grid: IGrid2D<T, P>,
pts: number[][],
pts: ArrayLike<number>[],
val: P | Shader2D<P>,
closed = false
) => {
Expand Down

0 comments on commit 588aff8

Please sign in to comment.