jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
942 stars 188 forks source link

How to use "TextGeometry"? #199

Closed KelSolaar closed 6 years ago

KelSolaar commented 6 years ago

Hi,

First thanks for the great project, it is promising!

Title says it all, I could not really find how to instantiate a TextGeometry class.

Cheers,

Thomas

vidartf commented 6 years ago

Hi, thanks for your feedback. TextGeometry is currently not implemented (https://github.com/jupyter-widgets/pythreejs/blob/master/js/scripts/three-class-config.js#L1628). I guess a helpful error message when trying to instantiate it would be helpful.

The reason it is not implemented yet is that it needs the font to be supplied as JSON (https://threejs.org/docs/#api/geometries/TextGeometry), and no-one have yet looked at how to best make that work. Ideas and other contributions welcome!

KelSolaar commented 6 years ago

@vidartf : Thanks, I saw the TODO but as the code itself wasn't commented I was not sure, especially because of the error message as you mentioned it :)

Is the three-class-config.js file a good one to find what is and is not implemented?

Cheers,

Thomas

vidartf commented 6 years ago

Is the three-class-config.js file a good one to find what is and is not implemented?

Yes, at least as a first place to check. It is the main config for all the autogenerated code! C.f. the readme https://github.com/jupyter-widgets/pythreejs#autogen-update

vidartf commented 6 years ago

I've submitted a PR that will raise an exception if you try to instantiate an unimplemented object type: #211