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

Pick color in verteces #8

Merged
merged 4 commits into from
Sep 16, 2016
Merged

Pick color in verteces #8

merged 4 commits into from
Sep 16, 2016

Conversation

dy
Copy link
Member

@dy dy commented Sep 16, 2016

Add vertex mode of picking color. Really not sure about the option name, if you have better idea than vertexColor I’ll rename it.

surface = createSurface({
gl: gl,
field: field,
//levels: [contourLevels,contourLevels,contourLevels],
lineWidth: 3,
contourTint: 1,
coords: coords,
contourProject: [[true,false,false], [true,false,false], [true,false,false]]
contourProject: [[true,false,false], [true,false,false], [true,false,false]],
vertexColor: false
Copy link
Member

@etpinard etpinard Sep 16, 2016

Choose a reason for hiding this comment

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

So, if I'm understanding correctly, in plotly.js we would set vertexColor to true whenever

colorscale[0][0] === colorscale[colorscale.length-1][0]

in the surface convert step ?

cc @rreusser

Copy link
Member

Choose a reason for hiding this comment

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

I think that's a good idea, potentially with an obscure manual override.

@mikolalysenko
Copy link
Member

Looks ok to me.

@etpinard
Copy link
Member

What I'm seeing in plotly.js:

image

@etpinard
Copy link
Member

Oh I fixed it:

image

vertexColor must be set currently.

@dfcreative can you make it such that no vertexColor in the params options lead to vertexColor = 0 ?

@etpinard
Copy link
Member

@dfcreative

Nicely done. Your patch is backward compatible once #8 (comment) is addressed:

image

@dy
Copy link
Member Author

dy commented Sep 16, 2016

@etpinard oh, sorry about that, fixed

@etpinard
Copy link
Member

Great. It works. Let merge this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants