Published
Edited
Apr 27, 2022
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
runit = {
now;
if (running) {
d3.select(anim)
.select(".bones")
.select("Coordinate")
.attr(
"point",
walker
.getLineMarkers(250)
.map((a) => [
[a[0].x, a[0].y, a[0].z],
[a[1].x, a[1].y, a[1].z]
])
.toString()
);
let markers = walker.getMarkers(250);
d3.select(anim)
.selectAll(".joints")
.nodes()
.forEach(function (transform, i) {
d3.select(transform)
.select("transform")
.attr(
"translation",
`${markers[i].x} ${markers[i].y} ${markers[i].z}`
);
});
}
}
Insert cell
walker = {
let walker = new BMWalker();
walker.setSpeed(1.5);
return walker;
}
Insert cell
BMWalker = fetch(
"https://tetunori.github.io/BMWalker.js/dist/v0.6.0/bmwalker.js"
)
.then((r) => r.text())
.then((src) => new Function(`const {abs} = Math; ${src}; return BMWalker`)())
Insert cell
import {
show_x3d,
create_indexedLineSet,
create_sphere
} from "@mcmcclur/plotx3d"
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