Skip to main content
Inspiring
Feb 2, 2024 2:52 PM UTC
Question

HTML5 canvas smoothing tweens

Hello.

Here's the scenario.

I built a HTML5 canvas. 24fps. I used classic tweens to animate a symbol. When published, the animation wasn't 100% smooth.

So I changed the frame rate to 30fps. Perfect. However, the Publications were having problems publishing the banners. The only way around it was to revert to 24fps.

Has anyone else had problems with the smoothness of tweening?

TIA

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

kglad
Community Expert
Community Expert
Feb 2, 2024 2:54 PM UTC

there are the same number of frames in your fps 24 and 30 tests?

Translate
Inspiring
Feb 2, 2024 2:59 PM UTC

No. They both finish at 30 seconds.

Translate
kglad
Community Expert
Community Expert
Feb 2, 2024 3:03 PM UTC

so, the smoothness issue is predictable.  ie, you have a certain amount of movement across a certain number (not time) of frames.  too much movement per frame, you detect unsmooth movement.

 

ie, to fix add more frames to your tween.  if the frame rate is unchanged that will result in slower movment.

Translate