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

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