Skip to content

Commit

Permalink
MeshBasicNodeMaterial: Refactor env map support. (#1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 authored Jul 21, 2024
1 parent a30339b commit 65a44ed
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions types/three/src/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ export { compute, default as ComputeNode } from "./gpgpu/ComputeNode.js";
// lighting
export { default as AnalyticLightNode } from "./lighting/AnalyticLightNode.js";
export { default as AONode } from "./lighting/AONode.js";
export { default as BasicEnvironmentNode } from "./lighting/BasicEnvironmentNode.js";
export { default as EnvironmentNode } from "./lighting/EnvironmentNode.js";
export { default as HemisphereLightNode } from "./lighting/HemisphereLightNode.js";
export { default as IrradianceNode } from "./lighting/IrradianceNode.js";
Expand Down
7 changes: 7 additions & 0 deletions types/three/src/nodes/functions/BasicLightingModel.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import LightingModel from "../core/LightingModel.js";

declare class BasicLightingModel extends LightingModel {
constructor();
}

export default BasicLightingModel;
4 changes: 2 additions & 2 deletions types/three/src/nodes/functions/PhongLightingModel.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import LightingModel from "../core/LightingModel.js";
import BasicLightingModel from "./BasicLightingModel.js";

export default class PhongLightingModel extends LightingModel {
export default class PhongLightingModel extends BasicLightingModel {
specular: boolean;

constructor(specular?: boolean);
Expand Down
10 changes: 10 additions & 0 deletions types/three/src/nodes/lighting/BasicEnvironmentNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Node from "../core/Node.js";
import LightingNode from "./LightingNode.js";

declare class BasicEnvironmentNode extends LightingNode {
envNode: Node | null;

constructor(envNode?: Node | null);
}

export default BasicEnvironmentNode;
2 changes: 2 additions & 0 deletions types/three/src/nodes/lighting/LightingNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Node from "../core/Node.js";

export default abstract class LightingNode extends Node {
readonly isLightingNode: true;

constructor();
}
2 changes: 1 addition & 1 deletion types/three/src/nodes/materials/NodeMaterial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default class NodeMaterial extends Material {
setupDiffuseColor(builder: NodeBuilder): void;
setupVariants(builder: NodeBuilder): void;
setupNormal(builder: NodeBuilder): void;
getEnvNode(builder: NodeBuilder): Node | null;
setupEnvironment(builder: NodeBuilder): Node | null;
setupLights(builder: NodeBuilder): LightsNode;
setupLightingModel(builder: NodeBuilder): LightingModel;
setupLighting(builder: NodeBuilder): Node;
Expand Down

0 comments on commit 65a44ed

Please sign in to comment.