mirror of
https://github.com/RustyRaptor/CanvasLoader.git
synced 2026-12-03 17:55:15 -07:00
- Version 0.8.0 is finished. - Compressed js version added. - Documentation added.
98 lines
3.1 KiB
HTML
98 lines
3.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<!--
|
|
|
|
Copyright (c) 2011 Róbert Pataki
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
comyCles of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all comyCles or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
|
|
----------------------------------------------------------------------------------------
|
|
|
|
Check out my GitHub: http://github.com/heartcode/
|
|
Send me an email: heartcode@robertpataki.com
|
|
Follow me on Twitter: http://twitter.com/#iHeartcode
|
|
Blog: http://heartcode.robertpataki.com
|
|
|
|
-->
|
|
<title>Heartcode Canvas loader</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="language" content="en" />
|
|
<meta name="description" content="" />
|
|
<meta name="keywords" content="" />
|
|
<script type="application/javascript" src="js/heartcode-canvasloader-min.js"></script>
|
|
<style type="text/css">
|
|
div {float:left; display:table; padding:20px;}
|
|
canvas { /*border:1px solid #ff0000;*/ }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="circle"></div>
|
|
<div id="circle2"></div>
|
|
<div id="square"></div>
|
|
<div id="rectangle"></div>
|
|
<div id="roundRectangle"></div>
|
|
<div id="circle3"></div>
|
|
<script type="text/javascript">
|
|
var cl = new CanvasLoader("circle");
|
|
cl.setShape("circle");
|
|
cl.setDensity(60);
|
|
cl.setFPS(12);
|
|
cl.setSpeed(2);
|
|
cl.setColor("#0099ff");
|
|
|
|
var cl1 = new CanvasLoader("circle2");
|
|
cl1.setShape("circle");
|
|
cl1.setDensity(60);
|
|
cl1.setFPS(24);
|
|
cl1.setSpeed(1);
|
|
cl1.setScaling(false);
|
|
cl1.setColor("#DA20DB");
|
|
|
|
var cl2 = new CanvasLoader("square");
|
|
cl2.setShape("square");
|
|
cl2.setDensity(12);
|
|
cl2.setFPS(6);
|
|
cl2.setSpeed(1);
|
|
cl2.setColor("#B7C40D");
|
|
|
|
var cl3 = new CanvasLoader("rectangle");
|
|
cl3.setShape("rectangle");
|
|
cl3.setDensity(12);
|
|
cl3.setFPS(12);
|
|
cl3.setSpeed(1);
|
|
cl3.setColor("#DE8E1A");
|
|
|
|
var cl5 = new CanvasLoader("circle3");
|
|
cl5.setShape("circle");
|
|
cl5.setScaling(false);
|
|
cl5.setDensity(9);
|
|
cl5.setFPS(6);
|
|
cl5.setSpeed(1);
|
|
cl5.setColor("#99cc00");
|
|
|
|
var cl4 = new CanvasLoader("roundRectangle");
|
|
cl4.setShape("roundedRectangle");
|
|
cl4.setDensity(12);
|
|
cl4.setFPS(12);
|
|
cl4.setSpeed(1);
|
|
cl4.setColor("#222222");
|
|
</script>
|
|
</body>
|
|
</html> |