1 | <!DOCTYPE html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <meta charset="utf-8" />
|
---|
5 | <script src="../../list.js"></script>
|
---|
6 | <script src="../../page.js"></script>
|
---|
7 | <link type="text/css" rel="stylesheet" href="../../page.css" />
|
---|
8 | </head>
|
---|
9 | <body>
|
---|
10 | <h1>[name]</h1>
|
---|
11 |
|
---|
12 | <div class="desc">
|
---|
13 | This is a superefficent class for geometries because it saves all data in buffers. <br />
|
---|
14 | It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations.<br />
|
---|
15 | It is mainly interesting when working with static objects.
|
---|
16 | </div>
|
---|
17 |
|
---|
18 |
|
---|
19 | <h2>Constructor</h2>
|
---|
20 |
|
---|
21 |
|
---|
22 | <h3>[name]()</h3>
|
---|
23 | <div>
|
---|
24 | This creates a new [name]. It also sets several properties to an default value.
|
---|
25 | </div>
|
---|
26 |
|
---|
27 |
|
---|
28 | <h2>Properties</h2>
|
---|
29 |
|
---|
30 | <h3>.[page:Integer id]</h3>
|
---|
31 | <div>
|
---|
32 | Unique number of this buffergeometry instance
|
---|
33 | </div>
|
---|
34 |
|
---|
35 | <h3>.[page:Hashmap attributes]</h3>
|
---|
36 | <div>
|
---|
37 | This hashmap has as id the name of the attribute to be set and as value the buffer to set it to.
|
---|
38 | </div>
|
---|
39 |
|
---|
40 | <h3>.[page:Boolean dynamic]</h3>
|
---|
41 | <div>
|
---|
42 | When set, it holds certain buffers in memory to have faster updates for this object. When unset, it deletes those buffers and saves memory.
|
---|
43 | </div>
|
---|
44 |
|
---|
45 | <h3>.[page:Array offsets]</h3>
|
---|
46 | <div>
|
---|
47 | This Array should contain every offset at which the buffers should be rendered. This is important for indexed buffers.
|
---|
48 | </div>
|
---|
49 |
|
---|
50 | <h3>.[page:Object boundingBox]</h3>
|
---|
51 | <div>
|
---|
52 | Bounding box.
|
---|
53 | <code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
|
---|
54 | </div>
|
---|
55 |
|
---|
56 | <h3>.[page:Object boundingSphere]</h3>
|
---|
57 | <div>
|
---|
58 | Bounding sphere.
|
---|
59 | <code>{ radius: float }</code>
|
---|
60 | </div>
|
---|
61 |
|
---|
62 | <h3>.[page:Array morphTargets]</h3>
|
---|
63 | <div>
|
---|
64 | Array of morph targets. Each morph target is a Javascript object:
|
---|
65 | <code>{ name: "targetName", vertices: [ new THREE.Vertex(), ... ] }</code>
|
---|
66 | Morph vertices match number and order of primary vertices.
|
---|
67 | </div>
|
---|
68 |
|
---|
69 | <h3>.[page:boolean hasTangents]</h3>
|
---|
70 | <div>
|
---|
71 | todo
|
---|
72 | </div>
|
---|
73 |
|
---|
74 | <h2>Methods</h2>
|
---|
75 |
|
---|
76 | <h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
---|
77 |
|
---|
78 | <h3>.applyMatrix( [page:Matrix4 matrix] )</h3>
|
---|
79 | <div>
|
---|
80 | Bakes matrix transform directly into vertex coordinates.
|
---|
81 | </div>
|
---|
82 |
|
---|
83 | <h3>.computeVertexNormals()</h3>
|
---|
84 | <div>
|
---|
85 | Computes vertex normals by averaging face normals.<br />
|
---|
86 | </div>
|
---|
87 |
|
---|
88 | <h3>.computeTangents()</h3>
|
---|
89 | <div>
|
---|
90 | Computes vertex tangents.<br />
|
---|
91 | Based on [link:http://www.terathon.com/code/tangent.html]<br />
|
---|
92 | Geometry must have vertex [page:UV UVs] (layer 0 will be used).
|
---|
93 | </div>
|
---|
94 |
|
---|
95 | <h3>.computeBoundingBox()</h3>
|
---|
96 | <div>
|
---|
97 | Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.<br />
|
---|
98 | Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
|
---|
99 | </div>
|
---|
100 |
|
---|
101 | <h3>.computeBoundingSphere()</h3>
|
---|
102 | <div>
|
---|
103 | Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.<br />
|
---|
104 | Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are *null*.
|
---|
105 | </div>
|
---|
106 |
|
---|
107 | <h3>.dispose()</h3>
|
---|
108 | <div>
|
---|
109 | Disposes the object from memory. <br />
|
---|
110 | You need to call this when you want the bufferGeometry removed while the application is running.
|
---|
111 | </div>
|
---|
112 |
|
---|
113 | <h3>.normalizeNormals() [page:todo]</h3>
|
---|
114 | <div>
|
---|
115 | todo
|
---|
116 | </div>
|
---|
117 |
|
---|
118 | <h2>Source</h2>
|
---|
119 |
|
---|
120 | [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
---|
121 | </body>
|
---|
122 | </html>
|
---|