diff options
Diffstat (limited to 'exampleSite/content/post/lines-from-center.html')
-rw-r--r-- | exampleSite/content/post/lines-from-center.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/exampleSite/content/post/lines-from-center.html b/exampleSite/content/post/lines-from-center.html new file mode 100644 index 0000000..2fb2d19 --- /dev/null +++ b/exampleSite/content/post/lines-from-center.html @@ -0,0 +1,27 @@ +--- +title: "Lines from center" +date: 2019-03-04T22:15:42-03:00 +description: "this is a p5js sketch" +libs: + js: + - https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js +tags: ["javascript","jquery"] +--- + +<div id="sketch"></div> + +<script> + var sketch = document.getElementById('sketch') + function setup() { + var canvas = createCanvas(windowWidth, windowHeight) + canvas.parent('#sketch') + } + + function draw() { + line(width/2, height/2, mouseX, mouseY) + } + + function windowResized() { + resizeCanvas(windowWidth, windowHeight); + } +</script> |