pythreejs icon indicating copy to clipboard operation
pythreejs copied to clipboard

Some colors supported by three.js are not allowed by traitlets

Open moorepants opened this issue 5 years ago • 2 comments

For example if I set a material color to grey in pythreejs I get an error and have to change it to gray, but you can see that three.js supports both grey and gray: https://github.com/mrdoob/three.js/blob/master/src/math/Color.js#L7.

moorepants avatar Dec 19 '19 20:12 moorepants

We are reusing the color trait from ipywidgets core. We could subclass it in pythreejs to add a few more colorwords (or this could be done in ipywidgets if these are commonly accepted CSS colorwords), if someone submit a PR implementing it :)

vidartf avatar Dec 23 '19 08:12 vidartf

Ok, I'm trying to swap out pythreejs in PyDy for our custom three.js wrapper and this issue came up. I'll look into it when I'm next working on it.

moorepants avatar Dec 23 '19 14:12 moorepants