babylon-msdf-text
Version:
**babylon-msdf-text** is a library for rendering high-quality, scalable, and anti-aliased text in Babylon.js using the Multi-channel Signed Distance Field (MSDF) technique. It offers an efficient and straightforward solution for superior text rendering in
19 lines (18 loc) • 631 B
TypeScript
import { TextLayoutOptions } from './TextLayout';
import * as BABYLON from "@babylonjs/core";
/**
* Options for creating a text mesh
*/
export interface TextMeshOptions extends TextLayoutOptions {
atlas: string | BABYLON.Texture;
color?: BABYLON.Color3;
strokeColor?: BABYLON.Color3;
opacity?: number;
strokeWidth?: number;
}
/**
* Creates a text mesh using MSDF technique
* @param options - Configuration options for the text mesh
* @returns A Babylon.js Mesh with MSDF text rendering
*/
export declare function createTextMesh(name: string, options: TextMeshOptions, scene: BABYLON.Scene): BABYLON.Mesh;