TechnologiesGames & 3D

SceneKit

iOSmacOStvOSwatchOSvisionOS

SceneKit is a high-level 3D scene-graph framework for rendering, animating, and physically simulating 3D geometry, cameras, lights, and materials across iOS, macOS, tvOS, watchOS, and visionOS. You assemble a scene from geometry built with SCNGeometry, SCNGeometrySource, and SCNGeometryElement, then view it through an SCNCamera positioned with an SCNCameraController. Content is animated through SCNAction and the SCNAnimation and SCNAnimationPlayer types, while constraints such as SCNLookAtConstraint, SCNBillboardConstraint, SCNIKConstraint, and SCNDistanceConstraint govern how nodes track and respond to one another. SceneKit also supports spatial audio through SCNAudioSource and SCNAudioPlayer, hit testing via SCNHitTestResult, and detail management with SCNLevelOfDetail.

Scenes and Rendering 13

Build, load, and display the 3D scene graph and render it into a view or off-screen surface.

  • Cl
    SCNScene
    @class SCNScene
  • Cl
    SCNSceneSource
    @class SCNSceneSource
  • Cl
    SCNView
    @class SCNView
  • Cl
    SCNRenderer
    @class SCNRenderer
  • Cl
    SCNLayer
    @class SCNLayer
  • Cl
    SCNNode
    @class SCNNode
  • Cl
    SCNReferenceNodemacOS 10.11+
    @class SCNReferenceNode
  • Pr
    SCNSceneRenderer
    @protocol SCNSceneRenderer
  • Pr
    SCNSceneRendererDelegate
    @protocol SCNSceneRendererDelegate
  • Pr
    SCNSceneExportDelegatemacOS 10.9+
    A protocol for supplying image data when exporting a scene to a file.
  • Pr
    SCNNodeRendererDelegate
    @category NSObject (SCNNodeRendererDelegate)
  • En
    SCNReferenceLoadingPolicymacOS 10.11+
    @enum SCNReferenceLoadingPolicy
  • En
    SCNSceneSourceStatus
    @enum SCNSceneSourceStatus

Geometry and Shapes 21

Define custom geometry and use the built-in parametric primitive shapes that compose a scene.

  • Cl
    SCNGeometry
    @class SCNGeometry
  • Cl
    SCNGeometrySource
    @class SCNGeometrySource
  • Cl
    SCNGeometryElement
    @class SCNGeometryElement
  • Cl
    SCNGeometryTessellatormacOS 10.13+
    @class SCNGeometryTessellator
  • Cl
    SCNPlane
    @class SCNPlane
  • Cl
    SCNBox
    @class SCNBox
  • Cl
    SCNPyramid
    @class SCNPyramid
  • Cl
    SCNSphere
    @class SCNSphere
  • Cl
    SCNCylinder
    @class SCNCylinder
  • Cl
    SCNCone
    @class SCNCone
  • Cl
    SCNTube
    @class SCNTube
  • Cl
    SCNCapsule
    @class SCNCapsule
  • Cl
    SCNTorus
    @class SCNTorus
  • Cl
    SCNFloor
    @class SCNFloor
  • Cl
    SCNText
    @class SCNText
  • Cl
    SCNShapemacOS 10.9+
    @class SCNShape
  • Cl
    SCNLevelOfDetailmacOS 10.9+
    @class SCNLevelOfDetail
  • Pr
    SCNBoundingVolume
    @protocol SCNBoundingVolume
  • En
    SCNGeometryPrimitiveType
    Constants that specify how a geometry element's vertices are connected into primitives.
  • En
    SCNTessellationSmoothingModemacOS 10.13+
    Constants that specify the smoothing algorithm a tessellator applies to geometry.
  • En
    SCNChamferModemacOS 10.9+
    Constants that specify which edges of an extruded geometry are chamfered.

Materials and Shading 17

Control surface appearance, lighting response, and custom GPU shading of geometry.

  • Cl
    SCNMaterial
    @class SCNMaterial
  • Cl
    SCNMaterialProperty
    @class SCNMaterialProperty
  • Cl
    SCNProgram
    @class SCNProgram
  • Pr
    SCNProgramDelegate
    @protocol SCNProgramDelegate
  • Cl
    SCNTechniquemacOS 10.10+
    @class SCNTechnique
  • Pr
    SCNTechniqueSupport
    @protocol SCNTechniqueSupport
  • Pr
    SCNShadable
    @protocol SCNShadable
  • Pr
    SCNBufferStream
    A protocol that gives shaders access to a writable Metal buffer.
  • St
    SCNShaderModifierEntryPoint
    Constants that identify the rendering stages at which a shader modifier can run.
  • En
    SCNFillModemacOS 10.13+
    Constants that specify whether geometry is rendered filled or as a wireframe.
  • En
    SCNCullMode
    Constants that specify which faces of a geometry are culled during rendering.
  • En
    SCNTransparencyMode
    Constants that specify how a material's transparency is computed.
  • En
    SCNBlendModemacOS 10.11+
    @enum SCNBlendMode
  • En
    SCNFilterModemacOS 10.9+
    @enum SCNFilterMode
  • En
    SCNWrapModemacOS 10.9+
    @enum SCNWrapeMode
  • St
    SCNColorMaskmacOS 10.13+
    @enum SCNColorComponent
  • En
    SCNBufferFrequencymacOS 10.11+
    @enum SCNBufferFrequency

Cameras and Lighting 11

Position and control viewpoints and configure the lights that illuminate the scene.

  • Cl
    SCNCamera
    @class SCNCamera
  • Cl
    SCNCameraControllermacOS 10.13+
    An object that manipulates a camera to navigate and frame the scene.
  • Pr
    SCNCameraControllerDelegatemacOS 10.13+
    A protocol for responding to a camera controller's interactive navigation events.
  • Pr
    SCNCameraControlConfigurationmacOS 10.13+
    A protocol that exposes configuration options for built-in camera controls.
  • Cl
    SCNLight
    @class SCNLight
  • En
    SCNCameraProjectionDirectionmacOS 10.13+
    Constants that specify the direction in which an orthographic camera projects.
  • En
    SCNInteractionModemacOS 10.13+
    Constants that specify the gesture-to-camera-movement mapping of a camera controller.
  • En
    SCNShadowModemacOS 10.10+
    @enum SCNShadowMode
  • En
    SCNLightProbeTypemacOS 10.15+
    Constants that specify the kind of lighting information a light probe captures.
  • En
    SCNLightProbeUpdateTypemacOS 10.15+
    Constants that specify how a light probe updates its captured lighting.
  • En
    SCNLightAreaTypemacOS 10.15+
    Constants that specify the shape of an area light's emitting surface.

Animation 10

Animate node and scene properties over time with actions, keyframe animations, and transactions.

  • Cl
    SCNActionmacOS 10.10+
    An object that performs a reusable, time-based change to a node, such as moving, rotating, or fading it.
  • Pr
    SCNActionable
    A protocol for objects, such as nodes, that can run actions.
  • Cl
    SCNAnimationmacOS 10.13+
    SCNAnimation represents an animation that targets a specific key path.
  • Cl
    SCNAnimationPlayermacOS 10.13+
    SCNAnimationPlayer let you control when and how to play and blend an animation
  • Pr
    SCNAnimationProtocol
    A protocol that defines the interface for SceneKit animation objects.
  • Pr
    SCNAnimatable
    @protocol SCNAnimatable
  • Cl
    SCNAnimationEventmacOS 10.9+
    SCNAnimationEvent encapsulates a block to trigger at a specific time.
  • Cl
    SCNTimingFunctionmacOS 10.13+
    An object that defines the pacing curve of an animation over its duration.
  • Cl
    SCNTransaction
    A mechanism for grouping and animating changes to scene-graph properties.
  • En
    SCNActionTimingModemacOS 10.10+
    @enum SCNActionTimingMode

Constraints 12

Apply rules that automatically adjust node transforms in response to other nodes and the scene.

  • Cl
    SCNConstraintmacOS 10.9+
    @class SCNConstraint
  • Cl
    SCNLookAtConstraintmacOS 10.9+
    @class SCNLookAtConstraint
  • Cl
    SCNBillboardConstraintmacOS 10.11+
    A constraint that orients a node to always face the current point of view.
  • Cl
    SCNTransformConstraintmacOS 10.9+
    @class SCNTransformConstraint
  • Cl
    SCNIKConstraintmacOS 10.10+
    @class SCNIKConstraint
  • Cl
    SCNDistanceConstraintmacOS 10.13+
    @class SCNDistanceConstraint
  • Cl
    SCNReplicatorConstraintmacOS 10.13+
    @class SCNReplicatorConstraint
  • Cl
    SCNAccelerationConstraintmacOS 10.13+
    @class SCNAccelerationConstraint
  • Cl
    SCNSliderConstraintmacOS 10.13+
    @class SCNSliderConstraint
  • Cl
    SCNAvoidOccluderConstraintmacOS 10.13+
    @class SCNAvoidOccluderConstraint
  • Pr
    SCNAvoidOccluderConstraintDelegatemacOS 10.13+
    A protocol for responding to occlusion events from an avoid-occluder constraint.
  • St
    SCNBillboardAxis
    Constants that specify the axes about which a billboard constraint rotates a node.

Physics Simulation 16

Add rigid-body dynamics, joints, vehicles, and force fields to drive realistic motion.

  • Cl
    SCNPhysicsWorldmacOS 10.10+
    @class SCNPhysicsWorld
  • Cl
    SCNPhysicsBodymacOS 10.10+
    @class SCNPhysicsBody
  • Cl
    SCNPhysicsShapemacOS 10.10+
    @class SCNPhysicsShape
  • Cl
    SCNPhysicsContactmacOS 10.10+
    @class SCNPhysicsContact
  • Pr
    SCNPhysicsContactDelegatemacOS 10.10+
    @protocol SCNPhysicsContactDelegate
  • Cl
    SCNPhysicsFieldmacOS 10.10+
    @class SCNPhysicsField
  • Cl
    SCNPhysicsBehaviormacOS 10.10+
    @class SCNPhysicsBehavior
  • Cl
    SCNPhysicsHingeJointmacOS 10.10+
    @class SCNPhysicsHingeJoint
  • Cl
    SCNPhysicsBallSocketJointmacOS 10.10+
    @class SCNPhysicsBallSocketJoint
  • Cl
    SCNPhysicsSliderJointmacOS 10.10+
    @class SCNPhysicsSliderJoint
  • Cl
    SCNPhysicsConeTwistJointmacOS 10.13+
    @class SCNPhysicsConeTwistJoint
  • Cl
    SCNPhysicsVehiclemacOS 10.10+
    @class SCNPhysicsVehicle
  • Cl
    SCNPhysicsVehicleWheelmacOS 10.10+
    @class SCNPhysicsVehicleWheel
  • En
    SCNPhysicsBodyTypemacOS 10.10+
    Constants that specify whether a physics body is static, dynamic, or kinematic.
  • En
    SCNPhysicsFieldScopemacOS 10.10+
    @enum SCNPhysicsFieldScope
  • St
    SCNPhysicsCollisionCategorymacOS 10.10+
    A bit-mask structure that groups physics bodies for collision and contact testing.

Particle Systems 11

Create and control emitters that simulate effects such as smoke, fire, and sparks.

  • Cl
    SCNParticleSystemmacOS 10.10+
    @class SCNParticleSystem
  • Cl
    SCNParticlePropertyControllermacOS 10.10+
    @class SCNParticlePropertyController
  • En
    SCNParticleSortingModemacOS 10.10+
    Constants that specify the order in which a particle system draws its particles.
  • En
    SCNParticleBlendModemacOS 10.10+
    Constants that specify how a particle system blends particles with the scene.
  • En
    SCNParticleOrientationModemacOS 10.10+
    Constants that specify how particles are oriented relative to the camera or scene.
  • En
    SCNParticleBirthLocationmacOS 10.10+
    Constants that specify where on an emitter shape new particles are created.
  • En
    SCNParticleBirthDirectionmacOS 10.10+
    Constants that specify the initial direction in which new particles travel.
  • En
    SCNParticleImageSequenceAnimationModemacOS 10.10+
    Constants that specify how a particle's image sequence is animated.
  • En
    SCNParticleInputModemacOS 10.10+
    Constants that specify the input that drives a particle property controller's animation.
  • En
    SCNParticleModifierStagemacOS 10.10+
    Constants that identify the simulation stage at which a particle modifier runs.
  • En
    SCNParticleEventmacOS 10.10+
    Constants that identify events in a particle's lifetime that can trigger handlers.

Skeletal Animation and Morphing 3

Deform geometry through skeletal skinning and blend-shape morphing.

  • Cl
    SCNSkinnermacOS 10.9+
    @class SCNSkinner
  • Cl
    SCNMorphermacOS 10.9+
    @class SCNMorpher
  • En
    SCNMorpherCalculationMode
    Constants that specify how a morpher combines its blend-shape targets.

Audio 2

Attach spatialized sound sources and players to nodes in the scene.

  • Cl
    SCNAudioSourcemacOS 10.11+
    @class SCNAudioSource
  • Cl
    SCNAudioPlayermacOS 10.11+
    An object that manages playback of an audio source attached to a node.

Hit Testing 3

Find the scene contents located at a screen point or along a ray.

  • Cl
    SCNHitTestResult
    @class SCNHitTestResult
  • St
    SCNHitTestOption
    @group Hit-test options
  • En
    SCNHitTestSearchModemacOS 10.13+
    @enum SCNHitTestSearchMode

Geometric Types and Options 7

Vector types, rendering options, and configuration constants used throughout the framework.

  • St
    SCNVector3
    A representation of a three-component vector used for positions, scales, and directions.
  • St
    SCNVector4
    A representation of a four-component vector used for rotations and homogeneous coordinates.
  • St
    SCNDebugOptionsmacOS 10.11+
    @enum SCNDebugOptions
  • En
    SCNMovabilityHintmacOS 10.12+
    @enum SCNMovabilityHint
  • En
    SCNNodeFocusBehaviormacOS 10.13+
    @enum SCNNodeFocusBehavior
  • En
    SCNAntialiasingModemacOS 10.10+
    @enum SCNAntialiasingMode
  • En
    SCNRenderingAPImacOS 10.11+
    @enum SCNRenderingAPI

Structures 1

  • St
    SceneViewiOS 14.0+
    The view to present your SCNScene nodes in.

Type Aliases 14

  • Ty
    SCNActionTimingFunction
    A custom timing function for SCNActions. Input time will be between 0.0 and 1.0
  • Ty
    SCNAnimationDidStartBlock
  • Ty
    SCNAnimationDidStopBlock
  • Ty
    SCNAnimationEventBlock
    Signature for the block executed when the animation event is triggered.
  • Ty
    SCNParticleEventBlock
    @typedef SCNParticleEventBlock
  • Ty
    SCNParticleModifierBlock
    @typedef SCNParticleModifierBlock
  • Ty
    SCNFieldForceEvaluator
  • Ty
    SCNSceneExportProgressHandler
    @typedef SCNSceneSourceStatusHandler
  • Ty
    SCNSceneSourceStatusHandler
  • Ty
    SCNBufferBindingBlock
    @typedef SCNBufferBindingBlock
  • Ty
    SCNBindingBlock
    @typedef SCNBindingBlock
  • Ty
    SCNQuaternion
  • Ty
    SCNMatrix4
  • Ty
    SCNFloat

Extends 7

CAAnimationNSValueSIMD3SIMD4CATransform3Dsimd_float4x4simd_double4x4
← Games & 3D