]> git.scottworley.com Git - nt3d/blame_incremental - box_by_faces.html
Name z
[nt3d] / box_by_faces.html
... / ...
CommitLineData
1<html>
2 <head>
3 <title>Box by faces</title>
4 <script type="text/javascript" src="nt3d.js"></script>
5 <script type="text/javascript">
6 function box_by_faces(params) {
7 var origin = [0, 0, 0 ];
8 var x = [params.size, 0, 0 ];
9 var y = [0, params.size, 0 ];
10 var z = [0, 0, params.size];
11 var xy = [params.size, params.size, 0 ];
12 var xz = [params.size, 0, params.size];
13 var yz = [0, params.size, params.size];
14 var xyz = [params.size, params.size, params.size];
15 return [].concat(
16 nt3d.quad(origin, y, xy, x), // bottom (near xy face)
17 nt3d.quad(origin, x, xz, z), // near xz face
18 nt3d.quad(origin, z, yz, y), // near yz face
19 nt3d.quad(y, yz, xyz, xy), // far xz face
20 nt3d.quad(x, xy, xyz, xz), // far yz face
21 nt3d.quad(z, xz, xyz, yz)); // top (far xy face)
22 }
23 var params = [["size", 1]];
24 </script>
25 </head>
26 <body onload="nt3d.framework(box_by_faces, params)">
27 <h1>Box by faces</h1>
28 <p>Make a box by the most straightforward method: specify the six faces.</p>
29 </body>
30</html>