Skip to content

Conversation

@iamprometheus
Copy link
Contributor

@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
@iamprometheus iamprometheus deleted the typescript-types-fix branch June 9, 2025 04:03
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