-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (95 loc) · 3.04 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
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>物联网3D园区数据可视化案例</title>
<style>
html, body {
height: 100%;
text-align: center;
background-color: #1a1a1a;
}
.main{
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<aside class="main">
<iframe src="https://www.thingjs.com/pp/9fae990acfb594ec1ca5fdb7" width="100%" height="100%"></iframe>
</aside>
<!-- that’s all folks! -->
</body>
<script>
/*(function () {
'use strict';
var onloadDo;
onloadDo = function () {
var addPath, addPoints, animatePath, canvas, i, j, n, opacity, path, paths, ref, view;
canvas = document.getElementById('canvas');
paper.setup(canvas);
view = paper.project.view;
paths = new paper.Group();
addPoints = function (path, quantity) {
var i, j, ref, x, y;
path.add(view.bounds.bottomLeft);
for (i = j = -1, ref = quantity + 1; j <= ref; i = j += 1) {
x = view.viewSize.width / quantity * i;
y = view.viewSize.height / 1.618;
path.add(new paper.Point(x, y));
}
return path.add(view.bounds.bottomRight);
};
addPath = function (quantity, color, opacity) {
var path;
path = new paper.Path();
path.fillColor = color;
path.opacity = opacity;
addPoints(path, quantity);
path.smooth();
return path;
};
animatePath = function (path, event, index) {
var i, j, len, ref, results, segment, sin;
ref = path.segments;
results = [];
for (i = j = 0, len = ref.length; j < len; i = ++j) {
segment = ref[i];
if (i > 0 && i < path.segments.length - 1) {
sin = Math.sin(event.time * 3 + i - index);
results.push(segment.point.y = sin * 15 + view.viewSize.height / 1.618 + index * 15);
} else {
results.push(void 0);
}
}
return results;
};
n = 8;
opacity = 1 / (n / 2);
for (i = j = 1, ref = n; j <= ref; i = j += 1) {
path = addPath(8 - i, '#21f8f6', i * opacity);
path.position.y += 25 * i;
paths.addChild(path);
}
view.onFrame = function (event) {
var k, len, ref1, results;
ref1 = paths.children;
results = [];
for (i = k = 0, len = ref1.length; k < len; i = ++k) {
path = ref1[i];
results.push(animatePath(path, event, i));
}
return results;
};
console.log('###');
view.draw();
return null;
};
window.onload = onloadDo;
}.call(this));*/
</script>
</html>