The common interface for attaching animations to nodes, geometries, materials, and other SceneKit objects.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 3.0+
SceneKit uses the same architecture as the Core Animation framework, allowing you to animate property changes implicitly or explicitly. For implicit animation, use the
SCNTransaction class to quickly create simple animations with very little code. For more complex animations, explicitly create
CAAnimation objects, and use the methods in the
SCNAnimatable protocol to attach them to the SceneKit objects you want to animate. You also use the methods in this protocol to control any animations already attached to a SceneKit object.
For example, making a node spin continuously for as long as it appears in the scene graph requires explicitly creating an animation that repeats. The following code creates such an animation and attaches it to a node: