Skip to content

Commit dfa997c

Browse files
author
Mike Bond
committed
Fix for mixin constructor names
1 parent 5647ebc commit dfa997c

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

packages/dev/core/src/Materials/PBR/openPbrMaterial.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ class OpenPBRMaterialDefinesBase extends UVDefinesMixin(MaterialDefines) {}
207207
* @internal
208208
*/
209209
export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRMaterialDefinesBase) {
210-
public PBR = true;
211-
212210
public NUM_SAMPLES = "0";
213211
public REALTIME_FILTERING = false;
214212
public IBL_CDF_FILTERING = false;
@@ -386,7 +384,6 @@ export class OpenPBRMaterialDefines extends ImageProcessingDefinesMixin(OpenPBRM
386384
public override reset(): void {
387385
super.reset();
388386
this.ALPHATESTVALUE = "0.5";
389-
this.PBR = true;
390387
this.NORMALXYSCALE = true;
391388
}
392389
}
@@ -616,6 +613,12 @@ export class OpenPBRMaterial extends OpenPBRMaterialBase {
616613
// eslint-disable-next-line @typescript-eslint/no-unused-vars
617614
private _coatIor: Property<number> = new Property<number>("coat_ior", 1.5, "vCoatIor", 1, 0);
618615

616+
/**
617+
* Specifies whether the coat roughness is taken from the
618+
* same texture as the coat_weight.
619+
*/
620+
public useCoatRoughnessFromWeightTexture: boolean = false;
621+
619622
/**
620623
* Defines the normal of the material's geometry.
621624
* See OpenPBR's specs for geometry_normal

packages/dev/core/src/Materials/imageProcessing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import type { ColorCurves } from "../Materials/colorCurves";
1010
// export type { Observer } from "../Misc/observable";
1111
// export type { ColorCurves } from "./colorCurves";
1212

13-
type Constructor<T = {}> = new (...args: any[]) => T;
13+
type ImageProcessingMixinConstructor<T = {}> = new (...args: any[]) => T;
1414

1515
/**
1616
* Mixin to add Image processing defines to your material defines
1717
* @internal
1818
*/
19-
export function ImageProcessingMixin<Tbase extends Constructor>(base: Tbase) {
19+
export function ImageProcessingMixin<Tbase extends ImageProcessingMixinConstructor>(base: Tbase) {
2020
return class extends base {
2121
/**
2222
* Constructor for the ImageProcessingMixin.

packages/dev/core/src/Materials/imageProcessingConfiguration.defines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ export interface IImageProcessingConfigurationDefines {
2222
SKIPFINALCOLORCLAMP: boolean;
2323
}
2424

25-
type Constructor<T = {}> = new (...args: any[]) => T;
25+
type ImageProcessingDefinesMixinConstructor<T = {}> = new (...args: any[]) => T;
2626

2727
/**
2828
* Mixin to add Image processing defines to your material defines
2929
* @internal
3030
*/
31-
export function ImageProcessingDefinesMixin<Tbase extends Constructor>(base: Tbase) {
31+
export function ImageProcessingDefinesMixin<Tbase extends ImageProcessingDefinesMixinConstructor>(base: Tbase) {
3232
return class extends base implements IImageProcessingConfigurationDefines {
3333
// Implement all members of IImageProcessingConfigurationDefines here
3434
public IMAGEPROCESSING = false;

packages/dev/core/src/Materials/uv.defines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
type Constructor<T = {}> = new (...args: any[]) => T;
1+
type UVDefinesMixinConstructor<T = {}> = new (...args: any[]) => T;
22

33
/**
44
* Mixin to add UV defines to your material defines
55
* @internal
66
*/
7-
export function UVDefinesMixin<Tbase extends Constructor>(base: Tbase) {
7+
export function UVDefinesMixin<Tbase extends UVDefinesMixinConstructor>(base: Tbase) {
88
return class extends base {
99
public MAINUV1 = false;
1010
public MAINUV2 = false;

0 commit comments

Comments
 (0)