threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
84 lines • 2.96 kB
TypeScript
import { UiObjectConfig } from 'uiconfig.js';
import { IAssetImporter } from '../assetmanager';
import { ITexture } from '../core';
export interface ITextSVGOptions {
text: string;
fontFamily?: string;
fontPath?: string;
svgBackground?: string;
xOffset?: number;
yOffset?: number;
width?: number;
height?: number;
boxWidth?: number;
boxHeight?: number;
fontSize?: number;
fontWeight?: string | number;
fontStyle?: 'normal' | 'italic' | 'oblique';
lineHeight?: string | number;
letterSpacing?: string | number;
whiteSpace?: 'normal' | 'pre' | 'nowrap' | 'pre-wrap' | 'pre-line';
direction?: 'auto' | 'ltr' | 'rtl';
maskText?: boolean;
innerShadow?: boolean;
bgFillColor?: string;
textColor?: string;
textAnchor?: 'start' | 'middle' | 'end';
style?: string;
}
export declare class TextSVGOptions implements ITextSVGOptions {
text: string;
fontSize: number;
width: number;
height: number;
xOffset: number;
yOffset: number;
boxWidth: number;
boxHeight: number;
textAnchor: 'start' | 'middle' | 'end';
fontFamily: string;
fontPath: string;
fontWeight: string | number;
fontStyle: 'normal' | 'italic' | 'oblique';
lineHeight: string | number;
letterSpacing: string | number;
whiteSpace: 'normal' | 'pre' | 'nowrap' | 'pre-wrap' | 'pre-line';
direction: 'ltr' | 'rtl';
maskText: boolean;
innerShadow: boolean;
textColor: string;
bgFillColor: string;
svgBackground: string;
onChange: () => void;
set(ops: ITextSVGOptions): void;
reset(): void;
toJSON(): {
text: string;
fontFamily: string;
fontPath: string;
svgBackground: string;
width: number;
height: number;
xOffset: number;
yOffset: number;
boxWidth: number;
boxHeight: number;
fontSize: number;
fontWeight: string | number;
fontStyle: "normal" | "italic" | "oblique";
lineHeight: string | number;
letterSpacing: string | number;
whiteSpace: "pre" | "normal" | "nowrap" | "pre-wrap" | "pre-line";
direction: "ltr" | "rtl";
maskText: boolean;
innerShadow: boolean;
bgFillColor: string;
textColor: string;
textAnchor: "end" | "start" | "middle";
};
uiConfig: UiObjectConfig;
}
export declare const fontFormatExtensionMap: any;
export declare function buildTextSvg({ text, svgBackground, xOffset, yOffset, width, height, boxWidth, boxHeight, fontFamily, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, whiteSpace, direction, maskText, innerShadow, bgFillColor, textColor, textAnchor, style, }: ITextSVGOptions): string;
export declare function makeTextSvgAdvanced(options: ITextSVGOptions, importer: IAssetImporter): Promise<ITexture<import('three').TextureEventMap> | null>;
//# sourceMappingURL=../src/utils/TextSVG.d.ts.map