<!--
{
  "availability" : [
    "Reality Composer Pro: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ComputeGraph",
  "identifier" : "/documentation/ComputeGraph/element",
  "metadataVersion" : "0.1.0",
  "role" : "Namespace",
  "symbol" : {
    "kind" : "Namespace",
    "modules" : [
      "Compute Graph"
    ],
    "preciseIdentifier" : "element"
  },
  "title" : "element"
}
-->

# element

A set of nodes for reading and writing the current element within a particle simulation.

## Topics

### Functions

[`float element::age()`](/documentation/ComputeGraph/element/age)

Returns the current age of the element in seconds.

[`float element::ageOverLifetime()`](/documentation/ComputeGraph/element/ageOverLifetime)

Returns the normalized age of the element as a ratio of its lifetime.

[`half4 element::color()`](/documentation/ComputeGraph/element/color)

Returns the current color of the element.

[`uint element::index()`](/documentation/ComputeGraph/element/index)

Returns the index of the current element.

[`float element::lifetime()`](/documentation/ComputeGraph/element/lifetime)

Returns the total lifetime of the element in seconds.

[`float3 element::position()`](/documentation/ComputeGraph/element/position)

Returns the current position of the element, in the graph’s coordinate space.

[`float2 element::size()`](/documentation/ComputeGraph/element/size)

Returns the current size of the element.

[`void element::terminate(terminate)`](/documentation/ComputeGraph/element/terminate)

Ends the lifetime of the current element, if terminate is true.

[`float3 element::velocity()`](/documentation/ComputeGraph/element/velocity)

Returns the current velocity of the element.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)