@yagejs/core 0.4.0 → 0.5.0

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 CHANGED
@@ -139,14 +139,17 @@ __export(index_exports, {
139
139
  getSerializableType: () => getSerializableType,
140
140
  globalRandom: () => globalRandom,
141
141
  interpolate: () => interpolate,
142
+ isPointerConsumeContainer: () => isPointerConsumeContainer,
142
143
  isSerializable: () => isSerializable,
143
144
  makeEntityScopedQueue: () => makeEntityScopedQueue,
144
145
  makeGlobalScopedQueue: () => makeGlobalScopedQueue,
145
146
  makeSceneScopedQueue: () => makeSceneScopedQueue,
147
+ markPointerConsumeContainer: () => markPointerConsumeContainer,
146
148
  normalizeSeed: () => normalizeSeed,
147
149
  resolveTransition: () => resolveTransition,
148
150
  serializable: () => serializable,
149
- trait: () => trait
151
+ trait: () => trait,
152
+ unmarkPointerConsumeContainer: () => unmarkPointerConsumeContainer
150
153
  });
151
154
  module.exports = __toCommonJS(index_exports);
152
155
 
@@ -1907,11 +1910,30 @@ var Inspector = class {
1907
1910
  mouseUp: /* @__PURE__ */ __name((button = 0) => {
1908
1911
  this.requireInputManager().firePointerUp(button);
1909
1912
  }, "mouseUp"),
1910
- gamepadButton: /* @__PURE__ */ __name((idx, pressed) => {
1911
- this.requireInputManager().fireGamepadButton(idx, pressed);
1913
+ /**
1914
+ * Inject a synthetic pointer-move with full pointer addressing. Pass `opts`
1915
+ * with `id` / `type: "touch"` to drive a specific finger; defaults match
1916
+ * the primary mouse pointer (same as `mouseMove`).
1917
+ */
1918
+ pointerMove: /* @__PURE__ */ __name((x, y, opts) => {
1919
+ this.requireInputManager().firePointerMove(x, y, opts);
1920
+ }, "pointerMove"),
1921
+ /**
1922
+ * Inject a synthetic pointer-down. With `opts.id` and `opts.type: "touch"`
1923
+ * this drives a multi-touch contact, exercising `getPointers()`,
1924
+ * per-pointer event hooks, and the any-pointer aggregate for `MouseLeft`.
1925
+ */
1926
+ pointerDown: /* @__PURE__ */ __name((button = 0, opts) => {
1927
+ this.requireInputManager().firePointerDown(button, opts);
1928
+ }, "pointerDown"),
1929
+ pointerUp: /* @__PURE__ */ __name((button = 0, opts) => {
1930
+ this.requireInputManager().firePointerUp(button, opts);
1931
+ }, "pointerUp"),
1932
+ gamepadButton: /* @__PURE__ */ __name((code, pressed) => {
1933
+ this.requireInputManager().fireGamepadButton(code, pressed);
1912
1934
  }, "gamepadButton"),
1913
- gamepadAxis: /* @__PURE__ */ __name((idx, value) => {
1914
- this.requireInputManager().fireGamepadAxis(idx, value);
1935
+ gamepadAxis: /* @__PURE__ */ __name((side, value) => {
1936
+ this.requireInputManager().fireGamepadAxis(side, value);
1915
1937
  }, "gamepadAxis"),
1916
1938
  tap: /* @__PURE__ */ __name((code, frames = 1) => {
1917
1939
  this.assertNonNegativeInteger(frames, "Inspector.input.tap(frames)");
@@ -2470,6 +2492,7 @@ var Inspector = class {
2470
2492
  keys: [],
2471
2493
  actions: [],
2472
2494
  mouse: { x: 0, y: 0, buttons: [], down: false },
2495
+ pointers: [],
2473
2496
  gamepad: { buttons: [], axes: [] }
2474
2497
  };
2475
2498
  }
@@ -4493,6 +4516,21 @@ var RendererAdapterKey = new ServiceKey(
4493
4516
  "rendererAdapter"
4494
4517
  );
4495
4518
 
4519
+ // src/ui-consume-registry.ts
4520
+ var registry2 = /* @__PURE__ */ new WeakSet();
4521
+ function markPointerConsumeContainer(container) {
4522
+ registry2.add(container);
4523
+ }
4524
+ __name(markPointerConsumeContainer, "markPointerConsumeContainer");
4525
+ function unmarkPointerConsumeContainer(container) {
4526
+ registry2.delete(container);
4527
+ }
4528
+ __name(unmarkPointerConsumeContainer, "unmarkPointerConsumeContainer");
4529
+ function isPointerConsumeContainer(container) {
4530
+ return registry2.has(container);
4531
+ }
4532
+ __name(isPointerConsumeContainer, "isPointerConsumeContainer");
4533
+
4496
4534
  // src/test-utils.ts
4497
4535
  var _TestScene = class extends Scene {
4498
4536
  static {
@@ -4618,13 +4656,16 @@ var VERSION = "0.0.0";
4618
4656
  getSerializableType,
4619
4657
  globalRandom,
4620
4658
  interpolate,
4659
+ isPointerConsumeContainer,
4621
4660
  isSerializable,
4622
4661
  makeEntityScopedQueue,
4623
4662
  makeGlobalScopedQueue,
4624
4663
  makeSceneScopedQueue,
4664
+ markPointerConsumeContainer,
4625
4665
  normalizeSeed,
4626
4666
  resolveTransition,
4627
4667
  serializable,
4628
- trait
4668
+ trait,
4669
+ unmarkPointerConsumeContainer
4629
4670
  });
4630
4671
  //# sourceMappingURL=index.cjs.map