Capítulo 88 de 859

Chapter 88: PointsNodeMaterial

Core Idea

Node material version of PointsMaterial.

This material can be used in two ways:

  • By rendering point primitives with Points. Since WebGPU only supports point primitives with a pixel size of 1, it's not possible to define a size.
const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() );
const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) );

Key Concepts

  • alphaToCoverage : boolean: Whether alpha to coverage should be used or not.
  • isPointsNodeMaterial : boolean (readonly): This flag can be used for type testing.
  • sizeNode : Node.<vec2>: This node property provides an additional way to set the point size.

Reference Tables

Constructor

Signature
new PointsNodeMaterial( parameters : Object )

Properties

PropertyDescription
.alphaToCoverage : booleanWhether alpha to coverage should be used or not.
.isPointsNodeMaterial : boolean (readonly)This flag can be used for type testing.
.sizeNode : Node.<vec2>This node property provides an additional way to set the point size.

Key Takeaways

  1. PointsNodeMaterial extends: EventDispatcher → Material → NodeMaterial → SpriteNodeMaterial
  2. Most relevant properties: alphaToCoverage, isPointsNodeMaterial, sizeNode.

Connects To