-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
38 lines (27 loc) · 899 Bytes
/
main.js
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
35
36
37
38
$(document).ready(function() {
'use strict';
paper.install(window);
paper.setup(document.getElementById('mainCanvas'));
/* 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 = 'black';
var text = new PointText(200, 200);
text.justification = 'center';
text.fillColor = 'white';
text.fontSize = 20;
text.content = 'hello world';
tool.onMouseDown = function(event) {
var c = Shape.Circle(event.point.x, event.point.y, 20);
c.fillColor = 'green';
}
paper.view.draw();
console.log('main.js loaded');
}); ;