three.js
three.js copied to clipboard
TextGeometry changes and support in editor
Related issue: maybe
Description
Add text geometry support to three.js editor
** details **
- add support for TextGeometry in editor. currently this is linked only to a single font, but all of TextGeometry functionality is wired to the editor's sidebar UI, which I think is more than sufficient now
- depreciating
height
parameter in TextGeometry options fordepth
for consistency with ExtrudeGeometry, which refers to the thickness the Text will be extruded. usingheight
is still supported but will emit a warning in the console - also added a
scale
parameter in TextGeometry and editor. The numbers that work well for font sizes is unusally large in three.js objects (esp in VR), so passing 0.01 makes it more the conversion more pleasant to work with - Serialization and deserialization works. toJSON() and fromJSON() is added to TextGeometry. I have to add this to Geometries.js for scene loading to work automatically in editor, but the dependency of an addon (TextGeometry is addon, ExtrudeGeometry is core) seems a little strange. Either there's a better way to extend the supported Geometries deserialization list or perhaps move TextGeometry out of the examples
This contribution is funded by blurspline