Point Lights
Three colored PointLights orbiting a TorusKnot at different radii and speeds.
Controls
Benchmark
Runs fixed workloads with warmup frames, repeated samples, p50/p95 FPS and frame timing, workload counters, pipeline timings, and JSON output.
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, 3, 10);
camera.lookAt(new EASEL.Vector3(0, 0, 0));
scene.add(new EASEL.AmbientLight(0xffffff, 0.1));
const knot = new EASEL.Mesh(
new EASEL.TorusKnotGeometry(2, 0.6, 128, 16),
new EASEL.LambertMaterial({ color: 0xdddddd }),
);
scene.add(knot);
const red = new EASEL.PointLight(0xff0000, 1.5, 20, 2);
const green = new EASEL.PointLight(0x00ff00, 1.5, 20, 2);
const blue = new EASEL.PointLight(0x0000ff, 1.5, 20, 2);
let t = 0;
function animate() {
t += clock.delta;
red.position.set(Math.cos(t) * 4, 2, Math.sin(t) * 4);
green.position.set(Math.cos(t * 0.7 + 2) * 5, 1, Math.sin(t * 0.7 + 2) * 5);
blue.position.set(Math.cos(t * 1.3 + 4) * 3, 3, Math.sin(t * 1.3 + 4) * 3);
renderer.render(scene, camera);
}import * as THREE from "three";
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(45, width / height, 0.1, 100);
camera.position.set(0, 3, 10);
camera.lookAt(new THREE.Vector3(0, 0, 0));
scene.add(new THREE.AmbientLight(0xffffff, 0.1));
const knot = new THREE.Mesh(
new THREE.TorusKnotGeometry(2, 0.6, 128, 16),
new THREE.MeshLambertMaterial({ color: 0xdddddd }),
);
scene.add(knot);
const red = new THREE.PointLight(0xff0000, 1.5, 20, 2);
const green = new THREE.PointLight(0x00ff00, 1.5, 20, 2);
const blue = new THREE.PointLight(0x0000ff, 1.5, 20, 2);
const clock = new THREE.Clock();
let t = 0;
function animate() {
t += clock.getDelta();
red.position.set(Math.cos(t) * 4, 2, Math.sin(t) * 4);
green.position.set(Math.cos(t * 0.7 + 2) * 5, 1, Math.sin(t * 0.7 + 2) * 5);
blue.position.set(Math.cos(t * 1.3 + 4) * 3, 3, Math.sin(t * 1.3 + 4) * 3);
renderer.render(scene, camera);
}