Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (95 sloc) 3.54 KB
<!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:255, g:55, b:0 },
starBgColorRangeMin: 10,
starBgColorRangeMax: 60,
starColor: { r:255, g:55, b:0 },
starColorRangeMin: 50,
starColorRangeMax: 100,
starfieldBackgroundColor: { r:33, g:0, b:0 },
starDirection: 1,
starSpeed: 20,
starSpeedMax: 200,
starSpeedAnimationDuration: 1,
starFov: 300,
starFovMin: 250,
starFovAnimationDuration: 3,
starRotationPermission: true,
starRotationDirection: 1,
starRotationSpeed: 0.0,
starRotationSpeedMax: 1.0,
starRotationAnimationDuration: 2,
starWarpLineLength: 1.5,
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>