1 | import { BufferGeometry } from "../core/BufferGeometry.js";
|
2 |
|
3 | /**
|
4 | * A class for generating plane geometries.
|
5 | * @example
|
6 | * ```typescript
|
7 | * const geometry = new THREE.PlaneGeometry(1, 1);
|
8 | * const material = new THREE.MeshBasicMaterial({
|
9 | * color: 0xffff00,
|
10 | * side: THREE.DoubleSide
|
11 | * });
|
12 | * const plane = new THREE.Mesh(geometry, material);
|
13 | * scene.add(plane);
|
14 | * ```
|
15 | * @see {@link https://threejs.org/docs/index.html#api/en/geometries/PlaneGeometry | Official Documentation}
|
16 | * @see {@link https://github.com/mrdoob/three.js/blob/master/src/geometries/PlaneGeometry.js | Source}
|
17 | */
|
18 | export class PlaneGeometry extends BufferGeometry {
|
19 | /**
|
20 | * Create a new instance of {@link PlaneGeometry}
|
21 | * @param width Width along the X axis. Expects a `Float`. Default `1`
|
22 | * @param height Height along the Y axis. Expects a `Float`. Default `1`
|
23 | * @param widthSegments Number of segmented faces along the width of the sides. Expects a `Integer`. Default `1`
|
24 | * @param heightSegments Number of segmented faces along the height of the sides. Expects a `Integer`. Default `1`
|
25 | */
|
26 | constructor(width?: number, height?: number, widthSegments?: number, heightSegments?: number);
|
27 |
|
28 | /**
|
29 | * A Read-only _string_ to check if `this` object type.
|
30 | * @remarks Sub-classes will update this value.
|
31 | * @defaultValue `PlaneGeometry`
|
32 | */
|
33 | override readonly type: string | "PlaneGeometry";
|
34 |
|
35 | /**
|
36 | * An object with a property for each of the constructor parameters.
|
37 | * @remarks Any modification after instantiation does not change the geometry.
|
38 | */
|
39 | readonly parameters: {
|
40 | readonly width: number;
|
41 | readonly height: number;
|
42 | readonly widthSegments: number;
|
43 | readonly heightSegments: number;
|
44 | };
|
45 |
|
46 | /** @internal */
|
47 | static fromJSON(data: {}): PlaneGeometry;
|
48 | }
|