Points Material

Point rendering mode with adjustable point radius.

Controls

Point Radius

1
8
import * as EASEL from "easel";

const scene = new EASEL.Scene();
const camera = new EASEL.PerspectiveCamera({
  fov: 50, aspect: width / height, near: 0.1, far: 100,
});
camera.position.z = 6;

const renderer = new EASEL.Renderer({ canvas, width, height });
scene.add(new EASEL.AmbientLight(0xffffff, 0.5));

// PointsMaterial renders vertices as filled circles
const material = new EASEL.PointsMaterial({ color: 0x66bbff, size: 3 });
const geometry = new EASEL.SphereGeometry(2, 24, 18);

// Points object (like THREE.Points)
const points = new EASEL.Points(geometry, material);
scene.add(points);