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

Line: Honor last segment of LineLoop in raycast(). #28114

Merged
merged 2 commits into from Apr 17, 2024
Merged

Conversation

zoeeer
Copy link
Contributor

@zoeeer zoeeer commented Apr 11, 2024

Related issue: None

Description

LineLoop did not have it's own raycast() method but inherited it from Line, so the last segment (which connects the last vertex to the first) can never be intersected by raycasting. This update fixes this problem.

Copy link

github-actions bot commented Apr 11, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
674.7 kB (167.1 kB) 674.7 kB (167.2 kB) +4 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) +0 B

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 16, 2024

For reproduction: https://jsfiddle.net/geajLmqp/

src/objects/Line.js Outdated Show resolved Hide resolved
@Mugen87 Mugen87 added this to the r164 milestone Apr 16, 2024
@Mugen87 Mugen87 changed the title Line: implement raycast() method for LineLoop Line: Honor last segment of LineLoop in raycast(). Apr 16, 2024
@Mugen87 Mugen87 merged commit 70e7f55 into mrdoob:dev Apr 17, 2024
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.

None yet

2 participants