@blorkfield/overlay-core 0.8.1 → 0.8.3

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.d.cts CHANGED
@@ -669,12 +669,6 @@ declare class OverlayScene {
669
669
  * Get all unique tags currently in use by objects in the scene.
670
670
  */
671
671
  getAllTags(): string[];
672
- /**
673
- * Set the mouse position for follow behavior.
674
- * This overrides the browser mouse position for the 'follow' and 'follow-mouse' tags.
675
- * @deprecated Use setFollowTarget('mouse', x, y) instead
676
- */
677
- setMousePosition(x: number, y: number): void;
678
672
  /**
679
673
  * Set a follow target position. Objects with 'follow-{key}' tag will
680
674
  * automatically move toward this target each frame.
package/dist/index.d.ts CHANGED
@@ -669,12 +669,6 @@ declare class OverlayScene {
669
669
  * Get all unique tags currently in use by objects in the scene.
670
670
  */
671
671
  getAllTags(): string[];
672
- /**
673
- * Set the mouse position for follow behavior.
674
- * This overrides the browser mouse position for the 'follow' and 'follow-mouse' tags.
675
- * @deprecated Use setFollowTarget('mouse', x, y) instead
676
- */
677
- setMousePosition(x: number, y: number): void;
678
672
  /**
679
673
  * Set a follow target position. Objects with 'follow-{key}' tag will
680
674
  * automatically move toward this target each frame.
package/dist/index.js CHANGED
@@ -2282,14 +2282,6 @@ var OverlayScene = class {
2282
2282
  }
2283
2283
  return Array.from(tagsSet).sort();
2284
2284
  }
2285
- /**
2286
- * Set the mouse position for follow behavior.
2287
- * This overrides the browser mouse position for the 'follow' and 'follow-mouse' tags.
2288
- * @deprecated Use setFollowTarget('mouse', x, y) instead
2289
- */
2290
- setMousePosition(x, y) {
2291
- this.setFollowTarget("mouse", x, y);
2292
- }
2293
2285
  /**
2294
2286
  * Set a follow target position. Objects with 'follow-{key}' tag will
2295
2287
  * automatically move toward this target each frame.
@@ -2339,6 +2331,7 @@ var OverlayScene = class {
2339
2331
  for (const body of bodies) {
2340
2332
  const entry = this.findObjectByBody(body);
2341
2333
  if (entry && entry.tags.includes("grabable")) {
2334
+ this.mouse.button = 0;
2342
2335
  this.mouseConstraint.constraint.bodyB = entry.body;
2343
2336
  this.mouseConstraint.constraint.pointB = {
2344
2337
  x: position.x - entry.body.position.x,
@@ -2356,6 +2349,9 @@ var OverlayScene = class {
2356
2349
  if (this.mouseConstraint) {
2357
2350
  this.mouseConstraint.constraint.bodyB = null;
2358
2351
  }
2352
+ if (this.mouse) {
2353
+ this.mouse.button = -1;
2354
+ }
2359
2355
  }
2360
2356
  /**
2361
2357
  * Get the ID of the currently grabbed object.