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

CapsuleGeometry: Use correct length property name in parameters. #26405

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

tdanlin
Copy link
Contributor

@tdanlin tdanlin commented Jul 10, 2023

modify this.parameters.height to 'length' cuz it uses data.length in fromJSON().

Description
this problem happens when you try passing a CapsuleGeometry.parameters object to create another capsule using fromJSON(), inside fromJSON(), the 2nd param - length will always be 'undefined' cuz there's no this key - 'length' in CapsuleGeometry.parameters

modify this.parameters.height to 'length' cuz it uses data.length in fromJSON().
this problem happens when you try pass a capsule's parameters to create another capsule using fromJSON()
@github-actions
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
643.4 kB (159.5 kB) 643.4 kB (159.5 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
436.5 kB (105.7 kB) 436.5 kB (105.7 kB) +0 B

@Mugen87 Mugen87 added this to the r155 milestone Jul 10, 2023
@Mugen87 Mugen87 merged commit 28fc642 into mrdoob:dev Jul 10, 2023
@Mugen87 Mugen87 changed the title change key name from 'height' to 'length' in CapsuleGeometry.parameters CapsuleGeometry: Use correct length property name in parameters. Jul 10, 2023
@tdanlin tdanlin deleted the patch-1 branch July 25, 2023 14:24
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