Published
Edited
Aug 1, 2020
Insert cell
Insert cell
Insert cell
Insert cell
car = {
let x3d = await x3d_file.text();
yield html`${x3d}`;
x3dom.reload();
}
Insert cell
// Add a slightly metallic look.
// Should do this within Mathematica before production
// and also separate the wheels from the chassis.
d3
.select(car)
.select('material')
.attr('specularColor', '1 1 1')
.attr('shininess', '0.5')
Insert cell
Insert cell
x3d_file = FileAttachment("Car.x3d")
Insert cell
transformation_strings = (await FileAttachment(
'transformations.txt'
).text()).split('\n')
Insert cell
Insert cell
style = html`<style>
canvas {
outline: none;
}
</style>`
Insert cell
Insert cell
x3dom = require('x3dom').catch(() => window['x3dom'])
Insert cell
d3 = require('d3-selection')
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