Public
Edited
Jun 10, 2023
Insert cell
Insert cell
Insert cell
THREE = import("three@0.153.0")
Insert cell
This module, THREE, includes the core of the three.js library. Additional features are available as addons, which are imported separately. For example the class OrbititalControls is imported thusly:

Insert cell
OrbitControls = (
await import("three@0.153.0/examples/jsm/controls/OrbitControls.js")
).OrbitControls
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
stereo_camera = {
const fov = 45;
const aspect = width / height;
const near = 1;
const far = 1000;
const stereo_camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
stereo_camera.position.set(2, 2, -2);
stereo_camera.lookAt(new THREE.Vector3(0, 0, 0));
return stereo_camera;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
edges = new THREE.EdgesGeometry(new THREE.BoxGeometry(1, 1, 1))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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