• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Smooth transition in between values that are stored in a array

Community Beginner ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

Hey there, i loaded a json file that contains temperature values. 
I managed to display the changing values (every two seconds) on a textlayer. So far so good.

But, let's say i would like to add an illustration of a thermometer with a raising/falling indicator. When i parse the value and link it to the y-size property - the thermometer jumps from value to value. 
How would i go about to achieve a smooth transition from one value to the next…?

thank you

 

TOPICS
Expressions

Views

222

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 18, 2020 Apr 18, 2020

You can use functions like linear() or ease() to interpolate values. could be as trivial as linear(time,timeA,timeB,valueA,valueB), though likely in your case you would have to write a for() loop that dynamically switches the values for every new segment.

 

Mylenium

Votes

Translate

Translate
LEGEND ,
Apr 18, 2020 Apr 18, 2020

Copy link to clipboard

Copied

You can use functions like linear() or ease() to interpolate values. could be as trivial as linear(time,timeA,timeB,valueA,valueB), though likely in your case you would have to write a for() loop that dynamically switches the values for every new segment.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

LATEST

Thanks for the fast reply. I managed to get the values to move smoothly.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines