Hi,
I have function below and want to add the function to timeline and be-able to change count parameter so can create seperate items. have tried numerous things but stuck.
function dialcalc() {
console.clear();
const count = 600;
const targetPercentage = count / 1140;
newRotation = targetPercentage * 180;
drawTarget = DrawSVGPlugin.getLength(".maskRingTwo") * targetPercentage;
}
gsap
.timeline({
scrollTrigger: {
trigger: "#fastdial",
toggleActions: "restart none none reset"
}
})
.fromTo(".maskRingTwo", { drawSVG: 0 }, { duration: 4, drawSVG: drawTarget })
.to(".needleTwo",{ duration: 4, rotation: newRotation, svgOrigin: "225 200" },0);
Thanks for any help or even a tutorial.