Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
Acepie committed Mar 20, 2024
1 parent 0bdc5b9 commit 958f23f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ A demo showcasing how to create and use bindings for [p5js](https://p5js.org/)
This project is made up of

- A [bun](https://bun.sh/) script that is used to generate bindings for p5js class methods
- Script is based on script created for [glare](https://github.com/Enderchief/glare/tree/master/scripts)
- An html page that shows how to use those bindings to make a basic animation

## Generating FFI Bindings
Expand Down
4 changes: 3 additions & 1 deletion scripts/generate_p5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const js = (name: string) =>

const gleam = (name: string, args: string[]) =>
`@external(javascript, "../p5js_ffi.mjs", "${name}")
pub fn ${camelToSnakeCase(name)}(p: P5${args.length ? ", " : ""}${args.join(", ")}) -> Nil
pub fn ${camelToSnakeCase(name)}(p: P5${args.length ? ", " : ""}${args.join(
", "
)}) -> Nil
`;

Expand Down

0 comments on commit 958f23f

Please sign in to comment.