MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / seekTo

Method seekTo

modules/piu/All/piuTimeline.js:64–83  ·  view source on GitHub ↗
(time)

Source from the content-addressed store, hash-verified

62 return new Tween(target, properties, duration, easing, delay);
63 }
64 seekTo(time) {
65 let duration = this.duration;
66 time -= this.delay;
67 if (time < 0)
68 time = 0;
69 else if (time > duration)
70 time = duration;
71 if (this.time !== time) {
72 this.time = time;
73 let target = this.target;
74 let fraction = time / duration;
75 let easing = this.easing;
76 if (easing)
77 fraction = easing.call(Math, fraction);
78 let properties = this.properties;
79 let c = properties.length;
80 for (let i = 0; i < c; i++)
81 properties[i].tween(target, fraction)
82 }
83 }
84}
85
86export default class Timeline {

Callers 15

seekToMethod · 0.45
onTimeChangedMethod · 0.45
startRowTransitionMethod · 0.45
startTransitionMethod · 0.45
onTimeChangedMethod · 0.45
on.jsFile · 0.45
to.jsFile · 0.45
from.jsFile · 0.45
onTimeChangedMethod · 0.45
onDisplayingMethod · 0.45
onTimeChangedMethod · 0.45
onFinishedMethod · 0.45

Calls 1

tweenMethod · 0.45

Tested by

no test coverage detected