public interface SCNAnimatable
The SCNAnimatable protocol defines an animatable property. Objects that implement this protocol can be animated through these methods.
| Modifier and Type | Method and Description |
|---|---|
void |
addAnimationForKey(SCNAnimation animation,
java.lang.String key)
addAnimation:forKey:
|
void |
addAnimationPlayerForKey(SCNAnimationPlayer player,
java.lang.String key)
addAnimationPlayer:forKey:
|
CAAnimation |
animationForKey(java.lang.String key)
animationForKey:
|
NSArray<java.lang.String> |
animationKeys()
[@property] animationKeys
|
SCNAnimationPlayer |
animationPlayerForKey(java.lang.String key)
animationPlayerForKey:
|
boolean |
isAnimationForKeyPaused(java.lang.String key)
isAnimationForKeyPaused:
|
void |
pauseAnimationForKey(java.lang.String key)
pauseAnimationForKey:
|
void |
removeAllAnimations()
removeAllAnimations
|
void |
removeAllAnimationsWithBlendOutDuration(double duration)
removeAllAnimationsWithBlendOutDuration
|
void |
removeAnimationForKey(java.lang.String key)
removeAnimationForKey
|
void |
removeAnimationForKeyBlendOutDuration(java.lang.String key,
double duration)
removeAnimationForKey:blendOutDuration:
|
void |
removeAnimationForKeyFadeOutDuration(java.lang.String key,
double duration)
removeAnimationForKey:fadeOutDuration:
|
void |
resumeAnimationForKey(java.lang.String key)
resumeAnimationForKey:
|
void |
setSpeedForAnimationKey(double speed,
java.lang.String key)
setSpeed:forAnimationKey:
|
void addAnimationForKey(SCNAnimation animation, java.lang.String key)
Adds and runs an animation
Only SCNAnimation (preferred), CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are supported. The animation starts playing right away. The animation is automatically removed on completion unless if removedOnCompletion is explicitly set to NO.
animation - Added animation.key - May be any string such that only one animation per unique key is added per animatable object. removedOnCompletion] CAAnimation animationForKey(java.lang.String key)
Returns the animation with the given identifier
This will return nil if no such animation exists. Attempting to modify any properties of the returned object will result in undefined behavior.
key - The identifier for the animation to retrieve.NSArray<java.lang.String> animationKeys()
Returns an array containing the keys of all animations currently attached to the receiver.
boolean isAnimationForKeyPaused(java.lang.String key)
Returns whether the animation for the specified identifier is paused.
key - The identifier for the animation to query.void pauseAnimationForKey(java.lang.String key)
Pause the animation with the given identifier.
key - The identifier for the animation to pause.void removeAllAnimations()
Remove all animations.
void removeAnimationForKey(java.lang.String key)
Remove the animation with the given identifier.
key - The identifier for the animation to remove.void removeAnimationForKeyFadeOutDuration(java.lang.String key,
double duration)
Smoothly remove the animation with the given identifier.
key - The identifier for the animation to remove.duration - The fade out duration used to remove the animation.void resumeAnimationForKey(java.lang.String key)
Resume the animation with the given identifier.
key - The identifier for the animation to resume.void setSpeedForAnimationKey(double speed,
java.lang.String key)
Update the animation speed of the animation with the given identifier.
speed - The new speed of the animation.key - The identifier for the animation to update.void addAnimationPlayerForKey(SCNAnimationPlayer player, java.lang.String key)
Add an animation player.
The animation player is not removed automatically on completion. The animation doesn't start playing immediatelly. Call "play" on the player to start playing it.
player - Added animation player.key - May be any string such that only one animation per unique key is added per animatable object.play]SCNAnimationPlayer animationPlayerForKey(java.lang.String key)
Returns the animation player with the given identifier
This will return nil if no such animation player exists.
key - The identifier for the animation player to retrieve.void removeAnimationForKeyBlendOutDuration(java.lang.String key,
double duration)
Smoothly remove the animation with the given identifier.
key - The identifier for the animation to remove.duration - The blend out duration used to remove the animation.void removeAllAnimationsWithBlendOutDuration(double duration)
Smoothly remove all animations.
duration - The blend out duration used to remove the animation.