mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
* Docs: Fix hyperlinks * Update website link generation * Replace website links with actual file path
1.2 KiB
1.2 KiB
Plane
Creates a plane. Inherits methods from Model.
Usage
Create a white XZ plane.
var whitePlane = new Plane(gl, {
type: 'x,z',
xlen: 10,
zlen: 20,
nx: 5,
nz: 5,
offset: 0,
colors: [1, 1, 1, 1]
});
Method
constructor
The constructor for the Plane class. Use this to create a new Plane.
var model = new Plane(gl, options);
- type - (string) Whether is a XY, YZ or XZ plane. Possible values are
x,y,x,z,y,z. - xlen - (number) The length along the x-axis. Only used in
x,zorx,yplanes. - ylen - (number) The length along the y-axis. Only used in
y,zorx,yplanes. - zlen - (number) The length along the z-axis. Only used in
x,zory,zplanes. - nx - (number) The number of subdivisions along the x-axis. Only used in
x,zorx,yplanes. - ny - (number) The number of subdivisions along the y-axis. Only used in
y,zorx,yplanes. - nz - (number) The number of subdivisions along the z-axis. Only used in
x,zory,zplanes. - offset - (number) For XZ planes, the offset along the y-axis. For XY planes, the offset along the z-axis. For YZ planes, the offset along the x-axis.