Public
Edited
Oct 10, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
cube_geometry = Object({
// Vertex data: 3 byte positions, 3 byte normals, 3 byte colors, 2 byte texcoords
vertexdata: new Int8Array([
-1, -1, +1, 0, 0, +1, 0, 0, 1, 0,0, // Front Face
+1, -1, +1, 0, 0, +1, 0, 0, 1, 1,0,
+1, +1, +1, 0, 0, +1, 0, 0, 1, 1,1,
-1, +1, +1, 0, 0, +1, 0, 0, 1, 0,1,
-1, -1, -1, 0, 0, -1, 0, 1, 1, 1,0, // Back Face
-1, +1, -1, 0, 0, -1, 0, 1, 1, 1,1,
+1, +1, -1, 0, 0, -1, 0, 1, 1, 0,1,
+1, -1, -1, 0, 0, -1, 0, 1, 1, 0,0,
-1, +1, -1, 0, +1, 0, 0, 1, 0, 0,1, // Top Face
-1, +1, +1, 0, +1, 0, 0, 1, 0, 0,0,
+1, +1, +1, 0, +1, 0, 0, 1, 0, 1,0,
+1, +1, -1, 0, +1, 0, 0, 1, 0, 1,1,
-1, -1, -1, 0, -1, 0, 1, 0, 1, 1,1, // Bottom Face
+1, -1, -1, 0, -1, 0, 1, 0, 1, 0,1,
+1, -1, +1, 0, -1, 0, 1, 0, 1, 0,0,
-1, -1, +1, 0, -1, 0, 1, 0, 1, 1,0,
+1, -1, -1, +1, 0, 0, 1, 0, 0, 1,0, // Right Face
+1, +1, -1, +1, 0, 0, 1, 0, 0, 1,1,
+1, +1, +1, +1, 0, 0, 1, 0, 0, 0,1,
+1, -1, +1, +1, 0, 0, 1, 0, 0, 0,0,
-1, -1, -1, -1, 0, 0, 0, 1, 1, 0,0, // Left Face
-1, -1, +1, -1, 0, 0, 0, 1, 1, 1,0,
-1, +1, +1, -1, 0, 0, 0, 1, 1, 1,1,
-1, +1, -1, -1, 0, 0, 0, 1, 1, 0,1]),

// Index data for cube faces
indexdata: new Uint8Array([
0, 1, 2, 0, 2, 3, // Front
4, 5, 6, 4, 6, 7, // Bottom
8, 9, 10, 8, 10, 11, // Top
12, 13, 14, 12, 14, 15, // Bottom
16, 17, 18, 16, 18, 19, // Right
20, 21, 22, 20, 22, 23 // Left
])
})
Insert cell
Insert cell
Insert cell
austin_mini_geometry = FileAttachment("austin_mini_geom.json").json()
Insert cell
Insert cell
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