Package apple.scenekit.protocol
Interface SCNAnimatable
-
- All Known Implementing Classes:
ARSCNFaceGeometry,ARSCNPlaneGeometry,SCNAccelerationConstraint,SCNAnimationPlayer,SCNAvoidOccluderConstraint,SCNBillboardConstraint,SCNBox,SCNCamera,SCNCapsule,SCNCone,SCNConstraint,SCNCylinder,SCNDistanceConstraint,SCNFloor,SCNGeometry,SCNIKConstraint,SCNLight,SCNLookAtConstraint,SCNMaterial,SCNMaterialProperty,SCNMorpher,SCNNode,SCNParticleSystem,SCNPlane,SCNPyramid,SCNReferenceNode,SCNReplicatorConstraint,SCNShape,SCNSliderConstraint,SCNSphere,SCNTechnique,SCNText,SCNTorus,SCNTransformConstraint,SCNTube
public interface SCNAnimatable[@protocol] SCNAnimatable The SCNAnimatable protocol defines an animatable property. Objects that implement this protocol can be animated through these methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAnimationForKey(SCNAnimation animation, java.lang.String key)addAnimation:forKey: Adds and runs an animation Only SCNAnimation (preferred), CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are supported.voidaddAnimationPlayerForKey(SCNAnimationPlayer player, java.lang.String key)addAnimationPlayer:forKey: Add an animation player.CAAnimationanimationForKey(java.lang.String key)animationForKey: Returns the animation with the given identifier This will return nil if no such animation exists.NSArray<java.lang.String>animationKeys()[@property] animationKeys Returns an array containing the keys of all animations currently attached to the receiver.SCNAnimationPlayeranimationPlayerForKey(java.lang.String key)animationPlayerForKey: Returns the animation player with the given identifier This will return nil if no such animation player exists.booleanisAnimationForKeyPaused(java.lang.String key)isAnimationForKeyPaused: Returns whether the animation for the specified identifier is paused.voidpauseAnimationForKey(java.lang.String key)pauseAnimationForKey: Pause the animation with the given identifier.voidremoveAllAnimations()removeAllAnimations Remove all animations.voidremoveAnimationForKey(java.lang.String key)removeAnimationForKey Remove the animation with the given identifier.voidremoveAnimationForKeyBlendOutDuration(java.lang.String key, double duration)Smoothly remove the animation with the given identifier.voidremoveAnimationForKeyFadeOutDuration(java.lang.String key, double duration)removeAnimationForKey:fadeOutDuration: Smoothly remove the animation with the given identifier.voidresumeAnimationForKey(java.lang.String key)resumeAnimationForKey: Resume the animation with the given identifier.voidsetSpeedForAnimationKey(double speed, java.lang.String key)setSpeed:forAnimationKey: Update the animation speed of the animation with the given identifier.
-
-
-
Method Detail
-
addAnimationForKey
void addAnimationForKey(SCNAnimation animation, java.lang.String key)
addAnimation:forKey: 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.- Parameters:
animation- Added animation.key- May be any string such that only one animation per unique key is added per animatable object.
-
animationForKey
CAAnimation animationForKey(java.lang.String key)
animationForKey: 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.- Parameters:
key- The identifier for the animation to retrieve.
-
animationKeys
NSArray<java.lang.String> animationKeys()
[@property] animationKeys Returns an array containing the keys of all animations currently attached to the receiver.
-
isAnimationForKeyPaused
boolean isAnimationForKeyPaused(java.lang.String key)
isAnimationForKeyPaused: Returns whether the animation for the specified identifier is paused.- Parameters:
key- The identifier for the animation to query.
-
pauseAnimationForKey
void pauseAnimationForKey(java.lang.String key)
pauseAnimationForKey: Pause the animation with the given identifier.- Parameters:
key- The identifier for the animation to pause.
-
removeAllAnimations
void removeAllAnimations()
removeAllAnimations Remove all animations.
-
removeAnimationForKey
void removeAnimationForKey(java.lang.String key)
removeAnimationForKey Remove the animation with the given identifier.- Parameters:
key- The identifier for the animation to remove.
-
removeAnimationForKeyFadeOutDuration
void removeAnimationForKeyFadeOutDuration(java.lang.String key, double duration)removeAnimationForKey:fadeOutDuration: Smoothly remove the animation with the given identifier.- Parameters:
key- The identifier for the animation to remove.duration- The fade out duration used to remove the animation.
-
resumeAnimationForKey
void resumeAnimationForKey(java.lang.String key)
resumeAnimationForKey: Resume the animation with the given identifier.- Parameters:
key- The identifier for the animation to resume.
-
setSpeedForAnimationKey
void setSpeedForAnimationKey(double speed, java.lang.String key)setSpeed:forAnimationKey: Update the animation speed of the animation with the given identifier.- Parameters:
speed- The new speed of the animation.key- The identifier for the animation to update.
-
addAnimationPlayerForKey
void addAnimationPlayerForKey(SCNAnimationPlayer player, java.lang.String key)
addAnimationPlayer:forKey: 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.- Parameters:
player- Added animation player.key- May be any string such that only one animation per unique key is added per animatable object.
-
animationPlayerForKey
SCNAnimationPlayer animationPlayerForKey(java.lang.String key)
animationPlayerForKey: Returns the animation player with the given identifier This will return nil if no such animation player exists.- Parameters:
key- The identifier for the animation player to retrieve.
-
removeAnimationForKeyBlendOutDuration
void removeAnimationForKeyBlendOutDuration(java.lang.String key, double duration)Smoothly remove the animation with the given identifier.- Parameters:
key- The identifier for the animation to remove.duration- The blend out duration used to remove the animation.
-
-