Public
Edited
Oct 31, 2023
6 forks
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
loadModelFromURL(rayman_url, "obj")
Insert cell
armadillo = loadModelFromURL(
await FileAttachment("armadillo@1.obj").url(),
"obj"
)
Insert cell
computeModelExtent(armadillo)
Insert cell
DOM.download(
serialize({
positions: Array.from(armadillo[0].sc.positions),
normals: Array.from(armadillo[0].sc.normals)
}),
"armadillo",
"Download JSON"
)
Insert cell
Insert cell
cameraSCs = createSCs(cameraObject)
Insert cell
cameraObject = loadObjObject(camera_url)
Insert cell
camera_url = await FileAttachment("video_camera.obj").url()
Insert cell
flamingoObject = loadGLTFobject(Flamingo_url);
Insert cell
Flamingo_url = await FileAttachment("Flamingo.glb").url()
Insert cell
Insert cell
Insert cell
Insert cell
elfSCs = createSCs(elfObject )
Insert cell
Insert cell
elf_url = "https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/models/collada/elf/elf.dae"
Insert cell
arterySCs = createSCs(arteryObject)
Insert cell
arteryObject = loadSTLobject(artery_url)
Insert cell
artery_url = await FileAttachment("artery-model2.stl").url()
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
loadTDSObject = (url)=> loadObject(url, new THREE.TDSLoader())
Insert cell
Insert cell
mtls = loadMaterial(await FileAttachment("rayman_2_mdl.mtl").url())
Insert cell
loadObjObject(await FileAttachment("rayman_2_mdl.obj").url())
Insert cell
loadModelFromURL(await FileAttachment("Boulder.obj").url(), "obj")
Insert cell
Insert cell
Insert cell
loadSTLobject = (url)=> loadObject(url, new THREE.STLLoader())
Insert cell
loadGLTFobject = (url)=> loadObject(url, new THREE.GLTFLoader())
Insert cell
ModelSupported = ({
collada: loadCOLLADAobject,
obj: loadObjObject,
stl: loadSTLobject,
gltf: loadGLTFobject,
tds: loadTDSObject
})
Insert cell
Insert cell
//computeMatrix(arteryObject)
Insert cell
Insert cell
Insert cell
Insert cell
test = computeModelExtent(raymanSCs)
Insert cell
Insert cell
Insert cell
import { serialize } from "@palewire/saving-json"
Insert cell
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