Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

3D streamtube traces #2658

Merged
merged 41 commits into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
616d043
streamtube integration, first pass
kig May 20, 2018
2435a96
add gl-streamtube to package.json
kig May 20, 2018
355aed1
add gl-streamtube3d to package-lock
etpinard May 23, 2018
583499f
use gl-streamtube3d version that works on etpinard's laptop
etpinard May 23, 2018
39c254e
cleanup streamtube/
etpinard May 24, 2018
38a1310
add first streamtube mock
etpinard May 24, 2018
971351c
properly scaffold streamtube trace module
etpinard May 24, 2018
218dfc8
factor out zip3 into src/lib/
etpinard May 24, 2018
1367c07
Merge branch 'master' into streamtube-traces
etpinard May 24, 2018
8ea0c25
add 'sizeref'
etpinard May 29, 2018
3b1f809
fixup streamtube-thin baseline
etpinard May 29, 2018
b0cd99d
fixup cmin/cmax -> vertexIntensityBounds,
etpinard Jun 1, 2018
e99ffc9
expect x/y/z and u/v/w to have matching length + add tube bounds pad
etpinard Jun 1, 2018
e0ff37f
first cut streamtube hover
etpinard Jun 1, 2018
fbd7980
fixup hoverinfo 'norm'
etpinard Jun 1, 2018
f5c1160
add support for u/v/w hoverinfo flags
etpinard Jun 4, 2018
b9a6e3f
add cone + streamtube mock
etpinard Jun 4, 2018
80bcd84
use gl-streamtube3d 'tubeScale' to fit tubes inside scene
etpinard Jun 4, 2018
273292d
make startx/starty/startz optional
etpinard Jun 4, 2018
5da1c59
fix cone <-> streamtube restyle
etpinard Jun 4, 2018
8531e23
first cut streamtube jasmine tests
etpinard Jun 4, 2018
94f6195
add 'divergence' hoverinfo flag
etpinard Jun 4, 2018
c40dd6b
add support for 'text' (scalar value only)
etpinard Jun 5, 2018
8182cab
comment out 'sizemode' (for now)
etpinard Jun 5, 2018
62b90b5
hook in 'maxLength' as 'maxdisplayed'
etpinard Jun 5, 2018
dc0c5d7
improve streamtube attr descriptions
etpinard Jun 5, 2018
bf12d10
add streamtube to Plotly.react-noop suite
etpinard Jun 5, 2018
df7ccaa
emit custom event data for streamtube
etpinard Jun 5, 2018
ca7c022
typos in streamtube meta
alexcjohnson Jun 5, 2018
9a53250
fixup hoverinfo: 'all' for cone traces
etpinard Jun 6, 2018
22f0c7e
sub startx/starty/startz -> starts.(x|y|z)
etpinard Jun 6, 2018
d796bda
fixup 'starts' attribute declaration
etpinard Jun 6, 2018
2d1df2b
Merge branch 'master' into streamtube-traces
etpinard Jun 12, 2018
0093ac8
fixup streamtube after merge master
etpinard Jun 12, 2018
5c2ddfc
mv lib/zip3 -> plots/gl3d/zip3
etpinard Jun 18, 2018
9fa5ece
add 'len' argument to zip3
etpinard Jun 18, 2018
d33fc45
merge all colorscale attribute generator in one function
etpinard Jun 18, 2018
9e3c533
fix #2723 - list correct 'color' attribute in cone,
etpinard Jun 18, 2018
83f3bdc
improve auto starting position algo
etpinard Jun 19, 2018
f348ac3
Merge branch 'master' into streamtube-traces
etpinard Jul 5, 2018
966bc8d
use [email protected]
etpinard Jul 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/traces/cone/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

'use strict';

var colorAttrs = require('../../components/colorscale/color_attributes');
var colorscaleAttrs = require('../../components/colorscale/attributes');
var colorbarAttrs = require('../../components/colorbar/attributes');
var mesh3dAttrs = require('../mesh3d/attributes');
Expand Down Expand Up @@ -161,11 +160,13 @@ var attrs = {
}
};

extendFlat(attrs, colorAttrs('', 'calc', true), {
showscale: colorscaleAttrs.showscale,
extendFlat(attrs, colorscaleAttrs('', {
colorAttr: 'u/v/w norm',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This give better attribute descriptions for cone colorscale and friends. For example, for cmin we have

"Sets the lower bound of the color domain. Value should have the same units as the u/v/w norm and if set, cmax must be set as well."

showScaleDflt: true,
editTypeOverride: 'calc'
}), {
colorbar: colorbarAttrs
});
delete attrs.color;

var fromMesh3d = ['opacity', 'lightposition', 'lighting'];

Expand Down
16 changes: 10 additions & 6 deletions src/traces/mesh3d/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@

'use strict';

var colorAttrs = require('../../components/colorscale/color_attributes');
var colorscaleAttrs = require('../../components/colorscale/attributes');
var colorbarAttrs = require('../../components/colorbar/attributes');
var surfaceAtts = require('../surface/attributes');
var baseAttrs = require('../../plots/attributes');

var extendFlat = require('../../lib/extend').extendFlat;

module.exports = extendFlat(colorAttrs('', 'calc', false), {
module.exports = extendFlat({
x: {
valType: 'data_array',
editType: 'calc+clearAxisTypes',
Expand Down Expand Up @@ -166,8 +165,16 @@ module.exports = extendFlat(colorAttrs('', 'calc', false), {
'Overrides *color* and *vertexcolor*.'
].join(' ')
},
},

colorscaleAttrs('', {
colorAttr: '`intensity`',
showScaleDflt: true,
editTypeOverride: 'calc'
}), {

colorbar: colorbarAttrs,

// Opacity
opacity: surfaceAtts.opacity,

// Flat shaded mode
Expand All @@ -193,9 +200,6 @@ module.exports = extendFlat(colorAttrs('', 'calc', false), {
editType: 'calc'
},

showscale: colorscaleAttrs.showscale,
colorbar: colorbarAttrs,

lightposition: {
x: extendFlat({}, surfaceAtts.lightposition.x, {dflt: 1e5}),
y: extendFlat({}, surfaceAtts.lightposition.y, {dflt: 1e5}),
Expand Down
9 changes: 5 additions & 4 deletions src/traces/streamtube/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

'use strict';

var colorAttrs = require('../../components/colorscale/color_attributes');
var colorscaleAttrs = require('../../components/colorscale/attributes');
var colorbarAttrs = require('../../components/colorbar/attributes');
var mesh3dAttrs = require('../mesh3d/attributes');
Expand Down Expand Up @@ -134,11 +133,13 @@ var attrs = {
}
};

extendFlat(attrs, colorAttrs('', 'calc', true), {
showscale: colorscaleAttrs.showscale,
extendFlat(attrs, colorscaleAttrs('', {
colorAttr: 'u/v/w norm',
showScaleDflt: true,
editTypeOverride: 'calc'
}), {
colorbar: colorbarAttrs
});
delete attrs.color;

var fromMesh3d = ['opacity', 'lightposition', 'lighting'];
fromMesh3d.forEach(function(k) {
Expand Down
19 changes: 9 additions & 10 deletions src/traces/surface/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function makeContourAttr(axLetter) {
};
}

var attrs = module.exports = overrideAll({
var attrs = module.exports = overrideAll(extendFlat({
z: {
valType: 'data_array',
description: 'Sets the z coordinates.'
Expand Down Expand Up @@ -131,15 +131,14 @@ var attrs = module.exports = overrideAll({
'used for setting a color scale independent of `z`.'
].join(' ')
},
},

cauto: colorscaleAttrs.zauto,
cmin: colorscaleAttrs.zmin,
cmax: colorscaleAttrs.zmax,
colorscale: colorscaleAttrs.colorscale,
autocolorscale: extendFlat({}, colorscaleAttrs.autocolorscale,
{dflt: false}),
reversescale: colorscaleAttrs.reversescale,
showscale: colorscaleAttrs.showscale,
colorscaleAttrs('', {
colorAttr: 'z or surfacecolor',
showScaleDflt: true,
autoColorDflt: false,
editTypeOverride: 'calc'
}), {
colorbar: colorbarAttrs,

contours: {
Expand Down Expand Up @@ -254,6 +253,6 @@ var attrs = module.exports = overrideAll({
},

hoverinfo: extendFlat({}, baseAttrs.hoverinfo)
}, 'calc', 'nested');
}), 'calc', 'nested');

attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';