One Logo Pool Ball
ComputeGraph · IOS API REFERENCE

ComputeNodeGraph.StateDefinition

struct · iOS 27.0+ · SDK 27.1

struct StateDefinition

A declaration of a named state value and where it lives in the simulation. State definitions are used by ``ComputeNodeGraph/Node/Kind/loadState(definition:)`` and ``ComputeNodeGraph/Node/Kind/storeState(definition:)`` nodes to read and write values at a particular scope.

Members (7)

get · iOS 27.0+

type

TypeScript
get type(): ComputeNodeGraph_StateType
Swift declaration
var type: ComputeNodeGraph.StateType

The data type of the stored value.

set · iOS 27.0+

type

TypeScript
set type(value: ComputeNodeGraph_StateType)
Swift declaration
var type: ComputeNodeGraph.StateType

The data type of the stored value.

init · iOS 27.0+

init

TypeScript
static init(scope: ComputeNodeGraph_Scope, options: ComputeNodeGraph_StateDefinition_Options, type: ComputeNodeGraph_StateType): ComputeNodeGraph_StateDefinition
Swift declaration
init(scope: ComputeNodeGraph.Scope, options: ComputeNodeGraph.StateDefinition.Options, type: ComputeNodeGraph.StateType)
get · iOS 27.0+

scope

TypeScript
get scope(): ComputeNodeGraph_Scope
Swift declaration
var scope: ComputeNodeGraph.Scope

The scope that owns this state. For example, ``ComputeNodeGraph/Scope/element`` stores a value per particle, while ``ComputeNodeGraph/Scope/emitter`` stores a single value used by the emission stage.

set · iOS 27.0+

scope

TypeScript
set scope(value: ComputeNodeGraph_Scope)
Swift declaration
var scope: ComputeNodeGraph.Scope

The scope that owns this state. For example, ``ComputeNodeGraph/Scope/element`` stores a value per particle, while ``ComputeNodeGraph/Scope/emitter`` stores a single value used by the emission stage.

get · iOS 27.0+

options

TypeScript
get options(): ComputeNodeGraph_StateDefinition_Options
Swift declaration
var options: ComputeNodeGraph.StateDefinition.Options

Whether this state is read, written, or both. See ``ComputeNodeGraph/StateDefinition/Options``.

set · iOS 27.0+

options

TypeScript
set options(value: ComputeNodeGraph_StateDefinition_Options)
Swift declaration
var options: ComputeNodeGraph.StateDefinition.Options

Whether this state is read, written, or both. See ``ComputeNodeGraph/StateDefinition/Options``.

Skipped declarations

No declarations were skipped in this snapshot.

All ComputeGraph types →