Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional vtkjs #893

Merged
merged 47 commits into from
Nov 2, 2018
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a58bcab
Initial commit
aashish24 Dec 10, 2016
61da520
Fixed build that works with vtk.js
aashish24 Dec 10, 2016
6f20a82
Got vtk.js sphere to show up
aashish24 Dec 26, 2016
0680182
Cleaned up vtk implementation
aashish24 Dec 26, 2016
f14bab9
Some more cleanup
aashish24 Jan 5, 2017
11e3d49
Got something to show up
aashish24 Jan 6, 2017
02510cd
Fixed webpack configuration to work with latest vtk-js.
sankhesh Jan 25, 2018
cf6857f
Remove alias to vtk and just keep it external
sankhesh Jan 26, 2018
d19f3ac
Working point feature and sphere source
sankhesh Jan 26, 2018
bb1d32b
Initial change to pass camera parameters to vtk
sankhesh Feb 2, 2018
5dc7af3
Working vtk-js integration
sankhesh Feb 28, 2018
326a6c1
Support actor properties
sankhesh Mar 19, 2018
a6b0d17
Explicitly use the user provided projection transform
sankhesh Mar 19, 2018
fd1803e
Working passing of key matrices between geojs and vtk-js
sankhesh Jun 7, 2018
9b5b6cd
Working vtkjs-geojs interation integration
sankhesh Jun 7, 2018
44a07ed
Transform to map gcs in vtk-js renderer
sankhesh Jun 18, 2018
b82571d
Schedule render instead of calling vtk-js render each frame
sankhesh Jun 18, 2018
0f5784e
Code cleanup
sankhesh Jun 18, 2018
fbb996e
Use vtkGlyph3DMapper instead of multiple actors
sankhesh Jun 19, 2018
f857c65
Example of vtk-js integration
sankhesh Jun 22, 2018
6fb7225
Code comment convention cleanup
sankhesh Jul 12, 2018
0887369
Merge remote-tracking branch 'sankhesh/vtk-renderer' into optional-vtkjs
zachmullen Aug 9, 2018
5ec8c41
Merge branch 'dual-builds' into optional-vtkjs
zachmullen Aug 9, 2018
5dd9841
Reintroduce sinon dev dependency
zachmullen Aug 9, 2018
847d423
Make Unreleased changelog section for new note
zachmullen Aug 10, 2018
9c8eccb
Update version number in tutorial comment
zachmullen Aug 10, 2018
f3b30a3
Merge branch 'master' into optional-vtkjs
zachmullen Aug 10, 2018
d5bded8
Exclude vtk.js from lean bundle
zachmullen Aug 10, 2018
f91a505
Runtime conditional support pattern for vtkjsRenderer
zachmullen Aug 10, 2018
354159d
Make pointFeature depend on vtkjsRenderer.vtkjs
zachmullen Aug 10, 2018
07a2193
Downgrade sinon back to previously used version
zachmullen Aug 10, 2018
9ac8ae9
Change const -> var
zachmullen Aug 10, 2018
05b20e5
Merge branch 'master' into optional-vtkjs
manthey Aug 31, 2018
7026107
Merge remote-tracking branch 'origin/master' into optional-vtkjs
zachmullen Oct 23, 2018
cff7a47
Fix global name of vtk module
zachmullen Oct 23, 2018
83f86c8
Eslint auto-fixes
zachmullen Oct 23, 2018
841b00c
Fix typo in vtkjsRenderer.supported
zachmullen Oct 23, 2018
cf1dc09
Update to working vtk.js version
zachmullen Oct 23, 2018
0ecd708
Make vtk.js example load
zachmullen Oct 24, 2018
85fd89e
Clean up vtkjs example code
zachmullen Oct 24, 2018
3472f2b
Improve comments in vtkjs example
zachmullen Oct 24, 2018
0a490be
Hack some fixes for the vtkjs renderer and pointFeature.
manthey Oct 29, 2018
bd6b88a
Merge branch 'master' into optional-vtkjs
manthey Oct 30, 2018
d4a5cdb
More fixups for the vtkjs renderer.
manthey Oct 30, 2018
79f3a98
Keep points the same pixel size on zoom.
manthey Oct 30, 2018
c12131e
Support one color for the points.
manthey Oct 30, 2018
154bb5f
Update documentation strings and change log.
manthey Oct 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 33 additions & 67 deletions examples/vtkjs/main.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,35 @@
var exampleDebug = {};

// Run after the DOM loads
$(function () {
'use strict';

var capitals;
$.when(
/* Fetch capitals */
$.ajax({url: 'capitals.json'}).done(function (resp) {
capitals = resp;
})
).then(function () {

// Set map defaults to a reasonable center and zoom level
var mapParams = {
node: '#map',
center: {x: 0, y: 0},
zoom: 2.5,
clampBoundsX: false,
clampBoundsY: false,
clampZoom: false,
discreteZoom: false
};
// Set the tile layer defaults
var layerParams = {
zIndex: 0,
minLevel: 4,
keepLower: true,
wrapX: false,
wrapY: false
};
// Create a map object
var map = geo.map(mapParams);
// Add the tile layer with the specified parameters
var osmLayer = map.createLayer('osm', layerParams);
// Set the vtk feature layer params
var vtkLayerParams = {
renderer: 'vtkjs'
};
// Create a vtk point feature layer
var vtkLayer = map.createLayer('feature', vtkLayerParams);
var pointFeature = vtkLayer
.createFeature('point', {
selectionAPI: true,
style: {
radius: 100, // sphere radius (~0.1km)
fillColor: 'red',
fillOpacity: function () {
return Math.random();
}
}
})
.data(capitals) // bind data
.position(function (d) {
return {x: d.longitude, y: d.latitude}; // position accessor
})
.draw();

// Make variables available as a global for easier debug
exampleDebug.map = map;
exampleDebug.mapParams = mapParams;
exampleDebug.layerParams = layerParams;
exampleDebug.osmLayer = osmLayer;
exampleDebug.vtkLayerParams = vtkLayerParams;
exampleDebug.vtkLayer = vtkLayer;
exampleDebug.pointFeature = pointFeature;
$.ajax({url: 'capitals.json'}).done(function (capitals) {
// Create a map object with reasonable center and zoom level
var map = geo.map({
node: '#map',
center: {x: 0, y: 0},
zoom: 2.5,
clampBoundsX: false,
clampBoundsY: false,
clampZoom: false,
discreteZoom: false
});
// Add the tile layer with the specified parameters
map.createLayer('osm', {
zIndex: 0,
minLevel: 4,
keepLower: true,
wrapX: false,
wrapY: false
});
// Create a vtk point feature layer
var vtkLayer = map.createLayer('feature', { renderer: 'vtkjs' });
vtkLayer.createFeature('point', {
selectionAPI: true,
style: {
radius: 100, // sphere radius (~0.1km)
fillColor: 'red',
fillOpacity: Math.random
}
})
.data(capitals) // bind data
.position(function (d) {
return {x: d.longitude, y: d.latitude}; // position accessor
})
.draw();
});