UNPKG

itowns

Version:

A JS/WebGL framework for 3D geospatial data visualization

104 lines (103 loc) 4.37 kB
export default PointCloudLayer; /** * The basis for all point clouds related layers. * * @property {boolean} isPointCloudLayer - Used to checkout whether this layer * is a PointCloudLayer. Default is `true`. You should not change this, as it is * used internally for optimisation. * @property {THREE.Group|THREE.Object3D} group - Contains the created * `THREE.Points` meshes, usually with an instance of a `THREE.Points` per node. * @property {THREE.Group|THREE.Object3D} bboxes - Contains the bounding boxes * (`THREE.Box3`) of the tree, usually one per node. * @property {number} octreeDepthLimit - The depth limit at which to stop * browsing the octree. Can be used to limit the browsing, without having to * edit manually the source of the point cloud. No limit by default (`-1`). * @property {number} [pointBudget=2000000] - Maximum number of points to * display at the same time. This influences the performance of rendering. * Default to two millions points. * @property {number} [sseThreshold=2] - Threshold of the **S**creen **S**pace * **E**rror. Default to `2`. * @property {number} [pointSize=4] - The size (in pixels) of the points. * Default to `4`. * @property {THREE.Material|PointsMaterial} [material=new PointsMaterial] - The * material to use to display the points of the cloud. Be default it is a new * `PointsMaterial`. * @property {number} [mode=PNTS_MODE.COLOR] - The displaying mode of the points. * Values are specified in `PointsMaterial`. * @property {number} [minIntensityRange=0] - The minimal intensity of the * layer. Changing this value will affect the material, if it has the * corresponding uniform. The value is normalized between 0 and 1. * @property {number} [maxIntensityRange=1] - The maximal intensity of the * layer. Changing this value will affect the material, if it has the * corresponding uniform. The value is normalized between 0 and 1. * * @extends GeometryLayer */ declare class PointCloudLayer extends GeometryLayer { /** * Constructs a new instance of point cloud layer. * Constructs a new instance of a Point Cloud Layer. This should not be used * directly, but rather implemented using `extends`. * * @param {string} id - The id of the layer, that should be unique. It is * not mandatory, but an error will be emitted if this layer is added a * {@link View} that already has a layer going by that id. * @param {Object} [config] - Optional configuration, all elements in it * will be merged as is in the layer. For example, if the configuration * contains three elements `name, protocol, extent`, these elements will be * available using `layer.name` or something else depending on the property * name. See the list of properties to know which one can be specified. * @param {Source} config.source - Description and options of the source See @Layer. * @param {number} [options.minElevationRange] - Min value for the elevation range (default value will be taken from the source.metadata). * @param {number} [options.maxElevationRange] - Max value for the elevation range (default value will be taken from the source.metadata). */ constructor(id: string, config?: { source: Source; }); /** * @type {boolean} * @readonly */ readonly isPointCloudLayer: boolean; protocol: string; group: any; bboxes: any; /** * @type {number} */ octreeDepthLimit: number; /** * @type {number} */ pointBudget: number; /** * @type {number} */ pointSize: number; /** * @type {number} */ sseThreshold: number; /** * @type {THREE.Material} */ material: THREE.Material; mode: any; /** * @type {PointCloudNode | undefined} */ root: PointCloudNode | undefined; preUpdate(context: any, changeSources: any): any[]; update(context: any, layer: any, elt: any): any; displayedCount: number | undefined; pickObjectsAt(view: any, mouse: any, radius: any, target?: any[]): any[] | undefined; getObjectToUpdateForAttachedLayers(meta: any): { element: any; parent: any; } | { element: any; parent?: undefined; } | undefined; } import GeometryLayer from '../Layer/GeometryLayer'; import * as THREE from 'three';