three-text 0.2.12 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -317,7 +317,7 @@ The library uses a hybrid caching strategy to maximize performance while ensurin
317
317
 
318
318
  By default, it operates with glyph-level cache. The geometry for each unique character (`a`, `b`, `c`...) is generated only once and stored for reuse, avoiding redundant computation
319
319
 
320
- For text with tight tracking, connected scripts, or complex kerning pairs, individual glyphs can overlap. When an overlap within a word is found, the entire word is treated as a single unit and escalated to a word-level cache. All of its glyphs are tessellated together to correctly resolve the overlaps, and the resulting geometry for the word is cached
320
+ For text with tight tracking, connected scripts, or complex kerning pairs, individual glyphs can overlap. The system detects overlaps within each word and handles them at the sub-cluster level: only the specific glyphs that overlap are tessellated together as a group, while non-overlapping glyphs in the same word continue to use individual glyph caching
321
321
 
322
322
 
323
323
  #### Flat geometry mode
@@ -900,9 +900,9 @@ const stats = text.getCacheStatistics();
900
900
  console.log('Cache Statistics:', {
901
901
  hitRate: stats.hitRate, // Cache hit percentage
902
902
  memoryUsageMB: stats.memoryUsageMB, // Memory used in MB
903
- uniqueGlyphs: stats.uniqueGlyphs, // Distinct cached glyphs
904
- totalGlyphs: stats.totalGlyphs, // Total glyphs processed
905
- saved: stats.saved // Tessellations avoided
903
+ size: stats.size, // Entries in cache
904
+ hits: stats.hits, // Cache hits
905
+ misses: stats.misses // Cache misses
906
906
  });
907
907
  ```
908
908