diff --git a/examples-testing/index.js b/examples-testing/index.js index 874bf5596..198d5349d 100644 --- a/examples-testing/index.js +++ b/examples-testing/index.js @@ -73,6 +73,7 @@ const exceptionList = [ 'webgpu_lines_fat', 'webgpu_loader_materialx', 'webgpu_materials', + 'webgpu_materials_matcap', 'webgpu_materials_sss', 'webgpu_materialx_noise', 'webgpu_multiple_rendertargets', diff --git a/three.js b/three.js index 641d57f42..f2766a0df 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit 641d57f4276a731d55b33e57d4c7a5d55efef5d7 +Subproject commit f2766a0dfc47a790cd64dec6f9b7132d6fee9fa8 diff --git a/types/three/examples/jsm/nodes/materials/Materials.d.ts b/types/three/examples/jsm/nodes/materials/Materials.d.ts index 027762749..40a0e86ea 100644 --- a/types/three/examples/jsm/nodes/materials/Materials.d.ts +++ b/types/three/examples/jsm/nodes/materials/Materials.d.ts @@ -1,5 +1,6 @@ export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js"; export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js"; +export { default as MeshMatcapNodeMaterial } from "./MeshMatcapNodeMaterial.js"; export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js"; export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js"; export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js"; diff --git a/types/three/examples/jsm/nodes/materials/MeshMatcapNodeMaterial.d.ts b/types/three/examples/jsm/nodes/materials/MeshMatcapNodeMaterial.d.ts new file mode 100644 index 000000000..0cabd1c2c --- /dev/null +++ b/types/three/examples/jsm/nodes/materials/MeshMatcapNodeMaterial.d.ts @@ -0,0 +1,28 @@ +import { Color, MeshMatcapMaterialParameters, NormalMapTypes, Texture, Vector2 } from "three"; +import NodeMaterial, { NodeMaterialParameters } from "./NodeMaterial.js"; + +export interface MeshMatcapNodeMaterialParameters extends NodeMaterialParameters, MeshMatcapMaterialParameters { +} + +export default class MeshMatcapNodeMaterial extends NodeMaterial { + readonly isMeshMatcapNodeMaterial: true; + + // Properties from MeshMatcapMaterial + readonly isMeshMatcapMaterial: true; + color: Color; + matcap: Texture | null; + map: Texture | null; + bumpMap: Texture | null; + bumpScale: number; + normalMap: Texture | null; + normalMapType: NormalMapTypes; + normalScale: Vector2; + displacementMap: Texture | null; + displacementScale: number; + displacementBias: number; + alphaMap: Texture | null; + flatShading: boolean; + fog: boolean; + + constructor(paramters: MeshMatcapNodeMaterialParameters); +} diff --git a/types/three/examples/jsm/nodes/materials/NodeMaterial.d.ts b/types/three/examples/jsm/nodes/materials/NodeMaterial.d.ts index 0d3b8ad40..cb61b7e60 100644 --- a/types/three/examples/jsm/nodes/materials/NodeMaterial.d.ts +++ b/types/three/examples/jsm/nodes/materials/NodeMaterial.d.ts @@ -2,6 +2,7 @@ import { LineBasicMaterial, Material, MeshBasicMaterial, + MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, @@ -20,6 +21,7 @@ import LightsNode from "../lighting/LightsNode.js"; import { ShaderNodeObject } from "../shadernode/ShaderNode.js"; import LineBasicNodeMaterial from "./LineBasicNodeMaterial.js"; import MeshBasicNodeMaterial from "./MeshBasicNodeMaterial.js"; +import MeshMatcapNodeMaterial from "./MeshMatcapNodeMaterial.js"; import MeshNormalNodeMaterial from "./MeshNormalNodeMaterial.js"; import MeshPhongNodeMaterial from "./MeshPhongNodeMaterial.js"; import MeshPhysicalNodeMaterial from "./MeshPhysicalNodeMaterial.js"; @@ -102,6 +104,7 @@ export default class NodeMaterial extends ShaderMaterial { static fromMaterial(material: LineBasicMaterial): LineBasicNodeMaterial; static fromMaterial(material: MeshBasicMaterial): MeshBasicNodeMaterial; + static fromMaterial(material: MeshMatcapMaterial): MeshMatcapNodeMaterial; static fromMaterial(material: MeshNormalMaterial): MeshNormalNodeMaterial; static fromMaterial(material: MeshPhongMaterial): MeshPhongNodeMaterial; static fromMaterial(material: MeshPhysicalMaterial): MeshPhysicalNodeMaterial;