|
@@ -41,24 +41,24 @@
|
|
|
|
|
|
<h2>Properties</h2>
|
|
<h2>Properties</h2>
|
|
|
|
|
|
- <h3>.[page:Integer id]</h3>
|
|
|
|
|
|
+ <h3>[property:Integer id]</h3>
|
|
<div>
|
|
<div>
|
|
- Unique number of this geometry instance
|
|
|
|
|
|
+ Unique number for this geometry instance.
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <h3>.[page:String name]</h3>
|
|
|
|
|
|
+
|
|
|
|
+ <h3>[property:String name]</h3>
|
|
<div>
|
|
<div>
|
|
Name for this geometry. Default is an empty string.
|
|
Name for this geometry. Default is an empty string.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array vertices]</h3>
|
|
|
|
|
|
+ <h3>[property:Array vertices]</h3>
|
|
<div>
|
|
<div>
|
|
Array of [page:Vector3 vertices].<br />
|
|
Array of [page:Vector3 vertices].<br />
|
|
The array of vertices holds every position of points in the model.<br />
|
|
The array of vertices holds every position of points in the model.<br />
|
|
To signal an update in this array, [page:Geometry Geometry.verticesNeedUpdate] needs to be set to true.
|
|
To signal an update in this array, [page:Geometry Geometry.verticesNeedUpdate] needs to be set to true.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array colors]</h3>
|
|
|
|
|
|
+ <h3>[property:Array colors]</h3>
|
|
<div>
|
|
<div>
|
|
Array of vertex [page:Color colors], matching number and order of vertices.<br />
|
|
Array of vertex [page:Color colors], matching number and order of vertices.<br />
|
|
Used in [page:PointCloud] and [page:Line].<br />
|
|
Used in [page:PointCloud] and [page:Line].<br />
|
|
@@ -66,115 +66,110 @@
|
|
To signal an update in this array, [page:Geometry Geometry.colorsNeedUpdate] needs to be set to true.
|
|
To signal an update in this array, [page:Geometry Geometry.colorsNeedUpdate] needs to be set to true.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array faces]</h3>
|
|
|
|
|
|
+ <h3>[property:Array faces]</h3>
|
|
<div>
|
|
<div>
|
|
Array of [page:Face3 triangles].<br />
|
|
Array of [page:Face3 triangles].<br />
|
|
The array of faces describe how each vertex in the model is connected with each other.<br />
|
|
The array of faces describe how each vertex in the model is connected with each other.<br />
|
|
To signal an update in this array, [page:Geometry Geometry.elementsNeedUpdate] needs to be set to true.
|
|
To signal an update in this array, [page:Geometry Geometry.elementsNeedUpdate] needs to be set to true.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array faceVertexUvs]</h3>
|
|
|
|
|
|
+ <h3>[property:Array faceVertexUvs]</h3>
|
|
<div>
|
|
<div>
|
|
Array of face [page:UV] layers.<br />
|
|
Array of face [page:UV] layers.<br />
|
|
Each UV layer is an array of [page:UV]s matching the order and number of vertices in faces.<br />
|
|
Each UV layer is an array of [page:UV]s matching the order and number of vertices in faces.<br />
|
|
To signal an update in this array, [page:Geometry Geometry.uvsNeedUpdate] needs to be set to true.
|
|
To signal an update in this array, [page:Geometry Geometry.uvsNeedUpdate] needs to be set to true.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array morphTargets]</h3>
|
|
|
|
|
|
+ <h3>[property:Array morphTargets]</h3>
|
|
<div>
|
|
<div>
|
|
Array of morph targets. Each morph target is a Javascript object:
|
|
Array of morph targets. Each morph target is a Javascript object:
|
|
<code>{ name: "targetName", vertices: [ new THREE.Vector3(), ... ] }</code>
|
|
<code>{ name: "targetName", vertices: [ new THREE.Vector3(), ... ] }</code>
|
|
Morph vertices match number and order of primary vertices.
|
|
Morph vertices match number and order of primary vertices.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array morphColors]</h3>
|
|
|
|
|
|
+ <h3>[property:Array morphColors]</h3>
|
|
<div>
|
|
<div>
|
|
Array of morph colors. Morph colors have similar structure as morph targets, each color set is a Javascript object:
|
|
Array of morph colors. Morph colors have similar structure as morph targets, each color set is a Javascript object:
|
|
<code>morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }</code>
|
|
<code>morphColor = { name: "colorName", colors: [ new THREE.Color(), ... ] }</code>
|
|
Morph colors can match either the number and order of faces (face colors) or the number of vertices (vertex colors).
|
|
Morph colors can match either the number and order of faces (face colors) or the number of vertices (vertex colors).
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array morphNormals]</h3>
|
|
|
|
|
|
+ <h3>[property:Array morphNormals]</h3>
|
|
<div>
|
|
<div>
|
|
Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object:
|
|
Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object:
|
|
<code>morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] }</code>
|
|
<code>morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] }</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array skinWeights]</h3>
|
|
|
|
|
|
+ <h3>[property:Array skinWeights]</h3>
|
|
<div>
|
|
<div>
|
|
Array of skinning weights, matching number and order of vertices.
|
|
Array of skinning weights, matching number and order of vertices.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Array skinIndices]</h3>
|
|
|
|
|
|
+ <h3>[property:Array skinIndices]</h3>
|
|
<div>
|
|
<div>
|
|
Array of skinning indices, matching number and order of vertices.
|
|
Array of skinning indices, matching number and order of vertices.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Object boundingBox]</h3>
|
|
|
|
|
|
+ <h3>[property:Object boundingBox]</h3>
|
|
<div>
|
|
<div>
|
|
Bounding box.
|
|
Bounding box.
|
|
<code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
|
|
<code>{ min: new THREE.Vector3(), max: new THREE.Vector3() }</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Object boundingSphere]</h3>
|
|
|
|
|
|
+ <h3>[property:Object boundingSphere]</h3>
|
|
<div>
|
|
<div>
|
|
Bounding sphere.
|
|
Bounding sphere.
|
|
<code>{ radius: float }</code>
|
|
<code>{ radius: float }</code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean hasTangents]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean hasTangents]</h3>
|
|
<div>
|
|
<div>
|
|
True if geometry has tangents. Set in [page:Geometry Geometry.computeTangents].
|
|
True if geometry has tangents. Set in [page:Geometry Geometry.computeTangents].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean dynamic]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean dynamic]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if attribute buffers will need to change in runtime (using "dirty" flags).<br/>
|
|
Set to *true* if attribute buffers will need to change in runtime (using "dirty" flags).<br/>
|
|
Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.<br/>
|
|
Unless set to true internal typed arrays corresponding to buffers will be deleted once sent to GPU.<br/>
|
|
Defaults to true.
|
|
Defaults to true.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean verticesNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean verticesNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the vertices array has been updated.
|
|
Set to *true* if the vertices array has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean elementsNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean elementsNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the faces array has been updated.
|
|
Set to *true* if the faces array has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean uvsNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean uvsNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the uvs array has been updated.
|
|
Set to *true* if the uvs array has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean normalsNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean normalsNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the normals array has been updated.
|
|
Set to *true* if the normals array has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean tangentsNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean tangentsNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the tangents in the faces has been updated.
|
|
Set to *true* if the tangents in the faces has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean colorsNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean colorsNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the colors array has been updated.
|
|
Set to *true* if the colors array has been updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.[page:Boolean lineDistancesNeedUpdate]</h3>
|
|
|
|
|
|
+ <h3>[property:Boolean lineDistancesNeedUpdate]</h3>
|
|
<div>
|
|
<div>
|
|
Set to *true* if the linedistances array has been updated.
|
|
Set to *true* if the linedistances array has been updated.
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <h3>.[page:Boolean buffersNeedUpdate]</h3>
|
|
|
|
- <div>
|
|
|
|
- Set to *true* if an array has changed in length.
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
- <h3>.[page:array lineDistances]</h3>
|
|
|
|
|
|
+ <h3>[property:array lineDistances]</h3>
|
|
<div>
|
|
<div>
|
|
An array containing distances between vertices for Line geometries.
|
|
An array containing distances between vertices for Line geometries.
|
|
This is required for LinePieces/LineDashedMaterial to render correctly.
|
|
This is required for LinePieces/LineDashedMaterial to render correctly.
|
|
@@ -185,70 +180,67 @@
|
|
|
|
|
|
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
|
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
|
|
|
|
|
|
- <h3>.applyMatrix( [page:Matrix4 matrix] )</h3>
|
|
|
|
|
|
+ <h3>[method:null applyMatrix]( [page:Matrix4 matrix] )</h3>
|
|
<div>
|
|
<div>
|
|
Bakes matrix transform directly into vertex coordinates.
|
|
Bakes matrix transform directly into vertex coordinates.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeFaceNormals()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeFaceNormals]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes face normals.
|
|
Computes face normals.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeVertexNormals()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeVertexNormals]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes vertex normals by averaging face normals.<br />
|
|
Computes vertex normals by averaging face normals.<br />
|
|
Face normals must be existing / computed beforehand.
|
|
Face normals must be existing / computed beforehand.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeMorphNormals()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeMorphNormals]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes morph normals.
|
|
Computes morph normals.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeTangents()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeTangents]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes vertex tangents.<br />
|
|
Computes vertex tangents.<br />
|
|
Based on [link:http://www.terathon.com/code/tangent.html]<br />
|
|
Based on [link:http://www.terathon.com/code/tangent.html]<br />
|
|
Geometry must have vertex [page:UV UVs] (layer 0 will be used).
|
|
Geometry must have vertex [page:UV UVs] (layer 0 will be used).
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeBoundingBox()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeBoundingBox]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.
|
|
Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeBoundingSphere()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeBoundingSphere]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.
|
|
Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div>Neither bounding boxes or bounding spheres are computed by default. They need to be explicitly computed, otherwise they are *null*.</div>
|
|
<div>Neither bounding boxes or bounding spheres are computed by default. They need to be explicitly computed, otherwise they are *null*.</div>
|
|
|
|
|
|
- <h3>.merge( [page:Geometry geometry], [page:Matrix4 matrix], [page:Integer materialIndexOffset] )</h3>
|
|
|
|
|
|
+ <h3>[method:null merge]( [page:Geometry geometry], [page:Matrix4 matrix], [page:Integer materialIndexOffset] )</h3>
|
|
<div>Merge two geometries or geometry and geometry from object (using object's transform)</div>
|
|
<div>Merge two geometries or geometry and geometry from object (using object's transform)</div>
|
|
|
|
|
|
- <h3>.mergeVertices()</h3>
|
|
|
|
|
|
+ <h3>[method:null mergeVertices]()</h3>
|
|
<div>
|
|
<div>
|
|
Checks for duplicate vertices using hashmap.<br />
|
|
Checks for duplicate vertices using hashmap.<br />
|
|
Duplicated vertices are removed and faces' vertices are updated.
|
|
Duplicated vertices are removed and faces' vertices are updated.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeGroups()</h3>
|
|
|
|
- <div>Geometry splitting</div>
|
|
|
|
-
|
|
|
|
- <h3>.clone()</h3>
|
|
|
|
|
|
+ <h3>[method:Geometry clone]()</h3>
|
|
<div>
|
|
<div>
|
|
Creates a new clone of the Geometry.
|
|
Creates a new clone of the Geometry.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.dispose()</h3>
|
|
|
|
|
|
+ <h3>[method:null dispose]()</h3>
|
|
<div>
|
|
<div>
|
|
Removes The object from memory. <br />
|
|
Removes The object from memory. <br />
|
|
Don't forget to call this method when you remove a geometry because it can cause memory leaks.
|
|
Don't forget to call this method when you remove a geometry because it can cause memory leaks.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.computeLineDistances()</h3>
|
|
|
|
|
|
+ <h3>[method:null computeLineDistances]()</h3>
|
|
<div>
|
|
<div>
|
|
Compute distances between vertices for Line geometries.
|
|
Compute distances between vertices for Line geometries.
|
|
</div>
|
|
</div>
|