Purpose of GSAP
In the context of GSAP, what is the primary purpose of the library when building web interfaces?
- An animation library for tweening numeric values in interfaces
- A markup preprocessor
- A data visualization charting engine
- A database query language
- A stylesheet reset and normalizer
Basic Tween Creation
If you want to animate an element from its current properties to new values in GSAP, which method would you typically call?
- to()
- from()
- set()
- sequence()
- go()
Sequencing Animations
When sequencing multiple animations with precise timing in GSAP, which feature lets you control their order on a single time axis?
- timeline
- timelime
- queue
- pipeline
- group
Understanding Eases
In GSAP, what does an ease control when animating values like x or opacity?
- It defines how the animation accelerates and decelerates over time
- It sets the number of elements to animate
- It chooses the rendering engine
- It toggles GPU acceleration
- It locks the frame rate at 60
Staggered Animations
When applying a stagger of 0.15 to a tween targeting multiple items in GSAP, what effect occurs?
- Each target starts its animation 0.15 seconds after the previous one
- All targets start together and last 0.15 seconds total
- Each target waits 0.15% of its duration before starting
- The animation runs 0.15 times faster than normal
- The first target delays by 0.15 seconds and all others wait 1 second
Repeating and Reversing
Which tween property in GSAP makes an animation automatically reverse direction on every alternate repeat?
- yoyo: true
- reverse: auto
- flipFlop: 1
- pingPong: true
- yoyyo: true
Completion Callback
Which GSAP callback runs exactly once after a tween finishes all its repeats and reaches the end?
- onComplete
- onStart
- onRepeat
- onUpdate
- onInterrupt
Setting Values Instantly
Which GSAP method would you use to immediately apply properties without animation, for example to set opacity to 0 before a sequence?
- set()
- to()
- fromTo()
- lock()
- freeze()
Default Units
When animating a transform translation using x: 100 in GSAP without specifying units, what unit is assumed by default?
- pixels (px)
- percent (%)
- seconds (s)
- degrees (deg)
- viewport width (vw)
from() vs to()
What is the main difference between from() and to() tweens in GSAP when animating a property like opacity?
- from() animates from the provided starting values to the current state, while to() animates from the current state to the provided end values
- from() and to() are identical but have different names
- from() only works on colors, while to() only works on numbers
- from() always uses percentages, while to() always uses pixels
- from() requires a timeline, while to() cannot be placed in a timeline