├── .all-contributorsrc ├── .browserslistrc ├── .eslintrc.js ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── Makefile ├── README.md ├── babel.config.js ├── docs ├── base.css ├── favicon.ico ├── img │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ └── 5.jpg ├── index.html └── js │ ├── app.2cc094ac.js │ ├── app.2cc094ac.js.map │ ├── chunk-vendors.0fa28725.js │ └── chunk-vendors.0fa28725.js.map ├── jest.config.js ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── base.css ├── favicon.ico ├── img │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ └── 5.jpg └── index.html ├── src ├── App.vue ├── _index.scss ├── index.js ├── index.vue ├── main.js └── piece │ ├── index.js │ └── transform.js ├── tests └── unit │ ├── .eslintrc.js │ └── example.spec.js └── vue.config.js /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "dreambo8563", 10 | "name": "Vincent Guo", 11 | "avatar_url": "https://avatars2.githubusercontent.com/u/6948318?v=4", 12 | "profile": "https://dreambo8563.github.io/", 13 | "contributions": [ 14 | "code", 15 | "doc", 16 | "infra" 17 | ] 18 | } 19 | ], 20 | "contributorsPerLine": 7, 21 | "projectName": "vue-piece-slider", 22 | "projectOwner": "dreambo8563", 23 | "repoType": "github", 24 | "repoHost": "https://github.com" 25 | } 26 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: ["plugin:vue/essential", "@vue/prettier"], 7 | rules: { 8 | "no-console": process.env.NODE_ENV === "production" ? "error" : "off", 9 | "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off" 10 | }, 11 | parserOptions: { 12 | parser: "babel-eslint" 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "lts/*" 4 | before_install: 5 | - npm i -g npm@latest 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # [1.0.0](https://github.com/dreambo8563/vue-piece-slider/compare/v0.1.1...v1.0.0) (2019-04-29) 3 | 4 | 5 | ### Bug Fixes 6 | 7 | * **arrow:** change html entity ([3857129](https://github.com/dreambo8563/vue-piece-slider/commit/3857129)) 8 | 9 | 10 | 11 | 12 | ## [0.1.1](https://github.com/dreambo8563/vue-piece-slider/compare/v0.1.1-beta.0...v0.1.1) (2019-04-28) 13 | 14 | 15 | 16 | 17 | ## [0.1.1-beta.0](https://github.com/dreambo8563/vue-piece-slider/compare/0b32060...v0.1.1-beta.0) (2019-04-28) 18 | 19 | 20 | ### Features 21 | 22 | * **implement:** almost done ([54e8272](https://github.com/dreambo8563/vue-piece-slider/commit/54e8272)) 23 | * **implement:** basic work version ([0b32060](https://github.com/dreambo8563/vue-piece-slider/commit/0b32060)) 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at dreambo8563@outlook.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Vincent Guo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | lint: 2 | npm run lint 3 | local: 4 | npm run serve 5 | build: 6 | npm run build 7 | pages: 8 | npm run pages 9 | report: 10 | npm run report 11 | test: 12 | npm run test -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-piece-slider ([Demo](https://dreambo8563.github.io/vue-piece-slider/)) 2 | 3 | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9a935d579e394bd38efefd120947288e)](https://app.codacy.com/app/dreambo8563/vue-piece-slider?utm_source=github.com&utm_medium=referral&utm_content=dreambo8563/vue-piece-slider&utm_campaign=Badge_Grade_Dashboard) 4 | [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors) [![Greenkeeper badge](https://badges.greenkeeper.io/dreambo8563/vue-piece-slider.svg)](https://greenkeeper.io/) 5 | [![Build Status](https://travis-ci.org/dreambo8563/vue-piece-slider.svg?branch=master)](https://travis-ci.org/dreambo8563/vue-piece-slider) 6 | [![Known Vulnerabilities](https://snyk.io/test/github/dreambo8563/vue-piece-slider/badge.svg?targetFile=package.json)](https://snyk.io/test/github/dreambo8563/vue-piece-slider?targetFile=package.json) 7 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 8 | ![npm](https://img.shields.io/npm/dt/vue-piece-slider.svg?style=flat) 9 | 10 | This library is a simplified Vue portal of an awesome [Codrops Article](https://tympanus.net/codrops/2018/02/21/animated-fragment-slideshow/) by [Luis Manuel](https://tympanus.net/codrops/author/luis/) (original [source](https://github.com/lmgonzalves/pieces-slider)). 11 | 12 | In this version, just support image type. 13 | 14 | ![](https://raw.githubusercontent.com/dreambo8563/static-assets/master/vue-piece-slider.png) 15 | 16 | ## Install 17 | 18 | ```bash 19 | npm install --save animejs vue-piece-slider 20 | ``` 21 | 22 | ## Usage 23 | 24 | Check out the [Demo](https://dreambo8563.github.io/vue-piece-slider/) to see it in action. 25 | 26 | ```js 27 | 39 | 40 | 79 | 80 | 94 | ``` 95 | 96 | ## Props 97 | 98 | | Property | Type | Default | Description | 99 | | :------- | :-------------- | :------ | :------------------------------------- | 100 | | `list` | Array | [] | The image list | 101 | | `value` | Number \|String | 0 | The activeIndex | 102 | | `arrow` | Booleans | true | if to show the action arrow when hover | 103 | 104 | ## Options 105 | 106 | | Property | Type | Default | Description | 107 | | :-------------- | :------------ | :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 108 | | `angle` | Number | 45 | Rotation angle for pieces. All pieces in the same item will have the same rotation angle. | 109 | | `extraSpacing` | Object | { extraX: 500, extraY: 200 } | Extra space that should be covered by the pieces. You can set a different value for each axis using an Object like: {extraX: 0, extraY: 0}. This is useful if angle != 0. | 110 | | `piecesWidth` | Func \|Number | random(50, 200) | Pieces width. | 111 | | `piecesSpacing` | Func \|Number | 5 | Separation among pieces. | 112 | 113 | more params please follow the [package of Piece](https://github.com/lmgonzalves/pieces) 114 | 115 | ## Credits 116 | 117 | - [Pieces](https://github.com/lmgonzalves/pieces) by Luis Manuel 118 | - Images by [Unsplash.com](https://unsplash.com/) 119 | - [anime.js](http://anime-js.com/) by Julian Garnier 120 | 121 | ## Contributors 122 | 123 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 124 | 125 | 126 | 127 |
Vincent Guo
Vincent Guo

💻 📖 🚇
128 | 129 | 130 | 131 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 132 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [ 4 | "@vue/app", 5 | { 6 | useBuiltIns: false 7 | } 8 | ] 9 | ] 10 | }; 11 | -------------------------------------------------------------------------------- /docs/base.css: -------------------------------------------------------------------------------- 1 | article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;} 2 | *, 3 | *::after, 4 | *::before { 5 | box-sizing: border-box; 6 | } 7 | 8 | html { 9 | background: #fff; 10 | } 11 | 12 | body { 13 | --color-text: #fff; 14 | --color-link: #f0f0f0; 15 | --color-link-hover: #fff; 16 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; 17 | min-height: 100vh; 18 | color: #fff; 19 | color: var(--color-text); 20 | background: linear-gradient(115deg, rgba(86, 216, 228,1) 5%,rgba(159, 1, 234,1) 95%); 21 | -webkit-font-smoothing: antialiased; 22 | -moz-osx-font-smoothing: grayscale; 23 | overflow: hidden; 24 | } 25 | 26 | a { 27 | text-decoration: none; 28 | color: var(--color-link); 29 | outline: none; 30 | } 31 | 32 | a:hover, 33 | a:focus { 34 | color: var(--color-link-hover); 35 | } 36 | 37 | a:focus, 38 | button:focus { 39 | outline: none; 40 | } 41 | 42 | .hidden { 43 | position: absolute; 44 | overflow: hidden; 45 | width: 0; 46 | height: 0; 47 | pointer-events: none; 48 | } 49 | 50 | /* Icons */ 51 | .icon { 52 | display: block; 53 | width: 1.5em; 54 | height: 1.5em; 55 | margin: 0 auto; 56 | fill: currentColor; 57 | } 58 | 59 | .icon--keyboard { 60 | display: none; 61 | } 62 | 63 | main { 64 | position: relative; 65 | width: 100%; 66 | } 67 | 68 | .content { 69 | position: relative; 70 | display: flex; 71 | justify-content: center; 72 | align-items: center; 73 | margin: 0 auto; 74 | min-height: 100vh; 75 | } 76 | 77 | .content--fixed { 78 | position: fixed; 79 | z-index: 10000; 80 | top: 0; 81 | left: 0; 82 | display: grid; 83 | align-content: space-between; 84 | width: 100%; 85 | max-width: none; 86 | min-height: 0; 87 | height: 100vh; 88 | padding: 1.5em; 89 | pointer-events: none; 90 | grid-template-columns: 50% 50%; 91 | grid-template-rows: auto auto 4em; 92 | grid-template-areas: 'header ...' 93 | '... ...' 94 | 'github demos'; 95 | } 96 | 97 | .content--fixed a { 98 | pointer-events: auto; 99 | } 100 | 101 | /* Header */ 102 | .codrops-header { 103 | position: relative; 104 | z-index: 100; 105 | display: flex; 106 | flex-direction: row; 107 | align-items: flex-start; 108 | align-items: center; 109 | align-self: start; 110 | grid-area: header; 111 | justify-self: start; 112 | } 113 | 114 | .codrops-header__title { 115 | font-size: 1em; 116 | font-weight: bold; 117 | margin: 0; 118 | padding: 0.75em 0; 119 | } 120 | 121 | .info { 122 | margin: 0 0 0 1.25em; 123 | color: var(--color-info); 124 | } 125 | 126 | .github { 127 | display: block; 128 | align-self: end; 129 | grid-area: github; 130 | justify-self: start; 131 | } 132 | 133 | /* Top Navigation Style */ 134 | .codrops-links { 135 | position: relative; 136 | display: flex; 137 | justify-content: center; 138 | margin: 0 1em 0 0; 139 | text-align: center; 140 | white-space: nowrap; 141 | } 142 | 143 | .codrops-icon { 144 | display: inline-block; 145 | margin: 0.15em; 146 | padding: 0.25em; 147 | } 148 | 149 | @media screen and (max-width: 55em) { 150 | body { 151 | overflow: auto; 152 | } 153 | .content { 154 | flex-direction: column; 155 | height: auto; 156 | min-height: 0; 157 | padding-bottom: 10em; 158 | } 159 | .content--fixed { 160 | position: relative; 161 | z-index: 1000; 162 | display: block; 163 | padding: 0.85em; 164 | } 165 | .codrops-header { 166 | flex-direction: column; 167 | align-items: center; 168 | } 169 | .codrops-header__title { 170 | font-weight: bold; 171 | padding-bottom: 0.25em; 172 | text-align: center; 173 | } 174 | .info { 175 | margin: 0; 176 | } 177 | .github { 178 | display: block; 179 | margin: 1em auto; 180 | } 181 | .codrops-links { 182 | margin: 0; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/favicon.ico -------------------------------------------------------------------------------- /docs/img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/img/1.jpg -------------------------------------------------------------------------------- /docs/img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/img/2.jpg -------------------------------------------------------------------------------- /docs/img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/img/3.jpg -------------------------------------------------------------------------------- /docs/img/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/img/4.jpg -------------------------------------------------------------------------------- /docs/img/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dreambo8563/vue-piece-slider/04ae3b07ef832433365c8067ecbf9396538c6b46/docs/img/5.jpg -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | vue-piece-slider
-------------------------------------------------------------------------------- /docs/js/app.2cc094ac.js: -------------------------------------------------------------------------------- 1 | (function(t){function e(e){for(var n,s,o=e[0],c=e[1],l=e[2],u=0,p=[];u-1}var p={arr:function(t){return Array.isArray(t)},obj:function(t){return u(Object.prototype.toString.call(t),"Object")},str:function(t){return"string"===typeof t},fnc:function(t){return"function"===typeof t},und:function(t){return"undefined"===typeof t},num:function(t){return"number"===typeof t}};function d(t,e){for(var i in e)t[i]=p.arr(e[i])?e[i].slice(0):e[i];return t}function f(t,e){t||(t={});for(var i=1;i=0?t%360:t%360+360}function _(t,e){return t&&e&&t.left<=e.right&&e.left<=t.right&&t.top<=e.bottom&&e.top<=t.bottom}function S(t,e,i,n,a,r){return n<2*r&&(r=n/2),a<2*r&&(r=a/2),t.beginPath(),t.moveTo(e+r,i),t.arcTo(e+n,i,e+n,i+a,r),t.arcTo(e+n,i+a,e,i+a,r),t.arcTo(e,i+a,e,i,r),t.arcTo(e,i,e+n,i,r),t.closePath(),t}function k(t){var e=f({},this.defaults.animation,t.animation);this.init(f({},this.defaults,t,{animation:e}))}k.prototype={defaults:{canvas:null,items:[],image:[],text:[],path:[],x:0,y:0,w:[0],h:[0],tx:[0],ty:[0],itemSeparation:1,piecesWidth:[5],piecesSpacing:[5],extraSpacing:[{extraX:0,extraY:0}],angle:[0],rotate:[0],translate:[{translateX:0,translateY:0}],padding:[0],opacity:[1],fontFamily:["sans-serif"],fontSize:[100],fontWeight:[900],color:["#000"],backgroundColor:!1,backgroundRadius:0,ghostOpacity:0,checkHover:!1,animation:{duration:[1e3],delay:[0],easing:["easeInOutCubic"]},saveShowState:!1,debug:!1,ready:null},init:function(t){var e=this;this.initOptions(t),this.initCanvas(t),t.items.length&&t.items.forEach(function(i){switch(e.setItemOptions(t,i.options),i.type){case"image":return e.initImage(i.value)}}),this.drawList.length&&(this.initPieces(t),this.loop(t)),t.ready&&t.ready()},initOptions:function(t){var e=t.canvas;p.str(e)&&(t.canvas=document.querySelector(e)),v(t,["items","image","text","path","w","h","tx","ty","piecesWidth","piecesSpacing","extraSpacing","angle","rotate","translate","svgWidth","svgHeight","color","backgroundColor","backgroundRadius","padding","opacity","fontFamily","fontSize","fontWeight","ghost","ghostOpacity"]),v(t.animation,["duration","delay","easing"]),this.v={},this.o=[],this.drawList=[]},initCanvas:function(t){t.canvas?t.ctx=t.canvas.getContext("2d"):f(t,m()),t.canvas.width=this.width=t.canvas.clientWidth,t.canvas.height=this.height=t.canvas.clientHeight},setItemOptions:function(t,e){var i=this.drawList.length;x(t,i,["text","color","backgroundColor","backgroundRadius","padding","fontFamily","fontSize","fontWeight","svgWidth","svgHeight","piecesWidth","piecesSpacing","extraSpacing","opacity","angle","rotate","translate","ghost","ghostOpacity","w","h","tx","ty"],this.v),x(t.animation,i,["duration","delay","easing"],this.v),this.o.push(f({},this.v,e||{}))},initImage:function(t){var e=this.o[this.o.length-1],i=p.fnc(e.padding)?e.padding():e.padding;i=i?i.split(" ").map(function(t){return parseFloat(t)}):[0,0,0,0];var n=m(),a=n.canvas,r=n.ctx;a.width=t.width+2+i[1]+i[3],a.height=t.height+2+i[0]+i[2],e.backgroundColor&&(r.fillStyle=e.backgroundColor,e.backgroundRadius?(S(r,1,1,a.width-2,a.height-2,e.backgroundRadius),r.fill()):r.fillRect(1,1,a.width-2,a.height-2)),r.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,1+i[3],1+i[0],t.width,t.height),this.drawList.push(a)},initPieces:function(t){var e,i,n,a,r,s,o,c,l,u,d,f=this,g=new h;this.pieces=[],this.items=[];var v,x=t.itemSeparation;o="center"===t.x?this.width/2-(this.drawList.reduce(function(t,e){return t+e.width},0)+x*this.drawList.length)/2:t.x,l="center"===t.y?this.height/2-this.drawList[0].height/2:t.y,this.drawList.forEach(function(h,y){v=f.o[y];var b=p.obj(v.extraSpacing)?v.extraSpacing:{extraX:v.extraSpacing,extraY:v.extraSpacing},_=b.extraX,S=b.extraY,k=p.fnc(v.translate)?v.translate():p.obj(v.translate)?v.translate:{translateX:v.translate,translateY:v.translate},I=k.translateX,P=k.translateY;"centerAll"===t.x&&(o=f.width/2-h.width/2),"centerAll"===t.y&&(l=f.height/2-h.height/2),o+=I,l+=P,r={angle:null},a={last:r,index:y,y:l,extraY:S,img:h},a.x=c=o,a.width=h.width,a.height=h.height,a.angle=w(v.angle),a.rotate=w(v.rotate),a.ghost=v.ghost,a.ghostDashArray=[20,10],a.ghostDashOffset=a.ghostDashArray[0]+a.ghostDashArray[1],a.ghostOpacity=v.ghostOpacity,a.pieces=[],a.shown=!1,a.hidden=!0,f.items.push(a);var O=m(),j=O.ctx,M=O.canvas;M.width=a.width,M.height=a.height;while(c-(a.width+2*_)=e.x&&this.mouseX<=e.x+e.width&&this.mouseY>=e.y&&this.mouseY<=e.y+e.height;return i&&!e.hover?p.fnc(t.itemEnter)&&t.itemEnter(e):!i&&e.hover&&p.fnc(t.itemLeave)&&t.itemLeave(e),e.hover=i,i},renderDebug:function(t,e){if(t.debug){t.checkHover&&(t.ctx.fillStyle=e.hover?"rgba(255, 0, 0, 0.3)":"rgba(0, 0, 0, 0.3)",t.ctx.fillRect(e.x,e.y,e.width,e.height));var i=e.rect;i&&(t.ctx.setLineDash([]),t.ctx.strokeStyle="rgba(255, 0, 0, 0.5)",t.ctx.strokeRect(i.left,i.top,i.right-i.left,i.bottom-i.top))}},loop:function(t){var e=this;this.frame=requestAnimationFrame(this.loop.bind(this,t)),this.clearRect(t),this.hoverItem=null,this.items.forEach(function(i){t.checkHover&&e.checkHover(t,i)&&(e.hoverItem=i),e.renderPieces(t,i),e.renderDebug(t,i)})},stop:function(){cancelAnimationFrame(this.frame),c["a"].remove(this.items),c["a"].remove(this.pieces)},getPieces:function(t){var e=this,i=[];return p.und(t)?i=this.pieces:p.num(t)?i=this.items[t].pieces:p.arr(t)?t.forEach(function(t){return p.num(t)?g(i,e.items[t].pieces):g(i,t.pieces)}):i=t.pieces,i},getItems:function(t){var e=this,i=[];return p.und(t)?i=this.items:p.num(t)?i=this.items[t]:p.arr(t)?t.forEach(function(t){return p.num(t)?i.push(e.items[t]):i.push(t)}):i=t,i},animatePieces:function(t){var e=f({duration:function(t){return t.duration},delay:function(t){return t.delay},easing:function(t){return t.easing},remove:!0,singly:!1},t),i=this.getPieces(t.items);e.remove&&c["a"].remove(i),e.ignore&&e.ignore.forEach(function(t){return delete e[t]}),e.singly?i.forEach(function(t){return Object(c["a"])(f(e,{targets:t}))}):Object(c["a"])(f(e,{targets:i}))},showPieces:function(t){var e=f({x:function(t){return t.s_x},y:function(t){return t.s_y},w:function(t){return t.s_w},h:function(t){return t.s_h},tx:function(t){return t.s_tx},ty:function(t){return t.s_ty}},t);this.animatePieces(e)},hidePieces:function(t){var e=f({x:function(t){return t.h_x},y:function(t){return t.h_y},w:function(t){return t.h_w},h:function(t){return t.h_h},tx:function(t){return t.h_tx},ty:function(t){return t.h_ty}},t);this.animatePieces(e)},animateItems:function(t){var e=f({easing:"linear",remove:!0},t,{targets:this.getItems(t.items)});e.remove&&c["a"].remove(e.targets),Object(c["a"])(e)}},k.random=c["a"].random;var I=k;function P(t){for(var e=1;e60){var e=t.animatables[0].target,i=e.ty;c["a"].remove(e),Object(c["a"])({targets:e,ty:e.h_ty<300?[{value:i+10,duration:1e3},{value:i-10,duration:2e3},{value:i,duration:1e3}]:[{value:i-10,duration:1e3},{value:i+10,duration:2e3},{value:i,duration:1e3}],duration:2e3,easing:"linear",loop:!0})}}})},hideItems:function(){this.piecesSlider&&this.piecesSlider.hidePieces({items:[this.value]})},prevItem:function(){if(this.piecesSlider){this.hideItems();var t=this.value>0?this.value-1:this.list.length-1;this.$emit("input",t)}},nextItem:function(){if(this.piecesSlider){this.hideItems();var t=this.valuediv{margin:20px}#app .toolbox>div label{margin-right:10px;font-weight:700;color:#fff;font-size:1em;padding:.75em}#app .toolbox>div input{vertical-align:middle}#app .toolbox>div .range-slider__value{display:inline-block;position:relative;width:60px;color:#fff;line-height:20px;text-align:center;border-radius:3px;background:#2c3e50;padding:5px 10px;margin-left:8px}#app .toolbox>div .range-slider__value:after{position:absolute;top:50%;left:-6px;width:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:0;font-weight:700;border-top:6px solid transparent;border-right:6px solid #2c3e50;border-bottom:6px solid transparent;content:""}',""])},e959:function(t,e,i){var n=i("a33e");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("499e").default;a("6f19147e",n,!0,{sourceMap:!1,shadowMode:!1})}}); 2 | //# sourceMappingURL=app.2cc094ac.js.map -------------------------------------------------------------------------------- /docs/js/app.2cc094ac.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.vue?c364","webpack:///./src/index.vue?5c34","webpack:///./src/App.vue?c509","webpack:///./src/index.vue?9e5a","webpack:///./src/piece/transform.js","webpack:///./src/piece/index.js","webpack:///src/index.vue","webpack:///./src/index.vue?aff9","webpack:///./src/index.vue","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue","webpack:///./src/main.js","webpack:///./src/App.vue?792d","webpack:///./src/index.vue?556c","webpack:///./src/App.vue?90ba","webpack:///./src/App.vue?29c9"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","app","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__","_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default","content","locals","add","default","sourceMap","shadowMode","Appvue_type_template_id_de737d04_render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","id","for","_v","directives","rawName","options","extraSpacing","expression","modifiers","number","type","min","max","domProps","on","__r","$event","$set","_n","target","blur","$forceUpdate","_s","extraX","extraY","angle","piecesWidth","ty","piecesSpacing","arrow","list","click","model","callback","$$v","activeIndex","staticRenderFns","lib_vue_loader_options_srcvue_type_template_id_63231486_render","_g","$listeners","_l","v","ref","getImgRef","refInFor","src","alt","prevItem","_e","nextItem","lib_vue_loader_options_srcvue_type_template_id_63231486_staticRenderFns","Transform","ctx","reset","rotate","rad","Math","cos","sin","m11","m12","m21","m22","translate","x","y","transformPoint","px","py","setTransform","stringContains","str","text","indexOf","is","arr","a","Array","isArray","obj","toString","fnc","und","num","extendSingle","source","extend","arguments","pushArray","arr2","createCanvas","canvas","document","createElement","getContext","toArray","keys","forEach","setValuesByIndex","index","values","areObjectsEquals","obj1","obj2","some","copyValues","to","from","normalizeAngle","intersect","b","left","right","top","bottom","roundRect","w","h","beginPath","moveTo","arcTo","closePath","Pieces","animation","defaults","init","items","image","path","tx","itemSeparation","translateX","translateY","padding","opacity","fontFamily","fontSize","fontWeight","color","backgroundColor","backgroundRadius","ghostOpacity","checkHover","duration","delay","easing","saveShowState","debug","ready","_this","initOptions","initCanvas","item","setItemOptions","initImage","drawList","initPieces","loop","querySelector","width","clientWidth","height","clientHeight","itemOptions","split","map","parseFloat","_createCanvas","fillStyle","fill","fillRect","drawImage","naturalWidth","naturalHeight","piecesHeight","last","lx","_this2","pieces","reduce","img","_ref","_ref2","ghost","ghostDashArray","ghostDashOffset","shown","hidden","_createCanvas2","h_x","s_x","h_y","s_y","h_w","s_w","h_h","s_h","h_tx","s_tx","h_ty","s_ty","save","PI","rect","clip","globalAlpha","ratio","restore","imgShown","rectShown","renderPieces","redraw","setLineDash","strokeStyle","stroke","isItemDifferent","isItemShown","every","isItemHidden","clearRect","p1","p2","p3","p4","itemRect","_this3","newRedraw","clear","extendRect","strokeRect","rect1","rect2","hover","mouseX","mouseY","itemEnter","itemLeave","renderDebug","_this4","frame","requestAnimationFrame","hoverItem","stop","cancelAnimationFrame","anime","remove","getPieces","_this5","targetPieces","getItems","_this6","targetItems","animatePieces","singly","targets","ignore","prop","showPieces","hidePieces","animateItems","random","imageOptions","src_piece","lib_vue_loader_options_srcvue_type_script_lang_js_","props","String","Number","Boolean","methods","initVar","imagesReady","piecesSlider","refName","concat","loadImg","slidesNum","slideImage","Image","onload","initSlider","$refs","_objectSpread","showItems","update","anim","progress","piece","animatables","anime_es","hideItems","currentIndex","$emit","watch","handler","deep","mounted","srcvue_type_script_lang_js_","component","componentNormalizer","Appvue_type_script_lang_js_","components","Slider","console","info","src_Appvue_type_script_lang_js_","App_component","App","Vue","config","productionTip","render","$mount","_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__","_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_App_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAA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,GACF,EACA,KACA,KACA,OAIe8Q,EAAAD,UChBfE,OAAIC,OAAOC,eAAgB,EAE3B,IAAIF,OAAI,CACNG,OAAQ,SAAAjM,GAAC,OAAIA,EAAE6L,MACdK,OAAO,6CCPV,IAAAC,EAAA5W,EAAA,QAAA6W,EAAA7W,EAAA2B,EAAAiV,GAAmiBC,EAAG,0BCAtiBzW,EAAAC,EAAAD,QAA2BJ,EAAQ,OAARA,EAAoD,GAK/EI,EAAArB,KAAA,CAAcsB,EAAA1B,EAAS,kpCAAkpC,2BCLzqCyB,EAAAC,EAAAD,QAA2BJ,EAAQ,OAARA,EAAoD,GAK/EI,EAAArB,KAAA,CAAcsB,EAAA1B,EAAS,yhCAA2hC,2BCFljC,IAAA0D,EAAcrC,EAAQ,QACtB,kBAAAqC,MAAA,EAA4ChC,EAAA1B,EAAS0D,EAAA,MACrDA,EAAAC,SAAAjC,EAAAD,QAAAiC,EAAAC,QAEA,IAAAC,EAAUvC,EAAQ,QAA0DwC,QAC5ED,EAAA,WAAAF,GAAA,GAA6CI,WAAA,EAAAC,YAAA","file":"js/app.2cc094ac.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/vue-piece-slider/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import mod from \"-!../node_modules/vue-style-loader/index.js??ref--8-oneOf-1-0!../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-4!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../node_modules/vue-style-loader/index.js??ref--8-oneOf-1-0!../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-4!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&lang=scss&\"","// style-loader: Adds some css to the DOM by adding a \n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=63231486&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=de737d04&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from \"vue\";\nimport App from \"./App.vue\";\n\nVue.config.productionTip = false;\n\nnew Vue({\n render: h => h(App)\n}).$mount(\"#app\");\n","import mod from \"-!../node_modules/vue-style-loader/index.js??ref--8-oneOf-1-0!../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-4!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../node_modules/vue-style-loader/index.js??ref--8-oneOf-1-0!../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-4!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=scss&\"","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".vue-piece-slider{position:relative;text-align:center;padding:0;width:100%;height:400px}.vue-piece-slider,.vue-piece-slider:hover .pieces-slider__button{display:inline-block}.vue-piece-slider .pieces-slider__slide{position:absolute;right:100%}.vue-piece-slider .pieces-slider__slide .pieces-slider__image{max-width:400px;max-height:200px;display:none}.vue-piece-slider .pieces-slider__canvas{position:relative;width:100%;height:100%;-webkit-transition:opacity .2s;transition:opacity .2s}.vue-piece-slider .pieces-slider__canvas--hidden{opacity:0;-webkit-transition-duration:.3s;transition-duration:.3s}.vue-piece-slider .pieces-slider__button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:none;position:absolute;left:0;top:50%;border:none;outline:0;padding:0;margin:0;width:36px;height:36px;background-color:rgba(31,45,61,.11);color:#fff;text-align:center;border-radius:50%;font-size:1.5em;font-weight:700;cursor:pointer;-webkit-transition:background-color .1s;transition:background-color .1s;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-piece-slider .pieces-slider__button--next{left:auto;right:0}\", \"\"]);\n\n// exports\n","exports = module.exports = require(\"../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"#app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}#app .slider{width:400px;height:200px}#app .toolbox{margin-right:100px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}#app .toolbox>div{margin:20px}#app .toolbox>div label{margin-right:10px;font-weight:700;color:#fff;font-size:1em;padding:.75em}#app .toolbox>div input{vertical-align:middle}#app .toolbox>div .range-slider__value{display:inline-block;position:relative;width:60px;color:#fff;line-height:20px;text-align:center;border-radius:3px;background:#2c3e50;padding:5px 10px;margin-left:8px}#app .toolbox>div .range-slider__value:after{position:absolute;top:50%;left:-6px;width:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:0;font-weight:700;border-top:6px solid transparent;border-right:6px solid #2c3e50;border-bottom:6px solid transparent;content:\\\"\\\"}\", \"\"]);\n\n// exports\n","// style-loader: Adds some css to the DOM by adding a 183 | -------------------------------------------------------------------------------- /src/_index.scss: -------------------------------------------------------------------------------- 1 | .vue-piece-slider { 2 | &:hover { 3 | .pieces-slider__button { 4 | display: inline-block; 5 | } 6 | } 7 | position: relative; 8 | text-align: center; 9 | padding: 0; 10 | display: inline-block; 11 | width: 100%; 12 | height: 400px; 13 | /* Make all slides absolutes and hide them */ 14 | .pieces-slider__slide { 15 | position: absolute; 16 | right: 100%; 17 | .pieces-slider__image { 18 | max-width: 400px; 19 | max-height: 200px; 20 | display: none; 21 | } 22 | } 23 | 24 | /* Define image dimensions and also hide them */ 25 | 26 | /* Canvas with viewport width and height */ 27 | .pieces-slider__canvas { 28 | position: relative; 29 | width: 100%; 30 | height: 100%; 31 | transition: 0.2s opacity; 32 | } 33 | 34 | /* Class for when we resize */ 35 | .pieces-slider__canvas--hidden { 36 | opacity: 0; 37 | transition-duration: 0.3s; 38 | } 39 | 40 | /* Navigation buttons */ 41 | .pieces-slider__button { 42 | user-select: none; 43 | display: none; 44 | position: absolute; 45 | left: 0; 46 | top: 50%; 47 | border: none; 48 | outline: 0; 49 | padding: 0; 50 | margin: 0; 51 | width: 36px; 52 | height: 36px; 53 | background-color: rgba(31, 45, 61, 0.11); 54 | color: #fff; 55 | text-align: center; 56 | border-radius: 50%; 57 | font-size: 1.5em; 58 | font-weight: bold; 59 | cursor: pointer; 60 | transition: 0.1s background-color; 61 | transform: translateY(-50%); 62 | } 63 | 64 | .pieces-slider__button--next { 65 | left: auto; 66 | right: 0; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import pieceSlider from "./index.vue"; 2 | export default pieceSlider; 3 | -------------------------------------------------------------------------------- /src/index.vue: -------------------------------------------------------------------------------- 1 | 27 | 199 | 202 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./App.vue"; 3 | 4 | Vue.config.productionTip = false; 5 | 6 | new Vue({ 7 | render: h => h(App) 8 | }).$mount("#app"); 9 | -------------------------------------------------------------------------------- /src/piece/index.js: -------------------------------------------------------------------------------- 1 | import Transform from "./transform"; 2 | import anime from "animejs"; 3 | // Utils 4 | 5 | function stringContains(str, text) { 6 | return str.indexOf(text) > -1; 7 | } 8 | 9 | const is = { 10 | arr: a => Array.isArray(a), 11 | obj: a => stringContains(Object.prototype.toString.call(a), "Object"), 12 | str: a => typeof a === "string", 13 | fnc: a => typeof a === "function", 14 | und: a => typeof a === "undefined", 15 | num: a => typeof a === "number" 16 | }; 17 | 18 | function extendSingle(target, source) { 19 | for (let key in source) 20 | target[key] = is.arr(source[key]) ? source[key].slice(0) : source[key]; 21 | return target; 22 | } 23 | 24 | // eslint-disable-next-line no-unused-vars 25 | function extend(target, source) { 26 | if (!target) target = {}; 27 | for (let i = 1; i < arguments.length; i++) extendSingle(target, arguments[i]); 28 | return target; 29 | } 30 | 31 | function pushArray(arr, arr2) { 32 | arr.push.apply(arr, arr2); 33 | } 34 | 35 | function createCanvas() { 36 | const canvas = document.createElement("canvas"); 37 | const ctx = canvas.getContext("2d"); 38 | return { canvas, ctx }; 39 | } 40 | 41 | function toArray(obj, keys) { 42 | keys.forEach(key => { 43 | if (!is.arr(obj[key])) obj[key] = is.und(obj[key]) ? [] : [obj[key]]; 44 | }); 45 | } 46 | 47 | function setValuesByIndex(obj, index, keys, values) { 48 | let value; 49 | keys.forEach(key => { 50 | value = obj[key][index]; 51 | if (!is.und(value)) { 52 | values[key] = value; 53 | } 54 | }); 55 | return values; 56 | } 57 | 58 | function areObjectsEquals(obj1, obj2, keys) { 59 | return !keys.some(key => obj1[key] !== obj2[key]); 60 | } 61 | 62 | function copyValues(to, from, keys) { 63 | keys.forEach(key => (to[key] = from[key])); 64 | } 65 | 66 | function normalizeAngle(angle) { 67 | return angle >= 0 ? angle % 360 : (angle % 360) + 360; 68 | } 69 | 70 | function intersect(a, b) { 71 | return ( 72 | a && 73 | b && 74 | a.left <= b.right && 75 | b.left <= a.right && 76 | a.top <= b.bottom && 77 | b.top <= a.bottom 78 | ); 79 | } 80 | 81 | // https://stackoverflow.com/a/7838871/4908989 82 | function roundRect(ctx, x, y, w, h, r) { 83 | if (w < 2 * r) r = w / 2; 84 | if (h < 2 * r) r = h / 2; 85 | ctx.beginPath(); 86 | ctx.moveTo(x + r, y); 87 | ctx.arcTo(x + w, y, x + w, y + h, r); 88 | ctx.arcTo(x + w, y + h, x, y + h, r); 89 | ctx.arcTo(x, y + h, x, y, r); 90 | ctx.arcTo(x, y, x + w, y, r); 91 | ctx.closePath(); 92 | return ctx; 93 | } 94 | 95 | // Pieces 96 | 97 | function Pieces(options) { 98 | const animation = extend({}, this.defaults.animation, options.animation); 99 | this.init(extend({}, this.defaults, options, { animation })); 100 | } 101 | 102 | Pieces.prototype = { 103 | defaults: { 104 | canvas: null, 105 | items: [], 106 | image: [], 107 | text: [], 108 | path: [], 109 | x: 0, 110 | y: 0, 111 | w: [0], 112 | h: [0], 113 | tx: [0], 114 | ty: [0], 115 | itemSeparation: 1, 116 | piecesWidth: [5], 117 | piecesSpacing: [5], 118 | extraSpacing: [{ extraX: 0, extraY: 0 }], 119 | angle: [0], 120 | rotate: [0], 121 | translate: [{ translateX: 0, translateY: 0 }], 122 | padding: [0], 123 | opacity: [1], 124 | fontFamily: ["sans-serif"], 125 | fontSize: [100], 126 | fontWeight: [900], 127 | color: ["#000"], 128 | backgroundColor: false, 129 | backgroundRadius: 0, 130 | ghostOpacity: 0, 131 | checkHover: false, 132 | animation: { duration: [1000], delay: [0], easing: ["easeInOutCubic"] }, 133 | saveShowState: false, 134 | debug: false, 135 | ready: null 136 | }, 137 | 138 | init(options) { 139 | this.initOptions(options); 140 | this.initCanvas(options); 141 | // this.initEvents(options); 142 | if (options.items.length) { 143 | options.items.forEach(item => { 144 | this.setItemOptions(options, item.options); 145 | switch (item.type) { 146 | case "image": 147 | return this.initImage(item.value); 148 | } 149 | }); 150 | } 151 | 152 | if (this.drawList.length) { 153 | this.initPieces(options); 154 | this.loop(options); 155 | } 156 | if (options.ready) { 157 | options.ready(); 158 | } 159 | }, 160 | 161 | initOptions(options) { 162 | const { canvas } = options; 163 | if (is.str(canvas)) options.canvas = document.querySelector(canvas); 164 | toArray(options, [ 165 | "items", 166 | "image", 167 | "text", 168 | "path", 169 | "w", 170 | "h", 171 | "tx", 172 | "ty", 173 | "piecesWidth", 174 | "piecesSpacing", 175 | "extraSpacing", 176 | "angle", 177 | "rotate", 178 | "translate", 179 | "svgWidth", 180 | "svgHeight", 181 | "color", 182 | "backgroundColor", 183 | "backgroundRadius", 184 | "padding", 185 | "opacity", 186 | "fontFamily", 187 | "fontSize", 188 | "fontWeight", 189 | "ghost", 190 | "ghostOpacity" 191 | ]); 192 | toArray(options.animation, ["duration", "delay", "easing"]); 193 | this.v = {}; 194 | this.o = []; 195 | this.drawList = []; 196 | }, 197 | 198 | initCanvas(options) { 199 | if (options.canvas) { 200 | options.ctx = options.canvas.getContext("2d"); 201 | } else { 202 | extend(options, createCanvas()); 203 | } 204 | options.canvas.width = this.width = options.canvas.clientWidth; 205 | options.canvas.height = this.height = options.canvas.clientHeight; 206 | }, 207 | 208 | setItemOptions(options, itemOptions) { 209 | const index = this.drawList.length; 210 | setValuesByIndex( 211 | options, 212 | index, 213 | [ 214 | "text", 215 | "color", 216 | "backgroundColor", 217 | "backgroundRadius", 218 | "padding", 219 | "fontFamily", 220 | "fontSize", 221 | "fontWeight", 222 | "svgWidth", 223 | "svgHeight", 224 | "piecesWidth", 225 | "piecesSpacing", 226 | "extraSpacing", 227 | "opacity", 228 | "angle", 229 | "rotate", 230 | "translate", 231 | "ghost", 232 | "ghostOpacity", 233 | "w", 234 | "h", 235 | "tx", 236 | "ty" 237 | ], 238 | this.v 239 | ); 240 | setValuesByIndex( 241 | options.animation, 242 | index, 243 | ["duration", "delay", "easing"], 244 | this.v 245 | ); 246 | this.o.push(extend({}, this.v, itemOptions || {})); 247 | }, 248 | 249 | initImage(image) { 250 | const o = this.o[this.o.length - 1]; 251 | let padding = is.fnc(o.padding) ? o.padding() : o.padding; 252 | padding = padding 253 | ? padding.split(" ").map(p => parseFloat(p)) 254 | : [0, 0, 0, 0]; 255 | const { canvas, ctx } = createCanvas(); 256 | canvas.width = image.width + 2 + padding[1] + padding[3]; 257 | canvas.height = image.height + 2 + padding[0] + padding[2]; 258 | if (o.backgroundColor) { 259 | ctx.fillStyle = o.backgroundColor; 260 | if (o.backgroundRadius) { 261 | roundRect( 262 | ctx, 263 | 1, 264 | 1, 265 | canvas.width - 2, 266 | canvas.height - 2, 267 | o.backgroundRadius 268 | ); 269 | ctx.fill(); 270 | } else { 271 | ctx.fillRect(1, 1, canvas.width - 2, canvas.height - 2); 272 | } 273 | } 274 | ctx.drawImage( 275 | image, 276 | 0, 277 | 0, 278 | image.naturalWidth, 279 | image.naturalHeight, 280 | 1 + padding[3], 281 | 1 + padding[0], 282 | image.width, 283 | image.height 284 | ); 285 | this.drawList.push(canvas); 286 | }, 287 | 288 | initPieces(options) { 289 | const t = new Transform(); 290 | let piecesWidth, piecesHeight, piecesSpacing, item, last, p, x, lx, y, w, h; 291 | this.pieces = []; 292 | this.items = []; 293 | const itemSeparation = options.itemSeparation; 294 | x = 295 | options.x === "center" 296 | ? this.width / 2 - 297 | (this.drawList.reduce((a, b) => a + b.width, 0) + 298 | itemSeparation * this.drawList.length) / 299 | 2 300 | : options.x; 301 | y = 302 | options.y === "center" 303 | ? this.height / 2 - this.drawList[0].height / 2 304 | : options.y; 305 | let o; 306 | this.drawList.forEach((img, index) => { 307 | o = this.o[index]; 308 | 309 | const { extraX, extraY } = is.obj(o.extraSpacing) 310 | ? o.extraSpacing 311 | : { extraX: o.extraSpacing, extraY: o.extraSpacing }; 312 | const { translateX, translateY } = is.fnc(o.translate) 313 | ? o.translate() 314 | : is.obj(o.translate) 315 | ? o.translate 316 | : { translateX: o.translate, translateY: o.translate }; 317 | 318 | if (options.x === "centerAll") { 319 | x = this.width / 2 - img.width / 2; 320 | } 321 | if (options.y === "centerAll") { 322 | y = this.height / 2 - img.height / 2; 323 | } 324 | 325 | x += translateX; 326 | y += translateY; 327 | 328 | last = { angle: null }; // Force first redraw 329 | item = { last, index, y, extraY, img }; 330 | item.x = lx = x; 331 | item.width = img.width; 332 | item.height = img.height; 333 | item.angle = normalizeAngle(o.angle); 334 | item.rotate = normalizeAngle(o.rotate); 335 | item.ghost = o.ghost; 336 | item.ghostDashArray = [20, 10]; 337 | item.ghostDashOffset = item.ghostDashArray[0] + item.ghostDashArray[1]; 338 | item.ghostOpacity = o.ghostOpacity; 339 | item.pieces = []; 340 | item.shown = false; 341 | item.hidden = true; 342 | this.items.push(item); 343 | 344 | // Shown img 345 | const { ctx, canvas } = createCanvas(); 346 | canvas.width = item.width; 347 | canvas.height = item.height; 348 | 349 | while (lx - (item.width + extraX * 2) < item.x) { 350 | piecesWidth = is.fnc(o.piecesWidth) ? o.piecesWidth() : o.piecesWidth; 351 | piecesHeight = item.height + extraY * 2; 352 | piecesSpacing = is.fnc(o.piecesSpacing) 353 | ? o.piecesSpacing() 354 | : o.piecesSpacing; 355 | w = Math.min(is.fnc(o.w) ? o.w() : o.w, piecesWidth); 356 | h = Math.min(is.fnc(o.h) ? o.h() : o.h, piecesHeight); 357 | last = {}; 358 | p = { last, item }; 359 | p.h_x = p.x = last.x = lx - extraX + piecesWidth / 2 - w / 2; 360 | p.s_x = lx - extraX; 361 | p.h_y = p.y = last.y = y + item.height / 2 - h / 2; 362 | p.s_y = y - extraY; 363 | p.h_w = p.w = last.w = w; 364 | p.s_w = piecesWidth; 365 | p.h_h = p.h = last.h = h; 366 | p.s_h = piecesHeight; 367 | p.h_tx = p.s_tx = p.tx = last.tx = is.fnc(o.tx) ? o.tx() : o.tx; 368 | p.h_ty = p.ty = last.ty = extraY + (is.fnc(o.ty) ? o.ty() : o.ty); 369 | p.s_ty = extraY; 370 | p.opacity = is.fnc(o.opacity) ? o.opacity() : o.opacity; 371 | p.duration = is.fnc(o.duration) ? o.duration() : o.duration; 372 | p.delay = is.fnc(o.delay) ? o.delay() : o.delay; 373 | p.easing = o.easing; 374 | item.pieces.push(p); 375 | this.pieces.push(p); 376 | lx += piecesWidth + piecesSpacing; 377 | 378 | // Draw p for shown img 379 | ctx.save(); 380 | t.translate(item.width / 2, item.height / 2); 381 | t.rotate((item.angle * Math.PI) / 180); 382 | t.translate(-item.width / 2, -item.height / 2); 383 | t.translate(p.s_tx, p.s_ty - item.extraY); 384 | t.translate(p.s_x + p.s_w / 2 - item.x, p.s_y + p.s_h / 2 - item.y); 385 | t.apply(ctx); 386 | ctx.beginPath(); 387 | ctx.rect(-p.s_w / 2, -p.s_h / 2, p.s_w, p.s_h); 388 | ctx.clip(); 389 | t.reset(ctx); 390 | ctx.globalAlpha = p.opacity; 391 | 392 | const ratio = item.img.height / item.img.width; 393 | ctx.drawImage( 394 | item.img, 395 | (1 - ratio) / 2, 396 | ratio / 2, 397 | item.img.width - (1 - ratio), 398 | item.img.height - ratio 399 | ); 400 | 401 | ctx.restore(); 402 | } 403 | 404 | item.imgShown = canvas; 405 | item.rectShown = { 406 | left: item.x, 407 | top: item.y, 408 | right: item.x + item.width, 409 | bottom: item.y + item.height 410 | }; 411 | 412 | if (options.x !== "centerAll") { 413 | x += img.width + itemSeparation; 414 | } 415 | }); 416 | }, 417 | 418 | renderPieces(o, item) { 419 | const { ctx } = o; 420 | const t = new Transform(); 421 | let angle, rotate; 422 | 423 | if (item.redraw) { 424 | item.redraw = false; 425 | if (item.shown && o.saveShowState) { 426 | ctx.drawImage( 427 | item.imgShown, 428 | 0, 429 | 0, 430 | item.width, 431 | item.height, 432 | item.x, 433 | item.y, 434 | item.width, 435 | item.height 436 | ); 437 | } else if (!item.hidden) { 438 | angle = normalizeAngle(item.angle); 439 | rotate = normalizeAngle(item.rotate); 440 | item.pieces.forEach(p => { 441 | ctx.save(); 442 | 443 | t.translate(item.x, item.y); 444 | t.translate(item.width / 2, item.height / 2); 445 | t.rotate(((angle + rotate) * Math.PI) / 180); 446 | t.translate(-item.width / 2, -item.height / 2); 447 | t.translate(p.tx, p.ty - item.extraY); 448 | t.translate(p.x + p.w / 2 - item.x, p.y + p.h / 2 - item.y); 449 | t.apply(ctx); 450 | ctx.beginPath(); 451 | ctx.rect(-p.w / 2, -p.h / 2, p.w, p.h); 452 | 453 | if (o.debug) { 454 | ctx.setLineDash([]); 455 | ctx.strokeStyle = "black"; 456 | ctx.stroke(); 457 | } else { 458 | ctx.clip(); 459 | } 460 | 461 | t.translate(-(p.x + p.w / 2 - item.x), -(p.y + p.h / 2 - item.y)); 462 | t.translate(item.width / 2, item.height / 2); 463 | t.rotate((-angle * Math.PI) / 180); 464 | t.translate(-item.width / 2, -item.height / 2); 465 | t.apply(ctx); 466 | ctx.globalAlpha = p.opacity; 467 | 468 | const ratio = item.img.height / item.img.width; 469 | ctx.drawImage( 470 | item.img, 471 | (1 - ratio) / 2, 472 | ratio / 2, 473 | item.img.width - (1 - ratio), 474 | item.img.height - ratio 475 | ); 476 | 477 | t.reset(); 478 | ctx.restore(); 479 | }); 480 | } 481 | } 482 | }, 483 | 484 | isItemDifferent(item) { 485 | return ( 486 | !areObjectsEquals(item, item.last, ["angle"]) || 487 | item.pieces.some( 488 | p => !areObjectsEquals(p, p.last, ["x", "y", "w", "h", "tx", "ty"]) 489 | ) 490 | ); 491 | }, 492 | 493 | isItemShown(item) { 494 | return item.pieces.every( 495 | p => 496 | p.x === p.s_x && 497 | p.y === p.s_y && 498 | p.w === p.s_w && 499 | p.h === p.s_h && 500 | p.tx === p.s_tx && 501 | p.ty === p.s_ty 502 | ); 503 | }, 504 | 505 | isItemHidden(item) { 506 | return item.pieces.every(p => p.w === 0 && p.h === 0); 507 | }, 508 | 509 | clearRect(o) { 510 | const t = new Transform(); 511 | let newRedraw = false, 512 | x, 513 | y, 514 | w, 515 | h, 516 | p1, 517 | p2, 518 | p3, 519 | p4, 520 | left, 521 | top, 522 | right, 523 | bottom, 524 | itemRect, 525 | angle, 526 | rotate, 527 | clear = null; 528 | 529 | // Discover modified items, and initial clear rect 530 | this.items.forEach(item => { 531 | angle = normalizeAngle(item.angle); 532 | rotate = normalizeAngle(item.rotate); 533 | if (this.isItemDifferent(item)) { 534 | newRedraw = true; 535 | itemRect = null; 536 | item.redraw = true; 537 | item.shown = this.isItemShown(item); 538 | item.hidden = this.isItemHidden(item); 539 | copyValues(item.last, item, ["angle"]); 540 | item.pieces.forEach(p => { 541 | let { last } = p; 542 | t.translate(item.x, item.y); 543 | t.translate(item.width / 2, item.height / 2); 544 | t.rotate(((angle + rotate) * Math.PI) / 180); 545 | t.translate(-item.width / 2, -item.height / 2); 546 | t.translate(last.tx, last.ty - item.extraY); 547 | t.translate( 548 | last.x + last.w / 2 - item.x, 549 | last.y + last.h / 2 - item.y 550 | ); 551 | 552 | x = -last.w / 2 - 1; 553 | y = -last.h / 2 - 1; 554 | w = last.w + 2; 555 | h = last.h + 2; 556 | 557 | p1 = t.transformPoint(x, y); 558 | p2 = t.transformPoint(x + w, y); 559 | p3 = t.transformPoint(x + w, y + h); 560 | p4 = t.transformPoint(x, y + h); 561 | 562 | left = Math.min(p1[0], p2[0], p3[0], p4[0]); 563 | top = Math.min(p1[1], p2[1], p3[1], p4[1]); 564 | right = Math.max(p1[0], p2[0], p3[0], p4[0]); 565 | bottom = Math.max(p1[1], p2[1], p3[1], p4[1]); 566 | 567 | itemRect = this.extendRect(itemRect, { left, top, right, bottom }); 568 | 569 | t.reset(); 570 | copyValues(last, p, ["x", "y", "w", "h", "tx", "ty"]); 571 | }); 572 | clear = this.extendRect(clear, itemRect); 573 | item.rect = item.shown ? item.rectShown : itemRect; 574 | } else { 575 | item.redraw = false; 576 | } 577 | 578 | // Always clear rectShown if hidden and ghost 579 | if (item.hidden && item.ghost) { 580 | newRedraw = true; 581 | clear = this.extendRect(clear, item.rectShown); 582 | } 583 | }); 584 | 585 | // Discover adjacent redraw regions 586 | while (newRedraw) { 587 | newRedraw = false; 588 | this.items.forEach(item => { 589 | if (!item.redraw && intersect(clear, item.rect)) { 590 | newRedraw = true; 591 | item.redraw = true; 592 | clear = this.extendRect(clear, item.rect); 593 | } 594 | }); 595 | } 596 | 597 | // Clear redraw regions 598 | if (clear) { 599 | o.ctx.clearRect( 600 | clear.left, 601 | clear.top, 602 | clear.right - clear.left, 603 | clear.bottom - clear.top 604 | ); 605 | 606 | if (o.debug) { 607 | o.ctx.setLineDash([10]); 608 | o.ctx.strokeStyle = "rgba(255, 0, 0, 1)"; 609 | o.ctx.strokeRect( 610 | clear.left, 611 | clear.top, 612 | clear.right - clear.left, 613 | clear.bottom - clear.top 614 | ); 615 | } 616 | } 617 | }, 618 | 619 | extendRect(rect1, rect2) { 620 | return rect1 && rect2 621 | ? { 622 | left: Math.max(0, Math.min(rect1.left, rect2.left)), 623 | top: Math.max(0, Math.min(rect1.top, rect2.top)), 624 | right: Math.min(this.width, Math.max(rect1.right, rect2.right)), 625 | bottom: Math.min(this.height, Math.max(rect1.bottom, rect2.bottom)) 626 | } 627 | : rect2; 628 | }, 629 | 630 | checkHover(o, item) { 631 | const hover = 632 | this.mouseX >= item.x && 633 | this.mouseX <= item.x + item.width && 634 | this.mouseY >= item.y && 635 | this.mouseY <= item.y + item.height; 636 | if (hover && !item.hover) { 637 | if (is.fnc(o.itemEnter)) { 638 | o.itemEnter(item); 639 | } 640 | } else if (!hover && item.hover) { 641 | if (is.fnc(o.itemLeave)) { 642 | o.itemLeave(item); 643 | } 644 | } 645 | item.hover = hover; 646 | return hover; 647 | }, 648 | 649 | renderDebug(o, item) { 650 | if (o.debug) { 651 | if (o.checkHover) { 652 | o.ctx.fillStyle = item.hover 653 | ? "rgba(255, 0, 0, 0.3)" 654 | : "rgba(0, 0, 0, 0.3)"; 655 | o.ctx.fillRect(item.x, item.y, item.width, item.height); 656 | } 657 | const { rect } = item; 658 | if (rect) { 659 | o.ctx.setLineDash([]); 660 | o.ctx.strokeStyle = "rgba(255, 0, 0, 0.5)"; 661 | o.ctx.strokeRect( 662 | rect.left, 663 | rect.top, 664 | rect.right - rect.left, 665 | rect.bottom - rect.top 666 | ); 667 | } 668 | } 669 | }, 670 | 671 | loop(o) { 672 | this.frame = requestAnimationFrame(this.loop.bind(this, o)); 673 | this.clearRect(o); 674 | this.hoverItem = null; 675 | this.items.forEach(item => { 676 | if (o.checkHover && this.checkHover(o, item)) { 677 | this.hoverItem = item; 678 | } 679 | this.renderPieces(o, item); 680 | this.renderDebug(o, item); 681 | }); 682 | }, 683 | 684 | stop() { 685 | cancelAnimationFrame(this.frame); 686 | anime.remove(this.items); 687 | anime.remove(this.pieces); 688 | }, 689 | 690 | getPieces(items) { 691 | let targetPieces = []; 692 | if (is.und(items)) { 693 | targetPieces = this.pieces; 694 | } else if (is.num(items)) { 695 | targetPieces = this.items[items].pieces; 696 | } else if (is.arr(items)) { 697 | items.forEach(item => 698 | is.num(item) 699 | ? pushArray(targetPieces, this.items[item].pieces) 700 | : pushArray(targetPieces, item.pieces) 701 | ); 702 | } else { 703 | targetPieces = items.pieces; 704 | } 705 | return targetPieces; 706 | }, 707 | 708 | getItems(items) { 709 | let targetItems = []; 710 | if (is.und(items)) { 711 | targetItems = this.items; 712 | } else if (is.num(items)) { 713 | targetItems = this.items[items]; 714 | } else if (is.arr(items)) { 715 | items.forEach(item => 716 | is.num(item) 717 | ? targetItems.push(this.items[item]) 718 | : targetItems.push(item) 719 | ); 720 | } else { 721 | targetItems = items; 722 | } 723 | return targetItems; 724 | }, 725 | 726 | animatePieces(options) { 727 | const o = extend( 728 | { 729 | duration: p => p.duration, 730 | delay: p => p.delay, 731 | easing: p => p.easing, 732 | remove: true, 733 | singly: false 734 | }, 735 | options 736 | ); 737 | 738 | const targets = this.getPieces(options.items); 739 | if (o.remove) { 740 | anime.remove(targets); 741 | } 742 | if (o.ignore) { 743 | o.ignore.forEach(prop => delete o[prop]); 744 | } 745 | if (o.singly) { 746 | targets.forEach(target => anime(extend(o, { targets: target }))); 747 | } else { 748 | anime(extend(o, { targets })); 749 | } 750 | }, 751 | 752 | showPieces(options) { 753 | const o = extend( 754 | { 755 | x: p => p.s_x, 756 | y: p => p.s_y, 757 | w: p => p.s_w, 758 | h: p => p.s_h, 759 | tx: p => p.s_tx, 760 | ty: p => p.s_ty 761 | }, 762 | options 763 | ); 764 | this.animatePieces(o); 765 | }, 766 | 767 | hidePieces(options) { 768 | const o = extend( 769 | { 770 | x: p => p.h_x, 771 | y: p => p.h_y, 772 | w: p => p.h_w, 773 | h: p => p.h_h, 774 | tx: p => p.h_tx, 775 | ty: p => p.h_ty 776 | }, 777 | options 778 | ); 779 | 780 | this.animatePieces(o); 781 | }, 782 | 783 | animateItems(options) { 784 | const o = extend( 785 | { 786 | easing: "linear", 787 | remove: true 788 | }, 789 | options, 790 | { targets: this.getItems(options.items) } 791 | ); 792 | if (o.remove) { 793 | anime.remove(o.targets); 794 | } 795 | anime(o); 796 | } 797 | }; 798 | 799 | // Pieces.version = "1.0.0"; 800 | Pieces.random = anime.random; 801 | // Pieces.extend = extend; 802 | export default Pieces; 803 | -------------------------------------------------------------------------------- /src/piece/transform.js: -------------------------------------------------------------------------------- 1 | // Adapted version of transform.js by Simon Sarris from here: 2 | // https://github.com/simonsarris/Canvas-tutorials/blob/master/transform.js 3 | 4 | function Transform(ctx) { 5 | this.reset(ctx); 6 | } 7 | 8 | Transform.prototype = { 9 | reset(ctx) { 10 | this.m = [1, 0, 0, 1, 0, 0]; 11 | if (ctx) this.apply(ctx); 12 | }, 13 | 14 | rotate(rad) { 15 | const c = Math.cos(rad); 16 | const s = Math.sin(rad); 17 | const m11 = this.m[0] * c + this.m[2] * s; 18 | const m12 = this.m[1] * c + this.m[3] * s; 19 | const m21 = this.m[0] * -s + this.m[2] * c; 20 | const m22 = this.m[1] * -s + this.m[3] * c; 21 | this.m[0] = m11; 22 | this.m[1] = m12; 23 | this.m[2] = m21; 24 | this.m[3] = m22; 25 | }, 26 | 27 | translate(x, y) { 28 | this.m[4] += this.m[0] * x + this.m[2] * y; 29 | this.m[5] += this.m[1] * x + this.m[3] * y; 30 | }, 31 | 32 | transformPoint(px, py) { 33 | const x = px * this.m[0] + py * this.m[2] + this.m[4]; 34 | const y = px * this.m[1] + py * this.m[3] + this.m[5]; 35 | return [x, y]; 36 | }, 37 | 38 | apply(ctx) { 39 | ctx.setTransform( 40 | this.m[0], 41 | this.m[1], 42 | this.m[2], 43 | this.m[3], 44 | this.m[4], 45 | this.m[5] 46 | ); 47 | } 48 | }; 49 | 50 | export default Transform; 51 | -------------------------------------------------------------------------------- /tests/unit/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | jest: true 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /tests/unit/example.spec.js: -------------------------------------------------------------------------------- 1 | // import { shallowMount } from "@vue/test-utils"; 2 | // import HelloWorld from "@/components/HelloWorld.vue"; 3 | 4 | // describe("HelloWorld.vue", () => { 5 | // it("renders props.msg when passed", () => { 6 | // const msg = "new message"; 7 | // const wrapper = shallowMount(HelloWorld, { 8 | // propsData: { msg } 9 | // }); 10 | // expect(wrapper.text()).toMatch(msg); 11 | // }); 12 | // }); 13 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const externals = 2 | process.env.NODE_ENV == "production" && !process.env.DOC_ENV 3 | ? { 4 | animejs: "animejs" 5 | } 6 | : {}; 7 | module.exports = { 8 | publicPath: 9 | process.env.NODE_ENV === "production" ? "/vue-piece-slider/" : "/", 10 | css: { 11 | extract: false 12 | }, 13 | chainWebpack: config => { 14 | config.externals(externals); 15 | } 16 | }; 17 | --------------------------------------------------------------------------------