Public
Edited
Sep 13, 2023
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
bufferInfoArray = vertexAttributes.map((vertexAttributes) =>
twgl.createBufferInfoFromArrays(gl, vertexAttributes)
)
Insert cell
Insert cell
Insert cell
Insert cell
vertexAttributes = modelObj.map((d) => ({
position: { numComponents: 3, data: d.sc.positions },
normal: { numComponents: 3, data: d.sc.normals }
}))
Insert cell
Insert cell
Insert cell
teapotObj = loadModelFromURL(teapotURL, "obj") //loadObjObject(teapotURL)
Insert cell
teapotURL = FileAttachment("teapot.obj").url()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
houseObj = loadModelFromURL(
await FileAttachment("247_House 15_obj.obj").url(),
"obj"
)
Insert cell
Insert cell
Insert cell
import {
loadModelFromURL,
computeModelExtent
} from "@sdevkota007/model-loaders-threejs"
Insert cell
twgl = require("twgl.js")
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