import { AnimationFrameAction } from './AnimationFrameAction'; import { AnimationFrameScheduler } from './AnimationFrameScheduler'; /** * * Animation Frame Scheduler * * <span class="informal">Perform task when `window.requestAnimationFrame` would fire</span> * * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler * behaviour. * * Without delay, `animationFrame` scheduler can be used to create smooth browser animations. * It makes sure scheduled task will happen just before next browser content repaint, * thus performing animations as efficiently as possible. * * ## Example * Schedule div height animation * ```ts * // html: <div style="background: #0ff;"></div> * import { animationFrameScheduler } from 'rxjs'; * * const div = document.querySelector('div'); * * animationFrameScheduler.schedule(function(height) { * div.style.height = height + "px"; * * this.schedule(height + 1); // `this` references currently executing Action, * // which we reschedule with new state * }, 0, 0); * * // You will see a div element growing in height * ``` */ export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); /** * @deprecated renamed. Use {@link animationFrameScheduler} */ export const animationFrame = animationFrameScheduler;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Action.ts | File | 1.28 KB | 0644 |
|
AnimationFrameAction.ts | File | 1.99 KB | 0644 |
|
AnimationFrameScheduler.ts | File | 756 B | 0644 |
|
AsapAction.ts | File | 1.96 KB | 0644 |
|
AsapScheduler.ts | File | 746 B | 0644 |
|
AsyncAction.ts | File | 4.8 KB | 0644 |
|
AsyncScheduler.ts | File | 1.93 KB | 0644 |
|
QueueAction.ts | File | 1.4 KB | 0644 |
|
QueueScheduler.ts | File | 107 B | 0644 |
|
VirtualTimeScheduler.ts | File | 2.99 KB | 0644 |
|
animationFrame.ts | File | 1.35 KB | 0644 |
|
asap.ts | File | 1.67 KB | 0644 |
|
async.ts | File | 1.5 KB | 0644 |
|
queue.ts | File | 2.03 KB | 0644 |
|