Skip to content

Commit 6b24d8a

Browse files
committed
📝 Add documentation about geometry attributes
1 parent 08781c4 commit 6b24d8a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,25 @@ A filtered set from `geometry.layout.glyphs` intended to align with the vertex d
122122

123123
This is an array of `{ line, position, index, data }` objects, [see here](https://github.com/Jam3/layout-bmfont-text#layoutglyphs). For example, this could be used to add a new BufferAttribute for `line` offset.
124124

125+
#### Attributes
126+
127+
Besides the basic geometry attributes. There are some text specific attributes, mostly useful for animation purposes.
128+
129+
- `position`
130+
- `uv` : uv coordinates used to map the right letter in the right letter quad
131+
- `center` : center of each letter quad
132+
- `layoutUv` : uv coordinates of the full text block.
133+
- `glyphUv` : uv coordinates of each individual letter quad.
134+
- `glyphResolution` : resolution of each individual letter quad.
135+
- `lineIndex` : index of each line
136+
- `lineLettersTotal`: total amount of letters in each lines
137+
- `lineLetterIndex`: index of each letter by line
138+
- `lineWordsTotal`: total amount of words by line
139+
- `lineWordIndex`: index of each word by line
140+
- `wordIndex`: index of each word
141+
- `letterIndex`: index of each letter
142+
143+
125144
### MSDFTextMaterial
126145

127146
It extends from [Three.js ShaderMaterial](https://threejs.org/docs/#api/en/materials/ShaderMaterial)

0 commit comments

Comments
 (0)