fabric.js/test/demo/index.html
kangax 9a9605fecd Alias Math.* methods for slight perf. increase.
Remove `fastestClearingMethod` test, as webkit has rendering bugs with `canvas.width = canvas.width` type of clearing.
Rename some properties/methods in `fabric.Element` from `_oXxxxx` & `_aXxxxx` to `_xxxxx`.
Add test for `fabric.Element::onFpsUpdate`.
2010-07-31 13:55:10 -04:00

49 lines
No EOL
1.8 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Canvas demo</title>
<!--[if lt IE 9]>
<script src="js/core/excanvas.js" type="text/javascript"></script>
<![endif]-->
<script src="../../dist/all.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="demo.css" type="text/css">
</head>
<body>
<div id="body-wrapper">
<div id="fps">
</div>
<canvas id="canvas" width="800" height="600"></canvas>
<ul id="commands">
<li style="font-weight:bold;margin-bottom:1em">Add objects to canvas:</li>
<li><button class="rect">Rectangle</button></li>
<li><button class="circle">Circle</button></li>
<li><button class="triangle">Triangle</button></li>
<li><button class="image1">Image 1</button></li>
<li><button class="image2">Image 2</button></li>
<li><button class="shape" id="shape1">SVG shape 1</button></li>
<li><button class="shape" id="shape2">SVG shape 2</button></li>
<li><button class="shape" id="shape3">SVG shape 3</button></li>
<li><button class="shape" id="shape4">SVG shape 4</button></li>
<li><button id="rasterize">Rasterize canvas to image</button></li>
<li><button class="clear">Clear canvas</button></li>
<li style="margin-top:20px;">
<label for="canvas-console">Execute code:</label>
<textarea rows="8" cols="40" id="canvas-console">canvas.clear(); // clears canvas</textarea>
<button type="button" id="execute">Execute</button>
</li>
</ul>
</div>
<script src="demo.js" type="text/javascript"></script>
</body>
</html>