-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (108 loc) · 5.44 KB
/
index.html
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas 2D Parts</title>
<meta name="description" content="2D Canvas Javascript project. Module for visualize and customize 2d matrix according to objects. Each generated 2d part can be cuztomized with image, using several rendering image modes.">
<meta name="robots" content="noindex,nofollow"/>
<link rel="apple-touch-icon" sizes="57x57"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16"
href="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage"
content="https://inplayo.com/wp-content/themes/inplayo/assets/images/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<h1>Canvas parts</h1>
<h2>Part configuration</h2>
<div>
<p>part should describe each item of 2d mesh that should be drawn, using params:</p>
<ul>
<li><strong>x</strong> - top coordinate of part</li>
<li><strong>y</strong> - left coordinate of part</li>
<li><strong>width</strong> - width of part</li>
<li><strong>height</strong> - height of part</li>
</ul>
<p>Sizes: dimensions are calculating in <strong>points</strong>, a <strong>point</strong> is natural number
greater or equals to 0</p>
<p>Format: element data should be described in json format</p>
<h2>Example of element</h2>
<code>
let element = { x: 0, y: 0, width: 2, height: 2 };
<br>//json: {"top":0,"left":0,"width":2,"height":2}
</code>
</div>
<h2>Demo</h2>
<div>
<div class="demo">
<div class="blocks__matrix">
<div id="canvas_parts" class="blocks"></div>
</div>
</div>
<h3>Module: Imagify</h3>
<h4>Modes</h4>
<div>
<label>
<input type="radio" name="imagify_mode" value="cover_all" checked>
Cover All - image would be cropped according to parts coords and sizes, parts will be filled with
cropped fragments of image
</label>
</div>
<div>
<label>
<input type="radio" name="imagify_mode" value="cover_selected">
Cover Selected - image would be cropped according to selected parts coords and sizes, selected parts
will be filled with cropped fragments of image
</label>
</div>
<div>
<label>
<input type="radio" name="imagify_mode" value="contain_all">
Contain All - each part would be filled with full image
</label>
</div>
<div>
<label>
<input type="radio" name="imagify_mode" value="contain_selected">
Contain Selected - selected parts would be filled with full image
</label>
</div>
<h4>File</h4>
<div>
<input type="file" id="file-upload">
<button id="imagify_update">Update using mode & image</button>
<button id="imagify_select_all">select all parts</button>
<button id="imagify_deselect_all">deselect all parts</button>
</div>
<link rel="stylesheet" href="modules/parts/script.css">
<link rel="stylesheet" href="modules/partsImagify/style.css">
<script src="index.js" type="module"></script>
</div>
</body>
</html>