/** * Draws a cone along its y-axis, with handles that drag its base radius and its height. A height * edit keeps the center in place. * * ```javascript * const gizmo = new ConeGizmo(cameraComponent, layer); * gizmo.on('handle:move', () => { * collision.radius = gizmo.radius; * collision.height = gizmo.height; * }); * ``` * * Relevant Engine API examples: * * - [Shape Gizmos](https://playcanvas.github.io/#/gizmos/shape) * * @category Gizmo */ export class ConeGizmo extends ShapeGizmo { /** * Creates a new ConeGizmo object. * * @param {CameraComponent} camera - The camera component. * @param {Layer} layer - The render layer. * @example * const gizmo = new ConeGizmo(camera, layer); */ constructor(camera: CameraComponent, layer: Layer); /** * The radius of the base of the cone. Defaults to 0.5. * * @type {number} */ radius: number; /** * The height of the cone. Defaults to 1. * * @type {number} */ height: number; /** * Places the outline of the cone as the camera sees it, none when the base surrounds the apex. * * @param {Vec3} apex - The apex. * @param {Vec3} base - The center of the base. * @param {Vec3} up - The axis of the cone. * @param {number} radius - The radius of the base. * @param {number} height - The height. * @private */ private _outline; } import { ShapeGizmo } from './shape-gizmo.js'; import type { CameraComponent } from '../../../framework/components/camera/component.js'; import type { Layer } from '../../../scene/layer.js';