hackity hack hack tiles

This commit is contained in:
Luke Murphy 2020-01-05 12:59:03 +01:00
parent fb695178f1
commit 9c3a32a82b
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,10 @@
/* Custom CSS styles */
canvas {
html * {
border: 1px black solid; /* TODO: experimenting for now */
}
canvas {
opacity: 0;
z-index: 10000000000;
}

View File

@ -9,6 +9,7 @@ var canvasColour = "white";
var canvasHeight = 400;
var canvasWidth = 800;
var frameRate = 30;
var mappa = new Mappa("Leaflet");
var microphone;
var newSoundJustRecorded = false;
var playButton;
@ -18,6 +19,12 @@ var recording;
var recordingTimeout = 30000; // 30 seconds (in milliseconds)
var shapes = [];
var stopButton;
var tileMapOptions = {
lat: 0,
lng: 0,
zoom: 5,
style: "/static/tiles/{z}/{x}/{y}.png"
};
function record() {
/**
@ -210,7 +217,12 @@ function setup() {
/**
* The p5.js initial setup function.
**/
createCanvas(canvasWidth, canvasHeight);
var canvas = createCanvas(canvasWidth, canvasHeight);
canvas.parent("canvasContainer");
var tileMap = mappa.tileMap(tileMapOptions);
tileMap.overlay(canvas);
setupRecording();
frameRate(frameRate);
}

View File

@ -23,6 +23,8 @@
<li><a href="/archive">Archive</a></li>
</ul>
<div id="canvasContainer"></div>
<script src="/static/leaflet/leaflet-src.js" charset="utf-8"></script>
<script src="/static/mappajs/mappa.min.js" charset="utf-8"></script>
<script src="/static/p5js/p5.min.js" charset="utf-8"></script>