SCNActionable
Direct Implemented:
Indirect Implemented:
Methods for running actions on nodes.
Constructor Summary
Public Constructor | ||
public |
constructor |
Member Summary
Public Members | ||
public get |
actionKeys: string[] Use this property to list actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public get |
This value is true if the node has any executing actions; otherwise the value is false. |
Method Summary
Public Methods | ||
public |
actionForKey(key: string): SCNAction Use this method to retrieve actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public |
removeActionForKey(key: string): void If the node is currently running an action that matches the key, SceneKit removes that action from the node, skipping any remaining animation it would perform but keeping any changes already made to the node.Use this method to cancel actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public |
removeAllActions(): void When SceneKit removes an action from a node, it skips any remaining animation the action would perform. |
|
public |
SceneKit begins running a newly added action when it prepares to render the next frame. |
|
public |
runActionCompletionHandler(action: SCNAction, block: function(): void): void The new action is processed the next time SceneKit prepares to render a frame.SceneKit calls your block after the action’s duration is complete. |
|
public |
runActionForKey(action: SCNAction, key: string): void This method is identical to runAction(_:), but the action is stored and identified so that you can retrieve or cancel it later. |
|
public |
runActionForKeyCompletionHandler(action: SCNAction, key: string, block: function(): void): void This method is identical to runAction(_:completionHandler:), but the action is stored and identified so that you can retrieve or cancel it later. |
Public Constructors
Public Members
public get actionKeys: string[] source
Use this property to list actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
Public Methods
public actionForKey(key: string): SCNAction source
Use this method to retrieve actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
Params:
Name | Type | Attribute | Description |
key | string | A string that uniquely identifies a action. |
public removeActionForKey(key: string): void source
If the node is currently running an action that matches the key, SceneKit removes that action from the node, skipping any remaining animation it would perform but keeping any changes already made to the node.Use this method to cancel actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
Params:
Name | Type | Attribute | Description |
key | string | A string that uniquely identifies a action. |
Return:
void |
public removeAllActions(): void source
When SceneKit removes an action from a node, it skips any remaining animation the action would perform. However, any changes the action has already made to the node’s state remain in effect.
Return:
void |
public runAction(action: SCNAction): void source
SceneKit begins running a newly added action when it prepares to render the next frame.
Params:
Name | Type | Attribute | Description |
action | SCNAction | The action to be performed. |
Return:
void |
public runActionCompletionHandler(action: SCNAction, block: function(): void): void source
The new action is processed the next time SceneKit prepares to render a frame.SceneKit calls your block after the action’s duration is complete. For example, in a game you could use this method to show a Game Over message after performing a fade-out action on a node that displays a player character.
Return:
void |
public runActionForKey(action: SCNAction, key: string): void source
This method is identical to runAction(_:), but the action is stored and identified so that you can retrieve or cancel it later. If an action using the same key is already running, SceneKit removes it before adding the new action.
Return:
void |
public runActionForKeyCompletionHandler(action: SCNAction, key: string, block: function(): void): void source
This method is identical to runAction(_:completionHandler:), but the action is stored and identified so that you can retrieve or cancel it later. If an action using the same key is already running, SceneKit removes it before adding the new action.SceneKit calls your block after the action’s duration is complete. For example, you can use this method with a wait action to execute some code after a timed delay. If during the delay period you need to prevent the code from running, use the removeAction(forKey:) method to cancel it.
Return:
void |