@perplexdotgg/bounce 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -4
- package/build/bounce.d.ts +7 -0
- package/build/bounce.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
<h1>Bounce - Premium 3D Physics for the Web</h1>
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
|
-
Bounce
|
|
5
|
+
Bounce is a fast and determinstic 3D physics library for Typescript and Javascript projects. Bounce is written in pure Typsescript (no WebAssembly).
|
|
6
|
+
|
|
7
|
+
## Links
|
|
8
|
+
|
|
9
|
+
- Official website with demos, API and more info: https://perplex.gg/bounce
|
|
10
|
+
- Official Bounce + Three.js example (w/ Vite + Typescript): https://codeberg.org/perplexdotgg/bounce-simple-example
|
|
6
11
|
|
|
7
12
|
## Credits and Acknowledgments
|
|
8
13
|
|
|
@@ -10,7 +15,7 @@ Bounce was created by:
|
|
|
10
15
|
- Durai Ziyaee - 95% of the code, physics R&D
|
|
11
16
|
- Hamza Kubba - 5% of the code, funding, direction, project management, QA, website
|
|
12
17
|
|
|
13
|
-
Although Bounce is mostly original code, it is
|
|
18
|
+
Although Bounce is mostly original code, it is inspired by and draws heavily from:
|
|
14
19
|
- Jolt
|
|
15
20
|
- Rapier
|
|
16
21
|
- Box2D
|
|
@@ -19,8 +24,7 @@ Although Bounce is mostly original code, it is heavily inspired by and draws hea
|
|
|
19
24
|
|
|
20
25
|
## Roadmap
|
|
21
26
|
|
|
22
|
-
- Release
|
|
23
|
-
- Release the official character controller implementation (ETA Oct-Nov 2025)
|
|
27
|
+
- Release the official character controller implementation (ETA Nov 2025)
|
|
24
28
|
- Create a dedicated documentation site (ETA Nov 2025)
|
|
25
29
|
- Fixing bugs. Please file an issue if you run into problems!
|
|
26
30
|
- Want to see something here? Feel free to submit an issue!
|
package/build/bounce.d.ts
CHANGED
|
@@ -2151,6 +2151,13 @@ readonly z: PropertyDefinitionNumber<true>;
|
|
|
2151
2151
|
declare interface BuildTriangleMeshParams {
|
|
2152
2152
|
vertexPositions: Float32Array;
|
|
2153
2153
|
faceIndices: Uint32Array;
|
|
2154
|
+
/**
|
|
2155
|
+
* If true, skips the creation of a convex hull for the triangle mesh.
|
|
2156
|
+
* The hull is only used for dynamic bodies, so if the trimesh is only intended
|
|
2157
|
+
* for static bodies, this can be set to true to save computation time.
|
|
2158
|
+
* Also this allows for building trimeshes with more than 1k verts (hull limit)
|
|
2159
|
+
*/
|
|
2160
|
+
skipHullCreation?: boolean;
|
|
2154
2161
|
}
|
|
2155
2162
|
|
|
2156
2163
|
declare class BvhModule {
|
package/build/bounce.js
CHANGED
|
@@ -16123,9 +16123,11 @@ class TriangleMeshBuilder {
|
|
|
16123
16123
|
nodes: { pool: nodes }
|
|
16124
16124
|
}, bvhTreePool);
|
|
16125
16125
|
mesh.bvh.build(mesh, triangles);
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16126
|
+
if (!params.skipHullCreation) {
|
|
16127
|
+
const hull = this.convexHullBuilder.buildFromPoints(params.vertexPositions, 0, 1e-3);
|
|
16128
|
+
mesh.computedVolume = hull.computedVolume;
|
|
16129
|
+
mesh.inertia.copy(hull.inertia);
|
|
16130
|
+
}
|
|
16129
16131
|
return mesh;
|
|
16130
16132
|
}
|
|
16131
16133
|
}
|