pythreejs icon indicating copy to clipboard operation
pythreejs copied to clipboard

cannot use cubemap in pythreejs

Open kingease opened this issue 4 years ago • 5 comments

when assign scene.background a CubeTexture, there is an error occured:

TraitError: The 'background' trait of a Scene instance must be a valid HTML color, but a value of CubeTexture ...

and in pythreejs, cannot use the cubemap as the way in three.js. because the CubeTextureLoader in pythreejs has no methods like load etc. and I cannot find any reference about this part.

anyone can help? thanks

kingease avatar Oct 22 '19 09:10 kingease

The logic for this has not been fully implemented yet. I think one thing we could do would be to add some custom field to the CubeTexture definition (e.g. imageUris), that are only used in the JS constructor, similar to the ImageTexture custom class.

vidartf avatar Oct 22 '19 17:10 vidartf

What is the current status of this issue? Thank you. Are there any alternatives or workarounds? Thank you!

jiangzhongshi avatar Mar 05 '20 04:03 jiangzhongshi

As far as I know, no-one has looked at this yet. Please write here if you intended to help implement this :)

vidartf avatar Mar 05 '20 15:03 vidartf

Thanks for the reply. I would be happy to make it happen, unfortunately I am really not familiar with javascript.

If it helps anyone in the future, my workaround, at least for inspecting the smoothness through reflection lines, is to use a MeshMatcapMaterial together with DataTexture.

jiangzhongshi avatar Mar 05 '20 20:03 jiangzhongshi

So... it's been two years but there's a working example included in https://github.com/jupyter-widgets/pythreejs/pull/376. Once that's merged we can close this one out.

akaszynski avatar Apr 21 '22 23:04 akaszynski