Set the alpha value of this Face.
Each vertex is given the same value. If you need to adjust the alpha on a per-vertex basis
then use the Vertex.alpha property instead.
When getting the alpha of this Face, it will return an average of the alpha component of all three vertices.
The bounds of this Face.
Be sure to call the Face.updateBounds method before using this property.
ReadonlydepthThe depth of this Face, which is an average of the z component of all three vertices.
The depth is calculated based on the transformed z value, not the local one.
The first vertex in this Face.
The second vertex in this Face.
The third vertex in this Face.
The x coordinate of this Face, based on the in center position of the Face.
The y coordinate of this Face, based on the in center position of the Face.
Checks if the given coordinates are within this Face.
You can optionally provide a transform matrix. If given, the Face vertices will be transformed first, before being checked against the coordinates.
The horizontal position to check.
The vertical position to check.
OptionalcalcMatrix: TransformMatrixOptional transform matrix to apply to the vertices before comparison.
Destroys this Face and nulls the references to the vertices.
Checks if the vertices in this Face are orientated counter-clockwise, or not.
It checks the transformed position of the vertices, not the local one.
The z-axis value to test against. Typically the Mesh.modelPosition.z.
Checks if this Face is within the view of the given Camera.
This method is called in the MeshWebGLRenderer function. It performs the following tasks:
First, the Vertex.update method is called on each of the vertices. This populates them
with the new translated values, updating their tx, ty and ta properties.
Then it tests to see if this face is visible due to the alpha values, if not, it returns.
After this, if hideCCW is set, it calls isCounterClockwise and returns if not.
Finally, it will update the Face.bounds based on the newly translated vertex values
and return the results of an intersection test between the bounds and the camera world view
rectangle.
The Camera to check against.
Test the counter-clockwise orientation of the verts?
The Cameras z position, used in the CCW test.
The alpha of the parent object.
The parent transform matrix data a component.
The parent transform matrix data b component.
The parent transform matrix data c component.
The parent transform matrix data d component.
The parent transform matrix data e component.
The parent transform matrix data f component.
Round the vertex position or not?
Loads the data from this Vertex into the given Typed Arrays.
A Float32 Array to insert the position, UV and unit data in to.
A Uint32 Array to insert the color and alpha data in to.
The index of the array to insert this Vertex to.
The texture unit currently in use.
The tint effect to use.
Scales the original UV values of each vertex by the given amounts.
The original properties Vertex.u and Vertex.v
remain unchanged, only the translated properties
Vertex.tu and Vertex.tv, as used in rendering,
are updated.
The amount to scale the UV u coordinate by.
The amount to scale the UV v coordinate by.
Translates the original UV positions of each vertex by the given amounts.
The original properties Vertex.u and Vertex.v
remain unchanged, only the translated properties
Vertex.tu and Vertex.tv, as used in rendering,
are updated.
The amount to scroll the UV u coordinate by.
The amount to scroll the UV v coordinate by.
Sets the color value for each Vertex in this Face.
The color value for each vertex.
Translates the vertices of this Face by the given amounts.
The actual vertex positions are adjusted, not their transformed position.
Therefore, this updates the vertex data directly.
The amount to horizontally translate by.
Optionaly: numberThe amount to vertically translate by. Default 0.
Calls the Vertex.update method on each of the vertices. This populates them
with the new translated values, updating their tx, ty and ta properties.
The alpha of the parent object.
The parent transform matrix data a component.
The parent transform matrix data b component.
The parent transform matrix data c component.
The parent transform matrix data d component.
The parent transform matrix data e component.
The parent transform matrix data f component.
Round the vertex position or not?
Updates the bounds of this Face, based on the translated values of the vertices.
Call this method prior to accessing the Face.bounds property.
A Face Geometry Object.
A Face is used by the Mesh Game Object. A Mesh consists of one, or more, faces that are used to render the Mesh Game Objects in WebGL.
A Face consists of 3 Vertex instances, for the 3 corners of the face and methods to help you modify and test them.