I am working with the 104.0 version of three js and I found an interesting bug to be absolutely solved.
The typing for the normalScale of the MeshStandardMaterial is totally wrong. Here is written that is "number" but that's totally wrong it should be Vector2 like all the types of normalScale.
ES. The types of the phong material for normalScale is a Vector2.
export class MeshPhongMaterial extends Material {
constructor(parameters?: MeshPhongMaterialParameters);
color: Color;
specular: Color;
shininess: number;
....
normalScale: Vector2;
On the other hand, the type for the MeshStandardMaterial:
export class MeshStandardMaterial extends Material {
constructor(parameters?: MeshStandardMaterialParameters);
defines: any;
color: Color;
roughness: number;
metalness: number;
...
normalScale: number;
In fact if I correct the type the file gives me no errors.
Please can you correct this error?
Should be okay now 👍
Yes now everything is ok. Do you know why if I "npm install three" the file is not yet fixed ?
The change is not in production yet. You have to wait for the next release (R105
) at the end of the month.