Taos API Reference
    Preparing search index...

    Type Alias Action

    Action:
        | {
            kind: "setAttribute";
            attr: ParticleAttribute;
            mode: SetAttributeMode;
            value: Expr;
        }
        | { kind: "setVariable"; name: string; value: Expr }
        | { kind: "if"; cond: Expr; then: Action[]; else?: Action[] }

    Side-effecting graph statement. Actions execute top-to-bottom inside the graph block and can mutate particle attributes or declared variables.

    Type Declaration

    • {
          kind: "setAttribute";
          attr: ParticleAttribute;
          mode: SetAttributeMode;
          value: Expr;
      }

      Compose value into a particle attribute via the chosen SetAttributeMode.

    • { kind: "setVariable"; name: string; value: Expr }

      Assign to a local variable declared in variables.

    • { kind: "if"; cond: Expr; then: Action[]; else?: Action[] }

      Control-flow branch: run then if cond is true, else else_ (if any).