File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ plots['triangle-mesh3d'] = require('@mocks/gl3d_triangle.json');
26
26
plots [ 'snowden' ] = require ( '@mocks/gl3d_snowden.json' ) ;
27
27
plots [ 'bunny' ] = require ( '@mocks/gl3d_bunny.json' ) ;
28
28
plots [ 'ribbons' ] = require ( '@mocks/gl3d_ribbons.json' ) ;
29
- plots [ 'date -time' ] = require ( '@mocks/gl3d_scatter-date.json' ) ;
29
+ plots [ 'scatter -time' ] = require ( '@mocks/gl3d_scatter-date.json' ) ;
30
30
plots [ 'cufflinks' ] = require ( '@mocks/gl3d_cufflinks.json' ) ;
31
31
plots [ 'chrisp-nan-1' ] = require ( '@mocks/gl3d_chrisp-nan-1.json' ) ;
32
32
plots [ 'marker-arrays' ] = require ( '@mocks/gl3d_marker-arrays.json' ) ;
Original file line number Diff line number Diff line change @@ -114,7 +114,17 @@ module.exports = {
114
114
sizeref : scatterMarkerAttrs . sizeref ,
115
115
sizemin : scatterMarkerAttrs . sizemin ,
116
116
sizemode : scatterMarkerAttrs . sizemode ,
117
- opacity : scatterMarkerAttrs . opacity ,
117
+ opacity : extendFlat ( { } , scatterMarkerAttrs . opacity , {
118
+ arrayOk : false ,
119
+ description : [
120
+ 'Sets the marker opacity.' ,
121
+ 'Note that the marker opacity for scatter3d traces' ,
122
+ 'must be a scalar value for performance reasons.' ,
123
+ 'To set a blending opacity value' ,
124
+ '(i.e. which is not transparent), set *marker.color*' ,
125
+ 'to an rgba color and use its alpha channel.'
126
+ ] . join ( ' ' )
127
+ } ) ,
118
128
colorscale : scatterMarkerAttrs . colorscale ,
119
129
cauto : scatterMarkerAttrs . cauto ,
120
130
cmax : scatterMarkerAttrs . cmax ,
Original file line number Diff line number Diff line change @@ -318,10 +318,9 @@ proto.update = function(data) {
318
318
this . linePlot = null ;
319
319
}
320
320
321
+ // N.B. marker.opacity must be a scalar for performance
321
322
var scatterOpacity = data . opacity ;
322
- if ( data . marker && typeof data . marker . opacity === 'number' ) {
323
- scatterOpacity *= data . marker . opacity ;
324
- }
323
+ if ( data . marker && data . marker . opacity ) scatterOpacity *= data . marker . opacity ;
325
324
326
325
scatterOptions = {
327
326
gl : gl ,
You can’t perform that action at this time.
0 commit comments