Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*!
  2. * VERSION: 0.1.3
  3. * DATE: 2018-02-15
  4. * UPDATES AND DOCS AT: http://greensock.com
  5. *
  6. * @license Copyright (c) 2008-2019, GreenSock. All rights reserved.
  7. * This work is subject to the terms at http://greensock.com/standard-license or for
  8. * Club GreenSock members, the software agreement that was issued with your membership.
  9. *
  10. * @author: Jack Doyle, jack@greensock.com
  11. */
  12. /* eslint-disable */
  13. var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
  14. (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
  15. "use strict";
  16. _gsScope._gsDefine.plugin({
  17. propName: "endArray",
  18. API: 2,
  19. version: "0.1.3",
  20. //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
  21. init: function(target, value, tween) {
  22. var i = value.length,
  23. a = this.a = [],
  24. start, end;
  25. this.target = target;
  26. this._mod = 0;
  27. if (!i) {
  28. return false;
  29. }
  30. while (--i > -1) {
  31. start = target[i];
  32. end = value[i];
  33. if (start !== end) {
  34. a.push({i:i, s:start, c:end - start});
  35. }
  36. }
  37. return true;
  38. },
  39. mod: function(lookup) {
  40. if (typeof(lookup.endArray) === "function") {
  41. this._mod = lookup.endArray;
  42. }
  43. },
  44. //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
  45. set: function(ratio) {
  46. var target = this.target,
  47. a = this.a,
  48. i = a.length,
  49. mod = this._mod,
  50. e, val;
  51. if (mod) {
  52. while (--i > -1) {
  53. e = a[i];
  54. target[e.i] = mod(e.s + e.c * ratio, target);
  55. }
  56. } else {
  57. while (--i > -1) {
  58. e = a[i];
  59. val = e.s + e.c * ratio;
  60. target[e.i] = (val < 0.000001 && val > -0.000001) ? 0 : val;
  61. }
  62. }
  63. }
  64. });
  65. }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }