Atlaslog
Atlaslog / deck.gl / API / PointCloudLayer
deck.gl · API reference

PointCloudLayer

Quick answer

The PointCloudLayer renders a point cloud with 3D positions, normals and colors.

Last verified 2026-11-03 · deck.gl 9.0 · Cite this page
Runnable examplesChinese noteAll API topics

The PointCloudLayer renders a point cloud with 3D positions, normals and colors.

import {Deck} from '@deck.gl/core';
import {PointCloudLayer} from '@deck.gl/layers';

const layer = new PointCloudLayer({
id: 'PointCloudLayer',
data: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/pointcloud.json',

getColor: d => d.color,
getNormal: d => d.normal,
getPosition: d => d.position,
pointSize: 2,
coordinateOrigin: [-122.4, 37.74],
coordinateSystem: 'meter-offsets',
pickable: true
});

new Deck({
initialViewState: {
longitude: -122.4,
latitude: 37.74,
zoom: 11
},
controller: true,
getTooltip: ({object}) => object && object.position.join(', '),
layers: [layer]
});

loaders.gl offers a category of loaders for loading point clouds from standard formats. For example, the following code adds support for LAS/LAZ files:

import {PointCloudLayer} from '@deck.gl/layers';
import {LASLoader} from '@loaders.gl/las';

new PointCloudLayer({
data: 'path/to/pointcloud.laz',
loaders: [LASLoader]
});

Installation​

To install the dependencies from NPM:

npm install deck.gl
# or
npm install @deck.gl/core @deck.gl/layers
import {PointCloudLayer} from '@deck.gl/layers';
import type {PointCloudLayerProps} from '@deck.gl/layers';

new PointCloudLayer<DataT>(...props: PointCloudLayerProps<DataT>[]);

To use pre-bundled scripts:

<script src="https://unpkg.com/deck.gl@^9.0.0/dist.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/@deck.gl/core@^9.0.0/dist.min.js"></script>
<script src="https://unpkg.com/@deck.gl/layers@^9.0.0/dist.min.js"></script>
new deck.PointCloudLayer({});

Properties​

Inherits from all Base Layer properties.

Render Options​

sizeUnits (string, optional)​

The units of the point size, one of 'meters', 'common', and 'pixels'. See unit system.

pointSize (number, optional) ​

Global radius of all points, in units specified by sizeUnits (default pixels).

antialiasing (boolean, optional)​

When enabled, this prop computes edge coverage in the shader. When disabled, the layer relies on render-target multisampling. Shader-computed coverage can cause artifacts where points overlap.

Other antialiasing techniques have different trade-offs; see Antialiasing and Multisampling in the luma.gl docs.

material (Material, optional)​

This is an object that contains material props for lighting effect applied on extruded polygons. Check the lighting guide for configurable settings.

Data Accessors​

getPosition (Accessor<Position>, optional) ​

Method called to retrieve the position of each object.

getNormal (Accessor<number[3]>, optional) ​

The normal of each object, in [nx, ny, nz].

getColor (Accessor<Color>, optional) ​

The rgba color is in the format of [r, g, b, [a]]. Each channel is a number between 0-255 and a is 255 if not supplied.

Source​

modules/layers/src/point-cloud-layer

TutorialsAPI index
English reference text adapted from the official deck.gl documentation, © vis.gl contributors, licensed under MIT.
Original page: https://deck.gl/docs/api-reference/layers/point-cloud-layer · Chinese note: /deckgl/api/point-cloud-layer.html
Cite this page

Atlaslog (2026). PointCloudLayer. https://www.jingweizhi.com/en/deckgl/api/point-cloud-layer.html (accessed 2026-11-03).