@adatechnology/game-fluids 0.5.5 → 0.6.1

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/dist/index.js CHANGED
@@ -1536,6 +1536,12 @@ function createFluids(options = {}) {
1536
1536
  surfaces.delete(id);
1537
1537
  for (const s of [...stains.values()]) if (s.surface === id) stains.delete(s.id);
1538
1538
  },
1539
+ moveSurface(id, offset) {
1540
+ const surface = surfaces.get(id);
1541
+ if (!surface) return;
1542
+ surface.point = add(surface.point, offset);
1543
+ for (const s of stains.values()) if (s.surface === id) s.center = add(s.center, offset);
1544
+ },
1539
1545
  splash(liquid, point, liters, velocity, options2) {
1540
1546
  if (!liquids.has(liquid) || !(liters > 0)) return;
1541
1547
  const v = velocity ?? [0, -0.1, 0];