0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-12-22 13:13:48 +01:00

Add keyword to draw calibration diamond.

Remove some unneeded log messages.
This commit is contained in:
Wouter R 2014-01-17 00:21:29 +01:00
parent fd6c55b69e
commit 06ff438119
3 changed files with 12 additions and 6 deletions

View File

@ -8,6 +8,15 @@ var wordFuncs = {
},
"idspispopd": function() {
drawTextOnCanvas("Im in ur kanvas drawin' ur stuffz.");
},
"dia": function() {
var cx = canvasWidth / 2;
var cy = canvasHeight /2;
drawCircle(cx, cy, 50, 4);
shapeMoveTo(cx - 20, cy);
shapeLineTo(cx + 20, cy);
shapeMoveTo(cx, cy - 20);
shapeLineTo(cx, cy + 20);
}
};
@ -58,7 +67,7 @@ function initKeyboard() {
case 'r': rotateShape(.1); break;
case 'R': rotateShape(-.1); break;
default: console.log("Key: '" + ch + "' (" + event.which + ")");
//default: console.log("Key: '" + ch + "' (" + event.which + ")");
}
if(event.which != 13) { // don't prevent enter usage, it's used in tour
event.preventDefault(); //prevents the character to end up in a focussed textfield

View File

@ -23,17 +23,16 @@ function beginShape(x,y) {
function shapeMoveTo(x,y) {
_points.push([x, y, true]);
adjustBounds(x, y)
adjustBounds(x, y);
adjustPreviewTransformation();
draw(x, y, .5);
}
function shapeLineTo(x,y) {
_points.push([x, y, false]);
adjustBounds(x, y)
adjustBounds(x, y);
adjustPreviewTransformation();
draw(x, y);
// console.log(x,y);
}
function endShape() {

View File

@ -160,8 +160,6 @@ function redrawPreview(redrawLess) {
}
function renderToImageDataPreview() {
console.log("f:renderToImageDataPreview()");
if (_points.length < 2) return;
//*