restore backup and add opencode support
This commit is contained in:
1 parent
b99d2ff835
commit
c295660631
72 files changed
+7035
-7198
No files matched your search
@@ -0,0 +1,93 @@
|
||||
core-js@2.5.6
|
||||
MIT
|
||||
Copyright (c) 2014-2018 Denis Pushkarev
|
||||
|
||||
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.
|
||||
|
||||
zone.js@0.8.26
|
||||
MIT
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2016-2018 Google, Inc.
|
||||
|
||||
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.
|
||||
|
||||
moment@2.22.2
|
||||
MIT
|
||||
Copyright (c) JS Foundation and other contributors
|
||||
|
||||
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.
|
||||
|
||||
webpack@4.6.0
|
||||
MIT
|
||||
Copyright JS Foundation and other contributors
|
||||
|
||||
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.
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
+13
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html><html lang="de-DE"><head>
|
||||
<meta charset="utf-8">
|
||||
<title>Random Guilloche Generator</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="styles.b1bd8bfaa236507d7731.css"></head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
|
||||
|
||||
<script type="text/javascript" src="runtime.6afe30102d8fe7337431.js"></script><script type="text/javascript" src="polyfills.2903ad11212d7d797800.js"></script><script type="text/javascript" src="main.2ecd9b600adf516c904f.js"></script></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+s0g":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"//9w":function(e,t,n){!function(e){"use strict";n("wd/R").defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}()},"/X5v":function(e,t,n){!function(e){"use strict";n("wd/R").defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}()},"/h7t":function(e,t,n){!function(e){"use strict";e.defineLocale("af",{monthLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+s0g":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"//9w":function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},"/X5v":function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"/h7t":function(e,t,n){!function(e){"use strict";e.defineLocale("af",{monLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"0TWp":function(e,t,n){!function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}if(n("Zone"),e.Zone)throw new Error("Zone already loaded.");var o,i=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return D.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),t.__load_patch=function(o,i){if(O.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var a="Zone:"+o;n(a),O[o]=i(e,t,S),r(a,a)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{D=D.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{D=D.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==y||e.type!==x){var r=e.state!=k;r&&e._transitionTo(k,m),e.runCount++;var o=j;j=e,D={parent:D,zone:this};try{e.type==E&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==y&&e.state!==T&&(e.type==x||e.data&&e.data.isPeriodic?r&&e._transitionTo(m,k):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(y,k,y))),D=D.parent,j=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(_,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(T,_,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==_&&e._transitionTo(m,_),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new u(w,e,t,n,r,null))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new u(E,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new u(x,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(b,m,k);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,b),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t.__symbol__=z,t}(),a={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.caLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"0TWp":function(e,t,n){!function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}if(n("Zone"),e.Zone)throw new Error("Zone already loaded.");var o,i=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==O.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return D.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return j},enumerable:!0,configurable:!0}),t.__load_patch=function(o,i){if(O.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!e["__Zone_disable_"+o]){var a="Zone:"+o;n(a),O[o]=i(e,t,S),r(a,a)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{D=D.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),D={parent:D,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(o){if(this._zoneDelegate.handleError(this,o))throw o}}finally{D=D.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");if(e.state!==y||e.type!==x){var r=e.state!=k;r&&e._transitionTo(k,m),e.runCount++;var o=j;j=e,D={parent:D,zone:this};try{e.type==E&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(i){if(this._zoneDelegate.handleError(this,i))throw i}}finally{e.state!==y&&e.state!==T&&(e.type==x||e.data&&e.data.isPeriodic?r&&e._transitionTo(m,k):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(y,k,y))),D=D.parent,j=o}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(_,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(r){throw e._transitionTo(T,_,y),this._zoneDelegate.handleError(this,r),r}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==_&&e._transitionTo(m,_),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new u(w,e,t,n,r,null))},t.prototype.scheduleMacroTask=function(e,t,n,r,o){return this.scheduleTask(new u(E,e,t,n,r,o))},t.prototype.scheduleEventTask=function(e,t,n,r,o){return this.scheduleTask(new u(x,e,t,n,r,o))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||g).name+"; Execution: "+this.name+")");e._transitionTo(b,m,k);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(T,b),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,b),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t.__symbol__=z,t}(),a={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,o,i){return e.invokeTask(n,r,o,i)},onCancelTask:function(e,t,n,r){return e.caLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(r){function e(e){for(var t,p,c=e[0],a=e[1],f=e[2],l=0,s=[];l<c.length;l++)o[p=c[l]]&&s.push(o[p][0]),o[p]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(r[t]=a[t]);for(i&&i(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var r,e=0;e<u.length;e++){for(var n=u[e],t=!0,c=1;c<n.length;c++)0!==o[n[c]]&&(t=!1);t&&(u.splice(e--,1),r=p(p.s=n[0]))}return r}var t={},o={0:0},u=[];function p(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,p),n.l=!0,n.exports}p.m=r,p.c=t,p.d=function(r,e,n){p.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},p.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},p.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return p.d(e,"a",e),e},p.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},p.p="";var c=window.webpackJsonp=window.webpackJsonp||[],a=c.push.bind(c);c.push=e,c=c.slice();for(var f=0;f<c.length;f++)e(c[f]);var i=a;n()}([]);
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c<i.length;c++)o[f=i[c]]&&s.push(o[f][0]),o[f]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=f(f.s=t[0]))}return e}var n={},o={0:0},u=[];function f(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,f),t.l=!0,t.exports}f.m=e,f.c=n,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(e,r){if(1&r&&(e=f(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)f.d(t,n,(function(r){return e[r]}).bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="";var i=window.webpackJsonp=window.webpackJsonp||[],l=i.push.bind(i);i.push=r,i=i.slice();for(var a=0;a<i.length;a++)r(i[a]);var p=l;t()}([]);
|
||||
@@ -0,0 +1,6 @@
|
||||
*,::after,::before{box-sizing:border-box;box-sizing:inherit}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;box-sizing:border-box;-ms-overflow-style:scrollbar}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:.62rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}h1,h2,h3,h4,h5,h6{margin-top:0}dl,ol,p,ul{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote,figure{margin:0 0 1rem}b,strong{font-weight:bolder}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#6c757d;text-decoration:none;background-color:transparent}a:hover{color:#494f54;text-decoration:underline}a:not([href]):not([tabindex]),a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}/*!
|
||||
* Bootstrap Grid v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-family:inherit;font-weight:500;line-height:1.2;color:inherit}.h1,h1{font-size:1.55rem}.h2,h2{font-size:1.24rem}.h3,h3{font-size:1.085rem}.h4,h4{font-size:.93rem}.h5,h5{font-size:.775rem}.h6,h6{font-size:.62rem}.lead{font-size:.775rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{box-sizing:content-box;height:0;overflow:visible;margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:.775rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014\00A0"}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.33333333%;max-width:8.33333333%}.col-2{flex:0 0 16.66666667%;max-width:16.66666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4{flex:0 0 33.33333333%;max-width:33.33333333%}.col-5{flex:0 0 41.66666667%;max-width:41.66666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.33333333%;max-width:58.33333333%}.col-8{flex:0 0 66.66666667%;max-width:66.66666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.33333333%;max-width:83.33333333%}.col-11{flex:0 0 91.66666667%;max-width:91.66666667%}.col-12{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.33333333%;max-width:8.33333333%}.col-sm-2{flex:0 0 16.66666667%;max-width:16.66666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.col-sm-4{flex:0 0 33.33333333%;max-width:33.33333333%}.col-sm-5{flex:0 0 41.66666667%;max-width:41.66666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.33333333%;max-width:58.33333333%}.col-sm-8{flex:0 0 66.66666667%;max-width:66.66666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.33333333%;max-width:83.33333333%}.col-sm-11{flex:0 0 91.66666667%;max-width:91.66666667%}.col-sm-12{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
body,html{position:fixed;width:100%;height:100%;padding:0;margin:0;background:#fbfcfd;font-family:monospace}app-root{position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden}
|
||||
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/10194510/44956832-63746780-aeca-11e8-85a4-09fa8138e659.png" alt="Random Guilloche Generator" height="300" />
|
||||
</div>
|
||||
|
||||
|
||||
---
|
||||
|
||||
<h1 align="center"><strong>Random Guilloche Generator</strong></h1>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://npmjs.org/package/nls-guilloche">
|
||||
<img src="https://badgen.now.sh/npm/v/nls-guilloche" alt="version" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Rquirements
|
||||
|
||||
- Node.js
|
||||
- Angular CLI
|
||||
|
||||
## NPM Scripts
|
||||
|
||||
| command | description |
|
||||
|------------------|-----------------------------------------------------------------|
|
||||
| `npm run start` | start development server on `http://localhost:4200/` |
|
||||
| `npm run build` | build production application and save to `./dist` |
|
||||
| `npm run build:library` | build node module and save to `./dist/NlsGuilloche` |
|
||||
|
||||
## Development server
|
||||
|
||||
Download dependencies with `npm i` or `yarn`.
|
||||
|
||||
Run `npm run start` for a dev server. Browser opens and navigates automatically to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Build
|
||||
|
||||
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
||||
|
||||
## Author
|
||||
|
||||
The author of this software is Michael Czechowski, web developer based in Stuttgart and Berlin, Germany. Only with the support of two very talented web developers, Erik Kimsey and Martin Maga, this software could be realized. We are proud to mention that we can present this software as free software.
|
||||
|
||||
## Contributors
|
||||
|
||||
- Michael Czechowski (<mail@dailysh.it>)
|
||||
- Erik Kimsey
|
||||
- Martin Maga
|
||||
|
||||
## License
|
||||
|
||||
Copyright (C) 2018 Michael Czechowski
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
+1335
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nls-guilloche.umd.js.map","sources":[null,"ng://nls-guilloche/nls/services/canvas.service.ts","ng://nls-guilloche/nls/services/history.service.ts","ng://nls-guilloche/nls/services/math.service.ts","ng://nls-guilloche/nls/services/graph.service.ts","ng://nls-guilloche/nls/components/graphs.component.ts","ng://nls-guilloche/nls/directives/guilloche.directive.ts","ng://nls-guilloche/nls/services/animation.service.ts","ng://nls-guilloche/nls/nls-guilloche.module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0]Line truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("d3-random"),require("d3-selection"),require("d3-shape"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("nls-guilloche",["exports","@angular/core","d3-random","d3-selection","d3-shape","@angular/platform-browser"],e):e(t["nls-guilloche"]={},t.ng.core,null,null,null,t.ng.platformBrowser)}(this,function(t,i,a,r,n,e){"use strict";function h(n,r){var i,a,s,t,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),"throw":e(1),"return":e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return o.label++,{value:t[1],done:!1};case 5:o.label++,a=t[1],t=[0];continue;case 7:t=o.ops.pop(),o.trys.pop();continue;default:if(!(s=0<(s=o.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){o=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){o.label=t[1];break}if(6===t[0]&&o.label<s[1]){o.label=s[1],s=t;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(t);break}s[2]&&o.ops.pop(),o.trys.pop();continue}t=r.call(n,o)}catch(e){t=[6,e],a=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([e,t])}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)s.push(r.value)}catch(o){i={error:o}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(i)throw i.error}}return s}function o(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var c=function(){function t(t){this.rendererFactory=t,this.renderer=t.createRenderer(null,null)}return Object.defineProperty(t.prototype,"get",{get:function(){return this.canvas},enumerable:!0,configurable:!0}),t.prototype.set=function(t){this.canvas=t},t.prototype.adjustToWindow=function(){this.canvas&&(this.renderer.setStyle(this.canvas,"width",this.canvas.innerWidth),this.renderer.setStyle(this.canvas,"height",this.canvas.innerHeight))},t.decorators=[{type:i.Injectable}],t.ctorParameters=function(){return[{type:i.RendererFactory2}]},t}(),p=function(){function t(){this.history=[]}return t.prototype.save=function(t,e){this.history.push({date:new Date,graphs:t,config:e,hash:this.hash(t)})},t.prototype.hash=function(t){return btoa(JSON.stringify(t))},t.prototype.list=function(){return this.history},t.decorators=[{type:i.Injectable}],t.ctorParameters=function(){return[]},t}(),u=function(){function t(){}return t.prototype.Δ=function(t,e){return Math.pow(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2),.5)},t.prototype.getClosestCenter=function(t,e){return this.Δ(t,e.start)<this.Δ(t,e.end)?e.start:e.end},t.prototype.getFarestCenter=function(t,e){return this.Δ(t,e.start)>this.Δ(t,e.end)?e.start:e.end},t.prototype.randomPoint=function(t,e){var n={min:t.center.x-t.width*e,max:t.center.x+t.width*e},r={min:t.center.y-t.height*e,max:t.center.y+t.height*e};return{x:a.randomUniform(n.min,n.max)(),y:a.randomUniform(r.min,r.max)()}},t.prototype.centerOfArea=function(t,e){return{x:.5*t,y:.5*e}},t.prototype.centerOfPoints=function(t,e){return{x:.5*(t.x+e.x),y:.5*(t.y+e.y)}},t.prototype.centerOfCurve=function(t){var e=this.medianPoint(t),n=e.next().value,r=e.next().value,i=this.angleRadians(n,r);return Object.assign(this.centerOfPoints(n,r),{ascent:i})},t.prototype.medianOfCurve=function(t){var e=this.medianPoint(t),n=e.next().value,r=e.next().value,i=e.next().value,a=this.angleRadians(r,i);return Object.assign(n,{ascent:a})},t.prototype.angleRadians=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},t.prototype.angleDegree=function(t,e){return 180*this.angleRadians(t,e)/Math.PI},t.prototype.medianIndex=function(t){return Math.floor(.5*t.length)},t.prototype.medianPoint=function(e){var n,r;return h(this,function(t){switch(t.label){case 0:r=e.slice(),t.label=1;case 1:return r?(n=this.medianIndex(e),[4,r[n]]):[3,3];case 2:return t.sent(),r.splice(n,1),[3,1];case 3:return[2]}})},t.prototype.bounce=function(e,n,r){var i,a,s,o;return void 0===e&&(e=1),void 0===n&&(n=1),void 0===r&&(r=0),h(this,function(t){switch(t.label){case 0:i=Math.pow(10,n),a=2/i,s=0,t.label=1;case 1:return o=Math.PI*a*s+r,[4,Math.round(Math.sin(o)*e*i)/i];case 2:return t.sent(),s++,[3,1];case 3:return[2]}})},t.prototype.flipSign=function(e){var n;return void 0===e&&(e=!0),h(this,function(t){switch(t.label){case 0:n=e?1:-1,t.label=1;case 1:return[4,n*=-1];case 2:return t.sent(),[3,1];case 3:return[2]}})},t.decorators=[{type:i.Injectable}],t}(),l=function(){function t(t){this.math=t}return t.prototype.get=function(){return this.graphs},t.prototype.set=function(t){this.graphs=tLine truncated
|
||||
//# sourceMappingURL=nls-guilloche.umd.min.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["null","ng://nls-guilloche/nls/services/canvas.service.ts","ng://nls-guilloche/nls/services/history.service.ts","ng://nls-guilloche/nls/services/math.service.ts","ng://nls-guilloche/nls/services/graph.service.ts","ng://nls-guilloche/nls/components/graphs.component.ts","ng://nls-guilloche/nls/directives/guilloche.directive.ts","ng://nls-guilloche/nls/services/animation.service.ts","ng://nls-guilloche/nls/nls-guilloche.module.ts"],"names":["__generator","thisArg","body","f","y","t","g","_","label","sent","trys","ops","next","verb","throw","return","Symbol","iterator","this","n","v","op","TypeError","call","done","value","pop","length","push","e","step","__read","o","m","r","i","ar","error","__spread","arguments","concat","NlsCanvasService","rendererFactory","renderer","createRenderer","prototype","canvas","set","el","adjustToWindow","setStyle","innerWidth","innerHeight","Injectable","RendererFactory2","NlsHistoryService","history","save","graphs","config","date","Date","hash","btoa","JSON","stringify","list","NlsMathService","Δ","a","b","Math","pow","x","getClosestCenter","point","matrix","start","end","getFarestCenter","randomPoint","overlap","min","center","width","max","height","Random.randomUniform","centerOfArea","centerOfPoints","p1","p2","centerOfCurve","curve","genMedian","medianPoint","radians","angleRadians","Object","assign","ascent","medianOfCurve","p3","atan2","angleDegree","PI","medianIndex","floor","points","slice","index","_a","splice","bounce","amplitude","decimals","power","round","sin","flipSign","startPositive","sign","NlsGraphService","math","get","newGraphs","animation","startAnimation","stopAnimation","spreadOrthogonal","spacing","currentPoint","currentSpacing","shiftPoint","cos","NlsGraphsComponent","canvasService","historyService","graphService","EventEmitter","genLoadedAllGraphs","countLoadedGraphs","resizingWindow","onResize","event","_this","clearTimeout","setTimeout","adjustCanvas","calcMatrix","updateGraphs","ngOnChanges","changes","restoredHistory","restoreGraph","saveHistory","saveGraph","genShiftStart","vectors","genShiftEnd","console","log","curveList","color","colors","primary","secondary","map","__assign","s","p","hasOwnProperty","apply","adjustGraph","spread","interval","stroke","direction","genVectorPoint","vector","nodes","genRandomPoints","num","generatedPoints","flipflop","svgElementRef","nativeElement","canvasWidth","getBoundingClientRect","canvasHeight","totalCenter","margin","range","genShiftX","shiftNumber","genShiftY","space","current","prepareGuillocheExport","guillocheElement","svgChange","emit","cycles","Component","args","selector","template","styles","Input","Output","ViewChild","HostListener","NlsGuillocheDirective","ngOnDestroy","group","selectAll","remove","Selection.select","initialNodes","graph","initialCurve","node","bounces","bounceAmplitude","random","i_1","animationInterval","setInterval","animateGraph","clearInterval","pathElements","spreadLines","forEach","drawGraph","updateGraph","shiftedMedians","genshiftedMedians","amount","median","shiftedPoints","attr","Shape.line","Shape.curveBasis","append","debugGraph","circle","text","Directive","ElementRef","NlsAnimationService","animate","initialGraph","newGraph","indexMiddle","pointMiddle","NlsGuillocheModule","NgModule","imports","BrowserModule","declarations","providers","exports"],"mappings":"4dAwCA,SAAAA,EAkC4BC,EAASC,GACjC,IAAsGC,EAAGC,EAAGC,EAAGC,EAA3GC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAW,EAAPJ,EAAE,GAAQ,MAAMA,EAAE,GAAI,OAAOA,EAAE,IAAOK,KAAM,GAAIC,IAAK,IAChG,OAAOL,EAAI,CAAEM,KAAMC,EAAK,GAAIC,QAASD,EAAK,GAAIE,SAAUF,EAAK,IAAwB,mBAAXG,SAA0BV,EAAEU,OAAOC,UAAY,WAAa,OAAOC,OAAUZ,EACvJ,SAAAO,EAAcM,GAAK,OAAO,SAAUC,GAAK,OACzC,SAAcC,GACV,GAAIlB,EAAG,MAAM,IAAImB,UAAU,mCAC3B,KAAOf,GAAG,IACN,GAAIJ,EAAI,EAAGC,IAAMC,EAAY,EAARgB,EAAG,GAASjB,EAAU,UAAIiB,EAAG,GAAKjB,EAAS,YAAOC,EAAID,EAAU,YAAMC,EAAEkB,KAAKnB,GAAI,GAAKA,EAAEQ,SAAWP,EAAIA,EAAEkB,KA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D,SAAAW,EAeuBC,EAAGb,GACtLine truncated
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
export { NlsGraphsComponent, NlsGuillocheDirective, NlsAnimationService, NlsCanvasService, NlsGraphService, NlsHistoryService, NlsMathService, NlsGuillocheModule } from './public_api';
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmxzLWd1aWxsb2NoZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMtZ3VpbGxvY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx5S0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
|
||||
@@ -0,0 +1,335 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { ViewChild, Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsHistoryService } from './../services/history.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from './../services/graph.service';
|
||||
/** @type {?} */
|
||||
const RESIZING_TIMEOUT = 800;
|
||||
export class NlsGraphsComponent {
|
||||
/**
|
||||
* @param {?} canvasService
|
||||
* @param {?} historyService
|
||||
* @param {?} math
|
||||
* @param {?} graphService
|
||||
*/
|
||||
constructor(canvasService, historyService, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.historyService = historyService;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
this.svgChange = new EventEmitter();
|
||||
this.graphChange = new EventEmitter();
|
||||
this.genLoadedAllGraphs = this.countLoadedGraphs();
|
||||
this.resizingWindow = false;
|
||||
}
|
||||
/**
|
||||
* @param {?} event
|
||||
* @return {?}
|
||||
*/
|
||||
onResize(event) {
|
||||
clearTimeout(this.resizingWindow);
|
||||
this.resizingWindow = setTimeout(() => {
|
||||
this.canvas = this.adjustCanvas();
|
||||
this.matrix = this.calcMatrix();
|
||||
this.updateGraphs();
|
||||
}, RESIZING_TIMEOUT);
|
||||
}
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnChanges(changes) {
|
||||
this.canvas = this.adjustCanvas();
|
||||
this.matrix = this.calcMatrix();
|
||||
if (changes["config"]) {
|
||||
this.updateGraphs();
|
||||
}
|
||||
if (this.restoredHistory && this.restoredHistory.hash !== this.hash) {
|
||||
this.restoreGraph();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
restoreGraph() {
|
||||
this.graphs = this.restoredHistory.graphs;
|
||||
this.hash = this.restoredHistory.hash;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
saveHistory() {
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.historyService.save(this.graphs, this.config);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
saveGraph() {
|
||||
this.graphService.set(this.graphs);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
updateGraphs() {
|
||||
/** @type {?} */
|
||||
const genShiftStart = this.shiftPoint(this.matrix.start, this.config.vectors.start);
|
||||
/** @type {?} */
|
||||
const genShiftEnd = this.shiftPoint(this.matrix.end, this.config.vectors.end, false);
|
||||
console.log(this.matrix);
|
||||
/** @type {?} */
|
||||
const curveList = [
|
||||
{
|
||||
color: this.config.colors.primary,
|
||||
start: genShiftStart.next().value,
|
||||
end: genShiftEnd.next().value
|
||||
},
|
||||
{
|
||||
color: this.config.colors.secondary,
|
||||
start: genShiftEnd.next().value,
|
||||
end: genShiftStart.next().value
|
||||
}
|
||||
];
|
||||
this.graphs = curveList.map(curve => {
|
||||
return Object.assign({}, this.adjustGraph(curve), { spread: this.config.spread, interval: this.config.interval });
|
||||
});
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.saveHistory();
|
||||
this.saveGraph();
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
adjustGraph(curve) {
|
||||
return Object.assign(curve, {
|
||||
stroke: this.config.stroke,
|
||||
start: Object.assign(curve.start, {
|
||||
direction: this.genVectorPoint(curve.start.point, curve.start.vector)
|
||||
}),
|
||||
end: Object.assign(curve.end, {
|
||||
direction: this.genVectorPoint(curve.end.point, curve.end.vector)
|
||||
}),
|
||||
nodes: this.genRandomPoints(this.config.nodes)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} num
|
||||
* @return {?}
|
||||
*/
|
||||
genRandomPoints(num) {
|
||||
/** @type {?} */
|
||||
const generatedPoints = [];
|
||||
for (let i = 0; i < this.config.nodes; i++) {
|
||||
generatedPoints.push(this.math.randomPoint(this.matrix, this.config.overlap));
|
||||
}
|
||||
return generatedPoints;
|
||||
}
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
flipflop(x) {
|
||||
return (x === 'start') ? 'end' : 'start';
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
adjustCanvas() {
|
||||
this.canvasService.set(this.canvas);
|
||||
this.canvasService.adjustToWindow();
|
||||
return this.svgElementRef.nativeElement;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
calcMatrix() {
|
||||
/** @type {?} */
|
||||
const canvasWidth = this.canvas.getBoundingClientRect().width;
|
||||
/** @type {?} */
|
||||
const canvasHeight = this.canvas.getBoundingClientRect().height;
|
||||
/** @type {?} */
|
||||
const totalArea = Math.abs(canvasWidth * canvasHeight);
|
||||
/** @type {?} */
|
||||
const totalCenter = this.math.centerOfArea(canvasWidth, canvasHeight);
|
||||
return {
|
||||
start: {
|
||||
x: 0,
|
||||
y: canvasHeight - this.config.vectors.spacing - this.config.margin.y
|
||||
},
|
||||
end: {
|
||||
x: canvasWidth - this.config.vectors.spacing - this.config.margin.x,
|
||||
y: 0
|
||||
},
|
||||
width: canvasWidth,
|
||||
height: canvasHeight,
|
||||
center: totalCenter
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @return {?}
|
||||
*/
|
||||
genVectorPoint(point, vector) {
|
||||
/** @type {?} */
|
||||
const range = this.math.Δ(this.matrix.start, this.matrix.end) * this.config.vectors.range;
|
||||
return {
|
||||
x: range * Math.sin(Math.PI * vector) + point.x,
|
||||
y: range * Math.cos(Math.PI * vector) + point.y
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*shiftPoint(point, vector, startPositive = true) {
|
||||
/** @type {?} */
|
||||
const genShiftX = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
/** @type {?} */
|
||||
const genShiftY = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
while (true) {
|
||||
yield {
|
||||
point: {
|
||||
x: Math.cos(Math.PI * vector) * genShiftX.next().value + point.x,
|
||||
y: Math.sin(Math.PI * vector) * genShiftY.next().value + point.y,
|
||||
},
|
||||
vector: vector
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} space
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*shiftNumber(space, vector, startPositive = true) {
|
||||
/** @type {?} */
|
||||
let current = 0;
|
||||
/** @type {?} */
|
||||
let index = 0;
|
||||
/** @type {?} */
|
||||
const sign = this.math.flipSign(startPositive);
|
||||
while (true) {
|
||||
yield current = sign.next().value * index * space + current;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} guillocheElement
|
||||
* @return {?}
|
||||
*/
|
||||
prepareGuillocheExport(guillocheElement) {
|
||||
if (this.genLoadedAllGraphs.next().value) {
|
||||
this.svgChange.emit(this.svgElementRef);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
*countLoadedGraphs() {
|
||||
/** @type {?} */
|
||||
let cycles = 1;
|
||||
while (true) {
|
||||
if (cycles < this.graphs.length) {
|
||||
yield false;
|
||||
cycles++;
|
||||
}
|
||||
else {
|
||||
yield true;
|
||||
cycles = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsGraphsComponent.decorators = [
|
||||
{ type: Component, args: [{
|
||||
selector: 'nls-graphs',
|
||||
template: `<svg #svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1" shape-rendering="geometricPrecision">
|
||||
<g nlsGuilloche *ngFor="let graph of graphs" [graph]="graph" [animation]="animation"></g>
|
||||
</svg>
|
||||
`,
|
||||
styles: [`:host{position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden}`]
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphsComponent.ctorParameters = () => [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: NlsHistoryService },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
];
|
||||
NlsGraphsComponent.propDecorators = {
|
||||
config: [{ type: Input }],
|
||||
restoredHistory: [{ type: Input }],
|
||||
animation: [{ type: Input }],
|
||||
svgChange: [{ type: Output }],
|
||||
graphChange: [{ type: Output }],
|
||||
svgElementRef: [{ type: ViewChild, args: ['svg',] }],
|
||||
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
|
||||
};
|
||||
function NlsGraphsComponent_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.matrix;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.windowHeight;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.windowWidth;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.genShiftPoint;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.genLoadedAllGraphs;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.hash;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.resizingWindow;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.config;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.restoredHistory;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.svgChange;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphChange;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.svgElementRef;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.canvasService;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.historyService;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMvY29tcG9uZW50cy9ncmFwaHMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBNEIsWUFBWSxFQUFFLFlBQVksRUFBRSxNQUFNLGVBQWUsQ0FBQztBQVUxSCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFNUQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDZCQUE2QixDQUFDOztBQUU5RCxNQUFNLGdCQUFnQixHQUFHLEdBQUcsQ0FBQztBQVc3QixNQUFNOzs7Ozs7O0lBK0JKLFlBQ1UsZUFDQSxnQkFDQSxNQUNBO1FBSEEsa0JBQWEsR0FBYixhQUFhO1FBQ2IsbUJBQWMsR0FBZCxjQUFjO1FBQ2QsU0FBSSxHQUFKLElBQUk7UUFDSixpQkFBWSxHQUFaLFlBQVk7eUJBbkJBLElBQUksWUFBWSxFQUFFOzJCQUNoQixJQUFJLFlBQVksRUFBRTtRQW9CeEMsSUFBSSxDQUFDLGtCQUFrQixHQUFHLElBQUksQ0FBQyxpQkFBaUIsRUFBRS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FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRTtnQkFDNUIsU0FBUyxFQUFFLElBQUksQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsS0FBSyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUM7YUFDbEUsQ0FBQztZQUNGLEtBQUssRUFBRSxJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDO1NBQy9DLENBQUMsQ0FBQzs7Ozs7O0lBR0csZUFBZSxDQUFDLEdBQVc7O1FBQ2pDLE1BQU0sZUFBZSxHQUFHLEVBQUUsQ0FBQztRQUUzQixHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7WUFDM0MsZUFBZSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztTQUMvRTtRQUVELE1BQU0sQ0FBQyxlQUFlLENBQUM7Ozs7OztJQUdqQixRQUFRLENBQUMsQ0FBUztRQUN4QixNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDOzs7OztJQUduQyxZQUFZO1FBQ2xCLElBQUksQ
Line truncated
|
||||
@@ -0,0 +1,240 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { ElementRef, Input, Directive } from '@angular/core';
|
||||
import * as Selection from 'd3-selection';
|
||||
import * as Shape from 'd3-shape';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from '../services/graph.service';
|
||||
export class NlsGuillocheDirective {
|
||||
/**
|
||||
* @param {?} canvasService
|
||||
* @param {?} el
|
||||
* @param {?} math
|
||||
* @param {?} graphService
|
||||
*/
|
||||
constructor(canvasService, el, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.el = el;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnDestroy() {
|
||||
this.group.selectAll('*').remove();
|
||||
}
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnChanges(changes) {
|
||||
this.group = Selection.select(this.el.nativeElement);
|
||||
this.canvas = Selection.select(this.canvasService.get);
|
||||
// @todo modify graph here instead of in graphs.component.ts
|
||||
this.initialNodes = this.graph.nodes.slice();
|
||||
this.initialCurve = [
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes.slice(),
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point
|
||||
];
|
||||
this.medianPoint = this.math.medianOfCurve(this.initialCurve);
|
||||
this.medianIndex = this.math.medianIndex(this.initialCurve);
|
||||
if (this.animation) {
|
||||
this.graph.nodes = this.graph.nodes.slice().map((node, i) => {
|
||||
return {
|
||||
x: node.x,
|
||||
y: node.y,
|
||||
// ascent: Math.round(Math.random() * 100) / 100
|
||||
ascent: this.medianPoint.ascent + i * 0.5
|
||||
};
|
||||
});
|
||||
this.bounces = this.initialNodes.map(node => {
|
||||
/** @type {?} */
|
||||
const bounceAmplitude = Math.round(Math.random() * 150);
|
||||
return this.math.bounce(bounceAmplitude, 3);
|
||||
});
|
||||
/** @type {?} */
|
||||
let i = 0;
|
||||
this.animationInterval = setInterval(() => {
|
||||
this.animateGraph(i++ % 1000 / 10000);
|
||||
}, this.graph.interval);
|
||||
}
|
||||
else {
|
||||
if (this.animationInterval) {
|
||||
this.bounce = null;
|
||||
clearInterval(this.animationInterval);
|
||||
}
|
||||
}
|
||||
this.group.selectAll('*').remove();
|
||||
this.pathElements = [];
|
||||
/** @type {?} */
|
||||
const graphs = this.spreadLines([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes,
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
]).forEach((points, index) => this.drawGraph(points));
|
||||
}
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
animateGraph(x) {
|
||||
/** @type {?} */
|
||||
const graphs = this.spreadLines([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes.map((point, i) => {
|
||||
/** @type {?} */
|
||||
const ascent = point.ascent * Math.sin(Math.PI * x);
|
||||
return this.graphService.shiftPoint(point, ascent, this.bounces[i].next().value);
|
||||
}),
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
]);
|
||||
graphs.forEach((points, i) => this.updateGraph(points, i));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
spreadLines(points) {
|
||||
/** @type {?} */
|
||||
const shiftedMedians = [];
|
||||
/** @type {?} */
|
||||
const genshiftedMedians = this.graphService.spreadOrthogonal(this.medianPoint, this.graph.spread.spacing);
|
||||
for (let i = 0; i < this.graph.spread.amount; i++) {
|
||||
shiftedMedians.push(genshiftedMedians.next().value);
|
||||
}
|
||||
return shiftedMedians.map(median => {
|
||||
/** @type {?} */
|
||||
const shiftedPoints = points.slice();
|
||||
shiftedPoints.splice(this.medianIndex, 1, median);
|
||||
return shiftedPoints;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @param {?} index
|
||||
* @return {?}
|
||||
*/
|
||||
updateGraph(points, index) {
|
||||
this.pathElements[index]
|
||||
.attr('d', Shape.line()
|
||||
.x(p => p.x)
|
||||
.y(p => p.y)
|
||||
.curve(Shape.curveBasis)(points));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
drawGraph(points) {
|
||||
this.group
|
||||
.attr('stroke', this.graph.color)
|
||||
.attr('stroke-width', this.graph.stroke)
|
||||
.attr('fill', 'none');
|
||||
this.pathElements.push(this.group.append('path')
|
||||
.attr('d', Shape.line()
|
||||
.x(p => p.x)
|
||||
.y(p => p.y)
|
||||
.curve(Shape.curveBasis)(points)));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
debugGraph(points) {
|
||||
points.forEach((point, index) => {
|
||||
/** @type {?} */
|
||||
const circle = this.group.append('g');
|
||||
circle.append('circle')
|
||||
.attr('cx', point.x)
|
||||
.attr('cy', point.y)
|
||||
.attr('r', 3)
|
||||
.attr('fill-opacity', 0.6)
|
||||
.attr('fill', this.graph.color);
|
||||
circle.append('text')
|
||||
.attr('x', point.x)
|
||||
.attr('y', point.y)
|
||||
.attr('dx', 8)
|
||||
.attr('dy', 15)
|
||||
.attr('fill', this.graph.color)
|
||||
.text(index);
|
||||
});
|
||||
}
|
||||
}
|
||||
NlsGuillocheDirective.decorators = [
|
||||
{ type: Directive, args: [{
|
||||
selector: '[nlsGuilloche]'
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGuillocheDirective.ctorParameters = () => [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: ElementRef },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
];
|
||||
NlsGuillocheDirective.propDecorators = {
|
||||
graph: [{ type: Input }],
|
||||
animation: [{ type: Input }]
|
||||
};
|
||||
function NlsGuillocheDirective_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.group;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.bounce;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.bounces;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.initialNodes;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.initialCurve;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.animationInterval;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.medianPoint;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.medianIndex;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.pathElements;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.graph;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.canvasService;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.el;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.graphService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VpbGxvY2hlLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmN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UFTO1lBQ3hCLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEtBQUs7U0FDckIsQ0FBQyxDQUFDO1FBRUgsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7Ozs7OztJQUdyRCxXQUFXLENBQUMsTUFBZTs7UUFDakMsTUFBTSxjQUFjLEdBQUcsRUFBRSxDQUFDOztRQUMxQixNQUFNLGlCQUFpQixHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUUxRyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDO1lBQ2xELGNBQWMsQ0FBQyxJQUFJL
Line truncated
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Config() { }
|
||||
function Config_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Config.prototype.margin;
|
||||
/** @type {?} */
|
||||
Config.prototype.start;
|
||||
/** @type {?} */
|
||||
Config.prototype.end;
|
||||
/** @type {?} */
|
||||
Config.prototype.vectors;
|
||||
/** @type {?} */
|
||||
Config.prototype.colors;
|
||||
/** @type {?} */
|
||||
Config.prototype.spread;
|
||||
/** @type {?} */
|
||||
Config.prototype.nodes;
|
||||
/** @type {?} */
|
||||
Config.prototype.stroke;
|
||||
/** @type {?} */
|
||||
Config.prototype.overlap;
|
||||
/** @type {?} */
|
||||
Config.prototype.scale;
|
||||
/** @type {?} */
|
||||
Config.prototype.interval;
|
||||
/** @type {?|undefined} */
|
||||
Config.prototype.date;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLm1vZGVsLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9tb2RlbHMvY29uZmlnLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoQykgMjAxOCBNaWNoYWVsIEN6ZWNob3dza2kgPG1haWxAZGFpbHlzaC5pdD5cbiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0XG4gKiB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZVxuICogU29mdHdhcmUgRm91bmRhd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5nO1xuICAgIHNlY29uZGFyeTogc3RyaW5nO1xuICB9O1xuICBzcHJlYWQ6IHtcbiAgICBhbW91bnQ6IG51bWJlcjtcbiAgICBzcGFjaW5nOiBudW1iZXJcbiAgfTtcbiAgbm9kZXM6IGFueTtcbiAgc3Ryb2tlOiBhbnk7XG4gIG92ZXJsYXA6IGFueTtcbiAgc2NhbGU6IGFueTtcbiAgaW50ZXJ2YWw6IG51bWJlcjtcbiAgZGF0ZT86IERhdGU7XG59XG4iXX0=
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Graph() { }
|
||||
function Graph_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Graph.prototype.id;
|
||||
/** @type {?} */
|
||||
Graph.prototype.color;
|
||||
/** @type {?} */
|
||||
Graph.prototype.start;
|
||||
/** @type {?} */
|
||||
Graph.prototype.end;
|
||||
/** @type {?} */
|
||||
Graph.prototype.spread;
|
||||
/** @type {?} */
|
||||
Graph.prototype.interval;
|
||||
/** @type {?} */
|
||||
Graph.prototype.stroke;
|
||||
/** @type {?|undefined} */
|
||||
Graph.prototype.nodes;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGgubW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL21vZGVscy9ncmFwaC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaW50ZXJ2YWwgfSBmcm9tICdyeGpzJztcbi8qKlxuICogQ29weXJpZ2h0IChDKSAyMDE4IE1pY2hhZWwgQ3plY2hvd3NraSA8bWFpbEBkYWlseXNoLml0PlxuICogVGhpcyBw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IGNvbG9yOiBzdHJpbmc7IC8vIGNhbiBiZSBzZXQgaW4gZW52aXJvbWVudFxuICBzdGFydDoge1xuICAgIHBvaW50OiBQb2ludDtcbiAgICBkaXJlY3Rpb24/OiBQb2ludDtcbiAgICB2ZWN0b3I6IG51bWJlcjsgLy8gZGVncmVlIGJldHdlZW4gMCBhbmQgMzYwXG4gIH07XG4gIGVuZDoge1xuICAgIHBvaW50OiBQb2ludDtcbiAgICBkaXJlY3Rpb24/OiBQb2ludDtcbiAgICB2ZWN0b3I6IG51bWJlcjsgLy8gZGVncmVlIGJldHdlZW4gMCBhbmQgMzYwXG4gIH07XG4gIHNwcmVhZDoge1xuICAgIGFtb3VudDogbnVtYmVyO1xuICAgIHNwYWNpbmc6IG51bWJlclxuICB9O1xuICBpbnRlcnZhbDogbnVtYmVyO1xuICBzdHJva2U6IG51bWJlcjsgLy8gc3Ryb2tlIHdpZHRoXG4gIG5vZGVzPzogUG9pbnRbXTsgLy8gb3JpZW50YXRpb24gcG9pbnRzXG59XG4iXX0=
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Matrix() { }
|
||||
function Matrix_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Matrix.prototype.start;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.end;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.center;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.width;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.height;
|
||||
/** @type {?|undefined} */
|
||||
Matrix.prototype.unit;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0cml4Lm1vZGVsLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9tb2RlbHMvbWF0cml4Lm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoQykgMjAxOCBNaWNoYWVsIEN6ZWNob3dza2kgPG1haWxAZGFpbHlzaC5pdD5cbiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0XG4gKiB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZVxuICogU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVFxuICogQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yXG4gKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3JcbiAqIG1vcmUgZGV0YWlscy5cbiAqXG4gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyB3aXRoXG4gKiB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgNTFcbiAqIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAtMTMwMSwgVVNBLlxuICovXG5cbmltcG9ydCB7IFBvaW50IH0gZnJvbSAnLi9wb2ludC5tb2RlbCc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTWF0cml4IHtcbiAgc3RhcnQ6IFBvaW50O1xuICBlbmQ6IFBvaW50O1xuICBjZW50ZXI6IFBvaW50O1xuICB3aWR0aDogbnVtYmVyO1xuICBoZWlnaHQ6IG51bWJlcjtcbiAgdW5pdD86IG51bWJlcjtcbn1cbiJdfQ==
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Param() { }
|
||||
function Param_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Param.prototype.colors;
|
||||
/** @type {?} */
|
||||
Param.prototype.points;
|
||||
/** @type {?} */
|
||||
Param.prototype.margin;
|
||||
/** @type {?} */
|
||||
Param.prototype.spread;
|
||||
/** @type {?} */
|
||||
Param.prototype.space;
|
||||
/** @type {?|undefined} */
|
||||
Param.prototype.stroke;
|
||||
/** @type {?|undefined} */
|
||||
Param.prototype.showGrid;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW0ubW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL21vZGVscy9wYXJhbS5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTggTWljaGFlbCBDemVjaG93c2tpIDxtYWlsQGRhaWx5c2guaXQ+XG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdFxuICogdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWVcbiAqIFNvZnR3YXJlIEZvdW5kYXRpb247IHZlcnNpb24gMi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVRcbiAqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvclxuICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yXG4gKiBtb3JlIGRldGFpbHMuXG4gKlxuICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcgd2l0aFxuICogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sIDUxXG4gKiBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEsIFVTQS5cbiAqL1xuXG5leHBvcnQgaW50ZXJmYWNlIFBhcmFtIHtcbiAgY29sb3JzOiB7XG4gICAgc3RhcnQ6IHN0cmluZyxcbiAgICBlbmQ6IHN0cmluZ1xuICB9O1xuICBwb2ludHM6IG51bWJlcjtcbiAgbWFyZ2luOiB7XG4gICAgeDogbnVtYmVyLFxuICAgIHk6IG51bWJlclxuICB9O1xuICBzcHJlYWQ6IG51bWJlcjtcbiAgc3BhY2U6IG51bWJlcjtcbiAgc3Ryb2tlPzoge1xuICAgIHdpZHRoOiBudW1iZXI7XG4gIH07XG4gIHNob3dHcmlkPzogYm9vbGVhbjtcbn1cbiJdfQ==
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Point() { }
|
||||
function Point_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Point.prototype.x;
|
||||
/** @type {?} */
|
||||
Point.prototype.y;
|
||||
/** @type {?|undefined} */
|
||||
Point.prototype.color;
|
||||
/** @type {?|undefined} */
|
||||
Point.prototype.ascent;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9pbnQubW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL21vZGVscy9wb2ludC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTggTWljaGFlbCBDemVjaG93c2tpIDxtYWlsQGRhaWx5c2guaXQ+XG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdFxuICogdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWVcbiAqIFNvZnR3YXJlIEZvdW5kYXRpb247IHZlcnNpb24gMi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVRcbiAqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvclxuICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yXG4gKiBtb3JlIGRldGFpbHMuXG4gKlxuICogWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYWxvbmcgd2l0aFxuICogdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sIDUxXG4gKiBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEsIFVTQS5cbiAqL1xuXG5leHBvcnQgaW50ZXJmYWNlIFBvaW50IHtcbiAgeDogbnVtYmVyO1xuICB5OiBudW1iZXI7XG4gIGNvbG9yPzogc3RyaW5nO1xuICBhc2NlbnQ/OiBudW1iZXI7XG59XG4iXX0=
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NlsGraphsComponent } from './components/graphs.component';
|
||||
import { NlsGuillocheDirective } from './directives/guilloche.directive';
|
||||
import { NlsHistoryService } from './services/history.service';
|
||||
import { NlsCanvasService } from './services/canvas.service';
|
||||
import { NlsMathService } from './services/math.service';
|
||||
import { NlsGraphService } from './services/graph.service';
|
||||
export class NlsGuillocheModule {
|
||||
}
|
||||
NlsGuillocheModule.decorators = [
|
||||
{ type: NgModule, args: [{
|
||||
imports: [
|
||||
BrowserModule
|
||||
],
|
||||
declarations: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
],
|
||||
providers: [
|
||||
NlsHistoryService,
|
||||
NlsCanvasService,
|
||||
NlsMathService,
|
||||
NlsGraphService,
|
||||
],
|
||||
exports: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
]
|
||||
},] },
|
||||
];
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmxzLWd1aWxsb2NoZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL25scy1ndWlsbG9jaGUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDMUQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNuRSxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUN6RSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUM3RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDekQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBcUIzRCxNQUFNOzs7WUFuQkwsUUFBUSxTQUFDO2dCQUNSLE9BQU8sRUFBRTtvQkFDUCxhQUFhO2lCQUNkO2dCQUNELFlBQVksRUFBRTtvQkFDWixrQkFBa0I7b0JBQ2xCLHFCQUFxQjtpQkF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hpc3RvcnlTZXJ2aWNlLFxuICAgIE5sc0NhbnZhc1NlcnZpY2UsXG4gICAgTmxzTWF0aFNlcnZpY2UsXG4gICAgTmxzR3JhcGhTZXJ2aWNlLFxuICBdLFxuICBleHBvcnRzOiBbXG4gICAgTmxzR3JhcGhzQ29tcG9uZW50LFxuICAgIE5sc0d1aWxsb2NoZURpcmVjdGl2ZVxuICBdXG59KVxuZXhwb3J0IGNsYXNzIE5sc0d1aWxsb2NoZU1vZHVsZSB7fVxuIl19
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NlsMathService } from './math.service';
|
||||
import { NlsHistoryService } from './history.service';
|
||||
export class NlsAnimationService {
|
||||
/**
|
||||
* @param {?} math
|
||||
* @param {?} historyService
|
||||
*/
|
||||
constructor(math, historyService) {
|
||||
this.math = math;
|
||||
this.historyService = historyService;
|
||||
}
|
||||
/**
|
||||
* @param {?} initialGraph
|
||||
* @return {?}
|
||||
*/
|
||||
animate(initialGraph) {
|
||||
/** @type {?} */
|
||||
const newGraph = Object.assign({}, initialGraph);
|
||||
/** @type {?} */
|
||||
const indexMiddle = Math.floor(newGraph.nodes.length * 0.5);
|
||||
/** @type {?} */
|
||||
const pointMiddle = newGraph.nodes[indexMiddle];
|
||||
newGraph.nodes.splice(indexMiddle, 1, {
|
||||
x: pointMiddle.x - 2,
|
||||
y: pointMiddle.y + 2,
|
||||
});
|
||||
return newGraph;
|
||||
// });
|
||||
}
|
||||
}
|
||||
NlsAnimationService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsAnimationService.ctorParameters = () => [
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsHistoryService }
|
||||
];
|
||||
function NlsAnimationService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.speed;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.range;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.historyService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL3NlcnZpY2VzL2FuaW1hdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFVLFVBQVUsRUFBdUIsTUFBTSxlQUFlLENBQUM7QUFLeEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBR3RELE1BQU07Ozs7O0lBU0osWUFDVSxNQUNBO1FBREEsU0FBSSxHQUFKLElBQUk7UUFDSixtQkFBYyxHQUFkLGNBQWM7S0FFdkI7Ozs7O0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XG4gIH1cbn1cblxuIl19
|
||||
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable, RendererFactory2 } from '@angular/core';
|
||||
export class NlsCanvasService {
|
||||
/**
|
||||
* @param {?} rendererFactory
|
||||
*/
|
||||
constructor(rendererFactory) {
|
||||
this.rendererFactory = rendererFactory;
|
||||
this.renderer = rendererFactory.createRenderer(null, null);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get get() {
|
||||
return this.canvas;
|
||||
}
|
||||
/**
|
||||
* @param {?} el
|
||||
* @return {?}
|
||||
*/
|
||||
set(el) {
|
||||
this.canvas = el;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
adjustToWindow() {
|
||||
if (this.canvas) {
|
||||
this.renderer.setStyle(this.canvas, 'width', this.canvas.innerWidth);
|
||||
this.renderer.setStyle(this.canvas, 'height', this.canvas.innerHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsCanvasService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsCanvasService.ctorParameters = () => [
|
||||
{ type: RendererFactory2 }
|
||||
];
|
||||
function NlsCanvasService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.renderer;
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.rendererFactory;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FudmFzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL3NlcnZpY2VzL2NhbnZhcy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFVLFVBQVUsRUFBYSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUloRixNQUFNOzs7O0lBS0osWUFDVTtRQUFBLG9CQUFlLEdBQWYsZUFBZTtRQUV2QixJQUFJLENBQUMsUUFBUSxHQUFHLGVBQWUsQ0FBQyxjQUFjLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQzVEOzs7O1FBRVUsR0FBRztRQUNaLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDOzs7Ozs7SUFHZCxHQUFHLENBQUMsRUFBRTtRQUNYLElBQUksQ0FBQyxNQUFNLEdBQUcsRUFBRSxDQUFDOzs7OztJQUdaLGNBQWM7UUFDbkIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDaEIsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQ3BCLElBQUksQ0FBQyxNQUFNLEVBQ1gsT0FBTyxFQUNQLElBQUksQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUN2QixDQUFDO1lBQ0YsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQ3BCLElBQUksQ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KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
||||
@@ -0,0 +1,94 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NlsMathService } from './math.service';
|
||||
export class NlsGraphService {
|
||||
/**
|
||||
* @param {?} math
|
||||
*/
|
||||
constructor(math) {
|
||||
this.math = math;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get() {
|
||||
return this.graphs;
|
||||
}
|
||||
/**
|
||||
* @param {?} newGraphs
|
||||
* @return {?}
|
||||
*/
|
||||
set(newGraphs) {
|
||||
this.graphs = newGraphs;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get isAnimated() {
|
||||
return this.animation;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
startAnimation() {
|
||||
this.animation = true;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
stopAnimation() {
|
||||
this.animation = false;
|
||||
}
|
||||
/**
|
||||
* @param {?} start
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
*spreadOrthogonal(start, spacing) {
|
||||
/** @type {?} */
|
||||
const sign = this.math.flipSign();
|
||||
/** @type {?} */
|
||||
let currentPoint = start;
|
||||
/** @type {?} */
|
||||
let i = 0;
|
||||
while (true) {
|
||||
/** @type {?} */
|
||||
const currentSpacing = sign.next().value * spacing * i;
|
||||
currentPoint = this.shiftPoint(currentPoint, start.ascent, currentSpacing);
|
||||
yield currentPoint;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} radians
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
shiftPoint(point, radians, spacing) {
|
||||
return {
|
||||
x: Math.sin(radians * Math.PI) * spacing + point.x,
|
||||
y: Math.cos(radians * Math.PI) * spacing + point.y
|
||||
};
|
||||
}
|
||||
}
|
||||
NlsGraphService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphService.ctorParameters = () => [
|
||||
{ type: NlsMathService }
|
||||
];
|
||||
function NlsGraphService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.math;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGguc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMvc2VydmljZXMvZ3JhcGguc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBaUJBLE9BQU8sRUFBVSxVQUFVLEVBQStCLE1BQU0sZUFBZSxDQUFDO0FBR2hGLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUtoRCxNQUFNOzs7O0lBSUosWUFDVTtRQUFBLFNBQUksR0FBSixJQUFJO0tBQ1Y7Ozs7SUFFRyxHQUFHO1FBQ1IsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7OztJQUdkLEdBQUcsQ0FBQyxTQUFrQjtRQUMzQixJQUFJLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQzs7Ozs7UUFHZixVQUFVO1FBQ25CLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDOzs7OztJQUdqQixjQUFjO1FBQ25CLElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDOzs7OztJQUdqQixhQUFhO1FBQ2xCLElBQUksQ0FBQyxTQUFTLEdBQUcsS0FBSyxDQUFDOzs7Ozs7O0tBR2pCLGdCQUFnQixDQUFDLEt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HRydWUpIHtcbiAgICAgIGNvbnN0IGN1cnJlbnRTcGFjaW5nID0gc2lnbi5uZXh0KCkudmFsdWUgKiBzcGFjaW5nICogaTtcbiAgICAgIGN1cnJlbnRQb2ludCA9IHRoaXMuc2hpZnRQb2ludChjdXJyZW50UG9pbnQsIHN0YXJ0LmFzY2VudCwgY3VycmVudFNwYWNpbmcpO1xuXG4gICAgICB5aWVsZCBjdXJyZW50UG9pbnQ7XG5cbiAgICAgIGkrKztcbiAgICB9XG4gIH1cblxuICBwdWJsaWMgc2hpZnRQb2ludChwb2ludDogUG9pbnQsIHJhZGlhbnM6IG51bWJlciwgc3BhY2luZzogbnVtYmVyKTogUG9pbnQge1xuICAgIHJldHVybiB7XG4gICAgICB4OiBNYXRoLnNpbihyYWRpYW5zICogTWF0aC5QSSkgKiBzcGFjaW5nICsgcG9pbnQueCxcbiAgICAgIHk6IE1hdGguY29zKHJhZGlhbnMgKiBNYXRoLlBJKSAqIHNwYWNpbmcgKyBwb2ludC55XG4gICAgfTtcbiAgfVxufVxuIl19
|
||||
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
export class NlsHistoryService {
|
||||
constructor() {
|
||||
this.history = [];
|
||||
}
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @param {?} config
|
||||
* @return {?}
|
||||
*/
|
||||
save(graphs, config) {
|
||||
this.history.push({
|
||||
date: new Date(),
|
||||
graphs: graphs,
|
||||
config: config,
|
||||
hash: this.hash(graphs)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @return {?}
|
||||
*/
|
||||
hash(graphs) {
|
||||
return btoa(JSON.stringify(graphs));
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
list() {
|
||||
return this.history;
|
||||
}
|
||||
}
|
||||
NlsHistoryService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsHistoryService.ctorParameters = () => [];
|
||||
function NlsHistoryService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsHistoryService.prototype.history;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlzdG9yeS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9zZXJ2aWNlcy9oaXN0b3J5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQSxPQUFPLEVBQVUsVUFBVSxFQUF1QixNQUFNLGVBQWUsQ0FBQztBQU14RSxNQUFNO0lBSUo7UUFDRSxJQUFJLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztLQUNuQjs7Ozs7O0lBRU0sSUFBSSxDQUFDLE1BQWUsRUFBRSxNQUFNO1FBQ2pDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDO1lBQ2hCLElBQUksRUFBRSxJQUFJLElBQUksRUFBRTtZQUNoQixNQUFNLEVBQUUsTUFBTTtZQUNkLE1BQU0sRUF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9XG59XG5cbiJdfQ==
|
||||
@@ -0,0 +1,213 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import * as Random from 'd3-random';
|
||||
export class NlsMathService {
|
||||
/**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param {?} a
|
||||
* @param {?} b
|
||||
* @return {?}
|
||||
*/
|
||||
Δ(a, b) {
|
||||
return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
getClosestCenter(point, matrix) {
|
||||
if (this.Δ(point, matrix.start) < this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
getFarestCenter(point, matrix) {
|
||||
if (this.Δ(point, matrix.start) > this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} matrix
|
||||
* @param {?} overlap
|
||||
* @return {?}
|
||||
*/
|
||||
randomPoint(matrix, overlap) {
|
||||
/** @type {?} */
|
||||
const x = {
|
||||
min: matrix.center.x - matrix.width * overlap,
|
||||
max: matrix.center.x + matrix.width * overlap
|
||||
};
|
||||
/** @type {?} */
|
||||
const y = {
|
||||
min: matrix.center.y - matrix.height * overlap,
|
||||
max: matrix.center.y + matrix.height * overlap
|
||||
};
|
||||
return {
|
||||
x: Random.randomUniform(x.min, x.max)(),
|
||||
y: Random.randomUniform(y.min, y.max)()
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} width
|
||||
* @param {?} height
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfArea(width, height) {
|
||||
return {
|
||||
x: width * 0.5,
|
||||
y: height * 0.5
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfPoints(p1, p2) {
|
||||
return {
|
||||
x: (p1.x + p2.x) * 0.5,
|
||||
y: (p1.y + p2.y) * 0.5
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfCurve(curve) {
|
||||
/** @type {?} */
|
||||
const genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
const p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const radians = this.angleRadians(p1, p2);
|
||||
return Object.assign(this.centerOfPoints(p1, p2), { ascent: radians });
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
medianOfCurve(curve) {
|
||||
/** @type {?} */
|
||||
const genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
const p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p3 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const radians = this.angleRadians(p2, p3);
|
||||
// const radians = Math.round(Math.random() * 10000) / 1000;
|
||||
// @todo if nodes are less than 5 error occures
|
||||
return Object.assign(p1, { ascent: radians });
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
angleRadians(p1, p2) {
|
||||
return Math.atan2(p2.y - p1.y, p2.x - p1.x);
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
angleDegree(p1, p2) {
|
||||
return this.angleRadians(p1, p2) * 180 / Math.PI;
|
||||
}
|
||||
/**
|
||||
* @param {?} list
|
||||
* @return {?}
|
||||
*/
|
||||
medianIndex(list) {
|
||||
return Math.floor(list.length * 0.5);
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
*medianPoint(points) {
|
||||
/** @type {?} */
|
||||
let index;
|
||||
/** @type {?} */
|
||||
const list = points.slice();
|
||||
while (list) {
|
||||
index = this.medianIndex(points);
|
||||
yield list[index];
|
||||
list.splice(index, 1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param {?=} amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param {?=} decimals amount of decimal places
|
||||
* @param {?=} start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @return {?}
|
||||
*/
|
||||
*bounce(amplitude = 1, decimals = 1, start = 0) {
|
||||
/** @type {?} */
|
||||
const power = Math.pow(10, decimals);
|
||||
/** @type {?} */
|
||||
const step = 2 / (power);
|
||||
/** @type {?} */
|
||||
let index = 0;
|
||||
while (true) {
|
||||
/** @type {?} */
|
||||
const radians = Math.PI * step * index + start;
|
||||
yield Math.round((Math.sin(radians) * amplitude) * power) / power;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*flipSign(startPositive = true) {
|
||||
/** @type {?} */
|
||||
let sign = startPositive ? 1 : -1;
|
||||
while (true) {
|
||||
yield sign = sign * (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsMathService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9zZXJ2aWNlcy9tYXRoLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQSxPQUFPLEVBQVUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRW5ELE9BQU8sS0FBSyxNQUFNLE1BQU0sV0FBVyxDQUFDO0FBTXBDLE1BQU07Ozs7Ozs7SUFPRyxDQUFDLENBQUMsQ0FBUSxFQUFFLENBQVE7UUFDekIsTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDLENBQUM7Ozs7Ozs7SUFHakUsZ0JBQWdCLENBQUMsS0FBWSxFQUFFLE1BQVc7UUFDL0MsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsTUFBTSxDQUFDLEtBQUssQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSy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,0 +1,17 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/*
|
||||
* Public API Surface of nls-guilloche
|
||||
*/
|
||||
export { NlsGraphsComponent } from './nls/components/graphs.component';
|
||||
export { NlsGuillocheDirective } from './nls/directives/guilloche.directive';
|
||||
export { NlsAnimationService } from './nls/services/animation.service';
|
||||
export { NlsCanvasService } from './nls/services/canvas.service';
|
||||
export { NlsGraphService } from './nls/services/graph.service';
|
||||
export { NlsHistoryService } from './nls/services/history.service';
|
||||
export { NlsMathService } from './nls/services/math.service';
|
||||
export { NlsGuillocheModule } from './nls/nls-guilloche.module';
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJwdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxtQ0FBYyxtQ0FBbUMsQ0FBQztBQUNsRCxzQ0FBYyxzQ0FBc0MsQ0FBQztBQUtyRCxvQ0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxpQ0FBYywrQkFBK0IsQ0FBQztBQUM5QyxnQ0FBYyw4QkFBOEIsQ0FBQztBQUM3QyxrQ0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQywrQkFBYyw2QkFBNkIsQ0FBQztBQUM1QyxtQ0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgbmxzLWd1aWxsb2NoZVxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbmxzL2NvbXBvbmVudHMvZ3JhcGhzLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL25scy9kaXJlY3RpdmVzL2d1aWxsb2NoZS5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9ubHMvbW9kZWxzL2NvbmZpZy5tb2RlbCc7XG5leHBvcnQgKiBmcm9tICcuL25scy9tb2RlbHMvZ3JhcGgubW9kZWwnO1xuZXhwb3J0ICogZnJvbSAnLi9ubHMvbW9kZWxzL3BhcmFtLm1vZGVsJztcbmV4cG9ydCAqIGZyb20gJy4vbmxzL21vZGVscy9wb2ludC5tb2RlbCc7XG5leHBvcnQgKiBmcm9tICcuL25scy9zZXJ2aWNlcy9hbmltYXRpb24uc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL25scy9zZXJ2aWNlcy9jYW52YXMuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL25scy9zZXJ2aWNlcy9ncmFwaC5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbmxzL3NlcnZpY2VzL2hpc3Rvcnkuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL25scy9zZXJ2aWNlcy9tYXRoLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9ubHMvbmxzLWd1aWxsb2NoZS5tb2R1bGUnO1xuIl19
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
export { NlsGraphsComponent, NlsGuillocheDirective, NlsAnimationService, NlsCanvasService, NlsGraphService, NlsHistoryService, NlsMathService, NlsGuillocheModule } from './public_api';
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmxzLWd1aWxsb2NoZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMtZ3VpbGxvY2hlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSx5S0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
|
||||
@@ -0,0 +1,422 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import * as tslib_1 from "tslib";
|
||||
import { ViewChild, Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsHistoryService } from './../services/history.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from './../services/graph.service';
|
||||
/** @type {?} */
|
||||
var RESIZING_TIMEOUT = 800;
|
||||
var NlsGraphsComponent = /** @class */ (function () {
|
||||
function NlsGraphsComponent(canvasService, historyService, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.historyService = historyService;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
this.svgChange = new EventEmitter();
|
||||
this.graphChange = new EventEmitter();
|
||||
this.genLoadedAllGraphs = this.countLoadedGraphs();
|
||||
this.resizingWindow = false;
|
||||
}
|
||||
/**
|
||||
* @param {?} event
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.onResize = /**
|
||||
* @param {?} event
|
||||
* @return {?}
|
||||
*/
|
||||
function (event) {
|
||||
var _this = this;
|
||||
clearTimeout(this.resizingWindow);
|
||||
this.resizingWindow = setTimeout(function () {
|
||||
_this.canvas = _this.adjustCanvas();
|
||||
_this.matrix = _this.calcMatrix();
|
||||
_this.updateGraphs();
|
||||
}, RESIZING_TIMEOUT);
|
||||
};
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.ngOnChanges = /**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
function (changes) {
|
||||
this.canvas = this.adjustCanvas();
|
||||
this.matrix = this.calcMatrix();
|
||||
if (changes["config"]) {
|
||||
this.updateGraphs();
|
||||
}
|
||||
if (this.restoredHistory && this.restoredHistory.hash !== this.hash) {
|
||||
this.restoreGraph();
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.restoreGraph = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.graphs = this.restoredHistory.graphs;
|
||||
this.hash = this.restoredHistory.hash;
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.saveHistory = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.historyService.save(this.graphs, this.config);
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.saveGraph = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.graphService.set(this.graphs);
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.updateGraphs = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
var _this = this;
|
||||
/** @type {?} */
|
||||
var genShiftStart = this.shiftPoint(this.matrix.start, this.config.vectors.start);
|
||||
/** @type {?} */
|
||||
var genShiftEnd = this.shiftPoint(this.matrix.end, this.config.vectors.end, false);
|
||||
console.log(this.matrix);
|
||||
/** @type {?} */
|
||||
var curveList = [
|
||||
{
|
||||
color: this.config.colors.primary,
|
||||
start: genShiftStart.next().value,
|
||||
end: genShiftEnd.next().value
|
||||
},
|
||||
{
|
||||
color: this.config.colors.secondary,
|
||||
start: genShiftEnd.next().value,
|
||||
end: genShiftStart.next().value
|
||||
}
|
||||
];
|
||||
this.graphs = curveList.map(function (curve) {
|
||||
return tslib_1.__assign({}, _this.adjustGraph(curve), { spread: _this.config.spread, interval: _this.config.interval });
|
||||
});
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.saveHistory();
|
||||
this.saveGraph();
|
||||
};
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.adjustGraph = /**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
function (curve) {
|
||||
return Object.assign(curve, {
|
||||
stroke: this.config.stroke,
|
||||
start: Object.assign(curve.start, {
|
||||
direction: this.genVectorPoint(curve.start.point, curve.start.vector)
|
||||
}),
|
||||
end: Object.assign(curve.end, {
|
||||
direction: this.genVectorPoint(curve.end.point, curve.end.vector)
|
||||
}),
|
||||
nodes: this.genRandomPoints(this.config.nodes)
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} num
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.genRandomPoints = /**
|
||||
* @param {?} num
|
||||
* @return {?}
|
||||
*/
|
||||
function (num) {
|
||||
/** @type {?} */
|
||||
var generatedPoints = [];
|
||||
for (var i = 0; i < this.config.nodes; i++) {
|
||||
generatedPoints.push(this.math.randomPoint(this.matrix, this.config.overlap));
|
||||
}
|
||||
return generatedPoints;
|
||||
};
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.flipflop = /**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
function (x) {
|
||||
return (x === 'start') ? 'end' : 'start';
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.adjustCanvas = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.canvasService.set(this.canvas);
|
||||
this.canvasService.adjustToWindow();
|
||||
return this.svgElementRef.nativeElement;
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.calcMatrix = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
/** @type {?} */
|
||||
var canvasWidth = this.canvas.getBoundingClientRect().width;
|
||||
/** @type {?} */
|
||||
var canvasHeight = this.canvas.getBoundingClientRect().height;
|
||||
/** @type {?} */
|
||||
var totalArea = Math.abs(canvasWidth * canvasHeight);
|
||||
/** @type {?} */
|
||||
var totalCenter = this.math.centerOfArea(canvasWidth, canvasHeight);
|
||||
return {
|
||||
start: {
|
||||
x: 0,
|
||||
y: canvasHeight - this.config.vectors.spacing - this.config.margin.y
|
||||
},
|
||||
end: {
|
||||
x: canvasWidth - this.config.vectors.spacing - this.config.margin.x,
|
||||
y: 0
|
||||
},
|
||||
width: canvasWidth,
|
||||
height: canvasHeight,
|
||||
center: totalCenter
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.genVectorPoint = /**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @return {?}
|
||||
*/
|
||||
function (point, vector) {
|
||||
/** @type {?} */
|
||||
var range = this.math.Δ(this.matrix.start, this.matrix.end) * this.config.vectors.range;
|
||||
return {
|
||||
x: range * Math.sin(Math.PI * vector) + point.x,
|
||||
y: range * Math.cos(Math.PI * vector) + point.y
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.shiftPoint = /**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
function (point, vector, startPositive) {
|
||||
if (startPositive === void 0) { startPositive = true; }
|
||||
var genShiftX, genShiftY;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
genShiftX = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
genShiftY = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, {
|
||||
point: {
|
||||
x: Math.cos(Math.PI * vector) * genShiftX.next().value + point.x,
|
||||
y: Math.sin(Math.PI * vector) * genShiftY.next().value + point.y,
|
||||
},
|
||||
vector: vector
|
||||
}];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} space
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.shiftNumber = /**
|
||||
* @param {?} space
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
function (space, vector, startPositive) {
|
||||
if (startPositive === void 0) { startPositive = true; }
|
||||
var current, index, sign;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
current = 0;
|
||||
index = 0;
|
||||
sign = this.math.flipSign(startPositive);
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, current = sign.next().value * index * space + current];
|
||||
case 2:
|
||||
_a.sent();
|
||||
index++;
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} guillocheElement
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.prepareGuillocheExport = /**
|
||||
* @param {?} guillocheElement
|
||||
* @return {?}
|
||||
*/
|
||||
function (guillocheElement) {
|
||||
if (this.genLoadedAllGraphs.next().value) {
|
||||
this.svgChange.emit(this.svgElementRef);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphsComponent.prototype.countLoadedGraphs = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
var cycles;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
cycles = 1;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 6];
|
||||
if (!(cycles < this.graphs.length)) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, false];
|
||||
case 2:
|
||||
_a.sent();
|
||||
cycles++;
|
||||
return [3 /*break*/, 5];
|
||||
case 3: return [4 /*yield*/, true];
|
||||
case 4:
|
||||
_a.sent();
|
||||
cycles = 1;
|
||||
_a.label = 5;
|
||||
case 5: return [3 /*break*/, 1];
|
||||
case 6: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
NlsGraphsComponent.decorators = [
|
||||
{ type: Component, args: [{
|
||||
selector: 'nls-graphs',
|
||||
template: "<svg #svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\"\nversion=\"1.1\" shape-rendering=\"geometricPrecision\">\n <g nlsGuilloche *ngFor=\"let graph of graphs\" [graph]=\"graph\" [animation]=\"animation\"></g>\n</svg>\n",
|
||||
styles: [":host{position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden}"]
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphsComponent.ctorParameters = function () { return [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: NlsHistoryService },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
]; };
|
||||
NlsGraphsComponent.propDecorators = {
|
||||
config: [{ type: Input }],
|
||||
restoredHistory: [{ type: Input }],
|
||||
animation: [{ type: Input }],
|
||||
svgChange: [{ type: Output }],
|
||||
graphChange: [{ type: Output }],
|
||||
svgElementRef: [{ type: ViewChild, args: ['svg',] }],
|
||||
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
|
||||
};
|
||||
return NlsGraphsComponent;
|
||||
}());
|
||||
export { NlsGraphsComponent };
|
||||
function NlsGraphsComponent_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.matrix;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.windowHeight;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.windowWidth;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.genShiftPoint;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.genLoadedAllGraphs;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.hash;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.resizingWindow;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.config;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.restoredHistory;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.svgChange;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphChange;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.svgElementRef;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.canvasService;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.historyService;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsGraphsComponent.prototype.graphService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGhzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMvY29tcG9uZW50cy9ncmFwaHMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBZ0JBLE9BQU8sRUFBRSxTQUFTLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQTRCLFlBQVksRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFVMUgsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFDaEUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDbEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBRTVELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQzs7QUFFOUQsSUFBTSxnQkFBZ0IsR0FBRyxHQUFHLENBQUM7O0lBMEMzQiw0QkFDVSxlQUNBLGdCQUNBLE1BQ0E7UUFIQSxrQkFBYSxHQUFiLGFBQWE7UUFDYixtQkFBYyxHQUFkLGNBQWM7UUFDZCxTQUFJLEdBQUosSUFBSTtRQUNKLGlCQUFZLEdBQVosWUFBWTt5QkFuQkEsSUFBSSxZQUFZLEVBQUU7MkJBQ2hCLElBQUksWUFBWSxFQUFFO1FBb0J4QyxJQUFJLENBQUMsa0JBQWtCLEdBQUcsSUFB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|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import * as tslib_1 from "tslib";
|
||||
import { ElementRef, Input, Directive } from '@angular/core';
|
||||
import * as Selection from 'd3-selection';
|
||||
import * as Shape from 'd3-shape';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from '../services/graph.service';
|
||||
var NlsGuillocheDirective = /** @class */ (function () {
|
||||
function NlsGuillocheDirective(canvasService, el, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.el = el;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.ngOnDestroy = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.group.selectAll('*').remove();
|
||||
};
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.ngOnChanges = /**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
function (changes) {
|
||||
var _this = this;
|
||||
this.group = Selection.select(this.el.nativeElement);
|
||||
this.canvas = Selection.select(this.canvasService.get);
|
||||
// @todo modify graph here instead of in graphs.component.ts
|
||||
this.initialNodes = this.graph.nodes.slice();
|
||||
this.initialCurve = tslib_1.__spread([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction
|
||||
], this.graph.nodes.slice(), [
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point
|
||||
]);
|
||||
this.medianPoint = this.math.medianOfCurve(this.initialCurve);
|
||||
this.medianIndex = this.math.medianIndex(this.initialCurve);
|
||||
if (this.animation) {
|
||||
this.graph.nodes = this.graph.nodes.slice().map(function (node, i) {
|
||||
return {
|
||||
x: node.x,
|
||||
y: node.y,
|
||||
// ascent: Math.round(Math.random() * 100) / 100
|
||||
ascent: _this.medianPoint.ascent + i * 0.5
|
||||
};
|
||||
});
|
||||
this.bounces = this.initialNodes.map(function (node) {
|
||||
/** @type {?} */
|
||||
var bounceAmplitude = Math.round(Math.random() * 150);
|
||||
return _this.math.bounce(bounceAmplitude, 3);
|
||||
});
|
||||
/** @type {?} */
|
||||
var i_1 = 0;
|
||||
this.animationInterval = setInterval(function () {
|
||||
_this.animateGraph(i_1++ % 1000 / 10000);
|
||||
}, this.graph.interval);
|
||||
}
|
||||
else {
|
||||
if (this.animationInterval) {
|
||||
this.bounce = null;
|
||||
clearInterval(this.animationInterval);
|
||||
}
|
||||
}
|
||||
this.group.selectAll('*').remove();
|
||||
this.pathElements = [];
|
||||
/** @type {?} */
|
||||
var graphs = this.spreadLines(tslib_1.__spread([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction
|
||||
], this.graph.nodes, [
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
])).forEach(function (points, index) { return _this.drawGraph(points); });
|
||||
};
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.animateGraph = /**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
function (x) {
|
||||
var _this = this;
|
||||
/** @type {?} */
|
||||
var graphs = this.spreadLines(tslib_1.__spread([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction
|
||||
], this.graph.nodes.map(function (point, i) {
|
||||
/** @type {?} */
|
||||
var ascent = point.ascent * Math.sin(Math.PI * x);
|
||||
return _this.graphService.shiftPoint(point, ascent, _this.bounces[i].next().value);
|
||||
}), [
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
]));
|
||||
graphs.forEach(function (points, i) { return _this.updateGraph(points, i); });
|
||||
};
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.spreadLines = /**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
function (points) {
|
||||
var _this = this;
|
||||
/** @type {?} */
|
||||
var shiftedMedians = [];
|
||||
/** @type {?} */
|
||||
var genshiftedMedians = this.graphService.spreadOrthogonal(this.medianPoint, this.graph.spread.spacing);
|
||||
for (var i = 0; i < this.graph.spread.amount; i++) {
|
||||
shiftedMedians.push(genshiftedMedians.next().value);
|
||||
}
|
||||
return shiftedMedians.map(function (median) {
|
||||
/** @type {?} */
|
||||
var shiftedPoints = points.slice();
|
||||
shiftedPoints.splice(_this.medianIndex, 1, median);
|
||||
return shiftedPoints;
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} points
|
||||
* @param {?} index
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.updateGraph = /**
|
||||
* @param {?} points
|
||||
* @param {?} index
|
||||
* @return {?}
|
||||
*/
|
||||
function (points, index) {
|
||||
this.pathElements[index]
|
||||
.attr('d', Shape.line()
|
||||
.x(function (p) { return p.x; })
|
||||
.y(function (p) { return p.y; })
|
||||
.curve(Shape.curveBasis)(points));
|
||||
};
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.drawGraph = /**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
function (points) {
|
||||
this.group
|
||||
.attr('stroke', this.graph.color)
|
||||
.attr('stroke-width', this.graph.stroke)
|
||||
.attr('fill', 'none');
|
||||
this.pathElements.push(this.group.append('path')
|
||||
.attr('d', Shape.line()
|
||||
.x(function (p) { return p.x; })
|
||||
.y(function (p) { return p.y; })
|
||||
.curve(Shape.curveBasis)(points)));
|
||||
};
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGuillocheDirective.prototype.debugGraph = /**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
function (points) {
|
||||
var _this = this;
|
||||
points.forEach(function (point, index) {
|
||||
/** @type {?} */
|
||||
var circle = _this.group.append('g');
|
||||
circle.append('circle')
|
||||
.attr('cx', point.x)
|
||||
.attr('cy', point.y)
|
||||
.attr('r', 3)
|
||||
.attr('fill-opacity', 0.6)
|
||||
.attr('fill', _this.graph.color);
|
||||
circle.append('text')
|
||||
.attr('x', point.x)
|
||||
.attr('y', point.y)
|
||||
.attr('dx', 8)
|
||||
.attr('dy', 15)
|
||||
.attr('fill', _this.graph.color)
|
||||
.text(index);
|
||||
});
|
||||
};
|
||||
NlsGuillocheDirective.decorators = [
|
||||
{ type: Directive, args: [{
|
||||
selector: '[nlsGuilloche]'
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGuillocheDirective.ctorParameters = function () { return [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: ElementRef },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
]; };
|
||||
NlsGuillocheDirective.propDecorators = {
|
||||
graph: [{ type: Input }],
|
||||
animation: [{ type: Input }]
|
||||
};
|
||||
return NlsGuillocheDirective;
|
||||
}());
|
||||
export { NlsGuillocheDirective };
|
||||
function NlsGuillocheDirective_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.group;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.bounce;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.bounces;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.initialNodes;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.initialCurve;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.animationInterval;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.medianPoint;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.medianIndex;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.pathElements;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.graph;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.canvasService;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.el;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsGuillocheDirective.prototype.graphService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3VpbGxvY2hlLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25scy1ndWlsbG9jaGUvIiwic291cmNlcyI6WyJubHMvZGlyZWN0aXZlcy9ndWlsbG9jaGUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBZ0JBLE9BQU8sRUFBRSxVQUFVLEVBQWdCLEtBQUssRUFBRSxTQUFTLEVBQXVDLE1BQU0sZUFBZSxDQUFDO0FBQ2hILE9BQU8sS0FBSyxTQUFTLE1BQU0sY0FBYyxDQUFDO0FBQzFDLE9BQU8sS0FBSyxLQUFLLE1BQU0sVUFBVSxDQUFDO0FBUWxDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSw0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QUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBRTFHLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7WUFDbEQsY0FBYyxDQUFDLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxLQUFLL
Line truncated
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Config() { }
|
||||
function Config_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Config.prototype.margin;
|
||||
/** @type {?} */
|
||||
Config.prototype.start;
|
||||
/** @type {?} */
|
||||
Config.prototype.end;
|
||||
/** @type {?} */
|
||||
Config.prototype.vectors;
|
||||
/** @type {?} */
|
||||
Config.prototype.colors;
|
||||
/** @type {?} */
|
||||
Config.prototype.spread;
|
||||
/** @type {?} */
|
||||
Config.prototype.nodes;
|
||||
/** @type {?} */
|
||||
Config.prototype.stroke;
|
||||
/** @type {?} */
|
||||
Config.prototype.overlap;
|
||||
/** @type {?} */
|
||||
Config.prototype.scale;
|
||||
/** @type {?} */
|
||||
Config.prototype.interval;
|
||||
/** @type {?|undefined} */
|
||||
Config.prototype.date;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLm1vZGVsLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9tb2RlbHMvY29uZmlnLm1vZGVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoQykgMjAxOCBNaWNoYWVsIEN6ZWNob3dza2kgPG1haWxAZGFpbHlzaC5pdD5cbiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0XG4gKiB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZVxuICogU29mdHdhcmUgRm91bmRhdGlvbjsgdmVyc2lvbiAyLlxuICpcbiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVFxuICogQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yXG4gKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3JcbiAqIG1vcmUgZGV0YWlscy5cbiAqXG4gKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyB3aXRoXG4gKiB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLiwgNTFcbiAqIEZyYW5rbGluIFN0cmVldCwgRmlmdGggRmxvb3IsIEJvc3RvbiwgTUEgMDIxMTAtMTMwMSwgVVNBLlxuICovXG5cbmV4cG9ydCBpbnRlcmZhY2UgQ29uZmlnIHtcbiAgbWFyZ2luOiB7XG4gICAgeDogbnVtYmVyO1xuICAgIHk6IG51bWJlcjtcbiAgfTtcbiAgc3RhcnQ6IHtcbiAgICB4OiBudW1iZXI7XG4gICAgeTogbnVtYmVyO1xuICB9O1xuICBlbmQ6IHtcbiAgICB4OiBudW1iZXI7XG4gICAgeTogbnVtYmVyO1xuICB9O1xuICB2ZWN0b3JzOiB7XG4gICAgc3BhY2luZzogbnVtYmVyO1xuICAgIHN0YXJ0OiBhbnk7XG4gICAgZW5kOiBhbnk7XG4gICAgcmFuZ2U6IGFueTtcbiAgfTtcbiAgY29sb3JzOiB7XG4gICAgcHJpbWFyeTogc3RyaW5nO1xuICAgIHNlY29uZGFyeTogc3RyaW5nO1xuICB9O1xuICBzcHJlYWQ6IHtcbiAgICBhbW91bnQ6IG51bWJlcjtcbiAgICBzcGFjaW5nOiBudW1iZXJcbiAgfTtcbiAgbm9kZXM6IGFueTtcbiAgc3Ryb2tlOiBhbnk7XG4gIG92ZXJsYXA6IGFueTtcbiAgc2NhbGU6IGFueTtcbiAgaW50ZXJ2YWw6IG51bWJlcjtcbiAgZGF0ZT86IERhdGU7XG59XG4iXX0=
|
||||
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Graph() { }
|
||||
function Graph_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Graph.prototype.id;
|
||||
/** @type {?} */
|
||||
Graph.prototype.color;
|
||||
/** @type {?} */
|
||||
Graph.prototype.start;
|
||||
/** @type {?} */
|
||||
Graph.prototype.end;
|
||||
/** @type {?} */
|
||||
Graph.prototype.spread;
|
||||
/** @type {?} */
|
||||
Graph.prototype.interval;
|
||||
/** @type {?} */
|
||||
Graph.prototype.stroke;
|
||||
/** @type {?|undefined} */
|
||||
Graph.prototype.nodes;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGgubW9kZWwuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL21vZGVscy9ncmFwaC5tb2RlbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgaW50ZXJ2YWwgfSBmcm9tICdyeGpzJztcbi8qKlxuICogQ29weXJpZ2h0IChDKSAyMDE4IE1pY2hhZWwgQ3plY2hvd3NraSA8bWFpbEBkYWlseXNoLml0PlxuICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXRcbiAqIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlXG4gKiBTb2Z0d2FyZSBGb3VuZGF0aW9uOyB2ZXJzaW9uIDIuXG4gKlxuICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCBXSVRIT1VUXG4gKiBBTlkgV0FSUkFOVF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AgIHNwYWNpbmc6IG51bWJlclxuICB9O1xuICBpbnRlcnZhbDogbnVtYmVyO1xuICBzdHJva2U6IG51bWJlcjsgLy8gc3Ryb2tlIHdpZHRoXG4gIG5vZGVzPzogUG9pbnRbXTsgLy8gb3JpZW50YXRpb24gcG9pbnRzXG59XG4iXX0=
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Matrix() { }
|
||||
function Matrix_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Matrix.prototype.start;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.end;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.center;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.width;
|
||||
/** @type {?} */
|
||||
Matrix.prototype.height;
|
||||
/** @type {?|undefined} */
|
||||
Matrix.prototype.unit;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0cml4Lm1vZGVsLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9tb2RlbHMvbWF0cml4Lm1vZ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mltcG9ydCB7IFBvaW50IH0gZnJvbSAnLi9wb2ludC5tb2RlbCc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTWF0cml4IHtcbiAgc3RhcnQ6IFBvaW50O1xuICBlbmQ6IFBvaW50O1xuICBjZW50ZXI6IFBvaW50O1xuICB3aWR0aDogbnVtYmVyO1xuICBoZWlnaHQ6IG51bWJlcjtcbiAgdW5pdD86IG51bWJlcjtcbn1cbiJdfQ==
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Param() { }
|
||||
function Param_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Param.prototype.colors;
|
||||
/** @type {?} */
|
||||
Param.prototype.points;
|
||||
/** @type {?} */
|
||||
Param.prototype.margin;
|
||||
/** @type {?} */
|
||||
Param.prototype.spread;
|
||||
/** @type {?} */
|
||||
Param.prototype.space;
|
||||
/** @type {?|undefined} */
|
||||
Param.prototype.stroke;
|
||||
/** @type {?|undefined} */
|
||||
Param.prototype.showGrid;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW0ubW9kZWwuan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dHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEsIFVTQS5cbiAqL1xuXG5leHBvcnQgaW50ZXJmYWNlIFBhcmFtIHtcbiAgY29sb3JzOiB7XG4gICAgc3RhcnQ6IHN0cmluZyxcbiAgICBlbmQ6IHN0cmluZ1xuICB9O1xuICBwb2ludHM6IG51bWJlcjtcbiAgbWFyZ2luOiB7XG4gICAgeDogbnVtYmVyLFxuICAgIHk6IG51bWJlclxuICB9O1xuICBzcHJlYWQ6IG51bWJlcjtcbiAgc3BhY2U6IG51bWJlcjtcbiAgc3Ryb2tlPzoge1xuICAgIHdpZHRoOiBudW1iZXI7XG4gIH07XG4gIHNob3dHcmlkPzogYm9vbGVhbjtcbn1cbiJdfQ==
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
/**
|
||||
* @record
|
||||
*/
|
||||
export function Point() { }
|
||||
function Point_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
Point.prototype.x;
|
||||
/** @type {?} */
|
||||
Point.prototype.y;
|
||||
/** @type {?|undefined} */
|
||||
Point.prototype.color;
|
||||
/** @type {?|undefined} */
|
||||
Point.prototype.ascent;
|
||||
}
|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HRvIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4sIDUxXG4gKiBGcmFua2xpbiBTdHJlZXQsIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEsIFVTQS5cbiAqL1xuXG5leHBvcnQgaW50ZXJmYWNlIFBvaW50IHtcbiAgeDogbnVtYmVyO1xuICB5OiBudW1iZXI7XG4gIGNvbG9yPzogc3RyaW5nO1xuICBhc2NlbnQ/OiBudW1iZXI7XG59XG4iXX0=
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NlsGraphsComponent } from './components/graphs.component';
|
||||
import { NlsGuillocheDirective } from './directives/guilloche.directive';
|
||||
import { NlsHistoryService } from './services/history.service';
|
||||
import { NlsCanvasService } from './services/canvas.service';
|
||||
import { NlsMathService } from './services/math.service';
|
||||
import { NlsGraphService } from './services/graph.service';
|
||||
var NlsGuillocheModule = /** @class */ (function () {
|
||||
function NlsGuillocheModule() {
|
||||
}
|
||||
NlsGuillocheModule.decorators = [
|
||||
{ type: NgModule, args: [{
|
||||
imports: [
|
||||
BrowserModule
|
||||
],
|
||||
declarations: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
],
|
||||
providers: [
|
||||
NlsHistoryService,
|
||||
NlsCanvasService,
|
||||
NlsMathService,
|
||||
NlsGraphService,
|
||||
],
|
||||
exports: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
]
|
||||
},] },
|
||||
];
|
||||
return NlsGuillocheModule;
|
||||
}());
|
||||
export { NlsGuillocheModule };
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmxzLWd1aWxsb2NoZS5tb2R1bGUuanMiLCJzb3VyY2VS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 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NlsMathService } from './math.service';
|
||||
import { NlsHistoryService } from './history.service';
|
||||
var NlsAnimationService = /** @class */ (function () {
|
||||
// public genAnimation: any;
|
||||
// private timer: Observable<number>;
|
||||
// private subscribtion: any;
|
||||
function NlsAnimationService(math, historyService) {
|
||||
this.math = math;
|
||||
this.historyService = historyService;
|
||||
}
|
||||
/**
|
||||
* @param {?} initialGraph
|
||||
* @return {?}
|
||||
*/
|
||||
NlsAnimationService.prototype.animate = /**
|
||||
* @param {?} initialGraph
|
||||
* @return {?}
|
||||
*/
|
||||
function (initialGraph) {
|
||||
/** @type {?} */
|
||||
var newGraph = Object.assign({}, initialGraph);
|
||||
/** @type {?} */
|
||||
var indexMiddle = Math.floor(newGraph.nodes.length * 0.5);
|
||||
/** @type {?} */
|
||||
var pointMiddle = newGraph.nodes[indexMiddle];
|
||||
newGraph.nodes.splice(indexMiddle, 1, {
|
||||
x: pointMiddle.x - 2,
|
||||
y: pointMiddle.y + 2,
|
||||
});
|
||||
return newGraph;
|
||||
// });
|
||||
};
|
||||
NlsAnimationService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsAnimationService.ctorParameters = function () { return [
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsHistoryService }
|
||||
]; };
|
||||
return NlsAnimationService;
|
||||
}());
|
||||
export { NlsAnimationService };
|
||||
function NlsAnimationService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.speed;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.range;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.math;
|
||||
/** @type {?} */
|
||||
NlsAnimationService.prototype.historyService;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5pbWF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL3NlcnZpY2VzL2FuaW1hdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFVLFVBQVUsRUFBdUIsTUFBTSxlQUFlLENBQUM7QUFLeEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDOztJQVFwRCw0QkFBNEI7SUFDNUIscUNBQXFDO0lBQ3JDLDZCQUE2QjtJQUU3Qiw2QkFDVSxNQUNBO1FBREEsU0FBSSxHQUFKLElBQUk7UUFDSixtQkFBYyxHQUFkLGNBQWM7S0FFdkI7Ozs7O0lBR00scUNBQU87Ozs7Y0FBQyxZQUFtQjs7UUFLOUIsSUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxFQUFFLEVBQUUsWUFBWSxDQUFDLENBQUM7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ppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable, RendererFactory2 } from '@angular/core';
|
||||
var NlsCanvasService = /** @class */ (function () {
|
||||
function NlsCanvasService(rendererFactory) {
|
||||
this.rendererFactory = rendererFactory;
|
||||
this.renderer = rendererFactory.createRenderer(null, null);
|
||||
}
|
||||
Object.defineProperty(NlsCanvasService.prototype, "get", {
|
||||
get: /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
return this.canvas;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* @param {?} el
|
||||
* @return {?}
|
||||
*/
|
||||
NlsCanvasService.prototype.set = /**
|
||||
* @param {?} el
|
||||
* @return {?}
|
||||
*/
|
||||
function (el) {
|
||||
this.canvas = el;
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsCanvasService.prototype.adjustToWindow = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
if (this.canvas) {
|
||||
this.renderer.setStyle(this.canvas, 'width', this.canvas.innerWidth);
|
||||
this.renderer.setStyle(this.canvas, 'height', this.canvas.innerHeight);
|
||||
}
|
||||
};
|
||||
NlsCanvasService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsCanvasService.ctorParameters = function () { return [
|
||||
{ type: RendererFactory2 }
|
||||
]; };
|
||||
return NlsCanvasService;
|
||||
}());
|
||||
export { NlsCanvasService };
|
||||
function NlsCanvasService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.renderer;
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.canvas;
|
||||
/** @type {?} */
|
||||
NlsCanvasService.prototype.rendererFactory;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FudmFzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9ubHMtZ3VpbGxvY2hlLyIsInNvdXJjZXMiOlsibmxzL3NlcnZpY2VzL2NhbnZhcy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFVLFVBQVUsRUFBYSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7SUFTOUUsMEJBQ1U7UUFBQSxvQkFBZSxHQUFmLGVBQWU7UUFFdkIsSUFBSSxDQUFDLFFBQVEsR0FBRyxlQUFlLENBQUMsY0FBYyxDQUFDLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQztLQUM1RDswQkFFVSxpQ0FBRzs7Ozs7WUFDWixNQUFNLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQzs7Ozs7Ozs7O0lBR2QsOEJBQUc7Ozs7Y0FBQyxFQUFFO1FBQ1gsSUFBSSxDQUFDLE1BQU0sR0FBRyxFQUFFLENBQUM7Ozs7O0lBR1oseUNBQWM7Ozs7UUFDbkIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDaEIsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQ3BCLElBQUksQ0FBQyxNQUFNL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5lcldpZHRoXG4gICAgICApO1xuICAgICAgdGhpcy5yZW5kZXJlci5zZXRTdHlsZShcbiAgICAgICAgdGhpcy5jYW52YXMsXG4gICAgICAgICdoZWlnaHQnLFxuICAgICAgICB0aGlzLmNhbnZhcy5pbm5lckhlaWdodFxuICAgICAgKTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
||||
@@ -0,0 +1,129 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NlsMathService } from './math.service';
|
||||
var NlsGraphService = /** @class */ (function () {
|
||||
function NlsGraphService(math) {
|
||||
this.math = math;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.get = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
return this.graphs;
|
||||
};
|
||||
/**
|
||||
* @param {?} newGraphs
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.set = /**
|
||||
* @param {?} newGraphs
|
||||
* @return {?}
|
||||
*/
|
||||
function (newGraphs) {
|
||||
this.graphs = newGraphs;
|
||||
};
|
||||
Object.defineProperty(NlsGraphService.prototype, "isAnimated", {
|
||||
get: /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
return this.animation;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.startAnimation = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.animation = true;
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.stopAnimation = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
this.animation = false;
|
||||
};
|
||||
/**
|
||||
* @param {?} start
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.spreadOrthogonal = /**
|
||||
* @param {?} start
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
function (start, spacing) {
|
||||
var sign, currentPoint, i, currentSpacing;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
sign = this.math.flipSign();
|
||||
currentPoint = start;
|
||||
i = 0;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 3];
|
||||
currentSpacing = sign.next().value * spacing * i;
|
||||
currentPoint = this.shiftPoint(currentPoint, start.ascent, currentSpacing);
|
||||
return [4 /*yield*/, currentPoint];
|
||||
case 2:
|
||||
_a.sent();
|
||||
i++;
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} radians
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
NlsGraphService.prototype.shiftPoint = /**
|
||||
* @param {?} point
|
||||
* @param {?} radians
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
function (point, radians, spacing) {
|
||||
return {
|
||||
x: Math.sin(radians * Math.PI) * spacing + point.x,
|
||||
y: Math.cos(radians * Math.PI) * spacing + point.y
|
||||
};
|
||||
};
|
||||
NlsGraphService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphService.ctorParameters = function () { return [
|
||||
{ type: NlsMathService }
|
||||
]; };
|
||||
return NlsGraphService;
|
||||
}());
|
||||
export { NlsGraphService };
|
||||
function NlsGraphService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.graphs;
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.animation;
|
||||
/** @type {?} */
|
||||
NlsGraphService.prototype.math;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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gIHB1YmxpYyBzaGlmdFBvaW50KHBvaW50OiBQb2ludCwgcmFkaWFuczogbnVtYmVyLCBzcGFjaW5nOiBudW1iZXIpOiBQb2ludCB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHg6IE1hdGguc2luKHJhZGlhbnMgKiBNYXRoLlBJKSAqIHNwYWNpbmcgKyBwb2ludC54LFxuICAgICAgeTogTWF0aC5jb3MocmFkaWFucyAqIE1hdGguUEkpICogc3BhY2luZyArIHBvaW50LnlcbiAgICB9O1xuICB9XG59XG4iXX0=
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Injectable } from '@angular/core';
|
||||
var NlsHistoryService = /** @class */ (function () {
|
||||
function NlsHistoryService() {
|
||||
this.history = [];
|
||||
}
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @param {?} config
|
||||
* @return {?}
|
||||
*/
|
||||
NlsHistoryService.prototype.save = /**
|
||||
* @param {?} graphs
|
||||
* @param {?} config
|
||||
* @return {?}
|
||||
*/
|
||||
function (graphs, config) {
|
||||
this.history.push({
|
||||
date: new Date(),
|
||||
graphs: graphs,
|
||||
config: config,
|
||||
hash: this.hash(graphs)
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @return {?}
|
||||
*/
|
||||
NlsHistoryService.prototype.hash = /**
|
||||
* @param {?} graphs
|
||||
* @return {?}
|
||||
*/
|
||||
function (graphs) {
|
||||
return btoa(JSON.stringify(graphs));
|
||||
};
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
NlsHistoryService.prototype.list = /**
|
||||
* @return {?}
|
||||
*/
|
||||
function () {
|
||||
return this.history;
|
||||
};
|
||||
NlsHistoryService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsHistoryService.ctorParameters = function () { return []; };
|
||||
return NlsHistoryService;
|
||||
}());
|
||||
export { NlsHistoryService };
|
||||
function NlsHistoryService_tsickle_Closure_declarations() {
|
||||
/** @type {?} */
|
||||
NlsHistoryService.prototype.history;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlzdG9yeS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9zZXJ2aWNlcy9oaXN0b3J5LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQSxPQUFPLEVBQVUsVUFBVSxFQUF1QixNQUFNLGVBQWUsQ0FBQzs7SUFVdEU7UUFDRSxJQUFJLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQztLQUNuQjs7Ozs7O0lBRU0sZ0NBQUk7Ozs7O2NBQUMsTUFBZSxFQUFFLE1BQU07UUFDakMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUM7WUFDaEIsSUFBSSxFQUFFLElBQUksSUFBSSxFQUFFO1lBQ2hCLE1BQU0sRUFBRSxNQUFNO1lBQ2QsTUFBTSxFQUFFLE1BQU07WUFDZCxJQUFJLEVBQUUsSUFBSS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=
|
||||
@@ -0,0 +1,318 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Injectable } from '@angular/core';
|
||||
import * as Random from 'd3-random';
|
||||
var NlsMathService = /** @class */ (function () {
|
||||
function NlsMathService() {
|
||||
}
|
||||
/**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param {?} a
|
||||
* @param {?} b
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.Δ = /**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param {?} a
|
||||
* @param {?} b
|
||||
* @return {?}
|
||||
*/
|
||||
function (a, b) {
|
||||
return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);
|
||||
};
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.getClosestCenter = /**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
function (point, matrix) {
|
||||
if (this.Δ(point, matrix.start) < this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.getFarestCenter = /**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
function (point, matrix) {
|
||||
if (this.Δ(point, matrix.start) > this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
};
|
||||
/**
|
||||
* @param {?} matrix
|
||||
* @param {?} overlap
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.randomPoint = /**
|
||||
* @param {?} matrix
|
||||
* @param {?} overlap
|
||||
* @return {?}
|
||||
*/
|
||||
function (matrix, overlap) {
|
||||
/** @type {?} */
|
||||
var x = {
|
||||
min: matrix.center.x - matrix.width * overlap,
|
||||
max: matrix.center.x + matrix.width * overlap
|
||||
};
|
||||
/** @type {?} */
|
||||
var y = {
|
||||
min: matrix.center.y - matrix.height * overlap,
|
||||
max: matrix.center.y + matrix.height * overlap
|
||||
};
|
||||
return {
|
||||
x: Random.randomUniform(x.min, x.max)(),
|
||||
y: Random.randomUniform(y.min, y.max)()
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {?} width
|
||||
* @param {?} height
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.centerOfArea = /**
|
||||
* @param {?} width
|
||||
* @param {?} height
|
||||
* @return {?}
|
||||
*/
|
||||
function (width, height) {
|
||||
return {
|
||||
x: width * 0.5,
|
||||
y: height * 0.5
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.centerOfPoints = /**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
function (p1, p2) {
|
||||
return {
|
||||
x: (p1.x + p2.x) * 0.5,
|
||||
y: (p1.y + p2.y) * 0.5
|
||||
};
|
||||
};
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.centerOfCurve = /**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
function (curve) {
|
||||
/** @type {?} */
|
||||
var genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
var p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
var p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
var radians = this.angleRadians(p1, p2);
|
||||
return Object.assign(this.centerOfPoints(p1, p2), { ascent: radians });
|
||||
};
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.medianOfCurve = /**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
function (curve) {
|
||||
/** @type {?} */
|
||||
var genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
var p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
var p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
var p3 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
var radians = this.angleRadians(p2, p3);
|
||||
// const radians = Math.round(Math.random() * 10000) / 1000;
|
||||
// @todo if nodes are less than 5 error occures
|
||||
return Object.assign(p1, { ascent: radians });
|
||||
};
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.angleRadians = /**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
function (p1, p2) {
|
||||
return Math.atan2(p2.y - p1.y, p2.x - p1.x);
|
||||
};
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.angleDegree = /**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
function (p1, p2) {
|
||||
return this.angleRadians(p1, p2) * 180 / Math.PI;
|
||||
};
|
||||
/**
|
||||
* @param {?} list
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.medianIndex = /**
|
||||
* @param {?} list
|
||||
* @return {?}
|
||||
*/
|
||||
function (list) {
|
||||
return Math.floor(list.length * 0.5);
|
||||
};
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.medianPoint = /**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
function (points) {
|
||||
var index, list;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
list = points.slice();
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!list) return [3 /*break*/, 3];
|
||||
index = this.medianIndex(points);
|
||||
return [4 /*yield*/, list[index]];
|
||||
case 2:
|
||||
_a.sent();
|
||||
list.splice(index, 1);
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param {?=} amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param {?=} decimals amount of decimal places
|
||||
* @param {?=} start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.bounce = /**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param {?=} amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param {?=} decimals amount of decimal places
|
||||
* @param {?=} start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @return {?}
|
||||
*/
|
||||
function (amplitude, decimals, start) {
|
||||
if (amplitude === void 0) { amplitude = 1; }
|
||||
if (decimals === void 0) { decimals = 1; }
|
||||
if (start === void 0) { start = 0; }
|
||||
var power, step, index, radians;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
power = Math.pow(10, decimals);
|
||||
step = 2 / (power);
|
||||
index = 0;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 3];
|
||||
radians = Math.PI * step * index + start;
|
||||
return [4 /*yield*/, Math.round((Math.sin(radians) * amplitude) * power) / power];
|
||||
case 2:
|
||||
_a.sent();
|
||||
index++;
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
NlsMathService.prototype.flipSign = /**
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
function (startPositive) {
|
||||
if (startPositive === void 0) { startPositive = true; }
|
||||
var sign;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
sign = startPositive ? 1 : -1;
|
||||
_a.label = 1;
|
||||
case 1:
|
||||
if (!true) return [3 /*break*/, 3];
|
||||
return [4 /*yield*/, sign = sign * (-1)];
|
||||
case 2:
|
||||
_a.sent();
|
||||
return [3 /*break*/, 1];
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
};
|
||||
NlsMathService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
return NlsMathService;
|
||||
}());
|
||||
export { NlsMathService };
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0aC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmxzLWd1aWxsb2NoZS8iLCJzb3VyY2VzIjpbIm5scy9zZXJ2aWNlcy9tYXRoLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkEsT0FBTyxFQUFVLFVBQVUsRUFBRS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FNLENBQUMsQ0FBQztvQkFDakMscUJBQU0sSUFBSSxDQUFDLEtBQUssQ0FBQyxFQUFBOztvQkFBakIsU0FBaUIsQ0FBQztvQkFFbEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7SUFjbEIsK0JBQU07Ozs7Ozs7Ozs7Y0FDWixTQUFxQixFQUNyQixRQUFvQixFQUNwQixLQUFpQjtRQUZqQiwwQkFBQSxFQUFBLGFBQXFCO1FBQ3JCLHlCQUFBLEVBQUEsWUFBb0I7UUFDcEIsc0JBQUEsRUFBQSxTQUFpQjs7Ozs7b0JBRVgsS0FBSyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxFQUFFLFFBQVEsQ0FBQyxDQUFDO29CQUMvQixJQUFJLEdBQUcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7b0JBQ3JCLEtBQUssR0FBRyxDQUFDLENBQUM7Ozt5QkFFUCxJQUFJO29CQUNILE9BQU8sR0FBR
Line truncated
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/*
|
||||
* Public API Surface of nls-guilloche
|
||||
*/
|
||||
export { NlsGraphsComponent } from './nls/components/graphs.component';
|
||||
export { NlsGuillocheDirective } from './nls/directives/guilloche.directive';
|
||||
export { NlsAnimationService } from './nls/services/animation.service';
|
||||
export { NlsCanvasService } from './nls/services/canvas.service';
|
||||
export { NlsGraphService } from './nls/services/graph.service';
|
||||
export { NlsHistoryService } from './nls/services/history.service';
|
||||
export { NlsMathService } from './nls/services/math.service';
|
||||
export { NlsGuillocheModule } from './nls/nls-guilloche.module';
|
||||
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb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3NlcnZpY2VzL2hpc3Rvcnkuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL25scy9zZXJ2aWNlcy9tYXRoLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9ubHMvbmxzLWd1aWxsb2NoZS5tb2R1bGUnO1xuIl19
|
||||
+906
@@ -0,0 +1,906 @@
|
||||
import { Injectable, RendererFactory2, ViewChild, Component, Input, Output, EventEmitter, HostListener, ElementRef, Directive, NgModule } from '@angular/core';
|
||||
import { randomUniform } from 'd3-random';
|
||||
import { select } from 'd3-selection';
|
||||
import { line, curveBasis } from 'd3-shape';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsCanvasService {
|
||||
/**
|
||||
* @param {?} rendererFactory
|
||||
*/
|
||||
constructor(rendererFactory) {
|
||||
this.rendererFactory = rendererFactory;
|
||||
this.renderer = rendererFactory.createRenderer(null, null);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get get() {
|
||||
return this.canvas;
|
||||
}
|
||||
/**
|
||||
* @param {?} el
|
||||
* @return {?}
|
||||
*/
|
||||
set(el) {
|
||||
this.canvas = el;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
adjustToWindow() {
|
||||
if (this.canvas) {
|
||||
this.renderer.setStyle(this.canvas, 'width', this.canvas.innerWidth);
|
||||
this.renderer.setStyle(this.canvas, 'height', this.canvas.innerHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsCanvasService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsCanvasService.ctorParameters = () => [
|
||||
{ type: RendererFactory2 }
|
||||
];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsHistoryService {
|
||||
constructor() {
|
||||
this.history = [];
|
||||
}
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @param {?} config
|
||||
* @return {?}
|
||||
*/
|
||||
save(graphs, config) {
|
||||
this.history.push({
|
||||
date: new Date(),
|
||||
graphs: graphs,
|
||||
config: config,
|
||||
hash: this.hash(graphs)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} graphs
|
||||
* @return {?}
|
||||
*/
|
||||
hash(graphs) {
|
||||
return btoa(JSON.stringify(graphs));
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
list() {
|
||||
return this.history;
|
||||
}
|
||||
}
|
||||
NlsHistoryService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsHistoryService.ctorParameters = () => [];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsMathService {
|
||||
/**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param {?} a
|
||||
* @param {?} b
|
||||
* @return {?}
|
||||
*/
|
||||
Δ(a, b) {
|
||||
return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
getClosestCenter(point, matrix) {
|
||||
if (this.Δ(point, matrix.start) < this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} matrix
|
||||
* @return {?}
|
||||
*/
|
||||
getFarestCenter(point, matrix) {
|
||||
if (this.Δ(point, matrix.start) > this.Δ(point, matrix.end)) {
|
||||
return matrix.start;
|
||||
}
|
||||
else {
|
||||
return matrix.end;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} matrix
|
||||
* @param {?} overlap
|
||||
* @return {?}
|
||||
*/
|
||||
randomPoint(matrix, overlap) {
|
||||
/** @type {?} */
|
||||
const x = {
|
||||
min: matrix.center.x - matrix.width * overlap,
|
||||
max: matrix.center.x + matrix.width * overlap
|
||||
};
|
||||
/** @type {?} */
|
||||
const y = {
|
||||
min: matrix.center.y - matrix.height * overlap,
|
||||
max: matrix.center.y + matrix.height * overlap
|
||||
};
|
||||
return {
|
||||
x: randomUniform(x.min, x.max)(),
|
||||
y: randomUniform(y.min, y.max)()
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} width
|
||||
* @param {?} height
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfArea(width, height) {
|
||||
return {
|
||||
x: width * 0.5,
|
||||
y: height * 0.5
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfPoints(p1, p2) {
|
||||
return {
|
||||
x: (p1.x + p2.x) * 0.5,
|
||||
y: (p1.y + p2.y) * 0.5
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
centerOfCurve(curve) {
|
||||
/** @type {?} */
|
||||
const genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
const p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const radians = this.angleRadians(p1, p2);
|
||||
return Object.assign(this.centerOfPoints(p1, p2), { ascent: radians });
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
medianOfCurve(curve) {
|
||||
/** @type {?} */
|
||||
const genMedian = this.medianPoint(curve);
|
||||
/** @type {?} */
|
||||
const p1 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p2 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const p3 = genMedian.next().value;
|
||||
/** @type {?} */
|
||||
const radians = this.angleRadians(p2, p3);
|
||||
// const radians = Math.round(Math.random() * 10000) / 1000;
|
||||
// @todo if nodes are less than 5 error occures
|
||||
return Object.assign(p1, { ascent: radians });
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
angleRadians(p1, p2) {
|
||||
return Math.atan2(p2.y - p1.y, p2.x - p1.x);
|
||||
}
|
||||
/**
|
||||
* @param {?} p1
|
||||
* @param {?} p2
|
||||
* @return {?}
|
||||
*/
|
||||
angleDegree(p1, p2) {
|
||||
return this.angleRadians(p1, p2) * 180 / Math.PI;
|
||||
}
|
||||
/**
|
||||
* @param {?} list
|
||||
* @return {?}
|
||||
*/
|
||||
medianIndex(list) {
|
||||
return Math.floor(list.length * 0.5);
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
*medianPoint(points) {
|
||||
/** @type {?} */
|
||||
let index;
|
||||
/** @type {?} */
|
||||
const list = points.slice();
|
||||
while (list) {
|
||||
index = this.medianIndex(points);
|
||||
yield list[index];
|
||||
list.splice(index, 1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param {?=} amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param {?=} decimals amount of decimal places
|
||||
* @param {?=} start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @return {?}
|
||||
*/
|
||||
*bounce(amplitude = 1, decimals = 1, start = 0) {
|
||||
/** @type {?} */
|
||||
const power = Math.pow(10, decimals);
|
||||
/** @type {?} */
|
||||
const step = 2 / (power);
|
||||
/** @type {?} */
|
||||
let index = 0;
|
||||
while (true) {
|
||||
/** @type {?} */
|
||||
const radians = Math.PI * step * index + start;
|
||||
yield Math.round((Math.sin(radians) * amplitude) * power) / power;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*flipSign(startPositive = true) {
|
||||
/** @type {?} */
|
||||
let sign = startPositive ? 1 : -1;
|
||||
while (true) {
|
||||
yield sign = sign * (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsMathService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsGraphService {
|
||||
/**
|
||||
* @param {?} math
|
||||
*/
|
||||
constructor(math) {
|
||||
this.math = math;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get() {
|
||||
return this.graphs;
|
||||
}
|
||||
/**
|
||||
* @param {?} newGraphs
|
||||
* @return {?}
|
||||
*/
|
||||
set(newGraphs) {
|
||||
this.graphs = newGraphs;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
get isAnimated() {
|
||||
return this.animation;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
startAnimation() {
|
||||
this.animation = true;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
stopAnimation() {
|
||||
this.animation = false;
|
||||
}
|
||||
/**
|
||||
* @param {?} start
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
*spreadOrthogonal(start, spacing) {
|
||||
/** @type {?} */
|
||||
const sign = this.math.flipSign();
|
||||
/** @type {?} */
|
||||
let currentPoint = start;
|
||||
/** @type {?} */
|
||||
let i = 0;
|
||||
while (true) {
|
||||
/** @type {?} */
|
||||
const currentSpacing = sign.next().value * spacing * i;
|
||||
currentPoint = this.shiftPoint(currentPoint, start.ascent, currentSpacing);
|
||||
yield currentPoint;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} radians
|
||||
* @param {?} spacing
|
||||
* @return {?}
|
||||
*/
|
||||
shiftPoint(point, radians, spacing) {
|
||||
return {
|
||||
x: Math.sin(radians * Math.PI) * spacing + point.x,
|
||||
y: Math.cos(radians * Math.PI) * spacing + point.y
|
||||
};
|
||||
}
|
||||
}
|
||||
NlsGraphService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphService.ctorParameters = () => [
|
||||
{ type: NlsMathService }
|
||||
];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
/** @type {?} */
|
||||
const RESIZING_TIMEOUT = 800;
|
||||
class NlsGraphsComponent {
|
||||
/**
|
||||
* @param {?} canvasService
|
||||
* @param {?} historyService
|
||||
* @param {?} math
|
||||
* @param {?} graphService
|
||||
*/
|
||||
constructor(canvasService, historyService, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.historyService = historyService;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
this.svgChange = new EventEmitter();
|
||||
this.graphChange = new EventEmitter();
|
||||
this.genLoadedAllGraphs = this.countLoadedGraphs();
|
||||
this.resizingWindow = false;
|
||||
}
|
||||
/**
|
||||
* @param {?} event
|
||||
* @return {?}
|
||||
*/
|
||||
onResize(event) {
|
||||
clearTimeout(this.resizingWindow);
|
||||
this.resizingWindow = setTimeout(() => {
|
||||
this.canvas = this.adjustCanvas();
|
||||
this.matrix = this.calcMatrix();
|
||||
this.updateGraphs();
|
||||
}, RESIZING_TIMEOUT);
|
||||
}
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnChanges(changes) {
|
||||
this.canvas = this.adjustCanvas();
|
||||
this.matrix = this.calcMatrix();
|
||||
if (changes["config"]) {
|
||||
this.updateGraphs();
|
||||
}
|
||||
if (this.restoredHistory && this.restoredHistory.hash !== this.hash) {
|
||||
this.restoreGraph();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
restoreGraph() {
|
||||
this.graphs = this.restoredHistory.graphs;
|
||||
this.hash = this.restoredHistory.hash;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
saveHistory() {
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.historyService.save(this.graphs, this.config);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
saveGraph() {
|
||||
this.graphService.set(this.graphs);
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
updateGraphs() {
|
||||
/** @type {?} */
|
||||
const genShiftStart = this.shiftPoint(this.matrix.start, this.config.vectors.start);
|
||||
/** @type {?} */
|
||||
const genShiftEnd = this.shiftPoint(this.matrix.end, this.config.vectors.end, false);
|
||||
console.log(this.matrix);
|
||||
/** @type {?} */
|
||||
const curveList = [
|
||||
{
|
||||
color: this.config.colors.primary,
|
||||
start: genShiftStart.next().value,
|
||||
end: genShiftEnd.next().value
|
||||
},
|
||||
{
|
||||
color: this.config.colors.secondary,
|
||||
start: genShiftEnd.next().value,
|
||||
end: genShiftStart.next().value
|
||||
}
|
||||
];
|
||||
this.graphs = curveList.map(curve => {
|
||||
return Object.assign({}, this.adjustGraph(curve), { spread: this.config.spread, interval: this.config.interval });
|
||||
});
|
||||
this.hash = this.historyService.hash(this.graphs);
|
||||
this.saveHistory();
|
||||
this.saveGraph();
|
||||
}
|
||||
/**
|
||||
* @param {?} curve
|
||||
* @return {?}
|
||||
*/
|
||||
adjustGraph(curve) {
|
||||
return Object.assign(curve, {
|
||||
stroke: this.config.stroke,
|
||||
start: Object.assign(curve.start, {
|
||||
direction: this.genVectorPoint(curve.start.point, curve.start.vector)
|
||||
}),
|
||||
end: Object.assign(curve.end, {
|
||||
direction: this.genVectorPoint(curve.end.point, curve.end.vector)
|
||||
}),
|
||||
nodes: this.genRandomPoints(this.config.nodes)
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} num
|
||||
* @return {?}
|
||||
*/
|
||||
genRandomPoints(num) {
|
||||
/** @type {?} */
|
||||
const generatedPoints = [];
|
||||
for (let i = 0; i < this.config.nodes; i++) {
|
||||
generatedPoints.push(this.math.randomPoint(this.matrix, this.config.overlap));
|
||||
}
|
||||
return generatedPoints;
|
||||
}
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
flipflop(x) {
|
||||
return (x === 'start') ? 'end' : 'start';
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
adjustCanvas() {
|
||||
this.canvasService.set(this.canvas);
|
||||
this.canvasService.adjustToWindow();
|
||||
return this.svgElementRef.nativeElement;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
calcMatrix() {
|
||||
/** @type {?} */
|
||||
const canvasWidth = this.canvas.getBoundingClientRect().width;
|
||||
/** @type {?} */
|
||||
const canvasHeight = this.canvas.getBoundingClientRect().height;
|
||||
/** @type {?} */
|
||||
const totalCenter = this.math.centerOfArea(canvasWidth, canvasHeight);
|
||||
return {
|
||||
start: {
|
||||
x: 0,
|
||||
y: canvasHeight - this.config.vectors.spacing - this.config.margin.y
|
||||
},
|
||||
end: {
|
||||
x: canvasWidth - this.config.vectors.spacing - this.config.margin.x,
|
||||
y: 0
|
||||
},
|
||||
width: canvasWidth,
|
||||
height: canvasHeight,
|
||||
center: totalCenter
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @return {?}
|
||||
*/
|
||||
genVectorPoint(point, vector) {
|
||||
/** @type {?} */
|
||||
const range = this.math.Δ(this.matrix.start, this.matrix.end) * this.config.vectors.range;
|
||||
return {
|
||||
x: range * Math.sin(Math.PI * vector) + point.x,
|
||||
y: range * Math.cos(Math.PI * vector) + point.y
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @param {?} point
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*shiftPoint(point, vector, startPositive = true) {
|
||||
/** @type {?} */
|
||||
const genShiftX = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
/** @type {?} */
|
||||
const genShiftY = this.shiftNumber(this.config.vectors.spacing, vector, startPositive);
|
||||
while (true) {
|
||||
yield {
|
||||
point: {
|
||||
x: Math.cos(Math.PI * vector) * genShiftX.next().value + point.x,
|
||||
y: Math.sin(Math.PI * vector) * genShiftY.next().value + point.y,
|
||||
},
|
||||
vector: vector
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} space
|
||||
* @param {?} vector
|
||||
* @param {?=} startPositive
|
||||
* @return {?}
|
||||
*/
|
||||
*shiftNumber(space, vector, startPositive = true) {
|
||||
/** @type {?} */
|
||||
let current = 0;
|
||||
/** @type {?} */
|
||||
let index = 0;
|
||||
/** @type {?} */
|
||||
const sign = this.math.flipSign(startPositive);
|
||||
while (true) {
|
||||
yield current = sign.next().value * index * space + current;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param {?} guillocheElement
|
||||
* @return {?}
|
||||
*/
|
||||
prepareGuillocheExport(guillocheElement) {
|
||||
if (this.genLoadedAllGraphs.next().value) {
|
||||
this.svgChange.emit(this.svgElementRef);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
*countLoadedGraphs() {
|
||||
/** @type {?} */
|
||||
let cycles = 1;
|
||||
while (true) {
|
||||
if (cycles < this.graphs.length) {
|
||||
yield false;
|
||||
cycles++;
|
||||
}
|
||||
else {
|
||||
yield true;
|
||||
cycles = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
NlsGraphsComponent.decorators = [
|
||||
{ type: Component, args: [{
|
||||
selector: 'nls-graphs',
|
||||
template: `<svg #svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1" shape-rendering="geometricPrecision">
|
||||
<g nlsGuilloche *ngFor="let graph of graphs" [graph]="graph" [animation]="animation"></g>
|
||||
</svg>
|
||||
`,
|
||||
styles: [`:host{position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden}`]
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGraphsComponent.ctorParameters = () => [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: NlsHistoryService },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
];
|
||||
NlsGraphsComponent.propDecorators = {
|
||||
config: [{ type: Input }],
|
||||
restoredHistory: [{ type: Input }],
|
||||
animation: [{ type: Input }],
|
||||
svgChange: [{ type: Output }],
|
||||
graphChange: [{ type: Output }],
|
||||
svgElementRef: [{ type: ViewChild, args: ['svg',] }],
|
||||
onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }]
|
||||
};
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsGuillocheDirective {
|
||||
/**
|
||||
* @param {?} canvasService
|
||||
* @param {?} el
|
||||
* @param {?} math
|
||||
* @param {?} graphService
|
||||
*/
|
||||
constructor(canvasService, el, math, graphService) {
|
||||
this.canvasService = canvasService;
|
||||
this.el = el;
|
||||
this.math = math;
|
||||
this.graphService = graphService;
|
||||
}
|
||||
/**
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnDestroy() {
|
||||
this.group.selectAll('*').remove();
|
||||
}
|
||||
/**
|
||||
* @param {?} changes
|
||||
* @return {?}
|
||||
*/
|
||||
ngOnChanges(changes) {
|
||||
this.group = select(this.el.nativeElement);
|
||||
this.canvas = select(this.canvasService.get);
|
||||
// @todo modify graph here instead of in graphs.component.ts
|
||||
this.initialNodes = this.graph.nodes.slice();
|
||||
this.initialCurve = [
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes.slice(),
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point
|
||||
];
|
||||
this.medianPoint = this.math.medianOfCurve(this.initialCurve);
|
||||
this.medianIndex = this.math.medianIndex(this.initialCurve);
|
||||
if (this.animation) {
|
||||
this.graph.nodes = this.graph.nodes.slice().map((node, i) => {
|
||||
return {
|
||||
x: node.x,
|
||||
y: node.y,
|
||||
// ascent: Math.round(Math.random() * 100) / 100
|
||||
ascent: this.medianPoint.ascent + i * 0.5
|
||||
};
|
||||
});
|
||||
this.bounces = this.initialNodes.map(node => {
|
||||
/** @type {?} */
|
||||
const bounceAmplitude = Math.round(Math.random() * 150);
|
||||
return this.math.bounce(bounceAmplitude, 3);
|
||||
});
|
||||
/** @type {?} */
|
||||
let i = 0;
|
||||
this.animationInterval = setInterval(() => {
|
||||
this.animateGraph(i++ % 1000 / 10000);
|
||||
}, this.graph.interval);
|
||||
}
|
||||
else {
|
||||
if (this.animationInterval) {
|
||||
this.bounce = null;
|
||||
clearInterval(this.animationInterval);
|
||||
}
|
||||
}
|
||||
this.group.selectAll('*').remove();
|
||||
this.pathElements = [];
|
||||
/** @type {?} */
|
||||
const graphs = this.spreadLines([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes,
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
]).forEach((points, index) => this.drawGraph(points));
|
||||
}
|
||||
/**
|
||||
* @param {?} x
|
||||
* @return {?}
|
||||
*/
|
||||
animateGraph(x) {
|
||||
/** @type {?} */
|
||||
const graphs = this.spreadLines([
|
||||
this.graph.start.point,
|
||||
this.graph.start.direction,
|
||||
...this.graph.nodes.map((point, i) => {
|
||||
/** @type {?} */
|
||||
const ascent = point.ascent * Math.sin(Math.PI * x);
|
||||
return this.graphService.shiftPoint(point, ascent, this.bounces[i].next().value);
|
||||
}),
|
||||
this.graph.end.direction,
|
||||
this.graph.end.point,
|
||||
]);
|
||||
graphs.forEach((points, i) => this.updateGraph(points, i));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
spreadLines(points) {
|
||||
/** @type {?} */
|
||||
const shiftedMedians = [];
|
||||
/** @type {?} */
|
||||
const genshiftedMedians = this.graphService.spreadOrthogonal(this.medianPoint, this.graph.spread.spacing);
|
||||
for (let i = 0; i < this.graph.spread.amount; i++) {
|
||||
shiftedMedians.push(genshiftedMedians.next().value);
|
||||
}
|
||||
return shiftedMedians.map(median => {
|
||||
/** @type {?} */
|
||||
const shiftedPoints = points.slice();
|
||||
shiftedPoints.splice(this.medianIndex, 1, median);
|
||||
return shiftedPoints;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @param {?} index
|
||||
* @return {?}
|
||||
*/
|
||||
updateGraph(points, index) {
|
||||
this.pathElements[index]
|
||||
.attr('d', line()
|
||||
.x(p => p.x)
|
||||
.y(p => p.y)
|
||||
.curve(curveBasis)(points));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
drawGraph(points) {
|
||||
this.group
|
||||
.attr('stroke', this.graph.color)
|
||||
.attr('stroke-width', this.graph.stroke)
|
||||
.attr('fill', 'none');
|
||||
this.pathElements.push(this.group.append('path')
|
||||
.attr('d', line()
|
||||
.x(p => p.x)
|
||||
.y(p => p.y)
|
||||
.curve(curveBasis)(points)));
|
||||
}
|
||||
/**
|
||||
* @param {?} points
|
||||
* @return {?}
|
||||
*/
|
||||
debugGraph(points) {
|
||||
points.forEach((point, index) => {
|
||||
/** @type {?} */
|
||||
const circle = this.group.append('g');
|
||||
circle.append('circle')
|
||||
.attr('cx', point.x)
|
||||
.attr('cy', point.y)
|
||||
.attr('r', 3)
|
||||
.attr('fill-opacity', 0.6)
|
||||
.attr('fill', this.graph.color);
|
||||
circle.append('text')
|
||||
.attr('x', point.x)
|
||||
.attr('y', point.y)
|
||||
.attr('dx', 8)
|
||||
.attr('dy', 15)
|
||||
.attr('fill', this.graph.color)
|
||||
.text(index);
|
||||
});
|
||||
}
|
||||
}
|
||||
NlsGuillocheDirective.decorators = [
|
||||
{ type: Directive, args: [{
|
||||
selector: '[nlsGuilloche]'
|
||||
},] },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsGuillocheDirective.ctorParameters = () => [
|
||||
{ type: NlsCanvasService },
|
||||
{ type: ElementRef },
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsGraphService }
|
||||
];
|
||||
NlsGuillocheDirective.propDecorators = {
|
||||
graph: [{ type: Input }],
|
||||
animation: [{ type: Input }]
|
||||
};
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsAnimationService {
|
||||
/**
|
||||
* @param {?} math
|
||||
* @param {?} historyService
|
||||
*/
|
||||
constructor(math, historyService) {
|
||||
this.math = math;
|
||||
this.historyService = historyService;
|
||||
}
|
||||
/**
|
||||
* @param {?} initialGraph
|
||||
* @return {?}
|
||||
*/
|
||||
animate(initialGraph) {
|
||||
/** @type {?} */
|
||||
const newGraph = Object.assign({}, initialGraph);
|
||||
/** @type {?} */
|
||||
const indexMiddle = Math.floor(newGraph.nodes.length * 0.5);
|
||||
/** @type {?} */
|
||||
const pointMiddle = newGraph.nodes[indexMiddle];
|
||||
newGraph.nodes.splice(indexMiddle, 1, {
|
||||
x: pointMiddle.x - 2,
|
||||
y: pointMiddle.y + 2,
|
||||
});
|
||||
return newGraph;
|
||||
// });
|
||||
}
|
||||
}
|
||||
NlsAnimationService.decorators = [
|
||||
{ type: Injectable },
|
||||
];
|
||||
/** @nocollapse */
|
||||
NlsAnimationService.ctorParameters = () => [
|
||||
{ type: NlsMathService },
|
||||
{ type: NlsHistoryService }
|
||||
];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
class NlsGuillocheModule {
|
||||
}
|
||||
NlsGuillocheModule.decorators = [
|
||||
{ type: NgModule, args: [{
|
||||
imports: [
|
||||
BrowserModule
|
||||
],
|
||||
declarations: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
],
|
||||
providers: [
|
||||
NlsHistoryService,
|
||||
NlsCanvasService,
|
||||
NlsMathService,
|
||||
NlsGraphService,
|
||||
],
|
||||
exports: [
|
||||
NlsGraphsComponent,
|
||||
NlsGuillocheDirective
|
||||
]
|
||||
},] },
|
||||
];
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview added by tsickle
|
||||
* @suppress {checkTypes} checked by tsc
|
||||
*/
|
||||
|
||||
export { NlsGraphsComponent, NlsGuillocheDirective, NlsAnimationService, NlsCanvasService, NlsGraphService, NlsHistoryService, NlsMathService, NlsGuillocheModule };
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmxzLWd1aWxsb2NoZS5qcy5tYXAiLCJzb3VyY2VzIjpbIm5nOi8vbmxzLWd1aWxsb2NoZS9ubHMvc2VydmljZXMvY2FudmFzLnNlcnZpY2UudHMiLCJuZzovL25scy1ndWlsbG9jaGUvbmxzL3NlcnZpY2VzL2hpc3Rvcnkuc2VydmljZS50cyIsIm5nOi8vbmxzLWd1aWxsb2NoZS9ubHMvc2VydmljZXMvbWF0aC5zZXJ2aWNlLnRzIiwibmc6Ly9ubHMtZ3VpbGxvY2hlL25scy9zZXJ2aWNlcy9ncmFwaC5zZXJ2aWNlLnRzIiwibmc6Ly9ubHMtZ3VpbGxvY2hlL25scy9jb21wb25lbnRzL2dyYXBocy5jb21wb25lbnQudHMiLCJuZzovL25scy1ndWlsbG9jaGUvbmxzL2RpcmVjdGl2ZXMvZ3VpbGxvY2hlLmRpcmVjdGl2ZS50cyIsIm5nOi8vbmxzLWd1aWxsb2NoZS9ubHMvc2VydmljZXMvYW5pbWF0aW9uLnNlcnZpY2UudHMiLCJuZzovL25scy1ndWlsbG9jaGUvbmxzL25scy1ndWlsbG9jaGUubW9kdWxlLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChDKSAyMDE4IE1pY2hhZWwgQ3plY2hvd3NraS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0b3J5U2VydmljZSB7XG5cbiAgcHVibGljIGhpc3Rvcnk6IGFueVtdO1xuXG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIHRoaXMuaGlzdG9yeSA9IFtdO1xuICB9XG5cbiAgcHVibGljIHNhdmUoZ3JhcGhzOiBHcmFwaFtdLCBjb25maWcpIHtcbiAgICB0aGlzLmhpc3RvcnkucHVzaCh7XG4gICAgICBkYXRlOiBuZXcgRGF0ZSgpLFxuICAgICAgZ3JhcGhzOiBncmFwaHMsXG4gICAgICBjb25maWc6IGNvbmZpZyxcbiAgICAgIGhhc2g6IHRoaXMuaGFzaChncmFwaHMpXG4gICAgfSk7XG4gIH1cblxuICBwdWJsaWMgaGFzaChncmFwaHMpIHtcbiAgICByZXR1cm4gYnRvYShKU09OLnN0cmluZ2lmeShncmFwaHMpKTtcbiAgfVxuXG4gIHB1YmxpYyBsaXN0KCkge1xuICAgIHJldHVybiB0aGlzLmhpc3Rvcnk7XG4gIH1cbn1cblxuIiwiLyoqXG4gKiBDb3B5cmlnaHQgKEMpIDIwMTggTWljaGFlbCBDemVjaG93c2tpIDxtYWlsQGRhaWx5c2guaXQ+XG4gKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdFxuICogdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWVcbiAqIFNvZnR3YXJlIEZvdW5kYXRpb247IHZlcnNpb24gMi5cbiAqXG4gKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFd
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nls-guilloche.js.map","sources":["ng://nls-guilloche/nls/services/canvas.service.ts","ng://nls-guilloche/nls/services/history.service.ts","ng://nls-guilloche/nls/services/math.service.ts","ng://nls-guilloche/nls/services/graph.service.ts","ng://nls-guilloche/nls/components/graphs.component.ts","ng://nls-guilloche/nls/directives/guilloche.directive.ts","ng://nls-guilloche/nls/services/animation.service.ts","ng://nls-guilloche/nls/nls-guilloche.module.ts"],"sourcesContent":["/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\n@Injectable()\nexport class NlsCanvasService {\n private renderer: Renderer2;\n\n public canvas: any;\n\n constructor(\n private rendererFactory: RendererFactory2\n ) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n public get get() {\n return this.canvas;\n }\n\n public set(el) {\n this.canvas = el;\n }\n\n public adjustToWindow() {\n if (this.canvas) {\n this.renderer.setStyle(\n this.canvas,\n 'width',\n this.canvas.innerWidth\n );\n this.renderer.setStyle(\n this.canvas,\n 'height',\n this.canvas.innerHeight\n );\n }\n }\n}\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Optional, ViewChild } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\nimport { Graph } from '../models/graph.model';\n\n@Injectable()\nexport class NlsHistoryService {\n\n public history: any[];\n\n constructor() {\n this.history = [];\n }\n\n public save(graphs: Graph[], config) {\n this.history.push({\n date: new Date(),\n graphs: graphs,\n config: config,\n hash: this.hash(graphs)\n });\n }\n\n public hash(graphs) {\n return btoa(JSON.stringify(graphs));\n }\n\n public list() {\n return this.history;\n }\n}\n\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable } from '@angular/core';\nimport * as Selection from 'd3-selection';\nimport * as Random from 'd3-random';\n\nimport { Point } from './../models/point.model';\nimport { Graph } from './../models/graph.model';\n\n@Injectable()\nexport class NlsMathService {\n\n /**\n * Calculate distance between to points with coordinates.\n * @param a\n * @param b\n */\n public Î(a: Point, b: Point) {\n return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);\n }\n\n public getClosestCenter(point: Point, matrix: any) {\n if (this.Î(point, matrix.start) < this.Î(point, matrix.end)) {\n return matrix.start;\n } else {\n return matrix.end;\n }\n }\n\n public getFarestCenter(point: Point, matrix: any) {\n if (this.Î(point, matrix.start) > this.Î(point, matrix.end)) {\n return matrix.start;\n } else {Line truncated
|
||||
+1178
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"nls-guilloche.js.map","sources":["ng://nls-guilloche/nls/services/canvas.service.ts","ng://nls-guilloche/nls/services/history.service.ts","ng://nls-guilloche/nls/services/math.service.ts","ng://nls-guilloche/nls/services/graph.service.ts","ng://nls-guilloche/nls/components/graphs.component.ts","ng://nls-guilloche/nls/directives/guilloche.directive.ts","ng://nls-guilloche/nls/services/animation.service.ts","ng://nls-guilloche/nls/nls-guilloche.module.ts"],"sourcesContent":["/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\n@Injectable()\nexport class NlsCanvasService {\n private renderer: Renderer2;\n\n public canvas: any;\n\n constructor(\n private rendererFactory: RendererFactory2\n ) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n public get get() {\n return this.canvas;\n }\n\n public set(el) {\n this.canvas = el;\n }\n\n public adjustToWindow() {\n if (this.canvas) {\n this.renderer.setStyle(\n this.canvas,\n 'width',\n this.canvas.innerWidth\n );\n this.renderer.setStyle(\n this.canvas,\n 'height',\n this.canvas.innerHeight\n );\n }\n }\n}\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable, Optional, ViewChild } from '@angular/core';\nimport * as Selection from 'd3-selection';\n\nimport { Graph } from '../models/graph.model';\n\n@Injectable()\nexport class NlsHistoryService {\n\n public history: any[];\n\n constructor() {\n this.history = [];\n }\n\n public save(graphs: Graph[], config) {\n this.history.push({\n date: new Date(),\n graphs: graphs,\n config: config,\n hash: this.hash(graphs)\n });\n }\n\n public hash(graphs) {\n return btoa(JSON.stringify(graphs));\n }\n\n public list() {\n return this.history;\n }\n}\n\n","/**\n * Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; version 2.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along with\n * this program; if not, write to the Free Software Foundation, Inc., 51\n * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\nimport { Inject, Injectable } from '@angular/core';\nimport * as Selection from 'd3-selection';\nimport * as Random from 'd3-random';\n\nimport { Point } from './../models/point.model';\nimport { Graph } from './../models/graph.model';\n\n@Injectable()\nexport class NlsMathService {\n\n /**\n * Calculate distance between to points with coordinates.\n * @param a\n * @param b\n */\n public Î(a: Point, b: Point) {\n return Math.pow(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2), 0.5);\n }\n\n public getClosestCenter(point: Point, matrix: any) {\n if (this.Î(point, matrix.start) < this.Î(point, matrix.end)) {\n return matrix.start;\n } else {\n return matrix.end;\n }\n }\n\n public getFarestCenter(point: Point, matrix: any) {\n if (this.Î(point, matrix.start) > this.Î(point, matrix.end)) {\n return matrix.start;\n } else {Line truncated
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Generated bundle index. Do not edit.
|
||||
*/
|
||||
export * from './public_api';
|
||||
@@ -0,0 +1 @@
|
||||
{"__symbolic":"module","version":4,"metadata":{"NlsGraphsComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":34,"character":1},"arguments":[{"selector":"nls-graphs","template":"<svg #svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\"\nversion=\"1.1\" shape-rendering=\"geometricPrecision\">\n <g nlsGuilloche *ngFor=\"let graph of graphs\" [graph]=\"graph\" [animation]=\"animation\"></g>\n</svg>\n","styles":[":host{position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden}"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":56,"character":3}}]}],"restoredHistory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":57,"character":3}}]}],"animation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":58,"character":3}}]}],"svgChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":59,"character":3}}]}],"graphChange":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":60,"character":3}}]}],"svgElementRef":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":61,"character":3},"arguments":["svg"]}]}],"onResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":63,"character":3},"arguments":["window:resize",["$event"]]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NlsCanvasService"},{"__symbolic":"reference","name":"NlsHistoryService"},{"__symbolic":"reference","name":"NlsMathService"},{"__symbolic":"reference","name":"NlsGraphService"}]}],"ngOnChanges":[{"__symbolic":"method"}],"restoreGraph":[{"__symbolic":"method"}],"saveHistory":[{"__symbolic":"method"}],"saveGraph":[{"__symbolic":"method"}],"updateGraphs":[{"__symbolic":"method"}],"adjustGraph":[{"__symbolic":"method"}],"genRandomPoints":[{"__symbolic":"method"}],"flipflop":[{"__symbolic":"method"}],"adjustCanvas":[{"__symbolic":"method"}],"calcMatrix":[{"__symbolic":"method"}],"genVectorPoint":[{"__symbolic":"method"}],"shiftPoint":[{"__symbolic":"method"}],"shiftNumber":[{"__symbolic":"method"}],"prepareGuillocheExport":[{"__symbolic":"method"}],"countLoadedGraphs":[{"__symbolic":"method"}]}},"NlsGuillocheDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":30,"character":1},"arguments":[{"selector":"[nlsGuilloche]"}]}],"members":{"graph":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":3}}]}],"animation":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":47,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NlsCanvasService"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":51,"character":16},{"__symbolic":"reference","name":"NlsMathService"},{"__symbolic":"reference","name":"NlsGraphService"}]}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}],"animateGraph":[{"__symbolic":"method"}],"spreadLines":[{"__symbolic":"method"}],"updateGraph":[{"__symbolic":"method"}],"drawGraph":[{"__symbolic":"method"}],"debugGraph":[{"__symbolic":"method"}]}},"Config":{"__symbolic":"interface"},"Graph":{"__symbolic":"interface"},"Param":{"__symbolic":"interface"},"Point":{"__symbolic":"interface"},"NlsAnimationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"NlsMathService"},{"__symbolic":"reference","name":"NlsHistoryService"}]}],"animate":[{"__symbolic":"method"}]}},"NlsCanvasService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":19,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"RendererFactory2","line":26,"character":29}]}],"set":[{"__symbolic":"method"}],"adjLine truncated
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { SimpleChanges, OnChanges, EventEmitter } from '@angular/core';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { Config } from './../models/config.model';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsHistoryService } from './../services/history.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from './../services/graph.service';
|
||||
export declare class NlsGraphsComponent implements OnChanges {
|
||||
private canvasService;
|
||||
private historyService;
|
||||
private math;
|
||||
private graphService;
|
||||
canvas: any | null;
|
||||
matrix: any | null;
|
||||
graphs: Graph[];
|
||||
windowHeight: number | null;
|
||||
windowWidth: number | null;
|
||||
private genShiftPoint;
|
||||
private genLoadedAllGraphs;
|
||||
private hash;
|
||||
private resizingWindow;
|
||||
config: Config;
|
||||
restoredHistory: any;
|
||||
animation: boolean;
|
||||
svgChange: EventEmitter<{}>;
|
||||
graphChange: EventEmitter<{}>;
|
||||
svgElementRef: any;
|
||||
onResize(event: any): void;
|
||||
constructor(canvasService: NlsCanvasService, historyService: NlsHistoryService, math: NlsMathService, graphService: NlsGraphService);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
private restoreGraph();
|
||||
private saveHistory();
|
||||
private saveGraph();
|
||||
private updateGraphs();
|
||||
private adjustGraph(curve);
|
||||
private genRandomPoints(num);
|
||||
private flipflop(x);
|
||||
private adjustCanvas();
|
||||
private calcMatrix();
|
||||
private genVectorPoint(point, vector);
|
||||
private shiftPoint(point, vector, startPositive?);
|
||||
private shiftNumber(space, vector, startPositive?);
|
||||
prepareGuillocheExport(guillocheElement: any): void;
|
||||
private countLoadedGraphs();
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from '../services/graph.service';
|
||||
export declare class NlsGuillocheDirective implements OnChanges, OnDestroy {
|
||||
private canvasService;
|
||||
private el;
|
||||
private math;
|
||||
private graphService;
|
||||
private canvas;
|
||||
private group;
|
||||
private bounce;
|
||||
private bounces;
|
||||
private initialNodes;
|
||||
private initialCurve;
|
||||
private animationInterval;
|
||||
private medianPoint;
|
||||
private medianIndex;
|
||||
private pathElements;
|
||||
graph: Graph;
|
||||
animation: boolean;
|
||||
constructor(canvasService: NlsCanvasService, el: ElementRef, math: NlsMathService, graphService: NlsGraphService);
|
||||
ngOnDestroy(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
private animateGraph(x);
|
||||
private spreadLines(points);
|
||||
private updateGraph(points, index);
|
||||
private drawGraph(points);
|
||||
private debugGraph(points);
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Config {
|
||||
margin: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
start: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
end: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
vectors: {
|
||||
spacing: number;
|
||||
start: any;
|
||||
end: any;
|
||||
range: any;
|
||||
};
|
||||
colors: {
|
||||
primary: string;
|
||||
secondary: string;
|
||||
};
|
||||
spread: {
|
||||
amount: number;
|
||||
spacing: number;
|
||||
};
|
||||
nodes: any;
|
||||
stroke: any;
|
||||
overlap: any;
|
||||
scale: any;
|
||||
interval: number;
|
||||
date?: Date;
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Point } from './point.model';
|
||||
export interface Graph {
|
||||
id: string;
|
||||
color: string;
|
||||
start: {
|
||||
point: Point;
|
||||
direction?: Point;
|
||||
vector: number;
|
||||
};
|
||||
end: {
|
||||
point: Point;
|
||||
direction?: Point;
|
||||
vector: number;
|
||||
};
|
||||
spread: {
|
||||
amount: number;
|
||||
spacing: number;
|
||||
};
|
||||
interval: number;
|
||||
stroke: number;
|
||||
nodes?: Point[];
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Point } from './point.model';
|
||||
export interface Matrix {
|
||||
start: Point;
|
||||
end: Point;
|
||||
center: Point;
|
||||
width: number;
|
||||
height: number;
|
||||
unit?: number;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Param {
|
||||
colors: {
|
||||
start: string;
|
||||
end: string;
|
||||
};
|
||||
points: number;
|
||||
margin: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
spread: number;
|
||||
space: number;
|
||||
stroke?: {
|
||||
width: number;
|
||||
};
|
||||
showGrid?: boolean;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
color?: string;
|
||||
ascent?: number;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export declare class NlsGuillocheModule {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Graph } from '../models/graph.model';
|
||||
import { NlsMathService } from './math.service';
|
||||
import { NlsHistoryService } from './history.service';
|
||||
export declare class NlsAnimationService {
|
||||
private math;
|
||||
private historyService;
|
||||
graphs: Graph[];
|
||||
speed: number;
|
||||
range: number;
|
||||
constructor(math: NlsMathService, historyService: NlsHistoryService);
|
||||
animate(initialGraph: Graph): Graph;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { RendererFactory2 } from '@angular/core';
|
||||
export declare class NlsCanvasService {
|
||||
private rendererFactory;
|
||||
private renderer;
|
||||
canvas: any;
|
||||
constructor(rendererFactory: RendererFactory2);
|
||||
readonly get: any;
|
||||
set(el: any): void;
|
||||
adjustToWindow(): void;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NlsMathService } from './math.service';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { Point } from './../models/point.model';
|
||||
export declare class NlsGraphService {
|
||||
private math;
|
||||
private graphs;
|
||||
private animation;
|
||||
constructor(math: NlsMathService);
|
||||
get(): Graph[];
|
||||
set(newGraphs: Graph[]): void;
|
||||
readonly isAnimated: boolean;
|
||||
startAnimation(): void;
|
||||
stopAnimation(): void;
|
||||
spreadOrthogonal(start: Point, spacing: number): IterableIterator<Point>;
|
||||
shiftPoint(point: Point, radians: number, spacing: number): Point;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Graph } from '../models/graph.model';
|
||||
export declare class NlsHistoryService {
|
||||
history: any[];
|
||||
constructor();
|
||||
save(graphs: Graph[], config: any): void;
|
||||
hash(graphs: any): string;
|
||||
list(): any[];
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import { Point } from './../models/point.model';
|
||||
export declare class NlsMathService {
|
||||
/**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param a
|
||||
* @param b
|
||||
*/
|
||||
Δ(a: Point, b: Point): number;
|
||||
getClosestCenter(point: Point, matrix: any): any;
|
||||
getFarestCenter(point: Point, matrix: any): any;
|
||||
randomPoint(matrix: any, overlap: number): {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
centerOfArea(width: any, height: any): Point;
|
||||
centerOfPoints(p1: Point, p2: Point): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
centerOfCurve(curve: Point[]): {
|
||||
x: number;
|
||||
y: number;
|
||||
} & {
|
||||
ascent: number;
|
||||
};
|
||||
medianOfCurve(curve: Point[]): Point & {
|
||||
ascent: number;
|
||||
};
|
||||
angleRadians(p1: Point, p2: Point): number;
|
||||
angleDegree(p1: Point, p2: Point): number;
|
||||
medianIndex(list: any): number;
|
||||
medianPoint(points: Point[]): IterableIterator<Point>;
|
||||
/**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @param amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param decimals amount of decimal places
|
||||
*/
|
||||
bounce(amplitude?: number, decimals?: number, start?: number): IterableIterator<number>;
|
||||
flipSign(startPositive?: boolean): IterableIterator<number>;
|
||||
}
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "nls-guilloche",
|
||||
"version": "1.0.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nextlevelshit/nls-guilloche-generator"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "GPL-2.0-only",
|
||||
"url": "https://github.com/nextlevelshit/nls-guilloche-generator/LICENSE.md"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"name": "Michael Czechowski",
|
||||
"email": "mail@dailysh.it",
|
||||
"url": "https://dailysh.it"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Erik Kimsey"
|
||||
},
|
||||
{
|
||||
"name": "Michael Czechowski",
|
||||
"email": "mail@dailysh.it",
|
||||
"url": "https://dailysh.it"
|
||||
}
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
|
||||
"@angular/core": "^6.0.0-rc.0 || ^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"d3": "^5.3.0",
|
||||
"tslib": "^1.9.0"
|
||||
},
|
||||
"main": "bundles/nls-guilloche.umd.js",
|
||||
"module": "fesm5/nls-guilloche.js",
|
||||
"es2015": "fesm2015/nls-guilloche.js",
|
||||
"esm5": "esm5/nls-guilloche.js",
|
||||
"esm2015": "esm2015/nls-guilloche.js",
|
||||
"fesm5": "fesm5/nls-guilloche.js",
|
||||
"fesm2015": "fesm2015/nls-guilloche.js",
|
||||
"typings": "nls-guilloche.d.ts",
|
||||
"metadata": "nls-guilloche.metadata.json",
|
||||
"sideEffects": false
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
export * from './nls/components/graphs.component';
|
||||
export * from './nls/directives/guilloche.directive';
|
||||
export * from './nls/models/config.model';
|
||||
export * from './nls/models/graph.model';
|
||||
export * from './nls/models/param.model';
|
||||
export * from './nls/models/point.model';
|
||||
export * from './nls/services/animation.service';
|
||||
export * from './nls/services/canvas.service';
|
||||
export * from './nls/services/graph.service';
|
||||
export * from './nls/services/history.service';
|
||||
export * from './nls/services/math.service';
|
||||
export * from './nls/nls-guilloche.module';
|
||||
Reference in new issue
Block a user