UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

45 lines (44 loc) 1.92 kB
/** * A render pass implementing rendering of mesh instances into a pick buffer. * * @ignore */ export class RenderPassPicker extends RenderPass { constructor(device: any, renderer: any); /** @type {BindGroup[]} */ viewBindGroups: BindGroup[]; /** @type {BlendState} */ blendState: BlendState; /** @type {CameraComponent} */ camera: CameraComponent; /** @type {Scene} */ scene: Scene; /** @type {Layer[]} */ layers: Layer[]; /** @type {Map<number, MeshInstance | GSplatComponent>} */ mapping: Map<number, MeshInstance | GSplatComponent>; /** @type {boolean} */ depth: boolean; /** @type {number[]} */ _qualifiedLayerIndices: number[]; /** @type {Map<number, MeshInstance|null>} */ _pickMeshInstances: Map<number, MeshInstance | null>; renderer: any; /** * @param {CameraComponent} camera - The camera component used for picking. * @param {Scene} scene - The scene to pick from. * @param {Layer[]} layers - The layers to pick from. * @param {Map<number, MeshInstance | GSplatComponent>} mapping - Map to store ID to object mappings. * @param {boolean} depth - Whether to render depth information. */ update(camera: CameraComponent, scene: Scene, layers: Layer[], mapping: Map<number, MeshInstance | GSplatComponent>, depth: boolean): void; emptyWorldClusters: any; } import { RenderPass } from '../../platform/graphics/render-pass.js'; import type { BindGroup } from '../../platform/graphics/bind-group.js'; import { BlendState } from '../../platform/graphics/blend-state.js'; import type { CameraComponent } from '../components/camera/component.js'; import type { Scene } from '../../scene/scene.js'; import type { Layer } from '../../scene/layer.js'; import type { MeshInstance } from '../../scene/mesh-instance.js'; import type { GSplatComponent } from '../components/gsplat/component.js';