SpriteKit Namespace

Access to Sprite Kit, a library for animation and physics.

Remarks

Sprite Kit is a library that provides a high-performance animation and physics loop. It is well-suited for 2D game programming and is available on both iOS and OS X.

The animation loop:

The system restricts the animation loop to a maximum rate of 60Hz.

The visual aspect of the animation loop is determined by a scene-graph consisting of a hierarchy of SpriteKit.SKNodes. The root of the scene-graph is a SpriteKit.SKScene which itself is a SpiteKit.SKNode (see illustration below). SpriteKit.SKNodes can be rectangular, based on a CoreGraphics.CGPath, or display text. SpriteKit.SKNodes can be textured, colored, or display video. They can have CoreImage.CoreFilters applied to them and can be composited.

SpriteKit.SKNodes can have an associated SpriteKit.SKPhysicsBody. All of the SpriteKit.SKPhysicsBodys in the SpriteKit.SKScene.PhysicsWorld of the SpriteKit.SKScene are part of the physics loop. SpriteKitSKPhysicsBodys are joined to each other with SpriteKit.SKJoints, of which there are several sub-classes as shown in the following illustration.

Classes

TypeReason
ISKPhysicsContactDelegateInterface representing the required methods (if any) of the protocol SpriteKit.SKPhysicsContactDelegate.
ISKSceneDelegateInterface representing the required methods (if any) of the protocol SpriteKit.SKSceneDelegate.
SK3DNodeRenders a Scene Kit image as a textured 2D image. Used to incorporate Scene Kit content into a Sprite Kit app.
SKActionModifies properties on a SpriteKit.SKNode, often animating the changes. Sometimes reversible.
SKActionDurationHandlerThe delegate for a custom action, used with SpriteKit.SKAction.CustomActionWithDuration.
SKActionTimingFunctionA method that maps time, a value between 0 and 1, to a return value between 0 snd 1.
SKActionTimingModeAn enumeration whose values specify the time-varying behavior of a SpriteKit.SKAction. Used with SpriteKit.SKAction.TimingMode.
SKBlendModeAn enumeration whose values specify options for blending of visual SpriteKit.SKNodes or particles.
SKConstraintMathematical constraint on a node's position or orientation.
SKCropNodeA node that masks its children's pixels.
SKEffectNodeAn SpriteKit.SKNode that applies a Core Graphics CoreImage.CIFilter to its output.
SKEmitterNodeA SpriteKit.SKNode that produces colored and textured particles.
SKFieldForceEvaluatorA method that derives a force by applying the physics of a field to a body that is within the field.
SKFieldNodeApplies physics effects within a portion of a scene.
SKInterpolationModeAn enumeration whose values specify the interpolation mode of a SpriteKit.SKKeyframeSequence.
SKKeyframeSequenceAn object that can control the properties of particles emitted by a SpriteKit.SKEmitterNode.
SKLabelHorizontalAlignmentModeAn enumeration whose values specify horizontal alignment of a SpriteKit.SKLabelNode. Used with SpriteKit.SKLabelNode.HorizontalAlignmentMode
SKLabelNodeA SpriteKit.SKNode that displays a string.
SKLabelVerticalAlignmentMode An enumeration whose values specify vertical alignment of a SpriteKit.SKLabelNode. Used with SpriteKit.SKLabelNode.VerticalAlignmentMode
SKLightNodeA node that creates a lighting effect within a scene.
SKMutableTextureA texture that can be modified after assignment.
SKNodeThe building block out of which scene-graphs are made. The root of the tree is an SpriteKit.SKScene.
SKNodeChildEnumeratorHandlerThe delegate that acts as the enumeration handler for SpriteKit.SKNode.EnumerateChildNodes.
SKNodeTouches_UITouchExtension methods for UIKit.UITouch that aide with conversion to Sprite Kit coordinates.
SKPhysicsBodyAn object that reacts to the physics simulation of the SpriteKit.SKScene's SpriteKit.SKScene.PhysicsWorld.
SKPhysicsContactEncapsulates the data of a collision between two SpriteKit.SKPhysicsBodys.
SKPhysicsContactDelegateA delegate object for SpriteKit.SKPhysicsWorld that provides events when SpriteKit.SKPhysicsBodys begin and end contact with each other.
SKPhysicsContactDelegate_ExtensionsExtension methods to the SpriteKit.ISKPhysicsContactDelegate interface to support all the methods from the SpriteKit.SKPhysicsContactDelegate protocol.
SKPhysicsJointBase class for subtypes that join bodies in the physics engine.
SKPhysicsJointFixedA SpriteKit.SKPhysicsJoint that rigidly connects two bodies.
SKPhysicsJointLimitA SpriteKit.SKPhysicsJoint that connects two bodies as if by a rope.
SKPhysicsJointPinA SpriteKit.SKPhysicsJoint that pins two bodies to a common point.
SKPhysicsJointSlidingA SpriteKit.SKPhysicsJoint that connects two bodies as if by a sliding rod.
SKPhysicsJointSpringA SpriteKit.SKPhysicsJoint that connects two bodies as if by a spring.
SKPhysicsWorldManages the physics for a SpriteKit.SKScene.
SKPhysicsWorldBodiesAlongRayStartEnumeratorHandlerThe delegate used for enumerating bodies that fall along a ray when used with SpriteKit.SKPhysicsWorld.EnumerateBodies().
SKPhysicsWorldBodiesEnumeratorHandlerThe delegate used to enumerate SpriteKit.SKPhysicsBodys with SpriteKit.SKPhysicsWorld.EnumerateBodies() and SpriteKit.SKPhysicsWorld.EnumerateBodies()
SKRangeDefines a range for acceptable float values.
SKReachConstraintsA range of motion used with inverse kinematics.
SKRegionA path-defined area. Typically used for hit-testing and physics-field extents.
SKRepeatModeAn enumeration whose values specify whether the time value of a SpriteKit.SKKeyframeSequence should cycle.
SKSceneA scene of content in Sprite Kit. The root of a tree of Sprite Kit nodes.
SKSceneDelegateDelegate object for SKScene objects. Provides methods relating to animation events.
SKSceneDelegate_ExtensionsExtension methods to the SpriteKit.ISKSceneDelegate interface to support all the methods from the SpriteKit.SKSceneDelegate protocol.
SKSceneScaleModeAn enumeration whose values specify the way in which a SpriteKit.SKScene scales to the view in which it is being displayed.
SKShaderAn OpenGL ES fragment shader.
SKShapeNodeA SpriteKit.SKShapeNode defined by a Core Graphics CoreGraphics.CGPath.
SKSpriteNodeA SpriteKit.SKShapeNode that displays a textured, colored sprite.
SKTextureAn image that can be used with one or more SpriteKit.SKSpriteNodes and particles.
SKTextureAtlasA collection of SpriteKit.SKTextures that are loaded from a single source.
SKTextureFilteringModeAn enumeration whose values specify how a SpriteKit.SKTexture is rendered on a SpriteKit.SKSpriteNode of a different size.
SKTextureModifyA method that modifies a texture in place.
SKTransitionTransitions that can be used between SpriteKit.SKScenes. Used with the SpriteKit.SKView.PresentScene(SpriteKit.SKScene, SpriteKit.SKTransition) method.
SKTransitionDirectionAn enumeration of directions for use with SpriteKit.SKTransitions.
SKUniformHolds shareable uniform data for SKShader objects.
SKUniformTypeContains values that describe the data with which an SpriteKit.SKUniform was initialized.
SKVideoNodeA SpriteKit.SKNode that displays video.
SKViewA UIKit.UIView that displays a SpriteKit.SKScene.
SKView+SKViewAppearanceAppearance class for objects of type SpriteKit.SKView.