|
278 | 278 | } |
279 | 279 |
|
280 | 280 | function repeatedDuration(timing) { |
281 | | - // https://w3c.github.io/web-animations/#calculating-the-active-duration |
| 281 | + // https://drafts.csswg.org/web-animations/#calculating-the-active-duration |
282 | 282 | if (timing.duration === 0 || timing.iterations === 0) { |
283 | 283 | return 0; |
284 | 284 | } |
|
291 | 291 | var PhaseActive = 3; |
292 | 292 |
|
293 | 293 | function calculatePhase(activeDuration, localTime, timing) { |
294 | | - // https://w3c.github.io/web-animations/#animation-effect-phases-and-states |
| 294 | + // https://drafts.csswg.org/web-animations/#animation-effect-phases-and-states |
295 | 295 | if (localTime == null) { |
296 | 296 | return PhaseNone; |
297 | 297 | } |
|
308 | 308 | } |
309 | 309 |
|
310 | 310 | function calculateActiveTime(activeDuration, fillMode, localTime, phase, delay) { |
311 | | - // https://w3c.github.io/web-animations/#calculating-the-active-time |
| 311 | + // https://drafts.csswg.org/web-animations/#calculating-the-active-time |
312 | 312 | switch (phase) { |
313 | 313 | case PhaseBefore: |
314 | 314 | if (fillMode == 'backwards' || fillMode == 'both') |
|
326 | 326 | } |
327 | 327 |
|
328 | 328 | function calculateOverallProgress(iterationDuration, phase, iterations, activeTime, iterationStart) { |
329 | | - // https://w3c.github.io/web-animations/#calculating-the-overall-progress |
| 329 | + // https://drafts.csswg.org/web-animations/#calculating-the-overall-progress |
330 | 330 | var overallProgress = iterationStart; |
331 | 331 | if (iterationDuration === 0) { |
332 | 332 | if (phase !== PhaseBefore) { |
|
339 | 339 | } |
340 | 340 |
|
341 | 341 | function calculateSimpleIterationProgress(overallProgress, iterationStart, phase, iterations, activeTime, iterationDuration) { |
342 | | - // https://w3c.github.io/web-animations/#calculating-the-simple-iteration-progress |
| 342 | + // https://drafts.csswg.org/web-animations/#calculating-the-simple-iteration-progress |
343 | 343 |
|
344 | 344 | var simpleIterationProgress = (overallProgress === Infinity) ? iterationStart % 1 : overallProgress % 1; |
345 | 345 | if (simpleIterationProgress === 0 && phase === PhaseAfter && iterations !== 0 && |
|
350 | 350 | } |
351 | 351 |
|
352 | 352 | function calculateCurrentIteration(phase, iterations, simpleIterationProgress, overallProgress) { |
353 | | - // https://w3c.github.io/web-animations/#calculating-the-current-iteration |
| 353 | + // https://drafts.csswg.org/web-animations/#calculating-the-current-iteration |
354 | 354 | if (phase === PhaseAfter && iterations === Infinity) { |
355 | 355 | return Infinity; |
356 | 356 | } |
|
361 | 361 | } |
362 | 362 |
|
363 | 363 | function calculateDirectedProgress(playbackDirection, currentIteration, simpleIterationProgress) { |
364 | | - // https://w3c.github.io/web-animations/#calculating-the-directed-progress |
| 364 | + // https://drafts.csswg.org/web-animations/#calculating-the-directed-progress |
365 | 365 | var currentDirection = playbackDirection; |
366 | 366 | if (playbackDirection !== 'normal' && playbackDirection !== 'reverse') { |
367 | 367 | var d = currentIteration; |
|
390 | 390 | var currentIteration = calculateCurrentIteration(phase, timing.iterations, simpleIterationProgress, overallProgress); |
391 | 391 | var directedProgress = calculateDirectedProgress(timing.direction, currentIteration, simpleIterationProgress); |
392 | 392 |
|
393 | | - // https://w3c.github.io/web-animations/#calculating-the-transformed-progress |
394 | | - // https://w3c.github.io/web-animations/#calculating-the-iteration-progress |
| 393 | + // https://drafts.csswg.org/web-animations/#calculating-the-transformed-progress |
| 394 | + // https://drafts.csswg.org/web-animations/#calculating-the-iteration-progress |
395 | 395 | return timing._easingFunction(directedProgress); |
396 | 396 | } |
397 | 397 |
|
|
0 commit comments