Skip to content

Commit

Permalink
Nodes: Fixes and improvements for reflector and gaussianBlur (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Nov 6, 2024
1 parent 8165a4c commit b2957f2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions types/three/src/nodes/utils/ReflectorNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Camera } from "../../cameras/Camera.js";
import { Object3D } from "../../core/Object3D.js";
import { RenderTarget } from "../../core/RenderTarget.js";
import TextureNode from "../accessors/TextureNode.js";
import Node from "../core/Node.js";
import { ShaderNodeObject } from "../tsl/TSLCore.js";

export interface ReflectorNodeParameters {
Expand All @@ -11,7 +12,17 @@ export interface ReflectorNodeParameters {
bounces?: boolean | undefined;
}

export default class ReflectorNode extends TextureNode {
declare class ReflectorNode extends TextureNode {
constructor(parameters?: ReflectorNodeParameters);

get reflector(): ReflectorBaseNode;

get target(): Object3D;
}

declare class ReflectorBaseNode extends Node {
textureNode: TextureNode;

target: Object3D;
resolution: number;
generateMipmaps: boolean;
Expand All @@ -20,11 +31,13 @@ export default class ReflectorNode extends TextureNode {
virtualCameras: WeakMap<Camera, Camera>;
renderTargets: WeakMap<Camera, RenderTarget>;

constructor(parameters?: ReflectorNodeParameters);
constructor(textureNode: TextureNode, parameters?: ReflectorNodeParameters);

getVirtualCamera(camera: Camera): Camera;

getRenderTarget(camera: Camera): RenderTarget;
}

export const reflector: (parameters?: ReflectorNodeParameters) => ShaderNodeObject<ReflectorNode>;

export default ReflectorNode;

0 comments on commit b2957f2

Please sign in to comment.