three-text 0.2.7 → 0.2.9
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 +35 -9
- package/dist/index.cjs +399 -115
- package/dist/index.d.ts +9 -2
- package/dist/index.js +399 -115
- package/dist/index.min.cjs +2 -2
- package/dist/index.min.js +2 -2
- package/dist/index.umd.js +399 -115
- package/dist/index.umd.min.js +2 -2
- package/dist/three/index.cjs +36 -29
- package/dist/three/index.d.ts +1 -0
- package/dist/three/index.js +36 -29
- package/dist/three/react.d.ts +9 -2
- package/dist/types/core/Text.d.ts +7 -1
- package/dist/types/core/layout/LineBreak.d.ts +9 -2
- package/dist/types/core/shaping/TextShaper.d.ts +1 -0
- package/dist/types/core/types.d.ts +2 -1
- package/dist/types/three/index.d.ts +1 -0
- package/dist/types/utils/PerformanceLogger.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -315,7 +315,8 @@ interface LayoutOptions {
|
|
|
315
315
|
exhyphenpenalty?: number;
|
|
316
316
|
doublehyphendemerits?: number;
|
|
317
317
|
looseness?: number;
|
|
318
|
-
|
|
318
|
+
disableShortLineDetection?: boolean;
|
|
319
|
+
shortLineThreshold?: number;
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
interface GlyphData {
|
|
@@ -381,7 +382,12 @@ declare class Text {
|
|
|
381
382
|
static setHarfBuzzPath(path: string): void;
|
|
382
383
|
static setHarfBuzzBuffer(wasmBuffer: ArrayBuffer): void;
|
|
383
384
|
static init(): Promise<HarfBuzzInstance>;
|
|
384
|
-
static create(options: TextOptions): Promise<TextGeometryInfo & Pick<Text, 'getLoadedFont' | 'getCacheStatistics' | 'clearCache' | 'measureTextWidth'
|
|
385
|
+
static create(options: TextOptions): Promise<TextGeometryInfo & Pick<Text, 'getLoadedFont' | 'getCacheStatistics' | 'clearCache' | 'measureTextWidth'> & {
|
|
386
|
+
update: (options: Partial<TextOptions>) => Promise<TextGeometryInfo & Pick<Text, 'getLoadedFont' | 'getCacheStatistics' | 'clearCache' | 'measureTextWidth'> & {
|
|
387
|
+
update: (options: Partial<TextOptions>) => Promise<any>;
|
|
388
|
+
}>;
|
|
389
|
+
}>;
|
|
390
|
+
private static resolveFont;
|
|
385
391
|
private static loadAndCacheFont;
|
|
386
392
|
private static generateFontContentHash;
|
|
387
393
|
private setLoadedFont;
|
|
@@ -401,6 +407,7 @@ declare class Text {
|
|
|
401
407
|
getCacheStatistics(): GlyphCacheStats | null;
|
|
402
408
|
clearCache(): void;
|
|
403
409
|
private createGlyphAttributes;
|
|
410
|
+
private resetHelpers;
|
|
404
411
|
destroy(): void;
|
|
405
412
|
}
|
|
406
413
|
|