UNPKG

@ionic/angular

Version:

Angular specific wrappers for @ionic/core

37 lines 1.65 kB
import { Injectable } from '@angular/core'; import { createAnimation, getTimeGivenProgression } from '@ionic/core/components'; import * as i0 from "@angular/core"; export class AnimationController { /** * Create a new animation */ create(animationId) { return createAnimation(animationId); } /** * EXPERIMENTAL * * Given a progression and a cubic bezier function, * this utility returns the time value(s) at which the * cubic bezier reaches the given time progression. * * If the cubic bezier never reaches the progression * the result will be an empty array. * * This is most useful for switching between easing curves * when doing a gesture animation (i.e. going from linear easing * during a drag, to another easing when `progressEnd` is called) */ easingTime(p0, p1, p2, p3, progression) { return getTimeGivenProgression(p0, p1, p2, p3, progression); } /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AnimationController, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); /** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AnimationController, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AnimationController, decorators: [{ type: Injectable, args: [{ providedIn: 'root', }] }] }); //# sourceMappingURL=animation-controller.js.map