dat.gui.ease.tweenjs
Version:
Allows to edit tween.js easings in dat.GUI
24 lines • 6.51 kB
JavaScript
/*!
* @license MIT License
*
* Copyright (c) 2021 Mykyta Dniprovskyi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@tweenjs/tween.js"),require("dat.gui.ease")):"function"==typeof define&&define.amd?define(["@tweenjs/tween.js","dat.gui.ease"],t):"object"==typeof exports?exports.datGuiEaseAnimeJS=t(require("@tweenjs/tween.js"),require("dat.gui.ease")):e.datGuiEaseAnimeJS=t(e.window,e.datGuiEase)}(self,(function(e,t){return n={333:function(e,t,n){var r,o,u;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[t,n(391)],void 0===(u="function"==typeof(r=function(e,t){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){var n=t.Ease.ofSVGPath(e),r=function(e){return n.computeValue(e)};return r.ease=n,r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,r.checkSignature=function(e){return"object"===n(e.ease)&&e.ease instanceof t.Ease};var o=r;e.default=o})?r.apply(t,o):r)||(e.exports=u)},886:function(e,t,n){var r,o,u;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[t,n(391),n(333),n(242)],void 0===(u="function"==typeof(r=function(e,t,n,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=y();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n=o(n);var O=t.presets.Linear,g=t.presets.SineIn,E=t.presets.SineOut,v=t.presets.SineInOut,m=t.presets.QuadIn,h=t.presets.QuadOut,j=t.presets.QuadInOut,w=t.presets.CubicIn,I=t.presets.CubicOut,S=t.presets.CubicInOut,x=t.presets.QuartIn,_=t.presets.QuartOut,P=t.presets.QuartInOut,C=t.presets.ExpoIn,Q=t.presets.ExpoOut,T=t.presets.ExpoInOut,M=t.presets.CircIn,R=t.presets.CircOut,k=t.presets.CircInOut,q=function(e){f(o,e);var t=p(o);function o(){var e;return a(this,o),(e=t.call(this,"TweenJS")).preset(r.Easing.Linear.None,O).preset(r.Easing.Sinusoidal.In,g).preset(r.Easing.Sinusoidal.Out,E).preset(r.Easing.Sinusoidal.InOut,v).preset(r.Easing.Quadratic.In,m).preset(r.Easing.Quadratic.Out,h).preset(r.Easing.Quadratic.InOut,j).preset(r.Easing.Cubic.In,w).preset(r.Easing.Cubic.Out,I).preset(r.Easing.Cubic.InOut,S).preset(r.Easing.Quartic.In,x).preset(r.Easing.Quartic.Out,_).preset(r.Easing.Quartic.InOut,P).preset(r.Easing.Exponential.In,C).preset(r.Easing.Exponential.Out,Q).preset(r.Easing.Exponential.InOut,T).preset(r.Easing.Circular.In,M).preset(r.Easing.Circular.Out,R).preset(r.Easing.Circular.InOut,k).pick((function(e){return n.default.checkSignature(e)})).transform((function(e){return e.ease.clone()}),(function(e){return new n.default(e.svgPath)})),e}return s(o)}(t.Middleware);e.default=q})?r.apply(t,o):r)||(e.exports=u)},352:function(e,t,n){var r,o,u;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,o=[t,n(886),n(333)],void 0===(u="function"==typeof(r=function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"CustomEase",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Middleware",{enumerable:!0,get:function(){return t.default}}),e.default=void 0,t=r(t),n=r(n);var o=t.default;e.default=o})?r.apply(t,o):r)||(e.exports=u)},242:t=>{"use strict";t.exports=e},391:e=>{"use strict";e.exports=t}},r={},function e(t){var o=r[t];if(void 0!==o)return o.exports;var u=r[t]={exports:{}};return n[t].call(u.exports,u,u.exports,e),u.exports}(352);var n,r}));