Rebuild dist.
This commit is contained in:
parent
68c98d1293
commit
dfe7c0a011
13
dist/iwmlib.js
vendored
13
dist/iwmlib.js
vendored
@ -1857,15 +1857,17 @@
|
|||||||
* @param {*} rotate
|
* @param {*} rotate
|
||||||
* @param {*} about
|
* @param {*} about
|
||||||
* @param {*} number - number of involved pointer
|
* @param {*} number - number of involved pointer
|
||||||
|
* @param {*} distance - distance of farthests touch points
|
||||||
* @memberof InteractionDelta
|
* @memberof InteractionDelta
|
||||||
*/
|
*/
|
||||||
constructor(x, y, zoom, rotate, about, number) {
|
constructor(x, y, zoom, rotate, about, number, distance) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.zoom = zoom;
|
this.zoom = zoom;
|
||||||
this.rotate = rotate;
|
this.rotate = rotate;
|
||||||
this.about = about;
|
this.about = about;
|
||||||
this.number = number;
|
this.number = number;
|
||||||
|
this.distance = distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
toString() {
|
toString() {
|
||||||
@ -1961,7 +1963,8 @@
|
|||||||
zoom,
|
zoom,
|
||||||
alpha,
|
alpha,
|
||||||
cm,
|
cm,
|
||||||
csize
|
csize,
|
||||||
|
distance2
|
||||||
)
|
)
|
||||||
} else if (
|
} else if (
|
||||||
csize == 1 &&
|
csize == 1 &&
|
||||||
@ -3371,6 +3374,7 @@
|
|||||||
scaleCloseThreshold = 0.1,
|
scaleCloseThreshold = 0.1,
|
||||||
scaleCloseBuffer = 0.05,
|
scaleCloseBuffer = 0.05,
|
||||||
maxRotation = Angle.degree2radian(5),
|
maxRotation = Angle.degree2radian(5),
|
||||||
|
minRotationDistance = 200,
|
||||||
useLowPassFilter = true
|
useLowPassFilter = true
|
||||||
} = {}) {
|
} = {}) {
|
||||||
if (rotationDegrees != null && rotation != null) {
|
if (rotationDegrees != null && rotation != null) {
|
||||||
@ -3416,6 +3420,7 @@
|
|||||||
this.mouseZoomFactor = mouseZoomFactor;
|
this.mouseZoomFactor = mouseZoomFactor;
|
||||||
this.autoBringToFront = autoBringToFront;
|
this.autoBringToFront = autoBringToFront;
|
||||||
this.useLowPassFilter = useLowPassFilter;
|
this.useLowPassFilter = useLowPassFilter;
|
||||||
|
this.minRotationDistance = minRotationDistance;
|
||||||
if (useLowPassFilter) {
|
if (useLowPassFilter) {
|
||||||
this.rotateLPF = new LowPassFilter();
|
this.rotateLPF = new LowPassFilter();
|
||||||
this.zoomLPF = new LowPassFilter();
|
this.zoomLPF = new LowPassFilter();
|
||||||
@ -3472,7 +3477,9 @@
|
|||||||
if (this.useLowPassFilter) {
|
if (this.useLowPassFilter) {
|
||||||
rotate = this.rotateLPF.next(rotate);
|
rotate = this.rotateLPF.next(rotate);
|
||||||
zoom = this.zoomLPF.next(zoom);
|
zoom = this.zoomLPF.next(zoom);
|
||||||
// console.log({rotate, zoom})
|
if (delta.distance < this.minRotationDistance) {
|
||||||
|
rotate = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.transform(delta, zoom, rotate, delta.about);
|
this.transform(delta, zoom, rotate, delta.about);
|
||||||
if (zoom != 1) this.interactionAnchor = delta.about;
|
if (zoom != 1) this.interactionAnchor = delta.about;
|
||||||
|
13
dist/iwmlib.pixi.js
vendored
13
dist/iwmlib.pixi.js
vendored
@ -5278,15 +5278,17 @@
|
|||||||
* @param {*} rotate
|
* @param {*} rotate
|
||||||
* @param {*} about
|
* @param {*} about
|
||||||
* @param {*} number - number of involved pointer
|
* @param {*} number - number of involved pointer
|
||||||
|
* @param {*} distance - distance of farthests touch points
|
||||||
* @memberof InteractionDelta
|
* @memberof InteractionDelta
|
||||||
*/
|
*/
|
||||||
constructor(x, y, zoom, rotate, about, number) {
|
constructor(x, y, zoom, rotate, about, number, distance) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
this.zoom = zoom;
|
this.zoom = zoom;
|
||||||
this.rotate = rotate;
|
this.rotate = rotate;
|
||||||
this.about = about;
|
this.about = about;
|
||||||
this.number = number;
|
this.number = number;
|
||||||
|
this.distance = distance;
|
||||||
}
|
}
|
||||||
|
|
||||||
toString() {
|
toString() {
|
||||||
@ -5382,7 +5384,8 @@
|
|||||||
zoom,
|
zoom,
|
||||||
alpha,
|
alpha,
|
||||||
cm,
|
cm,
|
||||||
csize
|
csize,
|
||||||
|
distance2
|
||||||
)
|
)
|
||||||
} else if (
|
} else if (
|
||||||
csize == 1 &&
|
csize == 1 &&
|
||||||
@ -6783,6 +6786,7 @@
|
|||||||
scaleCloseThreshold = 0.1,
|
scaleCloseThreshold = 0.1,
|
||||||
scaleCloseBuffer = 0.05,
|
scaleCloseBuffer = 0.05,
|
||||||
maxRotation = Angle.degree2radian(5),
|
maxRotation = Angle.degree2radian(5),
|
||||||
|
minRotationDistance = 200,
|
||||||
useLowPassFilter = true
|
useLowPassFilter = true
|
||||||
} = {}) {
|
} = {}) {
|
||||||
if (rotationDegrees != null && rotation != null) {
|
if (rotationDegrees != null && rotation != null) {
|
||||||
@ -6828,6 +6832,7 @@
|
|||||||
this.mouseZoomFactor = mouseZoomFactor;
|
this.mouseZoomFactor = mouseZoomFactor;
|
||||||
this.autoBringToFront = autoBringToFront;
|
this.autoBringToFront = autoBringToFront;
|
||||||
this.useLowPassFilter = useLowPassFilter;
|
this.useLowPassFilter = useLowPassFilter;
|
||||||
|
this.minRotationDistance = minRotationDistance;
|
||||||
if (useLowPassFilter) {
|
if (useLowPassFilter) {
|
||||||
this.rotateLPF = new LowPassFilter();
|
this.rotateLPF = new LowPassFilter();
|
||||||
this.zoomLPF = new LowPassFilter();
|
this.zoomLPF = new LowPassFilter();
|
||||||
@ -6884,7 +6889,9 @@
|
|||||||
if (this.useLowPassFilter) {
|
if (this.useLowPassFilter) {
|
||||||
rotate = this.rotateLPF.next(rotate);
|
rotate = this.rotateLPF.next(rotate);
|
||||||
zoom = this.zoomLPF.next(zoom);
|
zoom = this.zoomLPF.next(zoom);
|
||||||
// console.log({rotate, zoom})
|
if (delta.distance < this.minRotationDistance) {
|
||||||
|
rotate = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.transform(delta, zoom, rotate, delta.about);
|
this.transform(delta, zoom, rotate, delta.about);
|
||||||
if (zoom != 1) this.interactionAnchor = delta.about;
|
if (zoom != 1) this.interactionAnchor = delta.about;
|
||||||
|
Loading…
Reference in New Issue
Block a user