UNPKG

@threlte/extras

Version:

Utilities, abstractions and plugins for your Threlte apps

21 lines (20 loc) 622 B
import type { Props } from '@threlte/core'; import type { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry.js'; import type { Font } from 'three/examples/jsm/loaders/FontLoader.js'; export type Text3DProps = Props<TextGeometry> & { /** * The text to display */ text: string; /** * The loaded font or path to font file * @default 'https://cdn.jsdelivr.net/npm/three/examples/fonts/helvetiker_regular.typeface.json' */ font?: Font | string; /** * Smooth shading * @default 0 */ smooth?: number; onrendered?: (mesh: TextGeometry) => void; };