Skip to content

Commit c378c36

Browse files
committed
adding opacity to isosurface
1 parent b03bb3b commit c378c36

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/traces/isosurface/attributes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,11 @@ colorscaleAttrs('', {
235235

236236
colorbar: colorbarAttrs,
237237

238-
contour: meshAttrs.contour,
238+
opacity: meshAttrs.opacity,
239239
lightposition: meshAttrs.lightposition,
240240
lighting: meshAttrs.lighting,
241241
flatshading: meshAttrs.flatshading,
242+
contour: meshAttrs.contour,
242243

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

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
9595
'lightposition.x',
9696
'lightposition.y',
9797
'lightposition.z',
98-
'flatshading'
98+
'flatshading',
99+
'opacity'
99100
].forEach(function(x) { coerce(x); });
100101

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

0 commit comments

Comments
 (0)