Skip to content

Commit 9dc1604

Browse files
committed
volume 3d vis
1 parent 58bf5bb commit 9dc1604

File tree

4 files changed

+2667
-1
lines changed

4 files changed

+2667
-1
lines changed

src/traces/isosurface/attributes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ colorscaleAttrs('', {
236236

237237
colorbar: colorbarAttrs,
238238

239+
opacity: surfaceAtts.opacity,
240+
239241
// Flat shaded mode
240242
flatshading: {
241243
valType: 'boolean',

src/traces/isosurface/convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ proto.update = function(data) {
115115
fresnel: data.lighting.fresnel,
116116
vertexNormalsEpsilon: data.lighting.vertexnormalsepsilon,
117117
faceNormalsEpsilon: data.lighting.facenormalsepsilon,
118-
opacity: 1, // Note: no need to create transparent surfaces
118+
opacity: data.opacity,
119119
contourEnable: data.contour.show,
120120
contourColor: str2RgbaArray(data.contour.color).slice(0, 3),
121121
contourWidth: data.contour.width,

src/traces/isosurface/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
9696
'lightposition.y',
9797
'lightposition.z',
9898
'flatshading',
99+
'opacity'
99100
].forEach(function(x) { coerce(x); });
100101

101102
colorscaleDefaults(traceIn, traceOut, layout, coerce, {prefix: '', cLetter: 'c'});

0 commit comments

Comments
 (0)