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

webgl_geometry_colors_lookuptable.html revisted #16235

Merged
merged 14 commits into from
Apr 16, 2019
Merged

Conversation

Temdog007
Copy link
Contributor

Fixes #14634

examples/js/math/Lut.js Outdated Show resolved Hide resolved
@mrdoob mrdoob added this to the r104 milestone Apr 13, 2019
@WestLangley
Copy link
Collaborator

Temporary live link:

https://raw.githack.com/Temdog007/three.js/example/lut/examples/webgl_geometry_colors_lookuptable.html

@WestLangley
Copy link
Collaborator

You can simplify the example if you want. In fact, I'd suggest it.

@Temdog007
Copy link
Contributor Author

Temdog007 commented Apr 13, 2019

Changes

  • Removed legend from example
  • Removed model from example; Used THREE JS Geometries instead
  • Set color mapping to UVs or Vertices

@WestLangley
Copy link
Collaborator

In certain applications, it is common to color-code a model based on an attribute. In this example, the attribute is pressure. In another example, it may be a terrain, and the attribute is elevation. (I think that would be of interest if you want to change the model.)

It is reasonable to show how to update the colors with a different color map.

It is reasonable to show a legend, but I have no opinion on whether you retain it or not.

There is no need to support changing the number of color levels. There is no need to remove and dispose of the object and rebuild it every time the color map is changed.

That is what I meant by 'simplify' the example. And, of course, it is just my opinion.

@Temdog007
Copy link
Contributor Author

Changes

  • Allow legend to change without creating a new one
  • Removed numberOfColors parameter from GUI
  • Allow color attribute to change without creating a new one

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 15, 2019

I get the following warning on my machine:

three.js:7603 THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.

Besides, I don't see a legend on my computer. Is that intended?

examples/js/math/Lut.js Outdated Show resolved Hide resolved
@mrdoob mrdoob merged commit 727cd0f into mrdoob:dev Apr 16, 2019
@mrdoob
Copy link
Owner

mrdoob commented Apr 16, 2019

Thanks!

@Temdog007 Temdog007 deleted the example/lut branch May 5, 2019 00:21
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.

webgl_geometry_colors_lookuptable.html needs to be revisited
4 participants