@eva/plugin-transition 2.0.0-beta.0 → 2.0.0-beta.2
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/EVA.plugin.transition.js +113 -191
- package/dist/EVA.plugin.transition.min.js +1 -1
- package/dist/plugin-transition.cjs.js +100 -169
- package/dist/plugin-transition.cjs.prod.js +1 -1
- package/dist/{packages/plugin-transition/lib/component.d.ts → plugin-transition.d.ts} +16 -7
- package/dist/plugin-transition.esm.js +100 -169
- package/package.json +2 -2
- package/dist/packages/eva.js/lib/core/Component.d.ts +0 -35
- package/dist/packages/eva.js/lib/core/Component.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/core/ComponentObserver.d.ts +0 -22
- package/dist/packages/eva.js/lib/core/ComponentObserver.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/core/GameObject.d.ts +0 -31
- package/dist/packages/eva.js/lib/core/GameObject.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/core/System.d.ts +0 -30
- package/dist/packages/eva.js/lib/core/System.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/core/Transform.d.ts +0 -51
- package/dist/packages/eva.js/lib/core/Transform.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/core/observer.d.ts +0 -23
- package/dist/packages/eva.js/lib/core/observer.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/decorators/ide.d.ts +0 -2
- package/dist/packages/eva.js/lib/decorators/ide.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/decorators/system.d.ts +0 -11
- package/dist/packages/eva.js/lib/decorators/system.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/game/Game.d.ts +0 -72
- package/dist/packages/eva.js/lib/game/Game.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/game/Scene.d.ts +0 -12
- package/dist/packages/eva.js/lib/game/Scene.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/game/Ticker.d.ts +0 -25
- package/dist/packages/eva.js/lib/game/Ticker.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/index.d.ts +0 -26
- package/dist/packages/eva.js/lib/index.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/loader/Progress.d.ts +0 -21
- package/dist/packages/eva.js/lib/loader/Progress.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/loader/Resource.d.ts +0 -99
- package/dist/packages/eva.js/lib/loader/Resource.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/loader/resourceLoader.d.ts +0 -14
- package/dist/packages/eva.js/lib/loader/resourceLoader.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/timeline/index.d.ts +0 -40
- package/dist/packages/eva.js/lib/timeline/index.d.ts.map +0 -1
- package/dist/packages/eva.js/lib/timeline/utils.d.ts +0 -2
- package/dist/packages/eva.js/lib/timeline/utils.d.ts.map +0 -1
- package/dist/packages/plugin-a11y/lib/A11y.d.ts +0 -26
- package/dist/packages/plugin-a11y/lib/A11y.d.ts.map +0 -1
- package/dist/packages/plugin-a11y/lib/A11ySystem.d.ts +0 -54
- package/dist/packages/plugin-a11y/lib/A11ySystem.d.ts.map +0 -1
- package/dist/packages/plugin-a11y/lib/constant.d.ts +0 -34
- package/dist/packages/plugin-a11y/lib/constant.d.ts.map +0 -1
- package/dist/packages/plugin-a11y/lib/index.d.ts +0 -4
- package/dist/packages/plugin-a11y/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-a11y/lib/utils.d.ts +0 -6
- package/dist/packages/plugin-a11y/lib/utils.d.ts.map +0 -1
- package/dist/packages/plugin-evax/lib/EvaXComponent.d.ts +0 -20
- package/dist/packages/plugin-evax/lib/EvaXComponent.d.ts.map +0 -1
- package/dist/packages/plugin-evax/lib/EvaXSystem.d.ts +0 -33
- package/dist/packages/plugin-evax/lib/EvaXSystem.d.ts.map +0 -1
- package/dist/packages/plugin-evax/lib/index.d.ts +0 -10
- package/dist/packages/plugin-evax/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-evax/lib/utils.d.ts +0 -3
- package/dist/packages/plugin-evax/lib/utils.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/BodiesFactory.d.ts +0 -31
- package/dist/packages/plugin-matterjs/lib/BodiesFactory.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/Physics.d.ts +0 -32
- package/dist/packages/plugin-matterjs/lib/Physics.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/PhysicsEngine.d.ts +0 -35
- package/dist/packages/plugin-matterjs/lib/PhysicsEngine.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/PhysicsSystem.d.ts +0 -32
- package/dist/packages/plugin-matterjs/lib/PhysicsSystem.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/index.d.ts +0 -5
- package/dist/packages/plugin-matterjs/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-matterjs/lib/matter.d.ts +0 -3
- package/dist/packages/plugin-matterjs/lib/matter.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/Renderer.d.ts +0 -19
- package/dist/packages/plugin-renderer/lib/Renderer.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/System.d.ts +0 -40
- package/dist/packages/plugin-renderer/lib/System.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/Transform.d.ts +0 -28
- package/dist/packages/plugin-renderer/lib/Transform.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/compressedTexture/ability.d.ts +0 -20
- package/dist/packages/plugin-renderer/lib/compressedTexture/ability.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/compressedTexture/fix/loader.d.ts +0 -2
- package/dist/packages/plugin-renderer/lib/compressedTexture/fix/loader.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/compressedTexture/index.d.ts +0 -7
- package/dist/packages/plugin-renderer/lib/compressedTexture/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/index.d.ts +0 -8
- package/dist/packages/plugin-renderer/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/manager/ContainerManager.d.ts +0 -18
- package/dist/packages/plugin-renderer/lib/manager/ContainerManager.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/manager/RendererManager.d.ts +0 -17
- package/dist/packages/plugin-renderer/lib/manager/RendererManager.d.ts.map +0 -1
- package/dist/packages/plugin-renderer/lib/mixin.d.ts +0 -2
- package/dist/packages/plugin-renderer/lib/mixin.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-dragonbone/lib/component.d.ts +0 -26
- package/dist/packages/plugin-renderer-dragonbone/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-dragonbone/lib/db.d.ts +0 -3
- package/dist/packages/plugin-renderer-dragonbone/lib/db.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-dragonbone/lib/engine.d.ts +0 -10
- package/dist/packages/plugin-renderer-dragonbone/lib/engine.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-dragonbone/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-dragonbone/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-dragonbone/lib/system.d.ts +0 -24
- package/dist/packages/plugin-renderer-dragonbone/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-event/lib/component.d.ts +0 -52
- package/dist/packages/plugin-renderer-event/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-event/lib/index.d.ts +0 -5
- package/dist/packages/plugin-renderer-event/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-event/lib/system.d.ts +0 -19
- package/dist/packages/plugin-renderer-event/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-graphics/lib/component.d.ts +0 -8
- package/dist/packages/plugin-renderer-graphics/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-graphics/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-graphics/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-graphics/lib/system.d.ts +0 -12
- package/dist/packages/plugin-renderer-graphics/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-img/lib/component.d.ts +0 -10
- package/dist/packages/plugin-renderer-img/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-img/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-img/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-img/lib/system.d.ts +0 -18
- package/dist/packages/plugin-renderer-img/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/Lottie.d.ts +0 -27
- package/dist/packages/plugin-renderer-lottie/lib/Lottie.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/LottieSystem.d.ts +0 -18
- package/dist/packages/plugin-renderer-lottie/lib/LottieSystem.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/index.d.ts +0 -3
- package/dist/packages/plugin-renderer-lottie/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/lottie-pixi.d.ts +0 -180
- package/dist/packages/plugin-renderer-lottie/lib/lottie-pixi.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/types.d.ts +0 -18
- package/dist/packages/plugin-renderer-lottie/lib/types.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-lottie/lib/utils.d.ts +0 -2
- package/dist/packages/plugin-renderer-lottie/lib/utils.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-mask/lib/component.d.ts +0 -33
- package/dist/packages/plugin-renderer-mask/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-mask/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-mask/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-mask/lib/system.d.ts +0 -31
- package/dist/packages/plugin-renderer-mask/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-nine-patch/lib/component.d.ts +0 -22
- package/dist/packages/plugin-renderer-nine-patch/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-nine-patch/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-nine-patch/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-nine-patch/lib/system.d.ts +0 -19
- package/dist/packages/plugin-renderer-nine-patch/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-render/lib/component.d.ts +0 -17
- package/dist/packages/plugin-renderer-render/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-render/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-render/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-render/lib/system.d.ts +0 -17
- package/dist/packages/plugin-renderer-render/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-spine/lib/Spine.d.ts +0 -4
- package/dist/packages/plugin-renderer-spine/lib/Spine.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-spine/lib/SpineSystem.d.ts +0 -5
- package/dist/packages/plugin-renderer-spine/lib/SpineSystem.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-spine/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-spine/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite/lib/component.d.ts +0 -12
- package/dist/packages/plugin-renderer-sprite/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-sprite/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite/lib/system.d.ts +0 -17
- package/dist/packages/plugin-renderer-sprite/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite-animation/lib/component.d.ts +0 -31
- package/dist/packages/plugin-renderer-sprite-animation/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite-animation/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-sprite-animation/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-sprite-animation/lib/system.d.ts +0 -31
- package/dist/packages/plugin-renderer-sprite-animation/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-test/lib/component.d.ts +0 -20
- package/dist/packages/plugin-renderer-test/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-test/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-test/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-test/lib/system.d.ts +0 -21
- package/dist/packages/plugin-renderer-test/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-test/lib/system2.d.ts +0 -12
- package/dist/packages/plugin-renderer-test/lib/system2.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-text/lib/component.d.ts +0 -43
- package/dist/packages/plugin-renderer-text/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-text/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-text/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-text/lib/system.d.ts +0 -22
- package/dist/packages/plugin-renderer-text/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-tiling-sprite/lib/component.d.ts +0 -20
- package/dist/packages/plugin-renderer-tiling-sprite/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-tiling-sprite/lib/index.d.ts +0 -4
- package/dist/packages/plugin-renderer-tiling-sprite/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-renderer-tiling-sprite/lib/system.d.ts +0 -18
- package/dist/packages/plugin-renderer-tiling-sprite/lib/system.d.ts.map +0 -1
- package/dist/packages/plugin-sound/lib/Sound.d.ts +0 -44
- package/dist/packages/plugin-sound/lib/Sound.d.ts.map +0 -1
- package/dist/packages/plugin-sound/lib/SoundSystem.d.ts +0 -37
- package/dist/packages/plugin-sound/lib/SoundSystem.d.ts.map +0 -1
- package/dist/packages/plugin-sound/lib/index.d.ts +0 -3
- package/dist/packages/plugin-sound/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/Stats.d.ts +0 -19
- package/dist/packages/plugin-stats/lib/Stats.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/StatsComponent.d.ts +0 -7
- package/dist/packages/plugin-stats/lib/StatsComponent.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/StatsSystem.d.ts +0 -28
- package/dist/packages/plugin-stats/lib/StatsSystem.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/hooks/BaseHooks.d.ts +0 -18
- package/dist/packages/plugin-stats/lib/hooks/BaseHooks.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/hooks/GLHook.d.ts +0 -11
- package/dist/packages/plugin-stats/lib/hooks/GLHook.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/hooks/TextureHook.d.ts +0 -16
- package/dist/packages/plugin-stats/lib/hooks/TextureHook.d.ts.map +0 -1
- package/dist/packages/plugin-stats/lib/index.d.ts +0 -9
- package/dist/packages/plugin-stats/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-transition/lib/Animation.d.ts +0 -38
- package/dist/packages/plugin-transition/lib/Animation.d.ts.map +0 -1
- package/dist/packages/plugin-transition/lib/component.d.ts.map +0 -1
- package/dist/packages/plugin-transition/lib/index.d.ts +0 -3
- package/dist/packages/plugin-transition/lib/index.d.ts.map +0 -1
- package/dist/packages/plugin-transition/lib/system.d.ts +0 -6
- package/dist/packages/plugin-transition/lib/system.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/Application.d.ts +0 -3
- package/dist/packages/renderer-adapter/lib/Application.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/Container.d.ts +0 -5
- package/dist/packages/renderer-adapter/lib/Container.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/Graphics.d.ts +0 -5
- package/dist/packages/renderer-adapter/lib/Graphics.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/NinePatch.d.ts +0 -5
- package/dist/packages/renderer-adapter/lib/NinePatch.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/Sprite.d.ts +0 -9
- package/dist/packages/renderer-adapter/lib/Sprite.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/SpriteAnimation.d.ts +0 -14
- package/dist/packages/renderer-adapter/lib/SpriteAnimation.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/Text.d.ts +0 -6
- package/dist/packages/renderer-adapter/lib/Text.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/TilingSprite.d.ts +0 -9
- package/dist/packages/renderer-adapter/lib/TilingSprite.d.ts.map +0 -1
- package/dist/packages/renderer-adapter/lib/index.d.ts +0 -9
- package/dist/packages/renderer-adapter/lib/index.d.ts.map +0 -1
- package/dist/packages/spine-base/lib/Spine.d.ts +0 -32
- package/dist/packages/spine-base/lib/Spine.d.ts.map +0 -1
- package/dist/packages/spine-base/lib/SpineData.d.ts +0 -5
- package/dist/packages/spine-base/lib/SpineData.d.ts.map +0 -1
- package/dist/packages/spine-base/lib/SpineSystem.d.ts +0 -20
- package/dist/packages/spine-base/lib/SpineSystem.d.ts.map +0 -1
- package/dist/packages/spine-base/lib/TexCache.d.ts +0 -10
- package/dist/packages/spine-base/lib/TexCache.d.ts.map +0 -1
- package/dist/packages/spine-base/lib/index.d.ts +0 -4
- package/dist/packages/spine-base/lib/index.d.ts.map +0 -1
|
@@ -5,47 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tween_js = require('@tweenjs/tween.js');
|
|
6
6
|
var eva_js = require('@eva/eva.js');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
11
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
12
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
|
|
14
|
-
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
-
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
16
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
17
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
18
|
-
|
|
19
|
-
See the Apache Version 2.0 License for specific language governing permissions
|
|
20
|
-
and limitations under the License.
|
|
21
|
-
***************************************************************************** */
|
|
22
|
-
/* global Reflect, Promise */
|
|
23
|
-
|
|
24
|
-
var extendStatics = function(d, b) {
|
|
25
|
-
extendStatics = Object.setPrototypeOf ||
|
|
26
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
27
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function __extends(d, b) {
|
|
32
|
-
extendStatics(d, b);
|
|
33
|
-
function __() { this.constructor = d; }
|
|
34
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function __values(o) {
|
|
38
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
39
|
-
if (m) return m.call(o);
|
|
40
|
-
return {
|
|
41
|
-
next: function () {
|
|
42
|
-
if (o && i >= o.length) o = void 0;
|
|
43
|
-
return { value: o && o[i++], done: !o };
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var easingMap = {
|
|
8
|
+
const easingMap = {
|
|
49
9
|
linear: tween_js.Easing.Linear.None,
|
|
50
10
|
'ease-in': tween_js.Easing.Quadratic.In,
|
|
51
11
|
'ease-out': tween_js.Easing.Quadratic.Out,
|
|
@@ -53,10 +13,10 @@ var easingMap = {
|
|
|
53
13
|
'bounce-in': tween_js.Easing.Bounce.In,
|
|
54
14
|
'bounce-out': tween_js.Easing.Bounce.Out,
|
|
55
15
|
'bounce-in-out': tween_js.Easing.Bounce.InOut,
|
|
56
|
-
none:
|
|
16
|
+
none: p => ~~p,
|
|
57
17
|
};
|
|
58
|
-
|
|
59
|
-
|
|
18
|
+
class Animation {
|
|
19
|
+
constructor(timelines, tweenGroup) {
|
|
60
20
|
this.tweens = [];
|
|
61
21
|
this.timelines = [];
|
|
62
22
|
this.finishCount = 0;
|
|
@@ -66,19 +26,19 @@ var Animation = (function () {
|
|
|
66
26
|
this.timelines = timelines;
|
|
67
27
|
this.tweenGroup = tweenGroup;
|
|
68
28
|
}
|
|
69
|
-
|
|
29
|
+
on(eventName, callback) {
|
|
70
30
|
if (!this.callbacks[eventName]) {
|
|
71
31
|
this.callbacks.set(eventName, []);
|
|
72
32
|
}
|
|
73
33
|
this.callbacks.get(eventName).push(callback);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
34
|
+
}
|
|
35
|
+
emit(eventName) {
|
|
36
|
+
const callbacks = this.callbacks.get(eventName);
|
|
77
37
|
if (!callbacks || !callbacks.length)
|
|
78
38
|
return;
|
|
79
|
-
callbacks.forEach(
|
|
80
|
-
}
|
|
81
|
-
|
|
39
|
+
callbacks.forEach(fn => fn());
|
|
40
|
+
}
|
|
41
|
+
checkFinish() {
|
|
82
42
|
if (++this.finishCount == this.tweens.length) {
|
|
83
43
|
if (++this.currIteration == this.iteration) {
|
|
84
44
|
this.emit('finish');
|
|
@@ -89,119 +49,108 @@ var Animation = (function () {
|
|
|
89
49
|
this.start();
|
|
90
50
|
}
|
|
91
51
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
52
|
+
}
|
|
53
|
+
getObjectCache(component, name) {
|
|
54
|
+
const key = `${component.gameObject.id}${component.name}`;
|
|
95
55
|
if (!this.objectCache[key]) {
|
|
96
56
|
this.objectCache[key] = {};
|
|
97
57
|
}
|
|
98
58
|
if (this.objectCache[key][name]) {
|
|
99
59
|
return this.objectCache[key][name];
|
|
100
60
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
for (
|
|
61
|
+
const keys = name.split('.');
|
|
62
|
+
const keyIndex = keys.length - 1;
|
|
63
|
+
let property = component;
|
|
64
|
+
for (let i = 0; i < keyIndex; i++) {
|
|
105
65
|
property = property[keys[i]];
|
|
106
66
|
}
|
|
107
|
-
this.objectCache[key][name] = { property
|
|
67
|
+
this.objectCache[key][name] = { property, key: keys[keyIndex] };
|
|
108
68
|
return this.objectCache[key][name];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var _b = this.getObjectCache(component, name), property = _b.property, key = _b.key;
|
|
69
|
+
}
|
|
70
|
+
doAnim({ component, name, value }) {
|
|
71
|
+
const { property, key } = this.getObjectCache(component, name);
|
|
113
72
|
property[key] = value;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
var _this = this;
|
|
73
|
+
}
|
|
74
|
+
init() {
|
|
117
75
|
this.checkFinishFunc = this.checkFinish.bind(this);
|
|
118
|
-
|
|
119
|
-
this.timelines.forEach(
|
|
120
|
-
for (
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
76
|
+
let lastTween;
|
|
77
|
+
this.timelines.forEach((timeline, i) => {
|
|
78
|
+
for (let j = 0; j < timeline.values.length - 1; j++) {
|
|
79
|
+
const frame = timeline.values[j];
|
|
80
|
+
const nextFrame = timeline.values[j + 1];
|
|
81
|
+
const tween = new tween_js.Tween({ value: frame.value }, this.tweenGroup)
|
|
124
82
|
.to({ value: nextFrame.value })
|
|
125
83
|
.duration(nextFrame.time - frame.time)
|
|
126
84
|
.easing(easingMap[frame.tween])
|
|
127
|
-
.onUpdate(
|
|
128
|
-
|
|
85
|
+
.onUpdate(props => {
|
|
86
|
+
this.doAnim({
|
|
129
87
|
component: timeline.component,
|
|
130
88
|
name: timeline.name,
|
|
131
89
|
value: props.value,
|
|
132
90
|
});
|
|
133
91
|
});
|
|
134
92
|
if (j === 0) {
|
|
135
|
-
|
|
93
|
+
this.tweens[i] = tween;
|
|
136
94
|
}
|
|
137
95
|
else {
|
|
138
96
|
lastTween.chain(tween);
|
|
139
97
|
}
|
|
140
98
|
lastTween = tween;
|
|
141
99
|
}
|
|
142
|
-
lastTween && lastTween.onComplete(
|
|
100
|
+
lastTween && lastTween.onComplete(() => this.checkFinishFunc());
|
|
143
101
|
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (iteration === void 0) { iteration = 1; }
|
|
102
|
+
}
|
|
103
|
+
play(iteration = 1, currentTime) {
|
|
147
104
|
this.currentTime = currentTime;
|
|
148
105
|
this.stoped = false;
|
|
149
106
|
this.start();
|
|
150
107
|
this.currIteration = 0;
|
|
151
108
|
this.iteration = iteration;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
var _this = this;
|
|
109
|
+
}
|
|
110
|
+
start() {
|
|
155
111
|
this.finishCount = 0;
|
|
156
112
|
this.tweens.length = 0;
|
|
157
113
|
this.init();
|
|
158
|
-
this.tweens.forEach(
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
};
|
|
168
|
-
Animation.prototype.stop = function () {
|
|
114
|
+
this.tweens.forEach((tween) => tween.start(this.currentTime));
|
|
115
|
+
}
|
|
116
|
+
pause() {
|
|
117
|
+
this.tweens.forEach((tween) => tween.pause(this.currentTime));
|
|
118
|
+
}
|
|
119
|
+
resume() {
|
|
120
|
+
this.tweens.forEach((tween) => tween.resume(this.currentTime));
|
|
121
|
+
}
|
|
122
|
+
stop() {
|
|
169
123
|
this.stoped = true;
|
|
170
|
-
this.tweens.forEach(
|
|
171
|
-
}
|
|
172
|
-
|
|
124
|
+
this.tweens.forEach((tween) => tween.stop());
|
|
125
|
+
}
|
|
126
|
+
destroy() {
|
|
173
127
|
this.stop();
|
|
174
128
|
this.tweens = null;
|
|
175
129
|
this.timelines = null;
|
|
176
130
|
this.objectCache = null;
|
|
177
131
|
this.callbacks.clear();
|
|
178
132
|
this.callbacks = null;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
}());
|
|
182
|
-
var Animation$1 = Animation;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
183
135
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
_this.needPlay = [];
|
|
192
|
-
return _this;
|
|
136
|
+
class Transition extends eva_js.Component {
|
|
137
|
+
constructor() {
|
|
138
|
+
super(...arguments);
|
|
139
|
+
this.animations = {};
|
|
140
|
+
this.group = {};
|
|
141
|
+
this.currentTime = 0;
|
|
142
|
+
this.needPlay = [];
|
|
193
143
|
}
|
|
194
|
-
|
|
195
|
-
var group = (_a === void 0 ? { group: {} } : _a).group;
|
|
144
|
+
init({ group } = { group: {} }) {
|
|
196
145
|
this.group = group;
|
|
197
146
|
this.tweenGroup = new tween_js.Group();
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
for (
|
|
201
|
-
this.newAnimation(
|
|
147
|
+
}
|
|
148
|
+
awake() {
|
|
149
|
+
for (const name in this.group) {
|
|
150
|
+
this.newAnimation(name);
|
|
202
151
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
152
|
+
}
|
|
153
|
+
play(name, iteration) {
|
|
205
154
|
if (!name) {
|
|
206
155
|
name = Object.keys(this.group)[0];
|
|
207
156
|
}
|
|
@@ -209,35 +158,35 @@ var Transition = (function (_super) {
|
|
|
209
158
|
this.newAnimation(name);
|
|
210
159
|
}
|
|
211
160
|
if (name && this.animations[name]) {
|
|
212
|
-
this.needPlay.push({ name
|
|
161
|
+
this.needPlay.push({ name, iteration });
|
|
213
162
|
}
|
|
214
|
-
}
|
|
215
|
-
|
|
163
|
+
}
|
|
164
|
+
stop(name) {
|
|
216
165
|
var _a, _b;
|
|
217
166
|
if (!name) {
|
|
218
|
-
for (
|
|
167
|
+
for (const key in this.animations) {
|
|
219
168
|
(_a = this.animations[key]) === null || _a === void 0 ? void 0 : _a.stop();
|
|
220
169
|
}
|
|
221
170
|
}
|
|
222
171
|
else {
|
|
223
172
|
(_b = this.animations[name]) === null || _b === void 0 ? void 0 : _b.stop();
|
|
224
173
|
}
|
|
225
|
-
}
|
|
226
|
-
|
|
174
|
+
}
|
|
175
|
+
onPause() {
|
|
227
176
|
var _a;
|
|
228
|
-
for (
|
|
177
|
+
for (const key in this.animations) {
|
|
229
178
|
(_a = this.animations[key]) === null || _a === void 0 ? void 0 : _a.pause();
|
|
230
179
|
}
|
|
231
|
-
}
|
|
232
|
-
|
|
180
|
+
}
|
|
181
|
+
onResume() {
|
|
233
182
|
var _a;
|
|
234
|
-
for (
|
|
183
|
+
for (const key in this.animations) {
|
|
235
184
|
(_a = this.animations[key]) === null || _a === void 0 ? void 0 : _a.resume();
|
|
236
185
|
}
|
|
237
|
-
}
|
|
238
|
-
|
|
186
|
+
}
|
|
187
|
+
onDestroy() {
|
|
239
188
|
var _a;
|
|
240
|
-
for (
|
|
189
|
+
for (const key in this.animations) {
|
|
241
190
|
(_a = this.animations[key]) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
242
191
|
}
|
|
243
192
|
this.tweenGroup.removeAll();
|
|
@@ -245,52 +194,34 @@ var Transition = (function (_super) {
|
|
|
245
194
|
this.group = null;
|
|
246
195
|
this.animations = null;
|
|
247
196
|
this.removeAllListeners();
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
var _b;
|
|
197
|
+
}
|
|
198
|
+
update(e) {
|
|
199
|
+
var _a;
|
|
252
200
|
this.currentTime = e.time;
|
|
253
|
-
for (
|
|
201
|
+
for (const key in this.animations) {
|
|
254
202
|
this.animations[key].currentTime = e.time;
|
|
255
203
|
}
|
|
256
204
|
this.tweenGroup.update(e.time);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
var play = _d.value;
|
|
260
|
-
(_b = this.animations[play.name]) === null || _b === void 0 ? void 0 : _b.play(play.iteration, this.currentTime);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
264
|
-
finally {
|
|
265
|
-
try {
|
|
266
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
267
|
-
}
|
|
268
|
-
finally { if (e_1) throw e_1.error; }
|
|
205
|
+
for (const play of this.needPlay) {
|
|
206
|
+
(_a = this.animations[play.name]) === null || _a === void 0 ? void 0 : _a.play(play.iteration, this.currentTime);
|
|
269
207
|
}
|
|
270
208
|
this.needPlay.length = 0;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
animation.on('finish', function () { return _this.emit('finish', name); });
|
|
209
|
+
}
|
|
210
|
+
newAnimation(name) {
|
|
211
|
+
const animation = new Animation(this.group[name], this.tweenGroup);
|
|
212
|
+
animation.on('finish', () => this.emit('finish', name));
|
|
276
213
|
this.animations[name] = animation;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}(eva_js.Component));
|
|
281
|
-
var Transition$1 = Transition;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
Transition.componentName = 'Transition';
|
|
282
217
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
_this.name = 'transition';
|
|
288
|
-
return _this;
|
|
218
|
+
class TransitionSystem extends eva_js.System {
|
|
219
|
+
constructor() {
|
|
220
|
+
super(...arguments);
|
|
221
|
+
this.name = 'transition';
|
|
289
222
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}(eva_js.System));
|
|
293
|
-
var TransitionSystem$1 = TransitionSystem;
|
|
223
|
+
}
|
|
224
|
+
TransitionSystem.systemName = 'transition';
|
|
294
225
|
|
|
295
|
-
exports.Transition = Transition
|
|
296
|
-
exports.TransitionSystem = TransitionSystem
|
|
226
|
+
exports.Transition = Transition;
|
|
227
|
+
exports.TransitionSystem = TransitionSystem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@tweenjs/tween.js"),i=require("@eva/eva.js");const e={linear:t.Easing.Linear.None,"ease-in":t.Easing.Quadratic.In,"ease-out":t.Easing.Quadratic.Out,"ease-in-out":t.Easing.Quadratic.InOut,"bounce-in":t.Easing.Bounce.In,"bounce-out":t.Easing.Bounce.Out,"bounce-in-out":t.Easing.Bounce.InOut,none:t=>~~t};class s{constructor(t,i){this.tweens=[],this.timelines=[],this.finishCount=0,this.callbacks=new Map,this.objectCache={},this.currIteration=0,this.timelines=t,this.tweenGroup=i}on(t,i){this.callbacks[t]||this.callbacks.set(t,[]),this.callbacks.get(t).push(i)}emit(t){const i=this.callbacks.get(t);i&&i.length&&i.forEach((t=>t()))}checkFinish(){if(++this.finishCount==this.tweens.length)if(++this.currIteration==this.iteration)this.emit("finish");else{if(this.stoped)return;this.start()}}getObjectCache(t,i){const e=`${t.gameObject.id}${t.name}`;if(this.objectCache[e]||(this.objectCache[e]={}),this.objectCache[e][i])return this.objectCache[e][i];const s=i.split("."),n=s.length-1;let o=t;for(let t=0;t<n;t++)o=o[s[t]];return this.objectCache[e][i]={property:o,key:s[n]},this.objectCache[e][i]}doAnim({component:t,name:i,value:e}){const{property:s,key:n}=this.getObjectCache(t,i);s[n]=e}init(){let i;this.checkFinishFunc=this.checkFinish.bind(this),this.timelines.forEach(((s,n)=>{for(let o=0;o<s.values.length-1;o++){const a=s.values[o],h=s.values[o+1],r=new t.Tween({value:a.value},this.tweenGroup).to({value:h.value}).duration(h.time-a.time).easing(e[a.tween]).onUpdate((t=>{this.doAnim({component:s.component,name:s.name,value:t.value})}));0===o?this.tweens[n]=r:i.chain(r),i=r}i&&i.onComplete((()=>this.checkFinishFunc()))}))}play(t=1,i){this.currentTime=i,this.stoped=!1,this.start(),this.currIteration=0,this.iteration=t}start(){this.finishCount=0,this.tweens.length=0,this.init(),this.tweens.forEach((t=>t.start(this.currentTime)))}pause(){this.tweens.forEach((t=>t.pause(this.currentTime)))}resume(){this.tweens.forEach((t=>t.resume(this.currentTime)))}stop(){this.stoped=!0,this.tweens.forEach((t=>t.stop()))}destroy(){this.stop(),this.tweens=null,this.timelines=null,this.objectCache=null,this.callbacks.clear(),this.callbacks=null}}class n extends i.Component{constructor(){super(...arguments),this.animations={},this.group={},this.currentTime=0,this.needPlay=[]}init({group:i}={group:{}}){this.group=i,this.tweenGroup=new t.Group}awake(){for(const t in this.group)this.newAnimation(t)}play(t,i){t||(t=Object.keys(this.group)[0]),t&&!this.animations[t]&&this.group[t]&&this.newAnimation(t),t&&this.animations[t]&&this.needPlay.push({name:t,iteration:i})}stop(t){var i,e;if(t)null===(e=this.animations[t])||void 0===e||e.stop();else for(const t in this.animations)null===(i=this.animations[t])||void 0===i||i.stop()}onPause(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.pause()}onResume(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.resume()}onDestroy(){var t;for(const i in this.animations)null===(t=this.animations[i])||void 0===t||t.destroy();this.tweenGroup.removeAll(),this.tweenGroup=null,this.group=null,this.animations=null,this.removeAllListeners()}update(t){var i;this.currentTime=t.time;for(const i in this.animations)this.animations[i].currentTime=t.time;this.tweenGroup.update(t.time);for(const t of this.needPlay)null===(i=this.animations[t.name])||void 0===i||i.play(t.iteration,this.currentTime);this.needPlay.length=0}newAnimation(t){const i=new s(this.group[t],this.tweenGroup);i.on("finish",(()=>this.emit("finish",t))),this.animations[t]=i}}n.componentName="Transition";class o extends i.System{constructor(){super(...arguments),this.name="transition"}}o.systemName="transition",exports.Transition=n,exports.TransitionSystem=o;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Component } from '@eva/eva.js';
|
|
2
2
|
import { Group } from '@tweenjs/tween.js';
|
|
3
|
-
|
|
3
|
+
import { System } from '@eva/eva.js';
|
|
4
|
+
|
|
5
|
+
declare interface AnimationStruct {
|
|
4
6
|
name: string;
|
|
5
7
|
component: Component;
|
|
6
8
|
values: {
|
|
@@ -9,10 +11,8 @@ interface AnimationStruct {
|
|
|
9
11
|
tween?: string;
|
|
10
12
|
}[];
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export default class Transition extends Component<TransitionParams> {
|
|
14
|
+
|
|
15
|
+
export declare class Transition extends Component<TransitionParams> {
|
|
16
16
|
static componentName: string;
|
|
17
17
|
private animations;
|
|
18
18
|
tweenGroup: Group;
|
|
@@ -31,5 +31,14 @@ export default class Transition extends Component<TransitionParams> {
|
|
|
31
31
|
update(e: any): void;
|
|
32
32
|
newAnimation(name: any): void;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
|
|
35
|
+
declare interface TransitionParams {
|
|
36
|
+
group: Record<string, AnimationStruct[]>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare class TransitionSystem extends System {
|
|
40
|
+
static systemName: string;
|
|
41
|
+
readonly name = "transition";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { }
|