export type PlaneShapeArgs = { /** * - The size of the plane */ size?: number; /** * - The gap between the plane and the center */ gap?: number; /** * - The opacity of the fill, as a factor of the shape color alpha */ opacity?: number; /** * - The thickness of the outline, in the units of the gizmo */ outlineThickness?: number; }; /** * @typedef {object} PlaneShapeArgs * @property {number} [size] - The size of the plane * @property {number} [gap] - The gap between the plane and the center * @property {number} [opacity] - The opacity of the fill, as a factor of the shape color alpha * @property {number} [outlineThickness] - The thickness of the outline, in the units of the gizmo */ /** * @ignore */ export class PlaneShape extends Shape { /** * Create a new PlaneShape. * * @param {GraphicsDevice} device - The graphics device. * @param {ShapeArgs & PlaneShapeArgs} args - The shape options. */ constructor(device: GraphicsDevice, args?: ShapeArgs & PlaneShapeArgs); /** * The size. * * @private */ private _size; /** * The gap between the plane and the center. * * @private */ private _gap; /** * The flipped state. * * @private */ private _flipped; /** * The opacity of the fill, as a factor of the shape color alpha. * * @private */ private _opacity; /** * The thickness of the outline, in the units of the gizmo. * * @private */ private _outlineThickness; /** * The material of the outline, which keeps the full shape color. * * @type {ShaderMaterial} * @private */ private _outlineMaterial; /** * The outline edges on the two outer sides, clear of the axes. * * @type {Entity[]} * @private */ private _outlines; /** * The mesh instances of the outline. * * @type {MeshInstance[]} * @private */ private _outlineMeshInstances; /** * Uniform storage for the outline color. * * @type {number[]} * @private */ private _outlineColorData; /** * Set the size. * * @type {number} */ set size(value: number); /** * Get the size. * * @type {number} */ get size(): number; /** * Set the gap between the plane and the center. * * @type {number} */ set gap(value: number); /** * Get the gap between the plane and the center. * * @type {number} */ get gap(): number; /** * Set the opacity of the fill, as a factor of the shape color alpha. * * @type {number} */ set opacity(value: number); /** * Get the opacity of the fill. * * @type {number} */ get opacity(): number; /** * Set the thickness of the outline, in the units of the gizmo. A thickness of 0 hides it. * * @type {number} */ set outlineThickness(value: number); /** * Get the thickness of the outline. * * @type {number} */ get outlineThickness(): number; /** * Set the flipped state. * * @type {Vec3} */ set flipped(value: Vec3); /** * Get the flipped state. * * @type {Vec3} */ get flipped(): Vec3; } import { Shape } from './shape.js'; import { Vec3 } from '../../../core/math/vec3.js'; import type { GraphicsDevice } from '../../../platform/graphics/graphics-device.js'; import type { ShapeArgs } from './shape.js';