UNPKG

@polygonjs/polygonjs

Version:

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

23 lines (22 loc) 1.16 kB
import { BaseOperation } from '../_Base'; import { BaseOperationContainer } from './_Base'; import { NodeContext } from '../../../engine/poly/NodeContext'; import { ParamsInitData } from '../../../engine/nodes/utils/io/IOController'; import { Texture } from 'three'; export declare class BaseCopOperation extends BaseOperation<NodeContext.COP> { static context(): NodeContext; cook(input_contents: Texture[], params: any): Texture | Promise<Texture> | void; } export type OperationInputsMap = WeakMap<CopOperationContainer, Map<number, number>>; export declare class CopOperationContainer extends BaseOperationContainer<NodeContext.COP> { protected operation: BaseCopOperation; protected name: string; protected init_params: ParamsInitData; constructor(operation: BaseCopOperation, name: string, init_params: ParamsInitData); protected _inputs: CopOperationContainer[]; private _currentInputIndex; addInput(input: CopOperationContainer): void; incrementInputIndex(): void; currentInputIndex(): number; compute(input_contents: Texture[], operation_inputs_map: OperationInputsMap): Promise<void | Texture>; }