Atlaslog
Atlaslog / three.js / API reference / Points
three.js · API reference

Points

Quick answer

Points renders each vertex of a BufferGeometry as a screen-facing square or textured sprite, making it the direct way to display LiDAR point clouds, particles, and scatter data. It needs only a position attribute, with color optional, and a PointsMaterial to control size, map, and attenuation.

Last verified 2026-11-03 · three.js 0.160.0 · Cite this page
new THREE.Points ( geometry , material )
Key points
Example
const positions = new Float32Array(points.length * 3);
const colors = new Float32Array(points.length * 3);
const color = new THREE.Color();

points.forEach(function (p, i) {
  positions[i * 3] = p.x;
  positions[i * 3 + 1] = p.y;
  positions[i * 3 + 2] = p.z;

  color.setHSL(0.6 - p.height * 0.002, 0.55, 0.55);
  colors[i * 3] = color.r;
  colors[i * 3 + 1] = color.g;
  colors[i * 3 + 2] = color.b;
});

const geometry = new THREE.BufferGeometry();
geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.setAttribute('color', new THREE.BufferAttribute(colors, 3));

const material = new THREE.PointsMaterial({
  size: 2,
  sizeAttenuation: false,
  vertexColors: true,
  transparent: true,
  opacity: 0.85,
  depthWrite: false
});

const cloud = new THREE.Points(geometry, material);
cloud.frustumCulled = false;   // 包围盒尚未计算时避免整体被剔除
scene.add(cloud);
Notes
Runnable examplesChinese originalAll API references
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Cite this page

Atlaslog (2026). Points. https://www.jingweizhi.com/en/three/api/points.html (accessed 2026-11-03).