Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
1.91k stars 85 forks source link

Physics support integration! #702

Closed Neosoulink closed 1 month ago

Neosoulink commented 1 month ago

Description

Tres is one of my favorite challenger for 3D vuejs framework. Unfortunately, so far it does not support a physics engine yet (or I'm not aware of it).

It will be awesome to have a physics component integrated in Tres!a

Suggested solution

The proposition will be simple, a Rapier physics engine! Why Rapier? Rapier is actually the current physic engine well maintained compared to connon or ammon.js

It will be awesome to have something like:

<Physics>
   //...
</Phisics>

Everything inside the Physics tag will be included in the physics world.

This is just the beginning example, we can add more tags like <RigidBody/>, <Collider />, etc... to control the added objects to the physics world.

Alternative

No response

Additional context

No response

Validations

Neosoulink commented 1 month ago

Or to create a separate module/repo for that 🤔

andretchen0 commented 1 month ago

@Neosoulink , we have a proof-of-concept with cannon. Feel free to check it out (though please don't file issues against it as it is only meant as an investigation).

Among the other things on our plates right now, we're putting the pieces in place to support plugins.

I'm going to close here as this is under active discussion by the team. But thanks for your interest!

Neosoulink commented 1 month ago

@andretchen0, sure thanks for the clarifications, It looks like I missed this one.

Yes, this issue can be closed since there's already physics support on preparation ✨