@blorkfield/overlay-core 0.8.10 → 0.8.11
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.cjs +1 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1375,7 +1375,6 @@ var OverlayScene = class {
|
|
|
1375
1375
|
this.boundaries = [];
|
|
1376
1376
|
this.updateCallbacks = [];
|
|
1377
1377
|
this.animationFrameId = null;
|
|
1378
|
-
this.mouse = null;
|
|
1379
1378
|
this.fonts = [];
|
|
1380
1379
|
this.fontsInitialized = false;
|
|
1381
1380
|
this.letterDebugInfo = /* @__PURE__ */ new Map();
|
|
@@ -1492,9 +1491,6 @@ var OverlayScene = class {
|
|
|
1492
1491
|
this.checkTTLExpiration();
|
|
1493
1492
|
this.checkDespawnBelowFloor();
|
|
1494
1493
|
this.updatePressure();
|
|
1495
|
-
if (!this.followTargets.has("mouse") && this.mouse) {
|
|
1496
|
-
this.followTargets.set("mouse", { x: this.mouse.position.x, y: this.mouse.position.y });
|
|
1497
|
-
}
|
|
1498
1494
|
if (this.grabbedObjectId && this.lastGrabMousePosition) {
|
|
1499
1495
|
const entry = this.objects.get(this.grabbedObjectId);
|
|
1500
1496
|
const mouseTarget = this.followTargets.get("mouse");
|
|
@@ -1564,7 +1560,6 @@ var OverlayScene = class {
|
|
|
1564
1560
|
this.floorSegments = boundariesResult.floorSegments;
|
|
1565
1561
|
Matter5.Composite.add(this.engine.world, this.boundaries);
|
|
1566
1562
|
this.checkInitialFloorIntegrity();
|
|
1567
|
-
this.mouse = Matter5.Mouse.create(canvas);
|
|
1568
1563
|
canvas.addEventListener("mousedown", this.handleMouseDown);
|
|
1569
1564
|
canvas.addEventListener("mousemove", this.handleMouseMove);
|
|
1570
1565
|
canvas.addEventListener("mouseup", this.handleMouseUp);
|
|
@@ -2343,8 +2338,7 @@ var OverlayScene = class {
|
|
|
2343
2338
|
* @returns The ID of the grabbed object, or null if no grabable object at position
|
|
2344
2339
|
*/
|
|
2345
2340
|
startGrab() {
|
|
2346
|
-
const
|
|
2347
|
-
const position = mouseTarget ?? (this.mouse ? { x: this.mouse.position.x, y: this.mouse.position.y } : null);
|
|
2341
|
+
const position = this.followTargets.get("mouse") ?? null;
|
|
2348
2342
|
if (!position) return null;
|
|
2349
2343
|
const bodies = Matter5.Query.point(
|
|
2350
2344
|
Matter5.Composite.allBodies(this.engine.world),
|