SCNParticleSystem
Extends:
Implements:
Manages the animation and rendering of a system of small image sprites, or particles, using a high-level simulation whose general behavior you specify.
Static Member Summary
Static Public Members | ||
public static get |
|
Static Method Summary
Static Public Methods | ||
public static |
systemNamedInDirectory(name: string, directory: string): void A SceneKit particle file created by Xcode contains an archived SCNParticleSystem instance, so you can also use the NSKeyedArchiver and NSKeyedUnarchiver classes to write and read particle files. |
Constructor Summary
Public Constructor | ||
public |
constructor(name: string, directory: string) constructor |
Member Summary
Public Members | ||
public |
The constant acceleration vector, in units per second per second, applied to all particles in the system. |
|
public get |
This array contains all keys for which animations are attached to the object, or is empty if there are no attached animations. |
|
public |
The possible initial directions for newly spawned particles, relative to the emitter shape. |
|
public |
The possible locations for newly spawned particles, relative to the emitter shape. |
|
public set |
birthRate: * |
|
public get |
The number of particles spawned during each emission period. |
|
public |
The range of randomized particle birth rate values. |
|
public |
The blending mode for compositing particle images into the rendered scene. |
|
public |
The nodes whose geometry the system’s particles can collide with. |
|
public |
A factor that slows particles relative to their velocity. |
|
public get |
|
|
public |
The duration, in seconds, over which the system spawns new particles. |
|
public |
The range, in seconds, of randomized emission duration values. |
|
public |
The shape of the region of space where the system spawns new particles. |
|
public |
The initial direction for newly spawned particles. |
|
public |
The reflectivity exponent SceneKit uses when rendering the particle’s image as a cube map. |
|
public |
The duration, in seconds, of periods when the system emits no particles. |
|
public |
The range, in seconds, of randomized idle duration values. |
|
public |
The animation mode for particle image animation. |
|
public |
The number of columns for treating the particle image as a grid of animation frames. |
|
public |
The rate, in frames per second, of particle image animation. |
|
public |
The range, in frames per second, of randomized frame rates for particle image animation. |
|
public |
The index of the first frame in a particle image animation. |
|
public |
The range of randomized initial frames for particle image animation. |
|
public |
The number of rows for treating the particle image as a grid of animation frames. |
|
public |
A Boolean value that determines whether gravity, as defined by the scene’s physics simulation, affects the motion of particles. |
|
public |
A Boolean value that determines whether physics fields in the scene affect the motion of particles. |
|
public |
A Boolean value that determines whether SceneKit renders particles in black before rendering the particle image. |
|
public |
A Boolean value that determines whether SceneKit applies lighting to particle images when rendering. |
|
public |
A Boolean value that specifies whether the particle simulation runs in the local coordinate space of the node containing it. |
|
public |
A Boolean value that determines whether the system repeats its emission and idle periods. |
|
public |
The mode defining whether and how particles may rotate. |
|
public |
The rotation angle, in degrees, of newly spawned particles. |
|
public |
The range, in degrees of randomized initial particle angles. |
|
public |
The initial spin rate, in degrees per second, of newly spawned particles. |
|
public |
The range, in degrees per second, of randomized initial angular velocities for particles. |
|
public |
The restitution coefficient of each particle in the system. |
|
public |
The range of randomized restitution coefficients for particles. |
|
public |
The electric charge, in coulombs, of each particle in the system. |
|
public |
The range, in coulombs, of randomized particle charges. |
|
public |
The color of newly spawned particles. |
|
public |
The ranges of randomized particle color components. |
|
public |
A Boolean value that determines whether particles are removed from the scene upon colliding with another object. |
|
public |
The friction coefficient of each particle in the system. |
|
public |
The range of randomized friction coefficients for particles. |
|
public |
The texture image SceneKit uses to render each particle. |
|
public |
The duration, in seconds, for which each particle is rendered before being removed from the scene. |
|
public |
The range, in seconds, of randomized particle life spans. |
|
public |
The mass, in kilograms, of each particle in the system. |
|
public |
The range, in kilograms, of randomized particle masses. |
|
public |
The rendered size, in units of the scene’s world coordinate space, of the particle image. |
|
public |
The range of randomized particle sizes. |
|
public |
The initial speed, in units per second, for newly spawned particles. |
|
public |
The range, in units per second, of randomized initial particle speeds. |
|
public |
A dictionary that optionally associates particle properties with objects that animate a property’s value for each particle. |
|
public |
The mode defining the order in which SceneKit renders the system’s particles. |
|
public |
A multiplier for the speed at which SceneKit runs the particle simulation. |
|
public |
The range, in degrees, of randomized initial particle directions. |
|
public |
A multiplier for stretching particle images along their direction of motion. |
|
public |
Another particle system to be added to the scene when a particle collides with scene geometry. |
|
public |
Another particle system to be added to the scene when a particle dies. |
|
public |
Another particle system to be added to the scene for each living particle in the system. |
|
public |
The duration, in seconds, for which particles are spawned before the system is first rendered. |
Method Summary
Public Methods | ||
public |
addAnimationForKey(animation: CAAnimation, key: string): void Newly added animations begin executing after the current run loop cycle ends.SceneKit does not define any requirements for the contents of the key parameter—it need only be unique among the keys for other animations you add. |
|
public |
addModifierForPropertiesAtModifier(properties: SCNParticleSystem.ParticleProperty[], stage: SCNParticleModifierStage, block: SCNParticleModifierBlock): void By associating a block with one or more particle properties, you can run arbitrary code that modifies those properties during each frame of animation. |
|
public |
animationForKey(key: string): CAAnimation Attempting to modify any properties of the returned object results in undefined behavior. |
|
public |
handleForPropertiesHandler(event: SCNParticleEvent, properties: SCNParticleSystem.ParticleProperty[], block: SCNParticleEventBlock): void By associating a block with one or more particle properties, you can run arbitrary code that modifies those properties when a significant event in the particle simulation occurs for one or more particles. |
|
public |
isAnimationPausedForKey(key: string): boolean Required. |
|
public |
pauseAnimationForKey(key: string): void This method has no effect if no animation is attached to the object with the specified key. |
|
public |
removeAllAnimations(): void Required. |
|
public |
removeAllModifiers(): void Removes all particle modifier blocks associated with the particle system. |
|
public |
removeAnimationForKey(key: string): void Required. |
|
public |
removeAnimationForKeyFadeOutDuration(key: string, duration: number): void Use this method to create smooth transitions between the effects of multiple animations. |
|
public |
removeModifiersAt(stage: SCNParticleModifierStage): void Removes particle modifier blocks for the specified stage of the particle simulation. |
|
public |
reset(): void Calling this method removes all currently live particles from the scene. |
|
public |
resumeAnimationForKey(key: string): void This method has no effect if no animation is attached to the object with the specified key or if the specified animation is not currently paused. |
|
public |
setAnimationSpeedForKey(speed: number, key: string): void Required. |
|
public |
setValueForKeyPath(value: *, keyPath: *) |
|
public |
valueForKeyPath(keyPath: *, usePresentation: boolean): * |
Inherited Summary
From class NSObject | ||
public static get |
The default returns true. |
|
public static get |
|
|
public static get |
|
|
public static |
The default implementation returns true. |
|
public static |
cancelPreviousPerformRequestsWithTarget(aTarget: Object): void All perform requests having the same target aTarget are canceled. |
|
public static |
cancelPreviousPerformRequestsWithTargetSelectorObject(aTarget: Object, aSelector: function, anArgument: Object): void All perform requests are canceled that have the same target as aTarget, argument as anArgument, and selector as aSelector. |
|
public static |
NSKeyedArchiver calls this method and stores the result inside the archive. |
|
public static |
During keyed unarchiving, instances of the receiver will be decoded as members of the returned class. |
|
public static |
conformsTo(protocol: Object): boolean A class is said to “conform to” a protocol if it adopts the protocol or inherits from another class that adopts it. |
|
public static |
|
|
public static |
defaultPlaceholderForMarkerWithBinding(marker: Object, binding: string): Object The marker can be nil or one of the constants described in Selection Markers. |
|
public static |
The debugger’s print-object command invokes this method to produce a textual description of an object.NSObject's implementation of this method simply prints the name of the class. |
|
public static |
exposeBinding(binding: string): void The bound property will be accessed using key-value-coding compliant methods. |
|
public static |
|
|
public static |
initWithCoder(coder: *): * |
|
public static |
initialize(): void The runtime sends initialize() to each class in a program just before the class, or any class that inherits from it, is sent its first message from within the program. |
|
public static |
instanceMethodFor(aSelector: function): function An error is generated if instances of the receiver can’t respond to aSelector messages.Use this method to ask the class object for the implementation of instance methods only. |
|
public static |
instancesRespondTo(aSelector: function): boolean If aSelector messages are forwarded to other objects, instances of the class are able to receive those messages without error even though this method returns false.To ask the class whether it, rather than its instances, can respond to a particular message, send to the class instead the NSObject protocol instance method responds(to:). |
|
public static |
isKeyExcludedFromWebScript(name: UnsafePointer<Int8>): boolean The default value is true. |
|
public static |
isSelectorExcludedFromWebScript(selector: function): boolean Only methods with valid parameters and return types are exported to the WebKit JavaScript environment. |
|
public static |
isSubclassOf(aClass: Object): boolean Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class. |
|
public static |
When an observer for the key is registered with an instance of the receiving class, key-value observing itself automatically observes all of the key paths for the same instance, and sends change notifications for the key to the observer when the value for any of those key paths changes.The default implementation of this method searches the receiving class for a method whose name matches the pattern +keyPathsForValuesAffecting<Key>, and returns the result of invoking that method if it is found. |
|
public static |
load(): void The load() message is sent to classes and categories that are both dynamically loaded and statically linked, but only if the newly loaded class or category implements a method that can respond.The order of initialization is as follows:All initializers in any framework you link to.All +load methods in your image.All C++ static initializers and C/C++ attribute(constructor) functions in your image.All initializers in frameworks that link to you.In addition:A class’s +load method is called after all of its superclasses’ +load methods.A category +load method is called after the class’s own +load method.In a custom implementation of load() you can therefore safely message other unrelated classes from the same image, but any load() methods implemented by those classes may not have run yet.ImportantCustom implementations of the load method for Swift classes bridged to Objective-C are not called automatically. |
|
public static |
resolveClassMethod(sel: function): boolean This method allows you to dynamically provide an implementation for a given selector. |
|
public static |
resolveInstanceMethod(sel: function): boolean This method and resolveClassMethod(_:) allow you to dynamically provide an implementation for a given selector.An Objective-C method is simply a C function that take at least two arguments—self and _cmd. |
|
public static |
setDefaultPlaceholderForMarkerWithBinding(placeholder: Object, marker: Object, binding: string): void The marker can be nil or one of the constants described in Selection Markers. |
|
public static |
setVersion(aVersion: number): void The version number is helpful when instances of the class are to be archived and reused later. |
|
public static |
superclass(): Object Returns the class object for the receiver’s superclass. |
|
public static |
If no version has been set, the default is 0. |
|
public static |
webScriptNameFor(selector: function): string It is your responsibility to ensure that the returned name is unique to the script invoking this method. |
|
public static |
webScriptNameForKey(name: UnsafePointer<Int8>): string Returns the scripting environment name for an attribute specified by a key. |
|
public get |
You can assume that the search for the focus has already been narrowed down to the accessibility element. |
|
public get |
In macOS 10.9 and later, a custom accessibility object that is an NSObject subclass can post accessibility notifications if it meets the following criteria:The lifetime of the custom accessibility object must match the lifetime of the corresponding element in the app's UI.Typically, a custom accessibility object that acts as a proxy for an onscreen UI element gets autoreleased and deallocated immediately after the app responds to an accessibility request. Such an object can’t post accessibility notifications, because all registered observers get removed as soon as the object is deallocated. To correct this, an app must guarantee that a custom accessibility object remains allocated for as long as its corresponding UI element remains visible.The object must post the NSAccessibilityUIElementDestroyedNotification notification at the appropriate time. The appropriate time is most likely to be when the corresponding UI element is removed from the screen, but it can also be when the object itself is deallocated. The object must implement accessibilityNotifiesWhenDestroyed and return true. |
|
public get |
NSObject’s implementation of attributeKeys simply calls [[self classDescription] attributeKeys]. |
|
public get |
This property returns a proxy for the receiving object if the receiver adopts the NSDiscardableContent protocol and still has content that has not been discarded.The proxy calls beginContentAccess() on the receiver to keep the content available as long as the proxy lives, and calls endContentAccess() when the proxy is deallocated.The wrapper object is otherwise a subclass of NSProxy and forwards messages to the original receiver object as an NSProxy does.This method can be used to hide an NSDiscardableContent object's content volatility by creating an object that responds to the same messages but holds the contents of the original receiver available as long as the created proxy lives. Thus hidden, the NSDiscardableContent object (by way of the proxy) can be given out to unsuspecting recipients of the object who would otherwise not know they might have to call beginContentAccess() and endContentAccess() around particular usages (specific to each NSDiscardableContent object) of the NSDiscardableContent object. |
|
public get |
This property is used by Cocoa’s scripting support classes. |
|
public get |
classDescription: NSClassDescription |
|
public get |
|
|
public get |
This method is invoked by NSCoder. |
|
public get |
The object will be encoded as if it were a member of the class. |
|
public get |
|
|
public get |
A subclass can override this method to remove bindings that are exposed by a superclass that are not appropriate for the subclass. |
|
public get |
|
|
public get |
|
|
public get |
The methods of the object are exposed to the script environment. |
|
public get |
objectSpecifier: NSScriptObjectSpecifier |
|
public get |
|
|
public get |
|
|
public get |
webFrame: WebFrame Only implemented by containers that are based on the WebKit’s plug-in architecture. |
|
public get |
webPlugInContainerSelectionColor: CGColor The color should be used for any special drawing when the plug-in is selected. |
|
public |
[key]: * |
|
public |
The activation point for the accessibility element, in screen coordinates. |
|
public |
accessibilityCustomActions: UIAccessibilityCustomAction[] An array of custom actions to display along with the built-in actions. |
|
public |
accessibilityCustomRotors: UIAccessibilityCustomRotor[] |
|
public |
An array of the accessibility elements in the container. |
|
public |
A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden. |
|
public |
The frame of the accessibility element, in screen coordinates. |
|
public |
|
|
public |
A brief description of the result of performing an action on the accessibility element, in a localized string. |
|
public |
A succinct label that identifies the accessibility element, in a localized string. |
|
public |
The language in which to speak the accessibility element's label, value, and hint. |
|
public |
accessibilityNavigationStyle: UIAccessibilityNavigationStyle The navigation style to apply to the object and its elements. |
|
public |
accessibilityPath: UIBezierPath The path of the element, in screen coordinates. |
|
public |
accessibilityTraits: UIAccessibilityTraits The combination of accessibility traits that best characterize the accessibility element. |
|
public |
The value of the accessibility element, in a localized string. |
|
public |
A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. |
|
public |
A Boolean value indicating whether the receiver is an accessibility element that an assistive application can access. |
|
public |
Returns a pointer that identifies information about all of the observers that are registered with the observed object. |
|
public |
An NSString-keyed dictionary of the receiver's scriptable properties. |
|
public |
A Boolean value indicating whether VoiceOver should group together the elements that are children of the receiver, regardless of their positions on the screen. |
|
public |
acceptsPreviewPanelControl(panel: QLPreviewPanel): boolean |
|
public |
accessibilityActionDescription(action: string): string this method was deprecated.
User interface classes must implement this method to return descriptions for all actions returned from accessibilityActionNames(). |
|
public |
this method was deprecated.
User interface classes must implement this method. |
|
public |
You can use this method to make complex controls more readily accessible to users. |
|
public |
accessibilityArrayAttributeCount(attribute: string): number If attribute is not an array, an exception is raised. |
|
public |
accessibilityArrayAttributeValues(attribute: string, index: number, maxCount: number): Object[] Note that this method does not take a range. |
|
public |
|
|
public |
this method was deprecated.
User interface classes must implement this method. |
|
public |
accessibilityAttributeValue(attribute: string): Object this method was deprecated.
User interface classes must implement this method. |
|
public |
accessibilityAttributeValueForParameter(attribute: string, parameter: Object): Object this method was deprecated.
If you implement this method, also implement accessibilityParameterizedAttributeNames(). |
|
public |
accessibilityDecrement(): void If your element has the UIAccessibilityTraitAdjustable trait, you must implement this method. |
|
public |
accessibilityElementAt(index: number): Object Returns the accessibility element at the specified index. |
|
public |
Returns the number of accessibility elements in the container. |
|
public |
Override accessibilityElementDidBecomeFocused if you need to know when an assistive technology has set its virtual focus on an accessibility element. |
|
public |
accessibilityElementDidLoseFocus(): void Override accessibilityElementDidLoseFocus if you need to know when an assistive technology has removed its virtual focus from an accessibility element. |
|
public |
Returns a Boolean value indicating whether an assistive technology is focused on the accessibility element. |
|
public |
accessibilityHitTest(point: CGPoint): Object You can assume that the specified point has already been determined to lie within the accessibility element's frame. Override this method to do deeper hit-testing by identifying which child element, if any, contains the point. NSMatrix, for example, identifies which of its cells contains the point and propagates the hit-test to it. If the specified point is not contained within one of the accessibility element's children, either return self or, if available, invoke the superclass's implementation. The default NSView and NSCell implementations test whether the accessibility element is an ignored element and, if it is, return the receiver's first unignored parent; otherwise they return self. |
|
public |
accessibilityIncrement(): void If your element has the UIAccessibilityTraitAdjustable trait, you must implement this method. |
|
public |
accessibilityIndexOfChild(child: Object): number Returns the index of the specified accessibility child in the parent. |
|
public |
accessibilityIsAttributeSettable(attribute: string): boolean this method was deprecated.
User interface classes must implement this method. |
|
public |
this method was deprecated.
When asking for an object's children, do not include ignored children; instead, replace the ignored children with their own unignored children. The same applies when asking for an object's parent: skip the ignored parent and treat the first unignored ancestor as the real parent. |
|
public |
this method was deprecated.
If you implement this method, also implement accessibilityAttributeValue(_:forParameter:). |
|
public |
accessibilityPerformAction(action: string): void this method was deprecated.
User interface classes must implement this method to handle all the actions returned from accessibilityActionNames(). |
|
public |
Implement this method on an element or containing view that can be revealed modally or in a hierarchy. |
|
public |
The exact action performed by this method depends your app, typically toggling the most important state of the app. |
|
public |
accessibilityScroll(direction: UIAccessibilityScrollDirection): boolean Implement this method if a view in the view hierarchy supports a scroll by page action.If the scrolling action succeeds for the specified direction, return true and post the UIAccessibilityPageScrolledNotification notification. |
|
public |
accessibilitySetOverrideValueForAttribute(value: Object, attribute: string): boolean this method was deprecated.
This method is for changing the set of attributes on an instance, as an alternative to subclassing.This method works only on objects whose class already implements the NSAccessibility protocol. |
|
public |
accessibilitySetValueForAttribute(value: Object, attribute: string): void this method was deprecated.
User interface classes must implement this method if any of its attributes are settable. |
|
public |
See Table 1The documentation for property-list constants for the properties for person and group records. |
|
public |
addObserverForKeyPath(observer: NSObject, keyPath: string, options: NSKeyValueObservingOptions, context: Object): void Neither the object receiving this message, nor observer, are retained. |
|
public |
applicationDelegateHandlesKey(sender: NSApplication, key: string): boolean The method should return true if the delegate for the app sender handles the key specified by key, which means it can get or set the scriptable property or element that corresponds to that key. |
|
public |
attemptRecoveryFromErrorOptionIndex(error: Error, recoveryOptionIndex: number): boolean Invoked when an error alert is been presented to the user in an application-modal dialog, and the user has selected an error recovery option specified by error. |
|
public |
authorizationViewCreatedAuthorization(view: SFAuthorizationView): void Sent to the delegate to indicate the authorization object has been created or changed. |
|
public |
authorizationViewDidAuthorize(view: SFAuthorizationView): void Sent to the delegate to indicate the user was authorized and the authorization view was changed to unlocked. |
|
public |
authorizationViewDidDeauthorize(view: SFAuthorizationView): void Sent to the delegate to indicate the user was deauthorized and the authorization view was changed to locked. |
|
public |
authorizationViewDidHide(view: SFAuthorizationView): void This delegate method, if present, is called whenever the isHidden method is called to show or hide the view. |
|
public |
authorizationViewReleasedAuthorization(view: SFAuthorizationView): void This method is called after deauthorization has been approved (either you called the deauthorize: method, or the user clicked an open lock icon and the authorizationViewShouldDeauthorize: delegate method did not cancel the operation), and before the user is deauthorized (that is, before the authorizationViewDidDeauthorize: delegate method is called). |
|
public |
authorizationViewShouldDeauthorize(view: SFAuthorizationView): number The delegate can react to this before deauthorization happens and avoid it by returning false. |
|
public |
awakeAfterUsing(aDecoder: NSCoder): Object You can use this method to eliminate redundant objects created by the coder. |
|
public |
awakeFromNib(): void The nib-loading infrastructure sends an awakeFromNib message to each object recreated from a nib archive, but only after all the objects in the archive have been loaded and initialized. |
|
public |
beginPreviewPanelControl(panel: QLPreviewPanel): void |
|
public |
bindToWithKeyPath(binding: string, observable: Object, keyPath: string, options: Map<string, Object>): void Establishes a binding between a given property of the receiver and the property of a given object specified by a given key path. |
|
public |
candidates(sender: Object): Object[] An input method should look up its currently composed string and return a list of candidate strings that that string might map to. |
|
public |
certificatePanelShowHelp(sender: SFCertificatePanel): number You can use this delegate method to implement custom help if you call the setShowsHelp: method to display a help button in the sheet or panel. |
|
public |
changeColor(sender: Object): void When the user selects a color in an NSColorPanel object, the panel sends a changeColor(_:) action message to the first responder. |
|
public |
changeFont(sender: Object): void Generally this change is because the user changed the font either in the selection of a rich text field or in a whole plain text field. |
|
public |
chooseIdentityPanelShowHelp(sender: SFChooseIdentityPanel): number You can use this delegate method to implement custom help if you call the setShowsHelp: method to display a help button in the sheet or panel. |
|
public |
classForAnnotationClass(annotationClass: Object): Object this method was deprecated.
|
|
public |
this method was deprecated.
|
|
public |
coerceValueForKey(value: Object, key: string): Object The method coerceValueFor<Key>: is used if it exists. |
|
public |
commitComposition(sender: Object): void If an input method implements this method, it is called when the client wants to end the composition session immediately. |
|
public |
A commit is denied if the receiver fails to apply the changes to the model object, perhaps due to a validation error. |
|
public |
commitEditingAndReturnError(): void During autosaving, commit editing may fail, due to a pending edit. |
|
public |
commitEditingWithDelegateDidCommit(delegate: Object, didCommitSelector: function, contextInfo: Object): void The receiver must have been registered as the editor of an object using objectDidBeginEditing:, and has not yet been unregistered by a subsequent invocation of objectDidEndEditing:. |
|
public |
composedString(sender: Object): Object A composed string refers to the buffer that an input method typically maintains to mirror the text contained in the active inline area. |
|
public |
compositionParameterViewDidChangeParameterWithKey(parameterView: QCCompositionParameterView, portKey: string): void Called after an input parameter in the composition parameter view has been edited. |
|
public |
compositionParameterViewShouldDisplayParameterWithKeyAttributes(parameterView: QCCompositionParameterView, portKey: string, portAttributes: Map<AnyHashable, Object>): boolean Allows you to define which composition parameters are visible in the user interface when the composition parameter view refreshes. |
|
public |
compositionPickerViewDidSelect(pickerView: QCCompositionPickerView, composition: QCComposition): void Quartz Composer invokes this method when the selected composition in the composition picker view changes. |
|
public |
compositionPickerViewDidStartAnimating(pickerView: QCCompositionPickerView): void Quartz Composer invokes this method when the composition picker view starts animating a composition. |
|
public |
compositionPickerViewWillStopAnimating(pickerView: QCCompositionPickerView): void Quartz Composer invokes this method whenever the composition picker view stops animating a composition. |
|
public |
controlTextDidBeginEditing(obj: Notification): void This method is invoked when the user begins editing text in a control such as a text field or a form field. |
|
public |
controlTextDidChange(obj: Notification): void This method is invoked when text in a control such as a text field or form changes. |
|
public |
controlTextDidEndEditing(obj: Notification): void This method is invoked when the user stops editing text in a control such as a text field or form. |
|
public |
This is a convenience method for classes that adopt the NSCopying protocol. |
|
public |
copyScriptingValueForKeyWithProperties(value: Object, key: string, properties: Map<string, Object>): Object You can override the copyScriptingValue method to take more control when your application is sent a duplicate command. |
|
public |
dictionaryWithValuesForKeys(keys: string[]): Map<string, Object> The default implementation invokes value(forKey:) for each key in keys and substitutes NSNull values in the dictionary for returned nil values. |
|
public |
didChangeValueForKey(key: string): void Use this method when implementing key-value observer compliance manually to inform the observed object that the value at key has just changed. |
|
public |
didChangeValueForKeyWithSetMutationUsing(key: string, mutationKind: NSKeyValueSetMutationKind, objects: Set<AnyHashable>): void Use this method when implementing key-value observer compliance manually. |
|
public |
didChangeValuesAtForKey(changeKind: NSKeyValueChange, indexes: Set, key: string): void Use this method when implementing key-value-observing compliance manually.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
didCommandByClient(aSelector: function, sender: Object): boolean This method is called when the system binds a key down event to an action method. |
|
public |
didMatchString(instance: PDFSelection): void Called for every match found during a find operation. |
|
public |
discardEditing(): void Causes the receiver to discard any changes, restoring the previous values. |
|
public |
documentDidBeginDocumentFind(notification: Notification): void Called when the PDFDocumentDidBeginFindNotification notification is posted. |
|
public |
documentDidBeginPageFind(notification: Notification): void Called when the PDFDocumentDidBeginPageFindNotification notification is posted. |
|
public |
documentDidEndDocumentFind(notification: Notification): void Called when the PDFDocumentDidEndFindNotification notification is posted. |
|
public |
documentDidEndPageFind(notification: Notification): void Called when the PDFDocumentDidEndPageFindNotification notification is posted. |
|
public |
documentDidFindMatch(notification: Notification): void Called when the PDFDocumentDidFindMatchNotification notification is posted. |
|
public |
documentDidUnlock(notification: Notification): void Called when the PDFDocumentDidUnlockNotification notification is posted. |
|
public |
doesContain(object: Object): boolean Currently, doesContain(_:) messages are never sent to any object from within Cocoa itself. |
|
public |
doesNotRecognizeSelector(aSelector: function): void The runtime system invokes this method whenever an object receives an aSelector message it can’t respond to or forward. |
|
public |
endPreviewPanelControl(panel: QLPreviewPanel): void |
|
public |
exceptionHandlerShouldHandleMask(sender: NSExceptionHandler, exception: NSException, aMask: number): boolean Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should handle a given exception. |
|
public |
exceptionHandlerShouldLogExceptionMask(sender: NSExceptionHandler, exception: NSException, aMask: number): boolean Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should log a given exception. |
|
public |
fileManagerShouldProceedAfterError(fm: FileManager, errorInfo: Map<AnyHashable, Object>): boolean this method was deprecated.
An NSFileManager object, manager, sends this message for each error it encounters when copying, moving, removing, or linking files or directories. |
|
public |
fileManagerWillProcessPath(fm: FileManager, path: string): void this method was deprecated.
You can implement this method in your handler to monitor file operations. |
|
public |
fileTransferServicesAbortCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesConnectionCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesCopyRemoteFileCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesCopyRemoteFileProgressTransferProgress(inServices: OBEXFileTransferServices, inProgressDescription: Map<AnyHashable, Object>): void |
|
public |
fileTransferServicesCreateFolderCompleteErrorFolder(inServices: OBEXFileTransferServices, inError: OBEXError, inFolderName: string): void |
|
public |
fileTransferServicesDisconnectionCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesFilePreparationCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesPathChangeCompleteErrorFinalPath(inServices: OBEXFileTransferServices, inError: OBEXError, inPath: string): void |
|
public |
fileTransferServicesRemoveItemCompleteErrorRemovedItem(inServices: OBEXFileTransferServices, inError: OBEXError, inItemName: string): void |
|
public |
fileTransferServicesRetrieveFolderListingCompleteErrorListing(inServices: OBEXFileTransferServices, inError: OBEXError, inListing: Object[]): void |
|
public |
fileTransferServicesSendFileCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesSendFileProgressTransferProgress(inServices: OBEXFileTransferServices, inProgressDescription: Map<AnyHashable, Object>): void |
|
public |
finalize(): void this method was deprecated.
The garbage collector invokes this method on the receiver before disposing of the memory it uses. |
|
public |
finalizeForWebScript(): void This method is invoked on objects exposed to the scripting environment just before the scripting environment is reset. |
|
public |
fontManagerWillIncludeFont(sender: Object, fontName: string): boolean this method was deprecated.
In macOS versions 10.2 and earlier, this method is invoked repeatedly as necessary whenever the Font panel needs updating, such as when the Font panel is first loaded, and when the user selects a family name to see which typefaces in that family are available. |
|
public |
forwardingTargetFor(aSelector: function): Object If an object implements (or inherits) this method, and returns a non-nil (and non-self) result, that returned object is used as the new receiver object and the message dispatch resumes to that new object. |
|
public |
handleClient(event: NSEvent, sender: Object): boolean Handles key down and mouse events. |
|
public |
imageBrowserBackgroundWasRightClickedWith(aBrowser: IKImageBrowserView, event: NSEvent): void This method signals that the user either right-clicked the background or left-clicked it with the Alt key pressed. |
|
public |
imageBrowserCellWasDoubleClickedAt(aBrowser: IKImageBrowserView, index: number): void This method signals that the user double-clicked an item in the image browser view. |
|
public |
imageBrowserCellWasRightClickedAtWith(aBrowser: IKImageBrowserView, index: number, event: NSEvent): void This method signals that the user either right-clicked an item in the browser or left-clicked the item with the Alt key pressed. |
|
public |
imageBrowserGroupAt(aBrowser: IKImageBrowserView, index: number): Map<AnyHashable, Object> This method is optional. |
|
public |
imageBrowserItemAt(aBrowser: IKImageBrowserView, index: number): Object Your data source must implement this method. |
|
public |
imageBrowserMoveItemsAtTo(aBrowser: IKImageBrowserView, indexes: Set, destinationIndex: number): boolean This method is optional. |
|
public |
imageBrowserRemoveItemsAt(aBrowser: IKImageBrowserView, indexes: Set): void This method is optional. |
|
public |
imageBrowserSelectionDidChange(aBrowser: IKImageBrowserView): void This method signals that the user changes the selection in the image browser view. |
|
public |
imageBrowserWriteItemsAtTo(aBrowser: IKImageBrowserView, itemIndexes: Set, pasteboard: NSPasteboard): number This method is optional. |
|
public |
Your data source must implement this method. |
|
public |
Your data source must implement this method. |
|
public |
This method is optional. |
|
public |
imageTitle(): string This method is optional. |
|
public |
Your data source must implement this method. |
|
public |
This method is optional. |
|
public |
indexOfAccessibilityElement(element: Object): number Returns the index of the specified accessibility element. |
|
public |
indicesOfObjectsByEvaluatingObjectSpecifier(specifier: NSScriptObjectSpecifier): number[] Containers that want to evaluate some specifiers on their own should implement this method. |
|
public |
infoForBinding(binding: string): Map<string, Object> This method is mostly for use by subclasses which want to analyze the existing bindings of an object. |
|
public |
inputTextClient(string: string, sender: Object): boolean An input method should implement this method when using key binding (that is, it implements didCommand(by:client:)). |
|
public |
inputTextKeyModifiersClient(string: string, keyCode: number, flags: number, sender: Object): boolean Receives Unicode, the key code that generated it, and any modifier flags. |
|
public |
insertValueAtInPropertyWithKey(value: Object, index: number, key: string): void The method insertIn<Key>:atIndex: is invoked if it exists. |
|
public |
insertValueInPropertyWithKey(value: Object, key: string): void The method insertIn<Key>: is used if it exists. |
|
public |
inverseForRelationshipKey(relationshipKey: string): string NSObject’s implementation of inverseForRelationshipKey: simply invokes [[self classDescription] inverseForRelationshipKey:relationshipKey]. |
|
public |
invokeDefaultMethodWithArguments(_arguments: Object[]): Object Executes when a script attempts to invoke a method on an exposed object directly. |
|
public |
invokeUndefinedMethodFromWebScriptWithArguments(name: string, _arguments: Object[]): Object This method is invoked when a script attempts to invoke a method not directly exported to the scripting environment. |
|
public |
isCaseInsensitiveLike(object: string): boolean Currently, isCaseInsensitiveLike(_:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject returns false. |
|
public |
During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSEqualToComparison, an isEqual(to:) message may be sent to each potentially specified object, if neither the potentially specified object nor the object being tested against implements a scriptingIsEqual(to:) method.The default implementation for this method provided by NSObject returns true if an isEqualTo: message sent to the same object would return true. |
|
public |
isGreaterThan(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSGreaterThanComparison, an isGreaterThan(:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsGreaterThan(:) method and the object being tested against does not implement a scriptingIsLessThanOrEqual(to:) method.The default implementation for this method provided by NSObject returns true if a compare: message sent to the same object would return NSOrderedDescending. |
|
public |
isGreaterThanOrEqualTo(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSGreaterThanOrEqualToComparison, anisGreaterThanOrEqual(to:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsGreaterThanOrEqual(to:) method and the object being tested against does not implement a scriptingIsLessThan(_:) method.The default implementation for this method provided by NSObject returns true if a compare: message sent to the same object would return NSOrderedSame or NSOrderedDescending. |
|
public |
isInstanceOf(aClass: Object): boolean |
|
public |
isLessThan(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanComparison, an isLessThan(:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThan(:) method and the object being tested against does not implement a scriptingIsGreaterThanOrEqual(to:) method.The default implementation for this method provided by NSObject method returns true if a compare: message sent to the same object would return NSOrderedAscending. |
|
public |
isLessThanOrEqualTo(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanOrEqualToComparison, an isLessThanOrEqual(to:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThanOrEqual(to:) method and the object being tested against does not implement a scriptingIsGreaterThan(_:) method.The default implementation for this method provided by NSObject method returns true if a compare: message sent to the same object would return NSOrderedAscending or NSOrderedSame. |
|
public |
Currently, isLike(_:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject method returns false. |
|
public |
isNotEqualTo(object: Object): boolean Currently, isNotEqual(to:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject method returns true if an isEqual: message sent to the same object would return false. |
|
public |
layerShouldInheritContentsScaleFrom(layer: CALayer, newScale: number, window: NSWindow): boolean When a resolution change occurs for a given window, the system traverses the layer trees in that window to decide what action, if any, to take for each layer. |
|
public |
If the receiver is an instance, aSelector should refer to an instance method; if the receiver is a class, it should refer to a class method. |
|
public |
mutableArrayValueForKey(key: string): Array Objects added to the mutable array become related to the receiver, and objects removed from the mutable array become unrelated. |
|
public |
mutableArrayValueForKeyPath(keyPath: string): Array See mutableArrayValue(forKey:) for additional details. |
|
public |
This is a convenience method for classes that adopt the NSMutableCopying protocol. |
|
public |
Objects added to the mutable set proxy become related to the receiver, and objects removed from the mutable set become unrelated. |
|
public |
mutableOrderedSetValueForKeyPath(keyPath: string): Set See mutableOrderedSetValue(forKey:) for additional details. |
|
public |
mutableSetValueForKey(key: string): Set Objects added to the mutable set proxy become related to the receiver, and objects removed from the mutable set become unrelated. |
|
public |
mutableSetValueForKeyPath(keyPath: string): Set See mutableSetValue(forKey:) for additional details. |
|
public |
namesOfPromisedFilesDroppedAtDestination(dropDestination: string): string[] this method was deprecated.
This method is invoked when the drop has been accepted by the destination and the destination, in the case of another Cocoa application, invokes the NSDraggingInfo method namesOfPromisedFilesDropped(atDestination:). |
|
public |
newScriptingObjectOfForValueForKeyWithContentsValue(objectClass: Object, key: string, contentsValue: Object, properties: Map<string, Object>): Object You can override the newScriptingObjectOfClass method to take more control when your application is sent a make command. |
|
public |
numberOfGroupsInImageBrowser(aBrowser: IKImageBrowserView): number This method is optional. |
|
public |
numberOfItemsInImageBrowser(aBrowser: IKImageBrowserView): number Your data source must implement this method. |
|
public |
objectDidBeginEditing(editor: Object): void This message should be sent to the receiver when editor has uncommitted changes that can affect the receiver. |
|
public |
objectDidEndEditing(editor: Object): void This message should be sent to the receiver when editor has finished editing a property belonging to the receiver. |
|
public |
observeValueForKeyPathOf(keyPath: string, object: Object, change: Map<NSKeyValueChangeKey, Object>, context: Object): void For an object to begin sending change notification messages for the value at keyPath, you send it an addObserver(_:forKeyPath:options:context:) message, naming the observing object that should receive the messages. |
|
public |
optionDescriptionsForBinding(binding: string): NSAttributeDescription[] The NSAttributeDescription instances in the array are used by Interface Builder to build the options editor user interface of the bindings inspector.The option name displayed for the option in the bindings inspector is based on the value of the NSAttributeDescription method name. |
|
public |
originalString(sender: Object): string Return the a string that consists of the precomposed unicode characters. |
|
public |
pasteboardChangedOwner(sender: NSPasteboard): void Pasteboard owners only need to implement this method if they need to know when they have lost ownership.The owner is not able to read the contents of the pasteboard when responding to this method. |
|
public |
pasteboardProvideDataForType(sender: NSPasteboard, type: string): void The receiver should have been previously declared in a declareTypes(:owner:) message.The requested data should be written to sender using the setData(:forType:), setPropertyList(:forType:), or setString(:forType:) method. |
|
public |
performActionFor(person: ABPerson, identifier: string): void If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
performOnWithWaitUntilDone(aSelector: function, thr: Thread, arg: Object, wait: boolean): void You can use this method to deliver messages to other threads in your application. |
|
public |
performOnWithWaitUntilDoneModes(aSelector: function, thr: Thread, arg: Object, wait: boolean, array: string[]): void You can use this method to deliver messages to other threads in your application. |
|
public |
performSelectorInBackgroundWith(aSelector: function, arg: Object): void This method creates a new thread in your application, putting your application into multithreaded mode if it was not already. |
|
public |
performSelectorOnMainThreadWithWaitUntilDone(aSelector: function, arg: Object, wait: boolean): void You can use this method to deliver messages to the main thread of your application. |
|
public |
performSelectorOnMainThreadWithWaitUntilDoneModes(aSelector: function, arg: Object, wait: boolean, array: string[]): void You can use this method to deliver messages to the main thread of your application. |
|
public |
performWithAfterDelay(aSelector: function, anArgument: Object, delay: number): void This method sets up a timer to perform the aSelector message on the current thread’s run loop. |
|
public |
performWithAfterDelayInModes(aSelector: function, anArgument: Object, delay: number, modes: RunLoopMode[]): void This method sets up a timer to perform the aSelector message on the current thread’s run loop. |
|
public |
prepareForInterfaceBuilder(): void When Interface Builder instantiates a class with the IB_DESIGNABLE attribute, it calls this method to let the resulting object know that it was created at design time. |
|
public |
provideImageDataBytesPerRowOriginSizeUserInfo(data: Object, rowbytes: number, x: number, y: number, width: number, height: number, info: Object): void You can supply the image provider to these methods of the CIImage class: imageWithImageProvider:size::format:colorSpace:options: to create a CIImage object from image datainit(imageProvider:size:_:format:colorSpace:options:) to initialize an existing CIImage with dataYou initialize the given bitmap with the subregion specified by the arguments x, y, width, and height. |
|
public |
quartzFilterManagerDidAdd(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidModifyFilter(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidRemove(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidSelect(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
readLinkQualityForDeviceComplete(controller: Object, device: IOBluetoothDevice, info: UnsafeMutablePointer<BluetoothHCILinkQualityInfo>, error: IOReturn): void This delegate gets invoked when an read link quality command complete event occurs. |
|
public |
readRSSIForDeviceComplete(controller: Object, device: IOBluetoothDevice, info: UnsafeMutablePointer<BluetoothHCIRSSIInfo>, error: IOReturn): void This delegate gets invoked when an RSSI command complete event occurs. |
|
public |
removeObserverForKeyPath(observer: NSObject, keyPath: string): void It is an error to call removeObserver(:forKeyPath:) for an object that has not previously been registered as an observer.Be sure to invoke this method (or removeObserver(:forKeyPath:context:)) before any object specified in addObserver(_:forKeyPath:options:context:) is deallocated. |
|
public |
removeValueAtFromPropertyWithKey(index: number, key: string): void The method removeFrom<Key>AtIndex: is invoked if it exists. |
|
public |
replaceValueAtInPropertyWithKeyWithValue(index: number, key: string, value: Object): void The method replaceIn<Key>:atIndex: is invoked if it exists. |
|
public |
replacementObjectFor(aCoder: NSCoder): Object An object might encode itself into an archive, but encode a proxy for itself if it’s being encoded for distribution. |
|
public |
saveOptionsShouldShowUTType(saveOptions: IKSaveOptions, utType: string): boolean Called to determine if the specified uniform type identifier should be shown in the save panel. |
|
public |
scriptingBeginsWith(object: Object): boolean Returns true if, in a scripting comparison, the compared object matches the beginning of object. |
|
public |
scriptingContains(object: Object): boolean Returns true if, in a scripting comparison, the compared object contains object. |
|
public |
scriptingEndsWith(object: Object): boolean Returns true if, in a scripting comparison, the compared object matches the end of object. |
|
public |
scriptingIsEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is equal to object. |
|
public |
scriptingIsGreaterThan(object: Object): boolean Returns true if, in a scripting comparison, the compared object is greater than object. |
|
public |
scriptingIsGreaterThanOrEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is greater than or equal to object. |
|
public |
scriptingIsLessThan(object: Object): boolean Returns true if, in a scripting comparison, the compared object is less than object. |
|
public |
scriptingIsLessThanOrEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is less than or equal to object. |
|
public |
scriptingValueFor(objectSpecifier: NSScriptObjectSpecifier): Object You can override this method to customize the evaluation of object specifiers without requiring that the scripting container make up indexes for contained objects that don't naturally have indexes (as can be the case if you implement indicesOfObjects(byEvaluatingObjectSpecifier:) instead).Your override of this method doesn't need to also invoke any of the NSScriptCommand error signaling methods, though it can, to record very specific information. |
|
public |
setNilValueForKey(key: string): void Subclasses can override this method to handle the request in some other way, such as by substituting 0 or a sentinel value for nil and invoking setValue(_:forKey:) again or setting the variable directly. |
|
public |
setValueForKey(value: Object, key: string): void If key identifies a to-one relationship, relate the object specified by value to the receiver, unrelating the previously related object if there was one. |
|
public |
setValueForKeyPath(value: Object, keyPath: string): void The default implementation of this method gets the destination object for each relationship using value(forKey:), and sends the final object a setValue(_:forKey:) message.Special ConsiderationsWhen using this method, and the destination object does not implement an accessor for the value, the default behavior is for that object to retain value rather than copy or assign value. |
|
public |
setValueForUndefinedKey(value: Object, key: string): void Subclasses can override this method to handle the request in some other way. |
|
public |
setValuesForKeys(keyedValues: Map<string, Object>): void The default implementation invokes setValue(_:forKey:) for each key-value pair, substituting nil for NSNull values in keyedValues. |
|
public |
shouldEnableActionFor(person: ABPerson, identifier: string): boolean If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
textStorageDidProcessEditing(notification: Notification): void this method was deprecated.
|
|
public |
textStorageWillProcessEditing(notification: Notification): void this method was deprecated.
|
|
public |
If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
Removes a given binding between the receiver and a controller. |
|
public |
validModesForFontPanel(fontPanel: NSFontPanel): number The mode masks are defined in Mode Masks. |
|
public |
validateMenuItem(menuItem: NSMenuItem): boolean The object implementing this method must be the target of menuItem. |
|
public |
validateToolbarItem(item: NSToolbarItem): boolean NSToolbar only calls this method for image items.Note validateToolbarItem(_:) is called very frequently, so it must be efficient.If the receiver is the target for the actions of multiple toolbar items, it’s necessary to determine which toolbar item theItem refers to by testing the itemIdentifier.-(BOOL)validateToolbarItem:(NSToolbarItem )toolbarItem { BOOL enable = NO; if ([[toolbarItem itemIdentifier] isEqual:SaveDocToolbarItemIdentifier]) { // We will return YES (enable the save item) // only when the document is dirty and needs saving enable = [self isDocumentEdited]; } else if ([[toolbarItem itemIdentifier] isEqual:NSToolbarPrintItemIdentifier]) { // always enable print for this window enable = YES; } return enable; } -(BOOL)validateToolbarItem:(NSToolbarItem )toolbarItem { BOOL enable = NO; if ([[toolbarItem itemIdentifier] isEqual:SaveDocToolbarItemIdentifier]) { // We will return YES (enable the save item) // only when the document is dirty and needs saving enable = [self isDocumentEdited]; } else if ([[toolbarItem itemIdentifier] isEqual:NSToolbarPrintItemIdentifier]) { // always enable print for this window enable = YES; } return enable; } |
|
public |
validateValueForKey(ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, inKey: string): void The default implementation of this method searches the class of the receiver for a validation method whose name matches the pattern validate<Key>:error:. |
|
public |
validateValueForKeyPath(ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, inKeyPath: string): void The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a validateValue(_:forKey:) message to the final object.Handling Errors in Swift: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. |
|
public |
valueAtInPropertyWithKey(index: number, key: string): Object This actually works with a single-value key as well if index is 0. |
|
public |
valueClassForBinding(binding: string): Object This method is used by Interface Builder to determine the appropriate transformers for a binding. |
|
public |
valueForKey(key: string): Object The search pattern that valueForKey: uses to find the correct value to return is described in Accessor Search Patterns in Key-Value Coding Programming Guide. |
|
public |
valueForKeyPath(keyPath: string): Object The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a value(forKey:) message to the final object. |
|
public |
valueForUndefinedKey(key: string): Object Subclasses can override this method to return an alternate value for undefined keys. |
|
public |
valueWithNameInPropertyWithKey(name: string, key: string): Object The method valueIn<Key>WithName: is used if it exists. |
|
public |
valueWithUniqueIDInPropertyWithKey(uniqueID: Object, key: string): Object The method valueIn<Key>WithUniqueID: is invoked if it exists. |
|
public |
viewStringForToolTipUserData(view: NSView, tag: NSToolTipTag, point: CGPoint, data: Object): string userData is additional information provided by the creator of the tool tip rectangle. |
|
public |
webPlugInContainerLoadInFrame(request: URLRequest, target: string): void If the frame specified by target is not found, a new window is opened, loaded with the URL request, and given the specified frame name. |
|
public |
webPlugInContainerShowStatus(message: string): void Tells the container to show a status message. |
|
public |
webPlugInDestroy(): void Typically, this method frees the memory and other resources used by the plug-in. |
|
public |
webPlugInInitialize(): void Tells the plug-in to perform one-time initialization. |
|
public |
webPlugInMainResourceDidFailWithError(error: Error): void This message is invoked when the underlying NSURLConnection object for the main resource sends the connection:didFailWithError: message to its delegate. |
|
public |
This message is invoked when the WebPlugInShouldLoadMainResourceKey plug-in command-line argument is set to false and the underlying NSURLConnection object for the main resource sends the connectionDidFinishLoading: message to its delegate. |
|
public |
webPlugInMainResourceDidReceive(response: URLResponse): void This message is invoked when the WebPlugInShouldLoadMainResourceKey plug-in command-line argument is set to false and the underlying NSURLConnection object for the main resource sends the connection:didReceiveResponse: message to its delegate. |
|
public |
webPlugInSetIsSelected(isSelected: boolean): void This may be used, for example, to change the plug-in’s appearance when it is selected by the user. |
|
public |
webPlugInStart(): void The plug-in usually begins its primary task (such as drawing, playing sounds, or animating) in this method. |
|
public |
webPlugInStop(): void This method may be called more than once, provided that the application has already called webPlugInInitialize() and that each call to this method is preceded by a call to webPlugInStart(). |
|
public |
willChangeValueForKey(key: string): void Use this method when implementing key-value observer compliance manually to inform the observed object that the value at key is about to change.The change type of this method is NSKeyValueChangeSetting.ImportantAfter the values have been changed, a corresponding didChangeValue(forKey:) must be invoked with the same parameter. |
|
public |
willChangeValueForKeyWithSetMutationUsing(key: string, mutationKind: NSKeyValueSetMutationKind, objects: Set<AnyHashable>): void Use this method when implementing key-value observer compliance manually.ImportantAfter the values have been changed, a corresponding didChangeValue(forKey:withSetMutation:using:) must be invoked with the same parameters.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
willChangeValuesAtForKey(changeKind: NSKeyValueChange, indexes: Set, key: string): void Use this method when implementing key-value-observing compliance manually.ImportantAfter the values have been changed, a corresponding didChange(_:valuesAt:forKey:) must be invoked with the same parameters.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
workflowControllerDidError(controller: AMWorkflowController, error: Error): void Invoked when the receiver's workflow encounters an error. |
|
public |
workflowControllerDidRun(controller: AMWorkflowController, action: AMAction): void Invoked when an action in the receiver's workflow is finished running. |
|
public |
workflowControllerDidStop(controller: AMWorkflowController): void Tells the delegate that the workflow controller object has stopped. |
|
public |
workflowControllerWillRun(controller: AMWorkflowController, action: AMAction): void Invoked when an action in the receiver's workflow is about to run. |
|
public |
workflowControllerWillStop(controller: AMWorkflowController): void Tells the delegate that the workflow controller object is about to stop. |
Static Public Members
public static get ParticleProperty: Object source
Properties:
Name | Type | Attribute | Description |
angle | string | The rotation angle, in radians, of the particle about its axis. |
|
angularVelocity | string | The particle’s angular velocity (or rate of spin), in radians per second. |
|
bounce | string | The particle’s restitution coefficient. |
|
charge | string | The particle’s electric charge, in coulombs. |
|
color | string | The particle’s tint color, as a vector of red, green, blue, and alpha component values. |
|
contactNormal | string | The normal vector, in scene coordinate space, of a collision between a particle and a geometry in the scene. |
|
contactPoint | string | The location, in scene coordinate space, of a collision between a particle and a geometry in the scene. |
|
frame | string | The current frame index of the particle’s image animation. |
|
frameRate | string | The rate, in frames per second, of the particle’s image animation. |
|
friction | string | The particle’s friction coefficient. |
|
life | string | The remaining time in the particle’s life span, in seconds. |
|
opacity | string | The particle’s opacity (or alpha value). |
|
position | string | The particle’s position vector in scene coordinate space. |
|
rotationAxis | string | The particle’s axis of rotation, expressed as a vector in the particle’s local coordinate space. |
|
size | string | The width and height of the rendered particle image, in units of scene coordinate space. |
|
velocity | string | The particle’s velocity vector in units (of scene coordinate space) per second. |
Static Public Methods
Public Constructors
public constructor(name: string, directory: string) source
constructor
Override:
NSObject#constructorPublic Members
public acceleration: SCNVector3 source
The constant acceleration vector, in units per second per second, applied to all particles in the system. Animatable.
public get animationKeys: string[] source
This array contains all keys for which animations are attached to the object, or is empty if there are no attached animations. The ordering of animation keys in the array is arbitrary.
public birthDirection: SCNParticleBirthDirection source
The possible initial directions for newly spawned particles, relative to the emitter shape.
public birthLocation: SCNParticleBirthLocation source
The possible locations for newly spawned particles, relative to the emitter shape.
public set birthRate: * source
public get birthRate: number source
The number of particles spawned during each emission period. Animatable.
public birthRateVariation: number source
The range of randomized particle birth rate values. Animatable.
public blendMode: SCNParticleBlendMode source
The blending mode for compositing particle images into the rendered scene.
public colliderNodes: SCNNode[] source
The nodes whose geometry the system’s particles can collide with.
public dampingFactor: number source
A factor that slows particles relative to their velocity. Animatable.
public emissionDuration: number source
The duration, in seconds, over which the system spawns new particles. Animatable.
public emissionDurationVariation: number source
The range, in seconds, of randomized emission duration values. Animatable.
public emitterShape: SCNGeometry source
The shape of the region of space where the system spawns new particles.
public emittingDirection: SCNVector3 source
The initial direction for newly spawned particles. Animatable.
public fresnelExponent: number source
The reflectivity exponent SceneKit uses when rendering the particle’s image as a cube map. Animatable.
public idleDuration: number source
The duration, in seconds, of periods when the system emits no particles. Animatable.
public idleDurationVariation: number source
The range, in seconds, of randomized idle duration values. Animatable.
public imageSequenceAnimationMode: SCNParticleImageSequenceAnimationMode source
The animation mode for particle image animation.
public imageSequenceColumnCount: number source
The number of columns for treating the particle image as a grid of animation frames.
public imageSequenceFrameRate: number source
The rate, in frames per second, of particle image animation. Animatable.
public imageSequenceFrameRateVariation: number source
The range, in frames per second, of randomized frame rates for particle image animation. Animatable.
public imageSequenceInitialFrame: number source
The index of the first frame in a particle image animation. Animatable.
public imageSequenceInitialFrameVariation: number source
The range of randomized initial frames for particle image animation. Animatable.
public imageSequenceRowCount: number source
The number of rows for treating the particle image as a grid of animation frames.
public isAffectedByGravity: boolean source
A Boolean value that determines whether gravity, as defined by the scene’s physics simulation, affects the motion of particles.
public isAffectedByPhysicsFields: boolean source
A Boolean value that determines whether physics fields in the scene affect the motion of particles.
public isBlackPassEnabled: boolean source
A Boolean value that determines whether SceneKit renders particles in black before rendering the particle image.
public isLightingEnabled: boolean source
A Boolean value that determines whether SceneKit applies lighting to particle images when rendering.
public isLocal: boolean source
A Boolean value that specifies whether the particle simulation runs in the local coordinate space of the node containing it.
public loops: boolean source
A Boolean value that determines whether the system repeats its emission and idle periods.
public orientationMode: SCNParticleOrientationMode source
The mode defining whether and how particles may rotate.
public particleAngle: number source
The rotation angle, in degrees, of newly spawned particles. Animatable.
public particleAngleVariation: number source
The range, in degrees of randomized initial particle angles. Animatable.
public particleAngularVelocity: number source
The initial spin rate, in degrees per second, of newly spawned particles. Animatable.
public particleAngularVelocityVariation: number source
The range, in degrees per second, of randomized initial angular velocities for particles. Animatable.
public particleBounce: number source
The restitution coefficient of each particle in the system. Animatable.
public particleBounceVariation: number source
The range of randomized restitution coefficients for particles. Animatable.
public particleCharge: number source
The electric charge, in coulombs, of each particle in the system. Animatable.
public particleChargeVariation: number source
The range, in coulombs, of randomized particle charges. Animatable.
public particleColorVariation: SCNVector4 source
The ranges of randomized particle color components. Animatable.
public particleDiesOnCollision: boolean source
A Boolean value that determines whether particles are removed from the scene upon colliding with another object.
public particleFriction: number source
The friction coefficient of each particle in the system. Animatable.
public particleFrictionVariation: number source
The range of randomized friction coefficients for particles. Animatable.
public particleLifeSpan: number source
The duration, in seconds, for which each particle is rendered before being removed from the scene. Animatable.
public particleLifeSpanVariation: number source
The range, in seconds, of randomized particle life spans. Animatable.
public particleMass: number source
The mass, in kilograms, of each particle in the system. Animatable.
public particleMassVariation: number source
The range, in kilograms, of randomized particle masses. Animatable.
public particleSize: number source
The rendered size, in units of the scene’s world coordinate space, of the particle image. Animatable.
public particleVelocity: number source
The initial speed, in units per second, for newly spawned particles. Animatable.
public particleVelocityVariation: number source
The range, in units per second, of randomized initial particle speeds. Animatable.
public propertyControllers: Map<ParticleProperty, SCNParticlePropertyController> source
A dictionary that optionally associates particle properties with objects that animate a property’s value for each particle.
public sortingMode: SCNParticleSortingMode source
The mode defining the order in which SceneKit renders the system’s particles.
public speedFactor: number source
A multiplier for the speed at which SceneKit runs the particle simulation. Animatable.
public spreadingAngle: number source
The range, in degrees, of randomized initial particle directions. Animatable.
public stretchFactor: number source
A multiplier for stretching particle images along their direction of motion. Animatable.
public systemSpawnedOnCollision: SCNParticleSystem source
Another particle system to be added to the scene when a particle collides with scene geometry.
public systemSpawnedOnDying: SCNParticleSystem source
Another particle system to be added to the scene when a particle dies.
public systemSpawnedOnLiving: SCNParticleSystem source
Another particle system to be added to the scene for each living particle in the system.
Public Methods
public addAnimationForKey(animation: CAAnimation, key: string): void source
Newly added animations begin executing after the current run loop cycle ends.SceneKit does not define any requirements for the contents of the key parameter—it need only be unique among the keys for other animations you add. If you add an animation with an existing key, this method overwrites the existing animation.
Params:
Name | Type | Attribute | Description |
animation | CAAnimation | The animation object to be added. |
|
key | string |
|
An string identifying the animation for later retrieval. You may pass nil if you don’t need to reference the animation later. |
Return:
void |
public addModifierForPropertiesAtModifier(properties: SCNParticleSystem.ParticleProperty[], stage: SCNParticleModifierStage, block: SCNParticleModifierBlock): void source
By associating a block with one or more particle properties, you can run arbitrary code that modifies those properties during each frame of animation. This option provides maximum flexibility for changing the appearance or behavior of particles over time. ImportantRunning your own code to update particle properties every frame can have a severe impact on rendering performance. If the behavior over time that you want for your particle system can be described more declaratively, use the propertyControllers property and SCNParticlePropertyController class instead. If you need to change particle properties only at certain times (rather than continuously), add a handler block for an event using the handle(_:forProperties:handler:) method.
Params:
Name | Type | Attribute | Description |
properties | SCNParticleSystem.ParticleProperty[] | An array containing one or more of the constants listed in Particle Property Keys, each of which specifies a property of the appearance or behaviors of particles in the particle system. |
|
stage | SCNParticleModifierStage | The stage of SceneKit’s particle simulation during which to call the block. See SCNParticleModifierStage for allowed values. |
|
block | SCNParticleModifierBlock | A SCNParticleModifierBlock block to be called every time SceneKit renders a frame. In this block you can modify the properties of all particles in the system. |
Return:
void |
public animationForKey(key: string): CAAnimation source
Attempting to modify any properties of the returned object results in undefined behavior.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying a previously added animation. |
public handleForPropertiesHandler(event: SCNParticleEvent, properties: SCNParticleSystem.ParticleProperty[], block: SCNParticleEventBlock): void source
By associating a block with one or more particle properties, you can run arbitrary code that modifies those properties when a significant event in the particle simulation occurs for one or more particles. For example, you can use the following code with a confetti effect to randomly switch between two distinct colors for each spawned particle:[system handleEvent:SCNParticleEventBirth forProperties:@[SCNParticlePropertyColor] withBlock:^(void data, size_t dataStride, uint32_t indices , NSInteger count) { for (NSInteger i = 0; i < count; ++i) { float color = (float )((char )data[0] + dataStride[0] i); if (rand() & 0x1) { // Switch the green and red color components. color[0] = color[1]; color[1] = 0; } } }]; [system handleEvent:SCNParticleEventBirth forProperties:@[SCNParticlePropertyColor] withBlock:^(void data, size_t dataStride, uint32_t indices , NSInteger count) { for (NSInteger i = 0; i < count; ++i) { float color = (float )((char )data[0] + dataStride[0] i); if (rand() & 0x1) { // Switch the green and red color components. color[0] = color[1]; color[1] = 0; } } }];
Params:
Name | Type | Attribute | Description |
event | SCNParticleEvent | The event at which to call the block. See SCNParticleEvent for allowed values. |
|
properties | SCNParticleSystem.ParticleProperty[] | An array containing one or more of the constants listed in Particle Property Keys, each of which specifies a property of the appearance or behaviors of particles in the particle system. |
|
block | SCNParticleEventBlock | A SCNParticleEventBlock block to be called every time SceneKit renders a frame. In this block you can modify the properties of particles in the system. |
Return:
void |
public isAnimationPausedForKey(key: string): boolean source
Required. Returns a Boolean value indicating whether the animation attached to the object with the specified key is paused.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
public pauseAnimationForKey(key: string): void source
This method has no effect if no animation is attached to the object with the specified key.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
Return:
void |
public removeAllAnimations(): void source
Required. Removes all the animations currently attached to the object.
Return:
void |
public removeAllModifiers(): void source
Removes all particle modifier blocks associated with the particle system.
Return:
void |
public removeAnimationForKey(key: string): void source
Required. Removes the animation attached to the object with the specified key.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation to remove. |
Return:
void |
public removeAnimationForKeyFadeOutDuration(key: string, duration: number): void source
Use this method to create smooth transitions between the effects of multiple animations. For example, the geometry loaded from a scene file for a game character may have associated animations for player actions such as walking and jumping. When the player lands from a jump, you remove the jump animation so the character continues walking. If you use the removeAnimation(forKey:) method to remove the jump animation, SceneKit abruptly switches from the current frame of the jump animation to the current frame of the walk animation. If you use the removeAnimation(forKey:fadeOutDuration:) method instead, SceneKit plays both animations at once during that duration and interpolates vertex positions from one animation to the other, creating a smooth transition.
Return:
void |
public removeModifiersAt(stage: SCNParticleModifierStage): void source
Removes particle modifier blocks for the specified stage of the particle simulation.
Params:
Name | Type | Attribute | Description |
stage | SCNParticleModifierStage | The stage of SceneKit’s particle simulation during which to call the block. See SCNParticleModifierStage for allowed values. |
Return:
void |
public reset(): void source
Calling this method removes all currently live particles from the scene.
Return:
void |
public resumeAnimationForKey(key: string): void source
This method has no effect if no animation is attached to the object with the specified key or if the specified animation is not currently paused.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
Return:
void |
public setValueForKeyPath(value: *, keyPath: *) source
The default implementation of this method gets the destination object for each relationship using value(forKey:), and sends the final object a setValue(_:forKey:) message.Special ConsiderationsWhen using this method, and the destination object does not implement an accessor for the value, the default behavior is for that object to retain value rather than copy or assign value.
Override:
NSObject#setValueForKeyPathParams:
Name | Type | Attribute | Description |
value | * | ||
keyPath | * |
public valueForKeyPath(keyPath: *, usePresentation: boolean): * source
The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a value(forKey:) message to the final object.
Override:
NSObject#valueForKeyPathParams:
Name | Type | Attribute | Description |
keyPath | * | ||
usePresentation | boolean |
|
Return:
* |