Skip to content

Extension for the p5.js library, adding panning, zooming, unit support (mm, cm, inch), and more...

License

Notifications You must be signed in to change notification settings

eltapir/p5.plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p5.plus

p5.plus is an p5.js extension to ease the creation of 2D Static art.

Its a kind of sandbox for testing functionality that can make live easier ;p


The following functionality is added (more to come) :

- panning and zooming
- use of mm, cm, inches
- support for svg (with the p5.js-svg extension)
- export with one click to png (p2d mode) or svg (svg mode)
- ...

CREDITS

p5.js :  No p5 extension without p5 library

tinykeys :  Tiny but very nice library for keybindings

simplex noise :  Simple library for 2d & 3d perlin noise and simplex noise


CHANGES TO THE NORMAL WAY OF USING p5.js

  • createCanvas() accepts different arguments, Instead of providing width and height you have to provide an extra object. see examples for correct use.
  • noLoop() is the default, since the main purpose of this addon is to create static art.

USE (SEE EXAMPLES)

add the following scripts to your index.html:

p5.js (always needed)
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.1/p5.js"></script>

p5.js-svg (only needed if you want to use svg mode)
<script defer src="https://unpkg.com/[email protected]"></script>

p5.plus (always needed)
<script defer src="https://cdn.jsdelivr.net/gh/eltapir/p5.plus@latest/lib/p5.plus.js"></script>

add your sketch/artwork
<script defer src="./artwork.js"></script>


EXAMPLES

see the __artworks folder, or see example with p5 web editor (link below):

p5.plus template


LICENSE

Apache 2.0, see LICENSE for details.

About

Extension for the p5.js library, adding panning, zooming, unit support (mm, cm, inch), and more...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published