Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNActionMBS class.

SCNActionMBS.fadeIn(duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that changes the opacity of the node to 1.0.

duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s opacity property animates from its current value to 1.0.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.fadeOut(Duration)

Some examples using this method:

SCNActionMBS.fadeOpacityBy(factor as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that adjusts the opacity of a node by a relative value.

factor: The amount to change the node’s opacity by.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s opacity property animates to its new value.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.fadeOpacityBy(-factor, duration)

SCNActionMBS.fadeOpacityTo(opacity as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that adjusts the opacity of a node to a new value.

opacity: The new opacity value of the node.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s opacity property animates to its new value.
This action is not reversible; the reverse of this action has the same duration but does not change anything.

SCNActionMBS.fadeOut(duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that changes the opacity of the node to 0.0.

duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s opacity property animates from its current value to 0.0.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.fadeIn(duration)

Some examples using this method:

SCNActionMBS.group(actions() as SCNActionMBS) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that runs a collection of actions in parallel.

actions: An array of SCNActionMBS objects.

Returns a new group action object.

When the action executes, the actions that make up the group all start immediately and run in parallel. The duration of the group action is the longest duration among the collection of actions. If an action in the group has a duration less than the group’s duration, the action completes and then idles until the group completes the remaining actions. This matters most when creating a repeating action that repeats a group.
This action is reversible; it creates a new group action that contains the reverse of each action specified in the group.

SCNActionMBS.hide as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that hides a node.

When the action executes, the node’s hidden property is set to true.
This action is reversible; the reverse is equivalent to the unhide action.

SCNActionMBS.javaScriptActionWithScript(script as string, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that executes a JavaScript script periodically over a specified duration.

script: A string containing JavaScript source code.
seconds: The duration of the action, in seconds.

SceneKit exposes its classes, methods, and functions in the JavaScript context that runs the script—see the SCNJavaScript.h header file for details.

When the action executes, SceneKit runs the script repeatedly until the action’s duration expires. Each time SceneKit runs the script, it computes the elapsed time since the action began executing (as a fraction of the action’s duration between 0.0 and 1.0) and makes it available to the script as a variable named elapsedTime. The script can also reference the SCNNode object running the action as a variable named node.
This action is not reversible; the reverse action executes the same script.

SCNActionMBS.moveBy(delta as SCNVector3MBS, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that moves a node relative to its current position.

delta: A vector that describes the change to be applied to the node’s position.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s position property animates from its current position to its new position.
This action is reversible; the reverse is created as if the following code had been executed:

dim reverseDelta as SCNVector3MBS = SCNVector3MBS.Vector(-delta.x, -delta.y, -delta.z)
SCNActionMBS.moveBy( reverseDelta, duration)

See also:

SCNActionMBS.moveBy(deltaX as double, deltaY as double, deltaZ as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that moves a node relative to its current position.

deltaX: The distance to move the node in the X direction of its parent node’s local coordinate space.
deltaY: The distance to move the node in the Y direction of its parent node’s local coordinate space.
deltaZ: The distance to move the node in the Z direction of its parent node’s local coordinate space.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s position property animates from its current position to its new position.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.moveBy( -deltaX, -deltaY, -deltaZ, duration)

See also:

SCNActionMBS.moveTo(location as SCNVector3MBS, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that moves a node to a new position.

location: The coordinates for the node’s new position in its parent node’s local coordinate space.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s position property animates from its current position to its new position.
This action is not reversible; the reverse of this action has the same duration but does not move the node.

SCNActionMBS.removeFromParentNode as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that removes the node from its parent.

When the action executes, the node is immediately removed from its parent.
This action is not reversible; the reverse of this action is the same action.

SCNActionMBS.repeatAction(action as SCNActionMBS, count as integer) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that repeats another action a specified number of times.

action: The action to be executed.
count: The number of times to execute the action.

Returns a new action object.

When the action executes, the associated action runs to completion and then repeats, until the count is reached.
This action is reversible; it creates a new action that is the reverse of the specified action and then repeats it the same number of times.

SCNActionMBS.repeatActionForever(action as SCNActionMBS) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that repeats another action forever.

action: The action to execute.

Returns a new action object.

When the action executes, the associated action runs to completion and then repeats.
This action is reversible; it creates a new action that is the reverse of the specified action and then repeats it forever.
Note
The action to be repeated must have a non-instantaneous duration.

Some examples using this method:

SCNActionMBS.rotateBy(xAngle as double, yAngle as double, zAngle as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that rotates the node in each of the three principal axes by angles relative to its current orientation.

xAngle: The amount to rotate the node counterclockwise around the x-axis of its local coordinate space, in radians.
yAngle: The amount to rotate the node counterclockwise around the y-axis of its local coordinate space, in radians.
zAngle: The amount to rotate the node counterclockwise around the z-axis of its local coordinate space, in radians.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s rotation property animates to the new angle.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.rotateBy( -xAngle, -yAngle, -zAngle, duration)

SCNActionMBS.rotateByAngle(angle as double, axis as SCNVector3MBS, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that rotates the node by an angle around a specified axis.

angle: The amount to rotate the node counterclockwise around the specified axis, in radians.
axis: A vector in the node’s local coordinate space whose direction specifies the axis of rotation.
duration: The duration, in seconds, of the animation.

Return a new action object.

When the action executes, the node’s rotation property animates to the new angle.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.rotateByAngle( -angle, axis, duration)

SCNActionMBS.rotateTo(xAngle as double, yAngle as double, zAngle as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that rotates the node to absolute angles in each of the three principal axes.

xAngle: The amount to rotate the node counterclockwise around the x-axis of its local coordinate space, in radians.
yAngle: The amount to rotate the node counterclockwise around the y-axis of its local coordinate space, in radians.
zAngle: The amount to rotate the node counterclockwise around the z-axis of its local coordinate space, in radians.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s rotation property animates to the new angle. Calling this method is equivalent to calling rotateTo() and passing false for the shortestUnitArc parameter.
This action is not reversible; the reverse of this action has the same duration but does not change anything.

See also:

SCNActionMBS.rotateTo(xAngle as double, yAngle as double, zAngle as double, duration as double, shortestUnitArc as boolean) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that rotates the node to absolute angles in each of the three principal axes.

xAngle: The amount to rotate the node counterclockwise around the x-axis of its local coordinate space, in radians.
yAngle: The amount to rotate the node counterclockwise around the y-axis of its local coordinate space, in radians.
zAngle: The amount to rotate the node counterclockwise around the z-axis of its local coordinate space, in radians.
duration: The duration, in seconds, of the animation.
shortestUnitArc: If false (the default), the animation interpolates each component of the node’s rotation between its current value and the new value. If true, the animation makes the most direct rotation possible from the node’s current orientation to the new orientation.

Returns a new action object.

When the action executes, the node’s rotation property animates to the new angle.
This action is not reversible; the reverse of this action has the same duration but does not change anything.

See also:

SCNActionMBS.rotateToAxisAngle(axisAngle as SCNVector4MBS, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that rotates the node to an absolute angle around a specified axis.

axisAngle: A four-component vector whose first three components are a vector in the node’s local coordinate space specifying an axis and whose fourth component is the amount to rotate the node counterclockwise around that axis, in radians.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s rotation property animates to the new angle.
This action is not reversible; the reverse of this action has the same duration but does not change anything.

SCNActionMBS.runBlock(del as SCNActionRunBlockMBS, tag as variant = nil) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that executes run the given method.

When the action executes, SceneKit calls the delegate method. This action takes place instantaneously.
This action is not reversible; the reverse action executes the same delegate method.

SCNActionMBS.scaleBy(scale as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that uniformly changes the scale factor of a node by a relative value.

scale: The amount of change to make to all three components of the node’s scale.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s scale property animates to the new value.
This action is reversible; the reverse is created as if the following code had been executed:

SCNActionMBS.scaleBy( -scale, duration)

SCNActionMBS.scaleTo(scale as double, duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that uniformly changes the scale factor of a node to an absolute value.

scale: The new value for all three components of the node’s scale.
duration: The duration, in seconds, of the animation.

Returns a new action object.

When the action executes, the node’s scale property animates to the new value.
This action is not reversible; the reverse of this action has the same duration but does not change anything.

SCNActionMBS.sequence(actions() as SCNActionMBS) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that runs a collection of actions sequentially.

actions: An array of SCNActionMBS objects.
Returns a new sequence action object.

When the action executes, the first action in the sequence starts and runs to completion. Subsequent actions in the sequence run in a similar fashion until all of the actions in the sequence have executed. The duration of the sequence action is the sum of the durations of the actions in the sequence.

This action is reversible; it creates a new sequence action that reverses the order of the actions. Each action in the reversed sequence is itself reversed.

SCNActionMBS.unhide as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that ensures a node is not hidden.

When the action executes, the node’s hidden property is set to false.
This action is reversible; the reverse is equivalent to the hide action.

SCNActionMBS.wait(duration as double) as SCNActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 19.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates an action that idles for a specified period of time.

When the action executes, the action waits for the specified amount of time and then ends. This is typically used as part of a sequence of actions to insert a delay between two other actions. You might also use it in conjunction with the runAction method to trigger code that needs to run at a later time.
This action is not reversible; the reverse of this action is the same action.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...