@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
23 lines (22 loc) • 1.09 kB
TypeScript
import { TextureVariable, TextureVariableData } from './TextureVariable';
import { BaseGlNodeType } from '../../_Base';
import { PolyScene } from '../../../../scene/PolyScene';
import { ShaderName } from '../../../utils/shaders/ShaderName';
export type TextureAllocationData = TextureVariableData[];
export declare const TEXTURE_ALLOCATION_PREFIX = "texture_";
export declare const TEXTURE_ALLOCATION_NAMES_SEPARATOR = "_x_";
export declare class TextureAllocation {
private _variables;
private _size;
constructor();
addVariable(variable: TextureVariable): void;
hasSpaceForVariable(variable: TextureVariable): boolean;
shaderName(): ShaderName;
textureName(): string;
variables(): TextureVariable[] | undefined;
variablesForInputNode(root_node: BaseGlNodeType): TextureVariable[] | undefined;
inputNamesForNode(root_node: BaseGlNodeType): string[] | undefined;
variable(variable_name: string): TextureVariable | undefined;
static fromJSON(data: TextureAllocationData): TextureAllocation;
toJSON(scene: PolyScene): TextureAllocationData;
}