Graphics Reference
In-Depth Information
var geometry = new THREE.Geometry();
var splinePoints = spline.getPoints(50);
var material = new THREE.LineBasicMaterial({
color: 0xff00f0
});
geometry.vertices = splinePoints;
var line = new THREE.Line(geometry, material);
scene.add(line);
In this recipe, we moved a light along a specific path. However, as a light is also
just an object with a specific position, we can apply this same principle to all the oth-
er objects in the scene, such as
THREE.Mesh
,
THREE.PerspectiveCamera
, or
THREE.OrthographicCamera
.