OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / docs / api / geometries / ParametricBufferGeometry.html
1 <!DOCTYPE html>
2 <html lang="en">
3         <head>
4                 <meta charset="utf-8" />
5                 <base href="../../" />
6                 <script src="list.js"></script>
7                 <script src="page.js"></script>
8                 <link type="text/css" rel="stylesheet" href="page.css" />
9         </head>
10         <body>
11                 [page:BufferGeometry] &rarr;
12
13                 <h1>[name]</h1>
14
15                 <div class="desc">Generate geometry representing a parametric surface.</div>
16
17                 <iframe id="scene" src="scenes/geometry-browser.html#ParametricBufferGeometry"></iframe>
18
19                 <script>
20
21                 // iOS iframe auto-resize workaround
22
23                 if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
24
25                         var scene = document.getElementById( 'scene' );
26
27                         scene.style.width = getComputedStyle( scene ).width;
28                         scene.style.height = getComputedStyle( scene ).height;
29                         scene.setAttribute( 'scrolling', 'no' );
30
31                 }
32
33                 </script>
34
35                 <h2>Example</h2>
36
37                 <code>
38                 var geometry = new THREE.ParametricBufferGeometry( THREE.ParametricGeometries.klein, 25, 25 );
39                 var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
40                 var cube = new THREE.Mesh( geometry, material );
41                 scene.add( cube );
42                 </code>
43
44
45                 <h2>Constructor</h2>
46
47
48                 <h3>[name]([page:Function func], [page:Integer slices], [page:Integer stacks])</h3>
49                 <div>
50                 func — A function that takes in a [page:Float u] and [page:Float v] value each between 0 and 1 and returns a [page:Vector3]<br />
51                 slices — The count of slices to use for the parametric function <br />
52                 stacks — The count of stacks to use for the parametric function
53                 </div>
54
55
56                 <h2>Source</h2>
57
58                 [link:https://github.com/mrdoob/three.js/blob/master/src/geometries/ParametricGeometry.js src/geometries/ParametricGeometry.js]
59         </body>
60 </html>