Skip to content

Instantly share code, notes, and snippets.

View rveciana's full-sized avatar
🐢

Roger Veciana i Rovira rveciana

🐢
View GitHub Profile
@rveciana
rveciana / .block
Last active February 6, 2023 19:26
Smooth GeoTIFF drawing with D3js
license: mit
@rveciana
rveciana / .block
Last active September 14, 2020 16:32
Representing GeoTIFF values with D3js
license: mit
@rveciana
rveciana / .block
Last active November 28, 2016 19:28
Wind barbs from a projected GeoTIFF & JavaScript libraries
license: mit
@rveciana
rveciana / .block
Last active March 6, 2017 13:39
Drawing streamlines from a GeoTIFF file
license: mit
@rveciana
rveciana / .block
Last active June 25, 2023 12:06
Drawing wind barbs with D3js from a GeoTIFF
license: mit
@rveciana
rveciana / .block
Last active November 11, 2016 23:27
Label positioning with svg-path-properties
licence: mit
@rveciana
rveciana / .block
Last active November 9, 2016 20:49 — forked from mbostock/.block
Canvas & svg-path-properties Point-Along-Path Interpolation
license: gpl-3.0
@rveciana
rveciana / README.md
Last active March 25, 2025 08:14
Canvas path animation using svg-path-properties

Creating visualizations like this one but using canvas is possible.

Since the Canvas element hasn't got the getTotalLength() method as it exists in SVG, I'm using the svg-path-properties, that allows this calculations with a good precision (<0.1px), as well as allowing the getPointAtLength function too.

@rveciana
rveciana / README.md
Last active October 18, 2016 15:28
Animated path using Canvas and point-at-length

Creating visualizations like this one but using canvas is possible.

Since the Canvas element hasn't got the getTotalLength() method as it exists in SVG, I'm using the point-at-length library, that calculates exactly this.

The library is designed to be used only from nodejs, but using browserify (as in this post), this is not a ptoblem:

browserify index.js --standalone Points > point-at-length.js

In a previous version of the block, I created an SVG element to use the getTotalLength() method, which is much less elegant and can't be used in a nodejs environment.

@rveciana
rveciana / README.md
Last active October 18, 2016 15:25
Using rollup with d3-composite-projections

This example is part of this blog entry and shows how to use rollup to create a custom bundle with the library d3-composite-projections.

To use this example, just download the files from the gist

git clone https://gist.github.com/0e73c92391def44331d2069755edc199.git

and then:

npm install

npm run build