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

adding helper function hook for in-frustum #10274

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

SamMazerIR
Copy link
Contributor

Summary

adding helper function hook for whether an entity context is in frustum of the viewer

closes #insert number here
https://tsu.atlassian.net/browse/IR-1652

QA Steps

@@ -227,6 +233,15 @@ export const TransformComponent = defineComponent({
transform.matrixWorld.compose(vec3, quat, scale)
},

useInViewingFrustum: () => {
Copy link
Member

Choose a reason for hiding this comment

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

can we pass in the entity and camera instead? using useEntityContext here is indirectional, and this should be extensible to any camera

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed this to just be a function call with params as suggested here. I don't think it being a hook is necessary in this case

Copy link
Member

@HexaField HexaField left a comment

Choose a reason for hiding this comment

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

also this hook will not update reactively. we'd need to probably either need to store a hookstate boolean that is updated in a useExecute system or something

@SamMazerIR SamMazerIR marked this pull request as draft May 29, 2024 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants