Processing 如何向p5数据表中添加行?

Processing 如何向p5数据表中添加行?,processing,p5.js,Processing,P5.js,假设我有一个空的p5数据表: data = new p5.Table(); data.columns = ['x','y'] 如何将数据添加到此表中?方法如下: let newRow = data .addRow(); newRow.setNum('x', 12); newRow.setString('name', 'cool string'); 我想知道是否有人知道向addRow函数添加参数的直接方法

假设我有一个空的p5数据表:

  data = new p5.Table();
  data.columns = ['x','y']
如何将数据添加到此表中?

方法如下:

let newRow = data .addRow();
newRow.setNum('x', 12);
newRow.setString('name', 'cool string');
我想知道是否有人知道向addRow函数添加参数的直接方法