-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (60 loc) · 1.77 KB
/
index.html
File metadata and controls
74 lines (60 loc) · 1.77 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
<!-- this css formats the canvas. max canvas size; 1920x645px-->
<style type="text/css">
html,
body {
margin: 0;
overflow: hidden;
height: 100%;
}
/* Scale canvas with resize attribute to full size */
canvas[resize] {
width: 100%;
height: 100%;
}
</style>
<script type="text/javascript" src="js/paper-full.min.js"></script>
<script type="text/paperscript" canvas="myCanvas">
// Create a path
var path;
// Add a text line on top of the program to indicate the purpose of the program
var textItem = new PointText({
content: 'This program reads data input and outputs a graphical representation.',
content: 'This program is written in JavaScript.',
// point coordinates determine placement of text above
point: new Point(50,50),
// fillColor determines color of text above
fillColor: 'red',
// fontSize number determines size of text above
fontSize: 30,
});
var textItem = new PointText({
content: 'This program reads data input and outputs a graphical representation.',
// point coordinates determine placement of text above
point: new Point(545,50),
// fillColor determines color of text above
fillColor: 'blue',
// fontSize number determines size of text above
fontSize: 30,
});
//coordinates are input here, in an array
var myPath = new Path({
segments: [[100, 750], [100, 250], [600, 250], [600, 750]],
closed: true
});
//this path stroke color line determines color- many hexadecimal / other inputs work
myPath.strokeColor = 'purple';
path.fullySelected = true
//The lines below are to create a clone of the data with smooth, for whatever reason
//var copy = path.clone();
//copy.fullySelected = true;
//copy.position.x +=1000;
//copy.smooth();
</script>
</head>
<body>
<canvas id="myCanvas" resize></canvas>
</body>
</html>