Closed kig closed 4 years ago
"makes it possible to re-position text geometry on Z" - this will save me and my people.
Thanks but this diverges from the goal of having a small buffer footprint (also see https://github.com/Jam3/three-bmfont-text/issues/36). Perhaps something like this would be possible through an option, to allow users to expand the geometry positions to 3 or 4 dimensions, which provides some convenience at the expense of data storage and transfer speed.
And for Z positioning, usually I just reposition the Mesh. If you need per-glyph positioning or alpha or another feature, you can add your own attributes with geom.setAttribute
. See the test-shader.js
demo which adds per-glyph attribute specifying which line of text the glyph appears on.
4 This PR changes the text coordinates from vec2 to vec4 and changes the geometry to use unindexed vertices.
The vec2->vec4 change makes it possible to re-position text geometry on Z & use the W-coord for alpha / palette index / bold flag.
The unindexed vertices change makes merging text geometries easy.