Jump to content
Search Community

fatlinesofcode last won the day on August 1 2013

fatlinesofcode had the most liked content!

fatlinesofcode

Members
  • Posts

    4
  • Joined

  • Last visited

  • Days Won

    1

fatlinesofcode last won the day on August 1 2013

fatlinesofcode had the most liked content!

Recent Profile Visitors

1,610 profile views

fatlinesofcode's Achievements

2

Reputation

  1. ah ok, yep I was looking for min/max velocity.
  2. Well I guess you could say its announced now. It does work really well, I wrote my own velocity tracker first by dividing the difference between mouse position angles by the difference in mouseevent's timestamps. But I found the Velocitytracker more robust. One issue I did notice is that when I then used 'auto' velocity the min and max values seems to be ignored. I solved by using my own min/max e.g. // min, max ignored ThrowPropsPlugin.to(dial, {throwProps: {rotation: 'auto', resistance: 10, min:-300, max:300}}); // custom min/max var v = Math.min(300, Math.max(ThrowPropsPlugin.getVelocity(dial, "rotation"), -300)); ThrowPropsPlugin.to(dial, {throwProps: {rotation: v, resistance: 10}});
  3. Hmm, maybe I didn't phrase that question too well. Although I'm using Easel and Canvas the issue is not canvas specific. The velocity tracking part of my math wasn't great but I discovered you have functionality built-in to Throwprops to handle this. I applied: var onMousedown = function(event) { ThrowPropsPlugin.track(dial, "rotation") } var onMouseup = function (event) { ThrowPropsPlugin.to(dial, {throwProps: {rotation: 'auto'}}); } and it all works perfectly now. Here is a link to the updated plunkr. http://plnkr.co/edit/QRjVbJS05X9A06JJ99cE?p=preview The examples on your site are great but it can be difficult when they all seem to be CSS only. It would be nice if we could get a few more canvas examples as the GSAP does work very well it.
  4. Is it possible to use the Draggable util class with Canvas, specifically EaselJS? I'm creating a dial that can you can spin using throwprops. I wasnt able to use Draggable so I've recycled the dial AS3 example from here http://www.greensock.com/throwprops/ It works ok, but its a bit glitchy compared with the Draggable CSS example. I've created a Fiddle with the two versions, http://plnkr.co/edit/eKVhZL5ulUWqj5pgP9BA?p=preview Is the something wrong with the math on my Canvas version perhaps? Any tips would be appreciated.
×
×
  • Create New...