mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-26 02:54:54 +01:00
Add keyword to draw calibration diamond.
Remove some unneeded log messages.
This commit is contained in:
parent
fd6c55b69e
commit
06ff438119
@ -8,6 +8,15 @@ var wordFuncs = {
|
|||||||
},
|
},
|
||||||
"idspispopd": function() {
|
"idspispopd": function() {
|
||||||
drawTextOnCanvas("Im in ur kanvas drawin' ur stuffz.");
|
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;
|
||||||
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
|
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
|
event.preventDefault(); //prevents the character to end up in a focussed textfield
|
||||||
|
@ -23,17 +23,16 @@ function beginShape(x,y) {
|
|||||||
|
|
||||||
function shapeMoveTo(x,y) {
|
function shapeMoveTo(x,y) {
|
||||||
_points.push([x, y, true]);
|
_points.push([x, y, true]);
|
||||||
adjustBounds(x, y)
|
adjustBounds(x, y);
|
||||||
adjustPreviewTransformation();
|
adjustPreviewTransformation();
|
||||||
draw(x, y, .5);
|
draw(x, y, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
function shapeLineTo(x,y) {
|
function shapeLineTo(x,y) {
|
||||||
_points.push([x, y, false]);
|
_points.push([x, y, false]);
|
||||||
adjustBounds(x, y)
|
adjustBounds(x, y);
|
||||||
adjustPreviewTransformation();
|
adjustPreviewTransformation();
|
||||||
draw(x, y);
|
draw(x, y);
|
||||||
// console.log(x,y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function endShape() {
|
function endShape() {
|
||||||
|
@ -160,8 +160,6 @@ function redrawPreview(redrawLess) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function renderToImageDataPreview() {
|
function renderToImageDataPreview() {
|
||||||
console.log("f:renderToImageDataPreview()");
|
|
||||||
|
|
||||||
if (_points.length < 2) return;
|
if (_points.length < 2) return;
|
||||||
|
|
||||||
//*
|
//*
|
||||||
|
Loading…
Reference in New Issue
Block a user