Browse Source

Added smoothing parameter to DOMScatter

obersalzberg
Uwe Oestermeier 1 year ago
parent
commit
d04f92ee7f
3 changed files with 21 additions and 6 deletions
  1. +7
    -2
      dist/iwmlib.js
  2. +7
    -2
      dist/iwmlib.pixi.js
  3. +7
    -2
      lib/scatter.js

+ 7
- 2
dist/iwmlib.js View File

@ -3340,6 +3340,7 @@
if (this.useLowPassFilter) {
rotate = this.rotateLPF.next(rotate);
zoom = this.zoomLPF.next(zoom);
// console.log({rotate, zoom})
}
this.transform(delta, zoom, rotate, delta.about);
if (zoom != 1) this.interactionAnchor = delta.about;
@ -4039,7 +4040,9 @@
scaleAutoClose = false,
onClose = null,
scaleCloseThreshold = 0.10,
scaleCloseBuffer = 0.05
scaleCloseBuffer = 0.05,
useLowPassFilter = true,
maxRotation = Angle.degree2radian(15)
} = {}
) {
super({
@ -4063,7 +4066,9 @@
scaleAutoClose,
scaleCloseThreshold,
scaleCloseBuffer,
onClose
onClose,
useLowPassFilter,
maxRotation
});
if (container == null || width == null || height == null) {
throw new Error('Invalid value: null')

+ 7
- 2
dist/iwmlib.pixi.js View File

@ -6507,6 +6507,7 @@
if (this.useLowPassFilter) {
rotate = this.rotateLPF.next(rotate);
zoom = this.zoomLPF.next(zoom);
// console.log({rotate, zoom})
}
this.transform(delta, zoom, rotate, delta.about);
if (zoom != 1) this.interactionAnchor = delta.about;
@ -7039,7 +7040,9 @@
scaleAutoClose = false,
onClose = null,
scaleCloseThreshold = 0.10,
scaleCloseBuffer = 0.05
scaleCloseBuffer = 0.05,
useLowPassFilter = true,
maxRotation = Angle.degree2radian(15)
} = {}
) {
super({
@ -7063,7 +7066,9 @@
scaleAutoClose,
scaleCloseThreshold,
scaleCloseBuffer,
onClose
onClose,
useLowPassFilter,
maxRotation
});
if (container == null || width == null || height == null) {
throw new Error('Invalid value: null')

+ 7
- 2
lib/scatter.js View File

@ -372,6 +372,7 @@ export class AbstractScatter extends Throwable {
if (this.useLowPassFilter) {
rotate = this.rotateLPF.next(rotate)
zoom = this.zoomLPF.next(zoom)
// console.log({rotate, zoom})
}
this.transform(delta, zoom, rotate, delta.about)
if (zoom != 1) this.interactionAnchor = delta.about
@ -1071,7 +1072,9 @@ export class DOMScatter extends AbstractScatter {
scaleAutoClose = false,
onClose = null,
scaleCloseThreshold = 0.10,
scaleCloseBuffer = 0.05
scaleCloseBuffer = 0.05,
useLowPassFilter = true,
maxRotation = Angle.degree2radian(15)
} = {}
) {
super({
@ -1095,7 +1098,9 @@ export class DOMScatter extends AbstractScatter {
scaleAutoClose,
scaleCloseThreshold,
scaleCloseBuffer,
onClose
onClose,
useLowPassFilter,
maxRotation
})
if (container == null || width == null || height == null) {
throw new Error('Invalid value: null')

Loading…
Cancel
Save