Published
Edited
Jul 8, 2022
1 fork
6 stars
Insert cell
Insert cell
container = html `<div style="height:600px;background:#111;"></div>`
Insert cell
Insert cell
Insert cell
Insert cell
deckgl = {
const props = {
container,
views: [new deck.OrbitView({fov: 50})],
initialViewState: {rotationX: 45, rotationOrbit: -45, zoom: 6},
controller: true,
layers: [pointCloudLayer]
};
// Avoid creating multiple instances
const prevDeckInstance = this;
if (prevDeckInstance) {
prevDeckInstance.setProps(props);
return prevDeckInstance;
}
return new deck.DeckGL(props);
}
Insert cell
Insert cell
pointCloudLayer = {
return new deck.PointCloudLayer({
id: 'pointCloud',
coordinateSystem: deck.COORDINATE_SYSTEM.IDENTITY,
opacity: 1,
data,
getColor: d => d.color,
getNormal: d => d.normal,
radiusPixels: 1,
material: {
ambient: 1.0
}
});
}
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