Interface SCNAnimatable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addAnimationForKey​(SCNAnimation animation, java.lang.String key)
      addAnimation:forKey: Adds and runs an animation Only SCNAnimation (preferred), CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are supported.
      void addAnimationPlayerForKey​(SCNAnimationPlayer player, java.lang.String key)
      addAnimationPlayer:forKey: Add an animation player.
      CAAnimation animationForKey​(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.
      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.
      boolean isAnimationForKeyPaused​(java.lang.String key)
      isAnimationForKeyPaused: Returns whether the animation for the specified identifier is paused.
      void pauseAnimationForKey​(java.lang.String key)
      pauseAnimationForKey: Pause the animation with the given identifier.
      void removeAllAnimations()
      removeAllAnimations Remove all animations.
      void removeAnimationForKey​(java.lang.String key)
      removeAnimationForKey Remove the animation with the given identifier.
      void removeAnimationForKeyBlendOutDuration​(java.lang.String key, double duration)
      Smoothly remove the animation with the given identifier.
      void removeAnimationForKeyFadeOutDuration​(java.lang.String key, double duration)
      removeAnimationForKey:fadeOutDuration: Smoothly remove the animation with the given identifier.
      void resumeAnimationForKey​(java.lang.String key)
      resumeAnimationForKey: Resume the animation with the given identifier.
      void setSpeedForAnimationKey​(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.