UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

36 lines (35 loc) 1.7 kB
import { TextureAllocation, TextureAllocationData } from './TextureAllocation'; import { BaseGlNodeType } from '../../_Base'; import { TextureVariable } from './TextureVariable'; import { ShaderConfig } from '../configs/ShaderConfig'; import { ShaderName } from '../../../utils/shaders/ShaderName'; import { PolyScene } from '../../../../scene/PolyScene'; import { PolyDictionary } from '../../../../../types/GlobalTypes'; export type TextureAllocationsControllerData = { writable: PolyDictionary<TextureAllocationData>[]; readonly: PolyDictionary<TextureAllocationData>[]; }; export declare class TextureAllocationsController { private _writableAllocations; private _readonlyAllocations; constructor(); dispose(): void; private static _sortNodes; allocateConnectionsFromRootNodes(rootNodes: BaseGlNodeType[], leafNodes: BaseGlNodeType[]): void; private _allocateVariables; private _ensureVariablesAreUnique; private _allocateVariable; private _addWritableAllocation; private _addReadonlyAllocation; readonlyAllocations(): TextureAllocation[]; shaderNames(): ShaderName[]; createShaderConfigs(): ShaderConfig[]; allocationForShaderName(shader_name: ShaderName): TextureAllocation | undefined; inputNamesForShaderName(root_node: BaseGlNodeType, shader_name: ShaderName): string[] | undefined; variable(variable_name: string): TextureVariable | undefined; variables(): TextureVariable[]; hasVariable(name: string): boolean; static fromJSON(data: TextureAllocationsControllerData): TextureAllocationsController; toJSON(scene: PolyScene): TextureAllocationsControllerData; print(scene: PolyScene): void; }