ChristopherChudzicki/math3d-react

How can I get more control over the colors?

Opened this issue · 2 comments

How can I get more control over a surface color?

  1. There are 10 predefined colors. How can I choose another specific color (e.g. #aa0050) ?
  2. There are 3 predefined gradients to be used with the color map function. Is there anyway to use my own linear gradient from color A to color B ?
  3. The shaded option renders all surfaces way too dark, no matter what color I choose. How can I get a brighter rendering? Is there any way to choose the position of the light?

Thank you,

AB

Good questions!

Somewhat disappointing answers:

  1. At the moment, you can't. The default blue is also a different shade than the blue available in color picker, which has always kind of annoyed me.
  2. Not at the moment
  3. You can't change the direction of the light, though you might get some mileage from decreasing the surface opacity.

All of these would be good features, IMO. I'm focusing my limited free time on a (backwards-compatible) rewrite of math3d, so I may not take up any of these soon.

That said, I would welcome contributions, especially around issue (1). I think that (1) would be a fairly straightforward feature to implement in the existing app, and is something I will definitely include in the rewrite. (hence "Help Wanted".)

I just want to mention that this is functional in https://github.com/ChristopherChudzicki/math3d-next (though the overall project is still very much a work in progress). Here's the new color selection form:

Screen Shot 2022-10-11 at 8 00 58 AM