Skip to content

Add optional intensity parameter for surfaces #314

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

Closed
wants to merge 10 commits into from

Conversation

mikolalysenko
Copy link
Contributor

This resolves #308

Please note that this PR requires the following feature in gl-surface3d being merged:

gl-vis/gl-surface3d#6

To use the new intensity parameter for surface, you just pass in a data_array parameter type called intensity to the surface. The behavior is analogous to mesh3d traces.

Example image:

screen shot 2016-03-03 at 4 24 13 pm

CC @etpinard

'Sets the surface intensity values,',
'used for setting a color scale independent of z'
].join(' ')
},
zauto: colorscaleAttrs.zauto,
zmin: colorscaleAttrs.zmin,
zmax: colorscaleAttrs.zmax,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, a couple things will need to happen here:

  • rename intensity -> surfacecolor
  • add cauto, cmin and cmax (which will take up the role of zauto, zmin and zmax respectively)
  • move zauto, zmin and zmax to the bottom of the attribute object in a _deprecated block (see example here)
  • add a backward-compatible block in cleanData:
if(trace.type === 'surface') {
  if(trace.zauto) trace.cauto = trace.zauto; 
  delete trace.zauto

  /* and so on for 'zmin' and 'zmax'
}

"zmin": 0,
"zmax": "50"
"cmin": 0,
"cmax": "50"
Copy link
Contributor

Choose a reason for hiding this comment

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

The old zmin and zmax attributes should still work.

@etpinard
Copy link
Contributor

closed in favour of #347

@etpinard etpinard closed this Mar 21, 2016
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.

Implement 'intensity' parameter in Surface as in Mesh3D
2 participants