968294ef-3131-4d80-a94e-779269c8990e.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. "use strict";
  2. cc._RF.push(module, '96829TvMTFNgKlOd5JpyJkO', 'QEasing');
  3. // scripts/Framework/QEasing.ts
  4. "use strict";
  5. var __extends = (this && this.__extends) || (function () {
  6. var extendStatics = function (d, b) {
  7. extendStatics = Object.setPrototypeOf ||
  8. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  9. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  10. return extendStatics(d, b);
  11. };
  12. return function (d, b) {
  13. extendStatics(d, b);
  14. function __() { this.constructor = d; }
  15. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  16. };
  17. })();
  18. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  19. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  20. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  21. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  22. return c > 3 && r && Object.defineProperty(target, key, r), r;
  23. };
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. exports.EaseType = void 0;
  26. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  27. var EaseType;
  28. (function (EaseType) {
  29. EaseType[EaseType["none"] = 0] = "none";
  30. EaseType[EaseType["easeIn"] = 1] = "easeIn";
  31. EaseType[EaseType["easeOut"] = 2] = "easeOut";
  32. EaseType[EaseType["easeInOut"] = 3] = "easeInOut";
  33. EaseType[EaseType["easeExponentialIn"] = 4] = "easeExponentialIn";
  34. EaseType[EaseType["easeExponentialOut"] = 5] = "easeExponentialOut";
  35. EaseType[EaseType["easeExponentialInOut"] = 6] = "easeExponentialInOut";
  36. EaseType[EaseType["easeSineIn"] = 7] = "easeSineIn";
  37. EaseType[EaseType["easeSineOut"] = 8] = "easeSineOut";
  38. EaseType[EaseType["easeSineInOut"] = 9] = "easeSineInOut";
  39. EaseType[EaseType["easeElasticIn"] = 10] = "easeElasticIn";
  40. EaseType[EaseType["easeElasticOut"] = 11] = "easeElasticOut";
  41. EaseType[EaseType["easeElasticInOut"] = 12] = "easeElasticInOut";
  42. EaseType[EaseType["easeBounceIn"] = 13] = "easeBounceIn";
  43. EaseType[EaseType["easeBounceOut"] = 14] = "easeBounceOut";
  44. EaseType[EaseType["easeBounceInOut"] = 15] = "easeBounceInOut";
  45. EaseType[EaseType["easeBackIn"] = 16] = "easeBackIn";
  46. EaseType[EaseType["easeBackOut"] = 17] = "easeBackOut";
  47. EaseType[EaseType["easeBackInOut"] = 18] = "easeBackInOut";
  48. EaseType[EaseType["easeBezierAction"] = 19] = "easeBezierAction";
  49. EaseType[EaseType["easeQuadraticActionIn"] = 20] = "easeQuadraticActionIn";
  50. EaseType[EaseType["easeQuadraticActionOut"] = 21] = "easeQuadraticActionOut";
  51. EaseType[EaseType["easeQuadraticActionInOut"] = 22] = "easeQuadraticActionInOut";
  52. EaseType[EaseType["easeQuarticActionIn"] = 23] = "easeQuarticActionIn";
  53. EaseType[EaseType["easeQuarticActionOut"] = 24] = "easeQuarticActionOut";
  54. EaseType[EaseType["easeQuarticActionInOut"] = 25] = "easeQuarticActionInOut";
  55. EaseType[EaseType["easeQuinticActionIn"] = 26] = "easeQuinticActionIn";
  56. EaseType[EaseType["easeQuinticActionOut"] = 27] = "easeQuinticActionOut";
  57. EaseType[EaseType["easeQuinticActionInOut"] = 28] = "easeQuinticActionInOut";
  58. EaseType[EaseType["easeCircleActionIn"] = 29] = "easeCircleActionIn";
  59. EaseType[EaseType["easeCircleActionOut"] = 30] = "easeCircleActionOut";
  60. EaseType[EaseType["easeCircleActionInOut"] = 31] = "easeCircleActionInOut";
  61. EaseType[EaseType["easeCubicActionIn"] = 32] = "easeCubicActionIn";
  62. EaseType[EaseType["easeCubicActionOut"] = 33] = "easeCubicActionOut";
  63. EaseType[EaseType["easeCubicActionInOut"] = 34] = "easeCubicActionInOut";
  64. })(EaseType = exports.EaseType || (exports.EaseType = {}));
  65. var QEasing = /** @class */ (function (_super) {
  66. __extends(QEasing, _super);
  67. function QEasing() {
  68. var _this = _super !== null && _super.apply(this, arguments) || this;
  69. _this.easeType = EaseType.none;
  70. return _this;
  71. }
  72. QEasing.prototype._getEase = function () {
  73. switch (this.easeType) {
  74. case EaseType.none: {
  75. return "linear";
  76. }
  77. case EaseType.easeOut: {
  78. return "easeOut";
  79. }
  80. case EaseType.easeInOut: {
  81. return "easeInOut";
  82. }
  83. case EaseType.easeExponentialIn: {
  84. return "easeExponentialIn";
  85. }
  86. case EaseType.easeExponentialOut: {
  87. return "easeExponentialOut";
  88. }
  89. case EaseType.easeExponentialInOut: {
  90. return "easeExponentialInOut";
  91. }
  92. case EaseType.easeSineIn: {
  93. return "sineIn";
  94. }
  95. case EaseType.easeSineOut: {
  96. return "sineOut";
  97. }
  98. case EaseType.easeSineInOut: {
  99. return "sineInOut";
  100. }
  101. case EaseType.easeElasticIn: {
  102. return "elasticIn";
  103. }
  104. case EaseType.easeElasticOut: {
  105. return "elasticOut";
  106. }
  107. case EaseType.easeElasticInOut: {
  108. return "elasticInOut";
  109. }
  110. case EaseType.easeBounceIn: {
  111. return "bounceIn";
  112. }
  113. case EaseType.easeBounceOut: {
  114. return "bounceOut";
  115. }
  116. case EaseType.easeBackIn: {
  117. return "backIn";
  118. }
  119. case EaseType.easeBackOut: {
  120. return 'backOut';
  121. }
  122. case EaseType.easeBackInOut: {
  123. return "backInOut";
  124. }
  125. case EaseType.easeQuadraticActionIn: {
  126. return "quadraticActionIn";
  127. }
  128. case EaseType.easeQuadraticActionOut: {
  129. return "quadraticActionOut";
  130. }
  131. case EaseType.easeQuadraticActionInOut: {
  132. return "quadraticActionInOut";
  133. }
  134. case EaseType.easeQuarticActionIn: {
  135. return "quarticActionIn";
  136. }
  137. case EaseType.easeQuarticActionOut: {
  138. return "quarticActionOut";
  139. }
  140. case EaseType.easeQuarticActionInOut: {
  141. return "quarticActionInOut";
  142. }
  143. case EaseType.easeQuinticActionIn: {
  144. return "quinticActionIn";
  145. }
  146. case EaseType.easeQuinticActionOut: {
  147. return "quinticActionOut";
  148. }
  149. case EaseType.easeQuinticActionInOut: {
  150. return "quinticActionInOut";
  151. }
  152. case EaseType.easeCircleActionIn: {
  153. return "easeCircleActionIn";
  154. }
  155. case EaseType.easeCircleActionOut: {
  156. return "circleActionOut";
  157. }
  158. case EaseType.easeCircleActionInOut: {
  159. return "circleActionInOut";
  160. }
  161. case EaseType.easeCubicActionIn: {
  162. return "cubicActionIn";
  163. }
  164. case EaseType.easeCubicActionOut: {
  165. return "cubicActionOut";
  166. }
  167. case EaseType.easeCubicActionInOut: {
  168. return "cubicActionInOut";
  169. }
  170. }
  171. };
  172. __decorate([
  173. property({ type: cc.Enum(EaseType) })
  174. ], QEasing.prototype, "easeType", void 0);
  175. QEasing = __decorate([
  176. ccclass
  177. ], QEasing);
  178. return QEasing;
  179. }(cc.Component));
  180. exports.default = QEasing;
  181. cc._RF.pop();