Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshStandardMaterial normalScale wrong typing #16532

Closed
2 of 12 tasks
michelmoretti opened this issue May 23, 2019 · 3 comments · Fixed by #16533
Closed
2 of 12 tasks

MeshStandardMaterial normalScale wrong typing #16532

michelmoretti opened this issue May 23, 2019 · 3 comments · Fixed by #16533
Labels

Comments

@michelmoretti
Copy link

Description of the problem

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?

Three.js version
  • Dev
  • [x ] r104
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)
@Mugen87
Copy link
Collaborator

Mugen87 commented May 23, 2019

Should be okay now 👍

@michelmoretti
Copy link
Author

Yes now everything is ok. Do you know why if I "npm install three" the file is not yet fixed ?

@Mugen87
Copy link
Collaborator

Mugen87 commented May 23, 2019

The change is not in production yet. You have to wait for the next release (R105) at the end of the month.

@mrdoob mrdoob added Bug and removed Bug (easy) labels Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants