0.18.3 • Published 12 months ago
veldt v0.18.3
veldt-js
High performance on-demand tile-based rendering library
Installation
npm install veldt
Example
// WebSocket endpoint for initiating tiling request
const WS_ENDPOINT = 'ws/tile';
// HTTP endpoint for pulling the finished tile.
const HTTP_ENDPOINT = 'tile';
// Open WebSocket connection for requesting tiles.
const requestor = new veldt.Requestor(WS_ENDPOINT, HTTP_ENDPOINT, err => {
// Check for error
if (err) {
console.error(err);
return;
}
// Create the central map object.
const map = new veldt.Map('#map', {
zoom: 3
});
// Create a CARTO base layer using a REST proxy tile.
const carto = new veldt.Layer.Rest();
carto.setPipeline('rest');
carto.setURI('dark_nolabels');
carto.setScheme('http');
carto.setEndpoint('a.basemaps.cartocdn.com');
carto.setExt('png');
carto.useXYZ();
carto.setRequestor(requestor);
// Create a Macro point layer.
const macro = new veldt.Layer.Macro();
macro.setPipeline('elastic');
macro.setURI('twitter-index');
macro.setLOD(4);
macro.setResolution(256);
macro.setXField('pixel.x');
macro.setYField('pixel.y');
macro.setBounds(0, Math.pow(2, 32), 0, Math.pow(2, 32));
macro.setRequestor(requestor);
macro.setRenderer(new veldt.Renderer.WebGL.Macro({
radius: 4,
color: [ 0.4, 0.8, 0.2, 0.8 ]
}));
// Add layers to the map.
map.add(carto);
map.add(macro);
});
Building
Note: currently, veldt-js
requires node 8.x to build. It will not build in 10.x.
npm run build
0.18.3
12 months ago
0.18.2
3 years ago
0.18.1
4 years ago
0.18.0
5 years ago
0.17.1
6 years ago
0.17.0
6 years ago
0.16.0
6 years ago
0.15.0
6 years ago
0.14.10
6 years ago
0.14.9
6 years ago
0.14.8
6 years ago
0.14.7
6 years ago
0.14.3
6 years ago
0.14.1
7 years ago
0.14.0
7 years ago
0.13.10
7 years ago
0.13.9
7 years ago
0.13.8
7 years ago
0.13.7
7 years ago
0.13.6
7 years ago
0.13.5
7 years ago
0.13.4
7 years ago
0.13.3
7 years ago
0.13.2
7 years ago
0.13.1
7 years ago
0.13.0
7 years ago
0.12.1
7 years ago
0.12.0
7 years ago
0.11.1
7 years ago
0.11.0
7 years ago
0.10.1
7 years ago
0.10.0
7 years ago
0.9.2
7 years ago
0.9.1
7 years ago
0.9.0
7 years ago
0.8.0
7 years ago
0.7.0
7 years ago
0.6.1
7 years ago
0.6.0
7 years ago
0.5.0
7 years ago
0.4.10
7 years ago
0.4.9
7 years ago
0.4.8
7 years ago
0.4.6
7 years ago
0.4.5
7 years ago
0.4.4
7 years ago
0.4.3
7 years ago
0.4.2
7 years ago
0.4.1
7 years ago
0.4.0
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.2.0
7 years ago
0.1.1
7 years ago
0.1.0
7 years ago