Default files for webcam

This commit is contained in:
Ruben van de Ven 2020-09-28 11:12:08 +02:00
parent d437cde6da
commit a3c41c785d

View file

@ -1,20 +1,21 @@
import objectID from 'bson-objectid'; import objectID from 'bson-objectid';
import * as ActionTypes from '../../../constants'; import * as ActionTypes from '../../../constants';
const defaultSketch = `function setup() { const defaultSketch = `// liveUpdate
createCanvas(400, 400);
}
function draw() { function drawMask(detection) {
background(220); stroke('red');
strokeWeight(2);
rect(detection.box.x, detection.box.y, detection.box.width, detection.box.height)
}`; }`;
const defaultHTML = const defaultHTML =
`<!DOCTYPE html> `<!DOCTYPE html>
<html lang="en"> <html>
<head> <head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.js"></script> <script src="/assets/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/addons/p5.sound.min.js"></script> <script src="/assets/ml5.js"></script>
<script src="/assets/webcam.js"></script>
<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8" /> <meta charset="utf-8" />