Name | Type | Description |
---|---|---|
options |
PerspectivePlaneOptions |
Options to be applied to PerspectiveMesh |
- See:
Example
```js
const meshPlane = new PerspectiveMesh({
texture: Texture.from('snake.png'),
verticesX: 20,
verticesY: 20,
x0: 0,
y0: 0,
x1: 100,
y1: 0,
x2: 100,
y2: 100,
x3: 0,
y3: 100
});
Members
defaultOptions PerspectivePlaneOptions static
default options for the mesh
texture Texture
The texture that the mesh uses
Methods
Set the corners of the quad to the given coordinates The mesh will then calculate the perspective so it looks correct!
Name | Type | Description |
---|---|---|
x0 |
number |
x coordinate of the first corner |
y0 |
number |
y coordinate of the first corner |
x1 |
number |
x coordinate of the second corner |
y1 |
number |
y coordinate of the second corner |
x2 |
number |
x coordinate of the third corner |
y2 |
number |
y coordinate of the third corner |
x3 |
number |
x coordinate of the fourth corner |
y3 |
number |
y coordinate of the fourth corner |
Update the geometry when the texture is updated