I am currently working on a project using the jupyter k3d python library which (as far as I can tell) uses three.js for its potting back end, and I think that’s where I need to fix the problem I am having (thus why I’m asking here).
Essentially, I need to use an angle as the attribute for colouring a mesh which is causing real problems when I have two adjacent datapoints in the mesh one at angle 180 degrees and the other at -180 degrees. I am using a periodic colourmap so they are the same colour, however when trying to colour the mesh between them there seems to be some sort of interpolation going on and I get a rainbow stripe as the colour is interpolated down from 180 through 0 and to -180 rather than jumping directly from one to the other. Does anyone know where I would start to look to try and disable this behaviour, either by completely turning of the interpolation or somehow telling it that its dealing with an angle that wrap round at ± 180 degrees? Unfortunately, I can’t upload an image but see the github issue here.
I appreciate this may be the incorrect spot for this, but JavaScript is not my language so I’m having trouble tracking down the issue in k3d. Even just a suggestion as to where/what to look for would be greatly apreciated