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

Physics #6

Open
3 of 6 tasks
tomaspietravallo opened this issue Aug 14, 2021 · 5 comments
Open
3 of 6 tasks

Physics #6

tomaspietravallo opened this issue Aug 14, 2021 · 5 comments
Assignees
Labels
help wanted Extra attention is needed on-the-roadmap Will be actively worked on in the future

Comments

@tomaspietravallo
Copy link
Owner

tomaspietravallo commented Aug 14, 2021

Update:

The current plan is to add a high performance physics engine within Volts itself. Complete with gravity, collisions, and more.

Object3D.usePhysics()

usePhysics should take care of collision detection and response all on it's own. While being moderately fast.

The objective:

  • Add accurate real-world physics. Linear, accelerated, and parabolic trajectories
  • 100+ objects on scene at any given time

Tasks:


Read the old issue by clicking on the arrow. Note that this is no longer the objective Add a method that binds the current code base to other libraries such as Oimo.js, Cannon.js, or others.

Ideally physics would be its own separate script that can be loaded & bound as needed, in order to not have huge amounts of unused code; which adds to size and initial load times (I don't know the extent to which the latter is a significant issue)

This issue will probably stay on hold until:

@tomaspietravallo tomaspietravallo added on hold Awaiting review/further development on-the-roadmap Will be actively worked on in the future labels Aug 14, 2021
@tomaspietravallo tomaspietravallo self-assigned this Aug 14, 2021
@tomaspietravallo tomaspietravallo modified the milestone: v1.0.0 Aug 15, 2021
tomaspietravallo added a commit that referenced this issue Dec 20, 2021
tomaspietravallo added a commit that referenced this issue Dec 20, 2021
- Changes to the core event loop
- Changes to TimedEvents
- Adds onNextTick
- Changes to the snapshot system
- Introduction of QuaternionSignal snapshots
- Fixes Vector.copy and Quaternion.copy
- Fixes Quaternion constructor
- Changes Quaternion.add and mul
- Multiple changes to Object3D

Many of these arose as a requirement for #6
@tomaspietravallo tomaspietravallo removed the on hold Awaiting review/further development label Dec 20, 2021
@tomaspietravallo
Copy link
Owner Author

The BoundingBox signal works properly

It doesn't yet... but with onNextTick and the Snapshot the values can be fetched

tomaspietravallo added a commit that referenced this issue Dec 23, 2021
- Fixes types
- Fixes bugs
- Changes warnings
- Improves the plugin interface
- Improves comments
- Improves tests
@tomaspietravallo
Copy link
Owner Author

@tomaspietravallo
Copy link
Owner Author

tomaspietravallo commented Jul 18, 2022

An impulse/ Matrix based solver would be a nice addition. Help needed.

  • A matrix class with
    • inverse
    • transpose
    • multiply-vector-by-matrix

would be of huge help

Update: all have been added, along with their tests

@tomaspietravallo tomaspietravallo added help wanted Extra attention is needed labels Jul 18, 2022
tomaspietravallo added a commit that referenced this issue Jul 18, 2022
tomaspietravallo added a commit that referenced this issue Jul 18, 2022
tomaspietravallo added a commit that referenced this issue Jul 18, 2022
@tomaspietravallo
Copy link
Owner Author

The size (SLOC) of the physics solver alone is making me consider splitting up volts into multiple files that later get packed. Downside would be modifying things across 'compiled' versions would be hard, making modifying things inside of Spark difficult

The SLOC size of the Verlet solver is quite small, but impulse, AABB, collision detection, etc all will be huge. Will need to consider how to structure it

tomaspietravallo added a commit that referenced this issue Jul 20, 2022
Add notes to optimize in the future. Use the unoptimized code to iterate and write tests, later come back and optimize it
tomaspietravallo added a commit that referenced this issue Jul 21, 2022
tomaspietravallo added a commit that referenced this issue Jul 22, 2022
tomaspietravallo added a commit that referenced this issue Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed on-the-roadmap Will be actively worked on in the future
Projects
None yet
Development

No branches or pull requests

1 participant