Created
April 17, 2022 22:15
-
-
Save david-littlefield/a6688bd1b2a0e024544aed789b2c3f48 to your computer and use it in GitHub Desktop.
[Scale Object to Match Height of Card] Increases or decreases size of object to match the height of card. #after_effects #scale #vertical #card #object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scale | |
var card_layer = comp("Left").layer("Card"); | |
var card_rectangle = card_layer.sourceRectAtTime(); | |
var card_height = card_rectangle.height; | |
var object_layer = thisComp.layer("Object"); | |
var object_rectangle = object_layer.sourceRectAtTime(); | |
var object_height = object_rectangle.height; | |
var height_ratio = (card_height / object_height) * 100; | |
[height_ratio, height_ratio]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment