Skip to content

Updated types to match native code #336

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iamprometheus
Copy link

@iamprometheus iamprometheus commented Apr 29, 2025

I found some error for the property force of physicsBody prop, when doing what the ts linter told it was the correct type it led to a crash in the app due to the prop not receiving the correct type. I looked into it and figured the type for force was not well typed, so here is my proposal.

Added a 3D vector type for the props that expect a 3D vector.
Modified the methods of ViroNode and ViroButton to match the new force type

I opted to handle the type problem this way so the force prop of physics body and the applyImpulse method match now

This PR solves #337

Added 3D vector type to updated 3D vector dependant props
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