diff --git a/examples/jsm/nodes/accessors/CameraNode.d.ts b/examples/jsm/nodes/accessors/CameraNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7926fd8e173e246d80a6b024364e995ad77a57ca --- /dev/null +++ b/examples/jsm/nodes/accessors/CameraNode.d.ts @@ -0,0 +1,31 @@ +import { Camera } from '../../../../src/Three'; + +import { NodeBuilder } from '../core/NodeBuilder'; +import { NodeFrame } from '../core/NodeFrame'; +import { TempNode } from '../core/TempNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { FloatNode } from '../inputs/FloatNode'; + +export class CameraNode extends TempNode { + constructor(scope?: string, camera?: Camera); + + scope: string; + near: FloatNode | undefined; + far: FloatNode | undefined; + camera: Camera | undefined; + updateFrame: boolean | undefined; + nodeType: string; + + setCamera(camera: Camera): void; + setScope(scope: string): void; + generate(builder: NodeBuilder, output: string): string; + onUpdateFrame(frame: NodeFrame): void; + copy(source: CameraNode): this; + + static Nodes: { + depthColor: FunctionNode; + }; + static POSITION: string; + static DEPTH: string; + static TO_VERTEX: string; +} diff --git a/examples/jsm/nodes/accessors/ColorsNode.d.ts b/examples/jsm/nodes/accessors/ColorsNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c7a9e63584d407934ba98cdcbb3dfd49f7c87ca --- /dev/null +++ b/examples/jsm/nodes/accessors/ColorsNode.d.ts @@ -0,0 +1,11 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class ColorsNode extends TempNode { + constructor(index?: number); + + index: number; + + generate(builder: NodeBuilder, output: string): string; + copy(source: ColorsNode): this; +} diff --git a/examples/jsm/nodes/accessors/LightNode.d.ts b/examples/jsm/nodes/accessors/LightNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7836aaade009f0ef036f3abaf7339c27682ea52f --- /dev/null +++ b/examples/jsm/nodes/accessors/LightNode.d.ts @@ -0,0 +1,14 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class LightNode extends TempNode { + constructor(scope?: string); + + scope: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: LightNode): this; + + static TOTAL: string; +} diff --git a/examples/jsm/nodes/accessors/NormalNode.d.ts b/examples/jsm/nodes/accessors/NormalNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfa5d4bd17f8757f6bb21c2d8a46e4d5d9bf7716 --- /dev/null +++ b/examples/jsm/nodes/accessors/NormalNode.d.ts @@ -0,0 +1,16 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class NormalNode extends TempNode { + constructor(scope?: string); + + scope: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: NormalNode): this; + + static LOCAL: string; + static WORLD: string; + static VIEW: string; +} diff --git a/examples/jsm/nodes/accessors/PositionNode.d.ts b/examples/jsm/nodes/accessors/PositionNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..0507e0c12e93ee6b0e8198988393adca1d8cc8bc --- /dev/null +++ b/examples/jsm/nodes/accessors/PositionNode.d.ts @@ -0,0 +1,17 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class PositionNode extends TempNode { + constructor(scope?: string); + + scope: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: PositionNode): this; + + static LOCAL: string; + static WORLD: string; + static VIEW: string; + static PROJECTION: string; +} diff --git a/examples/jsm/nodes/accessors/ReflectNode.d.ts b/examples/jsm/nodes/accessors/ReflectNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6a0b39ba559d8e776d0d639b267599dd56b5c5ba --- /dev/null +++ b/examples/jsm/nodes/accessors/ReflectNode.d.ts @@ -0,0 +1,17 @@ +import { Vector2 } from '../../../../src/Three'; + +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class ReflectNode extends TempNode { + constructor(scope?: string); + + scope: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + + static CUBE: string; + static SPHERE: string; + static VECTOR: string; +} \ No newline at end of file diff --git a/examples/jsm/nodes/accessors/ResolutionNode.d.ts b/examples/jsm/nodes/accessors/ResolutionNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..18fe82dc1d8578e30947b4f70fe27d169e0fe2d3 --- /dev/null +++ b/examples/jsm/nodes/accessors/ResolutionNode.d.ts @@ -0,0 +1,15 @@ +import { Vector2 } from '../../../../src/Three'; + +import { NodeBuilder } from '../core/NodeBuilder'; +import { NodeFrame } from '../core/NodeFrame'; +import { Vector2Node } from '../inputs/Vector2Node'; + +export class ResolutionNode extends Vector2Node { + constructor(); + + size: Vector2; + nodeType: string; + + updateFrame(frame: NodeFrame): void; + copy(source: ResolutionNode): this; +} diff --git a/examples/jsm/nodes/accessors/ScreenUVNode.d.ts b/examples/jsm/nodes/accessors/ScreenUVNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..eab03f199c3e801a9dc8d120668c938666ccdbf9 --- /dev/null +++ b/examples/jsm/nodes/accessors/ScreenUVNode.d.ts @@ -0,0 +1,13 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; +import { ResolutionNode } from './ResolutionNode'; + +export class ScreenUVNode extends TempNode { + constructor(resolution?: ResolutionNode); + + resolution: ResolutionNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: ScreenUVNode): this; +} diff --git a/examples/jsm/nodes/accessors/UVNode.d.ts b/examples/jsm/nodes/accessors/UVNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c356d49705473b9045d70c3e375372d0f6d9b9ce --- /dev/null +++ b/examples/jsm/nodes/accessors/UVNode.d.ts @@ -0,0 +1,12 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; + +export class UVNode extends TempNode { + constructor(index?: number); + + index: number; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: UVNode): this; +} diff --git a/examples/jsm/nodes/bsdfs/BlinnExponentToRoughnessNode.d.ts b/examples/jsm/nodes/bsdfs/BlinnExponentToRoughnessNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3a197dfaefec7f631118e94edfb2f5be64e69c5 --- /dev/null +++ b/examples/jsm/nodes/bsdfs/BlinnExponentToRoughnessNode.d.ts @@ -0,0 +1,13 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { BlinnShininessExponentNode } from './BlinnShininessExponentNode'; + +export class BlinnExponentToRoughnessNode extends TempNode { + constructor(blinnExponent?: BlinnShininessExponentNode); + + blinnExponent: BlinnShininessExponentNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: BlinnExponentToRoughnessNode): this; +} diff --git a/examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.d.ts b/examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4ba1a584553808078e0f0a670fafb80e7de8877a --- /dev/null +++ b/examples/jsm/nodes/bsdfs/BlinnShininessExponentNode.d.ts @@ -0,0 +1,10 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class BlinnShininessExponentNode extends TempNode { + constructor(); + + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; +} diff --git a/examples/jsm/nodes/bsdfs/RoughnessToBlinnExponentNode.d.ts b/examples/jsm/nodes/bsdfs/RoughnessToBlinnExponentNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..02bcad20cb773aac4e88fbc246ea68d6617ed603 --- /dev/null +++ b/examples/jsm/nodes/bsdfs/RoughnessToBlinnExponentNode.d.ts @@ -0,0 +1,21 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { MaxMIPLevelNode } from '../utils/MaxMIPLevelNode'; +import { BlinnShininessExponentNode } from './BlinnShininessExponentNode'; +import { FunctionNode } from '../core/FunctionNode'; + +export class RoughnessToBlinnExponentNode extends TempNode { + constructor(texture: Node); + + texture: Node; + maxMIPLevel: MaxMIPLevelNode; + blinnShininessExponent: BlinnShininessExponentNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: RoughnessToBlinnExponentNode): this; + + static Nodes: { + getSpecularMIPLevel: FunctionNode; + }; +} diff --git a/examples/jsm/nodes/core/NodeBuilder.d.ts b/examples/jsm/nodes/core/NodeBuilder.d.ts index 124108680c4f2c14fca5a2e44273f91f5067e685..7e2a02a62ec23abe41b63d478b641ce433051004 100644 --- a/examples/jsm/nodes/core/NodeBuilder.d.ts +++ b/examples/jsm/nodes/core/NodeBuilder.d.ts @@ -3,7 +3,7 @@ import { Texture, TextureEncoding, WebGLRenderer -} from "../../../../build/three.module.js"; +} from '../../../../src/Three'; import { Node } from './Node'; import { NodeUniform } from './NodeUniform'; @@ -80,7 +80,7 @@ export class NodeBuilder { analyzing: boolean; - build(vertex: Node, fragment: node): this; + build(vertex: Node, fragment: Node): this; buildShader(shader: string, node: Node): void; setMaterial(material: Material, renderer: WebGLRenderer): this; addFlow(slot: string, cache?: string, context?: object): this; @@ -141,6 +141,6 @@ export class NodeBuilder { isShader(shader: string): boolean; setShader(shader: string): this; mergeDefines(defines: object): object; - mergeUniform(uniforms: object): uniforms; + mergeUniform(uniforms: object): object; getTextureEncodingFromMap(map: Texture, gammaOverrideLinear?: boolean): TextureEncoding; } diff --git a/examples/jsm/nodes/core/NodeFrame.d.ts b/examples/jsm/nodes/core/NodeFrame.d.ts index c9576f72b525f42dd6cff9ad1503a90b747f17c7..7e5dc4345b2eb5a10577acde00308cc4ff6a0700 100644 --- a/examples/jsm/nodes/core/NodeFrame.d.ts +++ b/examples/jsm/nodes/core/NodeFrame.d.ts @@ -1,20 +1,20 @@ import { - Texture, - WebGLRenderer -} from "../../../../build/three.module.js"; + Texture, + WebGLRenderer +} from '../../../../src/Three'; import { Node } from './Node'; export class NodeFrame { - constructor(time: number); - time: number; - id: number; - delta: number | undefined; - renderer: WebGLRenderer | undefined; - renderTexture: Texture | undefined; - - update(delta: number): this; - setRenderer(renderer: WebGLRenderer): this; - setRenderTexture(renderTexture: Texture): this; - updateNode(node: Node): this; + constructor(time: number); + time: number; + id: number; + delta: number | undefined; + renderer: WebGLRenderer | undefined; + renderTexture: Texture | undefined; + + update(delta: number): this; + setRenderer(renderer: WebGLRenderer): this; + setRenderTexture(renderTexture: Texture): this; + updateNode(node: Node): this; } diff --git a/examples/jsm/nodes/effects/BlurNode.d.ts b/examples/jsm/nodes/effects/BlurNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5e85d0e0fd673de2128df27e1bd2e9d67665a491 --- /dev/null +++ b/examples/jsm/nodes/effects/BlurNode.d.ts @@ -0,0 +1,33 @@ +import { Vector2 } from '../../../../src/Three'; + +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { NodeFrame } from '../core/NodeFrame'; +import { UVNode } from '../accessors/UVNode'; +import { Vector2Node } from '../inputs/Vector2Node'; +import { FloatNode } from '../inputs/FloatNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { TextureNode } from '../inputs/TextureNode'; + +export class BlurNode extends TempNode { + constructor(value: TextureNode, uv?: UVNode, radius?: number, size?: Vector2); + + value: TextureNode; + uv: UVNode; + radius: Vector2Node; + size: Vector2; + blurX: boolean; + blurY: boolean; + horizontal: FloatNode; + vertical: FloatNode; + nodeType: string; + + updateFrame(frame: NodeFrame): void; + generate(builder: NodeBuilder, output: string): string; + copy(source: BlurNode): this; + + static Nodes: { + blurX: FunctionNode; + blurY: FunctionNode; + } +} diff --git a/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts b/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d08c530d7a82ba0b48dddb211ed202d2eecad43 --- /dev/null +++ b/examples/jsm/nodes/effects/ColorAdjustmentNode.d.ts @@ -0,0 +1,30 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FloatNode } from '../inputs/FloatNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { Node } from '../core/Node'; + +export class ColorAdjustmentNode extends TempNode { + constructor(rgb: Node, adjustment?: FloatNode, method?: string); + + rgb: Node; + adjustment: FloatNode | undefined; + method: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: ColorAdjustmentNode): this; + + static Nodes: { + hue: FunctionNode; + saturation: FunctionNode; + vibrance: FunctionNode; + } + + static SATURATION: string; + static HUE: string; + static VIBRANCE: string; + static BRIGHTNESS: string; + static CONTRAST: string; + +} diff --git a/examples/jsm/nodes/effects/LuminanceNode.d.ts b/examples/jsm/nodes/effects/LuminanceNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..8926ef4c75f09291ef6eba5bd3ca1bf436c41668 --- /dev/null +++ b/examples/jsm/nodes/effects/LuminanceNode.d.ts @@ -0,0 +1,21 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FunctionNode } from '../core/FunctionNode'; +import { ConstNode } from '../core/ConstNode'; +import { Node } from '../core/Node'; + +export class LuminanceNode extends TempNode { + constructor(rgb: Node); + + rgb: Node; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: LuminanceNode): this; + + static Nodes: { + LUMA: ConstNode; + luminance: FunctionNode; + } + +} diff --git a/examples/jsm/nodes/inputs/BoolNode.d.ts b/examples/jsm/nodes/inputs/BoolNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1c38ba3b2c89a3e6b67d1f5e8010b447044dbb7b --- /dev/null +++ b/examples/jsm/nodes/inputs/BoolNode.d.ts @@ -0,0 +1,12 @@ +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class BoolNode extends InputNode { + constructor(value?: boolean); + + value: boolean; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: BoolNode): this; +} diff --git a/examples/jsm/nodes/inputs/ColorNode.d.ts b/examples/jsm/nodes/inputs/ColorNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..479e69d3600768c0cdf127ed02ef20c26638cccc --- /dev/null +++ b/examples/jsm/nodes/inputs/ColorNode.d.ts @@ -0,0 +1,14 @@ +import { Color } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class ColorNode extends InputNode { + constructor(color: Color | number | string, g?: number, b?: number); + + value: Color; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: ColorNode): this; +} diff --git a/examples/jsm/nodes/inputs/CubeTextureNode.d.ts b/examples/jsm/nodes/inputs/CubeTextureNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..1556085fbfb3341fb5d97d62e50e64fb8c01a18d --- /dev/null +++ b/examples/jsm/nodes/inputs/CubeTextureNode.d.ts @@ -0,0 +1,18 @@ +import { CubeTexture } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { Node } from '../core/Node'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class CubeTextureNode extends InputNode { + constructor(value: CubeTexture, uv?: Node, bias?: Node); + + value: CubeTexture; + uv: Node | undefined; + bias: Node | undefined; + nodeType: string; + + getTexture(builder: NodeBuilder, output: string): string; + generate(builder: NodeBuilder, output: string): string; + copy(source: CubeTextureNode): this; +} diff --git a/examples/jsm/nodes/inputs/FloatNode.d.ts b/examples/jsm/nodes/inputs/FloatNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c0073cba4ea72aa24ccd833ccdcd291a1dcbb3da --- /dev/null +++ b/examples/jsm/nodes/inputs/FloatNode.d.ts @@ -0,0 +1,12 @@ +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class FloatNode extends InputNode { + constructor(value?: number); + + value: number; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: FloatNode): this; +} diff --git a/examples/jsm/nodes/inputs/IntNode.d.ts b/examples/jsm/nodes/inputs/IntNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d54c24498d2deda86636ab78e83b87de66d7aeba --- /dev/null +++ b/examples/jsm/nodes/inputs/IntNode.d.ts @@ -0,0 +1,12 @@ +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class IntNode extends InputNode { + constructor(value?: number); + + value: number; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: IntNode): this; +} diff --git a/examples/jsm/nodes/inputs/Matrix3Node.d.ts b/examples/jsm/nodes/inputs/Matrix3Node.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b1c3e175380c6037f2338781a47d46b177081f4 --- /dev/null +++ b/examples/jsm/nodes/inputs/Matrix3Node.d.ts @@ -0,0 +1,15 @@ +import { Matrix3 } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class Matrix3Node extends InputNode { + constructor(matrix?: Matrix3); + + value: Matrix3; + nodeType: string; + elements: number[]; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: Matrix3Node): this; +} diff --git a/examples/jsm/nodes/inputs/Matrix4Node.d.ts b/examples/jsm/nodes/inputs/Matrix4Node.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..87246c8330c383844314ef905ec2c76dfc2f8e09 --- /dev/null +++ b/examples/jsm/nodes/inputs/Matrix4Node.d.ts @@ -0,0 +1,15 @@ +import { Matrix4 } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class Matrix4Node extends InputNode { + constructor(matrix?: Matrix4); + + value: Matrix4; + nodeType: string; + elements: number[]; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: Matrix4Node): this; +} diff --git a/examples/jsm/nodes/inputs/PropertyNode.d.ts b/examples/jsm/nodes/inputs/PropertyNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..64c7035dce2d60d19e9ebd2a8946fc9d5926fa7b --- /dev/null +++ b/examples/jsm/nodes/inputs/PropertyNode.d.ts @@ -0,0 +1,10 @@ +import { InputNode } from '../core/InputNode'; + +export class PropertyNode extends InputNode { + constructor(object: object, property: string, type: string); + + object: object; + property: string; + nodeType: string; + value: any; +} diff --git a/examples/jsm/nodes/inputs/RTTNode.d.ts b/examples/jsm/nodes/inputs/RTTNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1b686f4ce5c24e9c3f30b34eca00cd6624b3fa9 --- /dev/null +++ b/examples/jsm/nodes/inputs/RTTNode.d.ts @@ -0,0 +1,33 @@ +import { + Mesh, + OrthographicCamera, + SceneUtils, + WebGLRenderTarget, + WebGLRenderTargetOptions +} from '../../../../src/Three'; + +import { NodeBuilder } from '../core/NodeBuilder'; +import { NodeFrame } from '../core/NodeFrame'; +import { TextureNode } from './TextureNode'; + +export interface RTTNodeOptions extends WebGLRenderTargetOptions { + clear?: boolean; +} + +export class RTTNode extends TextureNode { + constructor(width: number, height: number, input: TextureNode, options?: RTTNodeOptions); + + input: TextureNode; + clear: boolean; + renderTarget: WebGLRenderTarget; + material: object; // NodeMaterial + camera: OrthographicCamera; + scene: Scene; + quad: Mesh; + render: boolean; + + build(builder: NodeBuilder, output: string, uuid?: string): string; + updateFramesaveTo(frame: NodeFrame): void; + updateFrame(frame: NodeFrame): void; + copy(source: RTTNode): this; +} diff --git a/examples/jsm/nodes/inputs/ReflectorNode.d.ts b/examples/jsm/nodes/inputs/ReflectorNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..547d8fca65fe0c47be7344dc06fed4cdcf1649a0 --- /dev/null +++ b/examples/jsm/nodes/inputs/ReflectorNode.d.ts @@ -0,0 +1,23 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TempNode } from '../core/TempNode'; +import { Matrix4Node } from './Matrix4Node'; +import { OperatorNode } from '../math/OperatorNode'; +import { ReflectorRTT } from '../../objects/ReflectorRTT'; +import { TextureNode } from './TextureNode'; +import { PositionNode } from '../accessors/PositionNode'; + +export class ReflectorNode extends TempNode { + constructor(mirror?: ReflectorRTT); + + mirror: ReflectorRTT; + textureMatrix: Matrix4Node; + localPosition: PositionNode; + uv: OperatorNode; + uvResult: OperatorNode; + texture: TextureNode; + + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: ReflectorNode): this; +} diff --git a/examples/jsm/nodes/inputs/ScreenNode.d.ts b/examples/jsm/nodes/inputs/ScreenNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc41d1dec7e8ff9f42c6d43f72715718af5398f3 --- /dev/null +++ b/examples/jsm/nodes/inputs/ScreenNode.d.ts @@ -0,0 +1,11 @@ +import { NodeBuilder } from '../core/NodeBuilder'; +import { TextureNode } from './TextureNode'; +import { UVNode } from '../accessors/UVNode'; + +export class ScreenNode extends TextureNode { + constructor(uv?: UVNode); + + nodeType: string; + + getTexture(builder: NodeBuilder, output: string): string; +} diff --git a/examples/jsm/nodes/inputs/TextureNode.d.ts b/examples/jsm/nodes/inputs/TextureNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d7ded950112e8b347df244ea873400dfb947b40 --- /dev/null +++ b/examples/jsm/nodes/inputs/TextureNode.d.ts @@ -0,0 +1,23 @@ +import { + Matrix4, + Texture +} from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { Node } from '../core/Node'; +import { UVNode } from '../accessors/UVNode'; + +export class TextureNode extends InputNode { + constructor(value: Texture, uv?: UVNode, bias?: Node, project?: boolean); + + value: Matrix4; + uv: UVNode; + bias: Matrix4; + project: boolean; + nodeType: string; + + getTexture(builder: NodeBuilder, output: string): string; + generate(builder: NodeBuilder, output: string): string; + copy(source: TextureNode): this; +} diff --git a/examples/jsm/nodes/inputs/Vector2Node.d.ts b/examples/jsm/nodes/inputs/Vector2Node.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2da6bca22598ddcb820ad48f9de6a389aaf88ff --- /dev/null +++ b/examples/jsm/nodes/inputs/Vector2Node.d.ts @@ -0,0 +1,14 @@ +import { Vector2 } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class Vector2Node extends InputNode { + constructor(x: Vector2 | number, y?: number); + + value: Vector2; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: Vector2Node): this; +} diff --git a/examples/jsm/nodes/inputs/Vector3Node.d.ts b/examples/jsm/nodes/inputs/Vector3Node.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3cef960cbe05fd5db4e08e51c555c9485237ecfa --- /dev/null +++ b/examples/jsm/nodes/inputs/Vector3Node.d.ts @@ -0,0 +1,14 @@ +import { Vector3 } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class Vector3Node extends InputNode { + constructor(x: Vector3 | number, y?: number, z?: number); + + value: Vector3; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: Vector3Node): this; +} diff --git a/examples/jsm/nodes/inputs/Vector4Node.d.ts b/examples/jsm/nodes/inputs/Vector4Node.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..176acb24c2eeaeb4f96728119eb5e59f2a64fcc8 --- /dev/null +++ b/examples/jsm/nodes/inputs/Vector4Node.d.ts @@ -0,0 +1,14 @@ +import { Vector4 } from '../../../../src/Three'; + +import { InputNode } from '../core/InputNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class Vector4Node extends InputNode { + constructor(x: Vector4 | number, y?: number, z?: number, w?: number); + + value: Vector4; + nodeType: string; + + generateReadonly(builder: NodeBuilder, output: string, uuid?: string, type?: string, ns?: string, needsUpdate?: boolean): string; + copy(source: Vector4Node): this; +} diff --git a/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..729c17d86c0c43ee36b9ea506a97d9b771d48172 --- /dev/null +++ b/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts @@ -0,0 +1,5 @@ +import { NodeMaterial } from './NodeMaterial'; + +export class MeshStandardNodeMaterial extends NodeMaterial { + constructor(); +} \ No newline at end of file diff --git a/examples/jsm/nodes/materials/NodeMaterial.d.ts b/examples/jsm/nodes/materials/NodeMaterial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2b50eedb53ac3937e0db2b4732525587efa984e --- /dev/null +++ b/examples/jsm/nodes/materials/NodeMaterial.d.ts @@ -0,0 +1,32 @@ +import { + ShaderMaterial, + WebGLRenderer +} from '../../../../src/Three'; + +import { NodeBuilder } from '../core/NodeBuilder'; +import { NodeFrame } from '../core/NodeFrame'; +import { StandardNode } from './nodes/StandardNode'; +import { PropertyNode } from '../inputs/PropertyNode'; +import { MeshStandardNode } from './nodes/MeshStandardNode'; +import { RawNode } from './nodes/RawNode'; + +export interface NodeMaterialBuildParams { + builder?: NodeBuilder; + renderer?: WebGLRenderer; +} + +export class NodeMaterial extends ShaderMaterial { + constructor(vertex: MeshStandardNode, fragment: MeshStandardNode); + + vertex: MeshStandardNode | RawNode; + fragment: MeshStandardNode | RawNode; + + updaters: object[]; + + isNodeMaterial: boolean; + properties: object; + + updateFrame(frame: NodeFrame): void; + build(params?: NodeMaterialBuildParams): this; + copy(source: NodeMaterial): this; +} diff --git a/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts b/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f66024dfc2b2afc6ffd0002b6c1120a37b4ff70 --- /dev/null +++ b/examples/jsm/nodes/materials/PhongNodeMaterial.d.ts @@ -0,0 +1,5 @@ +import { NodeMaterial } from './NodeMaterial'; + +export class PhongNodeMaterial extends NodeMaterial { + constructor(); +} \ No newline at end of file diff --git a/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts b/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4708fac015af61c4645ad83d1581cc653fb947dd --- /dev/null +++ b/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts @@ -0,0 +1,5 @@ +import { NodeMaterial } from './NodeMaterial'; + +export class SpriteNodeMaterial extends NodeMaterial { + constructor(); +} diff --git a/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts b/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..55a335138b1e7232b1c720d0ebdd568570c57c7d --- /dev/null +++ b/examples/jsm/nodes/materials/StandardNodeMaterial.d.ts @@ -0,0 +1,5 @@ +import { NodeMaterial } from './NodeMaterial'; + +export class StandardNodeMaterial extends NodeMaterial { + constructor(); +} diff --git a/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts b/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df79f396d9c31ee5746ce32ff20f75450732c17f --- /dev/null +++ b/examples/jsm/nodes/materials/nodes/MeshStandardNode.d.ts @@ -0,0 +1,28 @@ +import { + Color, + Vector2 +} from '../../../../../src/Three'; + +import { NodeBuilder } from '../../core/NodeBuilder'; +import { StandardNode } from './StandardNode'; +import { PropertyNode } from "../../inputs/PropertyNode"; + +export class MeshStandardNode extends StandardNode { + constructor(value: Node); + + properties: { + color: Color; + roughness: number; + metalness: number; + normalScale: Vector2; + } + + inputs: { + color: PropertyNode + roughness: PropertyNode + metalness: PropertyNode + normalScale: PropertyNode + } + + build(builder: NodeBuilder): string; +} diff --git a/examples/jsm/nodes/materials/nodes/PhongNode.d.ts b/examples/jsm/nodes/materials/nodes/PhongNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5771707329fb75fc3fa5a371a5c48671013775aa --- /dev/null +++ b/examples/jsm/nodes/materials/nodes/PhongNode.d.ts @@ -0,0 +1,16 @@ +import { NodeBuilder } from '../../core/NodeBuilder'; +import { Node } from '../../core/Node'; +import { ColorNode } from '../../inputs/ColorNode'; +import { FloatNode } from '../../inputs/FloatNode'; + +export class PhongNode extends Node { + constructor(value: Node); + + color: ColorNode; + specular: ColorNode; + shininess: FloatNode; + nodeType: string; + + build(builder: NodeBuilder): string; + copy(source: PhongNode): this; +} diff --git a/examples/jsm/nodes/materials/nodes/RawNode.d.ts b/examples/jsm/nodes/materials/nodes/RawNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a1f19fedc5ac1129ceb11872bc4b9a91f14dc5c --- /dev/null +++ b/examples/jsm/nodes/materials/nodes/RawNode.d.ts @@ -0,0 +1,12 @@ +import { NodeBuilder } from '../../core/NodeBuilder'; +import { Node } from '../../core/Node'; + +export class RawNode extends Node { + constructor(value: Node); + + value: Node; + nodeType: string; + + generate(builder: NodeBuilder): string; + copy(source: RawNode): this; +} \ No newline at end of file diff --git a/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts b/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a43c27d28216e80d06414defd9044e300a1b4fc3 --- /dev/null +++ b/examples/jsm/nodes/materials/nodes/SpriteNode.d.ts @@ -0,0 +1,14 @@ +import { NodeBuilder } from '../../core/NodeBuilder'; +import { Node } from '../../core/Node'; +import { ColorNode } from '../../inputs/ColorNode'; + +export class SpriteNode extends Node { + constructor(value: Node); + + color: ColorNode; + spherical: true; + nodeType: string; + + build(builder: NodeBuilder): string; + copy(source: SpriteNode): this; +} diff --git a/examples/jsm/nodes/materials/nodes/StandardNode.d.ts b/examples/jsm/nodes/materials/nodes/StandardNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba718ce8494819c4157d4f11099e5281c784384b --- /dev/null +++ b/examples/jsm/nodes/materials/nodes/StandardNode.d.ts @@ -0,0 +1,17 @@ +import { NodeBuilder } from '../../core/NodeBuilder'; +import { Node } from '../../core/Node'; +import { ColorNode } from '../../inputs/ColorNode'; +import { FloatNode } from '../../inputs/FloatNode'; + +export class StandardNode extends Node { + constructor(); + + color: ColorNode; + roughness: FloatNode; + metalness: FloatNode; + nodeType: string; + + build(builder: NodeBuilder): string; + copy(source: StandardNode): this; + +} diff --git a/examples/jsm/nodes/math/CondNode.d.ts b/examples/jsm/nodes/math/CondNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2d5cf1b0ef4110aa1de080c13c9a82cea3981ea --- /dev/null +++ b/examples/jsm/nodes/math/CondNode.d.ts @@ -0,0 +1,25 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { Node } from '../core/Node'; + +export class CondNode extends TempNode { + constructor(a: Node, b: Node, op: string, ifNode: Node, elseNode: Node); + + a: Node; + b: Node; + op: string; + ifNode: Node; + elseNode: Node; + nodeType: string; + + getCondType(builder: NodeBuilder): string; + generate(builder: NodeBuilder, output: string): string; + copy(source: CondNode): this; + + static EQUAL: string; + static NOT_EQUAL: string; + static GREATER: string; + static GREATER_EQUAL: string; + static LESS: string; + static LESS_EQUAL: string; +} diff --git a/examples/jsm/nodes/math/MathNode.d.ts b/examples/jsm/nodes/math/MathNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..91601e83f235231b0042c32087f4c817d639d8cd --- /dev/null +++ b/examples/jsm/nodes/math/MathNode.d.ts @@ -0,0 +1,58 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { Node } from '../core/Node'; + +export class MathNode extends TempNode { + constructor(a: Node, bOrMethod: Node | string, cOrMethod?: Node | string, method?: string); + + a: Node; + b: Node | string | undefined; + c: Node | string | undefined; + method: string; + nodeType: string; + + getNumInputs(builder: NodeBuilder): number; + getInputType(builder: NodeBuilder): string; + generate(builder: NodeBuilder, output: string): string; + copy(source: MathNode): this; + + static RAD: string; + static DEG: string; + static EXP: string; + static EXP2: string; + static LOG: string; + static LOG2: string; + static SQRT: string; + static INV_SQRT: string; + static FLOOR: string; + static CEIL: string; + static NORMALIZE: string; + static SATURATE: string; + static SIN: string; + static COS: string; + static TAN: string; + static ASIN: string; + static ACOS: string; + static ARCTAN: string; + static ABS: string; + static SIGN: string; + static LENGTH: string; + static NEGATE: string; + static INVERT: string; + + static MIN: string; + static MAX: string; + static MOD: string; + static STEP: string; + static REFLECT: string; + static DISTANCE: string; + static DOT: string; + static CROSS: string; + static POW: string; + + static MIX: string; + static CLAMP: string; + static REFRACT: string; + static SMOOTHSTEP: string; + static FACEFORWARD: string; +} diff --git a/examples/jsm/nodes/math/OperatorNode.d.ts b/examples/jsm/nodes/math/OperatorNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f15c00e9ccc52fcf077472737d875ab8f81094d5 --- /dev/null +++ b/examples/jsm/nodes/math/OperatorNode.d.ts @@ -0,0 +1,19 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { Node } from '../core/Node'; + +export class OperatorNode extends TempNode { + constructor(a: Node, b: Node, op: string); + + a: Node; + b: Node; + op: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: OperatorNode): this; + + static ADD: string; + static SUB: string; + static MUL: string; + static DIV: string; +} diff --git a/examples/jsm/nodes/misc/BumpMapNode.d.ts b/examples/jsm/nodes/misc/BumpMapNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..53d25827d87ddb39bf2662027550a95b0bb7a942 --- /dev/null +++ b/examples/jsm/nodes/misc/BumpMapNode.d.ts @@ -0,0 +1,23 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FloatNode } from '../inputs/FloatNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { TextureNode } from '../inputs/TextureNode'; + +export class BumpMapNode extends TempNode { + constructor(value: TextureNode, scale?: FloatNode); + + value: TextureNode; + scale: FloatNode; + toNormalMap: boolean; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: BumpMapNode): this; + + static Nodes: { + dHdxy_fwd: FunctionNode; + perturbNormalArb: FunctionNode; + bumpToNormal: FunctionNode; + } +} diff --git a/examples/jsm/nodes/misc/NormalMapNode.d.ts b/examples/jsm/nodes/misc/NormalMapNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..449b65f85bc5e2f8c1c4804b08ba3a7a6c4edff1 --- /dev/null +++ b/examples/jsm/nodes/misc/NormalMapNode.d.ts @@ -0,0 +1,21 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FunctionNode } from '../core/FunctionNode'; +import { TextureNode } from '../inputs/TextureNode'; +import { Vector2Node } from '../inputs/Vector2Node'; + +export class NormalMapNode extends TempNode { + constructor(value: TextureNode, scale?: Vector2Node); + + value: TextureNode; + scale: Vector2Node; + toNormalMap: boolean; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: NormalMapNode): this; + + static Nodes: { + perturbNormal2Arb: FunctionNode; + } +} diff --git a/examples/jsm/nodes/misc/TextureCubeNode.d.ts b/examples/jsm/nodes/misc/TextureCubeNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a092c8622c27a50f8058ad4fc8fb3bf496d785b3 --- /dev/null +++ b/examples/jsm/nodes/misc/TextureCubeNode.d.ts @@ -0,0 +1,23 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { TextureNode } from '../inputs/TextureNode'; +import { FloatNode } from '../inputs/FloatNode'; +import { TextureCubeUVNode } from './TextureCubeUVNode'; + +export class TextureCubeNode extends TempNode { + constructor(value: TextureNode, textureSize?: FloatNode); + + value: TextureNode; + textureSize: FloatNode; + radianceCache: { + uv: TextureCubeUVNode + }; + irradianceCache: { + uv: TextureCubeUVNode + }; + nodeType: string; + + generateTextureCubeUV(builder: NodeBuilder, output: string): string; + generate(builder: NodeBuilder, output: string): string; + +} diff --git a/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts b/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..3982c4c0994903e94820c3ccce898de0c261f1b3 --- /dev/null +++ b/examples/jsm/nodes/misc/TextureCubeUVNode.d.ts @@ -0,0 +1,24 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FloatNode } from '../inputs/FloatNode'; +import { StructNode } from '../core/StructNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { BlinnExponentToRoughnessNode } from '../bsdfs/BlinnExponentToRoughnessNode'; +import { Node } from '../core/Node'; + +export class TextureCubeUVNode extends TempNode { + constructor(uv: Node, textureSize: FloatNode, blinnExponentToRoughness: BlinnExponentToRoughnessNode); + + uv: Node; + textureSize: FloatNode; + blinnExponentToRoughness: BlinnExponentToRoughnessNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + + static Nodes: { + TextureCubeUVData: StructNode; + textureCubeUV: FunctionNode; + } + +} diff --git a/examples/jsm/nodes/postprocessing/NodePass.d.ts b/examples/jsm/nodes/postprocessing/NodePass.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..82cc77de85d078b66f6a0d360e37928808e1c966 --- /dev/null +++ b/examples/jsm/nodes/postprocessing/NodePass.d.ts @@ -0,0 +1,16 @@ +import { NodeMaterial } from './NodeMaterial'; +import { ShaderPass } from '../../postprocessing/ShaderPass'; +import { ScreenNode } from '../inputs/ScreenNode'; + +export class NodePass extends ShaderPass { + constructor(); + + name: string; + uuid: string; + userData: object; + input: ScreenNode; + needsUpdate: boolean; + + copy(source: NodePass): this; + toJSON(meta?: object | string): object; +} \ No newline at end of file diff --git a/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts b/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2c21cfe6eeff7a67cf73ceee798bd00e19dba3c --- /dev/null +++ b/examples/jsm/nodes/postprocessing/NodePostProcessing.d.ts @@ -0,0 +1,33 @@ +import { + Camera, + Mesh, + OrthographicCamera, + Scene, + WebGLRenderer, + WebGLRenderTarget, +} from '../../../../src/Three'; + +import { ScreenNode } from '../inputs/ScreenNode'; +import { NodeMaterial } from '../materials/NodeMaterial'; +import { NodeFrame } from '../core/NodeFrame'; + +export class NodePostProcessing { + constructor(renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget); + + renderer: WebGLRenderer; + renderTarget: WebGLRenderTarget; + + output: ScreenNode; + material: NodeMaterial + + camera: OrthographicCamera; + scene: Scene; + + quad: Mesh; + needsUpdate: boolean; + + render(scene: Scene, camera: Camera, frame: NodeFrame): void; + setSize(width: number, height: number): void; + copy(source: NodePostProcessing): this; + toJSON(meta?: object | string): object; +} \ No newline at end of file diff --git a/examples/jsm/nodes/procedural/CheckerNode.d.ts b/examples/jsm/nodes/procedural/CheckerNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..82c1ff5d00d548bcbbf231ca245addb2a948d4cd --- /dev/null +++ b/examples/jsm/nodes/procedural/CheckerNode.d.ts @@ -0,0 +1,19 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FunctionNode } from '../core/FunctionNode'; +import { UVNode } from '../accessors/UVNode'; +import { UVTransformNode } from '../utils/UVTransformNode'; + +export class CheckerNode extends TempNode { + constructor(uv?: UVNode | UVTransformNode); + + uv: UVNode | UVTransformNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: CheckerNode): this; + + static Nodes: { + checker: FunctionNode; + }; +} diff --git a/examples/jsm/nodes/procedural/NoiseNode.d.ts b/examples/jsm/nodes/procedural/NoiseNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..343484765fef8c75ae07b593aa46a250af8827db --- /dev/null +++ b/examples/jsm/nodes/procedural/NoiseNode.d.ts @@ -0,0 +1,19 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { FunctionNode } from '../core/FunctionNode'; +import { UVNode } from '../accessors/UVNode'; +import { UVTransformNode } from '../utils/UVTransformNode'; + +export class NoiseNode extends TempNode { + constructor(uv?: UVNode | UVTransformNode); + + uv: UVNode | UVTransformNode; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: NoiseNode): this; + + static Nodes: { + snoise: FunctionNode; + }; +} diff --git a/examples/jsm/nodes/utils/BypassNode.d.ts b/examples/jsm/nodes/utils/BypassNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba0fd3516c68cfb8307979d353333ef5747b5dff --- /dev/null +++ b/examples/jsm/nodes/utils/BypassNode.d.ts @@ -0,0 +1,13 @@ +import { Node } from '../core/Node'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class BypassNode extends Node { + constructor(code: Node, value?: Node); + + code: Node; + value: Node | undefined; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: BypassNode): this; +} diff --git a/examples/jsm/nodes/utils/ColorSpaceNode.d.ts b/examples/jsm/nodes/utils/ColorSpaceNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad50f42dcbda033cff1eeb36d9fbf6d62c9cff80 --- /dev/null +++ b/examples/jsm/nodes/utils/ColorSpaceNode.d.ts @@ -0,0 +1,57 @@ +import { Node } from '../core/Node'; +import { TempNode } from '../core/TempNode'; +import { FunctionNode } from '../core/FunctionNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class ColorSpaceNode extends TempNode { + constructor(input: Node, method?: string); + + input: Node; + method: string | undefined; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + fromEncoding(encoding: number); + fromDecoding(encoding: number); + copy(source: ColorSpaceNode): this; + + static Nodes: { + LinearToLinear: FunctionNode; + GammaToLinear: FunctionNode; + LinearToGamma: FunctionNode; + sRGBToLinear: FunctionNode; + LinearTosRGB: FunctionNode; + RGBEToLinear: FunctionNode; + LinearToRGBE: FunctionNode; + RGBMToLinear: FunctionNode; + LinearToRGBM: FunctionNode; + RGBDToLinear: FunctionNode; + LinearToRGBD: FunctionNode; + cLogLuvM: FunctionNode; + LinearToLogLuv: FunctionNode; + cLogLuvInverseM: FunctionNode; + LogLuvToLinear: FunctionNode; + }; + + static LINEAR_TO_LINEAR: string; + + static GAMMA_TO_LINEAR: string; + static LINEAR_TO_GAMMA: string; + + static SRGB_TO_LINEAR: string; + static LINEAR_TO_SRGB: string; + + static RGBE_TO_LINEAR: string; + static LINEAR_TO_RGBE: string; + + static RGBM_TO_LINEAR: string; + static LINEAR_TO_RGBM: string; + + static RGBD_TO_LINEAR: string; + static LINEAR_TO_RGBD: string; + + static LINEAR_TO_LOG_LUV: string; + static LOG_LUV_TO_LINEAR: string; + + static getEncodingComponents(encoding: number): any[]; +} diff --git a/examples/jsm/nodes/utils/JoinNode.d.ts b/examples/jsm/nodes/utils/JoinNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a0034e360d8ece83b150600bb8c5e770988ea0d7 --- /dev/null +++ b/examples/jsm/nodes/utils/JoinNode.d.ts @@ -0,0 +1,16 @@ +import { TempNode } from '../core/TempNode'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class JoinNode extends TempNode { + constructor(x: Node, y: Node, z?: Node, w?: Node); + + x: Node; + y: Node; + z: Node | undefined; + w: Node | undefined; + nodeType: string; + + getNumElements(): number; + generate(builder: NodeBuilder, output: string): string; + copy(source: JoinNode): this; +} diff --git a/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts b/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad6713815a9dc145d3a55b376bb06f710fd6c83e --- /dev/null +++ b/examples/jsm/nodes/utils/MaxMIPLevelNode.d.ts @@ -0,0 +1,11 @@ +import { FloatNode } from '../inputs/FloatNode'; +import { Node } from '../core/Node'; + +export class MaxMIPLevelNode extends FloatNode { + constructor(texture: Node); + + texture: Node; + maxMIPLevel: number; + nodeType: string; + value: number; +} diff --git a/examples/jsm/nodes/utils/SwitchNode.d.ts b/examples/jsm/nodes/utils/SwitchNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4247e4e517cd37b6cd6b0593fc84a048cb65e689 --- /dev/null +++ b/examples/jsm/nodes/utils/SwitchNode.d.ts @@ -0,0 +1,13 @@ +import { Node } from '../core/Node'; +import { NodeBuilder } from '../core/NodeBuilder'; + +export class SwitchNode extends Node { + constructor(node: Node, components?: string); + + node: Node; + components: string; + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + copy(source: SwitchNode): this; +} diff --git a/examples/jsm/nodes/utils/TimerNode.d.ts b/examples/jsm/nodes/utils/TimerNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e9053e4af81f50087d4295bfdcdc88f11f82d6ce --- /dev/null +++ b/examples/jsm/nodes/utils/TimerNode.d.ts @@ -0,0 +1,19 @@ +import { NodeFrame } from '../core/NodeFrame'; +import { FloatNode } from '../inputs/FloatNode'; + +export class TimerNode extends FloatNode { + constructor(scale?: number, scope?: string, timeScale?: boolean); + + scale: number; + scope: string; + timeScale: boolean; + nodeType: string; + + getUnique(): boolean; + updateFrame(frame: NodeFrame): void; + copy(source: TimerNode): this; + + static GLOBAL: string; + static LOCAL: string; + static DELTA: string; +} diff --git a/examples/jsm/nodes/utils/UVTransformNode.d.ts b/examples/jsm/nodes/utils/UVTransformNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..82bbc49311275bc4240953f730bc4b3b6c78cde5 --- /dev/null +++ b/examples/jsm/nodes/utils/UVTransformNode.d.ts @@ -0,0 +1,19 @@ +import { ExpressionNode } from '../core/ExpressionNode'; +import { NodeBuilder } from '../core/NodeBuilder'; +import { Matrix3Node } from '../inputs/Matrix3Node'; +import { UVNode } from '../accessors/UVNode'; + +export class UVTransformNode extends ExpressionNode { + constructor(uv?: UVNode, position?: Matrix3Node); + + uv: UVNode; + position: Matrix3Node; + + nodeType: string; + + generate(builder: NodeBuilder, output: string): string; + setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx?: number, cy?: number): void; + copy(source: UVTransformNode): this; + +} + \ No newline at end of file diff --git a/examples/jsm/nodes/utils/VelocityNode.d.ts b/examples/jsm/nodes/utils/VelocityNode.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..df73b15ab23998f41b9c2875d4a3191c8c565b95 --- /dev/null +++ b/examples/jsm/nodes/utils/VelocityNode.d.ts @@ -0,0 +1,32 @@ +import { + Object3D, + Vector3 +} from '../../../../src/Three'; + +import { NodeFrame } from '../core/NodeFrame'; +import { Vector3Node } from '../inputs/Vector3Node'; + +export interface VelocityNodeParams { + damping: number; + spring: number; + type: string; +} + +export class VelocityNode extends Vector3Node { + constructor(target: Object3D, params?: VelocityNodeParams); + + velocity: Vector3; + moment: Vector3 | undefined; + speed: Vector3 | undefined; + springVelocity: Vector3 | undefined; + lastVelocity: Vector3 | undefined; + + nodeType: string; + + setParams(params: VelocityNodeParams): void; + setTarget(target: Object3D): void; + updateFrameVelocity(frame: NodeFrame): void; + updateFrame(frame: NodeFrame): void; + copy(source: VelocityNode): this; + +}