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

# module

Mutate per-particle state with operations such as setPosition, addPosition, setVelocity, setColor, setSize, and setLifetime.

## Topics

### Namespaces

[`module::debug`](/documentation/ComputeGraph/module/debug)

### Functions

[`void module::addPosition(offset)`](/documentation/ComputeGraph/module/addPosition)

Moves an element by adding an offset to its current position.

[`void module::addVelocity(velocity)`](/documentation/ComputeGraph/module/addVelocity)

Adds a velocity delta to the element’s current velocity.

[`void module::setAlpha(alpha)`](/documentation/ComputeGraph/module/setAlpha)

Sets the alpha (opacity) value of an element.

[`void module::setColor(color)`](/documentation/ComputeGraph/module/setColor)

Sets the color of an element to the specified RGBA value.

[`void module::setLifetime(lifetime)`](/documentation/ComputeGraph/module/setLifetime)

Sets the lifetime of an element in seconds.

[`void module::setPosition(position)`](/documentation/ComputeGraph/module/setPosition)

Sets the position of an element to the specified coordinates.

[`void module::setSize(size)`](/documentation/ComputeGraph/module/setSize)

Sets the size of an element to the specified dimensions. Size is in meters.

[`void module::setVelocity(velocity)`](/documentation/ComputeGraph/module/setVelocity)

Sets the velocity of an element to the specified value.

---

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)