Skip to main content
Participant
December 11, 2020
Answered

I want to eliminate the decimal point of the location that is automatically generated when using the

  • December 11, 2020
  • 2 replies
  • 536 views

Use 0 to 30 frames,
Position 0,0 > 10,0

0,0 > 0.333,0 > 0.666,0 > 1,0~~~

 

The x-values are 0.333-like...
So I'm looking for a way to get rid of the decimal point and move around because it's cloudy across two pixels and the image doesn't look good.

 

I'm like below,
I want the decimal places to be rounded up.

 

I'm not doing this.

0,0 -> 0,0 > 1,0 > 1,0 like
I hope the low numeric value is removed when the animation plays.
I'd like to do a pixel animation.
Without high resolution,

I will make an animation just to fit the low resolution.

 

--- 한글 

 

0 ~ 30 프레임 사용한다고 했을 때
포지션 0,0 에서 10,0까지 이동 한다면

0,0 > 0.333,0 > 0.666,0 > 1,0~~~

처럼 x값이 0.333 같이 되는데...
이렇게 되면 , 이미지 처리할 때 한픽셀에 나와야하는게 두픽셀에 걸쳐서 흐리게 나오고, 이미지가 보기 안좋아져서, 소수점을 버리고 이동하는 방법이 없나 찾고 있습니다.


나는 아래 처럼,
소수점 이하가 반올림 되는 것을 원해요

0,0 -> 0,0 > 1,0 > 10 like
애니메이션이 재생될 때 낮은 숫자 값이 제거되었으면 좋겠습니다.
픽셀 애니메이션을 하고 싶습니다.
높은 해상도를 쓰지 않고,

낮은 해상도에 딱 맞춰서 애니메이션을 만들 것입니다.

    This topic has been closed for replies.
    Correct answer Roland Kahlenberg

    Use the Javascript Method - toFixed(n) where n is the argument used to specify the number of decimal places.

    For an array, this is the syntax -

    [value[0].toFixed(0),value[1].toFixed(0)]

     

    HTH

    2 replies

    Roland Kahlenberg
    Roland KahlenbergCorrect answer
    Legend
    December 16, 2020

    Use the Javascript Method - toFixed(n) where n is the argument used to specify the number of decimal places.

    For an array, this is the syntax -

    [value[0].toFixed(0),value[1].toFixed(0)]

     

    HTH

    Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
    Participant
    December 16, 2020

    holy.. It's perfect for me who only knows how to activate that expression!

    Mylenium
    Legend
    December 11, 2020

    This has been explained several times by Rick Gerard and others. If you look around, I'm sure you can find some posts. The basic drill is to simply use Math.round() and otehr such expressions to quantize the values to full pixel increments.

     

    Mylenium

    Participant
    December 16, 2020

    What should I search for?