Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
吃冰棍不.
gentelella
提交
c3d32864
G
gentelella
项目概览
吃冰棍不.
/
gentelella
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gentelella
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c3d32864
编写于
2月 28, 2016
作者:
A
Aigars Silkalns
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated autocomplete
上级
3fd16dcb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
737 deletion
+15
-737
production/empty.html
production/empty.html
+1
-1
production/index3.html
production/index3.html
+1
-1
production/js/autocomplete/jquery.autocomplete.js
production/js/autocomplete/jquery.autocomplete.js
+12
-5
production/js/skycons/skycons.js
production/js/skycons/skycons.js
+0
-730
production/js/skycons/skycons.min.js
production/js/skycons/skycons.min.js
+1
-0
未找到文件。
production/empty.html
浏览文件 @
c3d32864
...
...
@@ -295,7 +295,7 @@
});
</script>
<!-- skycons -->
<script
src=
"js/skycons/skycons.js"
></script>
<script
src=
"js/skycons/skycons.
min.
js"
></script>
<script>
var
icons
=
new
Skycons
({
"
color
"
:
"
#73879C
"
...
...
production/index3.html
浏览文件 @
c3d32864
...
...
@@ -946,7 +946,7 @@
<script
src=
"js/custom.js"
></script>
<!-- skycons -->
<script
src=
"js/skycons/skycons.js"
></script>
<script
src=
"js/skycons/skycons.
min.
js"
></script>
<!-- flot js -->
<!--[if lte IE 8]><script type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
...
...
production/js/autocomplete/jquery.autocomplete.js
浏览文件 @
c3d32864
/**
* Ajax Autocomplete for jQuery, version 1.2.2
4
* Ajax Autocomplete for jQuery, version 1.2.2
7
* (c) 2015 Tomas Kirda
*
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
...
...
@@ -127,8 +127,13 @@
$
.
Autocomplete
=
Autocomplete
;
Autocomplete
.
formatResult
=
function
(
suggestion
,
currentValue
)
{
// Do not replace anything if there current value is empty
if
(
!
currentValue
)
{
return
suggestion
.
value
;
}
var
pattern
=
'
(
'
+
utils
.
escapeRegExChars
(
currentValue
)
+
'
)
'
;
return
suggestion
.
value
.
replace
(
new
RegExp
(
pattern
,
'
gi
'
),
'
<strong>$1<
\
/strong>
'
)
.
replace
(
/&/g
,
'
&
'
)
...
...
@@ -208,8 +213,10 @@
onFocus
:
function
()
{
var
that
=
this
;
that
.
fixPosition
();
if
(
that
.
options
.
minChars
===
0
&&
that
.
el
.
val
().
length
===
0
)
{
if
(
that
.
el
.
val
().
length
>=
that
.
options
.
minChars
)
{
that
.
onValueChange
();
}
},
...
...
@@ -217,7 +224,7 @@
onBlur
:
function
()
{
this
.
enableKillerFn
();
},
abortAjax
:
function
()
{
var
that
=
this
;
if
(
that
.
currentRequest
)
{
...
...
@@ -350,7 +357,7 @@
that
.
el
.
val
(
that
.
currentValue
);
that
.
hide
();
}
that
.
stopKillSuggestions
();
},
50
);
},
...
...
production/js/skycons/skycons.js
已删除
100755 → 0
浏览文件 @
3fd16dcb
(
function
(
global
)
{
"
use strict
"
;
/* Set up a RequestAnimationFrame shim so we can animate efficiently FOR
* GREAT JUSTICE. */
var
requestInterval
,
cancelInterval
;
(
function
()
{
var
raf
=
global
.
requestAnimationFrame
||
global
.
webkitRequestAnimationFrame
||
global
.
mozRequestAnimationFrame
||
global
.
oRequestAnimationFrame
||
global
.
msRequestAnimationFrame
,
caf
=
global
.
cancelAnimationFrame
||
global
.
webkitCancelAnimationFrame
||
global
.
mozCancelAnimationFrame
||
global
.
oCancelAnimationFrame
||
global
.
msCancelAnimationFrame
;
if
(
raf
&&
caf
)
{
requestInterval
=
function
(
fn
,
delay
)
{
var
handle
=
{
value
:
null
};
function
loop
()
{
handle
.
value
=
raf
(
loop
);
fn
();
}
loop
();
return
handle
;
};
cancelInterval
=
function
(
handle
)
{
caf
(
handle
.
value
);
};
}
else
{
requestInterval
=
setInterval
;
cancelInterval
=
clearInterval
;
}
}());
/* Catmull-rom spline stuffs. */
/*
function upsample(n, spline) {
var polyline = [],
len = spline.length,
bx = spline[0],
by = spline[1],
cx = spline[2],
cy = spline[3],
dx = spline[4],
dy = spline[5],
i, j, ax, ay, px, qx, rx, sx, py, qy, ry, sy, t;
for(i = 6; i !== spline.length; i += 2) {
ax = bx;
bx = cx;
cx = dx;
dx = spline[i ];
px = -0.5 * ax + 1.5 * bx - 1.5 * cx + 0.5 * dx;
qx = ax - 2.5 * bx + 2.0 * cx - 0.5 * dx;
rx = -0.5 * ax + 0.5 * cx ;
sx = bx ;
ay = by;
by = cy;
cy = dy;
dy = spline[i + 1];
py = -0.5 * ay + 1.5 * by - 1.5 * cy + 0.5 * dy;
qy = ay - 2.5 * by + 2.0 * cy - 0.5 * dy;
ry = -0.5 * ay + 0.5 * cy ;
sy = by ;
for(j = 0; j !== n; ++j) {
t = j / n;
polyline.push(
((px * t + qx) * t + rx) * t + sx,
((py * t + qy) * t + ry) * t + sy
);
}
}
polyline.push(
px + qx + rx + sx,
py + qy + ry + sy
);
return polyline;
}
function downsample(n, polyline) {
var len = 0,
i, dx, dy;
for(i = 2; i !== polyline.length; i += 2) {
dx = polyline[i ] - polyline[i - 2];
dy = polyline[i + 1] - polyline[i - 1];
len += Math.sqrt(dx * dx + dy * dy);
}
len /= n;
var small = [],
target = len,
min = 0,
max, t;
small.push(polyline[0], polyline[1]);
for(i = 2; i !== polyline.length; i += 2) {
dx = polyline[i ] - polyline[i - 2];
dy = polyline[i + 1] - polyline[i - 1];
max = min + Math.sqrt(dx * dx + dy * dy);
if(max > target) {
t = (target - min) / (max - min);
small.push(
polyline[i - 2] + dx * t,
polyline[i - 1] + dy * t
);
target += len;
}
min = max;
}
small.push(polyline[polyline.length - 2], polyline[polyline.length - 1]);
return small;
}
*/
/* Define skycon things. */
/* FIXME: I'm *really really* sorry that this code is so gross. Really, I am.
* I'll try to clean it up eventually! Promise! */
var
KEYFRAME
=
500
,
STROKE
=
0.08
,
TAU
=
2.0
*
Math
.
PI
,
TWO_OVER_SQRT_2
=
2.0
/
Math
.
sqrt
(
2
);
function
circle
(
ctx
,
x
,
y
,
r
)
{
ctx
.
beginPath
();
ctx
.
arc
(
x
,
y
,
r
,
0
,
TAU
,
false
);
ctx
.
fill
();
}
function
line
(
ctx
,
ax
,
ay
,
bx
,
by
)
{
ctx
.
beginPath
();
ctx
.
moveTo
(
ax
,
ay
);
ctx
.
lineTo
(
bx
,
by
);
ctx
.
stroke
();
}
function
puff
(
ctx
,
t
,
cx
,
cy
,
rx
,
ry
,
rmin
,
rmax
)
{
var
c
=
Math
.
cos
(
t
*
TAU
),
s
=
Math
.
sin
(
t
*
TAU
);
rmax
-=
rmin
;
circle
(
ctx
,
cx
-
s
*
rx
,
cy
+
c
*
ry
+
rmax
*
0.5
,
rmin
+
(
1
-
c
*
0.5
)
*
rmax
);
}
function
puffs
(
ctx
,
t
,
cx
,
cy
,
rx
,
ry
,
rmin
,
rmax
)
{
var
i
;
for
(
i
=
5
;
i
--
;
)
puff
(
ctx
,
t
+
i
/
5
,
cx
,
cy
,
rx
,
ry
,
rmin
,
rmax
);
}
function
cloud
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
30000
;
var
a
=
cw
*
0.21
,
b
=
cw
*
0.12
,
c
=
cw
*
0.24
,
d
=
cw
*
0.28
;
ctx
.
fillStyle
=
color
;
puffs
(
ctx
,
t
,
cx
,
cy
,
a
,
b
,
c
,
d
);
ctx
.
globalCompositeOperation
=
'
destination-out
'
;
puffs
(
ctx
,
t
,
cx
,
cy
,
a
,
b
,
c
-
s
,
d
-
s
);
ctx
.
globalCompositeOperation
=
'
source-over
'
;
}
function
sun
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
120000
;
var
a
=
cw
*
0.25
-
s
*
0.5
,
b
=
cw
*
0.32
+
s
*
0.5
,
c
=
cw
*
0.50
-
s
*
0.5
,
i
,
p
,
cos
,
sin
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
ctx
.
beginPath
();
ctx
.
arc
(
cx
,
cy
,
a
,
0
,
TAU
,
false
);
ctx
.
stroke
();
for
(
i
=
8
;
i
--
;
)
{
p
=
(
t
+
i
/
8
)
*
TAU
;
cos
=
Math
.
cos
(
p
);
sin
=
Math
.
sin
(
p
);
line
(
ctx
,
cx
+
cos
*
b
,
cy
+
sin
*
b
,
cx
+
cos
*
c
,
cy
+
sin
*
c
);
}
}
function
moon
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
15000
;
var
a
=
cw
*
0.29
-
s
*
0.5
,
b
=
cw
*
0.05
,
c
=
Math
.
cos
(
t
*
TAU
),
p
=
c
*
TAU
/
-
16
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
cx
+=
c
*
b
;
ctx
.
beginPath
();
ctx
.
arc
(
cx
,
cy
,
a
,
p
+
TAU
/
8
,
p
+
TAU
*
7
/
8
,
false
);
ctx
.
arc
(
cx
+
Math
.
cos
(
p
)
*
a
*
TWO_OVER_SQRT_2
,
cy
+
Math
.
sin
(
p
)
*
a
*
TWO_OVER_SQRT_2
,
a
,
p
+
TAU
*
5
/
8
,
p
+
TAU
*
3
/
8
,
true
);
ctx
.
closePath
();
ctx
.
stroke
();
}
function
rain
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
1350
;
var
a
=
cw
*
0.16
,
b
=
TAU
*
11
/
12
,
c
=
TAU
*
7
/
12
,
i
,
p
,
x
,
y
;
ctx
.
fillStyle
=
color
;
for
(
i
=
4
;
i
--
;
)
{
p
=
(
t
+
i
/
4
)
%
1
;
x
=
cx
+
((
i
-
1.5
)
/
1.5
)
*
(
i
===
1
||
i
===
2
?
-
1
:
1
)
*
a
;
y
=
cy
+
p
*
p
*
cw
;
ctx
.
beginPath
();
ctx
.
moveTo
(
x
,
y
-
s
*
1.5
);
ctx
.
arc
(
x
,
y
,
s
*
0.75
,
b
,
c
,
false
);
ctx
.
fill
();
}
}
function
sleet
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
750
;
var
a
=
cw
*
0.1875
,
b
=
TAU
*
11
/
12
,
c
=
TAU
*
7
/
12
,
i
,
p
,
x
,
y
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
*
0.5
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
for
(
i
=
4
;
i
--
;
)
{
p
=
(
t
+
i
/
4
)
%
1
;
x
=
Math
.
floor
(
cx
+
((
i
-
1.5
)
/
1.5
)
*
(
i
===
1
||
i
===
2
?
-
1
:
1
)
*
a
)
+
0.5
;
y
=
cy
+
p
*
cw
;
line
(
ctx
,
x
,
y
-
s
*
1.5
,
x
,
y
+
s
*
1.5
);
}
}
function
snow
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
3000
;
var
a
=
cw
*
0.16
,
b
=
s
*
0.75
,
u
=
t
*
TAU
*
0.7
,
ux
=
Math
.
cos
(
u
)
*
b
,
uy
=
Math
.
sin
(
u
)
*
b
,
v
=
u
+
TAU
/
3
,
vx
=
Math
.
cos
(
v
)
*
b
,
vy
=
Math
.
sin
(
v
)
*
b
,
w
=
u
+
TAU
*
2
/
3
,
wx
=
Math
.
cos
(
w
)
*
b
,
wy
=
Math
.
sin
(
w
)
*
b
,
i
,
p
,
x
,
y
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
*
0.5
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
for
(
i
=
4
;
i
--
;
)
{
p
=
(
t
+
i
/
4
)
%
1
;
x
=
cx
+
Math
.
sin
((
p
+
i
/
4
)
*
TAU
)
*
a
;
y
=
cy
+
p
*
cw
;
line
(
ctx
,
x
-
ux
,
y
-
uy
,
x
+
ux
,
y
+
uy
);
line
(
ctx
,
x
-
vx
,
y
-
vy
,
x
+
vx
,
y
+
vy
);
line
(
ctx
,
x
-
wx
,
y
-
wy
,
x
+
wx
,
y
+
wy
);
}
}
function
fogbank
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
color
)
{
t
/=
30000
;
var
a
=
cw
*
0.21
,
b
=
cw
*
0.06
,
c
=
cw
*
0.21
,
d
=
cw
*
0.28
;
ctx
.
fillStyle
=
color
;
puffs
(
ctx
,
t
,
cx
,
cy
,
a
,
b
,
c
,
d
);
ctx
.
globalCompositeOperation
=
'
destination-out
'
;
puffs
(
ctx
,
t
,
cx
,
cy
,
a
,
b
,
c
-
s
,
d
-
s
);
ctx
.
globalCompositeOperation
=
'
source-over
'
;
}
/*
var WIND_PATHS = [
downsample(63, upsample(8, [
-1.00, -0.28,
-0.75, -0.18,
-0.50, 0.12,
-0.20, 0.12,
-0.04, -0.04,
-0.07, -0.18,
-0.19, -0.18,
-0.23, -0.05,
-0.12, 0.11,
0.02, 0.16,
0.20, 0.15,
0.50, 0.07,
0.75, 0.18,
1.00, 0.28
])),
downsample(31, upsample(16, [
-1.00, -0.10,
-0.75, 0.00,
-0.50, 0.10,
-0.25, 0.14,
0.00, 0.10,
0.25, 0.00,
0.50, -0.10,
0.75, -0.14,
1.00, -0.10
]))
];
*/
var
WIND_PATHS
=
[
[
-
0.7500
,
-
0.1800
,
-
0.7219
,
-
0.1527
,
-
0.6971
,
-
0.1225
,
-
0.6739
,
-
0.0910
,
-
0.6516
,
-
0.0588
,
-
0.6298
,
-
0.0262
,
-
0.6083
,
0.0065
,
-
0.5868
,
0.0396
,
-
0.5643
,
0.0731
,
-
0.5372
,
0.1041
,
-
0.5033
,
0.1259
,
-
0.4662
,
0.1406
,
-
0.4275
,
0.1493
,
-
0.3881
,
0.1530
,
-
0.3487
,
0.1526
,
-
0.3095
,
0.1488
,
-
0.2708
,
0.1421
,
-
0.2319
,
0.1342
,
-
0.1943
,
0.1217
,
-
0.1600
,
0.1025
,
-
0.1290
,
0.0785
,
-
0.1012
,
0.0509
,
-
0.0764
,
0.0206
,
-
0.0547
,
-
0.0120
,
-
0.0378
,
-
0.0472
,
-
0.0324
,
-
0.0857
,
-
0.0389
,
-
0.1241
,
-
0.0546
,
-
0.1599
,
-
0.0814
,
-
0.1876
,
-
0.1193
,
-
0.1964
,
-
0.1582
,
-
0.1935
,
-
0.1931
,
-
0.1769
,
-
0.2157
,
-
0.1453
,
-
0.2290
,
-
0.1085
,
-
0.2327
,
-
0.0697
,
-
0.2240
,
-
0.0317
,
-
0.2064
,
0.0033
,
-
0.1853
,
0.0362
,
-
0.1613
,
0.0672
,
-
0.1350
,
0.0961
,
-
0.1051
,
0.1213
,
-
0.0706
,
0.1397
,
-
0.0332
,
0.1512
,
0.0053
,
0.1580
,
0.0442
,
0.1624
,
0.0833
,
0.1636
,
0.1224
,
0.1615
,
0.1613
,
0.1565
,
0.1999
,
0.1500
,
0.2378
,
0.1402
,
0.2749
,
0.1279
,
0.3118
,
0.1147
,
0.3487
,
0.1015
,
0.3858
,
0.0892
,
0.4236
,
0.0787
,
0.4621
,
0.0715
,
0.5012
,
0.0702
,
0.5398
,
0.0766
,
0.5768
,
0.0890
,
0.6123
,
0.1055
,
0.6466
,
0.1244
,
0.6805
,
0.1440
,
0.7147
,
0.1630
,
0.7500
,
0.1800
],
[
-
0.7500
,
0.0000
,
-
0.7033
,
0.0195
,
-
0.6569
,
0.0399
,
-
0.6104
,
0.0600
,
-
0.5634
,
0.0789
,
-
0.5155
,
0.0954
,
-
0.4667
,
0.1089
,
-
0.4174
,
0.1206
,
-
0.3676
,
0.1299
,
-
0.3174
,
0.1365
,
-
0.2669
,
0.1398
,
-
0.2162
,
0.1391
,
-
0.1658
,
0.1347
,
-
0.1157
,
0.1271
,
-
0.0661
,
0.1169
,
-
0.0170
,
0.1046
,
0.0316
,
0.0903
,
0.0791
,
0.0728
,
0.1259
,
0.0534
,
0.1723
,
0.0331
,
0.2188
,
0.0129
,
0.2656
,
-
0.0064
,
0.3122
,
-
0.0263
,
0.3586
,
-
0.0466
,
0.4052
,
-
0.0665
,
0.4525
,
-
0.0847
,
0.5007
,
-
0.1002
,
0.5497
,
-
0.1130
,
0.5991
,
-
0.1240
,
0.6491
,
-
0.1325
,
0.6994
,
-
0.1380
,
0.7500
,
-
0.1400
]
],
WIND_OFFSETS
=
[
{
start
:
0.36
,
end
:
0.11
},
{
start
:
0.56
,
end
:
0.16
}
];
function
leaf
(
ctx
,
t
,
x
,
y
,
cw
,
s
,
color
)
{
var
a
=
cw
/
8
,
b
=
a
/
3
,
c
=
2
*
b
,
d
=
(
t
%
1
)
*
TAU
,
e
=
Math
.
cos
(
d
),
f
=
Math
.
sin
(
d
);
ctx
.
fillStyle
=
color
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
ctx
.
beginPath
();
ctx
.
arc
(
x
,
y
,
a
,
d
,
d
+
Math
.
PI
,
false
);
ctx
.
arc
(
x
-
b
*
e
,
y
-
b
*
f
,
c
,
d
+
Math
.
PI
,
d
,
false
);
ctx
.
arc
(
x
+
c
*
e
,
y
+
c
*
f
,
b
,
d
+
Math
.
PI
,
d
,
true
);
ctx
.
globalCompositeOperation
=
'
destination-out
'
;
ctx
.
fill
();
ctx
.
globalCompositeOperation
=
'
source-over
'
;
ctx
.
stroke
();
}
function
swoosh
(
ctx
,
t
,
cx
,
cy
,
cw
,
s
,
index
,
total
,
color
)
{
t
/=
2500
;
var
path
=
WIND_PATHS
[
index
],
a
=
(
t
+
index
-
WIND_OFFSETS
[
index
].
start
)
%
total
,
c
=
(
t
+
index
-
WIND_OFFSETS
[
index
].
end
)
%
total
,
e
=
(
t
+
index
)
%
total
,
b
,
d
,
f
,
i
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
s
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
if
(
a
<
1
)
{
ctx
.
beginPath
();
a
*=
path
.
length
/
2
-
1
;
b
=
Math
.
floor
(
a
);
a
-=
b
;
b
*=
2
;
b
+=
2
;
ctx
.
moveTo
(
cx
+
(
path
[
b
-
2
]
*
(
1
-
a
)
+
path
[
b
]
*
a
)
*
cw
,
cy
+
(
path
[
b
-
1
]
*
(
1
-
a
)
+
path
[
b
+
1
]
*
a
)
*
cw
);
if
(
c
<
1
)
{
c
*=
path
.
length
/
2
-
1
;
d
=
Math
.
floor
(
c
);
c
-=
d
;
d
*=
2
;
d
+=
2
;
for
(
i
=
b
;
i
!==
d
;
i
+=
2
)
ctx
.
lineTo
(
cx
+
path
[
i
]
*
cw
,
cy
+
path
[
i
+
1
]
*
cw
);
ctx
.
lineTo
(
cx
+
(
path
[
d
-
2
]
*
(
1
-
c
)
+
path
[
d
]
*
c
)
*
cw
,
cy
+
(
path
[
d
-
1
]
*
(
1
-
c
)
+
path
[
d
+
1
]
*
c
)
*
cw
);
}
else
for
(
i
=
b
;
i
!==
path
.
length
;
i
+=
2
)
ctx
.
lineTo
(
cx
+
path
[
i
]
*
cw
,
cy
+
path
[
i
+
1
]
*
cw
);
ctx
.
stroke
();
}
else
if
(
c
<
1
)
{
ctx
.
beginPath
();
c
*=
path
.
length
/
2
-
1
;
d
=
Math
.
floor
(
c
);
c
-=
d
;
d
*=
2
;
d
+=
2
;
ctx
.
moveTo
(
cx
+
path
[
0
]
*
cw
,
cy
+
path
[
1
]
*
cw
);
for
(
i
=
2
;
i
!==
d
;
i
+=
2
)
ctx
.
lineTo
(
cx
+
path
[
i
]
*
cw
,
cy
+
path
[
i
+
1
]
*
cw
);
ctx
.
lineTo
(
cx
+
(
path
[
d
-
2
]
*
(
1
-
c
)
+
path
[
d
]
*
c
)
*
cw
,
cy
+
(
path
[
d
-
1
]
*
(
1
-
c
)
+
path
[
d
+
1
]
*
c
)
*
cw
);
ctx
.
stroke
();
}
if
(
e
<
1
)
{
e
*=
path
.
length
/
2
-
1
;
f
=
Math
.
floor
(
e
);
e
-=
f
;
f
*=
2
;
f
+=
2
;
leaf
(
ctx
,
t
,
cx
+
(
path
[
f
-
2
]
*
(
1
-
e
)
+
path
[
f
]
*
e
)
*
cw
,
cy
+
(
path
[
f
-
1
]
*
(
1
-
e
)
+
path
[
f
+
1
]
*
e
)
*
cw
,
cw
,
s
,
color
);
}
}
var
Skycons
=
function
(
opts
)
{
this
.
list
=
[];
this
.
interval
=
null
;
this
.
color
=
opts
&&
opts
.
color
?
opts
.
color
:
"
black
"
;
this
.
resizeClear
=
!!
(
opts
&&
opts
.
resizeClear
);
};
Skycons
.
CLEAR_DAY
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
sun
(
ctx
,
t
,
w
*
0.5
,
h
*
0.5
,
s
,
s
*
STROKE
,
color
);
};
Skycons
.
CLEAR_NIGHT
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
moon
(
ctx
,
t
,
w
*
0.5
,
h
*
0.5
,
s
,
s
*
STROKE
,
color
);
};
Skycons
.
PARTLY_CLOUDY_DAY
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
sun
(
ctx
,
t
,
w
*
0.625
,
h
*
0.375
,
s
*
0.75
,
s
*
STROKE
,
color
);
cloud
(
ctx
,
t
,
w
*
0.375
,
h
*
0.625
,
s
*
0.75
,
s
*
STROKE
,
color
);
};
Skycons
.
PARTLY_CLOUDY_NIGHT
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
moon
(
ctx
,
t
,
w
*
0.667
,
h
*
0.375
,
s
*
0.75
,
s
*
STROKE
,
color
);
cloud
(
ctx
,
t
,
w
*
0.375
,
h
*
0.625
,
s
*
0.75
,
s
*
STROKE
,
color
);
};
Skycons
.
CLOUDY
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
cloud
(
ctx
,
t
,
w
*
0.5
,
h
*
0.5
,
s
,
s
*
STROKE
,
color
);
};
Skycons
.
RAIN
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
rain
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
cloud
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
};
Skycons
.
SLEET
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
sleet
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
cloud
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
};
Skycons
.
SNOW
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
snow
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
cloud
(
ctx
,
t
,
w
*
0.5
,
h
*
0.37
,
s
*
0.9
,
s
*
STROKE
,
color
);
};
Skycons
.
WIND
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
);
swoosh
(
ctx
,
t
,
w
*
0.5
,
h
*
0.5
,
s
,
s
*
STROKE
,
0
,
2
,
color
);
swoosh
(
ctx
,
t
,
w
*
0.5
,
h
*
0.5
,
s
,
s
*
STROKE
,
1
,
2
,
color
);
};
Skycons
.
FOG
=
function
(
ctx
,
t
,
color
)
{
var
w
=
ctx
.
canvas
.
width
,
h
=
ctx
.
canvas
.
height
,
s
=
Math
.
min
(
w
,
h
),
k
=
s
*
STROKE
;
fogbank
(
ctx
,
t
,
w
*
0.5
,
h
*
0.32
,
s
*
0.75
,
k
,
color
);
t
/=
5000
;
var
a
=
Math
.
cos
((
t
)
*
TAU
)
*
s
*
0.02
,
b
=
Math
.
cos
((
t
+
0.25
)
*
TAU
)
*
s
*
0.02
,
c
=
Math
.
cos
((
t
+
0.50
)
*
TAU
)
*
s
*
0.02
,
d
=
Math
.
cos
((
t
+
0.75
)
*
TAU
)
*
s
*
0.02
,
n
=
h
*
0.936
,
e
=
Math
.
floor
(
n
-
k
*
0.5
)
+
0.5
,
f
=
Math
.
floor
(
n
-
k
*
2.5
)
+
0.5
;
ctx
.
strokeStyle
=
color
;
ctx
.
lineWidth
=
k
;
ctx
.
lineCap
=
"
round
"
;
ctx
.
lineJoin
=
"
round
"
;
line
(
ctx
,
a
+
w
*
0.2
+
k
*
0.5
,
e
,
b
+
w
*
0.8
-
k
*
0.5
,
e
);
line
(
ctx
,
c
+
w
*
0.2
+
k
*
0.5
,
f
,
d
+
w
*
0.8
-
k
*
0.5
,
f
);
};
Skycons
.
prototype
=
{
_determineDrawingFunction
:
function
(
draw
)
{
if
(
typeof
draw
===
"
string
"
)
draw
=
Skycons
[
draw
.
toUpperCase
().
replace
(
/-/g
,
"
_
"
)]
||
null
;
return
draw
;
},
add
:
function
(
el
,
draw
)
{
var
obj
;
if
(
typeof
el
===
"
string
"
)
el
=
document
.
getElementById
(
el
);
// Does nothing if canvas name doesn't exists
if
(
el
===
null
)
return
;
draw
=
this
.
_determineDrawingFunction
(
draw
);
// Does nothing if the draw function isn't actually a function
if
(
typeof
draw
!==
"
function
"
)
return
;
obj
=
{
element
:
el
,
context
:
el
.
getContext
(
"
2d
"
),
drawing
:
draw
};
this
.
list
.
push
(
obj
);
this
.
draw
(
obj
,
KEYFRAME
);
},
set
:
function
(
el
,
draw
)
{
var
i
;
if
(
typeof
el
===
"
string
"
)
el
=
document
.
getElementById
(
el
);
for
(
i
=
this
.
list
.
length
;
i
--
;
)
if
(
this
.
list
[
i
].
element
===
el
)
{
this
.
list
[
i
].
drawing
=
this
.
_determineDrawingFunction
(
draw
);
this
.
draw
(
this
.
list
[
i
],
KEYFRAME
);
return
;
}
this
.
add
(
el
,
draw
);
},
remove
:
function
(
el
)
{
var
i
;
if
(
typeof
el
===
"
string
"
)
el
=
document
.
getElementById
(
el
);
for
(
i
=
this
.
list
.
length
;
i
--
;
)
if
(
this
.
list
[
i
].
element
===
el
)
{
this
.
list
.
splice
(
i
,
1
);
return
;
}
},
draw
:
function
(
obj
,
time
)
{
var
canvas
=
obj
.
context
.
canvas
;
if
(
this
.
resizeClear
)
canvas
.
width
=
canvas
.
width
;
else
obj
.
context
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
obj
.
drawing
(
obj
.
context
,
time
,
this
.
color
);
},
play
:
function
()
{
var
self
=
this
;
this
.
pause
();
this
.
interval
=
requestInterval
(
function
()
{
var
now
=
Date
.
now
(),
i
;
for
(
i
=
self
.
list
.
length
;
i
--
;
)
self
.
draw
(
self
.
list
[
i
],
now
);
},
1000
/
60
);
},
pause
:
function
()
{
var
i
;
if
(
this
.
interval
)
{
cancelInterval
(
this
.
interval
);
this
.
interval
=
null
;
}
}
};
global
.
Skycons
=
Skycons
;
}(
this
));
production/js/skycons/skycons.min.js
0 → 100755
浏览文件 @
c3d32864
!
function
(
t
){
"
use strict
"
;
function
n
(
t
,
n
,
i
,
e
){
t
.
beginPath
(),
t
.
arc
(
n
,
i
,
e
,
0
,
p
,
!
1
),
t
.
fill
()}
function
i
(
t
,
n
,
i
,
e
,
a
){
t
.
beginPath
(),
t
.
moveTo
(
n
,
i
),
t
.
lineTo
(
e
,
a
),
t
.
stroke
()}
function
e
(
t
,
i
,
e
,
a
,
o
,
r
,
l
,
s
){
var
h
=
Math
.
cos
(
i
*
p
),
c
=
Math
.
sin
(
i
*
p
);
s
-=
l
,
n
(
t
,
e
-
c
*
o
,
a
+
h
*
r
+
.
5
*
s
,
l
+
(
1
-
.
5
*
h
)
*
s
)}
function
a
(
t
,
n
,
i
,
a
,
o
,
r
,
l
,
s
){
var
h
;
for
(
h
=
5
;
h
--
;)
e
(
t
,
n
+
h
/
5
,
i
,
a
,
o
,
r
,
l
,
s
)}
function
o
(
t
,
n
,
i
,
e
,
o
,
r
,
l
){
n
/=
3
e4
;
var
s
=
.
21
*
o
,
h
=
.
12
*
o
,
c
=
.
24
*
o
,
u
=
.
28
*
o
;
t
.
fillStyle
=
l
,
a
(
t
,
n
,
i
,
e
,
s
,
h
,
c
,
u
),
t
.
globalCompositeOperation
=
"
destination-out
"
,
a
(
t
,
n
,
i
,
e
,
s
,
h
,
c
-
r
,
u
-
r
),
t
.
globalCompositeOperation
=
"
source-over
"
}
function
r
(
t
,
n
,
e
,
a
,
o
,
r
,
l
){
n
/=
12
e4
;
var
s
,
h
,
c
,
u
,
v
=
.
25
*
o
-
.
5
*
r
,
f
=
.
32
*
o
+
.
5
*
r
,
d
=
.
5
*
o
-
.
5
*
r
;
for
(
t
.
strokeStyle
=
l
,
t
.
lineWidth
=
r
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
t
.
beginPath
(),
t
.
arc
(
e
,
a
,
v
,
0
,
p
,
!
1
),
t
.
stroke
(),
s
=
8
;
s
--
;)
h
=
(
n
+
s
/
8
)
*
p
,
c
=
Math
.
cos
(
h
),
u
=
Math
.
sin
(
h
),
i
(
t
,
e
+
c
*
f
,
a
+
u
*
f
,
e
+
c
*
d
,
a
+
u
*
d
)}
function
l
(
t
,
n
,
i
,
e
,
a
,
o
,
r
){
n
/=
15
e3
;
var
l
=
.
29
*
a
-
.
5
*
o
,
s
=
.
05
*
a
,
h
=
Math
.
cos
(
n
*
p
),
c
=
h
*
p
/-
16
;
t
.
strokeStyle
=
r
,
t
.
lineWidth
=
o
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
i
+=
h
*
s
,
t
.
beginPath
(),
t
.
arc
(
i
,
e
,
l
,
c
+
p
/
8
,
c
+
7
*
p
/
8
,
!
1
),
t
.
arc
(
i
+
Math
.
cos
(
c
)
*
l
*
w
,
e
+
Math
.
sin
(
c
)
*
l
*
w
,
l
,
c
+
5
*
p
/
8
,
c
+
3
*
p
/
8
,
!
0
),
t
.
closePath
(),
t
.
stroke
()}
function
s
(
t
,
n
,
i
,
e
,
a
,
o
,
r
){
n
/=
1350
;
var
l
,
s
,
h
,
c
,
u
=
.
16
*
a
,
v
=
11
*
p
/
12
,
f
=
7
*
p
/
12
;
for
(
t
.
fillStyle
=
r
,
l
=
4
;
l
--
;)
s
=
(
n
+
l
/
4
)
%
1
,
h
=
i
+
(
l
-
1.5
)
/
1.5
*
(
1
===
l
||
2
===
l
?
-
1
:
1
)
*
u
,
c
=
e
+
s
*
s
*
a
,
t
.
beginPath
(),
t
.
moveTo
(
h
,
c
-
1.5
*
o
),
t
.
arc
(
h
,
c
,.
75
*
o
,
v
,
f
,
!
1
),
t
.
fill
()}
function
h
(
t
,
n
,
e
,
a
,
o
,
r
,
l
){
n
/=
750
;
var
s
,
h
,
c
,
u
,
v
=
.
1875
*
o
;
for
(
t
.
strokeStyle
=
l
,
t
.
lineWidth
=
.
5
*
r
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
s
=
4
;
s
--
;)
h
=
(
n
+
s
/
4
)
%
1
,
c
=
Math
.
floor
(
e
+
(
s
-
1.5
)
/
1.5
*
(
1
===
s
||
2
===
s
?
-
1
:
1
)
*
v
)
+
.
5
,
u
=
a
+
h
*
o
,
i
(
t
,
c
,
u
-
1.5
*
r
,
c
,
u
+
1.5
*
r
)}
function
c
(
t
,
n
,
e
,
a
,
o
,
r
,
l
){
n
/=
3
e3
;
var
s
,
h
,
c
,
u
,
v
=
.
16
*
o
,
f
=
.
75
*
r
,
d
=
n
*
p
*
.
7
,
m
=
Math
.
cos
(
d
)
*
f
,
g
=
Math
.
sin
(
d
)
*
f
,
M
=
d
+
p
/
3
,
w
=
Math
.
cos
(
M
)
*
f
,
C
=
Math
.
sin
(
M
)
*
f
,
y
=
d
+
2
*
p
/
3
,
b
=
Math
.
cos
(
y
)
*
f
,
k
=
Math
.
sin
(
y
)
*
f
;
for
(
t
.
strokeStyle
=
l
,
t
.
lineWidth
=
.
5
*
r
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
s
=
4
;
s
--
;)
h
=
(
n
+
s
/
4
)
%
1
,
c
=
e
+
Math
.
sin
((
h
+
s
/
4
)
*
p
)
*
v
,
u
=
a
+
h
*
o
,
i
(
t
,
c
-
m
,
u
-
g
,
c
+
m
,
u
+
g
),
i
(
t
,
c
-
w
,
u
-
C
,
c
+
w
,
u
+
C
),
i
(
t
,
c
-
b
,
u
-
k
,
c
+
b
,
u
+
k
)}
function
u
(
t
,
n
,
i
,
e
,
o
,
r
,
l
){
n
/=
3
e4
;
var
s
=
.
21
*
o
,
h
=
.
06
*
o
,
c
=
.
21
*
o
,
u
=
.
28
*
o
;
t
.
fillStyle
=
l
,
a
(
t
,
n
,
i
,
e
,
s
,
h
,
c
,
u
),
t
.
globalCompositeOperation
=
"
destination-out
"
,
a
(
t
,
n
,
i
,
e
,
s
,
h
,
c
-
r
,
u
-
r
),
t
.
globalCompositeOperation
=
"
source-over
"
}
function
v
(
t
,
n
,
i
,
e
,
a
,
o
,
r
){
var
l
=
a
/
8
,
s
=
l
/
3
,
h
=
2
*
s
,
c
=
n
%
1
*
p
,
u
=
Math
.
cos
(
c
),
v
=
Math
.
sin
(
c
);
t
.
fillStyle
=
r
,
t
.
strokeStyle
=
r
,
t
.
lineWidth
=
o
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
t
.
beginPath
(),
t
.
arc
(
i
,
e
,
l
,
c
,
c
+
Math
.
PI
,
!
1
),
t
.
arc
(
i
-
s
*
u
,
e
-
s
*
v
,
h
,
c
+
Math
.
PI
,
c
,
!
1
),
t
.
arc
(
i
+
h
*
u
,
e
+
h
*
v
,
s
,
c
+
Math
.
PI
,
c
,
!
0
),
t
.
globalCompositeOperation
=
"
destination-out
"
,
t
.
fill
(),
t
.
globalCompositeOperation
=
"
source-over
"
,
t
.
stroke
()}
function
f
(
t
,
n
,
i
,
e
,
a
,
o
,
r
,
l
,
s
){
n
/=
2500
;
var
h
,
c
,
u
,
f
,
d
=
C
[
r
],
m
=
(
n
+
r
-
y
[
r
].
start
)
%
l
,
g
=
(
n
+
r
-
y
[
r
].
end
)
%
l
,
M
=
(
n
+
r
)
%
l
;
if
(
t
.
strokeStyle
=
s
,
t
.
lineWidth
=
o
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
1
>
m
){
if
(
t
.
beginPath
(),
m
*=
d
.
length
/
2
-
1
,
h
=
Math
.
floor
(
m
),
m
-=
h
,
h
*=
2
,
h
+=
2
,
t
.
moveTo
(
i
+
(
d
[
h
-
2
]
*
(
1
-
m
)
+
d
[
h
]
*
m
)
*
a
,
e
+
(
d
[
h
-
1
]
*
(
1
-
m
)
+
d
[
h
+
1
]
*
m
)
*
a
),
1
>
g
){
for
(
g
*=
d
.
length
/
2
-
1
,
c
=
Math
.
floor
(
g
),
g
-=
c
,
c
*=
2
,
c
+=
2
,
f
=
h
;
f
!==
c
;
f
+=
2
)
t
.
lineTo
(
i
+
d
[
f
]
*
a
,
e
+
d
[
f
+
1
]
*
a
);
t
.
lineTo
(
i
+
(
d
[
c
-
2
]
*
(
1
-
g
)
+
d
[
c
]
*
g
)
*
a
,
e
+
(
d
[
c
-
1
]
*
(
1
-
g
)
+
d
[
c
+
1
]
*
g
)
*
a
)}
else
for
(
f
=
h
;
f
!==
d
.
length
;
f
+=
2
)
t
.
lineTo
(
i
+
d
[
f
]
*
a
,
e
+
d
[
f
+
1
]
*
a
);
t
.
stroke
()}
else
if
(
1
>
g
){
for
(
t
.
beginPath
(),
g
*=
d
.
length
/
2
-
1
,
c
=
Math
.
floor
(
g
),
g
-=
c
,
c
*=
2
,
c
+=
2
,
t
.
moveTo
(
i
+
d
[
0
]
*
a
,
e
+
d
[
1
]
*
a
),
f
=
2
;
f
!==
c
;
f
+=
2
)
t
.
lineTo
(
i
+
d
[
f
]
*
a
,
e
+
d
[
f
+
1
]
*
a
);
t
.
lineTo
(
i
+
(
d
[
c
-
2
]
*
(
1
-
g
)
+
d
[
c
]
*
g
)
*
a
,
e
+
(
d
[
c
-
1
]
*
(
1
-
g
)
+
d
[
c
+
1
]
*
g
)
*
a
),
t
.
stroke
()}
1
>
M
&&
(
M
*=
d
.
length
/
2
-
1
,
u
=
Math
.
floor
(
M
),
M
-=
u
,
u
*=
2
,
u
+=
2
,
v
(
t
,
n
,
i
+
(
d
[
u
-
2
]
*
(
1
-
M
)
+
d
[
u
]
*
M
)
*
a
,
e
+
(
d
[
u
-
1
]
*
(
1
-
M
)
+
d
[
u
+
1
]
*
M
)
*
a
,
a
,
o
,
s
))}
var
d
,
m
;
!
function
(){
var
n
=
t
.
requestAnimationFrame
||
t
.
webkitRequestAnimationFrame
||
t
.
mozRequestAnimationFrame
||
t
.
oRequestAnimationFrame
||
t
.
msRequestAnimationFrame
,
i
=
t
.
cancelAnimationFrame
||
t
.
webkitCancelAnimationFrame
||
t
.
mozCancelAnimationFrame
||
t
.
oCancelAnimationFrame
||
t
.
msCancelAnimationFrame
;
n
&&
i
?(
d
=
function
(
t
){
function
i
(){
e
.
value
=
n
(
i
),
t
()}
var
e
=
{
value
:
null
};
return
i
(),
e
},
m
=
function
(
t
){
i
(
t
.
value
)}):(
d
=
setInterval
,
m
=
clearInterval
)}();
var
g
=
500
,
M
=
.
08
,
p
=
2
*
Math
.
PI
,
w
=
2
/
Math
.
sqrt
(
2
),
C
=
[[
-
.
75
,
-
.
18
,
-
.
7219
,
-
.
1527
,
-
.
6971
,
-
.
1225
,
-
.
6739
,
-
.
091
,
-
.
6516
,
-
.
0588
,
-
.
6298
,
-
.
0262
,
-
.
6083
,.
0065
,
-
.
5868
,.
0396
,
-
.
5643
,.
0731
,
-
.
5372
,.
1041
,
-
.
5033
,.
1259
,
-
.
4662
,.
1406
,
-
.
4275
,.
1493
,
-
.
3881
,.
153
,
-
.
3487
,.
1526
,
-
.
3095
,.
1488
,
-
.
2708
,.
1421
,
-
.
2319
,.
1342
,
-
.
1943
,.
1217
,
-
.
16
,.
1025
,
-
.
129
,.
0785
,
-
.
1012
,.
0509
,
-
.
0764
,.
0206
,
-
.
0547
,
-
.
012
,
-
.
0378
,
-
.
0472
,
-
.
0324
,
-
.
0857
,
-
.
0389
,
-
.
1241
,
-
.
0546
,
-
.
1599
,
-
.
0814
,
-
.
1876
,
-
.
1193
,
-
.
1964
,
-
.
1582
,
-
.
1935
,
-
.
1931
,
-
.
1769
,
-
.
2157
,
-
.
1453
,
-
.
229
,
-
.
1085
,
-
.
2327
,
-
.
0697
,
-
.
224
,
-
.
0317
,
-
.
2064
,.
0033
,
-
.
1853
,.
0362
,
-
.
1613
,.
0672
,
-
.
135
,.
0961
,
-
.
1051
,.
1213
,
-
.
0706
,.
1397
,
-
.
0332
,.
1512
,.
0053
,.
158
,.
0442
,.
1624
,.
0833
,.
1636
,.
1224
,.
1615
,.
1613
,.
1565
,.
1999
,.
15
,.
2378
,.
1402
,.
2749
,.
1279
,.
3118
,.
1147
,.
3487
,.
1015
,.
3858
,.
0892
,.
4236
,.
0787
,.
4621
,.
0715
,.
5012
,.
0702
,.
5398
,.
0766
,.
5768
,.
089
,.
6123
,.
1055
,.
6466
,.
1244
,.
6805
,.
144
,.
7147
,.
163
,.
75
,.
18
],[
-
.
75
,
0
,
-
.
7033
,.
0195
,
-
.
6569
,.
0399
,
-
.
6104
,.
06
,
-
.
5634
,.
0789
,
-
.
5155
,.
0954
,
-
.
4667
,.
1089
,
-
.
4174
,.
1206
,
-
.
3676
,.
1299
,
-
.
3174
,.
1365
,
-
.
2669
,.
1398
,
-
.
2162
,.
1391
,
-
.
1658
,.
1347
,
-
.
1157
,.
1271
,
-
.
0661
,.
1169
,
-
.
017
,.
1046
,.
0316
,.
0903
,.
0791
,.
0728
,.
1259
,.
0534
,.
1723
,.
0331
,.
2188
,.
0129
,.
2656
,
-
.
0064
,.
3122
,
-
.
0263
,.
3586
,
-
.
0466
,.
4052
,
-
.
0665
,.
4525
,
-
.
0847
,.
5007
,
-
.
1002
,.
5497
,
-
.
113
,.
5991
,
-
.
124
,.
6491
,
-
.
1325
,.
6994
,
-
.
138
,.
75
,
-
.
14
]],
y
=
[{
start
:.
36
,
end
:.
11
},{
start
:.
56
,
end
:.
16
}],
b
=
function
(
t
){
this
.
list
=
[],
this
.
interval
=
null
,
this
.
color
=
t
&&
t
.
color
?
t
.
color
:
"
black
"
,
this
.
resizeClear
=!
(
!
t
||!
t
.
resizeClear
)};
b
.
CLEAR_DAY
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
o
=
Math
.
min
(
e
,
a
);
r
(
t
,
n
,.
5
*
e
,.
5
*
a
,
o
,
o
*
M
,
i
)},
b
.
CLEAR_NIGHT
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
o
=
Math
.
min
(
e
,
a
);
l
(
t
,
n
,.
5
*
e
,.
5
*
a
,
o
,
o
*
M
,
i
)},
b
.
PARTLY_CLOUDY_DAY
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
l
=
Math
.
min
(
e
,
a
);
r
(
t
,
n
,.
625
*
e
,.
375
*
a
,.
75
*
l
,
l
*
M
,
i
),
o
(
t
,
n
,.
375
*
e
,.
625
*
a
,.
75
*
l
,
l
*
M
,
i
)},
b
.
PARTLY_CLOUDY_NIGHT
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
e
,
a
);
l
(
t
,
n
,.
667
*
e
,.
375
*
a
,.
75
*
r
,
r
*
M
,
i
),
o
(
t
,
n
,.
375
*
e
,.
625
*
a
,.
75
*
r
,
r
*
M
,
i
)},
b
.
CLOUDY
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
e
,
a
);
o
(
t
,
n
,.
5
*
e
,.
5
*
a
,
r
,
r
*
M
,
i
)},
b
.
RAIN
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
e
,
a
);
s
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
),
o
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
)},
b
.
SLEET
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
e
,
a
);
h
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
),
o
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
)},
b
.
SNOW
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
e
,
a
);
c
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
),
o
(
t
,
n
,.
5
*
e
,.
37
*
a
,.
9
*
r
,
r
*
M
,
i
)},
b
.
WIND
=
function
(
t
,
n
,
i
){
var
e
=
t
.
canvas
.
width
,
a
=
t
.
canvas
.
height
,
o
=
Math
.
min
(
e
,
a
);
f
(
t
,
n
,.
5
*
e
,.
5
*
a
,
o
,
o
*
M
,
0
,
2
,
i
),
f
(
t
,
n
,.
5
*
e
,.
5
*
a
,
o
,
o
*
M
,
1
,
2
,
i
)},
b
.
FOG
=
function
(
t
,
n
,
e
){
var
a
=
t
.
canvas
.
width
,
o
=
t
.
canvas
.
height
,
r
=
Math
.
min
(
a
,
o
),
l
=
r
*
M
;
u
(
t
,
n
,.
5
*
a
,.
32
*
o
,.
75
*
r
,
l
,
e
),
n
/=
5
e3
;
var
s
=
Math
.
cos
(
n
*
p
)
*
r
*
.
02
,
h
=
Math
.
cos
((
n
+
.
25
)
*
p
)
*
r
*
.
02
,
c
=
Math
.
cos
((
n
+
.
5
)
*
p
)
*
r
*
.
02
,
v
=
Math
.
cos
((
n
+
.
75
)
*
p
)
*
r
*
.
02
,
f
=
.
936
*
o
,
d
=
Math
.
floor
(
f
-
.
5
*
l
)
+
.
5
,
m
=
Math
.
floor
(
f
-
2.5
*
l
)
+
.
5
;
t
.
strokeStyle
=
e
,
t
.
lineWidth
=
l
,
t
.
lineCap
=
"
round
"
,
t
.
lineJoin
=
"
round
"
,
i
(
t
,
s
+
.
2
*
a
+
.
5
*
l
,
d
,
h
+
.
8
*
a
-
.
5
*
l
,
d
),
i
(
t
,
c
+
.
2
*
a
+
.
5
*
l
,
m
,
v
+
.
8
*
a
-
.
5
*
l
,
m
)},
b
.
prototype
=
{
_determineDrawingFunction
:
function
(
t
){
return
"
string
"
==
typeof
t
?(
t
=
t
.
toUpperCase
().
replace
(
/-/g
,
"
_
"
),
b
.
hasOwnProperty
(
t
)?
b
[
t
]:
null
):
void
0
},
add
:
function
(
t
,
n
){
var
i
;
"
string
"
==
typeof
t
&&
(
t
=
document
.
getElementById
(
t
)),
null
!==
t
&&
(
n
=
this
.
_determineDrawingFunction
(
n
),
"
function
"
==
typeof
n
&&
(
i
=
{
element
:
t
,
context
:
t
.
getContext
(
"
2d
"
),
drawing
:
n
},
this
.
list
.
push
(
i
),
this
.
draw
(
i
,
g
)))},
set
:
function
(
t
,
n
){
var
i
;
for
(
"
string
"
==
typeof
t
&&
(
t
=
document
.
getElementById
(
t
)),
i
=
this
.
list
.
length
;
i
--
;)
if
(
this
.
list
[
i
].
element
===
t
)
return
this
.
list
[
i
].
drawing
=
this
.
_determineDrawingFunction
(
n
),
void
this
.
draw
(
this
.
list
[
i
],
g
);
this
.
add
(
t
,
n
)},
remove
:
function
(
t
){
var
n
;
for
(
"
string
"
==
typeof
t
&&
(
t
=
document
.
getElementById
(
t
)),
n
=
this
.
list
.
length
;
n
--
;)
if
(
this
.
list
[
n
].
element
===
t
)
return
void
this
.
list
.
splice
(
n
,
1
)},
draw
:
function
(
t
,
n
){
var
i
=
t
.
context
.
canvas
;
this
.
resizeClear
?
i
.
width
=
i
.
width
:
t
.
context
.
clearRect
(
0
,
0
,
i
.
width
,
i
.
height
),
t
.
drawing
(
t
.
context
,
n
,
this
.
color
)},
play
:
function
(){
var
t
=
this
;
this
.
pause
(),
this
.
interval
=
d
(
function
(){
var
n
,
i
=
Date
.
now
();
for
(
n
=
t
.
list
.
length
;
n
--
;)
t
.
draw
(
t
.
list
[
n
],
i
)},
1
e3
/
60
)},
pause
:
function
(){
this
.
interval
&&
(
m
(
this
.
interval
),
this
.
interval
=
null
)}},
t
.
Skycons
=
b
}(
this
);
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录