@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
160 lines (159 loc) • 13.3 kB
TypeScript
/**
* a subnet can contain many nodes and is very useful to organise other nodes
*
*
*
*/
import { Constructor, valueof } from '../../../types/GlobalTypes';
import { TypedJsNode, BaseJsNodeType } from './_Base';
import { JsConnectionPointType } from '../utils/io/connections/Js';
import { NodeParamsConfig } from '../utils/params/ParamsConfig';
import { NetworkNodeType, NodeContext } from '../../poly/NodeContext';
import { JsNodeChildrenMap } from '../../poly/registers/nodes/Js';
import { SubnetInputJsNode } from './SubnetInput';
import { SubnetOutputJsNode } from './SubnetOutput';
import { NodeCreateOptions } from '../utils/hierarchy/ChildrenController';
import { IntegerParam } from '../../params/Integer';
import { StringParam } from '../../params/String';
import type { JsLinesCollectionController } from './code/utils/JsLinesCollectionController';
import { JsCodeBuilder } from './code/utils/CodeBuilder';
import { AddBodyLinesOptions } from './code/utils/LinesController';
export declare const ADD_BODY_LINES_OPTIONS: AddBodyLinesOptions;
export declare function TypedSubnetJsParamsConfigMixin<TBase extends Constructor>(Base: TBase): {
new (...args: any[]): {
main: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
time: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
inputs: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
inputsCount: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputType0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
spare: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
};
} & TBase;
declare const TypedSubnetJsParamsConfig_base: {
new (...args: any[]): {
main: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
time: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
inputs: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
inputsCount: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputType0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
spare: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
};
} & typeof NodeParamsConfig;
declare class TypedSubnetJsParamsConfig extends TypedSubnetJsParamsConfig_base {
}
export declare class AbstractTypedSubnetJsNode<K extends NodeParamsConfig> extends TypedJsNode<K> {
protected _childrenControllerContext: NodeContext;
initializeNode(): void;
protected _expectedInputTypes(): JsConnectionPointType[];
protected _expectedInputName(index: number): string;
protected _expectedOutputTypes(): JsConnectionPointType[];
protected _expectedOutputName(index: number): string;
childExpectedInputConnectionPointTypes(): JsConnectionPointType[];
childExpectedOutputConnectionPointTypes(): JsConnectionPointType[];
childExpectedInputConnectionPointName(index: number): string;
childExpectedOutputConnectionPointName(index: number): string;
createNode<S extends keyof JsNodeChildrenMap>(node_class: S, options?: NodeCreateOptions): JsNodeChildrenMap[S];
createNode<K extends valueof<JsNodeChildrenMap>>(node_class: Constructor<K>, options?: NodeCreateOptions): K;
children(): BaseJsNodeType[];
nodesByType<K extends keyof JsNodeChildrenMap>(type: K): JsNodeChildrenMap[K][];
}
export declare class TypedSubnetJsNode<K extends TypedSubnetJsParamsConfig> extends AbstractTypedSubnetJsNode<K> {
initializeNode(): void;
protected _inputTypeParams(): IntegerParam[];
protected _inputNameParams(): StringParam[];
setInputType(index: number, type: JsConnectionPointType): void;
setInputName(index: number, inputName: string): void;
protected _expectedInputsCount(): number;
protected _expectedInputTypes(): JsConnectionPointType[];
protected _expectedInputName(index: number): string;
protected _expectedOutputTypes(): JsConnectionPointType[];
protected _expectedOutputName(index: number): string;
setLines(linesController: JsLinesCollectionController): void;
protected linesBlockContent(linesController: JsLinesCollectionController): string[] | undefined;
protected _setLinesPreBlock(linesController: JsLinesCollectionController): void;
protected setLinesBlockStart(linesController: JsLinesCollectionController): void;
protected _setLinesBlockContent(linesController: JsLinesCollectionController): void;
protected setLinesBlockEnd(linesController: JsLinesCollectionController): void;
protected _runCodeBuilder(linesController: JsLinesCollectionController): JsCodeBuilder | undefined;
private _addCodeBuilderDefinition;
setSubnetInputLines(linesController: JsLinesCollectionController, childNode: SubnetInputJsNode): void;
setSubnetOutputLines(linesController: JsLinesCollectionController, childNode: SubnetOutputJsNode): void;
private _traverseChildren;
inputNameForSubnetInput(index: number): string;
outputNameForSubnetOutput(index: number): string;
protected _sanitizeBodyLines(lines: string[]): string[];
}
declare const SubnetJsParamsConfig_base: {
new (...args: any[]): {
main: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
time: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FLOAT>;
inputs: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
inputsCount: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputType0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName0: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName1: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName2: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName3: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName4: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName5: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName6: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName7: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName8: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
inputType9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.INTEGER>;
inputName9: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.STRING>;
spare: import("../utils/params/ParamsConfig").ParamTemplate<import("../../index_all").ParamType.FOLDER>;
};
} & typeof NodeParamsConfig;
declare class SubnetJsParamsConfig extends SubnetJsParamsConfig_base {
}
export declare class SubnetJsNode extends TypedSubnetJsNode<SubnetJsParamsConfig> {
paramsConfig: SubnetJsParamsConfig;
static type(): NetworkNodeType;
}
export {};