@polygonjs/polygonjs
Version:
node-based WebGL 3D engine https://polygonjs.com
271 lines (270 loc) • 13.2 kB
TypeScript
import { Color, Vector2, Vector3, Vector4 } from 'three';
import { NamedFunction } from './_Base';
import { JsConnectionPointType } from '../nodes/utils/io/connections/Js';
declare abstract class MathNamedFunction2<ARGS extends [any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction3<ARGS extends [any, any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction4<ARGS extends [any, any, any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction5<ARGS extends [any, any, any, any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction6<ARGS extends [any, any, any, any, any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction7<ARGS extends [any, any, any, any, any, any, any]> extends NamedFunction<ARGS, string[]> {
}
declare abstract class MathNamedFunction8<ARGS extends [any, any, any, any, any, any, any, any]> extends NamedFunction<ARGS, string[]> {
}
type MathFunction1 = (x: number) => number;
type MathFunction2 = (x: number, arg1: number) => number;
type MathFunction3 = (x: number, arg1: number, arg2: number) => number;
type MathFunction4 = (x: number, arg1: number, arg2: number, arg3: number) => number;
type MathFunction5 = (x: number, arg1: number, arg2: number, arg3: number, arg4: number) => number;
export type MathVectorFunction1 = 'mathColor_1' | 'mathVector2_1' | 'mathVector3_1' | 'mathVector4_1';
export type MathVectorFunction2 = 'mathColor_2' | 'mathVector2_2' | 'mathVector3_2' | 'mathVector4_2';
export type MathVectorFunction3 = 'mathColor_3' | 'mathVector2_3' | 'mathVector3_3' | 'mathVector4_3';
export type MathVectorFunction3vvf = 'mathColor_3vvf' | 'mathVector2_3vvf' | 'mathVector3_3vvf' | 'mathVector4_3vvf';
export type MathVectorFunction4 = 'mathColor_4' | 'mathVector2_4' | 'mathVector3_4' | 'mathVector4_4';
export type MathVectorFunction5 = 'mathColor_5' | 'mathVector2_5' | 'mathVector3_5' | 'mathVector4_5';
export type MathVectorFunction = MathVectorFunction1 | MathVectorFunction2 | MathVectorFunction3 | MathVectorFunction3vvf | MathVectorFunction4 | MathVectorFunction5;
export type MathFloat = 'mathFloat_1' | 'mathFloat_2' | 'mathFloat_3' | 'mathFloat_4' | 'mathFloat_5';
export type MathPrimArray = 'mathPrimArray_1' | 'mathPrimArray_2' | 'mathPrimArray_3' | 'mathPrimArray_4' | 'mathPrimArray_5';
export type MathVectorArray = 'mathVectorArray_1' | 'mathVectorArray_2' | 'mathVectorArray_3' | 'mathVectorArray_4' | 'mathVectorArray_5';
export type VectorFunctionName<T extends MathVectorFunction> = (inputType: JsConnectionPointType) => T | undefined;
export declare const _vectorFunctionName_1: VectorFunctionName<MathVectorFunction1>;
export declare const _vectorFunctionName_2: VectorFunctionName<MathVectorFunction2>;
export declare const _vectorFunctionName_3: VectorFunctionName<MathVectorFunction3>;
export declare const _vectorFunctionName_3vvf: VectorFunctionName<MathVectorFunction3vvf>;
export declare const _vectorFunctionName_4: VectorFunctionName<MathVectorFunction4>;
export declare const _vectorFunctionName_5: VectorFunctionName<MathVectorFunction5>;
export type MathArrayVectorElement = Color | Vector2 | Vector3 | Vector4;
type MathArrayVectorElementFunction1<T extends MathArrayVectorElement> = (func: MathFunction1, src: T, target: T) => T;
type MathArrayVectorElementFunction2<T extends MathArrayVectorElement> = (func: MathFunction2, src: T, arg1: T, target: T) => T;
type MathArrayVectorElementFunction3<T extends MathArrayVectorElement> = (func: MathFunction3, src: T, arg1: T, arg2: T, target: T) => T;
type MathArrayVectorElementFunction3VVF<T extends MathArrayVectorElement> = (func: MathFunction3, src: T, arg1: T, arg2: number, target: T) => T;
type MathArrayVectorElementFunction4<T extends MathArrayVectorElement> = (func: MathFunction4, src: T, arg1: T, arg2: T, arg3: T, target: T) => T;
type MathArrayVectorElementFunction5<T extends MathArrayVectorElement> = (func: MathFunction5, src: T, arg1: T, arg2: T, arg3: T, arg4: T, target: T) => T;
export declare class mathFloat_1 extends MathNamedFunction2<[MathFunction1, number]> {
static type(): string;
func(_func: MathFunction1, value: number): number;
}
export declare class mathFloat_2 extends MathNamedFunction3<[MathFunction2, number, number]> {
static type(): string;
func(_func: MathFunction2, value: number, arg1: number): number;
}
export declare class mathFloat_3 extends MathNamedFunction4<[MathFunction3, number, number, number]> {
static type(): string;
func(_func: MathFunction3, value: number, arg1: number, arg2: number): number;
}
export declare class mathFloat_4 extends MathNamedFunction5<[MathFunction4, number, number, number, number]> {
static type(): string;
func(_func: MathFunction4, value: number, arg1: number, arg2: number, arg3: number): number;
}
export declare class mathFloat_5 extends MathNamedFunction6<[MathFunction5, number, number, number, number, number]> {
static type(): string;
func(_func: MathFunction5, value: number, arg1: number, arg2: number, arg3: number, arg4: number): number;
}
export declare class mathColor_1 extends MathNamedFunction3<[MathFunction1, Color, Color]> {
static type(): string;
func: MathArrayVectorElementFunction1<Color>;
}
export declare class mathColor_2 extends MathNamedFunction4<[MathFunction2, Color, Color, Color]> {
static type(): string;
func: MathArrayVectorElementFunction2<Color>;
}
export declare class mathColor_3 extends MathNamedFunction5<[MathFunction2, Color, Color, Color, Color]> {
static type(): string;
func: MathArrayVectorElementFunction3<Color>;
}
export declare class mathColor_3vvf extends MathNamedFunction5<[MathFunction2, Color, Color, number, Color]> {
static type(): string;
func: MathArrayVectorElementFunction3VVF<Color>;
}
export declare class mathColor_4 extends MathNamedFunction6<[MathFunction2, Color, Color, Color, Color, Color]> {
static type(): string;
func: MathArrayVectorElementFunction4<Color>;
}
export declare class mathColor_5 extends MathNamedFunction7<[MathFunction2, Color, Color, Color, Color, Color, Color]> {
static type(): string;
func: MathArrayVectorElementFunction5<Color>;
}
export declare class mathVector2_1 extends MathNamedFunction3<[MathFunction1, Vector2, Vector2]> {
static type(): string;
func: MathArrayVectorElementFunction1<Vector2>;
}
export declare class mathVector2_2 extends MathNamedFunction4<[MathFunction1, Vector2, Vector2, Vector2]> {
static type(): string;
func: MathArrayVectorElementFunction2<Vector2>;
}
export declare class mathVector2_3 extends MathNamedFunction5<[MathFunction1, Vector2, Vector2, Vector2, Vector2]> {
static type(): string;
func: MathArrayVectorElementFunction3<Vector2>;
}
export declare class mathVector2_3vvf extends MathNamedFunction5<[MathFunction1, Vector2, Vector2, number, Vector2]> {
static type(): string;
func: MathArrayVectorElementFunction3VVF<Vector2>;
}
export declare class mathVector2_4 extends MathNamedFunction6<[MathFunction1, Vector2, Vector2, Vector2, Vector2, Vector2]> {
static type(): string;
func: MathArrayVectorElementFunction4<Vector2>;
}
export declare class mathVector2_5 extends MathNamedFunction7<[
MathFunction1,
Vector2,
Vector2,
Vector2,
Vector2,
Vector2,
Vector2
]> {
static type(): string;
func: MathArrayVectorElementFunction5<Vector2>;
}
export declare class mathVector3_1 extends MathNamedFunction3<[MathFunction1, Vector3, Vector3]> {
static type(): string;
func: MathArrayVectorElementFunction1<Vector3>;
}
export declare class mathVector3_2 extends MathNamedFunction4<[MathFunction1, Vector3, Vector3, Vector3]> {
static type(): string;
func: MathArrayVectorElementFunction2<Vector3>;
}
export declare class mathVector3_3 extends MathNamedFunction5<[MathFunction1, Vector3, Vector3, Vector3, Vector3]> {
static type(): string;
func: MathArrayVectorElementFunction3<Vector3>;
}
export declare class mathVector3_3vvf extends MathNamedFunction5<[MathFunction1, Vector3, Vector3, number, Vector3]> {
static type(): string;
func: MathArrayVectorElementFunction3VVF<Vector3>;
}
export declare class mathVector3_4 extends MathNamedFunction6<[MathFunction1, Vector3, Vector3, Vector3, Vector3, Vector3]> {
static type(): string;
func: MathArrayVectorElementFunction4<Vector3>;
}
export declare class mathVector3_5 extends MathNamedFunction7<[
MathFunction1,
Vector3,
Vector3,
Vector3,
Vector3,
Vector3,
Vector3
]> {
static type(): string;
func: MathArrayVectorElementFunction5<Vector3>;
}
export declare class mathVector4_1 extends MathNamedFunction3<[MathFunction1, Vector4, Vector4]> {
static type(): string;
func: MathArrayVectorElementFunction1<Vector4>;
}
export declare class mathVector4_2 extends MathNamedFunction4<[MathFunction1, Vector4, Vector4, Vector4]> {
static type(): string;
func: MathArrayVectorElementFunction2<Vector4>;
}
export declare class mathVector4_3 extends MathNamedFunction5<[MathFunction1, Vector4, Vector4, Vector4, Vector4]> {
static type(): string;
func: MathArrayVectorElementFunction3<Vector4>;
}
export declare class mathVector4_3vvf extends MathNamedFunction5<[MathFunction1, Vector4, Vector4, number, Vector4]> {
static type(): string;
func: MathArrayVectorElementFunction3VVF<Vector4>;
}
export declare class mathVector4_4 extends MathNamedFunction6<[MathFunction1, Vector4, Vector4, Vector4, Vector4, Vector4]> {
static type(): string;
func: MathArrayVectorElementFunction4<Vector4>;
}
export declare class mathVector4_5 extends MathNamedFunction7<[
MathFunction1,
Vector4,
Vector4,
Vector4,
Vector4,
Vector4,
Vector4
]> {
static type(): string;
func: MathArrayVectorElementFunction5<Vector4>;
}
export declare class mathPrimArray_1 extends MathNamedFunction3<[MathFunction1, number[], number[]]> {
static type(): string;
func(_func: MathFunction1, srcElements: number[], targetElements: number[]): number[];
}
export declare class mathPrimArray_2 extends MathNamedFunction4<[MathFunction2, number[], number, number[]]> {
static type(): string;
func(_func: MathFunction2, srcElements: number[], arg1: number, targetElements: number[]): number[];
}
export declare class mathPrimArray_3 extends MathNamedFunction5<[MathFunction3, number[], number, number, number[]]> {
static type(): string;
func(_func: MathFunction3, srcElements: number[], arg1: number, arg2: number, targetElements: number[]): number[];
}
export declare class mathPrimArray_4 extends MathNamedFunction6<[MathFunction4, number[], number, number, number, number[]]> {
static type(): string;
func(_func: MathFunction4, srcElements: number[], arg1: number, arg2: number, arg3: number, targetElements: number[]): number[];
}
export declare class mathPrimArray_5 extends MathNamedFunction7<[
MathFunction5,
number[],
number,
number,
number,
number,
number[]
]> {
static type(): string;
func(_func: MathFunction5, srcElements: number[], arg1: number, arg2: number, arg3: number, arg4: number, targetElements: number[]): number[];
}
export declare class mathVectorArray_1<T extends MathArrayVectorElement> extends MathNamedFunction4<[
MathFunction1,
MathArrayVectorElementFunction1<T>,
T[],
T[]
]> {
static type(): string;
func(_func: MathFunction1, vectorFunc: MathArrayVectorElementFunction1<T>, srcElements: T[], targetElements: T[]): T[];
}
export declare class mathVectorArray_2<T extends MathArrayVectorElement> extends MathNamedFunction5<[
MathFunction2,
MathArrayVectorElementFunction2<T>,
T[],
T,
T[]
]> {
static type(): string;
func(_func: MathFunction2, vectorFunc: MathArrayVectorElementFunction2<T>, srcElements: T[], arg1: T, targetElements: T[]): T[];
}
export declare class mathVectorArray_3<T extends MathArrayVectorElement> extends MathNamedFunction6<[
MathFunction3,
MathArrayVectorElementFunction3<T>,
T[],
T,
T,
T[]
]> {
static type(): string;
func(_func: MathFunction3, vectorFunc: MathArrayVectorElementFunction3<T>, srcElements: T[], arg1: T, arg2: T, targetElements: T[]): T[];
}
export declare class mathVectorArray_4<T extends MathArrayVectorElement> extends MathNamedFunction7<[
MathFunction4,
MathArrayVectorElementFunction4<T>,
T[],
T,
T,
T,
T[]
]> {
static type(): string;
func(_func: MathFunction4, vectorFunc: MathArrayVectorElementFunction4<T>, srcElements: T[], arg1: T, arg2: T, arg3: T, targetElements: T[]): T[];
}
export declare class mathVectorArray_5<T extends MathArrayVectorElement> extends MathNamedFunction8<[
MathFunction5,
MathArrayVectorElementFunction5<T>,
T[],
T,
T,
T,
T,
T[]
]> {
static type(): string;
func(_func: MathFunction5, vectorFunc: MathArrayVectorElementFunction5<T>, srcElements: T[], arg1: T, arg2: T, arg3: T, arg4: T, targetElements: T[]): T[];
}
export {};