@series-inc/rundot-syncplay 6.0.0-rc.4 → 6.0.0-rc.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/core/native/physics/buoyancy.cpp +7 -6
- package/core/native/physics/geometry_store.cpp +7 -6
- package/core/native/physics/world.cpp +4 -1
- package/core/src/physics/physics-wasm-module.generated.mjs +3 -3
- package/core/src/physics/world.mjs +128 -0
- package/core/world.d.ts +1 -0
- package/dist/cadence.d.ts +7 -0
- package/dist/cadence.js +19 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +4 -1
- package/dist/networked-client.d.ts +6 -0
- package/dist/networked-client.js +37 -1
- package/dist/physics/3d.d.ts +1 -0
- package/dist/physics/3d.js +20 -0
- package/dist/r3f-render-adapter.d.ts +17 -0
- package/dist/r3f-render-adapter.js +67 -0
- package/dist/scratch-pool.d.ts +32 -0
- package/dist/scratch-pool.js +60 -0
- package/dist/sparse-set.d.ts +1 -0
- package/dist/sparse-set.js +22 -0
- package/dist/spatial/spatial-grid-3d.d.ts +41 -0
- package/dist/spatial/spatial-grid-3d.js +115 -0
- package/package.json +2 -2
|
@@ -830,18 +830,19 @@ BuoyancyStatus validateVoxelBoxes(std::span<const VoxelBoxShape3D> boxes) {
|
|
|
830
830
|
|| !(box.halfSize.z > 0.0)) return BuoyancyStatus::InvalidInput;
|
|
831
831
|
for (std::size_t otherIndex = 0; otherIndex < index; ++otherIndex) {
|
|
832
832
|
const VoxelBoxShape3D& other = boxes[otherIndex];
|
|
833
|
+
constexpr double kEps = 1e-9;
|
|
833
834
|
const bool overlap = box.offset.x - box.halfSize.x
|
|
834
|
-
< other.offset.x + other.halfSize.x
|
|
835
|
+
< other.offset.x + other.halfSize.x - kEps
|
|
835
836
|
&& other.offset.x - other.halfSize.x
|
|
836
|
-
< box.offset.x + box.halfSize.x
|
|
837
|
+
< box.offset.x + box.halfSize.x - kEps
|
|
837
838
|
&& box.offset.y - box.halfSize.y
|
|
838
|
-
< other.offset.y + other.halfSize.y
|
|
839
|
+
< other.offset.y + other.halfSize.y - kEps
|
|
839
840
|
&& other.offset.y - other.halfSize.y
|
|
840
|
-
< box.offset.y + box.halfSize.y
|
|
841
|
+
< box.offset.y + box.halfSize.y - kEps
|
|
841
842
|
&& box.offset.z - box.halfSize.z
|
|
842
|
-
< other.offset.z + other.halfSize.z
|
|
843
|
+
< other.offset.z + other.halfSize.z - kEps
|
|
843
844
|
&& other.offset.z - other.halfSize.z
|
|
844
|
-
< box.offset.z + box.halfSize.z;
|
|
845
|
+
< box.offset.z + box.halfSize.z - kEps;
|
|
845
846
|
if (overlap) return BuoyancyStatus::OverlapUnsupported;
|
|
846
847
|
}
|
|
847
848
|
}
|
|
@@ -124,12 +124,13 @@ bool validGeometry(std::span<const double> geometry, ShapeKind kind,
|
|
|
124
124
|
|| first[13] != 0 || first[14] != 0 || first[15] != 0) return false;
|
|
125
125
|
for (std::uint64_t other = 0; other < child; ++other) {
|
|
126
126
|
const double* second = values + other * recordStride;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
&&
|
|
130
|
-
&&
|
|
131
|
-
&&
|
|
132
|
-
&&
|
|
127
|
+
constexpr double kEps = 1e-9;
|
|
128
|
+
const bool overlap = first[1] - first[4] < second[1] + second[4] - kEps
|
|
129
|
+
&& second[1] - second[4] < first[1] + first[4] - kEps
|
|
130
|
+
&& first[2] - first[5] < second[2] + second[5] - kEps
|
|
131
|
+
&& second[2] - second[5] < first[2] + first[5] - kEps
|
|
132
|
+
&& first[3] - first[6] < second[3] + second[6] - kEps
|
|
133
|
+
&& second[3] - second[6] < first[3] + first[6] - kEps;
|
|
133
134
|
if (overlap) return false;
|
|
134
135
|
}
|
|
135
136
|
}
|
|
@@ -2845,7 +2845,10 @@ WorldError World::step(const StepOptions& options) {
|
|
|
2845
2845
|
};
|
|
2846
2846
|
inputs.bodyGeometry = bodyGeometryInputs_;
|
|
2847
2847
|
inputs.fluids = state_.fluids;
|
|
2848
|
-
|
|
2848
|
+
const std::uint64_t maxFluidPairs = static_cast<std::uint64_t>(bodyCount)
|
|
2849
|
+
* (state_.fluids.size() / kFluidStride);
|
|
2850
|
+
inputs.fluidInteractionCapacity = static_cast<std::uint32_t>(
|
|
2851
|
+
std::min(static_cast<std::uint64_t>(limits_.maxFluidInteractions), maxFluidPairs));
|
|
2849
2852
|
std::vector<std::uint64_t> poseBodyIds;
|
|
2850
2853
|
std::vector<geometry_private::GeometryRecordOwner> poseGeometryOwners;
|
|
2851
2854
|
bool hasCcd = false;
|