Latest 1.0.0
Homepage https://github.com/Michael-Vorontsov/SCNActionSequence
License MIT
Platforms ios 8.0
Authors

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

SCNActionSequence is available through CocoaPods.
To install
it, simply add the following line to your Podfile:

pod 'SCNActionSequence'

Usage

SCNActionSequence allows to chain several SCNActions with different nodes together.

node1
.prepare(action: SCNAction.moveBy(x: 5.0, y: 5.0, z: 0.0, duration: 2.0) )
.then(
action: SCNAction.rotate(by: CGFloat.pi / 2.0, around: SCNVector3(x: 0, y: 0, z: 1), duration: 2.0),
target: node2)
.then(wait: 2.0)
.then(transactionDuration: 5.0) {
ship.position = SCNVector3Zero
capsule?.position = SCNVector3Zero
}
.then(action: SCNAction.rotate(by: CGFloat.pi / 2.0, around: SCNVector3(x: 0, y: 0, z: 1), duration: 2.0))
.runSimultaneouslyWith()
.then(action: SCNAction.moveBy(x: -5.0, y: -2.0, z: 0.0, duration: 2.0))
.then{print("Do whatever  you want - update model for example")}
.run()

Please mind that sequences running themselves recursively from the end. So if you save sequence, attach several others and run it – only first sequence will be executed.

Author

Michael-Vorontsov, [email protected]

License

SCNActionSequence is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SCNActionSequence",
    "version": "1.0.0",
    "summary": "Allow to create simple sequences for scene kit animation.",
    "description": "There is alway a problem to build chain of animations in SceneKit or ARKit.nNative mechanisms allows to chain several animation and run them on one node, but can't help to chain animations of different nodes.nSCNActionSequence to fit that gap.",
    "homepage": "https://github.com/Michael-Vorontsov/SCNActionSequence",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Michael-Vorontsov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Michael-Vorontsov/SCNActionSequence.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SCNActionSequence/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This