vis-core 0.21.32 → 0.21.33
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/dist/index.js +2 -2
- package/dist/index.module.js +92 -29
- package/dist/utils/animation.d.ts +44 -6
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -22726,41 +22726,103 @@ const tween_esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
22726
22726
|
return setTimeout(() => {
|
|
22727
22727
|
e.resolve();
|
|
22728
22728
|
}, ct), e.promise;
|
|
22729
|
-
}), getTween = (ct) => (
|
|
22730
|
-
|
|
22731
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22736
|
-
|
|
22737
|
-
|
|
22738
|
-
|
|
22739
|
-
|
|
22740
|
-
|
|
22741
|
-
|
|
22742
|
-
|
|
22729
|
+
}), getTween = (ct) => ({
|
|
22730
|
+
onUpdate: e = (Zt) => {
|
|
22731
|
+
},
|
|
22732
|
+
onComplete: c = () => {
|
|
22733
|
+
},
|
|
22734
|
+
backwards: st = !0
|
|
22735
|
+
} = {}) => (st && e(0), {
|
|
22736
|
+
play: ({
|
|
22737
|
+
duration: Zt = 1e3,
|
|
22738
|
+
repeat: Wt = 0,
|
|
22739
|
+
repeatResolve: Yt = 1,
|
|
22740
|
+
repeatDelay: vt = 0
|
|
22741
|
+
} = {}) => {
|
|
22742
|
+
const Tt = makePromiseCreator();
|
|
22743
|
+
let Jt = 0;
|
|
22744
|
+
return new Tween({ v: 0 }).to({ v: 1 }, Zt).onUpdate(({ v: $t }) => {
|
|
22745
|
+
e($t);
|
|
22746
|
+
}).onComplete(() => {
|
|
22747
|
+
e(1), c(), Tt.resolve();
|
|
22748
|
+
}).onRepeat(() => {
|
|
22749
|
+
Jt++, Jt >= Yt && Tt.resolve();
|
|
22750
|
+
}).repeat(Wt).repeatDelay(vt).easing(ct).start(), Tt.promise;
|
|
22751
|
+
}
|
|
22752
|
+
}), sinusoidalInOut = getTween(Easing.Sinusoidal.InOut), baseObjectFadeIn = (ct) => {
|
|
22753
|
+
const e = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
22754
|
+
ct.object3d.traverse((Zt) => {
|
|
22755
|
+
const Wt = Zt;
|
|
22756
|
+
Wt.material && (Array.isArray(Wt.material) ? Wt.material : [Wt.material]).forEach((vt) => {
|
|
22757
|
+
e.add(vt);
|
|
22743
22758
|
});
|
|
22744
22759
|
});
|
|
22745
|
-
const
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
}),
|
|
22749
|
-
|
|
22750
|
-
|
|
22751
|
-
|
|
22752
|
-
|
|
22760
|
+
const st = /* @__PURE__ */ new Map();
|
|
22761
|
+
return e.forEach((Zt) => {
|
|
22762
|
+
st.set(Zt, Zt.opacity), Zt.transparent || (c.add(Zt), Zt.transparent = !0, Zt.needsUpdate = !0);
|
|
22763
|
+
}), sinusoidalInOut({
|
|
22764
|
+
onUpdate: (Zt) => {
|
|
22765
|
+
e.forEach((Wt) => {
|
|
22766
|
+
Wt.opacity = Zt * st.get(Wt);
|
|
22767
|
+
});
|
|
22768
|
+
},
|
|
22769
|
+
onComplete: () => {
|
|
22770
|
+
c.forEach((Zt) => {
|
|
22771
|
+
Zt.transparent = !1, Zt.needsUpdate = !0;
|
|
22772
|
+
}), e.clear(), c.clear(), st.clear();
|
|
22773
|
+
}
|
|
22774
|
+
});
|
|
22775
|
+
}, baseObjectFadeOut = (ct) => {
|
|
22776
|
+
const e = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
22777
|
+
ct.object3d.traverse((Zt) => {
|
|
22778
|
+
const Wt = Zt;
|
|
22779
|
+
Wt.material && (Array.isArray(Wt.material) ? Wt.material : [Wt.material]).forEach((vt) => {
|
|
22780
|
+
e.add(vt);
|
|
22781
|
+
});
|
|
22782
|
+
});
|
|
22783
|
+
const st = /* @__PURE__ */ new Map();
|
|
22784
|
+
return e.forEach((Zt) => {
|
|
22785
|
+
st.set(Zt, Zt.opacity), Zt.transparent || (c.add(Zt), Zt.transparent = !0, Zt.needsUpdate = !0);
|
|
22786
|
+
}), sinusoidalInOut({
|
|
22787
|
+
onUpdate: (Zt) => {
|
|
22788
|
+
e.forEach((Wt) => {
|
|
22789
|
+
Wt.opacity = (1 - Zt) * st.get(Wt);
|
|
22753
22790
|
});
|
|
22754
22791
|
},
|
|
22755
22792
|
onComplete: () => {
|
|
22756
|
-
|
|
22757
|
-
|
|
22758
|
-
|
|
22793
|
+
e.clear(), c.clear(), st.clear();
|
|
22794
|
+
}
|
|
22795
|
+
});
|
|
22796
|
+
}, baseObjectBounceIn = (ct, e = "z") => {
|
|
22797
|
+
const c = e.trim().split(""), st = c.reduce(
|
|
22798
|
+
(Zt, Wt) => (Zt[Wt] = ct.scale[Wt], Zt),
|
|
22799
|
+
{}
|
|
22800
|
+
);
|
|
22801
|
+
return sinusoidalInOut({
|
|
22802
|
+
onUpdate: (Zt) => {
|
|
22803
|
+
c.forEach((Wt) => {
|
|
22804
|
+
ct.scale[Wt] = st[Wt] * Zt;
|
|
22805
|
+
});
|
|
22806
|
+
}
|
|
22807
|
+
});
|
|
22808
|
+
}, baseObjectBounce = (ct, e = "z", c) => {
|
|
22809
|
+
const st = e.trim().split(""), Zt = st.reduce(
|
|
22810
|
+
(Wt, Yt) => (Wt[Yt] = ct.scale[Yt], Wt),
|
|
22811
|
+
{}
|
|
22812
|
+
);
|
|
22813
|
+
return sinusoidalInOut({
|
|
22814
|
+
onUpdate: (Wt) => {
|
|
22815
|
+
st.forEach((Yt) => {
|
|
22816
|
+
ct.scale[Yt] = Zt[Yt] + (c - Zt[Yt]) * Wt;
|
|
22817
|
+
});
|
|
22759
22818
|
}
|
|
22760
22819
|
});
|
|
22761
|
-
}
|
|
22820
|
+
}, animation = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
22762
22821
|
__proto__: null,
|
|
22763
|
-
|
|
22822
|
+
baseObjectBounce,
|
|
22823
|
+
baseObjectBounceIn,
|
|
22824
|
+
baseObjectFadeIn,
|
|
22825
|
+
baseObjectFadeOut,
|
|
22764
22826
|
sinusoidalInOut,
|
|
22765
22827
|
timeOut
|
|
22766
22828
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -48310,7 +48372,7 @@ function createAreaLightMaterial(ct) {
|
|
|
48310
48372
|
const e = new MeshBasicMaterial();
|
|
48311
48373
|
return e.color.setScalar(ct), e;
|
|
48312
48374
|
}
|
|
48313
|
-
const version = "0.21.
|
|
48375
|
+
const version = "0.21.33";
|
|
48314
48376
|
class Event {
|
|
48315
48377
|
constructor() {
|
|
48316
48378
|
J0(this, "event", new EventEmitter());
|
|
@@ -48551,7 +48613,8 @@ const needsUpdateAttributeName = [
|
|
|
48551
48613
|
"fog",
|
|
48552
48614
|
"vertexColors",
|
|
48553
48615
|
"vertexShader",
|
|
48554
|
-
"fragmentShader"
|
|
48616
|
+
"fragmentShader",
|
|
48617
|
+
"sizeAttenuation"
|
|
48555
48618
|
];
|
|
48556
48619
|
class SetMaterialValue extends Command {
|
|
48557
48620
|
constructor(e, c, st, Zt, Wt) {
|
|
@@ -1,8 +1,46 @@
|
|
|
1
1
|
import { IBaseObject } from 'gl-draw/dist/core/BaseObject';
|
|
2
2
|
export declare const timeOut: (ms: number) => Promise<any>;
|
|
3
|
-
export declare const sinusoidalInOut: (
|
|
4
|
-
onUpdate?: (v: number) => void;
|
|
5
|
-
onComplete?: () => void;
|
|
6
|
-
|
|
7
|
-
}) =>
|
|
8
|
-
|
|
3
|
+
export declare const sinusoidalInOut: ({ onUpdate, onComplete, backwards, }?: {
|
|
4
|
+
onUpdate?: ((v: number) => void) | undefined;
|
|
5
|
+
onComplete?: (() => void) | undefined;
|
|
6
|
+
backwards?: boolean | undefined;
|
|
7
|
+
}) => {
|
|
8
|
+
play: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
9
|
+
duration?: number | undefined;
|
|
10
|
+
repeat?: number | undefined;
|
|
11
|
+
repeatResolve?: number | undefined;
|
|
12
|
+
repeatDelay?: number | undefined;
|
|
13
|
+
}) => Promise<any>;
|
|
14
|
+
};
|
|
15
|
+
export declare const baseObjectFadeIn: (obj: IBaseObject) => {
|
|
16
|
+
play: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
17
|
+
duration?: number | undefined;
|
|
18
|
+
repeat?: number | undefined;
|
|
19
|
+
repeatResolve?: number | undefined;
|
|
20
|
+
repeatDelay?: number | undefined;
|
|
21
|
+
}) => Promise<any>;
|
|
22
|
+
};
|
|
23
|
+
export declare const baseObjectFadeOut: (obj: IBaseObject) => {
|
|
24
|
+
play: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
25
|
+
duration?: number | undefined;
|
|
26
|
+
repeat?: number | undefined;
|
|
27
|
+
repeatResolve?: number | undefined;
|
|
28
|
+
repeatDelay?: number | undefined;
|
|
29
|
+
}) => Promise<any>;
|
|
30
|
+
};
|
|
31
|
+
export declare const baseObjectBounceIn: (obj: IBaseObject, up?: string) => {
|
|
32
|
+
play: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
33
|
+
duration?: number | undefined;
|
|
34
|
+
repeat?: number | undefined;
|
|
35
|
+
repeatResolve?: number | undefined;
|
|
36
|
+
repeatDelay?: number | undefined;
|
|
37
|
+
}) => Promise<any>;
|
|
38
|
+
};
|
|
39
|
+
export declare const baseObjectBounce: (obj: IBaseObject, up: string | undefined, to: number) => {
|
|
40
|
+
play: ({ duration, repeat, repeatResolve, repeatDelay, }?: {
|
|
41
|
+
duration?: number | undefined;
|
|
42
|
+
repeat?: number | undefined;
|
|
43
|
+
repeatResolve?: number | undefined;
|
|
44
|
+
repeatDelay?: number | undefined;
|
|
45
|
+
}) => Promise<any>;
|
|
46
|
+
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.21.
|
|
1
|
+
declare const _default: "0.21.33";
|
|
2
2
|
export default _default;
|