File indexing completed on 2025-01-19 03:59:59
0001 import { value_to_lottie, value_from_lottie, LottieObject } from '../base.js'; 0002 0003 /*! 0004 Bezier handle for keyframe interpolation 0005 */ 0006 export class KeyframeBezierHandle extends LottieObject 0007 { 0008 x; 0009 y; 0010 0011 constructor() 0012 { 0013 super(); 0014 this.x = 0; 0015 this.y = 0; 0016 } 0017 0018 to_lottie() 0019 { 0020 var arr = {}; 0021 if ( this.x !== null ) 0022 arr["x"] = value_to_lottie([this.x]); 0023 if ( this.y !== null ) 0024 arr["y"] = value_to_lottie([this.y]); 0025 return arr; 0026 } 0027 0028 static from_lottie(arr) 0029 { 0030 var obj = new KeyframeBezierHandle(); 0031 if ( arr["x"] !== undefined ) 0032 obj.x = value_from_lottie(arr["x"][0]); 0033 if ( arr["y"] !== undefined ) 0034 obj.y = value_from_lottie(arr["y"][0]); 0035 return obj; 0036 } 0037 } 0038