Skip to content

Instantly share code, notes, and snippets.

@tangentstorm tangentstorm/index.html
Last active Dec 20, 2015

Embed
What would you like to do?
<!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
You can’t perform that action at this time.