Skip to content

Commit

Permalink
Added links to demos
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed May 7, 2013
1 parent 9e0f8cf commit 985ffca
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ These modules provide access to the core rendering classes:

There are also helper classes to work with vector paths, 3x3 transformation
matrices, colors, morphing, common shapes etc.

#Demos

[See ./demos](./demos)
12 changes: 10 additions & 2 deletions demos/codegen/triangle.js → demos/codegen/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,13 @@ var rectangle = new ART.Rectangle(100, 100).rotate(45).stroke('#0F0', 2);

art.grab(triangle, rectangle);

alert(art.toExpression().toString());
alert(art.toModule().toString());
function showResult(text) {
var result = document.createElement('textarea');
result.style.width = '500px';
result.style.height = '300px';
result.value = text;
document.body.appendChild(result);
}

showResult(art.toExpression().toString());
showResult(art.toModule().toString());
4 changes: 2 additions & 2 deletions demos/codegen/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Triangle.js</title>
<title>Codegen</title>
</head>
<body>
<script src="../../lib/link/Source/Web/link.js" data-main="triangle.js" data-nocache></script>
<script src="../../lib/link/Source/Web/link.js" data-main="codegen.js" data-nocache></script>
</body>
</html>
18 changes: 18 additions & 0 deletions demos/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>Demo List</title>
</head>
<body>
<p><a href="morph">Morph<a/></p>
<p><a href="opacity">Opacity<a/></p>
<p><a href="paths">Paths<a/></p>
<p><a href="gradients">Gradients<a/></p>
<p><a href="images">Images<a/></p>
<p><a href="objectmodel ">Object Model<a/></p>
<p><a href="svgviewer">SVG Viewer<a/></p>
<p><a href="codegen">Code Generation<a/></p>
<p><a href="svgconverter">SVG to ART Converter<a/></p>
<p><a href="apidump">Public API Dump<a/></p>
</body>
</html>
2 changes: 2 additions & 0 deletions demos/svgconverter/converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var SVGParser = require('../../src/parsers/svg');

SVGParser.load('../svgviewer/testcase.svg', function(surface){
var result = document.createElement('textarea');
result.style.width = '500px';
result.style.height = '500px';
result.value = surface.toModule();
document.body.appendChild(result);
});

0 comments on commit 985ffca

Please sign in to comment.