Published
Edited
Oct 14, 2019
1 fork
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
eye_set = (i,j,t=100) =>
d3.select(eye).dispatch('update', {detail: [i,j,t]})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// TODO: find API hook to orbitcamera (controls that couple position to rotation)
/* tween = {
let PI = Math.PI
return new TWEEN.Tween(camera.)
.to({ x: [-PI/5, -PI/5, PI/5, PI/5],
y: [PI/4, -PI/4, -PI/4, PI/4] }, 4000) // relative animation
.repeat( Infinity )
.onUpdate(function(d) {
// console.log(d)
lines.forEach(u => { u.rotation.set(d.x, d.y, 0) })
// u.rotation.set(d.x, d.y, d.z)
}).start();
}*/
Insert cell
// TWEEN = require('@tweenjs/tween.js')
Insert cell
THREE = {
const THREE = window.THREE = await require('three');
// https://raw.githubusercontent.com/mrdoob/three.js/master/examples/js/renderers/SVGRenderer.js
await require('three/examples/js/renderers/Projector.js').catch(() => {});
await require('three/examples/js/renderers/SVGRenderer.js').catch(() => {});
await require("three@0.99.0/examples/js/controls/OrbitControls.js").catch(() => {});
// TODO: use TrackballControls, but detect the 1d space of orientations (no canonical 'up') corresp. to ea. vtx.
return THREE;
}
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