Constructor
new PlaneGeometry(widthopt, heightopt, widthSegmentsopt, heightSegmentsopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width | Number | <optional> | 1 | — Width along the X axis. |
height | Number | <optional> | 1 | — Height along the Y axis. |
widthSegments | Number | <optional> | 1 | |
heightSegments | Number | <optional> | 1 |
Extends
Members
attributes :Object
This hashmap has as id the name of the attribute to be set and as value the buffer to set it to. Rather than accessing this property directly, use t3d.Geometry#addAttribute and t3d.Geometry#getAttribute to access attributes of this geometry.
Type:
- Object
- Overrides
boundingBox :t3d.Box3
Bounding box for the bufferGeometry, which can be calculated with t3d.Geometry#computeBoundingBox.
Type:
- Overrides
- Default Value
- t3d.Box3()
boundingSphere :t3d.Sphere
Bounding sphere for the bufferGeometry, which can be calculated with t3d.Geometry#computeBoundingSphere.
Type:
- Overrides
- Default Value
- t3d.Sphere()
groups :Array
Split the geometry into groups, each of which will be rendered in a separate WebGL draw call. This allows an array of materials to be used with the geometry. Each group is an object of the form: { start: Integer, count: Integer, materialIndex: Integer }, or { multiDrawStarts: Integer[], multiDrawCounts: Integer[], multiDrawCount: Integer, materialIndex: Integer } if multiDraw is available.
Type:
- Array
- Overrides
- Default Value
- []
(readonly) id :Number
Unique number for this geometry instance.
Type:
- Number
- Overrides
index :t3d.Attribute|Null
Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles" and each triangle is associated with the indices of three vertices. This attribute therefore stores the index of each vertex for each triangular face. If this attribute is not set, the renderer assumes that each three contiguous positions represent a single triangle.
Type:
- t3d.
Attribute |Null
- Overrides
instanceCount :Number
The number of instances to be rendered. If set to -1 (default), instanced rendering is disabled. This property is used for instanced rendering, where multiple copies of the geometry are drawn with a single draw call.
Type:
- Number
- Overrides
- Default Value
- -1
morphAttributes :Object
Hashmap of Attributes Array for morph targets.
Type:
- Object
- Overrides
(readonly) uuid :String
UUID of this geometry instance. This gets automatically assigned, so this shouldn't be edited.
Type:
- String
- Overrides
version :Number
A version number, incremented every time the attribute object or index object changes to mark VAO drity.
Type:
- Number
- Overrides
- Default Value
- 0
Methods
addAttribute(name, attribute)
Adds an attribute to this geometry. Use this rather than the attributes property.
Parameters:
Name | Type | Description |
---|---|---|
name | String | |
attribute | t3d. |
- Overrides
addEventListener(type, listener, thisObjectopt)
Adds a listener to an event type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type | String | The type of event to listen to. | ||
listener | function | The function that gets called when the event is fired. | ||
thisObject | Object | <optional> | this | The Object of calling listener method. |
- Overrides
addGroup(start, count, materialIndexopt)
Adds a group to this geometry; see the t3d.Geometry#groups for details.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
start | Number | |||
count | Number | |||
materialIndex | Number | <optional> | 0 |
- Overrides
clearGroups()
Clears all groups.
- Overrides
clone() → {t3d.Geometry}
Creates a clone of this Geometry.
- Overrides
Returns:
- Type:
- t3d.
Geometry
computeBoundingBox()
Computes bounding box of the geometry, updating t3d.Geometry#boundingBox. Bounding boxes aren't computed by default. They need to be explicitly computed.
- Overrides
computeBoundingSphere()
Computes bounding sphere of the geometry, updating t3d.Geometry#boundingSphere. Bounding spheres aren't computed by default. They need to be explicitly computed.
- Overrides
copy(source) → {t3d.Geometry}
Copies another Geometry to this Geometry.
Parameters:
Name | Type | Description |
---|---|---|
source | t3d. | The geometry to be copied. |
- Overrides
Returns:
- Type:
- t3d.
Geometry
dispatchEvent(event)
Fire an event.
Parameters:
Name | Type | Description |
---|---|---|
event | Object | The event that gets fired. |
- Overrides
dispose()
Disposes the object from memory. You need to call this when you want the BufferGeometry removed while the application is running.
- Overrides
getAttribute(name) → {t3d.Attribute}
Returns the attribute with the specified name.
Parameters:
Name | Type | Description |
---|---|---|
name | String |
- Overrides
Returns:
- Type:
- t3d.
Attribute
removeAttribute(name)
Removes the attribute with the specified name.
Parameters:
Name | Type | Description |
---|---|---|
name | String |
- Overrides
removeEventListener(type, listener, thisObjectopt)
Removes a listener from an event type.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type | String | The type of the listener that gets removed. | ||
listener | function | The listener function that gets removed. | ||
thisObject | Object | <optional> | this | thisObject - The Object of calling listener method. |
- Overrides
setIndex(index)
Set the t3d.Geometry#index buffer.
Parameters:
Name | Type | Description |
---|---|---|
index | Array | |
- Overrides