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

Plane: Make second set parameter optional. #28150

Closed
wants to merge 1 commit into from

Conversation

Psychpsyo
Copy link
Contributor

Calling Plane.set() without passing a value for constant results in a plane with a constant of undefined.
The docs already say that this parameter should default to 0.

This makes it actually do that.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
674.7 kB (167.2 kB) 674.7 kB (167.2 kB) +2 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
454.1 kB (109.6 kB) 454.1 kB (109.6 kB) +2 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 18, 2024

I'm not sure about this change. A plane definition consists of a normal and constant. It seems inconsistent to just have a default parameter for one of them.

I would rather suggest to updated the docs and remove the comment about the default value (this is a clear mistake). Both set() parameters should be mandatory.

@Mugen87 Mugen87 added this to the r164 milestone Apr 18, 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

Successfully merging this pull request may close these issues.

2 participants