├── LibraryEditLog.txt
├── .gitignore
├── lib
├── HTML-KickStart-master
│ ├── css
│ │ ├── img
│ │ │ ├── bx_loader.gif
│ │ │ ├── controls.png
│ │ │ ├── gray_jean.png
│ │ │ ├── breadcrumbs-bg.gif
│ │ │ ├── fancybox
│ │ │ │ ├── blank.gif
│ │ │ │ ├── fancybox.png
│ │ │ │ ├── fancybox-x.png
│ │ │ │ ├── fancybox-y.png
│ │ │ │ ├── fancy_close.png
│ │ │ │ ├── fancy_loading.png
│ │ │ │ ├── fancy_nav_left.png
│ │ │ │ ├── fancy_nav_right.png
│ │ │ │ ├── fancy_shadow_e.png
│ │ │ │ ├── fancy_shadow_n.png
│ │ │ │ ├── fancy_shadow_ne.png
│ │ │ │ ├── fancy_shadow_nw.png
│ │ │ │ ├── fancy_shadow_s.png
│ │ │ │ ├── fancy_shadow_se.png
│ │ │ │ ├── fancy_shadow_sw.png
│ │ │ │ ├── fancy_shadow_w.png
│ │ │ │ ├── fancy_title_left.png
│ │ │ │ ├── fancy_title_main.png
│ │ │ │ ├── fancy_title_over.png
│ │ │ │ ├── fancy_title_right.png
│ │ │ │ ├── jquery.mousewheel-3.0.4.pack.js
│ │ │ │ └── jquery.easing-1.3.pack.js
│ │ │ └── icon-arrow-right.png
│ │ ├── fonts
│ │ │ └── font-awesome-4.2.0
│ │ │ │ ├── fonts
│ │ │ │ ├── FontAwesome.otf
│ │ │ │ ├── fontawesome-webfont.eot
│ │ │ │ ├── fontawesome-webfont.ttf
│ │ │ │ └── fontawesome-webfont.woff
│ │ │ │ ├── less
│ │ │ │ ├── fixed-width.less
│ │ │ │ ├── bordered-pulled.less
│ │ │ │ ├── larger.less
│ │ │ │ ├── core.less
│ │ │ │ ├── list.less
│ │ │ │ ├── font-awesome.less
│ │ │ │ ├── stacked.less
│ │ │ │ ├── rotated-flipped.less
│ │ │ │ ├── spinning.less
│ │ │ │ ├── path.less
│ │ │ │ └── mixins.less
│ │ │ │ └── scss
│ │ │ │ ├── _fixed-width.scss
│ │ │ │ ├── _bordered-pulled.scss
│ │ │ │ ├── _larger.scss
│ │ │ │ ├── _core.scss
│ │ │ │ ├── _list.scss
│ │ │ │ ├── font-awesome.scss
│ │ │ │ ├── _stacked.scss
│ │ │ │ ├── _spinning.scss
│ │ │ │ ├── _path.scss
│ │ │ │ ├── _rotated-flipped.scss
│ │ │ │ └── _mixins.scss
│ │ ├── prettify.css
│ │ ├── tiptip.css
│ │ ├── kickstart-grid.css
│ │ ├── kickstart-slideshow.css
│ │ ├── kickstart-menus.css
│ │ └── kickstart-forms.css
│ ├── composer.json
│ ├── blank.html
│ ├── license.txt
│ ├── README.md
│ ├── style.css
│ └── example.html
├── SVGToCanvas.js
├── jsgif
│ ├── b64.js
│ ├── LICENSE
│ ├── animWorker.js
│ ├── anim.js
│ ├── LZWEncoder.js
│ └── README.md
├── jscolor
│ └── jscolor-example.html
├── ZIPWorker.js
├── custom.css
├── spawnWorkers.js
├── MainWorker.js
├── FrontEnd-Common.js
├── FileSaver.min.js
├── filer-util.js
└── canvg
│ └── rgbcolor.js
├── src
├── Structures.ts
├── PSquare.ts
├── PTriangle.ts
├── tsconfig.json
├── PCircle.ts
├── PStar.ts
├── PPopCircle.ts
├── PSimple.ts
├── Utils.ts
├── ParticleBase.ts
├── PopLineEffect.ts
├── PRibbon.ts
└── ParticlePreset1.ts
├── GulpFile.js
├── res
├── material
│ ├── Twitter-Like.svg
│ └── File.svg
├── Mode-other.svg
├── Mode-selecting.svg
└── File.svg
├── package.json
├── memo
├── LicenseForGeneratedImages.md
├── experiment
├── writeOutCanvas.html
├── writeOutAnimGif.html
├── writeOut.html
├── testV2.html
├── writeOutAnimGifV2-All.html
├── writeOutAnimGifV2.html
└── index_noWorker.html
├── readme.md
├── 10thAnniv-Spec.md
└── LICENSE
/LibraryEditLog.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | src/*.js
2 | node_modules/
3 | lib/LLEAG10th/
4 | *~
5 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/bx_loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/bx_loader.gif
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/controls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/controls.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/gray_jean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/gray_jean.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/breadcrumbs-bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/breadcrumbs-bg.gif
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/blank.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/blank.gif
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancybox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancybox.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/icon-arrow-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/icon-arrow-right.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancybox-x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancybox-x.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancybox-y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancybox-y.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_close.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_loading.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_nav_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_nav_left.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_nav_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_nav_right.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_e.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_n.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_n.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_ne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_ne.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_nw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_nw.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_s.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_se.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_se.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_sw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_sw.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_w.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_shadow_w.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_left.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_main.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_over.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_over.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/img/fancybox/fancy_title_right.png
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/fixed-width.less:
--------------------------------------------------------------------------------
1 | // Fixed Width Icons
2 | // -------------------------
3 | .@{fa-css-prefix}-fw {
4 | width: (18em / 14);
5 | text-align: center;
6 | }
7 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_fixed-width.scss:
--------------------------------------------------------------------------------
1 | // Fixed Width Icons
2 | // -------------------------
3 | .#{$fa-css-prefix}-fw {
4 | width: (18em / 14);
5 | text-align: center;
6 | }
7 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WL-Amigo/LikeLikeEffectGenerator/HEAD/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/src/Structures.ts:
--------------------------------------------------------------------------------
1 | namespace LLEAG {
2 | export interface RGB {
3 | r: number;
4 | g: number;
5 | b: number;
6 | }
7 |
8 | export interface Point {
9 | x: number;
10 | y: number;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/SVGToCanvas.js:
--------------------------------------------------------------------------------
1 | function generateCanvasFromSVG(svgSource, size){
2 |
3 | var ret = document.createElement('canvas');
4 | ret.width = size;
5 | ret.height = size;
6 |
7 | canvg(ret, svgSource, { useCORS : true });
8 |
9 | return ret;
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/GulpFile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var webserver = require('gulp-webserver');
3 |
4 | gulp.task('webserver', function() {
5 | gulp.src('./')
6 | .pipe(webserver({
7 | livereload: false,
8 | directoryListing: false,
9 | open: true
10 | }));
11 | });
12 |
13 | gulp.task("default", ["webserver"])
14 |
--------------------------------------------------------------------------------
/res/material/Twitter-Like.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "99lime/html-kickstart",
3 | "license": "MIT",
4 | "description": "Ultra–Lean HTML Building Blocks for Rapid Website Production",
5 | "minimum-stability": "dev",
6 | "authors": [
7 | {
8 | "name": "Joshua Gatcke",
9 | "email": "joshua@99lime.com"
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/bordered-pulled.less:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em @fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .pull-right { float: right; }
11 | .pull-left { float: left; }
12 |
13 | .@{fa-css-prefix} {
14 | &.pull-left { margin-right: .3em; }
15 | &.pull-right { margin-left: .3em; }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_bordered-pulled.scss:
--------------------------------------------------------------------------------
1 | // Bordered & Pulled
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-border {
5 | padding: .2em .25em .15em;
6 | border: solid .08em $fa-border-color;
7 | border-radius: .1em;
8 | }
9 |
10 | .pull-right { float: right; }
11 | .pull-left { float: left; }
12 |
13 | .#{$fa-css-prefix} {
14 | &.pull-left { margin-right: .3em; }
15 | &.pull-right { margin-left: .3em; }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/larger.less:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .@{fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .@{fa-css-prefix}-2x { font-size: 2em; }
11 | .@{fa-css-prefix}-3x { font-size: 3em; }
12 | .@{fa-css-prefix}-4x { font-size: 4em; }
13 | .@{fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_larger.scss:
--------------------------------------------------------------------------------
1 | // Icon Sizes
2 | // -------------------------
3 |
4 | /* makes the font 33% larger relative to the icon container */
5 | .#{$fa-css-prefix}-lg {
6 | font-size: (4em / 3);
7 | line-height: (3em / 4);
8 | vertical-align: -15%;
9 | }
10 | .#{$fa-css-prefix}-2x { font-size: 2em; }
11 | .#{$fa-css-prefix}-3x { font-size: 3em; }
12 | .#{$fa-css-prefix}-4x { font-size: 4em; }
13 | .#{$fa-css-prefix}-5x { font-size: 5em; }
14 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/core.less:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .@{fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/list.less:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: @fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .@{fa-css-prefix}-li {
11 | position: absolute;
12 | left: -@fa-li-width;
13 | width: @fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.@{fa-css-prefix}-lg {
17 | left: (-@fa-li-width + (4em / 14));
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_core.scss:
--------------------------------------------------------------------------------
1 | // Base Class Definition
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix} {
5 | display: inline-block;
6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_list.scss:
--------------------------------------------------------------------------------
1 | // List Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-ul {
5 | padding-left: 0;
6 | margin-left: $fa-li-width;
7 | list-style-type: none;
8 | > li { position: relative; }
9 | }
10 | .#{$fa-css-prefix}-li {
11 | position: absolute;
12 | left: -$fa-li-width;
13 | width: $fa-li-width;
14 | top: (2em / 14);
15 | text-align: center;
16 | &.#{$fa-css-prefix}-lg {
17 | left: -$fa-li-width + (4em / 14);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/font-awesome.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables";
7 | @import "mixins";
8 | @import "path";
9 | @import "core";
10 | @import "larger";
11 | @import "fixed-width";
12 | @import "list";
13 | @import "bordered-pulled";
14 | @import "spinning";
15 | @import "rotated-flipped";
16 | @import "stacked";
17 | @import "icons";
18 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/font-awesome.less:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
4 | */
5 |
6 | @import "variables.less";
7 | @import "mixins.less";
8 | @import "path.less";
9 | @import "core.less";
10 | @import "larger.less";
11 | @import "fixed-width.less";
12 | @import "list.less";
13 | @import "bordered-pulled.less";
14 | @import "spinning.less";
15 | @import "rotated-flipped.less";
16 | @import "stacked.less";
17 | @import "icons.less";
18 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/stacked.less:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; }
21 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_stacked.scss:
--------------------------------------------------------------------------------
1 | // Stacked Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-stack {
5 | position: relative;
6 | display: inline-block;
7 | width: 2em;
8 | height: 2em;
9 | line-height: 2em;
10 | vertical-align: middle;
11 | }
12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
13 | position: absolute;
14 | left: 0;
15 | width: 100%;
16 | text-align: center;
17 | }
18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; }
19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; }
20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; }
21 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
--------------------------------------------------------------------------------
/lib/jsgif/b64.js:
--------------------------------------------------------------------------------
1 | function encode64(input) {
2 | var output = "", i = 0, l = input.length,
3 | key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
4 | chr1, chr2, chr3, enc1, enc2, enc3, enc4;
5 | while (i < l) {
6 | chr1 = input.charCodeAt(i++);
7 | chr2 = input.charCodeAt(i++);
8 | chr3 = input.charCodeAt(i++);
9 | enc1 = chr1 >> 2;
10 | enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
11 | enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
12 | enc4 = chr3 & 63;
13 | if (isNaN(chr2)) enc3 = enc4 = 64;
14 | else if (isNaN(chr3)) enc4 = 64;
15 | output = output + key.charAt(enc1) + key.charAt(enc2) + key.charAt(enc3) + key.charAt(enc4);
16 | }
17 | return output;
18 | }
19 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "like-like-effect-generator",
3 | "version": "1.0.0",
4 | "description": "Twitter's Like-like effect animation GIF generator",
5 | "main": "null",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/WL-Amigo/LikeLikeEffectGenerator.git"
12 | },
13 | "author": "Amigo (WhiteLuckers)",
14 | "license": "MIT",
15 | "bugs": {
16 | "url": "https://github.com/WL-Amigo/LikeLikeEffectGenerator/issues"
17 | },
18 | "homepage": "https://github.com/WL-Amigo/LikeLikeEffectGenerator#readme",
19 | "devDependencies": {
20 | "gulp": "^3.9.1",
21 | "gulp-webserver": "^0.9.1"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/rotated-flipped.less:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
7 |
8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .@{fa-css-prefix}-rotate-90,
15 | :root .@{fa-css-prefix}-rotate-180,
16 | :root .@{fa-css-prefix}-rotate-270,
17 | :root .@{fa-css-prefix}-flip-horizontal,
18 | :root .@{fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/spinning.less:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .@{fa-css-prefix}-spin {
5 | -webkit-animation: fa-spin 2s infinite linear;
6 | animation: fa-spin 2s infinite linear;
7 | }
8 |
9 | @-webkit-keyframes fa-spin {
10 | 0% {
11 | -webkit-transform: rotate(0deg);
12 | transform: rotate(0deg);
13 | }
14 | 100% {
15 | -webkit-transform: rotate(359deg);
16 | transform: rotate(359deg);
17 | }
18 | }
19 |
20 | @keyframes fa-spin {
21 | 0% {
22 | -webkit-transform: rotate(0deg);
23 | transform: rotate(0deg);
24 | }
25 | 100% {
26 | -webkit-transform: rotate(359deg);
27 | transform: rotate(359deg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_spinning.scss:
--------------------------------------------------------------------------------
1 | // Spinning Icons
2 | // --------------------------
3 |
4 | .#{$fa-css-prefix}-spin {
5 | -webkit-animation: fa-spin 2s infinite linear;
6 | animation: fa-spin 2s infinite linear;
7 | }
8 |
9 | @-webkit-keyframes fa-spin {
10 | 0% {
11 | -webkit-transform: rotate(0deg);
12 | transform: rotate(0deg);
13 | }
14 | 100% {
15 | -webkit-transform: rotate(359deg);
16 | transform: rotate(359deg);
17 | }
18 | }
19 |
20 | @keyframes fa-spin {
21 | 0% {
22 | -webkit-transform: rotate(0deg);
23 | transform: rotate(0deg);
24 | }
25 | 100% {
26 | -webkit-transform: rotate(359deg);
27 | transform: rotate(359deg);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/path.less:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
8 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
9 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
10 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
12 | font-weight: normal;
13 | font-style: normal;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_path.scss:
--------------------------------------------------------------------------------
1 | /* FONT PATH
2 | * -------------------------- */
3 |
4 | @font-face {
5 | font-family: 'FontAwesome';
6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
8 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
12 | font-weight: normal;
13 | font-style: normal;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_rotated-flipped.scss:
--------------------------------------------------------------------------------
1 | // Rotated & Flipped Icons
2 | // -------------------------
3 |
4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
7 |
8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
10 |
11 | // Hook for IE8-9
12 | // -------------------------
13 |
14 | :root .#{$fa-css-prefix}-rotate-90,
15 | :root .#{$fa-css-prefix}-rotate-180,
16 | :root .#{$fa-css-prefix}-rotate-270,
17 | :root .#{$fa-css-prefix}-flip-horizontal,
18 | :root .#{$fa-css-prefix}-flip-vertical {
19 | filter: none;
20 | }
21 |
--------------------------------------------------------------------------------
/src/PSquare.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | namespace LLEAG {
5 |
6 | const PStarInnerRadiusRate = 0.55;
7 |
8 | export class PSquare extends PSimple {
9 |
10 | protected generateParticlePath(drawer: svgjs.Doc): svgjs.Path{
11 | let pathCommands = "";
12 | pathCommands += "M " + (-this.size).toString() + "," + (this.size).toString();
13 | pathCommands += " L " + (this.size).toString() + "," + (this.size).toString();
14 | pathCommands += " L " + (this.size).toString() + "," + (-this.size).toString();
15 | pathCommands += " L " + (-this.size).toString() + "," + (-this.size).toString() + " z";
16 | return drawer.path(pathCommands).fill(getHexColor(this.color));
17 | }
18 |
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/lib/jscolor/jscolor-example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | jscolor Example
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Example 1
15 | Color:
16 |
17 |
18 |
19 | Example 2
20 |
21 |
24 |
25 | HEX value:
26 |
27 |
32 |
33 |
34 |
35 | Check out more examples at jscolor.com!
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/PTriangle.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | namespace LLEAG {
5 |
6 | const PStarInnerRadiusRate = 0.55;
7 |
8 | export class PTriangle extends PSimple {
9 |
10 | protected generateParticlePath(drawer: svgjs.Doc): svgjs.Path{
11 | let pathCommands = "";
12 | for(let i = 0; i < 3; i++){
13 | let x = Math.cos(Math.PI * 2 / 3 * i) * this.size;
14 | let y = Math.sin(Math.PI * 2 / 3 * i) * this.size;
15 | if(i == 0) pathCommands += "M ";
16 | else pathCommands += "L ";
17 | pathCommands += x.toString() + "," + y.toString();
18 | if(i == 2) pathCommands += " z";
19 | }
20 | return drawer.path(pathCommands).fill(getHexColor(this.color));
21 | }
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "module": "system",
5 | "moduleResolution": "node",
6 | "isolatedModules": false,
7 | "jsx": "react",
8 | "experimentalDecorators": true,
9 | "emitDecoratorMetadata": true,
10 | "declaration": false,
11 | "noImplicitAny": false,
12 | "noImplicitUseStrict": false,
13 | "removeComments": true,
14 | "noLib": false,
15 | "outDir": "../lib/LLEAG10th/",
16 | "outFile": "../lib/LikeEffectGenerator10th.js",
17 | "preserveConstEnums": true,
18 | "suppressImplicitAnyIndexErrors": true
19 | },
20 | "exclude": [
21 | "node_modules",
22 | "typings/browser",
23 | "typings/browser.d.ts"
24 | ],
25 | "compileOnSave": true,
26 | "buildOnSave": false,
27 | "atom": {
28 | "rewriteTsconfig": true
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/memo:
--------------------------------------------------------------------------------
1 | TODO
2 | ======
3 |
4 | * 「連番PNGをZIPでダウンロード」機能(JSZipにBase64エンコードされたデータを追加する機能がある(しかもちゃんとcanvasから画像データを得る目的との記述有り)のでそれを利用する) <- 済
5 | * GIFEncoderOnlyGlobal.jsにおいて、最初に最も参考になるフレームを元にグローバルパレットを作成し、以降それを利用するようにエンコーダを書き換える <- 済
6 |
7 |
8 | 参考資料
9 | ==========
10 |
11 | canvasにローカルの画像ファイルを描画するには :
12 | http://d.hatena.ne.jp/oovu70/20111122/p1
13 |
14 | canvas to svg :
15 | http://svgopen.org/2010/papers/62-From_SVG_to_Canvas_and_Back/#canvas_to_svg
16 |
17 | javascriptでSVG生成 :
18 | http://www.h6.dion.ne.jp/~lib-k/SVGByJavaScript/SVGByJavaScriptDOM.html
19 |
20 | canvg (SVG to Canvas Renderer) :
21 | https://github.com/gabelerner/canvg
22 |
23 | javascriptで画像の本来の幅・高さを得る方法 :
24 | http://d.hatena.ne.jp/uupaa/20090602/1243933843
25 |
26 | 画像を組み込む - canvas - html5.jp :
27 | http://www.html5.jp/canvas/how6.html
28 |
29 | GIFフォーマットの詳細 :
30 | http://www.tohoho-web.com/wwwgif.htm
31 |
32 |
33 | Design
34 | --------
35 |
36 | ChromeでエクスプローラからファイルをD&Dする :
37 | http://d.hatena.ne.jp/umorigu/20120610/1339282010
38 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/less/mixins.less:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | .fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
13 | .fa-icon-rotate(@degrees, @rotation) {
14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
15 | -webkit-transform: rotate(@degrees);
16 | -ms-transform: rotate(@degrees);
17 | transform: rotate(@degrees);
18 | }
19 |
20 | .fa-icon-flip(@horiz, @vert, @rotation) {
21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1);
22 | -webkit-transform: scale(@horiz, @vert);
23 | -ms-transform: scale(@horiz, @vert);
24 | transform: scale(@horiz, @vert);
25 | }
26 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/blank.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HTML KickStart Elements
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | This example is blank
24 |
Add some HTML KickStart Elements to see the magic happen
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/fonts/font-awesome-4.2.0/scss/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | @mixin fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
13 | @mixin fa-icon-rotate($degrees, $rotation) {
14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
15 | -webkit-transform: rotate($degrees);
16 | -ms-transform: rotate($degrees);
17 | transform: rotate($degrees);
18 | }
19 |
20 | @mixin fa-icon-flip($horiz, $vert, $rotation) {
21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
22 | -webkit-transform: scale($horiz, $vert);
23 | -ms-transform: scale($horiz, $vert);
24 | transform: scale($horiz, $vert);
25 | }
26 |
--------------------------------------------------------------------------------
/LicenseForGeneratedImages.md:
--------------------------------------------------------------------------------
1 | 本ツールを使って作成した画像・素材の利用について
2 | ==================================================
3 |
4 | この文書は、「いいね風エフェクトアニメジェネレータを使用して作成したGIF/PNG/SVG画像の利用」についての情報提供を目的とするものです。ツールそのものの規約(ライセンス)については、同リポジトリ内の LICENSE をご参照下さい。
5 |
6 | ※本文書は、事前の予告・通知なく変更される可能性があります。
7 |
8 |
9 | ## 著作権について
10 |
11 | 本ツールが生成したエフェクト部分の画像(ZIPでダウンロード可能なSVG画像)についての著作権は、本ツールの作者(アミーゴ)が保有しますが、後述の例外を除く利用については、画像の利用(合成・加工等)に関して一切制限を課さないこととします。商用/非商用の別などは問いません。クレジット表記も任意で構いません。
12 |
13 | 本ツールに入力され合成された画像(GIFアニメファイル、ZIPでダウンロード可能なPNG画像)についての著作権は、その入力された画像の著作権と作者の著作権の両方によって構成されるものとしますが、これについても、後述の例外を除く利用については、前述のエフェクト部分を合成する利用とみなし、作者から制限を課すことはありません。入力として使った元画像の著作権や利用規約等は十分考慮するようにしてください。
14 |
15 | ### 例外
16 |
17 | * 著作者を偽っての発信・発表等(自作発言等)
18 | * 素材としての再配布(素材集等への収録もご遠慮下さい)
19 |
20 | 上記の例外は、「本ツールが生成したエフェクト部分」にのみ適用されます。本ツールに入力された画像には適用されません。
21 |
22 |
23 | ## 注意事項
24 |
25 | 本ツールは、某SNSの機能の一部で使われているエフェクトに触発されて制作されたものですが、本ツールを利用して作成した画像を発表する際、そのSNSのブランド(サービス名、アイコンなど)を利用することはお控え下さい(特に商用利用する場合)。
26 |
27 |
28 | ## 免責事項
29 |
30 | 本ツールを利用して作成した画像・素材等を利用したことにより発生したいかなる損害・トラブル等に関して、作者のアミーゴは一切責任を負わないこととします。
31 |
--------------------------------------------------------------------------------
/src/PCircle.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | namespace LLEAG {
6 |
7 | export class PCircle extends ParticleBase {
8 | public generateSVGTree(t: number): svgjs.G {
9 | // check if t > lifeTime
10 | if(t > this.lifeTime) return null;
11 |
12 | // create SVG Circle
13 | let container = document.createElement("div");
14 | let drawer = SVG(container);
15 | let circle = drawer.circle(this.size).translate(-this.size / 2, -this.size / 2).fill(getHexColor(this.color));
16 |
17 | // apply disappearing
18 | let disappearingRate = this.calcDisappearingRate(t);
19 | let currentGroup = drawer.group().scale(disappearingRate, disappearingRate).add(circle);
20 |
21 | // apply translate
22 | let translateXY = this.getBaseXY(t);
23 | return drawer.group().translate(translateXY.x, translateXY.y).add(currentGroup);
24 | };
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/license.txt:
--------------------------------------------------------------------------------
1 | Copyright © 2011-2012 Joshua Gatcke http://www.99lime.com | HTML KickStart
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4 |
5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/lib/jsgif/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010-2014 Kevin Kwok
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/src/PStar.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | namespace LLEAG {
5 |
6 | const PStarInnerRadiusRate = 0.55;
7 |
8 | export class PStar extends PSimple {
9 |
10 | protected generateParticlePath(drawer: svgjs.Doc): svgjs.Path{
11 | let pathCommands = "";
12 | for(let i = 0; i < 5; i++){
13 | let x = Math.cos(Math.PI * 2.0 / 5.0 * i) * this.size;
14 | let y = Math.sin(Math.PI * 2.0 / 5.0 * i) * this.size;
15 | if(i == 0) pathCommands += "M ";
16 | else pathCommands += "L ";
17 | pathCommands += x.toString() + "," + y.toString() + " ";
18 |
19 | x = Math.cos(Math.PI * (2.0 / 5.0 * i + 1.0 / 5.0)) * this.size * PStarInnerRadiusRate;
20 | y = Math.sin(Math.PI * (2.0 / 5.0 * i + 1.0 / 5.0)) * this.size * PStarInnerRadiusRate;
21 | pathCommands += "L " + x.toString() + "," + y.toString() + " ";
22 | if(i == 4) pathCommands += "z";
23 | }
24 | return drawer.path(pathCommands).fill(getHexColor(this.color));
25 | }
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/lib/ZIPWorker.js:
--------------------------------------------------------------------------------
1 | importScripts('jszip.min.js');
2 |
3 | self.addEventListener('message', function(event) {
4 | var evData = event.data;
5 | switch (evData.command) {
6 | case 'package':
7 | package(evData);
8 | break;
9 | }
10 | });
11 |
12 | function package(evData) {
13 | var zip = new JSZip();
14 | var dataArray = evData.dataArray;
15 | var svgSourceArray = evData.svgSourceArray;
16 |
17 | // package frame PNG images
18 | var zipFframes = zip.folder('frames');
19 | for (var fIndex = 0; fIndex < dataArray.length; fIndex++) {
20 | zipFframes.file("frame" + fIndex + ".png", dataArray[fIndex], {
21 | base64: true
22 | });
23 | }
24 |
25 | // package svg source files
26 | if (svgSourceArray != null) {
27 | var zipFsvg = zip.folder('effectSVG');
28 | for (var sIndex = 0; sIndex < svgSourceArray.length; sIndex++) {
29 | zipFsvg.file("frame" + sIndex + ".svg", svgSourceArray[sIndex]);
30 | }
31 | }
32 |
33 | var content = zip.generate({
34 | type: "blob"
35 | });
36 |
37 | self.postMessage({
38 | state: "finish",
39 | blob: content
40 | });
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/img/fancybox/jquery.mousewheel-3.0.4.pack.js:
--------------------------------------------------------------------------------
1 | /*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
2 | * Licensed under the MIT License (LICENSE.txt).
3 | *
4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY
7 | *
8 | * Version: 3.0.4
9 | *
10 | * Requires: 1.2.2+
11 | */
12 |
13 | (function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=
14 | f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
--------------------------------------------------------------------------------
/lib/jsgif/animWorker.js:
--------------------------------------------------------------------------------
1 | importScripts('LZWEncoder.js', 'NeuQuant.js', 'GIFEncoder.js'); /* imports three scripts */
2 |
3 | self.onmessage = function(event) {
4 | //console.log("message!");
5 | //alert("message");
6 | //self.postMessage(event.data);
7 | //return;
8 | var frame_index,
9 | frame_length,
10 | height,
11 | width,
12 | delay,
13 | imageData; //get it from onmessage
14 |
15 | frame_index = event.data["frame_index"];
16 | frame_length = event.data["frame_length"];
17 | height = event.data["height"];
18 | width = event.data["width"];
19 | imageData = event.data["imageData"];
20 | delay = event.data["delay"];
21 |
22 | var encoder = new GIFEncoder(); //create a new GIFEncoder for every new job
23 | encoder.setRepeat(0); //0 -> loop forever
24 | //1+ -> loop n times then stop
25 | encoder.setQuality(1);
26 | encoder.setSize(width, height);
27 | encoder.setDelay(delay); //go to next frame every n milliseconds
28 |
29 | if(frame_index == 0)
30 | {
31 |
32 | encoder.start();
33 | }
34 | else
35 | {
36 | //alert();
37 | encoder.cont();
38 | encoder.setProperties(true, false); //started, firstFrame
39 | }
40 |
41 | encoder.addFrame(imageData, true);
42 | if(frame_length == frame_index)
43 | {
44 | encoder.finish();
45 | }
46 | self.postMessage({"frame_index":frame_index, "frame_data":encoder.stream().getData()}) //on the page, search for the GIF89a to see the frame_index
47 | };
--------------------------------------------------------------------------------
/src/PPopCircle.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | namespace LLEAG {
6 |
7 | export class PPopCircle extends ParticleBase {
8 |
9 | public generateSVGTree(t: number): svgjs.G {
10 | // check if t > lifeTime
11 | if(t > this.lifeTime) return null;
12 |
13 | // create SVG Path
14 | let container = document.createElement("div");
15 | let drawer = SVG(container);
16 | let pathData = "";
17 |
18 | // draw outer circle
19 | pathData = 'M 0,-' + this.size + ' A ' + this.size +
20 | ',' + this.size + ' 0 1,0 0,' + this.size +
21 | ' A ' + this.size + ',' + this.size +
22 | ' 0 1,0 0,-' + this.size + ' z';
23 |
24 | // draw inner circle if this is disappearing
25 | let disappearingRate = this.calcDisappearingRate(t);
26 | if(disappearingRate != 1.0){
27 | let radius2 = easeOutCubic(1.0 - disappearingRate) * this.size;
28 | pathData += ' M 0,-' + radius2 + ' A ' + radius2 + ',' + radius2 + ' 0 1,1 0,' + radius2 + ' A ' + radius2 + ',' + radius2 + ' 0 1,1 0,-' + radius2 + ' z';
29 | }
30 |
31 | // set attributes
32 | let path = drawer.path(pathData).fill(getHexColor(this.color)).attr("fill-rule", "nonzero");
33 |
34 | // apply translate
35 | let translateXY = this.getBaseXY(t);
36 | return drawer.group().translate(translateXY.x, translateXY.y).add(path);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/experiment/writeOutCanvas.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Like Effect Generator
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/lib/custom.css:
--------------------------------------------------------------------------------
1 | /*
2 | Base
3 | */
4 | body.override {
5 | padding: 0;
6 | margin: 0;
7 | }
8 |
9 | /*
10 | Heading
11 | */
12 | div.header {
13 | height: 160px;
14 | width: 100%;
15 | background-color: lightcoral;
16 | }
17 |
18 | div.header .inner {
19 | display: block;
20 | width: 80%;
21 | margin-left: auto;
22 | margin-right: auto;
23 | }
24 |
25 | /*
26 | Footer
27 | */
28 | div.footer {
29 | padding-top: 40px;
30 | margin-top: 40px;
31 | padding-bottom: 40px;
32 | width: 100%;
33 | background-color: lightcoral;
34 | text-align: center;
35 | }
36 |
37 | /*
38 | Body Designing
39 | */
40 | .block-center {
41 | display: block;
42 | margin-left: auto;
43 | margin-right: auto;
44 | }
45 | div.file-drop-area {
46 | position: relative;
47 | max-width: 480px;
48 | height: 100px;
49 | }
50 | input.file-drop-area {
51 | position: relative;
52 | opacity: 0;
53 | z-index: 2;
54 | width: 100%;
55 | height: 100%;
56 | }
57 | div.file-drop-area .custom-design {
58 | position: absolute;
59 | top: 0px;
60 | left: 0px;
61 | z-index: 1;
62 | background-color: lightcoral;
63 | background-image: url("../res/File.svg");
64 | background-position: center;
65 | background-repeat: no-repeat;
66 | max-width: 600px;
67 | width: 100%;
68 | height: 100px;
69 | padding-top: 30px;
70 | text-align: center;
71 | -webkit-border-radius: 10px;
72 | -moz-border-radius: 10px;
73 | border-radius: 10px;
74 | }
75 | .warning {
76 | color: #D00;
77 | }
78 | .tips {
79 | color: #25c;
80 | }
81 | .mode-select {
82 | color: #ff589f;
83 | }
84 | .mode-select a:link,
85 | .mode-select a:hover,
86 | .mode-select a:active,
87 | .mode-select a:visited {
88 | color: #ff589f;
89 | text-decoration: none;
90 | }
91 |
--------------------------------------------------------------------------------
/lib/spawnWorkers.js:
--------------------------------------------------------------------------------
1 | // this needs...
2 | // * filer-util.js
3 | // * FileSaver.min.js
4 |
5 | // spawn web workers
6 | var legWorker = new Worker("lib/MainWorker.js");
7 | var getGIF = null;
8 | var blobGIF = null;
9 | legWorker.addEventListener('message', function(event) {
10 | var evData = event.data;
11 | switch (evData.state) {
12 | case 'progress':
13 | document.getElementById('progressBar').setAttribute("value", evData.value);
14 | document.getElementById('progressBar').setAttribute("max", evData.max);
15 | break;
16 |
17 | case 'finish':
18 | document.getElementById('progressBlock').setAttribute("style", "display: none;");
19 | document.getElementById('targetImg').src = evData.dataURL;
20 | document.getElementById('targetImg').removeAttribute("style");
21 | document.getElementById('downloadGIFButton1').setAttribute("class", "orange");
22 | document.getElementById('downloadGIFButton1').removeAttribute("disabled");
23 | document.getElementById('downloadGIFButton2').setAttribute("class", "orange");
24 | document.getElementById('downloadGIFButton2').removeAttribute("disabled");
25 | blobGIF = Util.dataURLToBlob(evData.dataURL);
26 | getGIF = function(){
27 | saveAs(blobGIF, "LikeEffectAnimation.gif");
28 | }
29 | }
30 | });
31 |
32 | var zipWorker = new Worker("lib/ZIPWorker.js");
33 | var getZIP = null;
34 | zipWorker.addEventListener('message', function(event) {
35 | var evData = event.data;
36 | switch (evData.state) {
37 | case 'finish':
38 | document.getElementById('downloadZIPButton').setAttribute("class", "orange");
39 | document.getElementById('downloadZIPButton').removeAttribute("disabled");
40 | getZIP = function() {
41 | saveAs(evData.blob, "allFrames.zip");
42 | }
43 | }
44 | })
45 |
--------------------------------------------------------------------------------
/lib/MainWorker.js:
--------------------------------------------------------------------------------
1 | importScripts('jsgif/LZWEncoder.js', 'jsgif/NeuQuant.js', 'jsgif/GIFEncoderOnlyGlobal.js', 'jsgif/b64.js');
2 |
3 | self.addEventListener('message', function(event) {
4 | var evData = event.data;
5 | switch (evData.command) {
6 | case 'encode':
7 | encode(evData);
8 | break;
9 | }
10 | });
11 |
12 | function encode(evData) {
13 | var nFrames = evData.nFrames,
14 | height = evData.height,
15 | width = evData.width,
16 | frameRate = evData.frameRate,
17 | quality = evData.quality;
18 | gpFrameIndexArray = evData.gpFrameIndexArray,
19 | imageDataArray = evData.imageDataArray;
20 |
21 | //console.log(JSON.stringify(imageDataArray));
22 | //console.log(JSON.stringify(evData));
23 |
24 | var encoder = new GIFEncoder();
25 | encoder.setRepeat(0);
26 | encoder.setFrameRate(frameRate);
27 | encoder.setQuality(quality);
28 |
29 | // set size
30 | encoder.setSize(width, height);
31 |
32 | // generate global palette
33 | var imageDataArrayGP = [];
34 | for(var idgpIndex = 0; idgpIndex < gpFrameIndexArray.length; idgpIndex++){
35 | imageDataArrayGP.push(imageDataArray[gpFrameIndexArray[idgpIndex]]);
36 | }
37 | if(!encoder.analyzeGlobalPalleteImage(imageDataArrayGP, gpFrameIndexArray.length, true)){
38 | throw new Error("Something wrong in analyzeGlobalPalleteImage()");
39 | }
40 |
41 | // generate animated GIF
42 | encoder.start();
43 | for(var fIndex = 0; fIndex < imageDataArray.length; fIndex++){
44 | encoder.addFrame(imageDataArray[fIndex], true);
45 | self.postMessage({ state: 'progress', value: fIndex, max: imageDataArray.length - 1 });
46 | }
47 | encoder.finish();
48 | var binaryGIF = encoder.stream().getData();
49 | var dataURL = 'data:image/gif;base64,' + encode64(binaryGIF);
50 |
51 | self.postMessage({ state: 'finish', dataURL: dataURL });
52 | //self.close();
53 | }
54 |
--------------------------------------------------------------------------------
/src/PSimple.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | namespace LLEAG {
6 |
7 | export interface PSimpleOptions extends PBaseOptions {
8 | vSpinX: number;
9 | vSpinY: number;
10 | vSpinZ: number;
11 | initSpinZ: number;
12 | }
13 |
14 | export abstract class PSimple extends ParticleBase {
15 |
16 | private vSpinX: number;
17 | private vSpinY: number;
18 | private vSpinZ: number;
19 | private initSpinZ: number;
20 |
21 | constructor(options: PSimpleOptions){
22 | super(options);
23 | this.vSpinX = options.vSpinX;
24 | this.vSpinY = options.vSpinY;
25 | this.vSpinZ = options.vSpinZ;
26 | this.initSpinZ = options.initSpinZ;
27 | }
28 |
29 | public generateSVGTree(t: number): svgjs.G {
30 | // check if t > lifeTime
31 | if(t > this.lifeTime) return null;
32 |
33 | // create SVG Path
34 | let container = document.createElement("div");
35 | let drawer = SVG(container);
36 | let path = this.generateParticlePath(drawer);
37 |
38 | // apply spin by Z axis
39 | let currentGroup = drawer.group().rotate(360.0 * (this.initSpinZ + t * this.vSpinZ)).add(path);
40 |
41 | // apply spin by XY axis + disappearing
42 | let disappearingRate;
43 | if(t > this.lifeTime * (1.0 - this.disappearDurationRate)) disappearingRate = (this.lifeTime - t) / (this.lifeTime * this.disappearDurationRate);
44 | else disappearingRate = 1.0
45 | currentGroup = drawer.group().scale(Math.cos(Math.PI * 2.0 * (this.vSpinY * t)),Math.cos(Math.PI * 2.0 * (this.vSpinX * t)) * disappearingRate).add(currentGroup);
46 |
47 | // apply translate
48 | let translateXY = this.getBaseXY(t);
49 | currentGroup = drawer.group().translate(translateXY.x, translateXY.y).add(currentGroup);
50 |
51 | return currentGroup;
52 | }
53 |
54 | protected abstract generateParticlePath(drawer: svgjs.Doc): svgjs.Path;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/res/Mode-other.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
65 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/README.md:
--------------------------------------------------------------------------------
1 | # HTML KickStart #
2 | by Joshua Gatcke
3 | http://www.99lime.com
4 | Version: 0.94
5 |
6 | ## What is HTML KickStart? ##
7 |
8 | HTML KickStart is an ultra–lean set of HTML5, CSS, and jQuery (javascript) files, layouts, and elements designed to give you a headstart and save you 10's of hours on your next web project.
9 |
10 | HTML KickStart includes everything you need to rapidly create website layouts – things like slideshows, menus, flexible grids, image placeholders, buttons, and more – saving you a ton of time so you can produce faster and make more money.
11 |
12 | Bonus! All HTML KickStart Elements are fully Browser tested, they even gracefully degrade ;)
13 |
14 | ## Perfect for Wireframing in HTML ##
15 |
16 | HTML KickStart has everything you need to rapidly create HTML Page Layouts, perfect for Wireframing in HTML.
17 | Layouts that used to take hours now take minutes.
18 |
19 | ## Getting Started ##
20 |
21 | 1. Download HTML KickStart
22 | 2. Open blank.html in your favorite text editor
23 | 3. Start adding KickStart Elements to blank.html: (http://www.99lime.com/elements/)
24 | 4. Save blank.html and open in your favorite Web Browser
25 | 5. Have fun!
26 |
27 |
28 | ## HTML KickStart is FREE and Open Source. ##
29 | ### Release Under the MIT Open Source License. ###
30 |
31 | Copyright © 2011-2012 Joshua Gatcke http://www.99lime.com | HTML KickStart
32 |
33 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
34 |
35 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
36 |
37 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 |
--------------------------------------------------------------------------------
/experiment/writeOutAnimGif.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Like Effect Generator
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/res/Mode-selecting.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
71 |
--------------------------------------------------------------------------------
/src/Utils.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | namespace LLEAG {
4 |
5 | // color space conversion Function
6 | // from http://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion
7 |
8 | /**
9 | * Converts an HSL color value to RGB. Conversion formula
10 | * adapted from http://en.wikipedia.org/wiki/HSL_color_space.
11 | * Assumes h, s, and l are contained in the set [0, 1] and
12 | * returns r, g, and b in the set [0, 255].
13 | *
14 | * @param Number h The hue
15 | * @param Number s The saturation
16 | * @param Number l The lightness
17 | * @return Array The RGB representation
18 | */
19 | export function hslToRGB(h: number, s: number, l: number): RGB {
20 | var r, g, b;
21 |
22 | if (s == 0) {
23 | r = g = b = l; // achromatic
24 | } else {
25 | var hue2rgb = function hue2rgb(p, q, t) {
26 | if (t < 0) t += 1;
27 | if (t > 1) t -= 1;
28 | if (t < 1 / 6) return p + (q - p) * 6 * t;
29 | if (t < 1 / 2) return q;
30 | if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
31 | return p;
32 | }
33 |
34 | var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
35 | var p = 2 * l - q;
36 | r = hue2rgb(p, q, h + 1 / 3);
37 | g = hue2rgb(p, q, h);
38 | b = hue2rgb(p, q, h - 1 / 3);
39 | }
40 |
41 | return {
42 | r: Math.round(r * 255),
43 | g: Math.round(g * 255),
44 | b: Math.round(b * 255)
45 | };
46 | }
47 |
48 | export function getHexColor(color: RGB): string {
49 | // solution from http://stackoverflow.com/a/4090628
50 | let rs = ("0" + color.r.toString(16)).slice(-2);
51 | let gs = ("0" + color.g.toString(16)).slice(-2);
52 | let bs = ("0" + color.b.toString(16)).slice(-2);
53 |
54 | return "#" + rs + gs + bs;
55 | }
56 |
57 | // easing functions from http://gizma.com/easing/
58 | export function easeOutCubic(t: number) {
59 | t--;
60 | return (t * t * t + 1);
61 | };
62 |
63 | export function easeInCubic(t: number) {
64 | return t*t*t;
65 | };
66 |
67 | export function easeInOutCubic(t: number) {
68 | t *= 2;
69 | if (t < 1) return t * t * t / 2;
70 | t -= 2;
71 | return (t * t * t + 2) / 2;
72 | };
73 | }
74 |
--------------------------------------------------------------------------------
/experiment/writeOut.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Like Effect Generator
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/src/ParticleBase.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | namespace LLEAG {
5 | export let kX: number = 1;
6 | export let kY: number = 4.5;
7 | export let vLastY: number = -20.0;
8 | //export let g: number = kY * -vLastY;
9 |
10 | export let defaultX0: number = 0.0;
11 | export let defaultY0: number = -40.0;
12 |
13 | export interface PBaseOptions{
14 | x0?: number;
15 | y0?: number;
16 | v0X: number;
17 | v0Y: number;
18 | size: number;
19 | lifeTime: number;
20 | disappearDurationRate: number;
21 | color: RGB;
22 | }
23 |
24 | export abstract class ParticleBase {
25 |
26 | protected x0: number;
27 | protected y0: number;
28 | protected v0X: number;
29 | protected v0Y: number;
30 | protected size: number;
31 | protected lifeTime: number;
32 | protected disappearDurationRate: number;
33 | protected color: RGB;
34 |
35 | constructor(options: PBaseOptions){
36 | // init fields
37 | this.x0 = options.x0 || defaultX0;
38 | this.y0 = options.y0 || defaultY0;
39 | this.v0X = options.v0X;
40 | this.v0Y = options.v0Y;
41 | this.size = options.size;
42 | this.lifeTime = options.lifeTime;
43 | this.disappearDurationRate = options.disappearDurationRate;
44 | this.color = options.color;
45 | if(!this.checkColorConsistency()) throw "out of color range";
46 | }
47 |
48 | protected getBaseXY(t: number): Point {
49 | // x = - (v0x / k) e^(-kt) + x0 + v0x / k
50 | // y = - ((k v0y + g) / k^2) e^(-kt) - g/k t + (y0 + ((k v0y + g) / k^2))
51 | let retP: Point = { x: 0, y: 0 };
52 | retP.x = (this.v0X / kX) * (1.0 - Math.exp(-kX * t)) + this.x0;
53 | let c0 = ((this.v0Y - vLastY) / kY)
54 | retP.y = c0 * (1.0 - Math.exp(-kY * t)) - vLastY * t + this.y0;
55 |
56 | return retP;
57 | }
58 |
59 | public abstract generateSVGTree(t: number): svgjs.G;
60 |
61 | private checkColorConsistency(): boolean {
62 | return this.color.r <= 255 && this.color.g <= 255 && this.color.b <= 255 &&
63 | this.color.r >= 0 && this.color.g >= 0 && this.color.b >= 0;
64 | }
65 |
66 | protected calcDisappearingRate(t: number): number {
67 | return (t > this.lifeTime * (1.0 - this.disappearDurationRate)) ? (this.lifeTime - t) / (this.lifeTime * this.disappearDurationRate) : 1.0;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/src/PopLineEffect.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
5 | namespace LLEAG {
6 |
7 | export interface PLEOptions {
8 | lifeTime: number;
9 | lineWidthFactor: number;
10 | lineNumber? : number;
11 | lineColor?: RGB;
12 | }
13 |
14 | const PLELineSaturation = 0.8;
15 | const PLELineLightness = 0.7;
16 |
17 | export class PopLineEffect {
18 |
19 | private lifeTime: number;
20 | private lineWidthFactor: number;
21 | private lineNumber: number;
22 | private lineColor: RGB;
23 |
24 | constructor(options: PLEOptions){
25 | this.lifeTime = options.lifeTime;
26 | this.lineWidthFactor = options.lineWidthFactor;
27 |
28 | this.lineNumber = options.lineNumber || 8;
29 | // guarantee that lineNumber is integer value
30 | this.lineNumber = Math.ceil(this.lineNumber);
31 |
32 | this.lineColor = options.lineColor || null;
33 | }
34 |
35 | public generateSVGTree(t: number, size: number){
36 | // check if t > lifeTime
37 | if(t > this.lifeTime) return null;
38 |
39 | // create SVG group
40 | let container = document.createElement("div");
41 | let drawer = SVG(container);
42 | let currentGroup = drawer.group();
43 |
44 | // generate lines
45 | for(let i = 0; i < this.lineNumber; i++){
46 | let baseX = Math.cos(Math.PI * 2 / this.lineNumber * i) * size * (1.0 + 0.1 * t);
47 | let baseY = Math.sin(Math.PI * 2 / this.lineNumber * i) * size * (1.0 + 0.1 * t);
48 | let startX = baseX * easeOutCubic(t / this.lifeTime);
49 | let startY = baseY * easeOutCubic(t / this.lifeTime);
50 | let color = this.lineColor;
51 | if(color == null){
52 | // generate rainbow colors
53 | let hue = i / this.lineNumber * 2.0;
54 | if(hue > 1.0) hue -= 1.0;
55 | color = hslToRGB(hue, PLELineSaturation, PLELineLightness);
56 | }
57 | let lineWidth = size * this.lineWidthFactor;
58 |
59 | let line = drawer.line(startX, startY, baseX, baseY)
60 | .stroke({ color: getHexColor(color), width: lineWidth }).attr("stroke-linecap", "round");
61 | currentGroup.add(line);
62 | }
63 |
64 | return currentGroup;
65 | }
66 |
67 | public getLifeTime(): number{
68 | return this.lifeTime;
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/tiptip.css:
--------------------------------------------------------------------------------
1 | /*
2 | TipTip CSS - Version 1.2
3 | http://code.drewwilson.com/entry/tiptip-jquery-plugin
4 | */
5 |
6 | #tiptip_holder { display: none; position: absolute; top: 0; left: 0; z-index: 99999; }
7 | #tiptip_holder.tip_top { padding-bottom: 5px; }
8 | #tiptip_holder.tip_bottom { padding-top: 5px; }
9 | #tiptip_holder.tip_right { padding-left: 5px; }
10 | #tiptip_holder.tip_left { padding-right: 5px; }
11 |
12 | #tiptip_content {
13 | font-size: 11px;
14 | color: #fff;
15 | text-shadow: 0 0 2px #000;
16 | padding: 4px 8px;
17 | border: 1px solid rgba(255,255,255,0.25);
18 | background:#212121;
19 | background-color: rgba(25,25,25,0.92);
20 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
21 | -webkit-border-radius: 3px;
22 | -moz-border-radius: 3px;
23 | border-radius: 3px;
24 | -webkit-box-shadow: 0 0 3px #555;
25 | -moz-box-shadow: 0 0 3px #555;
26 | box-shadow: 0 0 3px #555;
27 | *background:#212121;
28 | }
29 |
30 | #tiptip_arrow, #tiptip_arrow_inner {
31 | position: absolute;
32 | border-color: transparent;
33 | border-style: solid;
34 | border-width: 6px;
35 | height: 0;
36 | width: 0;
37 | }
38 |
39 | #tiptip_holder.tip_top #tiptip_arrow {
40 | border-top-color: #fff;
41 | border-top-color: rgba(255,255,255,0.35);
42 | }
43 |
44 | #tiptip_holder.tip_bottom #tiptip_arrow {
45 | border-bottom-color: #fff;
46 | border-bottom-color: rgba(255,255,255,0.35);
47 | }
48 |
49 | #tiptip_holder.tip_right #tiptip_arrow {
50 | border-right-color: #fff;
51 | border-right-color: rgba(255,255,255,0.35);
52 | }
53 |
54 | #tiptip_holder.tip_left #tiptip_arrow {
55 | border-left-color: #fff;
56 | border-left-color: rgba(255,255,255,0.35);
57 | }
58 |
59 | #tiptip_holder.tip_top #tiptip_arrow_inner {
60 | margin-top: -7px;
61 | margin-left: -6px;
62 | border-top-color: rgb(25,25,25);
63 | border-top-color: rgba(25,25,25,0.92);
64 | }
65 |
66 | #tiptip_holder.tip_bottom #tiptip_arrow_inner {
67 | margin-top: -5px;
68 | margin-left: -6px;
69 | border-bottom-color: rgb(25,25,25);
70 | border-bottom-color: rgba(25,25,25,0.92);
71 | }
72 |
73 | #tiptip_holder.tip_right #tiptip_arrow_inner {
74 | margin-top: -6px;
75 | margin-left: -5px;
76 | border-right-color: rgb(25,25,25);
77 | border-right-color: rgba(25,25,25,0.92);
78 | }
79 |
80 | #tiptip_holder.tip_left #tiptip_arrow_inner {
81 | margin-top: -6px;
82 | margin-left: -7px;
83 | border-left-color: rgb(25,25,25);
84 | border-left-color: rgba(25,25,25,0.92);
85 | }
86 |
87 | /* Webkit Hacks */
88 | @media screen and (-webkit-min-device-pixel-ratio:0) {
89 | #tiptip_content {
90 | padding: 4px 8px 5px 8px;
91 | background-color: rgba(45,45,45,0.88);
92 | }
93 | #tiptip_holder.tip_bottom #tiptip_arrow_inner {
94 | border-bottom-color: rgba(45,45,45,0.88);
95 | }
96 | #tiptip_holder.tip_top #tiptip_arrow_inner {
97 | border-top-color: rgba(20,20,20,0.92);
98 | }
99 | }
--------------------------------------------------------------------------------
/res/File.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
70 |
--------------------------------------------------------------------------------
/res/material/File.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
70 |
--------------------------------------------------------------------------------
/lib/FrontEnd-Common.js:
--------------------------------------------------------------------------------
1 | function confirmImageSize() {
2 | var kSVGNS = 'http://www.w3.org/2000/svg';
3 |
4 | var size = parseInt(document.getElementById('generateSize').value);
5 | if (size.isNaN) {
6 | alert("サイズは半角数字のみで入力して下さい。");
7 | return false;
8 | }
9 |
10 | var svgBlock = document.createElementNS(kSVGNS, 'svg');
11 | svgBlock.setAttribute('width', size);
12 | svgBlock.setAttribute('height', size);
13 | svgBlock.setAttribute('viewBox', '0 0 ' + size + ' ' + size);
14 | svgBlock.setAttribute('xmlns', kSVGNS);
15 | svgBlock.setAttribute('version', '1.1');
16 |
17 | var rectBlock = document.createElementNS(kSVGNS, 'rect');
18 | rectBlock.setAttribute('x', '0');
19 | rectBlock.setAttribute('y', '0');
20 | rectBlock.setAttribute('width', size.toString());
21 | rectBlock.setAttribute('height', size.toString());
22 | rectBlock.setAttribute('stroke', '#CCC');
23 | rectBlock.setAttribute('stroke-width', '4');
24 | rectBlock.setAttribute('fill', 'none');
25 | svgBlock.appendChild(rectBlock);
26 |
27 | var textBlock = document.createElementNS(kSVGNS, 'text');
28 | textBlock.setAttribute('x', (size / 2).toString());
29 | textBlock.setAttribute('y', (size / 2).toString());
30 | textBlock.setAttribute('text-anchor', 'middle');
31 | textBlock.setAttribute('font-family', 'sans-serif');
32 | textBlock.setAttribute('font-size', '20');
33 | textBlock.setAttribute('fill', '#CCC');
34 | textBlock.innerHTML = size.toString() + ' x ' + size.toString();
35 | svgBlock.appendChild(textBlock);
36 |
37 | var tempBlock = document.createElement('span');
38 | tempBlock.appendChild(svgBlock);
39 | var canvasBlock = generateCanvasFromSVG(tempBlock.innerHTML, size);
40 |
41 | var targetImgBlock = document.getElementById('targetImg');
42 | targetImgBlock.src = canvasBlock.toDataURL();
43 | targetImgBlock.setAttribute("style", "display: block;");
44 | }
45 |
46 | function loadImg() {
47 |
48 | var imgFile = document.getElementById('localImgFile').files[0];
49 | if (!imgFile.type.match(/^image\/(png|jpeg|gif)$/)) {
50 | alert("png,jpg,gif以外の画像ファイルは扱えません。");
51 | return;
52 | }
53 |
54 | var image = document.createElement('img');
55 | image.crossOrigin = "anonymous";
56 | image.setAttribute('style', 'width: auto; height: 200px');
57 | image.setAttribute('id', 'iconImg');
58 | var fileReader = new FileReader();
59 |
60 | fileReader.onload = function(evt) {
61 | image.src = evt.target.result;
62 | document.getElementById('generateButton1').removeAttribute("disabled");
63 | document.getElementById('generateButton1').setAttribute("class", "blue");
64 | document.getElementById('generateButton2').removeAttribute("disabled");
65 | document.getElementById('generateButton2').setAttribute("class", "blue");
66 | };
67 |
68 | fileReader.readAsDataURL(imgFile);
69 |
70 | var confirmBlock = document.getElementById('confirmLocalImg');
71 | confirmBlock.innerHTML = "";
72 | confirmBlock.appendChild(image);
73 | var confirmTextBlock = document.createElement('p');
74 | confirmTextBlock.innerHTML = "準備が完了すると上に読み込んだ画像が表示されます。";
75 | confirmBlock.appendChild(confirmTextBlock);
76 | }
77 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | 99Lime.com HTML KickStart by Joshua Gatcke
3 | style.css
4 |
5 | */
6 |
7 | /*---------------------------------
8 | IMPORTS
9 | -----------------------------------*/
10 | @import url(https://fonts.googleapis.com/css?family=Arimo:400,700);
11 |
12 | /*---------------------------------
13 | OVERRIDES
14 | -----------------------------------*/
15 | h1,h2,h3,h4,h5,h6{
16 | font-family: "Arimo", arial, verdana, sans-serif;
17 | font-weight:normal;
18 | }
19 |
20 | thead th,
21 | tbody th{
22 | font-family: "Arimo", arial, verdana, sans-serif;
23 | }
24 |
25 | button,
26 | a.btn,
27 | input[type="submit"],
28 | input[type="reset"],
29 | input[type="button"]{
30 | font-family: "Arimo", arial, verdana, sans-serif;
31 | }
32 |
33 | .menu{
34 | font-family: "Arimo", arial, verdana, sans-serif;
35 | }
36 |
37 | blockquote{
38 | font-family: "Arimo", arial, verdana, sans-serif;
39 | }
40 |
41 | /*---------------------------------
42 | LAYOUT
43 | -----------------------------------*/
44 | body{
45 | margin:0;
46 | padding:0 0 0 0;
47 | color:#000;
48 | background:#efefef url(css/img/gray_jean.png);
49 | font:normal 0.9em/150% 'Arimo', arial, verdana, sans-serif;
50 | text-shadow: 0 0 1px transparent; /* google font pixelation fix */
51 | }
52 |
53 | #wrap{
54 | width:100%;
55 | background:#fff;
56 | margin:30px auto 30px auto;
57 | padding:0 2%;
58 | border:1px solid #ccc;
59 | }
60 |
61 |
62 | #footer{
63 | text-align:center;
64 | padding:20px;
65 | margin:0;
66 | border-top:1px solid #ddd;
67 | color:#999;
68 | font-size:0.8em;
69 | text-shadow:0px 1px 1px #fff;
70 | position: relative;
71 | top:0;
72 | left:0;
73 | background:#fff;
74 | }
75 |
76 | #link-top{
77 | display:none;
78 | }
79 |
80 | /* NAV BAR*/
81 | .navbar{
82 | position:fixed;
83 | top:0;
84 | left:0;
85 | width: 100%;
86 | background:#000;
87 | color:#fff;
88 | z-index:1000;
89 | }
90 |
91 | .navbar #logo{
92 | position:absolute;
93 | top:0;
94 | right:0;
95 | padding:0.5em 1em;
96 | font-size: 1.7em;
97 | color:#efefef;
98 | text-decoration:none;
99 | }
100 |
101 | .navbar span{
102 | color:#86dc00;
103 | }
104 |
105 |
106 | .navbar ul{
107 | display:inline-block;
108 | margin:0;
109 | padding:0;
110 | }
111 |
112 | .navbar li{
113 | margin:0;
114 | padding:0;
115 | list-style-type:0;
116 | display:inline-block;
117 | }
118 |
119 | .navbar li a{
120 | display:inline-block;
121 | color:#efefef;
122 | padding:1em 1.3em;
123 | text-decoration:none;
124 | text-transform: uppercase;
125 | line-height:100%;
126 | font-size: 1.2em;
127 | }
128 |
129 | .callout{
130 | background:#4598ef;/*#86dc00;*/
131 | padding:3em 0;
132 | color:#fff;
133 | box-shadow:inset 0 0 10px rgba(0,0,0,0.2);
134 | text-align: center;
135 | text-shadow:0px 1px 3px rgba(0,0,0,0.2);
136 | display:block;
137 | }
138 | .callout + div.grid{margin-top:50px;}
139 | a.callout{cursor:pointer;}
140 | .callout i.icon-4x{font-size:6em;}
141 | .callout h4{margin-bottom:30px;}
142 | .callout-top{margin:50px 0 0 0;}
143 | .callout p{margin-bottom:0;}
144 | .callout .button{margin-top:10px;}
145 | .callout.green{background:#19ad0b;/*#86dc00;*/}
146 |
147 | #mc_embed_signup{
148 | padding:30px 0;
149 | }
150 |
151 | #ui-preview{
152 | border:5px solid #ddd;
153 | margin:30px 0;
154 | display:block;
155 | }
156 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | いいねボタン風エフェクトアニメジェネレータ
2 | ============================================
3 |
4 | [Webアプリはこちらから (Web App is available here)](http://wl-amigo.github.io/LikeLikeEffectGenerator/)
5 |
6 | (twitter's Like-like GIF animation generator)
7 |
8 | Twitterのいいねボタンを押した時っぽいGIFアニメを、好きな画像から生成出来るWebアプリです。
9 |
10 | This is a web application generates GIF animation like twitter's Like button, from any image you like.
11 |
12 | (This documentation is written in Japanese. At the moment, There is no English version of documentation. Sorry.)
13 |
14 |
15 |
16 | 動作環境
17 | ----------
18 |
19 | 本アプリは、以下の環境で動作することを確認しています。
20 |
21 | * FireFox (44.0.2) on Ubuntu 14.04 LTS
22 | * Google Chrome (49.0.2623.75 (64-bit)) on Ubuntu 14.04 LTS
23 | * Google Chrome (49.0.2623.87 (32-bit)) on Windows 7 (64-bit)
24 |
25 |
26 | 使い方
27 | --------
28 |
29 | 1. 「ここに使いたい画像をドラッグ&ドロップ!」と書かれた場所に、生成元の画像ファイルをドラッグ&ドロップします。(もしくは、その場所をクリックするとファイル選択画面が開きます)
30 | 2. 「生成!」ボタンを押します。しばらく待つと、生成結果のGIFアニメが表示されます。
31 | 3. 「GIFアニメをダウンロード」ボタンを押すと、生成したGIFアニメをダウンロード出来ます(表示されているGIFアニメを 右クリック->名前を付けて保存 でも大丈夫です)。また、ページ下部にある「連番PNGをZIPでダウンロード」ボタンを押すと、生成されたGIFアニメの元になっている連番PNG(減色前)をZIPで固めたものをダウンロード出来ます(おまけでエフェクトのみのSVGファイルも入ってます)。
32 |
33 |
34 | 設定可能なパラメータについて
35 | ------------------------------
36 |
37 | ページ中央にある設定についての説明です。
38 |
39 | ### 「出現画像」
40 |
41 | * **出力サイズ(px)** : 生成するGIFアニメの1辺のピクセル数を指定します。大きいと生成にそれなりに時間がかかりますので注意して下さい。横にある「出力サイズを確認する」ボタンで、出力されるGIFの縦横サイズを確認出来ます(既にGIFアニメを生成していた場合、これを実行すると破棄されてしまいますのでご注意下さい)。
42 | * **画像を円形にトリミングする** : 入力された画像を先に円形にトリミング(切り抜き)してからGIFアニメを生成します。動作としては、まず入力画像の長辺を1辺の長さとする正方形の画像を生成し、その中央に入力画像を配置します(入力画像が正方形だった場合は何も起こりません)。その後、その画像いっぱいの正円で切り抜きを行います。
43 | * **押されてない時風の画像を付加する** : 入力画像を、透明度を維持したまま灰色に塗りつぶした画像を用意し、それをGIFアニメの最初の方に表示させます。この処理は画像の透明度に依存しますので、透明度が設定されていない画像ではうまく行きません(四角い灰色の画像が表示されてしまいます)。
44 | * **画像拡大時に補完しない** : 生成されるGIFのサイズが入力された画像サイズよりも大きい時に行われる入力画像の拡大出力において、補間を行わないようにします( = 最近傍法で拡大します)。ドット絵などを使用して生成する時にオススメです。(一部ブラウザは対応していない可能性があります。PC版FireFox, Chromeでは利用可能です)
45 |
46 |
47 | ### 「弾ける大きな丸のエフェクト」
48 |
49 | いいねボタンを押した直後に出てくる「弾ける大きな丸」の色を指定できます。色は「出現時の色」->「消滅時の色」と線形に変化します。
50 |
51 |
52 | ### 「飛び散る小さい丸のエフェクト」
53 |
54 | いいねボタンを押して、ハートマークと共に出てくる「飛び散る小さい丸」の色を指定できます。
55 |
56 | * **色の付け方** : 「虹色」か「指定色」が選べます。「虹色」の場合は、時計回りに虹色になるように自動で設定します。「指定色」の場合は、「色1(早く消える方)」と「色2(遅く消える方)」で指定した色を使用します。
57 |
58 |
59 | ### 「高度な設定」
60 |
61 | あまり使われ無さそうな特殊な設定です。
62 |
63 | * **クオンタイズ品質** : GIFアニメの生成に使用している [jsgif](https://github.com/antimatter15/jsgif) 内で使用されている [NeuQuant](https://github.com/devongovett/neuquant) に与える quality 値です(1 〜 30)。小さいほどクオンタイズ(減色)の品質が上がります(元の画像との誤差平均が小さくなる)が、計算にものすごい時間が掛かります。通常は10で問題ありません。
64 |
65 |
66 | 利用したライブラリ
67 | --------------------
68 |
69 | * [jQuery](https://jquery.com/)
70 | * [canvg](https://github.com/gabelerner/canvg) : SVGからcanvasを得るために使用
71 | * [jsgif](https://github.com/antimatter15/jsgif) : 連番canvasからのGIFアニメの生成(但し、NeuQuantによるパレットの生成をグローバルパレットのみに限定するために改造したものを使用)
72 | * [filer](https://github.com/ebidel/filer.js/) : data-urlからのblobの取得(ユーティリティ部分のみを抜き出して使用)
73 | * [FileSaver](https://github.com/eligrey/FileSaver.js/) : blobのダウンロードボタンの実装に使用
74 | * [jszip](https://stuk.github.io/jszip/) : 連番canvasと連番SVGをzipに固めるのに使用
75 | * [Tiny Color Picker](http://www.dematte.at/tinyColorPicker/) : 色指定でカラーピッカーを利用可能にするために使用
76 |
77 |
78 | ライセンス
79 | ------------
80 |
81 | 本ソフトウェアは MITライセンス の下でライセンスされています。従って、**著作権表記とライセンス文をソフトウェア付近の参照可能な場所に設置する** こと(例えば、公開リポジトリの中など)を条件に、本ソフトウェアを元に新たなソフトウェアを作ることなどを全面的に認めます。
82 |
83 | より詳細には、本リポジトリ内の LICENSE をご覧ください。
84 |
--------------------------------------------------------------------------------
/experiment/testV2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Like Effect Generator
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/src/PRibbon.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 |
6 | namespace LLEAG {
7 |
8 | export interface PRibbonOptions extends PBaseOptions {
9 | vSpinZ: number;
10 | initSpinZ: number;
11 | lineWidth?: number;
12 | popLineEffectInstance: PopLineEffect;
13 | }
14 |
15 | export class PRibbon extends ParticleBase {
16 |
17 | private vSpinZ: number;
18 | private initSpinZ: number;
19 | private lineWidth: number;
20 | private popLineEffectInstance: PopLineEffect;
21 |
22 | constructor(options: PRibbonOptions) {
23 | super(options);
24 | this.vSpinZ = options.vSpinZ;
25 | this.initSpinZ = options.initSpinZ;
26 | this.lineWidth = options.lineWidth;
27 | this.popLineEffectInstance = options.popLineEffectInstance;
28 | }
29 |
30 | public generateSVGTree(t: number): svgjs.G {
31 | // check if t > lifeTime + pleInstance.lifeTime
32 | if (t > this.lifeTime + this.popLineEffectInstance.getLifeTime()) return null;
33 |
34 | // create SVG Document
35 | let container = document.createElement("div");
36 | let drawer = SVG(container);
37 | let currentGroup = drawer.group();
38 |
39 | if (t > this.lifeTime) {
40 | // get PopLineEffect SVG group
41 | let pleSVGGroup = this.popLineEffectInstance.generateSVGTree(t - this.lifeTime, this.size);
42 |
43 | if(pleSVGGroup == null) return null;
44 |
45 | // apply last spin by Z axis
46 | currentGroup.translate(this.size, 0).add(pleSVGGroup);
47 | currentGroup = drawer.group().rotate(360.0 * (this.initSpinZ + this.lifeTime * this.vSpinZ)).add(currentGroup);
48 |
49 | // apply translate
50 | let translateXY = this.getBaseXY(this.lifeTime);
51 | currentGroup = drawer.group().translate(translateXY.x, translateXY.y).add(currentGroup);
52 | } else {
53 | // draw arc
54 | let arcData = "";
55 | let disappearingRate = this.calcDisappearingRate(t);
56 | if (disappearingRate < 1.0) {
57 | let startX = Math.cos(Math.PI / 3 * (1.0 - disappearingRate)) * this.size;
58 | let startY = Math.sin(Math.PI / 3 * (1.0 - disappearingRate)) * this.size;
59 | arcData = "M " + (Math.cos(-Math.PI / 3 * easeInCubic(disappearingRate)) * this.size).toString() + "," + (Math.sin(-Math.PI / 3 * easeInCubic(disappearingRate)) * this.size).toString();
60 | arcData += " A " + this.size.toString() + "," + this.size.toString() + " 0 0,1 " + this.size.toString() + ",0";
61 | // TODO: 逆向きから近づいていくように変更
62 | } else {
63 | arcData = "M " + (Math.cos(-Math.PI / 3) * this.size).toString() + "," + (Math.sin(-Math.PI / 3) * this.size).toString();
64 | arcData += " A " + this.size.toString() + "," + this.size.toString() + " 0 0,1 " + this.size.toString() + ",0";
65 | }
66 | let arc = drawer.path(arcData).stroke({ color: getHexColor(this.color), width: this.lineWidth }).attr("stroke-linecap", "round");
67 |
68 | // apply spin by Z axis
69 | currentGroup.rotate(360.0 * (this.initSpinZ + t * this.vSpinZ)).add(arc);
70 |
71 | // apply translate
72 | let translateXY = this.getBaseXY(t);
73 | currentGroup = drawer.group().translate(translateXY.x, translateXY.y).add(currentGroup);
74 | }
75 |
76 | return currentGroup;
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/lib/jsgif/anim.js:
--------------------------------------------------------------------------------
1 | //This Demonstrates calling the animWorker.js web worker, allowing for non-blocking
2 | //Gif building.
3 |
4 |
5 | function animDelayValue() //Gets a user defined frame delay from user input (dom element), displays current value on dom
6 | {
7 | var value = new Number(document.getElementById("animDelay").value/1000);
8 | value.toFixed(2);
9 | document.getElementById("animDelayVal").innerHTML = value;
10 | }
11 | animDelayValue(); //initialize delay value display
12 | this.animDelayValue = animDelayValue; //make animDelayValue global
13 | this.gifalizer = function() //function, called from DOM to build gif.
14 | {
15 | function getAnimScaleFactor()
16 | {
17 | var autosaveElements = document.getElementsByName("animScale"); //DOM widget to set scale factor to 100%, 50% or 25%
18 | var autosaveValue = "4"
19 | for (var i=0; i < autosaveElements.length; i++)
20 | {
21 | if (autosaveElements[i].checked)
22 | {
23 | autosaveValue = autosaveElements[i].value;
24 | break;
25 | }
26 | }
27 | if(autosaveValue == "1")
28 | {
29 | return 1;
30 | }
31 | if(autosaveValue == "2")
32 | {
33 | return 2;
34 | }
35 | else
36 | {
37 | return 4;
38 | }
39 | }
40 |
41 | var delay = document.getElementById("animDelay").value;
42 | var scale = getAnimScaleFactor();
43 |
44 | var animation_parts = new Array(paintedCanvases.length);
45 |
46 | var worker = new Worker('animWorker.js');
47 | //worker.onmessage = function(e)
48 | //{
49 | // console.log(e.data);
50 | //}
51 |
52 | //call web worker.
53 | worker.onmessage = function(e)
54 | {
55 | //handle stuff, like get the frame_index
56 | var frame_index = e.data["frame_index"];
57 | var frame_data = e.data["frame_data"];
58 | animation_parts[frame_index] = frame_data;
59 | console.log(frame_index);
60 | for(var j = 0; j < paintedCanvases.length; j++)
61 | {
62 | if(animation_parts[j] == null)
63 | {
64 | return;
65 | }
66 | }
67 | console.log("append");
68 | //check when everything else is done and then do animation_parts.join('') and have fun
69 | var binary_gif = animation_parts.join('');
70 | var data_url = 'data:image/gif;base64,'+window.btoa(binary_gif);
71 |
72 | var gifItem = new Image();
73 | gifItem.src = data_url;
74 | var thumbs = document.getElementById("gifContainer");
75 |
76 | //nuke all child nodes!
77 | while(thumbs.hasChildNodes())
78 | {
79 | thumbs.removeChild(thumbs.lastChild);
80 | }
81 | document.getElementById("gifContainer").appendChild(gifItem);
82 | }
83 |
84 | var imageItems = new Array(); //hacky way to ensure that an arbitrary number of onload events occur.
85 | //paintedCanvases is an array of canvas data generated by a canvas toDataURL calls elsewhere in the parent scope. Replicate this how you wish.
86 | for(var i = 0; i < paintedCanvases.length; i++)
87 | {
88 | imageItems[i] = new Image();
89 | imageItems[i].src = paintedCanvases[i];
90 | imageItems[i].isloaded = false;
91 | imageItems[i].index = i;
92 | imageItems[i].onload = function()
93 | {
94 | var scratchCanvas = document.createElement("canvas");
95 | scratchCanvas.width = comicPane.width/scale;
96 | scratchCanvas.height = comicPane.height/scale;
97 | var scratchCanvasContext = scratchCanvas.getContext("2d");
98 | scratchCanvasContext.fillStyle = "#FFFFFF";
99 | scratchCanvasContext.fillRect(0,0,scratchCanvas.width, scratchCanvas.height);
100 | scratchCanvasContext.drawImage(this,0,0,scratchCanvas.width,scratchCanvas.height);
101 | var imdata = scratchCanvasContext.getImageData(0,0, scratchCanvas.width, scratchCanvas.height).data;
102 | console.log(this.index);
103 | worker.postMessage({"frame_index": this.index, "delay": delay, "frame_length":paintedCanvases.length-1, "height":scratchCanvas.height, "width":scratchCanvas.width, "imageData":imdata}); //imarray.join(',')
104 |
105 | }
106 | }
107 | }
--------------------------------------------------------------------------------
/experiment/writeOutAnimGifV2-All.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Like Effect Generator
8 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/kickstart-grid.css:
--------------------------------------------------------------------------------
1 | /*
2 | 99Lime.com HTML KickStart by Joshua Gatcke
3 | kickstart-grids.css
4 |
5 | DO NOT EDIT THIS FILE unless you know what you are doing.
6 | */
7 | /*---------------------------------
8 | GRID/COLUMNS
9 | -----------------------------------
10 | tinyfluidgrid.com
11 | & girlfriendnyc.com
12 | with changes by 99Lime
13 | -----------------------------------*/
14 | /*
15 | & Columns : 12
16 | & Gutter %: 20%
17 | & MaxWidth: 1280px
18 | */
19 |
20 | .grid{
21 | max-width:1220px;
22 | margin:0 auto;
23 | padding:0 2em;
24 | }
25 |
26 | .grid.flex{
27 | width:100%;
28 | max-width:100%;
29 | padding:0 2%;
30 | padding:2em;
31 | }
32 |
33 | .row{
34 | display:block;
35 | overflow:hidden;
36 | clear:both;
37 | }
38 |
39 | *[class*="col_"].alpha{margin-left:0;}
40 | *[class*="col_"].omega{margin-right:0;}
41 |
42 | .col_1 { width: 6.6666666666667%; }
43 | .col_2 { width: 15%; }
44 | .col_3 { width: 23.333333333333%; }
45 | .col_4 { width: 31.666666666667%; }
46 | .col_5 { width: 40%; }
47 | .col_6 { width: 48.333333333333%; }
48 | .col_7 { width: 56.666666666667%; }
49 | .col_8 { width: 65%; }
50 | .col_9 { width: 73.333333333333%; }
51 | .col_10 { width: 81.666666666667%; }
52 | .col_11 { width: 90%; }
53 | .col_12 { width: 98.333333333333%; }
54 |
55 | *[class*="col_"]{
56 | margin-left: 0.83333333333333%;
57 | margin-right: 0.83333333333333%;
58 | margin-top:0.5em;
59 | margin-bottom:0.5em;
60 | float: left;
61 | display: block;
62 | }
63 |
64 | .grid img{
65 | max-width: 100%;
66 | height:auto;
67 | }
68 |
69 | .clear{clear:both;display:block;overflow:hidden;visibility:hidden;width:0;height:0}
70 | .clearfix:after{clear:both;content:' ';display:block;font-size:0;line-height:0;visibility:hidden;width:0;height:0}
71 | * html .clearfix, *:first-child+html .clearfix{zoom:1}
72 |
73 | /* Viewable Grids
74 | To view your grids, add the class .visible to any grid container.
75 | This will add a background color so you can see the layout of your grids.
76 | */
77 | *[class*="col_"].visible{
78 | background:#eee;
79 | border:1px dotted #ccc;
80 | }
81 |
82 |
83 | /*---------------------------------
84 | Responsive Grid Media Queries - 1280, 1024, 768, 480
85 | 1280-1024 - desktop (default grid)
86 | 1024-768 - tablet landscape
87 | 768-480 - tablet
88 | 480-less - phone landscape & smaller
89 | -----------------------------------*/
90 | @media all and (min-width: 1024px) and (max-width: 1280px) {
91 |
92 | .grid *[class*="col_"]{}
93 | .grid{max-width: 1024px;}
94 | .show-desktop {display:block;}
95 | .hide-desktop {display:none;}
96 | .show-tablet {display:none;}
97 | .hide-tablet {display:block;}
98 | .show-phone {display:none;}
99 | .hide-phone {display:block;}
100 |
101 | }
102 |
103 | @media all and (min-width: 768px) and (max-width: 1024px) {
104 |
105 | .grid *[class*="col_"]{}
106 | .grid{max-width: 768px;}
107 | .show-desktop {display:none;}
108 | .hide-desktop {display:block;}
109 | .show-tablet {display:block;}
110 | .hide-tablet {display:none;}
111 | .show-phone {display:none;}
112 | .hide-phone {display:block;}
113 |
114 | }
115 |
116 |
117 | @media all and (min-width: 480px) and (max-width: 768px) {
118 |
119 | .grid *[class*="col_"]{
120 | float:none;
121 | width:auto;
122 | clear:both;
123 | display:block;
124 | }
125 |
126 | /* columns inside of columns */
127 | .grid *[class*="col_"] [class*="col_"]{
128 | margin-left:0;
129 | margin-right:0;
130 | width:100%;
131 | }
132 |
133 | .grid{max-width: 480px;}
134 | .show-desktop {display:none;}
135 | .hide-desktop {display:block;}
136 | .show-tablet {display:block;}
137 | .hide-tablet {display:none;}
138 | .show-phone {display:none;}
139 | .hide-phone {display:block;}
140 |
141 | }
142 |
143 | @media all and (max-width: 480px) {
144 |
145 | .grid *[class*="col_"]{
146 | float:none;
147 | width:auto;
148 | clear:both;
149 | display:block;
150 | }
151 |
152 | /* columns inside of columns */
153 | .grid *[class*="col_"] [class*="col_"]{
154 | margin-left:0;
155 | margin-right:0;
156 | width:100%;
157 | }
158 |
159 | .grid{max-width: 100%;/*320*/}
160 | .show-desktop {display:none;}
161 | .hide-desktop {display:block;}
162 | .show-tablet {display:none;}
163 | .hide-tablet {display:block;}
164 | .show-phone {display:block;}
165 | .hide-phone {display:none;}
166 |
167 | }
168 |
--------------------------------------------------------------------------------
/lib/FileSaver.min.js:
--------------------------------------------------------------------------------
1 | /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
2 | var saveAs=saveAs||function(view){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=new MouseEvent("click");node.dispatchEvent(event)},is_safari=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){if(typeof file==="string"){get_URL().revokeObjectURL(file)}else{file.remove()}};if(view.chrome){revoker()}else{setTimeout(revoker,arbitrary_revoke_timeout)}},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);var i=event_types.length;while(i--){var listener=filesaver["on"+event_types[i]];if(typeof listener==="function"){try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}}},auto_bom=function(blob){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)){return new Blob(["\ufeff",blob],{type:blob.type})}return blob},FileSaver=function(blob,name,no_auto_bom){if(!no_auto_bom){blob=auto_bom(blob)}var filesaver=this,type=blob.type,blob_changed=false,object_url,target_view,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(target_view&&is_safari&&typeof FileReader!=="undefined"){var reader=new FileReader;reader.onloadend=function(){var base64Data=reader.result;target_view.location.href="data:attachment/file"+base64Data.slice(base64Data.search(/[,;]/));filesaver.readyState=filesaver.DONE;dispatch_all()};reader.readAsDataURL(blob);filesaver.readyState=filesaver.INIT;return}if(blob_changed||!object_url){object_url=get_URL().createObjectURL(blob)}if(target_view){target_view.location.href=object_url}else{var new_tab=view.open(object_url,"_blank");if(new_tab==undefined&&is_safari){view.location.href=object_url}}filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE){return func.apply(this,arguments)}}},create_if_not_found={create:true,exclusive:false},slice;filesaver.readyState=filesaver.INIT;if(!name){name="download"}if(can_use_save_link){object_url=get_URL().createObjectURL(blob);setTimeout(function(){save_link.href=object_url;save_link.download=name;click(save_link);dispatch_all();revoke(object_url);filesaver.readyState=filesaver.DONE});return}if(view.chrome&&type&&type!==force_saveable_type){slice=blob.slice||blob.webkitSlice;blob=slice.call(blob,0,blob.size,force_saveable_type);blob_changed=true}if(webkit_req_fs&&name!=="download"){name+=".download"}if(type===force_saveable_type||webkit_req_fs){target_view=view}if(!req_fs){fs_error();return}fs_min_size+=blob.size;req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL();filesaver.readyState=filesaver.DONE;dispatch(filesaver,"writeend",event);revoke(file)};writer.onerror=function(){var error=writer.error;if(error.code!==error.ABORT_ERR){fs_error()}};"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]});writer.write(blob);filesaver.abort=function(){writer.abort();filesaver.readyState=filesaver.DONE};filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:false},abortable(function(file){file.remove();save()}),abortable(function(ex){if(ex.code===ex.NOT_FOUND_ERR){save()}else{fs_error()}}))}),fs_error)}),fs_error)},FS_proto=FileSaver.prototype,saveAs=function(blob,name,no_auto_bom){return new FileSaver(blob,name,no_auto_bom)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(blob,name,no_auto_bom){if(!no_auto_bom){blob=auto_bom(blob)}return navigator.msSaveOrOpenBlob(blob,name||"download")}}FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE;dispatch(filesaver,"abort")};FS_proto.readyState=FS_proto.INIT=0;FS_proto.WRITING=1;FS_proto.DONE=2;FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null;return saveAs}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})}
3 |
--------------------------------------------------------------------------------
/lib/HTML-KickStart-master/css/kickstart-slideshow.css:
--------------------------------------------------------------------------------
1 | /*---------------------------------
2 | SLIDESHOW2 - Slight Fixes for the slideshow layout *needs work
3 | -----------------------------------*/
4 |
5 | .slideshow{
6 | clear:both;
7 | margin:0;
8 | padding:0;
9 | width:auto;
10 | height:auto;
11 | overflow:hidden;
12 | }
13 |
14 | .slideshow li{
15 | list-style-type:none;
16 | margin:0;
17 | padding:0;
18 | float:left;
19 | display:block;
20 | }
21 |
22 | /**
23 | * BxSlider v4.0 - Fully loaded, responsive content slider
24 | * http://bxslider.com
25 | *
26 | * Written by: Steven Wanderski, 2012
27 | * http://stevenwanderski.com
28 | * (while drinking Belgian ales and listening to jazz)
29 | *
30 | * CEO and founder of bxCreative, LTD
31 | * http://bxcreative.com
32 | */
33 |
34 |
35 | /** RESET AND LAYOUT
36 | ===================================*/
37 | .bx-wrapper, .bx-wrapper *{
38 | -webkit-box-sizing: content-box; /* Safari/Chrome, other WebKit */
39 | -moz-box-sizing: content-box; /* Firefox, other Gecko */
40 | box-sizing: content-box; /* Opera/IE 8+ */
41 | }
42 |
43 | .bx-wrapper {
44 | position: relative;
45 | margin: 0 0 60px;
46 | padding: 0;
47 | *zoom: 1;
48 | }
49 |
50 | .bx-wrapper img {
51 | width: 100%;
52 | display: block;
53 | }
54 |
55 | /** THEME
56 | ===================================*/
57 |
58 | .bx-wrapper .bx-viewport {
59 | -moz-box-shadow: 0 0 5px #ccc;
60 | -webkit-box-shadow: 0 0 5px #ccc;
61 | box-shadow: 0 0 5px #ccc;
62 | border: solid #fff 5px;
63 | left: 0;
64 | background: #fff;
65 | }
66 |
67 | .bx-wrapper .bx-pager,
68 | .bx-wrapper .bx-controls-auto {
69 | position: absolute;
70 | bottom: -30px;
71 | width: 100%;
72 | }
73 |
74 | /* LOADER */
75 |
76 | .bx-wrapper .bx-loading {
77 | min-height: 50px;
78 | background: url(img/bx_loader.gif) center center no-repeat #fff;
79 | height: 100%;
80 | width: 100%;
81 | position: absolute;
82 | top: 0;
83 | left: 0;
84 | z-index: 2000;
85 | }
86 |
87 | /* PAGER */
88 |
89 | .bx-wrapper .bx-pager {
90 | text-align: center;
91 | font-size: .85em;
92 | font-family: Arial;
93 | font-weight: bold;
94 | color: #666;
95 | padding-top: 20px;
96 | }
97 |
98 | .bx-wrapper .bx-pager .bx-pager-item,
99 | .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
100 | display: inline-block;
101 | *zoom: 1;
102 | *display: inline;
103 | }
104 |
105 | .bx-wrapper .bx-pager.bx-default-pager a {
106 | background: #666;
107 | text-indent: -9999px;
108 | display: block;
109 | width: 10px;
110 | height: 10px;
111 | margin: 0 5px;
112 | outline: 0;
113 | -moz-border-radius: 5px;
114 | -webkit-border-radius: 5px;
115 | border-radius: 5px;
116 | }
117 |
118 | .bx-wrapper .bx-pager.bx-default-pager a:hover,
119 | .bx-wrapper .bx-pager.bx-default-pager a.active {
120 | background: #000;
121 | }
122 |
123 | /* DIRECTION CONTROLS (NEXT / PREV) */
124 |
125 | .bx-wrapper .bx-prev {
126 | left: 10px;
127 | background: url(img/controls.png) no-repeat 0 -32px;
128 | }
129 |
130 | .bx-wrapper .bx-next {
131 | right: 10px;
132 | background: url(img/controls.png) no-repeat -43px -32px;
133 | }
134 |
135 | .bx-wrapper .bx-prev:hover {
136 | background-position: 0 0;
137 | }
138 |
139 | .bx-wrapper .bx-next:hover {
140 | background-position: -43px 0;
141 | }
142 |
143 | .bx-wrapper .bx-controls-direction a {
144 | position: absolute;
145 | top: 50%;
146 | margin-top: -16px;
147 | outline: 0;
148 | width: 32px;
149 | height: 32px;
150 | text-indent: -9999px;
151 | z-index: 9999;
152 | }
153 |
154 | .bx-wrapper .bx-controls-direction a.disabled {
155 | display: none;
156 | }
157 |
158 | /* AUTO CONTROLS (START / STOP) */
159 |
160 | .bx-wrapper .bx-controls-auto {
161 | text-align: center;
162 | }
163 |
164 | .bx-wrapper .bx-controls-auto .bx-start {
165 | display: block;
166 | text-indent: -9999px;
167 | width: 10px;
168 | height: 11px;
169 | outline: 0;
170 | background: url(img/controls.png) -86px -11px no-repeat;
171 | margin: 0 3px;
172 | }
173 |
174 | .bx-wrapper .bx-controls-auto .bx-start:hover,
175 | .bx-wrapper .bx-controls-auto .bx-start.active {
176 | background-position: -86px 0;
177 | }
178 |
179 | .bx-wrapper .bx-controls-auto .bx-stop {
180 | display: block;
181 | text-indent: -9999px;
182 | width: 9px;
183 | height: 11px;
184 | outline: 0;
185 | background: url(img/controls.png) -86px -44px no-repeat;
186 | margin: 0 3px;
187 | }
188 |
189 | .bx-wrapper .bx-controls-auto .bx-stop:hover,
190 | .bx-wrapper .bx-controls-auto .bx-stop.active {
191 | background-position: -86px -33px;
192 | }
193 |
194 | /* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
195 |
196 | .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
197 | text-align: left;
198 | width: 80%;
199 | }
200 |
201 | .bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
202 | right: 0;
203 | width: 35px;
204 | }
205 |
206 | /* IMAGE CAPTIONS */
207 |
208 | .bx-wrapper .bx-caption {
209 | position: absolute;
210 | bottom: 0;
211 | left: 0;
212 | background: #666\9;
213 | background: rgba(80, 80, 80, 0.75);
214 | width: 100%;
215 | }
216 |
217 | .bx-wrapper .bx-caption span {
218 | color: #fff;
219 | font-family: Arial;
220 | display: block;
221 | font-size: .85em;
222 | padding: 10px;
223 | }
224 |
--------------------------------------------------------------------------------
/10thAnniv-Spec.md:
--------------------------------------------------------------------------------
1 | 10周年記念仕様いいねボタン風EAG 仕様
2 | ======================================
3 |
4 | ## やりたいこと
5 |
6 | * まずはそれっぽいものを再現
7 | * パーティクルの画像も差し替えられるようにする
8 |
9 | ## 解析
10 |
11 | * パーティクル
12 | * 星(3軸回転、色も変わってる?、消滅時拡大率1軸に対し0)
13 | * 正方形(3軸回転、消滅時拡大率1軸に対し0)
14 | * 扇型( **1軸** 回転、表示角度の大きさが変わる(変わる速度も一定でない)、消滅時にポップエフェクト)
15 | * ドーナツ(通常仕様のポップエフェクトみたいなやつ)
16 | * 正円(消滅時単純縮小)
17 | * 三角形(3軸回転、消滅時拡大率1軸に対し0)
18 | * パーティクルに対する単純な物理演算
19 | * 重力(下向き定数値の力)
20 | * 空気抵抗(速度に比例する抵抗力)
21 | * 登場エフェクト
22 | * 8方向に線分(ポップエフェクト)
23 | * 移動しながら伸びて消える
24 | * 始点と終点の座標変化をずらして実現
25 | * 始点は速く2乗に比例して最終座標に移動、終点は遅く線形に最終座標に移動
26 | * 多分色はまた虹色
27 | * と思ったら、1つの直線上に乗ってる線分は同じ色
28 | * 色はバラバラなので、虹色で近似してしまって良いと思われる
29 | * ハートマークは単純に跳ねるだけ(y座標が二乗に比例)
30 | * じゃない!!!!
31 | * 着地時にちょっとオーバーシュートする(下に凸の2次関数をくっつければ良いと思われる)
32 |
33 | ## パーティクルエンジン
34 |
35 | ### 単純物理演算
36 | パーティクルの **位置のみ** を決定する。
37 |
38 | * 鉛直方向の計算式は以下の通り
39 | * 速度モデル : vy = (v0y - gn / k) e^(-kt) + gn / k (g : 鉛直下方向重力定数(正値), k : 空気抵抗定数, v0y : 初速度, gn := -g)
40 | * **位置モデル** : y = - ((k v0y - gn) / k^2) e^(-kt) + gn/k t + (y0 + ((k v0y - gn) / k^2))
41 | * == y = - ((k v0y + g) / k^2) e^(-kt) - g/k t + (y0 + (k v0y + g) / k^2) (y0 : 初期位置)
42 | * **y0** はハート出現位置で固定(一応パーティクルオブジェクトで指定)
43 | * g は、直接決めるのではなく、最終的な落下速度 **vly** の値を用いて、**g = - k vly** で決定する
44 | * **vly, k** はパーティクルエンジン内で決める
45 | * **v0y** はパーティクル1個毎に決める
46 | * 水平方向の計算式は以下の通り
47 | * 速度モデル : vx = (v0x) e^(-kt) (v0x : 初速度, k : 空気抵抗定数)
48 | * **位置モデル** : x = - (v0x / k) e^(-kt) + x0 + v0x / k (x0 : 初期位置)
49 | * **x0** はハート出現位置で固定(一応パーティクルオブジェクトで指定)
50 | * **k** はパーティクルエンジン内で決める(一応、XとY軸で別々に設定できるようにした方が良いかも)
51 | * **v0x** はパーティクル1個毎に決める
52 |
53 | ### パーティクルオブジェクト
54 | パーティクルの"挙動"を決定し、その"挙動"から実際のSVGツリー構造を返却するメソッドを持つオブジェクト
55 |
56 | * 基底クラス `ParticleBase`
57 | * protected getBaseXY(t: number) -> { x: number, y: number } : 上記の単純物理演算を、オブジェクトに設定された初速度・初期位置を用いて実行し、XY座標を含む基礎座標を返却する
58 | * abstract public generateSVGTree(t: number) ->