mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
1.5 KiB
1.5 KiB
Plane
Creates a plane. Inherits methods from Model.
Usage
Create a white XZ plane.
import {Plane} from '@luma.gl/core';
const whitePlane = new Plane(gl, {
type: 'x,z',
xlen: 10,
zlen: 20,
nx: 5,
nz: 5,
offset: 0,
colors: [1, 1, 1, 1]
});
Inheritance
Plane extends ModelNode extends ScenegraphNode
Methods
constructor(gl : WebGLRenderingContext, props : Object)
The constructor for the Plane class. Use this to create a new Plane.
props.type- (string) Whether is a XY, YZ or XZ plane. Possible values arex,y,x,z,y,z.props.xlen- (number) The length along the x-axis. Only used inx,zorx,yplanes.props.ylen- (number) The length along the y-axis. Only used iny,zorx,yplanes.props.zlen- (number) The length along the z-axis. Only used inx,zory,zplanes.props.nx- (number) The number of subdivisions along the x-axis. Only used inx,zorx,yplanes.props.ny- (number) The number of subdivisions along the y-axis. Only used iny,zorx,yplanes.props.nz- (number) The number of subdivisions along the z-axis. Only used inx,zory,zplanes.props.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.