I create a macOS single window application and add a Sprite Particle System file with template Stars
. and the visual effect just like this:
And I want to add it to my viewController, as the guide of this answer, I got the result like this, and it was not which I desired:
override func viewDidLoad() { super.viewDidLoad() let scene = SCNScene() let particlesNode = SCNNode() let particleSystem = SCNParticleSystem(named: "Welcome", inDirectory: "") particlesNode.addParticleSystem(particleSystem!) scene.rootNode.addChildNode(particlesNode) skView.backgroundColor = .black skView.scene = scene }
So, I'm wondering what's wrong and what should I do?
Here is the demo repo: Link Here
The particle system itself is the standard "star" SceneKit particle system available in Xcode, with no changes.