diff --git a/examples-testing/changes.patch b/examples-testing/changes.patch index 0575f5a59..ffac3e744 100644 --- a/examples-testing/changes.patch +++ b/examples-testing/changes.patch @@ -7103,6 +7103,19 @@ index 8202430..0926a59 100644 init(); render(); +diff --git a/examples-testing/examples/webgl_loader_gltf_dispersion.ts b/examples-testing/examples/webgl_loader_gltf_dispersion.ts +index d17e066..496142d 100644 +--- a/examples-testing/examples/webgl_loader_gltf_dispersion.ts ++++ b/examples-testing/examples/webgl_loader_gltf_dispersion.ts +@@ -4,7 +4,7 @@ import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; + import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; + import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js'; + +-let camera, scene, renderer; ++let camera: THREE.PerspectiveCamera, scene: THREE.Scene, renderer: THREE.WebGLRenderer; + + init().then(render); + diff --git a/examples-testing/examples/webgl_loader_gltf_instancing.ts b/examples-testing/examples/webgl_loader_gltf_instancing.ts index 5d23e77..b8a6814 100644 --- a/examples-testing/examples/webgl_loader_gltf_instancing.ts diff --git a/three.js b/three.js index 49d26cc57..a7a9996d8 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit 49d26cc571eff13d5492fea8dfb40c08880d4e9a +Subproject commit a7a9996d824f7b4b63cad9abb3dc793cd13a023c diff --git a/types/three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts b/types/three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts index 7569d53db..9d4649e9b 100644 --- a/types/three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +++ b/types/three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts @@ -35,37 +35,45 @@ export default class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { // Properties from MeshPhysicalMaterial readonly isMeshPhysicalMaterial: true; - clearcoat: number; + anisotropyRotation: number; + anisotropyMap: Texture | null; clearcoatMap: Texture | null; clearcoatRoughness: number; clearcoatRoughnessMap: Texture | null; clearcoatNormalScale: Vector2; clearcoatNormalMap: Texture | null; - reflectivity: number; ior: number; - sheen: number; + get reflectivity(): number; + set reflectivity(reflectivity: number); + iridescenceMap: Texture | null; + iridescenceIOR: number; + iridescenceThicknessRange: [number, number]; + iridescenceThicknessMap: Texture | null; sheenColor: Color; sheenColorMap: Texture | null; sheenRoughness: number; sheenRoughnessMap: Texture | null; - transmission: number; transmissionMap: Texture | null; thickness: number; thicknessMap: Texture | null; attenuationDistance: number; attenuationColor: Color; specularIntensity: number; - specularColor: Color; specularIntensityMap: Texture | null; + specularColor: Color; specularColorMap: Texture | null; - iridescenceMap: Texture | null; - iridescenceIOR: number; - iridescence: number; - iridescenceThicknessRange: [number, number]; - iridescenceThicknessMap: Texture | null; - anisotropy?: number; - anisotropyRotation?: number; - anisotropyMap?: Texture | null; + get anisotropy(): number; + set anisotropy(value: number); + get clearcoat(): number; + set clearcoat(value: number); + get iridescence(): number; + set iridescence(value: number); + get dispersion(): number; + set dispersion(value: number); + get sheen(): number; + set sheen(value: number); + get transmission(): number; + set transmission(value: number); constructor(parameters?: MeshPhysicalNodeMaterialParameters); } diff --git a/types/three/src/materials/MeshPhysicalMaterial.d.ts b/types/three/src/materials/MeshPhysicalMaterial.d.ts index 654974bd8..503fe6a6b 100644 --- a/types/three/src/materials/MeshPhysicalMaterial.d.ts +++ b/types/three/src/materials/MeshPhysicalMaterial.d.ts @@ -4,45 +4,47 @@ import { Texture } from "../textures/Texture.js"; import { MeshStandardMaterial, MeshStandardMaterialParameters } from "./MeshStandardMaterial.js"; export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialParameters { - clearcoat?: number | undefined; + anisotropyRotation?: number | undefined; + anisotropyMap?: Texture | null | undefined; + clearcoatMap?: Texture | null | undefined; clearcoatRoughness?: number | undefined; clearcoatRoughnessMap?: Texture | null | undefined; clearcoatNormalScale?: Vector2 | undefined; clearcoatNormalMap?: Texture | null | undefined; - reflectivity?: number | undefined; ior?: number | undefined; - sheen?: number | undefined; + reflectivity?: number | undefined; + + iridescenceMap?: Texture | null | undefined; + iridescenceIOR?: number | undefined; + iridescenceThicknessRange?: [number, number] | undefined; + iridescenceThicknessMap?: Texture | null | undefined; + sheenColor?: ColorRepresentation | undefined; sheenColorMap?: Texture | null | undefined; sheenRoughness?: number | undefined; sheenRoughnessMap?: Texture | null | undefined; - transmission?: number | undefined; transmissionMap?: Texture | null | undefined; thickness?: number | undefined; thicknessMap?: Texture | null | undefined; - attenuationDistance?: number | undefined; attenuationColor?: ColorRepresentation | undefined; specularIntensity?: number | undefined; - specularColor?: ColorRepresentation | undefined; specularIntensityMap?: Texture | null | undefined; + specularColor?: ColorRepresentation | undefined; specularColorMap?: Texture | null | undefined; - iridescenceMap?: Texture | null | undefined; - iridescenceIOR?: number | undefined; - iridescence?: number | undefined; - iridescenceThicknessRange?: [number, number] | undefined; - iridescenceThicknessMap?: Texture | null | undefined; - anisotropy?: number | undefined; - anisotropyRotation?: number | undefined; - anisotropyMap?: Texture | null | undefined; + clearcoat?: number | undefined; + iridescence?: number | undefined; + dispersion?: number | undefined; + sheen?: number | undefined; + transmission?: number | undefined; } export class MeshPhysicalMaterial extends MeshStandardMaterial { @@ -55,20 +57,25 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial { */ readonly isMeshPhysicalMaterial: true; + /** + * @default { 'STANDARD': '', 'PHYSICAL': '' } + */ + defines: { [key: string]: any }; + /** * @default 'MeshPhysicalMaterial' */ type: string; /** - * @default { 'STANDARD': '', 'PHYSICAL': '' } + * @default 0 */ - defines: { [key: string]: any }; + anisotropyRotation?: number; /** - * @default 0 + * @default null */ - clearcoat: number; + anisotropyMap?: Texture | null; /** * @default null @@ -95,20 +102,36 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial { */ clearcoatNormalMap: Texture | null; + /** + * @default 1.5 + */ + ior: number; + /** * @default 0.5 */ - reflectivity: number; + get reflectivity(): number; + set reflectivity(reflectivity: number); /** - * @default 1.5 + * @default null */ - ior: number; + iridescenceMap: Texture | null; /** - * @default 0.0 + * @default 1.3 + */ + iridescenceIOR: number; + + /** + * @default [100, 400] + */ + iridescenceThicknessRange: [number, number]; + + /** + * @default null */ - sheen: number; + iridescenceThicknessMap: Texture | null; /** * @default Color( 0x000000 ) @@ -130,11 +153,6 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial { */ sheenRoughnessMap: Texture | null; - /** - * @default 0 - */ - transmission: number; - /** * @default null */ @@ -165,58 +183,54 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial { */ specularIntensity: number; - /** - * @default Color(1, 1, 1) - */ - specularColor: Color; - /** * @default null */ specularIntensityMap: Texture | null; /** - * @default null + * @default Color(1, 1, 1) */ - specularColorMap: Texture | null; + specularColor: Color; /** * @default null */ - iridescenceMap: Texture | null; - - /** - * @default 1.3 - */ - iridescenceIOR: number; + specularColorMap: Texture | null; /** * @default 0 */ - iridescence: number; + get anisotropy(): number; + set anisotropy(value: number); /** - * @default [100, 400] + * @default 0 */ - iridescenceThicknessRange: [number, number]; + get clearcoat(): number; + set clearcoat(value: number); /** - * @default null + * @default 0 */ - iridescenceThicknessMap: Texture | null; + get iridescence(): number; + set iridescence(value: number); /** * @default 0 */ - anisotropy?: number; + get dispersion(): number; + set dispersion(value: number); /** - * @default 0 + * @default 0.0 */ - anisotropyRotation?: number; + get sheen(): number; + set sheen(value: number); /** - * @default null + * @default 0 */ - anisotropyMap?: Texture | null; + get transmission(): number; + set transmission(value: number); } diff --git a/types/three/src/renderers/webgl/WebGLPrograms.d.ts b/types/three/src/renderers/webgl/WebGLPrograms.d.ts index bb5f7315f..a1f3194f8 100644 --- a/types/three/src/renderers/webgl/WebGLPrograms.d.ts +++ b/types/three/src/renderers/webgl/WebGLPrograms.d.ts @@ -73,6 +73,8 @@ export interface WebGLProgramParameters { clearcoatNormalMap: boolean; clearcoatRoughnessMap: boolean; + dispersion: boolean; + iridescence: boolean; iridescenceMap: boolean; iridescenceThicknessMap: boolean;