Code Monkey home page Code Monkey logo

pieces's People

Contributors

lmgonzalves avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pieces's Issues

Doesn't work with very simple usecase

Hi,

With following:

<canvas class="my-canvas"></canvas>

<script src="anime.js"></script>
<script src="pieces.js"></script>
<script>
	var options = {
		canvas: '.my-canvas',
		text: 'Hello World',
		piecesWidth: 10,
		angle: 35
	};
	var myPieces = new Pieces(options);
	myPieces.showPieces();
</script>

I got this:

untitled

I'm using latest version of anime.js and pieces.js, btw I'm using Firefox, latest version.

Image looks Blur on Mobile devices

Hello,
Everything is perfect, but there is a minor issue.
In mobile devices the canvas images showing blurry.
Would you please fix it and make the original smoother also for small devices?
This problem not happening on the responsive settings of the Desktop browser.
Please use real small devices like mobile to check the issue.
Thanks

Maybe it's a solution to it, but how can we apply its pieces? - https://dev.to/pahund/how-to-fix-blurry-text-on-html-canvases-on-mobile-phones-3iep

Tried to copy and make something similar to the Demo

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});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.