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

Helpers: Add missing type definitions. #24159

Merged
merged 3 commits into from
Oct 31, 2022
Merged

Conversation

Heaust-ops
Copy link
Contributor

Description

Directional Light Helper, Spot Light Helper and Hemisphere Light Helper didn't have types,

So they inherited their parent's type "Object3D",

which isn't consistent with all the other helpers like Point Light Helper which has a type of "PointLightHelper".

This PR gives them their own types.

Copy link
Collaborator

@Mugen87 Mugen87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type property is actually only needed for serialization/deserialization which is not supported for helpers in general.

However, it's still better for consistency reasons to add the remaining types. So I think the PR is fine.

@Heaust-ops
Copy link
Contributor Author

That's awesome ty :D
I was actually using types to detect if raycast intersects were helpers or not and if they were, what kind.

@Mugen87 Mugen87 added this to the r147 milestone Oct 31, 2022
@Mugen87 Mugen87 merged commit 348e624 into mrdoob:dev Oct 31, 2022
@Mugen87 Mugen87 changed the title Some light helpers had default type of "Object3D" | this PR gives them their own types Helpers: Add missing type definitions. Oct 31, 2022
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