@woven-canvas/core 1.1.0 → 1.3.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/build/index.js CHANGED
@@ -2695,6 +2695,8 @@ var MouseSchema = {
2695
2695
  * wheel events with ctrlKey set.
2696
2696
  */
2697
2697
  wheelModKey: field30.boolean().default(false),
2698
+ /** Shift key was held during this frame's wheel event */
2699
+ wheelShiftKey: field30.boolean().default(false),
2698
2700
  /** True for 1 frame when mouse enters the editor element */
2699
2701
  enterTrigger: field30.boolean().default(false),
2700
2702
  /** True for 1 frame when mouse leaves the editor element */
@@ -2915,7 +2917,8 @@ function getMouseInput(ctx) {
2915
2917
  worldPosition: worldPos,
2916
2918
  wheelDeltaX: mouse.wheelDeltaX,
2917
2919
  wheelDeltaY: mouse.wheelDeltaY,
2918
- wheelModKey: mouse.wheelModKey
2920
+ wheelModKey: mouse.wheelModKey,
2921
+ wheelShiftKey: mouse.wheelShiftKey
2919
2922
  });
2920
2923
  }
2921
2924
  if (mouse.moveTrigger) {
@@ -2926,7 +2929,8 @@ function getMouseInput(ctx) {
2926
2929
  worldPosition: worldPos,
2927
2930
  wheelDeltaX: 0,
2928
2931
  wheelDeltaY: 0,
2929
- wheelModKey: false
2932
+ wheelModKey: false,
2933
+ wheelShiftKey: false
2930
2934
  });
2931
2935
  }
2932
2936
  return events;
@@ -4341,7 +4345,8 @@ function attachMouseListeners(domElement) {
4341
4345
  deltaMode: e.deltaMode,
4342
4346
  // Trackpad pinch gestures arrive as wheel events with ctrlKey set,
4343
4347
  // without any keydown — capture the flags from the event itself.
4344
- modKey: e.ctrlKey || e.metaKey
4348
+ modKey: e.ctrlKey || e.metaKey,
4349
+ shiftKey: e.shiftKey
4345
4350
  });
4346
4351
  },
4347
4352
  onMouseEnter: () => {
@@ -4384,6 +4389,7 @@ var mouseSystem = defineEditorSystem({ phase: "input" }, (ctx) => {
4384
4389
  mouse.wheelDeltaX = 0;
4385
4390
  mouse.wheelDeltaY = 0;
4386
4391
  mouse.wheelModKey = false;
4392
+ mouse.wheelShiftKey = false;
4387
4393
  for (const event of state.eventsBuffer) {
4388
4394
  switch (event.type) {
4389
4395
  case "mousemove":
@@ -4396,6 +4402,7 @@ var mouseSystem = defineEditorSystem({ phase: "input" }, (ctx) => {
4396
4402
  mouse.wheelDeltaY = normalizeWheelDelta(event.deltaY, event.deltaMode);
4397
4403
  mouse.wheelTrigger = true;
4398
4404
  mouse.wheelModKey = event.modKey === true;
4405
+ mouse.wheelShiftKey = event.shiftKey === true;
4399
4406
  break;
4400
4407
  case "mouseenter":
4401
4408
  mouse.enterTrigger = true;