ngx-flip-card
Version:
Angular component to animate a double-sided card.
47 lines (46 loc) • 1.92 kB
TypeScript
import { AfterViewInit, EventEmitter, OnInit } from '@angular/core';
import * as i0 from "@angular/core";
export declare class NgxFlipCardComponent implements OnInit, AfterViewInit {
private _isBackSide;
set isBackSide(value: boolean);
get isBackSide(): boolean;
isBackSideChange: EventEmitter<boolean>;
animate: boolean;
animationDuration: number;
animationEnd: EventEmitter<boolean>;
private canAnimate;
frontRotation: number;
backRotation: number;
private desiredFrontRotation;
frontZindex: number;
backZindex: number;
translationZ: number;
currentTranslationZ: number;
easing: FlipCardEase;
direction: FlipCardDirection;
flipOnClick: boolean;
private timeLastFrame;
private currentAnimationTime;
private animationFrameRef;
private animating;
constructor();
ngOnInit(): void;
ngAfterViewInit(): void;
private flipInternal;
clickHandler(): void;
flipCard(): void;
private rotateAction;
private rotateFlat;
private animateRotationStart;
private animateLoop;
private lerp;
private easeIn;
private easeOut;
private easeInOut;
private calculateReverseEasing;
private animationEnded;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxFlipCardComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxFlipCardComponent, "ngx-flip-card", never, { "isBackSide": "isBackSide"; "animate": "animate"; "animationDuration": "animationDuration"; "translationZ": "translationZ"; "easing": "easing"; "direction": "direction"; "flipOnClick": "flipOnClick"; }, { "isBackSideChange": "isBackSideChange"; "animationEnd": "animationEnd"; }, never, ["[card-front]", "[card-back]"]>;
}
export declare type FlipCardEase = 'linear' | 'easeIn' | 'easeOut' | 'easeInOut';
export declare type FlipCardDirection = 'horizontal' | 'vertical';