MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / step

Method step

src/common/overlay/levelRenderer/Clip.js:61–98  ·  view source on GitHub ↗
(time)

Source from the content-addressed store, hash-verified

59 }
60
61 step(time) {
62 var easing = new AEasing();
63 var percent = (time - this._startTime) / this._life;
64
65 // 还没开始
66 if (percent < 0) {
67 return;
68 }
69
70 percent = Math.min(percent, 1);
71
72 var easingFunc = typeof this.easing == 'string'
73 ? easing[this.easing]
74 : this.easing;
75 var schedule = typeof easingFunc === 'function'
76 ? easingFunc(percent)
77 : percent;
78
79 this.fire('frame', schedule);
80
81 // 结束
82 if (percent == 1) {
83 if (this.loop) {
84 this.restart();
85 // 重新开始周期
86 // 抛出而不是直接调用事件直到 stage.update 后再统一调用这些事件
87 return 'restart';
88
89 }
90
91 // 动画完成将这个控制器标识为待删除
92 // 在Animation.update中进行批量删除
93 this._needsRemove = true;
94 return 'destroy';
95 }
96
97 return null;
98 }
99
100 restart() {
101 var time = new Date().getTime();

Callers 10

ClipSpec.jsFile · 0.45
gFunction · 0.45
echarts-en.min.jsFile · 0.45
echarts.min.jsFile · 0.45
echarts.simple.jsFile · 0.45

Calls 3

fireMethod · 0.95
restartMethod · 0.95
minMethod · 0.80

Tested by

no test coverage detected