Star

Created With

linkCodedoc P5 markdown component

Component used to display the p5.js code snippets found in this site. Supports inline code (code within the markdown), sound, both global and instance mode, versioning, and up to 5 community libraries.

linkSyntax

> :P5 [sketch] [width] [height] [p5lib] [p5sound] [version] [sound] [lib1] [lib2] [lib3] [lib4] [lib5]

linkParameters

sketchpath to p5 sketch either in global or instance mode. The sketch file name should equal the "id" in instance mode. Default is to use the inlined code found within the markdown
widthSketch width. Set as % if 0 > value ≤ 1. Set as px otherwise. Default is 1
heightSketch height. Set as % if 0 > value ≤ 1. Set as px otherwise. Default is 1
paddingVertical and horizontal padding. Only meaningful if width(/height) > 0. Default is 10
p5libpath to p5.js lib. Either provided locally or by a CDN. Use it for debugging or developing offline. Default is to use p5.min.js CDN according to the version param
p5soundpath to p5.sound.js lib. Either provided locally or by a CDN. Use it for debugging or developing offline. Default is to use p5.sound.min.js CDN according to the version param
versionp5.min.js and p5.sound.min.js version default is 1.3.1
soundEither true or false default is false
lib1path to community library 1. Either provided locally or by a CDN
lib2path to community library 2. Either provided locally or by a CDN
lib3path to community library 3. Either provided locally or by a CDN
lib4path to community library 4. Either provided locally or by a CDN
lib5path to community library 5. Either provided locally or by a CDN
Codedoc P5 markdown componentSyntaxParameters

Home

Workshopschevron_right
Imaging & Videochevron_right
Softwarechevron_right
Hardwarechevron_right
Renderingchevron_right

Algovis Computer Graphics HCI

P5 Code Snippetschevron_right
Memberschevron_right