How to Create Particle.js Theme in Swift

Create a cool visual effect for your application using Swift with SpriteKit.

Artturi Jalli
The Startup

--

Create a compelling connected particles theme to your app using Swift with SpriteKit.

If you want to see the code, feel free to check my Github repository.

The Project Setup

The easiest way to set up the project is to create a new Game App.

Go to Xcode > File > New > Project > Game. Name your project whatever you want.

Open up the GameScene.swift file and delete everything until it looks like this:

import SpriteKit
import GameplayKit
class GameScene: SKScene {
override func didMove(to view: SKView) {
}

override func update(_ currentTime: TimeInterval) {
// Called before each frame is rendered
}
}

Then go to a file called GameScene.sks and remove the hello label. Now, if you run the app you should only see a blank screen which means you’re good to go.

Creating + Moving Particles

Base Class Extension

In this project, we’re going to deal with points in 2D space. These points are…

--

--

Artturi Jalli
The Startup

Check @jalliartturi on YouTube to become a successful blogger. (For collabs, reach me out at: artturi@bloggersgoto.com)