提交 d3be96fb 编写于 作者: O Olov

Make Textures nullable in Material type definitions. See #17587

上级 ab18028c
......@@ -8,12 +8,12 @@ import { Combine } from '../constants';
export interface MeshBasicMaterialParameters extends MaterialParameters {
color?: Color | string | number;
opacity?: number;
map?: Texture;
aoMap?: Texture;
map?: Texture | null;
aoMap?: Texture | null;
aoMapIntensity?: number;
specularMap?: Texture;
alphaMap?: Texture;
envMap?: Texture;
specularMap?: Texture | null;
alphaMap?: Texture | null;
envMap?: Texture | null;
combine?: Combine;
reflectivity?: number;
refractionRatio?: number;
......@@ -27,7 +27,7 @@ export interface MeshBasicMaterialParameters extends MaterialParameters {
export class MeshBasicMaterial extends Material {
constructor( parameters?: MeshBasicMaterialParameters );
constructor(parameters?: MeshBasicMaterialParameters);
color: Color;
map: Texture | null;
......@@ -46,6 +46,6 @@ export class MeshBasicMaterial extends Material {
skinning: boolean;
morphTargets: boolean;
setValues( parameters: MeshBasicMaterialParameters ): void;
setValues(parameters: MeshBasicMaterialParameters): void;
}
......@@ -4,7 +4,7 @@ import { Texture } from './../textures/Texture';
export interface MeshDepthMaterialParameters extends MaterialParameters {
depthPacking?: DepthPackingStrategies;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
wireframe?: boolean;
......
......@@ -6,7 +6,7 @@ export interface MeshDistanceMaterialParameters extends MaterialParameters {
referencePosition?: Vector3;
nearDistance?: number;
farDistance?: number;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
}
......
......@@ -7,15 +7,15 @@ export interface MeshLambertMaterialParameters extends MaterialParameters {
color?: Color | string | number;
emissive?: Color | string | number;
emissiveIntensity?: number;
emissiveMap?: Texture;
map?: Texture;
lightMap?: Texture;
emissiveMap?: Texture | null;
map?: Texture | null;
lightMap?: Texture | null;
lightMapIntensity?: number;
aoMap?: Texture;
aoMap?: Texture | null;
aoMapIntensity?: number;
specularMap?: Texture;
alphaMap?: Texture;
envMap?: Texture;
specularMap?: Texture | null;
alphaMap?: Texture | null;
envMap?: Texture | null;
combine?: Combine;
reflectivity?: number;
refractionRatio?: number;
......
......@@ -7,17 +7,17 @@ import { NormalMapTypes } from '../constants';
export interface MeshMatcapMaterialParameters extends MaterialParameters {
color?: Color | string | number;
matcap?: Texture;
map?: Texture;
bumpMap?: Texture;
matcap?: Texture | null;
map?: Texture | null;
bumpMap?: Texture | null;
bumpScale?: number;
normalMap?: Texture;
normalMap?: Texture | null;
normalMapType?: NormalMapTypes;
normalScale?: Vector2;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
alphaMap?: Texture;
alphaMap?: Texture | null;
skinning?: boolean;
morphTargets?: boolean;
morphNormals?: boolean;
......
......@@ -5,12 +5,12 @@ import { NormalMapTypes } from '../constants';
export interface MeshNormalMaterialParameters extends MaterialParameters {
bumpMap?: Texture;
bumpMap?: Texture | null;
bumpScale?: number;
normalMap?: Texture;
normalMap?: Texture | null;
normalMapType?: NormalMapTypes;
normalScale?: Vector2;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
wireframe?: boolean;
......
......@@ -10,25 +10,25 @@ export interface MeshPhongMaterialParameters extends MaterialParameters {
specular?: Color | string | number;
shininess?: number;
opacity?: number;
map?: Texture;
lightMap?: Texture;
map?: Texture | null;
lightMap?: Texture | null;
lightMapIntensity?: number;
aoMap?: Texture;
aoMap?: Texture | null;
aoMapIntensity?: number;
emissive?: Color | string | number;
emissiveIntensity?: number;
emissiveMap?: Texture;
bumpMap?: Texture;
emissiveMap?: Texture | null;
bumpMap?: Texture | null;
bumpScale?: number;
normalMap?: Texture;
normalMap?: Texture | null;
normalMapType?: NormalMapTypes;
normalScale?: Vector2;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
specularMap?: Texture;
alphaMap?: Texture;
envMap?: Texture;
specularMap?: Texture | null;
alphaMap?: Texture | null;
envMap?: Texture | null;
combine?: Combine;
reflectivity?: number;
refractionRatio?: number;
......
......@@ -15,7 +15,7 @@ export interface MeshPhysicalMaterialParameters
sheen?: Color;
clearcoatNormalScale?: Vector2;
clearcoatNormalMap?: Texture;
clearcoatNormalMap?: Texture | null;
}
export class MeshPhysicalMaterial extends MeshStandardMaterial {
......
......@@ -8,26 +8,26 @@ export interface MeshStandardMaterialParameters extends MaterialParameters {
color?: Color | string | number;
roughness?: number;
metalness?: number;
map?: Texture;
lightMap?: Texture;
map?: Texture | null;
lightMap?: Texture | null;
lightMapIntensity?: number;
aoMap?: Texture;
aoMap?: Texture | null;
aoMapIntensity?: number;
emissive?: Color | string | number;
emissiveIntensity?: number;
emissiveMap?: Texture;
bumpMap?: Texture;
emissiveMap?: Texture | null;
bumpMap?: Texture | null;
bumpScale?: number;
normalMap?: Texture;
normalMap?: Texture | null;
normalMapType?: NormalMapTypes;
normalScale?: Vector2;
displacementMap?: Texture;
displacementMap?: Texture | null;
displacementScale?: number;
displacementBias?: number;
roughnessMap?: Texture;
metalnessMap?: Texture;
alphaMap?: Texture;
envMap?: Texture;
roughnessMap?: Texture | null;
metalnessMap?: Texture | null;
alphaMap?: Texture | null;
envMap?: Texture | null;
envMapIntensity?: number;
refractionRatio?: number;
wireframe?: boolean;
......
......@@ -2,7 +2,7 @@ import { Texture } from './../textures/Texture';
import { MeshPhongMaterialParameters, MeshPhongMaterial } from './MeshPhongMaterial';
export interface MeshToonMaterialParameters extends MeshPhongMaterialParameters {
gradientMap?: Texture;
gradientMap?: Texture | null;
}
export class MeshToonMaterial extends MeshPhongMaterial {
......
......@@ -4,7 +4,7 @@ import { MaterialParameters, Material } from './Material';
export interface SpriteMaterialParameters extends MaterialParameters {
color?: Color | string | number;
map?: Texture;
map?: Texture | null;
rotation?: number;
sizeAttenuation?: boolean;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册