-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
34 lines (29 loc) · 860 Bytes
/
main.js
File metadata and controls
34 lines (29 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$(document).ready(function(){
'use strict';
paper.install(window);
paper.setup(document.getElementById('mainCanvas'));
//TODO
/* 바둑판배열
var c;
for(var x=25; x<400; x+=50){
for(var y=25; y<400; y+=50){
c = Shape.Circle(x, y, 20);
c.fillColor = 'green';
}
} */
var tool = new Tool();
var c = Shape.Circle(200, 200, 80);
c.fillColor = 'yellow';
var text = new PointText(200, 200);
text.justification = 'center';
text.fillColor = 'black';
text.fontSize = 20;
text.content = 'hello world';
tool.onMouseDown = function(event){
// var c = Shape.Circle(event.point.x, event.point.y, 20);
var c = Shape.Circle(event.point, 30);
c.fillColor = 'black';
};
paper.view.draw();
console.log('main.js loaded');
});