Published
Edited
Apr 18, 2018
Insert cell
Insert cell
{

var two = new Two({
width: width,
height: 200,
autostart: true
});

two.scene.translation.set(two.width / 2, two.height / 2);

var rectangle = two.makeRectangle(0, 0, 50, 50);

two.bind('update', function() {
rectangle.rotation += 0.01;
});

return two.renderer.domElement;

}
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