Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried to copy and make something similar to the Demo #2

Open
fuegod03 opened this issue Mar 22, 2019 · 1 comment
Open

Tried to copy and make something similar to the Demo #2

fuegod03 opened this issue Mar 22, 2019 · 1 comment

Comments

@fuegod03
Copy link

Error on console:
pieces.min.js:1 Uncaught TypeError: Cannot read property '0' of undefined at l.getPieces (pieces.min.js:1) at l.animatePieces (pieces.min.js:1) at l.showPieces (pieces.min.js:1) at showItems (app.js:122) at app.js:116 getPieces @ pieces.min.js:1 animatePieces @ pieces.min.js:1 showPieces @ pieces.min.js:1 showItems @ app.js:122 (anonymous) @ app.js:116

Error on file pices.min.js:
this.items[t].pieces:g.arr(t)?t.forEach(function(t){return g.num(t)?a(i,e.items[t].pieces):a(i,t.pieces)}):i=t.pieces,i},getItems:function(t){var e=this,i=[];return g.und(t)?i=this.items:g.num(t)?i=this.items[t]:g.arr(t)?t.forEach(function(t){return g.num(t)?i.push(e.items[t]):i.push(t)}):i=t,i},animatePieces:function(t){var e=n({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&&anime.remove(i),e.ignore&&e.ignore.forEach(function(t){return delete e[t]}),e.singly?i.forEach(function(t){return anime(n(e,{targets:t}))}):anime(n(e,{targets:i}))},showPieces:function(t){var e=n({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=n({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=n({easing:"linear",remove:!0},t,{targets:this.getItems(t.items)});e.remove&&anime.remove(e.targets),anime(e)}},l.version="1.0.0",l.random=anime.random,l.extend=n,l});

@lmgonzalves
Copy link
Owner

Please sorry the delay.
Can you provide a minimal working demo on jsfiddle or codepen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants