Platform
Solutions
Resources
Pricing
Sign in
Sign up
David B.
Data viz engineer | twitter.com/dbumbeishvili
Workspace
Fork
Published
3 collections
By
David B.
Edited
Aug 27, 2021
Fork of
Three.js - Observable Template
•
5 forks
7 stars
Visualizations
Network Data Visualization
BrainBrowser - Volume Viewer
BrainBrowser - Volume Viewer Colored
BrainBrowser - Surface Viewer
Simple stacked bar chart
US Map - State Grid - Metro transitions on canvas
Bumpy Earth
Heatmap Grid
ScatterPlot
D3 V7 Org Chart - last updated at 2022 Aug
D3 v6 force graph with natural drag attraction
Collapsible radial dendrogram
Simple d3.v6 Timeline
Polygon Over Mapbox
Single row bar with labels
Area & Line chart
Data driven range slider
Three.js - wooden bar chart
d3.v5 Org Chart - last updated at Jun 2022
3D Pie Chart 😈
GDP Simulation
Inchlib
Data driven range sliders
deck.gl Country Layers
3D bar chart port
clx. porting 3D Scatter Plot Using three.js
clx. Porting spherical coordinates
Porting 3d-force-graph rotation example
Porting d3-3d scatterplot example
clx. Spinnable planets
Population density in Georgia
clx. deck.gl GeoJsonLayer Example
Realty Property Transactions in Georgia
clx. Deckgl HexagonLayer
Emigration - Georgia (Country)
3d Area chart - three.js
D3 + Rough + Indie Flower
Also listed in…
Three.js
3D
Insert cell
Insert cell
Insert cell
data
=
[
[
3
,
2
,
1
]
,
[
6
,
5
,
4
]
,
[
5
,
7
,
6
]
]
Insert cell
Insert cell
mutable
i
=
1
Insert cell
Insert cell
loader
=
new
THREE
.
TextureLoader
(
)
Insert cell
Insert cell
function
update
(
)
{
/*********** PUT ANIMATION LOGIC HERE **********/
//cubeGroup.rotation.x += 0.001;
cubeGroup
.
rotation
.
y
+=
0.001
;
//cubeGroup.rotation.z += 0.001;
/***********************************************/
}
Insert cell
Insert cell
function
render
(
scene
)
{
renderer
.
render
(
scene
,
camera
)
;
}
Insert cell
renderer
=
{
const
renderer
=
new
THREE
.
WebGLRenderer
(
{
antialias
:
true
}
)
;
renderer
.
setSize
(
width
,
height
)
;
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
)
;
renderer
.
gammaFactor
=
2.2
;
renderer
.
gammaOutput
=
true
;
renderer
.
physicallyCorrectLights
=
true
;
return
renderer
;
}
Insert cell
Insert cell
cubeGroup
=
{
const
group
=
new
THREE
.
Group
(
)
;
data
.
forEach
(
(
row
,
i
,
iarr
)
=>
{
row
.
forEach
(
(
d
,
j
,
jarr
)
=>
{
cubeMeshes
[
i
]
[
j
]
.
position
.
set
(
i
/
iarr
.
length
-
0.5
,
d
/
max
*
0.5
-
0.6
,
j
/
jarr
.
length
-
0.5
)
;
//cubeMeshes[i][j].scale.set(1,4,1);
group
.
add
(
cubeMeshes
[
i
]
[
j
]
)
;
}
)
}
)
return
group
;
}
Insert cell
Insert cell
cubeMeshes
=
{
const
cubeMeshes
=
cubeGeometries
.
map
(
row
=>
{
return
row
.
map
(
cubeGeometry
=>
new
THREE
.
Mesh
(
cubeGeometry
,
cubeMaterial
)
)
}
)
return
cubeMeshes
;
}
Insert cell
Insert cell
cubeMaterial
=
{
const
cube
=
new
THREE
.
MeshStandardMaterial
(
{
map
:
loader
.
load
(
'https://threejsfundamentals.org/threejs/lessons/resources/images/compressed-but-large-wood-texture.jpg'
)
}
)
;
cube
.
color
.
convertSRGBToLinear
(
)
;
return
cube
;
}
Insert cell
Insert cell
cubeGeometries
=
data
.
map
(
row
=>
{
return
row
.
map
(
c
=>
{
return
new
THREE
.
BoxGeometry
(
0.2
,
c
/
max
,
0.2
)
;
}
)
}
)
Insert cell
Insert cell
mainLight
=
{
const
light
=
new
THREE
.
DirectionalLight
(
0xffffff
,
3.0
)
;
light
.
position
.
set
(
10
,
10
,
10
)
;
return
light
;
}
Insert cell
ambientLight
=
{
const
light
=
new
THREE
.
HemisphereLight
(
0xddeeff
,
0x202020
,
3
)
;
return
light
;
}
Insert cell
Insert cell
height
=
500
Insert cell
Insert cell
fov
=
18
Insert cell
aspect
=
width
/
height
Insert cell
near
=
0.1
Insert cell
far
=
1000
Insert cell
camera
=
{
const
camera
=
new
THREE
.
PerspectiveCamera
(
fov
,
aspect
,
near
,
far
)
;
camera
.
position
.
set
(
-
4
,
1
,
4
)
;
return
camera
;
}
Insert cell
Insert cell
max
=
Math
.
max
.
apply
(
Math
,
data
.
map
(
d
=>
Math
.
max
.
apply
(
this
,
d
)
)
)
Insert cell
Insert cell
THREE
=
{
const
THREE
=
window
.
THREE
=
await
require
(
"three@0.99.0/build/three.min.js"
)
;
await
require
(
"three@0.99.0/examples/js/controls/OrbitControls.js"
)
.
catch
(
(
)
=>
{
}
)
;
return
window
.
THREE
;
}
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Compare fork
Fork
View
Export
Listed in...
Three.js
David B.
3D
David B.
Visualizations
David B.
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
scene
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
i
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
loader
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
update
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
render
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
renderer
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
cubeGroup
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
cubeMeshes
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
cubeMaterial
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
cubeGeometries
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
mainLight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ambientLight
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
height
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
fov
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aspect
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
near
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
far
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
camera
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
max
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
THREE
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML