From a58bcab39b1f81bc187ac6078470df2c974aae45 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Sat, 10 Dec 2016 12:39:34 -0500 Subject: [PATCH 01/41] Initial commit --- package.json | 3 +- src/index.js | 1 + src/vtkjs/index.js | 7 + src/vtkjs/pointFeature.js | 256 ++++++++++++++++++++++++++++++ src/vtkjs/vtkjsRenderer.js | 311 +++++++++++++++++++++++++++++++++++++ 5 files changed, 577 insertions(+), 1 deletion(-) create mode 100644 src/vtkjs/index.js create mode 100644 src/vtkjs/pointFeature.js create mode 100644 src/vtkjs/vtkjsRenderer.js diff --git a/package.json b/package.json index f6c06f02fc..0544d0a250 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,8 @@ "vgl": "0.3.10", "webpack": "^1.12.14", "webpack-dev-server": "^1.14.1", - "xmlbuilder": "^8.2.2" + "xmlbuilder": "^8.2.2", + "vtk.js": "^2.0.0" }, "scripts": { "build": "webpack --config webpack.config.js && webpack --config external.config.js", diff --git a/src/index.js b/src/index.js index e5bc33f61c..b3bee3877d 100644 --- a/src/index.js +++ b/src/index.js @@ -84,6 +84,7 @@ module.exports = $.extend({ d3: require('./d3'), gl: require('./gl'), canvas: require('./canvas'), + vtkjs: require('./vtkjs'), gui: require('./ui') }, require('./registry')); diff --git a/src/vtkjs/index.js b/src/vtkjs/index.js new file mode 100644 index 0000000000..3577a61f03 --- /dev/null +++ b/src/vtkjs/index.js @@ -0,0 +1,7 @@ +/** + * @namespace geo.vtkjs + */ +module.exports = { + pointFeature: require('./pointFeature'), + vtkjsRenderer: require('./vtkjsRenderer') +}; diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js new file mode 100644 index 0000000000..65c81c4ce8 --- /dev/null +++ b/src/vtkjs/pointFeature.js @@ -0,0 +1,256 @@ +var inherit = require('../inherit'); +var registerFeature = require('../registry').registerFeature; +var pointFeature = require('../pointFeature'); + +////////////////////////////////////////////////////////////////////////////// +/** + * Create a new instance of pointFeature + * + * @class geo.vtkjs.pointFeature + * @extends geo.pointFeature + * @returns {geo.vtkjs.pointFeature} + */ +////////////////////////////////////////////////////////////////////////////// +var vtkjs_pointFeature = function (arg) { + 'use strict'; + if (!(this instanceof vtkjs_pointFeature)) { + return new vtkjs_pointFeature(arg); + } + arg = arg || {}; + pointFeature.call(this, arg); + + var transform = require('../transform'); + var util = require('../util'); + var object = require('../object'); + + object.call(this); + + //////////////////////////////////////////////////////////////////////////// + /** + * @private + */ + //////////////////////////////////////////////////////////////////////////// + var m_this = this, + s_exit = this._exit, + m_actor = null, + m_mapper = null, + m_pixelWidthUniform = null, + m_aspectUniform = null, + m_dynamicDraw = arg.dynamicDraw === undefined ? false : arg.dynamicDraw, + m_primitiveShape = 'sprite', // arg can change this, below + s_init = this._init, + s_update = this._update, + vertexShaderSource = null, + fragmentShaderSource = null; + + function createVertexShader() { + // TODO + } + + function createFragmentShader() { + // TODO + } + + function pointPolygon(x, y, w, h) { + } + + function createGLPoints() { + // TODO + } + + //////////////////////////////////////////////////////////////////////////// + /** + * Return list of actors + * + * @returns {vgl.actor[]} + */ + //////////////////////////////////////////////////////////////////////////// + this.actors = function () { + // if (!m_actor) { + // return []; + // } + // return [m_actor]; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Return the number of vertices used for each point. + * + * @returns {Number} + */ + //////////////////////////////////////////////////////////////////////////// + this.verticesPerFeature = function () { + // var unit = pointPolygon(0, 0, 1, 1); + // return unit.length / 2; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Initialize + */ + //////////////////////////////////////////////////////////////////////////// + this._init = function () { + // var prog = vgl.shaderProgram(), + // vertexShader = createVertexShader(), + // fragmentShader = createFragmentShader(), + // posAttr = vgl.vertexAttribute('pos'), + // unitAttr = vgl.vertexAttribute('unit'), + // radAttr = vgl.vertexAttribute('rad'), + // strokeWidthAttr = vgl.vertexAttribute('strokeWidth'), + // fillColorAttr = vgl.vertexAttribute('fillColor'), + // fillAttr = vgl.vertexAttribute('fill'), + // strokeColorAttr = vgl.vertexAttribute('strokeColor'), + // strokeAttr = vgl.vertexAttribute('stroke'), + // fillOpacityAttr = vgl.vertexAttribute('fillOpacity'), + // strokeOpacityAttr = vgl.vertexAttribute('strokeOpacity'), + // modelViewUniform = new vgl.modelViewUniform('modelViewMatrix'), + // projectionUniform = new vgl.projectionUniform('projectionMatrix'), + // mat = vgl.material(), + // blend = vgl.blend(), + // geom = vgl.geometryData(), + // sourcePositions = vgl.sourceDataP3fv({'name': 'pos'}), + // sourceUnits = vgl.sourceDataAnyfv( + // 2, vgl.vertexAttributeKeysIndexed.One, {'name': 'unit'}), + // sourceRadius = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Two, {'name': 'rad'}), + // sourceStrokeWidth = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Three, {'name': 'strokeWidth'}), + // sourceFillColor = vgl.sourceDataAnyfv( + // 3, vgl.vertexAttributeKeysIndexed.Four, {'name': 'fillColor'}), + // sourceFill = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Five, {'name': 'fill'}), + // sourceStrokeColor = vgl.sourceDataAnyfv( + // 3, vgl.vertexAttributeKeysIndexed.Six, {'name': 'strokeColor'}), + // sourceStroke = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Seven, {'name': 'stroke'}), + // sourceAlpha = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Eight, {'name': 'fillOpacity'}), + // sourceStrokeOpacity = vgl.sourceDataAnyfv( + // 1, vgl.vertexAttributeKeysIndexed.Nine, {'name': 'strokeOpacity'}), + // primitive = new vgl.triangles(); + + // if (m_primitiveShape === 'sprite') { + // primitive = new vgl.points(); + // } + + // m_pixelWidthUniform = new vgl.floatUniform('pixelWidth', + // 2.0 / m_this.renderer().width()); + // m_aspectUniform = new vgl.floatUniform('aspect', + // m_this.renderer().width() / m_this.renderer().height()); + + // s_init.call(m_this, arg); + // m_mapper = vgl.mapper({dynamicDraw: m_dynamicDraw}); + + // // TODO: Right now this is ugly but we will fix it. + // prog.addVertexAttribute(posAttr, vgl.vertexAttributeKeys.Position); + // if (m_primitiveShape !== 'sprite') { + // prog.addVertexAttribute(unitAttr, vgl.vertexAttributeKeysIndexed.One); + // } + + // prog.addVertexAttribute(radAttr, vgl.vertexAttributeKeysIndexed.Two); + // prog.addVertexAttribute(strokeWidthAttr, vgl.vertexAttributeKeysIndexed.Three); + // prog.addVertexAttribute(fillColorAttr, vgl.vertexAttributeKeysIndexed.Four); + // prog.addVertexAttribute(fillAttr, vgl.vertexAttributeKeysIndexed.Five); + // prog.addVertexAttribute(strokeColorAttr, vgl.vertexAttributeKeysIndexed.Six); + // prog.addVertexAttribute(strokeAttr, vgl.vertexAttributeKeysIndexed.Seven); + // prog.addVertexAttribute(fillOpacityAttr, vgl.vertexAttributeKeysIndexed.Eight); + // prog.addVertexAttribute(strokeOpacityAttr, vgl.vertexAttributeKeysIndexed.Nine); + + // prog.addUniform(m_pixelWidthUniform); + // prog.addUniform(m_aspectUniform); + // prog.addUniform(modelViewUniform); + // prog.addUniform(projectionUniform); + + // prog.addShader(fragmentShader); + // prog.addShader(vertexShader); + + // mat.addAttribute(prog); + // mat.addAttribute(blend); + + // m_actor = vgl.actor(); + // m_actor.setMaterial(mat); + // m_actor.setMapper(m_mapper); + + // geom.addSource(sourcePositions); + // geom.addSource(sourceUnits); + // geom.addSource(sourceRadius); + // geom.addSource(sourceStrokeWidth); + // geom.addSource(sourceFillColor); + // geom.addSource(sourceFill); + // geom.addSource(sourceStrokeColor); + // geom.addSource(sourceStroke); + // geom.addSource(sourceAlpha); + // geom.addSource(sourceStrokeOpacity); + // geom.addPrimitive(primitive); + // m_mapper.setGeometryData(geom); + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Build + * + * @override + */ + //////////////////////////////////////////////////////////////////////////// + this._build = function () { + + // if (m_actor) { + // m_this.renderer().contextRenderer().removeActor(m_actor); + // } + + // createGLPoints(); + + // m_this.renderer().contextRenderer().addActor(m_actor); + // m_this.renderer().contextRenderer().render(); + // m_this.buildTime().modified(); + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Update + * + * @override + */ + //////////////////////////////////////////////////////////////////////////// + this._update = function () { + + // s_update.call(m_this); + + // // For now build if the data or style changes. In the future we may + // // we able to partially update the data using dynamic gl buffers. + // if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || + // m_this.updateTime().getMTime() < m_this.getMTime()) { + // m_this._build(); + // } + + // // Update uniforms + // m_pixelWidthUniform.set(2.0 / m_this.renderer().width()); + // m_aspectUniform.set(m_this.renderer().width() / + // m_this.renderer().height()); + + // m_actor.setVisible(m_this.visible()); + // m_actor.material().setBinNumber(m_this.bin()); + + // m_this.updateTime().modified(); + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Destroy + */ + //////////////////////////////////////////////////////////////////////////// + this._exit = function () { + // m_this.renderer().contextRenderer().removeActor(m_actor); + s_exit(); + }; + + m_this._init(); + return this; +}; + +inherit(vtkjs_pointFeature, pointFeature); + +// Now register it +registerFeature('vtkjs', 'point', vtkjs_pointFeature); + +module.exports = vtkjs_pointFeature; diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js new file mode 100644 index 0000000000..7ed49d692b --- /dev/null +++ b/src/vtkjs/vtkjsRenderer.js @@ -0,0 +1,311 @@ +var inherit = require('../inherit'); +var registerRenderer = require('../registry').registerRenderer; +var renderer = require('../renderer'); + + +////////////////////////////////////////////////////////////////////////////// +/** + * Create a new instance of class vtkjsRenderer + * + * @class geo.gl.vtkjsRenderer + * @extends geo.renderer + * @param canvas + * @returns {geo.gl.vtkjsRenderer} + */ +////////////////////////////////////////////////////////////////////////////// +var vtkjsRenderer = function (arg) { + 'use strict'; + + if (!(this instanceof vtkjsRenderer)) { + return new vtkjsRenderer(arg); + } + arg = arg || {}; + renderer.call(this, arg); + + var $ = require('jquery'); + var vgl = require('vgl'); + var mat4 = require('gl-mat4'); + var util = require('../util'); + var geo_event = require('../event'); + + var m_this = this, + m_contextRenderer = null, + m_viewer = null, + m_width = 0, + m_height = 0, + m_lastZoom, + m_updateCamera = false, + s_init = this._init, + s_exit = this._exit; + + /// TODO: Move this API to the base class + //////////////////////////////////////////////////////////////////////////// + /** + * Return width of the renderer + */ + //////////////////////////////////////////////////////////////////////////// + this.width = function () { + return m_width; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Return height of the renderer + */ + //////////////////////////////////////////////////////////////////////////// + this.height = function () { + return m_height; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Get context specific renderer + */ + //////////////////////////////////////////////////////////////////////////// + this.contextRenderer = function () { + return m_contextRenderer; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Get API used by the renderer + */ + //////////////////////////////////////////////////////////////////////////// + this.api = function () { + return 'vgl'; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Initialize + */ + //////////////////////////////////////////////////////////////////////////// + this._init = function () { + if (m_this.initialized()) { + return m_this; + } + + // s_init.call(m_this); + + // var canvas = $(document.createElement('canvas')); + // canvas.attr('class', 'webgl-canvas'); + // canvas.css('display', 'block'); + // $(m_this.layer().node().get(0)).append(canvas); + // m_viewer = vgl.viewer(canvas.get(0), arg.options); + // m_viewer.init(); + // m_contextRenderer = m_viewer.renderWindow().activeRenderer(); + // m_contextRenderer.setResetScene(false); + + // if (m_viewer.renderWindow().renderers().length > 0) { + // m_contextRenderer.setLayer(m_viewer.renderWindow().renderers().length); + // } + // m_this.canvas(canvas); + // /* Initialize the size of the renderer */ + // var map = m_this.layer().map(), + // mapSize = map.size(); + // m_this._resize(0, 0, mapSize.width, mapSize.height); + + // return m_this; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Handle resize event + */ + //////////////////////////////////////////////////////////////////////////// + this._resize = function (x, y, w, h) { + // var renderWindow = m_viewer.renderWindow(); + + // m_width = w; + // m_height = h; + // m_this.canvas().attr('width', w); + // m_this.canvas().attr('height', h); + // renderWindow.positionAndResize(x, y, w, h); + + // m_updateCamera = true; + // m_this._render(); + + // return m_this; + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Render. This actually schedules rendering for the next animation frame. + */ + //////////////////////////////////////////////////////////////////////////// + this._render = function () { + /* If we are already scheduled to render, don't schedule again. Rather, + * mark that we should render after other animation frame requests occur. + * It would be nice if we could just reschedule the call by removing and + * readding the animation frame request, but this doesn't work for if the + * reschedule occurs during another animation frame callback (it then waits + * until a subsequent frame). */ + // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); + // return m_this; + }; + + /** + * This clears the render timer and actually renders. + */ + this._renderFrame = function () { + // if (m_updateCamera) { + // m_updateCamera = false; + // m_this._updateRendererCamera(); + // } + // m_viewer.render(); + }; + + //////////////////////////////////////////////////////////////////////////// + /** + * Exit + */ + //////////////////////////////////////////////////////////////////////////// + this._exit = function () { + // m_this.canvas().remove(); + // m_viewer.exit(); + // s_exit(); + }; + + this._updateRendererCamera = function () { + var renderWindow = m_viewer.renderWindow(), + map = m_this.layer().map(), + camera = map.camera(), + rotation = map.rotation() || 0, + view = camera.view, + proj = camera.projectionMatrix; + if (proj[15]) { + /* we want positive z to be closer to the camera, but webGL does the + * converse, so reverse the z coordinates. */ + proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); + } + /* A similar kluge as in the base camera class worldToDisplay4. With this, + * we can show z values from 0 to 1. */ + proj = mat4.translate(util.mat4AsArray(), proj, + [0, 0, camera.constructor.bounds.far]); + /* Check if the rotation is a multiple of 90 */ + var basis = Math.PI / 2, + angle = rotation % basis, // move to range (-pi/2, pi/2) + ortho = (Math.min(Math.abs(angle), Math.abs(angle - basis)) < 0.00001); + renderWindow.renderers().forEach(function (renderer) { + var cam = renderer.camera(); + if (util.compareArrays(view, cam.viewMatrix()) && + util.compareArrays(proj, cam.projectionMatrix()) && + m_lastZoom === map.zoom()) { + return; + } + m_lastZoom = map.zoom(); + cam.setViewMatrix(view, true); + cam.setProjectionMatrix(proj); + var viewport = camera.viewport; + /* Test if we should align texels. We won't if the projection matrix + * is not simple, if there is a rotation that isn't a multiple of 90 + * degrees, if the viewport is not at an integer location, or if the zoom + * level is not close to an integer. + * Note that the test for the viewport is strict (val % 1 is non-zero + * if the value is not an integer), as, in general, the alignment is only + * non-integral if a percent offset or calculation was used in css + * somewhere. The test for zoom level always has some allowance for + * precision, as it is often the result of repeated computations. */ + if (proj[1] || proj[2] || proj[3] || proj[4] || proj[6] || proj[7] || + proj[8] || proj[9] || proj[11] || proj[15] !== 1 || !ortho || + (viewport.left && viewport.left % 1) || + (viewport.top && viewport.top % 1) || + (parseFloat(m_lastZoom.toFixed(6)) !== + parseFloat(m_lastZoom.toFixed(0)))) { + /* Don't align texels */ + cam.viewAlignment = function () { + return null; + }; + } else { + /* Set information for texel alignment. The rounding factors should + * probably be divided by window.devicePixelRatio. */ + cam.viewAlignment = function () { + var align = { + roundx: 2.0 / viewport.width, + roundy: 2.0 / viewport.height + }; + align.dx = (viewport.width % 2) ? align.roundx * 0.5 : 0; + align.dy = (viewport.height % 2) ? align.roundy * 0.5 : 0; + return align; + }; + } + }); + }; + + // Connect to pan event. This is sufficient, as all zooms and rotations also + // produce a pan + m_this.layer().geoOn(geo_event.pan, function (evt) { + // void (evt); + // m_updateCamera = true; + }); + + // Connect to parallelprojection event + m_this.layer().geoOn(geo_event.parallelprojection, function (evt) { + // var vglRenderer = m_this.contextRenderer(), + // camera, + // layer = m_this.layer(); + + // if (evt.geo && evt.geo._triggeredBy !== layer) { + // if (!vglRenderer || !vglRenderer.camera()) { + // console.log('Parallel projection event triggered on unconnected VGL ' + + // 'renderer.'); + // return; + // } + // camera = vglRenderer.camera(); + // camera.setEnableParallelProjection(evt.parallelProjection); + // m_updateCamera = true; + // } + }); + + return this; +}; + +inherit(vtkjsRenderer, renderer); + +registerRenderer('vtkjs', vtkjsRenderer); + +// (function () { +// 'use strict'; + +// var checkedWebGL; + +// /** +// * Report if the vgl renderer is supported. This is just a check if webGL is +// * supported and available. +// * +// * @returns {boolean} true if available. +// */ +// vglRenderer.supported = function () { +// if (checkedWebGL === undefined) { +// /* This is extracted from what Modernizr uses. */ +// var canvas, ctx, exts; // eslint-disable-line no-unused-vars +// try { +// canvas = document.createElement('canvas'); +// ctx = (canvas.getContext('webgl') || +// canvas.getContext('experimental-webgl')); +// exts = ctx.getSupportedExtensions(); +// checkedWebGL = true; +// } catch (e) { +// console.error('No webGL support'); +// checkedWebGL = false; +// } +// canvas = undefined; +// ctx = undefined; +// exts = undefined; +// } +// return checkedWebGL; +// }; + +// /** +// * If the vgl renderer is not supported, supply the name of a renderer that +// * should be used instead. This asks for the null renderer. +// * +// * @returns null for the null renderer. +// */ +// vglRenderer.fallback = function () { +// return null; +// }; + +// })(); + +module.exports = vtkjsRenderer; From 61da520e1ac77a0306a8dbc59f16521524fb5a52 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Sat, 10 Dec 2016 15:47:14 -0500 Subject: [PATCH 02/41] Fixed build that works with vtk.js --- examples/points/main.js | 2 +- package.json | 15 +++++++++++++-- src/vtkjs/pointFeature.js | 33 ++++++++++++++++++++++++--------- src/vtkjs/vtkjsRenderer.js | 13 +++++++++++-- webpack-examples.config.js | 6 ++++++ webpack.config.js | 4 +++- 6 files changed, 58 insertions(+), 15 deletions(-) diff --git a/examples/points/main.js b/examples/points/main.js index 349c8b0faa..1f130b7e25 100644 --- a/examples/points/main.js +++ b/examples/points/main.js @@ -73,7 +73,7 @@ $(function () { var svgLayer = map.createLayer( 'feature', { - renderer: 'd3' + renderer: 'vtkjs' } ); diff --git a/package.json b/package.json index 0544d0a250..b758703ea5 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,16 @@ "hammerjs": "^2.0.8" }, "devDependencies": { +<<<<<<< HEAD +======= + "babel-core": "^6.0.0", + "babel-loader": "^6.0.0", + "babel-plugin-istanbul": "2.0.0", + "babel-polyfill": "6.13.0", + "babel-preset-react": "^6.16.0", + "babel-preset-stage-2": "^6.18.0", + "blanket": "~1.2", +>>>>>>> Fixed build that works with vtk.js "body-parser": "^1.15.0", "bootstrap": "^3.3.6", "bootswatch": "^3.3.6", @@ -78,6 +88,7 @@ "raw-body": "^2.1.6", "sinon": "1.17.3", "string-replace-webpack-plugin": "^0.1.3", + "string-replace-loader": "1.0.5", "style-loader": "^0.13.1", "stylus": "^0.54.5", "stylus-loader": "^2.4.0", @@ -85,10 +96,10 @@ "typeface-lato": "^0.0.44", "url-loader": "^0.5.7", "vgl": "0.3.10", + "vtk.js": "github:kitware/vtk-js", "webpack": "^1.12.14", "webpack-dev-server": "^1.14.1", - "xmlbuilder": "^8.2.2", - "vtk.js": "^2.0.0" + "xmlbuilder": "^8.2.2" }, "scripts": { "build": "webpack --config webpack.config.js && webpack --config external.config.js", diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 65c81c4ce8..6c5c2f99e3 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -1,7 +1,18 @@ +var vtkjs = require('vtk.js'); var inherit = require('../inherit'); var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); +// import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; +// import vtkSphereSource from 'vtk.js/Sources/Filters/Sources/SphereSource'; +// import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; + +var vtkActor = require('vtk.js/Sources/Rendering/Core/Actor'); + +// import vtkActor from '../../../../../Sources/Rendering/Core/Actor'; +// import vtkSphereSource from '../../../../../Sources/Filters/Sources/SphereSource'; +// import vtkMapper from '../../../../../Sources/Rendering/Core/Mapper'; + ////////////////////////////////////////////////////////////////////////////// /** * Create a new instance of pointFeature @@ -194,15 +205,19 @@ var vtkjs_pointFeature = function (arg) { //////////////////////////////////////////////////////////////////////////// this._build = function () { - // if (m_actor) { - // m_this.renderer().contextRenderer().removeActor(m_actor); - // } - - // createGLPoints(); - - // m_this.renderer().contextRenderer().addActor(m_actor); - // m_this.renderer().contextRenderer().render(); - // m_this.buildTime().modified(); + if (m_actor) { + m_this.renderer().contextRenderer().removeActor(m_actor); + } + + const sphereSource = vtkSphereSource.newInstance(); + const actor = vtkActor.newInstance(); + const mapper = vtkMapper.newInstance(); + actor.getProperty().setEdgeVisibility(true); + mapper.setInputConnection(sphereSource.getOutputPort()); + actor.setMapper(mapper); + m_this.renderer().contextRenderer().addActor(actor); + m_actor = actor; + m_this.buildTime().modified(); }; //////////////////////////////////////////////////////////////////////////// diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 7ed49d692b..3799b5b074 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -1,6 +1,9 @@ var inherit = require('../inherit'); var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); +var vtkOpenGLRenderWindow = require('vtk.js/Sources/Rendering/OpenGL/RenderWindow'); +var vtkRenderer = require('vtk.js/Sources/Rendering/Core/Renderer'); +var vtkRenderWindow = require('vtk.js/Sources/Rendering/Core/RenderWindow'); ////////////////////////////////////////////////////////////////////////////// @@ -38,6 +41,10 @@ var vtkjsRenderer = function (arg) { s_init = this._init, s_exit = this._exit; + const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0, 0, 0] }); + const vtkjsren = fullScreenRenderer.getRenderer(); + const renderWindow = fullScreenRenderer.getRenderWindow(); + /// TODO: Move this API to the base class //////////////////////////////////////////////////////////////////////////// /** @@ -63,7 +70,7 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this.contextRenderer = function () { - return m_contextRenderer; + return renderWindow.getRenderer(); }; //////////////////////////////////////////////////////////////////////////// @@ -72,7 +79,7 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this.api = function () { - return 'vgl'; + return 'vtkjs'; }; //////////////////////////////////////////////////////////////////////////// @@ -142,6 +149,7 @@ var vtkjsRenderer = function (arg) { * until a subsequent frame). */ // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); // return m_this; + renderWindow.render(); }; /** @@ -153,6 +161,7 @@ var vtkjsRenderer = function (arg) { // m_this._updateRendererCamera(); // } // m_viewer.render(); + renderWindow.render(); }; //////////////////////////////////////////////////////////////////////////// diff --git a/webpack-examples.config.js b/webpack-examples.config.js index c0c2a2d2ea..9a9f4186e9 100644 --- a/webpack-examples.config.js +++ b/webpack-examples.config.js @@ -8,6 +8,12 @@ var external = require('./external.config'); var loaders = base.module.loaders.concat([{ test: /\.pug$/, loader: 'pug' +}, { + test: /\.css$/, + loader: 'style-loader!css-loader' +}, { + test: /\.jade$/, + loader: 'jade' }, { test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/font-woff' diff --git a/webpack.config.js b/webpack.config.js index f5d6b71577..230a31a3cc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ var path = require('path'); var webpack = require('webpack'); var exec = require('child_process').execSync; var sha = ''; +var loaders = require('./node_modules/vtk.js/Utilities/config/webpack.loaders.js'); if (!exec) { console.warn('Node 0.12 or greater is required for detecting the git hash.'); @@ -66,7 +67,8 @@ module.exports = { }, { test: /vgl\.js$/, loader: 'expose?vgl!imports?mat4=gl-mat4,vec4=gl-vec4,vec3=gl-vec3,vec2=gl-vec2,$=jquery' - }] + } + ].concat(loaders) }, // These are plugins that we want to run in Karma as well From 6f20a8296dcb91262f3dde15c070cc94de6e75c3 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Sun, 25 Dec 2016 19:41:31 -0500 Subject: [PATCH 03/41] Got vtk.js sphere to show up --- src/vtkjs/pointFeature.js | 25 ++++++++++--------------- src/vtkjs/vtkjsRenderer.js | 3 ++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 6c5c2f99e3..3719217913 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -3,15 +3,10 @@ var inherit = require('../inherit'); var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); -// import vtkActor from 'vtk.js/Sources/Rendering/Core/Actor'; -// import vtkSphereSource from 'vtk.js/Sources/Filters/Sources/SphereSource'; -// import vtkMapper from 'vtk.js/Sources/Rendering/Core/Mapper'; var vtkActor = require('vtk.js/Sources/Rendering/Core/Actor'); - -// import vtkActor from '../../../../../Sources/Rendering/Core/Actor'; -// import vtkSphereSource from '../../../../../Sources/Filters/Sources/SphereSource'; -// import vtkMapper from '../../../../../Sources/Rendering/Core/Mapper'; +var vtkMapper = require('vtk.js/Sources/Rendering/Core/Mapper'); +var vtkSphereSource = require('vtk.js/Sources/Filters/Sources/SphereSource'); ////////////////////////////////////////////////////////////////////////////// /** @@ -229,14 +224,14 @@ var vtkjs_pointFeature = function (arg) { //////////////////////////////////////////////////////////////////////////// this._update = function () { - // s_update.call(m_this); + s_update.call(m_this); - // // For now build if the data or style changes. In the future we may - // // we able to partially update the data using dynamic gl buffers. - // if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || - // m_this.updateTime().getMTime() < m_this.getMTime()) { - // m_this._build(); - // } + // For now build if the data or style changes. In the future we may + // we able to partially update the data using dynamic gl buffers. + if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || + m_this.updateTime().getMTime() < m_this.getMTime()) { + m_this._build(); + } // // Update uniforms // m_pixelWidthUniform.set(2.0 / m_this.renderer().width()); @@ -246,7 +241,7 @@ var vtkjs_pointFeature = function (arg) { // m_actor.setVisible(m_this.visible()); // m_actor.material().setBinNumber(m_this.bin()); - // m_this.updateTime().modified(); + m_this.updateTime().modified(); }; //////////////////////////////////////////////////////////////////////////// diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 3799b5b074..75176b5299 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -2,6 +2,7 @@ var inherit = require('../inherit'); var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); var vtkOpenGLRenderWindow = require('vtk.js/Sources/Rendering/OpenGL/RenderWindow'); +var vtkFullScreenRenderWindow = require('vtk.js/Sources/Testing/FullScreenRenderWindow'); var vtkRenderer = require('vtk.js/Sources/Rendering/Core/Renderer'); var vtkRenderWindow = require('vtk.js/Sources/Rendering/Core/RenderWindow'); @@ -70,7 +71,7 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this.contextRenderer = function () { - return renderWindow.getRenderer(); + return renderWindow.getRenderers()[0]; }; //////////////////////////////////////////////////////////////////////////// From 06801828b27b36b25472ec87fc0c87ab469bdc13 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Sun, 25 Dec 2016 20:44:30 -0500 Subject: [PATCH 04/41] Cleaned up vtk implementation --- examples/points/main.js | 39 ++++---- src/vtkjs/pointFeature.js | 151 +---------------------------- src/vtkjs/vtkjsRenderer.js | 188 ++++++++++++++----------------------- 3 files changed, 97 insertions(+), 281 deletions(-) diff --git a/examples/points/main.js b/examples/points/main.js index 1f130b7e25..74049bce0a 100644 --- a/examples/points/main.js +++ b/examples/points/main.js @@ -52,25 +52,25 @@ $(function () { }); // Create an osm layer with custom tile url for a white background. - map.createLayer( - 'osm', - { - url: function () { - return 'white.jpg'; - } - } - ); + // map.createLayer( + // 'osm', + // { + // url: function () { + // return 'white.jpg'; + // } + // } + // ); - // Create a gl feature layer - var vglLayer = map.createLayer( - 'feature', - { - renderer: 'vgl' - } - ); + // // Create a gl feature layer + // var vglLayer = map.createLayer( + // 'feature', + // { + // renderer: 'vgl' + // } + // ); // Create an svg feature layer - var svgLayer = map.createLayer( + var vtkjsLayer = map.createLayer( 'feature', { renderer: 'vtkjs' @@ -90,7 +90,7 @@ $(function () { opacity: 0.1 // fill opacity }; }); - makePoints(data, vglLayer, vglColor); + // makePoints(data, vglLayer, vglColor); // Generate some data for svg data = d3.range(2).map(function (i) { @@ -101,5 +101,8 @@ $(function () { opacity: 0.1 // fill opacity }; }); - makePoints(data, svgLayer, svgColor); + makePoints(data, vtkjsLayer, svgColor); + + // TODO: For now we need this extra call. + map.draw(); }); diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 3719217913..473a0ec664 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -45,50 +45,8 @@ var vtkjs_pointFeature = function (arg) { m_dynamicDraw = arg.dynamicDraw === undefined ? false : arg.dynamicDraw, m_primitiveShape = 'sprite', // arg can change this, below s_init = this._init, - s_update = this._update, - vertexShaderSource = null, - fragmentShaderSource = null; + s_update = this._update; - function createVertexShader() { - // TODO - } - - function createFragmentShader() { - // TODO - } - - function pointPolygon(x, y, w, h) { - } - - function createGLPoints() { - // TODO - } - - //////////////////////////////////////////////////////////////////////////// - /** - * Return list of actors - * - * @returns {vgl.actor[]} - */ - //////////////////////////////////////////////////////////////////////////// - this.actors = function () { - // if (!m_actor) { - // return []; - // } - // return [m_actor]; - }; - - //////////////////////////////////////////////////////////////////////////// - /** - * Return the number of vertices used for each point. - * - * @returns {Number} - */ - //////////////////////////////////////////////////////////////////////////// - this.verticesPerFeature = function () { - // var unit = pointPolygon(0, 0, 1, 1); - // return unit.length / 2; - }; //////////////////////////////////////////////////////////////////////////// /** @@ -96,99 +54,6 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._init = function () { - // var prog = vgl.shaderProgram(), - // vertexShader = createVertexShader(), - // fragmentShader = createFragmentShader(), - // posAttr = vgl.vertexAttribute('pos'), - // unitAttr = vgl.vertexAttribute('unit'), - // radAttr = vgl.vertexAttribute('rad'), - // strokeWidthAttr = vgl.vertexAttribute('strokeWidth'), - // fillColorAttr = vgl.vertexAttribute('fillColor'), - // fillAttr = vgl.vertexAttribute('fill'), - // strokeColorAttr = vgl.vertexAttribute('strokeColor'), - // strokeAttr = vgl.vertexAttribute('stroke'), - // fillOpacityAttr = vgl.vertexAttribute('fillOpacity'), - // strokeOpacityAttr = vgl.vertexAttribute('strokeOpacity'), - // modelViewUniform = new vgl.modelViewUniform('modelViewMatrix'), - // projectionUniform = new vgl.projectionUniform('projectionMatrix'), - // mat = vgl.material(), - // blend = vgl.blend(), - // geom = vgl.geometryData(), - // sourcePositions = vgl.sourceDataP3fv({'name': 'pos'}), - // sourceUnits = vgl.sourceDataAnyfv( - // 2, vgl.vertexAttributeKeysIndexed.One, {'name': 'unit'}), - // sourceRadius = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Two, {'name': 'rad'}), - // sourceStrokeWidth = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Three, {'name': 'strokeWidth'}), - // sourceFillColor = vgl.sourceDataAnyfv( - // 3, vgl.vertexAttributeKeysIndexed.Four, {'name': 'fillColor'}), - // sourceFill = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Five, {'name': 'fill'}), - // sourceStrokeColor = vgl.sourceDataAnyfv( - // 3, vgl.vertexAttributeKeysIndexed.Six, {'name': 'strokeColor'}), - // sourceStroke = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Seven, {'name': 'stroke'}), - // sourceAlpha = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Eight, {'name': 'fillOpacity'}), - // sourceStrokeOpacity = vgl.sourceDataAnyfv( - // 1, vgl.vertexAttributeKeysIndexed.Nine, {'name': 'strokeOpacity'}), - // primitive = new vgl.triangles(); - - // if (m_primitiveShape === 'sprite') { - // primitive = new vgl.points(); - // } - - // m_pixelWidthUniform = new vgl.floatUniform('pixelWidth', - // 2.0 / m_this.renderer().width()); - // m_aspectUniform = new vgl.floatUniform('aspect', - // m_this.renderer().width() / m_this.renderer().height()); - - // s_init.call(m_this, arg); - // m_mapper = vgl.mapper({dynamicDraw: m_dynamicDraw}); - - // // TODO: Right now this is ugly but we will fix it. - // prog.addVertexAttribute(posAttr, vgl.vertexAttributeKeys.Position); - // if (m_primitiveShape !== 'sprite') { - // prog.addVertexAttribute(unitAttr, vgl.vertexAttributeKeysIndexed.One); - // } - - // prog.addVertexAttribute(radAttr, vgl.vertexAttributeKeysIndexed.Two); - // prog.addVertexAttribute(strokeWidthAttr, vgl.vertexAttributeKeysIndexed.Three); - // prog.addVertexAttribute(fillColorAttr, vgl.vertexAttributeKeysIndexed.Four); - // prog.addVertexAttribute(fillAttr, vgl.vertexAttributeKeysIndexed.Five); - // prog.addVertexAttribute(strokeColorAttr, vgl.vertexAttributeKeysIndexed.Six); - // prog.addVertexAttribute(strokeAttr, vgl.vertexAttributeKeysIndexed.Seven); - // prog.addVertexAttribute(fillOpacityAttr, vgl.vertexAttributeKeysIndexed.Eight); - // prog.addVertexAttribute(strokeOpacityAttr, vgl.vertexAttributeKeysIndexed.Nine); - - // prog.addUniform(m_pixelWidthUniform); - // prog.addUniform(m_aspectUniform); - // prog.addUniform(modelViewUniform); - // prog.addUniform(projectionUniform); - - // prog.addShader(fragmentShader); - // prog.addShader(vertexShader); - - // mat.addAttribute(prog); - // mat.addAttribute(blend); - - // m_actor = vgl.actor(); - // m_actor.setMaterial(mat); - // m_actor.setMapper(m_mapper); - - // geom.addSource(sourcePositions); - // geom.addSource(sourceUnits); - // geom.addSource(sourceRadius); - // geom.addSource(sourceStrokeWidth); - // geom.addSource(sourceFillColor); - // geom.addSource(sourceFill); - // geom.addSource(sourceStrokeColor); - // geom.addSource(sourceStroke); - // geom.addSource(sourceAlpha); - // geom.addSource(sourceStrokeOpacity); - // geom.addPrimitive(primitive); - // m_mapper.setGeometryData(geom); }; //////////////////////////////////////////////////////////////////////////// @@ -213,6 +78,8 @@ var vtkjs_pointFeature = function (arg) { m_this.renderer().contextRenderer().addActor(actor); m_actor = actor; m_this.buildTime().modified(); + + console.debug("built vtkjs point feature"); }; //////////////////////////////////////////////////////////////////////////// @@ -226,21 +93,11 @@ var vtkjs_pointFeature = function (arg) { s_update.call(m_this); - // For now build if the data or style changes. In the future we may - // we able to partially update the data using dynamic gl buffers. if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || m_this.updateTime().getMTime() < m_this.getMTime()) { m_this._build(); } - // // Update uniforms - // m_pixelWidthUniform.set(2.0 / m_this.renderer().width()); - // m_aspectUniform.set(m_this.renderer().width() / - // m_this.renderer().height()); - - // m_actor.setVisible(m_this.visible()); - // m_actor.material().setBinNumber(m_this.bin()); - m_this.updateTime().modified(); }; @@ -250,7 +107,7 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._exit = function () { - // m_this.renderer().contextRenderer().removeActor(m_actor); + m_this.renderer().contextRenderer().removeActor(m_actor); s_exit(); }; diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 75176b5299..8d0a08dd1d 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -93,7 +93,7 @@ var vtkjsRenderer = function (arg) { return m_this; } - // s_init.call(m_this); + s_init.call(m_this); // var canvas = $(document.createElement('canvas')); // canvas.attr('class', 'webgl-canvas'); @@ -108,10 +108,10 @@ var vtkjsRenderer = function (arg) { // m_contextRenderer.setLayer(m_viewer.renderWindow().renderers().length); // } // m_this.canvas(canvas); - // /* Initialize the size of the renderer */ - // var map = m_this.layer().map(), - // mapSize = map.size(); - // m_this._resize(0, 0, mapSize.width, mapSize.height); + /* Initialize the size of the renderer */ + var map = m_this.layer().map(), + mapSize = map.size(); + m_this._resize(0, 0, mapSize.width, mapSize.height); // return m_this; }; @@ -131,9 +131,9 @@ var vtkjsRenderer = function (arg) { // renderWindow.positionAndResize(x, y, w, h); // m_updateCamera = true; - // m_this._render(); + m_this._render(); - // return m_this; + return m_this; }; //////////////////////////////////////////////////////////////////////////// @@ -176,71 +176,71 @@ var vtkjsRenderer = function (arg) { // s_exit(); }; - this._updateRendererCamera = function () { - var renderWindow = m_viewer.renderWindow(), - map = m_this.layer().map(), - camera = map.camera(), - rotation = map.rotation() || 0, - view = camera.view, - proj = camera.projectionMatrix; - if (proj[15]) { - /* we want positive z to be closer to the camera, but webGL does the - * converse, so reverse the z coordinates. */ - proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); - } - /* A similar kluge as in the base camera class worldToDisplay4. With this, - * we can show z values from 0 to 1. */ - proj = mat4.translate(util.mat4AsArray(), proj, - [0, 0, camera.constructor.bounds.far]); - /* Check if the rotation is a multiple of 90 */ - var basis = Math.PI / 2, - angle = rotation % basis, // move to range (-pi/2, pi/2) - ortho = (Math.min(Math.abs(angle), Math.abs(angle - basis)) < 0.00001); - renderWindow.renderers().forEach(function (renderer) { - var cam = renderer.camera(); - if (util.compareArrays(view, cam.viewMatrix()) && - util.compareArrays(proj, cam.projectionMatrix()) && - m_lastZoom === map.zoom()) { - return; - } - m_lastZoom = map.zoom(); - cam.setViewMatrix(view, true); - cam.setProjectionMatrix(proj); - var viewport = camera.viewport; - /* Test if we should align texels. We won't if the projection matrix - * is not simple, if there is a rotation that isn't a multiple of 90 - * degrees, if the viewport is not at an integer location, or if the zoom - * level is not close to an integer. - * Note that the test for the viewport is strict (val % 1 is non-zero - * if the value is not an integer), as, in general, the alignment is only - * non-integral if a percent offset or calculation was used in css - * somewhere. The test for zoom level always has some allowance for - * precision, as it is often the result of repeated computations. */ - if (proj[1] || proj[2] || proj[3] || proj[4] || proj[6] || proj[7] || - proj[8] || proj[9] || proj[11] || proj[15] !== 1 || !ortho || - (viewport.left && viewport.left % 1) || - (viewport.top && viewport.top % 1) || - (parseFloat(m_lastZoom.toFixed(6)) !== - parseFloat(m_lastZoom.toFixed(0)))) { - /* Don't align texels */ - cam.viewAlignment = function () { - return null; - }; - } else { - /* Set information for texel alignment. The rounding factors should - * probably be divided by window.devicePixelRatio. */ - cam.viewAlignment = function () { - var align = { - roundx: 2.0 / viewport.width, - roundy: 2.0 / viewport.height - }; - align.dx = (viewport.width % 2) ? align.roundx * 0.5 : 0; - align.dy = (viewport.height % 2) ? align.roundy * 0.5 : 0; - return align; - }; - } - }); - }; + // this._updateRendererCamera = function () { + // var renderWindow = m_viewer.renderWindow(), + // map = m_this.layer().map(), + // camera = map.camera(), + // rotation = map.rotation() || 0, + // view = camera.view, + // proj = camera.projectionMatrix; + // if (proj[15]) { + // /* we want positive z to be closer to the camera, but webGL does the + // * converse, so reverse the z coordinates. */ + // proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); + // } + // /* A similar kluge as in the base camera class worldToDisplay4. With this, + // * we can show z values from 0 to 1. */ + // proj = mat4.translate(util.mat4AsArray(), proj, + // [0, 0, camera.constructor.bounds.far]); + // /* Check if the rotation is a multiple of 90 */ + // var basis = Math.PI / 2, + // angle = rotation % basis, // move to range (-pi/2, pi/2) + // ortho = (Math.min(Math.abs(angle), Math.abs(angle - basis)) < 0.00001); + // renderWindow.renderers().forEach(function (renderer) { + // var cam = renderer.camera(); + // if (util.compareArrays(view, cam.viewMatrix()) && + // util.compareArrays(proj, cam.projectionMatrix()) && + // m_lastZoom === map.zoom()) { + // return; + // } + // m_lastZoom = map.zoom(); + // cam.setViewMatrix(view, true); + // cam.setProjectionMatrix(proj); + // var viewport = camera.viewport; + // Test if we should align texels. We won't if the projection matrix + // * is not simple, if there is a rotation that isn't a multiple of 90 + // * degrees, if the viewport is not at an integer location, or if the zoom + // * level is not close to an integer. + // * Note that the test for the viewport is strict (val % 1 is non-zero + // * if the value is not an integer), as, in general, the alignment is only + // * non-integral if a percent offset or calculation was used in css + // * somewhere. The test for zoom level always has some allowance for + // * precision, as it is often the result of repeated computations. + // if (proj[1] || proj[2] || proj[3] || proj[4] || proj[6] || proj[7] || + // proj[8] || proj[9] || proj[11] || proj[15] !== 1 || !ortho || + // (viewport.left && viewport.left % 1) || + // (viewport.top && viewport.top % 1) || + // (parseFloat(m_lastZoom.toFixed(6)) !== + // parseFloat(m_lastZoom.toFixed(0)))) { + // /* Don't align texels */ + // cam.viewAlignment = function () { + // return null; + // }; + // } else { + // /* Set information for texel alignment. The rounding factors should + // * probably be divided by window.devicePixelRatio. */ + // cam.viewAlignment = function () { + // var align = { + // roundx: 2.0 / viewport.width, + // roundy: 2.0 / viewport.height + // }; + // align.dx = (viewport.width % 2) ? align.roundx * 0.5 : 0; + // align.dy = (viewport.height % 2) ? align.roundy * 0.5 : 0; + // return align; + // }; + // } + // }); + // }; // Connect to pan event. This is sufficient, as all zooms and rotations also // produce a pan @@ -274,48 +274,4 @@ inherit(vtkjsRenderer, renderer); registerRenderer('vtkjs', vtkjsRenderer); -// (function () { -// 'use strict'; - -// var checkedWebGL; - -// /** -// * Report if the vgl renderer is supported. This is just a check if webGL is -// * supported and available. -// * -// * @returns {boolean} true if available. -// */ -// vglRenderer.supported = function () { -// if (checkedWebGL === undefined) { -// /* This is extracted from what Modernizr uses. */ -// var canvas, ctx, exts; // eslint-disable-line no-unused-vars -// try { -// canvas = document.createElement('canvas'); -// ctx = (canvas.getContext('webgl') || -// canvas.getContext('experimental-webgl')); -// exts = ctx.getSupportedExtensions(); -// checkedWebGL = true; -// } catch (e) { -// console.error('No webGL support'); -// checkedWebGL = false; -// } -// canvas = undefined; -// ctx = undefined; -// exts = undefined; -// } -// return checkedWebGL; -// }; - -// /** -// * If the vgl renderer is not supported, supply the name of a renderer that -// * should be used instead. This asks for the null renderer. -// * -// * @returns null for the null renderer. -// */ -// vglRenderer.fallback = function () { -// return null; -// }; - -// })(); - module.exports = vtkjsRenderer; From f14bab9ffe8a8d4b1a6c36114a05b1b74a59c8eb Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Thu, 5 Jan 2017 00:14:57 -0500 Subject: [PATCH 05/41] Some more cleanup --- examples/points/main.js | 18 ++--- src/gl/vglRenderer.js | 4 ++ src/vtkjs/pointFeature.js | 60 ++++++++++++----- src/vtkjs/vtkjsRenderer.js | 133 +++++++++---------------------------- 4 files changed, 88 insertions(+), 127 deletions(-) diff --git a/examples/points/main.js b/examples/points/main.js index 74049bce0a..7f4c4edcb9 100644 --- a/examples/points/main.js +++ b/examples/points/main.js @@ -82,18 +82,18 @@ $(function () { var svgColor = 'blue'; // Generate some data for vgl - var data = d3.range(2).map(function (i) { - return { - x: -95, // longitude - y: 39.5 + 4.5 * i, // latitude - c: vglColor, // fill color - opacity: 0.1 // fill opacity - }; - }); + // var data = d3.range(2).map(function (i) { + // return { + // x: -95, // longitude + // y: 39.5 + 4.5 * i, // latitude + // c: vglColor, // fill color + // opacity: 0.1 // fill opacity + // }; + // }); // makePoints(data, vglLayer, vglColor); // Generate some data for svg - data = d3.range(2).map(function (i) { + var data = d3.range(1).map(function (i) { return { x: -101, // longitude y: 39.5 + 4.5 * i, // latitude diff --git a/src/gl/vglRenderer.js b/src/gl/vglRenderer.js index 7e16f5eb85..d7856737c6 100644 --- a/src/gl/vglRenderer.js +++ b/src/gl/vglRenderer.js @@ -244,6 +244,10 @@ var vglRenderer = function (arg) { } m_lastZoom = map.zoom(); cam.setViewMatrix(view, true); + + console.debug(view); + console.debug(proj); + cam.setProjectionMatrix(proj); var viewport = camera.viewport; /* Test if we should align texels. We won't if the projection matrix diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 473a0ec664..e6c2a17252 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -7,6 +7,7 @@ var pointFeature = require('../pointFeature'); var vtkActor = require('vtk.js/Sources/Rendering/Core/Actor'); var vtkMapper = require('vtk.js/Sources/Rendering/Core/Mapper'); var vtkSphereSource = require('vtk.js/Sources/Filters/Sources/SphereSource'); +var vtkPlaneSource = require('vtk.js/Sources/Filters/Sources/PlaneSource'); ////////////////////////////////////////////////////////////////////////////// /** @@ -38,8 +39,7 @@ var vtkjs_pointFeature = function (arg) { //////////////////////////////////////////////////////////////////////////// var m_this = this, s_exit = this._exit, - m_actor = null, - m_mapper = null, + m_actors = [], m_pixelWidthUniform = null, m_aspectUniform = null, m_dynamicDraw = arg.dynamicDraw === undefined ? false : arg.dynamicDraw, @@ -64,20 +64,50 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._build = function () { - - if (m_actor) { - m_this.renderer().contextRenderer().removeActor(m_actor); + var i, j, i3, posVal, posFunc, + radius, radiusVal, nonzeroZ, + numPts = m_this.data().length, + position = new Array(numPts * 3), + data = m_this.data(), + posFunc = m_this.position(), + radFunc = m_this.style.get('radius'); + + if (m_actors) { + m_this.renderer().contextRenderer().removeActor(m_actors); } - const sphereSource = vtkSphereSource.newInstance(); - const actor = vtkActor.newInstance(); - const mapper = vtkMapper.newInstance(); - actor.getProperty().setEdgeVisibility(true); - mapper.setInputConnection(sphereSource.getOutputPort()); - actor.setMapper(mapper); - m_this.renderer().contextRenderer().addActor(actor); - m_actor = actor; - m_this.buildTime().modified(); + /* It is more efficient to do a transform on a single array rather than on + * an array of arrays or an array of objects. */ + for (i = i3 = 0; i < numPts; i += 1, i3 += 3) + { + posVal = posFunc(data[i]); + position[i3] = posVal.x; + position[i3 + 1] = posVal.y; + position[i3 + 2] = posVal.z || 0; + nonzeroZ = nonzeroZ || position[i3 + 2]; + } + // position = transform.transformCoordinates( + // m_this.gcs(), m_this.layer().map().gcs(), + // position, 3); + /* Some transforms modify the z-coordinate. If we started with all zero z + * coordinates, don't modify them. This could be changed if the + * z-coordinate space of the gl cube is scaled appropriately. */ + if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { + for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { + position[i3 + 2] = 0; + var source = vtkSphereSource.newInstance(); + source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); + source.setRadius(100.0); + var actor = vtkActor.newInstance(); + var mapper = vtkMapper.newInstance(); + actor.getProperty().setEdgeVisibility(true); + mapper.setInputConnection(source.getOutputPort()); + actor.setMapper(mapper); + m_this.renderer().contextRenderer().addActor(actor); + m_actors.push(actor); + } + m_this.buildTime().modified(); + } console.debug("built vtkjs point feature"); }; @@ -107,7 +137,7 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._exit = function () { - m_this.renderer().contextRenderer().removeActor(m_actor); + m_this.renderer().contextRenderer().removeActor(m_actors); s_exit(); }; diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 8d0a08dd1d..3aefd8997f 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -42,7 +42,7 @@ var vtkjsRenderer = function (arg) { s_init = this._init, s_exit = this._exit; - const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0, 0, 0] }); + const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); const vtkjsren = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); @@ -71,7 +71,7 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this.contextRenderer = function () { - return renderWindow.getRenderers()[0]; + return vtkjsren; }; //////////////////////////////////////////////////////////////////////////// @@ -95,25 +95,11 @@ var vtkjsRenderer = function (arg) { s_init.call(m_this); - // var canvas = $(document.createElement('canvas')); - // canvas.attr('class', 'webgl-canvas'); - // canvas.css('display', 'block'); - // $(m_this.layer().node().get(0)).append(canvas); - // m_viewer = vgl.viewer(canvas.get(0), arg.options); - // m_viewer.init(); - // m_contextRenderer = m_viewer.renderWindow().activeRenderer(); - // m_contextRenderer.setResetScene(false); - - // if (m_viewer.renderWindow().renderers().length > 0) { - // m_contextRenderer.setLayer(m_viewer.renderWindow().renderers().length); - // } - // m_this.canvas(canvas); /* Initialize the size of the renderer */ var map = m_this.layer().map(), mapSize = map.size(); m_this._resize(0, 0, mapSize.width, mapSize.height); - - // return m_this; + return m_this; }; //////////////////////////////////////////////////////////////////////////// @@ -150,6 +136,11 @@ var vtkjsRenderer = function (arg) { * until a subsequent frame). */ // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); // return m_this; + + m_this.contextRenderer().resetCamera(); + renderWindow.render(); + m_this.contextRenderer().resetCamera(); + m_this._updateRendererCamera(); renderWindow.render(); }; @@ -157,11 +148,7 @@ var vtkjsRenderer = function (arg) { * This clears the render timer and actually renders. */ this._renderFrame = function () { - // if (m_updateCamera) { - // m_updateCamera = false; - // m_this._updateRendererCamera(); - // } - // m_viewer.render(); + m_this._updateRendererCamera(); renderWindow.render(); }; @@ -176,95 +163,35 @@ var vtkjsRenderer = function (arg) { // s_exit(); }; - // this._updateRendererCamera = function () { - // var renderWindow = m_viewer.renderWindow(), - // map = m_this.layer().map(), - // camera = map.camera(), - // rotation = map.rotation() || 0, - // view = camera.view, - // proj = camera.projectionMatrix; - // if (proj[15]) { - // /* we want positive z to be closer to the camera, but webGL does the - // * converse, so reverse the z coordinates. */ - // proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); - // } - // /* A similar kluge as in the base camera class worldToDisplay4. With this, - // * we can show z values from 0 to 1. */ - // proj = mat4.translate(util.mat4AsArray(), proj, - // [0, 0, camera.constructor.bounds.far]); - // /* Check if the rotation is a multiple of 90 */ - // var basis = Math.PI / 2, - // angle = rotation % basis, // move to range (-pi/2, pi/2) - // ortho = (Math.min(Math.abs(angle), Math.abs(angle - basis)) < 0.00001); - // renderWindow.renderers().forEach(function (renderer) { - // var cam = renderer.camera(); - // if (util.compareArrays(view, cam.viewMatrix()) && - // util.compareArrays(proj, cam.projectionMatrix()) && - // m_lastZoom === map.zoom()) { - // return; - // } - // m_lastZoom = map.zoom(); - // cam.setViewMatrix(view, true); - // cam.setProjectionMatrix(proj); - // var viewport = camera.viewport; - // Test if we should align texels. We won't if the projection matrix - // * is not simple, if there is a rotation that isn't a multiple of 90 - // * degrees, if the viewport is not at an integer location, or if the zoom - // * level is not close to an integer. - // * Note that the test for the viewport is strict (val % 1 is non-zero - // * if the value is not an integer), as, in general, the alignment is only - // * non-integral if a percent offset or calculation was used in css - // * somewhere. The test for zoom level always has some allowance for - // * precision, as it is often the result of repeated computations. - // if (proj[1] || proj[2] || proj[3] || proj[4] || proj[6] || proj[7] || - // proj[8] || proj[9] || proj[11] || proj[15] !== 1 || !ortho || - // (viewport.left && viewport.left % 1) || - // (viewport.top && viewport.top % 1) || - // (parseFloat(m_lastZoom.toFixed(6)) !== - // parseFloat(m_lastZoom.toFixed(0)))) { - // /* Don't align texels */ - // cam.viewAlignment = function () { - // return null; - // }; - // } else { - // /* Set information for texel alignment. The rounding factors should - // * probably be divided by window.devicePixelRatio. */ - // cam.viewAlignment = function () { - // var align = { - // roundx: 2.0 / viewport.width, - // roundy: 2.0 / viewport.height - // }; - // align.dx = (viewport.width % 2) ? align.roundx * 0.5 : 0; - // align.dy = (viewport.height % 2) ? align.roundy * 0.5 : 0; - // return align; - // }; - // } - // }); - // }; + this._updateRendererCamera = function () { + var map = m_this.layer().map(), + camera = map.camera(), + rotation = map.rotation() || 0, + view = camera.view, + proj = camera.projectionMatrix; + if (proj[15]) { + /* we want positive z to be closer to the camera, but webGL does the + * converse, so reverse the z coordinates. */ + proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); + } + /* A similar kluge as in the base camera class worldToDisplay4. With this, + * we can show z values from 0 to 1. */ + proj = mat4.translate(util.mat4AsArray(), proj, + [0, 0, camera.constructor.bounds.far]); + + m_this.contextRenderer().getActiveCamera().setViewTransformMatrix(view); + m_this.contextRenderer().getActiveCamera().setProjectionTransformMatrix(proj); + }; // Connect to pan event. This is sufficient, as all zooms and rotations also // produce a pan m_this.layer().geoOn(geo_event.pan, function (evt) { - // void (evt); - // m_updateCamera = true; + // DO NOTHING }); // Connect to parallelprojection event m_this.layer().geoOn(geo_event.parallelprojection, function (evt) { - // var vglRenderer = m_this.contextRenderer(), - // camera, - // layer = m_this.layer(); - - // if (evt.geo && evt.geo._triggeredBy !== layer) { - // if (!vglRenderer || !vglRenderer.camera()) { - // console.log('Parallel projection event triggered on unconnected VGL ' + - // 'renderer.'); - // return; - // } - // camera = vglRenderer.camera(); - // camera.setEnableParallelProjection(evt.parallelProjection); - // m_updateCamera = true; - // } + // DO NOTHING }); return this; From 11e3d494e240f25d02f154b661d2baeb3d4c27c2 Mon Sep 17 00:00:00 2001 From: Aashish Chaudhary Date: Thu, 5 Jan 2017 23:37:21 -0500 Subject: [PATCH 06/41] Got something to show up The problem is that we will have to transform every vtkPoints to destination gcs (like geotransform in vtk) and then we can have reasonable near and far and also proper radius --- src/camera.js | 4 ++-- src/vtkjs/pointFeature.js | 38 +++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/camera.js b/src/camera.js index 4a5c3e54da..0ce760e484 100644 --- a/src/camera.js +++ b/src/camera.js @@ -862,8 +862,8 @@ right: 1, top: 1, bottom: -1, - far: -2, - near: -1 + far: -100000, + near: 100000 }; /** diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index e6c2a17252..297841cc7e 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -86,28 +86,32 @@ var vtkjs_pointFeature = function (arg) { position[i3 + 2] = posVal.z || 0; nonzeroZ = nonzeroZ || position[i3 + 2]; } - // position = transform.transformCoordinates( - // m_this.gcs(), m_this.layer().map().gcs(), - // position, 3); - /* Some transforms modify the z-coordinate. If we started with all zero z - * coordinates, don't modify them. This could be changed if the - * z-coordinate space of the gl cube is scaled appropriately. */ + position = transform.transformCoordinates( + m_this.gcs(), m_this.layer().map().gcs(), + position, 3); + if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { position[i3 + 2] = 0; - var source = vtkSphereSource.newInstance(); - source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); - source.setRadius(100.0); - var actor = vtkActor.newInstance(); - var mapper = vtkMapper.newInstance(); - actor.getProperty().setEdgeVisibility(true); - mapper.setInputConnection(source.getOutputPort()); - actor.setMapper(mapper); - m_this.renderer().contextRenderer().addActor(actor); - m_actors.push(actor); } - m_this.buildTime().modified(); } + /* Some transforms modify the z-coordinate. If we started with all zero z + * coordinates, don't modify them. This could be changed if the + * z-coordinate space of the gl cube is scaled appropriately. */ + for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { + var source = vtkSphereSource.newInstance(); + source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); + source.setRadius(100000.0); + var actor = vtkActor.newInstance(); + var mapper = vtkMapper.newInstance(); + actor.getProperty().setEdgeVisibility(true); + mapper.setInputConnection(source.getOutputPort()); + actor.setMapper(mapper); + m_this.renderer().contextRenderer().addActor(actor); + m_actors.push(actor); + } + m_this.buildTime().modified(); + console.debug("built vtkjs point feature"); }; From 02510cd0eeda7e83e2fefb7348c6e76782379ee1 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Thu, 25 Jan 2018 14:24:20 -0500 Subject: [PATCH 07/41] Fixed webpack configuration to work with latest vtk-js. The changes include: - Create an alias `vtk` to the compiled `vtk.js` in the `vtk.js/dist` director. - Comment out passing the whole code-base through Uglify.js. --- external.config.js | 5 ++++- package.json | 3 --- src/vtkjs/pointFeature.js | 8 ++++---- src/vtkjs/vtkjsRenderer.js | 9 +++++---- webpack.config.js | 15 +++++++++------ 5 files changed, 22 insertions(+), 18 deletions(-) diff --git a/external.config.js b/external.config.js index 3d1aaccf9a..f16c559005 100644 --- a/external.config.js +++ b/external.config.js @@ -15,7 +15,8 @@ module.exports = { resolve: { alias: { d3: 'd3/d3.js', - hammerjs: 'hammerjs/hammer.js' + hammerjs: 'hammerjs/hammer.js', + vtk: 'vtk.js/dist/vtk.js' } }, plugins: [ @@ -30,6 +31,8 @@ module.exports = { test: require.resolve('d3'), loader: 'expose?d3' }, { test: require.resolve('hammerjs'), loader: 'expose?hammerjs' + }, { + test: require.resolve('vtk.js'), loader: 'expose?vtk' }] } }; diff --git a/package.json b/package.json index b758703ea5..fac29ac340 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,6 @@ "hammerjs": "^2.0.8" }, "devDependencies": { -<<<<<<< HEAD -======= "babel-core": "^6.0.0", "babel-loader": "^6.0.0", "babel-plugin-istanbul": "2.0.0", @@ -25,7 +23,6 @@ "babel-preset-react": "^6.16.0", "babel-preset-stage-2": "^6.18.0", "blanket": "~1.2", ->>>>>>> Fixed build that works with vtk.js "body-parser": "^1.15.0", "bootstrap": "^3.3.6", "bootswatch": "^3.3.6", diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 297841cc7e..b26762f1a1 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -4,10 +4,10 @@ var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); -var vtkActor = require('vtk.js/Sources/Rendering/Core/Actor'); -var vtkMapper = require('vtk.js/Sources/Rendering/Core/Mapper'); -var vtkSphereSource = require('vtk.js/Sources/Filters/Sources/SphereSource'); -var vtkPlaneSource = require('vtk.js/Sources/Filters/Sources/PlaneSource'); +var vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); +var vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); +var vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); +var vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); ////////////////////////////////////////////////////////////////////////////// /** diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 3aefd8997f..4b26817c84 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -1,10 +1,11 @@ var inherit = require('../inherit'); var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); -var vtkOpenGLRenderWindow = require('vtk.js/Sources/Rendering/OpenGL/RenderWindow'); -var vtkFullScreenRenderWindow = require('vtk.js/Sources/Testing/FullScreenRenderWindow'); -var vtkRenderer = require('vtk.js/Sources/Rendering/Core/Renderer'); -var vtkRenderWindow = require('vtk.js/Sources/Rendering/Core/RenderWindow'); +var vtk = require('vtk'); +//var vtkOpenGLRenderWindow;// = require('vtk.js/Sources/Rendering/OpenGL/RenderWindow'); +//var vtkFullScreenRenderWindow;// = require('vtk.js/Sources/Testing/FullScreenRenderWindow'); +//var vtkRenderer;// = require('vtk.js/Sources/Rendering/Core/Renderer'); +//var vtkRenderWindow;// = require('vtk.js/Sources/Rendering/Core/RenderWindow'); ////////////////////////////////////////////////////////////////////////////// diff --git a/webpack.config.js b/webpack.config.js index 230a31a3cc..2a86b5871d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,7 +2,7 @@ var path = require('path'); var webpack = require('webpack'); var exec = require('child_process').execSync; var sha = ''; -var loaders = require('./node_modules/vtk.js/Utilities/config/webpack.loaders.js'); +// var loaders = require('./node_modules/vtk.js/Utilities/config/dependency.js').webpack.v1.loaders; if (!exec) { console.warn('Node 0.12 or greater is required for detecting the git hash.'); @@ -34,6 +34,7 @@ module.exports = { }, resolve: { alias: { + vtk: 'vtk.js/dist/vtk.js', jquery: 'jquery/dist/jquery', proj4: 'proj4/lib', vgl: 'vgl/vgl.js', @@ -44,15 +45,16 @@ module.exports = { }, externals: { d3: 'd3', - hammerjs: 'Hammer' + hammerjs: 'Hammer', + vtk: 'vtk.js' }, plugins: [ - define_plugin, - new webpack.optimize.UglifyJsPlugin({ + define_plugin + /* new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/, minimize: true, comments: /@(license|copyright)/ - }) + })*/ ], module: { loaders: [{ @@ -68,7 +70,8 @@ module.exports = { test: /vgl\.js$/, loader: 'expose?vgl!imports?mat4=gl-mat4,vec4=gl-vec4,vec3=gl-vec3,vec2=gl-vec2,$=jquery' } - ].concat(loaders) + ] + // .concat(loaders) }, // These are plugins that we want to run in Karma as well From cf6857f1444b7d27d2037dc8fd6d9077307a0753 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Fri, 26 Jan 2018 13:35:58 -0500 Subject: [PATCH 08/41] Remove alias to vtk and just keep it external Comment out passing through UglifyJs --- external.config.js | 17 +++++++---------- package.json | 12 +++++++----- webpack.config.js | 3 +-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/external.config.js b/external.config.js index f16c559005..649597a8f4 100644 --- a/external.config.js +++ b/external.config.js @@ -16,23 +16,20 @@ module.exports = { alias: { d3: 'd3/d3.js', hammerjs: 'hammerjs/hammer.js', - vtk: 'vtk.js/dist/vtk.js' } }, - plugins: [ - new webpack.optimize.UglifyJsPlugin({ - include: /\.min\.js$/, - minimize: true, - comments: /@(license|copyright)/ - }) - ], +// plugins: [ +// new webpack.optimize.UglifyJsPlugin({ +// include: /\.min\.js$/, +// minimize: true, +// comments: /@(license|copyright)/ +// }) +// ], module: { loaders: [{ test: require.resolve('d3'), loader: 'expose?d3' }, { test: require.resolve('hammerjs'), loader: 'expose?hammerjs' - }, { - test: require.resolve('vtk.js'), loader: 'expose?vtk' }] } }; diff --git a/package.json b/package.json index fac29ac340..7790816200 100644 --- a/package.json +++ b/package.json @@ -56,14 +56,14 @@ "jaguarjs-jsdoc": "^1.0.2", "jasmine-core": "^2.4.1", "jquery": "~2.2.1", + "js-yaml": "^3.10.0", "jsdoc": "^3.5", "jsdoc-autoprivate": "0.0.1", "json-loader": "^0.5.4", "jstransformer-markdown-it": "^2.0.0", - "js-yaml": "^3.10.0", "karma": "^0.13.22", - "karma-coverage": "^1.0.0", "karma-chrome-launcher": "^2.2.0", + "karma-coverage": "^1.0.0", "karma-firefox-launcher": "^1.0.1", "karma-jasmine": "^1.0.2", "karma-jasmine-html-reporter": "^0.2.0", @@ -84,8 +84,8 @@ "pug-loader": "^2.3.0", "raw-body": "^2.1.6", "sinon": "1.17.3", - "string-replace-webpack-plugin": "^0.1.3", "string-replace-loader": "1.0.5", + "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.13.1", "stylus": "^0.54.5", "stylus-loader": "^2.4.0", @@ -93,7 +93,6 @@ "typeface-lato": "^0.0.44", "url-loader": "^0.5.7", "vgl": "0.3.10", - "vtk.js": "github:kitware/vtk-js", "webpack": "^1.12.14", "webpack-dev-server": "^1.14.1", "xmlbuilder": "^8.2.2" @@ -133,5 +132,8 @@ "webgl", "svg" ], - "main": "geo.js" + "main": "geo.js", + "dependencies": { + "vtk.js": "^5.15.6" + } } diff --git a/webpack.config.js b/webpack.config.js index 2a86b5871d..916af69972 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -34,7 +34,6 @@ module.exports = { }, resolve: { alias: { - vtk: 'vtk.js/dist/vtk.js', jquery: 'jquery/dist/jquery', proj4: 'proj4/lib', vgl: 'vgl/vgl.js', @@ -46,7 +45,7 @@ module.exports = { externals: { d3: 'd3', hammerjs: 'Hammer', - vtk: 'vtk.js' + vtkjs: 'vtk.js' }, plugins: [ define_plugin From d19f3ac471aaf830589bd155069fd76e8b245b89 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Fri, 26 Jan 2018 16:15:51 -0500 Subject: [PATCH 09/41] Working point feature and sphere source --- src/vtkjs/pointFeature.js | 11 +++++------ src/vtkjs/vtkjsRenderer.js | 12 ++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index b26762f1a1..e9d707713f 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -1,13 +1,12 @@ -var vtkjs = require('vtk.js'); +var vtk = require('vtk.js'); var inherit = require('../inherit'); var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); - -var vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); -var vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); -var vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); -var vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); +var vtkActor = vtk.Rendering.Core.vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); +var vtkMapper = vtk.Rendering.Core.vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); +var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); +// var vtkPlaneSource = vtk.Filters.Sources.vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); ////////////////////////////////////////////////////////////////////////////// /** diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 4b26817c84..d1568689ec 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -1,12 +1,8 @@ var inherit = require('../inherit'); var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); -var vtk = require('vtk'); -//var vtkOpenGLRenderWindow;// = require('vtk.js/Sources/Rendering/OpenGL/RenderWindow'); -//var vtkFullScreenRenderWindow;// = require('vtk.js/Sources/Testing/FullScreenRenderWindow'); -//var vtkRenderer;// = require('vtk.js/Sources/Rendering/Core/Renderer'); -//var vtkRenderWindow;// = require('vtk.js/Sources/Rendering/Core/RenderWindow'); - +var vtk = require('vtk.js'); +var vtkFullScreenRenderWindow = vtk.Rendering.Misc.vtkFullScreenRenderWindow; ////////////////////////////////////////////////////////////////////////////// /** @@ -180,8 +176,8 @@ var vtkjsRenderer = function (arg) { proj = mat4.translate(util.mat4AsArray(), proj, [0, 0, camera.constructor.bounds.far]); - m_this.contextRenderer().getActiveCamera().setViewTransformMatrix(view); - m_this.contextRenderer().getActiveCamera().setProjectionTransformMatrix(proj); + // m_this.contextRenderer().getActiveCamera().setViewTransformMatrix(view); + // m_this.contextRenderer().getActiveCamera().setProjectionTransformMatrix(proj); }; // Connect to pan event. This is sufficient, as all zooms and rotations also From bb1d32b474cfc996f93815daf5aee556f44fd08e Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Fri, 2 Feb 2018 17:07:06 -0500 Subject: [PATCH 10/41] Initial change to pass camera parameters to vtk --- src/vtkjs/vtkjsRenderer.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index d1568689ec..252a716935 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -134,8 +134,8 @@ var vtkjsRenderer = function (arg) { // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); // return m_this; - m_this.contextRenderer().resetCamera(); - renderWindow.render(); + // m_this.contextRenderer().resetCamera(); + // renderWindow.render(); m_this.contextRenderer().resetCamera(); m_this._updateRendererCamera(); renderWindow.render(); @@ -176,8 +176,14 @@ var vtkjsRenderer = function (arg) { proj = mat4.translate(util.mat4AsArray(), proj, [0, 0, camera.constructor.bounds.far]); - // m_this.contextRenderer().getActiveCamera().setViewTransformMatrix(view); - // m_this.contextRenderer().getActiveCamera().setProjectionTransformMatrix(proj); + console.log(`VTKJS: viewMat: ${m_this.contextRenderer().getActiveCamera().getViewMatrix()}`); + console.log(`GEOJS: viewMat: ${view}`); + console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); + console.log(`GEOJS: projMat: ${proj}`); + m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(camera.world); + m_this.contextRenderer().getActiveCamera().setProjectionMatrix(proj); + // camera.view = m_this.contextRenderer().getActiveCamera().getViewMatrix(); + // camera.projectionMatrix = m_this.contextRenderer().getActiveCamera().getProjectionMatrix(); }; // Connect to pan event. This is sufficient, as all zooms and rotations also From 5dc7af39ec75d83bdbc5567e1f4c14c0a3c55175 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Wed, 28 Feb 2018 15:08:14 -0500 Subject: [PATCH 11/41] Working vtk-js integration --- src/vtkjs/pointFeature.js | 20 +++++++++++--------- src/vtkjs/vtkjsRenderer.js | 17 +++++++++-------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index e9d707713f..fa2f7dfa7b 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -5,7 +5,7 @@ var pointFeature = require('../pointFeature'); var vtkActor = vtk.Rendering.Core.vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); var vtkMapper = vtk.Rendering.Core.vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); -var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); +var vtkConeSource = vtk.Filters.Sources.vtkConeSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); // var vtkPlaneSource = vtk.Filters.Sources.vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); ////////////////////////////////////////////////////////////////////////////// @@ -89,24 +89,26 @@ var vtkjs_pointFeature = function (arg) { m_this.gcs(), m_this.layer().map().gcs(), position, 3); - if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { - for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - position[i3 + 2] = 0; - } - } + // if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { + // for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { + // position[i3 + 2] = 0; + // } + // } + /* Some transforms modify the z-coordinate. If we started with all zero z * coordinates, don't modify them. This could be changed if the * z-coordinate space of the gl cube is scaled appropriately. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - var source = vtkSphereSource.newInstance(); - source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); - source.setRadius(100000.0); + var source = vtkConeSource.newInstance(); + // source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); + // source.setRadius(100000.0); var actor = vtkActor.newInstance(); var mapper = vtkMapper.newInstance(); actor.getProperty().setEdgeVisibility(true); mapper.setInputConnection(source.getOutputPort()); actor.setMapper(mapper); m_this.renderer().contextRenderer().addActor(actor); + m_this.renderer().contextRenderer().setLayer(1); m_actors.push(actor); } m_this.buildTime().modified(); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 252a716935..6400df4a5e 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -166,21 +166,22 @@ var vtkjsRenderer = function (arg) { rotation = map.rotation() || 0, view = camera.view, proj = camera.projectionMatrix; - if (proj[15]) { - /* we want positive z to be closer to the camera, but webGL does the - * converse, so reverse the z coordinates. */ - proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); - } + // if (proj[15]) { + /* we want positive z to be closer to the camera, but webGL does the + * converse, so reverse the z coordinates. */ + // proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); + // } /* A similar kluge as in the base camera class worldToDisplay4. With this, * we can show z values from 0 to 1. */ - proj = mat4.translate(util.mat4AsArray(), proj, - [0, 0, camera.constructor.bounds.far]); + // proj = mat4.translate(util.mat4AsArray(), proj, + // [0, 0, camera.constructor.bounds.far]); console.log(`VTKJS: viewMat: ${m_this.contextRenderer().getActiveCamera().getViewMatrix()}`); console.log(`GEOJS: viewMat: ${view}`); console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); console.log(`GEOJS: projMat: ${proj}`); - m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(camera.world); + // m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(view); + m_this.contextRenderer().getActiveCamera().setViewMatrix(view); m_this.contextRenderer().getActiveCamera().setProjectionMatrix(proj); // camera.view = m_this.contextRenderer().getActiveCamera().getViewMatrix(); // camera.projectionMatrix = m_this.contextRenderer().getActiveCamera().getProjectionMatrix(); From 326a6c1754a82260e615f9fef372a42d6e881ac5 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Mon, 19 Mar 2018 16:43:07 -0500 Subject: [PATCH 12/41] Support actor properties --- src/vtkjs/pointFeature.js | 24 ++++++++++++++---------- src/vtkjs/vtkjsRenderer.js | 8 ++++---- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index fa2f7dfa7b..5ddb519f9a 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -5,7 +5,7 @@ var pointFeature = require('../pointFeature'); var vtkActor = vtk.Rendering.Core.vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); var vtkMapper = vtk.Rendering.Core.vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); -var vtkConeSource = vtk.Filters.Sources.vtkConeSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); +var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); // var vtkPlaneSource = vtk.Filters.Sources.vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); ////////////////////////////////////////////////////////////////////////////// @@ -69,7 +69,9 @@ var vtkjs_pointFeature = function (arg) { position = new Array(numPts * 3), data = m_this.data(), posFunc = m_this.position(), - radFunc = m_this.style.get('radius'); + radFunc = m_this.style.get('radius'), + colorFunc = m_this.style.get('fillColor'), + opacityFunc = m_this.style.get('fillOpacity'); if (m_actors) { m_this.renderer().contextRenderer().removeActor(m_actors); @@ -85,28 +87,30 @@ var vtkjs_pointFeature = function (arg) { position[i3 + 2] = posVal.z || 0; nonzeroZ = nonzeroZ || position[i3 + 2]; } - position = transform.transformCoordinates( - m_this.gcs(), m_this.layer().map().gcs(), - position, 3); + // position = transform.transformCoordinates( + // m_this.gcs(), m_this.layer().map().gcs(), + // position, 3); // if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { // for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { // position[i3 + 2] = 0; // } // } - + /* Some transforms modify the z-coordinate. If we started with all zero z * coordinates, don't modify them. This could be changed if the * z-coordinate space of the gl cube is scaled appropriately. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - var source = vtkConeSource.newInstance(); - // source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); - // source.setRadius(100000.0); + var source = vtkSphereSource.newInstance(); + source.setRadius(radFunc()); + source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); + source.setThetaResolution(20); var actor = vtkActor.newInstance(); var mapper = vtkMapper.newInstance(); - actor.getProperty().setEdgeVisibility(true); mapper.setInputConnection(source.getOutputPort()); actor.setMapper(mapper); + actor.getProperty().setColor(colorFunc()['r'], colorFunc()['g'], colorFunc()['b']); + actor.getProperty().setOpacity(opacityFunc(data[i])); m_this.renderer().contextRenderer().addActor(actor); m_this.renderer().contextRenderer().setLayer(1); m_actors.push(actor); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 6400df4a5e..e43335e444 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -176,10 +176,10 @@ var vtkjsRenderer = function (arg) { // proj = mat4.translate(util.mat4AsArray(), proj, // [0, 0, camera.constructor.bounds.far]); - console.log(`VTKJS: viewMat: ${m_this.contextRenderer().getActiveCamera().getViewMatrix()}`); - console.log(`GEOJS: viewMat: ${view}`); - console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); - console.log(`GEOJS: projMat: ${proj}`); + // console.log(`VTKJS: viewMat: ${m_this.contextRenderer().getActiveCamera().getViewMatrix()}`); + // console.log(`GEOJS: viewMat: ${view}`); + // console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); + // console.log(`GEOJS: projMat: ${proj}`); // m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(view); m_this.contextRenderer().getActiveCamera().setViewMatrix(view); m_this.contextRenderer().getActiveCamera().setProjectionMatrix(proj); From a6b0d170a388bd4841f4b8c8c82b5b61b64a1290 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Mon, 19 Mar 2018 16:53:43 -0500 Subject: [PATCH 13/41] Explicitly use the user provided projection transform --- src/vtkjs/vtkjsRenderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index e43335e444..bce15c5085 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -41,6 +41,7 @@ var vtkjsRenderer = function (arg) { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); const vtkjsren = fullScreenRenderer.getRenderer(); + vtkjsren.getActiveCamera().setUserProvidedProjectionMatrix(true); const renderWindow = fullScreenRenderer.getRenderWindow(); /// TODO: Move this API to the base class From fd1803e01303aea25460ba090cb04262dbcd28c8 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Thu, 7 Jun 2018 09:56:38 -0400 Subject: [PATCH 14/41] Working passing of key matrices between geojs and vtk-js The caveat is that geojs needs to call resetCamera and setClippingRange on vtk-js camera. --- src/camera.js | 7 +++++++ src/vtkjs/pointFeature.js | 14 +++++++++++--- src/vtkjs/vtkjsRenderer.js | 18 ++++++++++++++---- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/camera.js b/src/camera.js index 0ce760e484..66aff5b711 100644 --- a/src/camera.js +++ b/src/camera.js @@ -619,6 +619,7 @@ // reset view to the identity this._resetView(); + console.log('center', center, 'size', size, 'rotation', rotation); w = Math.abs(size.width); h = Math.abs(size.height); c_ar = w / h; @@ -636,11 +637,15 @@ scale[1] = 2 / h; } + console.log('Before scale', this._view); scale[2] = 1; this._scale(scale); + console.log('After scale', this._view); + console.log('Before rotation', this._view); if (rotation) { this._rotate(rotation); + console.log('After rotation', this._view); } // translate to the new center. @@ -648,7 +653,9 @@ translate[1] = -center.y; translate[2] = 0; + console.log('Before Translation', this._view); this._translate(translate); + console.log('After Translation', this._view); return this; }; diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 5ddb519f9a..1ae94c795e 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -64,7 +64,8 @@ var vtkjs_pointFeature = function (arg) { //////////////////////////////////////////////////////////////////////////// this._build = function () { var i, j, i3, posVal, posFunc, - radius, radiusVal, nonzeroZ, + radius, radiusVal, + // nonzeroZ, numPts = m_this.data().length, position = new Array(numPts * 3), data = m_this.data(), @@ -84,8 +85,10 @@ var vtkjs_pointFeature = function (arg) { posVal = posFunc(data[i]); position[i3] = posVal.x; position[i3 + 1] = posVal.y; + // position[i3 + 2] = 0.0; position[i3 + 2] = posVal.z || 0; - nonzeroZ = nonzeroZ || position[i3 + 2]; + // console.log('Point positions: ', position); + // nonzeroZ = nonzeroZ || position[i3 + 2]; } // position = transform.transformCoordinates( // m_this.gcs(), m_this.layer().map().gcs(), @@ -104,7 +107,7 @@ var vtkjs_pointFeature = function (arg) { var source = vtkSphereSource.newInstance(); source.setRadius(radFunc()); source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); - source.setThetaResolution(20); + source.setThetaResolution(30); var actor = vtkActor.newInstance(); var mapper = vtkMapper.newInstance(); mapper.setInputConnection(source.getOutputPort()); @@ -136,6 +139,11 @@ var vtkjs_pointFeature = function (arg) { m_this.updateTime().getMTime() < m_this.getMTime()) { m_this._build(); } + // if (m_actors) { + // m_actors.forEach(function(actor) { + // actor.getMapper().update(); + // }); + // } m_this.updateTime().modified(); }; diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index bce15c5085..8cc7d6460b 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -42,6 +42,7 @@ var vtkjsRenderer = function (arg) { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); const vtkjsren = fullScreenRenderer.getRenderer(); vtkjsren.getActiveCamera().setUserProvidedProjectionMatrix(true); + vtkjsren.getActiveCamera().setUserProvidedViewMatrix(true); const renderWindow = fullScreenRenderer.getRenderWindow(); /// TODO: Move this API to the base class @@ -135,9 +136,8 @@ var vtkjsRenderer = function (arg) { // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); // return m_this; - // m_this.contextRenderer().resetCamera(); - // renderWindow.render(); m_this.contextRenderer().resetCamera(); + // renderWindow.render(); m_this._updateRendererCamera(); renderWindow.render(); }; @@ -182,8 +182,18 @@ var vtkjsRenderer = function (arg) { // console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); // console.log(`GEOJS: projMat: ${proj}`); // m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(view); - m_this.contextRenderer().getActiveCamera().setViewMatrix(view); - m_this.contextRenderer().getActiveCamera().setProjectionMatrix(proj); + const viewmat = mat4.create(); + mat4.copy(viewmat, view); + // viewmat[0] = 1; + // viewmat[5] = 1; + // mat4.transpose(viewmat, viewmat); + const projmat = mat4.create(); + mat4.copy(projmat, proj); + m_this.contextRenderer().getActiveCamera().setClippingRange(camera.constructor.bounds.near, + camera.constructor.bounds.far); + m_this.contextRenderer().getActiveCamera().setViewMatrix(viewmat); + m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); + // console.log('VTK: ', m_this.contextRenderer().getActiveCamera().getViewMatrix()); // camera.view = m_this.contextRenderer().getActiveCamera().getViewMatrix(); // camera.projectionMatrix = m_this.contextRenderer().getActiveCamera().getProjectionMatrix(); }; From 9b5b6cd3ab28ef6d1f19c0df491536d9839a57a7 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Thu, 7 Jun 2018 12:05:21 -0400 Subject: [PATCH 15/41] Working vtkjs-geojs interation integration Needs code cleanup --- src/vtkjs/pointFeature.js | 1 + src/vtkjs/vtkjsRenderer.js | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 1ae94c795e..1298490187 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -114,6 +114,7 @@ var vtkjs_pointFeature = function (arg) { actor.setMapper(mapper); actor.getProperty().setColor(colorFunc()['r'], colorFunc()['g'], colorFunc()['b']); actor.getProperty().setOpacity(opacityFunc(data[i])); + actor.getProperty().setAmbient(1.0); m_this.renderer().contextRenderer().addActor(actor); m_this.renderer().contextRenderer().setLayer(1); m_actors.push(actor); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 8cc7d6460b..c029ff6b3b 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -41,8 +41,6 @@ var vtkjsRenderer = function (arg) { const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); const vtkjsren = fullScreenRenderer.getRenderer(); - vtkjsren.getActiveCamera().setUserProvidedProjectionMatrix(true); - vtkjsren.getActiveCamera().setUserProvidedViewMatrix(true); const renderWindow = fullScreenRenderer.getRenderWindow(); /// TODO: Move this API to the base class @@ -136,8 +134,6 @@ var vtkjsRenderer = function (arg) { // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); // return m_this; - m_this.contextRenderer().resetCamera(); - // renderWindow.render(); m_this._updateRendererCamera(); renderWindow.render(); }; @@ -189,8 +185,8 @@ var vtkjsRenderer = function (arg) { // mat4.transpose(viewmat, viewmat); const projmat = mat4.create(); mat4.copy(projmat, proj); - m_this.contextRenderer().getActiveCamera().setClippingRange(camera.constructor.bounds.near, - camera.constructor.bounds.far); + //m_this.contextRenderer().getActiveCamera().setClippingRange(camera.constructor.bounds.near, + // camera.constructor.bounds.far); m_this.contextRenderer().getActiveCamera().setViewMatrix(viewmat); m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); // console.log('VTK: ', m_this.contextRenderer().getActiveCamera().getViewMatrix()); From 44a07ed2c6660317ce8cf9fcd591cf39e526d310 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Mon, 18 Jun 2018 18:22:55 -0400 Subject: [PATCH 16/41] Transform to map gcs in vtk-js renderer --- src/vtkjs/pointFeature.js | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 1298490187..23ea6d94ce 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -65,7 +65,7 @@ var vtkjs_pointFeature = function (arg) { this._build = function () { var i, j, i3, posVal, posFunc, radius, radiusVal, - // nonzeroZ, + nonzeroZ, numPts = m_this.data().length, position = new Array(numPts * 3), data = m_this.data(), @@ -85,20 +85,18 @@ var vtkjs_pointFeature = function (arg) { posVal = posFunc(data[i]); position[i3] = posVal.x; position[i3 + 1] = posVal.y; - // position[i3 + 2] = 0.0; position[i3 + 2] = posVal.z || 0; - // console.log('Point positions: ', position); - // nonzeroZ = nonzeroZ || position[i3 + 2]; + nonzeroZ = nonzeroZ || position[i3 + 2]; + } + position = transform.transformCoordinates( + m_this.gcs(), m_this.layer().map().gcs(), + position, 3); + + if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { + for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { + position[i3 + 2] = 0; + } } - // position = transform.transformCoordinates( - // m_this.gcs(), m_this.layer().map().gcs(), - // position, 3); - - // if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { - // for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - // position[i3 + 2] = 0; - // } - // } /* Some transforms modify the z-coordinate. If we started with all zero z * coordinates, don't modify them. This could be changed if the @@ -140,11 +138,6 @@ var vtkjs_pointFeature = function (arg) { m_this.updateTime().getMTime() < m_this.getMTime()) { m_this._build(); } - // if (m_actors) { - // m_actors.forEach(function(actor) { - // actor.getMapper().update(); - // }); - // } m_this.updateTime().modified(); }; From b82571de0661a2ee284a10241f82c94de308a371 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Mon, 18 Jun 2018 18:30:21 -0400 Subject: [PATCH 17/41] Schedule render instead of calling vtk-js render each frame --- src/vtkjs/vtkjsRenderer.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index c029ff6b3b..248df06b81 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -131,11 +131,8 @@ var vtkjsRenderer = function (arg) { * readding the animation frame request, but this doesn't work for if the * reschedule occurs during another animation frame callback (it then waits * until a subsequent frame). */ - // m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); - // return m_this; - - m_this._updateRendererCamera(); - renderWindow.render(); + m_this.layer().map().scheduleAnimationFrame(this._renderFrame, true); + return m_this; }; /** From 0f5784e25f18fe2f4704cf8d588bd86f13573a17 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Mon, 18 Jun 2018 18:30:39 -0400 Subject: [PATCH 18/41] Code cleanup --- src/camera.js | 7 ------ src/vtkjs/pointFeature.js | 25 ++++++------------- src/vtkjs/vtkjsRenderer.js | 50 +++----------------------------------- 3 files changed, 11 insertions(+), 71 deletions(-) diff --git a/src/camera.js b/src/camera.js index 66aff5b711..0ce760e484 100644 --- a/src/camera.js +++ b/src/camera.js @@ -619,7 +619,6 @@ // reset view to the identity this._resetView(); - console.log('center', center, 'size', size, 'rotation', rotation); w = Math.abs(size.width); h = Math.abs(size.height); c_ar = w / h; @@ -637,15 +636,11 @@ scale[1] = 2 / h; } - console.log('Before scale', this._view); scale[2] = 1; this._scale(scale); - console.log('After scale', this._view); - console.log('Before rotation', this._view); if (rotation) { this._rotate(rotation); - console.log('After rotation', this._view); } // translate to the new center. @@ -653,9 +648,7 @@ translate[1] = -center.y; translate[2] = 0; - console.log('Before Translation', this._view); this._translate(translate); - console.log('After Translation', this._view); return this; }; diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 23ea6d94ce..c57db5ef67 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -3,10 +3,9 @@ var inherit = require('../inherit'); var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); -var vtkActor = vtk.Rendering.Core.vtkActor;// = require('vtk.js/Sources/Rendering/Core/Actor'); -var vtkMapper = vtk.Rendering.Core.vtkMapper;// = require('vtk.js/Sources/Rendering/Core/Mapper'); -var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource;// = require('vtk.js/Sources/Filters/Sources/SphereSource'); -// var vtkPlaneSource = vtk.Filters.Sources.vtkPlaneSource;// = require('vtk.js/Sources/Filters/Sources/PlaneSource'); +var vtkActor = vtk.Rendering.Core.vtkActor; +var vtkMapper = vtk.Rendering.Core.vtkMapper; +var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; ////////////////////////////////////////////////////////////////////////////// /** @@ -26,7 +25,6 @@ var vtkjs_pointFeature = function (arg) { pointFeature.call(this, arg); var transform = require('../transform'); - var util = require('../util'); var object = require('../object'); object.call(this); @@ -39,14 +37,8 @@ var vtkjs_pointFeature = function (arg) { var m_this = this, s_exit = this._exit, m_actors = [], - m_pixelWidthUniform = null, - m_aspectUniform = null, - m_dynamicDraw = arg.dynamicDraw === undefined ? false : arg.dynamicDraw, - m_primitiveShape = 'sprite', // arg can change this, below - s_init = this._init, s_update = this._update; - //////////////////////////////////////////////////////////////////////////// /** * Initialize @@ -63,8 +55,7 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._build = function () { - var i, j, i3, posVal, posFunc, - radius, radiusVal, + var i, i3, posVal, nonzeroZ, numPts = m_this.data().length, position = new Array(numPts * 3), @@ -80,8 +71,7 @@ var vtkjs_pointFeature = function (arg) { /* It is more efficient to do a transform on a single array rather than on * an array of arrays or an array of objects. */ - for (i = i3 = 0; i < numPts; i += 1, i3 += 3) - { + for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { posVal = posFunc(data[i]); position[i3] = posVal.x; position[i3 + 1] = posVal.y; @@ -97,7 +87,7 @@ var vtkjs_pointFeature = function (arg) { position[i3 + 2] = 0; } } - + /* Some transforms modify the z-coordinate. If we started with all zero z * coordinates, don't modify them. This could be changed if the * z-coordinate space of the gl cube is scaled appropriately. */ @@ -119,8 +109,7 @@ var vtkjs_pointFeature = function (arg) { } m_this.buildTime().modified(); - - console.debug("built vtkjs point feature"); + console.debug('built vtkjs point feature'); }; //////////////////////////////////////////////////////////////////////////// diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 248df06b81..d17ff16ab2 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -23,23 +23,16 @@ var vtkjsRenderer = function (arg) { arg = arg || {}; renderer.call(this, arg); - var $ = require('jquery'); - var vgl = require('vgl'); var mat4 = require('gl-mat4'); - var util = require('../util'); var geo_event = require('../event'); var m_this = this, - m_contextRenderer = null, - m_viewer = null, m_width = 0, m_height = 0, - m_lastZoom, - m_updateCamera = false, - s_init = this._init, - s_exit = this._exit; + s_init = this._init; - const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); + const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ + background: [0.1, 0.5, 0.5] }); const vtkjsren = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); @@ -105,15 +98,6 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._resize = function (x, y, w, h) { - // var renderWindow = m_viewer.renderWindow(); - - // m_width = w; - // m_height = h; - // m_this.canvas().attr('width', w); - // m_this.canvas().attr('height', h); - // renderWindow.positionAndResize(x, y, w, h); - - // m_updateCamera = true; m_this._render(); return m_this; @@ -149,46 +133,20 @@ var vtkjsRenderer = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._exit = function () { - // m_this.canvas().remove(); - // m_viewer.exit(); - // s_exit(); + // DO NOTHING }; this._updateRendererCamera = function () { var map = m_this.layer().map(), camera = map.camera(), - rotation = map.rotation() || 0, view = camera.view, proj = camera.projectionMatrix; - // if (proj[15]) { - /* we want positive z to be closer to the camera, but webGL does the - * converse, so reverse the z coordinates. */ - // proj = mat4.scale(util.mat4AsArray(), proj, [1, 1, -1]); - // } - /* A similar kluge as in the base camera class worldToDisplay4. With this, - * we can show z values from 0 to 1. */ - // proj = mat4.translate(util.mat4AsArray(), proj, - // [0, 0, camera.constructor.bounds.far]); - - // console.log(`VTKJS: viewMat: ${m_this.contextRenderer().getActiveCamera().getViewMatrix()}`); - // console.log(`GEOJS: viewMat: ${view}`); - // console.log(`VTKJS: projMat: ${m_this.contextRenderer().getActiveCamera().getProjectionMatrix()}`); - // console.log(`GEOJS: projMat: ${proj}`); - // m_this.contextRenderer().getActiveCamera().computeViewParametersFromPhysicalMatrix(view); const viewmat = mat4.create(); mat4.copy(viewmat, view); - // viewmat[0] = 1; - // viewmat[5] = 1; - // mat4.transpose(viewmat, viewmat); const projmat = mat4.create(); mat4.copy(projmat, proj); - //m_this.contextRenderer().getActiveCamera().setClippingRange(camera.constructor.bounds.near, - // camera.constructor.bounds.far); m_this.contextRenderer().getActiveCamera().setViewMatrix(viewmat); m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); - // console.log('VTK: ', m_this.contextRenderer().getActiveCamera().getViewMatrix()); - // camera.view = m_this.contextRenderer().getActiveCamera().getViewMatrix(); - // camera.projectionMatrix = m_this.contextRenderer().getActiveCamera().getProjectionMatrix(); }; // Connect to pan event. This is sufficient, as all zooms and rotations also From fbb996e4e72a5ffb485bc3bf5413f8a4cbc590bf Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Tue, 19 Jun 2018 16:43:38 -0400 Subject: [PATCH 19/41] Use vtkGlyph3DMapper instead of multiple actors --- src/vtkjs/pointFeature.js | 55 +++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index c57db5ef67..bc8b440047 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -4,7 +4,8 @@ var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); var vtkActor = vtk.Rendering.Core.vtkActor; -var vtkMapper = vtk.Rendering.Core.vtkMapper; +var vtkMapper = vtk.Rendering.Core.vtkGlyph3DMapper; +var vtkPointSet = vtk.Common.DataModel.vtkPointSet; var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; ////////////////////////////////////////////////////////////////////////////// @@ -36,15 +37,37 @@ var vtkjs_pointFeature = function (arg) { //////////////////////////////////////////////////////////////////////////// var m_this = this, s_exit = this._exit, - m_actors = [], + m_actor = null, + m_pointSet = null, + m_source = null, s_update = this._update; + //////////////////////////////////////////////////////////////////////////// + /** + * Create pipeline + */ + //////////////////////////////////////////////////////////////////////////// + this._createPipeline = function () { + m_pointSet = vtkPointSet.newInstance(); + m_source = vtkSphereSource.newInstance(); + m_source.setThetaResolution(30); + m_source.setPhiResolution(30); + var mapper = vtkMapper.newInstance(); + mapper.setInputData(m_pointSet, 0); + mapper.setInputConnection(m_source.getOutputPort(), 1); + m_actor = vtkActor.newInstance(); + m_actor.setMapper(mapper); + this.renderer().contextRenderer().addActor(m_actor); + }; + //////////////////////////////////////////////////////////////////////////// /** * Initialize */ //////////////////////////////////////////////////////////////////////////// this._init = function () { + m_this.renderer().contextRenderer().setLayer(1); + this._createPipeline(); }; //////////////////////////////////////////////////////////////////////////// @@ -65,10 +88,6 @@ var vtkjs_pointFeature = function (arg) { colorFunc = m_this.style.get('fillColor'), opacityFunc = m_this.style.get('fillOpacity'); - if (m_actors) { - m_this.renderer().contextRenderer().removeActor(m_actors); - } - /* It is more efficient to do a transform on a single array rather than on * an array of arrays or an array of objects. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { @@ -77,6 +96,7 @@ var vtkjs_pointFeature = function (arg) { position[i3 + 1] = posVal.y; position[i3 + 2] = posVal.z || 0; nonzeroZ = nonzeroZ || position[i3 + 2]; + m_actor.getProperty().setOpacity(opacityFunc(data[i])); } position = transform.transformCoordinates( m_this.gcs(), m_this.layer().map().gcs(), @@ -91,22 +111,11 @@ var vtkjs_pointFeature = function (arg) { /* Some transforms modify the z-coordinate. If we started with all zero z * coordinates, don't modify them. This could be changed if the * z-coordinate space of the gl cube is scaled appropriately. */ - for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - var source = vtkSphereSource.newInstance(); - source.setRadius(radFunc()); - source.setCenter(position[i3], position[i3 + 1], position[i3 + 2]); - source.setThetaResolution(30); - var actor = vtkActor.newInstance(); - var mapper = vtkMapper.newInstance(); - mapper.setInputConnection(source.getOutputPort()); - actor.setMapper(mapper); - actor.getProperty().setColor(colorFunc()['r'], colorFunc()['g'], colorFunc()['b']); - actor.getProperty().setOpacity(opacityFunc(data[i])); - actor.getProperty().setAmbient(1.0); - m_this.renderer().contextRenderer().addActor(actor); - m_this.renderer().contextRenderer().setLayer(1); - m_actors.push(actor); - } + m_pointSet.getPoints().setData(position, 3); + m_source.setRadius(radFunc()); + m_actor.getProperty().setColor(colorFunc()['r'], + colorFunc()['g'], + colorFunc()['b']); m_this.buildTime().modified(); console.debug('built vtkjs point feature'); @@ -137,7 +146,7 @@ var vtkjs_pointFeature = function (arg) { */ //////////////////////////////////////////////////////////////////////////// this._exit = function () { - m_this.renderer().contextRenderer().removeActor(m_actors); + m_this.renderer().contextRenderer().removeActor(m_actor); s_exit(); }; From f857c65cc2faebdff7b902f812b1f2d748bcc506 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Fri, 22 Jun 2018 16:57:03 -0400 Subject: [PATCH 20/41] Example of vtk-js integration --- examples/points/main.js | 59 +++++++++++++++++------------------ examples/vtkjs/main.js | 69 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 31 deletions(-) create mode 100644 examples/vtkjs/main.js diff --git a/examples/points/main.js b/examples/points/main.js index 7f4c4edcb9..349c8b0faa 100644 --- a/examples/points/main.js +++ b/examples/points/main.js @@ -52,28 +52,28 @@ $(function () { }); // Create an osm layer with custom tile url for a white background. - // map.createLayer( - // 'osm', - // { - // url: function () { - // return 'white.jpg'; - // } - // } - // ); + map.createLayer( + 'osm', + { + url: function () { + return 'white.jpg'; + } + } + ); - // // Create a gl feature layer - // var vglLayer = map.createLayer( - // 'feature', - // { - // renderer: 'vgl' - // } - // ); + // Create a gl feature layer + var vglLayer = map.createLayer( + 'feature', + { + renderer: 'vgl' + } + ); // Create an svg feature layer - var vtkjsLayer = map.createLayer( + var svgLayer = map.createLayer( 'feature', { - renderer: 'vtkjs' + renderer: 'd3' } ); @@ -82,18 +82,18 @@ $(function () { var svgColor = 'blue'; // Generate some data for vgl - // var data = d3.range(2).map(function (i) { - // return { - // x: -95, // longitude - // y: 39.5 + 4.5 * i, // latitude - // c: vglColor, // fill color - // opacity: 0.1 // fill opacity - // }; - // }); - // makePoints(data, vglLayer, vglColor); + var data = d3.range(2).map(function (i) { + return { + x: -95, // longitude + y: 39.5 + 4.5 * i, // latitude + c: vglColor, // fill color + opacity: 0.1 // fill opacity + }; + }); + makePoints(data, vglLayer, vglColor); // Generate some data for svg - var data = d3.range(1).map(function (i) { + data = d3.range(2).map(function (i) { return { x: -101, // longitude y: 39.5 + 4.5 * i, // latitude @@ -101,8 +101,5 @@ $(function () { opacity: 0.1 // fill opacity }; }); - makePoints(data, vtkjsLayer, svgColor); - - // TODO: For now we need this extra call. - map.draw(); + makePoints(data, svgLayer, svgColor); }); diff --git a/examples/vtkjs/main.js b/examples/vtkjs/main.js new file mode 100644 index 0000000000..b03b0ceb4e --- /dev/null +++ b/examples/vtkjs/main.js @@ -0,0 +1,69 @@ +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; + }); +}); From 6fb7225f520079d451842f47887718be4e7f3948 Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Thu, 12 Jul 2018 14:50:08 -0400 Subject: [PATCH 21/41] Code comment convention cleanup --- src/vtkjs/pointFeature.js | 23 ++++------------------- src/vtkjs/vtkjsRenderer.js | 29 +++++++---------------------- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index bc8b440047..4d8e65b787 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -8,7 +8,6 @@ var vtkMapper = vtk.Rendering.Core.vtkGlyph3DMapper; var vtkPointSet = vtk.Common.DataModel.vtkPointSet; var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; -////////////////////////////////////////////////////////////////////////////// /** * Create a new instance of pointFeature * @@ -16,7 +15,6 @@ var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; * @extends geo.pointFeature * @returns {geo.vtkjs.pointFeature} */ -////////////////////////////////////////////////////////////////////////////// var vtkjs_pointFeature = function (arg) { 'use strict'; if (!(this instanceof vtkjs_pointFeature)) { @@ -30,11 +28,11 @@ var vtkjs_pointFeature = function (arg) { object.call(this); - //////////////////////////////////////////////////////////////////////////// /** + * Member variables + * * @private */ - //////////////////////////////////////////////////////////////////////////// var m_this = this, s_exit = this._exit, m_actor = null, @@ -42,11 +40,9 @@ var vtkjs_pointFeature = function (arg) { m_source = null, s_update = this._update; - //////////////////////////////////////////////////////////////////////////// /** * Create pipeline */ - //////////////////////////////////////////////////////////////////////////// this._createPipeline = function () { m_pointSet = vtkPointSet.newInstance(); m_source = vtkSphereSource.newInstance(); @@ -60,23 +56,17 @@ var vtkjs_pointFeature = function (arg) { this.renderer().contextRenderer().addActor(m_actor); }; - //////////////////////////////////////////////////////////////////////////// /** * Initialize */ - //////////////////////////////////////////////////////////////////////////// this._init = function () { m_this.renderer().contextRenderer().setLayer(1); this._createPipeline(); }; - //////////////////////////////////////////////////////////////////////////// /** - * Build - * - * @override + * Build this feature */ - //////////////////////////////////////////////////////////////////////////// this._build = function () { var i, i3, posVal, nonzeroZ, @@ -89,7 +79,7 @@ var vtkjs_pointFeature = function (arg) { opacityFunc = m_this.style.get('fillOpacity'); /* It is more efficient to do a transform on a single array rather than on - * an array of arrays or an array of objects. */ + * an array of arrays or an array of objects. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { posVal = posFunc(data[i]); position[i3] = posVal.x; @@ -121,13 +111,10 @@ var vtkjs_pointFeature = function (arg) { console.debug('built vtkjs point feature'); }; - //////////////////////////////////////////////////////////////////////////// /** * Update * - * @override */ - //////////////////////////////////////////////////////////////////////////// this._update = function () { s_update.call(m_this); @@ -140,11 +127,9 @@ var vtkjs_pointFeature = function (arg) { m_this.updateTime().modified(); }; - //////////////////////////////////////////////////////////////////////////// /** * Destroy */ - //////////////////////////////////////////////////////////////////////////// this._exit = function () { m_this.renderer().contextRenderer().removeActor(m_actor); s_exit(); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index d17ff16ab2..3ef17f064e 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -4,7 +4,6 @@ var renderer = require('../renderer'); var vtk = require('vtk.js'); var vtkFullScreenRenderWindow = vtk.Rendering.Misc.vtkFullScreenRenderWindow; -////////////////////////////////////////////////////////////////////////////// /** * Create a new instance of class vtkjsRenderer * @@ -13,7 +12,6 @@ var vtkFullScreenRenderWindow = vtk.Rendering.Misc.vtkFullScreenRenderWindow; * @param canvas * @returns {geo.gl.vtkjsRenderer} */ -////////////////////////////////////////////////////////////////////////////// var vtkjsRenderer = function (arg) { 'use strict'; @@ -36,48 +34,37 @@ var vtkjsRenderer = function (arg) { const vtkjsren = fullScreenRenderer.getRenderer(); const renderWindow = fullScreenRenderer.getRenderWindow(); - /// TODO: Move this API to the base class - //////////////////////////////////////////////////////////////////////////// /** * Return width of the renderer */ - //////////////////////////////////////////////////////////////////////////// this.width = function () { return m_width; }; - //////////////////////////////////////////////////////////////////////////// /** * Return height of the renderer */ - //////////////////////////////////////////////////////////////////////////// this.height = function () { return m_height; }; - //////////////////////////////////////////////////////////////////////////// /** * Get context specific renderer */ - //////////////////////////////////////////////////////////////////////////// this.contextRenderer = function () { return vtkjsren; }; - //////////////////////////////////////////////////////////////////////////// /** * Get API used by the renderer */ - //////////////////////////////////////////////////////////////////////////// this.api = function () { return 'vtkjs'; }; - //////////////////////////////////////////////////////////////////////////// /** * Initialize */ - //////////////////////////////////////////////////////////////////////////// this._init = function () { if (m_this.initialized()) { return m_this; @@ -92,22 +79,18 @@ var vtkjsRenderer = function (arg) { return m_this; }; - //////////////////////////////////////////////////////////////////////////// /** * Handle resize event */ - //////////////////////////////////////////////////////////////////////////// this._resize = function (x, y, w, h) { m_this._render(); return m_this; }; - //////////////////////////////////////////////////////////////////////////// /** * Render. This actually schedules rendering for the next animation frame. */ - //////////////////////////////////////////////////////////////////////////// this._render = function () { /* If we are already scheduled to render, don't schedule again. Rather, * mark that we should render after other animation frame requests occur. @@ -127,11 +110,9 @@ var vtkjsRenderer = function (arg) { renderWindow.render(); }; - //////////////////////////////////////////////////////////////////////////// /** * Exit */ - //////////////////////////////////////////////////////////////////////////// this._exit = function () { // DO NOTHING }; @@ -149,13 +130,17 @@ var vtkjsRenderer = function (arg) { m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); }; - // Connect to pan event. This is sufficient, as all zooms and rotations also - // produce a pan + /** + * Connect to pan event. This is sufficient, as all zooms and rotations also + *produce a pan + */ m_this.layer().geoOn(geo_event.pan, function (evt) { // DO NOTHING }); - // Connect to parallelprojection event + /** + * Connect to parallelprojection event + */ m_this.layer().geoOn(geo_event.parallelprojection, function (evt) { // DO NOTHING }); From 5dd9841eb68315d1854fd8ad4f9f7529f99d6843 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Thu, 9 Aug 2018 19:51:50 -0400 Subject: [PATCH 22/41] Reintroduce sinon dev dependency This was erroneously removed during conflict resolution --- package-lock.json | 144 ++++++++++++++++++++++++++++++++++++---------- package.json | 1 + 2 files changed, 114 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8fee02f4b7..aa777d63f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,6 +57,30 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, + "@sinonjs/commons": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.0.2.tgz", + "integrity": "sha512-WR3dlgqJP4QNrLC4iXN/5/2WaLQQ0VijOOkmflqFGVJ6wLEpbSjo7c0ZeGIdtY8Crk7xBBp87sM6+Mkerz7alw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/formatio": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", + "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", + "dev": true, + "requires": { + "samsam": "1.3.0" + } + }, + "@sinonjs/samsam": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", + "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", + "dev": true + }, "@types/babel-types": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.4.tgz", @@ -5268,15 +5292,6 @@ "mime-types": "2.1.19" } }, - "formatio": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", - "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", - "dev": true, - "requires": { - "samsam": "1.1.2" - } - }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -7806,6 +7821,12 @@ "markdown-it": "8.4.2" } }, + "just-extend": { + "version": "1.1.27", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", + "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", + "dev": true + }, "karma": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", @@ -8788,6 +8809,12 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -9028,9 +9055,9 @@ } }, "lolex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", - "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", + "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", "dev": true }, "longest": { @@ -9742,6 +9769,36 @@ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, + "nise": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", + "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", + "dev": true, + "requires": { + "@sinonjs/formatio": "2.0.0", + "just-extend": "1.1.27", + "lolex": "2.7.1", + "path-to-regexp": "1.7.0", + "text-encoding": "0.6.4" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + } + } + }, "node-dir": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.8.tgz", @@ -12566,9 +12623,9 @@ "dev": true }, "samsam": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", - "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", + "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", "dev": true }, "sax": { @@ -12805,15 +12862,37 @@ "dev": true }, "sinon": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", - "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.5.tgz", + "integrity": "sha512-TcbRoWs1SdY6NOqfj0c9OEQquBoZH+qEf8799m1jjcbfWrrpyCQ3B/BpX7+NKa7Vn33Jl+Z50H4Oys3bzygK2Q==", "dev": true, "requires": { - "formatio": "1.1.1", - "lolex": "1.3.2", - "samsam": "1.1.2", - "util": "0.11.0" + "@sinonjs/commons": "1.0.2", + "@sinonjs/formatio": "2.0.0", + "@sinonjs/samsam": "2.0.0", + "diff": "3.5.0", + "lodash.get": "4.4.2", + "lolex": "2.7.1", + "nise": "1.4.2", + "supports-color": "5.4.0", + "type-detect": "4.0.8" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } } }, "slack-node": { @@ -13739,6 +13818,12 @@ "execa": "0.7.0" } }, + "text-encoding": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", + "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", + "dev": true + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -13971,6 +14056,12 @@ "prelude-ls": "1.1.2" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", @@ -14441,15 +14532,6 @@ } } }, - "util": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.0.tgz", - "integrity": "sha512-5n12uMzKCjvB2HPFHnbQSjaqAa98L5iIXmHrZCLavuZVe0qe/SJGbDGWlpaHk5lnBkWRDO+dRu1/PgmUYKPPTw==", - "dev": true, - "requires": { - "inherits": "2.0.3" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index 01b0acc44e..33203af63c 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "raw-body": "^2.1.6", "resemblejs": "^2.9.0", "serve-index": "^1.9.1", + "sinon": "^6.1.5", "string-replace-loader": "1.0.5", "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.21.0", From 847d42394ed421d84be55ed8a7ca89cf01df0d06 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 10:42:27 -0400 Subject: [PATCH 23/41] Make Unreleased changelog section for new note --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df1415ac9..0d93027c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## Unreleased + +### Changes + +- Changed build process: optional dependencies are now included in the bundle by default (#890) + + ## Version 0.17.0 ### Features @@ -43,7 +50,6 @@ - Remove bower support (#856) - Switch to webpack v3 (#854) - Removed needless function wrappers (#870) -- Changed build process: optional dependencies are now included in the bundle by default (#890) ## Version 0.16.0 From 9c8eccba11d9544cde7d040b24cd481aa1927e6f Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 10:42:48 -0400 Subject: [PATCH 24/41] Update version number in tutorial comment --- tutorials/editor3/index.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/editor3/index.pug b/tutorials/editor3/index.pug index ca15035e3f..d2199f985c 100644 --- a/tutorials/editor3/index.pug +++ b/tutorials/editor3/index.pug @@ -17,7 +17,7 @@ block mainTutorial From d5bded8b974655f9a7ead3f5ca0b0f899cc72cea Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 13:09:50 -0400 Subject: [PATCH 25/41] Exclude vtk.js from lean bundle --- webpack-lean.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webpack-lean.config.js b/webpack-lean.config.js index eb8ea96eef..9e3d4bc82d 100644 --- a/webpack-lean.config.js +++ b/webpack-lean.config.js @@ -18,6 +18,7 @@ module.exports = merge(config, { // Since GeoJS's libraryTarget is "umd", defining this (undocumented) external library type // will allow Webpack to create a better error message if a "hammerjs" import fails umd: 'hammerjs' - } + }, + 'vtk.js': 'vtkjs' } }); From f91a505e744cdf33e023cf3b98cece10166d239e Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 13:10:42 -0400 Subject: [PATCH 26/41] Runtime conditional support pattern for vtkjsRenderer --- src/vtkjs/vtkjsRenderer.js | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 3ef17f064e..028a989c62 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -1,8 +1,6 @@ var inherit = require('../inherit'); var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); -var vtk = require('vtk.js'); -var vtkFullScreenRenderWindow = vtk.Rendering.Misc.vtkFullScreenRenderWindow; /** * Create a new instance of class vtkjsRenderer @@ -23,6 +21,8 @@ var vtkjsRenderer = function (arg) { var mat4 = require('gl-mat4'); var geo_event = require('../event'); + var vtkjs = vtkjsRenderer.vtkjs; + var vtkFullScreenRenderWindow = vtkjs.Rendering.Misc.vtkFullScreenRenderWindow; var m_this = this, m_width = 0, @@ -152,4 +152,30 @@ inherit(vtkjsRenderer, renderer); registerRenderer('vtkjs', vtkjsRenderer); +/** + * Report if the vtkjs renderer is supported. This is just a check if vtkjs is available. + * + * @returns {boolean} true if available. + */ +vtkjsRenderer.supported = function () { + delete vtkjsRenderer.vtkjs; + // webpack expects optional dependencies to be wrapped in a try-catch + try { + vtkjsRenderer.vtkjs = require('vtk.js'); + } catch (_error) {} + return vtkjsRenderer.vtks !== undefined; +}; + +/** + * If the vtks renderer is not supported, supply the name of a renderer that + * should be used instead. This asks for the null renderer. + * + * @returns {null} `null` for the null renderer. + */ +vtkjsRenderer.fallback = function () { + return null; +}; + +vtkjsRenderer.supported(); // cache reference to vtkjs if it is available + module.exports = vtkjsRenderer; From 354159d3179294ddf8e8d717c249fc6faede84b1 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 13:47:20 -0400 Subject: [PATCH 27/41] Make pointFeature depend on vtkjsRenderer.vtkjs --- src/vtkjs/pointFeature.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 4d8e65b787..a6140815ef 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -1,13 +1,7 @@ -var vtk = require('vtk.js'); var inherit = require('../inherit'); var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); -var vtkActor = vtk.Rendering.Core.vtkActor; -var vtkMapper = vtk.Rendering.Core.vtkGlyph3DMapper; -var vtkPointSet = vtk.Common.DataModel.vtkPointSet; -var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; - /** * Create a new instance of pointFeature * @@ -25,6 +19,11 @@ var vtkjs_pointFeature = function (arg) { var transform = require('../transform'); var object = require('../object'); + var vtk = require('./vtkjsRenderer').vtkjs; + var vtkActor = vtk.Rendering.Core.vtkActor; + var vtkMapper = vtk.Rendering.Core.vtkGlyph3DMapper; + var vtkPointSet = vtk.Common.DataModel.vtkPointSet; + var vtkSphereSource = vtk.Filters.Sources.vtkSphereSource; object.call(this); From 07a2193d3d7fc6134a098b4ac2100b70e4338d97 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 13:50:23 -0400 Subject: [PATCH 28/41] Downgrade sinon back to previously used version --- package-lock.json | 144 ++++++++++------------------------------------ package.json | 2 +- 2 files changed, 32 insertions(+), 114 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa777d63f2..8fee02f4b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,30 +57,6 @@ "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, - "@sinonjs/commons": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.0.2.tgz", - "integrity": "sha512-WR3dlgqJP4QNrLC4iXN/5/2WaLQQ0VijOOkmflqFGVJ6wLEpbSjo7c0ZeGIdtY8Crk7xBBp87sM6+Mkerz7alw==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/formatio": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz", - "integrity": "sha512-ls6CAMA6/5gG+O/IdsBcblvnd8qcO/l1TYoNeAzp3wcISOxlPXQEus0mLcdwazEkWjaBdaJ3TaxmNgCLWwvWzg==", - "dev": true, - "requires": { - "samsam": "1.3.0" - } - }, - "@sinonjs/samsam": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-2.0.0.tgz", - "integrity": "sha512-D7VxhADdZbDJ0HjUTMnSQ5xIGb4H2yWpg8k9Sf1T08zfFiQYlaxM8LZydpR4FQ2E6LZJX8IlabNZ5io4vdChwg==", - "dev": true - }, "@types/babel-types": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.4.tgz", @@ -5292,6 +5268,15 @@ "mime-types": "2.1.19" } }, + "formatio": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/formatio/-/formatio-1.1.1.tgz", + "integrity": "sha1-XtPM1jZVEJc4NGXZlhmRAOhhYek=", + "dev": true, + "requires": { + "samsam": "1.1.2" + } + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -7821,12 +7806,6 @@ "markdown-it": "8.4.2" } }, - "just-extend": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-1.1.27.tgz", - "integrity": "sha512-mJVp13Ix6gFo3SBAy9U/kL+oeZqzlYYYLQBwXVBlVzIsZwBqGREnOro24oC/8s8aox+rJhtZ2DiQof++IrkA+g==", - "dev": true - }, "karma": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", @@ -8809,12 +8788,6 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -9055,9 +9028,9 @@ } }, "lolex": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.1.tgz", - "integrity": "sha512-Oo2Si3RMKV3+lV5MsSWplDQFoTClz/24S0MMHYcgGWWmFXr6TMlqcqk/l1GtH+d5wLBwNRiqGnwDRMirtFalJw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-1.3.2.tgz", + "integrity": "sha1-fD2mL/yzDw9agKJWbKJORdigHzE=", "dev": true }, "longest": { @@ -9769,36 +9742,6 @@ "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", "dev": true }, - "nise": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.2.tgz", - "integrity": "sha512-BxH/DxoQYYdhKgVAfqVy4pzXRZELHOIewzoesxpjYvpU+7YOalQhGNPf7wAx8pLrTNPrHRDlLOkAl8UI0ZpXjw==", - "dev": true, - "requires": { - "@sinonjs/formatio": "2.0.0", - "just-extend": "1.1.27", - "lolex": "2.7.1", - "path-to-regexp": "1.7.0", - "text-encoding": "0.6.4" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "path-to-regexp": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", - "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", - "dev": true, - "requires": { - "isarray": "0.0.1" - } - } - } - }, "node-dir": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.8.tgz", @@ -12623,9 +12566,9 @@ "dev": true }, "samsam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.3.0.tgz", - "integrity": "sha512-1HwIYD/8UlOtFS3QO3w7ey+SdSDFE4HRNLZoZRYVQefrOY3l17epswImeB1ijgJFQJodIaHcwkp3r/myBjFVbg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/samsam/-/samsam-1.1.2.tgz", + "integrity": "sha1-vsEf3IOp/aBjQBIQ5AF2wwJNFWc=", "dev": true }, "sax": { @@ -12862,37 +12805,15 @@ "dev": true }, "sinon": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-6.1.5.tgz", - "integrity": "sha512-TcbRoWs1SdY6NOqfj0c9OEQquBoZH+qEf8799m1jjcbfWrrpyCQ3B/BpX7+NKa7Vn33Jl+Z50H4Oys3bzygK2Q==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-1.17.7.tgz", + "integrity": "sha1-RUKk9JugxFwF6y6d2dID4rjv4L8=", "dev": true, "requires": { - "@sinonjs/commons": "1.0.2", - "@sinonjs/formatio": "2.0.0", - "@sinonjs/samsam": "2.0.0", - "diff": "3.5.0", - "lodash.get": "4.4.2", - "lolex": "2.7.1", - "nise": "1.4.2", - "supports-color": "5.4.0", - "type-detect": "4.0.8" - }, - "dependencies": { - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", - "dev": true, - "requires": { - "has-flag": "3.0.0" - } - } + "formatio": "1.1.1", + "lolex": "1.3.2", + "samsam": "1.1.2", + "util": "0.11.0" } }, "slack-node": { @@ -13818,12 +13739,6 @@ "execa": "0.7.0" } }, - "text-encoding": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.6.4.tgz", - "integrity": "sha1-45mpgiV6J22uQou5KEXLcb3CbRk=", - "dev": true - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -14056,12 +13971,6 @@ "prelude-ls": "1.1.2" } }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", @@ -14532,6 +14441,15 @@ } } }, + "util": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.0.tgz", + "integrity": "sha512-5n12uMzKCjvB2HPFHnbQSjaqAa98L5iIXmHrZCLavuZVe0qe/SJGbDGWlpaHk5lnBkWRDO+dRu1/PgmUYKPPTw==", + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index 33203af63c..73709163c2 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "raw-body": "^2.1.6", "resemblejs": "^2.9.0", "serve-index": "^1.9.1", - "sinon": "^6.1.5", + "sinon": "^1.17.7", "string-replace-loader": "1.0.5", "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.21.0", From 9ac8ae9824b6fd1b4eb2458f9c8ac7ff1ca74840 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Fri, 10 Aug 2018 15:34:12 -0400 Subject: [PATCH 29/41] Change const -> var --- src/vtkjs/vtkjsRenderer.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 028a989c62..dababbe4c5 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -29,10 +29,10 @@ var vtkjsRenderer = function (arg) { m_height = 0, s_init = this._init; - const fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ + var fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); - const vtkjsren = fullScreenRenderer.getRenderer(); - const renderWindow = fullScreenRenderer.getRenderWindow(); + var vtkjsren = fullScreenRenderer.getRenderer(); + var renderWindow = fullScreenRenderer.getRenderWindow(); /** * Return width of the renderer @@ -122,9 +122,9 @@ var vtkjsRenderer = function (arg) { camera = map.camera(), view = camera.view, proj = camera.projectionMatrix; - const viewmat = mat4.create(); + var viewmat = mat4.create(); mat4.copy(viewmat, view); - const projmat = mat4.create(); + var projmat = mat4.create(); mat4.copy(projmat, proj); m_this.contextRenderer().getActiveCamera().setViewMatrix(viewmat); m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); From cff7a47bfc3c69a9dc4aefaf2a479e5dd8228a92 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Tue, 23 Oct 2018 11:34:41 -0400 Subject: [PATCH 30/41] Fix global name of vtk module It is exposed as "vtk", not "vtkjs". --- webpack-lean.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack-lean.config.js b/webpack-lean.config.js index 9e3d4bc82d..62d8fbc28e 100644 --- a/webpack-lean.config.js +++ b/webpack-lean.config.js @@ -19,6 +19,6 @@ module.exports = merge(config, { // will allow Webpack to create a better error message if a "hammerjs" import fails umd: 'hammerjs' }, - 'vtk.js': 'vtkjs' + 'vtk.js': 'vtk' } }); From 83f86c82ac9accd06d45e79d78bd3b49d0b11a4c Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Tue, 23 Oct 2018 11:36:38 -0400 Subject: [PATCH 31/41] Eslint auto-fixes --- src/ui/legendWidget.js | 2 +- src/ui/sliderWidget.js | 8 ++++---- src/vtkjs/pointFeature.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ui/legendWidget.js b/src/ui/legendWidget.js index 2632803db5..d83704f15b 100644 --- a/src/ui/legendWidget.js +++ b/src/ui/legendWidget.js @@ -71,7 +71,7 @@ var legendWidget = function (arg) { /** * Get the widget's size - * @return {{width: number, height: number}} The size in pixels + * @returns {{width: number, height: number}} The size in pixels */ this.size = function () { var width = 1, height; diff --git a/src/ui/sliderWidget.js b/src/ui/sliderWidget.js index 005125cbf7..7fdc56f9c6 100644 --- a/src/ui/sliderWidget.js +++ b/src/ui/sliderWidget.js @@ -51,11 +51,11 @@ var sliderWidget = function (arg) { * Add an icon from a path string. Returns a d3 group element. * * @function - * @argument {String} icon svg path string + * @argument {string} icon svg path string * @argument {Array} base where to append the element (d3 selection) - * @argument {Number} cx Center x-coordinate - * @argument {Number} cy Center y-coordinate - * @argument {Number} size Icon size in pixels + * @argument {number} cx Center x-coordinate + * @argument {number} cy Center y-coordinate + * @argument {number} size Icon size in pixels * @returns {object} * @private */ diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index a6140815ef..65b38e1283 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -77,7 +77,7 @@ var vtkjs_pointFeature = function (arg) { colorFunc = m_this.style.get('fillColor'), opacityFunc = m_this.style.get('fillOpacity'); - /* It is more efficient to do a transform on a single array rather than on + /* It is more efficient to do a transform on a single array rather than on * an array of arrays or an array of objects. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { posVal = posFunc(data[i]); @@ -88,8 +88,8 @@ var vtkjs_pointFeature = function (arg) { m_actor.getProperty().setOpacity(opacityFunc(data[i])); } position = transform.transformCoordinates( - m_this.gcs(), m_this.layer().map().gcs(), - position, 3); + m_this.gcs(), m_this.layer().map().gcs(), + position, 3); if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { From 841b00ce8787cfb7ed009a7ce88b75faa6eb26e6 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Tue, 23 Oct 2018 13:42:03 -0400 Subject: [PATCH 32/41] Fix typo in vtkjsRenderer.supported --- src/vtkjs/vtkjsRenderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index dababbe4c5..3af65b066b 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -163,7 +163,7 @@ vtkjsRenderer.supported = function () { try { vtkjsRenderer.vtkjs = require('vtk.js'); } catch (_error) {} - return vtkjsRenderer.vtks !== undefined; + return vtkjsRenderer.vtkjs !== undefined; }; /** From cf1dc0982fd0ec9698b5e8bf6df5281ce45742fb Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Tue, 23 Oct 2018 14:30:25 -0400 Subject: [PATCH 33/41] Update to working vtk.js version The latest (v7) did not import properly. --- package-lock.json | 4995 +++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 4774 insertions(+), 223 deletions(-) diff --git a/package-lock.json b/package-lock.json index aa5ee72968..db8fb9b83d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -180,7 +180,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -826,7 +826,7 @@ }, "axios": { "version": "0.15.3", - "resolved": "http://registry.npmjs.org/axios/-/axios-0.15.3.tgz", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.15.3.tgz", "integrity": "sha1-LJ1jiy4ZGgjqHWzJiOrda6W9wFM=", "dev": true, "optional": true, @@ -1103,61 +1103,61 @@ }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", "dev": true }, "babel-plugin-syntax-async-generators": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz", "integrity": "sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=", "dev": true }, "babel-plugin-syntax-class-constructor-call": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz", "integrity": "sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=", "dev": true }, "babel-plugin-syntax-class-properties": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=", "dev": true }, "babel-plugin-syntax-decorators": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz", "integrity": "sha1-MSVjtNvePMgGzuPkFszurd0RrAs=", "dev": true }, "babel-plugin-syntax-dynamic-import": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=", "dev": true }, "babel-plugin-syntax-exponentiation-operator": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=", "dev": true }, "babel-plugin-syntax-export-extensions": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz", "integrity": "sha1-cKFITw+QiaToStRLrDU8lbmxJyE=", "dev": true }, "babel-plugin-syntax-flow": { "version": "6.18.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=", "dev": true }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", - "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=", "dev": true }, @@ -1726,8 +1726,7 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", @@ -1929,6 +1928,12 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, + "blueimp-md5": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.10.0.tgz", + "integrity": "sha512-EkNUOi7tpV68TqjpiUz9D9NcT8um2+qtgntmMbi5UKssVX2m/2PLqotcric0RE63pB3HPN/fjf3cKHN2ufGSUQ==", + "optional": true + }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", @@ -2073,7 +2078,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2225,7 +2229,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { @@ -2537,6 +2541,17 @@ "integrity": "sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw==", "dev": true }, + "cardboard-vr-display": { + "version": "1.0.11", + "resolved": "http://registry.npmjs.org/cardboard-vr-display/-/cardboard-vr-display-1.0.11.tgz", + "integrity": "sha512-G63yklmd1fsce5nJL2LPcpFOSWMEGqjdWeNxowTPkYEpR41RtpBkebR8sjh7Z24rmID3MB7mFjZaIHvrKXCXFw==", + "optional": true, + "requires": { + "gl-preserve-state": "^1.0.0", + "nosleep.js": "^0.7.0", + "webvr-polyfill-dpdb": "^1.0.7" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2564,7 +2579,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -3006,8 +3021,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "concat-stream": { "version": "1.6.2", @@ -3191,8 +3205,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { "version": "5.0.6", @@ -4765,7 +4778,7 @@ }, "event-stream": { "version": "0.5.3", - "resolved": "http://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-0.5.3.tgz", "integrity": "sha1-t3uTCfcQet3+q2PwwOr9jbC9jBw=", "dev": true, "requires": { @@ -4791,7 +4804,7 @@ }, "eventemitter2": { "version": "0.4.14", - "resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", "dev": true }, @@ -5082,7 +5095,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { @@ -5872,8 +5885,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.4", @@ -6646,6 +6658,21 @@ "resolved": "https://registry.npmjs.org/gl-mat4/-/gl-mat4-1.2.0.tgz", "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, + "gl-matrix": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-2.5.1.tgz", + "integrity": "sha512-GCv0L5v+2Hdh+al6Ny7MO4B+BfXd6qfUom6CE5O/nqkBvaIY7+dVZhuKad+EkUK0uyot8V6TkgsMQrQzlmZl2A==", + "optional": true, + "requires": { + "npm": "^5.8.0" + } + }, + "gl-preserve-state": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gl-preserve-state/-/gl-preserve-state-1.0.0.tgz", + "integrity": "sha512-zQZ25l3haD4hvgJZ6C9+s0ebdkW9y+7U2qxvGu1uWOJh8a4RU+jURIKEQhf8elIlFpMH6CrAY2tH0mYrRjet3Q==", + "optional": true + }, "gl-vec3": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/gl-vec3/-/gl-vec3-1.1.3.tgz", @@ -6660,7 +6687,6 @@ "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6682,7 +6708,7 @@ "dependencies": { "minimist": { "version": "0.1.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz", "integrity": "sha1-md9lelJXTCHJBXSX33QnkLK0wN4=", "dev": true }, @@ -7354,6 +7380,12 @@ "minimatch": "^3.0.4" } }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "optional": true + }, "import-lazy": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", @@ -7426,7 +7458,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -7435,8 +7466,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { "version": "1.3.5", @@ -7620,8 +7650,7 @@ "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", - "dev": true + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" }, "into-stream": { "version": "3.1.0", @@ -8050,8 +8079,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isbinaryfile": { "version": "3.0.3", @@ -8161,7 +8189,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -8510,6 +8538,59 @@ "markdown-it": "^8.0.0" } }, + "jszip": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.4.tgz", + "integrity": "sha512-z6w8iYIxZ/fcgul0j/OerkYnkomH8BZigvzbxVmr2h5HkZUrPtk2kjYtLkqR9wwQxEP6ecKNoKLsbhd18jfnGA==", + "optional": true, + "requires": { + "core-js": "~2.3.0", + "es6-promise": "~3.0.2", + "lie": "~3.1.0", + "pako": "~1.0.2", + "readable-stream": "~2.0.6" + }, + "dependencies": { + "core-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=", + "optional": true + }, + "es6-promise": { + "version": "3.0.2", + "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "optional": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "optional": true + } + } + }, "karma": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/karma/-/karma-2.0.5.tgz", @@ -9334,6 +9415,15 @@ "integrity": "sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g=", "dev": true }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "optional": true, + "requires": { + "immediate": "~3.0.5" + } + }, "linkify-it": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz", @@ -9684,7 +9774,7 @@ }, "request": { "version": "2.75.0", - "resolved": "http://registry.npmjs.org/request/-/request-2.75.0.tgz", + "resolved": "https://registry.npmjs.org/request/-/request-2.75.0.tgz", "integrity": "sha1-0rgmiihtoT6qXQGt9dGMyQ9lfZM=", "dev": true, "optional": true, @@ -10062,7 +10152,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -10245,14 +10335,13 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, @@ -10307,7 +10396,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -10835,7 +10924,7 @@ }, "chalk": { "version": "0.4.0", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz", "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=", "dev": true, "requires": { @@ -10906,178 +10995,4546 @@ "sort-keys": "^1.0.0" } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "nssocket": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.5.3.tgz", - "integrity": "sha1-iDyi7GBfXtZKTVGQsmJUAZKPj40=", - "dev": true, - "requires": { - "eventemitter2": "~0.4.14", - "lazy": "~1.0.11" - } - }, - "null-check": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", - "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", - "dev": true - }, - "num2fraction": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", - "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true + "nosleep.js": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.7.0.tgz", + "integrity": "sha1-z9kZwlUjyg0PSmn7MwXAg62u4ok=", + "optional": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, + "npm": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/npm/-/npm-5.10.0.tgz", + "integrity": "sha512-lvjvjgR5wG2RJ2uqak1xtZcVAWMwVOzN5HkUlUj/n8rU1f3A0fNn+7HwOzH9Lyf0Ppyu9ApgsEpHczOSnx1cwA==", + "optional": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "JSONStream": "^1.3.2", + "abbrev": "~1.1.1", + "ansi-regex": "~3.0.0", + "ansicolors": "~0.3.2", + "ansistyles": "~0.1.3", + "aproba": "~1.2.0", + "archy": "~1.0.0", + "bin-links": "^1.1.0", + "bluebird": "~3.5.1", + "byte-size": "^4.0.2", + "cacache": "^10.0.4", + "call-limit": "~1.1.0", + "chownr": "~1.0.1", + "cli-columns": "^3.1.2", + "cli-table2": "~0.2.0", + "cmd-shim": "~2.0.2", + "columnify": "~1.5.4", + "config-chain": "~1.1.11", + "debuglog": "*", + "detect-indent": "~5.0.0", + "detect-newline": "^2.1.0", + "dezalgo": "~1.0.3", + "editor": "~1.0.0", + "find-npm-prefix": "^1.0.2", + "fs-vacuum": "~1.2.10", + "fs-write-stream-atomic": "~1.0.10", + "gentle-fs": "^2.0.1", + "glob": "~7.1.2", + "graceful-fs": "~4.1.11", + "has-unicode": "~2.0.1", + "hosted-git-info": "^2.6.0", + "iferr": "~0.1.5", + "imurmurhash": "*", + "inflight": "~1.0.6", + "inherits": "~2.0.3", + "ini": "^1.3.5", + "init-package-json": "^1.10.3", + "is-cidr": "~1.0.0", + "json-parse-better-errors": "^1.0.2", + "lazy-property": "~1.0.0", + "libcipm": "^1.6.2", + "libnpx": "^10.2.0", + "lock-verify": "^2.0.2", + "lockfile": "^1.0.4", + "lodash._baseindexof": "*", + "lodash._baseuniq": "~4.6.0", + "lodash._bindcallback": "*", + "lodash._cacheindexof": "*", + "lodash._createcache": "*", + "lodash._getnative": "*", + "lodash.clonedeep": "~4.5.0", + "lodash.restparam": "*", + "lodash.union": "~4.6.0", + "lodash.uniq": "~4.5.0", + "lodash.without": "~4.4.0", + "lru-cache": "^4.1.2", + "meant": "~1.0.1", + "mississippi": "^3.0.0", + "mkdirp": "~0.5.1", + "move-concurrently": "^1.0.1", + "node-gyp": "^3.6.2", + "nopt": "~4.0.1", + "normalize-package-data": "~2.4.0", + "npm-audit-report": "^1.0.9", + "npm-cache-filename": "~1.0.2", + "npm-install-checks": "~3.0.0", + "npm-lifecycle": "^2.0.1", + "npm-package-arg": "^6.1.0", + "npm-packlist": "~1.1.10", + "npm-profile": "^3.0.1", + "npm-registry-client": "^8.5.1", + "npm-registry-fetch": "^1.1.0", + "npm-user-validate": "~1.0.0", + "npmlog": "~4.1.2", + "once": "~1.4.0", + "opener": "~1.4.3", + "osenv": "^0.1.5", + "pacote": "^7.6.1", + "path-is-inside": "~1.0.2", + "promise-inflight": "~1.0.1", + "qrcode-terminal": "^0.12.0", + "query-string": "^6.1.0", + "qw": "~1.0.1", + "read": "~1.0.7", + "read-cmd-shim": "~1.0.1", + "read-installed": "~4.0.3", + "read-package-json": "^2.0.13", + "read-package-tree": "^5.2.1", + "readable-stream": "^2.3.6", + "readdir-scoped-modules": "*", + "request": "^2.85.0", + "retry": "^0.12.0", + "rimraf": "~2.6.2", + "safe-buffer": "^5.1.2", + "semver": "^5.5.0", + "sha": "~2.0.1", + "slide": "~1.1.6", + "sorted-object": "~2.0.1", + "sorted-union-stream": "~2.1.3", + "ssri": "^5.3.0", + "strip-ansi": "~4.0.0", + "tar": "^4.4.2", + "text-table": "~0.2.0", + "tiny-relative-date": "^1.3.0", + "uid-number": "0.0.6", + "umask": "~1.1.0", + "unique-filename": "~1.1.0", + "unpipe": "~1.0.0", + "update-notifier": "^2.5.0", + "uuid": "^3.2.1", + "validate-npm-package-license": "^3.0.3", + "validate-npm-package-name": "~3.0.0", + "which": "~1.3.0", + "worker-farm": "^1.6.0", + "wrappy": "~1.0.2", + "write-file-atomic": "^2.3.0" }, "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, + "JSONStream": { + "version": "1.3.2", + "bundled": true, + "optional": true, "requires": { - "is-descriptor": "^0.1.0" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "dependencies": { + "jsonparse": { + "version": "1.3.1", + "bundled": true, + "optional": true + }, + "through": { + "version": "2.3.8", + "bundled": true, + "optional": true + } } - } - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true, - "requires": { - "for-own": "^0.1.4", - "is-extendable": "^0.1.1" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, + }, + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ansi-regex": { + "version": "3.0.0", + "bundled": true + }, + "ansicolors": { + "version": "0.3.2", + "bundled": true, + "optional": true + }, + "ansistyles": { + "version": "0.1.3", + "bundled": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "archy": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "bin-links": { + "version": "1.1.0", + "bundled": true, + "requires": { + "bluebird": "^3.5.0", + "cmd-shim": "^2.0.2", + "fs-write-stream-atomic": "^1.0.10", + "gentle-fs": "^2.0.0", + "graceful-fs": "^4.1.11", + "slide": "^1.1.6" + } + }, + "bluebird": { + "version": "3.5.1", + "bundled": true + }, + "byte-size": { + "version": "4.0.2", + "bundled": true, + "optional": true + }, + "cacache": { + "version": "10.0.4", + "bundled": true, + "requires": { + "bluebird": "^3.5.1", + "chownr": "^1.0.1", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "lru-cache": "^4.1.1", + "mississippi": "^2.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.2", + "ssri": "^5.2.4", + "unique-filename": "^1.1.0", + "y18n": "^4.0.0" + }, + "dependencies": { + "mississippi": { + "version": "2.0.0", + "bundled": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^2.0.1", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.1", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true + } + } + }, + "duplexify": { + "version": "3.5.4", + "bundled": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "requires": { + "once": "^1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true + } + } + }, + "pump": { + "version": "2.0.1", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.4.0", + "bundled": true, + "requires": { + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "stream-each": { + "version": "1.2.2", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true + } + } + } + } + }, + "y18n": { + "version": "4.0.0", + "bundled": true + } + } + }, + "call-limit": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "chownr": { + "version": "1.0.1", + "bundled": true + }, + "cli-columns": { + "version": "3.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^2.0.0", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "2.1.1", + "bundled": true, + "optional": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "cli-table2": { + "version": "0.2.0", + "bundled": true, + "requires": { + "colors": "^1.1.2", + "lodash": "^3.10.1", + "string-width": "^1.0.1" + }, + "dependencies": { + "colors": { + "version": "1.1.2", + "bundled": true, + "optional": true + }, + "lodash": { + "version": "3.10.1", + "bundled": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true + } + } + } + } + } + } + }, + "cmd-shim": { + "version": "2.0.2", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "~0.5.0" + } + }, + "columnify": { + "version": "1.5.4", + "bundled": true, + "optional": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "optional": true + } + } + }, + "wcwidth": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "defaults": "^1.0.3" + }, + "dependencies": { + "defaults": { + "version": "1.0.3", + "bundled": true, + "optional": true, + "requires": { + "clone": "^1.0.2" + }, + "dependencies": { + "clone": { + "version": "1.0.2", + "bundled": true, + "optional": true + } + } + } + } + } + } + }, + "config-chain": { + "version": "1.1.11", + "bundled": true, + "optional": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + }, + "dependencies": { + "proto-list": { + "version": "1.2.4", + "bundled": true, + "optional": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "bundled": true + }, + "detect-indent": { + "version": "5.0.0", + "bundled": true, + "optional": true + }, + "detect-newline": { + "version": "2.1.0", + "bundled": true, + "optional": true + }, + "dezalgo": { + "version": "1.0.3", + "bundled": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + }, + "dependencies": { + "asap": { + "version": "2.0.5", + "bundled": true + } + } + }, + "editor": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "find-npm-prefix": { + "version": "1.0.2", + "bundled": true + }, + "fs-vacuum": { + "version": "1.2.10", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "path-is-inside": "^1.0.1", + "rimraf": "^2.5.2" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "gentle-fs": { + "version": "2.0.1", + "bundled": true, + "requires": { + "aproba": "^1.1.2", + "fs-vacuum": "^1.2.10", + "graceful-fs": "^4.1.11", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "path-is-inside": "^1.0.2", + "read-cmd-shim": "^1.0.1", + "slide": "^1.1.6" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + } + } + } + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + } + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "hosted-git-info": { + "version": "2.6.0", + "bundled": true + }, + "iferr": { + "version": "0.1.5", + "bundled": true + }, + "imurmurhash": { + "version": "0.1.4", + "bundled": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "init-package-json": { + "version": "1.10.3", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "promzard": { + "version": "0.3.0", + "bundled": true, + "optional": true, + "requires": { + "read": "1" + } + } + } + }, + "is-cidr": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "cidr-regex": "1.0.6" + }, + "dependencies": { + "cidr-regex": { + "version": "1.0.6", + "bundled": true, + "optional": true + } + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "bundled": true + }, + "lazy-property": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "libcipm": { + "version": "1.6.2", + "bundled": true, + "optional": true, + "requires": { + "bin-links": "^1.1.0", + "bluebird": "^3.5.1", + "find-npm-prefix": "^1.0.2", + "graceful-fs": "^4.1.11", + "lock-verify": "^2.0.0", + "npm-lifecycle": "^2.0.0", + "npm-logical-tree": "^1.2.1", + "npm-package-arg": "^6.0.0", + "pacote": "^7.5.1", + "protoduck": "^5.0.0", + "read-package-json": "^2.0.12", + "rimraf": "^2.6.2", + "worker-farm": "^1.5.4" + }, + "dependencies": { + "lock-verify": { + "version": "2.0.1", + "bundled": true, + "optional": true, + "requires": { + "npm-package-arg": "^5.1.2", + "semver": "^5.4.1" + }, + "dependencies": { + "npm-package-arg": { + "version": "5.1.2", + "bundled": true, + "optional": true, + "requires": { + "hosted-git-info": "^2.4.2", + "osenv": "^0.1.4", + "semver": "^5.1.0", + "validate-npm-package-name": "^3.0.0" + } + } + } + }, + "npm-logical-tree": { + "version": "1.2.1", + "bundled": true, + "optional": true + }, + "protoduck": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "genfun": "^4.0.1" + }, + "dependencies": { + "genfun": { + "version": "4.0.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "libnpx": { + "version": "10.2.0", + "bundled": true, + "optional": true, + "requires": { + "dotenv": "^5.0.1", + "npm-package-arg": "^6.0.0", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.0", + "update-notifier": "^2.3.0", + "which": "^1.3.0", + "y18n": "^4.0.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "dotenv": { + "version": "5.0.1", + "bundled": true, + "optional": true + }, + "y18n": { + "version": "4.0.0", + "bundled": true, + "optional": true + }, + "yargs": { + "version": "11.0.0", + "bundled": true, + "optional": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + }, + "dependencies": { + "cliui": { + "version": "4.1.0", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "wrap-ansi": { + "version": "2.1.0", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true + } + } + } + } + } + } + }, + "decamelize": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "find-up": { + "version": "2.1.0", + "bundled": true, + "optional": true, + "requires": { + "locate-path": "^2.0.0" + }, + "dependencies": { + "locate-path": { + "version": "2.0.0", + "bundled": true, + "optional": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "dependencies": { + "p-locate": { + "version": "2.0.0", + "bundled": true, + "optional": true, + "requires": { + "p-limit": "^1.1.0" + }, + "dependencies": { + "p-limit": { + "version": "1.2.0", + "bundled": true, + "optional": true, + "requires": { + "p-try": "^1.0.0" + }, + "dependencies": { + "p-try": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "path-exists": { + "version": "3.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "get-caller-file": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-locale": { + "version": "2.1.0", + "bundled": true, + "optional": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "bundled": true, + "optional": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "optional": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "optional": true, + "requires": { + "shebang-regex": "^1.0.0" + }, + "dependencies": { + "shebang-regex": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "get-stream": { + "version": "3.0.0", + "bundled": true, + "optional": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true, + "optional": true + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "optional": true, + "requires": { + "path-key": "^2.0.0" + }, + "dependencies": { + "path-key": { + "version": "2.0.1", + "bundled": true, + "optional": true + } + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "lcid": { + "version": "1.0.0", + "bundled": true, + "optional": true, + "requires": { + "invert-kv": "^1.0.0" + }, + "dependencies": { + "invert-kv": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "mem": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "bundled": true, + "optional": true + }, + "require-main-filename": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + } + } + }, + "which-module": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "y18n": { + "version": "3.2.1", + "bundled": true, + "optional": true + }, + "yargs-parser": { + "version": "9.0.2", + "bundled": true, + "optional": true, + "requires": { + "camelcase": "^4.1.0" + }, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "bundled": true, + "optional": true + } + } + } + } + } + } + }, + "lock-verify": { + "version": "2.0.2", + "bundled": true, + "optional": true, + "requires": { + "npm-package-arg": "^5.1.2 || 6", + "semver": "^5.4.1" + } + }, + "lockfile": { + "version": "1.0.4", + "bundled": true, + "optional": true, + "requires": { + "signal-exit": "^3.0.2" + }, + "dependencies": { + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + } + } + }, + "lodash._baseindexof": { + "version": "3.1.0", + "bundled": true, + "optional": true + }, + "lodash._baseuniq": { + "version": "4.6.0", + "bundled": true, + "optional": true, + "requires": { + "lodash._createset": "~4.0.0", + "lodash._root": "~3.0.0" + }, + "dependencies": { + "lodash._createset": { + "version": "4.0.3", + "bundled": true, + "optional": true + }, + "lodash._root": { + "version": "3.0.1", + "bundled": true, + "optional": true + } + } + }, + "lodash._bindcallback": { + "version": "3.0.1", + "bundled": true, + "optional": true + }, + "lodash._cacheindexof": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "lodash._createcache": { + "version": "3.1.2", + "bundled": true, + "optional": true, + "requires": { + "lodash._getnative": "^3.0.0" + } + }, + "lodash._getnative": { + "version": "3.9.1", + "bundled": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "bundled": true, + "optional": true + }, + "lodash.restparam": { + "version": "3.6.1", + "bundled": true, + "optional": true + }, + "lodash.union": { + "version": "4.6.0", + "bundled": true, + "optional": true + }, + "lodash.uniq": { + "version": "4.5.0", + "bundled": true, + "optional": true + }, + "lodash.without": { + "version": "4.4.0", + "bundled": true, + "optional": true + }, + "lru-cache": { + "version": "4.1.2", + "bundled": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + }, + "dependencies": { + "pseudomap": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "2.1.2", + "bundled": true + } + } + }, + "meant": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "mississippi": { + "version": "3.0.0", + "bundled": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.1", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true + } + } + }, + "duplexify": { + "version": "3.5.4", + "bundled": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "requires": { + "once": "^1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true + } + } + }, + "pump": { + "version": "3.0.0", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.4.0", + "bundled": true, + "requires": { + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "stream-each": { + "version": "1.2.2", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true + } + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true + } + } + }, + "move-concurrently": { + "version": "1.0.1", + "bundled": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + }, + "dependencies": { + "copy-concurrently": { + "version": "1.0.5", + "bundled": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "run-queue": { + "version": "1.0.3", + "bundled": true, + "requires": { + "aproba": "^1.1.1" + } + } + } + }, + "node-gyp": { + "version": "3.6.2", + "bundled": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "minimatch": "^3.0.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "2", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + }, + "dependencies": { + "fstream": { + "version": "1.0.11", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + } + } + } + } + }, + "nopt": { + "version": "3.0.6", + "bundled": true, + "requires": { + "abbrev": "1" + } + }, + "semver": { + "version": "5.3.0", + "bundled": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.2", + "inherits": "2" + }, + "dependencies": { + "block-stream": { + "version": "0.0.9", + "bundled": true, + "requires": { + "inherits": "~2.0.0" + } + } + } + } + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "bundled": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "is-builtin-module": { + "version": "1.0.0", + "bundled": true, + "requires": { + "builtin-modules": "^1.0.0" + }, + "dependencies": { + "builtin-modules": { + "version": "1.1.1", + "bundled": true + } + } + } + } + }, + "npm-audit-report": { + "version": "1.0.9", + "bundled": true, + "optional": true, + "requires": { + "cli-table2": "^0.2.0", + "console-control-strings": "^1.1.0" + }, + "dependencies": { + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "optional": true + } + } + }, + "npm-cache-filename": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "npm-install-checks": { + "version": "3.0.0", + "bundled": true, + "optional": true, + "requires": { + "semver": "^2.3.0 || 3.x || 4 || 5" + } + }, + "npm-lifecycle": { + "version": "2.0.1", + "bundled": true, + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.11", + "node-gyp": "^3.6.2", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.0" + }, + "dependencies": { + "byline": { + "version": "5.0.0", + "bundled": true + }, + "resolve-from": { + "version": "4.0.0", + "bundled": true + } + } + }, + "npm-package-arg": { + "version": "6.1.0", + "bundled": true, + "requires": { + "hosted-git-info": "^2.6.0", + "osenv": "^0.1.5", + "semver": "^5.5.0", + "validate-npm-package-name": "^3.0.0" + } + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + }, + "dependencies": { + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "requires": { + "minimatch": "^3.0.4" + }, + "dependencies": { + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.8", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + } + } + } + } + } + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true + } + } + }, + "npm-profile": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.1.2", + "make-fetch-happen": "^2.5.0" + }, + "dependencies": { + "make-fetch-happen": { + "version": "2.6.0", + "bundled": true, + "optional": true, + "requires": { + "agentkeepalive": "^3.3.0", + "cacache": "^10.0.0", + "http-cache-semantics": "^3.8.0", + "http-proxy-agent": "^2.0.0", + "https-proxy-agent": "^2.1.0", + "lru-cache": "^4.1.1", + "mississippi": "^1.2.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^3.0.1", + "ssri": "^5.0.0" + }, + "dependencies": { + "agentkeepalive": { + "version": "3.3.0", + "bundled": true, + "optional": true, + "requires": { + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "bundled": true, + "optional": true + }, + "http-proxy-agent": { + "version": "2.0.0", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "4", + "debug": "2" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "https-proxy-agent": { + "version": "2.1.1", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "mississippi": { + "version": "1.3.1", + "bundled": true, + "optional": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^1.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.0", + "bundled": true, + "optional": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "optional": true + } + } + }, + "duplexify": { + "version": "3.5.3", + "bundled": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "requires": { + "once": "^1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "optional": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "optional": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true, + "optional": true + } + } + }, + "pump": { + "version": "1.0.3", + "bundled": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.4.0", + "bundled": true, + "optional": true, + "requires": { + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "bundled": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "stream-each": { + "version": "1.2.2", + "bundled": true, + "optional": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "optional": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "node-fetch-npm": { + "version": "2.0.2", + "bundled": true, + "optional": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "encoding": { + "version": "0.1.12", + "bundled": true, + "optional": true, + "requires": { + "iconv-lite": "~0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "bundled": true, + "optional": true + } + } + }, + "json-parse-better-errors": { + "version": "1.0.1", + "bundled": true, + "optional": true + } + } + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "bundled": true, + "optional": true + }, + "retry": { + "version": "0.10.1", + "bundled": true, + "optional": true + } + } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "socks": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "bundled": true, + "optional": true + }, + "smart-buffer": { + "version": "1.1.15", + "bundled": true, + "optional": true + } + } + } + } + } + } + } + } + }, + "npm-registry-client": { + "version": "8.5.1", + "bundled": true, + "optional": true, + "requires": { + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.1", + "bundled": true, + "optional": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true, + "optional": true + } + } + }, + "retry": { + "version": "0.10.1", + "bundled": true, + "optional": true + } + } + }, + "npm-registry-fetch": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "bluebird": "^3.5.1", + "figgy-pudding": "^2.0.1", + "lru-cache": "^4.1.2", + "make-fetch-happen": "^3.0.0", + "npm-package-arg": "^6.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "figgy-pudding": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "make-fetch-happen": { + "version": "3.0.0", + "bundled": true, + "optional": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^10.0.4", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.0", + "lru-cache": "^4.1.2", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^3.0.1", + "ssri": "^5.2.4" + }, + "dependencies": { + "agentkeepalive": { + "version": "3.4.1", + "bundled": true, + "optional": true, + "requires": { + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "optional": true, + "requires": { + "ms": "^2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "bundled": true, + "optional": true + } + } + } + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "bundled": true, + "optional": true + }, + "http-proxy-agent": { + "version": "2.1.0", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "https-proxy-agent": { + "version": "2.2.1", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "node-fetch-npm": { + "version": "2.0.2", + "bundled": true, + "optional": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "encoding": { + "version": "0.1.12", + "bundled": true, + "optional": true, + "requires": { + "iconv-lite": "~0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + } + } + } + } + } + } + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "bundled": true, + "optional": true + }, + "retry": { + "version": "0.10.1", + "bundled": true, + "optional": true + } + } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "optional": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true, + "optional": true + } + } + } + } + }, + "socks": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "bundled": true, + "optional": true + }, + "smart-buffer": { + "version": "1.1.15", + "bundled": true, + "optional": true + } + } + } + } + } + } + } + } + }, + "npm-user-validate": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + }, + "dependencies": { + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "dependencies": { + "delegates": { + "version": "1.0.0", + "bundled": true + } + } + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + }, + "dependencies": { + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "dependencies": { + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + }, + "dependencies": { + "number-is-nan": { + "version": "1.0.1", + "bundled": true + } + } + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "bundled": true + } + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "requires": { + "string-width": "^1.0.2" + } + } + } + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + } + } + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "opener": { + "version": "1.4.3", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "dependencies": { + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + } + } + }, + "pacote": { + "version": "7.6.1", + "bundled": true, + "requires": { + "bluebird": "^3.5.1", + "cacache": "^10.0.4", + "get-stream": "^3.0.0", + "glob": "^7.1.2", + "lru-cache": "^4.1.1", + "make-fetch-happen": "^2.6.0", + "minimatch": "^3.0.4", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^6.0.0", + "npm-packlist": "^1.1.10", + "npm-pick-manifest": "^2.1.0", + "osenv": "^0.1.5", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^5.0.0", + "rimraf": "^2.6.2", + "safe-buffer": "^5.1.1", + "semver": "^5.5.0", + "ssri": "^5.2.4", + "tar": "^4.4.0", + "unique-filename": "^1.1.0", + "which": "^1.3.0" + }, + "dependencies": { + "get-stream": { + "version": "3.0.0", + "bundled": true + }, + "make-fetch-happen": { + "version": "2.6.0", + "bundled": true, + "requires": { + "agentkeepalive": "^3.3.0", + "cacache": "^10.0.0", + "http-cache-semantics": "^3.8.0", + "http-proxy-agent": "^2.0.0", + "https-proxy-agent": "^2.1.0", + "lru-cache": "^4.1.1", + "mississippi": "^1.2.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^3.0.1", + "ssri": "^5.0.0" + }, + "dependencies": { + "agentkeepalive": { + "version": "3.4.0", + "bundled": true, + "requires": { + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "humanize-ms": { + "version": "1.2.1", + "bundled": true, + "requires": { + "ms": "^2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "bundled": true + } + } + } + } + }, + "http-cache-semantics": { + "version": "3.8.1", + "bundled": true + }, + "http-proxy-agent": { + "version": "2.1.0", + "bundled": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true + } + } + } + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true + } + } + } + } + }, + "https-proxy-agent": { + "version": "2.2.0", + "bundled": true, + "requires": { + "agent-base": "^4.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true + } + } + } + } + }, + "debug": { + "version": "3.1.0", + "bundled": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "bundled": true + } + } + } + } + }, + "mississippi": { + "version": "1.3.1", + "bundled": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^1.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + }, + "dependencies": { + "concat-stream": { + "version": "1.6.1", + "bundled": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "typedarray": { + "version": "0.0.6", + "bundled": true + } + } + }, + "duplexify": { + "version": "3.5.4", + "bundled": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "end-of-stream": { + "version": "1.4.1", + "bundled": true, + "requires": { + "once": "^1.4.0" + } + }, + "flush-write-stream": { + "version": "1.0.2", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.4" + } + }, + "from2": { + "version": "2.3.0", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "parallel-transform": { + "version": "1.1.0", + "bundled": true, + "requires": { + "cyclist": "~0.2.2", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + }, + "dependencies": { + "cyclist": { + "version": "0.2.2", + "bundled": true + } + } + }, + "pump": { + "version": "1.0.3", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.4.0", + "bundled": true, + "requires": { + "duplexify": "^3.5.3", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "stream-each": { + "version": "1.2.2", + "bundled": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true + } + } + }, + "through2": { + "version": "2.0.3", + "bundled": true, + "requires": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "dependencies": { + "xtend": { + "version": "4.0.1", + "bundled": true + } + } + } + } + }, + "node-fetch-npm": { + "version": "2.0.2", + "bundled": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "encoding": { + "version": "0.1.12", + "bundled": true, + "requires": { + "iconv-lite": "~0.4.13" + }, + "dependencies": { + "iconv-lite": { + "version": "0.4.19", + "bundled": true + } + } + }, + "json-parse-better-errors": { + "version": "1.0.1", + "bundled": true + } + } + }, + "socks-proxy-agent": { + "version": "3.0.1", + "bundled": true, + "requires": { + "agent-base": "^4.1.0", + "socks": "^1.1.10" + }, + "dependencies": { + "agent-base": { + "version": "4.2.0", + "bundled": true, + "requires": { + "es6-promisify": "^5.0.0" + }, + "dependencies": { + "es6-promisify": { + "version": "5.0.0", + "bundled": true, + "requires": { + "es6-promise": "^4.0.3" + }, + "dependencies": { + "es6-promise": { + "version": "4.2.4", + "bundled": true + } + } + } + } + }, + "socks": { + "version": "1.1.10", + "bundled": true, + "requires": { + "ip": "^1.1.4", + "smart-buffer": "^1.0.13" + }, + "dependencies": { + "ip": { + "version": "1.1.5", + "bundled": true + }, + "smart-buffer": { + "version": "1.1.15", + "bundled": true + } + } + } + } + } + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + } + } + } + } + }, + "npm-pick-manifest": { + "version": "2.1.0", + "bundled": true, + "requires": { + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + } + }, + "promise-retry": { + "version": "1.1.1", + "bundled": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "bundled": true + }, + "retry": { + "version": "0.10.1", + "bundled": true + } + } + }, + "protoduck": { + "version": "5.0.0", + "bundled": true, + "requires": { + "genfun": "^4.0.1" + }, + "dependencies": { + "genfun": { + "version": "4.0.1", + "bundled": true + } + } + } + } + }, + "path-is-inside": { + "version": "1.0.2", + "bundled": true + }, + "promise-inflight": { + "version": "1.0.1", + "bundled": true + }, + "qrcode-terminal": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "query-string": { + "version": "6.1.0", + "bundled": true, + "optional": true, + "requires": { + "decode-uri-component": "^0.2.0", + "strict-uri-encode": "^2.0.0" + }, + "dependencies": { + "decode-uri-component": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "strict-uri-encode": { + "version": "2.0.0", + "bundled": true, + "optional": true + } + } + }, + "qw": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "read": { + "version": "1.0.7", + "bundled": true, + "requires": { + "mute-stream": "~0.0.4" + }, + "dependencies": { + "mute-stream": { + "version": "0.0.7", + "bundled": true + } + } + }, + "read-cmd-shim": { + "version": "1.0.1", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.2" + } + }, + "read-installed": { + "version": "4.0.3", + "bundled": true, + "optional": true, + "requires": { + "debuglog": "^1.0.1", + "graceful-fs": "^4.1.2", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "dependencies": { + "util-extend": { + "version": "1.0.3", + "bundled": true, + "optional": true + } + } + }, + "read-package-json": { + "version": "2.0.13", + "bundled": true, + "requires": { + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "slash": "^1.0.0" + }, + "dependencies": { + "json-parse-better-errors": { + "version": "1.0.1", + "bundled": true + }, + "slash": { + "version": "1.0.0", + "bundled": true + } + } + }, + "read-package-tree": { + "version": "5.2.1", + "bundled": true, + "optional": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "once": "^1.3.0", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + } + } + }, + "readdir-scoped-modules": { + "version": "1.0.2", + "bundled": true, + "requires": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "request": { + "version": "2.85.0", + "bundled": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "hawk": "~6.0.2", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "stringstream": "~0.0.5", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + }, + "dependencies": { + "aws-sign2": { + "version": "0.7.0", + "bundled": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true + }, + "combined-stream": { + "version": "1.0.6", + "bundled": true, + "requires": { + "delayed-stream": "~1.0.0" + }, + "dependencies": { + "delayed-stream": { + "version": "1.0.0", + "bundled": true + } + } + }, + "extend": { + "version": "3.0.1", + "bundled": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true + }, + "form-data": { + "version": "2.3.2", + "bundled": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + }, + "dependencies": { + "asynckit": { + "version": "0.4.0", + "bundled": true + } + } + }, + "har-validator": { + "version": "5.0.3", + "bundled": true, + "requires": { + "ajv": "^5.1.0", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "5.5.2", + "bundled": true, + "requires": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + }, + "dependencies": { + "co": { + "version": "4.6.0", + "bundled": true + }, + "fast-deep-equal": { + "version": "1.1.0", + "bundled": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "bundled": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "bundled": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "bundled": true + } + } + }, + "hawk": { + "version": "6.0.2", + "bundled": true, + "requires": { + "boom": "4.x.x", + "cryptiles": "3.x.x", + "hoek": "4.x.x", + "sntp": "2.x.x" + }, + "dependencies": { + "boom": { + "version": "4.3.1", + "bundled": true, + "requires": { + "hoek": "4.x.x" + } + }, + "cryptiles": { + "version": "3.1.2", + "bundled": true, + "requires": { + "boom": "5.x.x" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "bundled": true, + "requires": { + "hoek": "4.x.x" + } + } + } + }, + "hoek": { + "version": "4.2.1", + "bundled": true + }, + "sntp": { + "version": "2.1.0", + "bundled": true, + "requires": { + "hoek": "4.x.x" + } + } + } + }, + "http-signature": { + "version": "1.2.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true + }, + "jsprim": { + "version": "1.4.1", + "bundled": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "dependencies": { + "extsprintf": { + "version": "1.3.0", + "bundled": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true + }, + "verror": { + "version": "1.10.0", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true + } + } + } + } + }, + "sshpk": { + "version": "1.14.1", + "bundled": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "tweetnacl": "~0.14.0" + }, + "dependencies": { + "asn1": { + "version": "0.2.3", + "bundled": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true, + "requires": { + "jsbn": "~0.1.0" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "optional": true + } + } + } + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true + }, + "mime-types": { + "version": "2.1.18", + "bundled": true, + "requires": { + "mime-db": "~1.33.0" + }, + "dependencies": { + "mime-db": { + "version": "1.33.0", + "bundled": true + } + } + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true + }, + "performance-now": { + "version": "2.1.0", + "bundled": true + }, + "qs": { + "version": "6.5.1", + "bundled": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true + }, + "tough-cookie": { + "version": "2.3.4", + "bundled": true, + "requires": { + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "bundled": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.0.1" + } + } + } + }, + "retry": { + "version": "0.12.0", + "bundled": true, + "optional": true + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "semver": { + "version": "5.5.0", + "bundled": true + }, + "sha": { + "version": "2.0.1", + "bundled": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "readable-stream": "^2.0.2" + } + }, + "slide": { + "version": "1.1.6", + "bundled": true + }, + "sorted-object": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "sorted-union-stream": { + "version": "2.1.3", + "bundled": true, + "optional": true, + "requires": { + "from2": "^1.3.0", + "stream-iterate": "^1.1.0" + }, + "dependencies": { + "from2": { + "version": "1.3.0", + "bundled": true, + "optional": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.10" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "isarray": { + "version": "0.0.1", + "bundled": true, + "optional": true + }, + "string_decoder": { + "version": "0.10.31", + "bundled": true, + "optional": true + } + } + } + } + }, + "stream-iterate": { + "version": "1.2.0", + "bundled": true, + "optional": true, + "requires": { + "readable-stream": "^2.1.5", + "stream-shift": "^1.0.0" + }, + "dependencies": { + "stream-shift": { + "version": "1.0.0", + "bundled": true, + "optional": true + } + } + } + } + }, + "ssri": { + "version": "5.3.0", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, + "strip-ansi": { + "version": "4.0.0", + "bundled": true, + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "bundled": true + } + } + }, + "tar": { + "version": "4.4.2", + "bundled": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + }, + "dependencies": { + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "text-table": { + "version": "0.2.0", + "bundled": true, + "optional": true + }, + "tiny-relative-date": { + "version": "1.3.0", + "bundled": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true + }, + "umask": { + "version": "1.1.0", + "bundled": true + }, + "unique-filename": { + "version": "1.1.0", + "bundled": true, + "requires": { + "unique-slug": "^2.0.0" + }, + "dependencies": { + "unique-slug": { + "version": "2.0.0", + "bundled": true, + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "unpipe": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "update-notifier": { + "version": "2.5.0", + "bundled": true, + "requires": { + "boxen": "^1.2.1", + "chalk": "^2.0.1", + "configstore": "^3.0.0", + "import-lazy": "^2.1.0", + "is-ci": "^1.0.10", + "is-installed-globally": "^0.1.0", + "is-npm": "^1.0.0", + "latest-version": "^3.0.0", + "semver-diff": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "boxen": { + "version": "1.3.0", + "bundled": true, + "requires": { + "ansi-align": "^2.0.0", + "camelcase": "^4.0.0", + "chalk": "^2.0.1", + "cli-boxes": "^1.0.0", + "string-width": "^2.0.0", + "term-size": "^1.2.0", + "widest-line": "^2.0.0" + }, + "dependencies": { + "ansi-align": { + "version": "2.0.0", + "bundled": true, + "requires": { + "string-width": "^2.0.0" + } + }, + "camelcase": { + "version": "4.1.0", + "bundled": true + }, + "cli-boxes": { + "version": "1.0.0", + "bundled": true + }, + "string-width": { + "version": "2.1.1", + "bundled": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "bundled": true + } + } + }, + "term-size": { + "version": "1.2.0", + "bundled": true, + "requires": { + "execa": "^0.7.0" + }, + "dependencies": { + "execa": { + "version": "0.7.0", + "bundled": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "5.1.0", + "bundled": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "shebang-command": { + "version": "1.2.0", + "bundled": true, + "requires": { + "shebang-regex": "^1.0.0" + }, + "dependencies": { + "shebang-regex": { + "version": "1.0.0", + "bundled": true + } + } + } + } + }, + "get-stream": { + "version": "3.0.0", + "bundled": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true + }, + "npm-run-path": { + "version": "2.0.2", + "bundled": true, + "requires": { + "path-key": "^2.0.0" + }, + "dependencies": { + "path-key": { + "version": "2.0.1", + "bundled": true + } + } + }, + "p-finally": { + "version": "1.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "strip-eof": { + "version": "1.0.0", + "bundled": true + } + } + } + } + }, + "widest-line": { + "version": "2.0.0", + "bundled": true, + "requires": { + "string-width": "^2.1.1" + } + } + } + }, + "chalk": { + "version": "2.4.1", + "bundled": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "bundled": true, + "requires": { + "color-convert": "^1.9.0" + }, + "dependencies": { + "color-convert": { + "version": "1.9.1", + "bundled": true, + "requires": { + "color-name": "^1.1.1" + }, + "dependencies": { + "color-name": { + "version": "1.1.3", + "bundled": true + } + } + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "bundled": true + }, + "supports-color": { + "version": "5.4.0", + "bundled": true, + "requires": { + "has-flag": "^3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "bundled": true + } + } + } + } + }, + "configstore": { + "version": "3.1.2", + "bundled": true, + "requires": { + "dot-prop": "^4.1.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "unique-string": "^1.0.0", + "write-file-atomic": "^2.0.0", + "xdg-basedir": "^3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "4.2.0", + "bundled": true, + "requires": { + "is-obj": "^1.0.0" + }, + "dependencies": { + "is-obj": { + "version": "1.0.1", + "bundled": true + } + } + }, + "make-dir": { + "version": "1.2.0", + "bundled": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "bundled": true + } + } + }, + "unique-string": { + "version": "1.0.0", + "bundled": true, + "requires": { + "crypto-random-string": "^1.0.0" + }, + "dependencies": { + "crypto-random-string": { + "version": "1.0.0", + "bundled": true + } + } + } + } + }, + "import-lazy": { + "version": "2.1.0", + "bundled": true + }, + "is-ci": { + "version": "1.1.0", + "bundled": true, + "requires": { + "ci-info": "^1.0.0" + }, + "dependencies": { + "ci-info": { + "version": "1.1.3", + "bundled": true + } + } + }, + "is-installed-globally": { + "version": "0.1.0", + "bundled": true, + "requires": { + "global-dirs": "^0.1.0", + "is-path-inside": "^1.0.0" + }, + "dependencies": { + "global-dirs": { + "version": "0.1.1", + "bundled": true, + "requires": { + "ini": "^1.3.4" + } + }, + "is-path-inside": { + "version": "1.0.1", + "bundled": true, + "requires": { + "path-is-inside": "^1.0.1" + } + } + } + }, + "is-npm": { + "version": "1.0.0", + "bundled": true + }, + "latest-version": { + "version": "3.1.0", + "bundled": true, + "requires": { + "package-json": "^4.0.0" + }, + "dependencies": { + "package-json": { + "version": "4.0.1", + "bundled": true, + "requires": { + "got": "^6.7.1", + "registry-auth-token": "^3.0.1", + "registry-url": "^3.0.3", + "semver": "^5.1.0" + }, + "dependencies": { + "got": { + "version": "6.7.1", + "bundled": true, + "requires": { + "create-error-class": "^3.0.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-redirect": "^1.0.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "lowercase-keys": "^1.0.0", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "unzip-response": "^2.0.1", + "url-parse-lax": "^1.0.0" + }, + "dependencies": { + "create-error-class": { + "version": "3.0.2", + "bundled": true, + "requires": { + "capture-stack-trace": "^1.0.0" + }, + "dependencies": { + "capture-stack-trace": { + "version": "1.0.0", + "bundled": true + } + } + }, + "duplexer3": { + "version": "0.1.4", + "bundled": true + }, + "get-stream": { + "version": "3.0.0", + "bundled": true + }, + "is-redirect": { + "version": "1.0.0", + "bundled": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "bundled": true + }, + "is-stream": { + "version": "1.1.0", + "bundled": true + }, + "lowercase-keys": { + "version": "1.0.1", + "bundled": true + }, + "timed-out": { + "version": "4.0.1", + "bundled": true + }, + "unzip-response": { + "version": "2.0.1", + "bundled": true + }, + "url-parse-lax": { + "version": "1.0.0", + "bundled": true, + "requires": { + "prepend-http": "^1.0.1" + }, + "dependencies": { + "prepend-http": { + "version": "1.0.4", + "bundled": true + } + } + } + } + }, + "registry-auth-token": { + "version": "3.3.2", + "bundled": true, + "requires": { + "rc": "^1.1.6", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "rc": { + "version": "1.2.7", + "bundled": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.5.1", + "bundled": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + } + } + } + } + }, + "registry-url": { + "version": "3.1.0", + "bundled": true, + "requires": { + "rc": "^1.0.1" + }, + "dependencies": { + "rc": { + "version": "1.2.7", + "bundled": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "deep-extend": { + "version": "0.5.1", + "bundled": true + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + } + } + } + } + } + } + } + } + }, + "semver-diff": { + "version": "2.1.0", + "bundled": true, + "requires": { + "semver": "^5.0.3" + } + }, + "xdg-basedir": { + "version": "3.0.0", + "bundled": true + } + } + }, + "uuid": { + "version": "3.2.1", + "bundled": true + }, + "validate-npm-package-license": { + "version": "3.0.3", + "bundled": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + }, + "dependencies": { + "spdx-correct": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + }, + "dependencies": { + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true + } + } + }, + "spdx-expression-parse": { + "version": "3.0.0", + "bundled": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + }, + "dependencies": { + "spdx-exceptions": { + "version": "2.1.0", + "bundled": true + }, + "spdx-license-ids": { + "version": "3.0.0", + "bundled": true + } + } + } + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "bundled": true, + "requires": { + "builtins": "^1.0.3" + }, + "dependencies": { + "builtins": { + "version": "1.0.3", + "bundled": true + } + } + }, + "which": { + "version": "1.3.0", + "bundled": true, + "requires": { + "isexe": "^2.0.0" + }, + "dependencies": { + "isexe": { + "version": "2.0.0", + "bundled": true + } + } + }, + "worker-farm": { + "version": "1.6.0", + "bundled": true, + "requires": { + "errno": "~0.1.7" + }, + "dependencies": { + "errno": { + "version": "0.1.7", + "bundled": true, + "requires": { + "prr": "~1.0.1" + }, + "dependencies": { + "prr": { + "version": "1.0.1", + "bundled": true + } + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "write-file-atomic": { + "version": "2.3.0", + "bundled": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + }, + "dependencies": { + "signal-exit": { + "version": "3.0.2", + "bundled": true + } + } + } + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "nssocket": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.5.3.tgz", + "integrity": "sha1-iDyi7GBfXtZKTVGQsmJUAZKPj40=", + "dev": true, + "requires": { + "eventemitter2": "~0.4.14", + "lazy": "~1.0.11" + } + }, + "null-check": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz", + "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0=", + "dev": true + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true, + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, "onetime": { "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -11313,7 +15770,7 @@ "dependencies": { "got": { "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -11344,8 +15801,7 @@ "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" }, "parallel-transform": { "version": "1.1.0", @@ -11467,8 +15923,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { "version": "1.0.2", @@ -12258,7 +16713,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -12753,7 +17208,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -12862,7 +17317,6 @@ "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, "requires": { "resolve": "^1.1.6" } @@ -13186,8 +17640,7 @@ "resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" }, "resolve-cwd": { "version": "2.0.0", @@ -13414,6 +17867,12 @@ "integrity": "sha1-o0a7Gs1CB65wvXwMfKnlZra63bg=", "dev": true }, + "seedrandom": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.3.tgz", + "integrity": "sha1-JDhQTa0zkXMUv/GKxNeU8W1qrsw=", + "optional": true + }, "semver": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", @@ -13563,6 +18022,17 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, + "shelljs": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", + "integrity": "sha1-3svPh0sNHl+3LhSxZKloMEjprLM=", + "optional": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, "shush": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shush/-/shush-1.0.0.tgz", @@ -14095,6 +18565,36 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, + "string-replace-loader": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-1.0.5.tgz", + "integrity": "sha1-4rDU/NYR8NQcpDO79Q4ClFDjej0=", + "dev": true, + "requires": { + "loader-utils": "^0.2.11", + "lodash": "^3.10.1" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + }, + "lodash": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", + "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", + "dev": true + } + } + }, "string-replace-webpack-plugin": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/string-replace-webpack-plugin/-/string-replace-webpack-plugin-0.1.3.tgz", @@ -14573,7 +19073,7 @@ "dependencies": { "rimraf": { "version": "2.2.8", - "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", "dev": true } @@ -15347,8 +19847,7 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "utile": { "version": "0.2.1", @@ -15490,6 +19989,38 @@ "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", "dev": true }, + "vtk.js": { + "version": "6.7.6", + "resolved": "https://registry.npmjs.org/vtk.js/-/vtk.js-6.7.6.tgz", + "integrity": "sha512-9kfDjKjoWXUYRAc73M8miBHzP94KCOQOpU6hIVrksPhEOJT/GQiwHVkcc9uGfSr3YqdJOFqnNqL3E0u7Ld/WWg==", + "optional": true, + "requires": { + "base64-js": "1.2.1", + "blueimp-md5": "2.10.0", + "commander": "2.11.0", + "gl-matrix": "2.5.1", + "jszip": "3.1.4", + "pako": "1.0.6", + "seedrandom": "2.4.3", + "shelljs": "0.7.8", + "webvr-polyfill": "0.10.5", + "webworker-promise": "0.4.1" + }, + "dependencies": { + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "optional": true + }, + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "optional": true + } + } + }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", @@ -16732,6 +21263,27 @@ } } }, + "webvr-polyfill": { + "version": "0.10.5", + "resolved": "http://registry.npmjs.org/webvr-polyfill/-/webvr-polyfill-0.10.5.tgz", + "integrity": "sha512-ICgU+A8tXODKXMVlHGyMAIYpH7nWGP8LRAexTO1KeQZ+5HXxoUS7b0IQTiPUkNtpDE/7oe9swUtR6bEOE3Ta9Q==", + "optional": true, + "requires": { + "cardboard-vr-display": "1.0.11" + } + }, + "webvr-polyfill-dpdb": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/webvr-polyfill-dpdb/-/webvr-polyfill-dpdb-1.0.10.tgz", + "integrity": "sha512-NYohFPyr3V8jtcNV0TC0TusCKwjXnJJpRa2RZgg6ZqvEsMhF79NVhkLU7EhjYQu0i2MmHcNtPFrpsDvywwpTdQ==", + "optional": true + }, + "webworker-promise": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/webworker-promise/-/webworker-promise-0.4.1.tgz", + "integrity": "sha512-cfFNKzV7ig9HeWFBXgptd9E3YArCuqBVgK5rdodgfCfQ/BAan6d03AFZq/2cHUUFvWv0IdEUGuIGcYQY8XWdYg==", + "optional": true + }, "when": { "version": "3.7.8", "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", @@ -16898,8 +21450,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write": { "version": "0.2.1", @@ -17365,7 +21916,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, diff --git a/package.json b/package.json index 8e2195be85..0384a15c6c 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "optionalDependencies": { "d3": "^3.5.16", "hammerjs": "^2.0.8", - "vtk.js": "^5.15.6" + "vtk.js": "^6.7.6" }, "devDependencies": { "babel-core": "^6.26.0", From 0ecd708b029665271b35a299c78f6dabd72f3486 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Wed, 24 Oct 2018 10:41:56 -0400 Subject: [PATCH 34/41] Make vtk.js example load --- examples/vtkjs/capitals.json | 1 + examples/vtkjs/example.json | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 examples/vtkjs/capitals.json create mode 100644 examples/vtkjs/example.json diff --git a/examples/vtkjs/capitals.json b/examples/vtkjs/capitals.json new file mode 100644 index 0000000000..56b32074bd --- /dev/null +++ b/examples/vtkjs/capitals.json @@ -0,0 +1 @@ +[{"latitude": 42.50779, "city": "Andorra la Vella", "longitude": 1.52109, "country": "AD"}, {"latitude": 24.46667, "city": "Abu Dhabi", "longitude": 54.36667, "country": "AE"}, {"latitude": 34.52813, "city": "Kabul", "longitude": 69.17233, "country": "AF"}, {"latitude": 17.11717, "city": "Saint John\u2019s", "longitude": -61.84573, "country": "AG"}, {"latitude": 18.21704, "city": "The Valley", "longitude": -63.05783, "country": "AI"}, {"latitude": 41.3275, "city": "Tirana", "longitude": 19.81889, "country": "AL"}, {"latitude": 40.18111, "city": "Yerevan", "longitude": 44.51361, "country": "AM"}, {"latitude": -8.83682, "city": "Luanda", "longitude": 13.23432, "country": "AO"}, {"latitude": -34.61315, "city": "Buenos Aires", "longitude": -58.37723, "country": "AR"}, {"latitude": -35.29255, "city": "Facundo Quiroga", "longitude": -61.40596, "country": "AR"}, {"latitude": -14.27806, "city": "Pago Pago", "longitude": -170.7025, "country": "AS"}, {"latitude": 48.20849, "city": "Vienna", "longitude": 16.37208, "country": "AT"}, {"latitude": -35.28346, "city": "Canberra", "longitude": 149.12807, "country": "AU"}, {"latitude": 12.52398, "city": "Oranjestad", "longitude": -70.02703, "country": "AW"}, {"latitude": 60.09726, "city": "Mariehamn", "longitude": 19.93481, "country": "AX"}, {"latitude": 40.37767, "city": "Baku", "longitude": 49.89201, "country": "AZ"}, {"latitude": 43.84864, "city": "Sarajevo", "longitude": 18.35644, "country": "BA"}, {"latitude": 13.1, "city": "Bridgetown", "longitude": -59.61667, "country": "BB"}, {"latitude": 23.7104, "city": "Dhaka", "longitude": 90.40744, "country": "BD"}, {"latitude": 50.85045, "city": "Brussels", "longitude": 4.34878, "country": "BE"}, {"latitude": 12.36566, "city": "Ouagadougou", "longitude": -1.53388, "country": "BF"}, {"latitude": 42.69751, "city": "Sofia", "longitude": 23.32415, "country": "BG"}, {"latitude": 26.21536, "city": "Manama", "longitude": 50.5832, "country": "BH"}, {"latitude": -3.3822, "city": "Bujumbura", "longitude": 29.3644, "country": "BI"}, {"latitude": 6.49646, "city": "Porto-Novo", "longitude": 2.60359, "country": "BJ"}, {"latitude": 17.89618, "city": "Gustavia", "longitude": -62.84978, "country": "BL"}, {"latitude": 32.2949, "city": "Hamilton", "longitude": -64.78303, "country": "BM"}, {"latitude": 4.94029, "city": "Bandar Seri Begawan", "longitude": 114.94806, "country": "BN"}, {"latitude": -19.03332, "city": "Sucre", "longitude": -65.26274, "country": "BO"}, {"latitude": 12.15, "city": "Kralendijk", "longitude": -68.26667, "country": "BQ"}, {"latitude": -15.77972, "city": "Bras\u00edlia", "longitude": -47.92972, "country": "BR"}, {"latitude": 25.05823, "city": "Nassau", "longitude": -77.34306, "country": "BS"}, {"latitude": 27.46609, "city": "Thimphu", "longitude": 89.64191, "country": "BT"}, {"latitude": -24.65451, "city": "Gaborone", "longitude": 25.90859, "country": "BW"}, {"latitude": 53.9, "city": "Minsk", "longitude": 27.56667, "country": "BY"}, {"latitude": 17.25, "city": "Belmopan", "longitude": -88.76667, "country": "BZ"}, {"latitude": 45.41117, "city": "Ottawa", "longitude": -75.69812, "country": "CA"}, {"latitude": -12.15681, "city": "West Island", "longitude": 96.82251, "country": "CC"}, {"latitude": -4.32758, "city": "Kinshasa", "longitude": 15.31357, "country": "CD"}, {"latitude": 4.36122, "city": "Bangui", "longitude": 18.55496, "country": "CF"}, {"latitude": -4.26613, "city": "Brazzaville", "longitude": 15.28318, "country": "CG"}, {"latitude": 46.94809, "city": "Bern", "longitude": 7.44744, "country": "CH"}, {"latitude": 6.82055, "city": "Yamoussoukro", "longitude": -5.27674, "country": "CI"}, {"latitude": -21.20778, "city": "Avarua", "longitude": -159.775, "country": "CK"}, {"latitude": -33.45694, "city": "Santiago", "longitude": -70.64827, "country": "CL"}, {"latitude": 3.86667, "city": "Yaound\u00e9", "longitude": 11.51667, "country": "CM"}, {"latitude": 39.9075, "city": "Beijing", "longitude": 116.39723, "country": "CN"}, {"latitude": 4.60971, "city": "Bogot\u00e1", "longitude": -74.08175, "country": "CO"}, {"latitude": 9.93333, "city": "San Jos\u00e9", "longitude": -84.08333, "country": "CR"}, {"latitude": 23.13302, "city": "Havana", "longitude": -82.38304, "country": "CU"}, {"latitude": 14.93152, "city": "Praia", "longitude": -23.51254, "country": "CV"}, {"latitude": 12.1084, "city": "Willemstad", "longitude": -68.93354, "country": "CW"}, {"latitude": -10.42172, "city": "Flying Fish Cove", "longitude": 105.67912, "country": "CX"}, {"latitude": 35.17531, "city": "Nicosia", "longitude": 33.3642, "country": "CY"}, {"latitude": 50.08804, "city": "Prague", "longitude": 14.42076, "country": "CZ"}, {"latitude": 52.52437, "city": "Berlin", "longitude": 13.41053, "country": "DE"}, {"latitude": 11.58901, "city": "Djibouti", "longitude": 43.14503, "country": "DJ"}, {"latitude": 55.67594, "city": "Copenhagen", "longitude": 12.56553, "country": "DK"}, {"latitude": 15.30174, "city": "Roseau", "longitude": -61.38808, "country": "DM"}, {"latitude": 18.50012, "city": "Santo Domingo", "longitude": -69.98857, "country": "DO"}, {"latitude": 36.7525, "city": "Algiers", "longitude": 3.04197, "country": "DZ"}, {"latitude": -0.22985, "city": "Quito", "longitude": -78.52495, "country": "EC"}, {"latitude": 59.43696, "city": "Tallinn", "longitude": 24.75353, "country": "EE"}, {"latitude": 30.06263, "city": "Cairo", "longitude": 31.24967, "country": "EG"}, {"latitude": 27.1418, "city": "La\u00e2youne / El Aai\u00fan", "longitude": -13.18797, "country": "EH"}, {"latitude": 15.33805, "city": "Asmara", "longitude": 38.93184, "country": "ER"}, {"latitude": 40.4165, "city": "Madrid", "longitude": -3.70256, "country": "ES"}, {"latitude": 9.02497, "city": "Addis Ababa", "longitude": 38.74689, "country": "ET"}, {"latitude": 60.16952, "city": "Helsinki", "longitude": 24.93545, "country": "FI"}, {"latitude": -18.14161, "city": "Suva", "longitude": 178.44149, "country": "FJ"}, {"latitude": -51.7, "city": "Stanley", "longitude": -57.85, "country": "FK"}, {"latitude": 6.92477, "city": "Palikir - National Government Center", "longitude": 158.16109, "country": "FM"}, {"latitude": 62.00973, "city": "T\u00f3rshavn", "longitude": -6.77164, "country": "FO"}, {"latitude": 48.85341, "city": "Paris", "longitude": 2.3488, "country": "FR"}, {"latitude": 0.39241, "city": "Libreville", "longitude": 9.45356, "country": "GA"}, {"latitude": 51.50853, "city": "London", "longitude": -0.12574, "country": "GB"}, {"latitude": 12.05644, "city": "Saint George's", "longitude": -61.74849, "country": "GD"}, {"latitude": 41.69411, "city": "Tbilisi", "longitude": 44.83368, "country": "GE"}, {"latitude": 4.93333, "city": "Cayenne", "longitude": -52.33333, "country": "GF"}, {"latitude": 49.45981, "city": "Saint Peter Port", "longitude": -2.53527, "country": "GG"}, {"latitude": 5.55602, "city": "Accra", "longitude": -0.1969, "country": "GH"}, {"latitude": 36.14474, "city": "Gibraltar", "longitude": -5.35257, "country": "GI"}, {"latitude": 64.18347, "city": "Nuuk", "longitude": -51.72157, "country": "GL"}, {"latitude": 13.45274, "city": "Banjul", "longitude": -16.57803, "country": "GM"}, {"latitude": 9.53795, "city": "Conakry", "longitude": -13.67729, "country": "GN"}, {"latitude": 15.99854, "city": "Basse-Terre", "longitude": -61.72548, "country": "GP"}, {"latitude": 3.75, "city": "Malabo", "longitude": 8.78333, "country": "GQ"}, {"latitude": 37.97945, "city": "Athens", "longitude": 23.71622, "country": "GR"}, {"latitude": -54.28111, "city": "Grytviken", "longitude": -36.5092, "country": "GS"}, {"latitude": 14.64072, "city": "Guatemala City", "longitude": -90.51327, "country": "GT"}, {"latitude": 13.47567, "city": "Hag\u00e5t\u00f1a", "longitude": 144.74886, "country": "GU"}, {"latitude": 11.86357, "city": "Bissau", "longitude": -15.59767, "country": "GW"}, {"latitude": 6.80448, "city": "Georgetown", "longitude": -58.15527, "country": "GY"}, {"latitude": 22.28552, "city": "Hong Kong", "longitude": 114.15769, "country": "HK"}, {"latitude": 14.0818, "city": "Tegucigalpa", "longitude": -87.20681, "country": "HN"}, {"latitude": 45.81444, "city": "Zagreb", "longitude": 15.97798, "country": "HR"}, {"latitude": 18.53917, "city": "Port-au-Prince", "longitude": -72.335, "country": "HT"}, {"latitude": 47.49801, "city": "Budapest", "longitude": 19.03991, "country": "HU"}, {"latitude": -6.21462, "city": "Jakarta", "longitude": 106.84513, "country": "ID"}, {"latitude": 53.33306, "city": "Dublin", "longitude": -6.24889, "country": "IE"}, {"latitude": 54.15, "city": "Douglas", "longitude": -4.48333, "country": "IM"}, {"latitude": 28.63576, "city": "New Delhi", "longitude": 77.22445, "country": "IN"}, {"latitude": 33.34058, "city": "Baghdad", "longitude": 44.40088, "country": "IQ"}, {"latitude": 35.69439, "city": "Tehr\u0101n", "longitude": 51.42151, "country": "IR"}, {"latitude": 64.13548, "city": "Reykjav\u00edk", "longitude": -21.89541, "country": "IS"}, {"latitude": 41.89193, "city": "Rome", "longitude": 12.51133, "country": "IT"}, {"latitude": 49.18804, "city": "Saint Helier", "longitude": -2.10491, "country": "JE"}, {"latitude": 17.99702, "city": "Kingston", "longitude": -76.79358, "country": "JM"}, {"latitude": 31.95522, "city": "Amman", "longitude": 35.94503, "country": "JO"}, {"latitude": 35.6895, "city": "Tokyo", "longitude": 139.69171, "country": "JP"}, {"latitude": -1.28333, "city": "Nairobi", "longitude": 36.81667, "country": "KE"}, {"latitude": 42.87, "city": "Bishkek", "longitude": 74.59, "country": "KG"}, {"latitude": 11.56245, "city": "Phnom Penh", "longitude": 104.91601, "country": "KH"}, {"latitude": 1.3278, "city": "Tarawa", "longitude": 172.97696, "country": "KI"}, {"latitude": -11.70216, "city": "Moroni", "longitude": 43.25506, "country": "KM"}, {"latitude": 17.29484, "city": "Basseterre", "longitude": -62.7261, "country": "KN"}, {"latitude": 39.03385, "city": "Pyongyang", "longitude": 125.75432, "country": "KP"}, {"latitude": 37.566, "city": "Seoul", "longitude": 126.9784, "country": "KR"}, {"latitude": 29.36972, "city": "Kuwait City", "longitude": 47.97833, "country": "KW"}, {"latitude": 19.2866, "city": "George Town", "longitude": -81.37436, "country": "KY"}, {"latitude": 51.1801, "city": "Astana", "longitude": 71.44598, "country": "KZ"}, {"latitude": 17.96667, "city": "Vientiane", "longitude": 102.6, "country": "LA"}, {"latitude": 33.88894, "city": "Beirut", "longitude": 35.49442, "country": "LB"}, {"latitude": 13.9957, "city": "Castries", "longitude": -61.00614, "country": "LC"}, {"latitude": 47.14151, "city": "Vaduz", "longitude": 9.52154, "country": "LI"}, {"latitude": 6.93194, "city": "Colombo", "longitude": 79.84778, "country": "LK"}, {"latitude": 6.30054, "city": "Monrovia", "longitude": -10.7969, "country": "LR"}, {"latitude": -29.31667, "city": "Maseru", "longitude": 27.48333, "country": "LS"}, {"latitude": 54.68916, "city": "Vilnius", "longitude": 25.2798, "country": "LT"}, {"latitude": 49.61167, "city": "Luxembourg", "longitude": 6.13, "country": "LU"}, {"latitude": 56.946, "city": "Riga", "longitude": 24.10589, "country": "LV"}, {"latitude": 32.87519, "city": "Tripoli", "longitude": 13.18746, "country": "LY"}, {"latitude": 34.01325, "city": "Rabat", "longitude": -6.83255, "country": "MA"}, {"latitude": 43.73333, "city": "Monaco", "longitude": 7.41667, "country": "MC"}, {"latitude": 47.00556, "city": "Chi\u015fin\u0103u", "longitude": 28.8575, "country": "MD"}, {"latitude": 42.44111, "city": "Podgorica", "longitude": 19.26361, "country": "ME"}, {"latitude": 18.06667, "city": "Marigot", "longitude": -63.08333, "country": "MF"}, {"latitude": -18.91368, "city": "Antananarivo", "longitude": 47.53613, "country": "MG"}, {"latitude": 7.08971, "city": "Majuro", "longitude": 171.38027, "country": "MH"}, {"latitude": 41.99646, "city": "Skopje", "longitude": 21.43141, "country": "MK"}, {"latitude": 12.65, "city": "Bamako", "longitude": -8.0, "country": "ML"}, {"latitude": 19.745, "city": "Nay Pyi Taw", "longitude": 96.12972, "country": "MM"}, {"latitude": 47.90771, "city": "Ulaanbaatar", "longitude": 106.88324, "country": "MN"}, {"latitude": 22.20056, "city": "Macau", "longitude": 113.54611, "country": "MO"}, {"latitude": 15.21233, "city": "Saipan", "longitude": 145.7545, "country": "MP"}, {"latitude": 14.60892, "city": "Fort-de-France", "longitude": -61.07334, "country": "MQ"}, {"latitude": 18.08581, "city": "Nouakchott", "longitude": -15.9785, "country": "MR"}, {"latitude": 16.70555, "city": "Plymouth", "longitude": -62.21292, "country": "MS"}, {"latitude": 35.89972, "city": "Valletta", "longitude": 14.51472, "country": "MT"}, {"latitude": -20.16194, "city": "Port Louis", "longitude": 57.49889, "country": "MU"}, {"latitude": 4.1748, "city": "Male", "longitude": 73.50888, "country": "MV"}, {"latitude": -13.96692, "city": "Lilongwe", "longitude": 33.78725, "country": "MW"}, {"latitude": 19.42847, "city": "Mexico City", "longitude": -99.12766, "country": "MX"}, {"latitude": 3.1412, "city": "Kuala Lumpur", "longitude": 101.68653, "country": "MY"}, {"latitude": -25.96553, "city": "Maputo", "longitude": 32.58322, "country": "MZ"}, {"latitude": -22.55941, "city": "Windhoek", "longitude": 17.08323, "country": "NA"}, {"latitude": -22.27631, "city": "Noum\u00e9a", "longitude": 166.4572, "country": "NC"}, {"latitude": 13.51366, "city": "Niamey", "longitude": 2.1098, "country": "NE"}, {"latitude": -29.05459, "city": "Kingston", "longitude": 167.96628, "country": "NF"}, {"latitude": 9.05785, "city": "Abuja", "longitude": 7.49508, "country": "NG"}, {"latitude": 12.13282, "city": "Managua", "longitude": -86.2504, "country": "NI"}, {"latitude": 52.37403, "city": "Amsterdam", "longitude": 4.88969, "country": "NL"}, {"latitude": 59.91273, "city": "Oslo", "longitude": 10.74609, "country": "NO"}, {"latitude": 27.70169, "city": "Kathmandu", "longitude": 85.3206, "country": "NP"}, {"latitude": -19.05952, "city": "Alofi", "longitude": -169.91867, "country": "NU"}, {"latitude": -41.28664, "city": "Wellington", "longitude": 174.77557, "country": "NZ"}, {"latitude": 23.61387, "city": "Muscat", "longitude": 58.5922, "country": "OM"}, {"latitude": 8.9936, "city": "Panam\u00e1", "longitude": -79.51973, "country": "PA"}, {"latitude": -12.04318, "city": "Lima", "longitude": -77.02824, "country": "PE"}, {"latitude": -17.53733, "city": "Papeete", "longitude": -149.5665, "country": "PF"}, {"latitude": -9.44314, "city": "Port Moresby", "longitude": 147.17972, "country": "PG"}, {"latitude": 14.6042, "city": "Manila", "longitude": 120.9822, "country": "PH"}, {"latitude": 33.72148, "city": "Islamabad", "longitude": 73.04329, "country": "PK"}, {"latitude": 52.22977, "city": "Warsaw", "longitude": 21.01178, "country": "PL"}, {"latitude": 46.77914, "city": "Saint-Pierre", "longitude": -56.1773, "country": "PM"}, {"latitude": -25.06597, "city": "Adamstown", "longitude": -130.10147, "country": "PN"}, {"latitude": 18.46633, "city": "San Juan", "longitude": -66.10572, "country": "PR"}, {"latitude": 38.71667, "city": "Lisbon", "longitude": -9.13333, "country": "PT"}, {"latitude": 7.50043, "city": "Melekeok", "longitude": 134.62355, "country": "PW"}, {"latitude": -25.30066, "city": "Asunci\u00f3n", "longitude": -57.63591, "country": "PY"}, {"latitude": 25.27932, "city": "Doha", "longitude": 51.52245, "country": "QA"}, {"latitude": -20.88231, "city": "Saint-Denis", "longitude": 55.4504, "country": "RE"}, {"latitude": 44.43225, "city": "Bucharest", "longitude": 26.10626, "country": "RO"}, {"latitude": 44.80401, "city": "Belgrade", "longitude": 20.46513, "country": "RS"}, {"latitude": 55.75222, "city": "Moscow", "longitude": 37.61556, "country": "RU"}, {"latitude": -1.94995, "city": "Kigali", "longitude": 30.05885, "country": "RW"}, {"latitude": 24.68773, "city": "Riyadh", "longitude": 46.72185, "country": "SA"}, {"latitude": -9.43333, "city": "Honiara", "longitude": 159.95, "country": "SB"}, {"latitude": -4.61667, "city": "Victoria", "longitude": 55.45, "country": "SC"}, {"latitude": 15.55177, "city": "Khartoum", "longitude": 32.53241, "country": "SD"}, {"latitude": 59.33258, "city": "Stockholm", "longitude": 18.0649, "country": "SE"}, {"latitude": 1.28967, "city": "Singapore", "longitude": 103.85007, "country": "SG"}, {"latitude": -15.93872, "city": "Jamestown", "longitude": -5.71675, "country": "SH"}, {"latitude": 46.05108, "city": "Ljubljana", "longitude": 14.50513, "country": "SI"}, {"latitude": 78.22334, "city": "Longyearbyen", "longitude": 15.64689, "country": "SJ"}, {"latitude": 48.14816, "city": "Bratislava", "longitude": 17.10674, "country": "SK"}, {"latitude": 8.484, "city": "Freetown", "longitude": -13.22994, "country": "SL"}, {"latitude": 43.93667, "city": "San Marino", "longitude": 12.44639, "country": "SM"}, {"latitude": 14.6937, "city": "Dakar", "longitude": -17.44406, "country": "SN"}, {"latitude": 2.03711, "city": "Mogadishu", "longitude": 45.34375, "country": "SO"}, {"latitude": 5.86638, "city": "Paramaribo", "longitude": -55.16682, "country": "SR"}, {"latitude": 4.85165, "city": "Juba", "longitude": 31.58247, "country": "SS"}, {"latitude": 0.33654, "city": "S\u00e3o Tom\u00e9", "longitude": 6.72732, "country": "ST"}, {"latitude": 13.68935, "city": "San Salvador", "longitude": -89.18718, "country": "SV"}, {"latitude": 18.026, "city": "Philipsburg", "longitude": -63.04582, "country": "SX"}, {"latitude": 33.5102, "city": "Damascus", "longitude": 36.29128, "country": "SY"}, {"latitude": -26.31667, "city": "Mbabane", "longitude": 31.13333, "country": "SZ"}, {"latitude": 21.46122, "city": "Cockburn Town", "longitude": -71.14188, "country": "TC"}, {"latitude": 12.10672, "city": "N'Djamena", "longitude": 15.0444, "country": "TD"}, {"latitude": -49.35, "city": "Port-aux-Fran\u00e7ais", "longitude": 70.21667, "country": "TF"}, {"latitude": 6.13748, "city": "Lom\u00e9", "longitude": 1.21227, "country": "TG"}, {"latitude": 13.75398, "city": "Bangkok", "longitude": 100.50144, "country": "TH"}, {"latitude": 38.53575, "city": "Dushanbe", "longitude": 68.77905, "country": "TJ"}, {"latitude": -8.55861, "city": "Dili", "longitude": 125.57361, "country": "TL"}, {"latitude": 37.95, "city": "Ashgabat", "longitude": 58.38333, "country": "TM"}, {"latitude": 36.81897, "city": "Tunis", "longitude": 10.16579, "country": "TN"}, {"latitude": -21.13938, "city": "Nuku\u2018alofa", "longitude": -175.2018, "country": "TO"}, {"latitude": 39.91987, "city": "Ankara", "longitude": 32.85427, "country": "TR"}, {"latitude": 10.66668, "city": "Port-of-Spain", "longitude": -61.51889, "country": "TT"}, {"latitude": -8.52425, "city": "Funafuti", "longitude": 179.19417, "country": "TV"}, {"latitude": 25.04776, "city": "Taipei", "longitude": 121.53185, "country": "TW"}, {"latitude": -6.17221, "city": "Dodoma", "longitude": 35.73947, "country": "TZ"}, {"latitude": 50.45466, "city": "Kiev", "longitude": 30.5238, "country": "UA"}, {"latitude": 0.31628, "city": "Kampala", "longitude": 32.58219, "country": "UG"}, {"latitude": 38.89511, "city": "Washington, D.C.", "longitude": -77.03637, "country": "US"}, {"latitude": -34.90328, "city": "Montevideo", "longitude": -56.18816, "country": "UY"}, {"latitude": 41.26465, "city": "Tashkent", "longitude": 69.21627, "country": "UZ"}, {"latitude": 41.90236, "city": "Vatican City", "longitude": 12.45332, "country": "VA"}, {"latitude": 13.15872, "city": "Kingstown", "longitude": -61.22475, "country": "VC"}, {"latitude": 10.48801, "city": "Caracas", "longitude": -66.87919, "country": "VE"}, {"latitude": 18.42693, "city": "Road Town", "longitude": -64.62079, "country": "VG"}, {"latitude": 18.3419, "city": "Charlotte Amalie", "longitude": -64.9307, "country": "VI"}, {"latitude": 21.0245, "city": "Hanoi", "longitude": 105.84117, "country": "VN"}, {"latitude": -17.73381, "city": "Port-Vila", "longitude": 168.32188, "country": "VU"}, {"latitude": -13.28163, "city": "Mata-Utu", "longitude": -176.17453, "country": "WF"}, {"latitude": -13.83333, "city": "Apia", "longitude": -171.76666, "country": "WS"}, {"latitude": 42.67272, "city": "Pristina", "longitude": 21.16688, "country": "XK"}, {"latitude": 15.35472, "city": "Sanaa", "longitude": 44.20667, "country": "YE"}, {"latitude": -12.78234, "city": "Mamoudzou", "longitude": 45.22878, "country": "YT"}, {"latitude": -25.74486, "city": "Pretoria", "longitude": 28.18783, "country": "ZA"}, {"latitude": -15.40669, "city": "Lusaka", "longitude": 28.28713, "country": "ZM"}, {"latitude": -17.82772, "city": "Harare", "longitude": 31.05337, "country": "ZW"}] \ No newline at end of file diff --git a/examples/vtkjs/example.json b/examples/vtkjs/example.json new file mode 100644 index 0000000000..489311316f --- /dev/null +++ b/examples/vtkjs/example.json @@ -0,0 +1,7 @@ +{ + "title": "VTK.js", + "exampleJs": ["main.js"], + "about": { + "text": "Show state capitals as points using the vtkjs renderer." + } +} From 85fd89e1cddcc2f7976fcec9af255cd94df28488 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Wed, 24 Oct 2018 11:19:30 -0400 Subject: [PATCH 35/41] Clean up vtkjs example code --- examples/vtkjs/main.js | 100 ++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 67 deletions(-) diff --git a/examples/vtkjs/main.js b/examples/vtkjs/main.js index b03b0ceb4e..b0a3fdcb38 100644 --- a/examples/vtkjs/main.js +++ b/examples/vtkjs/main.js @@ -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(); }); From 3472f2b1a24198f9a2d889f3c6c5a2da976b96c7 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Wed, 24 Oct 2018 12:00:29 -0400 Subject: [PATCH 36/41] Improve comments in vtkjs example --- examples/vtkjs/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/vtkjs/main.js b/examples/vtkjs/main.js index b0a3fdcb38..6c72e9244a 100644 --- a/examples/vtkjs/main.js +++ b/examples/vtkjs/main.js @@ -1,3 +1,4 @@ +// Fetch the dataset from the server $.ajax({url: 'capitals.json'}).done(function (capitals) { // Create a map object with reasonable center and zoom level var map = geo.map({ @@ -9,7 +10,7 @@ $.ajax({url: 'capitals.json'}).done(function (capitals) { clampZoom: false, discreteZoom: false }); - // Add the tile layer with the specified parameters + // Add the map tile layer map.createLayer('osm', { zIndex: 0, minLevel: 4, @@ -27,7 +28,8 @@ $.ajax({url: 'capitals.json'}).done(function (capitals) { fillOpacity: Math.random } }) - .data(capitals) // bind data + // Bind the dataset to the vtk layer + .data(capitals) .position(function (d) { return {x: d.longitude, y: d.latitude}; // position accessor }) From 0a490be5c6bd9ea45203a8d257c80e0e1bc9a5be Mon Sep 17 00:00:00 2001 From: David Manthey Date: Mon, 29 Oct 2018 12:54:30 -0400 Subject: [PATCH 37/41] Hack some fixes for the vtkjs renderer and pointFeature. See the several TODO comments for things that need fixing. --- src/vtkjs/pointFeature.js | 22 +++++++++++++++------- src/vtkjs/vtkjsRenderer.js | 24 +++++++++++++++++++++--- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 65b38e1283..d5851dbb46 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -33,6 +33,7 @@ var vtkjs_pointFeature = function (arg) { * @private */ var m_this = this, + s_init = this._init, s_exit = this._exit, m_actor = null, m_pointSet = null, @@ -59,6 +60,7 @@ var vtkjs_pointFeature = function (arg) { * Initialize */ this._init = function () { + s_init.call(m_this, arg); m_this.renderer().contextRenderer().setLayer(1); this._createPipeline(); }; @@ -85,26 +87,32 @@ var vtkjs_pointFeature = function (arg) { position[i3 + 1] = posVal.y; position[i3 + 2] = posVal.z || 0; nonzeroZ = nonzeroZ || position[i3 + 2]; + // TODO: fix the opacity per point. m_actor.getProperty().setOpacity(opacityFunc(data[i])); } position = transform.transformCoordinates( m_this.gcs(), m_this.layer().map().gcs(), position, 3); + /* Some transforms modify the z-coordinate. If we started with all zero z + * coordinates, don't modify them. This could be changed if the + * z-coordinate space of the gl cube is scaled appropriately. */ if (!nonzeroZ && m_this.gcs() !== m_this.layer().map().gcs()) { for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { position[i3 + 2] = 0; } } - /* Some transforms modify the z-coordinate. If we started with all zero z - * coordinates, don't modify them. This could be changed if the - * z-coordinate space of the gl cube is scaled appropriately. */ + // TODO: points can vary, this needs to be refactors to have a distinct + // size per point. What should be done with the strokeColor, strokeWidth, + // and strokeOpacity? Honor the fill/stroke options or document that we + // don't honot them. + var rad = radFunc(), clr = colorFunc(); + rad *= m_this.layer().map().unitsPerPixel(m_this.layer().map().zoom()); m_pointSet.getPoints().setData(position, 3); - m_source.setRadius(radFunc()); - m_actor.getProperty().setColor(colorFunc()['r'], - colorFunc()['g'], - colorFunc()['b']); + m_source.setRadius(rad); + // TODO: This is not setting the color of the rendered points + m_actor.getProperty().setColor(clr.r, clr.g, clr.b); m_this.buildTime().modified(); console.debug('built vtkjs point feature'); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 3af65b066b..0017129d2e 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -22,6 +22,9 @@ var vtkjsRenderer = function (arg) { var mat4 = require('gl-mat4'); var geo_event = require('../event'); var vtkjs = vtkjsRenderer.vtkjs; + // TODO: use the GenericRenderWindow, match the size of the parent div, and + // call setContainer to attach it to the parent div. The parent div is: + // m_this.layer().node().get(0) var vtkFullScreenRenderWindow = vtkjs.Rendering.Misc.vtkFullScreenRenderWindow; var m_this = this, @@ -29,10 +32,11 @@ var vtkjsRenderer = function (arg) { m_height = 0, s_init = this._init; - var fullScreenRenderer = vtkFullScreenRenderWindow.newInstance({ + // TODO: don't draw a background. Does transparent work? + var vtkRenderer = vtkFullScreenRenderWindow.newInstance({ background: [0.1, 0.5, 0.5] }); - var vtkjsren = fullScreenRenderer.getRenderer(); - var renderWindow = fullScreenRenderer.getRenderWindow(); + var vtkjsren = vtkRenderer.getRenderer(); + var renderWindow = vtkRenderer.getRenderWindow(); /** * Return width of the renderer @@ -76,6 +80,9 @@ var vtkjsRenderer = function (arg) { var map = m_this.layer().map(), mapSize = map.size(); m_this._resize(0, 0, mapSize.width, mapSize.height); + // TODO: figure out what the clipbounds actually should be and handle + // perspective modes properly. + map.camera().clipbounds = {near: -map.unitsPerPixel(), far: map.unitsPerPixel()}; return m_this; }; @@ -106,6 +113,15 @@ var vtkjsRenderer = function (arg) { * This clears the render timer and actually renders. */ this._renderFrame = function () { + var layer = m_this.layer(), + features = layer.features(), + i; + // TODO: draw something else should trigger feature update + for (i = 0; i < features.length; i += 1) { + if (features[i].visible()) { + features[i]._update(); + } + } m_this._updateRendererCamera(); renderWindow.render(); }; @@ -135,6 +151,8 @@ var vtkjsRenderer = function (arg) { *produce a pan */ m_this.layer().geoOn(geo_event.pan, function (evt) { + // TODO: If the zoom level has changed, our point size needs to be + // recalculated, so we should call m_this._render // DO NOTHING }); From d4a5cdb503455c1311c0fc8f8bccfdb423d45ef0 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 30 Oct 2018 11:01:12 -0400 Subject: [PATCH 38/41] More fixups for the vtkjs renderer. This removes the duplicate capitals.json and just references the file from the reprojection example. This adds a very basic test for the vtkjs point feature. It really only tests that the canvas is created. --- examples/vtkjs/capitals.json | 1 - examples/vtkjs/example.json | 7 +++-- examples/vtkjs/main.js | 28 +++++-------------- package-lock.json | 43 ++++++----------------------- package.json | 1 - src/vtkjs/pointFeature.js | 10 +++---- src/vtkjs/vtkjsRenderer.js | 18 ++++++------ tests/gl-cases/vtkjsPointFeature.js | 40 +++++++++++++++++++++++++++ tests/test-utils.js | 2 ++ 9 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 examples/vtkjs/capitals.json create mode 100644 tests/gl-cases/vtkjsPointFeature.js diff --git a/examples/vtkjs/capitals.json b/examples/vtkjs/capitals.json deleted file mode 100644 index 56b32074bd..0000000000 --- a/examples/vtkjs/capitals.json +++ /dev/null @@ -1 +0,0 @@ -[{"latitude": 42.50779, "city": "Andorra la Vella", "longitude": 1.52109, "country": "AD"}, {"latitude": 24.46667, "city": "Abu Dhabi", "longitude": 54.36667, "country": "AE"}, {"latitude": 34.52813, "city": "Kabul", "longitude": 69.17233, "country": "AF"}, {"latitude": 17.11717, "city": "Saint John\u2019s", "longitude": -61.84573, "country": "AG"}, {"latitude": 18.21704, "city": "The Valley", "longitude": -63.05783, "country": "AI"}, {"latitude": 41.3275, "city": "Tirana", "longitude": 19.81889, "country": "AL"}, {"latitude": 40.18111, "city": "Yerevan", "longitude": 44.51361, "country": "AM"}, {"latitude": -8.83682, "city": "Luanda", "longitude": 13.23432, "country": "AO"}, {"latitude": -34.61315, "city": "Buenos Aires", "longitude": -58.37723, "country": "AR"}, {"latitude": -35.29255, "city": "Facundo Quiroga", "longitude": -61.40596, "country": "AR"}, {"latitude": -14.27806, "city": "Pago Pago", "longitude": -170.7025, "country": "AS"}, {"latitude": 48.20849, "city": "Vienna", "longitude": 16.37208, "country": "AT"}, {"latitude": -35.28346, "city": "Canberra", "longitude": 149.12807, "country": "AU"}, {"latitude": 12.52398, "city": "Oranjestad", "longitude": -70.02703, "country": "AW"}, {"latitude": 60.09726, "city": "Mariehamn", "longitude": 19.93481, "country": "AX"}, {"latitude": 40.37767, "city": "Baku", "longitude": 49.89201, "country": "AZ"}, {"latitude": 43.84864, "city": "Sarajevo", "longitude": 18.35644, "country": "BA"}, {"latitude": 13.1, "city": "Bridgetown", "longitude": -59.61667, "country": "BB"}, {"latitude": 23.7104, "city": "Dhaka", "longitude": 90.40744, "country": "BD"}, {"latitude": 50.85045, "city": "Brussels", "longitude": 4.34878, "country": "BE"}, {"latitude": 12.36566, "city": "Ouagadougou", "longitude": -1.53388, "country": "BF"}, {"latitude": 42.69751, "city": "Sofia", "longitude": 23.32415, "country": "BG"}, {"latitude": 26.21536, "city": "Manama", "longitude": 50.5832, "country": "BH"}, {"latitude": -3.3822, "city": "Bujumbura", "longitude": 29.3644, "country": "BI"}, {"latitude": 6.49646, "city": "Porto-Novo", "longitude": 2.60359, "country": "BJ"}, {"latitude": 17.89618, "city": "Gustavia", "longitude": -62.84978, "country": "BL"}, {"latitude": 32.2949, "city": "Hamilton", "longitude": -64.78303, "country": "BM"}, {"latitude": 4.94029, "city": "Bandar Seri Begawan", "longitude": 114.94806, "country": "BN"}, {"latitude": -19.03332, "city": "Sucre", "longitude": -65.26274, "country": "BO"}, {"latitude": 12.15, "city": "Kralendijk", "longitude": -68.26667, "country": "BQ"}, {"latitude": -15.77972, "city": "Bras\u00edlia", "longitude": -47.92972, "country": "BR"}, {"latitude": 25.05823, "city": "Nassau", "longitude": -77.34306, "country": "BS"}, {"latitude": 27.46609, "city": "Thimphu", "longitude": 89.64191, "country": "BT"}, {"latitude": -24.65451, "city": "Gaborone", "longitude": 25.90859, "country": "BW"}, {"latitude": 53.9, "city": "Minsk", "longitude": 27.56667, "country": "BY"}, {"latitude": 17.25, "city": "Belmopan", "longitude": -88.76667, "country": "BZ"}, {"latitude": 45.41117, "city": "Ottawa", "longitude": -75.69812, "country": "CA"}, {"latitude": -12.15681, "city": "West Island", "longitude": 96.82251, "country": "CC"}, {"latitude": -4.32758, "city": "Kinshasa", "longitude": 15.31357, "country": "CD"}, {"latitude": 4.36122, "city": "Bangui", "longitude": 18.55496, "country": "CF"}, {"latitude": -4.26613, "city": "Brazzaville", "longitude": 15.28318, "country": "CG"}, {"latitude": 46.94809, "city": "Bern", "longitude": 7.44744, "country": "CH"}, {"latitude": 6.82055, "city": "Yamoussoukro", "longitude": -5.27674, "country": "CI"}, {"latitude": -21.20778, "city": "Avarua", "longitude": -159.775, "country": "CK"}, {"latitude": -33.45694, "city": "Santiago", "longitude": -70.64827, "country": "CL"}, {"latitude": 3.86667, "city": "Yaound\u00e9", "longitude": 11.51667, "country": "CM"}, {"latitude": 39.9075, "city": "Beijing", "longitude": 116.39723, "country": "CN"}, {"latitude": 4.60971, "city": "Bogot\u00e1", "longitude": -74.08175, "country": "CO"}, {"latitude": 9.93333, "city": "San Jos\u00e9", "longitude": -84.08333, "country": "CR"}, {"latitude": 23.13302, "city": "Havana", "longitude": -82.38304, "country": "CU"}, {"latitude": 14.93152, "city": "Praia", "longitude": -23.51254, "country": "CV"}, {"latitude": 12.1084, "city": "Willemstad", "longitude": -68.93354, "country": "CW"}, {"latitude": -10.42172, "city": "Flying Fish Cove", "longitude": 105.67912, "country": "CX"}, {"latitude": 35.17531, "city": "Nicosia", "longitude": 33.3642, "country": "CY"}, {"latitude": 50.08804, "city": "Prague", "longitude": 14.42076, "country": "CZ"}, {"latitude": 52.52437, "city": "Berlin", "longitude": 13.41053, "country": "DE"}, {"latitude": 11.58901, "city": "Djibouti", "longitude": 43.14503, "country": "DJ"}, {"latitude": 55.67594, "city": "Copenhagen", "longitude": 12.56553, "country": "DK"}, {"latitude": 15.30174, "city": "Roseau", "longitude": -61.38808, "country": "DM"}, {"latitude": 18.50012, "city": "Santo Domingo", "longitude": -69.98857, "country": "DO"}, {"latitude": 36.7525, "city": "Algiers", "longitude": 3.04197, "country": "DZ"}, {"latitude": -0.22985, "city": "Quito", "longitude": -78.52495, "country": "EC"}, {"latitude": 59.43696, "city": "Tallinn", "longitude": 24.75353, "country": "EE"}, {"latitude": 30.06263, "city": "Cairo", "longitude": 31.24967, "country": "EG"}, {"latitude": 27.1418, "city": "La\u00e2youne / El Aai\u00fan", "longitude": -13.18797, "country": "EH"}, {"latitude": 15.33805, "city": "Asmara", "longitude": 38.93184, "country": "ER"}, {"latitude": 40.4165, "city": "Madrid", "longitude": -3.70256, "country": "ES"}, {"latitude": 9.02497, "city": "Addis Ababa", "longitude": 38.74689, "country": "ET"}, {"latitude": 60.16952, "city": "Helsinki", "longitude": 24.93545, "country": "FI"}, {"latitude": -18.14161, "city": "Suva", "longitude": 178.44149, "country": "FJ"}, {"latitude": -51.7, "city": "Stanley", "longitude": -57.85, "country": "FK"}, {"latitude": 6.92477, "city": "Palikir - National Government Center", "longitude": 158.16109, "country": "FM"}, {"latitude": 62.00973, "city": "T\u00f3rshavn", "longitude": -6.77164, "country": "FO"}, {"latitude": 48.85341, "city": "Paris", "longitude": 2.3488, "country": "FR"}, {"latitude": 0.39241, "city": "Libreville", "longitude": 9.45356, "country": "GA"}, {"latitude": 51.50853, "city": "London", "longitude": -0.12574, "country": "GB"}, {"latitude": 12.05644, "city": "Saint George's", "longitude": -61.74849, "country": "GD"}, {"latitude": 41.69411, "city": "Tbilisi", "longitude": 44.83368, "country": "GE"}, {"latitude": 4.93333, "city": "Cayenne", "longitude": -52.33333, "country": "GF"}, {"latitude": 49.45981, "city": "Saint Peter Port", "longitude": -2.53527, "country": "GG"}, {"latitude": 5.55602, "city": "Accra", "longitude": -0.1969, "country": "GH"}, {"latitude": 36.14474, "city": "Gibraltar", "longitude": -5.35257, "country": "GI"}, {"latitude": 64.18347, "city": "Nuuk", "longitude": -51.72157, "country": "GL"}, {"latitude": 13.45274, "city": "Banjul", "longitude": -16.57803, "country": "GM"}, {"latitude": 9.53795, "city": "Conakry", "longitude": -13.67729, "country": "GN"}, {"latitude": 15.99854, "city": "Basse-Terre", "longitude": -61.72548, "country": "GP"}, {"latitude": 3.75, "city": "Malabo", "longitude": 8.78333, "country": "GQ"}, {"latitude": 37.97945, "city": "Athens", "longitude": 23.71622, "country": "GR"}, {"latitude": -54.28111, "city": "Grytviken", "longitude": -36.5092, "country": "GS"}, {"latitude": 14.64072, "city": "Guatemala City", "longitude": -90.51327, "country": "GT"}, {"latitude": 13.47567, "city": "Hag\u00e5t\u00f1a", "longitude": 144.74886, "country": "GU"}, {"latitude": 11.86357, "city": "Bissau", "longitude": -15.59767, "country": "GW"}, {"latitude": 6.80448, "city": "Georgetown", "longitude": -58.15527, "country": "GY"}, {"latitude": 22.28552, "city": "Hong Kong", "longitude": 114.15769, "country": "HK"}, {"latitude": 14.0818, "city": "Tegucigalpa", "longitude": -87.20681, "country": "HN"}, {"latitude": 45.81444, "city": "Zagreb", "longitude": 15.97798, "country": "HR"}, {"latitude": 18.53917, "city": "Port-au-Prince", "longitude": -72.335, "country": "HT"}, {"latitude": 47.49801, "city": "Budapest", "longitude": 19.03991, "country": "HU"}, {"latitude": -6.21462, "city": "Jakarta", "longitude": 106.84513, "country": "ID"}, {"latitude": 53.33306, "city": "Dublin", "longitude": -6.24889, "country": "IE"}, {"latitude": 54.15, "city": "Douglas", "longitude": -4.48333, "country": "IM"}, {"latitude": 28.63576, "city": "New Delhi", "longitude": 77.22445, "country": "IN"}, {"latitude": 33.34058, "city": "Baghdad", "longitude": 44.40088, "country": "IQ"}, {"latitude": 35.69439, "city": "Tehr\u0101n", "longitude": 51.42151, "country": "IR"}, {"latitude": 64.13548, "city": "Reykjav\u00edk", "longitude": -21.89541, "country": "IS"}, {"latitude": 41.89193, "city": "Rome", "longitude": 12.51133, "country": "IT"}, {"latitude": 49.18804, "city": "Saint Helier", "longitude": -2.10491, "country": "JE"}, {"latitude": 17.99702, "city": "Kingston", "longitude": -76.79358, "country": "JM"}, {"latitude": 31.95522, "city": "Amman", "longitude": 35.94503, "country": "JO"}, {"latitude": 35.6895, "city": "Tokyo", "longitude": 139.69171, "country": "JP"}, {"latitude": -1.28333, "city": "Nairobi", "longitude": 36.81667, "country": "KE"}, {"latitude": 42.87, "city": "Bishkek", "longitude": 74.59, "country": "KG"}, {"latitude": 11.56245, "city": "Phnom Penh", "longitude": 104.91601, "country": "KH"}, {"latitude": 1.3278, "city": "Tarawa", "longitude": 172.97696, "country": "KI"}, {"latitude": -11.70216, "city": "Moroni", "longitude": 43.25506, "country": "KM"}, {"latitude": 17.29484, "city": "Basseterre", "longitude": -62.7261, "country": "KN"}, {"latitude": 39.03385, "city": "Pyongyang", "longitude": 125.75432, "country": "KP"}, {"latitude": 37.566, "city": "Seoul", "longitude": 126.9784, "country": "KR"}, {"latitude": 29.36972, "city": "Kuwait City", "longitude": 47.97833, "country": "KW"}, {"latitude": 19.2866, "city": "George Town", "longitude": -81.37436, "country": "KY"}, {"latitude": 51.1801, "city": "Astana", "longitude": 71.44598, "country": "KZ"}, {"latitude": 17.96667, "city": "Vientiane", "longitude": 102.6, "country": "LA"}, {"latitude": 33.88894, "city": "Beirut", "longitude": 35.49442, "country": "LB"}, {"latitude": 13.9957, "city": "Castries", "longitude": -61.00614, "country": "LC"}, {"latitude": 47.14151, "city": "Vaduz", "longitude": 9.52154, "country": "LI"}, {"latitude": 6.93194, "city": "Colombo", "longitude": 79.84778, "country": "LK"}, {"latitude": 6.30054, "city": "Monrovia", "longitude": -10.7969, "country": "LR"}, {"latitude": -29.31667, "city": "Maseru", "longitude": 27.48333, "country": "LS"}, {"latitude": 54.68916, "city": "Vilnius", "longitude": 25.2798, "country": "LT"}, {"latitude": 49.61167, "city": "Luxembourg", "longitude": 6.13, "country": "LU"}, {"latitude": 56.946, "city": "Riga", "longitude": 24.10589, "country": "LV"}, {"latitude": 32.87519, "city": "Tripoli", "longitude": 13.18746, "country": "LY"}, {"latitude": 34.01325, "city": "Rabat", "longitude": -6.83255, "country": "MA"}, {"latitude": 43.73333, "city": "Monaco", "longitude": 7.41667, "country": "MC"}, {"latitude": 47.00556, "city": "Chi\u015fin\u0103u", "longitude": 28.8575, "country": "MD"}, {"latitude": 42.44111, "city": "Podgorica", "longitude": 19.26361, "country": "ME"}, {"latitude": 18.06667, "city": "Marigot", "longitude": -63.08333, "country": "MF"}, {"latitude": -18.91368, "city": "Antananarivo", "longitude": 47.53613, "country": "MG"}, {"latitude": 7.08971, "city": "Majuro", "longitude": 171.38027, "country": "MH"}, {"latitude": 41.99646, "city": "Skopje", "longitude": 21.43141, "country": "MK"}, {"latitude": 12.65, "city": "Bamako", "longitude": -8.0, "country": "ML"}, {"latitude": 19.745, "city": "Nay Pyi Taw", "longitude": 96.12972, "country": "MM"}, {"latitude": 47.90771, "city": "Ulaanbaatar", "longitude": 106.88324, "country": "MN"}, {"latitude": 22.20056, "city": "Macau", "longitude": 113.54611, "country": "MO"}, {"latitude": 15.21233, "city": "Saipan", "longitude": 145.7545, "country": "MP"}, {"latitude": 14.60892, "city": "Fort-de-France", "longitude": -61.07334, "country": "MQ"}, {"latitude": 18.08581, "city": "Nouakchott", "longitude": -15.9785, "country": "MR"}, {"latitude": 16.70555, "city": "Plymouth", "longitude": -62.21292, "country": "MS"}, {"latitude": 35.89972, "city": "Valletta", "longitude": 14.51472, "country": "MT"}, {"latitude": -20.16194, "city": "Port Louis", "longitude": 57.49889, "country": "MU"}, {"latitude": 4.1748, "city": "Male", "longitude": 73.50888, "country": "MV"}, {"latitude": -13.96692, "city": "Lilongwe", "longitude": 33.78725, "country": "MW"}, {"latitude": 19.42847, "city": "Mexico City", "longitude": -99.12766, "country": "MX"}, {"latitude": 3.1412, "city": "Kuala Lumpur", "longitude": 101.68653, "country": "MY"}, {"latitude": -25.96553, "city": "Maputo", "longitude": 32.58322, "country": "MZ"}, {"latitude": -22.55941, "city": "Windhoek", "longitude": 17.08323, "country": "NA"}, {"latitude": -22.27631, "city": "Noum\u00e9a", "longitude": 166.4572, "country": "NC"}, {"latitude": 13.51366, "city": "Niamey", "longitude": 2.1098, "country": "NE"}, {"latitude": -29.05459, "city": "Kingston", "longitude": 167.96628, "country": "NF"}, {"latitude": 9.05785, "city": "Abuja", "longitude": 7.49508, "country": "NG"}, {"latitude": 12.13282, "city": "Managua", "longitude": -86.2504, "country": "NI"}, {"latitude": 52.37403, "city": "Amsterdam", "longitude": 4.88969, "country": "NL"}, {"latitude": 59.91273, "city": "Oslo", "longitude": 10.74609, "country": "NO"}, {"latitude": 27.70169, "city": "Kathmandu", "longitude": 85.3206, "country": "NP"}, {"latitude": -19.05952, "city": "Alofi", "longitude": -169.91867, "country": "NU"}, {"latitude": -41.28664, "city": "Wellington", "longitude": 174.77557, "country": "NZ"}, {"latitude": 23.61387, "city": "Muscat", "longitude": 58.5922, "country": "OM"}, {"latitude": 8.9936, "city": "Panam\u00e1", "longitude": -79.51973, "country": "PA"}, {"latitude": -12.04318, "city": "Lima", "longitude": -77.02824, "country": "PE"}, {"latitude": -17.53733, "city": "Papeete", "longitude": -149.5665, "country": "PF"}, {"latitude": -9.44314, "city": "Port Moresby", "longitude": 147.17972, "country": "PG"}, {"latitude": 14.6042, "city": "Manila", "longitude": 120.9822, "country": "PH"}, {"latitude": 33.72148, "city": "Islamabad", "longitude": 73.04329, "country": "PK"}, {"latitude": 52.22977, "city": "Warsaw", "longitude": 21.01178, "country": "PL"}, {"latitude": 46.77914, "city": "Saint-Pierre", "longitude": -56.1773, "country": "PM"}, {"latitude": -25.06597, "city": "Adamstown", "longitude": -130.10147, "country": "PN"}, {"latitude": 18.46633, "city": "San Juan", "longitude": -66.10572, "country": "PR"}, {"latitude": 38.71667, "city": "Lisbon", "longitude": -9.13333, "country": "PT"}, {"latitude": 7.50043, "city": "Melekeok", "longitude": 134.62355, "country": "PW"}, {"latitude": -25.30066, "city": "Asunci\u00f3n", "longitude": -57.63591, "country": "PY"}, {"latitude": 25.27932, "city": "Doha", "longitude": 51.52245, "country": "QA"}, {"latitude": -20.88231, "city": "Saint-Denis", "longitude": 55.4504, "country": "RE"}, {"latitude": 44.43225, "city": "Bucharest", "longitude": 26.10626, "country": "RO"}, {"latitude": 44.80401, "city": "Belgrade", "longitude": 20.46513, "country": "RS"}, {"latitude": 55.75222, "city": "Moscow", "longitude": 37.61556, "country": "RU"}, {"latitude": -1.94995, "city": "Kigali", "longitude": 30.05885, "country": "RW"}, {"latitude": 24.68773, "city": "Riyadh", "longitude": 46.72185, "country": "SA"}, {"latitude": -9.43333, "city": "Honiara", "longitude": 159.95, "country": "SB"}, {"latitude": -4.61667, "city": "Victoria", "longitude": 55.45, "country": "SC"}, {"latitude": 15.55177, "city": "Khartoum", "longitude": 32.53241, "country": "SD"}, {"latitude": 59.33258, "city": "Stockholm", "longitude": 18.0649, "country": "SE"}, {"latitude": 1.28967, "city": "Singapore", "longitude": 103.85007, "country": "SG"}, {"latitude": -15.93872, "city": "Jamestown", "longitude": -5.71675, "country": "SH"}, {"latitude": 46.05108, "city": "Ljubljana", "longitude": 14.50513, "country": "SI"}, {"latitude": 78.22334, "city": "Longyearbyen", "longitude": 15.64689, "country": "SJ"}, {"latitude": 48.14816, "city": "Bratislava", "longitude": 17.10674, "country": "SK"}, {"latitude": 8.484, "city": "Freetown", "longitude": -13.22994, "country": "SL"}, {"latitude": 43.93667, "city": "San Marino", "longitude": 12.44639, "country": "SM"}, {"latitude": 14.6937, "city": "Dakar", "longitude": -17.44406, "country": "SN"}, {"latitude": 2.03711, "city": "Mogadishu", "longitude": 45.34375, "country": "SO"}, {"latitude": 5.86638, "city": "Paramaribo", "longitude": -55.16682, "country": "SR"}, {"latitude": 4.85165, "city": "Juba", "longitude": 31.58247, "country": "SS"}, {"latitude": 0.33654, "city": "S\u00e3o Tom\u00e9", "longitude": 6.72732, "country": "ST"}, {"latitude": 13.68935, "city": "San Salvador", "longitude": -89.18718, "country": "SV"}, {"latitude": 18.026, "city": "Philipsburg", "longitude": -63.04582, "country": "SX"}, {"latitude": 33.5102, "city": "Damascus", "longitude": 36.29128, "country": "SY"}, {"latitude": -26.31667, "city": "Mbabane", "longitude": 31.13333, "country": "SZ"}, {"latitude": 21.46122, "city": "Cockburn Town", "longitude": -71.14188, "country": "TC"}, {"latitude": 12.10672, "city": "N'Djamena", "longitude": 15.0444, "country": "TD"}, {"latitude": -49.35, "city": "Port-aux-Fran\u00e7ais", "longitude": 70.21667, "country": "TF"}, {"latitude": 6.13748, "city": "Lom\u00e9", "longitude": 1.21227, "country": "TG"}, {"latitude": 13.75398, "city": "Bangkok", "longitude": 100.50144, "country": "TH"}, {"latitude": 38.53575, "city": "Dushanbe", "longitude": 68.77905, "country": "TJ"}, {"latitude": -8.55861, "city": "Dili", "longitude": 125.57361, "country": "TL"}, {"latitude": 37.95, "city": "Ashgabat", "longitude": 58.38333, "country": "TM"}, {"latitude": 36.81897, "city": "Tunis", "longitude": 10.16579, "country": "TN"}, {"latitude": -21.13938, "city": "Nuku\u2018alofa", "longitude": -175.2018, "country": "TO"}, {"latitude": 39.91987, "city": "Ankara", "longitude": 32.85427, "country": "TR"}, {"latitude": 10.66668, "city": "Port-of-Spain", "longitude": -61.51889, "country": "TT"}, {"latitude": -8.52425, "city": "Funafuti", "longitude": 179.19417, "country": "TV"}, {"latitude": 25.04776, "city": "Taipei", "longitude": 121.53185, "country": "TW"}, {"latitude": -6.17221, "city": "Dodoma", "longitude": 35.73947, "country": "TZ"}, {"latitude": 50.45466, "city": "Kiev", "longitude": 30.5238, "country": "UA"}, {"latitude": 0.31628, "city": "Kampala", "longitude": 32.58219, "country": "UG"}, {"latitude": 38.89511, "city": "Washington, D.C.", "longitude": -77.03637, "country": "US"}, {"latitude": -34.90328, "city": "Montevideo", "longitude": -56.18816, "country": "UY"}, {"latitude": 41.26465, "city": "Tashkent", "longitude": 69.21627, "country": "UZ"}, {"latitude": 41.90236, "city": "Vatican City", "longitude": 12.45332, "country": "VA"}, {"latitude": 13.15872, "city": "Kingstown", "longitude": -61.22475, "country": "VC"}, {"latitude": 10.48801, "city": "Caracas", "longitude": -66.87919, "country": "VE"}, {"latitude": 18.42693, "city": "Road Town", "longitude": -64.62079, "country": "VG"}, {"latitude": 18.3419, "city": "Charlotte Amalie", "longitude": -64.9307, "country": "VI"}, {"latitude": 21.0245, "city": "Hanoi", "longitude": 105.84117, "country": "VN"}, {"latitude": -17.73381, "city": "Port-Vila", "longitude": 168.32188, "country": "VU"}, {"latitude": -13.28163, "city": "Mata-Utu", "longitude": -176.17453, "country": "WF"}, {"latitude": -13.83333, "city": "Apia", "longitude": -171.76666, "country": "WS"}, {"latitude": 42.67272, "city": "Pristina", "longitude": 21.16688, "country": "XK"}, {"latitude": 15.35472, "city": "Sanaa", "longitude": 44.20667, "country": "YE"}, {"latitude": -12.78234, "city": "Mamoudzou", "longitude": 45.22878, "country": "YT"}, {"latitude": -25.74486, "city": "Pretoria", "longitude": 28.18783, "country": "ZA"}, {"latitude": -15.40669, "city": "Lusaka", "longitude": 28.28713, "country": "ZM"}, {"latitude": -17.82772, "city": "Harare", "longitude": 31.05337, "country": "ZW"}] \ No newline at end of file diff --git a/examples/vtkjs/example.json b/examples/vtkjs/example.json index 489311316f..b137b32d9f 100644 --- a/examples/vtkjs/example.json +++ b/examples/vtkjs/example.json @@ -1,7 +1,8 @@ { - "title": "VTK.js", + "title": "Use VTK.js along with GeoJS", "exampleJs": ["main.js"], "about": { - "text": "Show state capitals as points using the vtkjs renderer." - } + "text": "Show national capitals as points using the vtkjs renderer." + }, + "disabled": true } diff --git a/examples/vtkjs/main.js b/examples/vtkjs/main.js index 6c72e9244a..c3be78fa83 100644 --- a/examples/vtkjs/main.js +++ b/examples/vtkjs/main.js @@ -1,31 +1,17 @@ // Fetch the dataset from the server -$.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 - }); +$.ajax({url: '../reprojection/capitals.json'}).done(function (capitals) { + // Create a map + var map = geo.map({node: '#map'}); // Add the map tile layer - map.createLayer('osm', { - zIndex: 0, - minLevel: 4, - keepLower: true, - wrapX: false, - wrapY: false - }); + map.createLayer('osm'); // Create a vtk point feature layer - var vtkLayer = map.createLayer('feature', { renderer: 'vtkjs' }); + var vtkLayer = map.createLayer('feature', {renderer: 'vtkjs'}); vtkLayer.createFeature('point', { selectionAPI: true, style: { - radius: 100, // sphere radius (~0.1km) + radius: 5, fillColor: 'red', - fillOpacity: Math.random + fillOpacity: 1 } }) // Bind the dataset to the vtk layer diff --git a/package-lock.json b/package-lock.json index 2f542b4da4..ffbbfde4f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5639,7 +5639,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -6054,7 +6055,8 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6110,6 +6112,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6153,12 +6156,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -18303,36 +18308,6 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, - "string-replace-loader": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-1.0.5.tgz", - "integrity": "sha1-4rDU/NYR8NQcpDO79Q4ClFDjej0=", - "dev": true, - "requires": { - "loader-utils": "^0.2.11", - "lodash": "^3.10.1" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "^3.1.3", - "emojis-list": "^2.0.0", - "json5": "^0.5.0", - "object-assign": "^4.0.1" - } - }, - "lodash": { - "version": "3.10.1", - "resolved": "http://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz", - "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=", - "dev": true - } - } - }, "string-replace-webpack-plugin": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/string-replace-webpack-plugin/-/string-replace-webpack-plugin-0.1.3.tgz", diff --git a/package.json b/package.json index e41bf5fb25..5dfa3bc5c4 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,6 @@ "resemblejs": "^2.9.0", "serve-index": "^1.9.1", "sinon": "^1.17.7", - "string-replace-loader": "1.0.5", "string-replace-webpack-plugin": "^0.1.3", "style-loader": "^0.23.1", "stylus": "^0.54.5", diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index d5851dbb46..579baaf259 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -82,13 +82,13 @@ var vtkjs_pointFeature = function (arg) { /* It is more efficient to do a transform on a single array rather than on * an array of arrays or an array of objects. */ for (i = i3 = 0; i < numPts; i += 1, i3 += 3) { - posVal = posFunc(data[i]); + posVal = posFunc(data[i], i); position[i3] = posVal.x; position[i3 + 1] = posVal.y; position[i3 + 2] = posVal.z || 0; nonzeroZ = nonzeroZ || position[i3 + 2]; // TODO: fix the opacity per point. - m_actor.getProperty().setOpacity(opacityFunc(data[i])); + m_actor.getProperty().setOpacity(opacityFunc(data[i], i)); } position = transform.transformCoordinates( m_this.gcs(), m_this.layer().map().gcs(), @@ -106,16 +106,14 @@ var vtkjs_pointFeature = function (arg) { // TODO: points can vary, this needs to be refactors to have a distinct // size per point. What should be done with the strokeColor, strokeWidth, // and strokeOpacity? Honor the fill/stroke options or document that we - // don't honot them. - var rad = radFunc(), clr = colorFunc(); + // don't honot them. Handle the zero-data-itmes condition. + var rad = radFunc(data[0], 0), clr = colorFunc(data[0], 0); rad *= m_this.layer().map().unitsPerPixel(m_this.layer().map().zoom()); m_pointSet.getPoints().setData(position, 3); m_source.setRadius(rad); // TODO: This is not setting the color of the rendered points m_actor.getProperty().setColor(clr.r, clr.g, clr.b); m_this.buildTime().modified(); - - console.debug('built vtkjs point feature'); }; /** diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 0017129d2e..b48f913dc6 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -22,19 +22,19 @@ var vtkjsRenderer = function (arg) { var mat4 = require('gl-mat4'); var geo_event = require('../event'); var vtkjs = vtkjsRenderer.vtkjs; - // TODO: use the GenericRenderWindow, match the size of the parent div, and - // call setContainer to attach it to the parent div. The parent div is: - // m_this.layer().node().get(0) - var vtkFullScreenRenderWindow = vtkjs.Rendering.Misc.vtkFullScreenRenderWindow; + var vtkGenericRenderWindow = vtkjs.Rendering.Misc.vtkGenericRenderWindow; var m_this = this, m_width = 0, m_height = 0, s_init = this._init; - // TODO: don't draw a background. Does transparent work? - var vtkRenderer = vtkFullScreenRenderWindow.newInstance({ - background: [0.1, 0.5, 0.5] }); + var vtkRenderer = vtkGenericRenderWindow.newInstance({ + background: [0, 0, 0, 0]}); + vtkRenderer.setContainer(m_this.layer().node().get(0)); + // TODO: Is there a way to start with no interactor rather than unbinding it? + vtkRenderer.getInteractor().unbindEvents() + vtkRenderer.resize(); var vtkjsren = vtkRenderer.getRenderer(); var renderWindow = vtkRenderer.getRenderWindow(); @@ -90,8 +90,8 @@ var vtkjsRenderer = function (arg) { * Handle resize event */ this._resize = function (x, y, w, h) { + vtkRenderer.resize(); m_this._render(); - return m_this; }; @@ -148,7 +148,7 @@ var vtkjsRenderer = function (arg) { /** * Connect to pan event. This is sufficient, as all zooms and rotations also - *produce a pan + * produce a pan */ m_this.layer().geoOn(geo_event.pan, function (evt) { // TODO: If the zoom level has changed, our point size needs to be diff --git a/tests/gl-cases/vtkjsPointFeature.js b/tests/gl-cases/vtkjsPointFeature.js new file mode 100644 index 0000000000..57320142e1 --- /dev/null +++ b/tests/gl-cases/vtkjsPointFeature.js @@ -0,0 +1,40 @@ +var $ = require('jquery'); +var createMap = require('../test-utils').createMap; +var destroyMap = require('../test-utils').destroyMap; +var waitForIt = require('../test-utils').waitForIt; + +/* This is a basic integration test of geo.gvtkjs.pointFeature. */ +describe('geo.vtkjs.pointFeature', function () { + var testPoints = [ + {x: 20, y: 10}, {x: 25, y: 10}, {x: 30, y: 10}, {x: 35, y: 12}, + {x: 32, y: 15}, {x: 30, y: 20}, {x: 35, y: 22}, {x: 32, y: 25}, + {x: 30, y: 30}, {x: 35, y: 32}, {x: 32, y: 35}, {x: 30, y: 30}, + {x: 40, y: 20, radius: 10}, {x: 42, y: 20, radius: 5}, + {x: 44, y: 20, radius: 2}, {x: 46, y: 20, radius: 2}, + {x: 50, y: 10}, {x: 50, y: 10}, {x: 60, y: 10} + ]; + + var map, layer, point, calledRadius; + it('basic usage', function () { + map = createMap(); + layer = map.createLayer('feature', {renderer: 'vtkjs'}); + point = layer.createFeature('point', { + style: { + strokeWidth: 2, + radius: function (d) { + calledRadius = true; + return d.radius ? d.radius : 5; + } + } + }).data(testPoints); + point.draw(); + expect($('#map div canvas').length).toBe(1); + }); + waitForIt('points to be generated', function () { + return calledRadius; + }); + it('exit', function () { + destroyMap(); + expect(true).toBe(true); + }); +}); diff --git a/tests/test-utils.js b/tests/test-utils.js index ed18a8f768..b1707b7487 100644 --- a/tests/test-utils.js +++ b/tests/test-utils.js @@ -31,11 +31,13 @@ module.exports.waitForIt = function waitForIt(desc, testFunc) { interval = setInterval(function () { if (testFunc()) { clearInterval(interval); + expect(true).toBe(true); done(); } }, 10); }); it('done waiting for ' + desc, function () { + expect(!!(testFunc ? testFunc() : true)).toBe(true); }); }; From 79f3a98e8bdf65b922f40165fb795cbdff36e880 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 30 Oct 2018 12:51:03 -0400 Subject: [PATCH 39/41] Keep points the same pixel size on zoom. Ideally this would be an option that multiple renderers could honor. --- src/vtkjs/pointFeature.js | 6 ++++++ src/vtkjs/vtkjsRenderer.js | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 579baaf259..6b972c90b9 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -127,6 +127,12 @@ var vtkjs_pointFeature = function (arg) { if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || m_this.updateTime().getMTime() < m_this.getMTime()) { m_this._build(); + } else { + var data = m_this.data(), + radFunc = m_this.style.get('radius'), + rad = radFunc(data[0], 0); + rad *= m_this.layer().map().unitsPerPixel(m_this.layer().map().zoom()); + m_source.setRadius(rad); } m_this.updateTime().modified(); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index b48f913dc6..4e62395880 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -33,7 +33,7 @@ var vtkjsRenderer = function (arg) { background: [0, 0, 0, 0]}); vtkRenderer.setContainer(m_this.layer().node().get(0)); // TODO: Is there a way to start with no interactor rather than unbinding it? - vtkRenderer.getInteractor().unbindEvents() + vtkRenderer.getInteractor().unbindEvents(); vtkRenderer.resize(); var vtkjsren = vtkRenderer.getRenderer(); var renderWindow = vtkRenderer.getRenderWindow(); @@ -151,9 +151,8 @@ var vtkjsRenderer = function (arg) { * produce a pan */ m_this.layer().geoOn(geo_event.pan, function (evt) { - // TODO: If the zoom level has changed, our point size needs to be - // recalculated, so we should call m_this._render - // DO NOTHING + // TODO: We may only need to do this if the zoom level has changed. + m_this._render(); }); /** From c12131ed2c27c711daf7b19a9734592c2492f7a0 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 30 Oct 2018 13:12:22 -0400 Subject: [PATCH 40/41] Support one color for the points. This required a lighting change to the actor. --- src/vtkjs/pointFeature.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index 6b972c90b9..b5750a57db 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -53,6 +53,7 @@ var vtkjs_pointFeature = function (arg) { mapper.setInputConnection(m_source.getOutputPort(), 1); m_actor = vtkActor.newInstance(); m_actor.setMapper(mapper); + m_actor.getProperty().setAmbient(1); this.renderer().contextRenderer().addActor(m_actor); }; @@ -111,7 +112,6 @@ var vtkjs_pointFeature = function (arg) { rad *= m_this.layer().map().unitsPerPixel(m_this.layer().map().zoom()); m_pointSet.getPoints().setData(position, 3); m_source.setRadius(rad); - // TODO: This is not setting the color of the rendered points m_actor.getProperty().setColor(clr.r, clr.g, clr.b); m_this.buildTime().modified(); }; From 154bb5f1d3e93010cf32349bab656a0ba9c4e44b Mon Sep 17 00:00:00 2001 From: David Manthey Date: Tue, 30 Oct 2018 15:13:08 -0400 Subject: [PATCH 41/41] Update documentation strings and change log. --- CHANGELOG.md | 2 ++ src/vtkjs/pointFeature.js | 26 ++++++++-------- src/vtkjs/vtkjsRenderer.js | 61 +++++++++++++++++++++++++------------- 3 files changed, 54 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc18c3ad35..5a29d9485e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,14 @@ ### Features - Feature selection API is now enabled automatically if any event handlers are bounds to the feature (#921) +- Added a VTK.js renderer which supports a point feature (#893) ### Improvements - Coordinate transforms on flat arrays are now faster (#939) - `convertColor` is memoized to speed up repeated calls (#936) - All features have a `featureType` property (#931) - When changing geometry sizes, buffers are reallocated less (#941) +- Initial rendering webGL features is somewhat faster (#943) ### Changes - Removed the dependency on the vgl module for the `object` and `timestamp` classes (#918) diff --git a/src/vtkjs/pointFeature.js b/src/vtkjs/pointFeature.js index b5750a57db..8c5d52755b 100644 --- a/src/vtkjs/pointFeature.js +++ b/src/vtkjs/pointFeature.js @@ -3,10 +3,12 @@ var registerFeature = require('../registry').registerFeature; var pointFeature = require('../pointFeature'); /** - * Create a new instance of pointFeature + * Create a new instance of vtkjs.pointFeature. * - * @class geo.vtkjs.pointFeature + * @class + * @alias geo.vtkjs.pointFeature * @extends geo.pointFeature + * @param {geo.pointFeature.spec} arg * @returns {geo.vtkjs.pointFeature} */ var vtkjs_pointFeature = function (arg) { @@ -28,20 +30,18 @@ var vtkjs_pointFeature = function (arg) { object.call(this); /** - * Member variables - * * @private */ var m_this = this, + m_actor, + m_pointSet, + m_source, s_init = this._init, s_exit = this._exit, - m_actor = null, - m_pointSet = null, - m_source = null, s_update = this._update; /** - * Create pipeline + * Create pipeline. */ this._createPipeline = function () { m_pointSet = vtkPointSet.newInstance(); @@ -58,7 +58,7 @@ var vtkjs_pointFeature = function (arg) { }; /** - * Initialize + * Initialize. */ this._init = function () { s_init.call(m_this, arg); @@ -67,7 +67,7 @@ var vtkjs_pointFeature = function (arg) { }; /** - * Build this feature + * Build this feature. */ this._build = function () { var i, i3, posVal, @@ -117,11 +117,9 @@ var vtkjs_pointFeature = function (arg) { }; /** - * Update - * + * Update. */ this._update = function () { - s_update.call(m_this); if (m_this.dataTime().getMTime() >= m_this.buildTime().getMTime() || @@ -139,7 +137,7 @@ var vtkjs_pointFeature = function (arg) { }; /** - * Destroy + * Destroy. */ this._exit = function () { m_this.renderer().contextRenderer().removeActor(m_actor); diff --git a/src/vtkjs/vtkjsRenderer.js b/src/vtkjs/vtkjsRenderer.js index 4e62395880..e8ba9cfab7 100644 --- a/src/vtkjs/vtkjsRenderer.js +++ b/src/vtkjs/vtkjsRenderer.js @@ -3,12 +3,16 @@ var registerRenderer = require('../registry').registerRenderer; var renderer = require('../renderer'); /** - * Create a new instance of class vtkjsRenderer + * Create a new instance of class vtkjsRenderer. * - * @class geo.gl.vtkjsRenderer + * @class + * @alias geo.vtkjs.vglRenderer * @extends geo.renderer - * @param canvas - * @returns {geo.gl.vtkjsRenderer} + * @param {object} arg Options for the renderer. + * @param {geo.layer} [arg.layer] Layer associated with the renderer. + * @param {HTMLElement} [arg.canvas] Canvas element associated with the + * renderer. + * @returns {geo.vtkjs.vtkjsRenderer} */ var vtkjsRenderer = function (arg) { 'use strict'; @@ -39,35 +43,45 @@ var vtkjsRenderer = function (arg) { var renderWindow = vtkRenderer.getRenderWindow(); /** - * Return width of the renderer + * Return width of the renderer. + * + * @returns {number} The width of the current canvas. */ this.width = function () { return m_width; }; /** - * Return height of the renderer + * Return height of the renderer. + * + * @returns {number} The height of the current canvas. */ this.height = function () { return m_height; }; /** - * Get context specific renderer + * Get context specific renderer. + * + * @returns {object} The vtkjs context renderer. */ this.contextRenderer = function () { return vtkjsren; }; /** - * Get API used by the renderer + * Get API used by the renderer. + * + * @returns {string} `vtkjs`. */ this.api = function () { return 'vtkjs'; }; /** - * Initialize + * Initialize. + * + * @returns {this} */ this._init = function () { if (m_this.initialized()) { @@ -87,7 +101,13 @@ var vtkjsRenderer = function (arg) { }; /** - * Handle resize event + * Handle resize event. + * + * @param {number} x The left coordinate. + * @param {number} y The top coordinate. + * @param {number} w The width in pixels. + * @param {number} h The height in pixels. + * @returns {this} */ this._resize = function (x, y, w, h) { vtkRenderer.resize(); @@ -97,6 +117,8 @@ var vtkjsRenderer = function (arg) { /** * Render. This actually schedules rendering for the next animation frame. + * + * @returns {this} */ this._render = function () { /* If we are already scheduled to render, don't schedule again. Rather, @@ -110,7 +132,7 @@ var vtkjsRenderer = function (arg) { }; /** - * This clears the render timer and actually renders. + * This actually renders. */ this._renderFrame = function () { var layer = m_this.layer(), @@ -127,7 +149,7 @@ var vtkjsRenderer = function (arg) { }; /** - * Exit + * Exit. */ this._exit = function () { // DO NOTHING @@ -146,18 +168,14 @@ var vtkjsRenderer = function (arg) { m_this.contextRenderer().getActiveCamera().setProjectionMatrix(projmat); }; - /** - * Connect to pan event. This is sufficient, as all zooms and rotations also - * produce a pan - */ + /* Connect to pan event. This is sufficient, as all zooms and rotations also + * produce a pan */ m_this.layer().geoOn(geo_event.pan, function (evt) { // TODO: We may only need to do this if the zoom level has changed. m_this._render(); }); - /** - * Connect to parallelprojection event - */ + /* Connect to parallelprojection event. */ m_this.layer().geoOn(geo_event.parallelprojection, function (evt) { // DO NOTHING }); @@ -170,7 +188,8 @@ inherit(vtkjsRenderer, renderer); registerRenderer('vtkjs', vtkjsRenderer); /** - * Report if the vtkjs renderer is supported. This is just a check if vtkjs is available. + * Report if the vtkjs renderer is supported. This is just a check if vtkjs is + * available. * * @returns {boolean} true if available. */ @@ -184,7 +203,7 @@ vtkjsRenderer.supported = function () { }; /** - * If the vtks renderer is not supported, supply the name of a renderer that + * If the vtkjs renderer is not supported, supply the name of a renderer that * should be used instead. This asks for the null renderer. * * @returns {null} `null` for the null renderer.