]> git.scottworley.com Git - nt3d/blobdiff - box_by_extrude.html
Twirl a fixed distance; inner rings twirl tighter
[nt3d] / box_by_extrude.html
index fb1ca2cf61592cfa8ec72896ec9ddae36bc53880..62dca74016372813a8f4cabf90a34a9348596bcc 100644 (file)
@@ -3,17 +3,17 @@
     <title>Box by extrude</title>
     <script type="text/javascript" src="nt3d.js"></script>
     <script type="text/javascript">
     <title>Box by extrude</title>
     <script type="text/javascript" src="nt3d.js"></script>
     <script type="text/javascript">
-      function box_by_extrude(size) {
-        var origin = [0,    0,    0];
-        var x      = [size, 0,    0];
-        var y      = [0,    size, 0];
-        var xy     = [size, size, 0];
+      function box_by_extrude(params) {
+        var origin = [0,           0,           0];
+        var x      = [params.size, 0,           0];
+        var y      = [0,           params.size, 0];
+        var xy     = [params.size, params.size, 0];
        return nt3d.extrude([[0, 0, 0], [0, 0, 1]],
                            [origin, x, xy, y],
                            [0, 0, 1],
                            [1, 0, 0]);
       }
        return nt3d.extrude([[0, 0, 0], [0, 0, 1]],
                            [origin, x, xy, y],
                            [0, 0, 1],
                            [1, 0, 0]);
       }
-      var params = [["Size", 1]];
+      var params = [["size", 1]];
     </script>
   </head>
   <body onload="nt3d.framework(box_by_extrude, params)">
     </script>
   </head>
   <body onload="nt3d.framework(box_by_extrude, params)">