Skip to content

SceneKit tvOS xcode9 beta3

Vincent Dondain edited this page Jul 10, 2017 · 1 revision

#SceneKit.framework

diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h	2017-06-14 06:54:24.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h	2017-06-29 02:21:40.000000000 -0400
@@ -31,7 +31,7 @@
  @method runAction:completionHandler:
  @abstract Adds an action to the list of actions executed by the node. Your block is called when the action completes.
  */
-- (void)runAction:(SCNAction *)action completionHandler:(nullable void (^)())block NS_AVAILABLE(10_10, 8_0);
+- (void)runAction:(SCNAction *)action completionHandler:(nullable void (^)(void))block NS_AVAILABLE(10_10, 8_0);
 
 /*!
  @method runAction:forKey:
@@ -43,7 +43,7 @@
  @method runAction:forKey:completionHandler:
  @abstract Adds an identifiable action to the list of actions executed by the node. Your block is called when the action completes.
  */
-- (void)runAction:(SCNAction *)action forKey:(nullable NSString *)key completionHandler:(nullable void (^)())block NS_AVAILABLE(10_10, 8_0);
+- (void)runAction:(SCNAction *)action forKey:(nullable NSString *)key completionHandler:(nullable void (^)(void))block NS_AVAILABLE(10_10, 8_0);
 
 /*!
  @property hasActions
@@ -118,14 +118,14 @@
 //Creates an action that moves a node to a new position.
 + (SCNAction *)moveTo:(SCNVector3)location duration:(NSTimeInterval)duration;
 
-//Creates an action that rotates the node by a relative value.
+//Creates an action that rotates the node by a relative value in radian.
 + (SCNAction *)rotateByX:(CGFloat)xAngle y:(CGFloat)yAngle z:(CGFloat)zAngle duration:(NSTimeInterval)duration;
 
-//Creates an action that rotates the node to an absolute angle.
+//Creates an action that rotates the node to an absolute angle in radian.
 + (SCNAction *)rotateToX:(CGFloat)xAngle y:(CGFloat)yAngle z:(CGFloat)zAngle duration:(NSTimeInterval)duration;
 + (SCNAction *)rotateToX:(CGFloat)xAngle y:(CGFloat)yAngle z:(CGFloat)zAngle duration:(NSTimeInterval)duration shortestUnitArc:(BOOL)shortestUnitArc;
 
-//Creates an action that rotates the node arond an axis by the specified angle
+//Creates an action that rotates the node arond an axis by the specified angle in radian
 + (SCNAction *)rotateByAngle:(CGFloat)angle aroundAxis:(SCNVector3)axis duration:(NSTimeInterval)duration;
 + (SCNAction *)rotateToAxisAngle:(SCNVector4)axisAngle duration:(NSTimeInterval)duration;
 
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h	2017-06-10 20:51:30.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h	2017-06-29 21:31:34.000000000 -0400
@@ -115,13 +115,13 @@
  @property playbackStarted
  @abstract This block is called when the playback starts in case a valid audio source is present.
  */
-@property(nonatomic, copy, nullable) void (^willStartPlayback)();
+@property(nonatomic, copy, nullable) void (^willStartPlayback)(void);
 
 /*!
  @property playbackFinished
  @abstract This block is called when the playback stops in case a valid audio source is present.
  */
-@property(nonatomic, copy, nullable) void (^didFinishPlayback)();
+@property(nonatomic, copy, nullable) void (^didFinishPlayback)(void);
 
 /*!
  @property audioNode
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h	2017-06-14 06:54:24.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h	2017-06-29 03:08:39.000000000 -0400
@@ -79,8 +79,8 @@
 
 /*!
  @property automaticallyAdjustsZRange
- @abstract Determines whether the receiver automatically adjusts the zNear and zFar values. Defaults to NO.
- @discussion When set to YES, the near and far planes are automatically set to fit the bounding box of the entire scene at render time. Setting the property zNear or zFar automatically resets this property to NO.
+ @abstract Determines whether the receiver automatically adjusts the zFar value. Defaults to NO.
+ @discussion When set to YES, the near and far planes are automatically set to fit the bounding box of the entire scene at render time. 
  */
 @property(nonatomic) BOOL automaticallyAdjustsZRange API_AVAILABLE(macos(10.9));
 
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h	2017-06-10 20:51:30.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h	2017-06-29 01:16:06.000000000 -0400
@@ -83,14 +83,14 @@
 - (void)rollBy:(float)delta aroundScreenPoint:(CGPoint)point viewport:(CGSize)viewport;
 
 // Zoom by moving the camera along the axis by a screen space point.
-- (void)dollyZoomBy:(float)delta onScreenPoint:(CGPoint)point viewport:(CGSize)viewport;
+- (void)dollyBy:(float)delta onScreenPoint:(CGPoint)point viewport:(CGSize)viewport;
 
 // Rotate the camera around the axis from the camera position to the target.
 // Delta is in degree.
 - (void)rollAroundTarget:(float)delta;
 
 // Zoom by moving the camera along the axis from the camera position to the target.
-- (void)dollyZoomToTarget:(float)delta;
+- (void)dollyToTarget:(float)delta;
 
 // clear the camera roll if any
 - (void)clearRoll;
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h	2017-06-11 01:48:45.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h	2017-06-29 01:16:07.000000000 -0400
@@ -116,7 +116,7 @@
 
 /*!
  @property textureComponents
- @abstract Specifies the texture components to sample in the shader. Defaults to SCNTextureComponentAll.
+ @abstract Specifies the texture components to sample in the shader. Defaults to SCNColorMaskRed for displacement property, and to SCNColorMaskAll for other properties.
  @discussion Use this property to when using a texture that combine multiple informations in the different texture components. For example if you pack the roughness in red and metalness in blue etc... You can specify what component to use from the texture for this given material property. This property is only supported by Metal renderers.
  */
 @property(nonatomic) SCNColorMask textureComponents API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h	2017-06-14 06:54:24.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h	2017-06-29 01:16:06.000000000 -0400
@@ -44,7 +44,7 @@
 
 /*!
  @property categoryBitMask
- @abstract Determines the node categories that will be influenced by the receiver. Defaults to all bit set.
+ @abstract Determines the node physicsBody's categories that will be influenced by the receiver. Defaults to all bit set.
  */
 @property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macos(10.10));
 
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h	2017-06-12 18:12:45.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h	2017-06-29 02:21:40.000000000 -0400
@@ -56,8 +56,8 @@
     SCNDebugOptionRenderAsWireframe API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 6, //render objects as wireframe
     SCNDebugOptionShowSkeletons     API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 7, //show skinning bones
     SCNDebugOptionShowCreases       API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 8, //show subdivision creases
-    SCNDebugOptionShowConstraints   API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 9,  //show slider constraint
-    SCNDebugOptionShowCameras       API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 10  //show cameras
+    SCNDebugOptionShowConstraints   API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 9, //show slider constraint
+    SCNDebugOptionShowCameras       API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 10 //show cameras
 } API_AVAILABLE(macos(10.11), ios(9.0));
 
 /*! @protocol SCNSceneRenderer
@@ -80,7 +80,7 @@
  @param pointOfView the point of view to use to render the new scene.
  @param completionHandler the block invoked on completion.
  */
-- (void)presentScene:(SCNScene *)scene withTransition:(SKTransition *)transition incomingPointOfView:(nullable SCNNode *)pointOfView completionHandler:(nullable void (^)())completionHandler API_AVAILABLE(macos(10.11), ios(9.0));
+- (void)presentScene:(SCNScene *)scene withTransition:(SKTransition *)transition incomingPointOfView:(nullable SCNNode *)pointOfView completionHandler:(nullable void (^)(void))completionHandler API_AVAILABLE(macos(10.11), ios(9.0));
 
 /*!
  @property sceneTime
@@ -177,7 +177,7 @@
  @param block This block will be called repeatedly while the object is prepared. Return YES if you want the operation to abort.
  @discussion Returns YES if the object was prepared successfully, NO if it was canceled. This method may be triggered from a secondary thread. This method is observable using NSProgress.
  */
-- (BOOL)prepareObject:(id)object shouldAbortBlock:(nullable NS_NOESCAPE BOOL (^)())block API_AVAILABLE(macos(10.9));
+- (BOOL)prepareObject:(id)object shouldAbortBlock:(nullable NS_NOESCAPE BOOL (^)(void))block API_AVAILABLE(macos(10.9));
 
 /*!
  @method prepareObjects:withCompletionHandler:
@@ -320,6 +320,15 @@
 - (void)renderer:(id <SCNSceneRenderer>)renderer didSimulatePhysicsAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.10));
 
 /*!
+ @method renderer:didApplyConstraintsAtTime:
+ @abstract Invoked on the delegate once the scene renderer did apply the constraints.
+ @param renderer The renderer that did render the scene.
+ @param time The time at which the constraints were simulated.
+ @discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
+ */
+- (void)renderer:(id <SCNSceneRenderer>)renderer didApplyConstraintsAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
  @method renderer:willRenderScene:atTime:
  @abstract Invoked on the delegate before the scene renderer renders the scene. At this point the openGL context and the destination framebuffer are bound.
  @param renderer The renderer that will render the scene.
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h	2017-06-14 06:54:24.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h	2017-06-29 03:07:25.000000000 -0400
@@ -189,6 +189,12 @@
  -------------------------------------------------------------------------------------
  mat2x3 u_boundingBox;                       // The bounding box of the current geometry, in model space, u_boundingBox[0].xyz and u_boundingBox[1].xyz being respectively the minimum and maximum corner of the box.
  
+ When writing MetalSL shaders (and not going through the GLSL->MetalSL converter), the node dependant parameters are stored in a struct named scn_node (dropping the u_) and the frame dependant are stored in a struct named scn_frame.
+ For example u_boundingBox -> scn_node.boundingBox
+             u_modelViewTransform -> scn_node.modelViewTransform
+             u_time -> scn_frame.time
+ You can find the complete description of the scn_frame structure (SCNSceneBuffer) in the scn_metal file. The scn_node struct is generated at compile time and have no static definition.
+ 
  Shader modifiers can be used to tweak SceneKit rendering by adding custom code at the following entry points:
  1. vertex
  2. surface
diff -ruN /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes
--- /Applications/Xcode9-beta2.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes	2017-06-12 18:12:45.000000000 -0400
+++ /Applications/Xcode9-beta3.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes	2017-06-29 03:08:38.000000000 -0400
@@ -6,16 +6,22 @@
 # The below are inline functions that are irrelevant due to memberwise inits
 - Name: SCNMatrix4ToMat4
   Availability: nonswift
+  AvailabilityMsg: "Use 'float4x4.init(SCNMatrix4)' instead"
 - Name: SCNMatrix4FromMat4
   Availability: nonswift
+  AvailabilityMsg: "Use 'SCNMatrix4.init(float4x4)' instead"
 - Name: SCNVector3ToFloat3
   Availability: nonswift
+  AvailabilityMsg: "Use 'float3.init(SCNVector3)' instead"
 - Name: SCNVector3FromFloat3
   Availability: nonswift
+  AvailabilityMsg: "Use 'SCNVector3.init(float3)' instead"
 - Name: SCNVector4ToFloat4
   Availability: nonswift
+  AvailabilityMsg: "Use 'float4.init(SCNVector4)' instead"
 - Name: SCNVector4FromFloat4
   Availability: nonswift
+  AvailabilityMsg: "Use 'SCNVector4.init(float4)' instead"
 
 Protocols:
 # The below are methods for which overlays provide better implementations
Clone this wiki locally