Added smoothing parameter to DOMScatter
This commit is contained in:
parent
cd76ae22a4
commit
d04f92ee7f
9
dist/iwmlib.js
vendored
9
dist/iwmlib.js
vendored
@ -3340,6 +3340,7 @@
|
|||||||
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})
|
||||||
}
|
}
|
||||||
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;
|
||||||
@ -4039,7 +4040,9 @@
|
|||||||
scaleAutoClose = false,
|
scaleAutoClose = false,
|
||||||
onClose = null,
|
onClose = null,
|
||||||
scaleCloseThreshold = 0.10,
|
scaleCloseThreshold = 0.10,
|
||||||
scaleCloseBuffer = 0.05
|
scaleCloseBuffer = 0.05,
|
||||||
|
useLowPassFilter = true,
|
||||||
|
maxRotation = Angle.degree2radian(15)
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
super({
|
super({
|
||||||
@ -4063,7 +4066,9 @@
|
|||||||
scaleAutoClose,
|
scaleAutoClose,
|
||||||
scaleCloseThreshold,
|
scaleCloseThreshold,
|
||||||
scaleCloseBuffer,
|
scaleCloseBuffer,
|
||||||
onClose
|
onClose,
|
||||||
|
useLowPassFilter,
|
||||||
|
maxRotation
|
||||||
});
|
});
|
||||||
if (container == null || width == null || height == null) {
|
if (container == null || width == null || height == null) {
|
||||||
throw new Error('Invalid value: null')
|
throw new Error('Invalid value: null')
|
||||||
|
9
dist/iwmlib.pixi.js
vendored
9
dist/iwmlib.pixi.js
vendored
@ -6507,6 +6507,7 @@
|
|||||||
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})
|
||||||
}
|
}
|
||||||
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;
|
||||||
@ -7039,7 +7040,9 @@
|
|||||||
scaleAutoClose = false,
|
scaleAutoClose = false,
|
||||||
onClose = null,
|
onClose = null,
|
||||||
scaleCloseThreshold = 0.10,
|
scaleCloseThreshold = 0.10,
|
||||||
scaleCloseBuffer = 0.05
|
scaleCloseBuffer = 0.05,
|
||||||
|
useLowPassFilter = true,
|
||||||
|
maxRotation = Angle.degree2radian(15)
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
super({
|
super({
|
||||||
@ -7063,7 +7066,9 @@
|
|||||||
scaleAutoClose,
|
scaleAutoClose,
|
||||||
scaleCloseThreshold,
|
scaleCloseThreshold,
|
||||||
scaleCloseBuffer,
|
scaleCloseBuffer,
|
||||||
onClose
|
onClose,
|
||||||
|
useLowPassFilter,
|
||||||
|
maxRotation
|
||||||
});
|
});
|
||||||
if (container == null || width == null || height == null) {
|
if (container == null || width == null || height == null) {
|
||||||
throw new Error('Invalid value: null')
|
throw new Error('Invalid value: null')
|
||||||
|
@ -372,6 +372,7 @@ export class AbstractScatter extends Throwable {
|
|||||||
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})
|
||||||
}
|
}
|
||||||
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
|
||||||
@ -1071,7 +1072,9 @@ export class DOMScatter extends AbstractScatter {
|
|||||||
scaleAutoClose = false,
|
scaleAutoClose = false,
|
||||||
onClose = null,
|
onClose = null,
|
||||||
scaleCloseThreshold = 0.10,
|
scaleCloseThreshold = 0.10,
|
||||||
scaleCloseBuffer = 0.05
|
scaleCloseBuffer = 0.05,
|
||||||
|
useLowPassFilter = true,
|
||||||
|
maxRotation = Angle.degree2radian(15)
|
||||||
} = {}
|
} = {}
|
||||||
) {
|
) {
|
||||||
super({
|
super({
|
||||||
@ -1095,7 +1098,9 @@ export class DOMScatter extends AbstractScatter {
|
|||||||
scaleAutoClose,
|
scaleAutoClose,
|
||||||
scaleCloseThreshold,
|
scaleCloseThreshold,
|
||||||
scaleCloseBuffer,
|
scaleCloseBuffer,
|
||||||
onClose
|
onClose,
|
||||||
|
useLowPassFilter,
|
||||||
|
maxRotation
|
||||||
})
|
})
|
||||||
if (container == null || width == null || height == null) {
|
if (container == null || width == null || height == null) {
|
||||||
throw new Error('Invalid value: null')
|
throw new Error('Invalid value: null')
|
||||||
|
Loading…
Reference in New Issue
Block a user