From de7bbd2212bb30fc08e9c4d4aca00e4ecc90f5bd Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 16 Dec 2019 16:19:45 +0700 Subject: [PATCH] Add initial stab at JS vocoder script --- vocoder/static/vocoder.js | 15 +++++++++++++++ vocoder/templates/index.html | 1 + 2 files changed, 16 insertions(+) create mode 100644 vocoder/static/vocoder.js diff --git a/vocoder/static/vocoder.js b/vocoder/static/vocoder.js new file mode 100644 index 0000000..fa30147 --- /dev/null +++ b/vocoder/static/vocoder.js @@ -0,0 +1,15 @@ +// Vocoder front-end Javascript + +// Only run our JS when everything on the page is loaded. +// This includes images (our map tiles), see https://stackoverflow.com/a/1033448 +window.addEventListener('load', main) + +function main(){ + const mappa = new Mappa('Leaflet'); + // TODO: once we get the leaflet map setup, we'll overlay following + // the example from https://mappa.js.org/docs/examples-leaflet.html +} + +// TODO: p5.js / mappa.js specifics for later ... +function setup(){} +function draw(){} diff --git a/vocoder/templates/index.html b/vocoder/templates/index.html index c7d0bff..b012d8e 100644 --- a/vocoder/templates/index.html +++ b/vocoder/templates/index.html @@ -10,5 +10,6 @@ Coming Soon TM. +