]> git.scottworley.com Git - nt3d/blob - box_by_extrude.html
e8183f2ccf59632f570f4ec999f00a44e7eab787
[nt3d] / box_by_extrude.html
1 <html>
2 <head>
3 <title>Box by extrude</title>
4 <script type="text/javascript" src="nt3d.js"></script>
5 <script type="text/javascript">
6 function box_by_extrude(size_as_string) {
7 var size = parseFloat(size_as_string);
8 var origin = [0, 0 ];
9 var x = [size, 0 ];
10 var y = [0, size];
11 var xy = [size, size];
12 return nt3d.extrude([origin, x, xy, y],
13 [[0, 0, 0], [0, 0, 1]],
14 [[0, 0, 1], [0, 0, 1]],
15 [[1, 0, 0], [1, 0, 0]]);
16 }
17 var params = [["Size", 1]];
18 </script>
19 </head>
20 <body onload="nt3d.framework(box_by_extrude, params)">
21 <h1>Box by extrude</h1>
22 <p>Make a box by extruding a square.</p>
23 </body>
24 </html>