Nothing Special   »   [go: up one dir, main page]

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

normalScale is missing number as a type #3381

Open
verekia opened this issue Oct 23, 2024 · 0 comments
Open

normalScale is missing number as a type #3381

verekia opened this issue Oct 23, 2024 · 0 comments

Comments

@verekia
Copy link
Contributor
verekia commented Oct 23, 2024

normalScale can be used with numbers, it works correctly. But the type doesn't allow numbers:

const Test = () => (
  <mesh>
    <boxGeometry />
    <meshStandardMaterial
      color="red"
      aoMapIntensity={2}
      bumpScale={2}
      roughness={2}
      alphaTest={2}
      lightMapIntensity={2}
      displacementBias={2}
      displacementScale={2}
      normalScale={2}
      ^^^^^^^^^^^^ Type number is not assignable to type Vector2
    />
  </mesh>
)
Type 'number' is not assignable to type 'Vector2'.ts(2322)
MeshStandardMaterial.d.ts(138, 5): The expected type comes from property 'normalScale' which is declared here on type 'ExtendedColors<Overwrite<Partial<MeshStandardMaterial>, NodeProps<MeshStandardMaterial, [MeshStandardMaterialParameters]>>>'
⚠ Error (TS2322)  | 
Type number is not assignable to type Vector2
(property) normalScale?: Vector2 | undefined
@verekia verekia closed this as completed Dec 6, 2024
@verekia verekia reopened this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant