This PR resolves #14 by adding material transparency to the pythreejs backend.
This only works when all colors in the primitive have the same alpha value, and it doesn't trigger material transparency unless those colors have alpha < 1.
Three.js doesn't support RGBA values for each vertex, which may be necessary to make this work for individual shapes in a primitive (https://github.com/mrdoob/three.js/issues/2118). It might be possible to enhance this feature by using custom shaders, but that's currently out of scope for me.
To show this transparency more clearly, I modified the ConvexPolyhedra test to make those shapes slightly more transparent.
Example (rotated from default view for the test scene)
This PR resolves #14 by adding material transparency to the pythreejs backend.
This only works when all colors in the primitive have the same alpha value, and it doesn't trigger material transparency unless those colors have alpha < 1.
Three.js doesn't support RGBA values for each vertex, which may be necessary to make this work for individual shapes in a primitive (https://github.com/mrdoob/three.js/issues/2118). It might be possible to enhance this feature by using custom shaders, but that's currently out of scope for me.
To show this transparency more clearly, I modified the ConvexPolyhedra test to make those shapes slightly more transparent.
Example (rotated from default view for the test scene)