Bitmap to lines using marching squares and layered hatching | Philippe Deschaseaux | Observable
js
js
Author
Philippe Deschaseaux
@ehouais
Comments (5)
Fabian Iwand
Jun 24
Be aware that the published version is currently broken. You'll likely want to republish.
Reply
Fabian Iwand
Jun 24
structuredClone(arr) might be more efficient?
Philippe Deschaseaux
Jun 25
Thanks, I wasn't aware of this function. It's probably faster, but it doesn't fix the glitch.
Fabian Iwand
Jun 25
hachureLines appears to mutate the vertices. Another fix would be to dereference them with `arr.map(d => d.slice())`
Reply
Fabian Iwand
Jun 25
Btw, I'd recommend importing from esm.run (or
esm.sh
for stubborn packages) since
unpkg.com
often has reliability issues.
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Public
Forum
Bluesky
YouTube
X
Observable
Sign up
Philippe Deschaseaux
13
Reply
Reply
Reply
Add comment
Subscribe to notifications
1
Bitmap to lines using marching squares and layered hatching | Philippe Deschaseaux | Observable