videx-3d
Version:
React 3D component library designed for sub surface visualizations in the browser
30 lines (29 loc) • 1.03 kB
TypeScript
import { PropsWithChildren } from 'react';
/**
* GlyphsProvider props
* @expand
*/
export type GlyphsProviderProps = {
fontAtlasUrl: string;
fontConfigUrl: string;
};
/**
* Provides sub components with a GlyphsContext, which contains data and utilities needed to
* add text support to fragment shaders. This includes a reference to a glyph atlas texture
* and a supporting uniforms group, which will contain glyph config and metrics.
*
* It currently relies on a pre-generated font atlas and json config file using [msdf-bmfont-xml](https://github.com/soimy/msdf-bmfont-xml)
*
* @example
* <GlyphsProvider fontAtlasUrl="OpenSans-Regular.png" fontConfigUrl="OpenSans-Regular.json">
* { ... }
* </GlyphsProvider>
*
* @remarks
* This component should be considered experimental.
*
* @see {@link GlyphsContext}
*
* @group Components
*/
export declare const GlyphsProvider: ({ fontAtlasUrl, fontConfigUrl, children }: PropsWithChildren<GlyphsProviderProps>) => import("react/jsx-runtime").JSX.Element;