Contents

spawn(element:in:)

Spawns a new element in the particle simulation.

Declaration

mutating func spawn(element: ElementSpawnParameters, in system: ComputeNodeGraph.NodeID? = nil)

Parameters

  • element:

    The spawn parameters defining the properties of the element to create

  • system:

    The ID of the specific system to spawn the element in. When nil, all systems will be asked to spawn the same element.

Discussion

This method queues an element to be spawned during the next simulation update. The spawning is deferred and batched for performance reasons.