Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

atoms

This object defines the atom structure and, optionally, an initial array of atoms. The structure can be defined within the PD in the atoms object or the atoms object can refer to an external file for dynamically generated atom definitions:

Example 1 (Inline):

{
  "atoms": {
    "resourceCount": 2,
    "timeCount": 1,
    "stateCount": 100
  }
}

Example 2: (External):

  {
    "atoms": {
      "file": "atoms.json"
    }
  }

Fields:

  • resourceCount: Defines the number of resources (the number of rows of the atom array).
  • timeCount: Defines the number of time atoms per row (the number of columns of the atom array).
  • stateCount: Defines the number of states within each atom.
  • file: Defines an external JSON file that contains the atom configuration (in the same format as the object).
  • array: A JSON array that specifies the initial state of the atom array (in this case, params.initializeType is ignored). See also file references for more details on array and atom file formats.