Advanced
Options to be applied to MeshPlane
Constructor options used for PerspectivePlaneGeometry
instances.
The height of the plane
Optional
verticesX?: numberNumber of vertices on x-axis
Optional
verticesY?: numberNumber of vertices on y-axis
The width of the plane
Readonly
attributesA record of the attributes of the geometry.
Readonly
buffersThe buffers that the attributes use
The corner points of the quad you can modify these directly, if you do make sure to call updateProjection
The height of plane
The index buffer of the geometry
the instance count of the geometry to draw
The topology of the geometry.
Readonly
uidThe unique id of the geometry.
The number of vertices on x-axis
The number of vertices on y-axis
The width of plane
Static
defaultReturns the bounds of the geometry.
The indices of the mesh.
The positions of the mesh.
Set the positions of the mesh. When setting the positions, its important that the uvs array is at least as long as the positions array. otherwise the geometry will not be valid.
The positions of the mesh.
The UVs of the mesh.
Set the UVs of the mesh. Its important that the uvs array you set is at least as long as the positions array. otherwise the geometry will not be valid.
The UVs of the mesh.
Adds an attribute to the geometry.
The name of the attribute to add.
The attribute option to add.
Adds an index buffer to the geometry.
The index buffer to add. Can be a Buffer, TypedArray, or an array of numbers.
Refreshes plane coordinates
Options to be applied to plane geometry
destroys the geometry.
destroy the buffers associated with this geometry
Returns the requested attribute.
The name of the attribute required
Returns the requested buffer.
The name of the buffer required.
Used to figure out how many vertices there are in this geometry
the number of vertices in the geometry
Will set the corners of the quad to the given coordinates Calculating the perspective so it looks correct!
x coordinate of the first corner
y coordinate of the first corner
x coordinate of the second corner
y coordinate of the second corner
x coordinate of the third corner
y coordinate of the third corner
x coordinate of the fourth corner
y coordinate of the fourth corner
Update the projection matrix based on the corners
A PerspectivePlaneGeometry allows you to draw a 2d plane with perspective. Where ever you move the corners the texture will be projected to look like it is in 3d space. Great for mapping a 2D mesh into a 3D scene.
IMPORTANT: This is not a full 3D mesh, it is a 2D mesh with a perspective projection applied to it :)
See
PerspectivePlaneGeometry