I cannot get this to work. I suppose I need the plugin before it works, right?
Also another question:
I added the function directly on the onDrag because I have something else going on with it.
Adapted code below:
sym.$("info").hide();
var smallWheel = sym.$('smallWheel');
var bigWheel = sym.$('bigWheel');
var rotationSnap = 45;
Draggable.create(smallWheel, {
type:"rotation",
throwProps:true,
snap:function(endValue) {
return Math.round(endValue / rotationSnap) * rotationSnap;
},
onDrag :function() {
sym.$("rattle")[0].play();
sym.$("info").hide();
TweenLite.set(bigWheel, {rotation:smallDraggable.rotation});
},
//onDrag: syncBigWheel,
onThrowUpdate: syncBigWheel,
onDragEnd: function(){
sym.$("rattle")[0].pause();
sym.$("info").show();
}
});
var smallDraggable = Draggable.get(smallWheel);
function syncBigWheel() {
TweenLite.set(bigWheel, {rotation:smallDraggable.rotation});
}