K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
953 stars 121 forks source link

Expose material property 'shininess' for objects #448

Open jpomoell opened 10 months ago

jpomoell commented 10 months ago

I have a use-case where I would need some meshes to appear shiny whereas others should not. Setting plot.lighting = 0 achieves the latter effect, but then all objects in the scene are affected. I believe this could be controlled individually for each object if the material shininess property, e.g. for a Surface object, https://github.com/K3D-tools/K3D-jupyter/blob/46bec8581e213351aa5df621c1825b95c732486b/js/src/providers/threejs/objects/Surface.js#L36 would be exposed and not hard-coded.

I believe exposing this would also to some degree address the comment raised previously in #51.