Change default files to reflect box removal and change canvas sizing

This commit is contained in:
Ruben van de Ven 2020-10-25 13:01:15 +01:00
parent dc20a7238f
commit b2665fddf1
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@ const defaultSketch = `// liveUpdate
function drawMask(detection) {
stroke('red');
strokeWeight(2);
rect(detection.box.x, detection.box.y, detection.box.width, detection.box.height)
rect(detection.x, detection.y, detection.width, detection.height)
}`;
const defaultHTML =
@ -34,6 +34,8 @@ const defaultCSS =
}
canvas {
display: block;
width: 100% !important;
height: auto !important;
}
`;

View File

@ -3,7 +3,7 @@ const defaultSketch = `// liveUpdate
function drawMask(detection) {
stroke('red');
strokeWeight(2);
rect(detection.box.x, detection.box.y, detection.box.width, detection.box.height)
rect(detection.x, detection.y, detection.width, detection.height)
}
`;
@ -31,6 +31,8 @@ const defaultCSS =
}
canvas {
display: block;
width: 100% !important;
height: auto !important;
}
`;