diff --git a/types/three/src/nodes/Nodes.d.ts b/types/three/src/nodes/Nodes.d.ts index d2ac90fee..a89d715e8 100644 --- a/types/three/src/nodes/Nodes.d.ts +++ b/types/three/src/nodes/Nodes.d.ts @@ -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"; diff --git a/types/three/src/nodes/functions/BasicLightingModel.d.ts b/types/three/src/nodes/functions/BasicLightingModel.d.ts new file mode 100644 index 000000000..a64fafd44 --- /dev/null +++ b/types/three/src/nodes/functions/BasicLightingModel.d.ts @@ -0,0 +1,7 @@ +import LightingModel from "../core/LightingModel.js"; + +declare class BasicLightingModel extends LightingModel { + constructor(); +} + +export default BasicLightingModel; diff --git a/types/three/src/nodes/functions/PhongLightingModel.d.ts b/types/three/src/nodes/functions/PhongLightingModel.d.ts index dc9b1f17b..5df595269 100644 --- a/types/three/src/nodes/functions/PhongLightingModel.d.ts +++ b/types/three/src/nodes/functions/PhongLightingModel.d.ts @@ -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); diff --git a/types/three/src/nodes/lighting/BasicEnvironmentNode.d.ts b/types/three/src/nodes/lighting/BasicEnvironmentNode.d.ts new file mode 100644 index 000000000..de244562f --- /dev/null +++ b/types/three/src/nodes/lighting/BasicEnvironmentNode.d.ts @@ -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; diff --git a/types/three/src/nodes/lighting/LightingNode.d.ts b/types/three/src/nodes/lighting/LightingNode.d.ts index b8657545a..3e8dd5424 100644 --- a/types/three/src/nodes/lighting/LightingNode.d.ts +++ b/types/three/src/nodes/lighting/LightingNode.d.ts @@ -1,5 +1,7 @@ import Node from "../core/Node.js"; export default abstract class LightingNode extends Node { + readonly isLightingNode: true; + constructor(); } diff --git a/types/three/src/nodes/materials/NodeMaterial.d.ts b/types/three/src/nodes/materials/NodeMaterial.d.ts index 366c947cf..5c1eab399 100644 --- a/types/three/src/nodes/materials/NodeMaterial.d.ts +++ b/types/three/src/nodes/materials/NodeMaterial.d.ts @@ -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;