From 087b6e184b43953a7ca4c8ae53b8d7bcf9df6fc6 Mon Sep 17 00:00:00 2001 From: Ameen Radwan Date: Tue, 30 Apr 2024 16:31:27 -0700 Subject: [PATCH] fix incorrect arg name --- scripts/generate_p5.ts | 4 ++-- src/p5js_gleam/bindings.gleam | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/generate_p5.ts b/scripts/generate_p5.ts index debcaee..2ff166b 100644 --- a/scripts/generate_p5.ts +++ b/scripts/generate_p5.ts @@ -26,7 +26,7 @@ const elements: Record = { ], }, circle: { - arguments: ["x_center: Float", "y_center: Float", "radius: Float"], + arguments: ["x_center: Float", "y_center: Float", "diameter: Float"], }, rect: { arguments: [ @@ -181,7 +181,7 @@ for (const [elementName, elementBinding] of Object.entries(elements)) { outJs += js( elementName, elementBinding.bindingName ?? elementName, - Boolean(elementBinding.returnType) + Boolean(elementBinding.returnType), ); } diff --git a/src/p5js_gleam/bindings.gleam b/src/p5js_gleam/bindings.gleam index 1d29eb2..e32e60c 100644 --- a/src/p5js_gleam/bindings.gleam +++ b/src/p5js_gleam/bindings.gleam @@ -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")