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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more