Public
Edited
Oct 30, 2023
2 forks
4 stars
Insert cell
Insert cell
// create a jscad view
view1 = jscadView(html`<div style="height:400px"/>`)
Insert cell
Insert cell
Insert cell
Insert cell
// call update when UI params change
view1.jscadUpdate(model1({ height, width, depth }))
Insert cell
// your 3D model creator function
function model1 (params) {
const { width, height, depth } = params;
return modeling.primitives.cuboid({ size: [width, depth, height], center: [0, 0, height / 2] });
}
Insert cell
Insert cell
modeling = require('@jscad/modeling')
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