Skip to content

Commit

Permalink
fix incorrect arg name
Browse files Browse the repository at this point in the history
  • Loading branch information
Acepie committed Apr 30, 2024
1 parent a388b2d commit 087b6e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/generate_p5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const elements: Record<string, Binding> = {
],
},
circle: {
arguments: ["x_center: Float", "y_center: Float", "radius: Float"],
arguments: ["x_center: Float", "y_center: Float", "diameter: Float"],
},
rect: {
arguments: [
Expand Down Expand Up @@ -181,7 +181,7 @@ for (const [elementName, elementBinding] of Object.entries(elements)) {
outJs += js(
elementName,
elementBinding.bindingName ?? elementName,
Boolean(elementBinding.returnType)
Boolean(elementBinding.returnType),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/p5js_gleam/bindings.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub fn ellipse(

/// A binding to the p5.js [`circle`](https://p5js.org/reference/#/p5/circle) function. Takes a p5 instance and the function's arguments and returns the p5 instance.
@external(javascript, "../p5js_ffi.mjs", "circle")
pub fn circle(p: P5, x_center: Float, y_center: Float, radius: Float) -> P5
pub fn circle(p: P5, x_center: Float, y_center: Float, diameter: Float) -> P5

/// A binding to the p5.js [`rect`](https://p5js.org/reference/#/p5/rect) function. Takes a p5 instance and the function's arguments and returns the p5 instance.
@external(javascript, "../p5js_ffi.mjs", "rect")
Expand Down

0 comments on commit 087b6e1

Please sign in to comment.