Platform
Resources
Pricing
Sign in
Get started
Dan Marshall
Workspace
Fork
Public
By
Dan Marshall
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
view1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
width
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
depth
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
model1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
modeling
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML