@woven-canvas/core 1.1.0 → 1.2.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/_tsup-dts-rollup.d.cts +2 -0
- package/build/_tsup-dts-rollup.d.ts +2 -0
- package/build/index.cjs +10 -3
- package/build/index.cjs.map +1 -1
- package/build/index.js +10 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1507,6 +1507,7 @@ declare interface MouseInput {
|
|
|
1507
1507
|
wheelDeltaX: number;
|
|
1508
1508
|
wheelDeltaY: number;
|
|
1509
1509
|
wheelModKey: boolean;
|
|
1510
|
+
wheelShiftKey: boolean;
|
|
1510
1511
|
}
|
|
1511
1512
|
export { MouseInput }
|
|
1512
1513
|
export { MouseInput as MouseInput_alias_1 }
|
|
@@ -1524,6 +1525,7 @@ declare const MouseSchema: {
|
|
|
1524
1525
|
moveTrigger: BooleanFieldBuilder;
|
|
1525
1526
|
wheelTrigger: BooleanFieldBuilder;
|
|
1526
1527
|
wheelModKey: BooleanFieldBuilder;
|
|
1528
|
+
wheelShiftKey: BooleanFieldBuilder;
|
|
1527
1529
|
enterTrigger: BooleanFieldBuilder;
|
|
1528
1530
|
leaveTrigger: BooleanFieldBuilder;
|
|
1529
1531
|
obscured: BooleanFieldBuilder;
|
|
@@ -1507,6 +1507,7 @@ declare interface MouseInput {
|
|
|
1507
1507
|
wheelDeltaX: number;
|
|
1508
1508
|
wheelDeltaY: number;
|
|
1509
1509
|
wheelModKey: boolean;
|
|
1510
|
+
wheelShiftKey: boolean;
|
|
1510
1511
|
}
|
|
1511
1512
|
export { MouseInput }
|
|
1512
1513
|
export { MouseInput as MouseInput_alias_1 }
|
|
@@ -1524,6 +1525,7 @@ declare const MouseSchema: {
|
|
|
1524
1525
|
moveTrigger: BooleanFieldBuilder;
|
|
1525
1526
|
wheelTrigger: BooleanFieldBuilder;
|
|
1526
1527
|
wheelModKey: BooleanFieldBuilder;
|
|
1528
|
+
wheelShiftKey: BooleanFieldBuilder;
|
|
1527
1529
|
enterTrigger: BooleanFieldBuilder;
|
|
1528
1530
|
leaveTrigger: BooleanFieldBuilder;
|
|
1529
1531
|
obscured: BooleanFieldBuilder;
|
package/build/index.cjs
CHANGED
|
@@ -2854,6 +2854,8 @@ var MouseSchema = {
|
|
|
2854
2854
|
* wheel events with ctrlKey set.
|
|
2855
2855
|
*/
|
|
2856
2856
|
wheelModKey: import_core30.field.boolean().default(false),
|
|
2857
|
+
/** Shift key was held during this frame's wheel event */
|
|
2858
|
+
wheelShiftKey: import_core30.field.boolean().default(false),
|
|
2857
2859
|
/** True for 1 frame when mouse enters the editor element */
|
|
2858
2860
|
enterTrigger: import_core30.field.boolean().default(false),
|
|
2859
2861
|
/** True for 1 frame when mouse leaves the editor element */
|
|
@@ -3074,7 +3076,8 @@ function getMouseInput(ctx) {
|
|
|
3074
3076
|
worldPosition: worldPos,
|
|
3075
3077
|
wheelDeltaX: mouse.wheelDeltaX,
|
|
3076
3078
|
wheelDeltaY: mouse.wheelDeltaY,
|
|
3077
|
-
wheelModKey: mouse.wheelModKey
|
|
3079
|
+
wheelModKey: mouse.wheelModKey,
|
|
3080
|
+
wheelShiftKey: mouse.wheelShiftKey
|
|
3078
3081
|
});
|
|
3079
3082
|
}
|
|
3080
3083
|
if (mouse.moveTrigger) {
|
|
@@ -3085,7 +3088,8 @@ function getMouseInput(ctx) {
|
|
|
3085
3088
|
worldPosition: worldPos,
|
|
3086
3089
|
wheelDeltaX: 0,
|
|
3087
3090
|
wheelDeltaY: 0,
|
|
3088
|
-
wheelModKey: false
|
|
3091
|
+
wheelModKey: false,
|
|
3092
|
+
wheelShiftKey: false
|
|
3089
3093
|
});
|
|
3090
3094
|
}
|
|
3091
3095
|
return events;
|
|
@@ -4494,7 +4498,8 @@ function attachMouseListeners(domElement) {
|
|
|
4494
4498
|
deltaMode: e.deltaMode,
|
|
4495
4499
|
// Trackpad pinch gestures arrive as wheel events with ctrlKey set,
|
|
4496
4500
|
// without any keydown — capture the flags from the event itself.
|
|
4497
|
-
modKey: e.ctrlKey || e.metaKey
|
|
4501
|
+
modKey: e.ctrlKey || e.metaKey,
|
|
4502
|
+
shiftKey: e.shiftKey
|
|
4498
4503
|
});
|
|
4499
4504
|
},
|
|
4500
4505
|
onMouseEnter: () => {
|
|
@@ -4537,6 +4542,7 @@ var mouseSystem = defineEditorSystem({ phase: "input" }, (ctx) => {
|
|
|
4537
4542
|
mouse.wheelDeltaX = 0;
|
|
4538
4543
|
mouse.wheelDeltaY = 0;
|
|
4539
4544
|
mouse.wheelModKey = false;
|
|
4545
|
+
mouse.wheelShiftKey = false;
|
|
4540
4546
|
for (const event of state.eventsBuffer) {
|
|
4541
4547
|
switch (event.type) {
|
|
4542
4548
|
case "mousemove":
|
|
@@ -4549,6 +4555,7 @@ var mouseSystem = defineEditorSystem({ phase: "input" }, (ctx) => {
|
|
|
4549
4555
|
mouse.wheelDeltaY = normalizeWheelDelta(event.deltaY, event.deltaMode);
|
|
4550
4556
|
mouse.wheelTrigger = true;
|
|
4551
4557
|
mouse.wheelModKey = event.modKey === true;
|
|
4558
|
+
mouse.wheelShiftKey = event.shiftKey === true;
|
|
4552
4559
|
break;
|
|
4553
4560
|
case "mouseenter":
|
|
4554
4561
|
mouse.enterTrigger = true;
|