Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fixed jank in UVOL #9189

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Fixed jank in UVOL #9189

merged 1 commit into from
Nov 1, 2023

Conversation

CITIZENDOT
Copy link
Collaborator

@CITIZENDOT CITIZENDOT commented Nov 1, 2023

Summary

🤖 Generated by Copilot at 02c715b

Refactor and improve UVOL2 component animation logic. Use a new getFrame function to handle frame index calculation for both geometry and texture attributes. Simplify and unify the code in UVOL2Component.ts.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 02c715b

  • Simplify and unify the logic for getting the keyframes for the geometry and texture attributes by introducing a new helper function getFrame that calculates the frame index for a given time and frame rate (link)
  • Use the getFrame function to replace the previous logic for getting the keyframe index for a different target, and handle the cases where the keyframe name is either 'keyframeA' or 'keyframeB' (link, link, link)
  • Improve the logic for calculating the mix ratio for the geometry attribute by using the actual time values of the keyframes, instead of relying on the frame rate and index (link)
  • Add the currentTime parameter to the setTexture function and its call, to pass the current time to the texture attribute (link, link)

🤖 Generated by Copilot at 02c715b

To render some objects with volume
We needed to fix and refactor
We added getFrame
To simplify the game
Of animating UVOL2 with texture

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@speigg speigg added this pull request to the merge queue Nov 1, 2023
Merged via the queue into dev with commit 0697005 Nov 1, 2023
13 checks passed
@speigg speigg deleted the fix-uvol-jank branch November 1, 2023 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants