Platform
Resources
Pricing
Sign in
Contact us
Sylvain Lesage
Software engineer at Hugging Face. Prototyping here with JS, d3, three.js.
Workspace
Fork
Published
2 collections
By
Sylvain Lesage
Edited
Apr 13, 2020
Image
Download the shape of a country
Input: draw points on image
Canvas equality by value
Input: Draw an arrow on an image
Calibrate a Three.js camera using fSpy
Hello fSpy
Main Colors from Image
Colors palette from image
Can I Use Media Fragments?
Hello Cloudinary Upload
Color by number
Pixel-art or Voronoi image tesselation
Hello pixelit
Input: draw a box on image
Extended drawImage
drawImage respects canvas transparency
CSS object-fit formulas
object-fit
Every Other Pixel Is A Line
Fake video player
Async image loading, and CORS
Preload a list of images
Image placeholder
Image cover
Identify images with deterministic UUID
Perspective rectifier - example
Perspective rectifier
Also listed in…
TIL
Insert cell
Insert cell
canvasA
=
{
const
ctx
=
DOM
.
context2d
(
w
,
h
)
;
ctx
.
strokeStyle
=
'steelblue'
;
ctx
.
lineWidth
=
8
;
ctx
.
strokeRect
(
w
/
4
,
h
/
4
,
w
/
2
,
h
/
2
)
;
return
ctx
.
canvas
;
}
Insert cell
Insert cell
canvasB
=
{
const
ctx
=
DOM
.
context2d
(
w
,
h
)
;
ctx
.
strokeStyle
=
'red'
;
ctx
.
lineWidth
=
8
;
ctx
.
strokeRect
(
w
/
8
,
h
/
8
,
w
/
4
,
(
3
*
h
)
/
4
)
;
return
ctx
.
canvas
;
}
Insert cell
Insert cell
canvasC
=
{
const
ctx
=
DOM
.
context2d
(
w
,
h
)
;
// drawImage respects the transparency
ctx
.
drawImage
(
canvasA
,
0
,
0
,
w
,
h
)
;
ctx
.
drawImage
(
canvasB
,
0
,
0
,
w
,
h
)
;
return
ctx
.
canvas
;
}
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
Listed in...
TIL
Sylvain Lesage
Image
Sylvain Lesage
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
canvasA
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
canvasB
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
canvasC
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
w
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
h
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML