Minimal example
Try it yourself!
- Download processing-p5-convert-minimal.zip.
- Unzip the file into a directory.
- Start a local web server (e.g.
python3 -m http.server
) in that directory. - Open your browser to the page (e.g.
localhost:8000
)
More info about local web servers
minimal
- index.html
- minimal.pde
- p5.min.js
- processing-p5-convert-bundle.js
- processing-p5-convert-bootstrap.js
index.html
:
<!DOCTYPE html>
<html>
<head>
<script src="p5.min.js"></script>
<script src="processing-p5-convert-bundle.js"></script>
<script src="processing-p5-convert-bootstrap.js"></script>
</head>
<body>
<main id="ppconvert" src="minimal.pde"></main>
</body>
</html>
minimal.pde
:
//
// minimal
//
void setup()
{
size(400, 400);
}
void draw()
{
background(0);
fill(#0000ff);
ellipse(200, 200, 300, 100);
fill(0);
textAlign(CENTER, CENTER);
textSize(30);
text("Hello, world!", 200, 200);
}