morel-theme 0.2.29 → 0.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -21
- data/README.md +19 -19
- data/_config.yml +75 -75
- data/_data/books.csv +82 -82
- data/_data/chriterias.csv +7 -7
- data/_includes/actions-h.html +16 -16
- data/_includes/actions-h_obra-suerte.html +16 -16
- data/_includes/actions-v.html +11 -11
- data/_includes/actions-v_obra-suerte.html +11 -11
- data/_includes/author-firstlast.html +8 -8
- data/_includes/book-list-all.html +7 -7
- data/_includes/book-list-base.html +22 -22
- data/_includes/book-list-download.html +22 -22
- data/_includes/book-list-metadata.html +12 -12
- data/_includes/book-list-no-download.html +22 -22
- data/_includes/book-list-related-author.html +16 -16
- data/_includes/book-list-related-book.html +30 -30
- data/_includes/book-list-seeall.html +7 -7
- data/_includes/book-list-seemore.html +7 -7
- data/_includes/book-list-translations.html +16 -16
- data/_includes/book-list-url-img.html +8 -8
- data/_includes/book-list-url-img_obra-suerte.html +8 -8
- data/_includes/book-list-url-page.html +5 -5
- data/_includes/book-metadata-index.html +18 -18
- data/_includes/book-metadata-noequal.html +18 -18
- data/_includes/book-metadata-nolinks.html +15 -15
- data/_includes/book-metadata.html +17 -17
- data/_includes/book-sample.html +30 -30
- data/_includes/chriteria.html +19 -19
- data/_includes/default.html +35 -35
- data/_includes/empty-chriteria.html +7 -7
- data/_includes/es/book-list-metadata.html +12 -12
- data/_includes/es/book-list-related-author.html +16 -16
- data/_includes/es/book-list-related-book.html +30 -30
- data/_includes/es/book-list-translations_.html +15 -15
- data/_includes/es/book-metadata copy.html +18 -18
- data/_includes/es/book-metadata-index.html +18 -18
- data/_includes/es/book-metadata.html +18 -18
- data/_includes/es/lista-relacionadas-ciudad.html +12 -12
- data/_includes/es/lista-relacionadas-editorial.html +12 -12
- data/_includes/es/lista-relacionadas-libro.html +39 -39
- data/_includes/es/lista-relacionadas-repositorio.html +12 -12
- data/_includes/es/promotion.html +27 -27
- data/_includes/es/search.html +76 -76
- data/_includes/footer.html +10 -10
- data/_includes/iteration.html +11 -11
- data/_includes/lista-relacionadas-ciudad.html +12 -12
- data/_includes/lista-relacionadas-editorial.html +12 -12
- data/_includes/lista-relacionadas-libro.html +39 -39
- data/_includes/lista-relacionadas-repositorio.html +12 -12
- data/_includes/lista-todas-sample.html +30 -30
- data/_includes/lista-todas.html +21 -21
- data/_includes/nav-bar.html +20 -20
- data/_includes/no-false-match.html +14 -14
- data/_includes/obras-por-autora.html +17 -17
- data/_includes/obras-por-ciudad.html +23 -23
- data/_includes/obras-por-imprenta-y-editorial.html +22 -22
- data/_includes/obras-por-repositorio.html +21 -21
- data/_includes/promotion.html +28 -28
- data/_includes/search.html +76 -76
- data/_includes/site-description.html +120 -120
- data/_includes/social-block.html +22 -22
- data/_includes/social-share.html +17 -17
- data/_includes/ultima-vitrina.html +39 -39
- data/_layouts/about.html +37 -37
- data/_layouts/agregar.html +39 -39
- data/_layouts/author.html +39 -39
- data/_layouts/book.html +38 -38
- data/_layouts/books-download.html +15 -15
- data/_layouts/books-no-download.html +15 -15
- data/_layouts/books-translation.html +12 -12
- data/_layouts/busquedas.html +12 -12
- data/_layouts/city.html +4 -4
- data/_layouts/default-blog.html +23 -23
- data/_layouts/default.html +49 -40
- data/_layouts/es/index.html +36 -36
- data/_layouts/es/page-chriteria.html +5 -5
- data/_layouts/es/search.html +76 -76
- data/_layouts/index.html +36 -36
- data/_layouts/obras-sample.html +3 -3
- data/_layouts/obras-todas.html +4 -4
- data/_layouts/page-chriteria.html +6 -6
- data/_layouts/periodo.html +4 -4
- data/_layouts/post-index.html +31 -31
- data/_layouts/post.html +41 -41
- data/_layouts/publisher.html +4 -4
- data/_layouts/repository.html +4 -4
- data/_layouts/search.html +76 -76
- data/_sass/base/_reset.scss +32 -32
- data/_sass/base/_typography.scss +170 -170
- data/_sass/base/_variables.scss +61 -61
- data/_sass/components/_buttons.scss +70 -70
- data/_sass/components/_modals.scss +91 -91
- data/_sass/layout/_footer.scss +50 -50
- data/_sass/layout/_forms.scss +105 -105
- data/_sass/layout/_grid.scss +393 -393
- data/_sass/layout/_header.scss +68 -68
- data/_sass/layout/_navigation.scss +144 -144
- data/_sass/pages/_author.scss +68 -68
- data/_sass/pages/_blog.scss +148 -148
- data/_sass/pages/_chriteria.scss +45 -45
- data/_sass/vendors/_particles.scss +15 -15
- data/assets/css/main.scss +16 -16
- data/assets/data/books_zotero.csv +81 -81
- data/assets/js/app.js +132 -132
- data/assets/js/jquery-3.3.1.js +10364 -10364
- data/assets/js/lunr.min.js +5 -5
- data/assets/js/particles.js +670 -670
- data/assets/js/search.js +60 -60
- data/assets/source/_abouts/site-description.md +98 -98
- data/assets/source/_abouts/site-description_es.md +17 -17
- data/assets/source/_abouts/site-description_template.md +15 -15
- data/assets/source/_authors/abraham-hall-nancy.md +2 -2
- data/assets/source/_authors/abudu-gabriel.md +2 -2
- data/assets/source/_authors/adress-guzman-alexandra.md +2 -2
- data/assets/source/_authors/alves-miriam-aparecida.md +2 -2
- data/assets/source/_authors/arozarena-marcelino.md +2 -2
- data/assets/source/_authors/artel-jorge.md +2 -2
- data/assets/source/_authors/assis-machado-de.md +2 -2
- data/assets/source/_authors/barreto-lima.md +2 -2
- data/assets/source/_authors/batrell-ricardo.md +2 -2
- data/assets/source/_authors/bejarano-velasquez-nidia-bejarano.md +2 -2
- data/assets/source/_authors/beleno-c-joaquin.md +2 -2
- data/assets/source/_authors/benet-robinson-ofelia-margarita.md +2 -2
- data/assets/source/_authors/bernard-eulalia.md +2 -2
- data/assets/source/_authors/brindis-de-salas-virginia.md +2 -2
- data/assets/source/_authors/britos-serrat-alberto.md +2 -2
- data/assets/source/_authors/bustos-aguirre-romulo.md +2 -2
- data/assets/source/_authors/carlyon-mark.md +2 -2
- data/assets/source/_authors/carmell-pamela.md +2 -2
- data/assets/source/_authors/carr-richard-j.md +2 -2
- data/assets/source/_authors/cartagena-portalat-n-aida.md +2 -2
- data/assets/source/_authors/cartagena-portalaton-aida.md +2 -2
- data/assets/source/_authors/castillo-nila-del-socorro.md +2 -2
- data/assets/source/_authors/castillo-reina-felipa-trifenia.md +2 -2
- data/assets/source/_authors/chagas-jorge.md +2 -2
- data/assets/source/_authors/chapman-annie.md +2 -2
- data/assets/source/_authors/chavarria-londono-hermilda.md +2 -2
- data/assets/source/_authors/chiriboga-luz-argentina.md +2 -2
- data/assets/source/_authors/cordoba-jenny-de-la-torre.md +2 -2
- data/assets/source/_authors/cordones-cook-alexander-michael.md +2 -2
- data/assets/source/_authors/cordones-cook-juanamaria.md +2 -2
- data/assets/source/_authors/corpus-stephens-bricena.md +2 -2
- data/assets/source/_authors/cueto-mercado-muris.md +2 -2
- data/assets/source/_authors/cuti-luiz-silva.md +2 -2
- data/assets/source/_authors/de-la-torre-cordoba-jenny.md +2 -2
- data/assets/source/_authors/delgado-mina-sobeida.md +2 -2
- data/assets/source/_authors/diago-ruth-patricia.md +2 -2
- data/assets/source/_authors/diaz-sanchez-ramon.md +2 -2
- data/assets/source/_authors/duncan-quince.md +2 -2
- data/assets/source/_authors/duque-palacios-sayly.md +2 -2
- data/assets/source/_authors/duran-ayanegui-fernando.md +2 -2
- data/assets/source/_authors/estupinan-bass-nelson.md +2 -2
- data/assets/source/_authors/fenwick-m-j.md +2 -2
- data/assets/source/_authors/ferreira-da-silva-ferrez-reinaldo.md +2 -2
- data/assets/source/_authors/frye-david.md +2 -2
- data/assets/source/_authors/goncalves-ana-maria.md +2 -2
- data/assets/source/_authors/grueso-romero-mary.md +2 -2
- data/assets/source/_authors/guerrero-munoz-clara.md +2 -2
- data/assets/source/_authors/guerrrero-julia-simona.md +2 -2
- data/assets/source/_authors/guillen-nicolas.md +2 -2
- data/assets/source/_authors/harris-mary-a.md +2 -2
- data/assets/source/_authors/hernandez-gaspar-octavio.md +2 -2
- data/assets/source/_authors/herrera-georgina.md +2 -2
- data/assets/source/_authors/hill-susan-f.md +2 -2
- data/assets/source/_authors/joseph-montout-dolores.md +2 -2
- data/assets/source/_authors/lopez-albujar-enrique.md +2 -2
- data/assets/source/_authors/lopez-hernandez-lydia-cristina.md +2 -2
- data/assets/source/_authors/lytle-stephen.md +2 -2
- data/assets/source/_authors/madden-richard-robert.md +2 -2
- data/assets/source/_authors/manzano-juan-francisco.md +2 -2
- data/assets/source/_authors/marinez-de-varela-alfredo.md +2 -2
- data/assets/source/_authors/martin-ogunsola-dellita.md +2 -2
- data/assets/source/_authors/mata-gil-milagros.md +2 -2
- data/assets/source/_authors/mendizabal-horacio.md +2 -2
- data/assets/source/_authors/milena-lucumi-ana.md +2 -2
- data/assets/source/_authors/miller-ingrid-watson.md +2 -2
- data/assets/source/_authors/mina-diaz-ana-teresa.md +2 -2
- data/assets/source/_authors/mina-diaz-bertulia.md +2 -2
- data/assets/source/_authors/mina-diaz-imelda.md +2 -2
- data/assets/source/_authors/monet-aja.md +2 -2
- data/assets/source/_authors/moraes-filho-joao-de.md +2 -2
- data/assets/source/_authors/morejon-nancy.md +2 -2
- data/assets/source/_authors/moreno-aguirre-dionicia.md +2 -2
- data/assets/source/_authors/morris-margaret-lindsay.md +2 -2
- data/assets/source/_authors/morua-delgado-martin.md +2 -2
- data/assets/source/_authors/nerma-rojas-nelly-patricia.md +2 -2
- data/assets/source/_authors/obeso-candelario.md +2 -2
- data/assets/source/_authors/ortiz-adalberto.md +2 -2
- data/assets/source/_authors/palacios-arnoldo.md +2 -2
- data/assets/source/_authors/panchano-lucrecia.md +2 -2
- data/assets/source/_authors/pedroso-regino.md +2 -2
- data/assets/source/_authors/placido-gabriel-de-la-concepcion-valdes.md +2 -2
- data/assets/source/_authors/popov-maria-de-los-angeles.md +2 -2
- data/assets/source/_authors/posada-de-pupo-elisa.md +2 -2
- data/assets/source/_authors/posso-figueria-amalia-lu.md +2 -2
- data/assets/source/_authors/quintanales-mirta.md +2 -2
- data/assets/source/_authors/ramirez-nieva-maria-teresa.md +2 -2
- data/assets/source/_authors/ribeiro-esmeralda.md +2 -2
- data/assets/source/_authors/robinson-abrahams-hazel.md +2 -2
- data/assets/source/_authors/rodriguez-alcala-maria.md +2 -2
- data/assets/source/_authors/rodriguez-cabral-cristina.md +2 -2
- data/assets/source/_authors/romero-pedro-blas-julio.md +2 -2
- data/assets/source/_authors/russell-carlos-e.md +2 -2
- data/assets/source/_authors/sanders-mark-a.md +2 -2
- data/assets/source/_authors/santos-febres-mayra.md +2 -2
- data/assets/source/_authors/santos-garcia-emiro.md +2 -2
- data/assets/source/_authors/schulman-ivan-a.md +2 -2
- data/assets/source/_authors/sierra-gonzalez-lya.md +2 -2
- data/assets/source/_authors/sievert-heather-rosario.md +2 -2
- data/assets/source/_authors/sojo-juan-pablo.md +2 -2
- data/assets/source/_authors/solarte-orejuela-sonia.md +2 -2
- data/assets/source/_authors/sousa-cruz-e.md +2 -2
- data/assets/source/_authors/thomas-piri.md +2 -2
- data/assets/source/_authors/tittler-jonathan.md +2 -2
- data/assets/source/_authors/torres-herrera-lorena.md +2 -2
- data/assets/source/_authors/truque-carlos-arturo.md +2 -2
- data/assets/source/_authors/truque-sonia-nadhezda.md +2 -2
- data/assets/source/_authors/truque-velez-colombia.md +2 -2
- data/assets/source/_authors/truque-yvonne-america.md +2 -2
- data/assets/source/_authors/upton-john.md +2 -2
- data/assets/source/_authors/valencia-cordoba-elcina.md +2 -2
- data/assets/source/_authors/valencia-laura-victoria.md +2 -2
- data/assets/source/_authors/velez-turque.md +2 -2
- data/assets/source/_authors/viveros-vigoya-leida.md +2 -2
- data/assets/source/_authors/weaver-kathleen.md +2 -2
- data/assets/source/_authors/zapata-olivella-juan.md +2 -2
- data/assets/source/_authors/zapata-olivella-manuel.md +2 -2
- data/assets/source/_authors/zapata-perez-edelma.md +2 -2
- data/assets/source/_authors/zarkanchenko-de-gonzalez-luz-colombia.md +2 -2
- data/assets/source/_books/a-black-soldier-s-story-batrell-2010.md +5 -5
- data/assets/source/_books/always-rebellious-selected-herrera-1996.md +4 -4
- data/assets/source/_books/always-rebellious-selected-poems-herrera-1996.md +5 -5
- data/assets/source/_books/an-old-woman-remembers-russell-1995.md +5 -5
- data/assets/source/_books/antologia-de-mujeres-poetas-marinez-de-varela-2010.md +5 -5
- data/assets/source/_books/antologia-de-poetas-negros-britos-serrat-1990.md +5 -5
- data/assets/source/_books/autobiografia-de-un-esclavo-manzano-1975.md +5 -5
- data/assets/source/_books/baladas-para-un-sue-o-morejon-1989.md +4 -4
- data/assets/source/_books/baladas-para-un-sueno-morejon-1989.md +5 -5
- data/assets/source/_books/cancion-negra-sin-color-arozarena-1966.md +5 -5
- data/assets/source/_books/cantos-populares-de-mi-obeso-1877.md +5 -5
- data/assets/source/_books/capao-pecado-ferreira-da-silva-ferrez-2017.md +5 -5
- data/assets/source/_books/chango-el-gran-putas-zapata-olivella-2010.md +5 -5
- data/assets/source/_books/chango-the-biggest-badass-zapata-olivella-2010.md +5 -5
- data/assets/source/_books/cien-carceles-de-amor-brindis-de-salas-1949.md +5 -5
- data/assets/source/_books/cuando-los-guayacanes-florecian-estupinan-bass-1954.md +5 -5
- data/assets/source/_books/cuentos-andinos-lopez-albujar-2010.md +5 -5
- data/assets/source/_books/cuentos-de-anansi-duncan-2019.md +5 -5
- data/assets/source/_books/cuentos-y-relatos-escogidos-duran-ayanegui-2004.md +5 -5
- data/assets/source/_books/cumboto-diaz-sanchez-1969.md +5 -5
- data/assets/source/_books/detras-del-rostro-zapata-olivella-2020.md +5 -5
- data/assets/source/_books/down-these-mean-streets-thomas-1991.md +5 -5
- data/assets/source/_books/drums-under-my-skin-chiriboga-1996.md +5 -5
- data/assets/source/_books/el-diario-intimo-de-mata-gil-2002.md +5 -5
- data/assets/source/_books/el-espejo-y-la-ortiz-1983.md +4 -4
- data/assets/source/_books/el-pardejon-la-novela-chagas-2020.md +5 -5
- data/assets/source/_books/este-mundo-no-es-chiriboga-2017.md +5 -5
- data/assets/source/_books/evocacoes-sousa-1898.md +5 -5
- data/assets/source/_books/fabulas-de-tamalameque-zapata-olivella-2019.md +5 -5
- data/assets/source/_books/gamboa-road-gang-los-beleno-c-1959.md +5 -5
- data/assets/source/_books/historia-de-un-joven-zapata-olivella-1990.md +5 -5
- data/assets/source/_books/hombres-curtidos-duncan-1971.md +5 -5
- data/assets/source/_books/horas-de-meditacion-mendizabal-1869.md +5 -5
- data/assets/source/_books/iconografia-hernandez-1916.md +5 -5
- data/assets/source/_books/impresiones-literarias-las-novelas-morua-delgado-1892.md +5 -5
- data/assets/source/_books/juyungo-a-classic-afro-hispanic-ortiz-1991.md +5 -5
- data/assets/source/_books/juyungo-ortiz-1982.md +5 -5
- data/assets/source/_books/la-calle-10-zapata-olivella-2020.md +5 -5
- data/assets/source/_books/la-copa-de-amatista-hernandez-1923.md +5 -5
- data/assets/source/_books/la-familia-unzuazu-novela-morua-delgado-1901.md +5 -5
- data/assets/source/_books/la-sombra-la-novela-chagas-2013.md +5 -5
- data/assets/source/_books/las-estrellas-son-negras-palacios-2010.md +5 -5
- data/assets/source/_books/looking-within-selected-poems-morejon-2003.md +5 -5
- data/assets/source/_books/malungos-e-milongas-conto-ribeiro-1988.md +5 -5
- data/assets/source/_books/matalache-lopez-albujar-1978.md +5 -5
- data/assets/source/_books/memoria-resistencia-antologia-rodriguez-cabral-2004.md +4 -4
- data/assets/source/_books/memoria-y-resistencia-antologia-rodriguez-cabral-2004.md +5 -5
- data/assets/source/_books/memorial-de-ayres-assis-1908.md +5 -5
- data/assets/source/_books/momentos-de-busca-poemas-alves-1983.md +5 -5
- data/assets/source/_books/my-mother-was-a-monet-2017.md +5 -5
- data/assets/source/_books/negras-somos-antologia-de-panchano-2013.md +5 -5
- data/assets/source/_books/negros-em-contos-cuti-1996.md +5 -5
- data/assets/source/_books/no-es-la-muerte-artel-1979.md +5 -5
- data/assets/source/_books/no-give-up-maan-robinson-abrahams-2016.md +5 -5
- data/assets/source/_books/nochebuena-negra-sojo-1943.md +5 -5
- data/assets/source/_books/nochebuena-negra-sojo-2017.md +4 -4
- data/assets/source/_books/obra-poetica-bustos-aguirre-2010.md +5 -5
- data/assets/source/_books/obra-poetica-romero-2010.md +5 -5
- data/assets/source/_books/para-la-historia-apuntes-batrell-1912.md +5 -5
- data/assets/source/_books/pedra-retorcida-moraes-filho-2004.md +4 -4
- data/assets/source/_books/poemas-con-botas-y-artel-1972.md +5 -5
- data/assets/source/_books/poemas-da-carapinha-cuti-1978.md +4 -4
- data/assets/source/_books/poems-by-a-slave-manzano-1840.md +5 -5
- data/assets/source/_books/poesia-completa-herrera-2016.md +5 -5
- data/assets/source/_books/poesia-pedroso-1996.md +5 -5
- data/assets/source/_books/poesias-completas-de-placido-placido-1856.md +5 -5
- data/assets/source/_books/por-los-senderos-de-zapata-olivella-2010.md +5 -5
- data/assets/source/_books/pregon-de-marimorena-poemas-brindis-de-salas-1952.md +5 -5
- data/assets/source/_books/primeros-versos-mendizabal-1865.md +5 -5
- data/assets/source/_books/querencias-homing-instincts-morejon-2013.md +5 -5
- data/assets/source/_books/ritmoheroe-bernard-1996.md +5 -5
- data/assets/source/_books/romulo-bustos-aguirre-poesia-bustos-aguirre-2014.md +5 -5
- data/assets/source/_books/sirena-selena-santos-febres-2013.md +5 -5
- data/assets/source/_books/sirena-selena-vestida-de-santos-febres-2000.md +5 -5
- data/assets/source/_books/sofia-morua-delgado-1891.md +5 -5
- data/assets/source/_books/sofia-novela-cubana-morua-delgado-1891.md +4 -4
- data/assets/source/_books/solo-acero-pedroso-1979.md +5 -5
- data/assets/source/_books/tambores-bajo-mi-piel-chiriboga-1999.md +5 -5
- data/assets/source/_books/tambores-en-la-noche-artel-2010.md +5 -5
- data/assets/source/_books/tengo-guillen-1968.md +5 -5
- data/assets/source/_books/tengo-guillen-1974.md +5 -5
- data/assets/source/_books/the-best-short-stories-duncan-1995.md +5 -5
- data/assets/source/_books/the-devil-s-nose-chiriboga-2015.md +5 -5
- data/assets/source/_books/the-sad-end-of-barreto-2014.md +5 -5
- data/assets/source/_books/tierra-mojada-zapata-olivella-2020.md +5 -5
- data/assets/source/_books/tres-relatos-del-caribe-joseph-montout-2013.md +5 -5
- data/assets/source/_books/um-defeito-de-cor-goncalves-2009.md +5 -5
- data/assets/source/_books/vivan-los-companeros-cuentos-truque-2010.md +5 -5
- data/assets/source/_books/yania-tierra-poema-documento-cartagena-portalat-n-1995.md +4 -4
- data/assets/source/_books/yania-tierra-poema-documento-cartagena-portalaton-1995.md +5 -5
- data/assets/source/_chriterias/author.md +6 -6
- data/assets/source/_chriterias/city.md +9 -9
- data/assets/source/_chriterias/edition.md +6 -6
- data/assets/source/_chriterias/es/autor.md +6 -6
- data/assets/source/_chriterias/es/ciudad.md +9 -9
- data/assets/source/_chriterias/es/edicion.md +6 -6
- data/assets/source/_chriterias/es/editorial.md +5 -5
- data/assets/source/_chriterias/es/nacionalidad.md +6 -6
- data/assets/source/_chriterias/es/repositorio.md +5 -5
- data/assets/source/_chriterias/nationality.md +6 -6
- data/assets/source/_chriterias/publisher.md +5 -5
- data/assets/source/_chriterias/repository.md +5 -5
- data/assets/source/_cities/barcelona.md +2 -2
- data/assets/source/_cities/barranquilla-colombia.md +2 -2
- data/assets/source/_cities/barranquilla.md +2 -2
- data/assets/source/_cities/belo-horizonte-brasil.md +2 -2
- data/assets/source/_cities/belo-horizonte.md +2 -2
- data/assets/source/_cities/bogota.md +2 -2
- data/assets/source/_cities/buenos-aires.md +2 -2
- data/assets/source/_cities/cali-colombia.md +2 -2
- data/assets/source/_cities/cali.md +2 -2
- data/assets/source/_cities/california-eeuu.md +2 -2
- data/assets/source/_cities/caracas.md +2 -2
- data/assets/source/_cities/chico-eeuu.md +2 -2
- data/assets/source/_cities/ciudad-de-panama.md +2 -2
- data/assets/source/_cities/detroit-eeuu.md +2 -2
- data/assets/source/_cities/habana.md +2 -2
- data/assets/source/_cities/la-habana.md +2 -2
- data/assets/source/_cities/lima.md +2 -2
- data/assets/source/_cities/londres.md +2 -2
- data/assets/source/_cities/madrid.md +2 -2
- data/assets/source/_cities/mexico.md +2 -2
- data/assets/source/_cities/minneapolis-usa.md +2 -2
- data/assets/source/_cities/minneapolis.md +2 -2
- data/assets/source/_cities/montevideo.md +2 -2
- data/assets/source/_cities/navarra-espana.md +2 -2
- data/assets/source/_cities/new-york.md +2 -2
- data/assets/source/_cities/panama.md +2 -2
- data/assets/source/_cities/paris.md +2 -2
- data/assets/source/_cities/quito.md +2 -2
- data/assets/source/_cities/rio-de-janeiro-paris.md +2 -2
- data/assets/source/_cities/rio-de-janeiro.md +2 -2
- data/assets/source/_cities/salvador-de-bahia-brasil.md +2 -2
- data/assets/source/_cities/salvador.md +2 -2
- data/assets/source/_cities/san-jose-costa-rica.md +2 -2
- data/assets/source/_cities/santo-domingo-republica-dominicana.md +2 -2
- data/assets/source/_cities/santo-domingo.md +2 -2
- data/assets/source/_cities/sao-paulo.md +2 -2
- data/assets/source/_cities/sao-salvador-da-bahia.md +2 -2
- data/assets/source/_cities/texas-eeuu.md +2 -2
- data/assets/source/_cities/texas.md +2 -2
- data/assets/source/_cities/washington-d-c.md +2 -2
- data/assets/source/_config.yml +81 -81
- data/assets/source/_data/books.csv +82 -82
- data/assets/source/_data/chriterias.csv +7 -7
- data/assets/source/_posts/2023-06-05-nicolas-guillen.md +14 -14
- data/assets/source/_publishers/afro-hispanic-institute.md +2 -2
- data/assets/source/_publishers/alvarez-y-comp.md +2 -2
- data/assets/source/_publishers/apidama.md +2 -2
- data/assets/source/_publishers/autoria-quilhombhoje.md +2 -2
- data/assets/source/_publishers/azul.md +2 -2
- data/assets/source/_publishers/banco-de-la-republica-de-colombia.md +2 -2
- data/assets/source/_publishers/biblioteca-basica-de-cultura-colombiana.md +2 -2
- data/assets/source/_publishers/book.md +2 -2
- data/assets/source/_publishers/broadside-press.md +2 -2
- data/assets/source/_publishers/caribbean-diaspora-press.md +2 -2
- data/assets/source/_publishers/casa-de-jorge-amado.md +2 -2
- data/assets/source/_publishers/casa-de-la-cultura-ecuatoriana.md +2 -2
- data/assets/source/_publishers/casa-de-las-americas.md +2 -2
- data/assets/source/_publishers/compania-iberoamericana-de-publicaciones.html +1 -1
- data/assets/source/_publishers/compania-impresora.md +2 -2
- data/assets/source/_publishers/copidart.md +2 -2
- data/assets/source/_publishers/creset.md +2 -2
- data/assets/source/_publishers/cuadernos-de-arte-popular.md +2 -2
- data/assets/source/_publishers/cuadernos-union.md +2 -2
- data/assets/source/_publishers/cubanabooks.md +2 -2
- data/assets/source/_publishers/ed-mejoras.md +2 -2
- data/assets/source/_publishers/ed-salvador-casa-de-palavras.md +2 -2
- data/assets/source/_publishers/edicion-a-cargo-de-la-autora.md +2 -2
- data/assets/source/_publishers/ediciones-mundo-afro.md +2 -2
- data/assets/source/_publishers/ediciones-union.md +2 -2
- data/assets/source/_publishers/ediciones-universidad-del-atlantico.md +2 -2
- data/assets/source/_publishers/editora-manati.md +2 -2
- data/assets/source/_publishers/editora-record.md +2 -2
- data/assets/source/_publishers/editorial-costa-rica.md +2 -2
- data/assets/source/_publishers/editorial-el-conejo.md +2 -2
- data/assets/source/_publishers/editorial-manati.md +2 -2
- data/assets/source/_publishers/el-autor.md +2 -2
- data/assets/source/_publishers/el-perro-y-la-rana.md +2 -2
- data/assets/source/_publishers/el-siglo-ilustrado.md +2 -2
- data/assets/source/_publishers/fin-de-siglo.md +2 -2
- data/assets/source/_publishers/fundacion-biblioteca-ayacucho.html +1 -1
- data/assets/source/_publishers/fundacion-editorial-el-perro-y-la-rana.md +2 -2
- data/assets/source/_publishers/general-rafael-urdaneta.md +2 -2
- data/assets/source/_publishers/guadarrama.md +2 -2
- data/assets/source/_publishers/h-garnier.md +2 -2
- data/assets/source/_publishers/haymarket-books.md +2 -2
- data/assets/source/_publishers/imp-de-alvarez-y-ca.md +2 -2
- data/assets/source/_publishers/imp-de-buenos-aires.md +2 -2
- data/assets/source/_publishers/imprenta-buenos-aires.md +2 -2
- data/assets/source/_publishers/imprenta-de-a-alvarez-y-comp.md +2 -2
- data/assets/source/_publishers/imprenta-de-borda.md +2 -2
- data/assets/source/_publishers/imprenta-la-prosperidad.md +2 -2
- data/assets/source/_publishers/imprenta-nacional-de-panama.md +2 -2
- data/assets/source/_publishers/instituto-andino-de-artes-populares.md +2 -2
- data/assets/source/_publishers/instituto-cubano-del-libro.md +2 -2
- data/assets/source/_publishers/instituto-distrital-de-las-artes.md +2 -2
- data/assets/source/_publishers/la-prosperidad.md +2 -2
- data/assets/source/_publishers/letras-cubanas.md +2 -2
- data/assets/source/_publishers/libreria-espanola-de-mme-c-denne-schmitz-e-hijo.md +2 -2
- data/assets/source/_publishers/libreria-hispano-americana.md +2 -2
- data/assets/source/_publishers/libresa.md +2 -2
- data/assets/source/_publishers/mazza-edicioes.md +2 -2
- data/assets/source/_publishers/mazza.md +2 -2
- data/assets/source/_publishers/ministerio-de-cultura-de-colombia.md +2 -2
- data/assets/source/_publishers/ministerio-de-cultura-juventud-y-deportes.md +2 -2
- data/assets/source/_publishers/ministerio-de-cultura.md +2 -2
- data/assets/source/_publishers/ministerio-de-educacion-departamento-de-bellas-artes-y-publicaciones.md +2 -2
- data/assets/source/_publishers/ministerio-de-educacion-publica.md +2 -2
- data/assets/source/_publishers/mondadori.md +2 -2
- data/assets/source/_publishers/monte-avila-editores-latinoamericana.md +2 -2
- data/assets/source/_publishers/objetiva.md +2 -2
- data/assets/source/_publishers/page-publishing.md +2 -2
- data/assets/source/_publishers/peisa.md +2 -2
- data/assets/source/_publishers/penguin-classics.md +2 -2
- data/assets/source/_publishers/picador.md +2 -2
- data/assets/source/_publishers/plaza-janes.md +2 -2
- data/assets/source/_publishers/r-p-imprenta-esto-y-aquello.md +2 -2
- data/assets/source/_publishers/record.md +2 -2
- data/assets/source/_publishers/rumbo-editorial.md +2 -2
- data/assets/source/_publishers/salvat.md +2 -2
- data/assets/source/_publishers/seoane-y-alvarez-impresores.md +2 -2
- data/assets/source/_publishers/sociedad-cultural-editora-indoamericana.md +2 -2
- data/assets/source/_publishers/t-ward-co.md +2 -2
- data/assets/source/_publishers/talleres-del-tiempo.md +2 -2
- data/assets/source/_publishers/texas-tech-university-press.md +2 -2
- data/assets/source/_publishers/three-continent-press.md +2 -2
- data/assets/source/_publishers/typ-aldina.md +2 -2
- data/assets/source/_publishers/union-de-escritores-y-artistas-de-cuba.md +2 -2
- data/assets/source/_publishers/universidad-de-la-republica.md +2 -2
- data/assets/source/_publishers/universidad-del-valle.md +2 -2
- data/assets/source/_publishers/university-of-minnesota-press.md +2 -2
- data/assets/source/_publishers/university-of-texas-press.md +2 -2
- data/assets/source/_publishers/vintage-books.md +2 -2
- data/assets/source/_publishers/wayne-state-university-press.md +2 -2
- data/assets/source/_repositories/.md +2 -2
- data/assets/source/_repositories/american-libraries.md +2 -2
- data/assets/source/_repositories/autores-uy.md +2 -2
- data/assets/source/_repositories/biblioteca-basica-de-cultura-colombiana.md +2 -2
- data/assets/source/_repositories/biblioteca-digital-cesar-rengifo.md +2 -2
- data/assets/source/_repositories/biblioteca-digital-de-bogota.md +2 -2
- data/assets/source/_repositories/biblioteca-digital-de-la-universidad-del-valle.md +2 -2
- data/assets/source/_repositories/biblioteca-digital-del-patrimonio-iberoamericano.md +2 -2
- data/assets/source/_repositories/biblioteca-nacional-de-colombia.md +2 -2
- data/assets/source/_repositories/biblioteca-virtual-agustinos.md +2 -2
- data/assets/source/_repositories/biblioteca-virtual-del-banco-de-la-republica.md +2 -2
- data/assets/source/_repositories/biblioteca-virtual-miguel-de-cervantes.md +2 -2
- data/assets/source/_repositories/centro-afrocolombiano-de-espiritualidad-y-desarrollo-integral.md +2 -2
- data/assets/source/_repositories/centro-de-investigacion-y-conservacion-del-patrimonio-cultural.md +2 -2
- data/assets/source/_repositories/centro-de-recursos-de-computacionais.md +2 -2
- data/assets/source/_repositories/community-texts.md +2 -2
- data/assets/source/_repositories/conocimiento-libre-repositorio-institucional.md +2 -2
- data/assets/source/_repositories/el-perro-y-la-rana.md +2 -2
- data/assets/source/_repositories/epub-libre.md +2 -2
- data/assets/source/_repositories/european-libraries.md +2 -2
- data/assets/source/_repositories/fundacion-editorial-el-perro-y-la-rana.md +2 -2
- data/assets/source/_repositories/harvard-university-google-books.md +2 -2
- data/assets/source/_repositories/harvard-university.md +2 -2
- data/assets/source/_repositories/hathitrust.md +2 -2
- data/assets/source/_repositories/instituto-distrital-de-las-artes.md +2 -2
- data/assets/source/_repositories/internet-archive.md +2 -2
- data/assets/source/_repositories/kahle-austin-foundation.md +2 -2
- data/assets/source/_repositories/ministerio-de-educacion-publica.md +2 -2
- data/assets/source/_repositories/project-gutenberg.md +2 -2
- data/assets/source/_repositories/university-of-illinois-urbana-champaign.md +2 -2
- data/assets/source/_repositories/wellesley-college-library.md +2 -2
- data/assets/source/_repositories/wikimedia-commons.md +2 -2
- data/assets/source/about.md +2 -2
- data/assets/source/add.md +8 -8
- data/assets/source/assets/data/books_zotero.csv +81 -81
- data/assets/source/books.md +4 -4
- data/assets/source/downloads.md +4 -4
- data/assets/source/index.html +3 -3
- data/assets/source/no-downloads.md +4 -4
- data/assets/source/podcast.md +14 -14
- data/assets/source/search.html +30 -30
- data/assets/source/translations.md +4 -4
- metadata +7 -7
data/assets/js/particles.js
CHANGED
@@ -1,671 +1,671 @@
|
|
1
|
-
function hexToRgb(e) {
|
2
|
-
let a = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
3
|
-
e = e.replace(a, function(e, a, t, i) {
|
4
|
-
return a + a + t + t + i + i;
|
5
|
-
});
|
6
|
-
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
7
|
-
return t ? {
|
8
|
-
r: parseInt(t[1], 16),
|
9
|
-
g: parseInt(t[2], 16),
|
10
|
-
b: parseInt(t[3], 16)
|
11
|
-
} : null;
|
12
|
-
}
|
13
|
-
|
14
|
-
function clamp(e, a, t) {
|
15
|
-
return Math.min(Math.max(e, a), t);
|
16
|
-
}
|
17
|
-
|
18
|
-
function isInArray(e, a) {
|
19
|
-
return a.indexOf(e) > -1;
|
20
|
-
}
|
21
|
-
let pJS = function(e, a) {
|
22
|
-
let t = document.querySelector("#" + e + " > .particles-js-canvas-el");
|
23
|
-
this.pJS = {
|
24
|
-
canvas: {
|
25
|
-
el: t,
|
26
|
-
w: t.offsetWidth,
|
27
|
-
h: t.offsetHeight
|
28
|
-
},
|
29
|
-
particles: {
|
30
|
-
number: {
|
31
|
-
value: 50,
|
32
|
-
density: {
|
33
|
-
enable: !0,
|
34
|
-
value_area: 1000
|
35
|
-
}
|
36
|
-
},
|
37
|
-
color: {
|
38
|
-
value: "#fff"
|
39
|
-
},
|
40
|
-
shape: {
|
41
|
-
type: "image",
|
42
|
-
stroke: {
|
43
|
-
width: 5,
|
44
|
-
color: "#ff0000"
|
45
|
-
},
|
46
|
-
polygon: {
|
47
|
-
nb_sides: 5
|
48
|
-
},
|
49
|
-
image: {
|
50
|
-
src: "/assets/tema/img/m.png",
|
51
|
-
width: 87,
|
52
|
-
height: 98
|
53
|
-
}
|
54
|
-
},
|
55
|
-
opacity: {
|
56
|
-
value: 1,
|
57
|
-
random: !1,
|
58
|
-
anim: {
|
59
|
-
enable: !1,
|
60
|
-
speed: 2,
|
61
|
-
opacity_min: 0,
|
62
|
-
sync: !1
|
63
|
-
}
|
64
|
-
},
|
65
|
-
size: {
|
66
|
-
value: 20,
|
67
|
-
random: !1,
|
68
|
-
anim: {
|
69
|
-
enable: !1,
|
70
|
-
speed: 20,
|
71
|
-
size_min: 20,
|
72
|
-
sync: !1
|
73
|
-
}
|
74
|
-
},
|
75
|
-
line_linked: {
|
76
|
-
enable: !0,
|
77
|
-
distance: 100,
|
78
|
-
color: "#fff",
|
79
|
-
opacity: 1,
|
80
|
-
width: 1
|
81
|
-
},
|
82
|
-
move: {
|
83
|
-
enable: !0,
|
84
|
-
speed: 2,
|
85
|
-
direction: "none",
|
86
|
-
random: !1,
|
87
|
-
straight: !1,
|
88
|
-
out_mode: "out",
|
89
|
-
bounce: !1,
|
90
|
-
attract: {
|
91
|
-
enable: !1,
|
92
|
-
rotateX: 3e3,
|
93
|
-
rotateY: 3e3
|
94
|
-
}
|
95
|
-
},
|
96
|
-
array: []
|
97
|
-
},
|
98
|
-
interactivity: {
|
99
|
-
detect_on: "canvas",
|
100
|
-
events: {
|
101
|
-
onhover: {
|
102
|
-
enable: !0,
|
103
|
-
mode: "grab"
|
104
|
-
},
|
105
|
-
onclick: {
|
106
|
-
enable: !0,
|
107
|
-
mode: "push"
|
108
|
-
},
|
109
|
-
resize: !0
|
110
|
-
},
|
111
|
-
modes: {
|
112
|
-
grab: {
|
113
|
-
distance: 100,
|
114
|
-
line_linked: {
|
115
|
-
opacity: 1
|
116
|
-
}
|
117
|
-
},
|
118
|
-
bubble: {
|
119
|
-
distance: 200,
|
120
|
-
size: 80,
|
121
|
-
duration: .4
|
122
|
-
},
|
123
|
-
repulse: {
|
124
|
-
distance: 200,
|
125
|
-
duration: .4
|
126
|
-
},
|
127
|
-
push: {
|
128
|
-
particles_nb: 4
|
129
|
-
},
|
130
|
-
remove: {
|
131
|
-
particles_nb: 2
|
132
|
-
}
|
133
|
-
},
|
134
|
-
mouse: {}
|
135
|
-
},
|
136
|
-
retina_detect: !1,
|
137
|
-
fn: {
|
138
|
-
interact: {},
|
139
|
-
modes: {},
|
140
|
-
vendors: {}
|
141
|
-
},
|
142
|
-
tmp: {}
|
143
|
-
};
|
144
|
-
let i = this.pJS;
|
145
|
-
a && Object.deepExtend(i, a), i.tmp.obj = {
|
146
|
-
size_value: i.particles.size.value,
|
147
|
-
size_anim_speed: i.particles.size.anim.speed,
|
148
|
-
move_speed: i.particles.move.speed,
|
149
|
-
line_linked_distance: i.particles.line_linked.distance,
|
150
|
-
line_linked_width: i.particles.line_linked.width,
|
151
|
-
mode_grab_distance: i.interactivity.modes.grab.distance,
|
152
|
-
mode_bubble_distance: i.interactivity.modes.bubble.distance,
|
153
|
-
mode_bubble_size: i.interactivity.modes.bubble.size,
|
154
|
-
mode_repulse_distance: i.interactivity.modes.repulse.distance
|
155
|
-
}, i.fn.retinaInit = function() {
|
156
|
-
i.retina_detect && window.devicePixelRatio > 1 ? (i.canvas.pxratio = window.devicePixelRatio, i.tmp.retina = !0) : (i.canvas.pxratio = 1, i.tmp.retina = !1), i.canvas.w = i.canvas.el.offsetWidth * i.canvas.pxratio, i.canvas.h = i.canvas.el.offsetHeight * i.canvas.pxratio, i.particles.size.value = i.tmp.obj.size_value * i.canvas.pxratio, i.particles.size.anim.speed = i.tmp.obj.size_anim_speed * i.canvas.pxratio, i.particles.move.speed = i.tmp.obj.move_speed * i.canvas.pxratio, i.particles.line_linked.distance = i.tmp.obj.line_linked_distance * i.canvas.pxratio, i.interactivity.modes.grab.distance = i.tmp.obj.mode_grab_distance * i.canvas.pxratio, i.interactivity.modes.bubble.distance = i.tmp.obj.mode_bubble_distance * i.canvas.pxratio, i.particles.line_linked.width = i.tmp.obj.line_linked_width * i.canvas.pxratio, i.interactivity.modes.bubble.size = i.tmp.obj.mode_bubble_size * i.canvas.pxratio, i.interactivity.modes.repulse.distance = i.tmp.obj.mode_repulse_distance * i.canvas.pxratio;
|
157
|
-
}, i.fn.canvasInit = function() {
|
158
|
-
i.canvas.ctx = i.canvas.el.getContext("2d");
|
159
|
-
}, i.fn.canvasSize = function() {
|
160
|
-
i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i && i.interactivity.events.resize && window.addEventListener("resize", function() {
|
161
|
-
i.canvas.w = i.canvas.el.offsetWidth, i.canvas.h = i.canvas.el.offsetHeight, i.tmp.retina && (i.canvas.w *= i.canvas.pxratio, i.canvas.h *= i.canvas.pxratio), i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i.particles.move.enable || (i.fn.particlesEmpty(), i.fn.particlesCreate(), i.fn.particlesDraw(), i.fn.vendors.densityAutoParticles()), i.fn.vendors.densityAutoParticles();
|
162
|
-
});
|
163
|
-
}, i.fn.canvasPaint = function() {
|
164
|
-
i.canvas.ctx.fillRect(0, 0, i.canvas.w, i.canvas.h);
|
165
|
-
}, i.fn.canvasClear = function() {
|
166
|
-
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h);
|
167
|
-
}, i.fn.particle = function(e, a, t) {
|
168
|
-
if (this.radius = (i.particles.size.random ? Math.random() : 1) * i.particles.size.value, i.particles.size.anim.enable && (this.size_status = !1, this.vs = i.particles.size.anim.speed / 100, i.particles.size.anim.sync || (this.vs = this.vs * Math.random())), this.x = t ? t.x : Math.random() * i.canvas.w, this.y = t ? t.y : Math.random() * i.canvas.h, this.x > i.canvas.w - 2 * this.radius ? this.x = this.x - this.radius : this.x < 2 * this.radius && (this.x = this.x + this.radius), this.y > i.canvas.h - 2 * this.radius ? this.y = this.y - this.radius : this.y < 2 * this.radius && (this.y = this.y + this.radius), i.particles.move.bounce && i.fn.vendors.checkOverlap(this, t), this.color = {}, "object" == typeof e.value)
|
169
|
-
if (e.value instanceof Array) {
|
170
|
-
let s = e.value[Math.floor(Math.random() * i.particles.color.value.length)];
|
171
|
-
this.color.rgb = hexToRgb(s);
|
172
|
-
} else void 0 != e.value.r && void 0 != e.value.g && void 0 != e.value.b && (this.color.rgb = {
|
173
|
-
r: e.value.r,
|
174
|
-
g: e.value.g,
|
175
|
-
b: e.value.b
|
176
|
-
}), void 0 != e.value.h && void 0 != e.value.s && void 0 != e.value.l && (this.color.hsl = {
|
177
|
-
h: e.value.h,
|
178
|
-
s: e.value.s,
|
179
|
-
l: e.value.l
|
180
|
-
});
|
181
|
-
else "random" == e.value ? this.color.rgb = {
|
182
|
-
r: Math.floor(256 * Math.random()) + 0,
|
183
|
-
g: Math.floor(256 * Math.random()) + 0,
|
184
|
-
b: Math.floor(256 * Math.random()) + 0
|
185
|
-
} : "string" == typeof e.value && (this.color = e, this.color.rgb = hexToRgb(this.color.value));
|
186
|
-
this.opacity = (i.particles.opacity.random ? Math.random() : 1) * i.particles.opacity.value, i.particles.opacity.anim.enable && (this.opacity_status = !1, this.vo = i.particles.opacity.anim.speed / 100, i.particles.opacity.anim.sync || (this.vo = this.vo * Math.random()));
|
187
|
-
let n = {};
|
188
|
-
switch (i.particles.move.direction) {
|
189
|
-
case "top":
|
190
|
-
n = {
|
191
|
-
x: 0,
|
192
|
-
y: -1
|
193
|
-
};
|
194
|
-
break;
|
195
|
-
case "top-right":
|
196
|
-
n = {
|
197
|
-
x: .5,
|
198
|
-
y: -.5
|
199
|
-
};
|
200
|
-
break;
|
201
|
-
case "right":
|
202
|
-
n = {
|
203
|
-
x: 1,
|
204
|
-
y: -0
|
205
|
-
};
|
206
|
-
break;
|
207
|
-
case "bottom-right":
|
208
|
-
n = {
|
209
|
-
x: .5,
|
210
|
-
y: .5
|
211
|
-
};
|
212
|
-
break;
|
213
|
-
case "bottom":
|
214
|
-
n = {
|
215
|
-
x: 0,
|
216
|
-
y: 1
|
217
|
-
};
|
218
|
-
break;
|
219
|
-
case "bottom-left":
|
220
|
-
n = {
|
221
|
-
x: -.5,
|
222
|
-
y: 1
|
223
|
-
};
|
224
|
-
break;
|
225
|
-
case "left":
|
226
|
-
n = {
|
227
|
-
x: -1,
|
228
|
-
y: 0
|
229
|
-
};
|
230
|
-
break;
|
231
|
-
case "top-left":
|
232
|
-
n = {
|
233
|
-
x: -.5,
|
234
|
-
y: -.5
|
235
|
-
};
|
236
|
-
break;
|
237
|
-
default:
|
238
|
-
n = {
|
239
|
-
x: 0,
|
240
|
-
y: 0
|
241
|
-
};
|
242
|
-
}
|
243
|
-
i.particles.move.straight ? (this.vx = n.x, this.vy = n.y, i.particles.move.random && (this.vx = this.vx * Math.random(), this.vy = this.vy * Math.random())) : (this.vx = n.x + Math.random() - .5, this.vy = n.y + Math.random() - .5), this.vx_i = this.vx, this.vy_i = this.vy;
|
244
|
-
let r = i.particles.shape.type;
|
245
|
-
if ("object" == typeof r) {
|
246
|
-
if (r instanceof Array) {
|
247
|
-
let c = r[Math.floor(Math.random() * r.length)];
|
248
|
-
this.shape = c;
|
249
|
-
}
|
250
|
-
} else this.shape = r;
|
251
|
-
|
252
|
-
let substring = this.shape.substring(0, 5);
|
253
|
-
if ("image" == substring) {
|
254
|
-
let o = i.particles.shape;
|
255
|
-
this.img = {
|
256
|
-
src: o.image.src,
|
257
|
-
ratio: o.image.width / o.image.height
|
258
|
-
}, this.img.ratio || (this.img.ratio = 1), "svg" == i.tmp.img_type && void 0 != i.tmp.source_svg && (i.fn.vendors.createSvgImg(this), i.tmp.pushing && (this.img.loaded = !1));
|
259
|
-
}
|
260
|
-
}, i.fn.particle.prototype.draw = function() {
|
261
|
-
function e() {
|
262
|
-
i.canvas.ctx.drawImage(r, a.x - t, a.y - t, 2 * t, 2 * t / a.img.ratio);
|
263
|
-
}
|
264
|
-
var a = this;
|
265
|
-
if (void 0 != a.radius_bubble) var t = a.radius_bubble;
|
266
|
-
else var t = a.radius;
|
267
|
-
if (void 0 != a.opacity_bubble) var s = a.opacity_bubble;
|
268
|
-
else var s = a.opacity;
|
269
|
-
if (a.color.rgb) var n = "rgba(" + a.color.rgb.r + "," + a.color.rgb.g + "," + a.color.rgb.b + "," + s + ")";
|
270
|
-
else var n = "hsla(" + a.color.hsl.h + "," + a.color.hsl.s + "%," + a.color.hsl.l + "%," + s + ")";
|
271
|
-
switch (i.canvas.ctx.fillStyle = n, i.canvas.ctx.beginPath(), a.shape) {
|
272
|
-
case "circle":
|
273
|
-
i.canvas.ctx.arc(a.x, a.y, t, 0, 2 * Math.PI, !1);
|
274
|
-
break;
|
275
|
-
case "edge":
|
276
|
-
i.canvas.ctx.rect(a.x - t, a.y - t, 2 * t, 2 * t);
|
277
|
-
break;
|
278
|
-
case "triangle":
|
279
|
-
i.fn.vendors.drawShape(i.canvas.ctx, a.x - t, a.y + t / 1.66, 2 * t, 3, 2);
|
280
|
-
break;
|
281
|
-
case "polygon":
|
282
|
-
i.fn.vendors.drawShape(i.canvas.ctx, a.x - t / (i.particles.shape.polygon.nb_sides / 3.5), a.y - t / .76, 2.66 * t / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 1);
|
283
|
-
break;
|
284
|
-
case "star":
|
285
|
-
i.fn.vendors.drawShape(i.canvas.ctx, a.x - 2 * t / (i.particles.shape.polygon.nb_sides / 4), a.y - t / 1.52, 2 * t * 2.66 / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 2);
|
286
|
-
break;
|
287
|
-
case "image":
|
288
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
289
|
-
else var r = i.tmp.img_obj;
|
290
|
-
r && e();
|
291
|
-
break;
|
292
|
-
case "image2":
|
293
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
294
|
-
else var r = i.tmp.img_obj;
|
295
|
-
var element = document.createElement('img');
|
296
|
-
element.src = 'assets/img/tema/m.png';
|
297
|
-
r = element;
|
298
|
-
r && e();
|
299
|
-
break;
|
300
|
-
case "image3":
|
301
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
302
|
-
else var r = i.tmp.img_obj;
|
303
|
-
var element = document.createElement('img');
|
304
|
-
element.src = '/assets/img/tema/o.png';
|
305
|
-
r = element;
|
306
|
-
r && e();
|
307
|
-
break;
|
308
|
-
case "image4":
|
309
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
310
|
-
else var r = i.tmp.img_obj;
|
311
|
-
var element = document.createElement('img');
|
312
|
-
element.src = '/assets/img/tema/r.png';
|
313
|
-
r = element;
|
314
|
-
r && e();
|
315
|
-
break;
|
316
|
-
case "image5":
|
317
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
318
|
-
else var r = i.tmp.img_obj;
|
319
|
-
var element = document.createElement('img');
|
320
|
-
element.src = '/assets/img/tema/e.png';
|
321
|
-
r = element;
|
322
|
-
r && e();
|
323
|
-
break;
|
324
|
-
case "image6":
|
325
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
326
|
-
else var r = i.tmp.img_obj;
|
327
|
-
var element = document.createElement('img');
|
328
|
-
element.src = '/assets/img/tema/l.png';
|
329
|
-
r = element;
|
330
|
-
r && e();
|
331
|
-
break;
|
332
|
-
case "image7":
|
333
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
334
|
-
else var r = i.tmp.img_obj;
|
335
|
-
var element = document.createElement('img');
|
336
|
-
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex7a.png';
|
337
|
-
r = element;
|
338
|
-
r && e();
|
339
|
-
break;
|
340
|
-
case "image8":
|
341
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
342
|
-
else var r = i.tmp.img_obj;
|
343
|
-
var element = document.createElement('img');
|
344
|
-
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex8a.png';
|
345
|
-
r = element;
|
346
|
-
r && e();
|
347
|
-
break;
|
348
|
-
case "image9":
|
349
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
350
|
-
else var r = i.tmp.img_obj;
|
351
|
-
var element = document.createElement('img');
|
352
|
-
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex9a.png';
|
353
|
-
r = element;
|
354
|
-
r && e();
|
355
|
-
break;
|
356
|
-
case "image10":
|
357
|
-
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
358
|
-
else var r = i.tmp.img_obj;
|
359
|
-
var element = document.createElement('img');
|
360
|
-
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex10a.png';
|
361
|
-
r = element;
|
362
|
-
r && e();
|
363
|
-
}
|
364
|
-
i.canvas.ctx.closePath(), i.particles.shape.stroke.width > 0 && (i.canvas.ctx.strokeStyle = i.particles.shape.stroke.color, i.canvas.ctx.lineWidth = i.particles.shape.stroke.width, i.canvas.ctx.stroke()), i.canvas.ctx.fill();
|
365
|
-
}, i.fn.particlesCreate = function() {
|
366
|
-
for (let e = 0; e < i.particles.number.value; e++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value));
|
367
|
-
}, i.fn.particlesUpdate = function() {
|
368
|
-
for (let e = 0; e < i.particles.array.length; e++) {
|
369
|
-
let a = i.particles.array[e];
|
370
|
-
if (i.particles.move.enable) {
|
371
|
-
let t = i.particles.move.speed / 2;
|
372
|
-
a.x += a.vx * t, a.y += a.vy * t;
|
373
|
-
}
|
374
|
-
if (i.particles.opacity.anim.enable && (1 == a.opacity_status ? (a.opacity >= i.particles.opacity.value && (a.opacity_status = !1), a.opacity += a.vo) : (a.opacity <= i.particles.opacity.anim.opacity_min && (a.opacity_status = !0), a.opacity -= a.vo), a.opacity < 0 && (a.opacity = 0)), i.particles.size.anim.enable && (1 == a.size_status ? (a.radius >= i.particles.size.value && (a.size_status = !1), a.radius += a.vs) : (a.radius <= i.particles.size.anim.size_min && (a.size_status = !0), a.radius -= a.vs), a.radius < 0 && (a.radius = 0)), "bounce" == i.particles.move.out_mode) var s = {
|
375
|
-
x_left: a.radius,
|
376
|
-
x_right: i.canvas.w,
|
377
|
-
y_top: a.radius,
|
378
|
-
y_bottom: i.canvas.h
|
379
|
-
};
|
380
|
-
else var s = {
|
381
|
-
x_left: -a.radius,
|
382
|
-
x_right: i.canvas.w + a.radius,
|
383
|
-
y_top: -a.radius,
|
384
|
-
y_bottom: i.canvas.h + a.radius
|
385
|
-
};
|
386
|
-
switch (a.x - a.radius > i.canvas.w ? (a.x = s.x_left, a.y = Math.random() * i.canvas.h) : a.x + a.radius < 0 && (a.x = s.x_right, a.y = Math.random() * i.canvas.h), a.y - a.radius > i.canvas.h ? (a.y = s.y_top, a.x = Math.random() * i.canvas.w) : a.y + a.radius < 0 && (a.y = s.y_bottom, a.x = Math.random() * i.canvas.w), i.particles.move.out_mode) {
|
387
|
-
case "bounce":
|
388
|
-
a.x + a.radius > i.canvas.w ? a.vx = -a.vx : a.x - a.radius < 0 && (a.vx = -a.vx), a.y + a.radius > i.canvas.h ? a.vy = -a.vy : a.y - a.radius < 0 && (a.vy = -a.vy);
|
389
|
-
}
|
390
|
-
if (isInArray("grab", i.interactivity.events.onhover.mode) && i.fn.modes.grabParticle(a), (isInArray("bubble", i.interactivity.events.onhover.mode) || isInArray("bubble", i.interactivity.events.onclick.mode)) && i.fn.modes.bubbleParticle(a), (isInArray("repulse", i.interactivity.events.onhover.mode) || isInArray("repulse", i.interactivity.events.onclick.mode)) && i.fn.modes.repulseParticle(a), i.particles.line_linked.enable || i.particles.move.attract.enable)
|
391
|
-
for (let n = e + 1; n < i.particles.array.length; n++) {
|
392
|
-
let r = i.particles.array[n];
|
393
|
-
i.particles.line_linked.enable && i.fn.interact.linkParticles(a, r), i.particles.move.attract.enable && i.fn.interact.attractParticles(a, r), i.particles.move.bounce && i.fn.interact.bounceParticles(a, r);
|
394
|
-
}
|
395
|
-
}
|
396
|
-
}, i.fn.particlesDraw = function() {
|
397
|
-
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h), i.fn.particlesUpdate();
|
398
|
-
for (let e = 0; e < i.particles.array.length; e++) {
|
399
|
-
let a = i.particles.array[e];
|
400
|
-
a.draw();
|
401
|
-
}
|
402
|
-
}, i.fn.particlesEmpty = function() {
|
403
|
-
i.particles.array = [];
|
404
|
-
}, i.fn.particlesRefresh = function() {
|
405
|
-
cancelRequestAnimFrame(i.fn.checkAnimFrame), cancelRequestAnimFrame(i.fn.drawAnimFrame), i.tmp.source_svg = void 0, i.tmp.img_obj = void 0, i.tmp.count_svg = 0, i.fn.particlesEmpty(), i.fn.canvasClear(), i.fn.vendors.start();
|
406
|
-
}, i.fn.interact.linkParticles = function(e, a) {
|
407
|
-
let t = e.x - a.x,
|
408
|
-
s = e.y - a.y,
|
409
|
-
n = Math.sqrt(t * t + s * s);
|
410
|
-
if (n <= i.particles.line_linked.distance) {
|
411
|
-
let r = i.particles.line_linked.opacity - n / (1 / i.particles.line_linked.opacity) / i.particles.line_linked.distance;
|
412
|
-
if (r > 0) {
|
413
|
-
let c = i.particles.line_linked.color_rgb_line;
|
414
|
-
i.canvas.ctx.strokeStyle = "rgba(" + c.r + "," + c.g + "," + c.b + "," + r + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(a.x, a.y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath();
|
415
|
-
}
|
416
|
-
}
|
417
|
-
}, i.fn.interact.attractParticles = function(e, a) {
|
418
|
-
let t = e.x - a.x,
|
419
|
-
s = e.y - a.y,
|
420
|
-
n = Math.sqrt(t * t + s * s);
|
421
|
-
if (n <= i.particles.line_linked.distance) {
|
422
|
-
let r = t / (1e3 * i.particles.move.attract.rotateX),
|
423
|
-
c = s / (1e3 * i.particles.move.attract.rotateY);
|
424
|
-
e.vx -= r, e.vy -= c, a.vx += r, a.vy += c;
|
425
|
-
}
|
426
|
-
}, i.fn.interact.bounceParticles = function(e, a) {
|
427
|
-
let t = e.x - a.x,
|
428
|
-
i = e.y - a.y,
|
429
|
-
s = Math.sqrt(t * t + i * i),
|
430
|
-
n = e.radius + a.radius;
|
431
|
-
n >= s && (e.vx = -e.vx, e.vy = -e.vy, a.vx = -a.vx, a.vy = -a.vy);
|
432
|
-
}, i.fn.modes.pushParticles = function(e, a) {
|
433
|
-
i.tmp.pushing = !0;
|
434
|
-
for (let t = 0; e > t; t++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value, {
|
435
|
-
x: a ? a.pos_x : Math.random() * i.canvas.w,
|
436
|
-
y: a ? a.pos_y : Math.random() * i.canvas.h
|
437
|
-
})), t == e - 1 && (i.particles.move.enable || i.fn.particlesDraw(), i.tmp.pushing = !1);
|
438
|
-
}, i.fn.modes.removeParticles = function(e) {
|
439
|
-
i.particles.array.splice(0, e), i.particles.move.enable || i.fn.particlesDraw();
|
440
|
-
}, i.fn.modes.bubbleParticle = function(e) {
|
441
|
-
function a() {
|
442
|
-
e.opacity_bubble = e.opacity, e.radius_bubble = e.radius;
|
443
|
-
}
|
444
|
-
|
445
|
-
function t(a, t, s, n, c) {
|
446
|
-
if (a != t)
|
447
|
-
if (i.tmp.bubble_duration_end) {
|
448
|
-
if (void 0 != s) {
|
449
|
-
let o = n - p * (n - a) / i.interactivity.modes.bubble.duration,
|
450
|
-
l = a - o;
|
451
|
-
d = a + l, "size" == c && (e.radius_bubble = d), "opacity" == c && (e.opacity_bubble = d);
|
452
|
-
}
|
453
|
-
} else if (r <= i.interactivity.modes.bubble.distance) {
|
454
|
-
if (void 0 != s) var v = s;
|
455
|
-
else var v = n;
|
456
|
-
if (v != a) {
|
457
|
-
var d = n - p * (n - a) / i.interactivity.modes.bubble.duration;
|
458
|
-
"size" == c && (e.radius_bubble = d), "opacity" == c && (e.opacity_bubble = d);
|
459
|
-
}
|
460
|
-
} else "size" == c && (e.radius_bubble = void 0), "opacity" == c && (e.opacity_bubble = void 0);
|
461
|
-
}
|
462
|
-
if (i.interactivity.events.onhover.enable && isInArray("bubble", i.interactivity.events.onhover.mode)) {
|
463
|
-
var s = e.x - i.interactivity.mouse.pos_x,
|
464
|
-
n = e.y - i.interactivity.mouse.pos_y,
|
465
|
-
r = Math.sqrt(s * s + n * n),
|
466
|
-
c = 1 - r / i.interactivity.modes.bubble.distance;
|
467
|
-
if (r <= i.interactivity.modes.bubble.distance) {
|
468
|
-
if (c >= 0 && "mousemove" == i.interactivity.status) {
|
469
|
-
if (i.interactivity.modes.bubble.size != i.particles.size.value)
|
470
|
-
if (i.interactivity.modes.bubble.size > i.particles.size.value) {
|
471
|
-
var o = e.radius + i.interactivity.modes.bubble.size * c;
|
472
|
-
o >= 0 && (e.radius_bubble = o);
|
473
|
-
} else {
|
474
|
-
var l = e.radius - i.interactivity.modes.bubble.size,
|
475
|
-
o = e.radius - l * c;
|
476
|
-
o > 0 ? e.radius_bubble = o : e.radius_bubble = 0;
|
477
|
-
}
|
478
|
-
if (i.interactivity.modes.bubble.opacity != i.particles.opacity.value)
|
479
|
-
if (i.interactivity.modes.bubble.opacity > i.particles.opacity.value) {
|
480
|
-
var v = i.interactivity.modes.bubble.opacity * c;
|
481
|
-
v > e.opacity && v <= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = v);
|
482
|
-
} else {
|
483
|
-
var v = e.opacity - (i.particles.opacity.value - i.interactivity.modes.bubble.opacity) * c;
|
484
|
-
v < e.opacity && v >= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = v);
|
485
|
-
}
|
486
|
-
}
|
487
|
-
} else a();
|
488
|
-
"mouseleave" == i.interactivity.status && a();
|
489
|
-
} else if (i.interactivity.events.onclick.enable && isInArray("bubble", i.interactivity.events.onclick.mode)) {
|
490
|
-
if (i.tmp.bubble_clicking) {
|
491
|
-
var s = e.x - i.interactivity.mouse.click_pos_x,
|
492
|
-
n = e.y - i.interactivity.mouse.click_pos_y,
|
493
|
-
r = Math.sqrt(s * s + n * n),
|
494
|
-
p = ((new Date).getTime() - i.interactivity.mouse.click_time) / 1e3;
|
495
|
-
p > i.interactivity.modes.bubble.duration && (i.tmp.bubble_duration_end = !0), p > 2 * i.interactivity.modes.bubble.duration && (i.tmp.bubble_clicking = !1, i.tmp.bubble_duration_end = !1);
|
496
|
-
}
|
497
|
-
i.tmp.bubble_clicking && (t(i.interactivity.modes.bubble.size, i.particles.size.value, e.radius_bubble, e.radius, "size"), t(i.interactivity.modes.bubble.opacity, i.particles.opacity.value, e.opacity_bubble, e.opacity, "opacity"));
|
498
|
-
}
|
499
|
-
}, i.fn.modes.repulseParticle = function(e) {
|
500
|
-
function a() {
|
501
|
-
let a = Math.atan2(d, p);
|
502
|
-
if (e.vx = u * Math.cos(a), e.vy = u * Math.sin(a), "bounce" == i.particles.move.out_mode) {
|
503
|
-
let t = {
|
504
|
-
x: e.x + e.vx,
|
505
|
-
y: e.y + e.vy
|
506
|
-
};
|
507
|
-
t.x + e.radius > i.canvas.w ? e.vx = -e.vx : t.x - e.radius < 0 && (e.vx = -e.vx), t.y + e.radius > i.canvas.h ? e.vy = -e.vy : t.y - e.radius < 0 && (e.vy = -e.vy);
|
508
|
-
}
|
509
|
-
}
|
510
|
-
if (i.interactivity.events.onhover.enable && isInArray("repulse", i.interactivity.events.onhover.mode) && "mousemove" == i.interactivity.status) {
|
511
|
-
var t = e.x - i.interactivity.mouse.pos_x,
|
512
|
-
s = e.y - i.interactivity.mouse.pos_y,
|
513
|
-
n = Math.sqrt(t * t + s * s),
|
514
|
-
r = {
|
515
|
-
x: t / n,
|
516
|
-
y: s / n
|
517
|
-
},
|
518
|
-
c = i.interactivity.modes.repulse.distance,
|
519
|
-
o = 100,
|
520
|
-
l = clamp(1 / c * (-1 * Math.pow(n / c, 2) + 1) * c * o, 0, 50),
|
521
|
-
v = {
|
522
|
-
x: e.x + r.x * l,
|
523
|
-
y: e.y + r.y * l
|
524
|
-
};
|
525
|
-
"bounce" == i.particles.move.out_mode ? (v.x - e.radius > 0 && v.x + e.radius < i.canvas.w && (e.x = v.x), v.y - e.radius > 0 && v.y + e.radius < i.canvas.h && (e.y = v.y)) : (e.x = v.x, e.y = v.y);
|
526
|
-
} else if (i.interactivity.events.onclick.enable && isInArray("repulse", i.interactivity.events.onclick.mode))
|
527
|
-
if (i.tmp.repulse_finish || (i.tmp.repulse_count++, i.tmp.repulse_count == i.particles.array.length && (i.tmp.repulse_finish = !0)), i.tmp.repulse_clicking) {
|
528
|
-
var c = Math.pow(i.interactivity.modes.repulse.distance / 6, 3),
|
529
|
-
p = i.interactivity.mouse.click_pos_x - e.x,
|
530
|
-
d = i.interactivity.mouse.click_pos_y - e.y,
|
531
|
-
m = p * p + d * d,
|
532
|
-
u = -c / m * 1;
|
533
|
-
c >= m && a();
|
534
|
-
} else 0 == i.tmp.repulse_clicking && (e.vx = e.vx_i, e.vy = e.vy_i);
|
535
|
-
}, i.fn.modes.grabParticle = function(e) {
|
536
|
-
if (i.interactivity.events.onhover.enable && "mousemove" == i.interactivity.status) {
|
537
|
-
let a = e.x - i.interactivity.mouse.pos_x,
|
538
|
-
t = e.y - i.interactivity.mouse.pos_y,
|
539
|
-
s = Math.sqrt(a * a + t * t);
|
540
|
-
if (s <= i.interactivity.modes.grab.distance) {
|
541
|
-
let n = i.interactivity.modes.grab.line_linked.opacity - s / (1 / i.interactivity.modes.grab.line_linked.opacity) / i.interactivity.modes.grab.distance;
|
542
|
-
if (n > 0) {
|
543
|
-
let r = i.particles.line_linked.color_rgb_line;
|
544
|
-
i.canvas.ctx.strokeStyle = "rgba(" + r.r + "," + r.g + "," + r.b + "," + n + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(i.interactivity.mouse.pos_x, i.interactivity.mouse.pos_y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath();
|
545
|
-
}
|
546
|
-
}
|
547
|
-
}
|
548
|
-
}, i.fn.vendors.eventsListeners = function() {
|
549
|
-
"window" == i.interactivity.detect_on ? i.interactivity.el = window : i.interactivity.el = i.canvas.el, (i.interactivity.events.onhover.enable || i.interactivity.events.onclick.enable) && (i.interactivity.el.addEventListener("mousemove", function(e) {
|
550
|
-
if (i.interactivity.el == window) var a = e.clientX,
|
551
|
-
t = e.clientY;
|
552
|
-
else var a = e.offsetX || e.clientX,
|
553
|
-
t = e.offsetY || e.clientY;
|
554
|
-
i.interactivity.mouse.pos_x = a, i.interactivity.mouse.pos_y = t, i.tmp.retina && (i.interactivity.mouse.pos_x *= i.canvas.pxratio, i.interactivity.mouse.pos_y *= i.canvas.pxratio), i.interactivity.status = "mousemove";
|
555
|
-
}), i.interactivity.el.addEventListener("mouseleave", function(e) {
|
556
|
-
i.interactivity.mouse.pos_x = null, i.interactivity.mouse.pos_y = null, i.interactivity.status = "mouseleave";
|
557
|
-
})), i.interactivity.events.onclick.enable && i.interactivity.el.addEventListener("click", function() {
|
558
|
-
if (i.interactivity.mouse.click_pos_x = i.interactivity.mouse.pos_x, i.interactivity.mouse.click_pos_y = i.interactivity.mouse.pos_y, i.interactivity.mouse.click_time = (new Date).getTime(), i.interactivity.events.onclick.enable) switch (i.interactivity.events.onclick.mode) {
|
559
|
-
case "push":
|
560
|
-
i.particles.move.enable ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : 1 == i.interactivity.modes.push.particles_nb ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : i.interactivity.modes.push.particles_nb > 1 && i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb);
|
561
|
-
break;
|
562
|
-
case "remove":
|
563
|
-
i.fn.modes.removeParticles(i.interactivity.modes.remove.particles_nb);
|
564
|
-
break;
|
565
|
-
case "bubble":
|
566
|
-
i.tmp.bubble_clicking = !0;
|
567
|
-
break;
|
568
|
-
case "repulse":
|
569
|
-
i.tmp.repulse_clicking = !0, i.tmp.repulse_count = 0, i.tmp.repulse_finish = !1, setTimeout(function() {
|
570
|
-
i.tmp.repulse_clicking = !1;
|
571
|
-
}, 1e3 * i.interactivity.modes.repulse.duration);
|
572
|
-
}
|
573
|
-
});
|
574
|
-
}, i.fn.vendors.densityAutoParticles = function() {
|
575
|
-
if (i.particles.number.density.enable) {
|
576
|
-
let e = i.canvas.el.width * i.canvas.el.height / 1e3;
|
577
|
-
i.tmp.retina && (e /= 2 * i.canvas.pxratio);
|
578
|
-
let a = e * i.particles.number.value / i.particles.number.density.value_area,
|
579
|
-
t = i.particles.array.length - a;
|
580
|
-
0 > t ? i.fn.modes.pushParticles(Math.abs(t)) : i.fn.modes.removeParticles(t);
|
581
|
-
}
|
582
|
-
}, i.fn.vendors.checkOverlap = function(e, a) {
|
583
|
-
for (let t = 0; t < i.particles.array.length; t++) {
|
584
|
-
let s = i.particles.array[t],
|
585
|
-
n = e.x - s.x,
|
586
|
-
r = e.y - s.y,
|
587
|
-
c = Math.sqrt(n * n + r * r);
|
588
|
-
c <= e.radius + s.radius && (e.x = a ? a.x : Math.random() * i.canvas.w, e.y = a ? a.y : Math.random() * i.canvas.h, i.fn.vendors.checkOverlap(e));
|
589
|
-
}
|
590
|
-
}, i.fn.vendors.createSvgImg = function(e) {
|
591
|
-
let a = i.tmp.source_svg,
|
592
|
-
t = /#([0-9A-F]{3,6})/gi,
|
593
|
-
s = a.replace(t, function(a, t, i, s) {
|
594
|
-
if (e.color.rgb) var n = "rgba(" + e.color.rgb.r + "," + e.color.rgb.g + "," + e.color.rgb.b + "," + e.opacity + ")";
|
595
|
-
else var n = "hsla(" + e.color.hsl.h + "," + e.color.hsl.s + "%," + e.color.hsl.l + "%," + e.opacity + ")";
|
596
|
-
return n;
|
597
|
-
}),
|
598
|
-
n = new Blob([s], {
|
599
|
-
type: "image/svg+xml;charset=utf-8"
|
600
|
-
}),
|
601
|
-
r = window.URL || window.webkitURL || window,
|
602
|
-
c = r.createObjectURL(n),
|
603
|
-
o = new Image;
|
604
|
-
o.addEventListener("load", function() {
|
605
|
-
e.img.obj = o, e.img.loaded = !0, r.revokeObjectURL(c), i.tmp.count_svg++;
|
606
|
-
}), o.src = c;
|
607
|
-
}, i.fn.vendors.destroypJS = function() {
|
608
|
-
cancelAnimationFrame(i.fn.drawAnimFrame), t.remove(), pJSDom = null;
|
609
|
-
}, i.fn.vendors.drawShape = function(e, a, t, i, s, n) {
|
610
|
-
let r = s * n,
|
611
|
-
c = s / n,
|
612
|
-
o = 180 * (c - 2) / c,
|
613
|
-
l = Math.PI - Math.PI * o / 180;
|
614
|
-
e.save(), e.beginPath(), e.translate(a, t), e.moveTo(0, 0);
|
615
|
-
for (let v = 0; r > v; v++) e.lineTo(i, 0), e.translate(i, 0), e.rotate(l);
|
616
|
-
e.fill(), e.restore();
|
617
|
-
}, i.fn.vendors.exportImg = function() {
|
618
|
-
window.open(i.canvas.el.toDataURL("image/png"), "_blank");
|
619
|
-
}, i.fn.vendors.loadImg = function(e) {
|
620
|
-
if (i.tmp.img_error = void 0, "" != i.particles.shape.image.src)
|
621
|
-
if ("svg" == e) {
|
622
|
-
let a = new XMLHttpRequest;
|
623
|
-
a.open("GET", i.particles.shape.image.src), a.onreadystatechange = function(e) {
|
624
|
-
4 == a.readyState && (200 == a.status ? (i.tmp.source_svg = e.currentTarget.response, i.fn.vendors.checkBeforeDraw()) : (console.log("Error pJS - Image not found"), i.tmp.img_error = !0));
|
625
|
-
}, a.send();
|
626
|
-
} else {
|
627
|
-
let t = new Image;
|
628
|
-
t.addEventListener("load", function() {
|
629
|
-
i.tmp.img_obj = t, i.fn.vendors.checkBeforeDraw();
|
630
|
-
}), t.src = i.particles.shape.image.src;
|
631
|
-
} else console.log("Error pJS - No image.src"), i.tmp.img_error = !0;
|
632
|
-
}, i.fn.vendors.draw = function() {
|
633
|
-
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type ? i.tmp.count_svg >= i.particles.number.value ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : void 0 != i.tmp.img_obj ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame));
|
634
|
-
}, i.fn.vendors.checkBeforeDraw = function() {
|
635
|
-
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type && void 0 == i.tmp.source_svg ? i.tmp.checkAnimFrame = requestAnimFrame(check) : (cancelRequestAnimFrame(i.tmp.checkAnimFrame), i.tmp.img_error || (i.fn.vendors.init(), i.fn.vendors.draw())) : (i.fn.vendors.init(), i.fn.vendors.draw());
|
636
|
-
}, i.fn.vendors.init = function() {
|
637
|
-
i.fn.retinaInit(), i.fn.canvasInit(), i.fn.canvasSize(), i.fn.canvasPaint(), i.fn.particlesCreate(), i.fn.vendors.densityAutoParticles(), i.particles.line_linked.color_rgb_line = hexToRgb(i.particles.line_linked.color);
|
638
|
-
}, i.fn.vendors.start = function() {
|
639
|
-
isInArray("image", i.particles.shape.type) ? (i.tmp.img_type = i.particles.shape.image.src.substr(i.particles.shape.image.src.length - 3), i.fn.vendors.loadImg(i.tmp.img_type)) : i.fn.vendors.checkBeforeDraw();
|
640
|
-
}, i.fn.vendors.eventsListeners(), i.fn.vendors.start();
|
641
|
-
};
|
642
|
-
Object.deepExtend = function(e, a) {
|
643
|
-
for (let t in a) a[t] && a[t].constructor && a[t].constructor === Object ? (e[t] = e[t] || {}, arguments.callee(e[t], a[t])) : e[t] = a[t];
|
644
|
-
return e;
|
645
|
-
}, window.requestAnimFrame = function() {
|
646
|
-
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
|
647
|
-
window.setTimeout(e, 1e3 / 60);
|
648
|
-
};
|
649
|
-
}(), window.cancelRequestAnimFrame = function() {
|
650
|
-
return window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout;
|
651
|
-
}(), window.pJSDom = [], window.particlesJS = function(e, a) {
|
652
|
-
"string" != typeof e && (a = e, e = "particles-js"), e || (e = "particles-js");
|
653
|
-
let t = document.getElementById(e),
|
654
|
-
i = "particles-js-canvas-el",
|
655
|
-
s = t.getElementsByClassName(i);
|
656
|
-
if (s.length)
|
657
|
-
for (; s.length > 0;) t.removeChild(s[0]);
|
658
|
-
let n = document.createElement("canvas");
|
659
|
-
n.className = i, n.style.width = "100%", n.style.height = "100%";
|
660
|
-
let r = document.getElementById(e).appendChild(n);
|
661
|
-
null != r && pJSDom.push(new pJS(e, a));
|
662
|
-
}, window.particlesJS.load = function(e, a, t) {
|
663
|
-
let i = new XMLHttpRequest;
|
664
|
-
i.open("GET", a), i.onreadystatechange = function(a) {
|
665
|
-
if (4 == i.readyState)
|
666
|
-
if (200 == i.status) {
|
667
|
-
let s = JSON.parse(a.currentTarget.response);
|
668
|
-
window.particlesJS(e, s), t && t();
|
669
|
-
} else console.log("Error pJS - XMLHttpRequest status: " + i.status), console.log("Error pJS - File config not found");
|
670
|
-
}, i.send();
|
1
|
+
function hexToRgb(e) {
|
2
|
+
let a = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
3
|
+
e = e.replace(a, function(e, a, t, i) {
|
4
|
+
return a + a + t + t + i + i;
|
5
|
+
});
|
6
|
+
let t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
7
|
+
return t ? {
|
8
|
+
r: parseInt(t[1], 16),
|
9
|
+
g: parseInt(t[2], 16),
|
10
|
+
b: parseInt(t[3], 16)
|
11
|
+
} : null;
|
12
|
+
}
|
13
|
+
|
14
|
+
function clamp(e, a, t) {
|
15
|
+
return Math.min(Math.max(e, a), t);
|
16
|
+
}
|
17
|
+
|
18
|
+
function isInArray(e, a) {
|
19
|
+
return a.indexOf(e) > -1;
|
20
|
+
}
|
21
|
+
let pJS = function(e, a) {
|
22
|
+
let t = document.querySelector("#" + e + " > .particles-js-canvas-el");
|
23
|
+
this.pJS = {
|
24
|
+
canvas: {
|
25
|
+
el: t,
|
26
|
+
w: t.offsetWidth,
|
27
|
+
h: t.offsetHeight
|
28
|
+
},
|
29
|
+
particles: {
|
30
|
+
number: {
|
31
|
+
value: 50,
|
32
|
+
density: {
|
33
|
+
enable: !0,
|
34
|
+
value_area: 1000
|
35
|
+
}
|
36
|
+
},
|
37
|
+
color: {
|
38
|
+
value: "#fff"
|
39
|
+
},
|
40
|
+
shape: {
|
41
|
+
type: "image",
|
42
|
+
stroke: {
|
43
|
+
width: 5,
|
44
|
+
color: "#ff0000"
|
45
|
+
},
|
46
|
+
polygon: {
|
47
|
+
nb_sides: 5
|
48
|
+
},
|
49
|
+
image: {
|
50
|
+
src: "/assets/tema/img/m.png",
|
51
|
+
width: 87,
|
52
|
+
height: 98
|
53
|
+
}
|
54
|
+
},
|
55
|
+
opacity: {
|
56
|
+
value: 1,
|
57
|
+
random: !1,
|
58
|
+
anim: {
|
59
|
+
enable: !1,
|
60
|
+
speed: 2,
|
61
|
+
opacity_min: 0,
|
62
|
+
sync: !1
|
63
|
+
}
|
64
|
+
},
|
65
|
+
size: {
|
66
|
+
value: 20,
|
67
|
+
random: !1,
|
68
|
+
anim: {
|
69
|
+
enable: !1,
|
70
|
+
speed: 20,
|
71
|
+
size_min: 20,
|
72
|
+
sync: !1
|
73
|
+
}
|
74
|
+
},
|
75
|
+
line_linked: {
|
76
|
+
enable: !0,
|
77
|
+
distance: 100,
|
78
|
+
color: "#fff",
|
79
|
+
opacity: 1,
|
80
|
+
width: 1
|
81
|
+
},
|
82
|
+
move: {
|
83
|
+
enable: !0,
|
84
|
+
speed: 2,
|
85
|
+
direction: "none",
|
86
|
+
random: !1,
|
87
|
+
straight: !1,
|
88
|
+
out_mode: "out",
|
89
|
+
bounce: !1,
|
90
|
+
attract: {
|
91
|
+
enable: !1,
|
92
|
+
rotateX: 3e3,
|
93
|
+
rotateY: 3e3
|
94
|
+
}
|
95
|
+
},
|
96
|
+
array: []
|
97
|
+
},
|
98
|
+
interactivity: {
|
99
|
+
detect_on: "canvas",
|
100
|
+
events: {
|
101
|
+
onhover: {
|
102
|
+
enable: !0,
|
103
|
+
mode: "grab"
|
104
|
+
},
|
105
|
+
onclick: {
|
106
|
+
enable: !0,
|
107
|
+
mode: "push"
|
108
|
+
},
|
109
|
+
resize: !0
|
110
|
+
},
|
111
|
+
modes: {
|
112
|
+
grab: {
|
113
|
+
distance: 100,
|
114
|
+
line_linked: {
|
115
|
+
opacity: 1
|
116
|
+
}
|
117
|
+
},
|
118
|
+
bubble: {
|
119
|
+
distance: 200,
|
120
|
+
size: 80,
|
121
|
+
duration: .4
|
122
|
+
},
|
123
|
+
repulse: {
|
124
|
+
distance: 200,
|
125
|
+
duration: .4
|
126
|
+
},
|
127
|
+
push: {
|
128
|
+
particles_nb: 4
|
129
|
+
},
|
130
|
+
remove: {
|
131
|
+
particles_nb: 2
|
132
|
+
}
|
133
|
+
},
|
134
|
+
mouse: {}
|
135
|
+
},
|
136
|
+
retina_detect: !1,
|
137
|
+
fn: {
|
138
|
+
interact: {},
|
139
|
+
modes: {},
|
140
|
+
vendors: {}
|
141
|
+
},
|
142
|
+
tmp: {}
|
143
|
+
};
|
144
|
+
let i = this.pJS;
|
145
|
+
a && Object.deepExtend(i, a), i.tmp.obj = {
|
146
|
+
size_value: i.particles.size.value,
|
147
|
+
size_anim_speed: i.particles.size.anim.speed,
|
148
|
+
move_speed: i.particles.move.speed,
|
149
|
+
line_linked_distance: i.particles.line_linked.distance,
|
150
|
+
line_linked_width: i.particles.line_linked.width,
|
151
|
+
mode_grab_distance: i.interactivity.modes.grab.distance,
|
152
|
+
mode_bubble_distance: i.interactivity.modes.bubble.distance,
|
153
|
+
mode_bubble_size: i.interactivity.modes.bubble.size,
|
154
|
+
mode_repulse_distance: i.interactivity.modes.repulse.distance
|
155
|
+
}, i.fn.retinaInit = function() {
|
156
|
+
i.retina_detect && window.devicePixelRatio > 1 ? (i.canvas.pxratio = window.devicePixelRatio, i.tmp.retina = !0) : (i.canvas.pxratio = 1, i.tmp.retina = !1), i.canvas.w = i.canvas.el.offsetWidth * i.canvas.pxratio, i.canvas.h = i.canvas.el.offsetHeight * i.canvas.pxratio, i.particles.size.value = i.tmp.obj.size_value * i.canvas.pxratio, i.particles.size.anim.speed = i.tmp.obj.size_anim_speed * i.canvas.pxratio, i.particles.move.speed = i.tmp.obj.move_speed * i.canvas.pxratio, i.particles.line_linked.distance = i.tmp.obj.line_linked_distance * i.canvas.pxratio, i.interactivity.modes.grab.distance = i.tmp.obj.mode_grab_distance * i.canvas.pxratio, i.interactivity.modes.bubble.distance = i.tmp.obj.mode_bubble_distance * i.canvas.pxratio, i.particles.line_linked.width = i.tmp.obj.line_linked_width * i.canvas.pxratio, i.interactivity.modes.bubble.size = i.tmp.obj.mode_bubble_size * i.canvas.pxratio, i.interactivity.modes.repulse.distance = i.tmp.obj.mode_repulse_distance * i.canvas.pxratio;
|
157
|
+
}, i.fn.canvasInit = function() {
|
158
|
+
i.canvas.ctx = i.canvas.el.getContext("2d");
|
159
|
+
}, i.fn.canvasSize = function() {
|
160
|
+
i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i && i.interactivity.events.resize && window.addEventListener("resize", function() {
|
161
|
+
i.canvas.w = i.canvas.el.offsetWidth, i.canvas.h = i.canvas.el.offsetHeight, i.tmp.retina && (i.canvas.w *= i.canvas.pxratio, i.canvas.h *= i.canvas.pxratio), i.canvas.el.width = i.canvas.w, i.canvas.el.height = i.canvas.h, i.particles.move.enable || (i.fn.particlesEmpty(), i.fn.particlesCreate(), i.fn.particlesDraw(), i.fn.vendors.densityAutoParticles()), i.fn.vendors.densityAutoParticles();
|
162
|
+
});
|
163
|
+
}, i.fn.canvasPaint = function() {
|
164
|
+
i.canvas.ctx.fillRect(0, 0, i.canvas.w, i.canvas.h);
|
165
|
+
}, i.fn.canvasClear = function() {
|
166
|
+
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h);
|
167
|
+
}, i.fn.particle = function(e, a, t) {
|
168
|
+
if (this.radius = (i.particles.size.random ? Math.random() : 1) * i.particles.size.value, i.particles.size.anim.enable && (this.size_status = !1, this.vs = i.particles.size.anim.speed / 100, i.particles.size.anim.sync || (this.vs = this.vs * Math.random())), this.x = t ? t.x : Math.random() * i.canvas.w, this.y = t ? t.y : Math.random() * i.canvas.h, this.x > i.canvas.w - 2 * this.radius ? this.x = this.x - this.radius : this.x < 2 * this.radius && (this.x = this.x + this.radius), this.y > i.canvas.h - 2 * this.radius ? this.y = this.y - this.radius : this.y < 2 * this.radius && (this.y = this.y + this.radius), i.particles.move.bounce && i.fn.vendors.checkOverlap(this, t), this.color = {}, "object" == typeof e.value)
|
169
|
+
if (e.value instanceof Array) {
|
170
|
+
let s = e.value[Math.floor(Math.random() * i.particles.color.value.length)];
|
171
|
+
this.color.rgb = hexToRgb(s);
|
172
|
+
} else void 0 != e.value.r && void 0 != e.value.g && void 0 != e.value.b && (this.color.rgb = {
|
173
|
+
r: e.value.r,
|
174
|
+
g: e.value.g,
|
175
|
+
b: e.value.b
|
176
|
+
}), void 0 != e.value.h && void 0 != e.value.s && void 0 != e.value.l && (this.color.hsl = {
|
177
|
+
h: e.value.h,
|
178
|
+
s: e.value.s,
|
179
|
+
l: e.value.l
|
180
|
+
});
|
181
|
+
else "random" == e.value ? this.color.rgb = {
|
182
|
+
r: Math.floor(256 * Math.random()) + 0,
|
183
|
+
g: Math.floor(256 * Math.random()) + 0,
|
184
|
+
b: Math.floor(256 * Math.random()) + 0
|
185
|
+
} : "string" == typeof e.value && (this.color = e, this.color.rgb = hexToRgb(this.color.value));
|
186
|
+
this.opacity = (i.particles.opacity.random ? Math.random() : 1) * i.particles.opacity.value, i.particles.opacity.anim.enable && (this.opacity_status = !1, this.vo = i.particles.opacity.anim.speed / 100, i.particles.opacity.anim.sync || (this.vo = this.vo * Math.random()));
|
187
|
+
let n = {};
|
188
|
+
switch (i.particles.move.direction) {
|
189
|
+
case "top":
|
190
|
+
n = {
|
191
|
+
x: 0,
|
192
|
+
y: -1
|
193
|
+
};
|
194
|
+
break;
|
195
|
+
case "top-right":
|
196
|
+
n = {
|
197
|
+
x: .5,
|
198
|
+
y: -.5
|
199
|
+
};
|
200
|
+
break;
|
201
|
+
case "right":
|
202
|
+
n = {
|
203
|
+
x: 1,
|
204
|
+
y: -0
|
205
|
+
};
|
206
|
+
break;
|
207
|
+
case "bottom-right":
|
208
|
+
n = {
|
209
|
+
x: .5,
|
210
|
+
y: .5
|
211
|
+
};
|
212
|
+
break;
|
213
|
+
case "bottom":
|
214
|
+
n = {
|
215
|
+
x: 0,
|
216
|
+
y: 1
|
217
|
+
};
|
218
|
+
break;
|
219
|
+
case "bottom-left":
|
220
|
+
n = {
|
221
|
+
x: -.5,
|
222
|
+
y: 1
|
223
|
+
};
|
224
|
+
break;
|
225
|
+
case "left":
|
226
|
+
n = {
|
227
|
+
x: -1,
|
228
|
+
y: 0
|
229
|
+
};
|
230
|
+
break;
|
231
|
+
case "top-left":
|
232
|
+
n = {
|
233
|
+
x: -.5,
|
234
|
+
y: -.5
|
235
|
+
};
|
236
|
+
break;
|
237
|
+
default:
|
238
|
+
n = {
|
239
|
+
x: 0,
|
240
|
+
y: 0
|
241
|
+
};
|
242
|
+
}
|
243
|
+
i.particles.move.straight ? (this.vx = n.x, this.vy = n.y, i.particles.move.random && (this.vx = this.vx * Math.random(), this.vy = this.vy * Math.random())) : (this.vx = n.x + Math.random() - .5, this.vy = n.y + Math.random() - .5), this.vx_i = this.vx, this.vy_i = this.vy;
|
244
|
+
let r = i.particles.shape.type;
|
245
|
+
if ("object" == typeof r) {
|
246
|
+
if (r instanceof Array) {
|
247
|
+
let c = r[Math.floor(Math.random() * r.length)];
|
248
|
+
this.shape = c;
|
249
|
+
}
|
250
|
+
} else this.shape = r;
|
251
|
+
|
252
|
+
let substring = this.shape.substring(0, 5);
|
253
|
+
if ("image" == substring) {
|
254
|
+
let o = i.particles.shape;
|
255
|
+
this.img = {
|
256
|
+
src: o.image.src,
|
257
|
+
ratio: o.image.width / o.image.height
|
258
|
+
}, this.img.ratio || (this.img.ratio = 1), "svg" == i.tmp.img_type && void 0 != i.tmp.source_svg && (i.fn.vendors.createSvgImg(this), i.tmp.pushing && (this.img.loaded = !1));
|
259
|
+
}
|
260
|
+
}, i.fn.particle.prototype.draw = function() {
|
261
|
+
function e() {
|
262
|
+
i.canvas.ctx.drawImage(r, a.x - t, a.y - t, 2 * t, 2 * t / a.img.ratio);
|
263
|
+
}
|
264
|
+
var a = this;
|
265
|
+
if (void 0 != a.radius_bubble) var t = a.radius_bubble;
|
266
|
+
else var t = a.radius;
|
267
|
+
if (void 0 != a.opacity_bubble) var s = a.opacity_bubble;
|
268
|
+
else var s = a.opacity;
|
269
|
+
if (a.color.rgb) var n = "rgba(" + a.color.rgb.r + "," + a.color.rgb.g + "," + a.color.rgb.b + "," + s + ")";
|
270
|
+
else var n = "hsla(" + a.color.hsl.h + "," + a.color.hsl.s + "%," + a.color.hsl.l + "%," + s + ")";
|
271
|
+
switch (i.canvas.ctx.fillStyle = n, i.canvas.ctx.beginPath(), a.shape) {
|
272
|
+
case "circle":
|
273
|
+
i.canvas.ctx.arc(a.x, a.y, t, 0, 2 * Math.PI, !1);
|
274
|
+
break;
|
275
|
+
case "edge":
|
276
|
+
i.canvas.ctx.rect(a.x - t, a.y - t, 2 * t, 2 * t);
|
277
|
+
break;
|
278
|
+
case "triangle":
|
279
|
+
i.fn.vendors.drawShape(i.canvas.ctx, a.x - t, a.y + t / 1.66, 2 * t, 3, 2);
|
280
|
+
break;
|
281
|
+
case "polygon":
|
282
|
+
i.fn.vendors.drawShape(i.canvas.ctx, a.x - t / (i.particles.shape.polygon.nb_sides / 3.5), a.y - t / .76, 2.66 * t / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 1);
|
283
|
+
break;
|
284
|
+
case "star":
|
285
|
+
i.fn.vendors.drawShape(i.canvas.ctx, a.x - 2 * t / (i.particles.shape.polygon.nb_sides / 4), a.y - t / 1.52, 2 * t * 2.66 / (i.particles.shape.polygon.nb_sides / 3), i.particles.shape.polygon.nb_sides, 2);
|
286
|
+
break;
|
287
|
+
case "image":
|
288
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
289
|
+
else var r = i.tmp.img_obj;
|
290
|
+
r && e();
|
291
|
+
break;
|
292
|
+
case "image2":
|
293
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
294
|
+
else var r = i.tmp.img_obj;
|
295
|
+
var element = document.createElement('img');
|
296
|
+
element.src = 'assets/img/tema/m.png';
|
297
|
+
r = element;
|
298
|
+
r && e();
|
299
|
+
break;
|
300
|
+
case "image3":
|
301
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
302
|
+
else var r = i.tmp.img_obj;
|
303
|
+
var element = document.createElement('img');
|
304
|
+
element.src = '/assets/img/tema/o.png';
|
305
|
+
r = element;
|
306
|
+
r && e();
|
307
|
+
break;
|
308
|
+
case "image4":
|
309
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
310
|
+
else var r = i.tmp.img_obj;
|
311
|
+
var element = document.createElement('img');
|
312
|
+
element.src = '/assets/img/tema/r.png';
|
313
|
+
r = element;
|
314
|
+
r && e();
|
315
|
+
break;
|
316
|
+
case "image5":
|
317
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
318
|
+
else var r = i.tmp.img_obj;
|
319
|
+
var element = document.createElement('img');
|
320
|
+
element.src = '/assets/img/tema/e.png';
|
321
|
+
r = element;
|
322
|
+
r && e();
|
323
|
+
break;
|
324
|
+
case "image6":
|
325
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
326
|
+
else var r = i.tmp.img_obj;
|
327
|
+
var element = document.createElement('img');
|
328
|
+
element.src = '/assets/img/tema/l.png';
|
329
|
+
r = element;
|
330
|
+
r && e();
|
331
|
+
break;
|
332
|
+
case "image7":
|
333
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
334
|
+
else var r = i.tmp.img_obj;
|
335
|
+
var element = document.createElement('img');
|
336
|
+
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex7a.png';
|
337
|
+
r = element;
|
338
|
+
r && e();
|
339
|
+
break;
|
340
|
+
case "image8":
|
341
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
342
|
+
else var r = i.tmp.img_obj;
|
343
|
+
var element = document.createElement('img');
|
344
|
+
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex8a.png';
|
345
|
+
r = element;
|
346
|
+
r && e();
|
347
|
+
break;
|
348
|
+
case "image9":
|
349
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
350
|
+
else var r = i.tmp.img_obj;
|
351
|
+
var element = document.createElement('img');
|
352
|
+
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex9a.png';
|
353
|
+
r = element;
|
354
|
+
r && e();
|
355
|
+
break;
|
356
|
+
case "image10":
|
357
|
+
if ("svg" == i.tmp.img_type) var r = a.img.obj;
|
358
|
+
else var r = i.tmp.img_obj;
|
359
|
+
var element = document.createElement('img');
|
360
|
+
element.src = 'https://d35408cyocioye.cloudfront.net/legacy/hex10a.png';
|
361
|
+
r = element;
|
362
|
+
r && e();
|
363
|
+
}
|
364
|
+
i.canvas.ctx.closePath(), i.particles.shape.stroke.width > 0 && (i.canvas.ctx.strokeStyle = i.particles.shape.stroke.color, i.canvas.ctx.lineWidth = i.particles.shape.stroke.width, i.canvas.ctx.stroke()), i.canvas.ctx.fill();
|
365
|
+
}, i.fn.particlesCreate = function() {
|
366
|
+
for (let e = 0; e < i.particles.number.value; e++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value));
|
367
|
+
}, i.fn.particlesUpdate = function() {
|
368
|
+
for (let e = 0; e < i.particles.array.length; e++) {
|
369
|
+
let a = i.particles.array[e];
|
370
|
+
if (i.particles.move.enable) {
|
371
|
+
let t = i.particles.move.speed / 2;
|
372
|
+
a.x += a.vx * t, a.y += a.vy * t;
|
373
|
+
}
|
374
|
+
if (i.particles.opacity.anim.enable && (1 == a.opacity_status ? (a.opacity >= i.particles.opacity.value && (a.opacity_status = !1), a.opacity += a.vo) : (a.opacity <= i.particles.opacity.anim.opacity_min && (a.opacity_status = !0), a.opacity -= a.vo), a.opacity < 0 && (a.opacity = 0)), i.particles.size.anim.enable && (1 == a.size_status ? (a.radius >= i.particles.size.value && (a.size_status = !1), a.radius += a.vs) : (a.radius <= i.particles.size.anim.size_min && (a.size_status = !0), a.radius -= a.vs), a.radius < 0 && (a.radius = 0)), "bounce" == i.particles.move.out_mode) var s = {
|
375
|
+
x_left: a.radius,
|
376
|
+
x_right: i.canvas.w,
|
377
|
+
y_top: a.radius,
|
378
|
+
y_bottom: i.canvas.h
|
379
|
+
};
|
380
|
+
else var s = {
|
381
|
+
x_left: -a.radius,
|
382
|
+
x_right: i.canvas.w + a.radius,
|
383
|
+
y_top: -a.radius,
|
384
|
+
y_bottom: i.canvas.h + a.radius
|
385
|
+
};
|
386
|
+
switch (a.x - a.radius > i.canvas.w ? (a.x = s.x_left, a.y = Math.random() * i.canvas.h) : a.x + a.radius < 0 && (a.x = s.x_right, a.y = Math.random() * i.canvas.h), a.y - a.radius > i.canvas.h ? (a.y = s.y_top, a.x = Math.random() * i.canvas.w) : a.y + a.radius < 0 && (a.y = s.y_bottom, a.x = Math.random() * i.canvas.w), i.particles.move.out_mode) {
|
387
|
+
case "bounce":
|
388
|
+
a.x + a.radius > i.canvas.w ? a.vx = -a.vx : a.x - a.radius < 0 && (a.vx = -a.vx), a.y + a.radius > i.canvas.h ? a.vy = -a.vy : a.y - a.radius < 0 && (a.vy = -a.vy);
|
389
|
+
}
|
390
|
+
if (isInArray("grab", i.interactivity.events.onhover.mode) && i.fn.modes.grabParticle(a), (isInArray("bubble", i.interactivity.events.onhover.mode) || isInArray("bubble", i.interactivity.events.onclick.mode)) && i.fn.modes.bubbleParticle(a), (isInArray("repulse", i.interactivity.events.onhover.mode) || isInArray("repulse", i.interactivity.events.onclick.mode)) && i.fn.modes.repulseParticle(a), i.particles.line_linked.enable || i.particles.move.attract.enable)
|
391
|
+
for (let n = e + 1; n < i.particles.array.length; n++) {
|
392
|
+
let r = i.particles.array[n];
|
393
|
+
i.particles.line_linked.enable && i.fn.interact.linkParticles(a, r), i.particles.move.attract.enable && i.fn.interact.attractParticles(a, r), i.particles.move.bounce && i.fn.interact.bounceParticles(a, r);
|
394
|
+
}
|
395
|
+
}
|
396
|
+
}, i.fn.particlesDraw = function() {
|
397
|
+
i.canvas.ctx.clearRect(0, 0, i.canvas.w, i.canvas.h), i.fn.particlesUpdate();
|
398
|
+
for (let e = 0; e < i.particles.array.length; e++) {
|
399
|
+
let a = i.particles.array[e];
|
400
|
+
a.draw();
|
401
|
+
}
|
402
|
+
}, i.fn.particlesEmpty = function() {
|
403
|
+
i.particles.array = [];
|
404
|
+
}, i.fn.particlesRefresh = function() {
|
405
|
+
cancelRequestAnimFrame(i.fn.checkAnimFrame), cancelRequestAnimFrame(i.fn.drawAnimFrame), i.tmp.source_svg = void 0, i.tmp.img_obj = void 0, i.tmp.count_svg = 0, i.fn.particlesEmpty(), i.fn.canvasClear(), i.fn.vendors.start();
|
406
|
+
}, i.fn.interact.linkParticles = function(e, a) {
|
407
|
+
let t = e.x - a.x,
|
408
|
+
s = e.y - a.y,
|
409
|
+
n = Math.sqrt(t * t + s * s);
|
410
|
+
if (n <= i.particles.line_linked.distance) {
|
411
|
+
let r = i.particles.line_linked.opacity - n / (1 / i.particles.line_linked.opacity) / i.particles.line_linked.distance;
|
412
|
+
if (r > 0) {
|
413
|
+
let c = i.particles.line_linked.color_rgb_line;
|
414
|
+
i.canvas.ctx.strokeStyle = "rgba(" + c.r + "," + c.g + "," + c.b + "," + r + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(a.x, a.y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath();
|
415
|
+
}
|
416
|
+
}
|
417
|
+
}, i.fn.interact.attractParticles = function(e, a) {
|
418
|
+
let t = e.x - a.x,
|
419
|
+
s = e.y - a.y,
|
420
|
+
n = Math.sqrt(t * t + s * s);
|
421
|
+
if (n <= i.particles.line_linked.distance) {
|
422
|
+
let r = t / (1e3 * i.particles.move.attract.rotateX),
|
423
|
+
c = s / (1e3 * i.particles.move.attract.rotateY);
|
424
|
+
e.vx -= r, e.vy -= c, a.vx += r, a.vy += c;
|
425
|
+
}
|
426
|
+
}, i.fn.interact.bounceParticles = function(e, a) {
|
427
|
+
let t = e.x - a.x,
|
428
|
+
i = e.y - a.y,
|
429
|
+
s = Math.sqrt(t * t + i * i),
|
430
|
+
n = e.radius + a.radius;
|
431
|
+
n >= s && (e.vx = -e.vx, e.vy = -e.vy, a.vx = -a.vx, a.vy = -a.vy);
|
432
|
+
}, i.fn.modes.pushParticles = function(e, a) {
|
433
|
+
i.tmp.pushing = !0;
|
434
|
+
for (let t = 0; e > t; t++) i.particles.array.push(new i.fn.particle(i.particles.color, i.particles.opacity.value, {
|
435
|
+
x: a ? a.pos_x : Math.random() * i.canvas.w,
|
436
|
+
y: a ? a.pos_y : Math.random() * i.canvas.h
|
437
|
+
})), t == e - 1 && (i.particles.move.enable || i.fn.particlesDraw(), i.tmp.pushing = !1);
|
438
|
+
}, i.fn.modes.removeParticles = function(e) {
|
439
|
+
i.particles.array.splice(0, e), i.particles.move.enable || i.fn.particlesDraw();
|
440
|
+
}, i.fn.modes.bubbleParticle = function(e) {
|
441
|
+
function a() {
|
442
|
+
e.opacity_bubble = e.opacity, e.radius_bubble = e.radius;
|
443
|
+
}
|
444
|
+
|
445
|
+
function t(a, t, s, n, c) {
|
446
|
+
if (a != t)
|
447
|
+
if (i.tmp.bubble_duration_end) {
|
448
|
+
if (void 0 != s) {
|
449
|
+
let o = n - p * (n - a) / i.interactivity.modes.bubble.duration,
|
450
|
+
l = a - o;
|
451
|
+
d = a + l, "size" == c && (e.radius_bubble = d), "opacity" == c && (e.opacity_bubble = d);
|
452
|
+
}
|
453
|
+
} else if (r <= i.interactivity.modes.bubble.distance) {
|
454
|
+
if (void 0 != s) var v = s;
|
455
|
+
else var v = n;
|
456
|
+
if (v != a) {
|
457
|
+
var d = n - p * (n - a) / i.interactivity.modes.bubble.duration;
|
458
|
+
"size" == c && (e.radius_bubble = d), "opacity" == c && (e.opacity_bubble = d);
|
459
|
+
}
|
460
|
+
} else "size" == c && (e.radius_bubble = void 0), "opacity" == c && (e.opacity_bubble = void 0);
|
461
|
+
}
|
462
|
+
if (i.interactivity.events.onhover.enable && isInArray("bubble", i.interactivity.events.onhover.mode)) {
|
463
|
+
var s = e.x - i.interactivity.mouse.pos_x,
|
464
|
+
n = e.y - i.interactivity.mouse.pos_y,
|
465
|
+
r = Math.sqrt(s * s + n * n),
|
466
|
+
c = 1 - r / i.interactivity.modes.bubble.distance;
|
467
|
+
if (r <= i.interactivity.modes.bubble.distance) {
|
468
|
+
if (c >= 0 && "mousemove" == i.interactivity.status) {
|
469
|
+
if (i.interactivity.modes.bubble.size != i.particles.size.value)
|
470
|
+
if (i.interactivity.modes.bubble.size > i.particles.size.value) {
|
471
|
+
var o = e.radius + i.interactivity.modes.bubble.size * c;
|
472
|
+
o >= 0 && (e.radius_bubble = o);
|
473
|
+
} else {
|
474
|
+
var l = e.radius - i.interactivity.modes.bubble.size,
|
475
|
+
o = e.radius - l * c;
|
476
|
+
o > 0 ? e.radius_bubble = o : e.radius_bubble = 0;
|
477
|
+
}
|
478
|
+
if (i.interactivity.modes.bubble.opacity != i.particles.opacity.value)
|
479
|
+
if (i.interactivity.modes.bubble.opacity > i.particles.opacity.value) {
|
480
|
+
var v = i.interactivity.modes.bubble.opacity * c;
|
481
|
+
v > e.opacity && v <= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = v);
|
482
|
+
} else {
|
483
|
+
var v = e.opacity - (i.particles.opacity.value - i.interactivity.modes.bubble.opacity) * c;
|
484
|
+
v < e.opacity && v >= i.interactivity.modes.bubble.opacity && (e.opacity_bubble = v);
|
485
|
+
}
|
486
|
+
}
|
487
|
+
} else a();
|
488
|
+
"mouseleave" == i.interactivity.status && a();
|
489
|
+
} else if (i.interactivity.events.onclick.enable && isInArray("bubble", i.interactivity.events.onclick.mode)) {
|
490
|
+
if (i.tmp.bubble_clicking) {
|
491
|
+
var s = e.x - i.interactivity.mouse.click_pos_x,
|
492
|
+
n = e.y - i.interactivity.mouse.click_pos_y,
|
493
|
+
r = Math.sqrt(s * s + n * n),
|
494
|
+
p = ((new Date).getTime() - i.interactivity.mouse.click_time) / 1e3;
|
495
|
+
p > i.interactivity.modes.bubble.duration && (i.tmp.bubble_duration_end = !0), p > 2 * i.interactivity.modes.bubble.duration && (i.tmp.bubble_clicking = !1, i.tmp.bubble_duration_end = !1);
|
496
|
+
}
|
497
|
+
i.tmp.bubble_clicking && (t(i.interactivity.modes.bubble.size, i.particles.size.value, e.radius_bubble, e.radius, "size"), t(i.interactivity.modes.bubble.opacity, i.particles.opacity.value, e.opacity_bubble, e.opacity, "opacity"));
|
498
|
+
}
|
499
|
+
}, i.fn.modes.repulseParticle = function(e) {
|
500
|
+
function a() {
|
501
|
+
let a = Math.atan2(d, p);
|
502
|
+
if (e.vx = u * Math.cos(a), e.vy = u * Math.sin(a), "bounce" == i.particles.move.out_mode) {
|
503
|
+
let t = {
|
504
|
+
x: e.x + e.vx,
|
505
|
+
y: e.y + e.vy
|
506
|
+
};
|
507
|
+
t.x + e.radius > i.canvas.w ? e.vx = -e.vx : t.x - e.radius < 0 && (e.vx = -e.vx), t.y + e.radius > i.canvas.h ? e.vy = -e.vy : t.y - e.radius < 0 && (e.vy = -e.vy);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
if (i.interactivity.events.onhover.enable && isInArray("repulse", i.interactivity.events.onhover.mode) && "mousemove" == i.interactivity.status) {
|
511
|
+
var t = e.x - i.interactivity.mouse.pos_x,
|
512
|
+
s = e.y - i.interactivity.mouse.pos_y,
|
513
|
+
n = Math.sqrt(t * t + s * s),
|
514
|
+
r = {
|
515
|
+
x: t / n,
|
516
|
+
y: s / n
|
517
|
+
},
|
518
|
+
c = i.interactivity.modes.repulse.distance,
|
519
|
+
o = 100,
|
520
|
+
l = clamp(1 / c * (-1 * Math.pow(n / c, 2) + 1) * c * o, 0, 50),
|
521
|
+
v = {
|
522
|
+
x: e.x + r.x * l,
|
523
|
+
y: e.y + r.y * l
|
524
|
+
};
|
525
|
+
"bounce" == i.particles.move.out_mode ? (v.x - e.radius > 0 && v.x + e.radius < i.canvas.w && (e.x = v.x), v.y - e.radius > 0 && v.y + e.radius < i.canvas.h && (e.y = v.y)) : (e.x = v.x, e.y = v.y);
|
526
|
+
} else if (i.interactivity.events.onclick.enable && isInArray("repulse", i.interactivity.events.onclick.mode))
|
527
|
+
if (i.tmp.repulse_finish || (i.tmp.repulse_count++, i.tmp.repulse_count == i.particles.array.length && (i.tmp.repulse_finish = !0)), i.tmp.repulse_clicking) {
|
528
|
+
var c = Math.pow(i.interactivity.modes.repulse.distance / 6, 3),
|
529
|
+
p = i.interactivity.mouse.click_pos_x - e.x,
|
530
|
+
d = i.interactivity.mouse.click_pos_y - e.y,
|
531
|
+
m = p * p + d * d,
|
532
|
+
u = -c / m * 1;
|
533
|
+
c >= m && a();
|
534
|
+
} else 0 == i.tmp.repulse_clicking && (e.vx = e.vx_i, e.vy = e.vy_i);
|
535
|
+
}, i.fn.modes.grabParticle = function(e) {
|
536
|
+
if (i.interactivity.events.onhover.enable && "mousemove" == i.interactivity.status) {
|
537
|
+
let a = e.x - i.interactivity.mouse.pos_x,
|
538
|
+
t = e.y - i.interactivity.mouse.pos_y,
|
539
|
+
s = Math.sqrt(a * a + t * t);
|
540
|
+
if (s <= i.interactivity.modes.grab.distance) {
|
541
|
+
let n = i.interactivity.modes.grab.line_linked.opacity - s / (1 / i.interactivity.modes.grab.line_linked.opacity) / i.interactivity.modes.grab.distance;
|
542
|
+
if (n > 0) {
|
543
|
+
let r = i.particles.line_linked.color_rgb_line;
|
544
|
+
i.canvas.ctx.strokeStyle = "rgba(" + r.r + "," + r.g + "," + r.b + "," + n + ")", i.canvas.ctx.lineWidth = i.particles.line_linked.width, i.canvas.ctx.beginPath(), i.canvas.ctx.moveTo(e.x, e.y), i.canvas.ctx.lineTo(i.interactivity.mouse.pos_x, i.interactivity.mouse.pos_y), i.canvas.ctx.stroke(), i.canvas.ctx.closePath();
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
}, i.fn.vendors.eventsListeners = function() {
|
549
|
+
"window" == i.interactivity.detect_on ? i.interactivity.el = window : i.interactivity.el = i.canvas.el, (i.interactivity.events.onhover.enable || i.interactivity.events.onclick.enable) && (i.interactivity.el.addEventListener("mousemove", function(e) {
|
550
|
+
if (i.interactivity.el == window) var a = e.clientX,
|
551
|
+
t = e.clientY;
|
552
|
+
else var a = e.offsetX || e.clientX,
|
553
|
+
t = e.offsetY || e.clientY;
|
554
|
+
i.interactivity.mouse.pos_x = a, i.interactivity.mouse.pos_y = t, i.tmp.retina && (i.interactivity.mouse.pos_x *= i.canvas.pxratio, i.interactivity.mouse.pos_y *= i.canvas.pxratio), i.interactivity.status = "mousemove";
|
555
|
+
}), i.interactivity.el.addEventListener("mouseleave", function(e) {
|
556
|
+
i.interactivity.mouse.pos_x = null, i.interactivity.mouse.pos_y = null, i.interactivity.status = "mouseleave";
|
557
|
+
})), i.interactivity.events.onclick.enable && i.interactivity.el.addEventListener("click", function() {
|
558
|
+
if (i.interactivity.mouse.click_pos_x = i.interactivity.mouse.pos_x, i.interactivity.mouse.click_pos_y = i.interactivity.mouse.pos_y, i.interactivity.mouse.click_time = (new Date).getTime(), i.interactivity.events.onclick.enable) switch (i.interactivity.events.onclick.mode) {
|
559
|
+
case "push":
|
560
|
+
i.particles.move.enable ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : 1 == i.interactivity.modes.push.particles_nb ? i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb, i.interactivity.mouse) : i.interactivity.modes.push.particles_nb > 1 && i.fn.modes.pushParticles(i.interactivity.modes.push.particles_nb);
|
561
|
+
break;
|
562
|
+
case "remove":
|
563
|
+
i.fn.modes.removeParticles(i.interactivity.modes.remove.particles_nb);
|
564
|
+
break;
|
565
|
+
case "bubble":
|
566
|
+
i.tmp.bubble_clicking = !0;
|
567
|
+
break;
|
568
|
+
case "repulse":
|
569
|
+
i.tmp.repulse_clicking = !0, i.tmp.repulse_count = 0, i.tmp.repulse_finish = !1, setTimeout(function() {
|
570
|
+
i.tmp.repulse_clicking = !1;
|
571
|
+
}, 1e3 * i.interactivity.modes.repulse.duration);
|
572
|
+
}
|
573
|
+
});
|
574
|
+
}, i.fn.vendors.densityAutoParticles = function() {
|
575
|
+
if (i.particles.number.density.enable) {
|
576
|
+
let e = i.canvas.el.width * i.canvas.el.height / 1e3;
|
577
|
+
i.tmp.retina && (e /= 2 * i.canvas.pxratio);
|
578
|
+
let a = e * i.particles.number.value / i.particles.number.density.value_area,
|
579
|
+
t = i.particles.array.length - a;
|
580
|
+
0 > t ? i.fn.modes.pushParticles(Math.abs(t)) : i.fn.modes.removeParticles(t);
|
581
|
+
}
|
582
|
+
}, i.fn.vendors.checkOverlap = function(e, a) {
|
583
|
+
for (let t = 0; t < i.particles.array.length; t++) {
|
584
|
+
let s = i.particles.array[t],
|
585
|
+
n = e.x - s.x,
|
586
|
+
r = e.y - s.y,
|
587
|
+
c = Math.sqrt(n * n + r * r);
|
588
|
+
c <= e.radius + s.radius && (e.x = a ? a.x : Math.random() * i.canvas.w, e.y = a ? a.y : Math.random() * i.canvas.h, i.fn.vendors.checkOverlap(e));
|
589
|
+
}
|
590
|
+
}, i.fn.vendors.createSvgImg = function(e) {
|
591
|
+
let a = i.tmp.source_svg,
|
592
|
+
t = /#([0-9A-F]{3,6})/gi,
|
593
|
+
s = a.replace(t, function(a, t, i, s) {
|
594
|
+
if (e.color.rgb) var n = "rgba(" + e.color.rgb.r + "," + e.color.rgb.g + "," + e.color.rgb.b + "," + e.opacity + ")";
|
595
|
+
else var n = "hsla(" + e.color.hsl.h + "," + e.color.hsl.s + "%," + e.color.hsl.l + "%," + e.opacity + ")";
|
596
|
+
return n;
|
597
|
+
}),
|
598
|
+
n = new Blob([s], {
|
599
|
+
type: "image/svg+xml;charset=utf-8"
|
600
|
+
}),
|
601
|
+
r = window.URL || window.webkitURL || window,
|
602
|
+
c = r.createObjectURL(n),
|
603
|
+
o = new Image;
|
604
|
+
o.addEventListener("load", function() {
|
605
|
+
e.img.obj = o, e.img.loaded = !0, r.revokeObjectURL(c), i.tmp.count_svg++;
|
606
|
+
}), o.src = c;
|
607
|
+
}, i.fn.vendors.destroypJS = function() {
|
608
|
+
cancelAnimationFrame(i.fn.drawAnimFrame), t.remove(), pJSDom = null;
|
609
|
+
}, i.fn.vendors.drawShape = function(e, a, t, i, s, n) {
|
610
|
+
let r = s * n,
|
611
|
+
c = s / n,
|
612
|
+
o = 180 * (c - 2) / c,
|
613
|
+
l = Math.PI - Math.PI * o / 180;
|
614
|
+
e.save(), e.beginPath(), e.translate(a, t), e.moveTo(0, 0);
|
615
|
+
for (let v = 0; r > v; v++) e.lineTo(i, 0), e.translate(i, 0), e.rotate(l);
|
616
|
+
e.fill(), e.restore();
|
617
|
+
}, i.fn.vendors.exportImg = function() {
|
618
|
+
window.open(i.canvas.el.toDataURL("image/png"), "_blank");
|
619
|
+
}, i.fn.vendors.loadImg = function(e) {
|
620
|
+
if (i.tmp.img_error = void 0, "" != i.particles.shape.image.src)
|
621
|
+
if ("svg" == e) {
|
622
|
+
let a = new XMLHttpRequest;
|
623
|
+
a.open("GET", i.particles.shape.image.src), a.onreadystatechange = function(e) {
|
624
|
+
4 == a.readyState && (200 == a.status ? (i.tmp.source_svg = e.currentTarget.response, i.fn.vendors.checkBeforeDraw()) : (console.log("Error pJS - Image not found"), i.tmp.img_error = !0));
|
625
|
+
}, a.send();
|
626
|
+
} else {
|
627
|
+
let t = new Image;
|
628
|
+
t.addEventListener("load", function() {
|
629
|
+
i.tmp.img_obj = t, i.fn.vendors.checkBeforeDraw();
|
630
|
+
}), t.src = i.particles.shape.image.src;
|
631
|
+
} else console.log("Error pJS - No image.src"), i.tmp.img_error = !0;
|
632
|
+
}, i.fn.vendors.draw = function() {
|
633
|
+
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type ? i.tmp.count_svg >= i.particles.number.value ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : void 0 != i.tmp.img_obj ? (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame)) : i.tmp.img_error || (i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw)) : (i.fn.particlesDraw(), i.particles.move.enable ? i.fn.drawAnimFrame = requestAnimFrame(i.fn.vendors.draw) : cancelRequestAnimFrame(i.fn.drawAnimFrame));
|
634
|
+
}, i.fn.vendors.checkBeforeDraw = function() {
|
635
|
+
"image" == i.particles.shape.type ? "svg" == i.tmp.img_type && void 0 == i.tmp.source_svg ? i.tmp.checkAnimFrame = requestAnimFrame(check) : (cancelRequestAnimFrame(i.tmp.checkAnimFrame), i.tmp.img_error || (i.fn.vendors.init(), i.fn.vendors.draw())) : (i.fn.vendors.init(), i.fn.vendors.draw());
|
636
|
+
}, i.fn.vendors.init = function() {
|
637
|
+
i.fn.retinaInit(), i.fn.canvasInit(), i.fn.canvasSize(), i.fn.canvasPaint(), i.fn.particlesCreate(), i.fn.vendors.densityAutoParticles(), i.particles.line_linked.color_rgb_line = hexToRgb(i.particles.line_linked.color);
|
638
|
+
}, i.fn.vendors.start = function() {
|
639
|
+
isInArray("image", i.particles.shape.type) ? (i.tmp.img_type = i.particles.shape.image.src.substr(i.particles.shape.image.src.length - 3), i.fn.vendors.loadImg(i.tmp.img_type)) : i.fn.vendors.checkBeforeDraw();
|
640
|
+
}, i.fn.vendors.eventsListeners(), i.fn.vendors.start();
|
641
|
+
};
|
642
|
+
Object.deepExtend = function(e, a) {
|
643
|
+
for (let t in a) a[t] && a[t].constructor && a[t].constructor === Object ? (e[t] = e[t] || {}, arguments.callee(e[t], a[t])) : e[t] = a[t];
|
644
|
+
return e;
|
645
|
+
}, window.requestAnimFrame = function() {
|
646
|
+
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
|
647
|
+
window.setTimeout(e, 1e3 / 60);
|
648
|
+
};
|
649
|
+
}(), window.cancelRequestAnimFrame = function() {
|
650
|
+
return window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout;
|
651
|
+
}(), window.pJSDom = [], window.particlesJS = function(e, a) {
|
652
|
+
"string" != typeof e && (a = e, e = "particles-js"), e || (e = "particles-js");
|
653
|
+
let t = document.getElementById(e),
|
654
|
+
i = "particles-js-canvas-el",
|
655
|
+
s = t.getElementsByClassName(i);
|
656
|
+
if (s.length)
|
657
|
+
for (; s.length > 0;) t.removeChild(s[0]);
|
658
|
+
let n = document.createElement("canvas");
|
659
|
+
n.className = i, n.style.width = "100%", n.style.height = "100%";
|
660
|
+
let r = document.getElementById(e).appendChild(n);
|
661
|
+
null != r && pJSDom.push(new pJS(e, a));
|
662
|
+
}, window.particlesJS.load = function(e, a, t) {
|
663
|
+
let i = new XMLHttpRequest;
|
664
|
+
i.open("GET", a), i.onreadystatechange = function(a) {
|
665
|
+
if (4 == i.readyState)
|
666
|
+
if (200 == i.status) {
|
667
|
+
let s = JSON.parse(a.currentTarget.response);
|
668
|
+
window.particlesJS(e, s), t && t();
|
669
|
+
} else console.log("Error pJS - XMLHttpRequest status: " + i.status), console.log("Error pJS - File config not found");
|
670
|
+
}, i.send();
|
671
671
|
};
|