Skip to content

Vector3: Fix set z optionality and reflect parameter name#2141

Merged
Methuselah96 merged 2 commits intothree-types:masterfrom
eunjiyun:fix-vector3-set-z-optionality
May 9, 2026
Merged

Vector3: Fix set z optionality and reflect parameter name#2141
Methuselah96 merged 2 commits intothree-types:masterfrom
eunjiyun:fix-vector3-set-z-optionality

Conversation

@eunjiyun
Copy link
Copy Markdown
Contributor

@eunjiyun eunjiyun commented May 7, 2026

Summary

Fix declarations for Vector3.set() and Vector3.reflect().

Evidence

JS implementation:

  • three.js/src/math/Vector3.js:84 (set)
  • three.js/src/math/Vector3.js:922 (reflect)

Declaration:

  • types/three/src/math/Vector3.d.ts:53 (set)
  • types/three/src/math/Vector3.d.ts:219 (reflect)

Observed mismatch:

  • set(): z has a default fallback in JS but is declared as required in the type declaration.
  • reflect(): Parameter name does not match the JS implementation and JSDoc.

Local Check

pnpm test  # failed: unrelated ESLint plugin error

Scope

  • Declaration file only
  • No runtime change
  • Both fixes are isolated to Vector3.d.ts

@eunjiyun eunjiyun changed the title Vector3: Fix set z parameter optionality Vector3: Fix set z optionality and reflect parameter name May 7, 2026
@Methuselah96 Methuselah96 merged commit 7136f4a into three-types:master May 9, 2026
11 of 12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants