|
|
|
|
Coming soon
Coming soon
<script>
let canvas
function setup () {
canvas = createCanvas(width, height)
canvas.parent('#target-container')
textAlign(CENTER)
}
function draw () {
background(0)
stroke(255)
text('Hello world', width/2, height/2)
}
</script>
<script>
// Create a new managed canvas
new Layer({
// (Optional) Reference this Layer with Layers[id]
id: 'hello',
// (Optional) Defaults to same size as .target (fullscreen if no .target)
width: 250,
height: 250,
// (Optional) Goes at the end of <body> by default
target: '#target-container',
// (Optional) A new canvas is automatically created
setup () {
// p5 methods automatically point to this.canvas
textAlign(CENTER)
},
draw () {
background(0)
text('Hello world', width/2, height/2)
}
})
</script>
<script src="https://unpkg.com/[email protected]/lib/p5.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ozramos/[email protected]/dist/layers.p5.js"></script>
From command line:
npm i p5 @ozramos/layers.p5
Inside your app.js:
import 'p5'
import Layers from '@ozramos/Layers.p5'
or on OpenProcessing.org
Add Layers.p5 to your Libraries: https://cdn.jsdelivr.net/gh/ozramos/[email protected]/dist/layers.p5.js
- Windows 98.css Theme forked from: https://jdan.github.io/98.css/
- https://www.svgrepo.com/svg/499639/reload