Skip to content
Browse files

Added code example

  • Loading branch information...
1 parent 8640a52 commit b4ccc1716fa7f96321c139119c5401fac3f6f7e4 @Poincare committed Apr 24, 2012
Showing with 38 additions and 16 deletions.
  1. +20 −14 index.css
  2. +18 −2 index.html
View
34 index.css
@@ -8,7 +8,7 @@ body {
font-size: 90pt;
color: #00085C;
font-family: monospace;
- padding-top: 190px;
+ padding-top: 10px;
text-align: center;
}
@@ -22,23 +22,29 @@ body {
font-family: monospace;
}
-#features {
- width: 960px;
- margin: auto;
+#example {
+ box-shadow: 0 0 8px 0px #000 inset;
- margin-top: 90px;
- text-align: center;
-}
+ background-color: #333;
+ color: #fff;
+ width: 520px;
+
+ font-size: 11pt;
-#features table {
- width: 560px;
- font-family: sans-serif;
- font-size: 20pt;
- margin: auto;
+
+ margin: auto;
+ margin-top: 35px;
+ border-radius: 15px;
+ margin-bottom: 35px;
+ padding: 15px;
}
-#features td {
- padding-top: 30px;
+#boom {
+ width: 500px;
+ margin: auto;
+ text-align: center;
+ font-family: monospace;
+ font-size: 38pt;
}
#go {
View
20 index.html
@@ -9,8 +9,24 @@
HTML5 Canvas game engine that stays out of your way
</div>
- <div id="features">
- </div>
+ <div id="example">
+ <code><pre>
+//Bouncing rectangle; the "Hello, world!" of 2D games
+
+br = Object.create(OHWallBouncingObj);
+
+br.draw = function(c) {
+ c.fillRect(this.x, this.y, this.width, this.height);
+};
+
+Hydroxide.registerObject(br);
+ </pre>
+ </code>
+ </div>
+
+ <div id="boom">
+ BOOM
+ </div>
<div id="go">
<a href="https://github.com/Poincare/Hydroxide"><button id="go_but">Github</button></a>

0 comments on commit b4ccc17

Please sign in to comment.
Something went wrong with that request. Please try again.