/** * Turn a uniform into a varying/writeable value. * - If the uniform was used in the fragment shader, it will become a varying in both shaders. * - If the uniform was only used in the vertex shader, it will become a writeable var. */ export function uniformToVarying({ vertexShader, fragmentShader }: { vertexShader: any; fragmentShader: any; }, uniformName: any, varyingName?: any): { vertexShader: any; fragmentShader: any; }; /** * @experimental * * A specialized `Text` implementation that accepts any number of `Text` children * and automatically batches them together to render in a single draw call. * * The `material` of each child `Text` will be ignored, and the `material` of the * `BatchedText` will be used for all of them instead. * * NOTE: This only works in WebGL2 or where the OES_texture_float extension is available. */ export class BatchedText extends Text { /** * @typedef {Object} PackingInfo * @property {number} index - the packing order index when last packed, or -1 * @property {boolean} dirty - whether it has synced since last pack */ /** * @type {Map} */ _members: Map; _dataTextures: {}; _onMemberSynced: (e: any) => void; /** * @override * Batch any Text objects added as children */ override add(...objects: any[]): this; /** * @override */ override remove(...objects: any[]): this; /** * @param {Text} text */ addText(text: Text): void; /** * @param {Text} text */ removeText(text: Text): void; _needsRepack: boolean; updateMatrixWorld(force: any): void; /** * Update the batched geometry bounds to hold all members */ updateBounds(): void; sync(callback: any): void; copy(source: any): this; } import { Text } from "./Text.js";