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

gl-surface3d > Implement surface opacityscale & correct display of transparent surfaces #16

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 10, 2020

Please refer to plotly/plotly.js#4480 for more info.

@etpinard
@alexcjohnson

@@ -200,6 +205,22 @@ proto.setPickBase = function (id) {
this.pickId = id
}

function getOpacityFromScale(ratio, opacityscale) { // copied form gl-mesh3d
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would be nice to start a helper module in gl-vis to reuse logic like this in both gl-mesh3d and gl-surface3d.

@@ -67,13 +67,14 @@ function SurfacePickResult (position, index, uv, level, dataCoordinate) {

var N_COLORS = 256

function genColormap (name) {
function genColormap (name, opacityscale) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would be nice to start a helper module in gl-vis to reuse logic like this in both gl-mesh3d and gl-surface3d.

@etpinard
Copy link
Member

@archmoj where exactly is the "correct display of transparent surfaces" part of this PR? Splitting this up into two commits would have been nice.

@archmoj
Copy link
Contributor Author

archmoj commented Jan 27, 2020

@archmoj where exactly is the "correct display of transparent surfaces" part of this PR? Splitting this up into two commits would have been nice.

I did try to split that into two commits. But strangely it didn't work.

@archmoj archmoj merged commit a46fff4 into master Mar 10, 2020
@archmoj archmoj deleted the opacityscale branch March 10, 2020 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants