File indexing completed on 2025-01-19 03:59:59
0001 import { value_to_lottie, value_from_lottie, LottieObject } from '../base.js'; 0002 import { Value, MultiDimensional } from './properties.js'; 0003 0004 /*! 0005 Value for an effect 0006 */ 0007 export class EffectValue extends LottieObject 0008 { 0009 effect_index; 0010 name; 0011 type; 0012 0013 constructor() 0014 { 0015 super(); 0016 this.effect_index = null; 0017 this.name = null; 0018 this.type = null; 0019 } 0020 0021 to_lottie() 0022 { 0023 var arr = {}; 0024 if ( this.effect_index !== null ) 0025 arr["ix"] = value_to_lottie(this.effect_index); 0026 if ( this.name !== null ) 0027 arr["nm"] = value_to_lottie(this.name); 0028 if ( this.type !== null ) 0029 arr["ty"] = value_to_lottie(this.type); 0030 return arr; 0031 } 0032 0033 static from_lottie(arr) 0034 { 0035 var obj = new EffectValue(); 0036 if ( arr["ix"] !== undefined ) 0037 obj.effect_index = value_from_lottie(arr["ix"]); 0038 if ( arr["nm"] !== undefined ) 0039 obj.name = value_from_lottie(arr["nm"]); 0040 if ( arr["ty"] !== undefined ) 0041 obj.type = value_from_lottie(arr["ty"]); 0042 return obj; 0043 } 0044 } 0045 0046 /* 0047 */ 0048 export class EffectValueAngle extends EffectValue 0049 { 0050 effect_index; 0051 name; 0052 type; 0053 value; 0054 0055 constructor() 0056 { 0057 super(); 0058 this.effect_index = null; 0059 this.name = null; 0060 this.type = null; 0061 this.value = new Value(0); 0062 } 0063 0064 to_lottie() 0065 { 0066 var arr = {}; 0067 if ( this.effect_index !== null ) 0068 arr["ix"] = value_to_lottie(this.effect_index); 0069 if ( this.name !== null ) 0070 arr["nm"] = value_to_lottie(this.name); 0071 if ( this.type !== null ) 0072 arr["ty"] = value_to_lottie(this.type); 0073 if ( this.value !== null ) 0074 arr["v"] = value_to_lottie(this.value); 0075 return arr; 0076 } 0077 0078 static from_lottie(arr) 0079 { 0080 var obj = new EffectValueAngle(); 0081 if ( arr["ix"] !== undefined ) 0082 obj.effect_index = value_from_lottie(arr["ix"]); 0083 if ( arr["nm"] !== undefined ) 0084 obj.name = value_from_lottie(arr["nm"]); 0085 if ( arr["ty"] !== undefined ) 0086 obj.type = value_from_lottie(arr["ty"]); 0087 if ( arr["v"] !== undefined ) 0088 obj.value = value_from_lottie(arr["v"]); 0089 return obj; 0090 } 0091 } 0092 0093 /* 0094 */ 0095 export class EffectValueCheckbox extends EffectValue 0096 { 0097 effect_index; 0098 name; 0099 type; 0100 value; 0101 0102 constructor() 0103 { 0104 super(); 0105 this.effect_index = null; 0106 this.name = null; 0107 this.type = null; 0108 this.value = new Value(0); 0109 } 0110 0111 to_lottie() 0112 { 0113 var arr = {}; 0114 if ( this.effect_index !== null ) 0115 arr["ix"] = value_to_lottie(this.effect_index); 0116 if ( this.name !== null ) 0117 arr["nm"] = value_to_lottie(this.name); 0118 if ( this.type !== null ) 0119 arr["ty"] = value_to_lottie(this.type); 0120 if ( this.value !== null ) 0121 arr["v"] = value_to_lottie(this.value); 0122 return arr; 0123 } 0124 0125 static from_lottie(arr) 0126 { 0127 var obj = new EffectValueCheckbox(); 0128 if ( arr["ix"] !== undefined ) 0129 obj.effect_index = value_from_lottie(arr["ix"]); 0130 if ( arr["nm"] !== undefined ) 0131 obj.name = value_from_lottie(arr["nm"]); 0132 if ( arr["ty"] !== undefined ) 0133 obj.type = value_from_lottie(arr["ty"]); 0134 if ( arr["v"] !== undefined ) 0135 obj.value = value_from_lottie(arr["v"]); 0136 return obj; 0137 } 0138 } 0139 0140 /* 0141 */ 0142 export class EffectValueColor extends EffectValue 0143 { 0144 effect_index; 0145 name; 0146 type; 0147 value; 0148 0149 constructor() 0150 { 0151 super(); 0152 this.effect_index = null; 0153 this.name = null; 0154 this.type = null; 0155 this.value = new MultiDimensional([0, 0, 0]); 0156 } 0157 0158 to_lottie() 0159 { 0160 var arr = {}; 0161 if ( this.effect_index !== null ) 0162 arr["ix"] = value_to_lottie(this.effect_index); 0163 if ( this.name !== null ) 0164 arr["nm"] = value_to_lottie(this.name); 0165 if ( this.type !== null ) 0166 arr["ty"] = value_to_lottie(this.type); 0167 if ( this.value !== null ) 0168 arr["v"] = value_to_lottie(this.value); 0169 return arr; 0170 } 0171 0172 static from_lottie(arr) 0173 { 0174 var obj = new EffectValueColor(); 0175 if ( arr["ix"] !== undefined ) 0176 obj.effect_index = value_from_lottie(arr["ix"]); 0177 if ( arr["nm"] !== undefined ) 0178 obj.name = value_from_lottie(arr["nm"]); 0179 if ( arr["ty"] !== undefined ) 0180 obj.type = value_from_lottie(arr["ty"]); 0181 if ( arr["v"] !== undefined ) 0182 obj.value = value_from_lottie(arr["v"]); 0183 return obj; 0184 } 0185 } 0186 0187 /* 0188 */ 0189 export class EffectValueDropDown extends EffectValue 0190 { 0191 effect_index; 0192 name; 0193 type; 0194 value; 0195 0196 constructor() 0197 { 0198 super(); 0199 this.effect_index = null; 0200 this.name = null; 0201 this.type = null; 0202 this.value = new Value(0); 0203 } 0204 0205 to_lottie() 0206 { 0207 var arr = {}; 0208 if ( this.effect_index !== null ) 0209 arr["ix"] = value_to_lottie(this.effect_index); 0210 if ( this.name !== null ) 0211 arr["nm"] = value_to_lottie(this.name); 0212 if ( this.type !== null ) 0213 arr["ty"] = value_to_lottie(this.type); 0214 if ( this.value !== null ) 0215 arr["v"] = value_to_lottie(this.value); 0216 return arr; 0217 } 0218 0219 static from_lottie(arr) 0220 { 0221 var obj = new EffectValueDropDown(); 0222 if ( arr["ix"] !== undefined ) 0223 obj.effect_index = value_from_lottie(arr["ix"]); 0224 if ( arr["nm"] !== undefined ) 0225 obj.name = value_from_lottie(arr["nm"]); 0226 if ( arr["ty"] !== undefined ) 0227 obj.type = value_from_lottie(arr["ty"]); 0228 if ( arr["v"] !== undefined ) 0229 obj.value = value_from_lottie(arr["v"]); 0230 return obj; 0231 } 0232 } 0233 0234 /* 0235 */ 0236 export class EffectValueLayer extends EffectValue 0237 { 0238 effect_index; 0239 name; 0240 type; 0241 value; 0242 0243 constructor() 0244 { 0245 super(); 0246 this.effect_index = null; 0247 this.name = null; 0248 this.type = null; 0249 this.value = new Value(0); 0250 } 0251 0252 to_lottie() 0253 { 0254 var arr = {}; 0255 if ( this.effect_index !== null ) 0256 arr["ix"] = value_to_lottie(this.effect_index); 0257 if ( this.name !== null ) 0258 arr["nm"] = value_to_lottie(this.name); 0259 if ( this.type !== null ) 0260 arr["ty"] = value_to_lottie(this.type); 0261 if ( this.value !== null ) 0262 arr["v"] = value_to_lottie(this.value); 0263 return arr; 0264 } 0265 0266 static from_lottie(arr) 0267 { 0268 var obj = new EffectValueLayer(); 0269 if ( arr["ix"] !== undefined ) 0270 obj.effect_index = value_from_lottie(arr["ix"]); 0271 if ( arr["nm"] !== undefined ) 0272 obj.name = value_from_lottie(arr["nm"]); 0273 if ( arr["ty"] !== undefined ) 0274 obj.type = value_from_lottie(arr["ty"]); 0275 if ( arr["v"] !== undefined ) 0276 obj.value = value_from_lottie(arr["v"]); 0277 return obj; 0278 } 0279 } 0280 0281 /* 0282 */ 0283 export class EffectValuePoint extends EffectValue 0284 { 0285 effect_index; 0286 name; 0287 type; 0288 value; 0289 0290 constructor() 0291 { 0292 super(); 0293 this.effect_index = null; 0294 this.name = null; 0295 this.type = null; 0296 this.value = new MultiDimensional([0, 0]); 0297 } 0298 0299 to_lottie() 0300 { 0301 var arr = {}; 0302 if ( this.effect_index !== null ) 0303 arr["ix"] = value_to_lottie(this.effect_index); 0304 if ( this.name !== null ) 0305 arr["nm"] = value_to_lottie(this.name); 0306 if ( this.type !== null ) 0307 arr["ty"] = value_to_lottie(this.type); 0308 if ( this.value !== null ) 0309 arr["v"] = value_to_lottie(this.value); 0310 return arr; 0311 } 0312 0313 static from_lottie(arr) 0314 { 0315 var obj = new EffectValuePoint(); 0316 if ( arr["ix"] !== undefined ) 0317 obj.effect_index = value_from_lottie(arr["ix"]); 0318 if ( arr["nm"] !== undefined ) 0319 obj.name = value_from_lottie(arr["nm"]); 0320 if ( arr["ty"] !== undefined ) 0321 obj.type = value_from_lottie(arr["ty"]); 0322 if ( arr["v"] !== undefined ) 0323 obj.value = value_from_lottie(arr["v"]); 0324 return obj; 0325 } 0326 } 0327 0328 /* 0329 */ 0330 export class EffectValueSlider extends EffectValue 0331 { 0332 effect_index; 0333 name; 0334 type; 0335 value; 0336 0337 constructor() 0338 { 0339 super(); 0340 this.effect_index = null; 0341 this.name = null; 0342 this.type = null; 0343 this.value = new Value(0); 0344 } 0345 0346 to_lottie() 0347 { 0348 var arr = {}; 0349 if ( this.effect_index !== null ) 0350 arr["ix"] = value_to_lottie(this.effect_index); 0351 if ( this.name !== null ) 0352 arr["nm"] = value_to_lottie(this.name); 0353 if ( this.type !== null ) 0354 arr["ty"] = value_to_lottie(this.type); 0355 if ( this.value !== null ) 0356 arr["v"] = value_to_lottie(this.value); 0357 return arr; 0358 } 0359 0360 static from_lottie(arr) 0361 { 0362 var obj = new EffectValueSlider(); 0363 if ( arr["ix"] !== undefined ) 0364 obj.effect_index = value_from_lottie(arr["ix"]); 0365 if ( arr["nm"] !== undefined ) 0366 obj.name = value_from_lottie(arr["nm"]); 0367 if ( arr["ty"] !== undefined ) 0368 obj.type = value_from_lottie(arr["ty"]); 0369 if ( arr["v"] !== undefined ) 0370 obj.value = value_from_lottie(arr["v"]); 0371 return obj; 0372 } 0373 } 0374 0375 /*! 0376 Layer effect 0377 */ 0378 export class Effect extends LottieObject 0379 { 0380 effect_index; 0381 name; 0382 type; 0383 effects; 0384 0385 constructor() 0386 { 0387 super(); 0388 this.effect_index = null; 0389 this.name = null; 0390 this.type = null; 0391 this.effects = []; 0392 } 0393 0394 to_lottie() 0395 { 0396 var arr = {}; 0397 if ( this.effect_index !== null ) 0398 arr["ix"] = value_to_lottie(this.effect_index); 0399 if ( this.name !== null ) 0400 arr["nm"] = value_to_lottie(this.name); 0401 if ( this.type !== null ) 0402 arr["ty"] = value_to_lottie(this.type); 0403 if ( this.effects !== null ) 0404 arr["ef"] = value_to_lottie(this.effects); 0405 return arr; 0406 } 0407 0408 static from_lottie(arr) 0409 { 0410 var obj = new Effect(); 0411 if ( arr["ix"] !== undefined ) 0412 obj.effect_index = value_from_lottie(arr["ix"]); 0413 if ( arr["nm"] !== undefined ) 0414 obj.name = value_from_lottie(arr["nm"]); 0415 if ( arr["ty"] !== undefined ) 0416 obj.type = value_from_lottie(arr["ty"]); 0417 if ( arr["ef"] !== undefined ) 0418 obj.effects = value_from_lottie(arr["ef"]); 0419 return obj; 0420 } 0421 } 0422 0423 /* 0424 */ 0425 export class EffectNoValue extends EffectValue 0426 { 0427 effect_index; 0428 name; 0429 type; 0430 0431 constructor() 0432 { 0433 super(); 0434 this.effect_index = null; 0435 this.name = null; 0436 this.type = null; 0437 } 0438 0439 to_lottie() 0440 { 0441 var arr = {}; 0442 if ( this.effect_index !== null ) 0443 arr["ix"] = value_to_lottie(this.effect_index); 0444 if ( this.name !== null ) 0445 arr["nm"] = value_to_lottie(this.name); 0446 if ( this.type !== null ) 0447 arr["ty"] = value_to_lottie(this.type); 0448 return arr; 0449 } 0450 0451 static from_lottie(arr) 0452 { 0453 var obj = new EffectNoValue(); 0454 if ( arr["ix"] !== undefined ) 0455 obj.effect_index = value_from_lottie(arr["ix"]); 0456 if ( arr["nm"] !== undefined ) 0457 obj.name = value_from_lottie(arr["nm"]); 0458 if ( arr["ty"] !== undefined ) 0459 obj.type = value_from_lottie(arr["ty"]); 0460 return obj; 0461 } 0462 } 0463 0464 /*! 0465 Replaces the whole layer with the given color 0466 @note Opacity is in [0, 1] 0467 */ 0468 export class FillEffect extends Effect 0469 { 0470 effect_index; 0471 name; 0472 type; 0473 effects; 0474 0475 constructor() 0476 { 0477 super(); 0478 this.effect_index = null; 0479 this.name = null; 0480 this.type = null; 0481 this.effects = [new EffectValuePoint(), new EffectValueDropDown(), new EffectValueColor(), new EffectValueDropDown(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider()]; 0482 } 0483 0484 to_lottie() 0485 { 0486 var arr = {}; 0487 if ( this.effect_index !== null ) 0488 arr["ix"] = value_to_lottie(this.effect_index); 0489 if ( this.name !== null ) 0490 arr["nm"] = value_to_lottie(this.name); 0491 if ( this.type !== null ) 0492 arr["ty"] = value_to_lottie(this.type); 0493 if ( this.effects !== null ) 0494 arr["ef"] = value_to_lottie(this.effects); 0495 return arr; 0496 } 0497 0498 static from_lottie(arr) 0499 { 0500 var obj = new FillEffect(); 0501 if ( arr["ix"] !== undefined ) 0502 obj.effect_index = value_from_lottie(arr["ix"]); 0503 if ( arr["nm"] !== undefined ) 0504 obj.name = value_from_lottie(arr["nm"]); 0505 if ( arr["ty"] !== undefined ) 0506 obj.type = value_from_lottie(arr["ty"]); 0507 if ( arr["ef"] !== undefined ) 0508 obj.effects = value_from_lottie(arr["ef"]); 0509 return obj; 0510 } 0511 } 0512 0513 /*! 0514 Gaussian blur 0515 */ 0516 export class GaussianBlurEffect extends Effect 0517 { 0518 effect_index; 0519 name; 0520 type; 0521 effects; 0522 0523 constructor() 0524 { 0525 super(); 0526 this.effect_index = null; 0527 this.name = null; 0528 this.type = null; 0529 this.effects = [new EffectValueSlider(), new EffectValueSlider(), new EffectValueCheckbox()]; 0530 } 0531 0532 to_lottie() 0533 { 0534 var arr = {}; 0535 if ( this.effect_index !== null ) 0536 arr["ix"] = value_to_lottie(this.effect_index); 0537 if ( this.name !== null ) 0538 arr["nm"] = value_to_lottie(this.name); 0539 if ( this.type !== null ) 0540 arr["ty"] = value_to_lottie(this.type); 0541 if ( this.effects !== null ) 0542 arr["ef"] = value_to_lottie(this.effects); 0543 return arr; 0544 } 0545 0546 static from_lottie(arr) 0547 { 0548 var obj = new GaussianBlurEffect(); 0549 if ( arr["ix"] !== undefined ) 0550 obj.effect_index = value_from_lottie(arr["ix"]); 0551 if ( arr["nm"] !== undefined ) 0552 obj.name = value_from_lottie(arr["nm"]); 0553 if ( arr["ty"] !== undefined ) 0554 obj.type = value_from_lottie(arr["ty"]); 0555 if ( arr["ef"] !== undefined ) 0556 obj.effects = value_from_lottie(arr["ef"]); 0557 return obj; 0558 } 0559 } 0560 0561 /* 0562 */ 0563 export class Matte3Effect extends Effect 0564 { 0565 effect_index; 0566 name; 0567 type; 0568 effects; 0569 0570 constructor() 0571 { 0572 super(); 0573 this.effect_index = null; 0574 this.name = null; 0575 this.type = null; 0576 this.effects = [new EffectValueSlider()]; 0577 } 0578 0579 to_lottie() 0580 { 0581 var arr = {}; 0582 if ( this.effect_index !== null ) 0583 arr["ix"] = value_to_lottie(this.effect_index); 0584 if ( this.name !== null ) 0585 arr["nm"] = value_to_lottie(this.name); 0586 if ( this.type !== null ) 0587 arr["ty"] = value_to_lottie(this.type); 0588 if ( this.effects !== null ) 0589 arr["ef"] = value_to_lottie(this.effects); 0590 return arr; 0591 } 0592 0593 static from_lottie(arr) 0594 { 0595 var obj = new Matte3Effect(); 0596 if ( arr["ix"] !== undefined ) 0597 obj.effect_index = value_from_lottie(arr["ix"]); 0598 if ( arr["nm"] !== undefined ) 0599 obj.name = value_from_lottie(arr["nm"]); 0600 if ( arr["ty"] !== undefined ) 0601 obj.type = value_from_lottie(arr["ty"]); 0602 if ( arr["ef"] !== undefined ) 0603 obj.effects = value_from_lottie(arr["ef"]); 0604 return obj; 0605 } 0606 } 0607 0608 /* 0609 */ 0610 export class ProLevelsEffect extends Effect 0611 { 0612 effect_index; 0613 name; 0614 type; 0615 effects; 0616 0617 constructor() 0618 { 0619 super(); 0620 this.effect_index = null; 0621 this.name = null; 0622 this.type = null; 0623 this.effects = [new EffectValueDropDown(), new EffectNoValue(), new EffectNoValue(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectNoValue(), new EffectNoValue(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectNoValue(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectNoValue(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectNoValue(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectNoValue()]; 0624 } 0625 0626 to_lottie() 0627 { 0628 var arr = {}; 0629 if ( this.effect_index !== null ) 0630 arr["ix"] = value_to_lottie(this.effect_index); 0631 if ( this.name !== null ) 0632 arr["nm"] = value_to_lottie(this.name); 0633 if ( this.type !== null ) 0634 arr["ty"] = value_to_lottie(this.type); 0635 if ( this.effects !== null ) 0636 arr["ef"] = value_to_lottie(this.effects); 0637 return arr; 0638 } 0639 0640 static from_lottie(arr) 0641 { 0642 var obj = new ProLevelsEffect(); 0643 if ( arr["ix"] !== undefined ) 0644 obj.effect_index = value_from_lottie(arr["ix"]); 0645 if ( arr["nm"] !== undefined ) 0646 obj.name = value_from_lottie(arr["nm"]); 0647 if ( arr["ty"] !== undefined ) 0648 obj.type = value_from_lottie(arr["ty"]); 0649 if ( arr["ef"] !== undefined ) 0650 obj.effects = value_from_lottie(arr["ef"]); 0651 return obj; 0652 } 0653 } 0654 0655 /* 0656 */ 0657 export class StrokeEffect extends Effect 0658 { 0659 effect_index; 0660 name; 0661 type; 0662 effects; 0663 0664 constructor() 0665 { 0666 super(); 0667 this.effect_index = null; 0668 this.name = null; 0669 this.type = null; 0670 this.effects = [new EffectValueColor(), new EffectValueCheckbox(), new EffectValueCheckbox(), new EffectValueColor(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueDropDown(), new EffectValueDropDown()]; 0671 } 0672 0673 to_lottie() 0674 { 0675 var arr = {}; 0676 if ( this.effect_index !== null ) 0677 arr["ix"] = value_to_lottie(this.effect_index); 0678 if ( this.name !== null ) 0679 arr["nm"] = value_to_lottie(this.name); 0680 if ( this.type !== null ) 0681 arr["ty"] = value_to_lottie(this.type); 0682 if ( this.effects !== null ) 0683 arr["ef"] = value_to_lottie(this.effects); 0684 return arr; 0685 } 0686 0687 static from_lottie(arr) 0688 { 0689 var obj = new StrokeEffect(); 0690 if ( arr["ix"] !== undefined ) 0691 obj.effect_index = value_from_lottie(arr["ix"]); 0692 if ( arr["nm"] !== undefined ) 0693 obj.name = value_from_lottie(arr["nm"]); 0694 if ( arr["ty"] !== undefined ) 0695 obj.type = value_from_lottie(arr["ty"]); 0696 if ( arr["ef"] !== undefined ) 0697 obj.effects = value_from_lottie(arr["ef"]); 0698 return obj; 0699 } 0700 } 0701 0702 /*! 0703 Colorizes the layer 0704 @note Opacity is in [0, 100] 0705 */ 0706 export class TintEffect extends Effect 0707 { 0708 effect_index; 0709 name; 0710 type; 0711 effects; 0712 0713 constructor() 0714 { 0715 super(); 0716 this.effect_index = null; 0717 this.name = null; 0718 this.type = null; 0719 this.effects = [new EffectValueColor(), new EffectValueColor(), new EffectValueSlider()]; 0720 } 0721 0722 to_lottie() 0723 { 0724 var arr = {}; 0725 if ( this.effect_index !== null ) 0726 arr["ix"] = value_to_lottie(this.effect_index); 0727 if ( this.name !== null ) 0728 arr["nm"] = value_to_lottie(this.name); 0729 if ( this.type !== null ) 0730 arr["ty"] = value_to_lottie(this.type); 0731 if ( this.effects !== null ) 0732 arr["ef"] = value_to_lottie(this.effects); 0733 return arr; 0734 } 0735 0736 static from_lottie(arr) 0737 { 0738 var obj = new TintEffect(); 0739 if ( arr["ix"] !== undefined ) 0740 obj.effect_index = value_from_lottie(arr["ix"]); 0741 if ( arr["nm"] !== undefined ) 0742 obj.name = value_from_lottie(arr["nm"]); 0743 if ( arr["ty"] !== undefined ) 0744 obj.type = value_from_lottie(arr["ty"]); 0745 if ( arr["ef"] !== undefined ) 0746 obj.effects = value_from_lottie(arr["ef"]); 0747 return obj; 0748 } 0749 } 0750 0751 /*! 0752 Maps layers colors based on bright/mid/dark colors 0753 */ 0754 export class TritoneEffect extends Effect 0755 { 0756 effect_index; 0757 name; 0758 type; 0759 effects; 0760 0761 constructor() 0762 { 0763 super(); 0764 this.effect_index = null; 0765 this.name = null; 0766 this.type = null; 0767 this.effects = [new EffectValueColor(), new EffectValueColor(), new EffectValueColor()]; 0768 } 0769 0770 to_lottie() 0771 { 0772 var arr = {}; 0773 if ( this.effect_index !== null ) 0774 arr["ix"] = value_to_lottie(this.effect_index); 0775 if ( this.name !== null ) 0776 arr["nm"] = value_to_lottie(this.name); 0777 if ( this.type !== null ) 0778 arr["ty"] = value_to_lottie(this.type); 0779 if ( this.effects !== null ) 0780 arr["ef"] = value_to_lottie(this.effects); 0781 return arr; 0782 } 0783 0784 static from_lottie(arr) 0785 { 0786 var obj = new TritoneEffect(); 0787 if ( arr["ix"] !== undefined ) 0788 obj.effect_index = value_from_lottie(arr["ix"]); 0789 if ( arr["nm"] !== undefined ) 0790 obj.name = value_from_lottie(arr["nm"]); 0791 if ( arr["ty"] !== undefined ) 0792 obj.type = value_from_lottie(arr["ty"]); 0793 if ( arr["ef"] !== undefined ) 0794 obj.effects = value_from_lottie(arr["ef"]); 0795 return obj; 0796 } 0797 } 0798 0799 /*! 0800 Gaussian blur 0801 */ 0802 export class ChangeColorEffect extends Effect 0803 { 0804 effect_index; 0805 name; 0806 type; 0807 effects; 0808 0809 constructor() 0810 { 0811 super(); 0812 this.effect_index = null; 0813 this.name = null; 0814 this.type = null; 0815 this.effects = [new EffectValueDropDown(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueColor(), new EffectValueSlider(), new EffectValueSlider(), new EffectValueDropDown(), new EffectValueDropDown()]; 0816 } 0817 0818 to_lottie() 0819 { 0820 var arr = {}; 0821 if ( this.effect_index !== null ) 0822 arr["ix"] = value_to_lottie(this.effect_index); 0823 if ( this.name !== null ) 0824 arr["nm"] = value_to_lottie(this.name); 0825 if ( this.type !== null ) 0826 arr["ty"] = value_to_lottie(this.type); 0827 if ( this.effects !== null ) 0828 arr["ef"] = value_to_lottie(this.effects); 0829 return arr; 0830 } 0831 0832 static from_lottie(arr) 0833 { 0834 var obj = new ChangeColorEffect(); 0835 if ( arr["ix"] !== undefined ) 0836 obj.effect_index = value_from_lottie(arr["ix"]); 0837 if ( arr["nm"] !== undefined ) 0838 obj.name = value_from_lottie(arr["nm"]); 0839 if ( arr["ty"] !== undefined ) 0840 obj.type = value_from_lottie(arr["ty"]); 0841 if ( arr["ef"] !== undefined ) 0842 obj.effects = value_from_lottie(arr["ef"]); 0843 return obj; 0844 } 0845 } 0846 0847 /*! 0848 Adds a shadow to the layer 0849 @note Opacity is in [0, 255] 0850 */ 0851 export class DropShadowEffect extends Effect 0852 { 0853 effect_index; 0854 name; 0855 type; 0856 effects; 0857 0858 constructor() 0859 { 0860 super(); 0861 this.effect_index = null; 0862 this.name = null; 0863 this.type = null; 0864 this.effects = [new EffectValueColor(), new EffectValueSlider(), new EffectValueAngle(), new EffectValueSlider(), new EffectValueSlider()]; 0865 } 0866 0867 to_lottie() 0868 { 0869 var arr = {}; 0870 if ( this.effect_index !== null ) 0871 arr["ix"] = value_to_lottie(this.effect_index); 0872 if ( this.name !== null ) 0873 arr["nm"] = value_to_lottie(this.name); 0874 if ( this.type !== null ) 0875 arr["ty"] = value_to_lottie(this.type); 0876 if ( this.effects !== null ) 0877 arr["ef"] = value_to_lottie(this.effects); 0878 return arr; 0879 } 0880 0881 static from_lottie(arr) 0882 { 0883 var obj = new DropShadowEffect(); 0884 if ( arr["ix"] !== undefined ) 0885 obj.effect_index = value_from_lottie(arr["ix"]); 0886 if ( arr["nm"] !== undefined ) 0887 obj.name = value_from_lottie(arr["nm"]); 0888 if ( arr["ty"] !== undefined ) 0889 obj.type = value_from_lottie(arr["ty"]); 0890 if ( arr["ef"] !== undefined ) 0891 obj.effects = value_from_lottie(arr["ef"]); 0892 return obj; 0893 } 0894 } 0895