File size: 2,285 Bytes
6cd9596
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { Color } from './../math/Color';
import { Texture } from './../textures/Texture';
import { Vector2 } from './../math/Vector2';
import { MaterialParameters, Material } from './Material';
import { Combine } from '../constants';

export interface MeshPhongMaterialParameters extends MaterialParameters {
  /** geometry color in hexadecimal. Default is 0xffffff. */
  color?: Color | string | number;
  specular?: Color | string | number;
  shininess?: number;
  opacity?: number;
  map?: Texture;
  lightMap?: Texture;
  lightMapIntensity?: number;
  aoMap?: Texture;
  aoMapIntensity?: number;
  emissive?: Color | string | number;
  emissiveIntensity?: number;
  emissiveMap?: Texture;
  bumpMap?: Texture;
  bumpScale?: number;
  normalMap?: Texture;
  normalScale?: Vector2;
  displacementMap?: Texture;
  displacementScale?: number;
  displacementBias?: number;
  specularMap?: Texture;
  alphaMap?: Texture;
  envMap?: Texture;
  combine?: Combine;
  reflectivity?: number;
  refractionRatio?: number;
  wireframe?: boolean;
  wireframeLinewidth?: number;
  wireframeLinecap?: string;
  wireframeLinejoin?: string;
  skinning?: boolean;
  morphTargets?: boolean;
  morphNormals?: boolean;
}

export class MeshPhongMaterial extends Material {
  constructor(parameters?: MeshPhongMaterialParameters);

  color: Color;
  specular: Color;
  shininess: number;
  map: Texture | null;
  lightMap: Texture | null;
  lightMapIntensity: number;
  aoMap: Texture | null;
  aoMapIntensity: number;
  emissive: Color;
  emissiveIntensity: number;
  emissiveMap: Texture | null;
  bumpMap: Texture | null;
  bumpScale: number;
  normalMap: Texture | null;
  normalScale: Vector2;
  displacementMap: Texture | null;
  displacementScale: number;
  displacementBias: number;
  specularMap: Texture | null;
  alphaMap: Texture | null;
  envMap: Texture | null;
  combine: Combine;
  reflectivity: number;
  refractionRatio: number;
  wireframe: boolean;
  wireframeLinewidth: number;
  wireframeLinecap: string;
  wireframeLinejoin: string;
  skinning: boolean;
  morphTargets: boolean;
  morphNormals: boolean;
  /**
   * @deprecated Use {@link MeshStandardMaterial THREE.MeshStandardMaterial} instead.
   */
  metal: boolean;

  setValues(parameters: MeshPhongMaterialParameters): void;
}