Skip to content

Commit

Permalink
do not apply stretch for remapped frames
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhirkevich committed Jul 23, 2024
1 parent 7e9e437 commit da562ab
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,15 @@ internal abstract class BaseCompositionLayer: BaseLayer() {
this.loadedLayers = (layers - matteLayers).fastFilter { it.matteTarget != BooleanInt.Yes }
return this.loadedLayers!!
}

private fun getRemappedFrame(state: AnimationState): Float {

val frame = timeRemapping?.interpolated(state)
?.times(state.composition.frameRate)
?.minus(state.composition.startFrame)
?: (state.frame - (startTime ?: inPoint ?: 0f) )

return if (timeStretch.absoluteValue > Float.MIN_VALUE && timeStretch != 1f && !isContainerLayer) {
return if (timeRemapping == null && timeStretch.absoluteValue > Float.MIN_VALUE && !isContainerLayer) {
frame / timeStretch
} else frame
}
Expand Down

0 comments on commit da562ab

Please sign in to comment.