https://github.com/maxvol/spritekitdsl
Swift DSL for SpriteKit
https://github.com/maxvol/spritekitdsl
dsl spritekit swift
Last synced: over 1 year ago
JSON representation
Swift DSL for SpriteKit
- Host: GitHub
- URL: https://github.com/maxvol/spritekitdsl
- Owner: maxvol
- Created: 2019-01-30T21:22:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-03T12:50:44.000Z (almost 4 years ago)
- Last Synced: 2025-01-10T08:09:01.438Z (over 1 year ago)
- Topics: dsl, spritekit, swift
- Language: Swift
- Size: 28.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpriteKitDSL
Swift DSL for SpriteKit
```swift
let node = SKNode.shapeNode(rectOf: size, cornerRadius: radius) {
$0.lineWidth = 2.5
$0.run(SKAction.repeatForever(SKAction.rotate(byAngle: CGFloat(Double.pi), duration: 1)))
$0.physicsBody(SKPhysicsBody(rectangleOf: size)) {
$0.mass = 5.0
$0.isDynamic = true
$0.affectedByGravity = true
$0.usesPreciseCollisionDetection = true
}
}
```
Carthage setup -
```
github "maxvol/SpriteKitDSL" ~> 0.1.0
```