智慧水务管理系统 - 精河县供水工程综合管理平台

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. /**
  4. * The Ease class provides a collection of easing functions for use with tween.js.
  5. */
  6. var Easing = Object.freeze({
  7. Linear: Object.freeze({
  8. None: function (amount) {
  9. return amount;
  10. },
  11. In: function (amount) {
  12. return amount;
  13. },
  14. Out: function (amount) {
  15. return amount;
  16. },
  17. InOut: function (amount) {
  18. return amount;
  19. },
  20. }),
  21. Quadratic: Object.freeze({
  22. In: function (amount) {
  23. return amount * amount;
  24. },
  25. Out: function (amount) {
  26. return amount * (2 - amount);
  27. },
  28. InOut: function (amount) {
  29. if ((amount *= 2) < 1) {
  30. return 0.5 * amount * amount;
  31. }
  32. return -0.5 * (--amount * (amount - 2) - 1);
  33. },
  34. }),
  35. Cubic: Object.freeze({
  36. In: function (amount) {
  37. return amount * amount * amount;
  38. },
  39. Out: function (amount) {
  40. return --amount * amount * amount + 1;
  41. },
  42. InOut: function (amount) {
  43. if ((amount *= 2) < 1) {
  44. return 0.5 * amount * amount * amount;
  45. }
  46. return 0.5 * ((amount -= 2) * amount * amount + 2);
  47. },
  48. }),
  49. Quartic: Object.freeze({
  50. In: function (amount) {
  51. return amount * amount * amount * amount;
  52. },
  53. Out: function (amount) {
  54. return 1 - --amount * amount * amount * amount;
  55. },
  56. InOut: function (amount) {
  57. if ((amount *= 2) < 1) {
  58. return 0.5 * amount * amount * amount * amount;
  59. }
  60. return -0.5 * ((amount -= 2) * amount * amount * amount - 2);
  61. },
  62. }),
  63. Quintic: Object.freeze({
  64. In: function (amount) {
  65. return amount * amount * amount * amount * amount;
  66. },
  67. Out: function (amount) {
  68. return --amount * amount * amount * amount * amount + 1;
  69. },
  70. InOut: function (amount) {
  71. if ((amount *= 2) < 1) {
  72. return 0.5 * amount * amount * amount * amount * amount;
  73. }
  74. return 0.5 * ((amount -= 2) * amount * amount * amount * amount + 2);
  75. },
  76. }),
  77. Sinusoidal: Object.freeze({
  78. In: function (amount) {
  79. return 1 - Math.sin(((1.0 - amount) * Math.PI) / 2);
  80. },
  81. Out: function (amount) {
  82. return Math.sin((amount * Math.PI) / 2);
  83. },
  84. InOut: function (amount) {
  85. return 0.5 * (1 - Math.sin(Math.PI * (0.5 - amount)));
  86. },
  87. }),
  88. Exponential: Object.freeze({
  89. In: function (amount) {
  90. return amount === 0 ? 0 : Math.pow(1024, amount - 1);
  91. },
  92. Out: function (amount) {
  93. return amount === 1 ? 1 : 1 - Math.pow(2, -10 * amount);
  94. },
  95. InOut: function (amount) {
  96. if (amount === 0) {
  97. return 0;
  98. }
  99. if (amount === 1) {
  100. return 1;
  101. }
  102. if ((amount *= 2) < 1) {
  103. return 0.5 * Math.pow(1024, amount - 1);
  104. }
  105. return 0.5 * (-Math.pow(2, -10 * (amount - 1)) + 2);
  106. },
  107. }),
  108. Circular: Object.freeze({
  109. In: function (amount) {
  110. return 1 - Math.sqrt(1 - amount * amount);
  111. },
  112. Out: function (amount) {
  113. return Math.sqrt(1 - --amount * amount);
  114. },
  115. InOut: function (amount) {
  116. if ((amount *= 2) < 1) {
  117. return -0.5 * (Math.sqrt(1 - amount * amount) - 1);
  118. }
  119. return 0.5 * (Math.sqrt(1 - (amount -= 2) * amount) + 1);
  120. },
  121. }),
  122. Elastic: Object.freeze({
  123. In: function (amount) {
  124. if (amount === 0) {
  125. return 0;
  126. }
  127. if (amount === 1) {
  128. return 1;
  129. }
  130. return -Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);
  131. },
  132. Out: function (amount) {
  133. if (amount === 0) {
  134. return 0;
  135. }
  136. if (amount === 1) {
  137. return 1;
  138. }
  139. return Math.pow(2, -10 * amount) * Math.sin((amount - 0.1) * 5 * Math.PI) + 1;
  140. },
  141. InOut: function (amount) {
  142. if (amount === 0) {
  143. return 0;
  144. }
  145. if (amount === 1) {
  146. return 1;
  147. }
  148. amount *= 2;
  149. if (amount < 1) {
  150. return -0.5 * Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);
  151. }
  152. return 0.5 * Math.pow(2, -10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI) + 1;
  153. },
  154. }),
  155. Back: Object.freeze({
  156. In: function (amount) {
  157. var s = 1.70158;
  158. return amount === 1 ? 1 : amount * amount * ((s + 1) * amount - s);
  159. },
  160. Out: function (amount) {
  161. var s = 1.70158;
  162. return amount === 0 ? 0 : --amount * amount * ((s + 1) * amount + s) + 1;
  163. },
  164. InOut: function (amount) {
  165. var s = 1.70158 * 1.525;
  166. if ((amount *= 2) < 1) {
  167. return 0.5 * (amount * amount * ((s + 1) * amount - s));
  168. }
  169. return 0.5 * ((amount -= 2) * amount * ((s + 1) * amount + s) + 2);
  170. },
  171. }),
  172. Bounce: Object.freeze({
  173. In: function (amount) {
  174. return 1 - Easing.Bounce.Out(1 - amount);
  175. },
  176. Out: function (amount) {
  177. if (amount < 1 / 2.75) {
  178. return 7.5625 * amount * amount;
  179. }
  180. else if (amount < 2 / 2.75) {
  181. return 7.5625 * (amount -= 1.5 / 2.75) * amount + 0.75;
  182. }
  183. else if (amount < 2.5 / 2.75) {
  184. return 7.5625 * (amount -= 2.25 / 2.75) * amount + 0.9375;
  185. }
  186. else {
  187. return 7.5625 * (amount -= 2.625 / 2.75) * amount + 0.984375;
  188. }
  189. },
  190. InOut: function (amount) {
  191. if (amount < 0.5) {
  192. return Easing.Bounce.In(amount * 2) * 0.5;
  193. }
  194. return Easing.Bounce.Out(amount * 2 - 1) * 0.5 + 0.5;
  195. },
  196. }),
  197. generatePow: function (power) {
  198. if (power === void 0) { power = 4; }
  199. power = power < Number.EPSILON ? Number.EPSILON : power;
  200. power = power > 10000 ? 10000 : power;
  201. return {
  202. In: function (amount) {
  203. return Math.pow(amount, power);
  204. },
  205. Out: function (amount) {
  206. return 1 - Math.pow((1 - amount), power);
  207. },
  208. InOut: function (amount) {
  209. if (amount < 0.5) {
  210. return Math.pow((amount * 2), power) / 2;
  211. }
  212. return (1 - Math.pow((2 - amount * 2), power)) / 2 + 0.5;
  213. },
  214. };
  215. },
  216. });
  217. var now = function () { return performance.now(); };
  218. /**
  219. * Controlling groups of tweens
  220. *
  221. * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.
  222. * In these cases, you may want to create your own smaller groups of tween
  223. */
  224. var Group = /** @class */ (function () {
  225. function Group() {
  226. var tweens = [];
  227. for (var _i = 0; _i < arguments.length; _i++) {
  228. tweens[_i] = arguments[_i];
  229. }
  230. this._tweens = {};
  231. this._tweensAddedDuringUpdate = {};
  232. this.add.apply(this, tweens);
  233. }
  234. Group.prototype.getAll = function () {
  235. var _this = this;
  236. return Object.keys(this._tweens).map(function (tweenId) { return _this._tweens[tweenId]; });
  237. };
  238. Group.prototype.removeAll = function () {
  239. this._tweens = {};
  240. };
  241. Group.prototype.add = function () {
  242. var _a;
  243. var tweens = [];
  244. for (var _i = 0; _i < arguments.length; _i++) {
  245. tweens[_i] = arguments[_i];
  246. }
  247. for (var _b = 0, tweens_1 = tweens; _b < tweens_1.length; _b++) {
  248. var tween = tweens_1[_b];
  249. // Remove from any other group first, a tween can only be in one group at a time.
  250. // @ts-expect-error library internal access
  251. (_a = tween._group) === null || _a === void 0 ? void 0 : _a.remove(tween);
  252. // @ts-expect-error library internal access
  253. tween._group = this;
  254. this._tweens[tween.getId()] = tween;
  255. this._tweensAddedDuringUpdate[tween.getId()] = tween;
  256. }
  257. };
  258. Group.prototype.remove = function () {
  259. var tweens = [];
  260. for (var _i = 0; _i < arguments.length; _i++) {
  261. tweens[_i] = arguments[_i];
  262. }
  263. for (var _a = 0, tweens_2 = tweens; _a < tweens_2.length; _a++) {
  264. var tween = tweens_2[_a];
  265. // @ts-expect-error library internal access
  266. tween._group = undefined;
  267. delete this._tweens[tween.getId()];
  268. delete this._tweensAddedDuringUpdate[tween.getId()];
  269. }
  270. };
  271. /** Return true if all tweens in the group are not paused or playing. */
  272. Group.prototype.allStopped = function () {
  273. return this.getAll().every(function (tween) { return !tween.isPlaying(); });
  274. };
  275. Group.prototype.update = function (time, preserve) {
  276. if (time === void 0) { time = now(); }
  277. if (preserve === void 0) { preserve = true; }
  278. var tweenIds = Object.keys(this._tweens);
  279. if (tweenIds.length === 0)
  280. return;
  281. // Tweens are updated in "batches". If you add a new tween during an
  282. // update, then the new tween will be updated in the next batch.
  283. // If you remove a tween during an update, it may or may not be updated.
  284. // However, if the removed tween was added during the current batch,
  285. // then it will not be updated.
  286. while (tweenIds.length > 0) {
  287. this._tweensAddedDuringUpdate = {};
  288. for (var i = 0; i < tweenIds.length; i++) {
  289. var tween = this._tweens[tweenIds[i]];
  290. var autoStart = !preserve;
  291. if (tween && tween.update(time, autoStart) === false && !preserve)
  292. this.remove(tween);
  293. }
  294. tweenIds = Object.keys(this._tweensAddedDuringUpdate);
  295. }
  296. };
  297. return Group;
  298. }());
  299. /**
  300. *
  301. */
  302. var Interpolation = {
  303. Linear: function (v, k) {
  304. var m = v.length - 1;
  305. var f = m * k;
  306. var i = Math.floor(f);
  307. var fn = Interpolation.Utils.Linear;
  308. if (k < 0) {
  309. return fn(v[0], v[1], f);
  310. }
  311. if (k > 1) {
  312. return fn(v[m], v[m - 1], m - f);
  313. }
  314. return fn(v[i], v[i + 1 > m ? m : i + 1], f - i);
  315. },
  316. Bezier: function (v, k) {
  317. var b = 0;
  318. var n = v.length - 1;
  319. var pw = Math.pow;
  320. var bn = Interpolation.Utils.Bernstein;
  321. for (var i = 0; i <= n; i++) {
  322. b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);
  323. }
  324. return b;
  325. },
  326. CatmullRom: function (v, k) {
  327. var m = v.length - 1;
  328. var f = m * k;
  329. var i = Math.floor(f);
  330. var fn = Interpolation.Utils.CatmullRom;
  331. if (v[0] === v[m]) {
  332. if (k < 0) {
  333. i = Math.floor((f = m * (1 + k)));
  334. }
  335. return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);
  336. }
  337. else {
  338. if (k < 0) {
  339. return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);
  340. }
  341. if (k > 1) {
  342. return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);
  343. }
  344. return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);
  345. }
  346. },
  347. Utils: {
  348. Linear: function (p0, p1, t) {
  349. return (p1 - p0) * t + p0;
  350. },
  351. Bernstein: function (n, i) {
  352. var fc = Interpolation.Utils.Factorial;
  353. return fc(n) / fc(i) / fc(n - i);
  354. },
  355. Factorial: (function () {
  356. var a = [1];
  357. return function (n) {
  358. var s = 1;
  359. if (a[n]) {
  360. return a[n];
  361. }
  362. for (var i = n; i > 1; i--) {
  363. s *= i;
  364. }
  365. a[n] = s;
  366. return s;
  367. };
  368. })(),
  369. CatmullRom: function (p0, p1, p2, p3, t) {
  370. var v0 = (p2 - p0) * 0.5;
  371. var v1 = (p3 - p1) * 0.5;
  372. var t2 = t * t;
  373. var t3 = t * t2;
  374. return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;
  375. },
  376. },
  377. };
  378. /**
  379. * Utils
  380. */
  381. var Sequence = /** @class */ (function () {
  382. function Sequence() {
  383. }
  384. Sequence.nextId = function () {
  385. return Sequence._nextId++;
  386. };
  387. Sequence._nextId = 0;
  388. return Sequence;
  389. }());
  390. var mainGroup = new Group();
  391. /**
  392. * Tween.js - Licensed under the MIT license
  393. * https://github.com/tweenjs/tween.js
  394. * ----------------------------------------------
  395. *
  396. * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
  397. * Thank you all, you're awesome!
  398. */
  399. var Tween = /** @class */ (function () {
  400. function Tween(object, group) {
  401. this._isPaused = false;
  402. this._pauseStart = 0;
  403. this._valuesStart = {};
  404. this._valuesEnd = {};
  405. this._valuesStartRepeat = {};
  406. this._duration = 1000;
  407. this._isDynamic = false;
  408. this._initialRepeat = 0;
  409. this._repeat = 0;
  410. this._yoyo = false;
  411. this._isPlaying = false;
  412. this._reversed = false;
  413. this._delayTime = 0;
  414. this._startTime = 0;
  415. this._easingFunction = Easing.Linear.None;
  416. this._interpolationFunction = Interpolation.Linear;
  417. // eslint-disable-next-line
  418. this._chainedTweens = [];
  419. this._onStartCallbackFired = false;
  420. this._onEveryStartCallbackFired = false;
  421. this._id = Sequence.nextId();
  422. this._isChainStopped = false;
  423. this._propertiesAreSetUp = false;
  424. this._goToEnd = false;
  425. this._object = object;
  426. if (typeof group === 'object') {
  427. this._group = group;
  428. group.add(this);
  429. }
  430. // Use "true" to restore old behavior (will be removed in future release).
  431. else if (group === true) {
  432. this._group = mainGroup;
  433. mainGroup.add(this);
  434. }
  435. }
  436. Tween.prototype.getId = function () {
  437. return this._id;
  438. };
  439. Tween.prototype.isPlaying = function () {
  440. return this._isPlaying;
  441. };
  442. Tween.prototype.isPaused = function () {
  443. return this._isPaused;
  444. };
  445. Tween.prototype.getDuration = function () {
  446. return this._duration;
  447. };
  448. Tween.prototype.to = function (target, duration) {
  449. if (duration === void 0) { duration = 1000; }
  450. if (this._isPlaying)
  451. throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
  452. this._valuesEnd = target;
  453. this._propertiesAreSetUp = false;
  454. this._duration = duration < 0 ? 0 : duration;
  455. return this;
  456. };
  457. Tween.prototype.duration = function (duration) {
  458. if (duration === void 0) { duration = 1000; }
  459. this._duration = duration < 0 ? 0 : duration;
  460. return this;
  461. };
  462. Tween.prototype.dynamic = function (dynamic) {
  463. if (dynamic === void 0) { dynamic = false; }
  464. this._isDynamic = dynamic;
  465. return this;
  466. };
  467. Tween.prototype.start = function (time, overrideStartingValues) {
  468. if (time === void 0) { time = now(); }
  469. if (overrideStartingValues === void 0) { overrideStartingValues = false; }
  470. if (this._isPlaying) {
  471. return this;
  472. }
  473. this._repeat = this._initialRepeat;
  474. if (this._reversed) {
  475. // If we were reversed (f.e. using the yoyo feature) then we need to
  476. // flip the tween direction back to forward.
  477. this._reversed = false;
  478. for (var property in this._valuesStartRepeat) {
  479. this._swapEndStartRepeatValues(property);
  480. this._valuesStart[property] = this._valuesStartRepeat[property];
  481. }
  482. }
  483. this._isPlaying = true;
  484. this._isPaused = false;
  485. this._onStartCallbackFired = false;
  486. this._onEveryStartCallbackFired = false;
  487. this._isChainStopped = false;
  488. this._startTime = time;
  489. this._startTime += this._delayTime;
  490. if (!this._propertiesAreSetUp || overrideStartingValues) {
  491. this._propertiesAreSetUp = true;
  492. // If dynamic is not enabled, clone the end values instead of using the passed-in end values.
  493. if (!this._isDynamic) {
  494. var tmp = {};
  495. for (var prop in this._valuesEnd)
  496. tmp[prop] = this._valuesEnd[prop];
  497. this._valuesEnd = tmp;
  498. }
  499. this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, overrideStartingValues);
  500. }
  501. return this;
  502. };
  503. Tween.prototype.startFromCurrentValues = function (time) {
  504. return this.start(time, true);
  505. };
  506. Tween.prototype._setupProperties = function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat, overrideStartingValues) {
  507. for (var property in _valuesEnd) {
  508. var startValue = _object[property];
  509. var startValueIsArray = Array.isArray(startValue);
  510. var propType = startValueIsArray ? 'array' : typeof startValue;
  511. var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]);
  512. // If `to()` specifies a property that doesn't exist in the source object,
  513. // we should not set that property in the object
  514. if (propType === 'undefined' || propType === 'function') {
  515. continue;
  516. }
  517. // Check if an Array was provided as property value
  518. if (isInterpolationList) {
  519. var endValues = _valuesEnd[property];
  520. if (endValues.length === 0) {
  521. continue;
  522. }
  523. // Handle an array of relative values.
  524. // Creates a local copy of the Array with the start value at the front
  525. var temp = [startValue];
  526. for (var i = 0, l = endValues.length; i < l; i += 1) {
  527. var value = this._handleRelativeValue(startValue, endValues[i]);
  528. if (isNaN(value)) {
  529. isInterpolationList = false;
  530. console.warn('Found invalid interpolation list. Skipping.');
  531. break;
  532. }
  533. temp.push(value);
  534. }
  535. if (isInterpolationList) {
  536. // if (_valuesStart[property] === undefined) { // handle end values only the first time. NOT NEEDED? setupProperties is now guarded by _propertiesAreSetUp.
  537. _valuesEnd[property] = temp;
  538. // }
  539. }
  540. }
  541. // handle the deepness of the values
  542. if ((propType === 'object' || startValueIsArray) && startValue && !isInterpolationList) {
  543. _valuesStart[property] = startValueIsArray ? [] : {};
  544. var nestedObject = startValue;
  545. for (var prop in nestedObject) {
  546. _valuesStart[property][prop] = nestedObject[prop];
  547. }
  548. // TODO? repeat nested values? And yoyo? And array values?
  549. _valuesStartRepeat[property] = startValueIsArray ? [] : {};
  550. var endValues = _valuesEnd[property];
  551. // If dynamic is not enabled, clone the end values instead of using the passed-in end values.
  552. if (!this._isDynamic) {
  553. var tmp = {};
  554. for (var prop in endValues)
  555. tmp[prop] = endValues[prop];
  556. _valuesEnd[property] = endValues = tmp;
  557. }
  558. this._setupProperties(nestedObject, _valuesStart[property], endValues, _valuesStartRepeat[property], overrideStartingValues);
  559. }
  560. else {
  561. // Save the starting value, but only once unless override is requested.
  562. if (typeof _valuesStart[property] === 'undefined' || overrideStartingValues) {
  563. _valuesStart[property] = startValue;
  564. }
  565. if (!startValueIsArray) {
  566. // eslint-disable-next-line
  567. // @ts-ignore FIXME?
  568. _valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings
  569. }
  570. if (isInterpolationList) {
  571. // eslint-disable-next-line
  572. // @ts-ignore FIXME?
  573. _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse();
  574. }
  575. else {
  576. _valuesStartRepeat[property] = _valuesStart[property] || 0;
  577. }
  578. }
  579. }
  580. };
  581. Tween.prototype.stop = function () {
  582. if (!this._isChainStopped) {
  583. this._isChainStopped = true;
  584. this.stopChainedTweens();
  585. }
  586. if (!this._isPlaying) {
  587. return this;
  588. }
  589. this._isPlaying = false;
  590. this._isPaused = false;
  591. if (this._onStopCallback) {
  592. this._onStopCallback(this._object);
  593. }
  594. return this;
  595. };
  596. Tween.prototype.end = function () {
  597. this._goToEnd = true;
  598. this.update(this._startTime + this._duration);
  599. return this;
  600. };
  601. Tween.prototype.pause = function (time) {
  602. if (time === void 0) { time = now(); }
  603. if (this._isPaused || !this._isPlaying) {
  604. return this;
  605. }
  606. this._isPaused = true;
  607. this._pauseStart = time;
  608. return this;
  609. };
  610. Tween.prototype.resume = function (time) {
  611. if (time === void 0) { time = now(); }
  612. if (!this._isPaused || !this._isPlaying) {
  613. return this;
  614. }
  615. this._isPaused = false;
  616. this._startTime += time - this._pauseStart;
  617. this._pauseStart = 0;
  618. return this;
  619. };
  620. Tween.prototype.stopChainedTweens = function () {
  621. for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {
  622. this._chainedTweens[i].stop();
  623. }
  624. return this;
  625. };
  626. Tween.prototype.group = function (group) {
  627. if (!group) {
  628. console.warn('tween.group() without args has been removed, use group.add(tween) instead.');
  629. return this;
  630. }
  631. group.add(this);
  632. return this;
  633. };
  634. /**
  635. * Removes the tween from whichever group it is in.
  636. */
  637. Tween.prototype.remove = function () {
  638. var _a;
  639. (_a = this._group) === null || _a === void 0 ? void 0 : _a.remove(this);
  640. return this;
  641. };
  642. Tween.prototype.delay = function (amount) {
  643. if (amount === void 0) { amount = 0; }
  644. this._delayTime = amount;
  645. return this;
  646. };
  647. Tween.prototype.repeat = function (times) {
  648. if (times === void 0) { times = 0; }
  649. this._initialRepeat = times;
  650. this._repeat = times;
  651. return this;
  652. };
  653. Tween.prototype.repeatDelay = function (amount) {
  654. this._repeatDelayTime = amount;
  655. return this;
  656. };
  657. Tween.prototype.yoyo = function (yoyo) {
  658. if (yoyo === void 0) { yoyo = false; }
  659. this._yoyo = yoyo;
  660. return this;
  661. };
  662. Tween.prototype.easing = function (easingFunction) {
  663. if (easingFunction === void 0) { easingFunction = Easing.Linear.None; }
  664. this._easingFunction = easingFunction;
  665. return this;
  666. };
  667. Tween.prototype.interpolation = function (interpolationFunction) {
  668. if (interpolationFunction === void 0) { interpolationFunction = Interpolation.Linear; }
  669. this._interpolationFunction = interpolationFunction;
  670. return this;
  671. };
  672. // eslint-disable-next-line
  673. Tween.prototype.chain = function () {
  674. var tweens = [];
  675. for (var _i = 0; _i < arguments.length; _i++) {
  676. tweens[_i] = arguments[_i];
  677. }
  678. this._chainedTweens = tweens;
  679. return this;
  680. };
  681. Tween.prototype.onStart = function (callback) {
  682. this._onStartCallback = callback;
  683. return this;
  684. };
  685. Tween.prototype.onEveryStart = function (callback) {
  686. this._onEveryStartCallback = callback;
  687. return this;
  688. };
  689. Tween.prototype.onUpdate = function (callback) {
  690. this._onUpdateCallback = callback;
  691. return this;
  692. };
  693. Tween.prototype.onRepeat = function (callback) {
  694. this._onRepeatCallback = callback;
  695. return this;
  696. };
  697. Tween.prototype.onComplete = function (callback) {
  698. this._onCompleteCallback = callback;
  699. return this;
  700. };
  701. Tween.prototype.onStop = function (callback) {
  702. this._onStopCallback = callback;
  703. return this;
  704. };
  705. /**
  706. * @returns true if the tween is still playing after the update, false
  707. * otherwise (calling update on a paused tween still returns true because
  708. * it is still playing, just paused).
  709. *
  710. * @param autoStart - When true, calling update will implicitly call start()
  711. * as well. Note, if you stop() or end() the tween, but are still calling
  712. * update(), it will start again!
  713. */
  714. Tween.prototype.update = function (time, autoStart) {
  715. var _this = this;
  716. var _a;
  717. if (time === void 0) { time = now(); }
  718. if (autoStart === void 0) { autoStart = Tween.autoStartOnUpdate; }
  719. if (this._isPaused)
  720. return true;
  721. var property;
  722. if (!this._goToEnd && !this._isPlaying) {
  723. if (autoStart)
  724. this.start(time, true);
  725. else
  726. return false;
  727. }
  728. this._goToEnd = false;
  729. if (time < this._startTime) {
  730. return true;
  731. }
  732. if (this._onStartCallbackFired === false) {
  733. if (this._onStartCallback) {
  734. this._onStartCallback(this._object);
  735. }
  736. this._onStartCallbackFired = true;
  737. }
  738. if (this._onEveryStartCallbackFired === false) {
  739. if (this._onEveryStartCallback) {
  740. this._onEveryStartCallback(this._object);
  741. }
  742. this._onEveryStartCallbackFired = true;
  743. }
  744. var elapsedTime = time - this._startTime;
  745. var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime);
  746. var totalTime = this._duration + this._repeat * durationAndDelay;
  747. var calculateElapsedPortion = function () {
  748. if (_this._duration === 0)
  749. return 1;
  750. if (elapsedTime > totalTime) {
  751. return 1;
  752. }
  753. var timesRepeated = Math.trunc(elapsedTime / durationAndDelay);
  754. var timeIntoCurrentRepeat = elapsedTime - timesRepeated * durationAndDelay;
  755. // TODO use %?
  756. // const timeIntoCurrentRepeat = elapsedTime % durationAndDelay
  757. var portion = Math.min(timeIntoCurrentRepeat / _this._duration, 1);
  758. if (portion === 0 && elapsedTime === _this._duration) {
  759. return 1;
  760. }
  761. return portion;
  762. };
  763. var elapsed = calculateElapsedPortion();
  764. var value = this._easingFunction(elapsed);
  765. // properties transformations
  766. this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);
  767. if (this._onUpdateCallback) {
  768. this._onUpdateCallback(this._object, elapsed);
  769. }
  770. if (this._duration === 0 || elapsedTime >= this._duration) {
  771. if (this._repeat > 0) {
  772. var completeCount = Math.min(Math.trunc((elapsedTime - this._duration) / durationAndDelay) + 1, this._repeat);
  773. if (isFinite(this._repeat)) {
  774. this._repeat -= completeCount;
  775. }
  776. // Reassign starting values, restart by making startTime = now
  777. for (property in this._valuesStartRepeat) {
  778. if (!this._yoyo && typeof this._valuesEnd[property] === 'string') {
  779. this._valuesStartRepeat[property] =
  780. // eslint-disable-next-line
  781. // @ts-ignore FIXME?
  782. this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]);
  783. }
  784. if (this._yoyo) {
  785. this._swapEndStartRepeatValues(property);
  786. }
  787. this._valuesStart[property] = this._valuesStartRepeat[property];
  788. }
  789. if (this._yoyo) {
  790. this._reversed = !this._reversed;
  791. }
  792. this._startTime += durationAndDelay * completeCount;
  793. if (this._onRepeatCallback) {
  794. this._onRepeatCallback(this._object);
  795. }
  796. this._onEveryStartCallbackFired = false;
  797. return true;
  798. }
  799. else {
  800. if (this._onCompleteCallback) {
  801. this._onCompleteCallback(this._object);
  802. }
  803. for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {
  804. // Make the chained tweens start exactly at the time they should,
  805. // even if the `update()` method was called way past the duration of the tween
  806. this._chainedTweens[i].start(this._startTime + this._duration, false);
  807. }
  808. this._isPlaying = false;
  809. return false;
  810. }
  811. }
  812. return true;
  813. };
  814. Tween.prototype._updateProperties = function (_object, _valuesStart, _valuesEnd, value) {
  815. for (var property in _valuesEnd) {
  816. // Don't update properties that do not exist in the source object
  817. if (_valuesStart[property] === undefined) {
  818. continue;
  819. }
  820. var start = _valuesStart[property] || 0;
  821. var end = _valuesEnd[property];
  822. var startIsArray = Array.isArray(_object[property]);
  823. var endIsArray = Array.isArray(end);
  824. var isInterpolationList = !startIsArray && endIsArray;
  825. if (isInterpolationList) {
  826. _object[property] = this._interpolationFunction(end, value);
  827. }
  828. else if (typeof end === 'object' && end) {
  829. // eslint-disable-next-line
  830. // @ts-ignore FIXME?
  831. this._updateProperties(_object[property], start, end, value);
  832. }
  833. else {
  834. // Parses relative end values with start as base (e.g.: +10, -3)
  835. end = this._handleRelativeValue(start, end);
  836. // Protect against non numeric properties.
  837. if (typeof end === 'number') {
  838. // eslint-disable-next-line
  839. // @ts-ignore FIXME?
  840. _object[property] = start + (end - start) * value;
  841. }
  842. }
  843. }
  844. };
  845. Tween.prototype._handleRelativeValue = function (start, end) {
  846. if (typeof end !== 'string') {
  847. return end;
  848. }
  849. if (end.charAt(0) === '+' || end.charAt(0) === '-') {
  850. return start + parseFloat(end);
  851. }
  852. return parseFloat(end);
  853. };
  854. Tween.prototype._swapEndStartRepeatValues = function (property) {
  855. var tmp = this._valuesStartRepeat[property];
  856. var endValue = this._valuesEnd[property];
  857. if (typeof endValue === 'string') {
  858. this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue);
  859. }
  860. else {
  861. this._valuesStartRepeat[property] = this._valuesEnd[property];
  862. }
  863. this._valuesEnd[property] = tmp;
  864. };
  865. Tween.autoStartOnUpdate = false;
  866. return Tween;
  867. }());
  868. var VERSION = '25.0.0';
  869. /**
  870. * Tween.js - Licensed under the MIT license
  871. * https://github.com/tweenjs/tween.js
  872. * ----------------------------------------------
  873. *
  874. * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
  875. * Thank you all, you're awesome!
  876. */
  877. var nextId = Sequence.nextId;
  878. /**
  879. * Controlling groups of tweens
  880. *
  881. * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.
  882. * In these cases, you may want to create your own smaller groups of tweens.
  883. */
  884. var TWEEN = mainGroup;
  885. // This is the best way to export things in a way that's compatible with both ES
  886. // Modules and CommonJS, without build hacks, and so as not to break the
  887. // existing API.
  888. // https://github.com/rollup/rollup/issues/1961#issuecomment-423037881
  889. /**
  890. * @deprecated The global TWEEN Group will be removed in a following major
  891. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  892. * group.
  893. *
  894. * Old code:
  895. *
  896. * ```js
  897. * import * as TWEEN from '@tweenjs/tween.js'
  898. *
  899. * //...
  900. *
  901. * const tween = new TWEEN.Tween(obj)
  902. * const tween2 = new TWEEN.Tween(obj2)
  903. *
  904. * //...
  905. *
  906. * requestAnimationFrame(function loop(time) {
  907. * TWEEN.update(time)
  908. * requestAnimationFrame(loop)
  909. * })
  910. * ```
  911. *
  912. * New code:
  913. *
  914. * ```js
  915. * import {Tween, Group} from '@tweenjs/tween.js'
  916. *
  917. * //...
  918. *
  919. * const tween = new Tween(obj)
  920. * const tween2 = new TWEEN.Tween(obj2)
  921. *
  922. * //...
  923. *
  924. * const group = new Group()
  925. * group.add(tween)
  926. * group.add(tween2)
  927. *
  928. * //...
  929. *
  930. * requestAnimationFrame(function loop(time) {
  931. * group.update(time)
  932. * requestAnimationFrame(loop)
  933. * })
  934. * ```
  935. */
  936. var getAll = TWEEN.getAll.bind(TWEEN);
  937. /**
  938. * @deprecated The global TWEEN Group will be removed in a following major
  939. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  940. * group.
  941. *
  942. * Old code:
  943. *
  944. * ```js
  945. * import * as TWEEN from '@tweenjs/tween.js'
  946. *
  947. * //...
  948. *
  949. * const tween = new TWEEN.Tween(obj)
  950. * const tween2 = new TWEEN.Tween(obj2)
  951. *
  952. * //...
  953. *
  954. * requestAnimationFrame(function loop(time) {
  955. * TWEEN.update(time)
  956. * requestAnimationFrame(loop)
  957. * })
  958. * ```
  959. *
  960. * New code:
  961. *
  962. * ```js
  963. * import {Tween, Group} from '@tweenjs/tween.js'
  964. *
  965. * //...
  966. *
  967. * const tween = new Tween(obj)
  968. * const tween2 = new TWEEN.Tween(obj2)
  969. *
  970. * //...
  971. *
  972. * const group = new Group()
  973. * group.add(tween)
  974. * group.add(tween2)
  975. *
  976. * //...
  977. *
  978. * requestAnimationFrame(function loop(time) {
  979. * group.update(time)
  980. * requestAnimationFrame(loop)
  981. * })
  982. * ```
  983. */
  984. var removeAll = TWEEN.removeAll.bind(TWEEN);
  985. /**
  986. * @deprecated The global TWEEN Group will be removed in a following major
  987. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  988. * group.
  989. *
  990. * Old code:
  991. *
  992. * ```js
  993. * import * as TWEEN from '@tweenjs/tween.js'
  994. *
  995. * //...
  996. *
  997. * const tween = new TWEEN.Tween(obj)
  998. * const tween2 = new TWEEN.Tween(obj2)
  999. *
  1000. * //...
  1001. *
  1002. * requestAnimationFrame(function loop(time) {
  1003. * TWEEN.update(time)
  1004. * requestAnimationFrame(loop)
  1005. * })
  1006. * ```
  1007. *
  1008. * New code:
  1009. *
  1010. * ```js
  1011. * import {Tween, Group} from '@tweenjs/tween.js'
  1012. *
  1013. * //...
  1014. *
  1015. * const tween = new Tween(obj)
  1016. * const tween2 = new TWEEN.Tween(obj2)
  1017. *
  1018. * //...
  1019. *
  1020. * const group = new Group()
  1021. * group.add(tween)
  1022. * group.add(tween2)
  1023. *
  1024. * //...
  1025. *
  1026. * requestAnimationFrame(function loop(time) {
  1027. * group.update(time)
  1028. * requestAnimationFrame(loop)
  1029. * })
  1030. * ```
  1031. */
  1032. var add = TWEEN.add.bind(TWEEN);
  1033. /**
  1034. * @deprecated The global TWEEN Group will be removed in a following major
  1035. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1036. * group.
  1037. *
  1038. * Old code:
  1039. *
  1040. * ```js
  1041. * import * as TWEEN from '@tweenjs/tween.js'
  1042. *
  1043. * //...
  1044. *
  1045. * const tween = new TWEEN.Tween(obj)
  1046. * const tween2 = new TWEEN.Tween(obj2)
  1047. *
  1048. * //...
  1049. *
  1050. * requestAnimationFrame(function loop(time) {
  1051. * TWEEN.update(time)
  1052. * requestAnimationFrame(loop)
  1053. * })
  1054. * ```
  1055. *
  1056. * New code:
  1057. *
  1058. * ```js
  1059. * import {Tween, Group} from '@tweenjs/tween.js'
  1060. *
  1061. * //...
  1062. *
  1063. * const tween = new Tween(obj)
  1064. * const tween2 = new TWEEN.Tween(obj2)
  1065. *
  1066. * //...
  1067. *
  1068. * const group = new Group()
  1069. * group.add(tween)
  1070. * group.add(tween2)
  1071. *
  1072. * //...
  1073. *
  1074. * requestAnimationFrame(function loop(time) {
  1075. * group.update(time)
  1076. * requestAnimationFrame(loop)
  1077. * })
  1078. * ```
  1079. */
  1080. var remove = TWEEN.remove.bind(TWEEN);
  1081. /**
  1082. * @deprecated The global TWEEN Group will be removed in a following major
  1083. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1084. * group.
  1085. *
  1086. * Old code:
  1087. *
  1088. * ```js
  1089. * import * as TWEEN from '@tweenjs/tween.js'
  1090. *
  1091. * //...
  1092. *
  1093. * const tween = new TWEEN.Tween(obj)
  1094. * const tween2 = new TWEEN.Tween(obj2)
  1095. *
  1096. * //...
  1097. *
  1098. * requestAnimationFrame(function loop(time) {
  1099. * TWEEN.update(time)
  1100. * requestAnimationFrame(loop)
  1101. * })
  1102. * ```
  1103. *
  1104. * New code:
  1105. *
  1106. * ```js
  1107. * import {Tween, Group} from '@tweenjs/tween.js'
  1108. *
  1109. * //...
  1110. *
  1111. * const tween = new Tween(obj)
  1112. * const tween2 = new TWEEN.Tween(obj2)
  1113. *
  1114. * //...
  1115. *
  1116. * const group = new Group()
  1117. * group.add(tween)
  1118. * group.add(tween2)
  1119. *
  1120. * //...
  1121. *
  1122. * requestAnimationFrame(function loop(time) {
  1123. * group.update(time)
  1124. * requestAnimationFrame(loop)
  1125. * })
  1126. * ```
  1127. */
  1128. var update = TWEEN.update.bind(TWEEN);
  1129. var exports$1 = {
  1130. Easing: Easing,
  1131. Group: Group,
  1132. Interpolation: Interpolation,
  1133. now: now,
  1134. Sequence: Sequence,
  1135. nextId: nextId,
  1136. Tween: Tween,
  1137. VERSION: VERSION,
  1138. /**
  1139. * @deprecated The global TWEEN Group will be removed in a following major
  1140. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1141. * group.
  1142. *
  1143. * Old code:
  1144. *
  1145. * ```js
  1146. * import * as TWEEN from '@tweenjs/tween.js'
  1147. *
  1148. * //...
  1149. *
  1150. * const tween = new TWEEN.Tween(obj)
  1151. * const tween2 = new TWEEN.Tween(obj2)
  1152. *
  1153. * //...
  1154. *
  1155. * requestAnimationFrame(function loop(time) {
  1156. * TWEEN.update(time)
  1157. * requestAnimationFrame(loop)
  1158. * })
  1159. * ```
  1160. *
  1161. * New code:
  1162. *
  1163. * ```js
  1164. * import {Tween, Group} from '@tweenjs/tween.js'
  1165. *
  1166. * //...
  1167. *
  1168. * const tween = new Tween(obj)
  1169. * const tween2 = new TWEEN.Tween(obj2)
  1170. *
  1171. * //...
  1172. *
  1173. * const group = new Group()
  1174. * group.add(tween)
  1175. * group.add(tween2)
  1176. *
  1177. * //...
  1178. *
  1179. * requestAnimationFrame(function loop(time) {
  1180. * group.update(time)
  1181. * requestAnimationFrame(loop)
  1182. * })
  1183. * ```
  1184. */
  1185. getAll: getAll,
  1186. /**
  1187. * @deprecated The global TWEEN Group will be removed in a following major
  1188. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1189. * group.
  1190. *
  1191. * Old code:
  1192. *
  1193. * ```js
  1194. * import * as TWEEN from '@tweenjs/tween.js'
  1195. *
  1196. * //...
  1197. *
  1198. * const tween = new TWEEN.Tween(obj)
  1199. * const tween2 = new TWEEN.Tween(obj2)
  1200. *
  1201. * //...
  1202. *
  1203. * requestAnimationFrame(function loop(time) {
  1204. * TWEEN.update(time)
  1205. * requestAnimationFrame(loop)
  1206. * })
  1207. * ```
  1208. *
  1209. * New code:
  1210. *
  1211. * ```js
  1212. * import {Tween, Group} from '@tweenjs/tween.js'
  1213. *
  1214. * //...
  1215. *
  1216. * const tween = new Tween(obj)
  1217. * const tween2 = new TWEEN.Tween(obj2)
  1218. *
  1219. * //...
  1220. *
  1221. * const group = new Group()
  1222. * group.add(tween)
  1223. * group.add(tween2)
  1224. *
  1225. * //...
  1226. *
  1227. * requestAnimationFrame(function loop(time) {
  1228. * group.update(time)
  1229. * requestAnimationFrame(loop)
  1230. * })
  1231. * ```
  1232. */
  1233. removeAll: removeAll,
  1234. /**
  1235. * @deprecated The global TWEEN Group will be removed in a following major
  1236. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1237. * group.
  1238. *
  1239. * Old code:
  1240. *
  1241. * ```js
  1242. * import * as TWEEN from '@tweenjs/tween.js'
  1243. *
  1244. * //...
  1245. *
  1246. * const tween = new TWEEN.Tween(obj)
  1247. * const tween2 = new TWEEN.Tween(obj2)
  1248. *
  1249. * //...
  1250. *
  1251. * requestAnimationFrame(function loop(time) {
  1252. * TWEEN.update(time)
  1253. * requestAnimationFrame(loop)
  1254. * })
  1255. * ```
  1256. *
  1257. * New code:
  1258. *
  1259. * ```js
  1260. * import {Tween, Group} from '@tweenjs/tween.js'
  1261. *
  1262. * //...
  1263. *
  1264. * const tween = new Tween(obj)
  1265. * const tween2 = new TWEEN.Tween(obj2)
  1266. *
  1267. * //...
  1268. *
  1269. * const group = new Group()
  1270. * group.add(tween)
  1271. * group.add(tween2)
  1272. *
  1273. * //...
  1274. *
  1275. * requestAnimationFrame(function loop(time) {
  1276. * group.update(time)
  1277. * requestAnimationFrame(loop)
  1278. * })
  1279. * ```
  1280. */
  1281. add: add,
  1282. /**
  1283. * @deprecated The global TWEEN Group will be removed in a following major
  1284. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1285. * group.
  1286. *
  1287. * Old code:
  1288. *
  1289. * ```js
  1290. * import * as TWEEN from '@tweenjs/tween.js'
  1291. *
  1292. * //...
  1293. *
  1294. * const tween = new TWEEN.Tween(obj)
  1295. * const tween2 = new TWEEN.Tween(obj2)
  1296. *
  1297. * //...
  1298. *
  1299. * requestAnimationFrame(function loop(time) {
  1300. * TWEEN.update(time)
  1301. * requestAnimationFrame(loop)
  1302. * })
  1303. * ```
  1304. *
  1305. * New code:
  1306. *
  1307. * ```js
  1308. * import {Tween, Group} from '@tweenjs/tween.js'
  1309. *
  1310. * //...
  1311. *
  1312. * const tween = new Tween(obj)
  1313. * const tween2 = new TWEEN.Tween(obj2)
  1314. *
  1315. * //...
  1316. *
  1317. * const group = new Group()
  1318. * group.add(tween)
  1319. * group.add(tween2)
  1320. *
  1321. * //...
  1322. *
  1323. * requestAnimationFrame(function loop(time) {
  1324. * group.update(time)
  1325. * requestAnimationFrame(loop)
  1326. * })
  1327. * ```
  1328. */
  1329. remove: remove,
  1330. /**
  1331. * @deprecated The global TWEEN Group will be removed in a following major
  1332. * release. To migrate, create a `new Group()` instead of using `TWEEN` as a
  1333. * group.
  1334. *
  1335. * Old code:
  1336. *
  1337. * ```js
  1338. * import * as TWEEN from '@tweenjs/tween.js'
  1339. *
  1340. * //...
  1341. *
  1342. * const tween = new TWEEN.Tween(obj)
  1343. * const tween2 = new TWEEN.Tween(obj2)
  1344. *
  1345. * //...
  1346. *
  1347. * requestAnimationFrame(function loop(time) {
  1348. * TWEEN.update(time)
  1349. * requestAnimationFrame(loop)
  1350. * })
  1351. * ```
  1352. *
  1353. * New code:
  1354. *
  1355. * ```js
  1356. * import {Tween, Group} from '@tweenjs/tween.js'
  1357. *
  1358. * //...
  1359. *
  1360. * const tween = new Tween(obj)
  1361. * const tween2 = new TWEEN.Tween(obj2)
  1362. *
  1363. * //...
  1364. *
  1365. * const group = new Group()
  1366. * group.add(tween)
  1367. * group.add(tween2)
  1368. *
  1369. * //...
  1370. *
  1371. * requestAnimationFrame(function loop(time) {
  1372. * group.update(time)
  1373. * requestAnimationFrame(loop)
  1374. * })
  1375. * ```
  1376. */
  1377. update: update,
  1378. };
  1379. exports.Easing = Easing;
  1380. exports.Group = Group;
  1381. exports.Interpolation = Interpolation;
  1382. exports.Sequence = Sequence;
  1383. exports.Tween = Tween;
  1384. exports.VERSION = VERSION;
  1385. exports.add = add;
  1386. exports.default = exports$1;
  1387. exports.getAll = getAll;
  1388. exports.nextId = nextId;
  1389. exports.now = now;
  1390. exports.remove = remove;
  1391. exports.removeAll = removeAll;
  1392. exports.update = update;