Skip to content

Instantly share code, notes, and snippets.

@tangentstorm
Last active December 20, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tangentstorm/6208908 to your computer and use it in GitHub Desktop.
Save tangentstorm/6208908 to your computer and use it in GitHub Desktop.
<!doctype html>
<html xmlns:svg="http://www.w3.org/2000/svg">
<head>
<title>Tetris</title>
</head>
<body>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="tetris.js" charset="utf-8"></script>
<div id="tetris"></div>
</body>
</html>
var tetris = d3.select("#tetris").
append("svg:svg").
attr("width", 400).
attr("height", 300);
tetris.append("svg:rect").
attr("x", 100).
attr("y", 100).
attr("height", 100).
attr("width", 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment