forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
SceneKit macOS xcode9 beta1
Miguel de Icaza edited this page Aug 12, 2017
·
3 revisions
#SceneKit.framework
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h n/macOS/Frameworks/SceneKit.framework/Headers/ModelIO.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/ModelIO.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// ModelIO.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <ModelIO/ModelIO.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNAction.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h 2016-09-26 20:55:17.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNAction.h 2017-08-11 21:12:10.000000000 -0400
@@ -12,16 +12,6 @@
@class SCNAction;
@class SCNAudioSource;
-/*! @enum SCNActionTimingMode
- @abstract The modes that an action can use to adjust the apparent timing of the action.
- */
-typedef NS_ENUM(NSInteger, SCNActionTimingMode) {
- SCNActionTimingModeLinear,
- SCNActionTimingModeEaseIn,
- SCNActionTimingModeEaseOut,
- SCNActionTimingModeEaseInEaseOut
-} NS_ENUM_AVAILABLE(10_10, 8_0);
-
/**
A custom timing function for SCNActions. Input time will be between 0.0 and 1.0
over the duration of the action. Return values must be 0.0-1.0 and increasing
@@ -56,7 +46,7 @@
- (void)runAction:(SCNAction *)action forKey:(nullable NSString *)key completionHandler:(nullable void (^)())block NS_AVAILABLE(10_10, 8_0);
/*!
- @method hasActions
+ @property hasActions
@abstract Returns a Boolean value that indicates whether the node is executing actions.
*/
@property(nonatomic, readonly) BOOL hasActions NS_AVAILABLE(10_10, 8_0);
@@ -80,7 +70,7 @@
- (void)removeAllActions NS_AVAILABLE(10_10, 8_0);
/*!
- @method actionKeys
+ @property actionKeys
@abstract Returns an array containing the keys of all actions currently attached to the receiver.
*/
@property(nonatomic, readonly) NSArray<NSString *> *actionKeys NS_AVAILABLE(10_10, 8_0);
@@ -196,7 +186,7 @@
/** Creates an action that plays a sound
@param source The audio source to play (see SCNAudioSource.h)
- @param waitForCompletion If YES, then the duration of this action is the same
+ @param wait If YES, then the duration of this action is the same
as the length of the audio playback. If NO, the action is considered
to have completed immediately.*/
+ (SCNAction *)playAudioSource:(SCNAudioSource *)source waitForCompletion:(BOOL)wait NS_AVAILABLE(10_11, 9_0);
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNAnimation.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h 2016-09-26 20:31:43.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNAnimation.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,51 +1,57 @@
//
// SCNAnimation.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
-NS_ASSUME_NONNULL_BEGIN
+@class SCNAnimation, SCNAnimationEvent, SCNAnimationPlayer;
+@protocol SCNAnimatable;
-/*!
- @typedef SCNAnimationEventBlock
- @discussion Signature for the block executed when the animation event is triggered.
- */
-typedef void (^SCNAnimationEventBlock)(CAAnimation *animation, id animatedObject, BOOL playingBackward);
+@protocol SCNAnimation <NSObject>
+@end
-/*!
- @class SCNAnimationEvent
- @abstract SCNAnimationEvent encapsulate a block to trigger at a specific time.
- */
+#import <SceneKit/SCNCAAnimationExtensions.h>
-API_AVAILABLE(macosx(10.9))
-@interface SCNAnimationEvent : NSObject
+NS_ASSUME_NONNULL_BEGIN
-/*!
- @method animationEventWithKeyTime:block:
- @abstract Returns an animation event instance
- @param time The relative time to trigger the event.
- @param eventBlock The block to call when the event is triggered.
- @discussion "time" is relative to animation duration and therefor it has to be a value in the range [0,1].
- */
-+ (instancetype)animationEventWithKeyTime:(CGFloat)time block:(SCNAnimationEventBlock)eventBlock;
+typedef void (^SCNAnimationDidStartBlock)(SCNAnimation *animation, id <SCNAnimatable> receiver);
+typedef void (^SCNAnimationDidStopBlock)(SCNAnimation *animation, id <SCNAnimatable> receiver, BOOL completed);
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNTimingFunction : NSObject <NSSecureCoding>
++ (SCNTimingFunction *)functionWithTimingMode:(SCNActionTimingMode)timingMode;
++ (SCNTimingFunction *)functionWithCAMediaTimingFunction:(CAMediaTimingFunction *)caTimingFunction;
@end
/*!
@protocol SCNAnimatable
@abstract The SCNAnimatable protocol defines an animatable property. Objects that implement this protocol can be animated through these methods.
-*/
+ */
@protocol SCNAnimatable <NSObject>
/*!
@method addAnimation:forKey:
- @abstract Add an animation.
+ @abstract Adds and runs an animation
@param animation Added animation.
@param key May be any string such that only one animation per unique key is added per animatable object.
+ @discussion 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.
+ @seealso -[id <SCNAnimation> removedOnCompletion]
+ */
+- (void)addAnimation:(id <SCNAnimation>)animation forKey:(nullable NSString *)key;
+
+/*!
+ @method addAnimationPlayer:forKey:
+ @abstract Add an animation player.
+ @param player Added animation player.
+ @param key May be any string such that only one animation per unique key is added per animatable object.
+ @discussion 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.
+ @seealso -[SCNAnimationPlayer play]
*/
-- (void)addAnimation:(CAAnimation *)animation forKey:(nullable NSString *)key;
+- (void)addAnimationPlayer:(SCNAnimationPlayer *)player forKey:(nullable NSString *)key API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@method removeAllAnimations
@@ -61,91 +67,348 @@
- (void)removeAnimationForKey:(NSString *)key;
/*!
- @method animationKeys
+ @property animationKeys
@abstract Returns an array containing the keys of all animations currently attached to the receiver.
*/
@property(readonly) NSArray<NSString *> *animationKeys;
/*!
+ @method animationPlayerForKey:
+ @abstract Returns the animation player with the given identifier
+ @param key The identifier for the animation player to retrieve.
+ @discussion This will return nil if no such animation player exists.
+ */
+- (nullable SCNAnimationPlayer *)animationPlayerForKey:(NSString *)key API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Smoothly remove the animation with the given identifier.
+ @param key The identifier for the animation to remove.
+ @param duration The blend out duration used to remove the animation.
+ */
+- (void)removeAnimationForKey:(NSString *)key blendOutDuration:(CGFloat)duration API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+// Deprecated
+
+/*!
+ @method removeAnimationForKey:fadeOutDuration:
+ @abstract Smoothly remove the animation with the given identifier.
+ @param key The identifier for the animation to remove.
+ @param duration The fade out duration used to remove the animation.
+ */
+- (void)removeAnimationForKey:(NSString *)key fadeOutDuration:(CGFloat)duration API_DEPRECATED_WITH_REPLACEMENT("-removeAnimationForKey:blendOutDuration:", macosx(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0));
+
+/*!
@method animationForKey:
@abstract Returns the animation with the given identifier
@param key The identifier for the animation to retrieve.
@discussion This will return nil if no such animation exists.
- Attempting to modify any properties of the returned object will result in undefined behavior.
+ Attempting to modify any properties of the returned object will result in undefined behavior.
*/
-- (nullable CAAnimation *)animationForKey:(NSString *)key;
+- (nullable CAAnimation *)animationForKey:(NSString *)key API_DEPRECATED_WITH_REPLACEMENT("-animationPlayerForKey:", macosx(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0));
/*!
@method pauseAnimationForKey:
@abstract Pause the animation with the given identifier.
@param key The identifier for the animation to pause.
*/
-- (void)pauseAnimationForKey:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (void)pauseAnimationForKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setPaused:] instead", macosx(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
/*!
@method resumeAnimationForKey:
@abstract Resume the animation with the given identifier.
@param key The identifier for the animation to resume.
*/
-- (void)resumeAnimationForKey:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (void)resumeAnimationForKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setPaused:] instead", macosx(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @method setSpeed:forAnimationKey:
+ @abstract Update the animation speed of the animation with the given identifier.
+ @param speed The new speed of the animation.
+ @param key The identifier for the animation to update.
+ */
+- (void)setSpeed:(CGFloat)speed forAnimationKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setSpeed:] instead", macosx(10.12, 10.13), ios(10.0, 11.0), tvos(10.0, 11.0), watchos(3.0, 4.0));
/*!
@method isAnimationForKeyPaused:
@abstract Returns whether the animation for the specified identifier is paused.
@param key The identifier for the animation to query.
*/
-- (BOOL)isAnimationForKeyPaused:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (BOOL)isAnimationForKeyPaused:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer paused] instead", macosx(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+@end
+
+
+
+/**
+ SCNAnimation represents an animation that targets a specific key path.
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAnimation : NSObject <SCNAnimation, NSCopying, NSSecureCoding>
+
/*!
- @method removeAnimationForKey:fadeOutDuration:
- @abstract Smoothly remove the animation with the given identifier.
- @param key The identifier for the animation to remove.
- @param duration The fade out duration used to remove the animation.
+ Initializers
+ */
+
+/**
+ Loads and returns an animation loaded from the specified URL.
+
+ @param animationUrl The url to load.
*/
-- (void)removeAnimationForKey:(NSString *)key fadeOutDuration:(CGFloat)duration API_AVAILABLE(macosx(10.10));
++ (SCNAnimation *)animationWithContentsOfURL:(NSURL *)animationUrl;
+
+/**
+ Loads and returns the animation with the specified name in the current application bundle.
+
+ @param animationName The name of the animation to load.
+ */
++ (SCNAnimation *)animationNamed:(NSString *)animationName;
+
+// bridge with Core Animation
+/**
+ Returns a SCNAnimation initialized from a CAAnimation.
+
+ @param caAnimation The CAAnimation to initialize from.
+ @discussion Only CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are currently supported.
+ */
++ (SCNAnimation *)animationWithCAAnimation:(CAAnimation *)caAnimation;
+
+
/*!
- @method setSpeed:forAnimationKey:
- @abstract Update the animation speed of the animation with the given identifier.
- @param speed The new speed of the animation.
- @param key The identifier for the animation to update.
+ Basic properties
*/
-- (void)setSpeed:(CGFloat)speed forAnimationKey:(NSString *)key API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
-@end
+/**
+ The duration of the animation in seconds. Defaults to 0.
+ */
+@property (nonatomic) NSTimeInterval duration;
+
+/**
+ The key-path describing the property to be animated for single-property animations, nil for animations targetting multiple nodes. defaults to nil.
+ */
+@property (nonatomic, copy, nullable) NSString *keyPath;
+
+/**
+ A timing function defining the pacing of the animation. Defaults to nil indicating linear pacing.
+ */
+@property (nonatomic, retain) SCNTimingFunction *timingFunction;
+
+
/*!
- @category CAAnimation (CAAnimation)
- @abstract Extends the CAAnimation class for SceneKit explicit animations.
+ Blending
+ */
+
+/**
+ Determines the receiver's blend-in duration.
+ @discussion When the blendInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ */
+@property (nonatomic) NSTimeInterval blendInDuration;
+
+/**
+ Determines the receiver's blend-out duration.
+ @discussion When the blendOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
*/
-@interface CAAnimation (SceneKitAdditions)
+@property (nonatomic) NSTimeInterval blendOutDuration;
+
+
/*!
- @property usesSceneTimeBase
- @abstract Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
+ Animation behaviors
+ */
+
+/**
+ When true, the animation is removed from the render tree once its active duration has passed. Defaults to YES.
+ */
+@property (nonatomic, getter=isRemovedOnCompletion) BOOL removedOnCompletion;
+
+/**
+ When true, the animation is applied to the model tree once its active duration has passed. Defaults to NO.
+ */
+@property (nonatomic, getter=isAppliedOnCompletion) BOOL appliedOnCompletion;
+
+
+
+/*!
+ Repeat
+ */
+
+/**
+ The repeat count of the object. May be fractional. Defaults to 0.
+ */
+@property (nonatomic) CGFloat repeatCount;
+/**
+ When true, the object plays backwards after playing forwards. Defaults to NO.
+ */
+@property (nonatomic) BOOL autoreverses;
+
+
+
+/*!
+ Delay and offset
+ */
+
+/**
+ The relative delay to start the animation, in relation to its parent animation if applicable. Defaults to 0.
+ @discussion This property is bridged with CoreAnimations's beginTime. However, for top level animations, startDelay relative to the current time (unlike CAAnimation's beginTime that is absolute). So if a CAAnimation has a non-zero beginTime, startDelay is initialized as caAnimation.beginTime - CACurrentMediaTime().
+ */
+@property (nonatomic) NSTimeInterval startDelay;
+
+/**
+ Additional offset in active local time. i.e. to convert from parent
+ time tp to active local time t: t = (tp - begin) * speed + offset.
+ Defaults to 0.
+ */
+@property (nonatomic) NSTimeInterval timeOffset;
+
+
+
+/*!
+ Fill mode
+ */
+
+/**
+ When true, the animation remains active after its active duration and evaluates to its end value. Defaults to NO.
+ */
+@property (nonatomic) BOOL fillsForward;
+
+/**
+ When true, the animation is active before its active duration and evaluates to its start value. Defaults to NO.
+ */
+@property (nonatomic) BOOL fillsBackward;
+
+/**
+ Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
@discussion A scene-time based animation is evaluated using the "sceneTime" value of the renderer that renders the scene.
+ The "sceneTime" base is typically used by players or editors that need to preview, edit and being able to change the evaluation time.
+ @see SCNSceneSourceAnimationImportPolicyKey
*/
-@property BOOL usesSceneTimeBase;
+@property (nonatomic) BOOL usesSceneTimeBase;
+
/*!
- @property fadeInDuration
- @abstract Determines the receiver's fade-in duration.
- @discussion When the fadeInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ Notifications & events
*/
-@property CGFloat fadeInDuration API_AVAILABLE(macosx(10.9));
-
+
+/**
+ Called when the animation starts.
+ */
+@property (nonatomic, copy, nullable) SCNAnimationDidStartBlock animationDidStart;
+
+/**
+ Called when the animation either completes its active duration or
+ is removed from the object it is attached to (i.e. the layer). The 'completed' argument of SCNAnimationDidStopBlock
+ is true if the animation reached the end of its active duration without being removed.
+ */
+@property (nonatomic, copy, nullable) SCNAnimationDidStopBlock animationDidStop;
+
+/**
+ Specifies the animation events attached to the receiver.
+ @see SCNAnimationEvent
+ */
+@property (nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents;
+
/*!
- @property fadeOutDuration
- @abstract Determines the receiver's fade-out duration.
- @discussion When the fadeOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
+ Additive and cumulative
*/
-@property CGFloat fadeOutDuration API_AVAILABLE(macosx(10.9));
+
+/**
+ When true the value specified by the animation will be "added" to
+ the current presentation value of the property to produce the new
+ presentation value. The addition function is type-dependent, e.g.
+ for affine transforms the two matrices are concatenated. Defaults to
+ NO. */
+@property (nonatomic, getter=isAdditive) BOOL additive;
+
+/**
+ The `cumulative' property affects how repeating animations produce
+ their result. If true then the current value of the animation is the
+ value at the end of the previous repeat cycle, plus the value of the
+ current repeat cycle. If false, the value is simply the value
+ calculated for the current repeat cycle. Defaults to NO.
+ */
+@property (nonatomic, getter=isCumulative) BOOL cumulative;
+
+@end
+
+
+
+/**
+ SCNAnimationPlayer let you control when and how to play and blend an animation
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAnimationPlayer : NSObject <SCNAnimatable, NSCopying, NSSecureCoding>
+
+/**
+ Initialize an animation player with an animation
+ @param animation The animation to play
+ */
++ (SCNAnimationPlayer *)animationPlayerWithAnimation:(SCNAnimation *)animation;
+
+/**
+ The played animation
+ */
+@property (nonatomic, readonly) SCNAnimation *animation;
+
+/**
+ The speed to play the animation at. Defaults to 1.0. Animatable
+ */
+@property (nonatomic) CGFloat speed;
+
+/**
+ Controls the influence of the played animation. When set to 1 the animation is applied without any blending. When set to less than 1, the animation value is blent with the current presentation value of the animated property. Defaults to 1.0. Animatable.
+ */
+@property (nonatomic) CGFloat blendFactor;
+
+/**
+ Specifies if the animation is paused. Defaults to NO.
+ */
+@property (nonatomic) BOOL paused;
+
+/*!
+ Actions
+ */
+
+/**
+ Set paused to NO and restart playing from the beginning of the animation.
+ */
+- (void)play;
+
+/**
+ Stop the animation.
+ */
+- (void)stop;
+
+/**
+ Stop the animation and smoothly blend out the animation over the specified duration.
+ */
+- (void)stopWithBlendOutDuration:(NSTimeInterval)duration;
+
+@end
+
+
+/**
+ Signature for the block executed when the animation event is triggered.
+ */
+typedef void (^SCNAnimationEventBlock)(id <SCNAnimation> animation, id animatedObject, BOOL playingBackward);
+
+
+/**
+ SCNAnimationEvent encapsulates a block to trigger at a specific time.
+ */
+API_AVAILABLE(macosx(10.9))
+@interface SCNAnimationEvent : NSObject
/*!
- @property animationEvents
- @abstract Specifies the animation events attached to the receiver.
+ @method animationEventWithKeyTime:block:
+ @abstract Returns an animation event instance
+ @param time The relative time to trigger the event.
+ @param eventBlock The block to call when the event is triggered.
+ @discussion "time" is relative to animation duration and therefor it has to be a value in the range [0,1].
*/
-@property(nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents API_AVAILABLE(macosx(10.9));
++ (instancetype)animationEventWithKeyTime:(CGFloat)time block:(SCNAnimationEventBlock)eventBlock;
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNAudioSource.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNNode.h>
@@ -38,6 +38,7 @@
/*!
@property positional
@abstract Marks the audio source as positional so that the audio mix considers relative position and velocity with regards to the SCNSceneRenderer's current listener node. Defaults to YES.
+ @discussion shouldStream must be set to false in order to get positional audio (see shouldStream).
@see SCNSceneRenderer audioListener.
*/
@property(nonatomic, getter=isPositional) BOOL positional;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNBoundingVolume.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -22,12 +22,13 @@
@abstract Fill the min and max vectors with the min and max vertex of the bounding box.
@param min A pointer to a SCNVector3 to store the min vertex of the bounding box into.
@param max A pointer to a SCNVector3 to store the max vertex of the bounding box into.
+ @discussion the returned bounding box is in local space of the receiver.
*/
- (BOOL)getBoundingBoxMin:(nullable SCNVector3 *)min max:(nullable SCNVector3 *)max NS_REFINED_FOR_SWIFT;
/*!
@method setBoundingBoxMin:max:
- @abstract Override the receiver bounding box with the min and max vectors provided.
+ @abstract Override the receiver bounding box with the min and max vectors provided (in local space of the receiver).
@param min A pointer to a SCNVector3 representing the min vertex of the desired bounding box.
@param max A pointer to a SCNVector3 representing the max vertex of the desired bounding box.
@discussion Passing nil as arguments will recompute the original bounding box of the receiver.
@@ -39,6 +40,7 @@
@abstract Fill the center vector with the center of the bounding sphere and store the radius of the bounding sphere in 'radius'.
@param center A pointer to a SCNVector3 to store the center of the bounding sphere into.
@param radius A pointer to a CGFloat to store the radius of the bounding sphere into.
+ @discussion the returned bounding sphere is in local space of the receiver.
*/
- (BOOL)getBoundingSphereCenter:(nullable SCNVector3 *)center radius:(nullable CGFloat *)radius NS_REFINED_FOR_SWIFT;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h 1969-12-31 19:00:00.000000000 -0500
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h 2017-08-11 21:12:10.000000000 -0400
@@ -0,0 +1,62 @@
+//
+// SCNCAAnimationExtensions.h
+//
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+#import <QuartzCore/QuartzCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class SCNAnimationEvent, SCNAnimation;
+
+
+@interface CAAnimation (SCNAnimation) <SCNAnimation>
+@end
+
+/*!
+ @category CAAnimation (SceneKitAdditions)
+ @abstract Extends the CAAnimation class for SceneKit explicit animations.
+ */
+@interface CAAnimation (SceneKitAdditions)
+
+/*!
+ Bridge with SCNAnimation
+*/
+/**
+ Initializes a CoreAnimation animation from a SCNAnimation
+ */
++ (CAAnimation *)animationWithSCNAnimation:(SCNAnimation *)animation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property usesSceneTimeBase
+ @abstract Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
+ @discussion A scene-time based animation is evaluated using the "sceneTime" value of the renderer that renders the scene.
+ */
+@property BOOL usesSceneTimeBase;
+
+/*!
+ @property fadeInDuration
+ @abstract Determines the receiver's fade-in duration.
+ @discussion When the fadeInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ */
+@property CGFloat fadeInDuration API_AVAILABLE(macosx(10.9));
+
+/*!
+ @property fadeOutDuration
+ @abstract Determines the receiver's fade-out duration.
+ @discussion When the fadeOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
+ */
+@property CGFloat fadeOutDuration API_AVAILABLE(macosx(10.9));
+
+/*!
+ @property animationEvents
+ @abstract Specifies the animation events attached to the receiver.
+ */
+@property(nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents API_AVAILABLE(macosx(10.9));
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNCamera.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNCamera.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,13 +1,19 @@
//
// SCNCamera.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
#import <SceneKit/SCNAnimation.h>
#import <SceneKit/SCNTechnique.h>
+
+typedef NS_ENUM(NSInteger, SCNCameraProjectionDirection) {
+ SCNCameraProjectionDirectionVertical = 0,
+ SCNCameraProjectionDirectionHorizontal = 1,
+} API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
NS_ASSUME_NONNULL_BEGIN
/*!
@@ -30,19 +36,32 @@
*/
@property(nonatomic, copy, nullable) NSString *name;
-/*!
- @property xFov
- @abstract Determines the receiver's field of view on the X axis (in degree). Animatable.
- @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+/*!
+ @property fieldOfView
+ @abstract Determines the receiver's field of view (in degree). Animatable.
+ @discussion defaults to 60°.
*/
-@property(nonatomic) double xFov;
+@property(nonatomic) CGFloat fieldOfView API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
-/*!
- @property yFov
- @abstract Determines the receiver's field of view on the Y axis (in degree). Animatable.
- @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+/*!
+ @property projectionDirection
+ @abstract Determines whether the fieldOfView (or orthographicScale) is verical or horizontal. Defaults to vertical.
+ */
+@property(nonatomic) SCNCameraProjectionDirection projectionDirection API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property focalLength
+ @abstract Determines the receiver's focal length in millimeter. Animatable.
+ @discussion defaults to 50mm.
*/
-@property(nonatomic) double yFov;
+@property(nonatomic) CGFloat focalLength API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property sensorHeight
+ @abstract Determines the vertical size of the sensor in millimeter. Animatable.
+ @discussion Defaults to 24mm.
+ */
+@property(nonatomic) CGFloat sensorHeight API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@property zNear
@@ -87,35 +106,42 @@
- (void)setProjectionTransform:(SCNMatrix4)projectionTransform API_AVAILABLE(macosx(10.9));
/*!
- @functiongroup Depth of field
+ Depth of field
*/
+
/*!
- @property focalDistance
- @abstract Determines the receiver's focal distance. Animatable.
- @discussion When non zero, the focal distance determines how the camera focuses the objects in the 3d scene. Defaults to 10.0
+ @property wantsDepthOfField
+ @abstract Determines if the receiver has depth of field. Defaults to NO.
*/
-@property(nonatomic) CGFloat focalDistance API_AVAILABLE(macosx(10.9));
+@property(nonatomic) BOOL wantsDepthOfField API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property focalSize
- @abstract Determines the receiver's focal size. Animatable.
- @discussion Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
+ @property focusDistance
+ @abstract Determines the receiver's focus distance. Animatable.
+ @discussion Defaults to 2.5
*/
-@property(nonatomic) CGFloat focalSize API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat focusDistance API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property focalBlurRadius
- @abstract Determines the receiver's focal radius. Animatable.
- @discussion Determines the maximum amount of blur for objects out of focus. Defaults to 0.
+ @property focalBlurSampleCount
+ @abstract Determines the receiver's sample count for depth of field effect.
+ @discussion Defaults to 25.
*/
-@property(nonatomic) CGFloat focalBlurRadius API_AVAILABLE(macosx(10.9));
+@property(nonatomic) NSInteger focalBlurSampleCount API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property aperture
- @abstract Determines the receiver's aperture. Animatable.
- @discussion Determines how fast the transition between in-focus and out-of-focus areas is. The greater the aperture is the faster the transition is. Defaults to 1/8.
+ @property fStop
+ @abstract Determines the receiver's fstop. Animatable.
+ @discussion Defaults to 5.6.
*/
-@property(nonatomic) CGFloat aperture API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat fStop API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property apertureBladeCount
+ @abstract Determines the receiver's blade count of the aperture.
+ @discussion Defaults to 6.
+ */
+@property(nonatomic) NSInteger apertureBladeCount API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@property motionBlurIntensity
@@ -124,8 +150,49 @@
*/
@property(nonatomic) CGFloat motionBlurIntensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+
+
+/*!
+ Screen space ambient occlusion
+ */
+
+/*!
+ @property screenSpaceAmbientOcclusionIntensity
+ @abstract Determines the intensity of the screen space ambient occlusion. Animatable.
+ @discussion defaults to 0.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionIntensity API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionRadius
+ @abstract Determines the screen space ambient occlusion radius in scene unit. Animatable.
+ @discussion defaults to 5.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionRadius API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionBias
+ @abstract Determines self occlusion bias in scene unit.
+ @discussion defaults to 0.03.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionBias API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionDepthThreshold
+ @abstract Determines the depth blur threshold in scene unit.
+ @discussion defaults to 0.2.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionDepthThreshold API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
- @functiongroup High Dynamic Range
+ @property screenSpaceAmbientOcclusionNormalThreshold
+ @abstract Determines the normal blur threshold.
+ @discussion defaults to 0.3.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionNormalThreshold API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ High Dynamic Range
*/
/*!
@property wantsHDR
@@ -165,7 +232,7 @@
/*!
@property exposureAdaptationBrighteningSpeedFactor
- @abstract Determines the exposure adaptation speed whien going from dark areas to bright areas. Defaults to 0.6.
+ @abstract Determines the exposure adaptation speed when going from dark areas to bright areas. Defaults to 0.6.
*/
@property(nonatomic) CGFloat exposureAdaptationDarkeningSpeedFactor API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
@@ -195,7 +262,7 @@
/*!
@property bloomBlurRadius
- @abstract Determines the radius of the bloom effect in pixels. Animatable. Defaults to 4.
+ @abstract Determines the radius of the bloom effect in points. Animatable. Defaults to 4.
*/
@property(nonatomic) CGFloat bloomBlurRadius API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
@@ -247,6 +314,51 @@
*/
@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+
+//Deprecated
+
+/*!
+ @property focalBlurRadius
+ @abstract Determines the receiver's focal radius. Animatable.
+ @discussion Determines the maximum amount of blur for objects out of focus. Defaults to 0.
+ */
+@property(nonatomic) CGFloat focalBlurRadius API_DEPRECATED("Use fStop instead", macosx(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property xFov
+ @abstract Determines the receiver's field of view on the X axis (in degree). Animatable.
+ @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+ */
+@property(nonatomic) double xFov API_DEPRECATED("Use -[SCNCamera fov] or -[SCNCamera focalLength] instead", macosx(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property yFov
+ @abstract Determines the receiver's field of view on the Y axis (in degree). Animatable.
+ @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+ */
+@property(nonatomic) double yFov API_DEPRECATED("Use -[SCNCamera fov] or -[SCNCamera focalLength] instead", macosx(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property aperture
+ @abstract Determines the receiver's aperture. Animatable.
+ @discussion Defaults to 1/8.0.
+ */
+@property(nonatomic) CGFloat aperture API_DEPRECATED("Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture.", macosx(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property focalSize
+ @abstract Determines the receiver's focal size. Animatable.
+ @discussion Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
+ */
+@property(nonatomic) CGFloat focalSize API_DEPRECATED_WITH_REPLACEMENT("-focalDistance", macosx(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property focalDistance
+ @abstract Determines the receiver's focal distance. Animatable.
+ @discussion When non zero, the focal distance determines how the camera focuses the objects in the 3d scene. Defaults to 10.0 prior to macOS 10.13, iOS 11, tvOS 11 and watchOS 4. Defaults to 2.5 otherwise.
+ */
+@property(nonatomic) CGFloat focalDistance API_DEPRECATED_WITH_REPLACEMENT("-focusDistance", macosx(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNCameraController.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h 1969-12-31 19:00:00.000000000 -0500
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNCameraController.h 2017-08-11 21:12:10.000000000 -0400
@@ -0,0 +1,107 @@
+//
+// SCNCameraController.h
+//
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <SceneKit/SceneKitTypes.h>
+
+@class SCNNode;
+@class SCNCameraController;
+
+// SCNInteractionMode specify the behavior of the camera relative to
+// screen space interactions.
+typedef NS_ENUM(NSInteger, SCNInteractionMode) {
+ // Relative to up vector.
+ SCNInteractionModeFly,
+ SCNInteractionModeOrbitTurntable, // rotate around target with absolute orientation from angles accumulation.
+ // Up vector not taken into account.
+ SCNInteractionModeOrbitAngleMapping, // rotate around target by mapping 2D screen coordinates to spherical coordinates.
+ SCNInteractionModeOrbitCenteredArcball,
+ SCNInteractionModeOrbitArcball, // rotate around target by mapping 2D screen coordinates to an half sphere.
+ SCNInteractionModePan, // camera space translation on X/Y
+ SCNInteractionModeTruck, // camera space translation on X/Z
+} API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@protocol SCNCameraControllerDelegate <NSObject>
+
+@optional
+- (void)cameraInertiaWillStartForController:(SCNCameraController*)cameraController;
+- (void)cameraInertiaDidEndForController:(SCNCameraController*)cameraController;
+
+@end
+
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNCameraController : NSObject
+
+@property(nonatomic, assign) id<SCNCameraControllerDelegate> delegate;
+
+@property(nonatomic, retain) SCNNode* pointOfView;
+@property(nonatomic, assign) SCNInteractionMode interactionMode;
+
+// The camera target in world space for orbit rotation.
+@property(nonatomic, assign) SCNVector3 target;
+
+// Automatically update the target in beginInteraction
+@property(nonatomic, assign) BOOL automaticTarget; //default to NO
+
+// The up vector in world space used as reference for SCNInteractionModeFly and SCNInteractionModeOrbitTurntable camera modes.
+// Default to UnitY(0, 1, 0).
+@property(nonatomic, assign) SCNVector3 worldUp;
+
+// Set to YES to enable inertia on endInteraction.
+// Default to NO.
+@property(nonatomic, assign) BOOL inertiaEnabled;
+
+// The friction coefficient applied to the inertia.
+// Default to 0.05.
+@property(nonatomic, assign) float inertiaFriction;
+
+// Returns YES if inertia is running.
+@property(nonatomic, readonly, getter = isInertiaRunning) BOOL inertiaRunning;
+
+// Maximum vertical view angle in degree for Fly mode and Turntable.
+// A value of 0 indicates no angle locking. Default to 0.
+@property(nonatomic, assign) float maximumVerticalAngle;
+
+// Maximum horizontal view angle in degree for Fly mode and Turntable.
+// A value of 0 indicates no angle locking. Default to 0.
+@property(nonatomic, assign) float maximumHorizontalAngle;
+
+// Translate the camera along the local X/Y/Z axis.
+- (void)translateInCameraSpaceByX:(float)deltaX Y:(float)deltaY Z:(float)deltaX;
+
+// Move the camera to a position where the bounding sphere of all nodes is fully visible.
+// Also set the camera target has the center of the bounding sphere.
+- (void)frameNodes:(NSArray<SCNNode*>*)nodes;
+
+// Rotate delta is in degree.
+- (void)rotateByX:(float)deltaX Y:(float)deltaY;
+
+// Rotate the camera around the given screen space point. Delta is in degree.
+- (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;
+
+// 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;
+
+// clear the camera roll if any
+- (void)clearRoll;
+
+// Stop current inertia.
+- (void)stopInertia;
+
+// Begin/Continue/End interaction using an input location relative to viewport.
+// The behavior depends on the current interactionMode.
+- (void)beginInteraction:(CGPoint)location withViewport:(CGSize)viewport;
+- (void)continueInteraction:(CGPoint)location withViewport:(CGSize)viewport sensitivity:(CGFloat)sensitivity;
+- (void)endInteraction:(CGPoint)location withViewport:(CGSize)viewport velocity:(CGPoint)velocity;
+
+@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNConstraint.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h 2016-09-26 20:55:17.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNConstraint.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNConstraint.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -20,13 +20,27 @@
@interface SCNConstraint : NSObject <NSCopying, NSSecureCoding, SCNAnimatable>
/*!
+ @property enable
+ @abstract Determines whether the constraint is enabled or not. Defaults to YES.
+ */
+@property(nonatomic, getter = isEnabled) BOOL enabled NS_AVAILABLE(10_10, 8_0);
+
+/*!
@property influenceFactor
@abstract Specifies the inflence factor of the receiver. Defaults to 1. Animatable
*/
@property(nonatomic) CGFloat influenceFactor API_AVAILABLE(macosx(10.10));
+/*!
+ @property incremental
+ @abstract Specifies whether or not the contraint should applies incrementally and have it's effect being cumulated over the rendered frames. Defaults to true on macos 10.13, ios 11.0, tvos 11.0, watchos 4.0, default to false on previous releases.
+ */
+@property(nonatomic, getter=isIncremental) BOOL incremental API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+// MARK: -
+
/*!
@class SCNLookAtConstraint
@abstract A SCNLookAtConstraint applies on a node's orientation so that it always look at another node.
@@ -51,6 +65,25 @@
- (void)setTarget:(nullable SCNNode *)target API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
/*!
+ @property targetOffset
+ @abstract Offset look at position in target space. Defaults to zero. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 targetOffset API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property targetOffset
+ @abstract Front direction in the constraint owner local space. Defaults to [SCNNode localFront]. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 localFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property worldUp
+ @abstract Up reference direction in world space. Defaults to [SCNNode localUp]. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 worldUp API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/*!
@property gimbalLockEnabled
@abstract Specifies whether the receiver enables the gimbal lock. Defaults to NO.
@discussion Enabling the gimbal lock prevents the receiver from rotating the constrained node around to roll axis.
@@ -59,6 +92,8 @@
@end
+// MARK: -
+
typedef NS_OPTIONS(NSUInteger, SCNBillboardAxis) {
SCNBillboardAxisX = 0x1 << 0,
SCNBillboardAxisY = 0x1 << 1,
@@ -84,6 +119,8 @@
@end
+// MARK: -
+
/*!
@class SCNTransformConstraint
@abstract A SCNTransformConstraint applies on the transform of a node via a custom block.
@@ -100,8 +137,27 @@
*/
+ (instancetype)transformConstraintInWorldSpace:(BOOL)world withBlock:(SCNMatrix4 (^)(SCNNode *node, SCNMatrix4 transform))block;
+/*!
+ @method positionConstraintInWorldSpace:withBlock:
+ @abstract Creates and returns a SCNTransformConstraint object with the specified parameters.
+ @param world Determines whether the constraint is evaluated in world or local space.
+ @param block The custom block to call to evaluate the constraint.
+ @discussion The node and its position are passed to the block. The position returned by the block will be used to render the node.
+ */
++ (instancetype)positionConstraintInWorldSpace:(BOOL)world withBlock:(SCNVector3 (^)(SCNNode *node, SCNVector3 position))block API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @method orientationConstraintInWorldSpace:withBlock:
+ @abstract Creates and returns a SCNTransformConstraint object with the specified parameters.
+ @param world Determines whether the constraint is evaluated in world or local space.
+ @param block The custom block to call to evaluate the constraint.
+ @discussion The node and its quaternion are passed to the block. The quaternion returned by the block will be used to render the node.
+ */
++ (instancetype)orientationConstraintInWorldSpace:(BOOL)world withBlock:(SCNQuaternion (^)(SCNNode *node, SCNQuaternion quaternion))block API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+// MARK: -
/*!
@class SCNIKConstraint
@@ -147,4 +203,228 @@
@end
+// MARK: -
+
+/*!
+ @class SCNDistanceConstraint
+ @abstract A SCNDistanceConstraint ensure a minimum/maximum distance with a target node.
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNDistanceConstraint : SCNConstraint
+
+/*!
+ @method distanceConstraintWithTarget
+ @abstract Creates and returns a SCNDistanceConstraint constraint.
+ */
++ (instancetype)distanceConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property target
+ @abstract Defines the target node to keep distance with.
+ */
+@property(nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property minimumDistance
+ @abstract The minimum distance. Defaults to 0. Animatable.
+ */
+@property(nonatomic, assign) CGFloat minimumDistance;
+
+/*!
+ @property maximumDistance
+ @abstract The minimum distance. Defaults to MAXFLOAT. Animatable.
+ */
+@property(nonatomic, assign) CGFloat maximumDistance;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNReplicatorConstraint
+ @abstract A SCNReplicatorConstraint replicates the position/orientation/scale of a target node
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNReplicatorConstraint : SCNConstraint
+
+/*!
+ @method replicatorWithTargetNode
+ @abstract Creates and returns a SCNReplicatorConstraint constraint.
+ */
++ (instancetype)replicatorConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property target
+ @abstract Defines the target node to replicate
+ */
+@property(nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property replicatesOrientation
+ @abstract Defines whether or not the constraint should replicate the target orientation. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesOrientation;
+
+/*!
+ @property replicatesPosition
+ @abstract Defines whether or not the constraint should replicate the target position. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesPosition;
+
+/*!
+ @property replicatesScale
+ @abstract Defines whether or not the constraint should replicate the target scale. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesScale;
+
+/*!
+ @property orientationOffset
+ @abstract Defines an addition orientation offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNQuaternion orientationOffset;
+
+/*!
+ @property positionOffset
+ @abstract Defines an addition orientation offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNVector3 positionOffset;
+
+/*!
+ @property scaleOffset
+ @abstract Defines an addition scale offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNVector3 scaleOffset;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNAccelerationConstraint
+ @abstract A SCNAccelerationConstraint caps the acceleration and velocity of a node
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAccelerationConstraint : SCNConstraint
+
+/*!
+ @method accelerationConstraint
+ @abstract Creates and returns a SCNAccelerationConstraint object.
+ */
++ (instancetype)accelerationConstraint;
+
+/*!
+ @property maximumLinearAcceleration
+ @abstract Controls the maximum linear acceleration. Defaults to MAXFLOAT. Animatable.
+ @discussion The maximum linear acceleration is in m.s^-2
+ */
+@property(nonatomic, assign) CGFloat maximumLinearAcceleration;
+
+/*!
+ @property maximumLinearVelocity
+ @abstract Controls the maximum linear velocity. Defaults to MAXFLOAT. Animatable.
+ @discussion The maximum linear velocity is in m.s
+ */
+@property(nonatomic, assign) CGFloat maximumLinearVelocity;
+
+/*!
+ @property decelerationDistance
+ @abstract Controls the distance at which the node should start decelerating. Defaults to 0. Animatable.
+ */
+@property(nonatomic, assign) CGFloat decelerationDistance;
+
+/*!
+ @property damping
+ @abstract Specifies the damping factor of the receiver. Optionally reduce the body's linear velocity each frame to simulate fluid/air friction. Value should be zero or greater. Defaults to 0.1. Animatable.
+ */
+@property(nonatomic, assign) CGFloat damping;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNSliderConstraint
+ @abstract A SCNSliderConstraint constraint makes a node to collide and slide against a category of nodes
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNSliderConstraint : SCNConstraint
+
+/*!
+ @method accelerationConstraint
+ @abstract Creates and returns a SCNSliderConstraint object.
+ */
++ (instancetype)sliderConstraint;
+
+/*!
+ @property collisionCategoryBitMask
+ @abstract Defines the category of node to collide against. Defaults to 0.
+ */
+@property (nonatomic, assign) NSUInteger collisionCategoryBitMask;
+
+/*!
+ @property radius
+ @abstract Defines the radius of the slider. Defaults to 1.
+ */
+@property (nonatomic, assign) CGFloat radius;
+
+/*!
+ @property offset
+ @abstract Defines the offset of the slider. Defaults to (0,0,0).
+ */
+@property (nonatomic, assign) SCNVector3 offset;
+
+@end
+
+// MARK: -
+
+@class SCNAvoidOccluderConstraint;
+
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@protocol SCNAvoidOccluderConstraintDelegate <NSObject>
+@optional
+- (BOOL)avoidOccluderConstraint:(SCNAvoidOccluderConstraint *)constraint shouldAvoidOccluder:(SCNNode *)occluder forNode:(SCNNode *)node;
+- (void)avoidOccluderConstraint:(SCNAvoidOccluderConstraint *)constraint didAvoidOccluder:(SCNNode *)occluder forNode:(SCNNode *)node;
+@end
+
+/*!
+ @class SCNAvoidOccluderConstraint
+ @abstract A SCNAvoidOccluderConstraint constraints place the receiver at a position that prevent nodes with the specified category to occlude the target.
+ @discussion The target node and it's children are ignored as potential occluders.
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAvoidOccluderConstraint : SCNConstraint
+
+/*!
+ @method avoidOccluderConstraintWithTarget
+ @abstract Creates and returns a SCNAvoidOccluderConstraint object.
+ */
++ (instancetype)avoidOccluderConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property delegate
+ @abstract The receiver's delegate
+ */
+@property (nonatomic, assign) id<SCNAvoidOccluderConstraintDelegate> delegate;
+
+/*!
+ @property target
+ @abstract Defines the target node
+ */
+@property (nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property occluderCategoryBitMask
+ @abstract Defines the category of node to consider as occluder. Defaults to 1.
+ */
+@property (nonatomic, assign) NSUInteger occluderCategoryBitMask;
+
+/*!
+ @property bias
+ @abstract Defines the bias the apply after moving the receiver to avoid occluders. Defaults to 10e-5.
+ @discussion A positive bias will move the receiver closer to the target.
+ */
+@property (nonatomic, assign) CGFloat bias;
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNGeometry.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h 2016-08-05 02:35:40.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNGeometry.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNGeometry.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -13,14 +13,15 @@
@class SCNGeometrySource;
@class SCNGeometryElement;
+@class SCNGeometryTessellator;
@class SCNLevelOfDetail;
@protocol MTLBuffer;
typedef NS_ENUM(NSInteger, SCNGeometryPrimitiveType) {
- SCNGeometryPrimitiveTypeTriangles = 0,
- SCNGeometryPrimitiveTypeTriangleStrip = 1,
- SCNGeometryPrimitiveTypeLine = 2,
- SCNGeometryPrimitiveTypePoint = 3,
+ SCNGeometryPrimitiveTypeTriangles = 0,
+ SCNGeometryPrimitiveTypeTriangleStrip = 1,
+ SCNGeometryPrimitiveTypeLine = 2,
+ SCNGeometryPrimitiveTypePoint = 3,
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 2
SCNGeometryPrimitiveTypePolygon API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)) = 4
#endif
@@ -46,6 +47,8 @@
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneWeights API_AVAILABLE(macosx(10.10));
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneIndices API_AVAILABLE(macosx(10.10));
+// MARK: -
+
/*!
@class SCNGeometry
@abstract SCNGeometry is an abstract class that represents the geometry that can be attached to a SCNNode.
@@ -159,13 +162,28 @@
@property(nonatomic, copy, nullable) NSArray<SCNLevelOfDetail *> *levelsOfDetail API_AVAILABLE(macosx(10.9));
/*!
+ @property tessellator
+ @abstract Specifies how the geometry should be tessellated at render time on the GPU. Defaults to nil.
+ */
+#if SCN_ENABLE_METAL
+@property(nonatomic, retain, nullable) SCNGeometryTessellator *tessellator API_AVAILABLE(macosx(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos);
+#endif
+
+/*!
@property subdivisionLevel
@abstract Specifies the subdivision level of the receiver. Defaults to 0.
- @discussion A subdivision level of 0 means no subdivision.
+ @discussion A subdivision level of 0 means no subdivision. When a SCNGeometrySubdivisionSurfaceTessellator is set the subdivision is done on the GPU and the receiver's subdivisionLevel is added to the tessellator's subdivisionLevel.
*/
@property(nonatomic) NSUInteger subdivisionLevel API_AVAILABLE(macosx(10.10));
/*!
+ @property wantsAdaptiveSubdivision
+ @abstract Specifies if the subdivision is adaptive or uniform. Defaults to NO.
+ @discussion Setting wantsAdaptiveSubdivision to YES doesn't ensure that the subdivision will be adaptive. Adaptive subdivision are only supported by some topologies (quads only).
+ */
+@property (nonatomic) BOOL wantsAdaptiveSubdivision API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property edgeCreasesElement
@abstract Specifies the edges creases that control the subdivision. Defaults to nil.
@discussion The primitive type of this geometry element must be SCNGeometryPrimitiveTypeLine. See subdivisionLevel above to control the level of subdivision. See edgeCreasesElement above to specify edges for edge creases.
@@ -181,6 +199,7 @@
@end
+// MARK: -
/*!
@class SCNGeometrySource
@@ -234,7 +253,7 @@
/*!
@method geometrySourceWithBuffer:semantic:vectorCount:floatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:
@abstract Creates and returns a geometry source from the given data and parameters.
- @param buffer A metal buffer.
+ @param mtlBuffer A metal buffer.
@param vertexFormat The vertex format.
@param semantic The semantic of the geometry source.
@param vertexCount The number of vertex.
@@ -315,6 +334,7 @@
@end
+// MARK: -
/*!
@class SCNGeometryElement
@@ -352,11 +372,105 @@
@property(nonatomic, readonly) NSInteger primitiveCount;
/*!
+ @property primitiveRange
+ @abstract <#primitiveRange description#>
+ */
+@property(nonatomic) NSRange primitiveRange API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property bytesPerIndex
@abstract The number of bytes that represent an index value
*/
@property(nonatomic, readonly) NSInteger bytesPerIndex;
+/*!
+ @property pointSize, in local space.
+ */
+@property(nonatomic) CGFloat pointSize API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property minimumPointScreenSpaceRadius
+ */
+@property(nonatomic) CGFloat minimumPointScreenSpaceRadius API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property maximumPointScreenSpaceRadius
+ */
+@property(nonatomic) CGFloat maximumPointScreenSpaceRadius API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+// MARK: -
+
+#if SCN_ENABLE_METAL
+
+typedef NS_ENUM(NSInteger, SCNTessellationSmoothingMode) {
+ SCNTessellationSmoothingModeNone = 0,
+ SCNTessellationSmoothingModePNTriangles,
+ SCNTessellationSmoothingModePhong
+} API_AVAILABLE(macosx(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+ @class SCNGeometryTessellator
+ @abstract A geometry tessellator describes how a more detailed surface is calculated from the geometry's initial surface.
+ */
+
+API_AVAILABLE(macosx(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos)
+@interface SCNGeometryTessellator : NSObject <NSCopying, NSSecureCoding>
+
+/*!
+ @property adaptive
+ @abstract Specifies if the tessellation should be uniform or adaptive. Defaults to NO.
+ */
+@property (nonatomic, getter=isAdaptive) BOOL adaptive;
+
+/*!
+ @property screenspace
+ @abstract Specifies if the level of tessellation should be adapted in screenSpace. Defaults to NO.
+ */
+@property (nonatomic, getter=isScreenSpace) BOOL screenSpace;
+
+/*!
+ @property tessellationFactorScale
+ @abstract Specifies the scale factor applied to the per-patch tessellation factors. Defaults to 1.
+ */
+@property (nonatomic) CGFloat tessellationFactorScale;
+
+/*!
+ @property edgeTessellationFactor
+ @abstract Specifies the edge tessellation factor. Defaults to 1.
+ @discussion This has no effect for adaptive subdivision
+ */
+@property (nonatomic) CGFloat edgeTessellationFactor;
+
+/*!
+ @property insideTessellationFactor
+ @abstract Specifies the inside tessellation factor. Defaults to 1.
+ @discussion This has no effect for adaptive subdivision
+ */
+@property (nonatomic) CGFloat insideTessellationFactor;
+
+/*!
+ @property maximumEdgeLength
+ @abstract Specifies the maximum edge length. Defaults to 1.
+ @discussion This has no effect for non-adaptive subdivision
+ */
+@property (nonatomic) CGFloat maximumEdgeLength;
+
+/*!
+ @property tessellationPartitionMode
+ @abstract Specifies the tessellation partition mode. Defaults to MTLTessellationPartitionModePow2.
+ */
+@property (nonatomic) MTLTessellationPartitionMode tessellationPartitionMode;
+
+/*!
+ @property smoothingMode
+ @abstract Defaults to SCNTessellationSmoothingModeNone.
+ */
+@property(nonatomic) SCNTessellationSmoothingMode smoothingMode;
+
+@end
+
+#endif
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNHitTest.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h 2016-08-05 02:31:37.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNHitTest.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNHitTest.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -10,6 +10,15 @@
@class SCNNode;
+/*! @enum SCNHitTestSearchMode
+ @abstract hit test modes
+ */
+typedef NS_ENUM(NSInteger, SCNHitTestSearchMode) {
+ SCNHitTestSearchModeClosest = 0, // The closest object found.
+ SCNHitTestSearchModeAll = 1, // All found objects sorted from nearest to farthest.
+ SCNHitTestSearchModeAny = 2 // The first object found. This object is not necessarily the nearest.
+} API_AVAILABLE(macosx(10.13), ios(12.0), tvos(12.0), watchos(4.0));
+
/*! @group Hit-test options */
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 3
@@ -18,15 +27,17 @@
typedef NSString * SCNHitTestOption;
#endif
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestFirstFoundOnlyKey; // If set to YES, returns the first object found. This object is not necessarily the nearest. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestSortResultsKey; // Determines whether the results should be sorted. If set to YES sorts nearest objects first. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestClipToZRangeKey; // If set to YES ignores the objects clipped by the zNear/zFar range of the current point of view. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBackFaceCullingKey; // If set to YES ignores the faces not facing to the camera. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBoundingBoxOnlyKey; // If set to YES only tests the bounding boxes of the 3D objects. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreChildNodesKey; // Determines whether the child nodes are ignored. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestRootNodeKey; // Specifies the root node to use for the hit test. Defaults to the root node of the scene.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreHiddenNodesKey API_AVAILABLE(macosx(10.9)); // Determines whether hidden nodes should be ignored. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionCategoryBitMask API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Determines the node categories to test. Defaults to all bits set.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestClipToZRangeKey; // If set to YES ignores the objects clipped by the zNear/zFar range of the current point of view. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBackFaceCullingKey; // If set to YES ignores the faces not facing to the camera. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBoundingBoxOnlyKey; // If set to YES only tests the bounding boxes of the 3D objects. Defaults to NO.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreChildNodesKey; // Determines whether the child nodes are ignored. Defaults to NO.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestRootNodeKey; // Specifies the root node to use for the hit test. Defaults to the root node of the scene.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreHiddenNodesKey API_AVAILABLE(macosx(10.9)); // Determines whether hidden nodes should be ignored. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionCategoryBitMask API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Determines the node categories to test. Defaults to all bits set.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionSearchMode API_AVAILABLE(macosx(10.13), ios(12.0), tvos(12.0), watchos(4.0)); // Determines whether the search should be exhaustive. Defaults to SCNHitTestSearchModeClosest.
+
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestFirstFoundOnlyKey; // Deprecated, use SCNHitTestSearchModeAny for the SCNHitTestOptionSearchMode option instead
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestSortResultsKey; // Deprecated, use SCNHitTestSearchModeAll for the SCNHitTestOptionSearchMode option instead
#define SCNHitTestOptionFirstFoundOnly SCNHitTestFirstFoundOnlyKey
#define SCNHitTestOptionSortResults SCNHitTestSortResultsKey
@@ -68,7 +79,7 @@
@property(nonatomic, readonly) SCNMatrix4 modelTransform;
/*! The bone node hit. Only available if the node hit has a SCNSkinner attached. */
-@property(nonatomic, readonly) SCNNode *boneNode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly, nullable) SCNNode *boneNode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
/*!
@method textureCoordinatesWithMappingChannel:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNJavascript.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNJavascript.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNJavascript.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNLayer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h 2017-02-10 20:01:50.000000000 -0500
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNLayer.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLayer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLevelOfDetail.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNLight.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNLight.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLight.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -23,18 +23,18 @@
typedef NSString * SCNLightType;
#endif
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeAmbient; // Ambient light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeOmni; // Omnidirectional light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeDirectional; // Directional light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeSpot; // Spot light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeAmbient; // Ambient light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeOmni; // Omnidirectional light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeDirectional; // Directional light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeSpot; // Spot light
FOUNDATION_EXTERN SCNLightType const SCNLightTypeIES API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // IES light
FOUNDATION_EXTERN SCNLightType const SCNLightTypeProbe API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Light probe
/*! @enum SCNShadowMode
@abstract The different modes available to compute shadows.
@discussion When the shadow mode is set to SCNShadowModeForward, shadows are computed while computing the lighting. In this mode only the alpha component of the shadow color is used to alter the lighting contribution.
- When the shadow mode is set to SCNShadowModeDeferred shadows are applied as a post process. Shadows are blend over the final image and can therefor be of any arbitrary color. However it is most of the time less effiscient as SCNShadowModeForward, except when a scene has a lot of overdraw.
- When the shadow mode is set to SCNShadowModeModulated the light doesn't illuminate the scene anymore, it only casts shadows. Therefor setting the light color has no effect. In this mode gobos act as a shadow projector: the gobo image is modulated with the shadow receiver's fragments. The typical usage is to use an image of a radial gradient (black to white) that is projected under a character (and use the categoryBitMask of the light and nodes to exclude the character from the shadow receiver).
+ When the shadow mode is set to SCNShadowModeDeferred shadows are applied as a post process. Shadows are blend over the final image and can therefor be of any arbitrary color. However it is most of the time less efficient than SCNShadowModeForward, except when a scene has a lot of overdraw.
+ When the shadow mode is set to SCNShadowModeModulated the light doesn't illuminate the scene anymore, it only casts shadows. Therefore setting the light color has no effect. In this mode gobos act as a shadow projector: the gobo image is modulated with the shadow receiver's fragments. The typical usage is to use an image of a radial gradient (black to white) that is projected under a character (and use the categoryBitMask of the light and nodes to exclude the character from the shadow receiver).
*/
typedef NS_ENUM(NSInteger, SCNShadowMode) {
SCNShadowModeForward = 0,
@@ -102,7 +102,7 @@
/*!
@property shadowColor
@abstract Specifies the color (CGColorRef or NSColor) of the shadow casted by the receiver. Defaults to black. Animatable.
- @discussion on iOS 9 / macOS 10.11 or earlier, this defaults to black 50% transparent.
+ @discussion On iOS 9 or earlier and macOS 10.11 or earlier, this defaults to black 50% transparent.
*/
@property(nonatomic, retain) id shadowColor;
@@ -122,7 +122,7 @@
/*!
@property shadowSampleCount
@abstract Specifies the number of sample per fragment to compute the shadow map. Defaults to 0.
- @discussion on macOS 10.11 or lower, the shadowSampleCount defaults to 16. On iOS 9 or lower it defaults to 1.0.
+ @discussion On macOS 10.11 or earlier, the shadowSampleCount defaults to 16. On iOS 9 or earlier it defaults to 1.0.
On macOS 10.12, iOS 10 and greater, when the shadowSampleCount is set to 0, a default sample count is chosen depending on the platform.
*/
@property(nonatomic) NSUInteger shadowSampleCount API_AVAILABLE(macosx(10.10));
@@ -135,10 +135,47 @@
/*!
@property shadowBias
- @abstrat Specifies the correction to apply to the shadow map to correct acne artefacts. It is multiplied by an implementation-specific value to create a constant depth offset. Defaults to 1.0
+ @abstract Specifies the correction to apply to the shadow map to correct acne artefacts. It is multiplied by an implementation-specific value to create a constant depth offset. Defaults to 1.0
*/
@property(nonatomic) CGFloat shadowBias API_AVAILABLE(macosx(10.10));
+/*!
+ @property automaticallyAdjustsShadowProjection
+ @abstract Specifies if the shadow map projection should be done automatically or manually by the user. Defaults to YES.
+ */
+@property(nonatomic) BOOL automaticallyAdjustsShadowProjection API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property maximumShadowDistance
+ @abstract Specifies the maximum distance from the viewpoint from which the shadows for the receiver light won't be computed. Defaults to 100.0.
+ */
+@property(nonatomic) CGFloat maximumShadowDistance API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property forcesBackFaceCasters
+ @abstract Render only back faces of the shadow caster when enabled. Defaults to NO.
+ This is a behavior change from previous releases.
+ */
+@property(nonatomic) BOOL forcesBackFaceCasters API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property sampleDistributedShadowMaps
+ @abstract Use the sample distribution of the main rendering to better fit the shadow frusta. Defaults to NO.
+ */
+@property(nonatomic) BOOL sampleDistributedShadowMaps API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property shadowCascadeCount
+ @abstract Specifies the number of distinct shadow maps that will be computed for the receiver light. Defaults to 1. Maximum is 4.
+ */
+@property(nonatomic) NSUInteger shadowCascadeCount API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property shadowCascadeSplittingFactor
+ @abstract Specifies a factor to interpolate between linear splitting (0) and logarithmic splitting (1). Defaults to 0.15.
+ */
+@property(nonatomic) CGFloat shadowCascadeSplittingFactor API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
#pragma mark - Light projection settings for shadows
@@ -151,7 +188,7 @@
/*!
@property zNear
- @abstract Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable. Defaults to 1.
+ @abstract Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable. Defaults to 1.
*/
@property(nonatomic) CGFloat zNear API_AVAILABLE(macosx(10.10));
@@ -189,13 +226,13 @@
@property spotInnerAngle
@abstract The angle in degrees between the spot direction and the lit element below which the lighting is at full strength. Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat spotInnerAngle API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat spotInnerAngle API_AVAILABLE(macosx(10.10));
/*!
@property spotOuterAngle
@abstract The angle in degrees between the spot direction and the lit element after which the lighting is at zero strength. Animatable. Defaults to 45 degrees.
*/
-@property(nonatomic) CGFloat spotOuterAngle API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat spotOuterAngle API_AVAILABLE(macosx(10.10));
#pragma mark - Other
@@ -258,7 +295,7 @@
/*! @constant SCNLightSpotOuterAngleKey The angle in degrees between the spot direction and the lit element after which the lighting is at zero strength. Animatable as "spotOuterAngle". Defaults to 45 degrees. */
FOUNDATION_EXTERN NSString * const SCNLightSpotOuterAngleKey API_DEPRECATED("Use SCNLight.spotOuterAngle instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
-/*! @constant SCNLightShadowNearClippingKey Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable as "zNear". Defaults to 1. */
+/*! @constant SCNLightShadowNearClippingKey Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable as "zNear". Defaults to 1. */
FOUNDATION_EXTERN NSString * const SCNLightShadowNearClippingKey API_DEPRECATED("Use SCNLight.zNear instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightShadowFarClippingKey Specifies the maximal distance between the light and a visible surface to cast shadow on. If a surface is further from the light than this maximal distance, then the surface won't be shadowed. Animatable as "zFar". Defaults to 100. */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNMaterial.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNMaterial.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMaterial.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -90,6 +90,11 @@
FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelConstant;
FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelPhysicallyBased API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+typedef NS_ENUM(NSUInteger, SCNFillMode) {
+ SCNFillModeFill = 0,
+ SCNFillModeLines = 1
+} API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
typedef NS_ENUM(NSInteger, SCNCullMode) {
SCNCullModeBack = 0,
SCNCullModeFront = 1
@@ -99,8 +104,11 @@
#define SCNCullFront SCNCullModeFront
typedef NS_ENUM(NSInteger, SCNTransparencyMode) {
- SCNTransparencyModeAOne = 0,
- SCNTransparencyModeRGBZero = 1
+ SCNTransparencyModeAOne = 0, // Takes the transparency information from the alpha channel. The value 1.0 is opaque.
+ SCNTransparencyModeRGBZero = 1,
+ SCNTransparencyModeSingleLayer API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 2, // Ensures that one layer of transparency is draw correctly.
+ SCNTransparencyModeDualLayer API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 3, // Ensures that two layers of transparency are ordered and drawn correctly. This should be used for transparent convex objects like cubes and spheres, when you want to see both front and back faces.
+ SCNTransparencyModeDefault API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = SCNTransparencyModeAOne
};
/*!
@@ -108,12 +116,13 @@
@abstract Blend modes that SCNMaterial uses to compose with the framebuffer to produce blended colors.
*/
typedef NS_ENUM(NSInteger, SCNBlendMode) {
- SCNBlendModeAlpha = 0, // Blends the source and destination colors by adding the source multiplied by source alpha and the destination multiplied by one minus source alpha.
- SCNBlendModeAdd = 1, // Blends the source and destination colors by adding them up.
- SCNBlendModeSubtract = 2, // Blends the source and destination colors by subtracting the source from the destination.
- SCNBlendModeMultiply = 3, // Blends the source and destination colors by multiplying them.
- SCNBlendModeScreen = 4, // Blends the source and destination colors by multiplying one minus the source with the destination and adding the source.
- SCNBlendModeReplace = 5 // Replaces the destination with the source (ignores alpha).
+ SCNBlendModeAlpha = 0, // Blends the source and destination colors by adding the source multiplied by source alpha and the destination multiplied by one minus source alpha.
+ SCNBlendModeAdd = 1, // Blends the source and destination colors by adding them up.
+ SCNBlendModeSubtract = 2, // Blends the source and destination colors by subtracting the source from the destination.
+ SCNBlendModeMultiply = 3, // Blends the source and destination colors by multiplying them.
+ SCNBlendModeScreen = 4, // Blends the source and destination colors by multiplying one minus the source with the destination and adding the source.
+ SCNBlendModeReplace = 5, // Replaces the destination with the source (ignores alpha).
+ SCNBlendModeMax API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 6 // Max the destination with the source (ignores alpha).
} API_AVAILABLE(macosx(10.11), ios(9.0));
@class SCNMaterialProperty;
@@ -140,6 +149,8 @@
*/
@property(nonatomic, copy, nullable) NSString *name;
+// MARK: - Material Properties
+
/*!
@property diffuse
@abstract Specifies the receiver's diffuse property.
@@ -193,6 +204,13 @@
@property(nonatomic, readonly) SCNMaterialProperty *normal;
/*!
+ @property displacement
+ @abstract <TODO>
+ @discussion <TODO, Needs tessellation>
+ */
+@property(nonatomic, readonly) SCNMaterialProperty *displacement API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property ambientOcclusion
@abstract The ambientOcclusion property specifies the ambient occlusion of the surface. The ambient occlusion is multiplied with the ambient light, then the result is added to the lighting contribution. This property has no visual impact on scenes that have no ambient light. When an ambient occlusion map is set, the ambient property is ignored.
*/
@@ -216,6 +234,8 @@
*/
@property(nonatomic, readonly) SCNMaterialProperty *roughness API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+// MARK: -
+
/*!
@property shininess
@abstract Specifies the receiver's shininess value. Defaults to 1.0. Animatable.
@@ -247,6 +267,12 @@
*/
@property(nonatomic, getter=isDoubleSided) BOOL doubleSided;
+/*!
+ @property fillMode
+ @abstract Determines of to how to rasterize the receiver's primitives. Defaults to SCNFillModeFill.
+ */
+@property(nonatomic) SCNFillMode fillMode API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property cullMode
@abstract Determines the culling mode of the receiver. Defaults to SCNCullBack. Animatable.
@@ -255,9 +281,7 @@
/*!
@property transparencyMode
- @abstract Determines the transparency mode of the receiver. See above for the transparency modes. Defaults to SCNTransparencyModeAOne.
- @discussion SCNTransparencyModeAOne takes the transparency information from the color's alpha channel. The value 1.0 is opaque.
- SCNTransparencyModeRGBZero takes the transparency information from the color's red, green, and blue channels. The value 0.0 is opaque, with each channel modulated independently. With SCNTransparencyModeRGBZero, the alpha value of the transparent property is ignored.
+ @abstract Determines the transparency mode of the receiver. See above for the transparency modes. Defaults to SCNTransparencyModeDefault.
*/
@property(nonatomic) SCNTransparencyMode transparencyMode;
@@ -274,6 +298,11 @@
@property(nonatomic) BOOL writesToDepthBuffer;
/*!
+ @abstract Determines whether the receiver writes to the color buffer when rendered. Defaults to SCNColorMaskAll.
+ */
+@property(nonatomic) SCNColorMask colorBufferWriteMask API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property readsFromDepthBuffer
@abstract Determines whether the receiver reads from the depth buffer when rendered. Defaults to YES.
*/
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMaterialProperty.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -43,15 +43,13 @@
/*!
@property contents
- @abstract Specifies the receiver's contents. This can be a color (NSColor, UIColor, CGColorRef), an image (NSImage, UIImage, CGImageRef), a layer (CALayer), a path (NSString or NSURL), a SpriteKit scene (SKScene), a texture (SKTexture, id<MTLTexture> or GLKTextureInfo), or a floating value between 0 and 1 (NSNumber) for metalness and roughness properties. Animatable when set to a color.
+ @abstract Specifies the receiver's contents. This can be a color (NSColor, UIColor, CGColorRef), an image (NSImage, UIImage, CGImageRef), a layer (CALayer), a path (NSString or NSURL), a SpriteKit scene (SKScene), a texture (SKTexture, id<MTLTexture> or GLKTextureInfo), or a floating value between 0 and 1 (NSNumber) for metalness and roughness properties. In macOS 10.13, iOS 11.0, tvOS 11.0 and watchOS 4.0 AVCaptureDevice and AVPlayer are also supported. Animatable when set to a color.
@discussion Setting the contents to an instance of SKTexture will automatically update the wrapS, wrapT, contentsTransform, minification, magnification and mip filters according to the SKTexture settings.
When a cube map is expected (e.g. SCNMaterial.reflective, SCNScene.background, SCNScene.lightingEnvironment) you can use
- 1. A horizontal strip image where `6 * image.height == image.width`
- 2. A vertical strip image where ` image.height == 6 * image.width`
- 3. A horizontal cross image where `4 * image.height == 3 * image.width`
- 4. A vertical cross image where `3 * image.height == 4 * image.width`
- 5. A lat/long image where ` image.height == 2 * image.width`
- 6. A NSArray of 6 images. This array must contain images of the exact same dimensions, in the following order, in a left-handed coordinate system: +X, -X, +Y, -Y, +Z, -Z (or Right, Left, Top, Bottom, Front, Back).
+ 1. A horizontal strip image where `6 * image.height == image.width`
+ 2. A vertical strip image where ` image.height == 6 * image.width`
+ 3. A spherical projection image (latitude/longitude) where `2 * image.height == image.width`
+ 4. A NSArray of 6 images. This array must contain images of the exact same dimensions, in the following order, in a left-handed coordinate system: +X, -X, +Y, -Y, +Z, -Z (or Right, Left, Top, Bottom, Front, Back).
*/
@property(nonatomic, retain, nullable) id contents;
@@ -80,7 +78,7 @@
/*!
@property mipFilter
@abstract Specifies the mipmap filter to use during minification.
- @discussion Defaults to SCNFilterModeNone on macOS 10.11 and iOS 9 or earlier, SCNFilterModeNearest starting in macOS 10.12 and iOS 10.
+ @discussion Defaults to SCNFilterModeNone on macOS 10.11 or earlier and iOS 9 or earlier, SCNFilterModeNearest starting in macOS 10.12 and iOS 10.
*/
@property(nonatomic) SCNFilterMode mipFilter;
@@ -117,6 +115,14 @@
@property(nonatomic) NSInteger mappingChannel;
/*!
+ @property textureComponents
+ @abstract Specifies the texture components to sample in the shader. Defaults to SCNTextureComponentAll.
+ @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(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/*!
@property maxAnisotropy
@abstract Specifies the receiver's max anisotropy. Defaults to MAXFLOAT.
@discussion Anisotropic filtering reduces blur and preserves detail at extreme viewing angles.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNMorpher.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNMorpher.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMorpher.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -11,16 +11,15 @@
@class SCNGeometry;
-/*!
- @class SCNMorpher
- @abstract SCNMorpher controls the deformation of morphed geometries
- */
-
typedef NS_ENUM(NSInteger, SCNMorpherCalculationMode) {
SCNMorpherCalculationModeNormalized = 0, // (1 - w0 - w1 - ...) * BaseMesh + w0 * Target0 + w1 * Target1 + ...
SCNMorpherCalculationModeAdditive = 1 // BaseMesh + w0 * Target0 + w1 * Target1 + ...
};
+/*!
+ @class SCNMorpher
+ @abstract SCNMorpher controls the deformation of morphed geometries
+ */
API_AVAILABLE(macosx(10.9))
@interface SCNMorpher : NSObject <SCNAnimatable, NSSecureCoding>
@@ -33,7 +32,7 @@
/*!
@method setWeight:forTargetAtIndex:
- @abstract Sets the weight for the target at the specified index. Animatable implicitly or explicitly with the keyPath "weights[index]".
+ @abstract Sets the weight for the target at the specified index. Animatable implicitly or explicitly with the keyPath "weights[index]" or "weights[targetName]" (targetName is the name of the target geometry).
*/
- (void)setWeight:(CGFloat)weight forTargetAtIndex:(NSUInteger)targetIndex;
@@ -49,6 +48,33 @@
*/
@property(nonatomic) SCNMorpherCalculationMode calculationMode;
+/*!
+ @property weights
+ @abstract Access to all the weights of all the targets.
+ */
+@property (nonatomic, retain) NSArray<NSNumber *> *weights API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property unifiesNormals
+ @abstract When set to YES the normals are not morphed but are recomputed after morphing the vertex instead. When set to NO, the morpher will morph the normals if the geometry targets have normals. Defaults to NO.
+ */
+@property BOOL unifiesNormals API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property channelTargetWeights
+ @abstract Specifies the number of target shapes per channel.
+ @discussion Can be NULL if every channel contains only one target shape. Defaults to NULL.
+ @seealso channelTargetWeights
+ */
+@property (nonatomic, retain, nullable) NSArray<NSNumber *> *channelTargetCounts API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property channelTargetWeights
+ @abstract the weights at which the (in-between) target shapes are placed (0..1).
+ @discussion Can be NULL if every channel contains only one target shape.
+ */
+@property (nonatomic, retain, nullable) NSArray<NSNumber *> *channelTargetWeights API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNNode.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNNode.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,12 +1,13 @@
//
// SCNNode.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNAnimation.h>
#import <SceneKit/SCNBoundingVolume.h>
#import <SceneKit/SCNAction.h>
+#include <AvailabilityMacros.h>
NS_ASSUME_NONNULL_BEGIN
@@ -45,13 +46,21 @@
SCNMovabilityHintMovable,
} API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+/*! @enum SCNNodeFocusBehavior
+ @abstract Control the focus (UIFocus) behavior.
+ */
+typedef NS_ENUM(NSInteger, SCNNodeFocusBehavior) {
+ SCNNodeFocusBehaviorNone = 0, // Not focusable and node has no impact on other nodes that have focus interaction enabled.
+ SCNNodeFocusBehaviorOccluding, // Not focusable, but will prevent other focusable nodes that this node visually obscures from being focusable.
+ SCNNodeFocusBehaviorFocusable // Focusable and will also prevent other focusable nodes that this node visually obscures from being focusable.
+} API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@class SCNNode
@abstract SCNNode is the model class for node-tree objects.
@discussion It encapsulates the position, rotations, and other transforms of a node, which define a coordinate system.
The coordinate systems of all the sub-nodes are relative to the one of their parent node.
*/
-
@interface SCNNode : NSObject <NSCopying, NSSecureCoding, SCNAnimatable, SCNActionable, SCNBoundingVolume>
#pragma mark - Creating a Node
@@ -162,6 +171,13 @@
@property(nonatomic) SCNQuaternion orientation API_AVAILABLE(macosx(10.10));
/*!
+ @property worldOrientation
+ @abstract Determines the receiver's orientation relative to the scene as a unit quaternion. Animatable.
+ */
+@property(nonatomic) SCNQuaternion worldOrientation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/*!
@property eulerAngles
@abstract Determines the receiver's euler angles. Animatable.
@dicussion The order of components in this vector matches the axes of rotation:
@@ -188,13 +204,19 @@
@property(nonatomic) SCNMatrix4 pivot;
/*!
+ @property worldPosition
+ @abstract Returns the receiver's world position.
+ @discussion A world position is the position relative to the scene.
+ */
+@property(nonatomic) SCNVector3 worldPosition API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property worldTransform
@abstract Returns the receiver's world transform.
@discussion A world transform is the transform relative to the scene.
*/
@property(nonatomic, readonly) SCNMatrix4 worldTransform;
-
-
+- (void)setWorldTransform:(SCNMatrix4)worldTransform API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
#pragma mark - Modifying the Node′s Visibility
@@ -330,6 +352,29 @@
*/
- (SCNVector3)convertPosition:(SCNVector3)position fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.9));
+
+/**
+ @abstract Converts a vector from the coordinate system of a given node to that of the receiver.
+
+ @param vector A vector specified in the local coordinate system the receiver.
+ @param node The node defining the space from which the vector should be transformed. If "node" is nil, this method instead converts from world coordinates.
+
+ @return vector transformed from receiver local space to node local space.
+ */
+- (SCNVector3)convertVector:(SCNVector3)vector toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/**
+ @abstract Converts a vector from the coordinate system of a given node to that of the receiver.
+
+ @param vector A vector specified in the local coordinate system of "node".
+ @param node The node defining the space to which the vector should be transformed to. If "node" is nil, this method instead converts from world coordinates.
+
+ @return vector transformed from node space to reveiver local space.
+ */
+- (SCNVector3)convertVector:(SCNVector3)vector fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
/*!
@method convertTransform:toNode:
@abstract Converts a transform from the receiver’s coordinate system to that of the specified node.
@@ -390,7 +435,7 @@
#pragma mark - Accessing the Presentation Node
/*!
- @method presentationNode
+ @property presentationNode
@abstract Returns the presentation node.
@discussion Returns a copy of the node containing all the properties as they were at the start of the current transaction, with any active animations applied.
This gives a close approximation to the version of the node that is currently displayed.
@@ -446,9 +491,95 @@
*/
@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+#pragma mark - UIFocus support
+
+/*!
+ @property focusBehavior
+ @abstract Controls the behavior of the receiver regarding the UIFocus system. Defaults to SCNNodeFocusBehaviorNone.
+ */
+@property (nonatomic) SCNNodeFocusBehavior focusBehavior API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+@interface SCNNode (Transforms)
+
+/*!
+ @property up
+ @abstract The local unit Y axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localUp API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property right
+ @abstract the local unit X axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localRight API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property front
+ @abstract the local unit -Z axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property up
+ @abstract The local unit Y axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldUp API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property right
+ @abstract the local unit X axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldRight API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property front
+ @abstract the local unit -Z axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Convenience for calling lookAt:up:localFront: with worldUp set to [self worldUp]
+ and localFront [SCNNode localFront].
+ @param worldTarget target position in world space.
+ */
+- (void)lookAt:(SCNVector3)worldTarget API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Set the orientation of the node so its front vector is pointing toward a given
+ target. Using a reference up vector in world space and a front vector in
+ local space.
+
+ @param worldTarget position in world space.
+ @param worldUp the up vector in world space.
+ @param localFront the front vector in local space.
+ */
+- (void)lookAt:(SCNVector3)worldTarget up:(SCNVector3)worldUp localFront:(SCNVector3)localFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Translate the current node position along the given vector in local space.
+
+ @param translation the translation in local space.
+ */
+- (void)localTranslateBy:(SCNVector3)translation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Apply a the given rotation to the current one.
+
+ @param rotation rotation in local space.
+ */
+- (void)localRotateBy:(SCNQuaternion)rotation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Apply a rotation relative to a target point in parent space.
+ @param worldRotation rotation to apply in world space.
+ @param worldTarget position of the target in world space.
+ */
+- (void)rotateBy:(SCNQuaternion)worldRotation aroundTarget:(SCNVector3)worldTarget API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@end
/*!
@category NSObject (SCNNodeRendererDelegate)
@@ -471,4 +602,103 @@
@end
+
+
+
+#if !defined(MAC_OS_X_VERSION_10_13) && !defined(SCN_SIMD_10_12_COMPATIBILITY)
+typedef struct { vector_float4 vector; } simd_quatf;
+#define simd_float3 vector_float3
+#define simd_float4 vector_float4
+#define simd_float4x4 matrix_float4x4
+#define SCN_SIMD_10_12_COMPATIBILITY 1
+#endif
+
+@interface SCNNode (SIMD)
+
+/*!
+ @abstract Determines the receiver's transform. Animatable.
+ @discussion The transform is the combination of the position, rotation and scale defined below. So when the transform is set, the receiver's position, rotation and scale are changed to match the new transform.
+ */
+@property(nonatomic) simd_float4x4 simdTransform API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's position. Animatable.
+ */
+@property(nonatomic) simd_float3 simdPosition API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's rotation. Animatable.
+ @discussion The rotation is axis angle rotation. The three first components are the axis, the fourth one is the rotation (in radian).
+ */
+@property(nonatomic) simd_float4 simdRotation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's orientation as a unit quaternion. Animatable.
+ */
+@property(nonatomic) simd_quatf simdOrientation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's euler angles. Animatable.
+ @dicussion The order of components in this vector matches the axes of rotation:
+ 1. Pitch (the x component) is the rotation about the node's x-axis (in radians)
+ 2. Yaw (the y component) is the rotation about the node's y-axis (in radians)
+ 3. Roll (the z component) is the rotation about the node's z-axis (in radians)
+ SceneKit applies these rotations in the reverse order of the components:
+ 1. first roll
+ 2. then yaw
+ 3. then pitch
+ */
+@property(nonatomic) simd_float3 simdEulerAngles API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's scale. Animatable.
+ */
+@property(nonatomic) simd_float3 simdScale API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's pivot. Animatable.
+ */
+@property(nonatomic) simd_float4x4 simdPivot API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract A world position is the position relative to the scene.
+ */
+@property(nonatomic) simd_float3 simdWorldPosition API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's orientation relative to the scene as a unit quaternion. Animatable.
+ */
+@property(nonatomic) simd_quatf simdWorldOrientation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract A world transform is the transform relative to the scene.
+ */
+@property(nonatomic) simd_float4x4 simdWorldTransform API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdConvertPosition:(simd_float3)position toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdConvertPosition:(simd_float3)position fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdConvertVector:(simd_float3)vector toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdConvertVector:(simd_float3)vector fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float4x4)simdConvertTransform:(simd_float4x4)transform toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float4x4)simdConvertTransform:(simd_float4x4)transform fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
++ (simd_float3)simdLocalUp API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
++ (simd_float3)simdLocalRight API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
++ (simd_float3)simdLocalFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdWorldUp API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdWorldRight API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdWorldFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (void)simdLookAt:(vector_float3)worldTarget API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdLookAt:(vector_float3)worldTarget up:(vector_float3)worldUp localFront:(simd_float3)localFront API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdLocalTranslateBy:(simd_float3)translation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (void)simdLocalRotateBy:(simd_quatf)rotation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdRotateBy:(simd_quatf)worldRotation aroundTarget:(simd_float3)worldTarget API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNParametricGeometry.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNGeometry.h>
@@ -546,14 +546,14 @@
@abstract The floor extent along the X axis. Animatable.
@discussion If the value is equal to 0, the floor is infinite on the X axis. The default value is 0.
*/
-@property(nonatomic) CGFloat width;
+@property(nonatomic) CGFloat width API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
/*!
@property length
@abstract The floor extent along the Z axis. Animatable.
@discussion If the value is equal to 0, the floor is infinite on the Z axis. The default value is 0.
*/
-@property(nonatomic) CGFloat length;
+@property(nonatomic) CGFloat length API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
/*!
@@ -665,10 +665,6 @@
@end
-/*!
- @class SCNShape
- @abstract SCNShape represents a 2D shape (cubic Bezier spline) than can be extruded.
- */
typedef NS_ENUM(NSInteger, SCNChamferMode) {
SCNChamferModeBoth,
@@ -676,6 +672,10 @@
SCNChamferModeBack
} API_AVAILABLE(macosx(10.9));
+/*!
+ @class SCNShape
+ @abstract SCNShape represents a 2D shape (cubic Bezier spline) than can be extruded.
+ */
API_AVAILABLE(macosx(10.9))
@interface SCNShape : SCNGeometry
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNParticleSystem.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -107,7 +107,7 @@
typedef NS_ENUM(NSInteger, SCNParticleOrientationMode) {
SCNParticleOrientationModeBillboardScreenAligned, // particles are aligned on screen
SCNParticleOrientationModeBillboardViewAligned, // particles are perpendicular with the vector from the point of view to the particle.
- SCNParticleOrientationModeFree, // free on all axis.
+ SCNParticleOrientationModeFree, // free on all axis.
SCNParticleOrientationModeBillboardYAligned // fixed on Y axis.
} API_AVAILABLE(macosx(10.10));
@@ -121,7 +121,7 @@
// Particle Birth Direction
typedef NS_ENUM(NSInteger, SCNParticleBirthDirection) {
SCNParticleBirthDirectionConstant, // Z Direction of the Emitter.
- SCNParticleBirthDirectionSurfaceNormal, // Use the direction induced by the shape
+ SCNParticleBirthDirectionSurfaceNormal, // Use the direction induced by the shape
SCNParticleBirthDirectionRandom // Random direction.
} API_AVAILABLE(macosx(10.10));
@@ -162,11 +162,11 @@
@interface SCNParticlePropertyController: NSObject <NSSecureCoding, NSCopying>
// Creates and initializes a particle property controller with the specified animation.
-+ (instancetype)controllerWithAnimation:(CAAnimation *)animation;
++ (instancetype)controllerWithAnimation:(CAAnimation *)animation __WATCHOS_PROHIBITED;
// Specifies the animation to be applied on the particle system property. The type of the animation will depend of the property controlled.
// See the documentation along property name definition.
-@property(nonatomic, retain) CAAnimation *animation;
+@property(nonatomic, retain) CAAnimation *animation __WATCHOS_PROHIBITED;
// Specify the input mode of the receiver.
// This can be over life, over distance or over the evolution of another proprety.
@@ -242,6 +242,9 @@
// Specifies the emitting direction of newly created particles, used in the SCNParticleBirthDirectionConstant mode. Default to {0, 0, 1}. Animatable.
@property(nonatomic) SCNVector3 emittingDirection;
+// Specifies the orientation direction of newly created particles, used in the SCNParticleOrientationModeFree mode. The particle will rotate around this axis. Default to {0, 0, 0}, which means random. The particle will then rotate arbitraly. Animatable.
+@property(nonatomic) SCNVector3 orientationDirection API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
// Specifies the acceleration applied to particles, in world coordinates.
// Allows to simulate winds or gravity. Default to {0, 0, 0}. Animatable.
@property(nonatomic) SCNVector3 acceleration;
@@ -327,6 +330,12 @@
// Specifies the initial size variation of the particle. Animatable.
@property(nonatomic) CGFloat particleSizeVariation;
+// Specifies the initial intensity of the particle. Animatable.
+@property(nonatomic) CGFloat particleIntensity API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+// Specifies the initial intensity variation of the particle. Animatable.
+@property(nonatomic) CGFloat particleIntensityVariation API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
// Specifies the blend mode to use to render the particle system. Defaults to SCNParticleBlendModeAdditive.
@property(nonatomic) SCNParticleBlendMode blendMode;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsBehavior.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -106,6 +106,34 @@
@end
+/*!
+ @class SCNPhysicsConeTwistJoint
+ */
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNPhysicsConeTwistJoint : SCNPhysicsBehavior
+
+//Initializes and returns a physics cone-twist joint.
+//The joint attaches bodyA and bodyB on frameA and frameB respectively.
++ (instancetype)jointWithBodyA:(SCNPhysicsBody *)bodyA frameA:(SCNMatrix4)frameA bodyB:(SCNPhysicsBody *)bodyB frameB:(SCNMatrix4)frameB;
+
+//Initializes and returns a physics cone-twist joint.
+//The joint attaches "body" to the 3d location specified by "frame" and relative to the node that owns the body.
++ (instancetype)jointWithBody:(SCNPhysicsBody *)body frame:(SCNMatrix4)frame;
+
+@property(nonatomic, readonly) SCNPhysicsBody *bodyA; //the first body attached to the slider joint
+@property(nonatomic) SCNMatrix4 frameA;
+
+@property(nonatomic, readonly, nullable) SCNPhysicsBody *bodyB; //the second body attached to the slider joint
+@property(nonatomic) SCNMatrix4 frameB;
+
+//The maximum angular limits in radians in each cone tangent directions
+@property(nonatomic) CGFloat maximumAngularLimit1;
+@property(nonatomic) CGFloat maximumAngularLimit2;
+
+//Maximum twist angle alon the cone axis
+@property(nonatomic) CGFloat maximumTwistAngle;
+
+@end
/*!
@class SCNPhysicsVehicleWheel
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h 2016-09-26 20:55:17.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsBody.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -117,7 +117,7 @@
//Applies a linear force with the specified position and direction. The position is relative to the node that owns the physics body.
- (void)applyForce:(SCNVector3)direction atPosition:(SCNVector3)position impulse:(BOOL)impulse;
-//Applies an angular force (torque). If impulse is set to YES then the force is applied for just one frame, otherwise it applies a continuous force.
+//Applies an angular force (torque). If impulse is set to YES then the force is applied for just one frame, otherwise it applies a continuous force. The torque is specified as an axis angle.
- (void)applyTorque:(SCNVector4)torque impulse:(BOOL)impulse;
//Clears the forces applied one the receiver.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsContact.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -25,7 +25,8 @@
@property(nonatomic, readonly) SCNVector3 contactPoint;
@property(nonatomic, readonly) SCNVector3 contactNormal;
@property(nonatomic, readonly) CGFloat collisionImpulse; // the collision impulse on nodeA
-@property(nonatomic, readonly) CGFloat penetrationDistance;
+@property(nonatomic, readonly) CGFloat penetrationDistance;
+@property(nonatomic, readonly) CGFloat sweepTestFraction API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)); // Value between 0 and 1 giving the relative position of the physic shape when performing a convex sweep test.
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h 2016-09-26 20:31:43.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsField.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -27,7 +27,7 @@
@interface SCNPhysicsField : NSObject <NSCopying, NSSecureCoding>
// The following properties control the behavior of the field
-@property(nonatomic) CGFloat strength; // The strength factor of the force field. default 1.0.
+@property(nonatomic) CGFloat strength; // The strength factor of the force field. Defaults to 1.0.
@property(nonatomic) CGFloat falloffExponent; // Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent). Defaults to 0.0.
@property(nonatomic) CGFloat minimumDistance; // Distance from the center of the field where the effect is at full strength. Defaults to 1e-6.
@@ -35,12 +35,12 @@
@property(nonatomic, getter=isExclusive) BOOL exclusive; // If YES, it suppresses any other field in its area. Defaults to NO.
// The following properties control the area of effect
-@property(nonatomic) SCNVector3 halfExtent; // Specifies the half extent of the area of effect. default is FLT_MAX.
+@property(nonatomic) SCNVector3 halfExtent; // Specifies the half extent of the area of effect. Defaults to FLT_MAX.
@property(nonatomic) BOOL usesEllipsoidalExtent; // YES means that the area of effect is rounded within the extent. Defaults to NO.
@property(nonatomic) SCNPhysicsFieldScope scope; // Controls whether the force field should apply inside or outside of the area. Defaults to inside.
-@property(nonatomic) SCNVector3 offset; // Offset of origin effect within the area
-@property(nonatomic) SCNVector3 direction; // Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0)
+@property(nonatomic) SCNVector3 offset; // Offset of origin effect within the area.
+@property(nonatomic) SCNVector3 direction; // Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0).
/*!
@property categoryBitMask
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsShape.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h 2016-08-05 02:35:40.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsWorld.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNReferenceNode.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNNode.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNRenderer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNRenderer.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNRenderer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNSceneRenderer.h>
@@ -44,24 +44,31 @@
@property(nonatomic, retain, nullable) SCNScene *scene;
/*!
+ @method renderAtTime:viewport:commandBuffer:passDescriptor:
+ @abstract updates and renders the receiver's scene at the specified time (system time) viewport, Metal command buffer and pass descriptor.
+ @discussion Use this method to render using Metal.
+ */
+- (void)renderAtTime:(CFTimeInterval)time viewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macosx(10.11), ios(9.0));
+
+/*!
@method renderAtTime:
- @abstract renders the receiver's scene at the specified time (system time).
+ @abstract updates and renders the receiver's scene at the specified time (system time).
@discussion This method only work if the receiver was allocated with an OpenGL context. Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
*/
- (void)renderAtTime:(CFTimeInterval)time API_AVAILABLE(macosx(10.10));
/*!
- @method snapshotAtTime:withSize:antialiasingMode:
- @abstract renders the receiver's scene at the specified time (system time) into an image.
+ @method updateAtTime:
+ @abstract updates the receiver's scene at the specified time (system time).
*/
-- (NSImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+- (void)updateAtTime:(CFTimeInterval)time API_AVAILABLE(macosx(10.13), ios(11_0), tvos(11_0), watchos(4_0));
/*!
- @method renderAtTime:viewport:commandBuffer:passDescriptor:
- @abstract renders the receiver's scene at the specified time (system time) viewport, metal command buffer and pass descriptor.
- @discussion Use this method to render using Metal.
+ @method renderWithViewport:viewport:commandBuffer:passDescriptor:
+ @abstract renders the receiver's scene with the specified viewport, Metal command buffer and pass descriptor.
+ @discussion Use this method to render using Metal. This method doesn't update the scene's animations, physics, particles etc... It's up to you to call "updateAtTime:" to update the scene.
*/
-- (void)renderAtTime:(CFTimeInterval)time viewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)renderWithViewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macosx(10.13), ios(11_0), tvos(11_0), watchos(4_0));
/*!
@property nextFrameTime
@@ -70,11 +77,10 @@
@property(nonatomic, readonly) CFTimeInterval nextFrameTime API_AVAILABLE(macosx(10.10));
/*!
- @method render
- @abstract renders the receiver's scene at the current system time.
- @discussion This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
+ @method snapshotAtTime:withSize:antialiasingMode:
+ @abstract renders the receiver's scene at the specified time (system time) into an image.
*/
-- (void)render API_DEPRECATED_WITH_REPLACEMENT("-renderAtTime:withEncoder:pass:commandQueue:", macosx(10.8, 10.11), ios(8.0, 9.0)) API_UNAVAILABLE(watchos, tvos);
+- (NSImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
/*!
@method updateProbes:atTime:
@@ -86,6 +92,14 @@
- (void)updateProbes:(NSArray<SCNNode*> *)lightProbes atTime:(CFTimeInterval)time API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+// Deprecated
+/*!
+ @method render
+ @abstract renders the receiver's scene at the current system time.
+ @discussion This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
+ */
+- (void)render API_DEPRECATED_WITH_REPLACEMENT("-renderAtTime:withEncoder:pass:commandQueue:", macosx(10.8, 10.11), ios(8.0, 9.0)) API_UNAVAILABLE(watchos, tvos);
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNScene.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNScene.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNScene.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -43,9 +43,9 @@
typedef NSString * SCNSceneAttribute;
#endif
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneStartTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the start time of the scene.
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneEndTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the end time of the scene.
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneFrameRateAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the framerate of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneStartTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the start time of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneEndTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the end time of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneFrameRateAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the framerate of the scene.
FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneUpAxisAttributeKey API_AVAILABLE(macosx(10.10)); // A vector3 value, encapsulated in a NSValue, containing the up axis of the scene. This is just for information, setting the up axis as no effect.
#define SCNSceneAttributeStartTime SCNSceneStartTimeAttributeKey
@@ -100,14 +100,16 @@
@abstract Specifies the background of the receiver.
@discussion The background is rendered before the rest of the scene.
The background can be rendered as a skybox by setting a cube map as described in SCNMaterialProperty.h
- Colors are supported starting macOS 10.12 and iOS 10. Prior to that you can use SCNView.backgroundColor.
+ Colors are supported starting in macOS 10.12 and iOS 10. Prior to that you can use SCNView.backgroundColor.
+ MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
*/
@property(nonatomic, readonly) SCNMaterialProperty *background API_AVAILABLE(macosx(10.9));
/*!
@property lightingEnvironment
@abstract Specifies the receiver's environment for image-based lighting (IBL).
- @discussion The environment should be a cube map as described in SCNMaterialProperty.h
+ @discussion The environment should be a cube map as described in SCNMaterialProperty.h.
+ MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
*/
@property(nonatomic, readonly) SCNMaterialProperty *lightingEnvironment API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSceneRenderer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -50,17 +50,20 @@
@abstract Debug options.
*/
typedef NS_OPTIONS(NSUInteger, SCNDebugOptions) {
- SCNDebugOptionNone = 0,
- SCNDebugOptionShowPhysicsShapes = 1 << 0,
- SCNDebugOptionShowBoundingBoxes = 1 << 1,
- SCNDebugOptionShowLightInfluences = 1 << 2,
- SCNDebugOptionShowLightExtents = 1 << 3,
- SCNDebugOptionShowPhysicsFields = 1 << 4,
- SCNDebugOptionShowWireframe = 1 << 5
+ SCNDebugOptionNone = 0,
+ SCNDebugOptionShowPhysicsShapes = 1 << 0, //show physics shape
+ SCNDebugOptionShowBoundingBoxes = 1 << 1, //show object bounding boxes
+ SCNDebugOptionShowLightInfluences = 1 << 2, //show objects's light influences
+ SCNDebugOptionShowLightExtents = 1 << 3, //show light extents
+ SCNDebugOptionShowPhysicsFields = 1 << 4, //show SCNPhysicsFields forces and extents
+ SCNDebugOptionShowWireframe = 1 << 5, //show wireframe on top of objects
+ SCNDebugOptionRenderAsWireframe API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 6, //render objects as wireframe
+ SCNDebugOptionShowSkeletons API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 7, //show skinning bones
+ SCNDebugOptionShowCreases API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 8, //show subdivision creases
+ SCNDebugOptionShowConstraints API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 9, //show slider constraint
+ SCNDebugOptionShowCameras API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 10 //show cameras
} API_AVAILABLE(macosx(10.11), ios(9.0));
-
-
/*! @protocol SCNSceneRenderer
@abstract Protocol adopted by the various renderers (SCNView, SCNLayer, SCNRenderer)
*/
@@ -117,7 +120,7 @@
@method nodesInsideFrustumWithPointOfView:
@abstract Returns an array containing the nodes visible from the specified point of view.
@param pointOfView The point of view used to test the visibility.
- @discussion Returns an array of all the nodes that are inside or intersects the clipping planes of the point of view.
+ @discussion Returns an array of all the nodes that are inside or intersects the clipping planes of the point of view. Starting in macOS10.13/iOS11 this method work with the presentation tree.
*/
- (NSArray<SCNNode *> *)nodesInsideFrustumWithPointOfView:(SCNNode *)pointOfView API_AVAILABLE(macosx(10.11), ios(9.0));
@@ -304,7 +307,7 @@
/*!
@method renderer:updateAtTime:
@abstract Implement this to perform per-frame game logic. Called exactly once per frame before any animation and actions are evaluated and any physics are simulated.
- @param aRenderer The renderer that will render the scene.
+ @param renderer The renderer that will render the scene.
@param time The time at which to update the scene.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
@@ -313,7 +316,7 @@
/*!
@method renderer:didApplyAnimationsAtTime:
@abstract Invoked on the delegate once the scene renderer did apply the animations.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param time The time at which the animations were applied.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
@@ -322,7 +325,7 @@
/*!
@method renderer:didSimulatePhysicsAtTime:
@abstract Invoked on the delegate once the scene renderer did simulate the physics.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param time The time at which the physics were simulated.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
@@ -331,7 +334,7 @@
/*!
@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 aRenderer The renderer that will render the scene.
+ @param renderer The renderer that will render the scene.
@param scene The scene to be rendered.
@param time The time at which the scene is to be rendered.
@discussion Starting in 10.10 all modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
@@ -341,7 +344,7 @@
/*!
@method renderer:didRenderScene:atTime:
@abstract Invoked on the delegate once the scene renderer did render the scene.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param scene The rendered scene.
@param time The time at which the scene was rendered.
@discussion Starting in 10.10 all modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h 2016-09-26 20:31:43.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSceneSource.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNShadable.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNShadable.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNShadable.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -106,6 +106,17 @@
| #pragma arguments
| float myGrayAmount;
|
+ | In Metal, you can also tranfert varying values from the vertex shader (geometry modifier) to the fragment shader (surface/fragment modifier)
+ | In one (or both) of the modifier, declare the varying values
+ | #pragma varying
+ | half3 myVec;
+ |
+ | Output them in the geometry modifier
+ | out.myVec = _geometry.normal.xyz * 0.5h + 0.5h;
+ |
+ | And use them in the fragment modifier for example
+ | _output.color.rgb = saturate(in.myVec);
+ |
| // Optional global function definitions (for Metal: references to arguments from global functions are not supported).
| float mySin(float t) {
| return sin(t);
@@ -131,6 +142,12 @@
The SCNGeometry and SCNMaterial classes are key-value coding compliant classes, which means that you can set values for arbitrary keys. Even if the key `myAmplitude` is not a declared property of the class, you can still set a value for it.
Declaring a `myAmplitude` uniform in the shader modifier makes SceneKit observe the reveiver's `myAmplitude` key. Any change to that key will make SceneKit bind the uniform with the new value.
+ Common scalar types wrapped by NSValue are supported.
+ Metal Only:
+ - MTLBuffer are also supported as values (introduced in macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+ - Complex data types (struct) declared in the metal shader are supported.
+ - You can set them as a whole using NSData.
+ - Or you can set individual struct members using the member name as key and a value compatible with the member type.
Custom uniforms can be animated using explicit animations.
@@ -290,7 +307,7 @@
@property(nonatomic, assign, nullable) id <SCNProgramDelegate> delegate;
/*!
- @method library
+ @property library
@abstract Specifies the metal library to use to locate the function names specified above.
@discussion If set to nil the default library is used. Defaults to nil.
*/
@@ -386,7 +403,6 @@
/*!
@constant SCNShaderModifierEntryPointSurface
@abstract This is the entry point to alter the surface representation of the material, before the lighting has taken place.
- @discussion
Structures available from this entry point:
@@ -413,9 +429,10 @@
| float metalness; // Metalness property of the fragment
| vec2 metalnessTexcoord; // Metalness texture coordinates
| float roughness; // Roughness property of the fragment
- | vec2 roughnessTexcoord; // Metalness texture coordinates
+ | vec2 roughnessTexcoord; // Roughness texture coordinates
| float shininess; // Shininess property of the fragment
| float fresnel; // Fresnel property of the fragment
+ | float ambientOcclusion; // Ambient occlusion term of the fragment
| } _surface;
|
| Access: ReadWrite
@@ -444,7 +461,6 @@
@constant SCNShaderModifierEntryPointLightingModel
@abstract This is the entry point to provide custom lighting equation. The fragment will be called for each active light
of the scene and will need to accumulate lighting contribution for the vertex or the fragment in the _lightingContribution structure, using the light structure given.
- @discussion
Structures available from the this entry point:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNSkinner.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNSkinner.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSkinner.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -24,7 +24,7 @@
@abstract Specifies the skeleton of the receiver.
@discussion When setting a new skeleton, the new skeleton must have the same hierarchy of joints.
*/
-@property(nonatomic, retain, nullable) SCNNode *skeleton;
+@property(nonatomic, weak, nullable) SCNNode *skeleton;
/*!
@method skinnerWithBaseGeometry:bones:boneInverseBindTransforms:boneWeights:boneIndices:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNTechnique.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNTechnique.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNTechnique.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNShadable.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNTransaction.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h 2016-08-04 21:18:30.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNTransaction.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNTransaction.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h n/macOS/Frameworks/SceneKit.framework/Headers/SCNView.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SCNView.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNView.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <AppKit/AppKit.h>
@@ -9,6 +9,8 @@
#import <SceneKit/SCNSceneRenderer.h>
#import <SceneKit/SCNTechnique.h>
+@class SCNCameraController;
+
NS_ASSUME_NONNULL_BEGIN
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 3
@@ -39,6 +41,18 @@
#define SCNViewOptionPreferredDevice SCNPreferredDeviceKey
#define SCNViewOptionPreferLowPowerDevice SCNPreferLowPowerDeviceKey
+API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@protocol SCNCameraControlConfiguration <NSObject>
+
+@property(nonatomic, assign) BOOL autoSwitchToFreeCamera;
+@property(nonatomic, assign) BOOL allowsTranslation;
+@property(nonatomic, assign) CGFloat flyModeVelocity; // in m/s
+@property(nonatomic, assign) CGFloat panSensitivity;
+@property(nonatomic, assign) CGFloat truckSensitivity;
+@property(nonatomic, assign) CGFloat rotationSensitivity;
+
+@end
+
/*!
@class SCNView
@abstract A SCNView is a subclass of NSView that can display a SCNScene
@@ -60,6 +74,13 @@
@property(nonatomic, retain, nullable) SCNScene *scene;
/*!
+ @property rendersContinuously
+ @abstract When set to YES, the view continously redraw at the display link frame rate. When set to NO the view will only redraw when something change or animates in the receiver's scene. Defaults to NO.
+ */
+@property(nonatomic, assign) BOOL rendersContinuously;
+
+
+/*!
@property backgroundColor
@abstract Specifies the background color of the receiver. Defaults to opaque white.
*/
@@ -82,6 +103,19 @@
*/
@property(nonatomic) BOOL allowsCameraControl;
+/*!
+ @property cameraControlConfiguration
+ @abstract An object describing the current configuration of the event handler.
+ @discussion This object can be used to configure the event handler used when allowCameraControl is set to YES.
+ */
+@property(nonatomic, readonly) id<SCNCameraControlConfiguration> cameraControlConfiguration API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property defaultCameraController
+ @abstract If allowCameraController is set to YES, returns the default SCNCameraController used to drive the current point of view otherwise returns nil.
+ */
+@property(nullable, nonatomic, readonly) SCNCameraController* defaultCameraController API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property snapshot
@abstract Draws the contents of the view and returns them as a new image object
@@ -89,10 +123,7 @@
*/
- (NSImage *)snapshot API_AVAILABLE(macosx(10.10));
-/*!
- @functiongroup Actions
- */
-/*!
+/*!
@method play:
@abstract This action method begins playing the scene at its current location.
@param sender The object (such as a button or menu item) sending the message to play the scene.
@@ -119,7 +150,7 @@
@property preferredFramesPerSecond
@abstract The rate you want the view to redraw its contents.
@discussion When your application sets its preferred frame rate, the view chooses a frame rate as close to that as possible based on the capabilities of the screen the view is displayed on. The actual frame rate chosen is usually a factor of the maximum refresh rate of the screen to provide a consistent frame rate. For example, if the maximum refresh rate of the screen is 60 frames per second, that is also the highest frame rate the view sets as the actual frame rate. However, if you ask for a lower frame rate, it might choose 30, 20, 15 or some other factor to be the actual frame rate. Your application should choose a frame rate that it can consistently maintain.
- The default value is 0 which means the display link will fire at the native cadence of the display hardware.
+ The default value is 0 which means the display link will fire at the native cadence of the display hardware.
*/
@property(nonatomic) NSInteger preferredFramesPerSecond API_AVAILABLE(macosx(10.12));
@@ -136,6 +167,7 @@
*/
@property(nonatomic) SCNAntialiasingMode antialiasingMode API_AVAILABLE(macosx(10.10));
+
/*!
@property pixelFormat
@abstract Specifies the pixel format of the receiver.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes n/macOS/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes 1969-12-31 19:00:00.000000000 -0500
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes 2017-08-11 21:12:10.000000000 -0400
@@ -0,0 +1,372 @@
+---
+Name: SceneKit
+
+Protocols:
+# The below are methods for which overlays provide better implementations
+- Name: SCNBoundingVolume
+ Methods:
+ - Selector: 'getBoundingBoxMin:max:'
+ SwiftPrivate: true
+ MethodKind: Instance
+ - Selector: 'setBoundingBoxMin:max:'
+ SwiftPrivate: true
+ MethodKind: Instance
+ - Selector: 'getBoundingSphereCenter:radius:'
+ SwiftPrivate: true
+ MethodKind: Instance
+
+#
+# New wrapper types will be made for these typedefs, and we want to nest them
+#
+Typedefs:
+- Name: SCNGeometrySourceSemantic
+ SwiftName: SCNGeometrySource.Semantic
+- Name: SCNLightType
+ SwiftName: SCNLight.LightType
+- Name: SCNLightingModel
+ SwiftName: SCNMaterial.LightingModel
+- Name: SCNParticleProperty
+ SwiftName: SCNParticleSystem.ParticleProperty
+- Name: SCNPhysicsShapeOption
+ SwiftName: SCNPhysicsShape.Option
+- Name: SCNPhysicsShapeType
+ SwiftName: SCNPhysicsShape.ShapeType
+- Name: SCNPhysicsTestOption
+ SwiftName: SCNPhysicsWorld.TestOption
+- Name: SCNPhysicsTestSearchMode
+ SwiftName: SCNPhysicsWorld.TestSearchMode
+- Name: SCNSceneAttribute
+ SwiftName: SCNScene.Attribute
+- Name: SCNSceneSourceAnimationImportPolicy
+ SwiftName: SCNSceneSource.AnimationImportPolicy
+- Name: SCNSceneSourceLoadingOption
+ SwiftName: SCNSceneSource.LoadingOption
+- Name: SCNViewOption
+ SwiftName: SCNView.Option
+
+#
+# Name overrides for globals that we will be nesting onto our new wrapper types
+#
+Globals:
+- Name: SCNHitTestFirstFoundOnlyKey
+ SwiftName: SCNHitTestOption.firstFoundOnly
+- Name: SCNHitTestSortResultsKey
+ SwiftName: SCNHitTestOption.sortResults
+- Name: SCNHitTestClipToZRangeKey
+ SwiftName: SCNHitTestOption.clipToZRange
+- Name: SCNHitTestBackFaceCullingKey
+ SwiftName: SCNHitTestOption.backFaceCulling
+- Name: SCNHitTestBoundingBoxOnlyKey
+ SwiftName: SCNHitTestOption.boundingBoxOnly
+- Name: SCNHitTestIgnoreChildNodesKey
+ SwiftName: SCNHitTestOption.ignoreChildNodes
+- Name: SCNHitTestRootNodeKey
+ SwiftName: SCNHitTestOption.rootNode
+- Name: SCNHitTestIgnoreHiddenNodesKey
+ SwiftName: SCNHitTestOption.ignoreHiddenNodes
+# FIXME: All of these are on nested types, which is not supported by swift_name
+# yet. Once it is, make these fully qualified
+- Name: SCNPhysicsShapeTypeKey
+ SwiftName: type
+- Name: SCNPhysicsShapeKeepAsCompoundKey
+ SwiftName: keepAsCompound
+- Name: SCNPhysicsShapeScaleKey
+ SwiftName: scale
+- Name: SCNPhysicsTestCollisionBitMaskKey
+ SwiftName: collisionBitMask
+- Name: SCNPhysicsTestSearchModeKey
+ SwiftName: searchMode
+- Name: SCNPhysicsTestBackfaceCullingKey
+ SwiftName: backfaceCulling
+- Name: SCNSceneStartTimeAttributeKey
+ SwiftName: startTime
+- Name: SCNSceneEndTimeAttributeKey
+ SwiftName: endTime
+- Name: SCNSceneFrameRateAttributeKey
+ SwiftName: frameRate
+- Name: SCNSceneUpAxisAttributeKey
+ SwiftName: upAxis
+- Name: SCNSceneSourceCreateNormalsIfAbsentKey
+ SwiftName: createNormalsIfAbsent
+- Name: SCNSceneSourceCheckConsistencyKey
+ SwiftName: checkConsistency
+- Name: SCNSceneSourceFlattenSceneKey
+ SwiftName: flattenScene
+- Name: SCNSceneSourceUseSafeModeKey
+ SwiftName: useSafeMode
+- Name: SCNSceneSourceAssetDirectoryURLsKey
+ SwiftName: assetDirectoryURLs
+- Name: SCNSceneSourceOverrideAssetURLsKey
+ SwiftName: overrideAssetURLs
+- Name: SCNSceneSourceStrictConformanceKey
+ SwiftName: strictConformance
+- Name: SCNSceneSourceConvertUnitsToMetersKey
+ SwiftName: convertUnitsToMeters
+- Name: SCNSceneSourceConvertToYUpKey
+ SwiftName: convertToYUp
+- Name: SCNSceneSourceAnimationImportPolicyKey
+ SwiftName: animationImportPolicy
+- Name: SCNPreferredRenderingAPIKey
+ SwiftName: preferredRenderingAPI
+- Name: SCNPreferredDeviceKey
+ SwiftName: preferredDevice
+- Name: SCNPreferLowPowerDeviceKey
+ SwiftName: preferLowPowerDevice
+
+#
+# API Renaming
+#
+Protocols:
+- Name: SCNActionable
+ Methods:
+ - Selector: 'runAction:'
+ MethodKind: Instance
+ SwiftName: runAction(_:)
+ - Selector: 'runAction:completionHandler:'
+ MethodKind: Instance
+ SwiftName: runAction(_:completionHandler:)
+ - Selector: 'runAction:forKey:'
+ MethodKind: Instance
+ SwiftName: runAction(_:forKey:)
+ - Selector: 'runAction:forKey:completionHandler:'
+ MethodKind: Instance
+ SwiftName: runAction(_:forKey:completionHandler:)
+- Name: SCNAnimatable
+ Methods:
+ - Selector: 'addAnimation:forKey:'
+ MethodKind: Instance
+ SwiftName: addAnimation(_:forKey:)
+ - Selector: 'addAnimationPlayer:forKey:'
+ MethodKind: Instance
+ SwiftName: addAnimationPlayer(_:forKey:)
+ - Selector: 'isAnimationForKeyPaused:'
+ MethodKind: Instance
+ SwiftName: isAnimationPaused(forKey:)
+ - Selector: 'setSpeed:forAnimationKey:'
+ MethodKind: Instance
+ SwiftName: setAnimationSpeed(_:forKey:)
+- Name: SCNSceneRenderer
+ Methods:
+ - Selector: 'hitTest:options:'
+ MethodKind: Instance
+ SwiftName: hitTest(_:options:)
+ - Selector: 'isNodeInsideFrustum:withPointOfView:'
+ MethodKind: Instance
+ SwiftName: isNode(_:insideFrustumOf:)
+ - Selector: 'nodesInsideFrustumWithPointOfView:'
+ MethodKind: Instance
+ SwiftName: nodesInsideFrustum(of:)
+ - Selector: 'prepareObjects:withCompletionHandler:'
+ MethodKind: Instance
+ SwiftName: prepare(_:completionHandler:)
+- Name: SCNBufferStream
+ Methods:
+ - Selector: 'writeBytes:length:'
+ MethodKind: Instance
+ SwiftName: writeBytes(_:count:)
+- Name: SCNShadable
+ Methods:
+ - Selector: 'handleBindingOfSymbol:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleBinding(ofSymbol:handler:)
+ - Selector: 'handleUnbindingOfSymbol:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleUnbinding(ofSymbol:handler:)
+
+Classes:
+- Name: SCNAction
+ Methods:
+ - Selector: 'rotateToX:y:z:duration:shortestUnitArc:'
+ MethodKind: Class
+ SwiftName: rotateTo(x:y:z:duration:usesShortestUnitArc:)
+ - Selector: 'rotateByAngle:aroundAxis:duration:'
+ MethodKind: Class
+ SwiftName: rotate(by:around:duration:)
+ - Selector: 'fadeInWithDuration:'
+ MethodKind: Class
+ SwiftName: fadeIn(duration:)
+ - Selector: 'fadeOutWithDuration:'
+ MethodKind: Class
+ SwiftName: fadeOut(duration:)
+ - Selector: 'waitForDuration:'
+ MethodKind: Class
+ SwiftName: wait(duration:)
+ - Selector: 'waitForDuration:withRange:'
+ MethodKind: Class
+ SwiftName: wait(duration:withRange:)
+ - Selector: 'customActionWithDuration:actionBlock:'
+ MethodKind: Class
+ SwiftName: customAction(duration:action:)
+ - Selector: 'playAudioSource:waitForCompletion:'
+ MethodKind: Class
+ SwiftName: playAudio(_:waitForCompletion:)
+- Name: SCNLookAtConstraint
+ Properties:
+ - Name: gimbalLockEnabled
+ SwiftName: isGimbalLockEnabled
+- Name: SCNIKConstraint
+ Methods:
+ - Selector: 'inverseKinematicsConstraintWithChainRootNode:'
+ MethodKind: Class
+ SwiftName: inverseKinematicsConstraint(chainRootNode:)
+- Name: SCNGeometry
+ Properties:
+ - Name: geometrySources
+ SwiftName: sources
+ - Name: geometryElements
+ SwiftName: elements
+ - Name: geometryElementCount
+ SwiftName: elementCount
+ Methods:
+ - Selector: 'materialWithName:'
+ MethodKind: Instance
+ SwiftName: material(named:)
+ - Selector: 'geometrySourcesForSemantic:'
+ MethodKind: Instance
+ SwiftName: sources(for:)
+ - Selector: 'geometryElementAtIndex:'
+ MethodKind: Instance
+ SwiftName: element(at:)
+- Name: SCNGeometrySource
+ Methods:
+ - Selector: 'geometrySourceWithData:semantic:vectorCount:floatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:'
+ MethodKind: Class
+ SwiftName: 'init(data:semantic:vectorCount:usesFloatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:)'
+ - Selector: 'geometrySourceWithTextureCoordinates:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(textureCoordinates:) instead"
+ - Selector: 'geometrySourceWithNormals:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(normals:) instead"
+ - Selector: 'geometrySourceWithVertices:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(vertices:) instead"
+ Properties:
+ - Name: floatComponents
+ SwiftName: usesFloatComponents
+- Name: SCNMaterial
+ Properties:
+ - Name: lightingModelName
+ SwiftName: lightingModel
+- Name: SCNMorpher
+ Methods:
+ - Selector: 'weightForTargetAtIndex:'
+ MethodKind: Instance
+ SwiftName: weight(forTargetAt:)
+- Name: SCNNode
+ Methods:
+ - Selector: 'hitTestWithSegmentFromPoint:toPoint:options:'
+ MethodKind: Instance
+ SwiftName: hitTestWithSegment(from:to:options:)
+ - Selector: 'convertVector:fromNode:'
+ MethodKind: Instance
+ SwiftName: convertVector(_:from:)
+ - Selector: 'convertVector:toNode:'
+ MethodKind: Instance
+ SwiftName: convertVector(_:to:)
+- Name: SCNParticleSystem
+ Properties:
+ - Name: affectedByGravity
+ SwiftName: isAffectedByGravity
+ - Name: affectedByPhysicsFields
+ SwiftName: isAffectedByPhysicsFields
+ Methods:
+ - Selector: 'handleEvent:forProperties:withBlock:'
+ MethodKind: Instance
+ SwiftName: handle(_:forProperties:handler:)
+ - Selector: 'addModifierForProperties:atStage:withBlock:'
+ MethodKind: Instance
+ SwiftName: addModifier(forProperties:at:modifier:)
+ - Selector: 'removeModifiersOfStage:'
+ MethodKind: Instance
+ SwiftName: removeModifiers(at:)
+- Name: SCNScene
+ Methods:
+ - Selector: 'addParticleSystem:withTransform:'
+ MethodKind: Instance
+ SwiftName: addParticleSystem(_:transform:)
+- Name: SCNPhysicsBody
+ Methods:
+ - Selector: 'applyForce:impulse:'
+ MethodKind: Instance
+ SwiftName: applyForce(_:asImpulse:)
+ - Selector: 'applyForce:atPosition:impulse:'
+ MethodKind: Instance
+ SwiftName: applyForce(_:at:asImpulse:)
+ - Selector: 'applyTorque:impulse:'
+ MethodKind: Instance
+ SwiftName: applyTorque(_:asImpulse:)
+- Name: SCNPhysicsField
+ Methods:
+ - Selector: 'noiseFieldWithSmoothness:animationSpeed:'
+ MethodKind: Class
+ SwiftName: noiseField(smoothness:animationSpeed:)
+ - Selector: 'turbulenceFieldWithSmoothness:animationSpeed:'
+ MethodKind: Class
+ SwiftName: turbulenceField(smoothness:animationSpeed:)
+- Name: SCNPhysicsWorld
+ Methods:
+ - Selector: 'addBehavior:'
+ MethodKind: Instance
+ SwiftName: addBehavior(_:)
+ - Selector: 'removeBehavior:'
+ MethodKind: Instance
+ SwiftName: removeBehavior(_:)
+ - Selector: 'rayTestWithSegmentFromPoint:toPoint:options:'
+ MethodKind: Instance
+ SwiftName: rayTestWithSegment(from:to:options:)
+ - Selector: 'contactTestBetweenBody:andBody:options:'
+ MethodKind: Instance
+ SwiftName: contactTestBetween(_:_:options:)
+ - Selector: 'contactTestWithBody:options:'
+ MethodKind: Instance
+ SwiftName: contactTest(with:options:)
+ - Selector: 'convexSweepTestWithShape:fromTransform:toTransform:options:'
+ MethodKind: Instance
+ SwiftName: convexSweepTest(with:from:to:options:)
+- Name: SCNSceneSource
+ Methods:
+ - Selector: 'identifiersOfEntriesWithClass:'
+ MethodKind: Instance
+ SwiftName: identifiersOfEntries(withClass:)
+- Name: SCNProgram
+ Methods:
+ - Selector: 'handleBindingOfBufferNamed:frequency:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleBinding(ofBufferNamed:frequency:handler:)
+
+#
+# Swift 3 Source Compatibility
+#
+SwiftVersions:
+- Version: 3.0
+ Classes:
+ - Name: SCNGeometry
+ Properties:
+ - Name: geometrySources
+ SwiftName: geometrySources
+ - Name: geometryElements
+ SwiftName: geometryElements
+ - Name: geometryElementCount
+ SwiftName: geometryElementCount
+ Methods:
+ - Selector: 'geometrySourcesForSemantic:'
+ MethodKind: Instance
+ SwiftName: getGeometrySources(for:)
+ - Selector: 'geometryElementAtIndex:'
+ MethodKind: Instance
+ SwiftName: geometryElement(at:)
+ - Name: SCNGeometrySource
+ Methods:
+ - Selector: 'geometrySourceWithTextureCoordinates:count:'
+ MethodKind: Class
+ SwiftPrivate: false
+ - Selector: 'geometrySourceWithNormals:count:'
+ MethodKind: Class
+ SwiftPrivate: false
+ - Selector: 'geometrySourceWithVertices:count:'
+ MethodKind: Class
+ SwiftPrivate: false
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h n/macOS/Frameworks/SceneKit.framework/Headers/SceneKit.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h 2016-08-04 21:18:28.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SceneKit.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SceneKit.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
/*! @framework SceneKit
@@ -49,6 +49,7 @@
#import <SceneKit/SCNReferenceNode.h>
#import <SceneKit/SCNAudioSource.h>
#import <SceneKit/SCNHitTest.h>
+#import <SceneKit/SCNCameraController.h>
//scripting
#import <SceneKit/SCNJavascript.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h n/macOS/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h 2017-08-11 21:12:10.000000000 -0400
@@ -1,7 +1,7 @@
//
// SceneKitTypes.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -22,6 +22,31 @@
#endif
+// Color
+#define SCNColor NSColor
+
+/*! @enum SCNActionTimingMode
+ @abstract The modes that an action can use to adjust the apparent timing of the action.
+ */
+typedef NS_ENUM(NSInteger, SCNActionTimingMode) {
+ SCNActionTimingModeLinear,
+ SCNActionTimingModeEaseIn,
+ SCNActionTimingModeEaseOut,
+ SCNActionTimingModeEaseInEaseOut
+} API_AVAILABLE(macosx(10.10), ios(8.0));
+
+/*! @enum SCNColorComponent
+ @abstract Color components
+ */
+typedef NS_OPTIONS(NSInteger, SCNColorMask) {
+ SCNColorMaskNone = 0,
+ SCNColorMaskRed = 0x1 << 3,
+ SCNColorMaskGreen = 0x1 << 2,
+ SCNColorMaskBlue = 0x1 << 1,
+ SCNColorMaskAlpha = 0x1 << 0,
+ SCNColorMaskAll = 0xf
+} API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
#pragma mark - Vectors
typedef struct SCNVector3 {
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal n/macOS/Frameworks/SceneKit.framework/Headers/scn_metal
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal 2016-08-04 21:18:29.000000000 -0400
+++ n/macOS/Frameworks/SceneKit.framework/Headers/scn_metal 2017-08-11 21:12:10.000000000 -0400
@@ -26,6 +26,7 @@
float4x4 projectionTransform;
float4x4 viewProjectionTransform;
float4x4 viewToCubeTransform; // transform from view space to cube texture space (canonical Y Up space)
+ float4x4 lastFrameViewProjectionTransform;
float4 ambientLightingColor;
float4 fogColor;
float3 fogParameters; // x:-1/(end-start) y:1-start*x z:exp
@@ -34,10 +35,14 @@
float sinTime;
float cosTime;
float random01;
+ float motionBlurIntensity;
// new in macOS 10.12 and iOS 10
float environmentIntensity;
float4x4 inverseProjectionTransform;
float4x4 inverseViewProjectionTransform;
+ // new in macOS 10.13 and iOS 11
+ float2 nearFar; // x: near, y: far
+ float4 viewportSize; // xy:size, zw:size / tan(fov/2)
};
// In custom shaders or in shader modifiers, you also have access to node relative information.