-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathexample4.html
123 lines (95 loc) · 3.54 KB
/
example4.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
123
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Warp Drive - jQuery Example 1</title>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js'></script>
<script src='js/jquery.warpdrive.min.js'></script>
<style type='text/css'>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
box-sizing: border-box;
}
body {
overflow: hidden;
background-color: #CCC;
}
#holder {
position: absolute;
width: 480px;
height: 480px;
}
</style>
<script>
$( document ).ready( function() {
//------------------------------------------------------------------------
//Settings - params for WarpDrive
var settings = {
width: 480,
height: 480,
autoResize: false,
autoResizeMinWidth: null,
autoResizeMaxWidth: null,
autoResizeMinHeight: null,
autoResizeMaxHeight: null,
addMouseControls: true,
addTouchControls: true,
hideContextMenu: true,
starCount: 6666,
starBgCount: 2222,
starBgColor: { r:155, g:255, b:0 },
starBgColorRangeMin: 10,
starBgColorRangeMax: 60,
starColor: { r:155, g:255, b:0 },
starColorRangeMin: 50,
starColorRangeMax: 100,
starfieldBackgroundColor: { r:0, g:33, b:0 },
starDirection: -1,
starSpeed: 20,
starSpeedMax: 200,
starSpeedAnimationDuration: 2,
starFov: 300,
starFovMin: 200,
starFovAnimationDuration: 2,
starRotationPermission: true,
starRotationDirection: 1,
starRotationSpeed: 0.0,
starRotationSpeedMax: 1.0,
starRotationAnimationDuration: 2,
starWarpLineLength: 2.0,
starWarpTunnelDiameter: 100,
starFollowMouseSensitivity: 0.025,
starFollowMouseXAxis: true,
starFollowMouseYAxis: true
};
//------------------------------------------------------------------------
//standalone
//init
//var warpdrive = new WarpDrive( document.getElementById( 'holder' ) );
var warpdrive = new WarpDrive( document.getElementById( 'holder' ), settings );
//------------------------------------------------------------------------
//jQuery
//init
//$( '#holder' ).warpDrive();
//$( '#holder' ).warpDrive( settings );
//------------------------------------------------------------------------
} );
</script>
</head>
<body>
<div id='holder'></div>
</body>