UNPKG

scrawl-canvas

Version:
50 lines (39 loc) 1.49 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demo Canvas 011</title> <link href="css/normalize.css" rel="stylesheet" /> <link href="css/tests.css" rel="stylesheet" /> </head> <body> <h1><a href="index.html">Scrawl-canvas v8</a> - Canvas test 011</h1> <h2>Shape entity (make, clone, method)<br />Drag and drop shape entitys</h2> <canvas id="mycanvas" width="650" height="350" data-scrawl-canvas data-base-background-color="lightblue" ></canvas> <p id="reportmessage"></p> <div class="testinfo"> <h4>Test purpose</h4> <ul> <li>Create a shape entity</li> <li>Clone a shape</li> <li>Position the shape on the canvas</li> <li>Change the state of a subset of shapes sharing the same state object</li> <li>Check the various drawing methods available to the shape</li> </ul> <ul> <li>Kill and resurrect several entitys to make sure they remove themselves entirely from the Scrawl-canvas system, and cleanly recreate themselves from saved packets</li> </ul> <p><b>Touch test:</b> should work as expected - though flicking a shape may lead to it moving beyond the canvas border and out of sight!</p> <p><a href="../docs/demo/canvas-011.html">Annotated code</a></p> </div> <script src="canvas-011.js" type="module"></script> </body> </html>