From c39f11c54a783a9082dc5abefa2a399f110c921d Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Wed, 18 Dec 2019 22:27:03 +0700 Subject: [PATCH] Add shape class boilerplate --- vocoder/static/vocoder.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/vocoder/static/vocoder.js b/vocoder/static/vocoder.js index 8b4c2ac..b5bc57e 100644 --- a/vocoder/static/vocoder.js +++ b/vocoder/static/vocoder.js @@ -104,6 +104,21 @@ function generateNewShape() { ellipse(100, 100, 25, 25); // TODO: experimenting for now ... } +class GeneratedShape { + move() { + /** + * Move the shape in some direction. + **/ + } + + display() { + /** + * Show the shape on the canvas. + **/ + ellipse(random(600), random(600), 10, 10); // TODO: experimenting for now ... + } +} + function setup() { /** * The p5.js initial setup function.