Hemisphere Light
HemisphereLight blends a sky color and ground color based on the surface normal direction.
Controls
Intensity
0
2
import * as EASEL from "easel";
const scene = new EASEL.Scene();
const camera = new EASEL.PerspectiveCamera({
fov: 45,
aspect: width / height,
near: 0.1,
far: 100,
});
camera.position.set(0, 2, 10);
// HemisphereLight(skyColor, groundColor, intensity)
// Per-vertex: top-facing normals get sky color, bottom-facing get ground color.
const hemi = new EASEL.HemisphereLight(0x8888ff, 0x443322, 1);
scene.add(hemi);
const mat = new EASEL.LambertMaterial({ color: 0x999999 });
const sphere = new EASEL.Mesh(new EASEL.SphereGeometry(1, 24, 16), mat);
sphere.position.set(-3, 0, 0);
const box = new EASEL.Mesh(new EASEL.BoxGeometry(1.5, 1.5, 1.5), mat);
const torus = new EASEL.Mesh(new EASEL.TorusGeometry(0.8, 0.3, 16, 32), mat);
torus.position.set(3, 0, 0);