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 +4 -4
- package/dist/index.cjs +904 -723
- package/dist/index.d.ts +88 -76
- package/dist/index.js +904 -724
- package/dist/index.min.cjs +861 -2
- package/dist/index.min.js +860 -2
- package/dist/index.umd.js +904 -723
- package/dist/index.umd.min.js +862 -2
- package/dist/three/react.cjs +44 -20
- package/dist/three/react.d.ts +36 -24
- package/dist/three/react.js +45 -21
- package/dist/types/core/Text.d.ts +14 -7
- package/dist/types/core/cache/GlyphGeometryBuilder.d.ts +14 -5
- package/dist/types/core/cache/sharedCaches.d.ts +12 -0
- package/dist/types/core/font/TableDirectory.d.ts +7 -0
- package/dist/types/core/font/constants.d.ts +0 -1
- package/dist/types/core/geometry/Extruder.d.ts +3 -6
- package/dist/types/core/layout/LineBreak.d.ts +2 -0
- package/dist/types/core/shaping/DrawCallbacks.d.ts +2 -0
- package/dist/types/core/shaping/TextShaper.d.ts +4 -1
- package/dist/types/core/types.d.ts +26 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/three/ThreeText.d.ts +3 -3
- package/dist/types/utils/LRUCache.d.ts +2 -2
- package/dist/types/webgpu/index.d.ts +1 -2
- package/dist/webgpu/index.cjs +3 -4
- package/dist/webgpu/index.d.ts +1 -2
- package/dist/webgpu/index.js +3 -4
- package/package.json +1 -1
- package/dist/types/core/cache/GlyphCache.d.ts +0 -50
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.
|
|
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
|
-
|
|
904
|
-
|
|
905
|
-
|
|
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
|
|