Permalink
Browse files

final polishes

  • Loading branch information...
1 parent 15c1413 commit b2b85764ca5d18630e50ff1f08406ba9be6ab0fb @jlongster committed May 24, 2011
Showing with 98 additions and 442 deletions.
  1. +2 −1 dom3d.js
  2. +0 −16 example.css
  3. +2 −2 example.html
  4. +3 −0 example.js
  5. +2 −2 example2.html
  6. +3 −0 example2.js
  7. +2 −2 example3.html
  8. +4 −0 example3.js
  9. +2 −2 example4.html
  10. +3 −0 example4.js
  11. +13 −5 index.html
  12. +8 −9 app.js → index.js
  13. +0 −69 less.js
  14. +0 −320 main.js
  15. +3 −1 renderer_css.js
  16. +24 −8 std.js
  17. +27 −5 style.css
View
@@ -175,4 +175,5 @@
current_frustum: current_frustum
}
-})();
+})();
+
View
@@ -22,19 +22,3 @@ li {
li:hover {
-moz-transition: -moz-transform .5s;
}
-
-.render-options {
- float: right;
-}
-
-.render-options a,
-.render-options a:visited {
- display: inline-block;
- padding: 1em;
- color: white;
- border: 1px solid #bd5294;
-}
-
-.render-options a:target {
- background-color: #bd5294;
-}
View
@@ -27,8 +27,8 @@
<a href="example4.html">404</a>
<div class="render-options">
- <a id="css" href="#css">CSS</a>
- <a id="raphael" href="#raphael">SVG/Raphael</a>
+ <a href="#css">CSS</a>
+ <a href="#raphael">SVG/Raphael</a>
</div>
</div>
View
@@ -4,6 +4,8 @@ $(function() {
var offset = $v(0, 0);
var header = $('.header');
+ make_renderer();
+
dom3d.current_eye($v(0,0,-15));
dom3d.current_light(vec_unit($v(-1.0, 0.5, -.2)));
dom3d.current_color($c(200, 255, 200));
@@ -81,5 +83,6 @@ $(function() {
frame(snake);
});
+ install_resize();
frame(update());
})
View
@@ -29,8 +29,8 @@
<a href="example4.html">404</a>
<div class="render-options">
- <a id="css" href="#css">CSS</a>
- <a id="raphael" href="#raphael">SVG/Raphael</a>
+ <a href="#css">CSS</a>
+ <a href="#raphael">SVG/Raphael</a>
</div>
</div>
View
@@ -4,6 +4,8 @@ $(function() {
var offset = $v(0, 0);
var header = $('.header');
+ make_renderer();
+
dom3d.current_eye($v(0,0,-15));
dom3d.current_light(vec_unit($v(-1.0, .5, -.2)));
dom3d.current_color($c(200, 255, 200));
@@ -94,5 +96,6 @@ $(function() {
frame(snake);
});
+ install_resize();
frame(snake);
})
View
@@ -29,8 +29,8 @@
<a href="example4.html">404</a>
<div class="render-options">
- <a id="css" href="#css">CSS</a>
- <a id="raphael" href="#raphael">SVG/Raphael</a>
+ <a href="#css">CSS</a>
+ <a href="#raphael">SVG/Raphael</a>
</div>
</div>
View
@@ -2,6 +2,8 @@
$(function() {
+ make_renderer();
+
dom3d.current_eye($v(0,0,-10));
dom3d.current_light(vec_unit($v(-1.0, 0.0, -.2)));
dom3d.current_color($c(200, 255, 200));
@@ -39,4 +41,6 @@ $(function() {
setInterval(function() {
frame(update());
}, 50);
+
+ install_resize();
})
View
@@ -29,8 +29,8 @@
<a href="example4.html">404</a>
<div class="render-options">
- <a id="css" href="#css">CSS</a>
- <a id="raphael" href="#raphael">SVG/Raphael</a>
+ <a href="#css">CSS</a>
+ <a href="#raphael">SVG/Raphael</a>
</div>
</div>
</body>
View
@@ -2,6 +2,8 @@
$(function() {
+ make_renderer();
+
dom3d.current_eye($v(0,0,-4.2));
dom3d.current_light(vec_unit($v(-1.0, 0.0, -.2)));
dom3d.current_color($c(255, 100, 0));
@@ -35,4 +37,5 @@ $(function() {
frame(update());
}, 50);
+ install_resize();
})
View
@@ -3,17 +3,21 @@
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="vector.js"></script>
- <!-- <script type="text/javascript" src="raphael-min.js"></script> -->
<script type="text/javascript" src="dom3d.js"></script>
+
<script type="text/javascript" src="renderer.js"></script>
+ <script type="text/javascript" src="raphael-min.js"></script>
<script type="text/javascript" src="renderer_css.js"></script>
+ <script type="text/javascript" src="renderer_raphael.js"></script>
+
<script type="text/javascript" src="heap.js"></script>
+ <script type="text/javascript" src="std.js"></script>
<script type="text/javascript" src="untitled2.js"></script>
- <script type="text/javascript" src="app.js"></script>
+ <script type="text/javascript" src="index.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
- <body>
+ <body id="main">
<div class="header">
Other examples:
@@ -22,6 +26,11 @@
<a href="example2.html">dragging</a>
<a href="example3.html">teapot</a>
<a href="example4.html">404</a>
+
+ <div class="render-options">
+ <a href="#css">CSS</a>
+ <a href="#raphael">SVG/Raphael</a>
+ </div>
</div>
<div class="content">
@@ -40,8 +49,7 @@
</p>
- <div id="boxes"></div>
-
+ <div id="canvas"></div>
<p>
So without any SVG or canvas, you can have real-time 3d objects
View
@@ -1,24 +1,23 @@
$(function() {
- var object = untitled2;
-
function update(diff) {
- object.yaw = diff;
- object.pitch = diff;
+ untitled2.yaw = diff;
+ untitled2.pitch = diff;
}
function frame() {
- dom3d.clear('boxes');
- dom3d.render('boxes', object);
+ dom3d.clear('canvas');
+ dom3d.render('canvas', untitled2);
}
function test() {
- dom3d.current_renderer().test('boxes');
+ dom3d.current_renderer().test('canvas');
}
+
+ var canvas = $('#canvas');
+ make_renderer(canvas.width(), canvas.height());
- dom3d.current_renderer(new RendererCSS());
- dom3d.init('boxes');
dom3d.current_eye($v(0,0,-15));
dom3d.current_light(vec_unit($v(-1.0, 0.0, 0.0)));
dom3d.current_color($c(200, 255, 200));
Oops, something went wrong.

0 comments on commit b2b8576

Please sign in to comment.