Skip to content

a11ce/racket-p5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

racket-p5

Uses soegaard's urlang compiler to give p5.js Racket-y syntax.

Setup

Run raco pkg install p5 or go to File > Install Package... in DrRacket and install p5.

Usage

Start your file with #lang p5, then do your best to write p5 code with Racket syntax and it should mostly work how you expect. Also see examples/.

Running your program will display the compiled p5.js sketch.

Options

Certain top-level expressions (prefixed with ^) are recognized as language options. They are applied per source file.

  • (^output-file "filename.js") writes the compiled JS to the specified path.

How it works

#lang p5 is a wrapper around urlang which:

  • makes urlang think that p5 identifiers are bound
  • adds the needed boilerplate so the user can focus on creating
  • provides some extra options

Demos


All contributions are welcome by pull request or issue.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages