Skip to content

Pick color in verteces - #8

Merged
etpinard merged 4 commits into
gl-vis:masterfrom
dy:master
Sep 16, 2016
Merged

etpinard merged 4 commits into
gl-vis:masterfrom
dy:master

Conversation

@dy

@dy dy commented Sep 16, 2016 •

Copy link
Copy Markdown
Member

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

Comment thread example/example.js
coords: coords,
contourProject: [[true,false,false], [true,false,false], [true,false,false]]
contourProject: [[true,false,false], [true,false,false], [true,false,false]],
vertexColor: false

@etpinard etpinard Sep 16, 2016 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member

Looks ok to me.

@etpinard

Copy link
Copy Markdown
Member

What I'm seeing in plotly.js:

image

@etpinard

Copy link
Copy Markdown
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
Copy Markdown
Member

@dfcreative

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

image

@dy

dy commented Sep 16, 2016

Copy link
Copy Markdown
Member Author

@etpinard oh, sorry about that, fixed

@etpinard

Copy link
Copy Markdown
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