Published
Edited
Feb 11, 2019
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
plane = getBox(3, 0.1, 10, [0,-1,0])
Insert cell
Insert cell
camera = {
var camera = new THREE.PerspectiveCamera(40, width/height,
1,
1000
);

camera.position.x = 10;
camera.position.y = 5;
camera.position.z = 10;

camera.lookAt(new THREE.Vector3(0, 0, 0));
// camera.lookAt(box);
return camera;
}
Insert cell
height = 600
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// update(renderer, scene, camera, controls);
Insert cell
function update(renderer, scene, camera, controls) {
renderer.render(scene, camera);
controls.update();
return renderer.domElement;
requestAnimationFrame(function() {
update(renderer, scene, camera, controls);
});
}
Insert cell
Insert cell
// scene = {
// let scene = this;
// if (!scene) {
// scene = new THREE.Scene();
// scene.background = new THREE.Color('#f5f5f5');
// scene.add(box, plane, light);
// }

// return scene;
// }
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more