create animation using bezier curves on java

Viewed 57

I need to animate numbers with bezier curves. create points and gradually connect them with curves until a number is created. I found only tutorials on Java script. how can you write an analogue in java?

I attach an example of the animation structure in java script.

function animate({timing, draw, duration}) {

  let start = performance.now();

  requestAnimationFrame(function animate(time) {

let timeFraction = (time - start) / duration;
if (timeFraction > 1) timeFraction = 1;

let progress = timing(timeFraction);

draw(progress); // отрисовать её

if (timeFraction < 1) {
  requestAnimationFrame(animate);
}

  });
}

How can you even create a smooth drawing of numbers by points?

0 Answers
Related