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 Single bezier curve 0005 */ 0006 export class Bezier extends LottieObject 0007 { 0008 closed; 0009 in_tangents; 0010 out_tangents; 0011 vertices; 0012 0013 constructor() 0014 { 0015 super(); 0016 this.closed = false; 0017 this.in_tangents = []; 0018 this.out_tangents = []; 0019 this.vertices = []; 0020 } 0021 0022 to_lottie() 0023 { 0024 var arr = {}; 0025 if ( this.closed !== null ) 0026 arr["c"] = value_to_lottie(this.closed); 0027 if ( this.in_tangents !== null ) 0028 arr["i"] = value_to_lottie(this.in_tangents); 0029 if ( this.out_tangents !== null ) 0030 arr["o"] = value_to_lottie(this.out_tangents); 0031 if ( this.vertices !== null ) 0032 arr["v"] = value_to_lottie(this.vertices); 0033 return arr; 0034 } 0035 0036 static from_lottie(arr) 0037 { 0038 var obj = new Bezier(); 0039 if ( arr["c"] !== undefined ) 0040 obj.closed = value_from_lottie(arr["c"]); 0041 if ( arr["i"] !== undefined ) 0042 obj.in_tangents = value_from_lottie(arr["i"]); 0043 if ( arr["o"] !== undefined ) 0044 obj.out_tangents = value_from_lottie(arr["o"]); 0045 if ( arr["v"] !== undefined ) 0046 obj.vertices = value_from_lottie(arr["v"]); 0047 return obj; 0048 } 0049 } 0050