Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshBasicNodeMaterial: Refactor env map support. #1097

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading