{
  "project": {},
  "files": {
    "src/analysis/Amplitude.js": {
      "name": "src/analysis/Amplitude.js",
      "modules": {
        "p5.sound": 1
      },
      "classes": {
        "Amplitude": 1
      },
      "fors": {
        "p5.sound": 1,
        "Amplitude": 1
      },
      "namespaces": {}
    },
    "src/analysis/FFT.js": {
      "name": "src/analysis/FFT.js",
      "modules": {},
      "classes": {
        "FFT": 1
      },
      "fors": {
        "p5.sound": 1,
        "FFT": 1
      },
      "namespaces": {}
    },
    "src/core/Utils.js": {
      "name": "src/core/Utils.js",
      "modules": {},
      "classes": {},
      "fors": {
        "p5.sound": 1
      },
      "namespaces": {}
    },
    "src/core/p5soundMixEffect.js": {
      "name": "src/core/p5soundMixEffect.js",
      "modules": {},
      "classes": {
        "p5soundMixEffect": 1
      },
      "fors": {
        "p5.sound": 1,
        "p5soundMixEffect": 1
      },
      "namespaces": {}
    },
    "src/core/p5soundNode.js": {
      "name": "src/core/p5soundNode.js",
      "modules": {},
      "classes": {
        "p5soundNode": 1
      },
      "fors": {
        "p5.sound": 1,
        "p5soundNode": 1
      },
      "namespaces": {}
    },
    "src/core/p5soundSource.js": {
      "name": "src/core/p5soundSource.js",
      "modules": {},
      "classes": {
        "p5soundSource": 1
      },
      "fors": {
        "p5.sound": 1,
        "p5soundSource": 1
      },
      "namespaces": {}
    },
    "src/effects/Biquad.js": {
      "name": "src/effects/Biquad.js",
      "modules": {},
      "classes": {
        "Biquad": 1,
        "LowPass": 1,
        "HighPass": 1,
        "BandPass": 1
      },
      "fors": {
        "p5.sound": 1,
        "Biquad": 1
      },
      "namespaces": {}
    },
    "src/effects/Delay.js": {
      "name": "src/effects/Delay.js",
      "modules": {},
      "classes": {
        "Delay": 1
      },
      "fors": {
        "p5.sound": 1,
        "Delay": 1
      },
      "namespaces": {}
    },
    "src/effects/Envelope.js": {
      "name": "src/effects/Envelope.js",
      "modules": {},
      "classes": {
        "Envelope": 1
      },
      "fors": {
        "p5.sound": 1,
        "Envelope": 1
      },
      "namespaces": {}
    },
    "src/effects/Gain.js": {
      "name": "src/effects/Gain.js",
      "modules": {},
      "classes": {
        "Gain": 1
      },
      "fors": {
        "p5.sound": 1
      },
      "namespaces": {}
    },
    "src/effects/Panner.js": {
      "name": "src/effects/Panner.js",
      "modules": {},
      "classes": {
        "Panner": 1
      },
      "fors": {
        "p5.sound": 1,
        "Panner": 1
      },
      "namespaces": {}
    },
    "src/effects/Panner3D.js": {
      "name": "src/effects/Panner3D.js",
      "modules": {},
      "classes": {
        "Panner3D": 1
      },
      "fors": {
        "p5.sound": 1,
        "Panner3D": 1
      },
      "namespaces": {}
    },
    "src/effects/PitchShifter.js": {
      "name": "src/effects/PitchShifter.js",
      "modules": {},
      "classes": {
        "PitchShifter": 1
      },
      "fors": {
        "p5.sound": 1,
        "PitchShifter": 1
      },
      "namespaces": {}
    },
    "src/effects/Reverb.js": {
      "name": "src/effects/Reverb.js",
      "modules": {},
      "classes": {
        "Reverb": 1
      },
      "fors": {
        "p5.sound": 1,
        "Reverb": 1
      },
      "namespaces": {}
    },
    "src/sources/AudioIn.js": {
      "name": "src/sources/AudioIn.js",
      "modules": {},
      "classes": {
        "AudioIn": 1
      },
      "fors": {
        "p5.sound": 1,
        "AudioIn": 1
      },
      "namespaces": {}
    },
    "src/sources/Noise.js": {
      "name": "src/sources/Noise.js",
      "modules": {},
      "classes": {
        "Noise": 1
      },
      "fors": {
        "p5.sound": 1,
        "Noise": 1
      },
      "namespaces": {}
    },
    "src/sources/Oscillator.js": {
      "name": "src/sources/Oscillator.js",
      "modules": {},
      "classes": {
        "Oscillator": 1,
        "SawOsc": 1,
        "SqrOsc": 1,
        "TriOsc": 1,
        "SinOsc": 1
      },
      "fors": {
        "p5.sound": 1,
        "Oscillator": 1
      },
      "namespaces": {}
    },
    "src/sources/SoundFile.js": {
      "name": "src/sources/SoundFile.js",
      "modules": {
        "SoundFile": 1
      },
      "classes": {
        "SoundFile": 1
      },
      "fors": {
        "p5.sound": 1,
        "SoundFile": 1
      },
      "namespaces": {}
    }
  },
  "modules": {
    "Foundation": {
      "name": "Foundation",
      "submodules": {
        "Foundation": 1
      },
      "classes": {}
    },
    "Typography": {
      "name": "Typography",
      "submodules": {},
      "classes": {}
    },
    "Math": {
      "name": "Math",
      "submodules": {
        "Quaternion": 1,
        "Calculation": 1,
        "Random": 1,
        "Trigonometry": 1,
        "Noise": 1
      },
      "classes": {}
    },
    "DOM": {
      "name": "DOM",
      "submodules": {
        "DOM": 1
      },
      "classes": {}
    },
    "Rendering": {
      "name": "Rendering",
      "submodules": {
        "Rendering": 1
      },
      "classes": {}
    },
    "Constants": {
      "name": "Constants",
      "submodules": {
        "Constants": 1
      },
      "classes": {}
    },
    "Events": {
      "name": "Events",
      "submodules": {
        "Keyboard": 1,
        "Acceleration": 1,
        "Pointer": 1
      },
      "classes": {}
    },
    "IO": {
      "name": "IO",
      "submodules": {
        "Table": 1,
        "Input": 1,
        "Time & Date": 1,
        "Output": 1
      },
      "classes": {}
    },
    "3D": {
      "name": "3D",
      "submodules": {
        "Camera": 1,
        "p5.strands": 1,
        "Interaction": 1,
        "Lights": 1,
        "Material": 1
      },
      "classes": {}
    },
    "Environment": {
      "name": "Environment",
      "submodules": {
        "Environment": 1
      },
      "classes": {}
    },
    "Structure": {
      "name": "Structure",
      "submodules": {
        "Structure": 1
      },
      "classes": {}
    },
    "Image": {
      "name": "Image",
      "submodules": {
        "Loading & Displaying": 1,
        "Pixels": 1,
        "Image": 1
      },
      "classes": {}
    },
    "Shape": {
      "name": "Shape",
      "submodules": {
        "Curves": 1,
        "2D Primitives": 1,
        "Attributes": 1,
        "Custom Shapes": 1,
        "3D Primitives": 1,
        "3D Models": 1
      },
      "classes": {}
    },
    "Data": {
      "name": "Data",
      "submodules": {
        "Conversion": 1,
        "Utility Functions": 1,
        "LocalStorage": 1
      },
      "classes": {}
    },
    "Color": {
      "name": "Color",
      "submodules": {
        "Creating & Reading": 1,
        "Setting": 1,
        "Color Conversion": 1
      },
      "classes": {}
    },
    "Transform": {
      "name": "Transform",
      "submodules": {
        "Transform": 1
      },
      "classes": {}
    },
    "Quaternion": {
      "name": "Quaternion",
      "module": "Math",
      "is_submodule": 1
    },
    "Calculation": {
      "name": "Calculation",
      "module": "Math",
      "is_submodule": 1
    },
    "Random": {
      "name": "Random",
      "module": "Math",
      "is_submodule": 1
    },
    "Trigonometry": {
      "name": "Trigonometry",
      "module": "Math",
      "is_submodule": 1
    },
    "Noise": {
      "name": "Noise",
      "module": "Math",
      "is_submodule": 1
    },
    "Keyboard": {
      "name": "Keyboard",
      "module": "Events",
      "is_submodule": 1
    },
    "Acceleration": {
      "name": "Acceleration",
      "module": "Events",
      "is_submodule": 1
    },
    "Pointer": {
      "name": "Pointer",
      "module": "Events",
      "is_submodule": 1
    },
    "Table": {
      "name": "Table",
      "module": "IO",
      "is_submodule": 1
    },
    "Input": {
      "name": "Input",
      "module": "IO",
      "is_submodule": 1
    },
    "Time & Date": {
      "name": "Time & Date",
      "module": "IO",
      "is_submodule": 1
    },
    "Output": {
      "name": "Output",
      "module": "IO",
      "is_submodule": 1
    },
    "Camera": {
      "name": "Camera",
      "module": "3D",
      "is_submodule": 1
    },
    "p5.strands": {
      "name": "p5.strands",
      "module": "3D",
      "is_submodule": 1
    },
    "Interaction": {
      "name": "Interaction",
      "module": "3D",
      "is_submodule": 1
    },
    "Lights": {
      "name": "Lights",
      "module": "3D",
      "is_submodule": 1
    },
    "Material": {
      "name": "Material",
      "module": "3D",
      "is_submodule": 1
    },
    "Loading & Displaying": {
      "name": "Loading & Displaying",
      "module": "Image",
      "is_submodule": 1
    },
    "Pixels": {
      "name": "Pixels",
      "module": "Image",
      "is_submodule": 1
    },
    "Curves": {
      "name": "Curves",
      "module": "Shape",
      "is_submodule": 1
    },
    "2D Primitives": {
      "name": "2D Primitives",
      "module": "Shape",
      "is_submodule": 1
    },
    "Attributes": {
      "name": "Attributes",
      "module": "Shape",
      "is_submodule": 1
    },
    "Custom Shapes": {
      "name": "Custom Shapes",
      "module": "Shape",
      "is_submodule": 1
    },
    "3D Primitives": {
      "name": "3D Primitives",
      "module": "Shape",
      "is_submodule": 1
    },
    "3D Models": {
      "name": "3D Models",
      "module": "Shape",
      "is_submodule": 1
    },
    "Conversion": {
      "name": "Conversion",
      "module": "Data",
      "is_submodule": 1
    },
    "Utility Functions": {
      "name": "Utility Functions",
      "module": "Data",
      "is_submodule": 1
    },
    "LocalStorage": {
      "name": "LocalStorage",
      "module": "Data",
      "is_submodule": 1
    },
    "Creating & Reading": {
      "name": "Creating & Reading",
      "module": "Color",
      "is_submodule": 1
    },
    "Setting": {
      "name": "Setting",
      "module": "Color",
      "is_submodule": 1
    },
    "Color Conversion": {
      "name": "Color Conversion",
      "module": "Color",
      "is_submodule": 1
    },
    "p5.sound": {
      "name": "p5.sound",
      "submodules": {
        "SoundFile": 1
      },
      "elements": {},
      "classes": {
        "p5.sound": 1,
        "Amplitude": 1,
        "FFT": 1,
        "p5soundMixEffect": 1,
        "p5soundNode": 1,
        "p5soundSource": 1,
        "Biquad": 1,
        "LowPass": 1,
        "HighPass": 1,
        "BandPass": 1,
        "Delay": 1,
        "Envelope": 1,
        "Gain": 1,
        "Panner": 1,
        "Panner3D": 1,
        "PitchShifter": 1,
        "Reverb": 1,
        "AudioIn": 1,
        "Noise": 1,
        "Oscillator": 1,
        "SawOsc": 1,
        "SqrOsc": 1,
        "TriOsc": 1,
        "SinOsc": 1,
        "SoundFile": 1
      },
      "fors": {
        "p5.sound": 1,
        "Amplitude": 1,
        "FFT": 1,
        "p5soundMixEffect": 1,
        "p5soundNode": 1,
        "p5soundSource": 1,
        "Biquad": 1,
        "Delay": 1,
        "Envelope": 1,
        "Panner": 1,
        "Panner3D": 1,
        "PitchShifter": 1,
        "Reverb": 1,
        "AudioIn": 1,
        "Noise": 1,
        "Oscillator": 1,
        "SoundFile": 1
      },
      "namespaces": {},
      "module": "p5.sound",
      "file": "src/sources/SoundFile.js",
      "line": 72,
      "description": "Get the current volume of a sound."
    },
    "SoundFile": {
      "name": "SoundFile",
      "submodules": {},
      "elements": {},
      "classes": {
        "SoundFile": 1
      },
      "fors": {
        "p5.sound": 1,
        "SoundFile": 1
      },
      "is_submodule": 1,
      "namespaces": {},
      "module": "p5.sound",
      "namespace": "",
      "file": "src/sources/SoundFile.js",
      "line": 72,
      "description": "p5.sound.js extends p5.js with Web Audio functionality including audio input, playback, analysis and synthesis."
    }
  },
  "classes": {
    "p5": {
      "name": "p5",
      "shortname": "p5.sound",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": ""
    },
    "p5.File": {
      "name": "p5.File",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "description": "<p>A class to describe a file.</p>\n<p><code>p5.File</code> objects are used by\n<a href=\"#/p5.Element/drop\">myElement.drop()</a> and\ncreated by\n<a href=\"#/p5/createFileInput\">createFileInput</a>.</p>\n",
      "example": [
        "// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displayInfo() when the file loads.\n  let input = createFileInput(displayInfo);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');\n}\n\n// Display the p5.File's info once it loads.\nfunction displayInfo(file) {\n  background(200);\n\n  // Display the p5.File's name.\n  text(file.name, 10, 10, 80, 40);\n\n  // Display the p5.File's type and subtype.\n  text(`${file.type}/${file.subtype}`, 10, 70);\n\n  // Display the p5.File's size in bytes.\n  text(file.size, 10, 90);\n}",
        "// Use the file input to select an image to\n// load and display.\nlet img;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a file input and place it beneath the canvas.\n  // Call handleImage() when the file image loads.\n  let input = createFileInput(handleImage);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the image if it's ready.\n  if (img) {\n    image(img, 0, 0, width, height);\n  }\n}\n\n// Use the p5.File's data once it loads.\nfunction handleImage(file) {\n  // Check the p5.File's type.\n  if (file.type === 'image') {\n    // Create an image using using the p5.File's data.\n    img = createImg(file.data, '');\n\n    // Hide the image element so it doesn't appear twice.\n    img.hide();\n  } else {\n    img = null;\n  }\n}"
      ],
      "params": [
        {
          "name": "file",
          "description": "wrapped file.",
          "type": "File"
        }
      ],
      "is_constructor": 1,
      "module": "DOM",
      "submodule": "DOM"
    },
    "p5.TableRow": {
      "name": "p5.TableRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 345,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "description": "<p>A TableRow object represents a single row of data values,\nstored in columns, from a table.</p>\n<p>A Table Row contains both an ordered array, and an unordered\nJSON object.</p>\n",
      "example": [],
      "params": [
        {
          "name": "row",
          "description": "optional: populate the row with an\narray of values",
          "type": "any[]"
        }
      ],
      "is_constructor": 1,
      "module": "IO",
      "submodule": "Table"
    },
    "p5.Graphics": {
      "name": "p5.Graphics",
      "file": "src/scripts/parsers/in/p5.js/src/core/p5.Graphics.js",
      "line": 655,
      "extends": "p5.Element",
      "description": "<p>A class to describe a drawing surface that's separate from the main canvas.</p>\n<p>Each <code>p5.Graphics</code> object provides a dedicated drawing surface called a\ngraphics buffer. Graphics buffers are helpful when drawing should happen\noffscreen. For example, separate scenes can be drawn offscreen and\ndisplayed only when needed.</p>\n<p><code>p5.Graphics</code> objects have nearly all the drawing features of the main\ncanvas. For example, calling the method <code>myGraphics.circle(50, 50, 20)</code>\ndraws to the graphics buffer. The resulting image can be displayed on the\nmain canvas by passing the <code>p5.Graphics</code> object to the\n<a href=\"#/p5/image\">image()</a> function, as in <code>image(myGraphics, 0, 0)</code>.</p>\n<p>Note: <a href=\"#/p5/createGraphics\">createGraphics()</a> is the recommended\nway to create an instance of this class.</p>\n",
      "example": [
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(50, 50);\n\n  // Draw to the p5.Graphics object.\n  pg.background(100);\n  pg.circle(25, 25, 20);\n\n  describe('A dark gray square with a white circle at its center drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display the p5.Graphics object.\n  image(pg, 25, 25);\n}",
        "// Click the canvas to display the graphics buffer.\n\nlet pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(50, 50);\n\n  describe('A square appears on a gray background when the user presses the mouse. The square cycles between white and black.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the background color.\n  let bg = frameCount % 255;\n\n  // Draw to the p5.Graphics object.\n  pg.background(bg);\n\n  // Display the p5.Graphics object while\n  // the user presses the mouse.\n  if (mouseIsPressed === true) {\n    image(pg, 25, 25);\n  }\n}"
      ],
      "params": [
        {
          "name": "w",
          "description": "width width of the graphics buffer in pixels.",
          "type": "Number"
        },
        {
          "name": "h",
          "description": "height height of the graphics buffer in pixels.",
          "type": "Number"
        },
        {
          "name": "renderer",
          "description": "the renderer to use, either P2D or WEBGL.",
          "type": "P2D|WEBGL|P2DHDR"
        },
        {
          "name": "pInst",
          "description": "sketch instance.",
          "optional": 1,
          "type": "p5"
        },
        {
          "name": "canvas",
          "description": "existing <code><canvas></code> element to use.",
          "optional": 1,
          "type": "HTMLCanvasElement"
        }
      ],
      "is_constructor": 1,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    "p5.Color": {
      "name": "p5.Color",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 944,
      "description": "<p>A class to describe a color.</p>\n<p>Each <code>p5.Color</code> object stores the color mode\nand level maxes that were active during its construction. These values are\nused to interpret the arguments passed to the object's constructor. They\nalso determine output formatting such as when\n<a href=\"#/p5/saturation\">saturation()</a> is called.</p>\n<p>Color is stored internally as an array of ideal RGBA values in floating\npoint form, normalized from 0 to 1. These values are used to calculate the\nclosest screen colors, which are RGBA levels from 0 to 255. Screen colors\nare sent to the renderer.</p>\n<p>When different color representations are calculated, the results are cached\nfor performance. These values are normalized, floating-point numbers.</p>\n<p>Note: <a href=\"#/p5/color\">color()</a> is the recommended way to create an\ninstance of this class.</p>\n",
      "example": [],
      "params": [
        {
          "name": "pInst",
          "description": "pointer to p5 instance.",
          "type": "p5"
        },
        {
          "name": "vals",
          "description": "an array containing the color values\nfor red, green, blue and alpha channel\nor CSS color.",
          "type": "Number[]|String"
        }
      ],
      "is_constructor": 1,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    "p5.Framebuffer": {
      "name": "p5.Framebuffer",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "description": "<p>A class to describe a high-performance drawing surface for textures.</p>\n<p>Each <code>p5.Framebuffer</code> object provides a dedicated drawing surface called\na framebuffer. They're similar to\n<a href=\"#/p5.Graphics\">p5.Graphics</a> objects but can run much faster.\nPerformance is improved because the framebuffer shares the same WebGL\ncontext as the canvas used to create it.</p>\n<p><code>p5.Framebuffer</code> objects have all the drawing features of the main\ncanvas. Drawing instructions meant for the framebuffer must be placed\nbetween calls to\n<a href=\"#/p5.Framebuffer/begin\">myBuffer.begin()</a> and\n<a href=\"#/p5.Framebuffer/end\">myBuffer.end()</a>. The resulting image\ncan be applied as a texture by passing the <code>p5.Framebuffer</code> object to the\n<a href=\"#/p5/texture\">texture()</a> function, as in <code>texture(myBuffer)</code>.\nIt can also be displayed on the main canvas by passing it to the\n<a href=\"#/p5/image\">image()</a> function, as in <code>image(myBuffer, 0, 0)</code>.</p>\n<p>Note: <a href=\"#/p5/createFramebuffer\">createFramebuffer()</a> is the\nrecommended way to create an instance of this class.</p>\n",
      "example": [],
      "params": [
        {
          "name": "target",
          "description": "sketch instance or\n<a href=\"#/p5.Graphics\">p5.Graphics</a>\nobject.",
          "type": "p5.Graphics|p5"
        },
        {
          "name": "settings",
          "description": "configuration options.",
          "optional": 1,
          "type": "Object"
        }
      ],
      "is_constructor": 1,
      "module": "Rendering"
    },
    "p5.XML": {
      "name": "p5.XML",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 1197,
      "description": "<p>A class to describe an XML object.</p>\n<p>Each <code>p5.XML</code> object provides an easy way to interact with XML data.\nExtensible Markup Language\n(<a href=\"https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction\" target=\"_blank\">XML</a>)\nis a standard format for sending data between applications. Like HTML, the\nXML format is based on tags and attributes, as in\n<code><time units=\"s\">1234</time></code>.</p>\n<p>Note: Use <a href=\"#/p5/loadXML\">loadXML()</a> to load external XML files.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array with all mammal tags.\n  let mammals = myXML.getChildren('mammal');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the mammals array.\n  for (let i = 0; i < mammals.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Get the mammal's common name.\n    let name = mammals[i].getContent();\n\n    // Display the mammal's name.\n    text(name, 20, y);\n  }\n\n  describe(\n    'The words \"Goat\", \"Leopard\", and \"Zebra\" written on three separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "params": [],
      "is_constructor": 1,
      "module": "IO",
      "submodule": "Input"
    },
    "p5.Shader": {
      "name": "p5.Shader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 1206,
      "description": "<p>A class to describe a shader program.</p>\n<p>Each <code>p5.Shader</code> object contains a shader program that runs on the graphics\nprocessing unit (GPU). Shaders can process many pixels or vertices at the\nsame time, making them fast for many graphics tasks. They’re written in a\nlanguage called\n<a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\nand run along with the rest of the code in a sketch.</p>\n<p>A shader program consists of two files, a vertex shader and a fragment\nshader. The vertex shader affects where 3D geometry is drawn on the screen\nand the fragment shader affects color. Once the <code>p5.Shader</code> object is\ncreated, it can be used with the <a href=\"#/p5/shader\">shader()</a>\nfunction, as in <code>shader(myShader)</code>.</p>\n<p>A shader can optionally describe hooks, which are functions in GLSL that\nusers may choose to provide to customize the behavior of the shader. For the\nvertex or the fragment shader, users can pass in an object where each key is\nthe type and name of a hook function, and each value is a string with the\nparameter list and default implementation of the hook. For example, to let users\noptionally run code at the start of the vertex shader, the options object could\ninclude:</p>\n<pre><code class=\"language-js\">{\n  vertex: {\n    'void beforeVertex': '() {}'\n  }\n}</code></pre><p>Then, in your vertex shader source, you can run a hook by calling a function\nwith the same name prefixed by <code>HOOK_</code>:</p>\n<pre><code class=\"language-glsl\">void main() {\n  HOOK_beforeVertex();\n  // Add the rest ofy our shader code here!\n}</code></pre><p>Note: <a href=\"#/p5/createShader\">createShader()</a>,\n<a href=\"#/p5/createFilterShader\">createFilterShader()</a>, and\n<a href=\"#/p5/loadShader\">loadShader()</a> are the recommended ways to\ncreate an instance of this class.</p>\n",
      "example": [
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision highp float;\n\nvoid main() {\n  // Set each pixel's RGBA value to yellow.\n  gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\n`;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  let myShader = createShader(vertSrc, fragSrc);\n\n  // Apply the p5.Shader object.\n  shader(myShader);\n\n  // Style the drawing surface.\n  noStroke();\n\n  // Add a plane as a drawing surface.\n  plane(100, 100);\n\n  describe('A yellow square.');\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\nlet mandelbrot;\n\nasync function setup() {\n  mandelbrot = await loadShader('assets/shader.vert', 'assets/shader.frag');\n  createCanvas(100, 100, WEBGL);\n\n  // Use the p5.Shader object.\n  shader(mandelbrot);\n\n  // Set the shader uniform p to an array.\n  mandelbrot.setUniform('p', [-0.74364388703, 0.13182590421]);\n\n  describe('A fractal image zooms in and out of focus.');\n}\n\nfunction draw() {\n  // Set the shader uniform r to a value that oscillates between 0 and 2.\n  mandelbrot.setUniform('r', sin(frameCount * 0.01) + 1);\n\n  // Add a quad as a display surface for the shader.\n  quad(-1, -1, 1, -1, 1, 1, -1, 1);\n}"
      ],
      "params": [
        {
          "name": "renderer",
          "description": "WebGL context for this shader.",
          "type": "p5.RendererGL"
        },
        {
          "name": "vertSrc",
          "description": "source code for the vertex shader program.",
          "type": "String"
        },
        {
          "name": "fragSrc",
          "description": "source code for the fragment shader program.",
          "type": "String"
        },
        {
          "name": "options",
          "description": "<p>An optional object describing how this shader can\nbe augmented with hooks. It can include:</p>\n<ul><li><code>vertex</code>: An object describing the available vertex shader hooks.</li><li><code>fragment</code>: An object describing the available frament shader hooks.</li></ul>",
          "optional": 1,
          "type": "Object"
        }
      ],
      "is_constructor": 1,
      "module": "3D",
      "submodule": "Material"
    },
    "p5.Font": {
      "name": "p5.Font",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 1269,
      "description": "A class to describe fonts. Create through <a href=\"#/p5/loadFont\"><code>loadFont()</code></a>.",
      "example": [],
      "params": [],
      "is_constructor": 1,
      "module": "Typography"
    },
    "p5.Table": {
      "name": "p5.Table",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1272,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "description": "<a href=\"#/p5.Table\">Table</a> objects store data with multiple rows and columns, much\nlike in a traditional spreadsheet. Tables can be generated from\nscratch, dynamically, or using data from an existing file.",
      "example": [],
      "params": [
        {
          "name": "rows",
          "description": "An array of p5.TableRow objects",
          "optional": 1,
          "type": "p5.TableRow[]"
        }
      ],
      "is_constructor": 1,
      "module": "IO",
      "submodule": "Table"
    },
    "p5.PrintWriter": {
      "name": "p5.PrintWriter",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1338,
      "description": "<p>A class to describe a print stream.</p>\n<p>Each <code>p5.PrintWriter</code> object provides a way to save a sequence of text\ndata, called the print stream, to the user's computer. It's a low-level\nobject that enables precise control of text output. Functions such as\n<a href=\"#/p5/saveStrings\">saveStrings()</a> and\n<a href=\"#/p5/saveJSON\">saveJSON()</a> are easier to use for simple file\nsaving.</p>\n<p>Note: <a href=\"#/p5/createWriter\">createWriter()</a> is the recommended way\nto make an instance of this class.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  let myWriter = createWriter('xo.txt');\n\n  // Add some lines to the print stream.\n  myWriter.print('XOO');\n  myWriter.print('OXO');\n  myWriter.print('OOX');\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "params": [
        {
          "name": "filename",
          "description": "name of the file to create.",
          "type": "String"
        },
        {
          "name": "extension",
          "description": "format to use for the file.",
          "optional": 1,
          "type": "String"
        }
      ],
      "is_constructor": 1,
      "module": "IO",
      "submodule": "Input"
    },
    "p5.MediaElement": {
      "name": "p5.MediaElement",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1707,
      "extends": "p5.Element",
      "description": "<p>A class to handle audio and video.</p>\n<p><code>p5.MediaElement</code> extends <a href=\"#/p5.Element\">p5.Element</a> with\nmethods to handle audio and video. <code>p5.MediaElement</code> objects are created by\ncalling <a href=\"#/p5/createVideo\">createVideo</a>,\n<a href=\"#/p5/createAudio\">createAudio</a>, and\n<a href=\"#/p5/createCapture\">createCapture</a>.</p>\n",
      "example": [
        "let capture;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createCapture().\n  capture = createCapture(VIDEO);\n  capture.hide();\n\n  describe('A webcam feed with inverted colors.');\n}\n\nfunction draw() {\n  // Display the video stream and invert the colors.\n  image(capture, 0, 0, width, width * capture.height / capture.width);\n  filter(INVERT);\n}"
      ],
      "params": [
        {
          "name": "elt",
          "description": "DOM node that is wrapped",
          "type": "String"
        }
      ],
      "is_constructor": 1,
      "module": "DOM",
      "submodule": "DOM"
    },
    "p5.Geometry": {
      "name": "p5.Geometry",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "description": "<p>A class to describe a 3D shape.</p>\n<p>Each <code>p5.Geometry</code> object represents a 3D shape as a set of connected\npoints called vertices. All 3D shapes are made by connecting vertices to\nform triangles that are stitched together. Each triangular patch on the\ngeometry's surface is called a face. The geometry stores information\nabout its vertices and faces for use with effects such as lighting and\ntexture mapping.</p>\n<p>The first parameter, <code>detailX</code>, is optional. If a number is passed, as in\n<code>new p5.Geometry(24)</code>, it sets the number of triangle subdivisions to use\nalong the geometry's x-axis. By default, <code>detailX</code> is 1.</p>\n<p>The second parameter, <code>detailY</code>, is also optional. If a number is passed,\nas in <code>new p5.Geometry(24, 16)</code>, it sets the number of triangle\nsubdivisions to use along the geometry's y-axis. By default, <code>detailX</code> is\n1.</p>\n<p>The third parameter, <code>callback</code>, is also optional. If a function is passed,\nas in <code>new p5.Geometry(24, 16, createShape)</code>, it will be called once to add\nvertices to the new 3D shape.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = new p5.Geometry();\n\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(40, 0, 0);\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  myGeometry.vertices.push(v0, v1, v2);\n\n  describe('A white triangle drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object using a callback function.\n  myGeometry = new p5.Geometry(1, 1, createShape);\n\n  describe('A white triangle drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(40, 0, 0);\n\n  // \"this\" refers to the p5.Geometry object being created.\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  this.vertices.push(v0, v1, v2);\n\n  // Add an array to list which vertices belong to the face.\n  // Vertices are listed in clockwise \"winding\" order from\n  // left to top to right.\n  this.faces.push([0, 1, 2]);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object using a callback function.\n  myGeometry = new p5.Geometry(1, 1, createShape);\n\n  describe('A white triangle drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(40, 0, 0);\n\n  // \"this\" refers to the p5.Geometry object being created.\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  this.vertices.push(v0, v1, v2);\n\n  // Add an array to list which vertices belong to the face.\n  // Vertices are listed in clockwise \"winding\" order from\n  // left to top to right.\n  this.faces.push([0, 1, 2]);\n\n  // Compute the surface normals to help with lighting.\n  this.computeNormals();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\n// Adapted from Paul Wheeler's wonderful p5.Geometry tutorial.\n// https://www.paulwheeler.us/articles/custom-3d-geometry-in-p5js/\n// CC-BY-SA 4.0\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Geometry object.\n  // Set detailX to 48 and detailY to 2.\n  // >>> try changing them.\n  myGeometry = new p5.Geometry(48, 2, createShape);\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the p5.Geometry object.\n  strokeWeight(0.2);\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // \"this\" refers to the p5.Geometry object being created.\n\n  // Define the Möbius strip with a few parameters.\n  let spread = 0.1;\n  let radius = 30;\n  let stripWidth = 15;\n  let xInterval = 4 * PI / this.detailX;\n  let yOffset = -stripWidth / 2;\n  let yInterval = stripWidth / this.detailY;\n\n  for (let j = 0; j <= this.detailY; j += 1) {\n    // Calculate the \"vertical\" point along the strip.\n    let v = yOffset + yInterval * j;\n\n    for (let i = 0; i <= this.detailX; i += 1) {\n      // Calculate the angle of rotation around the strip.\n      let u = i * xInterval;\n\n      // Calculate the coordinates of the vertex.\n      let x = (radius + v * cos(u / 2)) * cos(u) - sin(u / 2) * 2 * spread;\n      let y = (radius + v * cos(u / 2)) * sin(u);\n      if (u < TWO_PI) {\n        y += sin(u) * spread;\n      } else {\n        y -= sin(u) * spread;\n      }\n      let z = v * sin(u / 2) + sin(u / 4) * 4 * spread;\n\n      // Create a p5.Vector object to position the vertex.\n      let vert = createVector(x, y, z);\n\n      // Add the vertex to the p5.Geometry object's vertices array.\n      this.vertices.push(vert);\n    }\n  }\n\n  // Compute the faces array.\n  this.computeFaces();\n\n  // Compute the surface normals to help with lighting.\n  this.computeNormals();\n}"
      ],
      "params": [
        {
          "name": "detailX",
          "description": "number of vertices along the x-axis.",
          "optional": 1,
          "type": "Integer"
        },
        {
          "name": "detailY",
          "description": "number of vertices along the y-axis.",
          "optional": 1,
          "type": "Integer"
        },
        {
          "name": "callback",
          "description": "function to call once the geometry is created.",
          "optional": 1,
          "type": "Function"
        }
      ],
      "is_constructor": 1,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    "p5.Image": {
      "name": "p5.Image",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 2106,
      "description": "<p>A class to describe an image.</p>\n<p>Images are rectangular grids of pixels that can be displayed and modified.</p>\n<p>Existing images can be loaded by calling\n<a href=\"#/p5/loadImage\">loadImage()</a>. Blank images can be created by\ncalling <a href=\"#/p5/createImage\">createImage()</a>. <code>p5.Image</code> objects\nhave methods for common tasks such as applying filters and modifying\npixel values.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the GRAY filter.\n  img.filter(GRAY);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A grayscale image of a brick wall.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}"
      ],
      "params": [
        {
          "name": "width",
          "description": "",
          "type": "Number"
        },
        {
          "name": "height",
          "description": "",
          "type": "Number"
        }
      ],
      "is_constructor": 1,
      "module": "Image",
      "submodule": "Image"
    },
    "p5.Element": {
      "name": "p5.Element",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2320,
      "description": "<p>A class to describe an\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started\" target=\"_blank\">HTML element</a>.</p>\n<p>Sketches can use many elements. Common elements include the drawing canvas,\nbuttons, sliders, webcam feeds, and so on.</p>\n<p>All elements share the methods of the <code>p5.Element</code> class. They're created\nwith functions such as <a href=\"#/p5/createCanvas\">createCanvas()</a> and\n<a href=\"#/p5/createButton\">createButton()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a button element and\n  // place it beneath the canvas.\n  let btn = createButton('change');\n  btn.position(0, 100);\n\n  // Call randomColor() when\n  // the button is pressed.\n  btn.mousePressed(randomColor);\n\n  describe('A gray square with a button that says \"change\" beneath it. The square changes color when the user presses the button.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "params": [
        {
          "name": "elt",
          "description": "wrapped DOM element.",
          "type": "HTMLElement"
        },
        {
          "name": "pInst",
          "description": "pointer to p5 instance.",
          "optional": 1,
          "type": "p5"
        }
      ],
      "is_constructor": 1,
      "module": "DOM",
      "submodule": "DOM"
    },
    "p5.Camera": {
      "name": "p5.Camera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2857,
      "description": "<p>A class to describe a camera for viewing a 3D sketch.</p>\n<p>Each <code>p5.Camera</code> object represents a camera that views a section of 3D\nspace. It stores information about the camera’s position, orientation, and\nprojection.</p>\n<p>In WebGL mode, the default camera is a <code>p5.Camera</code> object that can be\ncontrolled with the <a href=\"#/p5/camera\">camera()</a>,\n<a href=\"#/p5/perspective\">perspective()</a>,\n<a href=\"#/p5/ortho\">ortho()</a>, and\n<a href=\"#/p5/frustum\">frustum()</a> functions. Additional cameras can be\ncreated with <a href=\"#/p5/createCamera\">createCamera()</a> and activated\nwith <a href=\"#/p5/setCamera\">setCamera()</a>.</p>\n<p>Note: <code>p5.Camera</code>’s methods operate in two coordinate systems:</p>\n<ul><li>The “world” coordinate system describes positions in terms of their\nrelationship to the origin along the x-, y-, and z-axes. For example,\ncalling <code>myCamera.setPosition()</code> places the camera in 3D space using\n\"world\" coordinates.</li><li>The \"local\" coordinate system describes positions from the camera's point\nof view: left-right, up-down, and forward-backward. For example, calling\n<code>myCamera.move()</code> moves the camera along its own axes.</li></ul>",
      "example": [
        "let cam;\nlet delta = 0.001;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube goes in and out of view as the camera pans left and right.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Turn the camera left and right, called \"panning\".\n  cam.pan(delta);\n\n  // Switch directions every 120 frames.\n  if (frameCount % 120 === 0) {\n    delta *= -1;\n  }\n\n  // Draw the box.\n  box();\n}",
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  // Place it at the top-left.\n  // Point it at the origin.\n  cam2 = createCamera();\n  cam2.setPosition(400, -400, 800);\n  cam2.lookAt(0, 0, 0);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A white cube on a gray background. The camera toggles between frontal and aerial views when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the box.\n  box();\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "params": [
        {
          "name": "rendererGL",
          "description": "instance of WebGL renderer",
          "type": "RendererGL"
        }
      ],
      "is_constructor": 1,
      "module": "3D",
      "submodule": "Camera"
    },
    "p5.Vector": {
      "name": "p5.Vector",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3660,
      "description": "<p>A class to describe a two or three-dimensional vector.</p>\n<p>A vector can be thought of in different ways. In one view, a vector is like\nan arrow pointing in space. Vectors have both magnitude (length) and\ndirection.</p>\n<p><code>p5.Vector</code> objects are often used to program motion because they simplify\nthe math. For example, a moving ball has a position and a velocity.\nPosition describes where the ball is in space. The ball's position vector\nextends from the origin to the ball's center. Velocity describes the ball's\nspeed and the direction it's moving. If the ball is moving straight up, its\nvelocity vector points straight up. Adding the ball's velocity vector to\nits position vector moves it, as in <code>pos.add(vel)</code>. Vector math relies on\nmethods inside the <code>p5.Vector</code> class.</p>\n<p>Note: <a href=\"#/p5/createVector\">createVector()</a> is the recommended way\nto make an instance of this class.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Vector objects.\n  let p1 = createVector(25, 25);\n  let p2 = createVector(75, 75);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Draw the first point using a p5.Vector.\n  point(p1);\n\n  // Draw the second point using a p5.Vector's components.\n  point(p2.x, p2.y);\n\n  describe('Two black dots on a gray square, one at the top left and the other at the bottom right.');\n}",
        "let pos;\nlet vel;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create p5.Vector objects.\n  pos = createVector(50, 100);\n  vel = createVector(0, -1);\n\n  describe('A black dot moves from bottom to top on a gray square. The dot reappears at the bottom when it reaches the top.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Add velocity to position.\n  pos.add(vel);\n\n  // If the dot reaches the top of the canvas,\n  // restart from the bottom.\n  if (pos.y < 0) {\n    pos.y = 100;\n  }\n\n  // Draw the dot.\n  strokeWeight(5);\n  point(pos);\n}"
      ],
      "params": [
        {
          "name": "x",
          "description": "x component of the vector.",
          "optional": 1,
          "type": "Number"
        },
        {
          "name": "y",
          "description": "y component of the vector.",
          "optional": 1,
          "type": "Number"
        },
        {
          "name": "z",
          "description": "z component of the vector.",
          "optional": 1,
          "type": "Number"
        }
      ],
      "is_constructor": 1,
      "module": "Math"
    },
    "p5.Amplitude": {
      "name": "p5.Amplitude",
      "shortname": "Amplitude",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/analysis/Amplitude.js",
      "line": 10,
      "description": "Get the current volume of a sound.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "params": [
        {
          "name": "smoothing",
          "description": "Smooth the amplitude analysis by averaging with the last analysis frame. 0.0 is no time averaging with the last analysis frame.",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet sound, amp, cnv;\n  \nfunction preload() {\n  //replace this sound with something local with rights to distribute\n  sound = loadSound('/assets/Damscray_DancingTiger.mp3');\n}\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  cnv.mousePressed(playSound);\n  textAlign(CENTER);\n  fill(255);\n  amp = new p5.Amplitude();\n  sound.connect(amp);\n}\n\nfunction playSound() {\n  sound.play();\n}\n\nfunction draw() {\n  let level = amp.getLevel();\n  level = map(level, 0, 0.2, 0, 255);\n  background(level, 0, 0);\n  text('tap to play', width/2, 20);\n  describe('The color of the background changes based on the amplitude of the sound.');\n}\n</code>\n</div>"
      ]
    },
    "p5.FFT": {
      "name": "p5.FFT",
      "shortname": "FFT",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/analysis/FFT.js",
      "line": 12,
      "description": "Analyze the frequency spectrum and waveform of sounds.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "params": [
        {
          "name": "fftSize",
          "description": "FFT analysis size. Must be a power of two between 16 and 1024. Defaults to 32.",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc;\n\nfunction setup(){\n  let cnv = createCanvas(100,100);\n  cnv.mouseClicked(togglePlay);\n  fft = new p5.FFT(32);\n  osc = new p5.TriOsc(440);\n  osc.connect(fft);\n}\n\nfunction draw(){\n  background(220);\n  let spectrum = fft.analyze();\n  noStroke();\n  fill(255, 0, 0);\n\n  for (let i = 0; i < spectrum.length; i++) {\n    let x = map(i, 0, spectrum.length, 0, width);     \n    let h = -height + map(spectrum[i], 0, 0.1, height, 0);\n    rect(x, height, width / spectrum.length, h )\n  }\n\n  let waveform = fft.waveform();\n  noFill();\n  beginShape();\n  stroke(20);\n  \n  for (let i = 0; i < waveform.length; i++){\n    let x = map(i, 0, waveform.length, 0, width);\n    let y = map( waveform[i], -1, 1, 0, height);\n    vertex(x,y);\n  }\n  endShape();\n  \n  textAlign(CENTER);\n  text('tap to play', width/2, 20);\n  osc.freq(map(mouseX, 0, width, 100, 2000));\n  describe('The sketch displays the frequency spectrum and waveform of the sound that plays.');\n}\n\nfunction togglePlay() {\n  osc.start();\n}\n</code>\n</div>"
      ]
    },
    "p5.p5soundMixEffect": {
      "name": "p5.p5soundMixEffect",
      "shortname": "p5soundMixEffect",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/core/p5soundMixEffect.js",
      "line": 10,
      "description": "Generic dry/wet mix method for p5 effect nodes",
      "is_constructor": 1,
      "extends": "p5soundNode"
    },
    "p5.p5soundNode": {
      "name": "p5.p5soundNode",
      "shortname": "p5soundNode",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/core/p5soundNode.js",
      "line": 9,
      "description": "Generic methods for p5.sound.js nodes",
      "is_constructor": 1
    },
    "p5.p5soundSource": {
      "name": "p5.p5soundSource",
      "shortname": "p5soundSource",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/core/p5soundSource.js",
      "line": 9,
      "description": "Generic methods for p5 sound source nodes",
      "is_constructor": 1,
      "extends": "p5soundNode"
    },
    "p5.Biquad": {
      "name": "p5.Biquad",
      "shortname": "Biquad",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Biquad.js",
      "line": 11,
      "description": "Filter the frequency range of a sound.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "params": [
        {
          "name": "cutoff",
          "description": "cutoff frequency of the filter, a value between 0 and 24000.",
          "type": "Number",
          "optional": true
        },
        {
          "name": "type",
          "description": "filter type. Options: \"lowpass\", \n                       \"highpass\", \"bandpass\", \"lowshelf\",\n                       \"highshelf\", \"notch\", \"allpass\", \n                       \"peaking\"",
          "type": "String",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\n///kind of Karplus-Strong string synthesis using p5.sound.js\n\nlet noise, lowPass, hiPass, delay, env, gain;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  textAlign(CENTER);\n  textSize(9);\n  text('click and drag mouse', width/2, height/2);\n  \n  noise = new p5.Noise('white');\n  env = new p5.Envelope(0);\n  lowPass = new p5.Biquad(1200, 'lowpass');\n  hiPass = new p5.Biquad(55, 'highpass');\n  delay = new p5.Delay(0.0005, 0.97);\n  gain = new p5.Gain(0.5);\n  noise.disconnect();\n  noise.connect(hiPass);\n  hiPass.disconnect();\n  hiPass.connect(env);\n  env.disconnect();\n  env.connect(lowPass);\n  lowPass.disconnect();\n  lowPass.connect(delay);\n\n  cnv.mousePressed(pluckStart);\n  cnv.mouseReleased(pluckStop);\n  cnv.mouseOut(pluckStop);\n  describe('A sketch that synthesizes string sounds.');\n}\n\nfunction pluckStart() {\n  background(0, 255, 255);\n  text('release to trigger decay', width/2, height/2);\n  let dtime = map(mouseX, 0, width, 0.009, 0.001);\n  delay.delayTime(dtime, 0);\n  noise.start();\n  env.triggerAttack();\n}\n\nfunction pluckStop() {\n  background(220);\n  text('click to pluck', width/2, height/2);\n  env.triggerRelease();\n}\n</code>\n</div>"
      ]
    },
    "p5.LowPass": {
      "name": "p5.LowPass",
      "shortname": "LowPass",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Biquad.js",
      "line": 122,
      "description": "Creates a Lowpass Biquad filter.",
      "is_constructor": 1,
      "extends": "Biquad",
      "params": [
        {
          "name": "freq",
          "description": "Set the cutoff frequency of the filter",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.HighPass": {
      "name": "p5.HighPass",
      "shortname": "HighPass",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Biquad.js",
      "line": 136,
      "description": "Creates a Highpass Biquad filter.",
      "is_constructor": 1,
      "extends": "Biquad",
      "params": [
        {
          "name": "freq",
          "description": "Set the cutoff frequency of the filter",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.BandPass": {
      "name": "p5.BandPass",
      "shortname": "BandPass",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Biquad.js",
      "line": 150,
      "description": "Creates a Bandpass Biquad filter.",
      "is_constructor": 1,
      "extends": "Biquad",
      "params": [
        {
          "name": "freq",
          "description": "Set the cutoff frequency of the filter",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.Delay": {
      "name": "p5.Delay",
      "shortname": "Delay",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Delay.js",
      "line": 10,
      "description": "A delay effect with parameters for feedback, and delay time.",
      "is_constructor": 1,
      "extends": "p5soundMixEffect",
      "params": [
        {
          "name": "delayTime",
          "description": "The delay time in seconds between 0 and 1. Defaults to 0.250.",
          "type": "Number",
          "optional": true
        },
        {
          "name": "feedback",
          "description": "The amount of feedback in the delay line between 0 and 1. Defaults to 0.2.",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  textAlign(CENTER);\n  text('tap to play', width/2, height/2);\n\n  osc = new p5.Oscillator('square');\n  osc.amp(0.5);\n  delay = new p5.Delay(0.12, 0.7);\n  \n  osc.disconnect();\n  osc.connect(delay);\n\n  cnv.mousePressed(oscStart);\n  describe('Tap to play a square wave with delay effect.');\n}\n\nfunction oscStart() {\n  osc.start();\n}\n\n</code>\n</div>\nfunction mouseReleased() {\n  osc.stop();\n}"
      ]
    },
    "p5.Envelope": {
      "name": "p5.Envelope",
      "shortname": "Envelope",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Envelope.js",
      "line": 10,
      "description": "Generate an amplitude envelope.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "params": [
        {
          "name": "attack",
          "description": "how quickly the envelope reaches the maximum level",
          "type": "Number",
          "optional": true
        },
        {
          "name": "decay",
          "description": "how quickly the envelope reaches the sustain level",
          "type": "Number",
          "optional": true
        },
        {
          "name": "sustain",
          "description": "how long the envelope stays at the decay level",
          "type": "Number",
          "optional": true
        },
        {
          "name": "release",
          "description": "how quickly the envelope fades out after the sustain level",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nconsole.log('do an example here');\n</code>\n</div>"
      ]
    },
    "p5.Gain": {
      "name": "p5.Gain",
      "shortname": "Gain",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Gain.js",
      "line": 10,
      "description": "Generate a gain node to use for mixing and main volume.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "example": [
        "\n<div>\n<code>\nlet cnv, soundFile, osc, gain;\n\nfunction preload() {\n  soundFile = loadSound('assets/Damscray_DancingTiger.mp3');\n}\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  cnv.mousePressed(playSound);\n  background(220);\n  gain = new p5.Gain(0.74);\n  osc = new p5.Oscillator();\n  osc.amp(0.74);\n  osc.disconnect();\n  soundFile.loop();\n  soundFile.disconnect();\n\n  //connect both sound sources to gain node\n  soundFile.connect(gain);\n  osc.connect(gain);\n}\n\nfunction playSound() {\n  soundFile.play();\n  osc.play();\n}\n\nfunction draw() {\n  let level = map(mouseX, 0, width, 0, 1);\n  gain.amp(level);\n}\n</code>\n</div>"
      ]
    },
    "p5.Panner": {
      "name": "p5.Panner",
      "shortname": "Panner",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Panner.js",
      "line": 11,
      "description": "A panning effect.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "example": [
        "\n<div>\n<code>\nlet panner, lfo, soundfile, cnv;\n\nfunction preload() {\n  soundfile = loadSound('/assets/beat.mp3');\n}\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  background(220);\n  cnv.mousePressed(startSound);\n  \n  panner = new p5.Panner();\n  lfo = new p5.Oscillator(1);\n  //disconnect lfo from speakers because we don't want to hear it!\n  lfo.disconnect();\n  panner.pan(lfo);\n\n  soundfile.loop();\n  soundfile.disconnect();\n  soundfile.connect(panner);\n  \n}\n\nfunction startSound() {\n  lfo.start();\n  soundfile.start();\n}\n</code>\n</div>"
      ]
    },
    "p5.Panner3D": {
      "name": "p5.Panner3D",
      "shortname": "Panner3D",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Panner3D.js",
      "line": 10,
      "description": "A 3D sound spatializer.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "example": [
        "\n<div>\n<code>\nlet radius = 10 ; \nlet soundSource, spatializer;\nlet font;\nlet cnv;\n\nlet x = 0;\nlet y = 0;\nlet z = 100;\n\nlet vX;\nlet vY;\nlet vZ;\n\nfunction preload() {\n  soundSource = loadSound('/assets/beat.mp3');\n  font = loadFont('/assets/SourceSansPro-Regular.otf');\n}\n\nfunction setup() {\n  describe(\n    'A 3D shape with a sound source attached to it. The sound source is spatialized using the Panner3D class. Click to play the sound.'\n  );\n  cnv = createCanvas(100, 100, WEBGL);\n  cnv.mousePressed(playSound);\n\n  camera(0, 0, 0, 0, 0, 1);\n  \n  textFont(font);\n  textAlign(CENTER,CENTER);\n  \n  angleMode(DEGREES);\n\n  vX = random(-0.5, 0.5);\n  vY = random(-0.5, 0.5);\n  vZ = random(-0.5, 0.5) * 1.5;\n\n  spatializer = new p5.Panner3D();\n  spatializer.maxDist(100);\n  soundSource.loop();\n  soundSource.disconnect();\n  soundSource.connect(spatializer);\n}\n\nfunction playSound() {\n  soundSource.play();\n}\n\nfunction draw() {\n  background(220);\n  push();\n  textSize(5);\n  fill(0);\n  translate(0,0,100);\n  //text('click to play', 0, 0);\n  pop();\n  // Update Box and Sound Source Position\n  push();\n  moveSoundBox();\n  box(5, 5, 5);\n  pop();\n}\n\n// Rotate 1 degree per frame along all three axes\nfunction moveSoundBox() {\n  x = x + vX;\n  y = y + vY;\n  z = z + vZ;\n\n  if (x > radius || x < -radius) {\n    vX = -vX;\n  }\n  if (y > radius || y < -radius) {\n    vY = -vY;\n  }\n  if (z > 250 || z < 80) {\n    vZ = -vZ;\n  }\n  //set the position of the 3D panner\n  spatializer.set(x, y, z);\n  //set the postion of the box\n  translate(x, y, z);\n  rotateX(45 + frameCount);\n  rotateZ(45);\n}\n</code>\n</div>"
      ]
    },
    "p5.PitchShifter": {
      "name": "p5.PitchShifter",
      "shortname": "PitchShifter",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/PitchShifter.js",
      "line": 10,
      "description": "Change the pitch of a sound.",
      "is_constructor": 1,
      "extends": "p5soundNode",
      "example": [
        "\n<div>\n<code>\n let cnv, soundFile, pitchShifter;\n \nfunction preload() {\n  soundFile = loadSound('/assets/beatbox.mp3');\n}\n \nfunction setup() {\n  cnv = createCanvas(100, 100);\n  cnv.mousePressed(startSound);\n  background(220);\n  textAlign(CENTER);\n  textSize(9);\n  text('click to play sound', width/2, height/2);\n  pitchShifter = new p5.PitchShifter();\n  \n  soundFile.disconnect();\n  soundFile.connect(pitchShifter);\n  //change the pitch and retrigger sample when done playing\n  soundFile.onended(changePitch);\n}\n\nfunction startSound () {\n  soundFile.play();\n}\n \nfunction changePitch () {\n  let pitchValue = random(-12, 12);\n  pitchShifter.shift(pitchValue);\n  soundFile.play();\n}\n</code>\n</div>"
      ]
    },
    "p5.Reverb": {
      "name": "p5.Reverb",
      "shortname": "Reverb",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/effects/Reverb.js",
      "line": 10,
      "description": "Add reverb to a sound.",
      "is_constructor": 1,
      "extends": "p5soundMixEffect",
      "params": [
        {
          "name": "decayTime",
          "description": "Set the decay time of the reverb",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet noise, osc, env, reverb;\nlet randomTime = 0;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  cnv.mousePressed(playSound);\n  noise = new p5.Noise();\n  env = new p5.Envelope();\n  reverb = new p5.Reverb();\n  noise.disconnect();\n  noise.connect(env);\n  env.disconnect();\n  env.connect(reverb);\n  noise.start();\n  textAlign(CENTER);\n}\n\nfunction playSound() {\n randomTime = random(0.1, 3);\n reverb.set(randomTime); \n env.play();\n}\n\nfunction draw() {\n  background(220);\n  text('click to play', width/2, 20);\n  text('decay ' + round(randomTime, 2), width/2, 40);\n  describe('Click to play a sound with a random decay time.');\n}\n</code>\n</div>"
      ]
    },
    "p5.AudioIn": {
      "name": "p5.AudioIn",
      "shortname": "AudioIn",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/AudioIn.js",
      "line": 10,
      "description": "Get sound from an input source, typically a computer microphone.",
      "is_constructor": 1,
      "extends": "p5soundSource",
      "example": [
        "\n<div>\n<code>\nlet mic, delay, filter;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  cnv.mousePressed(startMic);\n  background(220);\n  \n  mic = new p5.AudioIn();\n  delay = new p5.Delay(0.74, 0.1);\n  filter = new p5.Biquad(600, \"bandpass\");\n  \n  mic.disconnect();\n  mic.connect(delay);\n  delay.disconnect();\n  delay.connect(filter);\n  \n  textAlign(CENTER);\n  textWrap(WORD);\n  textSize(10);\n  text('click to open mic, watch out for feedback', 0, 20, 100);\n  describe('a sketch that accesses the user\\'s microphone and connects it to a delay line.')\n}\n\nfunction startMic() {\n  mic.start();\n}\n\nfunction draw() {\n  d = map(mouseX, 0, width, 0.0, 0.5);\n  delay.delayTime(d);\n}\n</code>\n</div>"
      ]
    },
    "p5.Noise": {
      "name": "p5.Noise",
      "shortname": "Noise",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Noise.js",
      "line": 10,
      "description": "Generate a buffer with random values.",
      "is_constructor": 1,
      "extends": "p5soundSource",
      "params": [
        {
          "name": "type",
          "description": "- the type of noise (white, pink, brown)",
          "type": "String",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet noise, env, cnv;\nlet types = ['white', 'pink', 'brown'];\nlet noiseType = 'brown';\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  textAlign(CENTER);\n  cnv.mousePressed(start);\n  noise = new p5.Noise(noiseType);\n  env = new p5.Envelope(0.01, 0.1, 0.15, 0.5);\n  noise.disconnect();\n  noise.connect(env);\n  noise.start();\n}\n\nfunction start() {\n  noiseType = random(types);\n  noise.type(noiseType);\n  env.play();\n}\n\nfunction draw() {\n  background(noiseType);\n  text('tap to play', width/2, 20);\n  let txt = 'type: ' + noiseType;\n  text(txt, width/2, 40);\n}\n</code>\n</div>"
      ]
    },
    "p5.Oscillator": {
      "name": "p5.Oscillator",
      "shortname": "Oscillator",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Oscillator.js",
      "line": 10,
      "description": "Generate Sine, Triangle, Square and Sawtooth waveforms.",
      "is_constructor": 1,
      "extends": "p5soundSource",
      "params": [
        {
          "name": "frequency",
          "description": "frequency defaults to 440Hz",
          "type": "Number",
          "optional": true
        },
        {
          "name": "type",
          "description": "type of oscillator. Options:\n                       'sine' (default), 'triangle',\n                       'sawtooth', 'square'",
          "type": "String",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc, playing, freq, amp;\n\nfunction setup() {\n  describe(\"a sketch that demonstrates the frequency and amplitude parameters of an oscillator.\");\n  let cnv = createCanvas(100, 100);\n  cnv.mousePressed(playOscillator);\n  osc = new p5.Oscillator();\n}\n\nfunction draw() {\n  background(220)\n  freq = constrain(map(mouseX, 0, width, 100, 500), 100, 500);\n  //amp = constrain(map(mouseY, height, 0, 0, 1), 0, 1);\n  text('tap to play', 20, 20);\n  text('freq: ' + freq, 20, 40);\n  //text('amp: ' + amp, 20, 60);\n\n  if (playing) {\n    // smooth the transitions by 0.1 seconds\n    osc.freq(freq);\n    //osc.amp(amp);\n  }\n}\n\nfunction playOscillator() {\n  // starting an oscillator on a user gesture will enable audio\n  // in browsers that have a strict autoplay policy.\n  osc.start();\n  playing = true;\n}\n\nfunction mouseReleased() {\n  // ramp amplitude to 0 over 0.5 seconds\n  //osc.amp(0, 0.5);\n  playing = false;\n}\n</code> \n</div>"
      ]
    },
    "p5.SawOsc": {
      "name": "p5.SawOsc",
      "shortname": "SawOsc",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Oscillator.js",
      "line": 118,
      "description": "Creates a sawtooth oscillator.",
      "is_constructor": 1,
      "extends": "Oscillator",
      "params": [
        {
          "name": "freq",
          "description": "Set the frequency",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.SqrOsc": {
      "name": "p5.SqrOsc",
      "shortname": "SqrOsc",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Oscillator.js",
      "line": 132,
      "description": "Creates a square oscillator.",
      "is_constructor": 1,
      "extends": "Oscillator",
      "params": [
        {
          "name": "freq",
          "description": "Set the frequency",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.TriOsc": {
      "name": "p5.TriOsc",
      "shortname": "TriOsc",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Oscillator.js",
      "line": 146,
      "description": "Creates a triangle oscillator.",
      "is_constructor": 1,
      "extends": "Oscillator",
      "params": [
        {
          "name": "freq",
          "description": "Set the frequency",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.SinOsc": {
      "name": "p5.SinOsc",
      "shortname": "SinOsc",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "p5.sound",
      "namespace": "",
      "file": "src/sources/Oscillator.js",
      "line": 160,
      "description": "Creates a sine oscillator.",
      "is_constructor": 1,
      "extends": "Oscillator",
      "params": [
        {
          "name": "freq",
          "description": "Set the frequency",
          "type": "Number",
          "optional": true
        }
      ]
    },
    "p5.SoundFile": {
      "name": "p5.SoundFile",
      "shortname": "SoundFile",
      "classitems": [],
      "plugins": [],
      "extensions": [],
      "plugin_for": [],
      "extension_for": [],
      "module": "p5.sound",
      "submodule": "SoundFile",
      "namespace": "",
      "file": "src/sources/SoundFile.js",
      "line": 72,
      "description": "Load and play sound files.",
      "is_constructor": 1,
      "extends": "p5soundSource",
      "example": [
        "\n<div>\n<code>\nlet sound, amp, delay, cnv;\n\nfunction preload() {\n  //replace this sound with something local with rights to distribute\n  //need to fix local asset loading first though :) \n  sound = loadSound('/assets/doorbell.mp3');\n}\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  textAlign(CENTER);\n  cnv.mousePressed(playSound);\n  amp = new p5.Amplitude();\n  delay = new p5.Delay();\n  sound.disconnect();\n  sound.connect(delay);\n  delay.connect(amp);\n}\n\nfunction playSound() {\n  sound.play();\n}\n\nfunction draw() {\n  let dtime = map(mouseX, 0, width, 0, 1);\n  delay.delayTime(dtime);\n  let f = map(mouseY, 0, height, 0, .75);\n  delay.feedback(f);\n  let level = map(amp.getLevel(), 0, 0.5, 0, 255);\n  background(level, 0, 0);\n  fill(255);\n  text('click to play', width/2, 20);\n }\n</code>\n</div>"
      ]
    }
  },
  "classitems": [
    {
      "itemtype": "property",
      "name": "let",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>Declares a new variable.</p>\n<p>A variable is a container for a value. For example, a variable might\ncontain a creature's x-coordinate as a <code>Number</code> or its name as a\n<code>String</code>. Variables can change value by reassigning them as follows:</p>\n<pre><code class=\"language-js\">// Declare the variable x and assign it the value 10.\nlet x = 10;\n\n// Reassign x to 50.\nx = 50;</code></pre><p>Variables have block scope. When a variable is declared between curly\nbraces <code>{}</code>, it only exists within the block defined by those braces. For\nexample, the following code would throw a <code>ReferenceError</code> because <code>x</code> is\ndeclared within the <code>setup()</code> function's block:</p>\n<pre><code class=\"language-js\">function setup() {\n  createCanvas(100, 100);\n\n  let x = 50;\n}\n\nfunction draw() {\n  background(200);\n\n  // x was declared in setup(), so it can't be referenced here.\n  circle(x, 50, 20);\n}</code></pre><p>Variables declared outside of all curly braces <code>{}</code> are in the global\nscope. A variable that's in the global scope can be used and changed\nanywhere in a sketch:</p>\n<pre><code class=\"language-js\">let x = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n}\n\nfunction draw() {\n  background(200);\n\n  // Change the value of x.\n  x += 10;\n\n  circle(x, 50, 20);\n}</code></pre>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(220);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Create the message variable.\n  let message = 'Hello, 🌍!';\n\n  // Display the message.\n  text(message, 50, 50);\n\n  describe('The text \"Hello, 🌍!\" written on a gray background.');\n}",
        "let x = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle moves from left to right against a gray background.');\n}\n\nfunction draw() {\n  background(220);\n\n  // Change the value of x.\n  x += 1;\n\n  circle(x, 50, 20);\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "if",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A way to choose whether to run a block of code.</p>\n<p><code>if</code> statements are helpful for running a block of code based on a\ncondition. For example, an <code>if</code> statement makes it easy to express the\nidea \"Draw a circle if the mouse is pressed.\":</p>\n<pre><code class=\"language-js\">if (mouseIsPressed === true) {\n  circle(mouseX, mouseY, 20);\n}</code></pre><p>The statement header begins with the keyword <code>if</code>. The expression in\nparentheses <code>mouseIsPressed === true</code> is a <code>Boolean</code> expression that's\neither <code>true</code> or <code>false</code>. The code between the curly braces <code>{}</code> is the if\nstatement's body. The body only runs if the <code>Boolean</code> expression is <code>true</code>.</p>\n<p>The <a href=\"#/p5/mouseIsPressed\">mouseIsPressed</a> system variable is\nalways <code>true</code> or <code>false</code>, so the code snippet above could also be written\nas follows:</p>\n<pre><code class=\"language-js\">if (mouseIsPressed) {\n  circle(mouseX, mouseY, 20);\n}</code></pre><p>An <code>if</code>-<code>else</code> statement adds a block of code that runs if the <code>Boolean</code>\nexpression is <code>false</code>. For example, here's an <code>if</code>-<code>else</code> statement that\nexpresses the idea \"Draw a circle if the mouse is pressed. Otherwise,\ndisplay a message.\":</p>\n<pre><code class=\"language-js\">if (mouseIsPressed === true) {\n  // When true.\n  circle(mouseX, mouseY, 20);\n} else {\n  // When false.\n  text('Click me!', 50, 50);\n}</code></pre><p>There are two possible paths, or branches, in this code snippet. The\nprogram must follow one branch or the other.</p>\n<p>An <code>else</code>-<code>if</code> statement makes it possible to add more branches.\n<code>else</code>-<code>if</code> statements run different blocks of code under different\nconditions. For example, an <code>else</code>-<code>if</code> statement makes it easy to express\nthe idea \"If the mouse is on the left, paint the canvas white. If the mouse\nis in the middle, paint the canvas gray. Otherwise, paint the canvas\nblack.\":</p>\n<pre><code class=\"language-js\">if (mouseX &lt; 33) {\n  background(255);\n} else if (mouseX &lt; 67) {\n  background(200);\n} else {\n  background(0);\n}</code></pre><p><code>if</code> statements can add as many <code>else</code>-<code>if</code> statements as needed. However,\nthere can only be one <code>else</code> statement and it must be last.</p>\n<p><code>if</code> statements can also check for multiple conditions at once. For\nexample, the <code>Boolean</code> operator <code>&&</code> (AND) checks whether two expressions\nare both <code>true</code>:</p>\n<pre><code class=\"language-js\">if (keyIsPressed === true && key === 'p') {\n  text('You pressed the \"p\" key!', 50, 50);\n}</code></pre><p>If the user is pressing a key AND that key is <code>'p'</code>, then a message will\ndisplay.</p>\n<p>The <code>Boolean</code> operator <code>||</code> (OR) checks whether at least one of two\nexpressions is <code>true</code>:</p>\n<pre><code class=\"language-js\">if (keyIsPressed === true || mouseIsPressed === true) {\n  text('You did something!', 50, 50);\n}</code></pre><p>If the user presses a key, or presses a mouse button, or both, then a\nmessage will display.</p>\n<p>The body of an <code>if</code> statement can contain another <code>if</code> statement. This is\ncalled a \"nested <code>if</code> statement.\" For example, nested <code>if</code> statements make\nit easy to express the idea \"If a key is pressed, then check if the key is\n<code>'r'</code>. If it is, then set the fill to red.\":</p>\n<pre><code class=\"language-js\">if (keyIsPressed === true) {\n  if (key === 'r') {\n    fill('red');\n  }\n}</code></pre><p>See <a href=\"#/p5/Boolean\">Boolean</a> and <a href=\"#/p5/Number\">Number</a>\nto learn more about these data types and the operations they support.</p>\n",
      "example": [
        "// Click the mouse to show the circle.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse user clicks on the canvas.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  if (mouseIsPressed === true) {\n    circle(mouseX, mouseY, 20);\n  }\n}",
        "// Click the mouse to show different shapes.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white ellipse on a gray background. The ellipse becomes a circle when the user presses the mouse.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  if (mouseIsPressed === true) {\n    circle(50, 50, 20);\n  } else {\n    ellipse(50, 50, 20, 50);\n  }\n}",
        "// Move the mouse to change the background color.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A square changes color from white to black as the user moves the mouse from left to right.'\n  );\n}\n\nfunction draw() {\n  if (mouseX < 33) {\n    background(255);\n  } else if (mouseX < 67) {\n    background(200);\n  } else {\n    background(0);\n  }\n}",
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle drawn on a gray background. The circle changes color to red when the user presses the \"r\" key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  if (keyIsPressed === true) {\n    if (key === 'r') {\n      fill('red');\n    }\n  }\n\n  circle(50, 50, 40);\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "function",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A named group of statements.</p>\n<p><a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions\" target=\"_blank\">Functions</a>\nhelp with organizing and reusing code. For example, functions make it easy\nto express the idea \"Draw a flower.\":</p>\n<pre><code class=\"language-js\">function drawFlower() {\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(20);\n\n  // Draw a flower emoji.\n  text('🌸', 50, 50);\n}</code></pre><p>The function header begins with the keyword <code>function</code>. The function's\nname, <code>drawFlower</code>, is followed by parentheses <code>()</code> and curly braces <code>{}</code>.\nThe code between the curly braces is called the function's body. The\nfunction's body runs when the function is called like so:</p>\n<pre><code class=\"language-js\">drawFlower();</code></pre><p>Functions can accept inputs by adding parameters to their headers.\nParameters are placeholders for values that will be provided when the\nfunction is called. For example, the <code>drawFlower()</code> function could include\na parameter for the flower's size:</p>\n<pre><code class=\"language-js\">function drawFlower(size) {\n  // Style the text.\n  textAlign(CENTER, CENTER);\n\n  // Use the size parameter.\n  textSize(size);\n\n  // Draw a flower emoji.\n  text('🌸', 50, 50);\n}</code></pre><p>Parameters are part of the function's declaration. Arguments are provided\nby the code that calls a function. When a function is called, arguments are\nassigned to parameters:</p>\n<pre><code class=\"language-js\">// The argument 20 is assigned to the parameter size.\ndrawFlower(20);</code></pre><p>Functions can have multiple parameters separated by commas. Parameters\ncan have any type. For example, the <code>drawFlower()</code> function could accept\n<code>Number</code> parameters for the flower's x- and y-coordinates along with its\nsize:</p>\n<pre><code class=\"language-js\">function drawFlower(x, y, size) {\n  // Style the text.\n  textAlign(CENTER, CENTER);\n\n  // Use the size parameter.\n  textSize(size);\n\n  // Draw a flower emoji.\n  // Use the x and y parameters.\n  text('🌸', x, y);\n}</code></pre><p>Functions can also produce outputs by adding a <code>return</code> statement:</p>\n<pre><code class=\"language-js\">function double(x) {\n  let answer = 2 * x;\n  return answer;\n}</code></pre><p>The expression following <code>return</code> can produce an output that's used\nelsewhere. For example, the output of the <code>double()</code> function can be\nassigned to a variable:</p>\n<pre><code class=\"language-js\">let six = double(3);\ntext(`3 x 2 = ${six}`, 50, 50);</code></pre>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A pink flower on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Call the drawFlower() function.\n  drawFlower();\n}\n\n// Declare a function that draws a flower at the\n// center of the canvas.\nfunction drawFlower() {\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(20);\n\n  // Draw a flower emoji.\n  text('🌸', 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A pink flower on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Call the drawFlower() function and pass values for\n  // its position and size.\n  drawFlower(50, 50, 20);\n}\n\n// Declare a function that draws a flower at the\n// center of the canvas.\nfunction drawFlower(x, y, size) {\n  // Style the text.\n  textAlign(CENTER, CENTER);\n\n  // Use the size parameter.\n  textSize(size);\n\n  // Draw a flower emoji.\n  // Use the x and y parameters.\n  text('🌸', x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('The message \"Hello, 🌍!\" written on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a greeting.\n  let greeting = createGreeting('🌍');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the greeting.\n  text(greeting, 50, 50);\n}\n\n// Return a string with a personalized greeting.\nfunction createGreeting(name) {\n  let message = `Hello, ${name}!`;\n  return message;\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "Boolean",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A value that's either <code>true</code> or <code>false</code>.</p>\n<p><code>Boolean</code> values help to make decisions in code. They appear any time a\nlogical condition is checked. For example, the condition\n\"Is a mouse button being pressed?\" must be either <code>true</code> or\n<code>false</code>:</p>\n<pre><code class=\"language-js\">// If the user presses the mouse, draw a circle at\n// the mouse's location.\nif (mouseIsPressed === true) {\n  circle(mouseX, mouseY, 20);\n}</code></pre><p>The <code>if</code> statement checks whether\n<a href=\"#/p5/mouseIsPressed\">mouseIsPressed</a> is <code>true</code> and draws a\ncircle if it is. <code>Boolean</code> expressions such as <code>mouseIsPressed === true</code>\nevaluate to one of the two possible <code>Boolean</code> values: <code>true</code> or <code>false</code>.</p>\n<p>The <code>===</code> operator (EQUAL) checks whether two values are equal. If they\nare, the expression evaluates to <code>true</code>. Otherwise, it evaluates to\n<code>false</code>.</p>\n<p>Note: There's also a <code>==</code> operator with two <code>=</code> instead of three. Don't use\nit.</p>\n<p>The <a href=\"#/p5/mouseIsPressed\">mouseIsPressed</a> system variable is\nalways <code>true</code> or <code>false</code>, so the code snippet above could also be written\nas follows:</p>\n<pre><code class=\"language-js\">if (mouseIsPressed) {\n  circle(mouseX, mouseY, 20);\n}</code></pre><p>The <code>!==</code> operator (NOT EQUAL) checks whether two values are not equal, as\nin the following example:</p>\n<pre><code class=\"language-js\">if (2 + 2 !== 4) {\n  text('War is peace.', 50, 50);\n}</code></pre><p>Starting from the left, the arithmetic expression <code>2 + 2</code> produces the\nvalue <code>4</code>. The <code>Boolean</code> expression <code>4 !== 4</code> evaluates to <code>false</code> because\n<code>4</code> is equal to itself. As a result, the <code>if</code> statement's body is skipped.</p>\n<p>Note: There's also a <code>!=</code> operator with one <code>=</code> instead of two. Don't use\nit.</p>\n<p>The <code>Boolean</code> operator <code>&&</code> (AND) checks whether two expressions are both\n<code>true</code>:</p>\n<pre><code class=\"language-js\">if (keyIsPressed === true && key === 'p') {\n  text('You pressed the \"p\" key!', 50, 50);\n}</code></pre><p>If the user is pressing a key AND that key is <code>'p'</code>, then a message will\ndisplay.</p>\n<p>The <code>Boolean</code> operator <code>||</code> (OR) checks whether at least one of two\nexpressions is <code>true</code>:</p>\n<pre><code class=\"language-js\">if (keyIsPressed === true || mouseIsPressed === true) {\n  text('You did something!', 50, 50);\n}</code></pre><p>If the user presses a key, or presses a mouse button, or both, then a\nmessage will display.</p>\n<p>The following truth table summarizes a few common scenarios with <code>&&</code> and\n<code>||</code>:</p>\n<pre><code class=\"language-js\">true && true  // true\ntrue && false // false\nfalse && false // false\ntrue || true  // true\ntrue || false // true\nfalse || false // false</code></pre><p>The relational operators <code>></code>, <code><</code>, <code>>=</code>, and <code><=</code> also produce <code>Boolean</code>\nvalues:</p>\n<pre><code class=\"language-js\">2 &gt; 1 // true\n2 &lt; 1 // false\n2 &gt;= 2 // true\n2 &lt;= 2 // true</code></pre><p>See <a href=\"#/p5/if\">if</a> for more information about <code>if</code> statements and\n<a href=\"#/p5/Number\">Number</a> for more information about <code>Number</code>s.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square. When the user presses the mouse, a circle appears at that location.');\n}\n\nfunction draw() {\n  background(200);\n\n  // If the user presses the mouse, draw a circle at that location.\n  if (mouseIsPressed) {\n    circle(mouseX, mouseY, 20);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square. When the user presses the mouse, a circle appears at that location.');\n}\n\nfunction draw() {\n  background(200);\n\n  // If the user presses the mouse, draw a circle at that location.\n  if (mouseIsPressed === true) {\n    circle(mouseX, mouseY, 20);\n  }\n}",
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square that turns pink when the user presses the mouse or a key.');\n}\n\nfunction draw() {\n  background(200);\n\n  // If the user presses the mouse, change the background color.\n  if (mouseIsPressed === true || keyIsPressed === true) {\n    background('deeppink');\n  }\n}",
        "// Click the canvas to begin detecting key presses.\n\n// Create a Boolean variable.\nlet isPlaying = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'The message \"Begin?\\nY or N\" written in green on a black background. The message \"Good luck!\" appears when they press the \"y\" key.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(16);\n  fill(0, 255, 0);\n\n  // Display a different message when the user begins playing.\n  if (isPlaying === false) {\n    text('Begin?', 50, 40);\n    text('Y or N', 50, 60);\n  } else {\n    text('Good luck!', 50, 50);\n  }\n}\n\n// Start playing when the user presses the 'y' key.\nfunction keyPressed() {\n  if (key === 'y') {\n    isPlaying = true;\n  }\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "String",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A sequence of text characters.</p>\n<p>The <code>String</code> data type is helpful for working with text. For example, a\nstring could contain a welcome message:</p>\n<pre><code class=\"language-js\">// Use a string literal.\ntext('Hello!', 10, 10);</code></pre><pre><code class=\"language-js\">// Create a string variable.\nlet message = 'Hello!';\n\n// Use the string variable.\ntext(message, 10, 10);</code></pre><p>The most common way to create strings is to use some form of quotations as\nfollows:</p>\n<pre><code class=\"language-js\">text(\"hi\", 50, 50);</code></pre><pre><code class=\"language-js\">text('hi', 50, 50);</code></pre><pre><code class=\"language-js\">text(`hi`, 50, 50);</code></pre><p><code>\"hi\"</code>, <code>'hi'</code>, and <code>hi</code> are all string literals. A \"literal\" means a\nvalue was actually written, as in <code>text('hi', 50, 50)</code>. By contrast,\n<code>text(message, 50, 50)</code> uses the variable <code>message</code>, so it isn't a string\nliteral.</p>\n<p>Single quotes <code>''</code> and double quotes <code>\"\"</code> mean the same thing. It's nice to\nhave the option for cases when a string contains one type of quote:</p>\n<pre><code class=\"language-js\">text(\"What's up?\", 50, 50);</code></pre><pre><code class=\"language-js\">text('Air quotes make you look \"cool.\"', 50, 50);</code></pre><p>Backticks <code>``</code> create template literals. Template literals have many uses.\nFor example, they can contain both single and double quotes as needed:</p>\n<pre><code class=\"language-js\">text(`\"Don't you forget about me\"`,  10, 10);</code></pre><p>Template literals are helpful when strings are created from variables like\nso:</p>\n<pre><code class=\"language-js\">let size = random(10, 20);\ncircle(50, 50, size);\n\ntext(`The circle's diameter is ${size} pixels.`,  10, 10);</code></pre><p>The <code>size</code> variable's value will replace <code>${size}</code> when the string is\ncreated. <code>${}</code> is a placeholder for any value. That means an expression can\nbe used, as in <code>${round(PI, 3)}</code>. All of the following are valid template\nliterals:</p>\n<pre><code class=\"language-js\">text(`π is about ${round(PI, 2)} pixels.`,  10, 10);\ntext(`It's ${mouseX &lt; width / 2} that I'm on the left half of the canvas.`,  10, 30);</code></pre><p>Template literals can include several variables:</p>\n<pre><code class=\"language-js\">let x = random(0, 100);\nlet y = random(0, 100);\nlet size = random(10, 20);\ncircle(x, y, size);\n\ntext(`The circle at (${x}, ${y}) has a diameter of ${size} pixels.`,  10, 10);</code></pre><p>Template literals are also helpful for creating multi-line text like so:</p>\n<pre><code class=\"language-js\">let poem = `My sketch doesn't run;\nit waits for me patiently\nwhile bugs point the way.`;\n\ntext(poem, 10, 10);</code></pre>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(20);\n\n  // Display a welcome message.\n  text('Hello!', 50, 50);\n\n  describe('The text \"Hello!\" written on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(20);\n\n  // Create a string variable.\n  let world = '🌍';\n\n  // Display a welcome message using a template string.\n  text(`Hello, ${world}!`, 50, 50);\n\n  describe('The text \"Hello, 🌍!\" written on a gray background.');\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "Number",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A number that can be positive, negative, or zero.</p>\n<p>The <code>Number</code> data type is useful for describing values such as position,\nsize, and color. A number can be an integer such as 20 or a decimal number\nsuch as 12.34. For example, a circle's position and size can be described\nby three numbers:</p>\n<pre><code class=\"language-js\">circle(50, 50, 20);</code></pre><pre><code class=\"language-js\">circle(50, 50, 12.34);</code></pre><p>Numbers support basic arithmetic and follow the standard order of\noperations: Parentheses, Exponents, Multiplication, Division, Addition,\nand Subtraction (PEMDAS). For example, it's common to use arithmetic\noperators with p5.js' system variables that are numbers:</p>\n<pre><code class=\"language-js\">// Draw a circle at the center.\ncircle(width / 2, height / 2, 20);</code></pre><pre><code class=\"language-js\">// Draw a circle that moves from left to right.\ncircle(frameCount * 0.01, 50, 20);</code></pre><p>Here's a quick overview of the arithmetic operators:</p>\n<pre><code class=\"language-js\">1 + 2 // Add\n1 - 2 // Subtract\n1 * 2 // Multiply\n1 / 2 // Divide\n1 % 2 // Remainder\n1 ** 2 // Exponentiate</code></pre><p>It's common to update a number variable using arithmetic. For example, an\nobject's location can be updated like so:</p>\n<pre><code class=\"language-js\">x = x + 1;</code></pre><p>The statement above adds 1 to a variable <code>x</code> using the <code>+</code> operator. The\naddition assignment operator <code>+=</code> expresses the same idea:</p>\n<pre><code class=\"language-js\">x += 1;</code></pre><p>Here's a quick overview of the assignment operators:</p>\n<pre><code class=\"language-js\">x += 2 // Addition assignment\nx -= 2 // Subtraction assignment\nx *= 2 // Multiplication assignment\nx /= 2 // Division assignment\nx %= 2 // Remainder assignment</code></pre><p>Numbers can be compared using the\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#relational_operators\" target=\"_blank\">relational operators</a>\n<code>></code>, <code><</code>, <code>>=</code>, <code><=</code>, <code>===</code>, and <code>!==</code>.  For example, a sketch's\n<a href=\"#/p5/frameCount\">frameCount</a> can be used as a timer:</p>\n<pre><code class=\"language-js\">if (frameCount &gt; 1000) {\n  text('Game over!', 50, 50);\n}</code></pre><p>An expression such as <code>frameCount > 1000</code> evaluates to a <code>Boolean</code> value\nthat's either <code>true</code> or <code>false</code>. The relational operators all produce\n<code>Boolean</code> values:</p>\n<pre><code class=\"language-js\">2 &gt; 1 // true\n2 &lt; 1 // false\n2 &gt;= 2 // true\n2 &lt;= 2 // true\n2 === 2 // true\n2 !== 2 // false</code></pre><p>See <a href=\"#/p5/Boolean\">Boolean</a> for more information about comparisons and conditions.</p>\n<p>Note: There are also <code>==</code> and <code>!=</code> operators with one fewer <code>=</code>. Don't use them.</p>\n<p>Expressions with numbers can also produce special values when something\ngoes wrong:</p>\n<pre><code class=\"language-js\">sqrt(-1) // NaN\n1 / 0 // Infinity</code></pre><p>The value <code>NaN</code> stands for\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\" target=\"_blank\">Not-A-Number</a>.\n<code>NaN</code> appears when calculations or conversions don't work. <code>Infinity</code> is a\nvalue that's larger than any number. It appears during certain\ncalculations.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a circle at the center.\n  circle(50, 50, 70);\n\n  // Draw a smaller circle at the center.\n  circle(width / 2, height / 2, 30);\n\n  describe('Two concentric, white circles drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle travels from left to right on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  circle(frameCount * 0.05, 50, 20);\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "Object",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A container for data that's stored as key-value pairs.</p>\n<p>Objects help to organize related data of any type, including other objects.\nA value stored in an object can be accessed by name, called its key. Each\nkey-value pair is called a \"property.\" Objects are similar to dictionaries\nin Python and maps in Java and Ruby.</p>\n<p>For example, an object could contain the location, size, and appearance of\na dog:</p>\n<pre><code class=\"language-js\">// Declare the dog variable and assign it an object.\nlet dog = { x: 50, y: 50, size: 20, emoji: '🐶' };\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(dog.size);\n\n// Draw the dog.\ntext(dog.emoji, dog.x, dog.y);</code></pre><p>The variable <code>dog</code> is assigned an object with four properties. Objects\nare declared with curly braces <code>{}</code>. Values can be accessed using the dot\noperator, as in <code>dog.size</code>. In the example above, the key <code>size</code>\ncorresponds to the value <code>20</code>. Objects can also be empty to start:</p>\n<pre><code class=\"language-js\">// Declare a cat variable and assign it an empty object.\nlet cat = {};\n\n// Add properties to the object.\ncat.x = 50;\ncat.y = 50;\ncat.size = 20;\ncat.emoji = '🐱';\n\n// Style the text.\ntextAlign(CENTER, CENTER);\ntextSize(cat.size);\n\n// Draw the cat.\ntext(cat.emoji, cat.x, cat.y);</code></pre><p>An object's data can be updated while a sketch runs. For example, the <code>cat</code>\ncould run away from the <code>dog</code> by updating its location:</p>\n<pre><code class=\"language-js\">// Run to the right.\ncat.x += 5;</code></pre><p>If needed, an object's values can be accessed using square brackets <code>[]</code>\nand strings instead of dot notation:</p>\n<pre><code class=\"language-js\">// Run to the right.\ncat[\"x\"] += 5;</code></pre><p>This syntax can be helpful when the key's name has spaces, as in\n<code>cat['height (m)']</code>.</p>\n",
      "example": [
        "// Declare the variable data and assign it an object with three properties.\nlet data = { x: 50, y: 50, d: 20 };\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the object's values using the . operator.\n  circle(data.x, data.y, data.d);\n}",
        "// Declare the variable data and assign it an object with three properties.\nlet data = { x: 50, y: 50, d: 20 };\n\n// Add another property for color.\ndata.color = 'deeppink';\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A pink circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the object's values using the . operator.\n  fill(data.color);\n  circle(data.x, data.y, data.d);\n}",
        "// Declare the variable data and assign it an object with three properties.\nlet data = { x: 50, y: 50, d: 20 };\n\n// Add another property for color.\ndata.color = 'deeppink';\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the object's values using the . operator.\n  fill(data.color);\n  circle(data.x, data.y, data.d);\n\n  // Update the object's x and y properties.\n  data.x += random(-1, 1);\n  data.y += random(-1, 1);\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "async_await",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>Asynchronous Asset Loading with Async/Await.</p>\n<p>The keywords <code>async</code> and <code>await</code> let you write asynchronous code in a more\nstraightforward, linear style. Instead of nesting callbacks or juggling\nmultiple promise chains, you can pause execution at <code>await</code> while waiting\nfor a promise to resolve. This makes your code flow more naturally, as if\nit were synchronous.</p>\n<p>When you mark a function with the <code>async</code> keyword—like <code>async function setup() {...}</code>—it\nsignals that the function contains asynchronous operations and will return a\npromise. Any time you use the <code>await</code> keyword inside this function, JavaScript\nwill pause the function’s execution until the awaited promise settles.</p>\n<p>In p5.js, you can use <code>async/await</code> to handle media loading functions such as\n<code>loadImage()</code>, <code>loadJSON()</code>, <code>loadSound()</code>, and so on. This allows you to:</p>\n<ul><li>load files in a more readable, top-to-bottom manner</li><li>decide when the assets are fully available before proceeding</li></ul><p>Nested callbacks require managing additional information and behavior.\nLazy loading of assets with <code>async/await</code> can simplify control flow,\nbut it also requires you to design your sketch around waiting for\neach operation to complete.</p>\n<p>Callbacks are still fully supported, so code that passes success / error\nfunctions to loaders like <code>loadImage()</code> or <code>loadJSON()</code> will behave exactly\nas it always has. This compatibility means sketches written with the older\npattern don’t need any changes, and you can freely mix callbacks and\n<code>async/await</code> in the same project if that suits your workflow.</p>\n<p>In the example below, <code>setup()</code> is declared as an async function. We <code>await</code>\nthe completion of both <code>loadImage()</code> and <code>loadJSON()</code> before calling\n<code>createCanvas()</code>. Only then does the sketch proceed, guaranteeing the assets\nare available for immediate use.</p>\n<pre><code class=\"language-js\">let img, data;\n\nasync function setup() {\n  // Wait until the image and JSON data have fully loaded.\n  img = await loadImage(\"./my-image.png\");\n  data = await loadJSON(\"./my-data.json\");\n\n  // Once the assets are loaded, create the canvas.\n  createCanvas(400, 400);\n}</code></pre>",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  shape = await loadModel('/assets/teapot.obj');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}",
        "let font;\n\nasync function setup() {\n  // Load a font for WebGL mode.\n  font = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    \"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the mouse's coordinates.\n  text(`x: ${mouseX} y: ${mouseY}`, 0, 0);\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "Array",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A list that keeps several pieces of data in order.</p>\n<p>Arrays are helpful for storing related data. They can contain data of any\ntype. For example, an array could contain a list of someone's favorite\ncolors as strings. Arrays are created as follows:</p>\n<pre><code class=\"language-js\">let myArray = ['deeppink', 'darkorchid', 'magenta'];</code></pre><p>Each piece of data in an array is called an element. Each element has an\naddress, or index, within its array. The variable <code>myArray</code> refers to an\narray with three <a href=\"#/p5/String\">String</a> elements, <code>'deeppink'</code>,\n<code>'darkorchid'</code>, and <code>'magenta'</code>. Arrays are zero-indexed, which means\nthat <code>'deeppink'</code> is at index 0, <code>'darkorchid'</code> is at index 1, and\n'<code>magenta'</code> is at index 2. Array elements can be accessed using their\nindices as follows:</p>\n<pre><code class=\"language-js\">let zeroth = myArray[0]; // 'deeppink'\nlet first = myArray[1]; // 'darkorchid'\nlet second = myArray[2]; // 'magenta'</code></pre><p>Elements can be added to the end of an array by calling the\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push\" target=\"_blank\">push()</a>\nmethod as follows:</p>\n<pre><code class=\"language-js\">myArray.push('lavender');\n\nlet third = myArray[3]; // 'lavender'</code></pre><p>See <a href=\"https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Arrays\" target=\"_blank\">MDN</a>\nfor more information about arrays.</p>\n",
      "example": [
        "// Declare the variable xCoordinates and assign it an array\n// with three numeric elements.\nlet xCoordinates = [25, 50, 75];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'Three white circles drawn in a horizontal line on a gray background.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the element at index 0, which is 25.\n  circle(xCoordinates[0], 50, 20);\n\n  // Access the element at index 1, which is 50.\n  circle(xCoordinates[1], 50, 20);\n\n  // Access the element at index 2, which is 75.\n  circle(xCoordinates[2], 50, 20);\n}",
        "// Declare the variable xCoordinates and assign it an array with three numeric elements.\nlet xCoordinates = [20, 40, 60];\n\n// Add another element to the end of the array.\nxCoordinates.push(80);\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('Four white circles drawn in a horizontal line on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the element at index 0, which is 20.\n  circle(xCoordinates[0], 50, 20);\n\n  // Access the element at index 1, which is 40.\n  circle(xCoordinates[1], 50, 20);\n\n  // Access the element at index 2, which is 60.\n  circle(xCoordinates[2], 50, 20);\n\n  // Access the element at index 3, which is 80.\n  circle(xCoordinates[3], 50, 20);\n}",
        "// Declare the variable xCoordinates and assign it an empty array.\nlet xCoordinates = [];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Add elements to the array using a loop.\n  for (let x = 20; x < 100; x += 20) {\n    xCoordinates.push(x);\n  }\n\n  describe('Four white circles drawn in a horizontal line on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the element at index i and use it to draw a circle.\n  for (let i = 0; i < xCoordinates.length; i += 1) {\n    circle(xCoordinates[i], 50, 20);\n  }\n}",
        "// Declare the variable xCoordinates and assign it an empty array.\nlet xCoordinates = [];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Add elements to the array using a loop.\n  for (let x = 20; x < 100; x += 20) {\n    xCoordinates.push(x);\n  }\n\n  describe('Four white circles drawn in a horizontal line on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access each element of the array and use it to draw a circle.\n  for (let x of xCoordinates) {\n    circle(x, 50, 20);\n  }\n}",
        "// Declare the variable xCoordinates and assign it an empty array.\nlet xCoordinates = [];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Add elements to the array using a loop.\n  for (let x = 20; x < 100; x += 20) {\n    xCoordinates.push(x);\n  }\n\n  describe(\n    'Four white circles in a horizontal line on a gray background. The circles move randomly.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  for (let i = 0; i < xCoordinates.length; i += 1) {\n    // Update the element at index i.\n    xCoordinates[i] += random(-1, 1);\n\n    // Use the element at index i to draw a circle.\n    circle(xCoordinates[i], 50, 20);\n  }\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "class",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A template for creating objects of a particular type.</p>\n<p>Classes can make it easier to program with objects. For example, a <code>Frog</code>\nclass could create objects that behave like frogs. Each object created\nusing a class is called an instance of that class. All instances of a class\nare the same type. Here's an example of creating an instance of a <code>Frog</code>\nclass:</p>\n<pre><code class=\"language-js\">let fifi = new Frog(50, 50, 20);</code></pre><p>The variable <code>fifi</code> refers to an instance of the <code>Frog</code> class. The keyword\n<code>new</code> is used to call the <code>Frog</code> class' constructor in the statement\n<code>new Frog()</code>. Altogether, a new <code>Frog</code> object was created and assigned to\nthe variable <code>fifi</code>. Classes are templates, so they can be used to create\nmore than one instance:</p>\n<pre><code class=\"language-js\">// First Frog instance.\nlet frog1 = new Frog(25, 50, 10);\n\n// Second Frog instance.\nlet frog2 = new Frog(75, 50, 10);</code></pre><p>A simple <code>Frog</code> class could be declared as follows:</p>\n<pre><code class=\"language-js\">class Frog {\n  constructor(x, y, size) {\n    // This code runs once when an instance is created.\n    this.x = x;\n    this.y = y;\n    this.size = size;\n  }\n\n  show() {\n    // This code runs once when myFrog.show() is called.\n    textAlign(CENTER, CENTER);\n    textSize(this.size);\n    text('🐸', this.x, this.y);\n  }\n\n  hop() {\n    // This code runs once when myFrog.hop() is called.\n    this.x += random(-10, 10);\n    this.y += random(-10, 10);\n  }\n}</code></pre><p>Class declarations begin with the keyword <code>class</code> followed by the class\nname, such as <code>Frog</code>, and curly braces <code>{}</code>. Class names should use\n<code>PascalCase</code> and can't have spaces in their names. For example, naming a\nclass <code>Kermit The Frog</code> with spaces between each word would throw a\n<code>SyntaxError</code>. The code between the curly braces <code>{}</code> defines the class.</p>\n<p>Functions that belong to a class are called methods. <code>constructor()</code>,\n<code>show()</code>, and <code>hop()</code> are methods in the <code>Frog</code> class. Methods define an\nobject's behavior. Methods can accept parameters and return values, just\nlike functions. Note that methods don't use the <code>function</code> keyword.</p>\n<p><code>constructor()</code> is a special method that's called once when an instance of\nthe class is created. The statement <code>new Frog()</code> calls the <code>Frog</code> class'\n<code>constructor()</code> method.</p>\n<p>A class definition is a template for instances. The keyword <code>this</code> refers\nto an instance's data and methods. For example, each <code>Frog</code> instance has\nunique coordinates stored in <code>this.x</code> and <code>this.y</code>. The <code>show()</code> method\nuses those coordinates to draw the frog. The <code>hop()</code> method updates those\ncoordinates when called. Once a <code>Frog</code> instance is created, its data and\nmethods can be accessed using the dot operator <code>.</code> as follows:</p>\n<pre><code class=\"language-js\">// Draw a lily pad.\nfill('green');\nstroke('green');\ncircle(fifi.x, fifi.y, 2 * fifi.size);\n\n// Show the Frog.\nfifi.show();\n\n// Hop.\nfifi.hop();</code></pre>",
      "example": [
        "// Declare a frog variable.\nlet fifi;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Assign the frog variable a new Frog object.\n  fifi = new Frog(50, 50, 20);\n\n  describe('A frog face drawn on a blue background.');\n}\n\nfunction draw() {\n  background('cornflowerblue');\n\n  // Show the frog.\n  fifi.show();\n}\n\nclass Frog {\n  constructor(x, y, size) {\n    this.x = x;\n    this.y = y;\n    this.size = size;\n  }\n\n  show() {\n    textAlign(CENTER, CENTER);\n    textSize(this.size);\n    text('🐸', this.x, this.y);\n  }\n}",
        "// Declare two frog variables.\nlet frog1;\nlet frog2;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Assign the frog variables a new Frog object.\n  frog1 = new Frog(25, 50, 10);\n  frog2 = new Frog(75, 50, 20);\n\n  describe('Two frog faces drawn next to each other on a blue background.');\n}\n\nfunction draw() {\n  background('cornflowerblue');\n\n  // Show the frogs.\n  frog1.show();\n  frog2.show();\n}\n\nclass Frog {\n  constructor(x, y, size) {\n    this.x = x;\n    this.y = y;\n    this.size = size;\n  }\n\n  show() {\n    textAlign(CENTER, CENTER);\n    textSize(this.size);\n    text('🐸', this.x, this.y);\n  }\n}",
        "// Declare two frog variables.\nlet frog1;\nlet frog2;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Assign the frog variables a new Frog object.\n  frog1 = new Frog(25, 50, 10);\n  frog2 = new Frog(75, 50, 20);\n\n  // Slow the frame rate.\n  frameRate(1);\n\n  describe('Two frog faces on a blue background. The frogs hop around randomly.');\n}\n\nfunction draw() {\n  background('cornflowerblue');\n\n  // Show the frogs.\n  frog1.show();\n  frog2.show();\n\n  // Move the frogs.\n  frog1.hop();\n  frog2.hop();\n\n  // Wrap around if they've hopped off the edge.\n  frog1.checkEdges();\n  frog2.checkEdges();\n}\n\nclass Frog {\n  constructor(x, y, size) {\n    this.x = x;\n    this.y = y;\n    this.size = size;\n  }\n\n  show() {\n    textAlign(CENTER, CENTER);\n    textSize(this.size);\n    text('🐸', this.x, this.y);\n  }\n\n  hop() {\n    this.x += random(-10, 10);\n    this.y += random(-10, 10);\n  }\n\n  checkEdges() {\n    if (this.x > width) {\n      this.x = this.x - width;\n    } else if (this.x < 0) {\n      this.x = width - this.x;\n    }\n\n    if (this.y > height) {\n      this.y = this.y - height;\n    } else if (this.y < 0) {\n      this.y = height - this.y;\n    }\n  }\n}",
        "// Create an array that will hold frogs.\nlet frogs = [];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Add Frog objects to the array.\n  for (let i = 0; i < 5; i += 1) {\n    // Calculate random coordinates and size.\n    let x = random(0, 100);\n    let y = random(0, 100);\n    let s = random(2, 20);\n\n    // Create a new Frog object.\n    let frog = new Frog(x, y, s);\n\n    // Add the Frog to the array.\n    frogs.push(frog);\n  }\n\n  // Slow the frame rate.\n  frameRate(1);\n\n  describe(\n    'Five frog faces on a blue background. The frogs hop around randomly.'\n  );\n}\n\nfunction draw() {\n  background('cornflowerblue');\n\n  for (let frog of frogs) {\n    // Show the frog.\n    frog.show();\n\n    // Move the frog.\n    frog.hop();\n\n    // Wrap around if they've hopped off the edge.\n    frog.checkEdges();\n  }\n}\n\nclass Frog {\n  constructor(x, y, size) {\n    this.x = x;\n    this.y = y;\n    this.size = size;\n  }\n\n  show() {\n    textAlign(CENTER, CENTER);\n    textSize(this.size);\n    text('🐸', this.x, this.y);\n  }\n\n  hop() {\n    this.x += random(-10, 10);\n    this.y += random(-10, 10);\n  }\n\n  checkEdges() {\n    if (this.x > width) {\n      this.x = this.x - width;\n    } else if (this.x < 0) {\n      this.x = width - this.x;\n    }\n\n    if (this.y > height) {\n      this.y = this.y - height;\n    } else if (this.y < 0) {\n      this.y = height - this.y;\n    }\n  }\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "for",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A way to repeat a block of code when the number of iterations is known.</p>\n<p><code>for</code> loops are helpful for repeating statements a certain number of times.\nFor example, a <code>for</code> loop makes it easy to express the idea\n\"draw five lines\" like so:</p>\n<pre><code class=\"language-js\">for (let x = 10; x &lt; 100; x += 20) {\n  line(x, 25, x, 75);\n}</code></pre><p>The loop's header begins with the keyword <code>for</code>. Loops generally count up\nor count down as they repeat, or iterate. The statements in parentheses\n<code>let x = 10; x < 100; x += 20</code> tell the loop how it should repeat:</p>\n<ul><li><code>let x = 10</code> tells the loop to start counting at <code>10</code> and keep track of iterations using the variable <code>x</code>.</li><li><code>x < 100</code> tells the loop to count up to, but not including, <code>100</code>.</li><li><code>x += 20</code>  tells the loop to count up by <code>20</code> at the end of each iteration.</li></ul><p>The code between the curly braces <code>{}</code> is the loop's body. Statements in the\nloop body are repeated during each iteration of the loop.</p>\n<p>It's common to create infinite loops accidentally. When this happens,\nsketches may become unresponsive and the web browser may display a warning.\nFor example, the following loop never stops iterating because it doesn't\ncount up:</p>\n<pre><code class=\"language-js\">for (let x = 10; x &lt; 100; x = 20) {\n  line(x, 25, x, 75);\n}</code></pre><p>The statement <code>x = 20</code> keeps the variable <code>x</code> stuck at <code>20</code>, which is\nalways less than <code>100</code>.</p>\n<p><code>for</code> loops can also count down:</p>\n<pre><code class=\"language-js\">for (let d = 100; d &gt; 0; d -= 10) {\n  circle(50, 50, d);\n}</code></pre><p><code>for</code> loops can also contain other loops. The following nested loop draws a\ngrid of points:</p>\n<pre><code class=\"language-js\">// Loop from left to right.\nfor (let x = 10; x &lt; 100; x += 10) {\n\n  // Loop from top to bottom.\n  for (let y = 10; y &lt; 100; y += 10) {\n    point(x, y);\n  }\n\n}</code></pre><p><code>for</code> loops are also helpful for iterating through the elements of an\narray. For example, it's common to iterate through an array that contains\ninformation about where or what to draw:</p>\n<pre><code class=\"language-js\">// Create an array of x-coordinates.\nlet xCoordinates = [20, 40, 60];\n\nfor (let i = 0; i &lt; xCoordinates.length; i += 1) {\n  // Update the element.\n  xCoordinates[i] += random(-1, 1);\n\n  // Draw a circle.\n  circle(xCoordinates[i], 50, 20);\n}</code></pre><p>If the array's values aren't modified, the <code>for...of</code> statement can\nsimplify the code. They're similar to <code>for</code> loops in Python and <code>for-each</code>\nloops in C++ and Java. The following loops have the same effect:</p>\n<pre><code class=\"language-js\">// Draw circles with a for loop.\nlet xCoordinates = [20, 40, 60];\n\nfor (let i = 0; i &lt; xCoordinates.length; i += 1) {\n  circle(xCoordinates[i], 50, 20);\n}</code></pre><pre><code class=\"language-js\">// Draw circles with a for...of statement.\nlet xCoordinates = [20, 40, 60];\n\nfor (let x of xCoordinates) {\n  circle(x, 50, 20);\n}</code></pre><p>In the code snippets above, the variables <code>i</code> and <code>x</code> have different roles.</p>\n<p>In the first snippet, <code>i</code> counts from <code>0</code> up to <code>2</code>, which is one less than\n<code>xCoordinates.length</code>. <code>i</code> is used to access the element in <code>xCoordinates</code>\nat index <code>i</code>.</p>\n<p>In the second code snippet, <code>x</code> isn't keeping track of the loop's progress\nor an index. During each iteration, <code>x</code> contains the next element of\n<code>xCoordinates</code>. <code>x</code> starts from the beginning of <code>xCoordinates</code> (<code>20</code>) and\nupdates its value to <code>40</code> and then <code>60</code> during the next iterations.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Five black vertical lines on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw vertical lines using a loop.\n  for (let x = 10; x < 100; x += 20) {\n    line(x, 25, x, 75);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Five white concentric circles drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw concentric circles using a loop.\n  for (let d = 100; d > 0; d -= 20) {\n    circle(50, 50, d);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A grid of black dots on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the spacing for points on the grid.\n  let space = 10;\n\n  // Increase the stroke weight.\n  strokeWeight(3);\n\n  // Loop from the left to the right.\n  for (let x = space; x < 100; x += space) {\n    // Loop from the top to the bottom.\n    for (let y = space; y < 100; y += space) {\n      point(x, y);\n    }\n  }\n}",
        "// Declare the variable xCoordinates and assign it an array of numbers.\nlet xCoordinates = [20, 40, 60, 80];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('Four white circles drawn in a horizontal line on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access the element at index i and use it to draw a circle.\n  for (let i = 0; i < xCoordinates.length; i += 1) {\n    circle(xCoordinates[i], 50, 20);\n  }\n}",
        "// Declare the variable xCoordinates and assign it an array of numbers.\nlet xCoordinates = [20, 40, 60, 80];\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('Four white circles drawn in a horizontal line on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Access each element of the array and use it to draw a circle.\n  for (let x of xCoordinates) {\n    circle(x, 50, 20);\n  }\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "while",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>A way to repeat a block of code.</p>\n<p><code>while</code> loops are helpful for repeating statements while a condition is\n<code>true</code>. They're like <code>if</code> statements that repeat. For example, a <code>while</code>\nloop makes it easy to express the idea \"draw several lines\" like so:</p>\n<pre><code class=\"language-js\">// Declare a variable to keep track of iteration.\nlet x = 10;\n\n// Repeat as long as x &lt; 100\nwhile (x &lt; 100) {\n  line(x, 25, x, 75);\n\n  // Increment by 20.\n  x += 20;\n}</code></pre><p>The loop's header begins with the keyword <code>while</code>. Loops generally count up\nor count down as they repeat, or iterate. The statement in parentheses\n<code>x < 100</code> is a condition the loop checks each time it iterates. If the\ncondition is <code>true</code>, the loop runs the code between the curly braces <code>{}</code>,\nThe code between the curly braces is called the loop's body. If the\ncondition is <code>false</code>, the body is skipped and the loop is stopped.</p>\n<p>It's common to create infinite loops accidentally. For example, the\nfollowing loop never stops iterating because it doesn't count up:</p>\n<pre><code class=\"language-js\">// Declare a variable to keep track of iteration.\nlet x = 10;\n\n// Repeat as long as x &lt; 100\nwhile (x &lt; 100) {\n  line(x, 25, x, 75);\n}\n\n// This should be in the loop's body!\nx += 20;</code></pre><p>The statement <code>x += 20</code> appears after the loop's body. That means the\nvariable <code>x</code> is stuck at <code>10</code>,  which is always less than <code>100</code>.</p>\n<p><code>while</code> loops are useful when the number of iterations isn't known in\nadvance. For example, concentric circles could be drawn at random\nincrements:</p>\n<pre><code class=\"language-js\">let d = 100;\nlet minSize = 5;\n\nwhile (d &gt; minSize) {\n  circle(50, 50, d);\n  d -= random(10);\n}</code></pre>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Five black vertical lines on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Declare a variable to keep track of iteration.\n  let x = 10;\n\n  // Repeat as long as x < 100\n  while (x < 100) {\n    line(x, 25, x, 75);\n\n    // Increment by 20.\n    x += 20;\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe(\n    \"A gray square with several concentric circles at the center. The circles' sizes decrease at random increments.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  let d = 100;\n  let minSize = 5;\n\n  while (d > minSize) {\n    circle(50, 50, d);\n    d -= random(5, 15);\n  }\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "console",
      "file": "src/scripts/parsers/in/p5.js/src/core/reference.js",
      "line": 1,
      "description": "<p>Prints a message to the web browser's console.</p>\n<p>The <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/console\" target=\"_blank\">console</a>\nobject is helpful for printing messages while debugging. For example, it's\ncommon to add a <code>console.log()</code> statement while studying how a section of\ncode works:</p>\n<pre><code class=\"language-js\">if (isPlaying === true) {\n  // Add a console.log() statement to make sure this block of code runs.\n  console.log('Got here!');\n\n  // Game logic.\n}</code></pre><p><code>console.error()</code> is helpful for tracking errors because it prints\nformatted messages. For example, it's common to encounter errors when\nloading media assets:</p>\n<pre><code class=\"language-js\">// Logs an error message with special formatting.\nfunction handleFailure(error) {\n  console.error('Oops!', error);\n}\n\n// Try to load an image and call handleError() if it fails.\nloadImage('https://example.com/cat.jpg', handleImage, handleError);</code></pre>",
      "example": [
        "function setup() {\n  noCanvas();\n\n  // Prints \"Hello!\" to the console.\n  console.log('Hello!');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Try to load an image from a fake URL.\n  // Call handleError() if the image fails to load.\n  loadImage('https://example.com/cat.jpg', handleImage, handleError);\n}\n\n// Displays the image.\nfunction handleImage(img) {\n  image(img, 0, 0);\n\n  describe('A cat on a gray background.');\n}\n\n// Prints the error.\nfunction handleError(error) {\n  console.error('Oops!', error);\n\n  describe('A gray square.');\n}"
      ],
      "module": "Foundation",
      "submodule": "Foundation",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "VIDEO",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 13,
      "type": "VIDEO",
      "description": "",
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "VERSION",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 14,
      "type": "String",
      "description": "Version of this p5.js.",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RGB",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 16,
      "type": "RGB",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "AUDIO",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 20,
      "type": "AUDIO",
      "description": "",
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RGBHDR",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 22,
      "type": "RGBHDR",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "P2D",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 27,
      "type": "P2D",
      "description": "<p>The default, two-dimensional renderer in p5.js.</p>\n<p>Use this when calling <a href=\"#/p5/createCanvas\"> (for example,\n<code>createCanvas(400, 400, P2D)</code>) to specify a 2D context.</p>\n",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HSB",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 32,
      "type": "HSB",
      "description": "HSB (hue, saturation, brightness) is a type of color model.\nYou can learn more about it at\n<a href=\"https://learnui.design/blog/the-hsb-color-system-practicioners-primer.html\">HSB</a>.",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "deviceOrientation",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 33,
      "type": "LANDSCAPE|PORTRAIT",
      "description": "The system variable deviceOrientation always contains the orientation of\nthe device. The value of this variable will either be set 'landscape'\nor 'portrait'. If no data is available it will be set to 'undefined'.\neither LANDSCAPE or PORTRAIT.",
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "accelerationX",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 52,
      "type": "Number",
      "description": "The system variable accelerationX always contains the acceleration of the\ndevice along the x axis. Value is represented as meters per second squared.",
      "example": [
        "// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n  background(220, 50);\n  fill('magenta');\n  ellipse(width / 2, height / 2, accelerationX);\n  describe('Magnitude of device acceleration is displayed as ellipse size.');\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "accelerationY",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 70,
      "type": "Number",
      "description": "The system variable accelerationY always contains the acceleration of the\ndevice along the y axis. Value is represented as meters per second squared.",
      "example": [
        "// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n  background(220, 50);\n  fill('magenta');\n  ellipse(width / 2, height / 2, accelerationY);\n  describe('Magnitude of device acceleration is displayed as ellipse size');\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "movedX",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 72,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's horizontal movement.</p>\n<p><code>movedX</code> tracks how many pixels the mouse moves left or right between\nframes. <code>movedX</code> will have a negative value if the mouse moves left between\nframes and a positive value if it moves right. <code>movedX</code> can be calculated\nas <code>mouseX - pmouseX</code>.</p>\n<p>Note: <code>movedX</code> continues updating even when\n<a href=\"#/p5/requestPointerLock\">requestPointerLock()</a> is active.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. The text \">>\" appears when the user moves the mouse to the right. The text \"<<\" appears when the user moves the mouse to the left.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display >> when movedX is positive and\n  // << when it's negative.\n  if (movedX > 0) {\n    text('>>', 50, 50);\n  } else if (movedX < 0) {\n    text('<<', 50, 50);\n  }\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "accelerationZ",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 89,
      "type": "Number",
      "description": "The system variable accelerationZ always contains the acceleration of the\ndevice along the z axis. Value is represented as meters per second squared.",
      "example": [
        "// Move a touchscreen device to register\n// acceleration changes.\nfunction draw() {\n  background(220, 50);\n  fill('magenta');\n  ellipse(width / 2, height / 2, accelerationZ);\n  describe('Magnitude of device acceleration is displayed as ellipse size');\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pAccelerationX",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 99,
      "type": "Number",
      "description": "The system variable pAccelerationX always contains the acceleration of the\ndevice along the x axis in the frame previous to the current frame. Value\nis represented as meters per second squared.",
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pAccelerationY",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 109,
      "type": "Number",
      "description": "The system variable pAccelerationY always contains the acceleration of the\ndevice along the y axis in the frame previous to the current frame. Value\nis represented as meters per second squared.",
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "movedY",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 113,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's vertical movement.</p>\n<p><code>movedY</code> tracks how many pixels the mouse moves up or down between\nframes. <code>movedY</code> will have a negative value if the mouse moves up between\nframes and a positive value if it moves down. <code>movedY</code> can be calculated\nas <code>mouseY - pmouseY</code>.</p>\n<p>Note: <code>movedY</code> continues updating even when\n<a href=\"#/p5/requestPointerLock\">requestPointerLock()</a> is active.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. The text \"▲\" appears when the user moves the mouse upward. The text \"▼\" appears when the user moves the mouse downward.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display ▼ when movedY is positive and\n  // ▲ when it's negative.\n  if (movedY > 0) {\n    text('▼', 50, 50);\n  } else if (movedY < 0) {\n    text('▲', 50, 50);\n  }\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pAccelerationZ",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 119,
      "type": "Number",
      "description": "The system variable pAccelerationZ always contains the acceleration of the\ndevice along the z axis in the frame previous to the current frame. Value\nis represented as meters per second squared.",
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "keyIsPressed",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 119,
      "type": "Boolean",
      "description": "A <code>Boolean</code> system variable that's <code>true</code> if any key is currently pressed\nand <code>false</code> if not.",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The white square turns black when the user presses a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  if (keyIsPressed === true) {\n    fill(0);\n  } else {\n    fill(255);\n  }\n\n  // Draw the square.\n  square(25, 25, 50);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The white square turns black when the user presses a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  if (keyIsPressed) {\n    fill(0);\n  } else {\n    fill(255);\n  }\n\n  // Draw the square.\n  square(25, 25, 50);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with the word \"false\" at its center. The word switches to \"true\" when the user presses a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the value of keyIsPressed.\n  text(keyIsPressed, 50, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Keyboard",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "frameCount",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 124,
      "type": "Integer",
      "description": "<p>A <code>Number</code> variable that tracks the number of frames drawn since the sketch\nstarted.</p>\n<p><code>frameCount</code>'s value is 0 inside <a href=\"#/p5/setup\">setup()</a>. It\nincrements by 1 each time the code in <a href=\"#/p5/draw\">draw()</a>\nfinishes executing.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the value of\n  // frameCount.\n  textSize(30);\n  textAlign(CENTER, CENTER);\n  text(frameCount, 50, 50);\n\n  describe('The number 0 written in black in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Set the frameRate to 30.\n  frameRate(30);\n\n  textSize(30);\n  textAlign(CENTER, CENTER);\n\n  describe('A number written in black in the middle of a gray square. Its value increases rapidly.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display the value of\n  // frameCount.\n  text(frameCount, 50, 50);\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "rotationX",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 159,
      "type": "Number",
      "description": "<p>The system variable rotationX always contains the rotation of the\ndevice along the x axis. If the sketch <a href=\"#/p5/angleMode\">\nangleMode()</a> is set to DEGREES, the value will be -180 to 180. If\nit is set to RADIANS, the value will be -PI to PI.</p>\n<p>Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.</p>\n",
      "example": [
        "let rotationX = 0;            // Angle in degrees\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);   // Create 3D canvas\n}\n\nfunction draw() {\n  background(220);                 // Set light gray background\n  rotateX(radians(rotationX));     // Rotate around X-axis\n  normalMaterial();                // Apply simple shaded material\n  box(60);                         // Draw 3D cube (60 units wide)\n  rotationX = (rotationX + 2) % 360; // Increment rotation (2° per frame)\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "deltaTime",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 170,
      "type": "Integer",
      "description": "<p>A <code>Number</code> variable that tracks the number of milliseconds it took to draw\nthe last frame.</p>\n<p><code>deltaTime</code> contains the amount of time it took\n<a href=\"#/p5/draw\">draw()</a> to execute during the previous frame. It's\nuseful for simulating physics.</p>\n",
      "example": [
        "let x = 0;\nlet speed = 0.05;\n\nfunction setup()  {\n  createCanvas(100, 100);\n\n  // Set the frameRate to 30.\n  frameRate(30);\n\n  describe('A white circle moves from left to right on a gray background. It reappears on the left side when it reaches the right side.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use deltaTime to calculate\n  // a change in position.\n  let deltaX = speed * deltaTime;\n\n  // Update the x variable.\n  x += deltaX;\n\n  // Reset x to 0 if it's\n  // greater than 100.\n  if (x > 100)  {\n    x = 0;\n  }\n\n  // Use x to set the circle's\n  // position.\n  circle(x, 50, 20);\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "rotationY",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 188,
      "type": "Number",
      "description": "<p>The system variable rotationY always contains the rotation of the\ndevice along the y axis. If the sketch <a href=\"#/p5/angleMode\">\nangleMode()</a> is set to DEGREES, the value will be -90 to 90. If\nit is set to RADIANS, the value will be -PI/2 to PI/2.</p>\n<p>Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.</p>\n",
      "example": [
        "let rotationY = 0;            // Angle in degrees\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);   // Create 3D canvas\n}\n\nfunction draw() {\n  background(220);                 // Set light gray background\n  rotateY(radians(rotationY));     // Rotate around Y-axis (vertical)\n  normalMaterial();                // Apply simple shaded material\n  box(60);                         // Draw 3D cube (60 units wide)\n  rotationY = (rotationY + 2) % 360; // Increment rotation (2° per frame)\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "key",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 194,
      "type": "String",
      "description": "<p>A <code>String</code> system variable that contains the value of the last key typed.</p>\n<p>The key variable is helpful for checking whether an\n<a href=\"https://en.wikipedia.org/wiki/ASCII#Printable_characters\" target=\"_blank\">ASCII</a>\nkey has been typed. For example, the expression <code>key === \"a\"</code> evaluates to\n<code>true</code> if the <code>a</code> key was typed and <code>false</code> if not. <code>key</code> doesn’t update\nfor special keys such as <code>LEFT_ARROW</code> and <code>ENTER</code>. Use keyCode instead for\nspecial keys. The <a href=\"#/p5/keyIsDown\">keyIsDown()</a> function should\nbe used to check for multiple different key presses at the same time.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. The last key pressed is displayed at the center.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the last key pressed.\n  text(key, 50, 50);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe(\n    'A gray square with a black circle at its center. The circle moves when the user presses the keys \"w\", \"a\", \"s\", or \"d\". It leaves a trail as it moves.'\n  );\n}\n\nfunction draw() {\n  // Update x and y if a key is pressed.\n  if (keyIsPressed === true) {\n    if (key === 'w') {\n      y -= 1;\n    } else if (key === 's') {\n      y += 1;\n    } else if (key === 'a') {\n      x -= 1;\n    } else if (key === 'd') {\n      x += 1;\n    }\n  }\n\n  // Style the circle.\n  fill(0);\n\n  // Draw the circle at (x, y).\n  circle(x, y, 5);\n}"
      ],
      "module": "Events",
      "submodule": "Keyboard",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "focused",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 201,
      "type": "Boolean",
      "description": "<p>A <code>Boolean</code> variable that's <code>true</code> if the browser is focused and <code>false</code> if\nnot.</p>\n<p>Note: The browser window can only receive input if it's focused.</p>\n",
      "example": [
        "// Open this example in two separate browser\n// windows placed side-by-side to demonstrate.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe('A square changes color from green to red when the browser window is out of focus.');\n}\n\nfunction draw() {\n  // Change the background color\n  // when the browser window\n  // goes in/out of focus.\n  if (focused === true) {\n    background(0, 255, 0);\n  } else {\n    background(255, 0, 0);\n  }\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "mouseX",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 213,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's horizontal position.</p>\n<p><code>mouseX</code> keeps track of the mouse's position relative to the\ntop-left corner of the canvas. For example, if the mouse is 50 pixels from\nthe left edge of the canvas, then <code>mouseX</code> will be 50.</p>\n<p>If touch is used instead of the mouse, then <code>mouseX</code> will hold the\nx-coordinate of the most recent touch point.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A vertical black line moves left and right following the mouse's x-position.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a vertical line that follows the mouse's x-coordinate.\n  line(mouseX, 0, mouseX, 100);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the mouse's coordinates.\n  text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\"A vertical black line moves left and right following the mouse's x-position.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Adjust coordinates for WebGL mode.\n  // The origin (0, 0) is at the center of the canvas.\n  let mx = mouseX - 50;\n\n  // Draw the line.\n  line(mx, -50, mx, 50);\n}",
        "let font;\n\nasync function setup() {\n  // Load a font for WebGL mode.\n  font = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    \"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the mouse's coordinates.\n  text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 0, 0);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "rotationZ",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 221,
      "type": "Number",
      "description": "<p>The system variable rotationZ always contains the rotation of the\ndevice along the z axis. If the sketch <a href=\"#/p5/angleMode\">\nangleMode()</a> is set to DEGREES, the value will be 0 to 360. If\nit is set to RADIANS, the value will be 0 to 2*PI.</p>\n<p>Unlike rotationX and rotationY, this variable is available for devices\nwith a built-in compass only.</p>\n<p>Note: The order the rotations are called is important, ie. if used\ntogether, it must be called in the order Z-X-Y or there might be\nunexpected behaviour.</p>\n",
      "example": [
        "let rotationZ = 0;          // Angle in degrees\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);   // Create 3D canvas\n}\n\nfunction draw() {\n  background(220);\n  rotateZ(radians(rotationZ));     // Rotate around Z-axis\n  normalMaterial();                // Apply simple shaded material\n  box(60);                         // Draw 3D cube\n  rotationZ = (rotationZ + 2) % 360; // Increment rotation angle\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pRotationX",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 262,
      "type": "Number",
      "description": "<p>The system variable pRotationX always contains the rotation of the\ndevice along the x axis in the frame previous to the current frame.\nIf the sketch <a href=\"#/p5/angleMode\"> angleMode()</a> is set to DEGREES,\nthe value will be -180 to 180. If it is set to RADIANS, the value will\nbe -PI to PI.</p>\n<p>pRotationX can also be used with rotationX to determine the rotate\ndirection of the device along the X-axis.</p>\n",
      "example": [
        "// META:norender\n// A simple if statement looking at whether\n// rotationX - pRotationX < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\n// Simple range conversion to make things simpler.\n// This is not absolutely necessary but the logic\n// will be different in that case.\n\nlet rX = rotationX + 180;\nlet pRX = pRotationX + 180;\n\nif ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\n  rotateDirection = 'clockwise';\n} else if (rX - pRX < 0 || rX - pRX > 270) {\n  rotateDirection = 'counter-clockwise';\n}\n\nprint(rotateDirection);\ndescribe('no image to display.');"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pRotationY",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 302,
      "type": "Number",
      "description": "<p>The system variable pRotationY always contains the rotation of the\ndevice along the y axis in the frame previous to the current frame.\nIf the sketch <a href=\"#/p5/angleMode\"> angleMode()</a> is set to DEGREES,\nthe value will be -90 to 90. If it is set to RADIANS, the value will\nbe -PI/2 to PI/2.</p>\n<p>pRotationY can also be used with rotationY to determine the rotate\ndirection of the device along the Y-axis.</p>\n",
      "example": [
        "// META:norender\n// A simple if statement looking at whether\n// rotationY - pRotationY < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\n// Simple range conversion to make things simpler.\n// This is not absolutely necessary but the logic\n// will be different in that case.\n\nlet rY = rotationY + 180;\nlet pRY = pRotationY + 180;\n\nif ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\n  rotateDirection = 'clockwise';\n} else if (rY - pRY < 0 || rY - pRY > 270) {\n  rotateDirection = 'counter-clockwise';\n}\nprint(rotateDirection);\ndescribe('no image to display.');"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "mouseY",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 305,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's vertical position.</p>\n<p><code>mouseY</code> keeps track of the mouse's position relative to the\ntop-left corner of the canvas. For example, if the mouse is 50 pixels from\nthe top edge of the canvas, then <code>mouseY</code> will be 50.</p>\n<p>If touch is used instead of the mouse, then <code>mouseY</code> will hold the\ny-coordinate of the most recent touch point.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A horizontal black line moves up and down following the mouse's y-position.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a horizontal line that follows the mouse's y-coordinate.\n  line(0, mouseY, 100, mouseY);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the mouse's coordinates.\n  text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\"A horizontal black line moves up and down following the mouse's y-position.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Adjust coordinates for WebGL mode.\n  // The origin (0, 0) is at the center of the canvas.\n  let my = mouseY - 50;\n\n  // Draw the line.\n  line(-50, my, 50, my);\n}",
        "let font;\n\nasync function setup() {\n  // Load a font for WebGL mode.\n  font = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    \"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the mouse's coordinates.\n  text(`x: ${int(mouseX)} y: ${int(mouseY)}`, 0, 0);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pRotationZ",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 338,
      "type": "Number",
      "description": "<p>The system variable pRotationZ always contains the rotation of the\ndevice along the z axis in the frame previous to the current frame.\nIf the sketch <a href=\"#/p5/angleMode\"> angleMode()</a> is set to DEGREES,\nthe value will be 0 to 360. If it is set to RADIANS, the value will\nbe 0 to 2*PI.</p>\n<p>pRotationZ can also be used with rotationZ to determine the rotate\ndirection of the device along the Z-axis.</p>\n",
      "example": [
        "// META:norender\n// A simple if statement looking at whether\n// rotationZ - pRotationZ < 0 is true or not will be\n// sufficient for determining the rotate direction\n// in most cases.\n\n// Some extra logic is needed to account for cases where\n// the angles wrap around.\nlet rotateDirection = 'clockwise';\n\nif (\n  (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\n  rotationZ - pRotationZ < -270\n) {\n  rotateDirection = 'clockwise';\n} else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\n  rotateDirection = 'counter-clockwise';\n}\nprint(rotateDirection);\ndescribe('no image to display.');"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pmouseX",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 363,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's previous horizontal\nposition.</p>\n<p><code>pmouseX</code> keeps track of the mouse's position relative to the\ntop-left corner of the canvas. Its value is\n<a href=\"#/p5/mouseX\">mouseX</a> from the previous frame. For example, if\nthe mouse was 50 pixels from the left edge of the canvas during the last\nframe, then <code>pmouseX</code> will be 50.</p>\n<p>If touch is used instead of the mouse, then <code>pmouseX</code> will hold the\nx-coordinate of the last touch point.</p>\n<p>Note: <code>pmouseX</code> is reset to the current <a href=\"#/p5/mouseX\">mouseX</a>\nvalue at the start of each touch event.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(10);\n\n  describe('A line follows the mouse as it moves. The line grows longer with faster movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  line(pmouseX, pmouseY, mouseX, mouseY);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A line follows the mouse as it moves. The line grows longer with faster movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Adjust coordinates for WebGL mode.\n  // The origin (0, 0) is at the center of the canvas.\n  let pmx = pmouseX - 50;\n  let pmy = pmouseY - 50;\n  let mx = mouseX - 50;\n  let my = mouseY - 50;\n\n  // Draw the line.\n  line(pmx, pmy, mx, my);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "code",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 369,
      "type": "String",
      "description": "<p>The <code>code</code> property represents a physical key on the keyboard (as opposed\nto the character generated by pressing the key). In other words, this\nproperty returns a value that isn't altered by keyboard layout or the state\nof the modifier keys.</p>\n<p>This property is useful when you want to handle keys based on their\nphysical positions on the input device rather than the characters associated\nwith those keys;</p>\n<p>Unlike <a href=\"#/p5/key\">key</a>, the <code>code</code> property differentiates between\nphysical keys that generate the same character—for example, <code>CtrlLeft</code> and\n<code>CtrlRight</code>—so each can be handled independently.\nHere's the MDN docs for <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\" target=\"_blank\">KeyboardEvent.code</a></p>\n<p>Pressing the key physically labeled “A” always yields <code>KeyA</code>, regardless\nof the current keyboard layout (QWERTY, Dvorak, AZERTY, etc.) or the character\nthat appears in a text field.</p>\n<p>The code property returns a plain string (e.g., 'ArrowRight'). You can\ncompare it directly with string literals:</p>\n<pre><code class=\"language-js\">if (keyIsDown(RIGHT_ARROW)) {\n  // …\n}\n// The line above is equivalent to:\nif (code === 'ArrowRight') {\n  // …\n}\nif (key  === 'ArrowRight') {\n// …\n}</code></pre><p>The system variables <code>BACKSPACE</code>, <code>DELETE</code>, <code>ENTER</code>, <code>RETURN</code>, <code>TAB</code>,\n<code>ESCAPE</code>, <code>SHIFT</code>, <code>CONTROL</code>, <code>OPTION</code>, <code>ALT</code>, <code>UP_ARROW</code>, <code>DOWN_ARROW</code>,\n<code>LEFT_ARROW</code>, and <code>RIGHT_ARROW</code> are all helpful shorthands the key codes of\nspecial keys.\nThese are simply shorthands for the same string values:</p>\n<pre><code class=\"language-js\">if (code === RIGHT_ARROW) {\n// ..\n}</code></pre><p>The table below summarizes how the main keyboard-related system variables changed between p5.js 1.x and 2.x.</p>\n<table>\n  <thead>\n    <tr>\n      <th>Variable</th>\n      <th>p5.js 1.x </th>\n      <th>p5.js 2.x </th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td><code>key</code></td>\n      <td>Text string (e.g., <code>\"ArrowUp\"</code>).</td>\n      <td>Text string (e.g., <code>\"ArrowUp\"</code>, <code>\"f\"</code> or <code>\"F\"</code>).</td>\n    </tr>\n    <tr>\n      <td><code>code</code></td>\n      <td><em>Not supported.</em></td>\n      <td>Text String (e.g., <code>\"ArrowUp\"</code>, <code>\"KeyF\"</code>).</td>\n    </tr>\n    <tr>\n      <td><code>keyCode</code></td>\n      <td>Number (e.g., <code>70</code>).</td>\n      <td>Number (unchanged; e.g., <code>70</code>).</td>\n    </tr>\n    <tr>\n      <td>System variables (<code>BACKSPACE</code>, <code>UP_ARROW</code>, …)</td>\n      <td>Number</td>\n      <td>Text String (e.g., <code>\"ArrowUp\"</code>).</td>\n    </tr>\n  </tbody>\n</table>",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. The last key pressed is displayed at the center.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the last key pressed.\n  text(code, 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n}\n\nfunction draw() {\n  background(220);\n  fill(\"black\");\n  if (keyIsDown(BACKSPACE) || keyIsDown(ENTER) ||\n      keyIsDown(DELETE) || keyIsDown(RETURN) ||\n      keyIsDown(TAB) || keyIsDown(ESCAPE) ||\n      keyIsDown(CONTROL) || keyIsDown(OPTION) ||\n      keyIsDown(UP_ARROW) || keyIsDown(LEFT_ARROW) ||\n      keyIsDown(RIGHT_ARROW) || keyIsDown(DOWN_ARROW) ||\n      keyIsDown(SHIFT)) {\n    fill(\"red\");\n    text(\"System Variable\", 7, 75);\n  }\n\n  text(key, 30, 25);\n  text(keyCode, 7, 25);\n  text(code || \" \", 30, 50);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe(\n    'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'\n  );\n}\n\nfunction draw() {\n  // Update x and y if an arrow key is pressed.\n  if (keyIsPressed){\n    if (keyIsDown(LEFT_ARROW)){\n      x -= 1;\n    }\n\n    if (keyIsDown(RIGHT_ARROW)) {\n      x += 1;\n    }\n\n    if (keyIsDown(UP_ARROW)) {\n      y -= 1;\n    }\n\n    if (keyIsDown(DOWN_ARROW)) {\n      y += 1;\n    }\n  }\n\n  // Style the circle.\n  fill(0);\n\n  // Draw the circle.\n  circle(x, y, 5);\n}"
      ],
      "module": "Events",
      "submodule": "Keyboard",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "turnAxis",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 388,
      "type": "String",
      "description": "When a device is rotated, the axis that triggers the <a href=\"#/p5/deviceTurned\">deviceTurned()</a>\nmethod is stored in the turnAxis variable. The turnAxis variable is only defined within\nthe scope of deviceTurned().",
      "example": [
        "// Run this example on a mobile device\n// Rotate the device by 90 degrees in the\n// X-axis to change the value.\n\nlet value = 0;\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device turns`);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when x-axis turns`);\n}\nfunction deviceTurned() {\n  if (turnAxis === 'X') {\n    if (value === 0) {\n      value = 255;\n    } else if (value === 255) {\n      value = 0;\n    }\n  }\n}"
      ],
      "module": "Events",
      "submodule": "Acceleration",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pmouseY",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 421,
      "type": "Number",
      "description": "<p>A <code>Number</code> system variable that tracks the mouse's previous vertical\nposition.</p>\n<p><code>pmouseY</code> keeps track of the mouse's position relative to the\ntop-left corner of the canvas. Its value is\n<a href=\"#/p5/mouseY\">mouseY</a> from the previous frame. For example, if\nthe mouse was 50 pixels from the top edge of the canvas during the last\nframe, then <code>pmouseY</code> will be 50.</p>\n<p>If touch is used instead of the mouse, then <code>pmouseY</code> will hold the\ny-coordinate of the last touch point.</p>\n<p>Note: <code>pmouseY</code> is reset to the current <a href=\"#/p5/mouseY\">mouseY</a>\nvalue at the start of each touch event.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(10);\n\n  describe('A line follows the mouse as it moves. The line grows longer with faster movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  line(pmouseX, pmouseY, mouseX, mouseY);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A line follows the mouse as it moves. The line grows longer with faster movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Adjust coordinates for WebGL mode.\n  // The origin (0, 0) is at the center of the canvas.\n  let pmx = pmouseX - 50;\n  let pmy = pmouseY - 50;\n  let mx = mouseX - 50;\n  let my = mouseY - 50;\n\n  // Draw the line.\n  line(pmx, pmy, mx, my);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "winMouseX",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 458,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that tracks the mouse's horizontal position within the\nbrowser.</p>\n<p><code>winMouseX</code> keeps track of the mouse's position relative to the top-left\ncorner of the browser window. For example, if the mouse is 50 pixels from\nthe left edge of the browser, then <code>winMouseX</code> will be 50.</p>\n<p>On a touchscreen device, <code>winMouseX</code> will hold the x-coordinate of the most\nrecent touch point.</p>\n<p>Note: Use <a href=\"#/p5/mouseX\">mouseX</a> to track the mouse’s\nx-coordinate within the canvas.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the mouse's coordinates within the browser window.\n  text(`x: ${int(winMouseX)} y: ${int(winMouseY)}`, 50, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "keyCode",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 466,
      "type": "Integer",
      "description": "<p>A <code>Number</code> system variable that contains the code of the last key pressed.</p>\n<p>Every key has a numeric key code. For example, the letter <code>a</code> key has the key code 65.\nUse this key code to determine which key was pressed by comparing it to the numeric value\nof the desired key.</p>\n<p>For example, to detect when the Enter key is pressed:</p>\n<pre><code class=\"language-js\">if (keyCode === 13) { // Enter key\n  // Code to run if the Enter key was pressed.\n}</code></pre><p>Alternatively, you can use the <a href=\"#/p5/key\">key</a> function to directly compare the key value:</p>\n<pre><code class=\"language-js\">if (key === 'Enter') { // Enter key\n  // Code to run if the Enter key was pressed.\n}</code></pre><p>Use the following numeric codes for the arrow keys:</p>\n<p>Up Arrow: 38\nDown Arrow: 40\nLeft Arrow: 37\nRight Arrow: 39</p>\n<p>More key codes can be found at websites such as\n<a href=\"http://keycode.info/\">keycode.info</a>.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. The last key pressed and its code are displayed at the center.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the last key pressed and its code.\n  text(`${key} : ${keyCode}`, 50, 50);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe(\n    'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'\n  );\n}\n\nfunction draw() {\n  // Update x and y if an arrow key is pressed.\n  if (keyIsPressed === true) {\n    if (keyCode === 38) { // Up arrow key\n      y -= 1;\n    } else if (keyCode === 40) { // Down arrow key\n      y += 1;\n    } else if (keyCode === 37) { // Left arrow key\n      x -= 1;\n    } else if (keyCode === 39) { // Right arrow key\n      x += 1;\n    }\n  }\n\n  // Style the circle.\n  fill(0);\n\n  // Draw the circle at (x, y).\n  circle(x, y, 5);\n}"
      ],
      "module": "Events",
      "submodule": "Keyboard",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "winMouseY",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 495,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that tracks the mouse's vertical position within the\nbrowser.</p>\n<p><code>winMouseY</code> keeps track of the mouse's position relative to the top-left\ncorner of the browser window. For example, if the mouse is 50 pixels from\nthe top edge of the browser, then <code>winMouseY</code> will be 50.</p>\n<p>On a touchscreen device, <code>winMouseY</code> will hold the y-coordinate of the most\nrecent touch point.</p>\n<p>Note: Use <a href=\"#/p5/mouseY\">mouseY</a> to track the mouse’s\ny-coordinate within the canvas.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A gray square. The mouse's x- and y-coordinates are displayed as the user moves the mouse.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the mouse's coordinates within the browser window.\n  text(`x: ${int(winMouseX)} y: ${int(winMouseY)}`, 50, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "webglVersion",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 545,
      "type": "WEBGL|WEBGL2",
      "description": "<p>A <code>String</code> variable with the WebGL version in use.</p>\n<p><code>webglVersion</code>'s value equals one of the following string constants:</p>\n<ul><li><code>WEBGL2</code> whose value is <code>'webgl2'</code>,</li><li><code>WEBGL</code> whose value is <code>'webgl'</code>, or</li><li><code>P2D</code> whose value is <code>'p2d'</code>. This is the default for 2D sketches.</li><li><code>P2DHDR</code> whose value is <code>'p2d-hdr'</code> (used for HDR 2D sketches, if available).</li></ul><p>See <a href=\"#/p5/setAttributes\">setAttributes()</a> for ways to set the\nWebGL version.</p>\n",
      "example": [
        "function setup() {\n  background(200);\n\n  // Display the current WebGL version.\n  text(webglVersion, 42, 54);\n\n  describe('The text \"p2d\" written in black on a gray background.');\n}",
        "let font;\n\nasync function setup() {\n  // Load a font to use.\n  font = await loadFont('assets/inconsolata.otf');\n\n  // Create a canvas using WEBGL mode.\n  createCanvas(100, 50, WEBGL);\n  background(200);\n\n  // Display the current WebGL version.\n  fill(0);\n  textFont(font);\n  text(webglVersion, -15, 5);\n\n  describe('The text \"webgl2\" written in black on a gray background.');\n}",
        "let font;\n\nasync function setup() {\n  // Load a font to use.\n  font = await loadFont('assets/inconsolata.otf');\n\n  // Create a canvas using WEBGL mode.\n  createCanvas(100, 50, WEBGL);\n\n  // Set WebGL to version 1.\n  setAttributes({ version: 1 });\n\n  background(200);\n\n  // Display the current WebGL version.\n  fill(0);\n  textFont(font);\n  text(webglVersion, -14, 5);\n\n  describe('The text \"webgl\" written in black on a gray background.');\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pwinMouseX",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 559,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that tracks the mouse's previous horizontal position\nwithin the browser.</p>\n<p><code>pwinMouseX</code> keeps track of the mouse's position relative to the top-left\ncorner of the browser window. Its value is\n<a href=\"#/p5/winMouseX\">winMouseX</a> from the previous frame. For\nexample, if the mouse was 50 pixels from\nthe left edge of the browser during the last frame, then <code>pwinMouseX</code> will\nbe 50.</p>\n<p>On a touchscreen device, <code>pwinMouseX</code> will hold the x-coordinate of the most\nrecent touch point. <code>pwinMouseX</code> is reset to the current\n<a href=\"#/p5/winMouseX\">winMouseX</a> value at the start of each touch\nevent.</p>\n<p>Note: Use <a href=\"#/p5/pmouseX\">pmouseX</a> to track the mouse’s previous\nx-coordinate within the canvas.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(10);\n\n  describe('A gray square. A white circle at its center grows larger when the mouse moves horizontally.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's diameter.\n  let d = winMouseX - pwinMouseX;\n\n  // Draw the circle.\n  circle(50, 50, d);\n}",
        "function setup() {\n  // Create the canvas and set its position.\n  let cnv = createCanvas(100, 100);\n  cnv.position(20, 20);\n\n  describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display pwinMouseX.\n  text(pwinMouseX, 50, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "displayWidth",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 573,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the width of the screen display.</p>\n<p><code>displayWidth</code> is useful for running full-screen programs. Its value\ndepends on the current <a href=\"#/p5/pixelDensity\">pixelDensity()</a>.</p>\n<p>Note: The actual screen width can be computed as\n<code>displayWidth * pixelDensity()</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Set the canvas' width and height\n  // using the display's dimensions.\n  createCanvas(displayWidth, displayHeight);\n\n  background(200);\n\n  describe('A gray canvas that is the same size as the display.');\n}"
      ],
      "alt": "This example does not render anything.",
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "displayHeight",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 601,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the height of the screen display.</p>\n<p><code>displayHeight</code> is useful for running full-screen programs. Its value\ndepends on the current <a href=\"#/p5/pixelDensity\">pixelDensity()</a>.</p>\n<p>Note: The actual screen height can be computed as\n<code>displayHeight * pixelDensity()</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Set the canvas' width and height\n  // using the display's dimensions.\n  createCanvas(displayWidth, displayHeight);\n\n  background(200);\n\n  describe('A gray canvas that is the same size as the display.');\n}"
      ],
      "alt": "This example does not render anything.",
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pwinMouseY",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 623,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that tracks the mouse's previous vertical position\nwithin the browser.</p>\n<p><code>pwinMouseY</code> keeps track of the mouse's position relative to the top-left\ncorner of the browser window. Its value is\n<a href=\"#/p5/winMouseY\">winMouseY</a> from the previous frame. For\nexample, if the mouse was 50 pixels from\nthe top edge of the browser during the last frame, then <code>pwinMouseY</code> will\nbe 50.</p>\n<p>On a touchscreen device, <code>pwinMouseY</code> will hold the y-coordinate of the most\nrecent touch point. <code>pwinMouseY</code> is reset to the current\n<a href=\"#/p5/winMouseY\">winMouseY</a> value at the start of each touch\nevent.</p>\n<p>Note: Use <a href=\"#/p5/pmouseY\">pmouseY</a> to track the mouse’s previous\ny-coordinate within the canvas.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(10);\n\n  describe('A gray square. A white circle at its center grows larger when the mouse moves vertically.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's diameter.\n  let d = winMouseY - pwinMouseY;\n\n  // Draw the circle.\n  circle(50, 50, d);\n}",
        "function setup() {\n  // Create the canvas and set its position.\n  let cnv = createCanvas(100, 100);\n  cnv.position(20, 20);\n\n  describe('A gray square with a number at its center. The number changes as the user moves the mouse vertically.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display pwinMouseY.\n  text(pwinMouseY, 50, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "windowWidth",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 626,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the width of the browser's viewport.</p>\n<p>The <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Layout_viewport\" target=\"_blank\">layout viewport</a>\nis the area within the browser that's available for drawing.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Set the canvas' width and height\n  // using the browser's dimensions.\n  createCanvas(windowWidth, windowHeight);\n\n  background(200);\n\n  describe('A gray canvas that takes up the entire browser window.');\n}"
      ],
      "alt": "This example does not render anything.",
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "windowHeight",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 651,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the height of the browser's viewport.</p>\n<p>The <a href=\"https://developer.mozilla.org/en-US/docs/Glossary/Layout_viewport\" target=\"_blank\">layout viewport</a>\nis the area within the browser that's available for drawing.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Set the canvas' width and height\n  // using the browser's dimensions.\n  createCanvas(windowWidth, windowHeight);\n\n  background(200);\n\n  describe('A gray canvas that takes up the entire browser window.');\n}"
      ],
      "alt": "This example does not render anything.",
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "mouseButton",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 691,
      "type": "Object",
      "description": "<p>An object that tracks the current state of mouse buttons, showing which\nbuttons are pressed at any given moment.</p>\n<p>The <code>mouseButton</code> object has three properties:</p>\n<ul><li><code>left</code>: A boolean indicating whether the left mouse button is pressed.</li><li><code>right</code>: A boolean indicating whether the right mouse button is pressed.</li><li><code>center</code>: A boolean indicating whether the middle mouse button (scroll wheel button) is pressed.</li></ul><p>Note: Different browsers may track <code>mouseButton</code> differently. See\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\" target=\"_blank\">MDN</a>\nfor more information.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(200, 200);\n\n  describe(\n    'A gray square with black text at its center. The text changes from 0 to either \"left\" or \"right\" when the user clicks a mouse button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the mouse button.\n  text(`Left: ${mouseButton.left}`, width / 2, height / 2 - 20);\n  text(`Right: ${mouseButton.right}`, width / 2, height / 2);\n  text(`Center: ${mouseButton.center}`, width / 2, height / 2 + 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    \"A gray square. Different shapes appear at its center depending on the mouse button that's clicked.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  if (mouseIsPressed === true) {\n    if (mouseButton.left) {\n      circle(50, 50, 50);\n    }\n    if (mouseButton.right) {\n      square(25, 25, 50);\n    }\n    if (mouseButton.center) {\n      triangle(23, 75, 50, 20, 78, 75);\n    }\n  }\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "touches",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 773,
      "type": "Object[]",
      "description": "<p>An <code>Array</code> of all the current touch points on a touchscreen device.</p>\n<p>The <code>touches</code> array is empty by default. When the user touches their\nscreen, a new touch point is tracked and added to the array. Touch points\nare <code>Objects</code> with the following properties:</p>\n<pre><code class=\"language-js\">// Iterate over the touches array.\nfor (let touch of touches) {\n  // x-coordinate relative to the top-left\n  // corner of the canvas.\n  console.log(touch.x);\n\n  // y-coordinate relative to the top-left\n  // corner of the canvas.\n  console.log(touch.y);\n\n  // x-coordinate relative to the top-left\n  // corner of the browser.\n  console.log(touch.winX);\n\n  // y-coordinate relative to the top-left\n  // corner of the browser.\n  console.log(touch.winY);\n\n  // ID number\n  console.log(touch.id);\n}</code></pre>",
      "example": [
        "// On a touchscreen device, touch the canvas using one or more fingers\n// at the same time.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. White circles appear where the user touches the square.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a circle at each touch point.\n  for (let touch of touches) {\n    circle(touch.x, touch.y, 40);\n  }\n}",
        "// On a touchscreen device, touch the canvas using one or more fingers\n// at the same time.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. Labels appear where the user touches the square, displaying the coordinates.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a label above each touch point.\n  for (let touch of touches) {\n    text(`${touch.x}, ${touch.y}`, touch.x, touch.y - 40);\n  }\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "mouseIsPressed",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 826,
      "type": "Boolean",
      "description": "A <code>Boolean</code> system variable that's <code>true</code> if the mouse is pressed and\n<code>false</code> if not.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with the word \"false\" at its center. The word changes to \"true\" when the user presses a mouse button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the mouseIsPressed variable.\n  text(mouseIsPressed, 25, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The inner square turns black when the user presses the mouse.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  if (mouseIsPressed === true) {\n    fill(0);\n  } else {\n    fill(255);\n  }\n\n  // Draw the square.\n  square(25, 25, 50);\n}"
      ],
      "module": "Events",
      "submodule": "Pointer",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HSL",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 38,
      "type": "HSL",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "P2DHDR",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 41,
      "type": "P2DHDR",
      "description": "<p>A high-dynamic-range (HDR) variant of the default, two-dimensional renderer.</p>\n<p>When available, this mode can allow for extended color ranges and more\ndynamic color representation. Use it similarly to <code>P2D</code>:\n<code>createCanvas(400, 400, P2DHDR)</code>.</p>\n",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HWB",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 44,
      "type": "HWB",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DEGREES",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 47,
      "type": "DEGREES",
      "description": "<p>A <code>String</code> constant that's used to set the\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, functions such as <a href=\"#/p5/rotate\">rotate()</a> and\n<a href=\"#/p5/sin\">sin()</a> expect angles measured in units of radians.\nCalling <code>angleMode(DEGREES)</code> ensures that angles are measured in units of\ndegrees.</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a red arc from 0 to HALF_PI radians.\n  fill(255, 0, 0);\n  arc(50, 50, 80, 80, 0, HALF_PI);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Draw a blue arc from 90˚ to 180˚.\n  fill(0, 0, 255);\n  arc(50, 50, 80, 80, 90, 180);\n\n  describe('The bottom half of a circle drawn on a gray background. The bottom-right quarter is red. The bottom-left quarter is blue.');\n}"
      ],
      "module": "Math",
      "submodule": "Trigonometry",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LAB",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 50,
      "type": "LAB",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LCH",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 56,
      "type": "LCH",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OKLAB",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 62,
      "type": "OKLAB",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "WEBGL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 64,
      "type": "WEBGL",
      "description": "<p>One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders.</p>\n<p><code>WEBGL</code> differs from the default <a href=\"/reference/p5/P2D\"><code>P2D</code></a> renderer in the following ways:</p>\n<ul><li>Coordinate System - When drawing in <code>WEBGL</code> mode, the origin point (0,0,0) is located at the center of the screen, not the top-left corner. See <a href=\"https://p5js.org/tutorials/coordinates-and-transformations/\">the tutorial page about coordinates and transformations</a>.</li><li>3D Shapes - <code>WEBGL</code> mode can be used to draw 3-dimensional shapes like <a href=\"#/p5/box\">box()</a>, <a href=\"#/p5/sphere\">sphere()</a>, <a href=\"#/p5/cone\">cone()</a>, and <a href=\"https://p5js.org/reference/#3D%20Primitives\">more</a>. See <a href=\"https://p5js.org/tutorials/custom-geometry/\">the tutorial page about custom geometry</a> to make more complex objects.</li><li>Shape Detail - When drawing in <code>WEBGL</code> mode, you can specify how smooth curves should be drawn by using a <code>detail</code> parameter. See <a href=\"https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5#3d-primitives-shapes\">the wiki section about shapes</a> for a more information and an example.</li><li>Textures - A texture is like a skin that wraps onto a shape. See <a href=\"https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5#textures\">the wiki section about textures</a> for examples of mapping images onto surfaces with textures.</li><li>Materials and Lighting - <code>WEBGL</code> offers different types of lights like <a href=\"#/p5/ambientLight\">ambientLight()</a> to place around a scene. Materials like <a href=\"#/p5/specularMaterial\">specularMaterial()</a> reflect the lighting to convey shape and depth. See <a href=\"https://p5js.org/tutorials/lights-camera-materials/\">the tutorial page for styling and appearance</a> to experiment with different combinations.</li><li>Camera - The viewport of a <code>WEBGL</code> sketch can be adjusted by changing camera attributes. See <a href=\"https://p5js.org/tutorials/lights-camera-materials#camera-and-view\">the tutorial page section about cameras</a> for an explanation of camera controls.</li><li>Text - <code>WEBGL</code> requires opentype/truetype font files to be preloaded using <a href=\"#/p5/loadFont\">loadFont()</a>. See <a href=\"https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5#text\">the wiki section about text</a> for details, along with a workaround.</li><li>Shaders - Shaders are hardware accelerated programs that can be used for a variety of effects and graphics. See the <a href=\"https://p5js.org/tutorials/intro-to-shaders/\">introduction to shaders</a> to get started with shaders in p5.js.</li><li>Graphics Acceleration - <code>WEBGL</code> mode uses the graphics card instead of the CPU, so it may help boost the performance of your sketch (example: drawing more shapes on the screen at once).</li></ul><p>To learn more about WEBGL mode, check out <a href=\"https://p5js.org/tutorials/#webgl\">all the interactive WEBGL tutorials</a> in the \"Tutorials\" section of this website, or read the wiki article <a href=\"https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5\">\"Getting started with WebGL in p5\"</a>.</p>\n",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OKLCH",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 68,
      "type": "OKLCH",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "WEBGL2",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 73,
      "type": "WEBGL2",
      "description": "One of the two possible values of a WebGL canvas (either WEBGL or WEBGL2),\nwhich can be used to determine what capabilities the rendering environment\nhas.",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RGBA",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 74,
      "type": "RGBA",
      "description": "",
      "module": "Color",
      "submodule": "Creating & Reading",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "WEBGPU",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 80,
      "description": "A constant used for creating a WebGPU rendering context",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ARROW",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 88,
      "type": "ARROW",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RADIANS",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 89,
      "type": "RADIANS",
      "description": "<p>A <code>String</code> constant that's used to set the\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, functions such as <a href=\"#/p5/rotate\">rotate()</a> and\n<a href=\"#/p5/sin\">sin()</a> expect angles measured in units of radians.\nCalling <code>angleMode(RADIANS)</code> ensures that angles are measured in units of\nradians. Doing so can be useful if the\n<a href=\"#/p5/angleMode\">angleMode()</a> has been set to\n<a href=\"#/p5/DEGREES\">DEGREES</a>.</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Draw a red arc from 0˚ to 90˚.\n  fill(255, 0, 0);\n  arc(50, 50, 80, 80, 0, 90);\n\n  // Use radians.\n  angleMode(RADIANS);\n\n  // Draw a blue arc from HALF_PI to PI.\n  fill(0, 0, 255);\n  arc(50, 50, 80, 80, HALF_PI, PI);\n\n  describe('The bottom half of a circle drawn on a gray background. The bottom-right quarter is red. The bottom-left quarter is blue.');\n}"
      ],
      "module": "Math",
      "submodule": "Trigonometry",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SIMPLE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 94,
      "type": "String",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "FULL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 99,
      "type": "String",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CROSS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 106,
      "type": "CROSS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HAND",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 112,
      "type": "HAND",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "MOVE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 118,
      "type": "MOVE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TEXT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 124,
      "type": "TEXT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "WAIT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 130,
      "type": "WAIT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "file",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "File",
      "description": "Underlying\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/File\" target=\"_blank\">File</a>\nobject. All <code>File</code> properties and methods are accessible.",
      "example": [
        "// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displayInfo() when the file loads.\n  let input = createFileInput(displayInfo);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its info is written in black.');\n}\n\n// Use the p5.File once it loads.\nfunction displayInfo(file) {\n  background(200);\n\n  // Display the p5.File's name.\n  text(file.name, 10, 10, 80, 40);\n\n  // Display the p5.File's type and subtype.\n  text(`${file.type}/${file.subtype}`, 10, 70);\n\n  // Display the p5.File's size in bytes.\n  text(file.size, 10, 90);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "type",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "String",
      "description": "<p>The file\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\" target=\"_blank\">MIME type</a>\nas a string.</p>\n<p>For example, <code>'image'</code> and <code>'text'</code> are both MIME types.</p>\n",
      "example": [
        "// Use the file input to load a file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displayType() when the file loads.\n  let input = createFileInput(displayType);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its type is written in black.');\n}\n\n// Display the p5.File's type once it loads.\nfunction displayType(file) {\n  background(200);\n\n  // Display the p5.File's type.\n  text(`This is file's type is: ${file.type}`, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "subtype",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "String",
      "description": "<p>The file subtype as a string.</p>\n<p>For example, a file with an <code>'image'</code>\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\" target=\"_blank\">MIME type</a>\nmay have a subtype such as <code>png</code> or <code>jpeg</code>.</p>\n",
      "example": [
        "// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displaySubtype() when the file loads.\n  let input = createFileInput(displaySubtype);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its subtype is written in black.');\n}\n\n// Display the p5.File's type once it loads.\nfunction displaySubtype(file) {\n  background(200);\n\n  // Display the p5.File's subtype.\n  text(`This is file's subtype is: ${file.subtype}`, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "name",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "String",
      "description": "The file name as a string.",
      "example": [
        "// Use the file input to load a\n// file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displayName() when the file loads.\n  let input = createFileInput(displayName);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its name is written in black.');\n}\n\n// Display the p5.File's name once it loads.\nfunction displayName(file) {\n  background(200);\n\n  // Display the p5.File's name.\n  text(`This is file's name is: ${file.name}`, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "size",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "Number",
      "description": "The number of bytes in the file.",
      "example": [
        "// Use the file input to load a file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displaySize() when the file loads.\n  let input = createFileInput(displaySize);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its size in bytes is written in black.');\n}\n\n// Display the p5.File's size in bytes once it loads.\nfunction displaySize(file) {\n  background(200);\n\n  // Display the p5.File's size.\n  text(`This is file has ${file.size} bytes.`, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "data",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.File.js",
      "line": 143,
      "type": "any",
      "description": "<p>A string containing the file's data.</p>\n<p>Data can be either image data, text contents, or a parsed object in the\ncase of JSON and <a href=\"#/p5.XML\">p5.XML</a> objects.</p>\n",
      "example": [
        "// Use the file input to load a file and display its info.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a file input and place it beneath the canvas.\n  // Call displayData() when the file loads.\n  let input = createFileInput(displayData);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user loads a file, its data is written in black.');\n}\n\n// Display the p5.File's data once it loads.\nfunction displayData(file) {\n  background(200);\n\n  // Display the p5.File's data, which looks like a random string of characters.\n  text(file.data, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.File"
    },
    {
      "itemtype": "property",
      "name": "worldInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block that modifies the world-space properties of each vertex in a shader. This hook can be used inside <a href=\"#/p5/buildColorShader\"><code>buildColorShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to customize vertex positions, normals, texture coordinates, and colors before rendering. Modifications happen between the <code>.begin()</code> and <code>.end()</code> methods of the hook. \"World space\" refers to the coordinate system of the 3D scene, before any camera or projection transformations are applied.</p>\n<p><code>worldInputs</code> has the following properties:</p>\n<ul><li><code>position</code>: a three-component vector representing the original position of the vertex.</li><li><code>normal</code>: a three-component vector representing the direction the surface is facing.</li><li><code>texCoord</code>: a two-component vector representing the texture coordinates.</li><li><code>color</code>: a four-component vector representing the color of the vertex (red, green, blue, alpha).</li></ul><p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li><li><a href=\"#/p5/buildNormalShader\"><code>buildNormalShader()</code></a></li><li><a href=\"#/p5/buildColorShader\"><code>buildColorShader()</code></a></li><li><a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let t = millis();\n  worldInputs.begin();\n  // Move the vertex up and down in a wave in world space\n  // In world space, moving the object (e.g., with translate()) will affect these coordinates\n  // The sphere is ~50 units tall here, so 20 gives a noticeable wave\n  worldInputs.position.y += 20 * sin(t * 0.001 + worldInputs.position.x * 0.05);\n  worldInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  sphere(50);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "combineColors",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block that modifies how color components are combined in the fragment shader. This hook can be used inside <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to control the final color output of a material. Modifications happen between the <code>.begin()</code> and <code>.end()</code> methods of the hook.</p>\n<p><code>combineColors</code> has the following properties:</p>\n<ul><li><code>baseColor</code>: a three-component vector representing the base color (red, green, blue).</li><li><code>diffuse</code>: a single number representing the diffuse reflection.</li><li><code>ambientColor</code>: a three-component vector representing the ambient color.</li><li><code>ambient</code>: a single number representing the ambient reflection.</li><li><code>specularColor</code>: a three-component vector representing the specular color.</li><li><code>specular</code>: a single number representing the specular reflection.</li><li><code>emissive</code>: a three-component vector representing the emissive color.</li><li><code>opacity</code>: a single number representing the opacity.</li></ul><p>Call <code>.set()</code> on the hook with a vector with four components (red, green, blue, alpha) for the final color.</p>\n<p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  combineColors.begin();\n  // Custom color combination: add a green tint using vector properties\n  combineColors.set([\n    combineColors.baseColor * combineColors.diffuse +\n      combineColors.ambientColor * combineColors.ambient +\n      combineColors.specularColor * combineColors.specular +\n      combineColors.emissive +\n      [0, 0.2, 0], // Green tint\n    combineColors.opacity\n  ]);\n  combineColors.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('white');\n  sphere(50);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pixelInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block that modifies the properties of each pixel before the final color is calculated. This hook can be used inside <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to adjust per-pixel data before lighting is applied. Modifications happen between the <code>.begin()</code> and <code>.end()</code> methods of the hook.</p>\n<p>The properties of <code>pixelInputs</code> depend on the shader:</p>\n<ul><li><p>In <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a>:</p>\n<ul><li><code>normal</code>: a three-component vector representing the surface normal.</li><li><code>texCoord</code>: a two-component vector representing the texture coordinates (u, v).</li><li><code>ambientLight</code>: a three-component vector representing the ambient light color.</li><li><code>ambientMaterial</code>: a three-component vector representing the material's ambient color.</li><li><code>specularMaterial</code>: a three-component vector representing the material's specular color.</li><li><code>emissiveMaterial</code>: a three-component vector representing the material's emissive color.</li><li><code>color</code>: a four-component vector representing the base color (red, green, blue, alpha).</li><li><code>shininess</code>: a number controlling specular highlights.</li><li><code>metalness</code>: a number controlling the metalness factor.</li></ul></li><li><p>In <a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a>:</p>\n<ul><li><code>color</code>: a four-component vector representing the stroke color (red, green, blue, alpha).</li><li><code>tangent</code>: a two-component vector representing the stroke tangent.</li><li><code>center</code>: a two-component vector representing the cap/join center.</li><li><code>position</code>: a two-component vector representing the current fragment position.</li><li><code>strokeWeight</code>: a number representing the stroke weight in pixels.</li></ul></li></ul><p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li><li><a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let t = millis();\n  pixelInputs.begin();\n  // Animate alpha (transparency) based on x position\n  pixelInputs.color.a = 0.5 + 0.5 *\n    sin(pixelInputs.texCoord.x * 10.0 + t * 0.002);\n  pixelInputs.end();\n}\n\nfunction draw() {\n  background(240);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('purple');\n  circle(0, 0, 100);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "finalColor",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "description": "<p>A shader hook block that modifies the final color of each pixel after all lighting is applied. This hook can be used inside <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to adjust the color before it appears on the screen. Modifications happen between the <code>.begin()</code> and <code>.end()</code> methods of the hook.</p>\n<p><code>finalColor</code> has the following properties:</p>\n<ul><li><code>color</code>: a four-component vector representing the pixel color (red, green, blue, alpha).</li></ul><p>Call <code>.set()</code> on the hook with a vector with four components (red, green, blue, alpha) to update the final color.</p>\n<p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildColorShader\"><code>buildColorShader()</code></a></li><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li><li><a href=\"#/p5/buildNormalShader\"><code>buildNormalShader()</code></a></li><li><a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  finalColor.begin();\n  let color = finalColor.color;\n  // Add a blue tint to the output color\n  color.b += 0.4;\n  finalColor.set(color);\n  finalColor.end();\n}\n\nfunction draw() {\n  background(230);\n  shader(myShader);\n  noStroke();\n  fill('green');\n  circle(0, 0, 100);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "filterColor",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block that sets the color for each pixel in a filter shader. This hook can be used inside <a href=\"#/p5/buildFilterShader\"><code>buildFilterShader()</code></a> to control the output color for each pixel.</p>\n<p><code>filterColor</code> has the following properties:</p>\n<ul><li><code>texCoord</code>: a two-component vector representing the texture coordinates (u, v).</li><li><code>canvasSize</code>: a two-component vector representing the canvas size in pixels (width, height).</li><li><code>texelSize</code>: a two-component vector representing the size of a single texel in texture space.</li><li><code>canvasContent</code>: a texture containing the sketch's contents before the filter is applied.</li></ul><p>Call <code>.set()</code> on the hook with a vector with four components (red, green, blue, alpha) to update the final color.</p>\n<p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildFilterShader\"><code>buildFilterShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildFilterShader(warp);\n}\n\nfunction warp() {\n  filterColor.begin();\n  // Warp the texture coordinates for a wavy effect\n  let warped = [\n    filterColor.texCoord.x,\n    filterColor.texCoord.y + 0.1 * sin(filterColor.texCoord.x * 10)\n  ];\n  let tex = filterColor.canvasContent;\n  filterColor.set(getTexture(tex, warped));\n  filterColor.end();\n}\n\nfunction draw() {\n  background(180);\n  // Draw something to the canvas\n  fill('yellow');\n  circle(0, 0, 150);\n  filter(myShader);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "objectInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block to modify the properties of each vertex before any transformations are applied. This hook can be used inside <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to customize vertex positions, normals, texture coordinates, and colors before rendering. Modifications happen between the <code>.begin()</code> and <code>.end()</code> methods of the hook. \"Object space\" refers to the coordinate system of the 3D scene before any transformations, cameras, or projection transformations are applied.</p>\n<p><code>objectInputs</code> has the following properties:</p>\n<ul><li><code>position</code>: a three-component vector representing the original position of the vertex.</li><li><code>normal</code>: a three-component vector representing the direction the surface is facing.</li><li><code>texCoord</code>: a two-component vector representing the texture coordinates.</li><li><code>color</code>: a four-component vector representing the color of the vertex (red, green, blue, alpha).</li></ul><p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildColorShader\"><code>buildColorShader()</code></a></li><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li><li><a href=\"#/p5/buildNormalShader\"><code>buildNormalShader()</code></a></li><li><a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let t = millis();\n  objectInputs.begin();\n  // Create a sine wave along the object\n  objectInputs.position.y += sin(t * 0.001 + objectInputs.position.x);\n  objectInputs.end();\n}\n\nfunction draw() {\n  background(220);\n  shader(myShader);\n  noStroke();\n  fill('orange');\n  sphere(50);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "cameraInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "type": "Object",
      "description": "<p>A shader hook block that adjusts vertex properties from the perspective of the camera. This hook can be used inside <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a> and similar shader <a href=\"#/p5.Shader/modify\"><code>modify()</code></a> calls to customize vertex positions, normals, texture coordinates, and colors before rendering. \"Camera space\" refers to the coordinate system of the 3D scene after transformations have been applied, seen relative to the camera.</p>\n<p><code>cameraInputs</code>  has the following properties:</p>\n<ul><li><code>position</code>: a three-component vector representing the position after camera transformation.</li><li><code>normal</code>: a three-component vector representing the normal after camera transformation.</li><li><code>texCoord</code>: a two-component vector representing the texture coordinates.</li><li><code>color</code>: a four-component vector representing the color of the vertex (red, green, blue, alpha).</li></ul><p>This hook is available in:</p>\n<ul><li><a href=\"#/p5/buildColorShader\"><code>buildColorShader()</code></a></li><li><a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader()</code></a></li><li><a href=\"#/p5/buildNormalShader\"><code>buildNormalShader()</code></a></li><li><a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader()</code></a></li></ul>",
      "example": [
        "let myShader;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let t = millis();\n  cameraInputs.begin();\n  // Move vertices in camera space based on their x position\n  cameraInputs.position.y += 30 * sin(cameraInputs.position.x * 0.05 + t * 0.001);\n  // Tint all vertices blue\n  cameraInputs.color.b = 1;\n  cameraInputs.end();\n}\n\nfunction draw() {\n  background(200);\n  shader(myShader);\n  noStroke();\n  fill('red');\n  sphere(50);\n}"
      ],
      "module": "3D",
      "submodule": "p5.strands",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HALF_PI",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 212,
      "type": "Number",
      "description": "<p>A <code>Number</code> constant that's approximately 1.5708.</p>\n<p><code>HALF_PI</code> is half the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\n<code>rotate(HALF_PI)</code> rotates the coordinate system <code>HALF_PI</code> radians, which is\na quarter turn (90˚).</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚, <code>PI</code> radians equals 180˚, <code>HALF_PI</code>\nradians equals 90˚, and <code>QUARTER_PI</code> radians equals 45˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw an arc from 0 to HALF_PI.\n  arc(50, 50, 80, 80, 0, HALF_PI);\n\n  describe('The bottom-right quarter of a circle drawn in white on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a line.\n  line(0, 0, 40, 0);\n\n  // Rotate a quarter turn.\n  rotate(HALF_PI);\n\n  // Draw the same line, rotated.\n  line(0, 0, 40, 0);\n\n  describe('Two black lines on a gray background. One line extends from the center to the right. The other line extends from the center to the bottom.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A red circle and a blue circle oscillate from left to right on a gray background. The red circle appears to chase the blue circle.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Calculate the x-coordinates.\n  let x1 = 40 * sin(frameCount * 0.05);\n  let x2 = 40 * sin(frameCount * 0.05 + HALF_PI);\n\n  // Style the oscillators.\n  noStroke();\n\n  // Draw the red oscillator.\n  fill(255, 0, 0);\n  circle(x1, 0, 20);\n\n  // Draw the blue oscillator.\n  fill(0, 0, 255);\n  circle(x2, 0, 20);\n}"
      ],
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "PI",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 291,
      "type": "Number",
      "description": "<p>A <code>Number</code> constant that's approximately 3.1416.</p>\n<p><code>PI</code> is the mathematical constant π. It's useful for many tasks that\ninvolve rotation and oscillation. For example, calling <code>rotate(PI)</code> rotates\nthe coordinate system <code>PI</code> radians, which is a half turn (180˚).</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚, <code>PI</code> radians equals 180˚, <code>HALF_PI</code>\nradians equals 90˚, and <code>QUARTER_PI</code> radians equals 45˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw an arc from 0 to PI.\n  arc(50, 50, 80, 80, 0, PI);\n\n  describe('The bottom half of a circle drawn in white on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a line.\n  line(0, 0, 40, 0);\n\n  // Rotate a half turn.\n  rotate(PI);\n\n  // Draw the same line, rotated.\n  line(0, 0, 40, 0);\n\n  describe('A horizontal black line on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A red circle and a blue circle oscillate from left to right on a gray background. The circles drift apart, then meet in the middle, over and over again.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Calculate the x-coordinates.\n  let x1 = 40 * sin(frameCount * 0.05);\n  let x2 = 40 * sin(frameCount * 0.05 + PI);\n\n  // Style the oscillators.\n  noStroke();\n\n  // Draw the red oscillator.\n  fill(255, 0, 0);\n  circle(x1, 0, 20);\n\n  // Draw the blue oscillator.\n  fill(0, 0, 255);\n  circle(x2, 0, 20);\n}"
      ],
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "QUARTER_PI",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 371,
      "type": "Number",
      "description": "<p>A <code>Number</code> constant that's approximately 0.7854.</p>\n<p><code>QUARTER_PI</code> is one-fourth the value of the mathematical constant π. It's\nuseful for many tasks that involve rotation and oscillation. For example,\ncalling <code>rotate(QUARTER_PI)</code> rotates the coordinate system <code>QUARTER_PI</code>\nradians, which is an eighth of a turn (45˚).</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚, <code>PI</code> radians equals 180˚, <code>HALF_PI</code>\nradians equals 90˚, and <code>QUARTER_PI</code> radians equals 45˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw an arc from 0 to QUARTER_PI.\n  arc(50, 50, 80, 80, 0, QUARTER_PI);\n\n  describe('A one-eighth slice of a circle drawn in white on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a line.\n  line(0, 0, 40, 0);\n\n  // Rotate an eighth turn.\n  rotate(QUARTER_PI);\n\n  // Draw the same line, rotated.\n  line(0, 0, 40, 0);\n\n  describe('Two black lines that form a \"V\" opening towards the bottom-right corner of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A red circle and a blue circle oscillate from left to right on a gray background. The red circle appears to chase the blue circle.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Calculate the x-coordinates.\n  let x1 = 40 * sin(frameCount * 0.05);\n  let x2 = 40 * sin(frameCount * 0.05 + QUARTER_PI);\n\n  // Style the oscillators.\n  noStroke();\n\n  // Draw the red oscillator.\n  fill(255, 0, 0);\n  circle(x1, 0, 20);\n\n  // Draw the blue oscillator.\n  fill(0, 0, 255);\n  circle(x2, 0, 20);\n}"
      ],
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TAU",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 456,
      "type": "Number",
      "description": "<p>A <code>Number</code> constant that's approximately 6.2382.</p>\n<p><code>TAU</code> is twice the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\n<code>rotate(TAU)</code> rotates the coordinate system <code>TAU</code> radians, which is one\nfull turn (360˚). <code>TAU</code> and <code>TWO_PI</code> are equal.</p>\n<p>Note: <code>TAU</code> radians equals 360˚, <code>PI</code> radians equals 180˚, <code>HALF_PI</code>\nradians equals 90˚, and <code>QUARTER_PI</code> radians equals 45˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw an arc from 0 to TAU.\n  arc(50, 50, 80, 80, 0, TAU);\n\n  describe('A white circle drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a line.\n  line(0, 0, 40, 0);\n\n  // Rotate a full turn.\n  rotate(TAU);\n\n  // Style the second line.\n  strokeWeight(5);\n\n  // Draw the same line, shorter and rotated.\n  line(0, 0, 20, 0);\n\n  describe(\n    'Two horizontal black lines on a gray background. A thick line extends from the center toward the right. A thin line extends from the end of the thick line.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A red circle with a blue center oscillates from left to right on a gray background.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Calculate the x-coordinates.\n  let x1 = 40 * sin(frameCount * 0.05);\n  let x2 = 40 * sin(frameCount * 0.05 + TAU);\n\n  // Style the oscillators.\n  noStroke();\n\n  // Draw the red oscillator.\n  fill(255, 0, 0);\n  circle(x1, 0, 20);\n\n  // Draw the blue oscillator, smaller.\n  fill(0, 0, 255);\n  circle(x2, 0, 10);\n}"
      ],
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TWO_PI",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 541,
      "type": "Number",
      "description": "<p>A <code>Number</code> constant that's approximately 6.2382.</p>\n<p><code>TWO_PI</code> is twice the value of the mathematical constant π. It's useful for\nmany tasks that involve rotation and oscillation. For example, calling\n<code>rotate(TWO_PI)</code> rotates the coordinate system <code>TWO_PI</code> radians, which is\none full turn (360˚). <code>TWO_PI</code> and <code>TAU</code> are equal.</p>\n<p>Note: <code>TWO_PI</code> radians equals 360˚, <code>PI</code> radians equals 180˚, <code>HALF_PI</code>\nradians equals 90˚, and <code>QUARTER_PI</code> radians equals 45˚.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw an arc from 0 to TWO_PI.\n  arc(50, 50, 80, 80, 0, TWO_PI);\n\n  describe('A white circle drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a line.\n  line(0, 0, 40, 0);\n\n  // Rotate a full turn.\n  rotate(TWO_PI);\n\n  // Style the second line.\n  strokeWeight(5);\n\n  // Draw the same line, shorter and rotated.\n  line(0, 0, 20, 0);\n\n  describe(\n    'Two horizontal black lines on a gray background. A thick line extends from the center toward the right. A thin line extends from the end of the thick line.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A red circle with a blue center oscillates from left to right on a gray background.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Calculate the x-coordinates.\n  let x1 = 40 * sin(frameCount * 0.05);\n  let x2 = 40 * sin(frameCount * 0.05 + TWO_PI);\n\n  // Style the oscillators.\n  noStroke();\n\n  // Draw the red oscillator.\n  fill(255, 0, 0);\n  circle(x1, 0, 20);\n\n  // Draw the blue oscillator, smaller.\n  fill(0, 0, 255);\n  circle(x2, 0, 10);\n}"
      ],
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DEG_TO_RAD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 547,
      "type": "Number",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RAD_TO_DEG",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 553,
      "type": "Number",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CORNER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 561,
      "type": "CORNER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CORNERS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 567,
      "type": "CORNERS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RADIUS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 573,
      "type": "RADIUS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RIGHT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 579,
      "type": "RIGHT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LEFT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 585,
      "type": "LEFT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CENTER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 591,
      "type": "CENTER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TOP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 597,
      "type": "TOP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BOTTOM",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 603,
      "type": "BOTTOM",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "drawingContext",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 603,
      "type": "CanvasRenderingContext2D|WebGLRenderingContext|WebGL2RenderingContext",
      "description": "<p>A system variable that provides direct access to the sketch's\n<code><canvas></code> element.</p>\n<p>The <code><canvas></code> element provides many specialized features that aren't\nincluded in the p5.js library. The <code>drawingContext</code> system variable\nprovides access to these features by exposing the sketch's\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D\">CanvasRenderingContext2D</a>\nobject.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the circle using shadows.\n  drawingContext.shadowOffsetX = 5;\n  drawingContext.shadowOffsetY = -5;\n  drawingContext.shadowBlur = 10;\n  drawingContext.shadowColor = 'black';\n\n  // Draw the circle.\n  circle(50, 50, 40);\n\n  describe(\"A white circle on a gray background. The circle's edges are shadowy.\");\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background('skyblue');\n\n  // Style the circle using a color gradient.\n  let myGradient = drawingContext.createRadialGradient(50, 50, 3, 50, 50, 40);\n  myGradient.addColorStop(0, 'yellow');\n  myGradient.addColorStop(0.6, 'orangered');\n  myGradient.addColorStop(1, 'yellow');\n  drawingContext.fillStyle = myGradient;\n  drawingContext.strokeStyle = 'rgba(0, 0, 0, 0)';\n\n  // Draw the circle.\n  circle(50, 50, 40);\n\n  describe('A fiery sun drawn on a light blue background.');\n}"
      ],
      "module": "Rendering",
      "submodule": "Rendering",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BASELINE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 609,
      "type": "BASELINE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "POINTS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 615,
      "type": "POINTS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LINES",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 621,
      "type": "LINES",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LINE_STRIP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 627,
      "type": "LINE_STRIP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LINE_LOOP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 633,
      "type": "LINE_LOOP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TRIANGLES",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 639,
      "type": "TRIANGLES",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "disableFriendlyErrors",
      "file": "src/scripts/parsers/in/p5.js/src/core/main.js",
      "line": 641,
      "type": "Boolean",
      "description": "<p>Turns off the parts of the Friendly Error System (FES) that impact performance.</p>\n<p>The <a href=\"https://github.com/processing/p5.js/blob/main/contributor_docs/friendly_error_system.md\" target=\"_blank\">FES</a>\ncan cause sketches to draw slowly because it does extra work behind the\nscenes. For example, the FES checks the arguments passed to functions,\nwhich takes time to process. Disabling the FES can significantly improve\nperformance by turning off these checks.</p>\n",
      "example": [
        "// Disable the FES.\np5.disableFriendlyErrors = true;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // The circle() function requires three arguments. The\n  // next line would normally display a friendly error that\n  // points this out. Instead, nothing happens and it fails\n  // silently.\n  circle(50, 50);\n\n  describe('A gray square.');\n}"
      ],
      "module": "Structure",
      "submodule": "Structure",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TRIANGLE_FAN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 645,
      "type": "TRIANGLE_FAN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TRIANGLE_STRIP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 651,
      "type": "TRIANGLE_STRIP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "QUADS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 657,
      "type": "QUADS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "QUAD_STRIP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 663,
      "type": "QUAD_STRIP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TESS",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 669,
      "type": "TESS",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "EMPTY_PATH",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 675,
      "type": "EMPTY_PATH",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "PATH",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 681,
      "type": "PATH",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CLOSE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 687,
      "type": "CLOSE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OPEN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 693,
      "type": "OPEN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CHORD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 699,
      "type": "CHORD",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "PIE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 705,
      "type": "PIE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "PROJECT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 711,
      "type": "PROJECT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SQUARE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 717,
      "type": "SQUARE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ROUND",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 723,
      "type": "ROUND",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BEVEL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 729,
      "type": "BEVEL",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "MITER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 735,
      "type": "MITER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "AUTO",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 747,
      "type": "AUTO",
      "description": "AUTO allows us to automatically set the width or height of an element (but not both),\nbased on the current height and width of the element. Only one parameter can\nbe passed to the <a href=\"/reference/p5.Element/size\">size</a> function as AUTO, at a time.",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ALT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 754,
      "type": "ALT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BACKSPACE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 761,
      "type": "BACKSPACE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CONTROL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 768,
      "type": "CONTROL",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DELETE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 775,
      "type": "DELETE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DOWN_ARROW",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 782,
      "type": "DOWN_ARROW",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ENTER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 789,
      "type": "ENTER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ESCAPE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 796,
      "type": "ESCAPE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LEFT_ARROW",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 803,
      "type": "LEFT_ARROW",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OPTION",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 810,
      "type": "OPTION",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RETURN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 817,
      "type": "RETURN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "RIGHT_ARROW",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 824,
      "type": "RIGHT_ARROW",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SHIFT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 831,
      "type": "SHIFT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TAB",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 838,
      "type": "TAB",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "UP_ARROW",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 845,
      "type": "UP_ARROW",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BLEND",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 853,
      "type": "BLEND",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "REMOVE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 859,
      "type": "REMOVE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ADD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 865,
      "type": "ADD",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DARKEST",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 871,
      "type": "DARKEST",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LIGHTEST",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 877,
      "type": "LIGHTEST",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DIFFERENCE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 883,
      "type": "DIFFERENCE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SUBTRACT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 889,
      "type": "SUBTRACT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "EXCLUSION",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 895,
      "type": "EXCLUSION",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "MULTIPLY",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 901,
      "type": "MULTIPLY",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "pixels",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 901,
      "type": "Number[]",
      "description": "<p>An array containing the color of each pixel on the canvas.</p>\n<p>Colors are stored as numbers representing red, green, blue, and alpha\n(RGBA) values. <code>pixels</code> is a one-dimensional array for performance reasons.</p>\n<p>Each pixel occupies four elements in the <code>pixels</code> array, one for each RGBA\nvalue. For example, the pixel at coordinates (0, 0) stores its RGBA values\nat <code>pixels[0]</code>, <code>pixels[1]</code>, <code>pixels[2]</code>, and <code>pixels[3]</code>, respectively.\nThe next pixel at coordinates (1, 0) stores its RGBA values at <code>pixels[4]</code>,\n<code>pixels[5]</code>, <code>pixels[6]</code>, and <code>pixels[7]</code>. And so on. The <code>pixels</code> array\nfor a 100×100 canvas has 100 × 100 × 4 = 40,000 elements.</p>\n<p>Some displays use several smaller pixels to set the color at a single\npoint. The <a href=\"#/p5/pixelDensity\">pixelDensity()</a> function returns\nthe pixel density of the canvas. High density displays often have a\n<a href=\"#/p5/pixelDensity\">pixelDensity()</a> of 2. On such a display, the\n<code>pixels</code> array for a 100×100 canvas has 200 × 200 × 4 =\n160,000 elements.</p>\n<p>Accessing the RGBA values for a point on the canvas requires a little math\nas shown below. The <a href=\"#/p5/loadPixels\">loadPixels()</a> function\nmust be called before accessing the <code>pixels</code> array. The\n<a href=\"#/p5/updatePixels\">updatePixels()</a> function must be called\nafter any changes are made.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  background(128);\n\n  // Load the pixels array.\n  loadPixels();\n\n  // Set the dot's coordinates.\n  let x = 50;\n  let y = 50;\n\n  // Get the pixel density.\n  let d = pixelDensity();\n\n  // Set the pixel(s) at the center of the canvas black.\n  for (let i = 0; i < d; i += 1) {\n    for (let j = 0; j < d; j += 1) {\n      let index = 4 * ((y * d + j) * width * d + (x * d + i));\n      // Red.\n      pixels[index] = 0;\n      // Green.\n      pixels[index + 1] = 0;\n      // Blue.\n      pixels[index + 2] = 0;\n      // Alpha.\n      pixels[index + 3] = 255;\n    }\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('A black dot in the middle of a gray rectangle.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Load the pixels array.\n  loadPixels();\n\n  // Get the pixel density.\n  let d = pixelDensity();\n\n  // Calculate the halfway index in the pixels array.\n  let halfImage = 4 * (d * width) * (d * height / 2);\n\n  // Make the top half of the canvas red.\n  for (let i = 0; i < halfImage; i += 4) {\n    // Red.\n    pixels[i] = 255;\n    // Green.\n    pixels[i + 1] = 0;\n    // Blue.\n    pixels[i + 2] = 0;\n    // Alpha.\n    pixels[i + 3] = 255;\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('A red rectangle drawn above a gray rectangle.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Color object.\n  let pink = color(255, 102, 204);\n\n  // Load the pixels array.\n  loadPixels();\n\n  // Get the pixel density.\n  let d = pixelDensity();\n\n  // Calculate the halfway index in the pixels array.\n  let halfImage = 4 * (d * width) * (d * height / 2);\n\n  // Make the top half of the canvas red.\n  for (let i = 0; i < halfImage; i += 4) {\n    pixels[i] = red(pink);\n    pixels[i + 1] = green(pink);\n    pixels[i + 2] = blue(pink);\n    pixels[i + 3] = alpha(pink);\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('A pink rectangle drawn above a gray rectangle.');\n}"
      ],
      "module": "Image",
      "submodule": "Pixels",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SCREEN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 907,
      "type": "SCREEN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "REPLACE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 913,
      "type": "REPLACE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OVERLAY",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 919,
      "type": "OVERLAY",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HARD_LIGHT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 925,
      "type": "HARD_LIGHT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SOFT_LIGHT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 931,
      "type": "SOFT_LIGHT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DODGE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 937,
      "type": "DODGE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BURN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 943,
      "type": "BURN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "THRESHOLD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 951,
      "type": "THRESHOLD",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "GRAY",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 957,
      "type": "GRAY",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "OPAQUE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 963,
      "type": "OPAQUE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "INVERT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 969,
      "type": "INVERT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "POSTERIZE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 975,
      "type": "POSTERIZE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "DILATE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 981,
      "type": "DILATE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ERODE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 987,
      "type": "ERODE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BLUR",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 993,
      "type": "BLUR",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "NORMAL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1001,
      "type": "NORMAL",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "ITALIC",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1007,
      "type": "ITALIC",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BOLD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1013,
      "type": "BOLD",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BOLDITALIC",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1019,
      "type": "BOLDITALIC",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CHAR",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1025,
      "type": "CHAR",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "WORD",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1031,
      "type": "WORD",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LINEAR",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1044,
      "type": "LINEAR",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "QUADRATIC",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1050,
      "type": "QUADRATIC",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "BEZIER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1056,
      "type": "BEZIER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CURVE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1062,
      "type": "CURVE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "STROKE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1070,
      "type": "STROKE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "FILL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1076,
      "type": "FILL",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "TEXTURE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1082,
      "type": "TEXTURE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "IMMEDIATE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1088,
      "type": "IMMEDIATE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "IMAGE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1097,
      "type": "IMAGE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "NEAREST",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1113,
      "type": "NEAREST",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "REPEAT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1119,
      "type": "REPEAT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "CLAMP",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1125,
      "type": "CLAMP",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "MIRROR",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1131,
      "type": "MIRROR",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "FLAT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1139,
      "type": "FLAT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "SMOOTH",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1145,
      "type": "SMOOTH",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LANDSCAPE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1153,
      "type": "LANDSCAPE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "PORTRAIT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1159,
      "type": "PORTRAIT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "GRID",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1170,
      "type": "GRID",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "AXES",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1177,
      "type": "AXES",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "LABEL",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1184,
      "type": "LABEL",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "FALLBACK",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1190,
      "type": "FALLBACK",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "color",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "type": "p5.FramebufferTexture",
      "description": "<p>An object that stores the framebuffer's color data.</p>\n<p>Each framebuffer uses a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture\" target=\"_blank\">WebGLTexture</a>\nobject internally to store its color data. The <code>myBuffer.color</code> property\nmakes it possible to pass this data directly to other functions. For\nexample, calling <code>texture(myBuffer.color)</code> or\n<code>myShader.setUniform('colorTexture', myBuffer.color)</code>  may be helpful for\nadvanced use cases.</p>\n<p>Note: By default, a framebuffer's y-coordinates are flipped compared to\nimages and videos. It's easy to flip a framebuffer's y-coordinates as\nneeded when applying it as a texture. For example, calling\n<code>plane(myBuffer.width, -myBuffer.height)</code> will flip the framebuffer.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Framebuffer object.\n  let myBuffer = createFramebuffer();\n\n  // Start drawing to the p5.Framebuffer object.\n  myBuffer.begin();\n\n  triangle(-25, 25, 0, -25, 25, 25);\n\n  // Stop drawing to the p5.Framebuffer object.\n  myBuffer.end();\n\n  // Use the p5.Framebuffer object's WebGLTexture.\n  texture(myBuffer.color);\n\n  // Style the plane.\n  noStroke();\n\n  // Draw the plane.\n  plane(myBuffer.width, myBuffer.height);\n\n  describe('A white triangle on a gray background.');\n}"
      ],
      "module": "Rendering",
      "class": "p5.Framebuffer"
    },
    {
      "itemtype": "property",
      "name": "depth",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "type": "p5.FramebufferTexture",
      "description": "<p>An object that stores the framebuffer's depth data.</p>\n<p>Each framebuffer uses a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGLTexture\" target=\"_blank\">WebGLTexture</a>\nobject internally to store its depth data. The <code>myBuffer.depth</code> property\nmakes it possible to pass this data directly to other functions. For\nexample, calling <code>texture(myBuffer.depth)</code> or\n<code>myShader.setUniform('depthTexture', myBuffer.depth)</code>  may be helpful for\nadvanced use cases.</p>\n<p>Note: By default, a framebuffer's y-coordinates are flipped compared to\nimages and videos. It's easy to flip a framebuffer's y-coordinates as\nneeded when applying it as a texture. For example, calling\n<code>plane(myBuffer.width, -myBuffer.height)</code> will flip the framebuffer.</p>\n",
      "example": [
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * viewModelPosition;\n  vTexCoord = aTexCoord;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision highp float;\nvarying vec2 vTexCoord;\nuniform sampler2D depth;\n\nvoid main() {\n  // Get the pixel's depth value.\n  float depthVal = texture2D(depth, vTexCoord).r;\n\n  // Set the pixel's color based on its depth.\n  gl_FragColor = mix(\n    vec4(0., 0., 0., 1.),\n    vec4(1., 0., 1., 1.),\n    depthVal);\n}\n`;\n\nlet myBuffer;\nlet myShader;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  // Create a p5.Shader object.\n  myShader = createShader(vertSrc, fragSrc);\n\n  // Compile and apply the shader.\n  shader(myShader);\n\n  describe('The shadow of a box rotates slowly against a magenta background.');\n}\n\nfunction draw() {\n  // Draw to the p5.Framebuffer object.\n  myBuffer.begin();\n  background(255);\n  rotateX(frameCount * 0.01);\n  box(20, 20, 80);\n  myBuffer.end();\n\n  // Set the shader's depth uniform using\n  // the framebuffer's depth texture.\n  myShader.setUniform('depth', myBuffer.depth);\n\n  // Style the plane.\n  noStroke();\n\n  // Draw the plane.\n  plane(myBuffer.width, myBuffer.height);\n}"
      ],
      "module": "Rendering",
      "class": "p5.Framebuffer"
    },
    {
      "itemtype": "property",
      "name": "pixels",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "type": "Number[]",
      "description": "<p>An array containing the color of each pixel in the framebuffer.</p>\n<p><a href=\"#/p5.Framebuffer/loadPixels\">myBuffer.loadPixels()</a> must be\ncalled before accessing the <code>myBuffer.pixels</code> array.\n<a href=\"#/p5.Framebuffer/updatePixels\">myBuffer.updatePixels()</a>\nmust be called after any changes are made.</p>\n<p>Note: Updating pixels via this property is slower than drawing to the\nframebuffer directly. Consider using a\n<a href=\"#/p5.Shader\">p5.Shader</a> object instead of looping over\n<code>myBuffer.pixels</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Framebuffer object.\n  let myBuffer = createFramebuffer();\n\n  // Load the pixels array.\n  myBuffer.loadPixels();\n\n  // Get the number of pixels in the\n  // top half of the framebuffer.\n  let numPixels = myBuffer.pixels.length / 2;\n\n  // Set the framebuffer's top half to pink.\n  for (let i = 0; i < numPixels; i += 4) {\n    myBuffer.pixels[i] = 255;\n    myBuffer.pixels[i + 1] = 102;\n    myBuffer.pixels[i + 2] = 204;\n    myBuffer.pixels[i + 3] = 255;\n  }\n\n  // Update the pixels array.\n  myBuffer.updatePixels();\n\n  // Draw the p5.Framebuffer object to the canvas.\n  image(myBuffer, -50, -50);\n\n  describe('A pink rectangle above a gray rectangle.');\n}"
      ],
      "module": "Rendering",
      "class": "p5.Framebuffer"
    },
    {
      "itemtype": "property",
      "name": "width",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "type": "Number",
      "description": "The current width of the framebuffer.",
      "module": "Rendering",
      "class": "p5.Framebuffer"
    },
    {
      "itemtype": "property",
      "name": "height",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1194,
      "type": "Number",
      "description": "The current width of the framebuffer.",
      "module": "Rendering",
      "class": "p5.Framebuffer"
    },
    {
      "itemtype": "property",
      "name": "CONTAIN",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1197,
      "type": "CONTAIN",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "COVER",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1204,
      "type": "COVER",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "width",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1209,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the width of the canvas in pixels.</p>\n<p><code>width</code>'s default value is 100. Calling\n<a href=\"#/p5/createCanvas\">createCanvas()</a> or\n<a href=\"#/p5/resizeCanvas\">resizeCanvas()</a> changes the value of\n<code>width</code>. Calling <a href=\"#/p5/noCanvas\">noCanvas()</a> sets its value to\n0.</p>\n",
      "example": [
        "function setup() {\n  background(200);\n\n  // Display the canvas' width.\n  text(width, 42, 54);\n\n  describe('The number 100 written in black on a gray square.');\n}",
        "function setup() {\n  createCanvas(50, 100);\n\n  background(200);\n\n  // Display the canvas' width.\n  text(width, 21, 54);\n\n  describe('The number 50 written in black on a gray rectangle.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the canvas' width.\n  text(width, 42, 54);\n\n  describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');\n}\n\n// If the mouse is pressed, reisze\n// the canvas and display its new\n// width.\nfunction mousePressed() {\n  if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n    resizeCanvas(50, 100);\n    background(200);\n    text(width, 21, 54);\n  }\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "height",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1209,
      "type": "Number",
      "description": "<p>A <code>Number</code> variable that stores the height of the canvas in pixels.</p>\n<p><code>height</code>'s default value is 100. Calling\n<a href=\"#/p5/createCanvas\">createCanvas()</a> or\n<a href=\"#/p5/resizeCanvas\">resizeCanvas()</a> changes the value of\n<code>height</code>. Calling <a href=\"#/p5/noCanvas\">noCanvas()</a> sets its value to\n0.</p>\n",
      "example": [
        "function setup() {\n  background(200);\n\n  // Display the canvas' height.\n  text(height, 42, 54);\n\n  describe('The number 100 written in black on a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 50);\n\n  background(200);\n\n  // Display the canvas' height.\n  text(height, 42, 27);\n\n  describe('The number 50 written in black on a gray rectangle.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the canvas' height.\n  text(height, 42, 54);\n\n  describe('The number 100 written in black on a gray square. When the mouse is pressed, the square becomes a rectangle and the number becomes 50.');\n}\n\n// If the mouse is pressed, reisze\n// the canvas and display its new\n// height.\nfunction mousePressed() {\n  if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n    resizeCanvas(100, 50);\n    background(200);\n    text(height, 42, 27);\n  }\n}"
      ],
      "module": "Environment",
      "submodule": "Environment",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "UNSIGNED_BYTE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1211,
      "type": "UNSIGNED_BYTE",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "UNSIGNED_INT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1218,
      "type": "UNSIGNED_INT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "FLOAT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1225,
      "type": "FLOAT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "HALF_FLOAT",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1232,
      "type": "HALF_FLOAT",
      "description": "",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "INCLUDE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1241,
      "type": "INCLUDE",
      "description": "The <code>splineProperty('ends')</code> mode where splines curve through\ntheir first and last points.",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "EXCLUDE",
      "file": "src/scripts/parsers/in/p5.js/src/core/constants.js",
      "line": 1250,
      "type": "EXCLUDE",
      "description": "The <code>splineProperty('ends')</code> mode where the first and last points in a spline\naffect the direction of the curve, but are not rendered.",
      "module": "Constants",
      "submodule": "Constants",
      "class": "p5"
    },
    {
      "itemtype": "property",
      "name": "columns",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1272,
      "type": "String[]",
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "description": "An array containing the names of the columns in the table, if the \"header\" the table is\nloaded with the \"header\" parameter.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Set text properties for drawing on the canvas\n  fill(0);       // Set text color to black\n  textSize(12);  // Adjust text size as needed\n\n  // Display the column names on the canvas\n  for (let c = 0; c < table.getColumnCount(); c++) {\n    text('column ' + c + ' is named ' + table.columns[c], 10, 30 + c * 20);\n  }\n}"
      ],
      "module": "IO",
      "submodule": "Table",
      "class": "p5.Table"
    },
    {
      "itemtype": "property",
      "name": "rows",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1272,
      "type": "p5.TableRow[]",
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "description": "An array containing the <a href=\"#/p5.Table\">p5.TableRow</a> objects that make up the\nrows of the table. The same result as calling <a href=\"/reference/p5.Table/getRows/\">getRows()</a>",
      "module": "IO",
      "submodule": "Table",
      "class": "p5.Table"
    },
    {
      "itemtype": "property",
      "name": "src",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1714,
      "description": "Path to the media element's source as a string.",
      "example": [
        "let beat;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"https://p5js.org/reference/assets/beat.mp3\" written in black on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  textWrap(CHAR);\n  text(beat.src, 10, 10, 80, 80);\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.MediaElement"
    },
    {
      "itemtype": "property",
      "name": "vertices",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "description": "<p>An array with the geometry's vertices.</p>\n<p>The geometry's vertices are stored as\n<a href=\"#/p5.Vector\">p5.Vector</a> objects in the <code>myGeometry.vertices</code>\narray. The geometry's first vertex is the\n<a href=\"#/p5.Vector\">p5.Vector</a> object at <code>myGeometry.vertices[0]</code>,\nits second vertex is <code>myGeometry.vertices[1]</code>, its third vertex is\n<code>myGeometry.vertices[2]</code>, and so on.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = new p5.Geometry();\n\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(40, 0, 0);\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  myGeometry.vertices.push(v0, v1, v2);\n\n  describe('A white triangle drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(function() {\n    torus(30, 15, 10, 8);\n  });\n\n  describe('A white torus rotates slowly against a dark gray background. Red spheres mark its vertices.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateY(frameCount * 0.01);\n\n  // Style the p5.Geometry object.\n  fill(255);\n  stroke(0);\n\n  // Display the p5.Geometry object.\n  model(myGeometry);\n\n  // Style the vertices.\n  fill(255, 0, 0);\n  noStroke();\n\n  // Iterate over the vertices array.\n  for (let v of myGeometry.vertices) {\n    // Draw a sphere to mark the vertex.\n    push();\n    translate(v);\n    sphere(2.5);\n    pop();\n  }\n}"
      ],
      "module": "Shape",
      "submodule": "3D Primitives",
      "class": "p5.Geometry"
    },
    {
      "itemtype": "property",
      "name": "vertexNormals",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "description": "<p>An array with the vectors that are normal to the geometry's vertices.</p>\n<p>A face's orientation is defined by its normal vector which points out\nof the face and is normal (perpendicular) to the surface. Calling\n<code>myGeometry.computeNormals()</code> first calculates each face's normal\nvector. Then it calculates the normal vector for each vertex by\naveraging the normal vectors of the faces surrounding the vertex. The\nvertex normals are stored as <a href=\"#/p5.Vector\">p5.Vector</a>\nobjects in the <code>myGeometry.vertexNormals</code> array.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(function() {\n    torus(30, 15, 10, 8);\n  });\n\n  // Compute the vertex normals.\n  myGeometry.computeNormals();\n\n  describe(\n    'A white torus rotates against a dark gray background. Red lines extend outward from its vertices.'\n  );\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateY(frameCount * 0.01);\n\n  // Style the p5.Geometry object.\n  stroke(0);\n\n  // Display the p5.Geometry object.\n  model(myGeometry);\n\n  // Style the normal vectors.\n  stroke(255, 0, 0);\n\n  // Iterate over the vertices and vertexNormals arrays.\n  for (let i = 0; i < myGeometry.vertices.length; i += 1) {\n\n    // Get the vertex p5.Vector object.\n    let v = myGeometry.vertices[i];\n\n    // Get the vertex normal p5.Vector object.\n    let n = myGeometry.vertexNormals[i];\n\n    // Calculate a point along the vertex normal.\n    let p = p5.Vector.mult(n, 8);\n\n    // Draw the vertex normal as a red line.\n    push();\n    translate(v);\n    line(0, 0, 0, p.x, p.y, p.z);\n    pop();\n  }\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = new p5.Geometry();\n\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(0, 40, 0);\n  let v3 = createVector(40, 0, 0);\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  myGeometry.vertices.push(v0, v1, v2, v3);\n\n  // Compute the faces array.\n  myGeometry.computeFaces();\n\n  // Compute the surface normals.\n  myGeometry.computeNormals();\n\n  describe('A red square drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a white point light.\n  pointLight(255, 255, 255, 0, 0, 10);\n\n  // Style the p5.Geometry object.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Display the p5.Geometry object.\n  model(myGeometry);\n}"
      ],
      "module": "Shape",
      "submodule": "3D Primitives",
      "class": "p5.Geometry"
    },
    {
      "itemtype": "property",
      "name": "faces",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "description": "<p>An array that lists which of the geometry's vertices form each of its\nfaces.</p>\n<p>All 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to form triangles\nthat are stitched together. Each triangular patch on the geometry's\nsurface is called a face.</p>\n<p>The geometry's vertices are stored as\n<a href=\"#/p5.Vector\">p5.Vector</a> objects in the\n<a href=\"#/p5.Geometry/vertices\">myGeometry.vertices</a> array. The\ngeometry's first vertex is the <a href=\"#/p5.Vector\">p5.Vector</a>\nobject at <code>myGeometry.vertices[0]</code>, its second vertex is\n<code>myGeometry.vertices[1]</code>, its third vertex is <code>myGeometry.vertices[2]</code>,\nand so on.</p>\n<p>For example, a geometry made from a rectangle has two faces because a\nrectangle is made by joining two triangles. <code>myGeometry.faces</code> for a\nrectangle would be the two-dimensional array <code>[[0, 1, 2], [2, 1, 3]]</code>.\nThe first face, <code>myGeometry.faces[0]</code>, is the array <code>[0, 1, 2]</code> because\nit's formed by connecting <code>myGeometry.vertices[0]</code>,\n<code>myGeometry.vertices[1]</code>,and <code>myGeometry.vertices[2]</code>. The second face,\n<code>myGeometry.faces[1]</code>, is the array <code>[2, 1, 3]</code> because it's formed by\nconnecting <code>myGeometry.vertices[2]</code>, <code>myGeometry.vertices[1]</code>,and\n<code>myGeometry.vertices[3]</code>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(function() {\n    sphere();\n  });\n\n  describe(\"A sphere drawn on a gray background. The sphere's surface is a grayscale patchwork of triangles.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the p5.Geometry object.\n  noStroke();\n\n  // Set a random seed.\n  randomSeed(1234);\n\n  // Iterate over the faces array.\n  for (let face of myGeometry.faces) {\n\n    // Style the face.\n    let g = random(0, 255);\n    fill(g);\n\n    // Draw the face.\n    beginShape();\n    // Iterate over the vertices that form the face.\n    for (let f of face) {\n      // Get the vertex's p5.Vector object.\n      let v = myGeometry.vertices[f];\n      vertex(v.x, v.y, v.z);\n    }\n    endShape();\n\n  }\n}"
      ],
      "module": "Shape",
      "submodule": "3D Primitives",
      "class": "p5.Geometry"
    },
    {
      "itemtype": "property",
      "name": "uvs",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "description": "<p>An array that lists the texture coordinates for each of the geometry's\nvertices.</p>\n<p>In order for <a href=\"#/p5/texture\">texture()</a> to work, the geometry\nneeds a way to map the points on its surface to the pixels in a\nrectangular image that's used as a texture. The geometry's vertex at\ncoordinates <code>(x, y, z)</code> maps to the texture image's pixel at coordinates\n<code>(u, v)</code>.</p>\n<p>The <code>myGeometry.uvs</code> array stores the <code>(u, v)</code> coordinates for each\nvertex in the order it was added to the geometry. For example, the\nfirst vertex, <code>myGeometry.vertices[0]</code>, has its <code>(u, v)</code> coordinates\nstored at <code>myGeometry.uvs[0]</code> and <code>myGeometry.uvs[1]</code>.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/laDefense.jpg');\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create p5.Geometry objects.\n  let geom1 = buildGeometry(createShape);\n  let geom2 = buildGeometry(createShape);\n\n  // Left (original).\n  push();\n  translate(-25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom1);\n  pop();\n\n  // Set geom2's texture coordinates.\n  geom2.uvs = [0.25, 0.25, 0.75, 0.25, 0.25, 0.75, 0.75, 0.75];\n\n  // Right (zoomed in).\n  push();\n  translate(25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom2);\n  pop();\n\n  describe(\n    'Two photos of a ceiling on a gray background. The photo on the right zooms in to the center of the photo.'\n  );\n}\n\nfunction createShape() {\n  plane(40);\n}"
      ],
      "module": "Shape",
      "submodule": "3D Primitives",
      "class": "p5.Geometry"
    },
    {
      "itemtype": "property",
      "name": "gid",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 2104,
      "type": "String",
      "description": "A unique identifier for this geometry. The renderer will use this to cache resources.",
      "module": "Shape",
      "submodule": "3D Primitives",
      "class": "p5.Geometry"
    },
    {
      "itemtype": "property",
      "name": "width",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 2106,
      "type": "Number",
      "description": "The image's width in pixels.",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Calculate the center coordinates.\n  let x = img.width / 2;\n  let y = img.height / 2;\n\n  // Draw a circle at the image's center.\n  circle(x, y, 20);\n\n  describe('An image of a mountain landscape with a white circle drawn in the middle.');\n}"
      ],
      "module": "Image",
      "submodule": "Image",
      "class": "p5.Image"
    },
    {
      "itemtype": "property",
      "name": "height",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 2106,
      "type": "Number",
      "description": "The image's height in pixels.",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Calculate the center coordinates.\n  let x = img.width / 2;\n  let y = img.height / 2;\n\n  // Draw a circle at the image's center.\n  circle(x, y, 20);\n\n  describe('An image of a mountain landscape with a white circle drawn in the middle.');\n}"
      ],
      "module": "Image",
      "submodule": "Image",
      "class": "p5.Image"
    },
    {
      "itemtype": "property",
      "name": "pixels",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 2106,
      "type": "Number[]",
      "description": "<p>An array containing the color of each pixel in the image.</p>\n<p>Colors are stored as numbers representing red, green, blue, and alpha\n(RGBA) values. <code>img.pixels</code> is a one-dimensional array for performance\nreasons.</p>\n<p>Each pixel occupies four elements in the pixels array, one for each\nRGBA value. For example, the pixel at coordinates (0, 0) stores its\nRGBA values at <code>img.pixels[0]</code>, <code>img.pixels[1]</code>, <code>img.pixels[2]</code>,\nand <code>img.pixels[3]</code>, respectively. The next pixel at coordinates (1, 0)\nstores its RGBA values at <code>img.pixels[4]</code>, <code>img.pixels[5]</code>,\n<code>img.pixels[6]</code>, and <code>img.pixels[7]</code>. And so on. The <code>img.pixels</code> array\nfor a 100×100 <a href=\"#/p5.Image\">p5.Image</a> object has\n100 × 100 × 4 = 40,000 elements.</p>\n<p>Accessing the RGBA values for a pixel in the image requires a little\nmath as shown in the examples below. The\n<a href=\"#/p5.Image/loadPixels\">img.loadPixels()</a>\nmethod must be called before accessing the <code>img.pixels</code> array. The\n<a href=\"#/p5.Image/updatePixels\">img.updatePixels()</a> method must be\ncalled after any changes are made.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to red.\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 255;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A red square drawn in the middle of a gray square.');\n}"
      ],
      "module": "Image",
      "submodule": "Image",
      "class": "p5.Image"
    },
    {
      "itemtype": "property",
      "name": "width",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2320,
      "type": "Number",
      "description": "A <code>Number</code> property that stores the element's width.",
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.Element"
    },
    {
      "itemtype": "property",
      "name": "height",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2320,
      "type": "Number",
      "description": "A <code>Number</code> property that stores the element's height.",
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.Element"
    },
    {
      "itemtype": "property",
      "name": "elt",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2320,
      "type": "HTMLElement",
      "description": "<p>The element's underlying <code>HTMLElement</code> object.</p>\n<p>The\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\" target=\"_blank\">HTMLElement</a>\nobject's properties and methods can be used directly.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Set the border style for the\n  // canvas.\n  cnv.elt.style.border = '5px dashed deeppink';\n\n  describe('A gray square with a pink border drawn with dashed lines.');\n}"
      ],
      "module": "DOM",
      "submodule": "DOM",
      "class": "p5.Element"
    },
    {
      "itemtype": "property",
      "name": "eyeX",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The camera’s x-coordinate.</p>\n<p>By default, the camera’s x-coordinate is set to 0 in \"world\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The text \"eyeX: 0\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of eyeX, rounded to the nearest integer.\n  text(`eyeX: ${round(cam.eyeX)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move left and right as the camera moves. The text \"eyeX: X\" is written in black beneath the cube. X oscillates between -25 and 25.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new x-coordinate.\n  let x = 25 * sin(frameCount * 0.01);\n\n  // Set the camera's position.\n  cam.setPosition(x, -400, 800);\n\n  // Display the value of eyeX, rounded to the nearest integer.\n  text(`eyeX: ${round(cam.eyeX)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "eyeY",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The camera’s y-coordinate.</p>\n<p>By default, the camera’s y-coordinate is set to 0 in \"world\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  // Set the camera.\n  setCamera(cam);\n\n  describe(\n    'A white cube on a gray background. The text \"eyeY: -400\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of eyeY, rounded to the nearest integer.\n  text(`eyeY: ${round(cam.eyeY)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move up and down as the camera moves. The text \"eyeY: Y\" is written in black beneath the cube. Y oscillates between -374 and -425.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new y-coordinate.\n  let y = 25 * sin(frameCount * 0.01) - 400;\n\n  // Set the camera's position.\n  cam.setPosition(0, y, 800);\n\n  // Display the value of eyeY, rounded to the nearest integer.\n  text(`eyeY: ${round(cam.eyeY)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "eyeZ",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The camera’s z-coordinate.</p>\n<p>By default, the camera’s z-coordinate is set to 800 in \"world\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The text \"eyeZ: 800\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of eyeZ, rounded to the nearest integer.\n  text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move forward and back as the camera moves. The text \"eyeZ: Z\" is written in black beneath the cube. Z oscillates between 700 and 900.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new z-coordinate.\n  let z = 100 * sin(frameCount * 0.01) + 800;\n\n  // Set the camera's position.\n  cam.setPosition(0, -400, z);\n\n  // Display the value of eyeZ, rounded to the nearest integer.\n  text(`eyeZ: ${round(cam.eyeZ)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "centerX",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The x-coordinate of the place where the camera looks.</p>\n<p>By default, the camera looks at the origin <code>(0, 0, 0)</code> in \"world\" space, so\n<code>myCamera.centerX</code> is 0.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The text \"centerX: 10\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of centerX, rounded to the nearest integer.\n  text(`centerX: ${round(cam.centerX)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right.\n  cam.setPosition(100, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move left and right as the camera shifts its focus. The text \"centerX: X\" is written in black beneath the cube. X oscillates between -15 and 35.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new x-coordinate.\n  let x = 25 * sin(frameCount * 0.01) + 10;\n\n  // Point the camera.\n  cam.lookAt(x, 20, -30);\n\n  // Display the value of centerX, rounded to the nearest integer.\n  text(`centerX: ${round(cam.centerX)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "centerY",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The y-coordinate of the place where the camera looks.</p>\n<p>By default, the camera looks at the origin <code>(0, 0, 0)</code> in \"world\" space, so\n<code>myCamera.centerY</code> is 0.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The text \"centerY: 20\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of centerY, rounded to the nearest integer.\n  text(`centerY: ${round(cam.centerY)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right.\n  cam.setPosition(100, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move up and down as the camera shifts its focus. The text \"centerY: Y\" is written in black beneath the cube. Y oscillates between -5 and 45.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new y-coordinate.\n  let y = 25 * sin(frameCount * 0.01) + 20;\n\n  // Point the camera.\n  cam.lookAt(10, y, -30);\n\n  // Display the value of centerY, rounded to the nearest integer.\n  text(`centerY: ${round(cam.centerY)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "centerZ",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The y-coordinate of the place where the camera looks.</p>\n<p>By default, the camera looks at the origin <code>(0, 0, 0)</code> in \"world\" space, so\n<code>myCamera.centerZ</code> is 0.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The text \"centerZ: -30\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of centerZ, rounded to the nearest integer.\n  text(`centerZ: ${round(cam.centerZ)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Place the camera at the top-right.\n  cam.setPosition(100, -400, 800);\n\n  // Point the camera at (10, 20, -30).\n  cam.lookAt(10, 20, -30);\n\n  describe(\n    'A white cube on a gray background. The cube appears to move forward and back as the camera shifts its focus. The text \"centerZ: Z\" is written in black beneath the cube. Z oscillates between -55 and -25.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the new z-coordinate.\n  let z = 25 * sin(frameCount * 0.01) - 30;\n\n  // Point the camera.\n  cam.lookAt(10, 20, z);\n\n  // Display the value of centerZ, rounded to the nearest integer.\n  text(`centerZ: ${round(cam.centerZ)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "upX",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The x-component of the camera's \"up\" vector.</p>\n<p>The camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n<code>(0, 1, 0)</code>, so its x-component is 0 in \"local\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The text \"upX: 0\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of upX, rounded to the nearest tenth.\n  text(`upX: ${round(cam.upX, 1)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The cube appears to rock back and forth. The text \"upX: X\" is written in black beneath it. X oscillates between -1 and 1.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the x-component.\n  let x = sin(frameCount * 0.01);\n\n  // Update the camera's \"up\" vector.\n  cam.camera(100, -400, 800, 0, 0, 0, x, 1, 0);\n\n  // Display the value of upX, rounded to the nearest tenth.\n  text(`upX: ${round(cam.upX, 1)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "upY",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The y-component of the camera's \"up\" vector.</p>\n<p>The camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n<code>(0, 1, 0)</code>, so its y-component is 1 in \"local\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The text \"upY: 1\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of upY, rounded to the nearest tenth.\n  text(`upY: ${round(cam.upY, 1)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The cube flips upside-down periodically. The text \"upY: Y\" is written in black beneath it. Y oscillates between -1 and 1.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the y-component.\n  let y = sin(frameCount * 0.01);\n\n  // Update the camera's \"up\" vector.\n  cam.camera(100, -400, 800, 0, 0, 0, 0, y, 0);\n\n  // Display the value of upY, rounded to the nearest tenth.\n  text(`upY: ${round(cam.upY, 1)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "upZ",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2899,
      "type": "Number",
      "description": "<p>The z-component of the camera's \"up\" vector.</p>\n<p>The camera's \"up\" vector orients its y-axis. By default, the \"up\" vector is\n<code>(0, 1, 0)</code>, so its z-component is 0 in \"local\" space.</p>\n",
      "example": [
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The text \"upZ: 0\" is written in black beneath it.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Display the value of upZ, rounded to the nearest tenth.\n  text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);\n}",
        "let cam;\nlet font;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-right: (100, -400, 800)\n  // Point it at the origin: (0, 0, 0)\n  // Set its \"up\" vector: (0, 1, 0).\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, 0);\n\n  describe(\n    'A white cube on a gray background. The cube appears to rock back and forth. The text \"upZ: Z\" is written in black beneath it. Z oscillates between -1 and 1.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the box.\n  fill(255);\n\n  // Draw the box.\n  box();\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n  textFont(font);\n  fill(0);\n\n  // Calculate the z-component.\n  let z = sin(frameCount * 0.01);\n\n  // Update the camera's \"up\" vector.\n  cam.camera(100, -400, 800, 0, 0, 0, 0, 1, z);\n\n  // Display the value of upZ, rounded to the nearest tenth.\n  text(`upZ: ${round(cam.upZ, 1)}`, 0, 45);\n}"
      ],
      "module": "3D",
      "submodule": "Camera",
      "class": "p5.Camera"
    },
    {
      "itemtype": "property",
      "name": "x",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3660,
      "type": "Number",
      "description": "The x component of the vector",
      "module": "Math",
      "class": "p5.Vector"
    },
    {
      "itemtype": "property",
      "name": "y",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3660,
      "type": "Number",
      "description": "The y component of the vector",
      "module": "Math",
      "class": "p5.Vector"
    },
    {
      "itemtype": "property",
      "name": "z",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3660,
      "type": "Number",
      "description": "The z component of the vector",
      "module": "Math",
      "class": "p5.Vector"
    },
    {
      "name": "pixelDensity",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 47,
      "itemtype": "method",
      "description": "<p>Gets or sets the pixel density for high pixel density displays.</p>\n<p>By default, the density will be set to 1.</p>\n<p>Call this method with no arguments to get the default density, or pass\nin a number to set the density. If a non-positive number is provided,\nit defaults to 1.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "density",
              "description": "A scaling factor for the number of pixels per\nside",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current density if called without arguments, or the instance for chaining if setting density.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "density",
              "description": "A scaling factor for the number of pixels per\nside",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current density if called without arguments, or the instance for chaining if setting density.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "density",
              "description": "A scaling factor for the number of pixels per\nside",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current density if called without arguments, or the instance for chaining if setting density.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "density",
              "description": "A scaling factor for the number of pixels per\nside",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current density if called without arguments, or the instance for chaining if setting density.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The current density if called without arguments, or the instance for chaining if setting density.",
        "type": "Number"
      },
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "loadPixels",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 174,
      "itemtype": "method",
      "description": "<p>Loads the current value of each pixel in the image into the <code>img.pixels</code>\narray.</p>\n<p><code>img.loadPixels()</code> must be called before reading or modifying pixel\nvalues.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "updatePixels",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 273,
      "itemtype": "method",
      "description": "<p>Updates the canvas with the RGBA values in the\n<a href=\"#/p5.Image/pixels\">img.pixels</a> array.</p>\n<p><code>img.updatePixels()</code> only needs to be called after changing values in\nthe <a href=\"#/p5.Image/pixels\">img.pixels</a> array. Such changes can be\nmade directly after calling\n<a href=\"#/p5.Image/loadPixels\">img.loadPixels()</a> or by calling\n<a href=\"#/p5.Image/set\">img.set()</a>.</p>\n<p>The optional parameters <code>x</code>, <code>y</code>, <code>width</code>, and <code>height</code> define a\nsubsection of the image to update. Doing so can improve performance in\nsome cases.</p>\n<p>If the image was loaded from a GIF, then calling <code>img.updatePixels()</code>\nwill update the pixels in current frame.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels.\n  img.loadPixels();\n\n  // Set the pixels to black.\n  for (let i = 0; i < img.pixels.length; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "y",
              "description": "y-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "w",
              "description": "width of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "h",
              "description": "height of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "y",
              "description": "y-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "w",
              "description": "width of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "h",
              "description": "height of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "y",
              "description": "y-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "w",
              "description": "width of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "h",
              "description": "height of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "y",
              "description": "y-coordinate of the upper-left corner\nof the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "w",
              "description": "width of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "h",
              "description": "height of the subsection to update.",
              "optional": 1,
              "type": "Integer"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "get",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 408,
      "itemtype": "method",
      "description": "<p>Gets a pixel or a region of pixels from the image.</p>\n<p><code>img.get()</code> is easy to use but it's not as fast as\n<a href=\"#/p5.Image/pixels\">img.pixels</a>. Use\n<a href=\"#/p5.Image/pixels\">img.pixels</a> to read many pixel values.</p>\n<p>The version of <code>img.get()</code> with no parameters returns the entire image.</p>\n<p>The version of <code>img.get()</code> with two parameters, as in <code>img.get(10, 20)</code>,\ninterprets them as coordinates. It returns an array with the\n<code>[R, G, B, A]</code> values of the pixel at the given point.</p>\n<p>The version of <code>img.get()</code> with four parameters, as in\n<code>img,get(10, 20, 50, 90)</code>, interprets them as\ncoordinates and dimensions. The first two parameters are the coordinates\nof the upper-left corner of the subsection. The last two parameters are\nthe width and height of the subsection. It returns a subsection of the\ncanvas in a new <a href=\"#/p5.Image\">p5.Image</a> object.</p>\n<p>Use <code>img.get()</code> instead of <a href=\"#/p5/get\">get()</a> to work directly\nwith images.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy the image.\n  let img2 = get();\n\n  // Display the copied image on the right.\n  image(img2, 50, 0);\n\n  describe('Two identical mountain landscapes shown side-by-side.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get a pixel's color.\n  let c = img.get(50, 90);\n\n  // Style the square using the pixel's color.\n  fill(c);\n  noStroke();\n\n  // Draw the square.\n  square(25, 25, 50);\n\n  describe('A mountain landscape with an olive green square in its center.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy half of the image.\n  let img2 = img.get(0, 0, img.width / 2, img.height / 2);\n\n  // Display half of the image.\n  image(img2, 50, 50);\n\n  describe('A mountain landscape drawn on top of another mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy the image.\n  let img2 = get();\n\n  // Display the copied image on the right.\n  image(img2, 50, 0);\n\n  describe('Two identical mountain landscapes shown side-by-side.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get a pixel's color.\n  let c = img.get(50, 90);\n\n  // Style the square using the pixel's color.\n  fill(c);\n  noStroke();\n\n  // Draw the square.\n  square(25, 25, 50);\n\n  describe('A mountain landscape with an olive green square in its center.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy half of the image.\n  let img2 = img.get(0, 0, img.width / 2, img.height / 2);\n\n  // Display half of the image.\n  image(img2, 50, 50);\n\n  describe('A mountain landscape drawn on top of another mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy the image.\n  let img2 = get();\n\n  // Display the copied image on the right.\n  image(img2, 50, 0);\n\n  describe('Two identical mountain landscapes shown side-by-side.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get a pixel's color.\n  let c = img.get(50, 90);\n\n  // Style the square using the pixel's color.\n  fill(c);\n  noStroke();\n\n  // Draw the square.\n  square(25, 25, 50);\n\n  describe('A mountain landscape with an olive green square in its center.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy half of the image.\n  let img2 = img.get(0, 0, img.width / 2, img.height / 2);\n\n  // Display half of the image.\n  image(img2, 50, 50);\n\n  describe('A mountain landscape drawn on top of another mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy the image.\n  let img2 = get();\n\n  // Display the copied image on the right.\n  image(img2, 50, 0);\n\n  describe('Two identical mountain landscapes shown side-by-side.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get a pixel's color.\n  let c = img.get(50, 90);\n\n  // Style the square using the pixel's color.\n  fill(c);\n  noStroke();\n\n  // Draw the square.\n  square(25, 25, 50);\n\n  describe('A mountain landscape with an olive green square in its center.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Copy half of the image.\n  let img2 = img.get(0, 0, img.width / 2, img.height / 2);\n\n  // Display half of the image.\n  image(img2, 50, 50);\n\n  describe('A mountain landscape drawn on top of another mountain landscape.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "whole <a href=\"#/p5.Image\">p5.Image</a>",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at (x, y) in array format <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "whole <a href=\"#/p5.Image\">p5.Image</a>",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at (x, y) in array format <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "whole <a href=\"#/p5.Image\">p5.Image</a>",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at (x, y) in array format <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "whole <a href=\"#/p5.Image\">p5.Image</a>",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at (x, y) in array format <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
        "type": "p5.Image"
      },
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 576,
      "itemtype": "method",
      "description": "<p>Sets the color of one or more pixels within an image.</p>\n<p><code>img.set()</code> is easy to use but it's not as fast as\n<a href=\"#/p5.Image/pixels\">img.pixels</a>. Use\n<a href=\"#/p5.Image/pixels\">img.pixels</a> to set many pixel values.</p>\n<p><code>img.set()</code> interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a <code>[R, G, B, A]</code> pixel\narray, a <a href=\"#/p5.Color\">p5.Color</a> object, or another\n<a href=\"#/p5.Image\">p5.Image</a> object.</p>\n<p><a href=\"#/p5.Image/updatePixels\">img.updatePixels()</a> must be called\nafter using <code>img.set()</code> for changes to appear.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Set four pixels to black.\n  img.set(30, 20, 0);\n  img.set(85, 20, 0);\n  img.set(85, 75, 0);\n  img.set(30, 75, 0);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Create a p5.Color object.\n  let black = color(0);\n\n  // Set four pixels to black.\n  img.set(30, 20, black);\n  img.set(85, 20, black);\n  img.set(85, 75, black);\n  img.set(30, 75, black);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Draw a color gradient.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      let c = map(x, 0, img.width, 0, 255);\n      img.set(x, y, c);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A square with a horiztonal color gradient from black to white drawn on a gray background.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Create a p5.Image object.\n  let img2 = createImage(100, 100);\n\n  // Set the blank image's pixels using the landscape.\n  img2.set(0, 0, img);\n\n  // Display the second image.\n  image(img2, 0, 0);\n\n  describe('An image of a mountain landscape.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Set four pixels to black.\n  img.set(30, 20, 0);\n  img.set(85, 20, 0);\n  img.set(85, 75, 0);\n  img.set(30, 75, 0);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Create a p5.Color object.\n  let black = color(0);\n\n  // Set four pixels to black.\n  img.set(30, 20, black);\n  img.set(85, 20, black);\n  img.set(85, 75, black);\n  img.set(30, 75, black);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Draw a color gradient.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      let c = map(x, 0, img.width, 0, 255);\n      img.set(x, y, c);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A square with a horiztonal color gradient from black to white drawn on a gray background.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Create a p5.Image object.\n  let img2 = createImage(100, 100);\n\n  // Set the blank image's pixels using the landscape.\n  img2.set(0, 0, img);\n\n  // Display the second image.\n  image(img2, 0, 0);\n\n  describe('An image of a mountain landscape.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Set four pixels to black.\n  img.set(30, 20, 0);\n  img.set(85, 20, 0);\n  img.set(85, 75, 0);\n  img.set(30, 75, 0);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Create a p5.Color object.\n  let black = color(0);\n\n  // Set four pixels to black.\n  img.set(30, 20, black);\n  img.set(85, 20, black);\n  img.set(85, 75, black);\n  img.set(30, 75, black);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Draw a color gradient.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      let c = map(x, 0, img.width, 0, 255);\n      img.set(x, y, c);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A square with a horiztonal color gradient from black to white drawn on a gray background.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Create a p5.Image object.\n  let img2 = createImage(100, 100);\n\n  // Set the blank image's pixels using the landscape.\n  img2.set(0, 0, img);\n\n  // Display the second image.\n  image(img2, 0, 0);\n\n  describe('An image of a mountain landscape.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Set four pixels to black.\n  img.set(30, 20, 0);\n  img.set(85, 20, 0);\n  img.set(85, 75, 0);\n  img.set(30, 75, 0);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(100, 100);\n\n  // Create a p5.Color object.\n  let black = color(0);\n\n  // Set four pixels to black.\n  img.set(30, 20, black);\n  img.set(85, 20, black);\n  img.set(85, 75, black);\n  img.set(30, 75, black);\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Draw a color gradient.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      let c = map(x, 0, img.width, 0, 255);\n      img.set(x, y, c);\n    }\n  }\n\n  // Update the image.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A square with a horiztonal color gradient from black to white drawn on a gray background.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Create a p5.Image object.\n  let img2 = createImage(100, 100);\n\n  // Set the blank image's pixels using the landscape.\n  img2.set(0, 0, img);\n\n  // Display the second image.\n  image(img2, 0, 0);\n\n  describe('An image of a mountain landscape.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "grayscale value | pixel array |\n<a href=\"#/p5.Color\">p5.Color</a> object |\n<a href=\"#/p5.Image\">p5.Image</a> to copy.",
              "type": "Number|Number[]|Object"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "grayscale value | pixel array |\n<a href=\"#/p5.Color\">p5.Color</a> object |\n<a href=\"#/p5.Image\">p5.Image</a> to copy.",
              "type": "Number|Number[]|Object"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "grayscale value | pixel array |\n<a href=\"#/p5.Color\">p5.Color</a> object |\n<a href=\"#/p5.Image\">p5.Image</a> to copy.",
              "type": "Number|Number[]|Object"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "grayscale value | pixel array |\n<a href=\"#/p5.Color\">p5.Color</a> object |\n<a href=\"#/p5.Image\">p5.Image</a> to copy.",
              "type": "Number|Number[]|Object"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "resize",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 724,
      "itemtype": "method",
      "description": "<p>Resizes the image to a given width and height.</p>\n<p>The image's original aspect ratio can be kept by passing 0 for either\n<code>width</code> or <code>height</code>. For example, calling <code>img.resize(50, 0)</code> on an image\nthat was 500 × 300 pixels will resize it to 50 × 30 pixels.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image.\n  img.resize(50, 100);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. One copy of the image is squeezed horizontally.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(0, 30);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(60, 0);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image.\n  img.resize(50, 100);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. One copy of the image is squeezed horizontally.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(0, 30);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(60, 0);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image.\n  img.resize(50, 100);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. One copy of the image is squeezed horizontally.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(0, 30);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(60, 0);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image.\n  img.resize(50, 100);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. One copy of the image is squeezed horizontally.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(0, 30);\n\n  // Display the resized image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Resize the image, keeping the aspect ratio.\n  img.resize(60, 0);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('Two images of a mountain landscape. The small copy of the image covers the top-left corner of the larger image.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "resized image width.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "resized image height.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "width",
              "description": "resized image width.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "resized image height.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "width",
              "description": "resized image width.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "resized image height.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "width",
              "description": "resized image width.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "resized image height.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "copy",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 888,
      "itemtype": "method",
      "description": "<p>Copies pixels from a source image to this image.</p>\n<p>The first parameter, <code>srcImage</code>, is an optional\n<a href=\"#/p5.Image\">p5.Image</a> object to copy. If a source image isn't\npassed, then <code>img.copy()</code> can copy a region of this image to another\nregion.</p>\n<p>The next four parameters, <code>sx</code>, <code>sy</code>, <code>sw</code>, and <code>sh</code> determine the region\nto copy from the source image. <code>(sx, sy)</code> is the top-left corner of the\nregion. <code>sw</code> and <code>sh</code> are the region's width and height.</p>\n<p>The next four parameters, <code>dx</code>, <code>dy</code>, <code>dw</code>, and <code>dh</code> determine the region\nof this image to copy into. <code>(dx, dy)</code> is the top-left corner of the\nregion. <code>dw</code> and <code>dh</code> are the region's width and height.</p>\n<p>Calling <code>img.copy()</code> will scale pixels from the source region if it isn't\nthe same size as the destination region.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Copy one region of the image to another.\n  img.copy(7, 22, 10, 10, 35, 25, 50, 50);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Outline the copied region.\n  stroke(255);\n  noFill();\n  square(7, 22, 10);\n\n  describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks.jpg');\n  createCanvas(100, 100);\n\n  // Calculate the center of the bricks image.\n  let x = bricks.width / 2;\n  let y = bricks.height / 2;\n\n  // Copy the bricks to the mountains image.\n  mountains.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  describe('An image of a brick wall drawn at the top-left of an image of a mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Copy one region of the image to another.\n  img.copy(7, 22, 10, 10, 35, 25, 50, 50);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Outline the copied region.\n  stroke(255);\n  noFill();\n  square(7, 22, 10);\n\n  describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks.jpg');\n  createCanvas(100, 100);\n\n  // Calculate the center of the bricks image.\n  let x = bricks.width / 2;\n  let y = bricks.height / 2;\n\n  // Copy the bricks to the mountains image.\n  mountains.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  describe('An image of a brick wall drawn at the top-left of an image of a mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Copy one region of the image to another.\n  img.copy(7, 22, 10, 10, 35, 25, 50, 50);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Outline the copied region.\n  stroke(255);\n  noFill();\n  square(7, 22, 10);\n\n  describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks.jpg');\n  createCanvas(100, 100);\n\n  // Calculate the center of the bricks image.\n  let x = bricks.width / 2;\n  let y = bricks.height / 2;\n\n  // Copy the bricks to the mountains image.\n  mountains.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  describe('An image of a brick wall drawn at the top-left of an image of a mountain landscape.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Copy one region of the image to another.\n  img.copy(7, 22, 10, 10, 35, 25, 50, 50);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Outline the copied region.\n  stroke(255);\n  noFill();\n  square(7, 22, 10);\n\n  describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks.jpg');\n  createCanvas(100, 100);\n\n  // Calculate the center of the bricks image.\n  let x = bricks.width / 2;\n  let y = bricks.height / 2;\n\n  // Copy the bricks to the mountains image.\n  mountains.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  describe('An image of a brick wall drawn at the top-left of an image of a mountain landscape.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image|p5.Element"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image|p5.Element"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image|p5.Element"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image|p5.Element"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "mask",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1002,
      "itemtype": "method",
      "description": "<p>Masks part of the image with another.</p>\n<p><code>img.mask()</code> uses another <a href=\"#/p5.Image\">p5.Image</a> object's\nalpha channel as the alpha channel for this image. Masks are cumulative\nand can't be removed once applied. If the mask has a different\npixel density from this image, the mask will be scaled.</p>\n",
      "example": [
        "let photo;\nlet maskImage;\n\nasync function setup() {\n  // Load the images.\n  photo = await loadImage('assets/rockies.jpg');\n  maskImage = await loadImage('assets/mask2.png');\n  createCanvas(100, 100);\n\n  // Apply the mask.\n  photo.mask(maskImage);\n\n  // Display the image.\n  image(photo, 0, 0);\n\n  describe('An image of a mountain landscape. The right side of the image has a faded patch of white.');\n}",
        "let photo;\nlet maskImage;\n\nasync function setup() {\n  // Load the images.\n  photo = await loadImage('assets/rockies.jpg');\n  maskImage = await loadImage('assets/mask2.png');\n  createCanvas(100, 100);\n\n  // Apply the mask.\n  photo.mask(maskImage);\n\n  // Display the image.\n  image(photo, 0, 0);\n\n  describe('An image of a mountain landscape. The right side of the image has a faded patch of white.');\n}",
        "let photo;\nlet maskImage;\n\nasync function setup() {\n  // Load the images.\n  photo = await loadImage('assets/rockies.jpg');\n  maskImage = await loadImage('assets/mask2.png');\n  createCanvas(100, 100);\n\n  // Apply the mask.\n  photo.mask(maskImage);\n\n  // Display the image.\n  image(photo, 0, 0);\n\n  describe('An image of a mountain landscape. The right side of the image has a faded patch of white.');\n}",
        "let photo;\nlet maskImage;\n\nasync function setup() {\n  // Load the images.\n  photo = await loadImage('assets/rockies.jpg');\n  maskImage = await loadImage('assets/mask2.png');\n  createCanvas(100, 100);\n\n  // Apply the mask.\n  photo.mask(maskImage);\n\n  // Display the image.\n  image(photo, 0, 0);\n\n  describe('An image of a mountain landscape. The right side of the image has a faded patch of white.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "filter",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1238,
      "itemtype": "method",
      "description": "<p>Applies an image filter to the image.</p>\n<p>The preset options are:</p>\n<p><code>INVERT</code>\nInverts the colors in the image. No parameter is used.</p>\n<p><code>GRAY</code>\nConverts the image to grayscale. No parameter is used.</p>\n<p><code>THRESHOLD</code>\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.</p>\n<p><code>OPAQUE</code>\nSets the alpha channel to be entirely opaque. No parameter is used.</p>\n<p><code>POSTERIZE</code>\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.</p>\n<p><code>BLUR</code>\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin <code>P2D</code> mode. A box blur is used in <code>WEBGL</code> mode.</p>\n<p><code>ERODE</code>\nReduces the light areas. No parameter is used.</p>\n<p><code>DILATE</code>\nIncreases the light areas. No parameter is used.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the INVERT filter.\n  img.filter(INVERT);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blue brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the GRAY filter.\n  img.filter(GRAY);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in grayscale.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the THRESHOLD filter.\n  img.filter(THRESHOLD);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in black and white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the OPAQUE filter.\n  img.filter(OPAQUE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the POSTERIZE filter.\n  img.filter(POSTERIZE, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a red brick wall drawn with a limited color palette.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the BLUR filter.\n  img.filter(BLUR, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blurry image of a red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the DILATE filter.\n  img.filter(DILATE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with bright lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the ERODE filter.\n  img.filter(ERODE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with faint lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the INVERT filter.\n  img.filter(INVERT);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blue brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the GRAY filter.\n  img.filter(GRAY);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in grayscale.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the THRESHOLD filter.\n  img.filter(THRESHOLD);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in black and white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the OPAQUE filter.\n  img.filter(OPAQUE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the POSTERIZE filter.\n  img.filter(POSTERIZE, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a red brick wall drawn with a limited color palette.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the BLUR filter.\n  img.filter(BLUR, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blurry image of a red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the DILATE filter.\n  img.filter(DILATE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with bright lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the ERODE filter.\n  img.filter(ERODE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with faint lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the INVERT filter.\n  img.filter(INVERT);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blue brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the GRAY filter.\n  img.filter(GRAY);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in grayscale.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the THRESHOLD filter.\n  img.filter(THRESHOLD);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in black and white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the OPAQUE filter.\n  img.filter(OPAQUE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the POSTERIZE filter.\n  img.filter(POSTERIZE, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a red brick wall drawn with a limited color palette.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the BLUR filter.\n  img.filter(BLUR, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blurry image of a red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the DILATE filter.\n  img.filter(DILATE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with bright lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the ERODE filter.\n  img.filter(ERODE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with faint lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the INVERT filter.\n  img.filter(INVERT);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blue brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the GRAY filter.\n  img.filter(GRAY);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in grayscale.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the THRESHOLD filter.\n  img.filter(THRESHOLD);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A brick wall drawn in black and white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the OPAQUE filter.\n  img.filter(OPAQUE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the POSTERIZE filter.\n  img.filter(POSTERIZE, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a red brick wall drawn with a limited color palette.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the BLUR filter.\n  img.filter(BLUR, 3);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A blurry image of a red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the DILATE filter.\n  img.filter(DILATE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with bright lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Apply the ERODE filter.\n  img.filter(ERODE);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('A red brick wall with faint lines between each brick.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filterType",
              "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, ERODE, DILATE or BLUR.",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "parameter unique to each filter.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filterType",
              "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, ERODE, DILATE or BLUR.",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "parameter unique to each filter.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filterType",
              "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, ERODE, DILATE or BLUR.",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "parameter unique to each filter.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filterType",
              "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, ERODE, DILATE or BLUR.",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "parameter unique to each filter.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "blend",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1362,
      "itemtype": "method",
      "description": "<p>Copies a region of pixels from another image into this one.</p>\n<p>The first parameter, <code>srcImage</code>, is the\n<a href=\"#/p5.Image\">p5.Image</a> object to blend.</p>\n<p>The next four parameters, <code>sx</code>, <code>sy</code>, <code>sw</code>, and <code>sh</code> determine the region\nto blend from the source image. <code>(sx, sy)</code> is the top-left corner of the\nregion. <code>sw</code> and <code>sh</code> are the regions width and height.</p>\n<p>The next four parameters, <code>dx</code>, <code>dy</code>, <code>dw</code>, and <code>dh</code> determine the region\nof the canvas to blend into. <code>(dx, dy)</code> is the top-left corner of the\nregion. <code>dw</code> and <code>dh</code> are the regions width and height.</p>\n<p>The tenth parameter, <code>blendMode</code>, sets the effect used to blend the images'\ncolors. The options are <code>BLEND</code>, <code>DARKEST</code>, <code>LIGHTEST</code>, <code>DIFFERENCE</code>,\n<code>MULTIPLY</code>, <code>EXCLUSION</code>, <code>SCREEN</code>, <code>REPLACE</code>, <code>OVERLAY</code>, <code>HARD_LIGHT</code>,\n<code>SOFT_LIGHT</code>, <code>DODGE</code>, <code>BURN</code>, <code>ADD</code>, or <code>NORMAL</code>.</p>\n",
      "example": [
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}",
        "let mountains;\nlet bricks;\n\nasync function setup() {\n  // Load the images.\n  mountains = await loadImage('assets/rockies.jpg');\n  bricks = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Blend the bricks image into the mountains.\n  mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n  // Display the mountains image.\n  image(mountains, 0, 0);\n\n  // Display the bricks image.\n  image(bricks, 0, 0);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image",
              "type": "p5.Image"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "<p>the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n<p>Available blend modes are: normal | multiply | screen | overlay |\ndarken | lighten | color-dodge | color-burn | hard-light |\nsoft-light | difference | exclusion | hue | saturation |\ncolor | luminosity</p>\n<p>http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/</p>\n",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image",
              "type": "p5.Image"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "<p>the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n<p>Available blend modes are: normal | multiply | screen | overlay |\ndarken | lighten | color-dodge | color-burn | hard-light |\nsoft-light | difference | exclusion | hue | saturation |\ncolor | luminosity</p>\n<p>http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/</p>\n",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image",
              "type": "p5.Image"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "<p>the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n<p>Available blend modes are: normal | multiply | screen | overlay |\ndarken | lighten | color-dodge | color-burn | hard-light |\nsoft-light | difference | exclusion | hue | saturation |\ncolor | luminosity</p>\n<p>http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/</p>\n",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image",
              "type": "p5.Image"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "<p>the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.</p>\n<p>Available blend modes are: normal | multiply | screen | overlay |\ndarken | lighten | color-dodge | color-burn | hard-light |\nsoft-light | difference | exclusion | hue | saturation |\ncolor | luminosity</p>\n<p>http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/</p>\n",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "save",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1449,
      "itemtype": "method",
      "description": "<p>Saves the image to a file.</p>\n<p>By default, <code>img.save()</code> saves the image as a PNG image called\n<code>untitled.png</code>.</p>\n<p>The first parameter, <code>filename</code>, is optional. It's a string that sets the\nfile's name. If a file extension is included, as in\n<code>img.save('drawing.png')</code>, then the image will be saved using that\nformat.</p>\n<p>The second parameter, <code>extension</code>, is also optional. It sets the files format.\nEither <code>'png'</code> or <code>'jpg'</code> can be used. For example, <code>img.save('drawing', 'jpg')</code>\nsaves the canvas to a file called <code>drawing.jpg</code>.</p>\n<p>Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window.</p>\n<p>The image will only be downloaded as an animated GIF if it was loaded\nfrom a GIF file. See <a href=\"#/p5/saveGif\">saveGif()</a> to create new\nGIFs.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a mountain landscape. The image is downloaded when the user presses the \"s\", \"j\", or \"p\" key.');\n}\n\n// Save the image with different options when the user presses a key.\nfunction keyPressed() {\n  if (key === 's') {\n    img.save();\n  } else if (key === 'j') {\n    img.save('rockies.jpg');\n  } else if (key === 'p') {\n    img.save('rockies', 'png');\n  }\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a mountain landscape. The image is downloaded when the user presses the \"s\", \"j\", or \"p\" key.');\n}\n\n// Save the image with different options when the user presses a key.\nfunction keyPressed() {\n  if (key === 's') {\n    img.save();\n  } else if (key === 'j') {\n    img.save('rockies.jpg');\n  } else if (key === 'p') {\n    img.save('rockies', 'png');\n  }\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a mountain landscape. The image is downloaded when the user presses the \"s\", \"j\", or \"p\" key.');\n}\n\n// Save the image with different options when the user presses a key.\nfunction keyPressed() {\n  if (key === 's') {\n    img.save();\n  } else if (key === 'j') {\n    img.save('rockies.jpg');\n  } else if (key === 'p') {\n    img.save('rockies', 'png');\n  }\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  describe('An image of a mountain landscape. The image is downloaded when the user presses the \"s\", \"j\", or \"p\" key.');\n}\n\n// Save the image with different options when the user presses a key.\nfunction keyPressed() {\n  if (key === 's') {\n    img.save();\n  } else if (key === 'j') {\n    img.save('rockies.jpg');\n  } else if (key === 'p') {\n    img.save('rockies', 'png');\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filename",
              "description": "filename. Defaults to 'untitled'.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'png' or 'jpg'.\nDefaults to 'png'.",
              "optional": 1,
              "type": "String"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filename",
              "description": "filename. Defaults to 'untitled'.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'png' or 'jpg'.\nDefaults to 'png'.",
              "optional": 1,
              "type": "String"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filename",
              "description": "filename. Defaults to 'untitled'.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'png' or 'jpg'.\nDefaults to 'png'.",
              "optional": 1,
              "type": "String"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filename",
              "description": "filename. Defaults to 'untitled'.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'png' or 'jpg'.\nDefaults to 'png'.",
              "optional": 1,
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "reset",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1514,
      "itemtype": "method",
      "description": "Restarts an animated GIF at its first frame.",
      "example": [
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-wink-loop-once.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Reset the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.reset();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-wink-loop-once.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Reset the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.reset();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-wink-loop-once.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Reset the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.reset();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-wink-loop-once.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon face winks once and then freezes. Clicking resets the face and makes it wink again.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Reset the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.reset();\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "getCurrentFrame",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1555,
      "itemtype": "method",
      "description": "Gets the index of the current frame in an animated GIF.",
      "example": [
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');\n}\n\nfunction draw() {\n  // Get the index of the current GIF frame.\n  let index = gif.getCurrentFrame();\n\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current frame.\n  text(index, 10, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');\n}\n\nfunction draw() {\n  // Get the index of the current GIF frame.\n  let index = gif.getCurrentFrame();\n\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current frame.\n  text(index, 10, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');\n}\n\nfunction draw() {\n  // Get the index of the current GIF frame.\n  let index = gif.getCurrentFrame();\n\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current frame.\n  text(index, 10, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye repeatedly looks around, then outwards. A number displayed in the bottom-left corner increases from 0 to 124, then repeats.');\n}\n\nfunction draw() {\n  // Get the index of the current GIF frame.\n  let index = gif.getCurrentFrame();\n\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current frame.\n  text(index, 10, 90);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "index of the GIF's current frame.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "index of the GIF's current frame.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "index of the GIF's current frame.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "index of the GIF's current frame.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "index of the GIF's current frame.",
        "type": "Number"
      },
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "setFrame",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1599,
      "itemtype": "method",
      "description": "Sets the current frame in an animated GIF.",
      "example": [
        "let gif;\nlet frameSlider;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Get the index of the last frame.\n  let maxFrame = gif.numFrames() - 1;\n\n  // Create a slider to control which frame is drawn.\n  frameSlider = createSlider(0, maxFrame);\n  frameSlider.position(10, 80);\n  frameSlider.size(80);\n\n  describe('A cartoon eye looks around when a slider is moved.');\n}\n\nfunction draw() {\n  // Get the slider's value.\n  let index = frameSlider.value();\n\n  // Set the GIF's frame.\n  gif.setFrame(index);\n\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gif;\nlet frameSlider;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Get the index of the last frame.\n  let maxFrame = gif.numFrames() - 1;\n\n  // Create a slider to control which frame is drawn.\n  frameSlider = createSlider(0, maxFrame);\n  frameSlider.position(10, 80);\n  frameSlider.size(80);\n\n  describe('A cartoon eye looks around when a slider is moved.');\n}\n\nfunction draw() {\n  // Get the slider's value.\n  let index = frameSlider.value();\n\n  // Set the GIF's frame.\n  gif.setFrame(index);\n\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gif;\nlet frameSlider;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Get the index of the last frame.\n  let maxFrame = gif.numFrames() - 1;\n\n  // Create a slider to control which frame is drawn.\n  frameSlider = createSlider(0, maxFrame);\n  frameSlider.position(10, 80);\n  frameSlider.size(80);\n\n  describe('A cartoon eye looks around when a slider is moved.');\n}\n\nfunction draw() {\n  // Get the slider's value.\n  let index = frameSlider.value();\n\n  // Set the GIF's frame.\n  gif.setFrame(index);\n\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gif;\nlet frameSlider;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Get the index of the last frame.\n  let maxFrame = gif.numFrames() - 1;\n\n  // Create a slider to control which frame is drawn.\n  frameSlider = createSlider(0, maxFrame);\n  frameSlider.position(10, 80);\n  frameSlider.size(80);\n\n  describe('A cartoon eye looks around when a slider is moved.');\n}\n\nfunction draw() {\n  // Get the slider's value.\n  let index = frameSlider.value();\n\n  // Set the GIF's frame.\n  gif.setFrame(index);\n\n  // Display the image.\n  image(gif, 0, 0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "index",
              "description": "index of the frame to display.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "index",
              "description": "index of the frame to display.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "index",
              "description": "index of the frame to display.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "index",
              "description": "index of the frame to display.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "numFrames",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1643,
      "itemtype": "method",
      "description": "Returns the number of frames in an animated GIF.",
      "example": [
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye looks around. The text \"n / 125\" is shown at the bottom of the canvas.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current state of playback.\n  let total = gif.numFrames();\n  let index = gif.getCurrentFrame();\n  text(`${index} / ${total}`, 30, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye looks around. The text \"n / 125\" is shown at the bottom of the canvas.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current state of playback.\n  let total = gif.numFrames();\n  let index = gif.getCurrentFrame();\n  text(`${index} / ${total}`, 30, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye looks around. The text \"n / 125\" is shown at the bottom of the canvas.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current state of playback.\n  let total = gif.numFrames();\n  let index = gif.getCurrentFrame();\n  text(`${index} / ${total}`, 30, 90);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A cartoon eye looks around. The text \"n / 125\" is shown at the bottom of the canvas.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n\n  // Display the current state of playback.\n  let total = gif.numFrames();\n  let index = gif.getCurrentFrame();\n  text(`${index} / ${total}`, 30, 90);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "number of frames in the GIF.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "number of frames in the GIF.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "number of frames in the GIF.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "number of frames in the GIF.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "number of frames in the GIF.",
        "type": "Number"
      },
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "play",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1680,
      "itemtype": "method",
      "description": "Plays an animated GIF that was paused with\n<a href=\"#/p5.Image/pause\">img.pause()</a>.",
      "example": [
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user releases the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user releases the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user releases the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user releases the mouse.\nfunction mouseReleased() {\n  gif.play();\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "pause",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1721,
      "itemtype": "method",
      "description": "<p>Pauses an animated GIF.</p>\n<p>The GIF can be resumed by calling\n<a href=\"#/p5.Image/play\">img.play()</a>.</p>\n",
      "example": [
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user presses the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user presses the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user presses the mouse.\nfunction mouseReleased() {\n  gif.play();\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/nancy-liang-wind-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  describe('A drawing of a child with hair blowing in the wind. The animation freezes when clicked and resumes when released.');\n}\n\nfunction draw() {\n  background(255);\n\n  // Display the image.\n  image(gif, 0, 0);\n}\n\n// Pause the GIF when the user presses the mouse.\nfunction mousePressed() {\n  gif.pause();\n}\n\n// Play the GIF when the user presses the mouse.\nfunction mouseReleased() {\n  gif.play();\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "delay",
      "file": "src/scripts/parsers/in/p5.js/src/image/p5.Image.js",
      "line": 1789,
      "itemtype": "method",
      "description": "<p>Changes the delay between frames in an animated GIF.</p>\n<p>The first parameter, <code>delay</code>, is the length of the delay in milliseconds.</p>\n<p>The second parameter, <code>index</code>, is optional. If provided, only the frame\nat <code>index</code> will have its delay modified. All other frames will keep\ntheir default delay.</p>\n",
      "example": [
        "let gifFast;\nlet gifSlow;\n\nasync function setup() {\n  // Load the images.\n  gifFast = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n  gifSlow = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Resize the images.\n  gifFast.resize(50, 50);\n  gifSlow.resize(50, 50);\n\n  // Set the delay lengths.\n  gifFast.delay(10);\n  gifSlow.delay(100);\n\n  describe('Two animated eyes looking around. The eye on the left moves faster than the eye on the right.');\n}\n\nfunction draw() {\n  // Display the images.\n  image(gifFast, 0, 0);\n  image(gifSlow, 50, 0);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Set the delay of frame 67.\n  gif.delay(3000, 67);\n\n  describe('An animated eye looking around. It pauses for three seconds while it looks down.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gifFast;\nlet gifSlow;\n\nasync function setup() {\n  // Load the images.\n  gifFast = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n  gifSlow = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Resize the images.\n  gifFast.resize(50, 50);\n  gifSlow.resize(50, 50);\n\n  // Set the delay lengths.\n  gifFast.delay(10);\n  gifSlow.delay(100);\n\n  describe('Two animated eyes looking around. The eye on the left moves faster than the eye on the right.');\n}\n\nfunction draw() {\n  // Display the images.\n  image(gifFast, 0, 0);\n  image(gifSlow, 50, 0);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Set the delay of frame 67.\n  gif.delay(3000, 67);\n\n  describe('An animated eye looking around. It pauses for three seconds while it looks down.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gifFast;\nlet gifSlow;\n\nasync function setup() {\n  // Load the images.\n  gifFast = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n  gifSlow = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Resize the images.\n  gifFast.resize(50, 50);\n  gifSlow.resize(50, 50);\n\n  // Set the delay lengths.\n  gifFast.delay(10);\n  gifSlow.delay(100);\n\n  describe('Two animated eyes looking around. The eye on the left moves faster than the eye on the right.');\n}\n\nfunction draw() {\n  // Display the images.\n  image(gifFast, 0, 0);\n  image(gifSlow, 50, 0);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Set the delay of frame 67.\n  gif.delay(3000, 67);\n\n  describe('An animated eye looking around. It pauses for three seconds while it looks down.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n}",
        "let gifFast;\nlet gifSlow;\n\nasync function setup() {\n  // Load the images.\n  gifFast = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n  gifSlow = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Resize the images.\n  gifFast.resize(50, 50);\n  gifSlow.resize(50, 50);\n\n  // Set the delay lengths.\n  gifFast.delay(10);\n  gifSlow.delay(100);\n\n  describe('Two animated eyes looking around. The eye on the left moves faster than the eye on the right.');\n}\n\nfunction draw() {\n  // Display the images.\n  image(gifFast, 0, 0);\n  image(gifSlow, 50, 0);\n}",
        "let gif;\n\nasync function setup() {\n  // Load the image.\n  gif = await loadImage('assets/arnott-wallace-eye-loop-forever.gif');\n\n  createCanvas(100, 100);\n\n  // Set the delay of frame 67.\n  gif.delay(3000, 67);\n\n  describe('An animated eye looking around. It pauses for three seconds while it looks down.');\n}\n\nfunction draw() {\n  // Display the image.\n  image(gif, 0, 0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "d",
              "description": "delay in milliseconds between switching frames.",
              "type": "Number"
            },
            {
              "name": "index",
              "description": "index of the frame that will have its delay modified.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "d",
              "description": "delay in milliseconds between switching frames.",
              "type": "Number"
            },
            {
              "name": "index",
              "description": "index of the frame that will have its delay modified.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "d",
              "description": "delay in milliseconds between switching frames.",
              "type": "Number"
            },
            {
              "name": "index",
              "description": "index of the frame that will have its delay modified.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "d",
              "description": "delay in milliseconds between switching frames.",
              "type": "Number"
            },
            {
              "name": "index",
              "description": "index of the frame that will have its delay modified.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Image",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "toString",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 363,
      "itemtype": "method",
      "description": "<p>Returns the color formatted as a <code>String</code>.</p>\n<p>Calling <code>myColor.toString()</code> can be useful for debugging, as in\n<code>print(myColor.toString())</code>. It's also helpful for using p5.js with other\nlibraries.</p>\n<p>The parameter, <code>format</code>, is optional. If a format string is passed, as in\n<code>myColor.toString('#rrggbb')</code>, it will determine how the color string is\nformatted. By default, color strings are formatted as <code>'rgba(r, g, b, a)'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let myColor = color('darkorchid');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the text.\n  text(myColor.toString('#rrggbb'), 50, 50);\n\n  describe('The text \"#9932cc\" written in purple on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let myColor = color('darkorchid');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the text.\n  text(myColor.toString('#rrggbb'), 50, 50);\n\n  describe('The text \"#9932cc\" written in purple on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let myColor = color('darkorchid');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the text.\n  text(myColor.toString('#rrggbb'), 50, 50);\n\n  describe('The text \"#9932cc\" written in purple on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let myColor = color('darkorchid');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the text.\n  text(myColor.toString('#rrggbb'), 50, 50);\n\n  describe('The text \"#9932cc\" written in purple on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let myColor = color('darkorchid');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the text.\n  text(myColor.toString('#rrggbb'), 50, 50);\n\n  describe('The text \"#9932cc\" written in purple on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "format",
              "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "the formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "format",
              "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "the formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "format",
              "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "the formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "format",
              "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "the formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "format",
              "description": "how the color string will be formatted.\nLeaving this empty formats the string as rgba(r, g, b, a).\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "the formatted string.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "the formatted string.",
        "type": "String"
      },
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "contrast",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 480,
      "itemtype": "method",
      "description": "<p>Checks the contrast between two colors. This method returns a boolean\nvalue to indicate if the two color has enough contrast. <code>true</code> means that\nthe colors has enough contrast to be used as background color and body\ntext color. <code>false</code> means there is not enough contrast.</p>\n<p>A second argument can be passed to the method, <code>options</code> , which defines\nthe algorithm to be used. The algorithms currently supported are\nWCAG 2.1 (<code>'WCAG21'</code>) or APCA (<code>'APCA'</code>). The default is WCAG 2.1. If a\nvalue of <code>'all'</code> is passed to the <code>options</code> argument, an object containing\nmore details is returned. The details object will include the calculated\ncontrast value of the colors and different passing criteria.</p>\n<p>For more details about color contrast, you can check out\n<a href=\"https://colorjs.io/docs/contrast\">this page from color.js</a>, and the\n<a href=\"https://webaim.org/resources/contrastchecker/\">WebAIM color contrast checker.</a></p>\n",
      "example": [
        "let bgColor, fg1Color, fg2Color, msg1, msg2;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fg1Color = color(100);\n  fg2Color = color(220);\n\n  if(bgColor.contrast(fg1Color)){\n    msg1 = 'good';\n  }else{\n    msg1 = 'bad';\n  }\n\n  if(bgColor.contrast(fg2Color)){\n    msg2 = 'good';\n  }else{\n    msg2 = 'bad';\n  }\n\n  describe('A black canvas with a faint grey word saying \"bad\" at the top left and a brighter light grey word saying \"good\" in the middle of the canvas.');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(18);\n\n  fill(fg1Color);\n  text(msg1, 10, 30);\n\n  fill(fg2Color);\n  text(msg2, 10, 60);\n}",
        "let bgColor, fgColor, contrast;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fgColor = color(200);\n  contrast = bgColor.contrast(fgColor, 'all');\n\n  describe('A black canvas with four short lines of grey text that respectively says: \"WCAG 2.1\", \"12.55\", \"APCA\", and \"-73.30\".');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(14);\n\n  fill(fgColor);\n  text('WCAG 2.1', 10, 25);\n  text(nf(contrast.WCAG21.value, 0, 2), 10, 40);\n\n  text('APCA', 10, 70);\n  text(nf(contrast.APCA.value, 0, 2), 10, 85);\n}",
        "let bgColor, fg1Color, fg2Color, msg1, msg2;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fg1Color = color(100);\n  fg2Color = color(220);\n\n  if(bgColor.contrast(fg1Color)){\n    msg1 = 'good';\n  }else{\n    msg1 = 'bad';\n  }\n\n  if(bgColor.contrast(fg2Color)){\n    msg2 = 'good';\n  }else{\n    msg2 = 'bad';\n  }\n\n  describe('A black canvas with a faint grey word saying \"bad\" at the top left and a brighter light grey word saying \"good\" in the middle of the canvas.');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(18);\n\n  fill(fg1Color);\n  text(msg1, 10, 30);\n\n  fill(fg2Color);\n  text(msg2, 10, 60);\n}",
        "let bgColor, fgColor, contrast;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fgColor = color(200);\n  contrast = bgColor.contrast(fgColor, 'all');\n\n  describe('A black canvas with four short lines of grey text that respectively says: \"WCAG 2.1\", \"12.55\", \"APCA\", and \"-73.30\".');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(14);\n\n  fill(fgColor);\n  text('WCAG 2.1', 10, 25);\n  text(nf(contrast.WCAG21.value, 0, 2), 10, 40);\n\n  text('APCA', 10, 70);\n  text(nf(contrast.APCA.value, 0, 2), 10, 85);\n}",
        "let bgColor, fg1Color, fg2Color, msg1, msg2;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fg1Color = color(100);\n  fg2Color = color(220);\n\n  if(bgColor.contrast(fg1Color)){\n    msg1 = 'good';\n  }else{\n    msg1 = 'bad';\n  }\n\n  if(bgColor.contrast(fg2Color)){\n    msg2 = 'good';\n  }else{\n    msg2 = 'bad';\n  }\n\n  describe('A black canvas with a faint grey word saying \"bad\" at the top left and a brighter light grey word saying \"good\" in the middle of the canvas.');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(18);\n\n  fill(fg1Color);\n  text(msg1, 10, 30);\n\n  fill(fg2Color);\n  text(msg2, 10, 60);\n}",
        "let bgColor, fgColor, contrast;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fgColor = color(200);\n  contrast = bgColor.contrast(fgColor, 'all');\n\n  describe('A black canvas with four short lines of grey text that respectively says: \"WCAG 2.1\", \"12.55\", \"APCA\", and \"-73.30\".');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(14);\n\n  fill(fgColor);\n  text('WCAG 2.1', 10, 25);\n  text(nf(contrast.WCAG21.value, 0, 2), 10, 40);\n\n  text('APCA', 10, 70);\n  text(nf(contrast.APCA.value, 0, 2), 10, 85);\n}",
        "let bgColor, fg1Color, fg2Color, msg1, msg2;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fg1Color = color(100);\n  fg2Color = color(220);\n\n  if(bgColor.contrast(fg1Color)){\n    msg1 = 'good';\n  }else{\n    msg1 = 'bad';\n  }\n\n  if(bgColor.contrast(fg2Color)){\n    msg2 = 'good';\n  }else{\n    msg2 = 'bad';\n  }\n\n  describe('A black canvas with a faint grey word saying \"bad\" at the top left and a brighter light grey word saying \"good\" in the middle of the canvas.');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(18);\n\n  fill(fg1Color);\n  text(msg1, 10, 30);\n\n  fill(fg2Color);\n  text(msg2, 10, 60);\n}",
        "let bgColor, fgColor, contrast;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fgColor = color(200);\n  contrast = bgColor.contrast(fgColor, 'all');\n\n  describe('A black canvas with four short lines of grey text that respectively says: \"WCAG 2.1\", \"12.55\", \"APCA\", and \"-73.30\".');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(14);\n\n  fill(fgColor);\n  text('WCAG 2.1', 10, 25);\n  text(nf(contrast.WCAG21.value, 0, 2), 10, 40);\n\n  text('APCA', 10, 70);\n  text(nf(contrast.APCA.value, 0, 2), 10, 85);\n}",
        "let bgColor, fg1Color, fg2Color, msg1, msg2;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fg1Color = color(100);\n  fg2Color = color(220);\n\n  if(bgColor.contrast(fg1Color)){\n    msg1 = 'good';\n  }else{\n    msg1 = 'bad';\n  }\n\n  if(bgColor.contrast(fg2Color)){\n    msg2 = 'good';\n  }else{\n    msg2 = 'bad';\n  }\n\n  describe('A black canvas with a faint grey word saying \"bad\" at the top left and a brighter light grey word saying \"good\" in the middle of the canvas.');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(18);\n\n  fill(fg1Color);\n  text(msg1, 10, 30);\n\n  fill(fg2Color);\n  text(msg2, 10, 60);\n}",
        "let bgColor, fgColor, contrast;\nfunction setup() {\n  createCanvas(100, 100);\n  bgColor = color(0);\n  fgColor = color(200);\n  contrast = bgColor.contrast(fgColor, 'all');\n\n  describe('A black canvas with four short lines of grey text that respectively says: \"WCAG 2.1\", \"12.55\", \"APCA\", and \"-73.30\".');\n}\n\nfunction draw(){\n  background(bgColor);\n\n  textSize(14);\n\n  fill(fgColor);\n  text('WCAG 2.1', 10, 25);\n  text(nf(contrast.WCAG21.value, 0, 2), 10, 40);\n\n  text('APCA', 10, 70);\n  text(nf(contrast.APCA.value, 0, 2), 10, 85);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "other",
              "description": "",
              "type": "Color"
            }
          ],
          "return": {
            "description": "",
            "type": "boolean|object"
          }
        },
        {
          "params": [
            {
              "name": "other",
              "description": "",
              "type": "Color"
            }
          ],
          "return": {
            "description": "",
            "type": "boolean|object"
          }
        },
        {
          "params": [
            {
              "name": "other",
              "description": "",
              "type": "Color"
            }
          ],
          "return": {
            "description": "",
            "type": "boolean|object"
          }
        },
        {
          "params": [
            {
              "name": "other",
              "description": "",
              "type": "Color"
            }
          ],
          "return": {
            "description": "",
            "type": "boolean|object"
          }
        },
        {
          "params": [
            {
              "name": "other",
              "description": "",
              "type": "Color"
            }
          ],
          "return": {
            "description": "",
            "type": "boolean|object"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "boolean|object"
      },
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "setRed",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 546,
      "itemtype": "method",
      "description": "<p>Sets the red component of a color.</p>\n<p>The range depends on the <a href=\"#/p5/colorMode\">colorMode()</a>. In the\ndefault RGB mode it's between 0 and 255.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the red value.\n  c.setRed(64);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is teal.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the red value.\n  c.setRed(64);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is teal.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the red value.\n  c.setRed(64);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is teal.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the red value.\n  c.setRed(64);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is teal.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the red value.\n  c.setRed(64);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is teal.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "red",
              "description": "the new red value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "red",
              "description": "the new red value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "red",
              "description": "the new red value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "red",
              "description": "the new red value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "red",
              "description": "the new red value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "setGreen",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 598,
      "itemtype": "method",
      "description": "<p>Sets the green component of a color.</p>\n<p>The range depends on the <a href=\"#/p5/colorMode\">colorMode()</a>. In the\ndefault RGB mode it's between 0 and 255.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the green value.\n  c.setGreen(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is yellow.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the green value.\n  c.setGreen(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is yellow.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the green value.\n  c.setGreen(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is yellow.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the green value.\n  c.setGreen(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is yellow.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the green value.\n  c.setGreen(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is yellow.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "green",
              "description": "the new green value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "green",
              "description": "the new green value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "green",
              "description": "the new green value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "green",
              "description": "the new green value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "green",
              "description": "the new green value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "setBlue",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 650,
      "itemtype": "method",
      "description": "<p>Sets the blue component of a color.</p>\n<p>The range depends on the <a href=\"#/p5/colorMode\">colorMode()</a>. In the\ndefault RGB mode it's between 0 and 255.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the blue value.\n  c.setBlue(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is pale fuchsia.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the blue value.\n  c.setBlue(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is pale fuchsia.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the blue value.\n  c.setBlue(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is pale fuchsia.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the blue value.\n  c.setBlue(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is pale fuchsia.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the blue value.\n  c.setBlue(255);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is pale fuchsia.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "blue",
              "description": "the new blue value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "blue",
              "description": "the new blue value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "blue",
              "description": "the new blue value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "blue",
              "description": "the new blue value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "blue",
              "description": "the new blue value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "setAlpha",
      "file": "src/scripts/parsers/in/p5.js/src/color/p5.Color.js",
      "line": 703,
      "itemtype": "method",
      "description": "<p>Sets the alpha (transparency) value of a color.</p>\n<p>The range depends on the\n<a href=\"#/p5/colorMode\">colorMode()</a>. In the default RGB mode it's\nbetween 0 and 255.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the alpha value.\n  c.setAlpha(128);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is faded pink.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the alpha value.\n  c.setAlpha(128);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is faded pink.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the alpha value.\n  c.setAlpha(128);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is faded pink.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the alpha value.\n  c.setAlpha(128);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is faded pink.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(255, 128, 128);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Change the alpha value.\n  c.setAlpha(128);\n\n  // Draw the right rectangle.\n  fill(c);\n  rect(50, 20, 35, 60);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is faded pink.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "alpha",
              "description": "the new alpha value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "alpha",
              "description": "the new alpha value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "alpha",
              "description": "the new alpha value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "alpha",
              "description": "the new alpha value.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "alpha",
              "description": "the new alpha value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Color",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "remove",
      "file": "src/scripts/parsers/in/p5.js/src/core/main.js",
      "line": 358,
      "itemtype": "method",
      "description": "<p>Removes the sketch from the web page.</p>\n<p>Calling <code>remove()</code> stops the draw loop and removes any HTML elements\ncreated by the sketch, including the canvas. A new sketch can be\ncreated by using the <a href=\"#/p5/p5\">p5()</a> constructor, as in\n<code>new p5()</code>.</p>\n",
      "example": [
        "// Double-click to remove the canvas.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}\n\n// Remove the sketch when the user double-clicks.\nfunction doubleClicked() {\n  remove();\n}",
        "// Double-click to remove the canvas.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}\n\n// Remove the sketch when the user double-clicks.\nfunction doubleClicked() {\n  remove();\n}",
        "// Double-click to remove the canvas.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}\n\n// Remove the sketch when the user double-clicks.\nfunction doubleClicked() {\n  remove();\n}",
        "// Double-click to remove the canvas.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves. The sketch disappears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}\n\n// Remove the sketch when the user double-clicks.\nfunction doubleClicked() {\n  remove();\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "p5",
      "file": "src/scripts/parsers/in/p5.js/src/core/structure.js",
      "line": 327,
      "itemtype": "method",
      "description": "<p>Creates a new sketch in \"instance\" mode.</p>\n<p>All p5.js sketches are instances of the <code>p5</code> class. Put another way, all\np5.js sketches are objects with methods including <code>pInst.setup()</code>,\n<code>pInst.draw()</code>, <code>pInst.circle()</code>, and <code>pInst.fill()</code>. By default, sketches\nrun in \"global mode\" to hide some of this complexity.</p>\n<p>In global mode, a default instance of the <code>p5</code> class is created\nautomatically. The default <code>p5</code> instance searches the web page's source\ncode for declarations of system functions such as <code>setup()</code>, <code>draw()</code>,\nand <code>mousePressed()</code>, then attaches those functions to itself as methods.\nCalling a function such as <code>circle()</code> in global mode actually calls the\ndefault <code>p5</code> object's <code>pInst.circle()</code> method.</p>\n<p>It's often helpful to isolate the code within sketches from the rest of the\ncode on a web page. Two common use cases are web pages that use other\nJavaScript libraries and web pages with multiple sketches. \"Instance mode\"\nmakes it easy to support both of these scenarios.</p>\n<p>Instance mode sketches support the same API as global mode sketches. They\nuse a function to bundle, or encapsulate, an entire sketch. The function\ncontaining the sketch is then passed to the <code>p5()</code> constructor.</p>\n<p>The first parameter, <code>sketch</code>, is a function that contains the sketch. For\nexample, the statement <code>new p5(mySketch)</code> would create a new instance mode\nsketch from a function named <code>mySketch</code>. The function should have one\nparameter, <code>p</code>, that's a <code>p5</code> object.</p>\n<p>The second parameter, <code>node</code>, is optional. If a string is passed, as in\n<code>new p5(mySketch, 'sketch-one')</code> the new instance mode sketch will become a\nchild of the HTML element with the id <code>sketch-one</code>. If an HTML element is\npassed, as in <code>new p5(mySketch, myElement)</code>, then the new instance mode\nsketch will become a child of the <code>Element</code> object called <code>myElement</code>.</p>\n",
      "example": [
        "// META:norender\n// Declare the function containing the sketch.\nfunction sketch(p) {\n\n  // Declare the setup() method.\n  p.setup = function () {\n    p.createCanvas(100, 100);\n\n    p.describe('A white circle drawn on a gray background.');\n  };\n\n  // Declare the draw() method.\n  p.draw = function () {\n    p.background(200);\n\n    // Draw the circle.\n    p.circle(50, 50, 20);\n  };\n}\n\n// Initialize the sketch.\nnew p5(sketch);",
        "// META:norender\n// Declare the function containing the sketch.\nfunction sketch(p) {\n  // Create the sketch's variables within its scope.\n  let x = 50;\n  let y = 50;\n\n  // Declare the setup() method.\n  p.setup = function () {\n    p.createCanvas(100, 100);\n\n    p.describe('A white circle moves randomly on a gray background.');\n  };\n\n  // Declare the draw() method.\n  p.draw = function () {\n    p.background(200);\n\n    // Update x and y.\n    x += p.random(-1, 1);\n    y += p.random(-1, 1);\n\n    // Draw the circle.\n    p.circle(x, y, 20);\n  };\n}\n\n// Initialize the sketch.\nnew p5(sketch);",
        "// META:norender\n// Declare the function containing the sketch.\nfunction sketch(p) {\n\n  // Declare the setup() method.\n  p.setup = function () {\n    p.createCanvas(100, 100);\n\n    p.describe('A white circle drawn on a gray background.');\n  };\n\n  // Declare the draw() method.\n  p.draw = function () {\n    p.background(200);\n\n    // Draw the circle.\n    p.circle(50, 50, 20);\n  };\n}\n\n// Select the web page's body element.\nlet body = document.querySelector('body');\n\n// Initialize the sketch and attach it to the web page's body.\nnew p5(sketch, body);",
        "// META:norender\n// Declare the function containing the sketch.\nfunction sketch(p) {\n\n  // Declare the setup() method.\n  p.setup = function () {\n    p.createCanvas(100, 100);\n\n    p.describe(\n      'A white circle drawn on a gray background. The circle follows the mouse as the user moves.'\n    );\n  };\n\n  // Declare the draw() method.\n  p.draw = function () {\n    p.background(200);\n\n    // Draw the circle.\n    p.circle(p.mouseX, p.mouseY, 20);\n  };\n}\n\n// Initialize the sketch.\nnew p5(sketch);",
        "// META:norender\n// Declare the function containing the sketch.\nfunction sketch(p) {\n\n  // Declare the setup() method.\n  p.setup = function () {\n    p.createCanvas(100, 100);\n\n    p.describe(\n      'A white circle drawn on a gray background. The circle follows the mouse as the user moves. The circle becomes black when the user double-clicks.'\n    );\n  };\n\n  // Declare the draw() method.\n  p.draw = function () {\n    p.background(200);\n\n    // Draw the circle.\n    p.circle(p.mouseX, p.mouseY, 20);\n  };\n\n  // Declare the doubleClicked() method.\n  p.doubleClicked = function () {\n    // Change the fill color when the user double-clicks.\n    p.fill(0);\n  };\n}\n\n// Initialize the sketch.\nnew p5(sketch);"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "sketch",
              "description": "function containing the sketch.",
              "type": "Object"
            },
            {
              "name": "node",
              "description": "ID or reference to the HTML element that will contain the sketch.",
              "type": "String|HTMLElement"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "fromAxisAngle",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Quat.js",
      "line": 25,
      "itemtype": "method",
      "description": "Returns a Quaternion for the\naxis angle representation of the rotation",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "Angle with which the points needs to be rotated",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "x",
              "description": "x component of the axis vector",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of the axis vector",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the axis vector",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Quaternion"
    },
    {
      "name": "day",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 35,
      "itemtype": "method",
      "description": "Returns the current day as a number from 1–31.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current day.\n  let d = day();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the day.\n  text(`Current day: ${d}`, 20, 50, 60);\n\n  describe(`The text 'Current day: ${d}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current day between 1 and 31.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current day between 1 and 31.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "abs",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 41,
      "itemtype": "method",
      "description": "<p>Calculates the absolute value of a number.</p>\n<p>A number's absolute value is its distance from zero on the number line.\n-5 and 5 are both five units away from zero, so calling <code>abs(-5)</code> and\n<code>abs(5)</code> both return 5. The absolute value of a number is always positive.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square with a vertical black line that divides it in half. A white rectangle gets taller when the user moves the mouse away from the line.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Divide the canvas.\n  line(50, 0, 50, 100);\n\n  // Calculate the mouse's distance from the middle.\n  let h = abs(mouseX - 50);\n\n  // Draw a rectangle based on the mouse's distance\n  // from the middle.\n  rect(0, 100 - h, 100, h);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to compute.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "absolute value of given number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "absolute value of given number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "mult",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Quat.js",
      "line": 41,
      "itemtype": "method",
      "description": "Multiplies a quaternion with other quaternion.",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "quat",
              "description": "quaternion to multiply with the quaternion calling the method.",
              "optional": 1,
              "type": "p5.Quat"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Quaternion"
    },
    {
      "name": "print",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1431,
      "itemtype": "method",
      "description": "<p>Displays text in the web browser's console.</p>\n<p><code>print()</code> is helpful for printing values while debugging. Each call to\n<code>print()</code> creates a new line of text.</p>\n<p>Note: Call <code>print('\\n')</code> to print a blank line. Calling <code>print()</code> without\nan argument opens the browser's dialog for printing documents.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Prints \"hello, world\" to the console.\n  print('hello, world');\n}",
        "// META:norender\nfunction setup() {\n  let name = 'ada';\n  // Prints \"hello, ada\" to the console.\n  print(`hello, ${name}`);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  let myWriter = createWriter('numbers.txt');\n\n  // Add some data to the print stream.\n  myWriter.print('1,2,3,');\n  myWriter.print(['4', '5', '6']);\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "contents",
              "description": "content to print to the console.",
              "type": "Any"
            }
          ]
        },
        {
          "params": [
            {
              "name": "data",
              "description": "data to be written as a string, number,\nor array of strings and numbers.",
              "type": "String|Number|Array"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "hour",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 65,
      "itemtype": "method",
      "description": "Returns the current hour as a number from 0–23.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current hour.\n  let h = hour();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the hour.\n  text(`Current hour: ${h}`, 20, 50, 60);\n\n  describe(`The text 'Current hour: ${h}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current hour between 0 and 23.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current hour between 0 and 23.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "randomSeed",
      "file": "src/scripts/parsers/in/p5.js/src/math/random.js",
      "line": 76,
      "itemtype": "method",
      "description": "<p>Sets the seed value for the <a href=\"#/p5/random\">random()</a> and\n<a href=\"#/p5/randomGaussian\">randomGaussian()</a> functions.</p>\n<p>By default, <a href=\"#/p5/random\">random()</a> and\n<a href=\"#/p5/randomGaussian\">randomGaussian()</a> produce different\nresults each time a sketch is run. Calling <code>randomSeed()</code> with a constant\nargument, such as <code>randomSeed(99)</code>, makes these functions produce the same\nresults each time a sketch is run.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get random coordinates.\n  let x = random(0, 100);\n  let y = random(0, 100);\n\n  // Draw the white circle.\n  circle(x, y, 10);\n\n  // Set a random seed for consistency.\n  randomSeed(99);\n\n  // Get random coordinates.\n  x = random(0, 100);\n  y = random(0, 100);\n\n  // Draw the black circle.\n  fill(0);\n  circle(x, y, 10);\n\n  describe('A white circle appears at a random position. A black circle appears at (27.4, 25.8).');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "seed",
              "description": "seed value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Random"
    },
    {
      "name": "float",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 77,
      "itemtype": "method",
      "description": "<p>Converts a <code>String</code> to a floating point (decimal) <code>Number</code>.</p>\n<p><code>float()</code> converts strings that resemble numbers, such as <code>'12.34'</code>, into\nnumbers.</p>\n<p>The parameter, <code>str</code>, is the string value to convert. For example, calling\n<code>float('12.34')</code> returns the number <code>12.34</code>.  If an array of strings is\npassed, as in <code>float(['12.34', '56.78'])</code>, then an array of numbers will be\nreturned.</p>\n<p>Note: If a string can't be converted to a number, as in <code>float('giraffe')</code>,\nthen the value <code>NaN</code> (not a number) will be returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = '12.3';\n\n  // Convert the string to a number.\n  let converted = float(original);\n\n  // Double the converted value.\n  let twice = converted * 2;\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(12);\n\n  // Display the original and converted values.\n  text(`${original} × 2 = ${twice}`, 50, 50);\n\n  describe('The text \"12.3 × 2 = 24.6\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of strings.\n  let original = ['60', '30', '15'];\n\n  // Convert the strings to numbers.\n  let diameters = float(original);\n\n  for (let d of diameters) {\n    // Draw a circle.\n    circle(50, 50, d);\n  }\n\n  describe('Three white, concentric circles on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "string to convert.",
              "type": "String"
            }
          ],
          "return": {
            "description": "converted number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "array of strings to convert.",
              "type": "String[]"
            }
          ],
          "return": {
            "description": "converted numbers.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "converted number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "rotateBy",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Quat.js",
      "line": 77,
      "itemtype": "method",
      "description": "Rotates the Quaternion by the quaternion passed\nwhich contains the axis of roation and angle of rotation",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "axesQuat",
              "description": "axis quaternion which contains\nthe axis of rotation and angle of rotation",
              "optional": 1,
              "type": "p5.Quat"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Quaternion"
    },
    {
      "name": "ceil",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 80,
      "itemtype": "method",
      "description": "<p>Calculates the closest integer value that is greater than or equal to a\nnumber.</p>\n<p>For example, calling <code>ceil(9.03)</code> and <code>ceil(9.97)</code> both return the value\n10.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use RGB color with values from 0 to 1.\n  colorMode(RGB, 1);\n\n  noStroke();\n\n  // Draw the left rectangle.\n  let r = 0.3;\n  fill(r, 0, 0);\n  rect(0, 0, 50, 100);\n\n  // Round r up to 1.\n  r = ceil(r);\n\n  // Draw the right rectangle.\n  fill(r, 0, 0);\n  rect(50, 0, 50, 100);\n\n  describe('Two rectangles. The one on the left is dark red and the one on the right is bright red.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to round up.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "rounded up number.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "rounded up number.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "ellipseMode",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 80,
      "itemtype": "method",
      "description": "<p>Changes where ellipses, circles, and arcs are drawn.</p>\n<p>By default, the first two parameters of\n<a href=\"#/p5/ellipse\">ellipse()</a>, <a href=\"#/p5/circle\">circle()</a>,\nand <a href=\"#/p5/arc\">arc()</a>\nare the x- and y-coordinates of the shape's center. The next parameters set\nthe shape's width and height. This is the same as calling\n<code>ellipseMode(CENTER)</code>.</p>\n<p><code>ellipseMode(RADIUS)</code> also uses the first two parameters to set the x- and\ny-coordinates of the shape's center. The next parameters are half of the\nshapes's width and height. Calling <code>ellipse(0, 0, 10, 15)</code> draws a shape\nwith a width of 20 and height of 30.</p>\n<p><code>ellipseMode(CORNER)</code> uses the first two parameters as the upper-left\ncorner of the shape. The next parameters are its width and height.</p>\n<p><code>ellipseMode(CORNERS)</code> uses the first two parameters as the location of one\ncorner of the ellipse's bounding box. The next parameters are the location\nof the opposite corner.</p>\n<p>The argument passed to <code>ellipseMode()</code> must be written in ALL CAPS because\nthe constants <code>CENTER</code>, <code>RADIUS</code>, <code>CORNER</code>, and <code>CORNERS</code> are defined this\nway. JavaScript is a case-sensitive language.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // White ellipse.\n  ellipseMode(RADIUS);\n  fill(255);\n  ellipse(50, 50, 30, 30);\n\n  // Gray ellipse.\n  ellipseMode(CENTER);\n  fill(100);\n  ellipse(50, 50, 30, 30);\n\n  describe('A white circle with a gray circle at its center. Both circles have black outlines.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // White ellipse.\n  ellipseMode(CORNER);\n  fill(255);\n  ellipse(25, 25, 50, 50);\n\n  // Gray ellipse.\n  ellipseMode(CORNERS);\n  fill(100);\n  ellipse(25, 25, 50, 50);\n\n  describe('A white circle with a gray circle at its top-left corner. Both circles have black outlines.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either CENTER, RADIUS, CORNER, or CORNERS",
              "type": "CENTER|RADIUS|CORNER|CORNERS"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "nf",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 89,
      "itemtype": "method",
      "description": "<p>Converts a <code>Number</code> into a <code>String</code> with a given number of digits.</p>\n<p><code>nf()</code> converts numbers such as <code>123.45</code> into strings formatted with a set\nnumber of digits, as in <code>'123.4500'</code>.</p>\n<p>The first parameter, <code>num</code>, is the number to convert to a string. For\nexample, calling <code>nf(123.45)</code> returns the string <code>'123.45'</code>. If an array of\nnumbers is passed, as in <code>nf([123.45, 67.89])</code>, an array of formatted\nstrings will be returned.</p>\n<p>The second parameter, <code>left</code>, is optional. If a number is passed, as in\n<code>nf(123.45, 4)</code>, it sets the minimum number of digits to include to the\nleft of the decimal place. If <code>left</code> is larger than the number of digits in\n<code>num</code>, then unused digits will be set to 0. For example, calling\n<code>nf(123.45, 4)</code> returns the string <code>'0123.45'</code>.</p>\n<p>The third parameter, <code>right</code>, is also optional. If a number is passed, as\nin <code>nf(123.45, 4, 1)</code>, it sets the minimum number of digits to include to\nthe right of the decimal place. If <code>right</code> is smaller than the number of\ndecimal places in <code>num</code>, then <code>num</code> will be rounded to the given number of\ndecimal places. For example, calling <code>nf(123.45, 4, 1)</code> returns the string\n<code>'0123.5'</code>. If right is larger than the number of decimal places in <code>num</code>,\nthen unused decimal places will be set to 0. For example, calling\n<code>nf(123.45, 4, 3)</code> returns the string <code>'0123.450'</code>.</p>\n<p>When the number is negative, for example, calling <code>nf(-123.45, 5, 2)</code>\nreturns the string <code>'-00123.45'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(16);\n\n  // Create a number variable.\n  let number = 123.45;\n\n  // Display the number as a string.\n  let formatted = nf(number);\n  text(formatted, 20, 20);\n\n  let negative = nf(-number, 4, 2);\n  text(negative, 20, 40);\n\n  // Display the number with four digits\n  // to the left of the decimal.\n  let left = nf(number, 4);\n  text(left, 20, 60);\n\n  // Display the number with four digits\n  // to the left of the decimal and one\n  // to the right.\n  let right = nf(number, 4, 1);\n  text(right, 20, 80);\n\n  describe(\n    'The numbers \"123.45\", \"-0123.45\", \"0123.45\", and \"0123.5\" written on four separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "num",
              "description": "number to format.",
              "type": "Number|String"
            },
            {
              "name": "left",
              "description": "number of digits to include to the left of\nthe decimal point.",
              "optional": 1,
              "type": "Integer|String"
            },
            {
              "name": "right",
              "description": "number of digits to include to the right\nof the decimal point.",
              "optional": 1,
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to format.",
              "type": "Number[]"
            },
            {
              "name": "left",
              "description": "",
              "optional": 1,
              "type": "Integer|String"
            },
            {
              "name": "right",
              "description": "",
              "optional": 1,
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "formatted strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "formatted string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "strokeMode",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 90,
      "itemtype": "method",
      "description": "<p>Sets the stroke rendering mode to balance performance and visual features when drawing lines.</p>\n<p><code>strokeMode()</code> offers two modes:</p>\n<ul><li><code>SIMPLE</code>: Optimizes for speed by disabling caps, joins, and stroke color features.\nUse this mode for faster line rendering when these visual details are unnecessary.</li><li><code>FULL</code>: Enables caps, joins, and stroke color for lines.\nThis mode provides enhanced visuals but may reduce performance due to additional processing.</li></ul><p>Choose the mode that best suits your application's needs to either improve rendering speed or enhance visual quality.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 300, WEBGL);\n  describe('A sphere with red stroke and a red, wavy line on a gray background. The wavy line have caps, joins and colors.');\n}\n\nfunction draw() {\n  background(128);\n  strokeMode(FULL); // Enables detailed rendering with caps, joins, and stroke color.\n  push();\n  strokeWeight(1);\n  translate(0, -50, 0);\n  sphere(50);\n  pop();\n  orbitControl();\n\n  noFill();\n  strokeWeight(15);\n  stroke('red');\n  beginShape();\n  bezierOrder(2); // Sets the order of the Bezier curve.\n  bezierVertex(80, 80);\n  bezierVertex(50, -40);\n  bezierVertex(-80, 80);\n  endShape();\n}",
        "function setup() {\n  createCanvas(300, 300, WEBGL);\n  describe('A sphere with red stroke and a  wavy line without full curve decorations without caps and color on a gray background.');\n}\n\nfunction draw() {\n  background(128);\n  strokeMode(SIMPLE); // Simplifies stroke rendering for better performance.\n\n  // Draw sphere\n  push();\n  strokeWeight(1);\n  translate(0, -50, 0);\n  sphere(50);\n  pop();\n  orbitControl();\n\n  // Draw modified wavy red line\n  noFill();\n  strokeWeight(15);\n  stroke('red');\n  beginShape();\n  bezierOrder(2); // Sets the order of the Bezier curve.\n  bezierVertex(80, 80);\n  bezierVertex(50, -40);\n  bezierVertex(-80, 80);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "<p>The stroke mode to set. Possible values are:</p>\n<ul><li><code>'SIMPLE'</code>: Fast rendering without caps, joins, or stroke color.</li><li><code>'FULL'</code>: Detailed rendering with caps, joins, and stroke color.</li></ul>",
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "select",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 91,
      "itemtype": "method",
      "description": "<p>Searches the page for the first element that matches the given\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics#different_types_of_selectors\" target=\"_blank\">CSS selector string</a>.</p>\n<p>The selector string can be an ID, class, tag name, or a combination.\n<code>select()</code> returns a <a href=\"#/p5.Element\">p5.Element</a> object if it\nfinds a match and <code>null</code> if not.</p>\n<p>The second parameter, <code>container</code>, is optional. It specifies a container to\nsearch within. <code>container</code> can be CSS selector string, a\n<a href=\"#/p5.Element\">p5.Element</a> object, or an\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\" target=\"_blank\">HTMLElement</a> object.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n\n  // Select the canvas by its tag.\n  let cnv = select('canvas');\n  cnv.style('border', '5px deeppink dashed');\n\n  describe('A gray square with a dashed pink border.');\n}",
        "function setup() {\n  let cnv = createCanvas(100, 100);\n\n  // Add a class attribute to the canvas.\n  cnv.class('pinkborder');\n\n  background(200);\n\n  // Select the canvas by its class.\n  cnv = select('.pinkborder');\n\n  // Style its border.\n  cnv.style('border', '5px deeppink dashed');\n\n  describe('A gray square with a dashed pink border.');\n}",
        "function setup() {\n  let cnv = createCanvas(100, 100);\n\n  // Set the canvas' ID.\n  cnv.id('mycanvas');\n\n  background(200);\n\n  // Select the canvas by its ID.\n  cnv = select('#mycanvas');\n\n  // Style its border.\n  cnv.style('border', '5px deeppink dashed');\n\n  describe('A gray square with a dashed pink border.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "selectors",
              "description": "CSS selector string of element to search for.",
              "type": "String"
            },
            {
              "name": "container",
              "description": "CSS selector string, <a href=\"#/p5.Element\">p5.Element</a>, or\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\" target=\"_blank\">HTMLElement</a> to search within.",
              "optional": 1,
              "type": "String|p5.Element|HTMLElement"
            }
          ],
          "return": {
            "description": "<a href=\"#/p5.Element\">p5.Element</a> containing the element.",
            "type": "p5.Element|"
          }
        }
      ],
      "return": {
        "description": "<a href=\"#/p5.Element\">p5.Element</a> containing the element.",
        "type": "p5.Element|"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadImage",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 95,
      "itemtype": "method",
      "description": "<p>Loads an image to create a <a href=\"#/p5.Image\">p5.Image</a> object.</p>\n<p><code>loadImage()</code> interprets the first parameter one of three ways. If the path\nto an image file is provided, <code>loadImage()</code> will load it. Paths to local\nfiles should be relative, such as <code>'assets/thundercat.jpg'</code>. URLs such as\n<code>'https://example.com/thundercat.jpg'</code> may be blocked due to browser\nsecurity. Raw image data can also be passed as a base64 encoded image in\nthe form <code>'data:image/png;base64,arandomsequenceofcharacters'</code>. The <code>path</code>\nparameter can also be defined as a <code>Request</code>\nobject for more advanced usage.</p>\n<p>The second parameter is optional. If a function is passed, it will be\ncalled once the image has loaded. The callback function can optionally use\nthe new <a href=\"#/p5.Image\">p5.Image</a> object. The return value of the\nfunction will be used as the final return value of <code>loadImage()</code>.</p>\n<p>The third parameter is also optional. If a function is passed, it will be\ncalled if the image fails to load. The callback function can optionally use\nthe event error. The return value of the function will be used as the final\nreturn value of <code>loadImage()</code>.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n",
      "example": [
        "let img;\n\n// Load the image and create a p5.Image object.\nasync function setup() {\n  img = await loadImage('assets/laDefense.jpg');\n  createCanvas(100, 100);\n\n  // Draw the image.\n  image(img, 0, 0);\n\n  describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}",
        "async function setup() {\n  // Call handleImage() once the image loads.\n  await loadImage('assets/laDefense.jpg', handleImage);\n\n  describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}\n\n// Display the image.\nfunction handleImage(img) {\n  image(img, 0, 0);\n}",
        "async function setup() {\n  // Call handleImage() once the image loads or\n  // call handleError() if an error occurs.\n  await loadImage('assets/laDefense.jpg', handleImage, handleError);\n}\n\n// Display the image.\nfunction handleImage(img) {\n  image(img, 0, 0);\n\n  describe('Image of the underside of a white umbrella and a gridded ceiling.');\n}\n\n// Log the error.\nfunction handleError(event) {\n  console.error('Oops!', event);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the image to be loaded or base64 encoded image.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "function called with\n<a href=\"#/p5.Image\">p5.Image</a> once it\nloads.",
              "optional": 1,
              "type": "function(p5.Image)"
            },
            {
              "name": "failureCallback",
              "description": "function called with event\nerror if the image fails to load.",
              "optional": 1,
              "type": "function(Event)"
            }
          ],
          "return": {
            "description": "the <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "Promise<p5.Image>"
          }
        }
      ],
      "return": {
        "description": "the <a href=\"#/p5.Image\">p5.Image</a> object.",
        "type": "Promise<p5.Image>"
      },
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "createVector",
      "file": "src/scripts/parsers/in/p5.js/src/math/math.js",
      "line": 95,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Vector\">p5.Vector</a> object.</p>\n<p>A vector can be thought of in different ways. In one view, a vector is like\nan arrow pointing in space. Vectors have both magnitude (length) and\ndirection. This view is helpful for programming motion.</p>\n<p>A vector's components determine its magnitude and direction. For example,\ncalling <code>createVector(3, 4)</code> creates a new\n<a href=\"#/p5.Vector\">p5.Vector</a> object with an x-component of 3 and a\ny-component of 4. From the origin, this vector's tip is 3 units to the\nright and 4 units down.</p>\n<p>You can also pass N dimensions to the <code>createVector</code> function. For example,\ncalling <code>createVector(1, 2, 3, 4)</code> creates a vector with four components.\nThis allows for flexibility in representing vectors in higher-dimensional\nspaces.</p>\n<p>Calling <code>createVector()</code> with no arguments is deprecated and will emit\na friendly warning. Use <code>createVector(0)</code>, <code>createVector(0, 0)</code>, or\n<code>createVector(0, 0, 0)</code> instead.</p>\n<p><a href=\"#/p5.Vector\">p5.Vector</a> objects are often used to program\nmotion because they simplify the math. For example, a moving ball has a\nposition and a velocity. Position describes where the ball is in space. The\nball's position vector extends from the origin to the ball's center.\nVelocity describes the ball's speed and the direction it's moving. If the\nball is moving straight up, its velocity vector points straight up. Adding\nthe ball's velocity vector to its position vector moves it, as in\n<code>pos.add(vel)</code>. Vector math relies on methods inside the\n<a href=\"#/p5.Vector\">p5.Vector</a> class.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Vector objects.\n  let p1 = createVector(25, 25);\n  let p2 = createVector(50, 50);\n  let p3 = createVector(75, 75);\n\n  // Draw the dots.\n  strokeWeight(5);\n  point(p1);\n  point(p2);\n  point(p3);\n\n  describe('Three black dots form a diagonal line from top left to bottom right.');\n}",
        "let pos;\nlet vel;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create p5.Vector objects.\n  pos = createVector(50, 100);\n  vel = createVector(0, -1);\n\n  describe('A black dot moves from bottom to top on a gray square. The dot reappears at the bottom when it reaches the top.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Add velocity to position.\n  pos.add(vel);\n\n  // If the dot reaches the top of the canvas,\n  // restart from the bottom.\n  if (pos.y < 0) {\n    pos.y = 100;\n  }\n\n  // Draw the dot.\n  strokeWeight(5);\n  point(pos);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "Zero or more numbers, representing each component of the vector.",
              "type": "Number",
              "rest": true
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5",
      "static": false,
      "module": "Math"
    },
    {
      "name": "minute",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 95,
      "itemtype": "method",
      "description": "Returns the current minute as a number from 0–59.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current minute.\n  let m = minute();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the minute.\n  text(`Current minute: ${m}`, 10, 50, 80);\n\n  describe(`The text 'Current minute: ${m}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current minute between 0 and 59.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current minute between 0 and 59.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "noLoop",
      "file": "src/scripts/parsers/in/p5.js/src/core/structure.js",
      "line": 113,
      "itemtype": "method",
      "description": "<p>Stops the code in <a href=\"#/p5/draw\">draw()</a> from running repeatedly.</p>\n<p>By default, <a href=\"#/p5/draw\">draw()</a> tries to run 60 times per\nsecond. Calling <code>noLoop()</code> stops <a href=\"#/p5/draw\">draw()</a> from\nrepeating. The draw loop can be restarted by calling\n<a href=\"#/p5/loop\">loop()</a>. <a href=\"#/p5/draw\">draw()</a> can be run\nonce by calling <a href=\"#/p5/redraw\">redraw()</a>.</p>\n<p>The <a href=\"#/p5/isLooping\">isLooping()</a> function can be used to check\nwhether a sketch is looping, as in <code>isLooping() === true</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Turn off the draw loop.\n  noLoop();\n\n  describe('A white half-circle on the left edge of a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's x-coordinate.\n  let x = frameCount;\n\n  // Draw the circle.\n  // Normally, the circle would move from left to right.\n  circle(x, 50, 20);\n}",
        "// Double-click to stop the draw loop.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe('A white circle moves randomly on a gray background. It stops moving when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's coordinates.\n  let x = random(0, 100);\n  let y = random(0, 100);\n\n  // Draw the circle.\n  // Normally, the circle would move from left to right.\n  circle(x, y, 20);\n}\n\n// Stop the draw loop when the user double-clicks.\nfunction doubleClicked() {\n  noLoop();\n}",
        "let startButton;\nlet stopButton;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create the button elements and place them\n  // beneath the canvas.\n  startButton = createButton('▶');\n  startButton.position(0, 100);\n  startButton.size(50, 20);\n  stopButton = createButton('◾');\n  stopButton.position(50, 100);\n  stopButton.size(50, 20);\n\n  // Set functions to call when the buttons are pressed.\n  startButton.mousePressed(loop);\n  stopButton.mousePressed(noLoop);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe(\n    'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's coordinates.\n  let x = random(0, 100);\n  let y = random(0, 100);\n\n  // Draw the circle.\n  // Normally, the circle would move from left to right.\n  circle(x, y, 20);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "describe",
      "file": "src/scripts/parsers/in/p5.js/src/accessibility/describe.js",
      "line": 114,
      "itemtype": "method",
      "description": "<p>Creates a screen reader-accessible description of the canvas.</p>\n<p>The first parameter, <code>text</code>, is the description of the canvas.</p>\n<p>The second parameter, <code>display</code>, is optional. It determines how the\ndescription is displayed. If <code>LABEL</code> is passed, as in\n<code>describe('A description.', LABEL)</code>, the description will be visible in\na div element next to the canvas. If <code>FALLBACK</code> is passed, as in\n<code>describe('A description.', FALLBACK)</code>, the description will only be\nvisible to screen readers. This is the default mode.</p>\n<p>Read\n<a href=\"/learn/accessible-labels.html\">Writing accessible canvas descriptions</a>\nto learn more about making sketches accessible.</p>\n",
      "example": [
        "function setup() {\n  background('pink');\n\n  // Draw a heart.\n  fill('red');\n  noStroke();\n  circle(67, 67, 20);\n  circle(83, 67, 20);\n  triangle(91, 73, 75, 95, 59, 73);\n\n  // Add a general description of the canvas.\n  describe('A pink square with a red heart in the bottom-right corner.');\n}",
        "function setup() {\n  background('pink');\n\n  // Draw a heart.\n  fill('red');\n  noStroke();\n  circle(67, 67, 20);\n  circle(83, 67, 20);\n  triangle(91, 73, 75, 95, 59, 73);\n\n  // Add a general description of the canvas\n  // and display it for debugging.\n  describe('A pink square with a red heart in the bottom-right corner.', LABEL);\n}",
        "function setup(){\n createCanvas(100, 100);\n};\n\nfunction draw() {\n  background(200);\n\n  // The expression\n  // frameCount % 100\n  // causes x to increase from 0\n  // to 99, then restart from 0.\n  let x = frameCount % 100;\n\n  // Draw the circle.\n  fill(0, 255, 0);\n  circle(x, 50, 40);\n\n  // Add a general description of the canvas.\n  describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`);\n}",
        "function setup(){\ncreateCanvas(100, 100);\n}\n\nfunction draw() {\n  background(200);\n\n  // The expression\n  // frameCount % 100\n  // causes x to increase from 0\n  // to 99, then restart from 0.\n  let x = frameCount % 100;\n\n  // Draw the circle.\n  fill(0, 255, 0);\n  circle(x, 50, 40);\n\n  // Add a general description of the canvas\n  // and display it for debugging.\n  describe(`A green circle at (${x}, 50) moves from left to right on a gray square.`, LABEL);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "text",
              "description": "description of the canvas.",
              "type": "String"
            },
            {
              "name": "display",
              "description": "either LABEL or FALLBACK.",
              "optional": 1,
              "type": "FALLBACK|LABEL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "storeItem",
      "file": "src/scripts/parsers/in/p5.js/src/data/local_storage.js",
      "line": 115,
      "itemtype": "method",
      "description": "<p>Stores a value in the web browser's local storage.</p>\n<p>Web browsers can save small amounts of data using the built-in\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage\" target=\"_blank\">localStorage object</a>.\nData stored in <code>localStorage</code> can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.</p>\n<p><code>storeItem()</code> makes it easy to store values in <code>localStorage</code> and\n<a href=\"#/p5/getItem\">getItem()</a> makes it easy to retrieve them.</p>\n<p>The first parameter, <code>key</code>, is the name of the value to be stored as a\nstring.</p>\n<p>The second parameter, <code>value</code>, is the value to be stored. Values can have\nany type.</p>\n<p>Note: Sensitive data such as passwords or personal information shouldn't be\nstored in <code>localStorage</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Store the player's name.\n  storeItem('name', 'Feist');\n\n  // Store the player's score.\n  storeItem('score', 1234);\n\n  describe('The text \"Feist: 1234\" written in black on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Retrieve the name.\n  let name = getItem('name');\n\n  // Retrieve the score.\n  let score = getItem('score');\n\n  // Display the score.\n  text(`${name}: ${score}`, 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create an object.\n  let p = { x: 50, y: 50 };\n\n  // Store the object.\n  storeItem('position', p);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Retrieve the object.\n  let p = getItem('position');\n\n  // Draw the circle.\n  circle(p.x, p.y, 30);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Color object.\n  let c = color('deeppink');\n\n  // Store the object.\n  storeItem('color', c);\n\n  describe('A pink circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Retrieve the object.\n  let c = getItem('color');\n\n  // Style the circle.\n  fill(c);\n\n  // Draw the circle.\n  circle(50, 50, 30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "key",
              "description": "name of the value.",
              "type": "String"
            },
            {
              "name": "value",
              "description": "value to be stored.",
              "type": "String|Number|Boolean|Object|Array"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "LocalStorage"
    },
    {
      "name": "createCanvas",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 116,
      "itemtype": "method",
      "description": "<p>Creates a canvas element on the web page.</p>\n<p><code>createCanvas()</code> creates the main drawing canvas for a sketch. It should\nonly be called once at the beginning of <a href=\"#/p5/setup\">setup()</a>.\nCalling <code>createCanvas()</code> more than once causes unpredictable behavior.</p>\n<p>The first two parameters, <code>width</code> and <code>height</code>, are optional. They set the\ndimensions of the canvas and the values of the\n<a href=\"#/p5/width\">width</a> and <a href=\"#/p5/height\">height</a> system\nvariables. For example, calling <code>createCanvas(900, 500)</code> creates a canvas\nthat's 900×500 pixels. By default, <code>width</code> and <code>height</code> are both 100.</p>\n<p>The third parameter is also optional. If either of the constants <code>P2D</code> or\n<code>WEBGL</code> is passed, as in <code>createCanvas(900, 500, WEBGL)</code>, then it will set\nthe sketch's rendering mode. If an existing\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement\" target=\"_blank\">HTMLCanvasElement</a>\nis passed, as in <code>createCanvas(900, 500, myCanvas)</code>, then it will be used\nby the sketch. To use <code>WEBGPU</code> mode, make sure you have the WebGPU mode addon included.</p>\n<p>The fourth parameter is also optional. If an existing\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement\" target=\"_blank\">HTMLCanvasElement</a>\nis passed, as in <code>createCanvas(900, 500, WEBGL, myCanvas)</code>, then it will be\nused by the sketch.</p>\n<p>Note: In WebGL mode, the canvas will use a WebGL2 context if it's supported\nby the browser. Check the <a href=\"#/p5/webglVersion\">webglVersion</a>\nsystem variable to check what version is being used, or call\n<code>setAttributes({ version: 1 })</code> to create a WebGL1 context.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a diagonal line.\n  line(0, 0, width, height);\n\n  describe('A diagonal line drawn from top-left to bottom-right on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 50);\n\n  background(200);\n\n  // Draw a diagonal line.\n  line(0, 0, width, height);\n\n  describe('A diagonal line drawn from top-left to bottom-right on a gray background.');\n}",
        "// Use WebGL mode.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Draw a diagonal line.\n  line(-width / 2, -height / 2, width / 2, height / 2);\n\n  describe('A diagonal line drawn from top-left to bottom-right on a gray background.');\n}",
        "function setup() {\n  // Create a p5.Render object.\n  let cnv = createCanvas(50, 50);\n\n  // Position the canvas.\n  cnv.position(10, 20);\n\n  background(200);\n\n  // Draw a diagonal line.\n  line(0, 0, width, height);\n\n  describe('A diagonal line drawn from top-left to bottom-right on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the canvas. Defaults to 100.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the canvas. Defaults to 100.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "renderer",
              "description": "either P2D, WEBGL, or WEBGPU. Defaults to <code>P2D</code>.",
              "optional": 1,
              "type": "P2D|WEBGL|P2DHDR|WEBGPU"
            },
            {
              "name": "canvas",
              "description": "existing canvas element that should be used for the sketch.",
              "optional": 1,
              "type": "HTMLCanvasElement"
            }
          ],
          "return": {
            "description": "new <code>p5.Renderer</code> that holds the canvas.",
            "type": "p5.Renderer"
          }
        },
        {
          "params": [
            {
              "name": "width",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "canvas",
              "description": "",
              "optional": 1,
              "type": "HTMLCanvasElement"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Renderer"
          }
        }
      ],
      "return": {
        "description": "new <code>p5.Renderer</code> that holds the canvas.",
        "type": "p5.Renderer"
      },
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "textOutput",
      "file": "src/scripts/parsers/in/p5.js/src/accessibility/outputs.js",
      "line": 118,
      "itemtype": "method",
      "description": "<p>Creates a screen reader-accessible description of shapes on the canvas.</p>\n<p><code>textOutput()</code> adds a general description, list of shapes, and\ntable of shapes to the web page. The general description includes the\ncanvas size, canvas color, and number of shapes. For example,\n<code>Your output is a, 100 by 100 pixels, gray canvas containing the following 2 shapes:</code>.</p>\n<p>A list of shapes follows the general description. The list describes the\ncolor, location, and area of each shape. For example,\n<code>a red circle at middle covering 3% of the canvas</code>. Each shape can be\nselected to get more details.</p>\n<p><code>textOutput()</code> uses its table of shapes as a list. The table describes the\nshape, color, location, coordinates and area. For example,\n<code>red circle location = middle area = 3%</code>. This is different from\n<a href=\"#/p5/gridOutput\">gridOutput()</a>, which uses its table as a grid.</p>\n<p>The <code>display</code> parameter is optional. It determines how the description is\ndisplayed. If <code>LABEL</code> is passed, as in <code>textOutput(LABEL)</code>, the description\nwill be visible in a div element next to the canvas. Using <code>LABEL</code> creates\nunhelpful duplicates for screen readers. Only use <code>LABEL</code> during\ndevelopment. If <code>FALLBACK</code> is passed, as in <code>textOutput(FALLBACK)</code>, the\ndescription will only be visible to screen readers. This is the default\nmode.</p>\n<p>Read\n<a href=\"/learn/accessible-labels.html\">Writing accessible canvas descriptions</a>\nto learn more about making sketches accessible.</p>\n",
      "example": [
        "function setup() {\n  // Add the text description.\n  textOutput();\n\n  // Draw a couple of shapes.\n  background(200);\n  fill(255, 0, 0);\n  circle(20, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle and a blue square on a gray background.');\n}",
        "function setup() {\n  // Add the text description and\n  // display it for debugging.\n  textOutput(LABEL);\n\n  // Draw a couple of shapes.\n  background(200);\n  fill(255, 0, 0);\n  circle(20, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle and a blue square on a gray background.');\n}",
        "function setup(){\n createCanvas(100, 100);\n}\n\nfunction draw() {\n  // Add the text description.\n  textOutput();\n\n  // Draw a moving circle.\n  background(200);\n  let x = frameCount * 0.1;\n  fill(255, 0, 0);\n  circle(x, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle moves from left to right above a blue square.');\n}",
        "function setup(){\n createCanvas(100, 100);\n}\n\nfunction draw() {\n  // Add the text description and\n  // display it for debugging.\n  textOutput(LABEL);\n\n  // Draw a moving circle.\n  background(200);\n  let x = frameCount * 0.1;\n  fill(255, 0, 0);\n  circle(x, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle moves from left to right above a blue square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "display",
              "description": "either FALLBACK or LABEL.",
              "optional": 1,
              "type": "FALLBACK|LABEL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "blend",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 126,
      "itemtype": "method",
      "description": "<p>Copies a region of pixels from one image to another.</p>\n<p>The first parameter, <code>srcImage</code>, is the\n<a href=\"#/p5.Image\">p5.Image</a> object to blend.</p>\n<p>The next four parameters, <code>sx</code>, <code>sy</code>, <code>sw</code>, and <code>sh</code> determine the region\nto blend from the source image. <code>(sx, sy)</code> is the top-left corner of the\nregion. <code>sw</code> and <code>sh</code> are the regions width and height.</p>\n<p>The next four parameters, <code>dx</code>, <code>dy</code>, <code>dw</code>, and <code>dh</code> determine the region\nof the canvas to blend into. <code>(dx, dy)</code> is the top-left corner of the\nregion. <code>dw</code> and <code>dh</code> are the regions width and height.</p>\n<p>The tenth parameter, <code>blendMode</code>, sets the effect used to blend the images'\ncolors. The options are <code>BLEND</code>, <code>DARKEST</code>, <code>LIGHTEST</code>, <code>DIFFERENCE</code>,\n<code>MULTIPLY</code>, <code>EXCLUSION</code>, <code>SCREEN</code>, <code>REPLACE</code>, <code>OVERLAY</code>, <code>HARD_LIGHT</code>,\n<code>SOFT_LIGHT</code>, <code>DODGE</code>, <code>BURN</code>, <code>ADD</code>, or <code>NORMAL</code></p>\n",
      "example": [
        "let img0;\nlet img1;\n\nasync function setup() {\n  // Load the images.\n  img0 = await loadImage('assets/rockies.jpg');\n  img1 = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Use the mountains as the background.\n  background(img0);\n\n  // Display the bricks.\n  image(img1, 0, 0);\n\n  // Display the bricks faded into the landscape.\n  blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears faded on the right of the image.');\n}",
        "let img0;\nlet img1;\n\nasync function setup() {\n  // Load the images.\n  img0 = await loadImage('assets/rockies.jpg');\n  img1 = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Use the mountains as the background.\n  background(img0);\n\n  // Display the bricks.\n  image(img1, 0, 0);\n\n  // Display the bricks partially transparent.\n  blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears transparent on the right of the image.');\n}",
        "let img0;\nlet img1;\n\nasync function setup() {\n  // Load the images.\n  img0 = await loadImage('assets/rockies.jpg');\n  img1 = await loadImage('assets/bricks_third.jpg');\n\n  createCanvas(100, 100);\n\n  // Use the mountains as the background.\n  background(img0);\n\n  // Display the bricks.\n  image(img1, 0, 0);\n\n  // Display the bricks washed out into the landscape.\n  blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n\n  describe('A wall of bricks in front of a mountain landscape. The same wall of bricks appears washed out on the right of the image.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "the blend mode. either\nBLEND, DARKEST, LIGHTEST, DIFFERENCE,\nMULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD or NORMAL.",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "blendMode",
              "description": "",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|NORMAL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "loadShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 130,
      "itemtype": "method",
      "description": "<p>Loads vertex and fragment shaders to create a\n<a href=\"#/p5.Shader\">p5.Shader</a> object.</p>\n<p>Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels at the same time, making them fast for many\ngraphics tasks. They’re written in a language called\n<a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\nand run along with the rest of the code in a sketch.</p>\n<p>Once the <a href=\"#/p5.Shader\">p5.Shader</a> object is created, it can be\nused with the <a href=\"#/p5/shader\">shader()</a> function, as in\n<code>shader(myShader)</code>. A shader program consists of two files, a vertex shader\nand a fragment shader. The vertex shader affects where 3D geometry is drawn\non the screen and the fragment shader affects color.</p>\n<p><code>loadShader()</code> loads the vertex and fragment shaders from their <code>.vert</code> and\n<code>.frag</code> files. For example, calling\n<code>loadShader('assets/shader.vert', 'assets/shader.frag')</code> loads both\nrequired shaders and returns a <a href=\"#/p5.Shader\">p5.Shader</a> object.</p>\n<p>The third parameter, <code>successCallback</code>, is optional. If a function is\npassed, it will be called once the shader has loaded. The callback function\ncan use the new <a href=\"#/p5.Shader\">p5.Shader</a> object as its\nparameter. The return value of the <code>successCallback()</code> function will be used\nas the final return value of <code>loadShader()</code>.</p>\n<p>The fourth parameter, <code>failureCallback</code>, is also optional. If a function is\npassed, it will be called if the shader fails to load. The callback\nfunction can use the event error as its parameter. The return value of the <code>\nfailureCallback()</code> function will be used as the final return value of <code>loadShader()</code>.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n<p>Note: Shaders can only be used in WebGL mode.</p>\n",
      "example": [
        "// Note: A \"uniform\" is a global variable within a shader program.\n\nlet mandelbrot;\n\n// Load the shader and create a p5.Shader object.\nasync function setup() {\n  mandelbrot = await loadShader('assets/shader.vert', 'assets/shader.frag');\n\n  createCanvas(100, 100, WEBGL);\n\n  // Compile and apply the p5.Shader object.\n  shader(mandelbrot);\n\n  // Set the shader uniform p to an array.\n  mandelbrot.setUniform('p', [-0.74364388703, 0.13182590421]);\n\n  // Set the shader uniform r to the value 1.5.\n  mandelbrot.setUniform('r', 1.5);\n\n  // Add a quad as a display surface for the shader.\n  quad(-1, -1, 1, -1, 1, 1, -1, 1);\n\n  describe('A black fractal image on a magenta background.');\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\nlet mandelbrot;\n\n// Load the shader and create a p5.Shader object.\nasync function setup() {\n  mandelbrot = await loadShader('assets/shader.vert', 'assets/shader.frag');\n\n  createCanvas(100, 100, WEBGL);\n\n  // Use the p5.Shader object.\n  shader(mandelbrot);\n\n  // Set the shader uniform p to an array.\n  mandelbrot.setUniform('p', [-0.74364388703, 0.13182590421]);\n\n  describe('A fractal image zooms in and out of focus.');\n}\n\nfunction draw() {\n  // Set the shader uniform r to a value that oscillates between 0 and 2.\n  mandelbrot.setUniform('r', sin(frameCount * 0.01) + 1);\n\n  // Add a quad as a display surface for the shader.\n  quad(-1, -1, 1, -1, 1, 1, -1, 1);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "vertFilename",
              "description": "path of the vertex shader to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "fragFilename",
              "description": "path of the fragment shader to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "function to call once the shader is loaded. Can be passed the\n<a href=\"#/p5.Shader\">p5.Shader</a> object.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "failureCallback",
              "description": "function to call if the shader fails to load. Can be passed an\n<code>Error</code> event object.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new shader created from the vertex and fragment shader files.",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "new shader created from the vertex and fragment shader files.",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "constrain",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 134,
      "itemtype": "method",
      "description": "Constrains a number between a minimum and maximum value.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black dot drawn on a gray square follows the mouse from left to right. Its movement is constrained to the middle third of the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  let x = constrain(mouseX, 33, 67);\n  let y = 50;\n\n  strokeWeight(5);\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two vertical lines. Two circles move horizontally with the mouse. One circle stops at the vertical lines.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set boundaries and draw them.\n  let leftWall = 25;\n  let rightWall = 75;\n  line(leftWall, 0, leftWall, 100);\n  line(rightWall, 0, rightWall, 100);\n\n  // Draw a circle that follows the mouse freely.\n  fill(255);\n  circle(mouseX, 33, 9);\n\n  // Draw a circle that's constrained.\n  let xc = constrain(mouseX, leftWall, rightWall);\n  fill(0);\n  circle(xc, 67, 9);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to constrain.",
              "type": "Number"
            },
            {
              "name": "low",
              "description": "minimum limit.",
              "type": "Number"
            },
            {
              "name": "high",
              "description": "maximum limit.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "constrained number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "constrained number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "createImage",
      "file": "src/scripts/parsers/in/p5.js/src/image/image.js",
      "line": 140,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Image\">p5.Image</a> object.</p>\n<p><code>createImage()</code> uses the <code>width</code> and <code>height</code> parameters to set the new\n<a href=\"#/p5.Image\">p5.Image</a> object's dimensions in pixels. The new\n<a href=\"#/p5.Image\">p5.Image</a> can be modified by updating its\n<a href=\"#/p5.Image/pixels\">pixels</a> array or by calling its\n<a href=\"#/p5.Image/get\">get()</a> and\n<a href=\"#/p5.Image/set\">set()</a> methods. The\n<a href=\"#/p5.Image/loadPixels\">loadPixels()</a> method must be called\nbefore reading or modifying pixel values. The\n<a href=\"#/p5.Image/updatePixels\">updatePixels()</a> method must be called\nfor updates to take effect.</p>\n<p>Note: The new <a href=\"#/p5.Image\">p5.Image</a> object is transparent by\ndefault.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels into memory.\n  img.loadPixels();\n\n  // Set all the image's pixels to black.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      img.set(x, y, 0);\n    }\n  }\n\n  // Update the image's pixel values.\n  img.updatePixels();\n\n  // Draw the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the image's pixels into memory.\n  img.loadPixels();\n\n  // Create a color gradient.\n  for (let x = 0; x < img.width; x += 1) {\n    for (let y = 0; y < img.height; y += 1) {\n      // Calculate the transparency.\n      let a = map(x, 0, img.width, 0, 255);\n\n      // Create a p5.Color object.\n      let c = color(0, a);\n\n      // Set the pixel's color.\n      img.set(x, y, c);\n    }\n  }\n\n  // Update the image's pixels.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A square with a horizontal color gradient that transitions from gray to black.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Image object.\n  let img = createImage(66, 66);\n\n  // Load the pixels into memory.\n  img.loadPixels();\n  // Get the current pixel density.\n  let d = pixelDensity();\n\n  // Calculate the pixel that is halfway through the image's pixel array.\n  let halfImage = 4 * (d * img.width) * (d * img.height / 2);\n\n  // Set half of the image's pixels to black.\n  for (let i = 0; i < halfImage; i += 4) {\n    // Red.\n    img.pixels[i] = 0;\n    // Green.\n    img.pixels[i + 1] = 0;\n    // Blue.\n    img.pixels[i + 2] = 0;\n    // Alpha.\n    img.pixels[i + 3] = 255;\n  }\n\n  // Update the image's pixels.\n  img.updatePixels();\n\n  // Display the image.\n  image(img, 17, 17);\n\n  describe('A black square drawn in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width in pixels.",
              "type": "Integer"
            },
            {
              "name": "height",
              "description": "height in pixels.",
              "type": "Integer"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Image\">p5.Image</a> object.",
        "type": "p5.Image"
      },
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "acos",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 148,
      "itemtype": "method",
      "description": "<p>Calculates the arc cosine of a number.</p>\n<p><code>acos()</code> is the inverse of <a href=\"#/p5/cos\">cos()</a>. It expects\narguments in the range -1 to 1. By default, <code>acos()</code> returns values in the\nrange 0 to π (about 3.14). If the\n<a href=\"#/p5/angleMode\">angleMode()</a> is <code>DEGREES</code>, then values are\nreturned in the range 0 to 180.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate cos() and acos() values.\n  let a = PI;\n  let c = cos(a);\n  let ac = acos(c);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(c, 3)}`, 35, 50);\n  text(`${round(ac, 3)}`, 35, 75);\n\n  describe('The numbers 3.142, -1, and 3.142 written on separate rows.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate cos() and acos() values.\n  let a = PI + QUARTER_PI;\n  let c = cos(a);\n  let ac = acos(c);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(c, 3)}`, 35, 50);\n  text(`${round(ac, 3)}`, 35, 75);\n\n  describe('The numbers 3.927, -0.707, and 2.356 written on separate rows.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "value whose arc cosine is to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "arc cosine of the given value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "arc cosine of the given value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "noSmooth",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 153,
      "itemtype": "method",
      "description": "<p>Draws certain features with jagged (aliased) edges.</p>\n<p><a href=\"#/p5/smooth\">smooth()</a> is active by default. In 2D mode,\n<code>noSmooth()</code> is helpful for scaling up images without blurring. The\nfunctions don't affect shapes or fonts.</p>\n<p>In WebGL mode, <code>noSmooth()</code> causes all shapes to be drawn with jagged\n(aliased) edges. The functions don't affect images or fonts.</p>\n",
      "example": [
        "let heart;\n\nasync function setup() {\n  // Load a pixelated heart image from an image data string.\n  heart = await loadImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAEZJREFUGFd9jcsNACAIQ9tB2MeR3YdBMBBq8CIXPi2vBICIiOwkOedatllqWO6Y8yOWoyuNf1GZwgmf+RRG2YXr+xVFmA8HZ9Mx/KGPMtcAAAAASUVORK5CYII=');\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Antialiased hearts.\n  image(heart, 10, 10);\n  image(heart, 20, 10, 16, 16);\n  image(heart, 40, 10, 32, 32);\n\n  // Aliased hearts.\n  noSmooth();\n  image(heart, 10, 60);\n  image(heart, 20, 60, 16, 16);\n  image(heart, 40, 60, 32, 32);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  circle(0, 0, 80);\n\n  describe('A white circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Disable smoothing.\n  noSmooth();\n\n  background(200);\n\n  circle(0, 0, 80);\n\n  describe('A pixelated white circle on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "orbitControl",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/interaction.js",
      "line": 155,
      "itemtype": "method",
      "description": "<p>Allows the user to orbit around a 3D sketch using a mouse, trackpad, or\ntouchscreen.</p>\n<p>3D sketches are viewed through an imaginary camera. Calling\n<code>orbitControl()</code> within the <a href=\"#/p5/draw\">draw()</a> function allows\nthe user to change the camera’s position:</p>\n<pre><code class=\"language-js\">function draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rest of sketch.\n}</code></pre><p>Left-clicking and dragging or swipe motion will rotate the camera position\nabout the center of the sketch. Right-clicking and dragging or multi-swipe\nwill pan the camera position without rotation. Using the mouse wheel\n(scrolling) or pinch in/out will move the camera further or closer from the\ncenter of the sketch.</p>\n<p>The first three parameters, <code>sensitivityX</code>, <code>sensitivityY</code>, and\n<code>sensitivityZ</code>, are optional. They’re numbers that set the sketch’s\nsensitivity to movement along each axis. For example, calling\n<code>orbitControl(1, 2, -1)</code> keeps movement along the x-axis at its default\nvalue, makes the sketch twice as sensitive to movement along the y-axis,\nand reverses motion along the z-axis. By default, all sensitivity values\nare 1.</p>\n<p>The fourth parameter, <code>options</code>, is also optional. It’s an object that\nchanges the behavior of orbiting. For example, calling\n<code>orbitControl(1, 1, 1, options)</code> keeps the default sensitivity values while\nchanging the behaviors set with <code>options</code>. The object can have the\nfollowing properties:</p>\n<pre><code class=\"language-js\">let options = {\n  // Setting this to false makes mobile interactions smoother by\n  // preventing accidental interactions with the page while orbiting.\n  // By default, it's true.\n  disableTouchActions: true,\n\n  // Setting this to true makes the camera always rotate in the\n  // direction the mouse/touch is moving.\n  // By default, it's false.\n  freeRotation: false\n};\n\norbitControl(1, 1, 1, options);</code></pre>",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A multicolor box on a gray background. The camera angle changes when the user interacts using a mouse, trackpad, or touchscreen.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(30, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A multicolor box on a gray background. The camera angle changes when the user interacts using a mouse, trackpad, or touchscreen.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  // Make the interactions 3X sensitive.\n  orbitControl(3, 3, 3);\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(30, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A multicolor box on a gray background. The camera angle changes when the user interacts using a mouse, trackpad, or touchscreen.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create an options object.\n  let options = {\n    disableTouchActions: false,\n    freeRotation: true\n  };\n\n  // Enable orbiting with the mouse.\n  // Prevent accidental touch actions on touchscreen devices\n  // and enable free rotation.\n  orbitControl(1, 1, 1, options);\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(30, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "sensitivityX",
              "description": "sensitivity to movement along the x-axis. Defaults to 1.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "sensitivityY",
              "description": "sensitivity to movement along the y-axis. Defaults to 1.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "sensitivityZ",
              "description": "sensitivity to movement along the z-axis. Defaults to 1.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "options",
              "description": "Settings for orbitControl:",
              "optional": 1,
              "type": "Object"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Interaction"
    },
    {
      "name": "beginClip",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 168,
      "itemtype": "method",
      "description": "<p>Starts defining a shape that will mask any shapes drawn afterward.</p>\n<p>Any shapes drawn between <code>beginClip()</code> and\n<a href=\"#/p5/endClip\">endClip()</a> will add to the mask shape. The mask\nwill apply to anything drawn after <a href=\"#/p5/endClip\">endClip()</a>.</p>\n<p>The parameter, <code>options</code>, is optional. If an object with an <code>invert</code>\nproperty is passed, as in <code>beginClip({ invert: true })</code>, it will be used to\nset the masking mode. <code>{ invert: true }</code> inverts the mask, creating holes\nin shapes that are masked. <code>invert</code> is <code>false</code> by default.</p>\n<p>Masks can be contained between the\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions.\nDoing so allows unmasked shapes to be drawn after masked shapes.</p>\n<p>Masks can also be defined in a callback function that's passed to\n<a href=\"#/p5/clip\">clip()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a mask.\n  beginClip();\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n  endClip();\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n\n  describe('A white triangle and circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an inverted mask.\n  beginClip({ invert: true });\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n  endClip();\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n\n  describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  noStroke();\n\n  // Draw a masked shape.\n  push();\n  // Create a mask.\n  beginClip();\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n  endClip();\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n  pop();\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw an inverted masked shape.\n  push();\n  // Create an inverted mask.\n  beginClip({ invert: true });\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n  endClip();\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n  pop();\n\n  describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A silhouette of a rotating torus colored fuchsia.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a mask.\n  beginClip();\n  push();\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  scale(0.5);\n  torus(30, 15);\n  pop();\n  endClip();\n\n  // Draw a backing shape.\n  noStroke();\n  fill('fuchsia');\n  plane(100);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a mask.\n  beginClip();\n  push();\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  scale(0.5);\n  torus(30, 15);\n  pop();\n  endClip();\n\n  // Draw a backing shape.\n  noStroke();\n  beginShape(QUAD_STRIP);\n  fill(0, 255, 255);\n  vertex(-width / 2, -height / 2);\n  vertex(width / 2, -height / 2);\n  fill(100, 0, 100);\n  vertex(-width / 2, height / 2);\n  vertex(width / 2, height / 2);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "options",
              "description": "an object containing clip settings.",
              "optional": 1,
              "type": "Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "ambientLight",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 175,
      "itemtype": "method",
      "description": "<p>Creates a light that shines from all directions.</p>\n<p>Ambient light does not come from one direction. Instead, 3D shapes are\nlit evenly from all sides. Ambient lights are almost always used in\ncombination with other types of lights.</p>\n<p>There are three ways to call <code>ambientLight()</code> with optional parameters to\nset the light’s color.</p>\n<p>The first way to call <code>ambientLight()</code> has two parameters, <code>gray</code> and\n<code>alpha</code>. <code>alpha</code> is optional. Grayscale and alpha values between 0 and 255\ncan be passed to set the ambient light’s color, as in <code>ambientLight(50)</code> or\n<code>ambientLight(50, 30)</code>.</p>\n<p>The second way to call <code>ambientLight()</code> has one parameter, color. A\n<a href=\"#/p5.Color\">p5.Color</a> object, an array of color values, or a\nCSS color string, as in <code>ambientLight('magenta')</code>, can be passed to set the\nambient light’s color.</p>\n<p>The third way to call <code>ambientLight()</code> has four parameters, <code>v1</code>, <code>v2</code>,\n<code>v3</code>, and <code>alpha</code>. <code>alpha</code> is optional. RGBA, HSBA, or HSLA values can be\npassed to set the ambient light’s colors, as in <code>ambientLight(255, 0, 0)</code>\nor <code>ambientLight(255, 0, 0, 30)</code>. Color values will be interpreted using\nthe current <a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to turn on the light.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn against a gray background. The sphere appears to change color when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Control the light.\n  if (isLit === true) {\n    // Use a grayscale value of 80.\n    ambientLight(80);\n  }\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Turn on the ambient light when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A faded magenta sphere drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  // Use a p5.Color object.\n  let c = color('orchid');\n  ambientLight(c);\n\n  // Draw the sphere.\n  sphere();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A faded magenta sphere drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  // Use a CSS color string.\n  ambientLight('#DA70D6');\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A faded magenta sphere drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  // Use RGB values\n  ambientLight(218, 112, 214);\n\n  // Draw the sphere.\n  sphere(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha (transparency) value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value between 0 and 255.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "color as a CSS string.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "values",
              "description": "color as an array of RGBA, HSBA, or HSLA\nvalues.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object.",
              "type": "p5.Color"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "selectAll",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 178,
      "itemtype": "method",
      "description": "<p>Searches the page for all elements that matches the given\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/CSS_basics#different_types_of_selectors\" target=\"_blank\">CSS selector string</a>.</p>\n<p>The selector string can be an ID, class, tag name, or a combination.\n<code>selectAll()</code> returns an array of <a href=\"#/p5.Element\">p5.Element</a>\nobjects if it finds any matches and an empty array if none are found.</p>\n<p>The second parameter, <code>container</code>, is optional. It specifies a container to\nsearch within. <code>container</code> can be CSS selector string, a\n<a href=\"#/p5.Element\">p5.Element</a> object, or an\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\" target=\"_blank\">HTMLElement</a> object.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create three buttons.\n  createButton('1');\n  createButton('2');\n  createButton('3');\n\n  // Select the buttons by their tag.\n  let buttons = selectAll('button');\n\n  // Position the buttons.\n  for (let i = 0; i < 3; i += 1) {\n    buttons[i].position(0, i * 30);\n  }\n\n  describe('Three buttons stacked vertically. The buttons are labeled, \"1\", \"2\", and \"3\".');\n}",
        "function setup() {\n  // Create three buttons and position them.\n  let b1 = createButton('1');\n  b1.position(0, 0);\n  let b2 = createButton('2');\n  b2.position(0, 30);\n  let b3 = createButton('3');\n  b3.position(0, 60);\n\n  // Add a class attribute to each button.\n  b1.class('btn');\n  b2.class('btn btn-pink');\n  b3.class('btn');\n\n  // Select the buttons by their class.\n  let buttons = selectAll('.btn');\n  let pinkButtons = selectAll('.btn-pink');\n\n  // Style the selected buttons.\n  buttons.forEach(setFont);\n  pinkButtons.forEach(setColor);\n\n  describe('Three buttons stacked vertically. The buttons are labeled, \"1\", \"2\", and \"3\". Buttons \"1\" and \"3\" are gray. Button \"2\" is pink.');\n}\n\n// Set a button's font to Comic Sans MS.\nfunction setFont(btn) {\n  btn.style('font-family', 'Comic Sans MS');\n}\n\n// Set a button's background and font color.\nfunction setColor(btn) {\n  btn.style('background', 'deeppink');\n  btn.style('color', 'white');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "selectors",
              "description": "CSS selector string of element to search for.",
              "type": "String"
            },
            {
              "name": "container",
              "description": "CSS selector string, <a href=\"#/p5.Element\">p5.Element</a>, or\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\" target=\"_blank\">HTMLElement</a> to search within.",
              "optional": 1,
              "type": "String|p5.Element|HTMLElement"
            }
          ],
          "return": {
            "description": "array of <a href=\"#/p5.Element\">p5.Element</a>s containing any elements found.",
            "type": "p5.Element[]"
          }
        }
      ],
      "return": {
        "description": "array of <a href=\"#/p5.Element\">p5.Element</a>s containing any elements found.",
        "type": "p5.Element[]"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "smoothstep",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "<p>A shader function that performs smooth Hermite interpolation between <code>0.0</code>\nand <code>1.0</code>.</p>\n<p>This function is equivalent to the GLSL built-in\n<code>smoothstep(edge0, edge1, x)</code> and is available inside p5.strands shader\ncallbacks. It is commonly used to create soft transitions, smooth edges,\nfades, and anti-aliased effects.</p>\n<p>Smoothstep is useful when a threshold or cutoff is needed, but with a\ngradual transition instead of a hard edge.</p>\n<ul><li>Returns <code>0.0</code> when <code>x</code> is less than or equal to <code>edge0</code></li><li>Returns <code>1.0</code> when <code>x</code> is greater than or equal to <code>edge1</code></li><li>Smoothly interpolates between <code>0.0</code> and <code>1.0</code> when <code>x</code> is between them</li></ul>",
      "example": [
        "// Example 1: A soft vertical fade using smoothstep\n\nlet fadeShader;\n\nfunction fadeCallback() {\n  getColor((inputs) => {\n    // x goes from 0 → 1 across the canvas\n    let x = inputs.texCoord.x;\n\n    // smoothstep creates a soft transition instead of a hard edge\n    let t = smoothstep(0.25, 0.35, x);\n\n    // Use t directly as brightness\n    return [t, t, t, 1];\n  });\n}\n\nfunction setup() {\n  createCanvas(300, 200, WEBGL);\n  fadeShader = buildFilterShader(fadeCallback);\n}\n\nfunction draw() {\n  background(0);\n  filter(fadeShader);\n}",
        "// Example 2: Animate the smooth transition over time\n\nlet animatedShader;\n\nfunction animatedFadeCallback() {\n  getColor((inputs) => {\n    let x = inputs.texCoord.x;\n\n    // Move the smoothstep band back and forth over time\n    let center = 0.5 + 0.25 * sin(millis() * 0.001);\n    let t = smoothstep(center - 0.05, center + 0.05, x);\n\n    return [t, t, t, 1];\n  });\n}\n\nfunction setup() {\n  createCanvas(300, 200, WEBGL);\n  animatedShader = buildFilterShader(animatedFadeCallback);\n}\n\nfunction draw() {\n  background(0);\n  filter(animatedShader);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "edge0",
              "description": "Lower edge of the transition",
              "type": "Number"
            },
            {
              "name": "edge1",
              "description": "Upper edge of the transition",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "Input value to interpolate",
              "type": "Number"
            }
          ],
          "return": {
            "description": "A value between <code>0.0</code> and <code>1.0</code>",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "A value between <code>0.0</code> and <code>1.0</code>",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getTexture",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "<p>Retrieves the current color of a given texture at given coordinates.</p>\n<p>The given coordinates should be between [0, 0] representing the top-left of\nthe texture, and [1, 1] representing the bottom-right of the texture.</p>\n<p>The given texture could be, for example:</p>\n<ul><li><a href=\"#/p5.Image\">p5.Image</a>,</li><li>a <a href=\"#/p5.Graphics\">p5.Graphics</a>, or</li><li>a <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a>.</li></ul><p>The retrieved color that is returned will behave like a vec4, with components\nfor red, green, blue, and alpha, each between 0.0 and 1.0.</p>\n<p>Linear interpolation is used by default. For Framebuffer sources, you can\nprevent this by creating the buffer with:</p>\n<pre><code class=\"language-js\">createFramebuffer({\n    textureFiltering: NEAREST\n })</code></pre><p>This can be useful if you are using your texture to store data other than color.\nSee <a href=\"#/p5/createFramebuffer/\">createFramebuffer</a>.</p>\n<p>Note: The <code>getTexture</code> function is only available when using p5.strands.</p>\n",
      "example": [
        "// A filter shader (using p5.strands) which will\n// sample and invert the color of each pixel\n// from the canvas.\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  let myShader = buildFilterShader(buildIt);\n\n  background(\"white\");\n  fill(\"red\");\n  circle(0, 0, 50);\n\n  filter(myShader); //Try commenting this out!\n\n  describe(\"A cyan circle on black background\");\n}\n\nfunction buildIt() {\n  filterColor.begin();\n\n  //Sample the color of the pixel from the\n  //canvas at the same coordinate.\n  let c = getTexture(filterColor.canvasContent,\n                     filterColor.texCoord);\n\n  //Make a new color by inverting r, g, and b\n  let newColor = [1 - c.r, 1 - c.g, 1 - c.b, c.a];\n\n  //Finally, use it for this pixel!\n  filterColor.set(newColor);\n\n  filterColor.end();\n}",
        "// This primitive edge-detection filter samples\n// and compares the colors of the current pixel\n// on the canvas, and a little to the right.\n// It marks if they differ much.\nlet myShader;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  myShader = buildFilterShader(myShaderBuilder);\n  describe(\"A rough partial outline of a square rotating around a circle\");\n}\n\nfunction draw() {\n  drawADesign();\n\n  filter(myShader); // try commenting this out\n}\n\nfunction myShaderBuilder() {\n  filterColor.begin();\n\n  //The position of the current pixel...\n  let coordHere = filterColor.texCoord;\n  //and some small amount to the right.\n  let coordRight = coordHere + [0.01, 0];\n\n  //The canvas content is a texture.\n  let cnvTex = filterColor.canvasContent;\n\n  //Sample the colors from it at our two positions\n  let colorHere = getTexture(cnvTex, coordHere);\n  let colorRight = getTexture(cnvTex, coordRight);\n\n  // Calculate a (very rough) color difference.\n  let difference = length(colorHere - colorRight);\n\n  //We'll use a black color by default...\n  let resultColor = [0, 0, 0, 1];\n  //or white if the samples were different.\n  if (difference > 0.3) {\n    resultColor = [1, 1, 1, 1];\n  }\n  filterColor.set(resultColor);\n\n  filterColor.end();\n}\n\n//Draw a few shapes, just to test the filter with\nfunction drawADesign() {\n  background(50);\n  noStroke();\n  lights();\n  sphere(20);\n  rotate(frameCount / 300);\n  square(0, 0, 30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "texture",
              "description": "The texture to sample from.\n(e.g. a p5.Image, p5.Graphics, or p5.Framebuffer)."
            },
            {
              "name": "coords",
              "description": "The 2D coordinates to sample from.\nThis should be between [0,0] (the top-left) and [1,1] (the bottom-right)\nof the texture.  It should be compatible with a vec2."
            }
          ],
          "return": {
            "description": "The color of the given texture at the given coordinates.  This\nwill behave as a vec4 holding components r, g, b, and a (alpha), with each component being in the range 0.0 to 1.0."
          }
        }
      ],
      "return": {
        "description": "The color of the given texture at the given coordinates.  This\nwill behave as a vec4 holding components r, g, b, and a (alpha), with each component being in the range 0.0 to 1.0."
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "getWorldInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getPixelInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getFinalColor",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getColor",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getObjectInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "getCameraInputs",
      "file": "src/scripts/parsers/in/p5.js/src/strands/p5.strands.js",
      "line": 183,
      "itemtype": "method",
      "description": "",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "bezier",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 189,
      "itemtype": "method",
      "description": "<p>Draws a Bézier curve.</p>\n<p>Bézier curves can form shapes and curves that slope gently. They're defined\nby two anchor points and two control points. Bézier curves provide more\ncontrol than the spline curves created with the\n<a href=\"#/p5/spline\">spline()</a> function.</p>\n<p>The first two parameters, <code>x1</code> and <code>y1</code>, set the first anchor point. The\nfirst anchor point is where the curve starts.</p>\n<p>The next four parameters, <code>x2</code>, <code>y2</code>, <code>x3</code>, and <code>y3</code>, set the two control\npoints. The control points \"pull\" the curve towards them.</p>\n<p>The seventh and eighth parameters, <code>x4</code> and <code>y4</code>, set the last anchor\npoint. The last anchor point is where the curve ends.</p>\n<p>Bézier curves can also be drawn in 3D using WebGL mode. The 3D version of\n<code>bezier()</code> has twelve arguments because each point has x-, y-,\nand z-coordinates.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the anchor points in black.\n  stroke(0);\n  strokeWeight(5);\n  point(85, 20);\n  point(15, 80);\n\n  // Draw the control points in red.\n  stroke(255, 0, 0);\n  point(10, 10);\n  point(90, 90);\n\n  // Draw a black bezier curve.\n  noFill();\n  stroke(0);\n  strokeWeight(1);\n  bezier(85, 20, 10, 10, 90, 90, 15, 80);\n\n  // Draw red lines from the anchor points to the control points.\n  stroke(255, 0, 0);\n  line(85, 20, 10, 10);\n  line(15, 80, 90, 90);\n\n  describe(\n    'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'\n  );\n}",
        "// Click the mouse near the red dot in the top-left corner\n// and drag to change the curve's shape.\n\nlet x2 = 10;\nlet y2 = 10;\nlet isChanging = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with three curves. A black s-curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the anchor points in black.\n  stroke(0);\n  strokeWeight(5);\n  point(85, 20);\n  point(15, 80);\n\n  // Draw the control points in red.\n  stroke(255, 0, 0);\n  point(x2, y2);\n  point(90, 90);\n\n  // Draw a black bezier curve.\n  noFill();\n  stroke(0);\n  strokeWeight(1);\n  bezier(85, 20, x2, y2, 90, 90, 15, 80);\n\n  // Draw red lines from the anchor points to the control points.\n  stroke(255, 0, 0);\n  line(85, 20, x2, y2);\n  line(15, 80, 90, 90);\n}\n\n// Start changing the first control point if the user clicks near it.\nfunction mousePressed() {\n  if (dist(mouseX, mouseY, x2, y2) < 20) {\n    isChanging = true;\n  }\n}\n\n// Stop changing the first control point when the user releases the mouse.\nfunction mouseReleased() {\n  isChanging = false;\n}\n\n// Update the first control point while the user drags the mouse.\nfunction mouseDragged() {\n  if (isChanging === true) {\n    x2 = mouseX;\n    y2 = mouseY;\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background('skyblue');\n\n  // Draw the red balloon.\n  fill('red');\n  bezier(50, 60, 5, 15, 95, 15, 50, 60);\n\n  // Draw the balloon string.\n  line(50, 60, 50, 80);\n\n  describe('A red balloon in a blue sky.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red balloon in a blue sky. The balloon rotates slowly, revealing that it is flat.');\n}\n\nfunction draw() {\n  background('skyblue');\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the red balloon.\n  fill('red');\n  bezier(0, 0, 0, -45, -45, 0, 45, -45, 0, 0, 0, 0);\n\n  // Draw the balloon string.\n  line(0, 0, 0, 0, 20, 0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "x-coordinate of the first anchor point.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "y-coordinate of the first anchor point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "x-coordinate of the first control point.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "y-coordinate of the first control point.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "x-coordinate of the second control point.",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "y-coordinate of the second control point.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "x-coordinate of the second anchor point.",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "y-coordinate of the second anchor point.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z1",
              "description": "z-coordinate of the first anchor point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z2",
              "description": "z-coordinate of the first control point.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z3",
              "description": "z-coordinate of the second control point.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z4",
              "description": "z-coordinate of the second anchor point.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "int",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 195,
      "itemtype": "method",
      "description": "<p>Converts a <code>Boolean</code>, <code>String</code>, or decimal <code>Number</code> to an integer.</p>\n<p><code>int()</code> converts values to integers. Integers are positive or negative\nnumbers without decimals. If the original value has decimals, as in -34.56,\nthey're removed to produce an integer such as -34.</p>\n<p>The parameter, <code>n</code>, is the value to convert. If <code>n</code> is a Boolean, as in\n<code>int(false)</code> or <code>int(true)</code>, then the number 0 (<code>false</code>) or 1 (<code>true</code>) will\nbe returned. If <code>n</code> is a string or number, as in <code>int('45')</code> or\n<code>int(67.89)</code>, then an integer will be returned. If an array is passed, as\nin <code>int([12.34, 56.78])</code>, then an array of integers will be returned.</p>\n<p>Note: If a value can't be converted to a number, as in <code>int('giraffe')</code>,\nthen the value <code>NaN</code> (not a number) will be returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a Boolean variable.\n  let original = false;\n\n  // Convert the Boolean to an integer.\n  let converted = int(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"false : 0\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = '12.34';\n\n  // Convert the string to an integer.\n  let converted = int(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Display the original and converted values.\n  text(`${original} ≈ ${converted}`, 50, 50);\n\n  describe('The text \"12.34 ≈ 12\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a decimal number variable.\n  let original = 12.34;\n\n  // Convert the decimal number to an integer.\n  let converted = int(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Display the original and converted values.\n  text(`${original} ≈ ${converted}`, 50, 50);\n\n  describe('The text \"12.34 ≈ 12\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of strings.\n  let original = ['60', '30', '15'];\n\n  // Convert the strings to integers.\n  let diameters = int(original);\n\n  for (let d of diameters) {\n    // Draw a circle.\n    circle(50, 50, d);\n  }\n\n  describe('Three white, concentric circles on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String|Boolean|Number"
            }
          ],
          "return": {
            "description": "converted number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "Array"
            }
          ],
          "return": {
            "description": "converted numbers.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "converted number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "endClip",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 196,
      "itemtype": "method",
      "description": "Ends defining a mask that was started with\n<a href=\"#/p5/beginClip\">beginClip()</a>.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a mask.\n  beginClip();\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n  endClip();\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n\n  describe('A white triangle and circle on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "copy",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 197,
      "itemtype": "method",
      "description": "<p>Copies pixels from a source image to a region of the canvas.</p>\n<p>The first parameter, <code>srcImage</code>, is the\n<a href=\"#/p5.Image\">p5.Image</a> object to blend. The source image can be\nthe canvas itself or a\n<a href=\"#/p5.Image\">p5.Image</a> object. <code>copy()</code> will scale pixels from\nthe source region if it isn't the same size as the destination region.</p>\n<p>The next four parameters, <code>sx</code>, <code>sy</code>, <code>sw</code>, and <code>sh</code> determine the region\nto copy from the source image. <code>(sx, sy)</code> is the top-left corner of the\nregion. <code>sw</code> and <code>sh</code> are the region's width and height.</p>\n<p>The next four parameters, <code>dx</code>, <code>dy</code>, <code>dw</code>, and <code>dh</code> determine the region\nof the canvas to copy into. <code>(dx, dy)</code> is the top-left corner of the\nregion. <code>dw</code> and <code>dh</code> are the region's width and height.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Use the mountains as the background.\n  background(img);\n\n  // Copy a region of pixels to another spot.\n  copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\n\n  // Outline the copied region.\n  stroke(255);\n  noFill();\n  square(7, 22, 10);\n\n  describe('An image of a mountain landscape. A square region is outlined in white. A larger square contains a pixelated view of the outlined region.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "srcImage",
              "description": "source image.",
              "type": "p5.Image|p5.Element"
            },
            {
              "name": "sx",
              "description": "x-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "y-coordinate of the source's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "source image width.",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "source image height.",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "x-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "y-coordinate of the destination's upper-left corner.",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "destination image width.",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "destination image height.",
              "type": "Integer"
            }
          ]
        },
        {
          "params": [
            {
              "name": "sx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "sh",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dx",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dy",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dw",
              "description": "",
              "type": "Integer"
            },
            {
              "name": "dh",
              "description": "",
              "type": "Integer"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "loop",
      "file": "src/scripts/parsers/in/p5.js/src/core/structure.js",
      "line": 198,
      "itemtype": "method",
      "description": "<p>Resumes the draw loop after <a href=\"#/p5/noLoop\">noLoop()</a> has been\ncalled.</p>\n<p>By default, <a href=\"#/p5/draw\">draw()</a> tries to run 60 times per\nsecond. Calling <a href=\"#/p5/noLoop\">noLoop()</a> stops\n<a href=\"#/p5/draw\">draw()</a> from repeating. The draw loop can be\nrestarted by calling <code>loop()</code>.</p>\n<p>The <a href=\"#/p5/isLooping\">isLooping()</a> function can be used to check\nwhether a sketch is looping, as in <code>isLooping() === true</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Turn off the draw loop.\n  noLoop();\n\n  describe(\n    'A white half-circle on the left edge of a gray square. The circle starts moving to the right when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's x-coordinate.\n  let x = frameCount;\n\n  // Draw the circle.\n  circle(x, 50, 20);\n}\n\n// Resume the draw loop when the user double-clicks.\nfunction doubleClicked() {\n  loop();\n}",
        "let startButton;\nlet stopButton;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create the button elements and place them\n  // beneath the canvas.\n  startButton = createButton('▶');\n  startButton.position(0, 100);\n  startButton.size(50, 20);\n  stopButton = createButton('◾');\n  stopButton.position(50, 100);\n  stopButton.size(50, 20);\n\n  // Set functions to call when the buttons are pressed.\n  startButton.mousePressed(loop);\n  stopButton.mousePressed(noLoop);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe(\n    'A white circle moves randomly on a gray background. Play and stop buttons are shown beneath the canvas. The circle stops or starts moving when the user presses a button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the circle's coordinates.\n  let x = random(0, 100);\n  let y = random(0, 100);\n\n  // Draw the circle.\n  // Normally, the circle would move from left to right.\n  circle(x, y, 20);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "dist",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 199,
      "itemtype": "method",
      "description": "<p>Calculates the distance between two points.</p>\n<p>The version of <code>dist()</code> with four parameters calculates distance in two\ndimensions.</p>\n<p>The version of <code>dist()</code> with six parameters calculates distance in three\ndimensions.</p>\n<p>Use <a href=\"#/p5.Vector/dist\">p5.Vector.dist()</a> to calculate the\ndistance between two <a href=\"#/p5.Vector\">p5.Vector</a> objects.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the coordinates.\n  let x1 = 10;\n  let y1 = 50;\n  let x2 = 90;\n  let y2 = 50;\n\n  // Draw the points and a line connecting them.\n  line(x1, y1, x2, y2);\n  strokeWeight(5);\n  point(x1, y1);\n  point(x2, y2);\n\n  // Calculate the distance.\n  let d = dist(x1, y1, x2, y2);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the distance.\n  text(d, 43, 40);\n\n  describe('Two dots connected by a horizontal line. The number 80 is written above the center of the line.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "x-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "y-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "x-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "y-coordinate of the second point.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "distance between the two points.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "x1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z1",
              "description": "z-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z2",
              "description": "z-coordinate of the second point.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "distance between the two points.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "distance between the two points.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "asin",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 203,
      "itemtype": "method",
      "description": "<p>Calculates the arc sine of a number.</p>\n<p><code>asin()</code> is the inverse of <a href=\"#/p5/sin\">sin()</a>. It expects input\nvalues in the range of -1 to 1. By default, <code>asin()</code> returns values in the\nrange -π ÷ 2 (about -1.57) to π ÷ 2 (about 1.57). If\nthe <a href=\"#/p5/angleMode\">angleMode()</a> is <code>DEGREES</code> then values are\nreturned in the range -90 to 90.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate sin() and asin() values.\n  let a = PI / 3;\n  let s = sin(a);\n  let as = asin(s);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(s, 3)}`, 35, 50);\n  text(`${round(as, 3)}`, 35, 75);\n\n  describe('The numbers 1.047, 0.866, and 1.047 written on separate rows.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate sin() and asin() values.\n  let a = PI + PI / 3;\n  let s = sin(a);\n  let as = asin(s);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(s, 3)}`, 35, 50);\n  text(`${round(as, 3)}`, 35, 75);\n\n  describe('The numbers 4.189, -0.866, and -1.047 written on separate rows.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "value whose arc sine is to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "arc sine of the given value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "arc sine of the given value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "millis",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 203,
      "itemtype": "method",
      "description": "<p>Returns the number of milliseconds since a sketch started running.</p>\n<p><code>millis()</code> keeps track of how long a sketch has been running in\nmilliseconds (thousandths of a second). This information is often\nhelpful for timing events and animations.</p>\n<p>If a sketch has a\n<a href=\"#/p5/setup\">setup()</a> function, then <code>millis()</code> begins tracking\ntime before the code in <a href=\"#/p5/setup\">setup()</a> runs.  If a\nsketch includes asynchronous loading using <code>async</code>/<code>await</code>, then\n<code>millis()</code> begins tracking time as soon as the asynchronous code\nstarts running.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the number of milliseconds the sketch has run.\n  let ms = millis();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(10);\n  textFont('Courier New');\n\n  // Display how long it took setup() to be called.\n  text(`Startup time: ${round(ms, 2)} ms`, 5, 50, 90);\n\n  describe(\n    `The text 'Startup time: ${round(ms, 2)} ms' written in black on a gray background.`\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('The text \"Running time: S sec\" written in black on a gray background. The number S increases as the sketch runs.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get the number of seconds the sketch has run.\n  let s = millis() / 1000;\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(10);\n  textFont('Courier New');\n\n  // Display how long the sketch has run.\n  text(`Running time: ${nf(s, 1, 1)} sec`, 5, 50, 90);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle oscillates left and right on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get the number of seconds the sketch has run.\n  let s = millis() / 1000;\n\n  // Calculate an x-coordinate.\n  let x = 30 * sin(s) + 50;\n\n  // Draw the circle.\n  circle(x, 50, 30);\n}",
        "async function setup() {\n  // Load the GeoJSON.\n  await loadJSON('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the number of milliseconds the sketch has run.\n  let ms = millis();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(11);\n\n  // Display how long it took to load the data.\n  text(`It took ${round(ms, 2)} ms to load the data`, 5, 50, 100);\n\n  describe(\n    `The text \"It took ${round(ms, 2)} ms to load the data\" written in black on a gray background.`\n  );\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "number of milliseconds since starting the sketch.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "number of milliseconds since starting the sketch.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "nfc",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 215,
      "itemtype": "method",
      "description": "<p>Converts a <code>Number</code> into a <code>String</code> with commas to mark units of 1,000.</p>\n<p><code>nfc()</code> converts numbers such as 12345 into strings formatted with commas\nto mark the thousands place, as in <code>'12,345'</code>.</p>\n<p>The first parameter, <code>num</code>, is the number to convert to a string. For\nexample, calling <code>nfc(12345)</code> returns the string <code>'12,345'</code>.</p>\n<p>The second parameter, <code>right</code>, is optional. If a number is passed, as in\n<code>nfc(12345, 1)</code>, it sets the minimum number of digits to include to the\nright of the decimal place. If <code>right</code> is smaller than the number of\ndecimal places in <code>num</code>, then <code>num</code> will be rounded to the given number of\ndecimal places. For example, calling <code>nfc(12345.67, 1)</code> returns the string\n<code>'12,345.7'</code>. If <code>right</code> is larger than the number of decimal places in\n<code>num</code>, then unused decimal places will be set to 0. For example, calling\n<code>nfc(12345.67, 3)</code> returns the string <code>'12,345.670'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(16);\n\n  // Create a number variable.\n  let number = 12345;\n\n  // Display the number as a string.\n  let commas = nfc(number);\n  text(commas, 15, 33);\n\n  // Display the number with four digits\n  // to the left of the decimal.\n  let decimals = nfc(number, 2);\n  text(decimals, 15, 67);\n\n  describe(\n    'The numbers \"12,345\" and \"12,345.00\" written on separate lines. The text is in black on a gray background.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let numbers = [12345, 6789];\n\n  // Convert the numbers to formatted strings.\n  let formatted = nfc(numbers);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < formatted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 33;\n\n    // Display the original and formatted numbers.\n    text(`${numbers[i]} : ${formatted[i]}`, 50, y);\n  }\n\n  describe(\n    'The text \"12345 : 12,345\" and \"6789 : 6,789\" written on two separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "num",
              "description": "number to format.",
              "type": "Number|String"
            },
            {
              "name": "right",
              "description": "number of digits to include to the right\nof the decimal point.",
              "optional": 1,
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to format.",
              "type": "Number[]"
            },
            {
              "name": "right",
              "description": "",
              "optional": 1,
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "formatted strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "formatted string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "applyMatrix",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 216,
      "itemtype": "method",
      "description": "<p>Applies a transformation matrix to the coordinate system.</p>\n<p>Transformations such as\n<a href=\"#/p5/translate\">translate()</a>,\n<a href=\"#/p5/rotate\">rotate()</a>, and\n<a href=\"#/p5/scale\">scale()</a>\nuse matrix-vector multiplication behind the scenes. A table of numbers,\ncalled a matrix, encodes each transformation. The values in the matrix\nthen multiply each point on the canvas, which is represented by a vector.</p>\n<p><code>applyMatrix()</code> allows for many transformations to be applied at once. See\n<a href=\"https://en.wikipedia.org/wiki/Transformation_matrix\" target=\"_blank\">Wikipedia</a>\nand <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Matrix_math_for_the_web\" target=\"_blank\">MDN</a>\nfor more details about transformations.</p>\n<p>There are two ways to call <code>applyMatrix()</code> in two and three dimensions.</p>\n<p>In 2D mode, the parameters <code>a</code>, <code>b</code>, <code>c</code>, <code>d</code>, <code>e</code>, and <code>f</code>, correspond to\nelements in the following transformation matrix:</p>\n<img style=\"max-width: 150px\" src=\"assets/transformation-matrix.png\"\nalt=\"The transformation matrix used when applyMatrix is called in 2D mode.\"/><p>The numbers can be passed individually, as in\n<code>applyMatrix(2, 0, 0, 0, 2, 0)</code>. They can also be passed in an array, as in\n<code>applyMatrix([2, 0, 0, 0, 2, 0])</code>.</p>\n<p>In 3D mode, the parameters <code>a</code>, <code>b</code>, <code>c</code>, <code>d</code>, <code>e</code>, <code>f</code>, <code>g</code>, <code>h</code>, <code>i</code>,\n<code>j</code>, <code>k</code>, <code>l</code>, <code>m</code>, <code>n</code>, <code>o</code>, and <code>p</code> correspond to elements in the\nfollowing transformation matrix:</p>\n<p><img style=\"max-width: 300px\" src=\"assets/transformation-matrix-4-4.png\"\nalt=\"The transformation matrix used when applyMatrix is called in 3D mode.\"/></p>\n<p>The numbers can be passed individually, as in\n<code>applyMatrix(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)</code>. They can\nalso be passed in an array, as in\n<code>applyMatrix([2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1])</code>.</p>\n<p>By default, transformations accumulate. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>applyMatrix()</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't\ncause shapes to transform continuously.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  applyMatrix(1, 0, 0, 1, 50, 50);\n\n  // Draw the circle at coordinates (0, 0).\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  let m = [1, 0, 0, 1, 50, 50];\n  applyMatrix(m);\n\n  // Draw the circle at coordinates (0, 0).\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/8 turn.\n  let angle = QUARTER_PI;\n  let ca = cos(angle);\n  let sa = sin(angle);\n  applyMatrix(ca, sa, -sa, ca, 0, 0);\n\n  // Draw a rectangle at coordinates (50, 0).\n  rect(50, 0, 40, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a square at (30, 20).\n  square(30, 20, 40);\n\n  // Scale the coordinate system by a factor of 0.5.\n  applyMatrix(0.5, 0, 0, 0.5, 0, 0);\n\n  // Draw a square at (30, 20).\n  // It appears at (15, 10) after scaling.\n  square(30, 20, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white quadrilateral on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the shear factor.\n  let angle = QUARTER_PI;\n  let shearFactor = 1 / tan(HALF_PI - angle);\n\n  // Shear the coordinate system along the x-axis.\n  applyMatrix(1, 0, shearFactor, 1, 0, 0);\n\n  // Draw the square.\n  square(0, 0, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube rotates slowly against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system a little more each frame.\n  let angle = frameCount * 0.01;\n  let ca = cos(angle);\n  let sa = sin(angle);\n  applyMatrix(ca, 0, sa, 0, 0, 1, 0, 0, -sa, 0, ca, 0, 0, 0, 0, 1);\n\n  // Draw a box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "arr",
              "description": "an array containing the elements of the transformation matrix. Its length should be either 6 (2D) or 16 (3D).",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "a",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "e",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "f",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "a",
              "description": "",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "",
              "type": "Number"
            },
            {
              "name": "e",
              "description": "",
              "type": "Number"
            },
            {
              "name": "f",
              "description": "",
              "type": "Number"
            },
            {
              "name": "g",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "i",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "j",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "k",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "l",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "m",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "n",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "o",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            },
            {
              "name": "p",
              "description": "an element of the transformation matrix.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "resizeCanvas",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 229,
      "itemtype": "method",
      "description": "<p>Resizes the canvas to a given width and height.</p>\n<p><code>resizeCanvas()</code> immediately clears the canvas and calls\n<a href=\"#/p5/redraw\">redraw()</a>. It's common to call <code>resizeCanvas()</code>\nwithin the body of <a href=\"#/p5/windowResized\">windowResized()</a> like\nso:</p>\n<pre><code class=\"language-js\">function windowResized() {\n  resizeCanvas(windowWidth, windowHeight);\n}</code></pre><p>The first two parameters, <code>width</code> and <code>height</code>, set the dimensions of the\ncanvas. They also the values of the <a href=\"#/p5/width\">width</a> and\n<a href=\"#/p5/height\">height</a> system variables. For example, calling\n<code>resizeCanvas(300, 500)</code> resizes the canvas to 300×500 pixels, then sets\n<a href=\"#/p5/width\">width</a> to 300 and\n<a href=\"#/p5/height\">height</a> 500.</p>\n<p>The third parameter, <code>noRedraw</code>, is optional. If <code>true</code> is passed, as in\n<code>resizeCanvas(300, 500, true)</code>, then the canvas will be canvas to 300×500\npixels but the <a href=\"#/p5/redraw\">redraw()</a> function won't be called\nimmediately. By default, <a href=\"#/p5/redraw\">redraw()</a> is called\nimmediately when <code>resizeCanvas()</code> finishes executing.</p>\n",
      "example": [
        "// Double-click to resize the canvas.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle drawn on a gray background. The canvas shrinks by half the first time the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a circle at the center of the canvas.\n  circle(width / 2, height / 2, 20);\n}\n\n// Resize the canvas when the user double-clicks.\nfunction doubleClicked() {\n  resizeCanvas(50, 50);\n}",
        "// Resize the web browser to change the canvas size.\n\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n\n  describe('A white circle drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a circle at the center of the canvas.\n  circle(width / 2, height / 2, 20);\n}\n\n// Always resize the canvas to fill the browser window.\nfunction windowResized() {\n  resizeCanvas(windowWidth, windowHeight);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the canvas.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the canvas.",
              "type": "Number"
            },
            {
              "name": "noRedraw",
              "description": "whether to delay calling\n<a href=\"#/p5/redraw\">redraw()</a>. Defaults\nto <code>false</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "push",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 1549,
      "itemtype": "method",
      "description": "<p>Begins a drawing group that contains its own styles and transformations.</p>\n<p>By default, styles such as <a href=\"#/p5/fill\">fill()</a> and\ntransformations such as <a href=\"#/p5/rotate\">rotate()</a> are applied to\nall drawing that follows. The <code>push()</code> and <a href=\"#/p5/pop\">pop()</a>\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:</p>\n<pre><code class=\"language-js\">// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);</code></pre><p>In the code snippet above, the bug's position isn't affected by\n<code>translate(mouseX, mouseY)</code> because that transformation is contained\nbetween <code>push()</code> and <a href=\"#/p5/pop\">pop()</a>. The bug moves around\nthe entire canvas as expected.</p>\n<p>Note: <code>push()</code> and <a href=\"#/p5/pop\">pop()</a> are always called as a\npair. Both functions are required to begin and end a drawing group.</p>\n<p><code>push()</code> and <a href=\"#/p5/pop\">pop()</a> can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:</p>\n<pre><code class=\"language-js\">// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);</code></pre><p>In this version, the code to draw each eye is contained between its own\n<code>push()</code> and <a href=\"#/p5/pop\">pop()</a> functions. Doing so makes it\neasier to add details in the correct part of a drawing.</p>\n<p><code>push()</code> and <a href=\"#/p5/pop\">pop()</a> contain the effects of the\nfollowing functions:</p>\n<ul><li><a href=\"#/p5/fill\">fill()</a></li><li><a href=\"#/p5/noFill\">noFill()</a></li><li><a href=\"#/p5/noStroke\">noStroke()</a></li><li><a href=\"#/p5/stroke\">stroke()</a></li><li><a href=\"#/p5/tint\">tint()</a></li><li><a href=\"#/p5/noTint\">noTint()</a></li><li><a href=\"#/p5/strokeWeight\">strokeWeight()</a></li><li><a href=\"#/p5/strokeCap\">strokeCap()</a></li><li><a href=\"#/p5/strokeJoin\">strokeJoin()</a></li><li><a href=\"#/p5/imageMode\">imageMode()</a></li><li><a href=\"#/p5/rectMode\">rectMode()</a></li><li><a href=\"#/p5/ellipseMode\">ellipseMode()</a></li><li><a href=\"#/p5/colorMode\">colorMode()</a></li><li><a href=\"#/p5/textAlign\">textAlign()</a></li><li><a href=\"#/p5/textFont\">textFont()</a></li><li><a href=\"#/p5/textSize\">textSize()</a></li><li><a href=\"#/p5/textLeading\">textLeading()</a></li><li><a href=\"#/p5/applyMatrix\">applyMatrix()</a></li><li><a href=\"#/p5/resetMatrix\">resetMatrix()</a></li><li><a href=\"#/p5/rotate\">rotate()</a></li><li><a href=\"#/p5/scale\">scale()</a></li><li><a href=\"#/p5/shearX\">shearX()</a></li><li><a href=\"#/p5/shearY\">shearY()</a></li><li><a href=\"#/p5/translate\">translate()</a></li></ul><p>In WebGL mode, <code>push()</code> and <a href=\"#/p5/pop\">pop()</a> contain the\neffects of a few additional styles:</p>\n<ul><li><a href=\"#/p5/setCamera\">setCamera()</a></li><li><a href=\"#/p5/ambientLight\">ambientLight()</a></li><li><a href=\"#/p5/directionalLight\">directionalLight()</a></li><li><a href=\"#/p5/pointLight\">pointLight()</a> <a href=\"#/p5/texture\">texture()</a></li><li><a href=\"#/p5/specularMaterial\">specularMaterial()</a></li><li><a href=\"#/p5/shininess\">shininess()</a></li><li><a href=\"#/p5/normalMaterial\">normalMaterial()</a></li><li><a href=\"#/p5/shader\">shader()</a></li></ul>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the left circle.\n  circle(25, 50, 20);\n\n  // Begin the drawing group.\n  push();\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Style the circle.\n  strokeWeight(5);\n  stroke('royalblue');\n  fill('orange');\n\n  // Draw the circle.\n  circle(0, 0, 20);\n\n  // End the drawing group.\n  pop();\n\n  // Draw the right circle.\n  circle(75, 50, 20);\n\n  describe(\n    'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(24);\n\n  describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Begin the drawing group.\n  push();\n\n  // Translate the origin to the mouse's position.\n  translate(mouseX, mouseY);\n\n  // Style the face.\n  noStroke();\n  fill('green');\n\n  // Draw a face.\n  circle(0, 0, 60);\n\n  // Style the eyes.\n  fill('white');\n\n  // Draw the left eye.\n  push();\n  translate(-20, -20);\n  ellipse(0, 0, 30, 20);\n  fill('black');\n  circle(0, 0, 8);\n  pop();\n\n  // Draw the right eye.\n  push();\n  translate(20, -20);\n  ellipse(0, 0, 30, 20);\n  fill('black');\n  circle(0, 0, 8);\n  pop();\n\n  // End the drawing group.\n  pop();\n\n  // Draw a bug.\n  let x = random(0, 100);\n  let y = random(0, 100);\n  text('🦟', x, y);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the red sphere.\n  push();\n  translate(-25, 0, 0);\n  noStroke();\n  directionalLight(255, 0, 0, 0, 0, -1);\n  sphere(20);\n  pop();\n\n  // Draw the blue sphere.\n  push();\n  translate(25, 0, 0);\n  strokeWeight(0.3);\n  stroke(0, 0, 255);\n  noFill();\n  sphere(20);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "noise",
      "file": "src/scripts/parsers/in/p5.js/src/math/noise.js",
      "line": 232,
      "itemtype": "method",
      "description": "<p>Returns random numbers that can be tuned to feel organic.</p>\n<p>Values returned by <a href=\"#/p5/random\">random()</a> and\n<a href=\"#/p5/randomGaussian\">randomGaussian()</a> can change by large\namounts between function calls. By contrast, values returned by <code>noise()</code>\ncan be made \"smooth\". Calls to <code>noise()</code> with similar inputs will produce\nsimilar outputs. <code>noise()</code> is used to create textures, motion, shapes,\nterrains, and so on. Ken Perlin invented <code>noise()</code> while animating the\noriginal <em>Tron</em> film in the 1980s.</p>\n<p><code>noise()</code> always returns values between 0 and 1. It returns the same value\nfor a given input while a sketch is running. <code>noise()</code> produces different\nresults each time a sketch runs. The\n<a href=\"#/p5/noiseSeed\">noiseSeed()</a> function can be used to generate\nthe same sequence of Perlin noise values each time a sketch runs.</p>\n<p>The character of the noise can be adjusted in two ways. The first way is to\nscale the inputs. <code>noise()</code> interprets inputs as coordinates. The sequence\nof noise values will be smoother when the input coordinates are closer. The\nsecond way is to use the <a href=\"#/p5/noiseDetail\">noiseDetail()</a>\nfunction.</p>\n<p>The version of <code>noise()</code> with one parameter computes noise values in one\ndimension. This dimension can be thought of as space, as in <code>noise(x)</code>, or\ntime, as in <code>noise(t)</code>.</p>\n<p>The version of <code>noise()</code> with two parameters computes noise values in two\ndimensions. These dimensions can be thought of as space, as in\n<code>noise(x, y)</code>, or space and time, as in <code>noise(x, t)</code>.</p>\n<p>The version of <code>noise()</code> with three parameters computes noise values in\nthree dimensions. These dimensions can be thought of as space, as in\n<code>noise(x, y, z)</code>, or space and time, as in <code>noise(x, y, t)</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black dot moves randomly on a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the coordinates.\n  let x = 100 * noise(0.005 * frameCount);\n  let y = 100 * noise(0.005 * frameCount + 10000);\n\n  // Draw the point.\n  strokeWeight(5);\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black dot moves randomly on a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the noise level and scale.\n  let noiseLevel = 100;\n  let noiseScale = 0.005;\n\n  // Scale the input coordinate.\n  let nt = noiseScale * frameCount;\n\n  // Compute the noise values.\n  let x = noiseLevel * noise(nt);\n  let y = noiseLevel * noise(nt + 10000);\n\n  // Draw the point.\n  strokeWeight(5);\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A hilly terrain drawn in gray against a black sky.');\n}\n\nfunction draw() {\n  // Set the noise level and scale.\n  let noiseLevel = 100;\n  let noiseScale = 0.02;\n\n  // Scale the input coordinate.\n  let x = frameCount;\n  let nx = noiseScale * x;\n\n  // Compute the noise value.\n  let y = noiseLevel * noise(nx);\n\n  // Draw the line.\n  line(x, 0, x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A calm sea drawn in gray against a black sky.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the noise level and scale.\n  let noiseLevel = 100;\n  let noiseScale = 0.002;\n\n  // Iterate from left to right.\n  for (let x = 0; x < 100; x += 1) {\n    // Scale the input coordinates.\n    let nx = noiseScale * x;\n    let nt = noiseScale * frameCount;\n\n    // Compute the noise value.\n    let y = noiseLevel * noise(nx, nt);\n\n    // Draw the line.\n    line(x, 0, x, y);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the noise level and scale.\n  let noiseLevel = 255;\n  let noiseScale = 0.01;\n\n  // Iterate from top to bottom.\n  for (let y = 0; y < 100; y += 1) {\n    // Iterate from left to right.\n    for (let x = 0; x < 100; x += 1) {\n      // Scale the input coordinates.\n      let nx = noiseScale * x;\n      let ny = noiseScale * y;\n\n      // Compute the noise value.\n      let c = noiseLevel * noise(nx, ny);\n\n      // Draw the point.\n      stroke(c);\n      point(x, y);\n    }\n  }\n\n  describe('A gray cloudy pattern.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray cloudy pattern that changes.');\n}\n\nfunction draw() {\n  // Set the noise level and scale.\n  let noiseLevel = 255;\n  let noiseScale = 0.009;\n\n  // Iterate from top to bottom.\n  for (let y = 0; y < 100; y += 1) {\n    // Iterate from left to right.\n    for (let x = 0; x < width; x += 1) {\n      // Scale the input coordinates.\n      let nx = noiseScale * x;\n      let ny = noiseScale * y;\n      let nt = noiseScale * frameCount;\n\n      // Compute the noise value.\n      let c = noiseLevel * noise(nx, ny, nt);\n\n      // Draw the point.\n      stroke(c);\n      point(x, y);\n    }\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate in noise space.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate in noise space.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate in noise space.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "Perlin noise value at specified coordinates.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "Perlin noise value at specified coordinates.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Noise"
    },
    {
      "name": "describeElement",
      "file": "src/scripts/parsers/in/p5.js/src/accessibility/describe.js",
      "line": 233,
      "itemtype": "method",
      "description": "<p>Creates a screen reader-accessible description of elements in the canvas.</p>\n<p>Elements are shapes or groups of shapes that create meaning together. For\nexample, a few overlapping circles could make an \"eye\" element.</p>\n<p>The first parameter, <code>name</code>, is the name of the element.</p>\n<p>The second parameter, <code>text</code>, is the description of the element.</p>\n<p>The third parameter, <code>display</code>, is optional. It determines how the\ndescription is displayed. If <code>LABEL</code> is passed, as in\n<code>describe('A description.', LABEL)</code>, the description will be visible in\na div element next to the canvas. Using <code>LABEL</code> creates unhelpful\nduplicates for screen readers. Only use <code>LABEL</code> during development. If\n<code>FALLBACK</code> is passed, as in <code>describe('A description.', FALLBACK)</code>, the\ndescription will only be visible to screen readers. This is the default\nmode.</p>\n<p>Read\n<a href=\"/learn/accessible-labels.html\">Writing accessible canvas descriptions</a>\nto learn more about making sketches accessible.</p>\n",
      "example": [
        "function setup() {\n  background('pink');\n\n  // Describe the first element\n  // and draw it.\n  describeElement('Circle', 'A yellow circle in the top-left corner.');\n  noStroke();\n  fill('yellow');\n  circle(25, 25, 40);\n\n  // Describe the second element\n  // and draw it.\n  describeElement('Heart', 'A red heart in the bottom-right corner.');\n  fill('red');\n  circle(66.6, 66.6, 20);\n  circle(83.2, 66.6, 20);\n  triangle(91.2, 72.6, 75, 95, 58.6, 72.6);\n\n  // Add a general description of the canvas.\n  describe('A red heart and yellow circle over a pink background.');\n}",
        "function setup() {\n  background('pink');\n\n  // Describe the first element\n  // and draw it. Display the\n  // description for debugging.\n  describeElement('Circle', 'A yellow circle in the top-left corner.', LABEL);\n  noStroke();\n  fill('yellow');\n  circle(25, 25, 40);\n\n  // Describe the second element\n  // and draw it. Display the\n  // description for debugging.\n  describeElement('Heart', 'A red heart in the bottom-right corner.', LABEL);\n  fill('red');\n  circle(66.6, 66.6, 20);\n  circle(83.2, 66.6, 20);\n  triangle(91.2, 72.6, 75, 95, 58.6, 72.6);\n\n  // Add a general description of the canvas.\n  describe('A red heart and yellow circle over a pink background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the element.",
              "type": "String"
            },
            {
              "name": "text",
              "description": "description of the element.",
              "type": "String"
            },
            {
              "name": "display",
              "description": "either LABEL or FALLBACK.",
              "optional": 1,
              "type": "FALLBACK|LABEL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "saveGif",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 235,
      "itemtype": "method",
      "description": "<p>Generates a gif from a sketch and saves it to a file.</p>\n<p><code>saveGif()</code> may be called in <a href=\"#/p5/setup\">setup()</a> or at any\npoint while a sketch is running.</p>\n<p>The first parameter, <code>fileName</code>, sets the gif's file name.</p>\n<p>The second parameter, <code>duration</code>, sets the gif's duration in seconds.</p>\n<p>The third parameter, <code>options</code>, is optional. If an object is passed,\n<code>saveGif()</code> will use its properties to customize the gif. <code>saveGif()</code>\nrecognizes the properties <code>delay</code>, <code>units</code>, <code>silent</code>,\n<code>notificationDuration</code>, and <code>notificationID</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the circle.\n  let c = frameCount % 255;\n  fill(c);\n\n  // Display the circle.\n  circle(50, 50, 25);\n}\n\n// Save a 5-second gif when the user presses the 's' key.\nfunction keyPressed() {\n  if (key === 's') {\n    saveGif('mySketch', 5);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A circle drawn in the middle of a gray square. The circle changes color from black to white, then repeats.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the circle.\n  let c = frameCount % 255;\n  fill(c);\n\n  // Display the circle.\n  circle(50, 50, 25);\n}\n\n// Save a 5-second gif when the user presses the 's' key.\n// Wait 1 second after the key press before recording.\nfunction keyPressed() {\n  if (key === 's') {\n    saveGif('mySketch', 5, { delay: 1 });\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filename",
              "description": "file name of gif.",
              "type": "String"
            },
            {
              "name": "duration",
              "description": "duration in seconds to capture from the sketch.",
              "type": "Number"
            },
            {
              "name": "options",
              "description": "an object that can contain five more properties:",
              "optional": 1,
              "type": "Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "month",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 238,
      "itemtype": "method",
      "description": "Returns the current month as a number from 1–12.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current month.\n  let m = month();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the month.\n  text(`Current month: ${m}`, 10, 50, 80);\n\n  describe(`The text 'Current month: ${m}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current month between 1 and 12.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current month between 1 and 12.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "random",
      "file": "src/scripts/parsers/in/p5.js/src/math/random.js",
      "line": 240,
      "itemtype": "method",
      "description": "<p>Returns a random number or a random element from an array.</p>\n<p><code>random()</code> follows uniform distribution, which means that all outcomes are\nequally likely. When <code>random()</code> is used to generate numbers, all\nnumbers in the output range are equally likely to be returned. When\n<code>random()</code> is used to select elements from an array, all elements are\nequally likely to be chosen.</p>\n<p>By default, <code>random()</code> produces different results each time a sketch runs.\nThe <a href=\"#/p5/randomSeed\">randomSeed()</a> function can be used to\ngenerate the same sequence of numbers or choices each time a sketch runs.</p>\n<p>The version of <code>random()</code> with no parameters returns a random number from 0\nup to but not including 1.</p>\n<p>The version of <code>random()</code> with one parameter works one of two ways. If the\nargument passed is a number, <code>random()</code> returns a random number from 0 up\nto but not including the number. For example, calling <code>random(5)</code> returns\nvalues between 0 and 5. If the argument passed is an array, <code>random()</code>\nreturns a random element from that array. For example, calling\n<code>random(['🦁', '🐯', '🐻'])</code> returns either a lion, tiger, or bear emoji.</p>\n<p>The version of <code>random()</code> with two parameters returns a random number from\na given range. The arguments passed set the range's lower and upper bounds.\nFor example, calling <code>random(-5, 10.2)</code> returns values from -5 up to but\nnot including 10.2.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get random coordinates between 0 and 100.\n  let x = random(0, 100);\n  let y = random(0, 100);\n\n  // Draw a point.\n  strokeWeight(5);\n  point(x, y);\n\n  describe('A black dot appears in a random position on a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get random coordinates between 0 and 100.\n  let x = random(100);\n  let y = random(100);\n\n  // Draw the point.\n  strokeWeight(5);\n  point(x, y);\n\n  describe('A black dot appears in a random position on a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of emoji strings.\n  let animals = ['🦁', '🐯', '🐻'];\n\n  // Choose a random element from the array.\n  let choice = random(animals);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(20);\n\n  // Display the emoji.\n  text(choice, 50, 50);\n\n  describe('An animal face is displayed at random. Either a lion, tiger, or bear.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe('A black dot moves around randomly on a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get random coordinates between 0 and 100.\n  let x = random(100);\n  let y = random(100);\n\n  // Draw the point.\n  strokeWeight(5);\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(5);\n\n  describe('A black dot moves around randomly in the middle of a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get random coordinates between 45 and 55.\n  let x = random(45, 55);\n  let y = random(45, 55);\n\n  // Draw the point.\n  strokeWeight(5);\n  point(x, y);\n}",
        "let x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A black dot moves around randomly leaving a trail.');\n}\n\nfunction draw() {\n  // Update x and y randomly.\n  x += random(-1, 1);\n  y += random(-1, 1);\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "min",
              "description": "lower bound (inclusive).",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "max",
              "description": "upper bound (exclusive).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "random number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "choices",
              "description": "array to choose from.",
              "type": "Array"
            }
          ],
          "return": {
            "description": "random element from the array."
          }
        }
      ],
      "return": {
        "description": "random number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Random"
    },
    {
      "name": "isLooping",
      "file": "src/scripts/parsers/in/p5.js/src/core/structure.js",
      "line": 244,
      "itemtype": "method",
      "description": "<p>Returns <code>true</code> if the draw loop is running and <code>false</code> if not.</p>\n<p>By default, <a href=\"#/p5/draw\">draw()</a> tries to run 60 times per\nsecond. Calling <a href=\"#/p5/noLoop\">noLoop()</a> stops\n<a href=\"#/p5/draw\">draw()</a> from repeating. The draw loop can be\nrestarted by calling <a href=\"#/p5/loop\">loop()</a>.</p>\n<p>The <code>isLooping()</code> function can be used to check whether a sketch is\nlooping, as in <code>isLooping() === true</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle drawn against a gray background. When the user double-clicks, the circle stops or resumes following the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the circle at the mouse's position.\n  circle(mouseX, mouseY, 20);\n}\n\n// Toggle the draw loop when the user double-clicks.\nfunction doubleClicked() {\n  if (isLooping() === true) {\n    noLoop();\n  } else {\n    loop();\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "",
            "type": "boolean"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "boolean"
      },
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "gridOutput",
      "file": "src/scripts/parsers/in/p5.js/src/accessibility/outputs.js",
      "line": 247,
      "itemtype": "method",
      "description": "<p>Creates a screen reader-accessible description of shapes on the canvas.</p>\n<p><code>gridOutput()</code> adds a general description, table of shapes, and list of\nshapes to the web page. The general description includes the canvas size,\ncanvas color, and number of shapes. For example,\n<code>gray canvas, 100 by 100 pixels, contains 2 shapes:  1 circle 1 square</code>.</p>\n<p><code>gridOutput()</code> uses its table of shapes as a grid. Each shape in the grid\nis placed in a cell whose row and column correspond to the shape's location\non the canvas. The grid cells describe the color and type of shape at that\nlocation. For example, <code>red circle</code>. These descriptions can be selected\nindividually to get more details. This is different from\n<a href=\"#/p5/textOutput\">textOutput()</a>, which uses its table as a list.</p>\n<p>A list of shapes follows the table. The list describes the color, type,\nlocation, and area of each shape. For example,\n<code>red circle, location = middle, area = 3 %</code>.</p>\n<p>The <code>display</code> parameter is optional. It determines how the description is\ndisplayed. If <code>LABEL</code> is passed, as in <code>gridOutput(LABEL)</code>, the description\nwill be visible in a div element next to the canvas. Using <code>LABEL</code> creates\nunhelpful duplicates for screen readers. Only use <code>LABEL</code> during\ndevelopment. If <code>FALLBACK</code> is passed, as in <code>gridOutput(FALLBACK)</code>, the\ndescription will only be visible to screen readers. This is the default\nmode.</p>\n<p>Read\n<a href=\"/learn/accessible-labels.html\">Writing accessible canvas descriptions</a>\nto learn more about making sketches accessible.</p>\n",
      "example": [
        "function setup() {\n  // Add the grid description.\n  gridOutput();\n\n  // Draw a couple of shapes.\n  background(200);\n  fill(255, 0, 0);\n  circle(20, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle and a blue square on a gray background.');\n}",
        "function setup() {\n  // Add the grid description and\n  // display it for debugging.\n  gridOutput(LABEL);\n\n  // Draw a couple of shapes.\n  background(200);\n  fill(255, 0, 0);\n  circle(20, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle and a blue square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n}\n\nfunction draw() {\n  // Add the grid description.\n  gridOutput();\n\n  // Draw a moving circle.\n  background(200);\n  let x = frameCount * 0.1;\n  fill(255, 0, 0);\n  circle(x, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle moves from left to right above a blue square.');\n}",
        "function setup(){\n createCanvas(100, 100);\n}\n\nfunction draw() {\n  // Add the grid description and\n  // display it for debugging.\n  gridOutput(LABEL);\n\n  // Draw a moving circle.\n  background(200);\n  let x = frameCount * 0.1;\n  fill(255, 0, 0);\n  circle(x, 20, 20);\n  fill(0, 0, 255);\n  square(50, 50, 50);\n\n  // Add a general description of the canvas.\n  describe('A red circle moves from left to right above a blue square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "display",
              "description": "either FALLBACK or LABEL.",
              "optional": 1,
              "type": "FALLBACK|LABEL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "saveCanvas",
      "file": "src/scripts/parsers/in/p5.js/src/image/image.js",
      "line": 251,
      "itemtype": "method",
      "description": "<p>Saves the current canvas as an image.</p>\n<p>By default, <code>saveCanvas()</code> saves the canvas as a PNG image called\n<code>untitled.png</code>.</p>\n<p>The first parameter, <code>filename</code>, is optional. It's a string that sets the\nfile's name. If a file extension is included, as in\n<code>saveCanvas('drawing.png')</code>, then the image will be saved using that\nformat.</p>\n<p>The second parameter, <code>extension</code>, is also optional. It sets the files format.\nEither <code>'png'</code>, <code>'webp'</code>, or <code>'jpg'</code> can be used. For example, <code>saveCanvas('drawing', 'jpg')</code>\nsaves the canvas to a file called <code>drawing.jpg</code>.</p>\n<p>Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n  background(255);\n\n  // Save the canvas to 'untitled.png'.\n  saveCanvas();\n\n  describe('A white square.');\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(255);\n\n  // Save the canvas to 'myCanvas.jpg'.\n  saveCanvas('myCanvas.jpg');\n\n  describe('A white square.');\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(255);\n\n  // Save the canvas to 'myCanvas.jpg'.\n  saveCanvas('myCanvas', 'jpg');\n\n  describe('A white square.');\n}",
        "// META:norender\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n\n  background(255);\n\n  // Save the canvas to 'untitled.png'.\n  saveCanvas(cnv);\n\n  describe('A white square.');\n}",
        "// META:norender\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n\n  background(255);\n\n  // Save the canvas to 'myCanvas.jpg'.\n  saveCanvas(cnv, 'myCanvas.jpg');\n\n  describe('A white square.');\n}",
        "// META:norender\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n\n  background(255);\n\n  // Save the canvas to 'myCanvas.jpg'.\n  saveCanvas(cnv, 'myCanvas', 'jpg');\n\n  describe('A white square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "selectedCanvas",
              "description": "reference to a\nspecific HTML5 canvas element.",
              "type": "p5.Framebuffer|p5.Element|HTMLCanvasElement"
            },
            {
              "name": "filename",
              "description": "file name. Defaults to 'untitled'.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'png', 'webp', or 'jpg'. Defaults to 'png'.",
              "optional": 1,
              "type": "String"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filename",
              "description": "",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "extension",
              "description": "",
              "optional": 1,
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "rectMode",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 257,
      "itemtype": "method",
      "description": "<p>Changes where rectangles and squares are drawn.</p>\n<p>By default, the first two parameters of\n<a href=\"#/p5/rect\">rect()</a> and <a href=\"#/p5/square\">square()</a>,\nare the x- and y-coordinates of the shape's upper left corner. The next parameters set\nthe shape's width and height. This is the same as calling\n<code>rectMode(CORNER)</code>.</p>\n<p><code>rectMode(CORNERS)</code> also uses the first two parameters as the location of\none of the corners. The next parameters are the location of the opposite\ncorner. This mode only works for <a href=\"#/p5/rect\">rect()</a>.</p>\n<p><code>rectMode(CENTER)</code> uses the first two parameters as the x- and\ny-coordinates of the shape's center. The next parameters are its width and\nheight.</p>\n<p><code>rectMode(RADIUS)</code> also uses the first two parameters as the x- and\ny-coordinates of the shape's center. The next parameters are\nhalf of the shape's width and height.</p>\n<p>The argument passed to <code>rectMode()</code> must be written in ALL CAPS because the\nconstants <code>CENTER</code>, <code>RADIUS</code>, <code>CORNER</code>, and <code>CORNERS</code> are defined this way.\nJavaScript is a case-sensitive language.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rectMode(CORNER);\n  fill(255);\n  rect(25, 25, 50, 50);\n\n  rectMode(CORNERS);\n  fill(100);\n  rect(25, 25, 50, 50);\n\n  describe('A small gray square drawn at the top-left corner of a white square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rectMode(RADIUS);\n  fill(255);\n  rect(50, 50, 30, 30);\n\n  rectMode(CENTER);\n  fill(100);\n  rect(50, 50, 30, 30);\n\n  describe('A small gray square drawn at the center of a white square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rectMode(CORNER);\n  fill(255);\n  square(25, 25, 50);\n\n  describe('A white square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rectMode(RADIUS);\n  fill(255);\n  square(50, 50, 30);\n\n  rectMode(CENTER);\n  fill(100);\n  square(50, 50, 30);\n\n  describe('A small gray square drawn at the center of a white square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either CORNER, CORNERS, CENTER, or RADIUS",
              "type": "CENTER|RADIUS|CORNER|CORNERS"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "atan",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 258,
      "itemtype": "method",
      "description": "<p>Calculates the arc tangent of a number.</p>\n<p><code>atan()</code> is the inverse of <a href=\"#/p5/tan\">tan()</a>. It expects input\nvalues in the range of -Infinity to Infinity. By default, <code>atan()</code> returns\nvalues in the range -π ÷ 2 (about -1.57) to π ÷ 2\n(about 1.57). If the <a href=\"#/p5/angleMode\">angleMode()</a> is <code>DEGREES</code>\nthen values are returned in the range -90 to 90.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate tan() and atan() values.\n  let a = PI / 3;\n  let t = tan(a);\n  let at = atan(t);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(t, 3)}`, 35, 50);\n  text(`${round(at, 3)}`, 35, 75);\n\n  describe('The numbers 1.047, 1.732, and 1.047 written on separate rows.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate tan() and atan() values.\n  let a = PI + PI / 3;\n  let t = tan(a);\n  let at = atan(t);\n\n  // Display the values.\n  text(`${round(a, 3)}`, 35, 25);\n  text(`${round(t, 3)}`, 35, 50);\n  text(`${round(at, 3)}`, 35, 75);\n\n  describe('The numbers 4.189, 1.732, and 1.047 written on separate rows.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "value whose arc tangent is to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "arc tangent of the given value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "arc tangent of the given value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "noCanvas",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 260,
      "itemtype": "method",
      "description": "<p>Removes the default canvas.</p>\n<p>By default, a 100×100 pixels canvas is created without needing to call\n<a href=\"#/p5/createCanvas\">createCanvas()</a>. <code>noCanvas()</code> removes the\ndefault canvas for sketches that don't need it.</p>\n",
      "example": [
        "function setup() {\n  noCanvas();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "resetMatrix",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 260,
      "itemtype": "method",
      "description": "Clears all transformations applied to the coordinate system.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'Two circles drawn on a gray background. A blue circle is at the top-left and a red circle is at the bottom-right.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a blue circle at the coordinates (25, 25).\n  fill('blue');\n  circle(25, 25, 20);\n\n  // Clear all transformations.\n  // The origin is now at the top-left corner.\n  resetMatrix();\n\n  // Draw a red circle at the coordinates (25, 25).\n  fill('red');\n  circle(25, 25, 20);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "getItem",
      "file": "src/scripts/parsers/in/p5.js/src/data/local_storage.js",
      "line": 264,
      "itemtype": "method",
      "description": "<p>Returns a value in the web browser's local storage.</p>\n<p>Web browsers can save small amounts of data using the built-in\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage\" target=\"_blank\">localStorage object</a>.\nData stored in <code>localStorage</code> can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.</p>\n<p><a href=\"#/p5/storeItem\">storeItem()</a> makes it easy to store values in\n<code>localStorage</code> and <code>getItem()</code> makes it easy to retrieve them.</p>\n<p>The first parameter, <code>key</code>, is the name of the value to be stored as a\nstring.</p>\n<p>The second parameter, <code>value</code>, is the value to be retrieved a string. For\nexample, calling <code>getItem('size')</code> retrieves the value with the key <code>size</code>.</p>\n<p>Note: Sensitive data such as passwords or personal information shouldn't be\nstored in <code>localStorage</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Store the player's name.\n  storeItem('name', 'Feist');\n\n  // Store the player's score.\n  storeItem('score', 1234);\n\n  describe('The text \"Feist: 1234\" written in black on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Retrieve the name.\n  let name = getItem('name');\n\n  // Retrieve the score.\n  let score = getItem('score');\n\n  // Display the score.\n  text(`${name}: ${score}`, 50, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create an object.\n  let p = { x: 50, y: 50 };\n\n  // Store the object.\n  storeItem('position', p);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Retrieve the object.\n  let p = getItem('position');\n\n  // Draw the circle.\n  circle(p.x, p.y, 30);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Color object.\n  let c = color('deeppink');\n\n  // Store the object.\n  storeItem('color', c);\n\n  describe('A pink circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Retrieve the object.\n  let c = getItem('color');\n\n  // Style the circle.\n  fill(c);\n\n  // Draw the circle.\n  circle(50, 50, 30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "key",
              "description": "name of the value.",
              "type": "String"
            }
          ],
          "return": {
            "description": "stored item.",
            "type": "String|Number|Boolean|Object|Array"
          }
        }
      ],
      "return": {
        "description": "stored item.",
        "type": "String|Number|Boolean|Object|Array"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "LocalStorage"
    },
    {
      "name": "exp",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 267,
      "itemtype": "method",
      "description": "Calculates the value of Euler's number e (2.71828...) raised to the power\nof a number.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top-left.\n  let d = exp(1);\n  circle(10, 10, d);\n\n  // Left-center.\n  d = exp(2);\n  circle(20, 20, d);\n\n  // Right-center.\n  d = exp(3);\n  circle(40, 40, d);\n\n  // Bottom-right.\n  d = exp(4);\n  circle(80, 80, d);\n\n  describe('A series of circles that grow exponentially from top left to bottom right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots that grow exponentially from left to right.');\n}\n\nfunction draw() {\n  // Invert the y-axis.\n  scale(1, -1);\n  translate(0, -100);\n\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 0.005 * exp(x * 0.1);\n\n  // Draw a point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "exponent to raise.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "e^n",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "e^n",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "second",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 269,
      "itemtype": "method",
      "description": "Returns the current second as a number from 0–59.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current second.\n  let s = second();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the second.\n  text(`Current second: ${s}`, 10, 50, 80);\n\n  describe(`The text 'Current second: ${s}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current second between 0 and 59.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current second between 0 and 59.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "loadJSON",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 276,
      "itemtype": "method",
      "description": "<p>Loads a JSON file to create an <code>Object</code>.</p>\n<p>JavaScript Object Notation\n(<a href=\"https://developer.mozilla.org/en-US/docs/Glossary/JSON\" target=\"_blank\">JSON</a>)\nis a standard format for sending data between applications. The format is\nbased on JavaScript objects which have keys and values. JSON files store\ndata in an object with strings as keys. Values can be strings, numbers,\nBooleans, arrays, <code>null</code>, or other objects.</p>\n<p>The first parameter, <code>path</code>, is a string with the path to the file.\nPaths to local files should be relative, as in\n<code>loadJSON('assets/data.json')</code>. URLs such as\n<code>'https://example.com/data.json'</code> may be blocked due to browser security.\nThe <code>path</code> parameter can also be defined as a <code>Request</code>\nobject for more advanced usage.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is\npassed, as in <code>loadJSON('assets/data.json', handleData)</code>, then the\n<code>handleData()</code> function will be called once the data loads. The object\ncreated from the JSON data will be passed to <code>handleData()</code> as its only argument.\nThe return value of the <code>handleData()</code> function will be used as the final return\nvalue of <code>loadJSON('assets/data.json', handleData)</code>.</p>\n<p>The third parameter, <code>failureCallback</code>, is also optional. If a function is\npassed, as in <code>loadJSON('assets/data.json', handleData, handleFailure)</code>,\nthen the <code>handleFailure()</code> function will be called if an error occurs while\nloading. The <code>Error</code> object will be passed to <code>handleFailure()</code> as its only\nargument. The return value of the <code>handleFailure()</code> function will be used as the\nfinal return value of <code>loadJSON('assets/data.json', handleData, handleFailure)</code>.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n",
      "example": [
        "let myData;\n\nasync function setup() {\n  myData = await loadJSON('assets/data.json');\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the circle.\n  fill(myData.color);\n  noStroke();\n\n  // Draw the circle.\n  circle(myData.x, myData.y, myData.d);\n\n  describe('A pink circle on a gray background.');\n}",
        "let myData;\n\nasync function setup() {\n  myData = await loadJSON('assets/data.json');\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object and make it transparent.\n  let c = color(myData.color);\n  c.setAlpha(80);\n\n  // Style the circles.\n  fill(c);\n  noStroke();\n\n  // Iterate over the myData.bubbles array.\n  for (let b of myData.bubbles) {\n    // Draw a circle for each bubble.\n    circle(b.x, b.y, b.d);\n  }\n\n  describe('Several pink bubbles floating in a blue sky.');\n}",
        "let myData;\n\nasync function setup() {\n  myData = await loadJSON('https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson');\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get data about the most recent earthquake.\n  let quake = myData.features[0].properties;\n\n  // Draw a circle based on the earthquake's magnitude.\n  circle(50, 50, quake.mag * 10);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(11);\n\n  // Display the earthquake's location.\n  text(quake.place, 5, 80, 100);\n\n  describe(`A white circle on a gray background. The text \"${quake.place}\" is written beneath the circle.`);\n}",
        "let bigQuake;\n\n// Load the GeoJSON and preprocess it.\nasync function setup() {\n  await loadJSON(\n    'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson',\n    handleData\n  );\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a circle based on the earthquake's magnitude.\n  circle(50, 50, bigQuake.mag * 10);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(11);\n\n  // Display the earthquake's location.\n  text(bigQuake.place, 5, 80, 100);\n\n  describe(`A white circle on a gray background. The text \"${bigQuake.place}\" is written beneath the circle.`);\n}\n\n// Find the biggest recent earthquake.\nfunction handleData(data) {\n  let maxMag = 0;\n  // Iterate over the earthquakes array.\n  for (let quake of data.features) {\n    // Reassign bigQuake if a larger\n    // magnitude quake is found.\n    if (quake.properties.mag > maxMag) {\n      bigQuake = quake.properties;\n    }\n  }\n}",
        "let bigQuake;\n\n// Load the GeoJSON and preprocess it.\nasync function setup() {\n  await loadJSON(\n    'https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson',\n    handleData,\n    handleError\n  );\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a circle based on the earthquake's magnitude.\n  circle(50, 50, bigQuake.mag * 10);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(11);\n\n  // Display the earthquake's location.\n  text(bigQuake.place, 5, 80, 100);\n\n  describe(`A white circle on a gray background. The text \"${bigQuake.place}\" is written beneath the circle.`);\n}\n\n// Find the biggest recent earthquake.\nfunction handleData(data) {\n  let maxMag = 0;\n  // Iterate over the earthquakes array.\n  for (let quake of data.features) {\n    // Reassign bigQuake if a larger\n    // magnitude quake is found.\n    if (quake.properties.mag > maxMag) {\n      bigQuake = quake.properties;\n    }\n  }\n}\n\n// Log any errors to the console.\nfunction handleError(error) {\n  console.log('Oops!', error);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the JSON file to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "function to call once the data is loaded. Will be passed the object.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to call if the data fails to load. Will be passed an <code>Error</code> event object.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "object containing the loaded data.",
            "type": "Promise<Object>"
          }
        }
      ],
      "return": {
        "description": "object containing the loaded data.",
        "type": "Promise<Object>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "arc",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 278,
      "itemtype": "method",
      "description": "<p>Draws an arc.</p>\n<p>An arc is a section of an ellipse defined by the <code>x</code>, <code>y</code>, <code>w</code>, and\n<code>h</code> parameters. <code>x</code> and <code>y</code> set the location of the arc's center. <code>w</code> and\n<code>h</code> set the arc's width and height. See\n<a href=\"#/p5/ellipse\">ellipse()</a> and\n<a href=\"#/p5/ellipseMode\">ellipseMode()</a> for more details.</p>\n<p>The fifth and sixth parameters, <code>start</code> and <code>stop</code>, set the angles\nbetween which to draw the arc. Arcs are always drawn clockwise from\n<code>start</code> to <code>stop</code>. Angles are always given in radians.</p>\n<p>The seventh parameter, <code>mode</code>, is optional. It determines the arc's fill\nstyle. The fill modes are a semi-circle (<code>OPEN</code>), a closed semi-circle\n(<code>CHORD</code>), or a closed pie segment (<code>PIE</code>).</p>\n<p>The eighth parameter, <code>detail</code>, is also optional. It determines how many\nvertices are used to draw the arc in WebGL mode. The default value is 25.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  arc(50, 50, 80, 80, 0, PI + HALF_PI);\n\n  describe('A white circle on a gray canvas. The top-right quarter of the circle is missing.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  arc(50, 50, 80, 40, 0, PI + HALF_PI);\n\n  describe('A white ellipse on a gray canvas. The top-right quarter of the ellipse is missing.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Bottom-right.\n  arc(50, 55, 50, 50, 0, HALF_PI);\n\n  noFill();\n\n  // Bottom-left.\n  arc(50, 55, 60, 60, HALF_PI, PI);\n\n  // Top-left.\n  arc(50, 55, 70, 70, PI, PI + QUARTER_PI);\n\n  // Top-right.\n  arc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\n\n  describe(\n    'A shattered outline of an circle with a quarter of a white circle at the bottom-right.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Default fill mode.\n  arc(50, 50, 80, 80, 0, PI + QUARTER_PI);\n\n  describe('A white circle with the top-right third missing. The bottom is outlined in black.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // OPEN fill mode.\n  arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\n\n  describe(\n    'A white circle missing a section from the top-right. The bottom is outlined in black.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // CHORD fill mode.\n  arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\n\n  describe('A white circle with a black outline missing a section from the top-right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // PIE fill mode.\n  arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\n\n  describe('A white circle with a black outline. The top-right third is missing.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // PIE fill mode.\n  arc(0, 0, 80, 80, 0, PI + QUARTER_PI, PIE);\n\n  describe('A white circle with a black outline. The top-right third is missing.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // PIE fill mode with 5 vertices.\n  arc(0, 0, 80, 80, 0, PI + QUARTER_PI, PIE, 5);\n\n  describe('A white circle with a black outline. The top-right third is missing.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A yellow circle on a black background. The circle opens and closes its mouth.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Style the arc.\n  noStroke();\n  fill(255, 255, 0);\n\n  // Update start and stop angles.\n  let biteSize = PI / 16;\n  let startAngle = biteSize * sin(frameCount * 0.1) + biteSize;\n  let endAngle = TWO_PI - startAngle;\n\n  // Draw the arc.\n  arc(50, 50, 80, 80, startAngle, endAngle, PIE);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the arc's ellipse.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the arc's ellipse.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the arc's ellipse by default.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the arc's ellipse by default.",
              "type": "Number"
            },
            {
              "name": "start",
              "description": "angle to start the arc, specified in radians.",
              "type": "Number"
            },
            {
              "name": "stop",
              "description": "angle to stop the arc, specified in radians.",
              "type": "Number"
            },
            {
              "name": "mode",
              "description": "optional parameter to determine the way of drawing\nthe arc. either CHORD, PIE, or OPEN.",
              "optional": 1,
              "type": "CHORD|PIE|OPEN"
            },
            {
              "name": "detail",
              "description": "optional parameter for WebGL mode only. This is to\nspecify the number of vertices that makes up the\nperimeter of the arc. Default value is 25. Won't\ndraw a stroke for a detail of more than 50.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "cursor",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 284,
      "itemtype": "method",
      "description": "<p>Changes the cursor's appearance.</p>\n<p>The first parameter, <code>type</code>, sets the type of cursor to display. The\nbuilt-in options are <code>ARROW</code>, <code>CROSS</code>, <code>HAND</code>, <code>MOVE</code>, <code>TEXT</code>, and <code>WAIT</code>.\n<code>cursor()</code> also recognizes standard CSS cursor properties passed as\nstrings: <code>'help'</code>, <code>'wait'</code>, <code>'crosshair'</code>, <code>'not-allowed'</code>, <code>'zoom-in'</code>,\nand <code>'grab'</code>. If the path to an image is passed, as in\n<code>cursor('assets/target.png')</code>, then the image will be used as the cursor.\nImages must be in .cur, .gif, .jpg, .jpeg, or .png format and should be <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#icon_size_limits\">at most 32 by 32 pixels large.</a></p>\n<p>The parameters <code>x</code> and <code>y</code> are optional. If an image is used for the\ncursor, <code>x</code> and <code>y</code> set the location pointed to within the image. They are\nboth 0 by default, so the cursor points to the image's top-left corner. <code>x</code>\nand <code>y</code> must be less than the image's width and height, respectively.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square. The cursor appears as crosshairs.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the cursor to crosshairs: +\n  cursor(CROSS);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A gray square divided into quadrants. The cursor image changes when the mouse moves to each quadrant.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Divide the canvas into quadrants.\n  line(50, 0, 50, 100);\n  line(0, 50, 100, 50);\n\n  // Change cursor based on mouse position.\n  if (mouseX < 50 && mouseY < 50) {\n    cursor(CROSS);\n  } else if (mouseX > 50 && mouseY < 50) {\n    cursor('progress');\n  } else if (mouseX > 50 && mouseY > 50) {\n    cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');\n  } else {\n    cursor('grab');\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('An image of three purple curves follows the mouse. The image shifts when the mouse is pressed.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Change the cursor's active spot\n  // when the mouse is pressed.\n  if (mouseIsPressed === true) {\n    cursor('https://avatars0.githubusercontent.com/u/1617169?s=16', 8, 8);\n  } else {\n    cursor('https://avatars0.githubusercontent.com/u/1617169?s=16');\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "type",
              "description": "Built-in: either ARROW, CROSS, HAND, MOVE, TEXT, or WAIT.\nNative CSS properties: 'grab', 'progress', and so on.\nPath to cursor image.",
              "type": "ARROW|CROSS|HAND|MOVE|TEXT|WAIT|String"
            },
            {
              "name": "x",
              "description": "horizontal active spot of the cursor.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "vertical active spot of the cursor.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "createElement",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 284,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Element\">p5.Element</a> object.</p>\n<p>The first parameter, <code>tag</code>, is a string an HTML tag such as <code>'h5'</code>.</p>\n<p>The second parameter, <code>content</code>, is optional. It's a string that sets the\nHTML content to insert into the new element. New elements have no content\nby default.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an h5 element with nothing in it.\n  createElement('h5');\n\n  describe('A gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an h5 element with the content \"p5*js\".\n  let h5 = createElement('h5', 'p5*js');\n\n  // Set the element's style and position.\n  h5.style('color', 'deeppink');\n  h5.position(30, 15);\n\n  describe('The text \"p5*js\" written in pink in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "tag",
              "description": "tag for the new element.",
              "type": "String"
            },
            {
              "name": "content",
              "description": "HTML content to insert into the element.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "year",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/time_date.js",
      "line": 299,
      "itemtype": "method",
      "description": "Returns the current year as a number such as 1999.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the current year.\n  let y = year();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textSize(12);\n  textFont('Courier New');\n\n  // Display the year.\n  text(`Current year: ${y}`, 10, 50, 80);\n\n  describe(`The text 'Current year: ${y}' written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current year.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "current year.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Time & Date"
    },
    {
      "name": "floor",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 301,
      "itemtype": "method",
      "description": "Calculates the closest integer value that is less than or equal to the\nvalue of a number.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use RGB color with values from 0 to 1.\n  colorMode(RGB, 1);\n\n  noStroke();\n\n  // Draw the left rectangle.\n  let r = 0.8;\n  fill(r, 0, 0);\n  rect(0, 0, 50, 100);\n\n  // Round r down to 0.\n  r = floor(r);\n\n  // Draw the right rectangle.\n  fill(r, 0, 0);\n  rect(50, 0, 50, 100);\n\n  describe('Two rectangles. The one on the left is bright red and the one on the right is black.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to round down.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "rounded down number.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "rounded down number.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "str",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 302,
      "itemtype": "method",
      "description": "<p>Converts a <code>Boolean</code> or <code>Number</code> to <code>String</code>.</p>\n<p><code>str()</code> converts values to strings. See the\n<a href=\"#/p5/String\">String</a> reference page for guidance on using\ntemplate literals instead.</p>\n<p>The parameter, <code>n</code>, is the value to convert. If <code>n</code> is a Boolean, as in\n<code>str(false)</code> or <code>str(true)</code>, then the value will be returned as a string,\nas in <code>'false'</code> or <code>'true'</code>. If <code>n</code> is a number, as in <code>str(123)</code>, then its\nvalue will be returned as a string, as in <code>'123'</code>. If an array is passed,\nas in <code>str([12.34, 56.78])</code>, then an array of strings will be returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a Boolean variable.\n  let original = false;\n\n  // Convert the Boolean to a string.\n  let converted = str(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"false : false\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 123;\n\n  // Convert the number to a string.\n  let converted = str(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} = ${converted}`, 50, 50);\n\n  describe('The text \"123 = 123\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let original = [12, 34, 56];\n\n  // Convert the numbers to strings.\n  let strings = str(original);\n\n  // Create an empty string variable.\n  let final = '';\n\n  // Concatenate all the strings.\n  for (let s of strings) {\n    final += s;\n  }\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the concatenated string.\n  text(final, 50, 50);\n\n  describe('The text \"123456\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String|Boolean|Number"
            }
          ],
          "return": {
            "description": "converted string.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "converted string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "byte",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 549,
      "itemtype": "method",
      "description": "<p>Converts a <code>Boolean</code>, <code>String</code>, or <code>Number</code> to its byte value.</p>\n<p><code>byte()</code> converts a value to an integer (whole number) between -128 and\n127. Values greater than 127 wrap around while negative values are\nunchanged. For example, 128 becomes -128 and -129 remains the same.</p>\n<p>The parameter, <code>n</code>, is the value to convert. If <code>n</code> is a Boolean, as in\n<code>byte(false)</code> or <code>byte(true)</code>, the number 0 (<code>false</code>) or 1 (<code>true</code>) will be\nreturned. If <code>n</code> is a string or number, as in <code>byte('256')</code> or <code>byte(256)</code>,\nthen the byte value will be returned. Decimal values are ignored. If an\narray is passed, as in <code>byte([true, 123, '456'])</code>, then an array of byte\nvalues will be returned.</p>\n<p>Note: If a value can't be converted to a number, as in <code>byte('giraffe')</code>,\nthen the value <code>NaN</code> (not a number) will be returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a Boolean variable.\n  let original = true;\n\n  // Convert the Boolean to its byte value.\n  let converted = byte(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"true : 1\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = '256';\n\n  // Convert the string to its byte value.\n  let converted = byte(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"256 : 0\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 256;\n\n  // Convert the number to its byte value.\n  let converted = byte(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"256 : 0\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of values.\n  let original = [false, '64', 383];\n\n  // Convert the array elements to their byte values.\n  let converted = byte(original);\n\n  // Iterate over the converted array elements.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Style the circle.\n    fill(converted[i]);\n\n    // Calculate the x-coordinate.\n    let x = (i + 1) * 25;\n\n    // Draw the circle.\n    circle(x, 50, 20);\n  }\n\n  describe(\n    'Three gray circles on a gray background. The circles get lighter from left to right.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String|Boolean|Number"
            }
          ],
          "return": {
            "description": "converted byte value.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "Array"
            }
          ],
          "return": {
            "description": "converted byte values.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "converted byte value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "buildGeometry",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 308,
      "itemtype": "method",
      "description": "<p>Creates a custom <a href=\"#/p5.Geometry\">p5.Geometry</a> object from\nsimpler 3D shapes.</p>\n<p><code>buildGeometry()</code> helps with creating complex 3D shapes from simpler ones\nsuch as <a href=\"#/p5/sphere\">sphere()</a>. It can help to make sketches\nmore performant. For example, if a complex 3D shape doesn’t change while a\nsketch runs, then it can be created with <code>buildGeometry()</code>. Creating a\n<a href=\"#/p5.Geometry\">p5.Geometry</a> object once and then drawing it\nwill run faster than repeatedly drawing the individual pieces.</p>\n<p>The parameter, <code>callback</code>, is a function with the drawing instructions for\nthe new <a href=\"#/p5.Geometry\">p5.Geometry</a> object. It will be called\nonce to create the new 3D shape.\nNote: <code>buildGeometry()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Geometry object.\n  shape = buildGeometry(createShape);\n\n  describe('A white cone drawn on a gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the p5.Geometry object.\n  noStroke();\n\n  // Draw the p5.Geometry object.\n  model(shape);\n}\n\n// Create p5.Geometry object from a single cone.\nfunction createShape() {\n  cone();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the arrow.\n  shape = buildGeometry(createArrow);\n\n  describe('A white arrow drawn on a gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the arrow.\n  noStroke();\n\n  // Draw the arrow.\n  model(shape);\n}\n\nfunction createArrow() {\n  // Add shapes to the p5.Geometry object.\n  push();\n  rotateX(PI);\n  cone(10);\n  translate(0, -10, 0);\n  cylinder(3, 20);\n  pop();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Geometry object.\n  shape = buildGeometry(createArrow);\n\n  describe('Two white arrows drawn on a gray background. The arrow on the right rotates slowly.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the arrows.\n  noStroke();\n\n  // Draw the p5.Geometry object.\n  model(shape);\n\n  // Translate and rotate the coordinate system.\n  translate(30, 0, 0);\n  rotateZ(frameCount * 0.01);\n\n  // Draw the p5.Geometry object again.\n  model(shape);\n}\n\nfunction createArrow() {\n  // Add shapes to the p5.Geometry object.\n  push();\n  rotateX(PI);\n  cone(10);\n  translate(0, -10, 0);\n  cylinder(3, 20);\n  pop();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet button;\nlet particles;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a button to reset the particle system.\n  button = createButton('Reset');\n\n  // Call resetModel() when the user presses the button.\n  button.mousePressed(resetModel);\n\n  // Add the original set of particles.\n  resetModel();\n\n  describe('A set of white spheres on a gray background. The spheres are positioned randomly. Their positions reset when the user presses the Reset button.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the particles.\n  noStroke();\n\n  // Draw the particles.\n  model(particles);\n}\n\nfunction resetModel() {\n  // If the p5.Geometry object has already been created,\n  // free those resources.\n  if (particles) {\n    freeGeometry(particles);\n  }\n\n  // Create a new p5.Geometry object with random spheres.\n  particles = buildGeometry(createParticles);\n}\n\nfunction createParticles() {\n  for (let i = 0; i < 60; i += 1) {\n    // Calculate random coordinates.\n    let x = randomGaussian(0, 20);\n    let y = randomGaussian(0, 20);\n    let z = randomGaussian(0, 20);\n\n    push();\n    // Translate to the particle's coordinates.\n    translate(x, y, z);\n    // Draw the particle.\n    sphere(5);\n    pop();\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "function that draws the shape.",
              "type": "Function"
            }
          ],
          "return": {
            "description": "new 3D shape.",
            "type": "p5.Geometry"
          }
        }
      ],
      "return": {
        "description": "new 3D shape.",
        "type": "p5.Geometry"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "bezierPoint",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 313,
      "itemtype": "method",
      "description": "<p>Calculates coordinates along a Bézier curve using interpolation.</p>\n<p><code>bezierPoint()</code> calculates coordinates along a Bézier curve using the\nanchor and control points. It expects points in the same order as the\n<a href=\"#/p5/bezier\">bezier()</a> function. <code>bezierPoint()</code> works one axis\nat a time. Passing the anchor and control points' x-coordinates will\ncalculate the x-coordinate of a point on the curve. Passing the anchor and\ncontrol points' y-coordinates will calculate the y-coordinate of a point on\nthe curve.</p>\n<p>The first parameter, <code>a</code>, is the coordinate of the first anchor point.</p>\n<p>The second and third parameters, <code>b</code> and <code>c</code>, are the coordinates of the\ncontrol points.</p>\n<p>The fourth parameter, <code>d</code>, is the coordinate of the last anchor point.</p>\n<p>The fifth parameter, <code>t</code>, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the coordinates for the curve's anchor and control points.\n  let x1 = 85;\n  let x2 = 10;\n  let x3 = 90;\n  let x4 = 15;\n  let y1 = 20;\n  let y2 = 10;\n  let y3 = 90;\n  let y4 = 80;\n\n  // Style the curve.\n  noFill();\n\n  // Draw the curve.\n  bezier(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Draw circles along the curve's path.\n  fill(255);\n\n  // Top-right.\n  let x = bezierPoint(x1, x2, x3, x4, 0);\n  let y = bezierPoint(y1, y2, y3, y4, 0);\n  circle(x, y, 5);\n\n  // Center.\n  x = bezierPoint(x1, x2, x3, x4, 0.5);\n  y = bezierPoint(y1, y2, y3, y4, 0.5);\n  circle(x, y, 5);\n\n  // Bottom-left.\n  x = bezierPoint(x1, x2, x3, x4, 1);\n  y = bezierPoint(y1, y2, y3, y4, 1);\n  circle(x, y, 5);\n\n  describe('A black s-curve on a gray square. The endpoints and center of the curve are marked with white circles.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black s-curve on a gray square. A white circle moves back and forth along the curve.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the coordinates for the curve's anchor and control points.\n  let x1 = 85;\n  let x2 = 10;\n  let x3 = 90;\n  let x4 = 15;\n  let y1 = 20;\n  let y2 = 10;\n  let y3 = 90;\n  let y4 = 80;\n\n  // Draw the curve.\n  noFill();\n  bezier(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Calculate the circle's coordinates.\n  let t = 0.5 * sin(frameCount * 0.01) + 0.5;\n  let x = bezierPoint(x1, x2, x3, x4, t);\n  let y = bezierPoint(y1, y2, y3, y4, t);\n\n  // Draw the circle.\n  fill(255);\n  circle(x, y, 5);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "a",
              "description": "coordinate of first anchor point.",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "coordinate of first control point.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "coordinate of second control point.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "coordinate of second anchor point.",
              "type": "Number"
            },
            {
              "name": "t",
              "description": "amount to interpolate between 0 and 1.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "coordinate of the point on the curve.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "coordinate of the point on the curve.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "loadModel",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/loading.js",
      "line": 322,
      "itemtype": "method",
      "description": "<p>Loads a 3D model to create a\n<a href=\"#/p5.Geometry\">p5.Geometry</a> object.</p>\n<p><code>loadModel()</code> can load 3D models from OBJ and STL files. Once the model is\nloaded, it can be displayed with the\n<a href=\"#/p5/model\">model()</a> function, as in <code>model(shape)</code>.</p>\n<p>There are three ways to call <code>loadModel()</code> with optional parameters to help\nprocess the model.</p>\n<p>The first parameter, <code>path</code>, is a <code>String</code> with the path to the file. Paths\nto local files should be relative, as in <code>loadModel('assets/model.obj')</code>.\nURLs such as <code>'https://example.com/model.obj'</code> may be blocked due to browser\nsecurity. The <code>path</code> parameter can also be defined as a <code>Request</code>\nobject for more advanced usage.\nNote: When loading a <code>.obj</code> file that references materials stored in\n<code>.mtl</code> files, p5.js will attempt to load and apply those materials.\nTo ensure that the <code>.obj</code> file reads the <code>.mtl</code> file correctly include the\n<code>.mtl</code> file alongside it.</p>\n<p>The first way to call <code>loadModel()</code> has three optional parameters after the\nfile path. The first optional parameter, <code>successCallback</code>, is a function\nto call once the model loads. For example,\n<code>loadModel('assets/model.obj', handleModel)</code> will call the <code>handleModel()</code>\nfunction once the model loads. The second optional parameter,\n<code>failureCallback</code>, is a function to call if the model fails to load. For\nexample, <code>loadModel('assets/model.obj', handleModel, handleFailure)</code> will\ncall the <code>handleFailure()</code> function if an error occurs while loading. The\nthird optional parameter, <code>fileType</code>, is the model’s file extension as a\nstring. For example,\n<code>loadModel('assets/model', handleModel, handleFailure, '.obj')</code> will try to\nload the file model as a <code>.obj</code> file.</p>\n<p>The second way to call <code>loadModel()</code> has four optional parameters after the\nfile path. The first optional parameter is a <code>Boolean</code> value. If <code>true</code> is\npassed, as in <code>loadModel('assets/model.obj', true)</code>, then the model will be\nresized to ensure it fits the canvas. The next three parameters are\n<code>successCallback</code>, <code>failureCallback</code>, and <code>fileType</code> as described above.</p>\n<p>The third way to call <code>loadModel()</code> has one optional parameter after the\nfile path. The optional parameter, <code>options</code>, is an <code>Object</code> with options,\nas in <code>loadModel('assets/model.obj', options)</code>. The <code>options</code> object can\nhave the following properties:</p>\n<pre><code class=\"language-js\">let options = {\n  // Enables standardized size scaling during loading if set to true.\n  normalize: true,\n\n  // Function to call once the model loads.\n  successCallback: handleModel,\n\n  // Function to call if an error occurs while loading.\n  failureCallback: handleError,\n\n  // Model's file extension.\n  fileType: '.stl',\n\n  // Flips the U texture coordinates of the model.\n  flipU: false,\n\n  // Flips the V texture coordinates of the model.\n  flipV: false\n};\n\n// Pass the options object to loadModel().\nloadModel('assets/model.obj', options);</code></pre><p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n<p>Note: There’s no support for colored STL files. STL files with color will\nbe rendered without color.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  shape = await loadModel('assets/teapot.obj');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\n// Normalize the geometry's size to fit the canvas.\nasync function setup() {\n  shape = await loadModel('assets/teapot.obj', true);\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  await loadModel('assets/teapot.obj', true, handleModel);\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}\n\n// Set the shape variable and log the geometry's\n// ID to the console.\nfunction handleModel(data) {\n  shape = data;\n  console.log(shape.gid);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  await loadModel('assets/teapot.obj', true, handleModel, handleError);\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}\n\n// Set the shape variable and print the geometry's\n// ID to the console.\nfunction handleModel(data) {\n  shape = data;\n  console.log(shape.gid);\n}\n\n// Print an error message if the file doesn't load.\nfunction handleError(error) {\n  console.error('Oops!', error);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  await loadModel('assets/teapot.obj', '.obj', true, handleModel, handleError);\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}\n\n// Set the shape variable and print the geometry's\n// ID to the console.\nfunction handleModel(data) {\n  shape = data;\n  console.log(shape.gid);\n}\n\n// Print an error message if the file doesn't load.\nfunction handleError(error) {\n  console.error('Oops!', error);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\nlet options = {\n  fileType: '.obj',\n  normalize: true,\n  successCallback: handleModel,\n  failureCallback: handleError\n};\n\n// Load the file and create a p5.Geometry object.\nasync function setup() {\n  await loadModel('assets/teapot.obj', options);\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white teapot drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}\n\n// Set the shape variable and print the geometry's\n// ID to the console.\nfunction handleModel(data) {\n  shape = data;\n  console.log(shape.gid);\n}\n\n// Print an error message if the file doesn't load.\nfunction handleError(error) {\n  console.error('Oops!', error);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the model to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "fileType",
              "description": "model’s file extension. Either <code>'.obj'</code> or <code>'.stl'</code>.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "normalize",
              "description": "if <code>true</code>, scale the model to fit the canvas.",
              "optional": 1,
              "type": "Boolean"
            },
            {
              "name": "successCallback",
              "description": "function to call once the model is loaded. Will be passed\nthe <a href=\"#/p5.Geometry\">p5.Geometry</a> object.",
              "optional": 1,
              "type": "function(p5.Geometry)"
            },
            {
              "name": "failureCallback",
              "description": "function to call if the model fails to load. Will be passed an <code>Error</code> event object.",
              "optional": 1,
              "type": "function(Event)"
            }
          ],
          "return": {
            "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
            "type": "Promise<p5.Geometry>"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "fileType",
              "description": "",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "successCallback",
              "description": "",
              "optional": 1,
              "type": "function(p5.Geometry)"
            },
            {
              "name": "failureCallback",
              "description": "",
              "optional": 1,
              "type": "function(Event)"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Geometry\">p5.Geometry</a> object.",
            "type": "Promise<p5.Geometry>"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "options",
              "description": "loading options.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Geometry\">p5.Geometry</a> object.",
            "type": "Promise<p5.Geometry>"
          }
        }
      ],
      "return": {
        "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
        "type": "Promise<p5.Geometry>"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Models"
    },
    {
      "name": "randomGaussian",
      "file": "src/scripts/parsers/in/p5.js/src/math/random.js",
      "line": 326,
      "itemtype": "method",
      "description": "<p>Returns a random number fitting a Gaussian, or normal, distribution.</p>\n<p>Normal distributions look like bell curves when plotted. Values from a\nnormal distribution cluster around a central value called the mean. The\ncluster's standard deviation describes its spread.</p>\n<p>By default, <code>randomGaussian()</code> produces different results each time a\nsketch runs. The <a href=\"#/p5/randomSeed\">randomSeed()</a> function can be\nused to generate the same sequence of numbers each time a sketch runs.</p>\n<p>There's no minimum or maximum value that <code>randomGaussian()</code> might return.\nValues far from the mean are very unlikely and values near the mean are\nvery likely.</p>\n<p>The version of <code>randomGaussian()</code> with no parameters returns values with a\nmean of 0 and standard deviation of 1.</p>\n<p>The version of <code>randomGaussian()</code> with one parameter interprets the\nargument passed as the mean. The standard deviation is 1.</p>\n<p>The version of <code>randomGaussian()</code> with two parameters interprets the first\nargument passed as the mean and the second as the standard deviation.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('Three horizontal black lines are filled in randomly. The top line spans entire canvas. The middle line is very short. The bottom line spans two-thirds of the canvas.');\n}\n\nfunction draw() {\n  // Style the circles.\n  noStroke();\n  fill(0, 10);\n\n  // Uniform distribution between 0 and 100.\n  let x = random(100);\n  let y = 25;\n  circle(x, y, 5);\n\n  // Gaussian distribution with a mean of 50 and sd of 1.\n  x = randomGaussian(50);\n  y = 50;\n  circle(x, y, 5);\n\n  // Gaussian distribution with a mean of 50 and sd of 10.\n  x = randomGaussian(50, 10);\n  y = 75;\n  circle(x, y, 5);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mean",
              "description": "mean.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "sd",
              "description": "standard deviation.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "random number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "random number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Random"
    },
    {
      "name": "redraw",
      "file": "src/scripts/parsers/in/p5.js/src/core/structure.js",
      "line": 327,
      "itemtype": "method",
      "description": "<p>Runs the code in <a href=\"#/p5/draw\">draw()</a> once.</p>\n<p>By default, <a href=\"#/p5/draw\">draw()</a> tries to run 60 times per\nsecond. Calling <a href=\"#/p5/noLoop\">noLoop()</a> stops\n<a href=\"#/p5/draw\">draw()</a> from repeating. Calling <code>redraw()</code> will\nexecute the code in the <a href=\"#/p5/draw\">draw()</a> function a set\nnumber of times. <code>await</code> the result of <code>redraw</code> to make sure it has finished.</p>\n<p>The parameter, <code>n</code>, is optional. If a number is passed, as in <code>redraw(5)</code>,\nthen the draw loop will run the given number of times. By default, <code>n</code> is\n1.</p>\n",
      "example": [
        "// Double-click the canvas to move the circle.\n\nlet x = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Turn off the draw loop.\n  noLoop();\n\n  describe(\n    'A white half-circle on the left edge of a gray square. The circle moves a little to the right when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the circle.\n  circle(x, 50, 20);\n\n  // Increment x.\n  x += 5;\n}\n\n// Run the draw loop when the user double-clicks.\nasync function doubleClicked() {\n  await redraw();\n}",
        "// Double-click the canvas to move the circle.\n\nlet x = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Turn off the draw loop.\n  noLoop();\n\n  describe(\n    'A white half-circle on the left edge of a gray square. The circle hops to the right when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the circle.\n  circle(x, 50, 20);\n\n  // Increment x.\n  x += 5;\n}\n\n// Run the draw loop three times when the user double-clicks.\nasync function doubleClicked() {\n  await redraw(3);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number of times to run <a href=\"#/p5/draw\">draw()</a>. Defaults to 1.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "return": {
            "description": "",
            "type": "Promise<void>"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "Promise<void>"
      },
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "atan2",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 328,
      "itemtype": "method",
      "description": "<p>Calculates the angle formed by a point, the origin, and the positive\nx-axis.</p>\n<p><code>atan2()</code> is most often used for orienting geometry to the mouse's\nposition, as in <code>atan2(mouseY, mouseX)</code>. The first parameter is the point's\ny-coordinate and the second parameter is its x-coordinate.</p>\n<p>By default, <code>atan2()</code> returns values in the range\n-π (about -3.14) to π (3.14). If the\n<a href=\"#/p5/angleMode\">angleMode()</a> is <code>DEGREES</code>, then values are\nreturned in the range -180 to 180.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A rectangle at the top-left of the canvas rotates with mouse movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the angle between the mouse\n  // and the origin.\n  let a = atan2(mouseY, mouseX);\n\n  // Rotate.\n  rotate(a);\n\n  // Draw the shape.\n  rect(0, 0, 60, 10);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A rectangle at the center of the canvas rotates with mouse movements.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Get the mouse's coordinates relative to the origin.\n  let x = mouseX - 50;\n  let y = mouseY - 50;\n\n  // Calculate the angle between the mouse and the origin.\n  let a = atan2(y, x);\n\n  // Rotate.\n  rotate(a);\n\n  // Draw the shape.\n  rect(-30, -5, 60, 10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "y",
              "description": "y-coordinate of the point.",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "x-coordinate of the point.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "arc tangent of the given point.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "arc tangent of the given point.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "smooth",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 332,
      "itemtype": "method",
      "description": "<p>Draws certain features with smooth (antialiased) edges.</p>\n<p><code>smooth()</code> is active by default. In 2D mode,\n<a href=\"#/p5/noSmooth\">noSmooth()</a> is helpful for scaling up images\nwithout blurring. The functions don't affect shapes or fonts.</p>\n<p>In WebGL mode, <a href=\"#/p5/noSmooth\">noSmooth()</a> causes all shapes to\nbe drawn with jagged (aliased) edges. The functions don't affect images or\nfonts.</p>\n",
      "example": [
        "let heart;\n\nasync function setup() {\n  // Load a pixelated heart image from an image data string.\n  heart = await loadImage('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAEZJREFUGFd9jcsNACAIQ9tB2MeR3YdBMBBq8CIXPi2vBICIiOwkOedatllqWO6Y8yOWoyuNf1GZwgmf+RRG2YXr+xVFmA8HZ9Mx/KGPMtcAAAAASUVORK5CYII=');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Antialiased hearts.\n  image(heart, 10, 10);\n  image(heart, 20, 10, 16, 16);\n  image(heart, 40, 10, 32, 32);\n\n  // Aliased hearts.\n  noSmooth();\n  image(heart, 10, 60);\n  image(heart, 20, 60, 16, 16);\n  image(heart, 40, 60, 32, 32);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  circle(0, 0, 80);\n\n  describe('A white circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Disable smoothing.\n  noSmooth();\n\n  background(200);\n\n  circle(0, 0, 80);\n\n  describe('A pixelated white circle on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "nfp",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 350,
      "itemtype": "method",
      "description": "<p>Converts a <code>Number</code> into a <code>String</code> with a plus or minus sign.</p>\n<p><code>nfp()</code> converts numbers such as 123 into strings formatted with a <code>+</code> or\n<code>-</code> symbol to mark whether they're positive or negative, as in <code>'+123'</code>.</p>\n<p>The first parameter, <code>num</code>, is the number to convert to a string. For\nexample, calling <code>nfp(123.45)</code> returns the string <code>'+123.45'</code>. If an array\nof numbers is passed, as in <code>nfp([123.45, -6.78])</code>, an array of formatted\nstrings will be returned.</p>\n<p>The second parameter, <code>left</code>, is optional. If a number is passed, as in\n<code>nfp(123.45, 4)</code>, it sets the minimum number of digits to include to the\nleft of the decimal place. If <code>left</code> is larger than the number of digits in\n<code>num</code>, then unused digits will be set to 0. For example, calling\n<code>nfp(123.45, 4)</code> returns the string <code>'+0123.45'</code>.</p>\n<p>The third parameter, <code>right</code>, is also optional. If a number is passed, as\nin <code>nfp(123.45, 4, 1)</code>, it sets the minimum number of digits to include to\nthe right of the decimal place. If <code>right</code> is smaller than the number of\ndecimal places in <code>num</code>, then <code>num</code> will be rounded to the given number of\ndecimal places.  For example, calling <code>nfp(123.45, 4, 1)</code> returns the\nstring <code>'+0123.5'</code>. If <code>right</code> is larger than the number of decimal places\nin <code>num</code>, then unused decimal places will be set to 0.  For example,\ncalling <code>nfp(123.45, 4, 3)</code> returns the string <code>'+0123.450'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create number variables.\n  let positive = 123;\n  let negative = -123;\n\n  // Convert the positive number to a formatted string.\n  let p = nfp(positive);\n\n  // Convert the negative number to a formatted string\n  // with four digits to the left of the decimal\n  // and two digits to the right of the decimal.\n  let n = nfp(negative, 4, 2);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Display the original and formatted numbers.\n  text(`${positive} : ${p}`, 50, 33);\n  text(`${negative} : ${n}`, 50, 67);\n\n  describe(\n    'The text \"123 : +123\" and \"-123 : -123.00\" written on separate lines. The text is in black on a gray background.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create number variables.\n  let numbers = [123, -4.56];\n\n  // Convert the numbers to formatted strings\n  // with four digits to the left of the decimal\n  // and one digit to the right of the decimal.\n  let formatted = nfp(numbers, 4, 1);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < formatted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 33;\n\n    // Display the original and formatted numbers.\n    text(`${numbers[i]} : ${formatted[i]}`, 50, y);\n  }\n\n  describe(\n    'The text \"123 : +0123.0\" and \"-4.56 : 00-4.6\" written on separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "num",
              "description": "number to format.",
              "type": "Number"
            },
            {
              "name": "left",
              "description": "number of digits to include to the left of the\ndecimal point.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "right",
              "description": "number of digits to include to the right of the\ndecimal point.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "return": {
            "description": "formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to format.",
              "type": "Number[]"
            },
            {
              "name": "left",
              "description": "",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "right",
              "description": "",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "return": {
            "description": "formatted strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "formatted string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "clearStorage",
      "file": "src/scripts/parsers/in/p5.js/src/data/local_storage.js",
      "line": 352,
      "itemtype": "method",
      "description": "<p>Removes all items in the web browser's local storage.</p>\n<p>Web browsers can save small amounts of data using the built-in\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage\" target=\"_blank\">localStorage object</a>.\nData stored in <code>localStorage</code> can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs. Calling <code>clearStorage()</code> removes all data from <code>localStorage</code>.</p>\n<p>Note: Sensitive data such as passwords or personal information shouldn't be\nstored in <code>localStorage</code>.</p>\n",
      "example": [
        "// Double-click to clear localStorage.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Store the player's name.\n  storeItem('name', 'Feist');\n\n  // Store the player's score.\n  storeItem('score', 1234);\n\n  describe(\n    'The text \"Feist: 1234\" written in black on a gray background. The text \"null: null\" appears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Retrieve the name.\n  let name = getItem('name');\n\n  // Retrieve the score.\n  let score = getItem('score');\n\n  // Display the score.\n  text(`${name}: ${score}`, 50, 50);\n}\n\n// Clear localStorage when the user double-clicks.\nfunction doubleClicked() {\n  clearStorage();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "LocalStorage"
    },
    {
      "name": "removeElements",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 352,
      "itemtype": "method",
      "description": "<p>Removes all elements created by p5.js, including any event handlers.</p>\n<p>There are two exceptions:\ncanvas elements created by <a href=\"#/p5/createCanvas\">createCanvas()</a>\nand <a href=\"#/p5.Renderer\">p5.Render</a> objects created by\n<a href=\"#/p5/createGraphics\">createGraphics()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and place\n  // it in the middle of the canvas.\n  let p = createP('p5*js');\n  p.position(25, 25);\n\n  describe('A gray square with the text \"p5*js\" written in its center. The text disappears when the mouse is pressed.');\n}\n\n// Remove all elements when the mouse is pressed.\nfunction mousePressed() {\n  removeElements();\n}",
        "let slider;\n\nfunction setup() {\n  createCanvas(200, 200);\n\n  // Create a paragraph element and place\n  // it at the top of the canvas.\n  let p = createP('p5*js');\n  p.position(25, 25);\n\n  // Create a slider element and place it\n  // beneath the canvas.\n  slider = createSlider(0, 255, 200);\n  slider.position(0, 100);\n\n  describe('A gray square with the text \"p5*js\" written in its center and a range slider beneath it. The square changes color when the slider is moved. The text and slider disappear when the square is double-clicked.');\n}\n\nfunction draw() {\n  // Use the slider value to change the background color.\n  let g = slider.value();\n  background(g);\n}\n\n// Remove all elements when the mouse is double-clicked.\nfunction doubleClicked() {\n  removeElements();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "beginShape",
      "file": "src/scripts/parsers/in/p5.js/src/shape/vertex.js",
      "line": 360,
      "itemtype": "method",
      "description": "<p>Begins adding vertices to a custom shape.</p>\n<p>The <code>beginShape()</code> and <a href=\"#/p5/endShape\">endShape()</a> functions\nallow for creating custom shapes in 2D or 3D. <code>beginShape()</code> begins adding\nvertices to a custom shape and <a href=\"#/p5/endShape\">endShape()</a> stops\nadding them.</p>\n<p>The parameter, <code>kind</code>, sets the kind of shape to make. The available kinds are:</p>\n<ul><li><code>PATH</code> (the default) to draw shapes by tracing out the path along their edges.</li><li><code>POINTS</code> to draw a series of points.</li><li><code>LINES</code> to draw a series of unconnected line segments.</li><li><code>TRIANGLES</code> to draw a series of separate triangles.</li><li><code>TRIANGLE_FAN</code> to draw a series of connected triangles sharing the first vertex in a fan-like fashion.</li><li><code>TRIANGLE_STRIP</code> to draw a series of connected triangles in strip fashion.</li><li><code>QUADS</code> to draw a series of separate quadrilaterals (quads).</li><li><code>QUAD_STRIP</code> to draw quad strip using adjacent edges to form the next quad.</li></ul><p>After calling <code>beginShape()</code>, shapes can be built by calling\n<a href=\"#/p5/vertex\">vertex()</a>,\n<a href=\"#/p5/bezierVertex\">bezierVertex()</a>, and/or\n<a href=\"#/p5/splineVertex\">splineVertex()</a>. Calling\n<a href=\"#/p5/endShape\">endShape()</a> will stop adding vertices to the\nshape. Each shape will be outlined with the current stroke color and filled\nwith the current fill color.</p>\n<p>Transformations such as <a href=\"#/p5/translate\">translate()</a>,\n<a href=\"#/p5/rotate\">rotate()</a>, and\n<a href=\"#/p5/scale\">scale()</a> don't work between <code>beginShape()</code> and\n<a href=\"#/p5/endShape\">endShape()</a>. It's also not possible to use\nother shapes, such as <a href=\"#/p5/ellipse\">ellipse()</a> or\n<a href=\"#/p5/rect\">rect()</a>, between <code>beginShape()</code> and\n<a href=\"#/p5/endShape\">endShape()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n\n  describe('A white square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Only draw the vertices (points).\n  beginShape(POINTS);\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Four black dots that form a square are drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Only draw lines between alternating pairs of vertices.\n  beginShape(LINES);\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Two horizontal black lines on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shape.\n  noFill();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Three black lines form a sideways U shape on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shape.\n  noFill();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  // Connect the first and last vertices.\n  endShape(CLOSE);\n\n  describe('A black outline of a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of triangles.\n  beginShape(TRIANGLES);\n\n  // Left triangle.\n  vertex(30, 75);\n  vertex(40, 20);\n  vertex(50, 75);\n\n  // Right triangle.\n  vertex(60, 20);\n  vertex(70, 75);\n  vertex(80, 20);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Two white triangles drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of triangles.\n  beginShape(TRIANGLE_STRIP);\n\n  // Add vertices.\n  vertex(30, 75);\n  vertex(40, 20);\n  vertex(50, 75);\n  vertex(60, 20);\n  vertex(70, 75);\n  vertex(80, 20);\n  vertex(90, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Five white triangles that are interleaved drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of triangles that share their first vertex.\n  beginShape(TRIANGLE_FAN);\n\n  // Add vertices.\n  vertex(57.5, 50);\n  vertex(57.5, 15);\n  vertex(92, 50);\n  vertex(57.5, 85);\n  vertex(22, 50);\n  vertex(57.5, 15);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Four white triangles form a square are drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of quadrilaterals.\n  beginShape(QUADS);\n\n  // Left rectangle.\n  vertex(30, 20);\n  vertex(30, 75);\n  vertex(50, 75);\n  vertex(50, 20);\n\n  // Right rectangle.\n  vertex(65, 20);\n  vertex(65, 75);\n  vertex(85, 75);\n  vertex(85, 20);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Two white rectangles drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of quadrilaterals.\n  beginShape(QUAD_STRIP);\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(30, 75);\n  vertex(50, 20);\n  vertex(50, 75);\n  vertex(65, 20);\n  vertex(65, 75);\n  vertex(85, 20);\n  vertex(85, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Three white rectangles that share edges are drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Start drawing the shape.\n  // Draw a series of quadrilaterals.\n  beginShape(PATH);\n\n  // Add the vertices.\n  vertex(-30, -30, 0);\n  vertex(30, -30, 0);\n  vertex(30, -10, 0);\n  vertex(-10, -10, 0);\n  vertex(-10, 10, 0);\n  vertex(30, 10, 0);\n  vertex(30, 30, 0);\n  vertex(-30, 30, 0);\n\n  // Stop drawing the shape.\n  // Connect the first and last vertices.\n  endShape(CLOSE);\n\n  describe('A blocky C shape drawn in white on a gray background.');\n}",
        "// Click and drag with the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A blocky C shape drawn in red, blue, and green on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Start drawing the shape.\n  // Draw a series of quadrilaterals.\n  beginShape(PATH);\n\n  // Add the vertices.\n  fill('red');\n  stroke('red');\n  vertex(-30, -30, 0);\n  vertex(30, -30, 0);\n  vertex(30, -10, 0);\n  fill('green');\n  stroke('green');\n  vertex(-10, -10, 0);\n  vertex(-10, 10, 0);\n  vertex(30, 10, 0);\n  fill('blue');\n  stroke('blue');\n  vertex(30, 30, 0);\n  vertex(-30, 30, 0);\n\n  // Stop drawing the shape.\n  // Connect the first and last vertices.\n  endShape(CLOSE);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "kind",
              "description": "either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\nTRIANGLE_STRIP, QUADS, QUAD_STRIP or PATH. Defaults to PATH.",
              "optional": 1,
              "type": "POINTS|LINES|TRIANGLES|TRIANGLE_FAN|TRIANGLE_STRIP|QUADS|QUAD_STRIP|PATH"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "saveObj",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 361,
      "itemtype": "method",
      "description": "<p>The <code>saveObj()</code> function exports <code>p5.Geometry</code> objects as\n3D models in the Wavefront .obj file format.\nThis way, you can use the 3D shapes you create in p5.js in other software\nfor rendering, animation, 3D printing, or more.</p>\n<p>The exported .obj file will include the faces and vertices of the <code>p5.Geometry</code>,\nas well as its texture coordinates and normals, if it has them.</p>\n",
      "example": [
        "let myModel;\nlet saveBtn;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myModel = buildGeometry(function()) {\n    for (let i = 0; i < 5; i++) {\n      push();\n      translate(\n        random(-75, 75),\n        random(-75, 75),\n        random(-75, 75)\n      );\n      sphere(random(5, 50));\n      pop();\n    }\n  });\n\n  saveBtn = createButton('Save .obj');\n  saveBtn.mousePressed(() => myModel.saveObj());\n\n  describe('A few spheres rotating in space');\n}\n\nfunction draw() {\n  background(0);\n  noStroke();\n  lights();\n  rotateX(millis() * 0.001);\n  rotateY(millis() * 0.002);\n  model(myModel);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fileName",
              "description": "The name of the file to save the model as.\nIf not specified, the default file name will be 'model.obj'.",
              "optional": 1,
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "addElement",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1264,
      "itemtype": "method",
      "description": "Helpers for create methods.",
      "example": [],
      "overloads": [
        {
          "params": []
        },
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "color",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 366,
      "itemtype": "method",
      "description": "<p>Creates a <a href=\"#/p5/p5.Color\">p5.Color</a> object.</p>\n<p>By default, the parameters are interpreted as RGB values. Calling\n<code>color(255, 204, 0)</code> will return a bright yellow color. The way these\nparameters are interpreted may be changed with the\n<a href=\"#/p5/colorMode\">colorMode()</a> function.</p>\n<p>The version of <code>color()</code> with one parameter interprets the value one of two\nways. If the parameter is a number, it's interpreted as a grayscale value.\nIf the parameter is a string, it's interpreted as a CSS color string.</p>\n<p>The version of <code>color()</code> with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.</p>\n<p>The version of <code>color()</code> with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current <code>colorMode()</code>.</p>\n<p>The version of <code>color()</code> with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current <code>colorMode()</code>. The last parameter\nsets the alpha (transparency) value.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using RGB values.\n  let c = color(255, 204, 0);\n\n  // Draw the square.\n  fill(c);\n  noStroke();\n  square(30, 20, 55);\n\n  describe('A yellow square on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using RGB values.\n  let c1 = color(255, 204, 0);\n\n  // Draw the left circle.\n  fill(c1);\n  noStroke();\n  circle(25, 25, 80);\n\n  // Create a p5.Color object using a grayscale value.\n  let c2 = color(65);\n\n  // Draw the right circle.\n  fill(c2);\n  circle(75, 75, 80);\n\n  describe(\n    'Two circles on a gray canvas. The circle in the top-left corner is yellow and the one at the bottom-right is gray.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using a named color.\n  let c = color('magenta');\n\n  // Draw the square.\n  fill(c);\n  noStroke();\n  square(20, 20, 60);\n\n  describe('A magenta square on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using a hex color code.\n  let c1 = color('#0f0');\n\n  // Draw the left rectangle.\n  fill(c1);\n  noStroke();\n  rect(0, 10, 45, 80);\n\n  // Create a p5.Color object using a hex color code.\n  let c2 = color('#00ff00');\n\n  // Draw the right rectangle.\n  fill(c2);\n  rect(55, 10, 45, 80);\n\n  describe('Two bright green rectangles on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using a RGB color string.\n  let c1 = color('rgb(0, 0, 255)');\n\n  // Draw the top-left square.\n  fill(c1);\n  square(10, 10, 35);\n\n  // Create a p5.Color object using a RGB color string.\n  let c2 = color('rgb(0%, 0%, 100%)');\n\n  // Draw the top-right square.\n  fill(c2);\n  square(55, 10, 35);\n\n  // Create a p5.Color object using a RGBA color string.\n  let c3 = color('rgba(0, 0, 255, 1)');\n\n  // Draw the bottom-left square.\n  fill(c3);\n  square(10, 55, 35);\n\n  // Create a p5.Color object using a RGBA color string.\n  let c4 = color('rgba(0%, 0%, 100%, 1)');\n\n  // Draw the bottom-right square.\n  fill(c4);\n  square(55, 55, 35);\n\n  describe('Four blue squares in the corners of a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using a HSL color string.\n  let c1 = color('hsl(160, 100%, 50%)');\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c1);\n  rect(0, 10, 45, 80);\n\n  // Create a p5.Color object using a HSLA color string.\n  let c2 = color('hsla(160, 100%, 50%, 0.5)');\n\n  // Draw the right rectangle.\n  fill(c2);\n  rect(55, 10, 45, 80);\n\n  describe('Two sea green rectangles. A darker rectangle on the left and a brighter one on the right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using a HSB color string.\n  let c1 = color('hsb(160, 100%, 50%)');\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c1);\n  rect(0, 10, 45, 80);\n\n  // Create a p5.Color object using a HSBA color string.\n  let c2 = color('hsba(160, 100%, 50%, 0.5)');\n\n  // Draw the right rectangle.\n  fill(c2);\n  rect(55, 10, 45, 80);\n\n  describe('Two green rectangles. A darker rectangle on the left and a brighter one on the right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using RGB values.\n  let c1 = color(50, 55, 100);\n\n  // Draw the left rectangle.\n  fill(c1);\n  rect(0, 10, 45, 80);\n\n  // Switch the color mode to HSB.\n  colorMode(HSB, 100);\n\n  // Create a p5.Color object using HSB values.\n  let c2 = color(50, 55, 100);\n\n  // Draw the right rectangle.\n  fill(c2);\n  rect(55, 10, 45, 80);\n\n  describe('Two blue rectangles. A darker rectangle on the left and a brighter one on the right.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "gray",
              "description": "number specifying value between white and black.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha value relative to current color range\n(default is 0-255).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "resulting color.",
            "type": "p5.Color"
          }
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value relative to\nthe current color range.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value\nrelative to the current color range.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue or brightness value\nrelative to the current color range.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Color"
          }
        },
        {
          "params": [
            {
              "name": "value",
              "description": "a color string.",
              "type": "String"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Color"
          }
        },
        {
          "params": [
            {
              "name": "values",
              "description": "an array containing the red, green, blue,\nand alpha components of the color.",
              "type": "Number[]"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Color"
          }
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Color"
          }
        }
      ],
      "return": {
        "description": "resulting color.",
        "type": "p5.Color"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "clip",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 368,
      "itemtype": "method",
      "description": "<p>Defines a shape that will mask any shapes drawn afterward.</p>\n<p>The first parameter, <code>callback</code>, is a function that defines the mask.\nAny shapes drawn in  <code>callback</code> will add to the mask shape. The mask\nwill apply to anything drawn after <code>clip()</code> is called.</p>\n<p>The second parameter, <code>options</code>, is optional. If an object with an <code>invert</code>\nproperty is passed, as in <code>beginClip({ invert: true })</code>, it will be used to\nset the masking mode. <code>{ invert: true }</code> inverts the mask, creating holes\nin shapes that are masked. <code>invert</code> is <code>false</code> by default.</p>\n<p>Masks can be contained between the\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions.\nDoing so allows unmasked shapes to be drawn after masked shapes.</p>\n<p>Masks can also be defined with <a href=\"#/p5/beginClip\">beginClip()</a>\nand <a href=\"#/p5/endClip\">endClip()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a mask.\n  clip(mask);\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n\n  describe('A white triangle and circle on a gray background.');\n}\n\n// Declare a function that defines the mask.\nfunction mask() {\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an inverted mask.\n  clip(mask, { invert: true });\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n\n  describe('A white square at the top-left corner of a gray square. The white square has a triangle and a circle cut out of it.');\n}\n\n// Declare a function that defines the mask.\nfunction mask() {\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  noStroke();\n\n  // Draw a masked shape.\n  push();\n  // Create a mask.\n  clip(mask);\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n  pop();\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw an inverted masked shape.\n  push();\n  // Create an inverted mask.\n  clip(mask, { invert: true });\n\n  // Draw a backing shape.\n  square(5, 5, 45);\n  pop();\n\n  describe('In the top left, a white triangle and circle. In the bottom right, a white square with a triangle and circle cut out of it.');\n}\n\n// Declare a function that defines the mask.\nfunction mask() {\n  triangle(15, 37, 30, 13, 43, 37);\n  circle(45, 45, 7);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A silhouette of a rotating torus colored fuchsia.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a mask.\n  clip(mask);\n\n  // Draw a backing shape.\n  noStroke();\n  fill('fuchsia');\n  plane(100);\n}\n\n// Declare a function that defines the mask.\nfunction mask() {\n  push();\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  scale(0.5);\n  torus(30, 15);\n  pop();\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A silhouette of a rotating torus colored with a gradient from cyan to purple.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a mask.\n  clip(mask);\n\n  // Draw a backing shape.\n  noStroke();\n  beginShape(QUAD_STRIP);\n  fill(0, 255, 255);\n  vertex(-width / 2, -height / 2);\n  vertex(width / 2, -height / 2);\n  fill(100, 0, 100);\n  vertex(-width / 2, height / 2);\n  vertex(width / 2, height / 2);\n  endShape();\n}\n\n// Declare a function that defines the mask.\nfunction mask() {\n  push();\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  scale(0.5);\n  torus(30, 15);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "a function that draws the mask shape.",
              "type": "Function"
            },
            {
              "name": "options",
              "description": "an object containing clip settings.",
              "optional": 1,
              "type": "Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "noiseDetail",
      "file": "src/scripts/parsers/in/p5.js/src/math/noise.js",
      "line": 368,
      "itemtype": "method",
      "description": "<p>Adjusts the character of the noise produced by the\n<a href=\"#/p5/noise\">noise()</a> function.</p>\n<p>Perlin noise values are created by adding layers of noise together. The\nnoise layers, called octaves, are similar to harmonics in music. Lower\noctaves contribute more to the output signal. They define the overall\nintensity of the noise. Higher octaves create finer-grained details.</p>\n<p>By default, noise values are created by combining four octaves. Each higher\noctave contributes half as much (50% less) compared to its predecessor.\n<code>noiseDetail()</code> changes the number of octaves and the falloff amount. For\nexample, calling <code>noiseDetail(6, 0.25)</code> ensures that\n<a href=\"#/p5/noise\">noise()</a> will use six octaves. Each higher octave\nwill contribute 25% as much (75% less) compared to its predecessor. Falloff\nvalues between 0 and 1 are valid. However, falloff values greater than 0.5\nmight result in noise values greater than 1.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Set the noise level and scale.\n  let noiseLevel = 255;\n  let noiseScale = 0.02;\n\n  // Iterate from top to bottom.\n  for (let y = 0; y < 100; y += 1) {\n    // Iterate from left to right.\n    for (let x = 0; x < 50; x += 1) {\n      // Scale the input coordinates.\n      let nx = noiseScale * x;\n      let ny = noiseScale * y;\n\n      // Compute the noise value with six octaves\n      // and a low falloff factor.\n      noiseDetail(6, 0.25);\n      let c = noiseLevel * noise(nx, ny);\n\n      // Draw the left side.\n      stroke(c);\n      point(x, y);\n\n      // Compute the noise value with four octaves\n      // and a high falloff factor.\n      noiseDetail(4, 0.5);\n      c = noiseLevel * noise(nx, ny);\n\n      // Draw the right side.\n      stroke(c);\n      point(x + 50, y);\n    }\n  }\n\n  describe('Two gray cloudy patterns. The pattern on the right is cloudier than the pattern on the left.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "lod",
              "description": "number of octaves to be used by the noise.",
              "type": "Number"
            },
            {
              "name": "falloff",
              "description": "falloff factor for each octave.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Noise"
    },
    {
      "name": "createGraphics",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 371,
      "itemtype": "method",
      "description": "<p>Creates a <a href=\"#/p5.Graphics\">p5.Graphics</a> object.</p>\n<p><code>createGraphics()</code> creates an offscreen drawing canvas (graphics buffer)\nand returns it as a <a href=\"#/p5.Graphics\">p5.Graphics</a> object. Drawing\nto a separate graphics buffer can be helpful for performance and for\norganizing code.</p>\n<p>The first two parameters, <code>width</code> and <code>height</code>, are optional. They set the\ndimensions of the <a href=\"#/p5.Graphics\">p5.Graphics</a> object. For\nexample, calling <code>createGraphics(900, 500)</code> creates a graphics buffer\nthat's 900×500 pixels.</p>\n<p>The third parameter is also optional. If either of the constants <code>P2D</code> or\n<code>WEBGL</code> is passed, as in <code>createGraphics(900, 500, WEBGL)</code>, then it will set\nthe <a href=\"#/p5.Graphics\">p5.Graphics</a> object's rendering mode. If an\nexisting\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement\" target=\"_blank\">HTMLCanvasElement</a>\nis passed, as in <code>createGraphics(900, 500, myCanvas)</code>, then it will be used\nby the graphics buffer.</p>\n<p>The fourth parameter is also optional. If an existing\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement\" target=\"_blank\">HTMLCanvasElement</a>\nis passed, as in <code>createGraphics(900, 500, WEBGL, myCanvas)</code>, then it will be\nused by the graphics buffer.</p>\n<p>Note: In WebGL mode, the <a href=\"#/p5.Graphics\">p5.Graphics</a> object\nwill use a WebGL2 context if it's supported by the browser. Check the\n<a href=\"#/p5/webglVersion\">webglVersion</a> system variable to check what\nversion is being used, or call <code>setAttributes({ version: 1 })</code> to create a\nWebGL1 context.</p>\n",
      "example": [
        "//  Double-click to draw the contents of the graphics buffer.\n\nlet pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the p5.Graphics object.\n  pg = createGraphics(50, 50);\n\n  // Draw to the graphics buffer.\n  pg.background(100);\n  pg.circle(pg.width / 2, pg.height / 2, 20);\n\n  describe('A gray square. A smaller, darker square with a white circle at its center appears when the user double-clicks.');\n}\n\n// Display the graphics buffer when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    image(pg, 25, 25);\n  }\n}",
        "//  Double-click to draw the contents of the graphics buffer.\n\nlet pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the p5.Graphics object in WebGL mode.\n  pg = createGraphics(50, 50, WEBGL);\n\n  // Draw to the graphics buffer.\n  pg.background(100);\n  pg.lights();\n  pg.noStroke();\n  pg.rotateX(QUARTER_PI);\n  pg.rotateY(QUARTER_PI);\n  pg.torus(15, 5);\n\n  describe('A gray square. A smaller, darker square with a white torus at its center appears when the user double-clicks.');\n}\n\n// Display the graphics buffer when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    image(pg, 25, 25);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the graphics buffer.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the graphics buffer.",
              "type": "Number"
            },
            {
              "name": "renderer",
              "description": "either P2D or WEBGL. Defaults to P2D.",
              "optional": 1,
              "type": "P2D|WEBGL"
            },
            {
              "name": "canvas",
              "description": "existing canvas element that should be\nused for the graphics buffer..",
              "optional": 1,
              "type": "HTMLCanvasElement"
            }
          ],
          "return": {
            "description": "new graphics buffer.",
            "type": "p5.Graphics"
          }
        },
        {
          "params": [
            {
              "name": "width",
              "description": "",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "",
              "type": "Number"
            },
            {
              "name": "canvas",
              "description": "",
              "optional": 1,
              "type": "HTMLCanvasElement"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Graphics"
          }
        }
      ],
      "return": {
        "description": "new graphics buffer.",
        "type": "p5.Graphics"
      },
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "strokeCap",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 381,
      "itemtype": "method",
      "description": "<p>Sets the style for rendering the ends of lines.</p>\n<p>The caps for line endings are either rounded (<code>ROUND</code>), squared\n(<code>SQUARE</code>), or extended (<code>PROJECT</code>). The default cap is <code>ROUND</code>.</p>\n<p>The argument passed to <code>strokeCap()</code> must be written in ALL CAPS because\nthe constants <code>ROUND</code>, <code>SQUARE</code>, and <code>PROJECT</code> are defined this way.\nJavaScript is a case-sensitive language.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  strokeWeight(12);\n\n  // Top.\n  strokeCap(ROUND);\n  line(20, 30, 80, 30);\n\n  // Middle.\n  strokeCap(SQUARE);\n  line(20, 50, 80, 50);\n\n  // Bottom.\n  strokeCap(PROJECT);\n  line(20, 70, 80, 70);\n\n  describe(\n    'Three horizontal lines. The top line has rounded ends, the middle line has squared ends, and the bottom line has longer, squared ends.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "cap",
              "description": "either ROUND, SQUARE, or PROJECT",
              "type": "ROUND|SQUARE|PROJECT"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "lerp",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 382,
      "itemtype": "method",
      "description": "<p>Calculates a number between two numbers at a specific increment.</p>\n<p>The <code>amt</code> parameter is the amount to interpolate between the two numbers.\n0.0 is equal to the first number, 0.1 is very near the first number, 0.5 is\nhalf-way in between, and 1.0 is equal to the second number. The <code>lerp()</code>\nfunction is convenient for creating motion along a straight path and for\ndrawing dotted lines.</p>\n<p>If the value of <code>amt</code> is less than 0 or more than 1, <code>lerp()</code> will return a\nnumber outside of the original interval. For example, calling\n<code>lerp(0, 10, 1.5)</code> will return 15.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Declare variables for coordinates.\n  let a = 20;\n  let b = 80;\n  let c = lerp(a, b, 0.2);\n  let d = lerp(a, b, 0.5);\n  let e = lerp(a, b, 0.8);\n\n  strokeWeight(5);\n\n  // Draw the original points in black.\n  stroke(0);\n  point(a, 50);\n  point(b, 50);\n\n  // Draw the lerped points in gray.\n  stroke(100);\n  point(c, 50);\n  point(d, 50);\n  point(e, 50);\n\n  describe('Five points in a horizontal line. The outer points are black and the inner points are gray.');\n}",
        "let x = 50;\nlet y = 50;\nlet targetX = 50;\nlet targetY = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A white circle at the center of a gray canvas. The circle moves to where the user clicks, then moves smoothly back to the center.');\n}\n\nfunction draw() {\n  background(220);\n\n  // Move x and y toward the target.\n  x = lerp(x, targetX, 0.05);\n  y = lerp(y, targetY, 0.05);\n\n  // Draw the circle.\n  circle(x, y, 20);\n}\n\n// Set x and y when the user clicks the mouse.\nfunction mouseClicked() {\n  x = mouseX;\n  y = mouseY;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "start",
              "description": "first value.",
              "type": "Number"
            },
            {
              "name": "stop",
              "description": "second value.",
              "type": "Number"
            },
            {
              "name": "amt",
              "description": "number.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "lerped value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "lerped value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "frameRate",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 386,
      "itemtype": "method",
      "description": "<p>Sets the number of frames to draw per second.</p>\n<p>Calling <code>frameRate()</code> with one numeric argument, as in <code>frameRate(30)</code>,\nattempts to draw 30 frames per second (FPS). The target frame rate may not\nbe achieved depending on the sketch's processing needs. Most computers\ndefault to a frame rate of 60 FPS. Frame rates of 24 FPS and above are\nfast enough for smooth animations.</p>\n<p>Calling <code>frameRate()</code> without an argument returns the current frame rate.\nThe value returned is an approximation.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background. The circle moves from left to right in a loop. It slows down when the mouse is pressed.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the x variable based\n  // on the current frameCount.\n  let x = frameCount % 100;\n\n  // If the mouse is pressed,\n  // decrease the frame rate.\n  if (mouseIsPressed === true) {\n    frameRate(10);\n  } else {\n    frameRate(60);\n  }\n\n  // Use x to set the circle's\n  // position.\n  circle(x, 50, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A number written in black on a gray background. The number decreases when the mouse is pressed.');\n}\n\nfunction draw() {\n  background(200);\n\n  // If the mouse is pressed, do lots\n  // of math to slow down drawing.\n  if (mouseIsPressed === true) {\n    for (let i = 0; i < 1000000; i += 1) {\n      random();\n    }\n  }\n\n  // Get the current frame rate\n  // and display it.\n  let fps = frameRate();\n  text(fps, 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fps",
              "description": "number of frames to draw per second.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [],
          "return": {
            "description": "current frame rate.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "current frame rate.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "freeGeometry",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 397,
      "itemtype": "method",
      "description": "<p>Clears a <a href=\"#/p5.Geometry\">p5.Geometry</a> object from the graphics\nprocessing unit (GPU) memory.</p>\n<p><a href=\"#/p5.Geometry\">p5.Geometry</a> objects can contain lots of data\nabout their vertices, surface normals, colors, and so on. Complex 3D shapes\ncan use lots of memory which is a limited resource in many GPUs. Calling\n<code>freeGeometry()</code> works with <a href=\"#/p5.Geometry\">p5.Geometry</a> objects\ncreated with <a href=\"#/p5/buildGeometry\">buildGeometry()</a> and\n<a href=\"#/p5/loadModel\">loadModel()</a>.</p>\n<p>The parameter, <code>geometry</code>, is the <a href=\"#/p5.Geometry\">p5.Geometry</a>\nobject to be freed.</p>\n<p>Note: A <a href=\"#/p5.Geometry\">p5.Geometry</a> object can still be drawn\nafter its resources are cleared from GPU memory. It may take longer to draw\nthe first time it’s redrawn.</p>\n<p>Note: <code>freeGeometry()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet button;\nlet particles;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a button to reset the particle system.\n  button = createButton('Reset');\n\n  // Call resetModel() when the user presses the button.\n  button.mousePressed(resetModel);\n\n  // Add the original set of particles.\n  resetModel();\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the particles.\n  noStroke();\n\n  // Draw the particles.\n  model(particles);\n}\n\nfunction resetModel() {\n  // If the p5.Geometry object has already been created,\n  // free those resources.\n  if (particles) {\n    freeGeometry(particles);\n  }\n\n  // Create a new p5.Geometry object with random spheres.\n  particles = buildGeometry(createParticles);\n}\n\nfunction createParticles() {\n  for (let i = 0; i < 60; i += 1) {\n    // Calculate random coordinates.\n    let x = randomGaussian(0, 20);\n    let y = randomGaussian(0, 20);\n    let z = randomGaussian(0, 20);\n\n    push();\n    // Translate to the particle's coordinates.\n    translate(x, y, z);\n    // Draw the particle.\n    sphere(5);\n    pop();\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "geometry",
              "description": "3D shape whose resources should be freed.",
              "type": "p5.Geometry"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "cos",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 399,
      "itemtype": "method",
      "description": "<p>Calculates the cosine of an angle.</p>\n<p><code>cos()</code> is useful for many geometric tasks in creative coding. The values\nreturned oscillate between -1 and 1 as the input angle increases. <code>cos()</code>\ncalculates the cosine of an angle, using radians by default, or according\nto if <a href=\"#/p5/angleMode\">angleMode()</a> setting (RADIANS or DEGREES).</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white ball on a string oscillates left and right.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the coordinates.\n  let x = 30 * cos(frameCount * 0.05) + 50;\n  let y = 50;\n\n  // Draw the oscillator.\n  line(50, y, x, y);\n  circle(x, y, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots form a wave pattern.');\n}\n\nfunction draw() {\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 30 * cos(x * 0.1) + 50;\n\n  // Draw the point.\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots form an infinity symbol.');\n}\n\nfunction draw() {\n  // Calculate the coordinates.\n  let x = 30 * cos(frameCount * 0.1) + 50;\n  let y = 10 * sin(frameCount * 0.2) + 50;\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "the angle, in radians by default, or according to if <a href=\"/reference/p5/angleMode/\">angleMode()</a> setting (RADIANS or DEGREES).",
              "type": "Number"
            }
          ],
          "return": {
            "description": "cosine of the angle.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "cosine of the angle.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "specularColor",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 406,
      "itemtype": "method",
      "description": "<p>Sets the specular color for lights.</p>\n<p><code>specularColor()</code> affects lights that bounce off a surface in a preferred\ndirection. These lights include\n<a href=\"#/p5/directionalLight\">directionalLight()</a>,\n<a href=\"#/p5/pointLight\">pointLight()</a>, and\n<a href=\"#/p5/spotLight\">spotLight()</a>. The function helps to create\nhighlights on <a href=\"#/p5.Geometry\">p5.Geometry</a> objects that are\nstyled with <a href=\"#/p5/specularMaterial\">specularMaterial()</a>. If a\ngeometry does not use\n<a href=\"#/p5/specularMaterial\">specularMaterial()</a>, then\n<code>specularColor()</code> will have no effect.</p>\n<p>Note: <code>specularColor()</code> doesn’t affect lights that bounce in all\ndirections, including <a href=\"#/p5/ambientLight\">ambientLight()</a> and\n<a href=\"#/p5/imageLight\">imageLight()</a>.</p>\n<p>There are three ways to call <code>specularColor()</code> with optional parameters to\nset the specular highlight color.</p>\n<p>The first way to call <code>specularColor()</code> has two optional parameters, <code>gray</code>\nand <code>alpha</code>. Grayscale and alpha values between 0 and 255, as in\n<code>specularColor(50)</code> or <code>specularColor(50, 80)</code>, can be passed to set the\nspecular highlight color.</p>\n<p>The second way to call <code>specularColor()</code> has one optional parameter,\n<code>color</code>. A <a href=\"#/p5.Color\">p5.Color</a> object, an array of color\nvalues, or a CSS color string can be passed to set the specular highlight\ncolor.</p>\n<p>The third way to call <code>specularColor()</code> has four optional parameters, <code>v1</code>,\n<code>v2</code>, <code>v3</code>, and <code>alpha</code>. RGBA, HSBA, or HSLA values, as in\n<code>specularColor(255, 0, 0, 80)</code>, can be passed to set the specular highlight\ncolor. Color values will be interpreted using the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // No specular color.\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to add a point light.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. A spotlight starts shining when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the sphere.\n  noStroke();\n  specularColor(100);\n  specularMaterial(255, 255, 255);\n\n  // Control the light.\n  if (isLit === true) {\n    // Add a white point light from the top-right.\n    pointLight(255, 255, 255, 30, -20, 40);\n  }\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Turn on the point light when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A black sphere drawn on a gray background. An area on the surface of the sphere is highlighted in blue.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a specular highlight.\n  // Use a p5.Color object.\n  let c = color('dodgerblue');\n  specularColor(c);\n\n  // Add a white point light from the top-right.\n  pointLight(255, 255, 255, 30, -20, 40);\n\n  // Style the sphere.\n  noStroke();\n\n  // Add a white specular material.\n  specularMaterial(255, 255, 255);\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A black sphere drawn on a gray background. An area on the surface of the sphere is highlighted in blue.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a specular highlight.\n  // Use a CSS color string.\n  specularColor('#1E90FF');\n\n  // Add a white point light from the top-right.\n  pointLight(255, 255, 255, 30, -20, 40);\n\n  // Style the sphere.\n  noStroke();\n\n  // Add a white specular material.\n  specularMaterial(255, 255, 255);\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A black sphere drawn on a gray background. An area on the surface of the sphere is highlighted in blue.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a specular highlight.\n  // Use RGB values.\n  specularColor(30, 144, 255);\n\n  // Add a white point light from the top-right.\n  pointLight(255, 255, 255, 30, -20, 40);\n\n  // Style the sphere.\n  noStroke();\n\n  // Add a white specular material.\n  specularMaterial(255, 255, 255);\n\n  // Draw the sphere.\n  sphere(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value between 0 and 255.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "color as a CSS string.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "values",
              "description": "color as an array of RGBA, HSBA, or HSLA\nvalues.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object.",
              "type": "p5.Color"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "createDiv",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 412,
      "itemtype": "method",
      "description": "<p>Creates a <code><div></div></code> element.</p>\n<p><code><div></div></code> elements are commonly used as containers for\nother elements.</p>\n<p>The parameter <code>html</code> is optional. It accepts a string that sets the\ninner HTML of the new <code><div></div></code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element and set its position.\n  let div = createDiv('p5*js');\n  div.position(25, 35);\n\n  describe('A gray square with the text \"p5*js\" written in its center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an h3 element within the div.\n  let div = createDiv('<h3>p5*js</h3>');\n  div.position(20, 5);\n\n  describe('A gray square with the text \"p5*js\" written in its center.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "html",
              "description": "inner HTML for the new <code><div></div></code> element.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadStrings",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 415,
      "itemtype": "method",
      "description": "<p>Loads a text file to create an <code>Array</code>.</p>\n<p>The first parameter, <code>path</code>, is always a string with the path to the file.\nPaths to local files should be relative, as in\n<code>loadStrings('assets/data.txt')</code>. URLs such as\n<code>'https://example.com/data.txt'</code> may be blocked due to browser security.\nThe <code>path</code> parameter can also be defined as a <code>Request</code>\nobject for more advanced usage.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is\npassed, as in <code>loadStrings('assets/data.txt', handleData)</code>, then the\n<code>handleData()</code> function will be called once the data loads. The array\ncreated from the text data will be passed to <code>handleData()</code> as its only\nargument. The return value of the <code>handleData()</code> function will be used as\nthe final return value of <code>loadStrings('assets/data.txt', handleData)</code>.</p>\n<p>The third parameter, <code>failureCallback</code>, is also optional. If a function is\npassed, as in <code>loadStrings('assets/data.txt', handleData, handleFailure)</code>,\nthen the <code>handleFailure()</code> function will be called if an error occurs while\nloading. The <code>Error</code> object will be passed to <code>handleFailure()</code> as its only\nargument. The return value of the <code>handleFailure()</code> function will be used as\nthe final return value of <code>loadStrings('assets/data.txt', handleData, handleFailure)</code>.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n",
      "example": [
        "let myData;\n\nasync function setup() {\n  myData = await loadStrings('assets/test.txt');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Select a random line from the text.\n  let phrase = random(myData);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display the text.\n  text(phrase, 10, 50, 90);\n\n  describe(`The text \"${phrase}\" written in black on a gray background.`);\n}",
        "let lastLine;\n\n// Load the text and preprocess it.\nasync function setup() {\n  await loadStrings('assets/test.txt', handleData);\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display the text.\n  text(lastLine, 10, 50, 90);\n\n  describe('The text \"I talk like an orange\" written in black on a gray background.');\n}\n\n// Select the last line from the text.\nfunction handleData(data) {\n  lastLine = data[data.length - 1];\n}",
        "let lastLine;\n\n// Load the text and preprocess it.\nasync function setup() {\n  await loadStrings('assets/test.txt', handleData, handleError);\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display the text.\n  text(lastLine, 10, 50, 90);\n\n  describe('The text \"I talk like an orange\" written in black on a gray background.');\n}\n\n// Select the last line from the text.\nfunction handleData(data) {\n  lastLine = data[data.length - 1];\n}\n\n// Log any errors to the console.\nfunction handleError(error) {\n  console.error('Oops!', error);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the text file to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "function to call once the data is\nloaded. Will be passed the array.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to call if the data fails to\nload. Will be passed an <code>Error</code> event\nobject.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new array containing the loaded text.",
            "type": "Promise<String[]>"
          }
        }
      ],
      "return": {
        "description": "new array containing the loaded text.",
        "type": "Promise<String[]>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "boolean",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 415,
      "itemtype": "method",
      "description": "<p>Converts a <code>String</code> or <code>Number</code> to a <code>Boolean</code>.</p>\n<p><code>boolean()</code> converts values to <code>true</code> or <code>false</code>.</p>\n<p>The parameter, <code>n</code>, is the value to convert. If <code>n</code> is a string, then\n<code>boolean('true')</code> will return <code>true</code> and every other string value will\nreturn <code>false</code>. If <code>n</code> is a number, then <code>boolean(0)</code> will return <code>false</code>\nand every other numeric value will return <code>true</code>. If an array is passed, as\n<code>in boolean([0, 1, 'true', 'blue'])</code>, then an array of Boolean values will\nbe returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 0;\n\n  // Convert the number to a Boolean value.\n  let converted = boolean(original);\n\n  // Style the circle based on the converted value.\n  if (converted === true) {\n    fill('blue');\n  } else {\n    fill('red');\n  }\n\n  // Draw the circle.\n  circle(50, 50, 40);\n\n  describe('A red circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = 'true';\n\n  // Convert the string to a Boolean value.\n  let converted = boolean(original);\n\n  // Style the circle based on the converted value.\n  if (converted === true) {\n    fill('blue');\n  } else {\n    fill('red');\n  }\n\n  // Draw the circle.\n  circle(50, 50, 40);\n\n  describe('A blue circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of values.\n  let original = [0, 'hi', 123, 'true'];\n\n  // Convert the array to a Boolean values.\n  let converted = boolean(original);\n\n  // Iterate over the array of converted Boolean values.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Style the circle based on the converted value.\n    if (converted[i] === true) {\n      fill('blue');\n    } else {\n      fill('red');\n    }\n\n    // Calculate the x-coordinate.\n    let x = (i + 1) * 20;\n\n    // Draw the circle.\n    circle(x, 50, 15);\n  }\n\n  describe(\n    'A row of circles on a gray background. The two circles on the left are red and the two on the right are blue.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String|Boolean|Number"
            }
          ],
          "return": {
            "description": "converted Boolean value.",
            "type": "Boolean"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "Array"
            }
          ],
          "return": {
            "description": "converted Boolean values.",
            "type": "Boolean[]"
          }
        }
      ],
      "return": {
        "description": "converted Boolean value.",
        "type": "Boolean"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "rotate",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 421,
      "itemtype": "method",
      "description": "<p>Rotates the coordinate system.</p>\n<p>By default, the positive x-axis points to the right and the positive y-axis\npoints downward. The <code>rotate()</code> function changes this orientation by\nrotating the coordinate system about the origin. Everything drawn after\n<code>rotate()</code> is called will appear to be rotated.</p>\n<p>The first parameter, <code>angle</code>, is the amount to rotate. For example, calling\n<code>rotate(1)</code> rotates the coordinate system clockwise 1 radian which is\nnearly 57˚. <code>rotate()</code> interprets angle values using the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>The second parameter, <code>axis</code>, is optional. It's used to orient 3D rotations\nin WebGL mode. If a <a href=\"#/p5.Vector\">p5.Vector</a> is passed, as in\n<code>rotate(QUARTER_PI, myVector)</code>, then the coordinate system will rotate\n<code>QUARTER_PI</code> radians about <code>myVector</code>. If an array of vector components is\npassed, as in <code>rotate(QUARTER_PI, [1, 0, 0])</code>, then the coordinate system\nwill rotate <code>QUARTER_PI</code> radians about a vector with the components\n<code>[1, 0, 0]</code>.</p>\n<p>By default, transformations accumulate. For example, calling <code>rotate(1)</code>\ntwice has the same effect as calling <code>rotate(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>rotate(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't cause\nshapes to spin.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    \"A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/8 turn.\n  rotate(QUARTER_PI);\n\n  // Draw a rectangle at coordinates (50, 0).\n  rect(50, 0, 40, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    \"A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/16 turn.\n  rotate(QUARTER_PI / 2);\n\n  // Rotate the coordinate system another 1/16 turn.\n  rotate(QUARTER_PI / 2);\n\n  // Draw a rectangle at coordinates (50, 0).\n  rect(50, 0, 40, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe(\n    \"A white rectangle on a gray background. The rectangle's long axis runs from top-left to bottom-right.\"\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/8 turn.\n  rotate(45);\n\n  // Draw a rectangle at coordinates (50, 0).\n  rect(50, 0, 40, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white rectangle on a gray background. The rectangle rotates slowly about the top-left corner. It disappears and reappears periodically.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system a little more each frame.\n  let angle = frameCount * 0.01;\n  rotate(angle);\n\n  // Draw a rectangle at coordinates (50, 0).\n  rect(50, 0, 40, 20);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\"A cube on a gray background. The cube's front face points to the top-right.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/8 turn about\n  // the axis [1, 1, 0].\n  let axis = createVector(1, 1, 0);\n  rotate(QUARTER_PI, axis);\n\n  // Draw a box.\n  box();\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\"A cube on a gray background. The cube's front face points to the top-right.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate the coordinate system 1/8 turn about\n  // the axis [1, 1, 0].\n  let axis = [1, 1, 0];\n  rotate(QUARTER_PI, axis);\n\n  // Draw a box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            },
            {
              "name": "axis",
              "description": "axis to rotate about in 3D.",
              "optional": 1,
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "removeItem",
      "file": "src/scripts/parsers/in/p5.js/src/data/local_storage.js",
      "line": 422,
      "itemtype": "method",
      "description": "<p>Removes an item from the web browser's local storage.</p>\n<p>Web browsers can save small amounts of data using the built-in\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage\" target=\"_blank\">localStorage object</a>.\nData stored in <code>localStorage</code> can be retrieved at any point, even after\nrefreshing a page or restarting the browser. Data are stored as key-value\npairs.</p>\n<p><a href=\"#/p5/storeItem\">storeItem()</a> makes it easy to store values in\n<code>localStorage</code> and <code>removeItem()</code> makes it easy to delete them.</p>\n<p>The parameter, <code>key</code>, is the name of the value to remove as a string. For\nexample, calling <code>removeItem('size')</code> removes the item with the key <code>size</code>.</p>\n<p>Note: Sensitive data such as passwords or personal information shouldn't be\nstored in <code>localStorage</code>.</p>\n",
      "example": [
        "// Double-click to remove an item from localStorage.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Store the player's name.\n  storeItem('name', 'Feist');\n\n  // Store the player's score.\n  storeItem('score', 1234);\n\n  describe(\n    'The text \"Feist: 1234\" written in black on a gray background. The text \"Feist: null\" appears when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Retrieve the name.\n  let name = getItem('name');\n\n  // Retrieve the score.\n  let score = getItem('score');\n\n  // Display the score.\n  text(`${name}: ${score}`, 50, 50);\n}\n\n// Remove the word from localStorage when the user double-clicks.\nfunction doubleClicked() {\n  removeItem('score');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "key",
              "description": "name of the value to remove.",
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "LocalStorage"
    },
    {
      "name": "setMoveThreshold",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 426,
      "itemtype": "method",
      "description": "The <a href=\"#/p5/setMoveThreshold\">setMoveThreshold()</a> function is used to set the movement threshold for\nthe <a href=\"#/p5/deviceMoved\">deviceMoved()</a> function. The default threshold is set to 0.5.",
      "example": [
        "// META:norender\n// Run this example on a mobile device\n// You will need to move the device incrementally further\n// the closer the square's color gets to white in order to change the value.\n\nlet value = 0;\nlet threshold = 0.5;\nfunction setup() {\n  setMoveThreshold(threshold);\n}\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device moves`);\n}\nfunction deviceMoved() {\n  value = value + 5;\n  threshold = threshold + 0.1;\n  if (value > 255) {\n    value = 0;\n    threshold = 30;\n  }\n  setMoveThreshold(threshold);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "The threshold value",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Acceleration"
    },
    {
      "name": "bezierTangent",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 427,
      "itemtype": "method",
      "description": "<p>Calculates coordinates along a line that's tangent to a Bézier curve.</p>\n<p>Tangent lines skim the surface of a curve. A tangent line's slope equals\nthe curve's slope at the point where it intersects.</p>\n<p><code>bezierTangent()</code> calculates coordinates along a tangent line using the\nBézier curve's anchor and control points. It expects points in the same\norder as the <a href=\"#/p5/bezier\">bezier()</a> function. <code>bezierTangent()</code>\nworks one axis at a time. Passing the anchor and control points'\nx-coordinates will calculate the x-coordinate of a point on the tangent\nline. Passing the anchor and control points' y-coordinates will calculate\nthe y-coordinate of a point on the tangent line.</p>\n<p>The first parameter, <code>a</code>, is the coordinate of the first anchor point.</p>\n<p>The second and third parameters, <code>b</code> and <code>c</code>, are the coordinates of the\ncontrol points.</p>\n<p>The fourth parameter, <code>d</code>, is the coordinate of the last anchor point.</p>\n<p>The fifth parameter, <code>t</code>, is the amount to interpolate along the curve. 0\nis the first anchor point, 1 is the second anchor point, and 0.5 is halfway\nbetween them.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the coordinates for the curve's anchor and control points.\n  let x1 = 85;\n  let x2 = 10;\n  let x3 = 90;\n  let x4 = 15;\n  let y1 = 20;\n  let y2 = 10;\n  let y3 = 90;\n  let y4 = 80;\n\n  // Style the curve.\n  noFill();\n\n  // Draw the curve.\n  bezier(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Draw tangents along the curve's path.\n  fill(255);\n\n  // Top-right circle.\n  stroke(0);\n  let x = bezierPoint(x1, x2, x3, x4, 0);\n  let y = bezierPoint(y1, y2, y3, y4, 0);\n  circle(x, y, 5);\n\n  // Top-right tangent line.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  let tx = 0.1 * bezierTangent(x1, x2, x3, x4, 0);\n  let ty = 0.1 * bezierTangent(y1, y2, y3, y4, 0);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  // Center circle.\n  stroke(0);\n  x = bezierPoint(x1, x2, x3, x4, 0.5);\n  y = bezierPoint(y1, y2, y3, y4, 0.5);\n  circle(x, y, 5);\n\n  // Center tangent line.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  tx = 0.1 * bezierTangent(x1, x2, x3, x4, 0.5);\n  ty = 0.1 * bezierTangent(y1, y2, y3, y4, 0.5);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  // Bottom-left circle.\n  stroke(0);\n  x = bezierPoint(x1, x2, x3, x4, 1);\n  y = bezierPoint(y1, y2, y3, y4, 1);\n  circle(x, y, 5);\n\n  // Bottom-left tangent.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  tx = 0.1 * bezierTangent(x1, x2, x3, x4, 1);\n  ty = 0.1 * bezierTangent(y1, y2, y3, y4, 1);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  describe(\n    'A black s-curve on a gray square. The endpoints and center of the curve are marked with white circles. Red tangent lines extend from the white circles.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "a",
              "description": "coordinate of first anchor point.",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "coordinate of first control point.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "coordinate of second control point.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "coordinate of second anchor point.",
              "type": "Number"
            },
            {
              "name": "t",
              "description": "amount to interpolate between 0 and 1.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "coordinate of a point on the tangent line.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "coordinate of a point on the tangent line.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "noiseSeed",
      "file": "src/scripts/parsers/in/p5.js/src/math/noise.js",
      "line": 431,
      "itemtype": "method",
      "description": "<p>Sets the seed value for the <a href=\"#/p5/noise\">noise()</a> function.</p>\n<p>By default, <a href=\"#/p5/noise\">noise()</a> produces different results\neach time a sketch is run. Calling <code>noiseSeed()</code> with a constant argument,\nsuch as <code>noiseSeed(99)</code>, makes <a href=\"#/p5/noise\">noise()</a> produce the\nsame results each time a sketch is run.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the noise seed for consistent results.\n  noiseSeed(99);\n\n  describe('A black rectangle that grows randomly, first to the right and then to the left.');\n}\n\nfunction draw() {\n  // Set the noise level and scale.\n  let noiseLevel = 100;\n  let noiseScale = 0.005;\n\n  // Scale the input coordinate.\n  let nt = noiseScale * frameCount;\n\n  // Compute the noise value.\n  let x = noiseLevel * noise(nt);\n\n  // Draw the line.\n  line(x, 0, x, height);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "seed",
              "description": "seed value.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Noise"
    },
    {
      "name": "ellipse",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 432,
      "itemtype": "method",
      "description": "<p>Draws an ellipse (oval).</p>\n<p>An ellipse is a round shape defined by the <code>x</code>, <code>y</code>, <code>w</code>, and\n<code>h</code> parameters. <code>x</code> and <code>y</code> set the location of its center. <code>w</code> and\n<code>h</code> set its width and height. See\n<a href=\"#/p5/ellipseMode\">ellipseMode()</a> for other ways to set\nits position.</p>\n<p>If no height is set, the value of width is used for both the width and\nheight. If a negative height or width is specified, the absolute value is\ntaken.</p>\n<p>The fifth parameter, <code>detail</code>, is also optional. It determines how many\nvertices are used to draw the ellipse in WebGL mode. The default value is\n25.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  ellipse(50, 50, 80, 80);\n\n  describe('A white circle on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  ellipse(50, 50, 80);\n\n  describe('A white circle on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  ellipse(50, 50, 80, 40);\n\n  describe('A white ellipse on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  ellipse(0, 0, 80, 40);\n\n  describe('A white ellipse on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Use 6 vertices.\n  ellipse(0, 0, 80, 40, 6);\n\n  describe('A white hexagon on a gray canvas.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the center of the ellipse.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the center of the ellipse.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the ellipse.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the ellipse.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "",
              "type": "Number"
            },
            {
              "name": "detail",
              "description": "optional parameter for WebGL mode only. This is to\nspecify the number of vertices that makes up the\nperimeter of the ellipse. Default value is 25. Won't\ndraw a stroke for a detail of more than 50.",
              "optional": 1,
              "type": "Integer"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "log",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 436,
      "itemtype": "method",
      "description": "<p>Calculates the natural logarithm (the base-e logarithm) of a number.</p>\n<p><code>log()</code> expects the <code>n</code> parameter to be a value greater than 0 because\nthe natural logarithm is defined that way.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top-left.\n  let d = log(50);\n  circle(33, 33, d);\n\n  // Bottom-right.\n  d = log(500000000);\n  circle(67, 67, d);\n\n  describe('Two white circles. The circle at the top-left is small. The circle at the bottom-right is about five times larger.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots that get higher slowly from left to right.');\n}\n\nfunction draw() {\n  // Invert the y-axis.\n  scale(1, -1);\n  translate(0, -100);\n\n  // Calculate coordinates.\n  let x = frameCount;\n  let y = 15 * log(x);\n\n  // Draw a point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number greater than 0.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "natural logarithm of n.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "natural logarithm of n.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "createP",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 443,
      "itemtype": "method",
      "description": "<p>Creates a paragraph element.</p>\n<p><code><p></p></code> elements are commonly used for paragraph-length text.</p>\n<p>The parameter <code>html</code> is optional. It accepts a string that sets the\ninner HTML of the new <code><p></p></code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and set its position.\n  let p = createP('Tell me a story.');\n  p.position(5, 0);\n\n  describe('A gray square displaying the text \"Tell me a story.\" written in black.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "html",
              "description": "inner HTML for the new <code><p></p></code> element.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "createShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 451,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Shader\">p5.Shader</a> object using GLSL.</p>\n<p>If you are interested in writing shaders, consider using p5.strands shaders using\n<a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader</code><a>,\n<a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader</code></a>, or\n<a href=\"#/p5/buildFilterShader\"><code>buildFilterShader</code></a>.\nWith p5.strands, you can modify existing shaders using JavaScript. With\n<code>createShader</code>, shaders are made from scratch, and are written in GLSL. This\nwill be most useful for advanced cases, and for authors of add-on libraries.</p>\n<p>Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels at the same time, making them fast for many\ngraphics tasks.</p>\n<p>Once the <a href=\"#/p5.Shader\">p5.Shader</a> object is created, it can be\nused with the <a href=\"#/p5/shader\">shader()</a> function, as in\n<code>shader(myShader)</code>. A GLSL shader program consists of two parts, a vertex shader\nand a fragment shader. The vertex shader affects where 3D geometry is drawn\non the screen and the fragment shader affects color.</p>\n<p>The first parameter, <code>vertSrc</code>, sets the vertex shader. It’s a string that\ncontains the vertex shader program written in GLSL.</p>\n<p>The second parameter, <code>fragSrc</code>, sets the fragment shader. It’s a string\nthat contains the fragment shader program written in GLSL.</p>\n<p>Here is a simple example with a simple vertex shader that applies whatevre\ntransformations have been set, and a simple fragment shader that ignores\nall material settings and just outputs yellow:</p>\n<pre><code class=\"language-js example\">// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision highp float;\n\nvoid main() {\n  // Set each pixel's RGBA value to yellow.\n  gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n}\n`;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  let shaderProgram = createShader(vertSrc, fragSrc);\n\n  // Compile and apply the p5.Shader object.\n  shader(shaderProgram);\n\n  // Style the drawing surface.\n  noStroke();\n\n  // Add a plane as a drawing surface.\n  plane(100, 100);\n\n  describe('A yellow square.');\n}</code></pre><p>Fragment shaders are often the fastest way to dynamically create per-pixel textures.\nHere is an example of a fractal being drawn in the fragment shader. It also creates custom\nuniform variables in the shader, which can be set from your main sketch code. By passing\nthe time in as a uniform, we can animate the fractal in the shader.</p>\n<pre><code class=\"language-js example\">// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision highp float;\nuniform vec2 p;\nuniform float r;\nconst int numIterations = 500;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec2 c = p + gl_FragCoord.xy * r;\n  vec2 z = c;\n  float n = 0.0;\n\n  for (int i = numIterations; i &gt; 0; i--) {\n    if (z.x * z.x + z.y * z.y &gt; 4.0) {\n      n = float(i) / float(numIterations);\n      break;\n    }\n\n    z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + c;\n  }\n\n  gl_FragColor = vec4(\n    0.5 - cos(n * 17.0) / 2.0,\n    0.5 - cos(n * 13.0) / 2.0,\n    0.5 - cos(n * 23.0) / 2.0,\n    1.0\n  );\n}\n`;\n\nlet mandelbrot;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  mandelbrot = createShader(vertSrc, fragSrc);\n\n  // Apply the p5.Shader object.\n  shader(mandelbrot);\n\n  // Set the shader uniform p to an array.\n  // p is the center point of the Mandelbrot image.\n  mandelbrot.setUniform('p', [-0.74364388703, 0.13182590421]);\n\n  describe('A fractal image zooms in and out of focus.');\n}\n\nfunction draw() {\n  // Set the shader uniform r to a value that oscillates\n  // between 0 and 0.005.\n  // r is the size of the image in Mandelbrot-space.\n  let radius = 0.005 * (sin(frameCount * 0.01) + 1);\n  mandelbrot.setUniform('r', radius);\n\n  // Add a plane as a drawing surface.\n  noStroke();\n  plane(100, 100);\n}</code></pre><p>A shader can optionally describe hooks, which are functions in GLSL that\nusers may choose to provide to customize the behavior of the shader using the\n<a href=\"#/p5.Shader/modify\"><code>modify()</code></a> method of <code>p5.Shader</code>. Users can\nwrite their modifications using p5.strands, without needing to learn GLSL.</p>\n<p>These are added by\ndescribing the hooks in a third parameter, <code>options</code>, and referencing the hooks in\nyour <code>vertSrc</code> or <code>fragSrc</code>. Hooks for the vertex or fragment shader are described under\nthe <code>vertex</code> and <code>fragment</code> keys of <code>options</code>. Each one is an object. where each key is\nthe type and name of a hook function, and each value is a string with the\nparameter list and default implementation of the hook. For example, to let users\noptionally run code at the start of the vertex shader, the options object could\ninclude:</p>\n<pre><code class=\"language-js\">{\n  vertex: {\n    'void beforeVertex': '() {}'\n  }\n}</code></pre><p>Then, in your vertex shader source, you can run a hook by calling a function\nwith the same name prefixed by <code>HOOK_</code>. If you want to check if the default\nhook has been replaced, maybe to avoid extra overhead, you can check if the\nsame name prefixed by <code>AUGMENTED_HOOK_</code> has been defined:</p>\n<pre><code class=\"language-glsl\">void main() {\n  // In most cases, just calling the hook is fine:\n  HOOK_beforeVertex();\n\n  // Alternatively, for more efficiency:\n  #ifdef AUGMENTED_HOOK_beforeVertex\n  HOOK_beforeVertex();\n  #endif\n\n  // Add the rest of your shader code here!\n}</code></pre><p>Then, a user of your shader can modify it with p5.strands. Here is what\nthat looks like when we put everything together:</p>\n<pre><code class=\"language-js example\">// A shader with hooks.\nlet myShader;\n\n// A shader with modified hooks.\nlet modifiedShader;\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\n\nvoid main() {\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a fragment shader that uses a hook.\nlet fragSrc = `\nprecision highp float;\nvoid main() {\n  // Let users override the color\n  gl_FragColor = HOOK_getColor(vec4(1., 0., 0., 1.));\n}\n`;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a shader with hooks. By default, this hook returns\n  // the initial value.\n  myShader = createShader(vertSrc, fragSrc, {\n    fragment: {\n      'vec4 getColor': '(vec4 color) { return color; }'\n    }\n  });\n\n  // Make a version of the shader with a hook overridden\n  modifiedShader = myShader.modify(() =&gt; {\n    // Create new uniforms and override the getColor hook\n    let t = millis() / 1000;\n    getColor(() =&gt; {\n      return [0, 0.5 + 0.5 * sin(t), 1, 1];\n    });\n  });\n}\n\nfunction draw() {\n  noStroke();\n\n  push();\n  shader(myShader);\n  translate(-width/3, 0);\n  sphere(20);\n  pop();\n\n  push();\n  shader(modifiedShader);\n  translate(width/3, 0);\n  sphere(20);\n  pop();\n}</code></pre><p>Note: Only filter shaders can be used in 2D mode. All shaders can be used\nin WebGL mode.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "vertSrc",
              "description": "source code for the vertex shader.",
              "type": "String"
            },
            {
              "name": "fragSrc",
              "description": "source code for the fragment shader.",
              "type": "String"
            },
            {
              "name": "options",
              "description": "An optional object describing how this shader can\nbe augmented with hooks. It can include:",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "new shader object created from the\nvertex and fragment shaders.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "new shader object created from the\nvertex and fragment shaders.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "getTargetFrameRate",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 452,
      "itemtype": "method",
      "description": "<p>Returns the target frame rate.</p>\n<p>The value is either the system frame rate or the last value passed to\n<a href=\"#/p5/frameRate\">frameRate()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('The number 20 written in black on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the frame rate to 20.\n  frameRate(20);\n\n  // Get the target frame rate and\n  // display it.\n  let fps = getTargetFrameRate();\n  text(fps, 43, 54);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "_targetFrameRate",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "_targetFrameRate",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "nfs",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 460,
      "itemtype": "method",
      "description": "<p>Converts a positive <code>Number</code> into a <code>String</code> with an extra space in front.</p>\n<p><code>nfs()</code> converts positive numbers such as 123.45 into strings formatted\nwith an extra space in front, as in ' 123.45'. Doing so can be helpful for\naligning positive and negative numbers.</p>\n<p>The first parameter, <code>num</code>, is the number to convert to a string. For\nexample, calling <code>nfs(123.45)</code> returns the string <code>' 123.45'</code>.</p>\n<p>The second parameter, <code>left</code>, is optional. If a number is passed, as in\n<code>nfs(123.45, 4)</code>, it sets the minimum number of digits to include to the\nleft of the decimal place. If <code>left</code> is larger than the number of digits in\n<code>num</code>, then unused digits will be set to 0. For example, calling\n<code>nfs(123.45, 4)</code> returns the string <code>' 0123.45'</code>.</p>\n<p>The third parameter, <code>right</code>, is also optional. If a number is passed, as\nin <code>nfs(123.45, 4, 1)</code>, it sets the minimum number of digits to include to\nthe right of the decimal place. If <code>right</code> is smaller than the number of\ndecimal places in <code>num</code>, then <code>num</code> will be rounded to the given number of\ndecimal places.  For example, calling <code>nfs(123.45, 4, 1)</code> returns the\nstring <code>' 0123.5'</code>. If <code>right</code> is larger than the number of decimal places\nin <code>num</code>, then unused decimal places will be set to 0.  For example,\ncalling <code>nfs(123.45, 4, 3)</code> returns the string <code>' 0123.450'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create number variables.\n  let positive = 123;\n  let negative = -123;\n\n  // Convert the positive number to a formatted string.\n  let formatted = nfs(positive);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(16);\n\n  // Display the negative number and the formatted positive number.\n  text(negative, 50, 33);\n  text(formatted, 50, 67);\n\n  describe(\n    'The numbers -123 and 123 written on separate lines. The numbers align vertically. The text is in black on a gray background.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let number = 123.45;\n\n  // Convert the positive number to a formatted string.\n  // Use four digits to the left of the decimal and\n  // one digit to the right.\n  let formatted = nfs(number, 4, 1);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(16);\n\n  // Display a negative version of the number and\n  // the formatted positive version.\n  text('-0123.5', 50, 33);\n  text(formatted, 50, 67);\n\n  describe(\n    'The numbers \"-0123.5\" and \"0123.5\" written on separate lines. The numbers align vertically. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "num",
              "description": "number to format.",
              "type": "Number"
            },
            {
              "name": "left",
              "description": "number of digits to include to the left of the\ndecimal point.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "right",
              "description": "number of digits to include to the right of the\ndecimal point.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "return": {
            "description": "formatted string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to format.",
              "type": "Array"
            },
            {
              "name": "left",
              "description": "",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "right",
              "description": "",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "return": {
            "description": "formatted strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "formatted string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "setShakeThreshold",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 463,
      "itemtype": "method",
      "description": "The <a href=\"#/p5/setShakeThreshold\">setShakeThreshold()</a> function is used to set the movement threshold for\nthe <a href=\"#/p5/deviceShaken\">deviceShaken()</a> function. The default threshold is set to 30.",
      "example": [
        "// META:norender\n// Run this example on a mobile device\n// You will need to shake the device more firmly\n// the closer the box's fill gets to white in order to change the value.\n\nlet value = 0;\nlet threshold = 30;\nfunction setup() {\n  setShakeThreshold(threshold);\n}\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device is being shaked`);\n}\nfunction deviceMoved() {\n  value = value + 5;\n  threshold = threshold + 5;\n  if (value > 255) {\n    value = 0;\n    threshold = 30;\n  }\n  setShakeThreshold(threshold);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "The threshold value",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Acceleration"
    },
    {
      "name": "saveStl",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 468,
      "itemtype": "method",
      "description": "<p>The <code>saveStl()</code> function exports <code>p5.Geometry</code> objects as\n3D models in the STL stereolithography file format.\nThis way, you can use the 3D shapes you create in p5.js in other software\nfor rendering, animation, 3D printing, or more.</p>\n<p>The exported .stl file will include the faces, vertices, and normals of the <code>p5.Geometry</code>.</p>\n<p>By default, this method saves a text-based .stl file. Alternatively, you can save a more compact\nbut less human-readable binary .stl file by passing <code>{ binary: true }</code> as a second parameter.</p>\n",
      "example": [
        "let myModel;\nlet saveBtn1;\nlet saveBtn2;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myModel = buildGeometry(function() {\n    for (let i = 0; i < 5; i++) {\n      push();\n      translate(\n        random(-75, 75),\n        random(-75, 75),\n        random(-75, 75)\n      );\n      sphere(random(5, 50));\n      pop();\n    }\n  });\n\n  saveBtn1 = createButton('Save .stl');\n  saveBtn1.mousePressed(function() {\n    myModel.saveStl();\n  });\n  saveBtn2 = createButton('Save binary .stl');\n  saveBtn2.mousePressed(function() {\n    myModel.saveStl('model.stl', { binary: true });\n  });\n\n  describe('A few spheres rotating in space');\n}\n\nfunction draw() {\n  background(0);\n  noStroke();\n  lights();\n  rotateX(millis() * 0.001);\n  rotateY(millis() * 0.002);\n  model(myModel);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fileName",
              "description": "The name of the file to save the model as.\nIf not specified, the default file name will be 'model.stl'.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "options",
              "description": "Optional settings.",
              "optional": 1,
              "type": "Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "sin",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 470,
      "itemtype": "method",
      "description": "<p>Calculates the sine of an angle.</p>\n<p><code>sin()</code> is useful for many geometric tasks in creative coding. The values\nreturned oscillate between -1 and 1 as the input angle increases. <code>sin()</code>\ncalculates the sine of an angle, using radians by default, or according to\nif <a href=\"#/p5/angleMode\">angleMode()</a> setting (RADIANS or DEGREES).</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white ball on a string oscillates up and down.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the coordinates.\n  let x = 50;\n  let y = 30 * sin(frameCount * 0.05) + 50;\n\n  // Draw the oscillator.\n  line(50, y, x, y);\n  circle(x, y, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots form a wave pattern.');\n}\n\nfunction draw() {\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 30 * sin(x * 0.1) + 50;\n\n  // Draw the point.\n  point(x, y);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots form an infinity symbol.');\n}\n\nfunction draw() {\n  // Calculate the coordinates.\n  let x = 30 * cos(frameCount * 0.1) + 50;\n  let y = 10 * sin(frameCount * 0.2) + 50;\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "the angle, in radians by default, or according to if <a href=\"/reference/p5/angleMode/\">angleMode()</a> setting (RADIANS or DEGREES).",
              "type": "Number"
            }
          ],
          "return": {
            "description": "sine of the angle.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "sine of the angle.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "strokeJoin",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 470,
      "itemtype": "method",
      "description": "<p>Sets the style of the joints that connect line segments.</p>\n<p>Joints are either mitered (<code>MITER</code>), beveled (<code>BEVEL</code>), or rounded\n(<code>ROUND</code>). The default joint is <code>MITER</code> in 2D mode and <code>ROUND</code> in WebGL\nmode.</p>\n<p>The argument passed to <code>strokeJoin()</code> must be written in ALL CAPS because\nthe constants <code>MITER</code>, <code>BEVEL</code>, and <code>ROUND</code> are defined this way.\nJavaScript is a case-sensitive language.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the line.\n  noFill();\n  strokeWeight(10);\n  strokeJoin(MITER);\n\n  // Draw the line.\n  beginShape();\n  vertex(35, 20);\n  vertex(65, 50);\n  vertex(35, 80);\n  endShape();\n\n  describe('A right-facing arrowhead shape with a pointed tip in center of canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the line.\n  noFill();\n  strokeWeight(10);\n  strokeJoin(BEVEL);\n\n  // Draw the line.\n  beginShape();\n  vertex(35, 20);\n  vertex(65, 50);\n  vertex(35, 80);\n  endShape();\n\n  describe('A right-facing arrowhead shape with a flat tip in center of canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the line.\n  noFill();\n  strokeWeight(10);\n  strokeJoin(ROUND);\n\n  // Draw the line.\n  beginShape();\n  vertex(35, 20);\n  vertex(65, 50);\n  vertex(35, 80);\n  endShape();\n\n  describe('A right-facing arrowhead shape with a rounded tip in center of canvas.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "join",
              "description": "either MITER, BEVEL, or ROUND",
              "type": "MITER|BEVEL|ROUND"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "noCursor",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 474,
      "itemtype": "method",
      "description": "Hides the cursor from view.",
      "example": [
        "function setup() {\n  // Hide the cursor.\n  noCursor();\n}\n\nfunction draw() {\n  background(200);\n\n  circle(mouseX, mouseY, 10);\n\n  describe('A white circle on a gray background. The circle follows the mouse as it moves. The cursor is hidden.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "circle",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 474,
      "itemtype": "method",
      "description": "<p>Draws a circle.</p>\n<p>A circle is a round shape defined by the <code>x</code>, <code>y</code>, and <code>d</code> parameters.\n<code>x</code> and <code>y</code> set the location of its center. <code>d</code> sets its width and height (diameter).\nEvery point on the circle's edge is the same distance, <code>0.5 * d</code>, from its center.\n<code>0.5 * d</code> (half the diameter) is the circle's radius.\nSee <a href=\"#/p5/ellipseMode\">ellipseMode()</a> for other ways to set its position.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  circle(50, 50, 25);\n\n  describe('A white circle with black outline in the middle of a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  circle(0, 0, 25);\n\n  describe('A white circle with black outline in the middle of a gray canvas.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the center of the circle.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the center of the circle.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "diameter of the circle.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "mag",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 482,
      "itemtype": "method",
      "description": "<p>Calculates the magnitude, or length, of a vector.</p>\n<p>A vector can be thought of in different ways. In one view, a vector is a\npoint in space. The vector's components, <code>x</code> and <code>y</code>, are the point's\ncoordinates <code>(x, y)</code>. A vector's magnitude is the distance from the origin\n<code>(0, 0)</code> to <code>(x, y)</code>. <code>mag(x, y)</code> is a shortcut for calling\n<code>dist(0, 0, x, y)</code>.</p>\n<p>A vector can also be thought of as an arrow pointing in space. This view is\nhelpful for programming motion. See <a href=\"#/p5.Vector\">p5.Vector</a> for\nmore details.</p>\n<p>Use <a href=\"#/p5.Vector/mag\">p5.Vector.mag()</a> to calculate the\nmagnitude of a <a href=\"#/p5.Vector\">p5.Vector</a> object.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the vector's components.\n  let x = 30;\n  let y = 40;\n\n  // Calculate the magnitude.\n  let m = mag(x, y);\n\n  // Style the text.\n  textSize(16);\n\n  // Display the vector and its magnitude.\n  line(0, 0, x, y);\n  text(m, x, y);\n\n  describe('A diagonal line is drawn from the top left of the canvas. The number 50 is written at the end of the line.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "first component.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "second component.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "magnitude of vector.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "magnitude of vector.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "loadTable",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 488,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "<p>Reads the contents of a file or URL and creates a <a href=\"#/p5.Table\">p5.Table</a> object with\nits values. If a file is specified, it must be located in the sketch's\n\"data\" folder. The filename parameter can also be a URL to a file found\nonline. By default, the file is assumed to be comma-separated (in CSV\nformat). Table only looks for a header row if the 'header' option is\nincluded.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n<p>All files loaded and saved use UTF-8 encoding. This method is suitable for fetching files up to size of 64MB.</p>\n",
      "example": [
        "// META:norender\nlet table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Get the second row (index 1)\n  let row = table.getRow(1);\n\n  // Set text properties\n  fill(0);       // Set text color to black\n  textSize(16);  // Adjust text size as needed\n\n  // Display each column value in the row on the canvas.\n  // Using an offset for y-position so each value appears on a new line.\n  for (let c = 0; c < table.getColumnCount(); c++) {\n    text(row.getString(c), 10, 30 + c * 20);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filename",
              "description": "name of the file or URL to load",
              "type": "String|Request"
            },
            {
              "name": "separator",
              "description": "the separator character used by the file, defaults to <code>','</code>",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "header",
              "description": "\"header\" to indicate table has header row",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "callback",
              "description": "function to be executed after\n<a href=\"#/p5/loadTable\">loadTable()</a> completes. On success, the\n<a href=\"#/p5.Table\">Table</a> object is passed in as the\nfirst argument.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "<a href=\"#/p5.Table\">Table</a> object containing data",
            "type": "Promise<Object>"
          }
        }
      ],
      "return": {
        "description": "<a href=\"#/p5.Table\">Table</a> object containing data",
        "type": "Promise<Object>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "plane",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 493,
      "itemtype": "method",
      "description": "<p>Draws a plane.</p>\n<p>A plane is a four-sided, flat shape with every angle measuring 90˚. It’s\nsimilar to a rectangle and offers advanced drawing features in WebGL mode.</p>\n<p>The first parameter, <code>width</code>, is optional. If a <code>Number</code> is passed, as in\n<code>plane(20)</code>, it sets the plane’s width and height. By default, <code>width</code> is\n50.</p>\n<p>The second parameter, <code>height</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>plane(20, 30)</code>, it sets the plane’s height. By default, <code>height</code> is\nset to the plane’s <code>width</code>.</p>\n<p>The third parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>plane(20, 30, 5)</code> it sets the number of triangle subdivisions to use\nalong the x-axis. All 3D shapes are made by connecting triangles to form\ntheir surfaces. By default, <code>detailX</code> is 1.</p>\n<p>The fourth parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>plane(20, 30, 5, 7)</code> it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, <code>detailY</code> is 1.</p>\n<p>Note: <code>plane()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white plane on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the plane.\n  plane();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white plane on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the plane.\n  // Set its width and height to 30.\n  plane(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white plane on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the plane.\n  // Set its width to 30 and height to 50.\n  plane(30, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the plane.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the plane.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of triangle subdivisions along the x-axis.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "red",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 497,
      "itemtype": "method",
      "description": "<p>Gets the red value of a color.</p>\n<p><code>red()</code> extracts the red value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>By default, <code>red()</code> returns a color's red value in the range 0\nto 255. If the <a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to RGB, it\nreturns the red value in the given range.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(175, 100, 220);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'redValue' to 175.\n  let redValue = red(c);\n\n  // Draw the right rectangle.\n  fill(redValue, 0, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is red.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a color array.\n  let c = [175, 100, 220];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'redValue' to 175.\n  let redValue = red(c);\n\n  // Draw the right rectangle.\n  fill(redValue, 0, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is red.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a CSS color string.\n  let c = 'rgb(175, 100, 220)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'redValue' to 175.\n  let redValue = red(c);\n\n  // Draw the right rectangle.\n  fill(redValue, 0, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is red.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use RGB color with values in the range 0-100.\n  colorMode(RGB, 100);\n\n  // Create a p5.Color object.\n  let c = color(69, 39, 86);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'redValue' to 69.\n  let redValue = red(c);\n\n  // Draw the right rectangle.\n  fill(redValue, 0, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is red.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the red value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the red value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "filter",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 518,
      "itemtype": "method",
      "description": "<p>Applies an image filter to the canvas.</p>\n<p>The preset options are:</p>\n<p><code>INVERT</code>\nInverts the colors in the image. No parameter is used.</p>\n<p><code>GRAY</code>\nConverts the image to grayscale. No parameter is used.</p>\n<p><code>THRESHOLD</code>\nConverts the image to black and white. Pixels with a grayscale value\nabove a given threshold are converted to white. The rest are converted to\nblack. The threshold must be between 0.0 (black) and 1.0 (white). If no\nvalue is specified, 0.5 is used.</p>\n<p><code>OPAQUE</code>\nSets the alpha channel to entirely opaque. No parameter is used.</p>\n<p><code>POSTERIZE</code>\nLimits the number of colors in the image. Each color channel is limited to\nthe number of colors specified. Values between 2 and 255 are valid, but\nresults are most noticeable with lower values. The default value is 4.</p>\n<p><code>BLUR</code>\nBlurs the image. The level of blurring is specified by a blur radius. Larger\nvalues increase the blur. The default value is 4. A gaussian blur is used\nin <code>P2D</code> mode. A box blur is used in <code>WEBGL</code> mode.</p>\n<p><code>ERODE</code>\nReduces the light areas. No parameter is used.</p>\n<p><code>DILATE</code>\nIncreases the light areas. No parameter is used.</p>\n<p><code>filter()</code> uses WebGL in the background by default because it's faster.\nThis can be disabled in <code>P2D</code> mode by adding a <code>false</code> argument, as in\n<code>filter(BLUR, false)</code>. This may be useful to keep computation off the GPU\nor to work around a lack of WebGL support.</p>\n<p>In WebgL mode, <code>filter()</code> can also use custom shaders. See\n<a href=\"#/p5/createFilterShader\">createFilterShader()</a> for more\ninformation.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the INVERT filter.\n  filter(INVERT);\n\n  describe('A blue brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the GRAY filter.\n  filter(GRAY);\n\n  describe('A brick wall drawn in grayscale.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the THRESHOLD filter.\n  filter(THRESHOLD);\n\n  describe('A brick wall drawn in black and white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the OPAQUE filter.\n  filter(OPAQUE);\n\n  describe('A red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the POSTERIZE filter.\n  filter(POSTERIZE, 3);\n\n  describe('An image of a red brick wall drawn with limited color palette.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the BLUR filter.\n  filter(BLUR, 3);\n\n  describe('A blurry image of a red brick wall.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the DILATE filter.\n  filter(DILATE);\n\n  describe('A red brick wall with bright lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the ERODE filter.\n  filter(ERODE);\n\n  describe('A red brick wall with faint lines between each brick.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Apply the BLUR filter.\n  // Don't use WebGL.\n  filter(BLUR, 3, false);\n\n  describe('A blurry image of a red brick wall.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filterType",
              "description": "either THRESHOLD, GRAY, OPAQUE, INVERT,\nPOSTERIZE, BLUR, ERODE, DILATE or BLUR.",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "parameter unique to each filter.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "useWebGL",
              "description": "flag to control whether to use fast\nWebGL filters (GPU) or original image\nfilters (CPU); defaults to <code>true</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ]
        },
        {
          "params": [
            {
              "name": "filterType",
              "description": "",
              "type": "THRESHOLD|GRAY|OPAQUE|INVERT|POSTERIZE|BLUR|ERODE|DILATE|BLUR"
            },
            {
              "name": "filterParam",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "useWebGL",
              "description": "",
              "optional": 1,
              "type": "Boolean"
            }
          ]
        },
        {
          "params": [
            {
              "name": "shaderFilter",
              "description": "shader that's been loaded, with the\nfrag shader using a <code>tex0</code> uniform.",
              "type": "p5.Shader"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "tan",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 505,
      "itemtype": "method",
      "description": "<p>Calculates the tangent of an angle.</p>\n<p><code>tan()</code> is useful for many geometric tasks in creative coding. The values\nreturned range from -Infinity to Infinity and repeat periodically as the\ninput angle increases. <code>tan()</code> calculates the tan of an angle, using radians\nby default, or according to\nif <a href=\"#/p5/angleMode\">angleMode()</a> setting (RADIANS or DEGREES).</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of identical curves drawn with black dots. Each curve starts from the top of the canvas, continues down at a slight angle, flattens out at the middle of the canvas, then continues to the bottom.');\n}\n\nfunction draw() {\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 5 * tan(x * 0.1) + 50;\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "the angle, in radians by default, or according to if <a href=\"/reference/p5/angleMode/\">angleMode()</a> setting (RADIANS or DEGREES).",
              "type": "Number"
            }
          ],
          "return": {
            "description": "tangent of the angle.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "tangent of the angle.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "createSpan",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 507,
      "itemtype": "method",
      "description": "<p>Creates a <code><span></span></code> element.</p>\n<p><code><span></span></code> elements are commonly used as containers\nfor inline elements. For example, a <code><span></span></code>\ncan hold part of a sentence that's a\n<span style=\"color: deeppink;\">different</span> style.</p>\n<p>The parameter <code>html</code> is optional. It accepts a string that sets the\ninner HTML of the new <code><span></span></code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a span element and set its position.\n  let span = createSpan('p5*js');\n  span.position(25, 35);\n\n  describe('A gray square with the text \"p5*js\" written in its center.');\n}",
        "function setup() {\n  background(200);\n\n  // Create a div element as a container.\n  let div = createDiv();\n\n  // Place the div at the center.\n  div.position(25, 35);\n\n  // Create a span element.\n  let s1 = createSpan('p5');\n\n  // Create a second span element.\n  let s2 = createSpan('*');\n\n  // Set the second span's font color.\n  s2.style('color', 'deeppink');\n\n  // Create a third span element.\n  let s3 = createSpan('js');\n\n  // Add all the spans to the container div.\n  s1.parent(div);\n  s2.parent(div);\n  s3.parent(div);\n\n  describe('A gray square with the text \"p5*js\" written in black at its center. The asterisk is pink.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "html",
              "description": "inner HTML for the new <code><span></span></code> element.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadFilterShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 513,
      "itemtype": "method",
      "description": "<p>Loads a new shader from a file that can be applied to the contents of the canvas with\n<a href=\"#/p5/filter\"><code>filter()</code></a>. Pass the resulting shader into <code>filter()</code> to apply it.</p>\n<p>Since this function loads data from another file, it returns a <code>Promise</code>.\nUse it in an <code>async function setup</code>, and <code>await</code> its result.</p>\n<pre><code class=\"language-js\">async function setup() {\n  createCanvas(50, 50, WEBGL);\n  let img = await loadImage('assets/bricks.jpg');\n  let myFilter = await loadFilterShader('myFilter.js');\n\n  image(img, -50, -50);\n  filter(myFilter);\n  describe('Bricks tinted red');\n}</code></pre><p>Inside your shader file, you can use p5.strands hooks to change parts of the shader. For\na filter shader, use <code>filterColor</code> to change each pixel on the canvas.</p>\n<pre><code class=\"language-js\">// myFilter.js\nfilterColor.begin();\nlet result = getTexture(\n  filterColor.canvasContent,\n  filterColor.texCoord\n);\n// Zero out the green and blue channels, leaving red\nresult.g = 0;\nresult.b = 0;\nfilterColor.set(result);\nfilterColor.end();</code></pre><p>Read the reference for <a href=\"#/p5/buildFilterShader\"><code>buildFilterShader</code></a>,\nthe version of <code>loadFilterShader</code> that takes in a function instead of a separate file,\nfor more examples.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is passed, as in\n<code>loadFilterShader('myShader.js', onLoaded)</code>, then the <code>onLoaded()</code> function will be called\nonce the shader loads. The shader will be passed to <code>onLoaded()</code> as its only argument.\nThe return value of <code>handleData()</code>, if present, will be used as the final return value of\n<code>loadFilterShader('myShader.js', onLoaded)</code>.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "filename",
              "description": "path to a p5.strands JavaScript file or a GLSL fragment shader file",
              "type": "String"
            },
            {
              "name": "successCallback",
              "description": "callback to be called once the shader is\nloaded. Will be passed the\n<a href=\"#/p5.Shader\">p5.Shader</a> object.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "failureCallback",
              "description": "callback to be called if there is an error\nloading the shader. Will be passed the\nerror event.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "a promise that resolves with a shader object",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "a promise that resolves with a shader object",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands"
    },
    {
      "name": "createFramebuffer",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 523,
      "itemtype": "method",
      "description": "<p>Creates and a new <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object.</p>\n<p><a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> objects are separate drawing\nsurfaces that can be used as textures in WebGL mode. They're similar to\n<a href=\"#/p5.Graphics\">p5.Graphics</a> objects and generally run much\nfaster when used as textures.</p>\n<p>The parameter, <code>options</code>, is optional. An object can be passed to configure\nthe <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. The available\nproperties are:</p>\n<ul><li><code>format</code>: data format of the texture, either <code>UNSIGNED_BYTE</code>, <code>FLOAT</code>, or <code>HALF_FLOAT</code>. Default is <code>UNSIGNED_BYTE</code>.</li><li><code>channels</code>: whether to store <code>RGB</code> or <code>RGBA</code> color channels. Default is to match the main canvas which is <code>RGBA</code>.</li><li><code>depth</code>: whether to include a depth buffer. Default is <code>true</code>.</li><li><code>depthFormat</code>: data format of depth information, either <code>UNSIGNED_INT</code> or <code>FLOAT</code>. Default is <code>FLOAT</code>.</li><li><code>stencil</code>: whether to include a stencil buffer for masking. <code>depth</code> must be <code>true</code> for this feature to work. Defaults to the value of <code>depth</code> which is <code>true</code>.</li><li><code>antialias</code>: whether to perform anti-aliasing. If set to <code>true</code>, as in <code>{ antialias: true }</code>, 2 samples will be used by default. The number of samples can also be set, as in <code>{ antialias: 4 }</code>. Default is to match <a href=\"#/p5/setAttributes\">setAttributes()</a> which is <code>false</code> (<code>true</code> in Safari).</li><li><code>width</code>: width of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the main canvas width.</li><li><code>height</code>: height of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the main canvas height.</li><li><code>density</code>: pixel density of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the main canvas pixel density.</li><li><code>textureFiltering</code>: how to read values from the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Either <code>LINEAR</code> (nearby pixels will be interpolated) or <code>NEAREST</code> (no interpolation). Generally, use <code>LINEAR</code> when using the texture as an image and <code>NEAREST</code> if reading the texture as data. Default is <code>LINEAR</code>.</li></ul><p>If the <code>width</code>, <code>height</code>, or <code>density</code> attributes are set, they won't automatically match the main canvas and must be changed manually.</p>\n<p>Note: <code>createFramebuffer()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('A grid of white toruses rotating against a dark gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Start drawing to the p5.Framebuffer object.\n  myBuffer.begin();\n\n  // Clear the drawing surface.\n  clear();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Style the torus.\n  noStroke();\n\n  // Draw the torus.\n  torus(20);\n\n  // Stop drawing to the p5.Framebuffer object.\n  myBuffer.end();\n\n  // Iterate from left to right.\n  for (let x = -50; x < 50; x += 25) {\n    // Iterate from top to bottom.\n    for (let y = -50; y < 50; y += 25) {\n      // Draw the p5.Framebuffer object to the canvas.\n      image(myBuffer, x, y, 25, 25);\n    }\n  }\n}",
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create an options object.\n  let options = { width: 25, height: 25 };\n\n  // Create a p5.Framebuffer object.\n  // Use options for configuration.\n  myBuffer = createFramebuffer(options);\n\n  describe('A grid of white toruses rotating against a dark gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Start drawing to the p5.Framebuffer object.\n  myBuffer.begin();\n\n  // Clear the drawing surface.\n  clear();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Style the torus.\n  noStroke();\n\n  // Draw the torus.\n  torus(5, 2.5);\n\n  // Stop drawing to the p5.Framebuffer object.\n  myBuffer.end();\n\n  // Iterate from left to right.\n  for (let x = -50; x < 50; x += 25) {\n    // Iterate from top to bottom.\n    for (let y = -50; y < 50; y += 25) {\n      // Draw the p5.Framebuffer object to the canvas.\n      image(myBuffer, x, y);\n    }\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "options",
              "description": "configuration options.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "new framebuffer.",
            "type": "p5.Framebuffer"
          }
        }
      ],
      "return": {
        "description": "new framebuffer.",
        "type": "p5.Framebuffer"
      },
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "strokeWeight",
      "file": "src/scripts/parsers/in/p5.js/src/shape/attributes.js",
      "line": 530,
      "itemtype": "method",
      "description": "<p>Sets the width of the stroke used for points, lines, and the outlines of\nshapes.</p>\n<p>Note: <code>strokeWeight()</code> is affected by transformations, especially calls to\n<a href=\"#/p5/scale\">scale()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top.\n  line(20, 20, 80, 20);\n\n  // Middle.\n  strokeWeight(4);\n  line(20, 40, 80, 40);\n\n  // Bottom.\n  strokeWeight(10);\n  line(20, 70, 80, 70);\n\n  describe('Three horizontal black lines. The top line is thin, the middle is medium, and the bottom is thick.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top.\n  line(20, 20, 80, 20);\n\n  // Scale by a factor of 5.\n  scale(5);\n\n  // Bottom. Coordinates are adjusted for scaling.\n  line(4, 8, 16, 8);\n\n  describe('Two horizontal black lines. The top line is thin and the bottom is five times thicker than the top.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "weight",
              "description": "the weight of the stroke (in pixels).",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Attributes"
    },
    {
      "name": "degrees",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 539,
      "itemtype": "method",
      "description": "<p>Converts an angle measured in radians to its value in degrees.</p>\n<p>Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians.</p>\n<p>The same angle can be expressed in with either unit. For example, 90° is a\nquarter of a full rotation. The same angle is 2 × π ÷ 4\n(about 1.57) radians.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate the angle conversion.\n  let rad = QUARTER_PI;\n  let deg = degrees(rad);\n\n  // Display the conversion.\n  text(`${round(rad, 2)} rad = ${deg}˚`, 10, 50);\n\n  describe('The text \"0.79 rad = 45˚\".');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radians",
              "description": "radians value to convert to degrees.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "converted angle.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "converted angle.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "rotateX",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 543,
      "itemtype": "method",
      "description": "<p>Rotates the coordinate system about the x-axis in WebGL mode.</p>\n<p>The parameter, <code>angle</code>, is the amount to rotate. For example, calling\n<code>rotateX(1)</code> rotates the coordinate system about the x-axis by 1 radian.\n<code>rotateX()</code> interprets angle values using the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, transformations accumulate. For example, calling <code>rotateX(1)</code>\ntwice has the same effect as calling <code>rotateX(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>rotateX(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't cause\nshapes to spin.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateX(QUARTER_PI);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateX(QUARTER_PI / 2);\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateX(QUARTER_PI / 2);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateX(45);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube rotates slowly against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system a little more each frame.\n  let angle = frameCount * 0.01;\n  rotateX(angle);\n\n  // Draw a box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "map",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 551,
      "itemtype": "method",
      "description": "<p>Re-maps a number from one range to another.</p>\n<p>For example, calling <code>map(2, 0, 10, 0, 100)</code> returns 20. The first three\narguments set the original value to 2 and the original range from 0 to 10.\nThe last two arguments set the target range from 0 to 100. 20's position\nin the target range [0, 100] is proportional to 2's position in the\noriginal range [0, 10].</p>\n<p>The sixth parameter, <code>withinBounds</code>, is optional. By default, <code>map()</code> can\nreturn values outside of the target range. For example,\n<code>map(11, 0, 10, 0, 100)</code> returns 110. Passing <code>true</code> as the sixth parameter\nconstrains the remapped value to the target range. For example,\n<code>map(11, 0, 10, 0, 100, true)</code> returns 100.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two horizontal lines. The top line grows horizontally as the mouse moves to the right. The bottom line also grows horizontally but is scaled to stay on the left half of the canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the top line.\n  line(0, 25, mouseX, 25);\n\n  // Remap mouseX from [0, 100] to [0, 50].\n  let x = map(mouseX, 0, 100, 0, 50);\n\n  // Draw the bottom line.\n  line(0, 75, 0, x);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A circle changes color from black to white as the mouse moves from left to right.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Remap mouseX from [0, 100] to [0, 255]\n  let c = map(mouseX, 0, 100, 0, 255);\n\n  // Style the circle.\n  fill(c);\n\n  // Draw the circle.\n  circle(50, 50, 20);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "the value to be remapped.",
              "type": "Number"
            },
            {
              "name": "start1",
              "description": "lower bound of the value's current range.",
              "type": "Number"
            },
            {
              "name": "stop1",
              "description": "upper bound of the value's current range.",
              "type": "Number"
            },
            {
              "name": "start2",
              "description": "lower bound of the value's target range.",
              "type": "Number"
            },
            {
              "name": "stop2",
              "description": "upper bound of the value's target range.",
              "type": "Number"
            },
            {
              "name": "withinBounds",
              "description": "constrain the value to the newly mapped range.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "remapped number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "remapped number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "createImg",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 562,
      "itemtype": "method",
      "description": "<p>Creates an <code><img></code> element that can appear outside of the canvas.</p>\n<p>The first parameter, <code>src</code>, is a string with the path to the image file.\n<code>src</code> should be a relative path, as in <code>'assets/image.png'</code>, or a URL, as\nin <code>'https://example.com/image.png'</code>.</p>\n<p>The second parameter, <code>alt</code>, is a string with the\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#usage_notes\" target=\"_blank\">alternate text</a>\nfor the image. An empty string <code>''</code> can be used for images that aren't displayed.</p>\n<p>The third parameter, <code>crossOrigin</code>, is optional. It's a string that sets the\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes\" target=\"_blank\">crossOrigin property</a>\nof the image. Use <code>'anonymous'</code> or <code>'use-credentials'</code> to fetch the image\nwith cross-origin access.</p>\n<p>The fourth parameter, <code>callback</code>, is also optional. It sets a function to\ncall after the image loads. The new image is passed to the callback\nfunction as a <a href=\"#/p5.Element\">p5.Element</a> object.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  let img = createImg(\n    '/assets/cat.jpg',\n    'image of a cat'\n  );\n  img.position(0, 10);\n\n  describe('A gray square with a magenta asterisk in its center.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "src",
              "description": "relative path or URL for the image.",
              "type": "String"
            },
            {
              "name": "alt",
              "description": "alternate text for the image.",
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        },
        {
          "params": [
            {
              "name": "src",
              "description": "",
              "type": "String"
            },
            {
              "name": "alt",
              "description": "",
              "type": "String"
            },
            {
              "name": "crossOrigin",
              "description": "crossOrigin property to use when fetching the image.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "successCallback",
              "description": "function to call once the image loads. The new image will be passed\nto the function as a <a href=\"#/p5.Element\">p5.Element</a> object.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "radians",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 571,
      "itemtype": "method",
      "description": "<p>Converts an angle measured in degrees to its value in radians.</p>\n<p>Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians.</p>\n<p>The same angle can be expressed in with either unit. For example, 90° is a\nquarter of a full rotation. The same angle is 2 × π ÷ 4\n(about 1.57) radians.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Caclulate the angle conversion.\n  let deg = 45;\n  let rad = radians(deg);\n\n  // Display the angle conversion.\n  text(`${deg}˚ = ${round(rad, 3)} rad`, 10, 50);\n\n  describe('The text \"45˚ = 0.785 rad\".');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "degrees",
              "description": "degree value to convert to radians.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "converted angle.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "converted angle.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "deviceMoved",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 574,
      "itemtype": "method",
      "description": "The <a href=\"#/p5/deviceMoved\">deviceMoved()</a> function is called when the device is moved by more than\nthe threshold value along X, Y or Z axis. The default threshold is set to 0.5.\nThe threshold value can be changed using <a href=\"https://p5js.org/reference/p5/setMoveThreshold\">setMoveThreshold()</a>.",
      "example": [
        "// META:norender\n// Run this example on a mobile device\n// Move the device around\n// to change the value.\n\nlet value = 0;\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device moves`);\n}\nfunction deviceMoved() {\n  value = value + 5;\n  if (value > 255) {\n    value = 0;\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Acceleration"
    },
    {
      "name": "deviceTurned",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 574,
      "itemtype": "method",
      "description": "<p>The <a href=\"#/p5/deviceTurned\">deviceTurned()</a> function is called when the device rotates by\nmore than 90 degrees continuously.</p>\n<p>The axis that triggers the <a href=\"#/p5/deviceTurned\">deviceTurned()</a> method is stored in the turnAxis\nvariable. The <a href=\"#/p5/deviceTurned\">deviceTurned()</a> method can be locked to trigger on any axis:\nX, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.</p>\n",
      "example": [
        "// META:norender\n// Run this example on a mobile device\n// Rotate the device by 90 degrees\n// to change the value.\n\nlet value = 0;\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device turns`);\n}\nfunction deviceTurned() {\n  if (value === 0) {\n    value = 255;\n  } else if (value === 255) {\n    value = 0;\n  }\n}",
        "// Run this example on a mobile device\n// Rotate the device by 90 degrees in the\n// X-axis to change the value.\n\nlet value = 0;\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when x-axis turns`);\n}\nfunction deviceTurned() {\n  if (turnAxis === 'X') {\n    if (value === 0) {\n      value = 255;\n    } else if (value === 255) {\n      value = 0;\n    }\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Acceleration"
    },
    {
      "name": "deviceShaken",
      "file": "src/scripts/parsers/in/p5.js/src/events/acceleration.js",
      "line": 574,
      "itemtype": "method",
      "description": "The <a href=\"#/p5/deviceShaken\">deviceShaken()</a> function is called when the device total acceleration\nchanges of accelerationX and accelerationY values is more than\nthe threshold value. The default threshold is set to 30.\nThe threshold value can be changed using <a href=\"https://p5js.org/reference/p5/setShakeThreshold\">setShakeThreshold()</a>.",
      "example": [
        "// META:norender\n// Run this example on a mobile device\n// Shake the device to change the value.\n\nlet value = 0;\nfunction draw() {\n  fill(value);\n  rect(25, 25, 50, 50);\n  describe(`50-by-50 black rect in center of canvas.\n    turns white on mobile when device shakes`);\n}\n\nfunction deviceShaken() {\n  value = value + 5;\n  if (value > 255) {\n    value = 0;\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Acceleration"
    },
    {
      "name": "directionalLight",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 581,
      "itemtype": "method",
      "description": "<p>Creates a light that shines in one direction.</p>\n<p>Directional lights don’t shine from a specific point. They’re like a sun\nthat shines from somewhere offscreen. The light’s direction is set using\nthree <code>(x, y, z)</code> values between -1 and 1. For example, setting a light’s\ndirection as <code>(1, 0, 0)</code> will light <a href=\"#/p5.Geometry\">p5.Geometry</a>\nobjects from the left since the light faces directly to the right. A\nmaximum of 5 directional lights can be active at once.</p>\n<p>There are four ways to call <code>directionalLight()</code> with parameters to set the\nlight’s color and direction.</p>\n<p>The first way to call <code>directionalLight()</code> has six parameters. The first\nthree parameters, <code>v1</code>, <code>v2</code>, and <code>v3</code>, set the light’s color using the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>. The last three\nparameters, <code>x</code>, <code>y</code>, and <code>z</code>, set the light’s direction. For example,\n<code>directionalLight(255, 0, 0, 1, 0, 0)</code> creates a red <code>(255, 0, 0)</code> light\nthat shines to the right <code>(1, 0, 0)</code>.</p>\n<p>The second way to call <code>directionalLight()</code> has four parameters. The first\nthree parameters, <code>v1</code>, <code>v2</code>, and <code>v3</code>, set the light’s color using the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>. The last parameter,\n<code>direction</code> sets the light’s direction using a\n<a href=\"#/p5.Vector\">p5.Vector</a> object. For example,\n<code>directionalLight(255, 0, 0, lightDir)</code> creates a red <code>(255, 0, 0)</code> light\nthat shines in the direction the <code>lightDir</code> vector points.</p>\n<p>The third way to call <code>directionalLight()</code> has four parameters. The first\nparameter, <code>color</code>, sets the light’s color using a\n<a href=\"#/p5.Color\">p5.Color</a> object or an array of color values. The\nlast three parameters, <code>x</code>, <code>y</code>, and <code>z</code>, set the light’s direction. For\nexample, <code>directionalLight(myColor, 1, 0, 0)</code> creates a light that shines\nto the right <code>(1, 0, 0)</code> with the color value of <code>myColor</code>.</p>\n<p>The fourth way to call <code>directionalLight()</code> has two parameters. The first\nparameter, <code>color</code>, sets the light’s color using a\n<a href=\"#/p5.Color\">p5.Color</a> object or an array of color values. The\nsecond parameter, <code>direction</code>, sets the light’s direction using a\n<a href=\"#/p5.Vector\">p5.Vector</a> object. For example,\n<code>directionalLight(myColor, lightDir)</code> creates a light that shines in the\ndirection the <code>lightDir</code> vector points with the color value of <code>myColor</code>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to turn on the directional light.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. A red light starts shining from above when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Control the light.\n  if (isLit === true) {\n    // Add a red directional light from above.\n    // Use RGB values and XYZ directions.\n    directionalLight(255, 0, 0, 0, 1, 0);\n  }\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. The top of the sphere appears bright red. The color gets darker toward the bottom.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a red directional light from above.\n  // Use a p5.Color object and XYZ directions.\n  let c = color(255, 0, 0);\n  directionalLight(c, 0, 1, 0);\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. The top of the sphere appears bright red. The color gets darker toward the bottom.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a red directional light from above.\n  // Use a p5.Color object and a p5.Vector object.\n  let c = color(255, 0, 0);\n  let lightDir = createVector(0, 1, 0);\n  directionalLight(c, lightDir);\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "x-component of the light's direction between -1 and 1.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-component of the light's direction between -1 and 1.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-component of the light's direction between -1 and 1.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "direction",
              "description": "direction of the light as a\n<a href=\"#/p5.Vector\">p5.Vector</a> object.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or as a CSS string.",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "direction",
              "description": "",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "background",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 582,
      "itemtype": "method",
      "description": "<p>Sets the color used for the background of the canvas.</p>\n<p>By default, the background is transparent. <code>background()</code> is typically used\nwithin <a href=\"#/p5/draw\">draw()</a> to clear the display window at the\nbeginning of each frame. It can also be used inside\n<a href=\"#/p5/setup\">setup()</a> to set the background on the first frame\nof animation.</p>\n<p>The version of <code>background()</code> with one parameter interprets the value one\nof four ways. If the parameter is a <code>Number</code>, it's interpreted as a grayscale\nvalue. If the parameter is a <code>String</code>, it's interpreted as a CSS color string.\nRGB, RGBA, HSL, HSLA, hex, and named color strings are supported. If the\nparameter is a <a href=\"#/p5.Color\">p5.Color</a> object, it will be used as\nthe background color. If the parameter is a\n<a href=\"#/p5.Image\">p5.Image</a> object, it will be used as the background\nimage.</p>\n<p>The version of <code>background()</code> with two parameters interprets the first one\nas a grayscale value. The second parameter sets the alpha (transparency)\nvalue.</p>\n<p>The version of <code>background()</code> with three parameters interprets them as RGB,\nHSB, or HSL colors, depending on the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. By default, colors are specified\nin RGB values. Calling <code>background(255, 204, 0)</code> sets the background a bright\nyellow color.</p>\n<p>The version of <code>background()</code> with four parameters interprets them as RGBA,\nHSBA, or HSLA colors, depending on the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. The last parameter sets the alpha\n(transparency) value.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // A grayscale value.\n  background(51);\n\n  describe('A canvas with a dark charcoal gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // A grayscale value and an alpha value.\n  background(51, 0.4);\n  describe('A canvas with a transparent gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // R, G & B values.\n  background(255, 204, 0);\n\n  describe('A canvas with a yellow background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n// R, G, B, and Alpha values.\n  background(255, 0, 0, 128);\n\n  describe('A canvas with a semi-transparent red background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // H, S & B values.\n  background(255, 204, 100);\n\n  describe('A canvas with a royal blue background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // A CSS named color.\n  background('red');\n\n  describe('A canvas with a red background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Three-digit hex RGB notation.\n  background('#fae');\n\n  describe('A canvas with a pink background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Six-digit hex RGB notation.\n  background('#222222');\n\n  describe('A canvas with a black background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Integer RGB notation.\n  background('rgb(0, 255, 0)');\n\n  describe('A canvas with a bright green background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Integer RGBA notation.\n  background('rgba(0, 255, 0, 0.25)');\n\n  describe('A canvas with a transparent green background.');\n}\n<",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Percentage RGB notation.\n  background('rgb(100%, 0%, 10%)');\n\n  describe('A canvas with a red background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Percentage RGBA notation.\n  background('rgba(100%, 0%, 100%, 0.5)');\n\n  describe('A canvas with a transparent purple background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // A p5.Color object.\n  let c = color(0, 0, 255);\n  background(c);\n\n  describe('A canvas with a blue background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "any value created by the <a href=\"#/p5/color\">color()</a> function",
              "type": "p5.Color"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "colorstring",
              "description": "color string, possible formats include: integer\nrgb() or rgba(), percentage rgb() or rgba(),\n3-digit hex, 6-digit hex.",
              "type": "String"
            },
            {
              "name": "a",
              "description": "opacity of the background relative to current\ncolor range (default is 0-255).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "specifies a value between white and black.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "red value if color mode is RGB, or hue value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green value if color mode is RGB, or saturation value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue value if color mode is RGB, or brightness value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "a",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "values",
              "description": "an array containing the red, green, blue\nand alpha components of the color.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "image",
              "description": "image created with <a href=\"#/p5/loadImage\">loadImage()</a>\nor <a href=\"#/p5/createImage\">createImage()</a>,\nto set as background.\n(must be same size as the sketch window).",
              "type": "p5.Image"
            },
            {
              "name": "a",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "clearDepth",
      "file": "src/scripts/parsers/in/p5.js/src/core/rendering.js",
      "line": 603,
      "itemtype": "method",
      "description": "<p>Clears the depth buffer in WebGL mode.</p>\n<p><code>clearDepth()</code> clears information about how far objects are from the camera\nin 3D space. This information is stored in an object called the\ndepth buffer. Clearing the depth buffer ensures new objects aren't drawn\nbehind old ones. Doing so can be useful for feedback effects in which the\nprevious frame serves as the background for the current frame.</p>\n<p>The parameter, <code>depth</code>, is optional. If a number is passed, as in\n<code>clearDepth(0.5)</code>, it determines the range of objects to clear from the\ndepth buffer. 0 doesn't clear any depth information, 0.5 clears depth\ninformation halfway between the near and far clipping planes, and 1 clears\ndepth information all the way to the far clipping plane. By default,\n<code>depth</code> is 1.</p>\n<p>Note: <code>clearDepth()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "let previous;\nlet current;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Framebuffer objects.\n  previous = createFramebuffer({ format: FLOAT });\n  current = createFramebuffer({ format: FLOAT });\n\n  describe(\n    'A multicolor box drifts from side to side on a white background. It leaves a trail that fades over time.'\n  );\n}\n\nfunction draw() {\n  // Swap the previous p5.Framebuffer and the\n  // current one so it can be used as a texture.\n  [previous, current] = [current, previous];\n\n  // Start drawing to the current p5.Framebuffer.\n  current.begin();\n\n  // Paint the background.\n  background(255);\n\n  // Draw the previous p5.Framebuffer.\n  // Clear the depth buffer so the previous\n  // frame doesn't block the current one.\n  push();\n  tint(255, 250);\n  image(previous, -50, -50);\n  clearDepth();\n  pop();\n\n  // Draw the box on top of the previous frame.\n  push();\n  let x = 25 * sin(frameCount * 0.01);\n  let y = 25 * sin(frameCount * 0.02);\n  translate(x, y, 0);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  normalMaterial();\n  box(12);\n  pop();\n\n  // Stop drawing to the current p5.Framebuffer.\n  current.end();\n\n  // Display the current p5.Framebuffer.\n  image(current, -50, -50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "depth",
              "description": "amount of the depth buffer to clear between 0\n(none) and 1 (far clipping plane). Defaults to 1.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "splitTokens",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 603,
      "deprecated": true,
      "deprecationMessage": "This will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "<p>Splits a <code>String</code> into pieces and returns an array containing the pieces.</p>\n<p><code>splitTokens()</code> is an enhanced version of\n<a href=\"#/p5/split\">split()</a>. It can split a string when any characters\nfrom a list are detected.</p>\n<p>The first parameter, <code>value</code>, is the string to split.</p>\n<p>The second parameter, <code>delim</code>, is optional. It sets the character(s) that\nshould be used to split the string. <code>delim</code> can be a single string, as in\n<code>splitTokens('rock...paper...scissors...shoot', '...')</code>, or an array of\nstrings, as in\n<code>splitTokens('rock;paper,scissors...shoot, [';', ',', '...'])</code>. By default,\nif no <code>delim</code> characters are specified, then any whitespace character is\nused to split. Whitespace characters include tab (<code>\\t</code>), line feed (<code>\\n</code>),\ncarriage return (<code>\\r</code>), form feed (<code>\\f</code>), and space.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let string = 'rock paper scissors shoot';\n\n  // Split the string at each space.\n  let words = splitTokens(string);\n\n  // Print the array to the console.\n  print(words);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Iterate over the words array.\n  for (let i = 0; i < words.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 20;\n\n    // Display the word.\n    text(words[i], 50, y);\n  }\n\n  describe(\n    'The words \"rock\", \"paper\", \"scissors\", and \"shoot\" written on separate lines. The text is black on a gray background.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let string = 'rock...paper...scissors...shoot';\n\n  // Split the string at each ...\n  let words = splitTokens(string, '...');\n\n  // Print the array to the console.\n  print(words);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Iterate over the words array.\n  for (let i = 0; i < words.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 20;\n\n    // Display the word.\n    text(words[i], 50, y);\n  }\n\n  describe(\n    'The words \"rock\", \"paper\", \"scissors\", and \"shoot\" written on separate lines. The text is black on a gray background.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let string = 'rock;paper,scissors...shoot';\n\n  // Split the string at each semicolon, comma, or ...\n  let words = splitTokens(string, [';', ',', '...']);\n\n  // Print the array to the console.\n  print(words);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Iterate over the words array.\n  for (let i = 0; i < words.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 20;\n\n    // Display the word.\n    text(words[i], 50, y);\n  }\n\n  describe(\n    'The words \"rock\", \"paper\", \"scissors\", and \"shoot\" written on separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "string to split.",
              "type": "String"
            },
            {
              "name": "delim",
              "description": "character(s) to use for splitting the string.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "separated strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "separated strings.",
        "type": "String[]"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "keyPressed",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 617,
      "itemtype": "method",
      "description": "<p>A function that's called once when any key is pressed.</p>\n<p>Declaring the function <code>keyPressed()</code> sets a code block to run once\nautomatically when the user presses any key:</p>\n<pre><code class=\"language-js\">function keyPressed() {\n  // Code to run.\n}</code></pre><p>The <a href=\"#/p5/key\">key</a> and <a href=\"#/p5/keyCode\">keyCode</a>\nvariables will be updated with the most recently typed value when\n<code>keyPressed()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function keyPressed() {\n  if (key === 'c') {\n    // Code to run.\n  }\n\n  if (keyCode === 13) { // Enter key\n    // Code to run.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>keyPressed()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\" target=\"_blank\">KeyboardEvent</a>\nobject with properties that describe the key press event:</p>\n<pre><code class=\"language-js\">function keyPressed(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>Browsers may have default behaviors attached to various key events. For\nexample, some browsers may jump to the bottom of a web page when the\n<code>SPACE</code> key is pressed. To prevent any default behavior for this event, add\n<code>return false;</code> to the end of the function.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square changes color when the user presses a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the background color when the user presses a key.\nfunction keyPressed() {\n  if (value === 0) {\n    value = 255;\n  } else {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The inner square turns black when the user presses the \"b\" key. It turns white when the user presses the \"a\" key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Reassign value when the user presses the 'a' or 'b' key.\nfunction keyPressed() {\n  if (key === 'a') {\n    value = 255;\n  } else if (key === 'b') {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square turns white when the user presses the left arrow key. It turns black when the user presses the right arrow key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the background color when the user presses an arrow key.\nfunction keyPressed() {\n  if (keyCode === 37) { // Left arrow key\n    value = 255;\n  } else if (keyCode === 39) { // Right arrow key\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>KeyboardEvent</code> callback argument.",
              "optional": 1,
              "type": "KeyboardEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Keyboard"
    },
    {
      "name": "green",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 618,
      "itemtype": "method",
      "description": "<p>Gets the green value of a color.</p>\n<p><code>green()</code> extracts the green value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>By default, <code>green()</code> returns a color's green value in the range 0\nto 255. If the <a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to RGB, it\nreturns the green value in the given range.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(175, 100, 220);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'greenValue' to 100.\n  let greenValue = green(c);\n\n  // Draw the right rectangle.\n  fill(0, greenValue, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is dark green.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a color array.\n  let c = [175, 100, 220];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'greenValue' to 100.\n  let greenValue = green(c);\n\n  // Draw the right rectangle.\n  fill(0, greenValue, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is dark green.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a CSS color string.\n  let c = 'rgb(175, 100, 220)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'greenValue' to 100.\n  let greenValue = green(c);\n\n  // Draw the right rectangle.\n  fill(0, greenValue, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is dark green.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use RGB color with values in the range 0-100.\n  colorMode(RGB, 100);\n\n  // Create a p5.Color object using RGB values.\n  let c = color(69, 39, 86);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'greenValue' to 39.\n  let greenValue = green(c);\n\n  // Draw the right rectangle.\n  fill(0, greenValue, 0);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is dark green.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the green value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the green value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "box",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 622,
      "itemtype": "method",
      "description": "<p>Draws a box (rectangular prism).</p>\n<p>A box is a 3D shape with six faces. Each face makes a 90˚ with four\nneighboring faces.</p>\n<p>The first parameter, <code>width</code>, is optional. If a <code>Number</code> is passed, as in\n<code>box(20)</code>, it sets the box’s width and height. By default, <code>width</code> is 50.</p>\n<p>The second parameter, <code>height</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>box(20, 30)</code>, it sets the box’s height. By default, <code>height</code> is set\nto the box’s <code>width</code>.</p>\n<p>The third parameter, <code>depth</code>, is also optional. If a <code>Number</code> is passed, as\nin <code>box(20, 30, 40)</code>, it sets the box’s depth. By default, <code>depth</code> is set\nto the box’s <code>height</code>.</p>\n<p>The fourth parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>box(20, 30, 40, 5)</code>, it sets the number of triangle subdivisions to\nuse along the x-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, <code>detailX</code> is 1.</p>\n<p>The fifth parameter, <code>detailY</code>, is also optional. If a number is passed, as\nin <code>box(20, 30, 40, 5, 7)</code>, it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, <code>detailY</code> is 1.</p>\n<p>Note: <code>box()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the box.\n  // Set its width and height to 30.\n  box(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the box.\n  // Set its width to 30 and height to 50.\n  box(30, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the box.\n  // Set its width to 30, height to 50, and depth to 10.\n  box(30, 50, 10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the box.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the box.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "depth",
              "description": "depth of the box.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of triangle subdivisions along the x-axis.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "max",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 624,
      "itemtype": "method",
      "description": "<p>Returns the largest value in a sequence of numbers.</p>\n<p>The version of <code>max()</code> with one parameter interprets it as an array of\nnumbers and returns the largest number.</p>\n<p>The version of <code>max()</code> with two or more parameters interprets them as\nindividual numbers and returns the largest number.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate the maximum of 10, 5, and 20.\n  let m = max(10, 5, 20);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the max.\n  text(m, 50, 50);\n\n  describe('The number 20 written in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let numbers = [10, 5, 20];\n\n  // Calculate the maximum of the array.\n  let m = max(numbers);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the max.\n  text(m, 50, 50);\n\n  describe('The number 20 written in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n0",
              "description": "first number to compare.",
              "type": "Number"
            },
            {
              "name": "n1",
              "description": "second number to compare.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "maximum number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to compare.",
              "type": "Number[]"
            }
          ],
          "return": {
            "description": "",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "maximum number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "bezierVertex",
      "file": "src/scripts/parsers/in/p5.js/src/shape/vertex.js",
      "line": 630,
      "itemtype": "method",
      "description": "<p>Adds a Bézier curve segment to a custom shape.</p>\n<p><code>bezierVertex()</code> adds a curved segment to custom shapes. The Bézier curves\nit creates are defined like those made by the\n<a href=\"#/p5/bezier\">bezier()</a> function. <code>bezierVertex()</code> must be\ncalled between the\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> functions.\nBézier need a starting point. Building a shape\nonly with Bézier curves needs one initial\ncall to <a href=\"#/p5/vertex\">bezierVertex()</a>, before\na number of <code>bezierVertex()</code> calls that is a multiple of the parameter\nset by <a href=\"#/p5/bezierOrder\">bezierOrder(...)</a> (default 3).\nBut shapes can mix different types of vertices, so if there\nare some previous vertices, then the initial anchor is not needed,\nonly the multiples of 3 (or the Bézier order) calls to\n<code>bezierVertex</code> for each curve.</p>\n<p>Each curve of order 3 requires three calls to <code>bezierVertex</code>, so\n2 curves would need 7 calls to <code>bezierVertex()</code>:\n(1 one initial anchor point, two sets of 3 curves describing the curves)\nWith <code>bezierOrder(2)</code>, two curves would need 5 calls: 1 + 2 + 2.</p>\n<p>Bézier curves can also be drawn in 3D using WebGL mode.</p>\n<p>Note: <code>bezierVertex()</code> won’t work when an argument is passed to\n<a href=\"#/p5/beginShape\">beginShape()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shape.\n  noFill();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add the first anchor point.\n  bezierVertex(30, 20);\n\n  // Add the Bézier vertex.\n  bezierVertex(80, 0);\n  bezierVertex(80, 75);\n  bezierVertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('A black C curve on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the anchor points in black.\n  stroke(0);\n  strokeWeight(5);\n  point(30, 20);\n  point(30, 75);\n\n  // Draw the control points in red.\n  stroke(255, 0, 0);\n  point(80, 0);\n  point(80, 75);\n\n  // Style the shape.\n  noFill();\n  stroke(0);\n  strokeWeight(1);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add the first anchor point.\n  bezierVertex(30, 20);\n\n  // Add the Bézier vertex.\n  bezierVertex(80, 0);\n  bezierVertex(80, 75);\n  bezierVertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  // Draw red lines from the anchor points to the control points.\n  stroke(255, 0, 0);\n  line(30, 20, 80, 0);\n  line(30, 75, 80, 75);\n\n  describe(\n    'A gray square with three curves. A black curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'\n  );\n}",
        "// Click the mouse near the red dot in the top-right corner\n// and drag to change the curve's shape.\n\nlet x2 = 80;\nlet y2 = 0;\nlet isChanging = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with three curves. A black curve has two straight, red lines that extend from its ends. The endpoints of all the curves are marked with dots.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the anchor points in black.\n  stroke(0);\n  strokeWeight(5);\n  point(30, 20);\n  point(30, 75);\n\n  // Draw the control points in red.\n  stroke(255, 0, 0);\n  point(x2, y2);\n  point(80, 75);\n\n  // Style the shape.\n  noFill();\n  stroke(0);\n  strokeWeight(1);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add the first anchor point.\n  bezierVertex(30, 20);\n\n  // Add the Bézier vertex.\n  bezierVertex(x2, y2);\n  bezierVertex(80, 75);\n  bezierVertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  // Draw red lines from the anchor points to the control points.\n  stroke(255, 0, 0);\n  line(30, 20, x2, y2);\n  line(30, 75, 80, 75);\n}\n\n// Start changing the first control point if the user clicks near it.\nfunction mousePressed() {\n  if (dist(mouseX, mouseY, x2, y2) < 20) {\n    isChanging = true;\n  }\n}\n\n// Stop changing the first control point when the user releases the mouse.\nfunction mouseReleased() {\n  isChanging = false;\n}\n\n// Update the first control point while the user drags the mouse.\nfunction mouseDragged() {\n  if (isChanging === true) {\n    x2 = mouseX;\n    y2 = mouseY;\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add the first anchor point.\n  bezierVertex(30, 20);\n\n  // Add the Bézier vertices.\n  bezierVertex(80, 0);\n  bezierVertex(80, 75);\n  bezierVertex(30, 75);\n\n  bezierVertex(50, 80);\n  bezierVertex(60, 25);\n  bezierVertex(30, 20);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('A crescent moon shape drawn in white on a gray background.');\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A crescent moon shape drawn in white on a blue background. When the user drags the mouse, the scene rotates and a second moon is revealed.');\n}\n\nfunction draw() {\n  background('midnightblue');\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the moons.\n  noStroke();\n  fill('lemonchiffon');\n\n  // Draw the first moon.\n  beginShape();\n  bezierVertex(-20, -30, 0);\n\n  bezierVertex(30, -50, 0);\n  bezierVertex(30, 25, 0);\n  bezierVertex(-20, 25, 0);\n\n  bezierVertex(0, 30, 0);\n  bezierVertex(10, -25, 0);\n  bezierVertex(-20, -30, 0);\n  endShape();\n\n  // Draw the second moon.\n  beginShape();\n\n  bezierVertex(-20, -30, -20);\n\n  bezierVertex(30, -50, -20);\n  bezierVertex(30, 25, -20);\n  bezierVertex(-20, 25, -20);\n\n  bezierVertex(0, 30, -20);\n  bezierVertex(10, -25, -20);\n  bezierVertex(-20, -30, -20);\n\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the first control point.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the first control point.",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "createA",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 631,
      "itemtype": "method",
      "description": "<p>Creates an <code><a></a></code> element that links to another web page.</p>\n<p>The first parmeter, <code>href</code>, is a string that sets the URL of the linked\npage.</p>\n<p>The second parameter, <code>html</code>, is a string that sets the inner HTML of the\nlink. It's common to use text, images, or buttons as links.</p>\n<p>The third parameter, <code>target</code>, is optional. It's a string that tells the\nweb browser where to open the link. By default, links open in the current\nbrowser tab. Passing <code>'_blank'</code> will cause the link to open in a new\nbrowser tab. MDN describes a few\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target\" target=\"_blank\">other options</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an anchor element that links to p5js.org.\n  let a = createA('https://p5js.org/', 'p5*js');\n  a.position(25, 35);\n\n  describe('The text \"p5*js\" written at the center of a gray square.');\n}",
        "function setup() {\n  background(200);\n\n  // Create an anchor tag that links to p5js.org.\n  // Open the link in a new tab.\n  let a = createA('https://p5js.org/', 'p5*js', '_blank');\n  a.position(25, 35);\n\n  describe('The text \"p5*js\" written at the center of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "href",
              "description": "URL of linked page.",
              "type": "String"
            },
            {
              "name": "html",
              "description": "inner HTML of link element to display.",
              "type": "String"
            },
            {
              "name": "target",
              "description": "target where the new link should open,\neither <code>'_blank'</code>, <code>'_self'</code>, <code>'_parent'</code>, or <code>'_top'</code>.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "saveFrames",
      "file": "src/scripts/parsers/in/p5.js/src/image/image.js",
      "line": 634,
      "itemtype": "method",
      "description": "<p>Captures a sequence of frames from the canvas that can be saved as images.</p>\n<p><code>saveFrames()</code> creates an array of frame objects. Each frame is stored as\nan object with its file type, file name, and image data as a string. For\nexample, the first saved frame might have the following properties:</p>\n<p><code>{ ext: 'png', filenmame: 'frame0', imageData: 'data:image/octet-stream;base64, abc123' }</code>.</p>\n<p>The first parameter, <code>filename</code>, sets the prefix for the file names. For\nexample, setting the prefix to <code>'frame'</code> would generate the image files\n<code>frame0.png</code>, <code>frame1.png</code>, and so on.</p>\n<p>The second parameter, <code>extension</code>, sets the file type to either <code>'png'</code> or\n<code>'jpg'</code>.</p>\n<p>The third parameter, <code>duration</code>, sets the duration to record in seconds.\nThe maximum duration is 15 seconds.</p>\n<p>The fourth parameter, <code>framerate</code>, sets the number of frames to record per\nsecond. The maximum frame rate value is 22. Limits are placed on <code>duration</code>\nand <code>framerate</code> to avoid using too much memory. Recording large canvases\ncan easily crash sketches or even web browsers.</p>\n<p>The fifth parameter, <code>callback</code>, is optional. If a function is passed,\nimage files won't be saved by default. The callback function can be used\nto process an array containing the data for each captured frame. The array\nof image data contains a sequence of objects with three properties for each\nframe: <code>imageData</code>, <code>filename</code>, and <code>extension</code>.</p>\n<p>Note: Frames are downloaded as individual image files by default.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A square repeatedly changes color from blue to pink.');\n}\n\nfunction draw() {\n  let r = frameCount % 255;\n  let g = 50;\n  let b = 100;\n  background(r, g, b);\n}\n\n// Save the frames when the user presses the 's' key.\nfunction keyPressed() {\n  if (key === 's') {\n    saveFrames('frame', 'png', 1, 5);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A square repeatedly changes color from blue to pink.');\n}\n\nfunction draw() {\n  let r = frameCount % 255;\n  let g = 50;\n  let b = 100;\n  background(r, g, b);\n}\n\n// Print 5 frames when the user presses the mouse.\nfunction mousePressed() {\n  saveFrames('frame', 'png', 1, 5, printFrames);\n}\n\n// Prints an array of objects containing raw image data, filenames, and extensions.\nfunction printFrames(frames) {\n  for (let frame of frames) {\n    print(frame);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "filename",
              "description": "prefix of file name.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "file extension, either 'jpg' or 'png'.",
              "type": "String"
            },
            {
              "name": "duration",
              "description": "duration in seconds to record. This parameter will be constrained to be less or equal to 15.",
              "type": "Number"
            },
            {
              "name": "framerate",
              "description": "number of frames to save per second. This parameter will be constrained to be less or equal to 22.",
              "type": "Number"
            },
            {
              "name": "callback",
              "description": "callback function that will be executed\nto handle the image data. This function\nshould accept an array as argument. The\narray will contain the specified number of\nframes of objects. Each object has three\nproperties: <code>imageData</code>, <code>filename</code>, and <code>extension</code>.",
              "optional": 1,
              "type": "function(Array)"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Image"
    },
    {
      "name": "line",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 635,
      "itemtype": "method",
      "description": "<p>Draws a straight line between two points.</p>\n<p>A line's default width is one pixel. The version of <code>line()</code> with four\nparameters draws the line in 2D. To color a line, use the\n<a href=\"#/p5/stroke\">stroke()</a> function. To change its width, use the\n<a href=\"#/p5/strokeWeight\">strokeWeight()</a> function. A line\ncan't be filled, so the <a href=\"#/p5/fill\">fill()</a> function won't\naffect the line's color.</p>\n<p>The version of <code>line()</code> with six parameters allows the line to be drawn in\n3D space. Doing so requires adding the <code>WEBGL</code> argument to\n<a href=\"#/p5/createCanvas\">createCanvas()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  line(30, 20, 85, 75);\n\n  describe(\n    'A black line on a gray canvas running from top-center to bottom-right.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the line.\n  stroke('magenta');\n  strokeWeight(5);\n\n  line(30, 20, 85, 75);\n\n  describe(\n    'A thick, magenta line on a gray canvas running from top-center to bottom-right.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top.\n  line(30, 20, 85, 20);\n\n  // Right.\n  stroke(126);\n  line(85, 20, 85, 75);\n\n  // Bottom.\n  stroke(255);\n  line(85, 75, 30, 75);\n\n  describe(\n    'Three lines drawn in grayscale on a gray canvas. They form the top, right, and bottom sides of a square.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  line(-20, -30, 35, 25);\n\n  describe(\n    'A black line on a gray canvas running from top-center to bottom-right.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A black line connecting two spheres. The scene spins slowly.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw a line.\n  line(0, 0, 0, 30, 20, -10);\n\n  // Draw the center sphere.\n  sphere(10);\n\n  // Translate to the second point.\n  translate(30, 20, -10);\n\n  // Draw the bottom-right sphere.\n  sphere(10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "the x-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "the y-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "the x-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "the y-coordinate of the second point.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z1",
              "description": "the z-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z2",
              "description": "the z-coordinate of the second point.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "setup",
      "file": "src/scripts/parsers/in/p5.js/src/core/main.js",
      "line": 641,
      "itemtype": "method",
      "description": "<p>A function that's called once when the sketch begins running.</p>\n<p>Declaring the function <code>setup()</code> sets a code block to run once\nautomatically when the sketch starts running. It's used to perform\nsetup tasks such as creating the canvas and initializing variables:</p>\n<pre><code class=\"language-js\">function setup() {\n  // Code to run once at the start of the sketch.\n}</code></pre><p>Code placed in <code>setup()</code> will run once before code placed in\n<a href=\"#/p5/draw\">draw()</a> begins looping.\nIf <code>setup()</code> is declared <code>async</code> (e.g. <code>async function setup()</code>),\nexecution pauses at each <code>await</code> until its promise resolves.\nFor example, <code>font = await loadFont(...)</code> waits for the font asset\nto load because <code>loadFont()</code> function returns a promise, and the await\nkeyword means the program will wait for the promise to resolve.\nThis ensures that all assets are fully loaded before the sketch continues.</p>\n<p>loading assets.</p>\n<p>Note: <code>setup()</code> doesn’t have to be declared, but it’s common practice to do so.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the circle.\n  circle(50, 50, 40);\n\n  describe('A white circle on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Paint the background once.\n  background(200);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'\n  );\n}\n\nfunction draw() {\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}",
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  // Draw the image.\n  image(img, 0, 0);\n\n  describe(\n    'A white circle on a brick wall. The circle follows the mouse as the user moves, leaving a trail.'\n  );\n}\n\nfunction draw() {\n  // Style the circle.\n  noStroke();\n\n  // Draw the circle.\n  circle(mouseX, mouseY, 10);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "draw",
      "file": "src/scripts/parsers/in/p5.js/src/core/main.js",
      "line": 641,
      "itemtype": "method",
      "description": "<p>A function that's called repeatedly while the sketch runs.</p>\n<p>Declaring the function <code>draw()</code> sets a code block to run repeatedly\nonce the sketch starts. It’s used to create animations and respond to\nuser inputs:</p>\n<pre><code class=\"language-js\">function draw() {\n  // Code to run repeatedly.\n}</code></pre><p>This is often called the \"draw loop\" because p5.js calls the code in\n<code>draw()</code> in a loop behind the scenes. By default, <code>draw()</code> tries to run\n60 times per second. The actual rate depends on many factors. The\ndrawing rate, called the \"frame rate\", can be controlled by calling\n<a href=\"#/p5/frameRate\">frameRate()</a>. The number of times <code>draw()</code>\nhas run is stored in the system variable\n<a href=\"#/p5/frameCount\">frameCount()</a>.</p>\n<p>Code placed within <code>draw()</code> begins looping after\n<a href=\"#/p5/setup\">setup()</a> runs. <code>draw()</code> will run until the user\ncloses the sketch. <code>draw()</code> can be stopped by calling the\n<a href=\"#/p5/noLoop\">noLoop()</a> function. <code>draw()</code> can be resumed by\ncalling the <a href=\"#/p5/loop\">loop()</a> function.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Paint the background once.\n  background(200);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves, leaving a trail.'\n  );\n}\n\nfunction draw() {\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}",
        "// Double-click the canvas to change the circle's color.\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A white circle on a gray background. The circle follows the mouse as the user moves. The circle changes color to pink when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Paint the background repeatedly.\n  background(200);\n\n  // Draw circles repeatedly.\n  circle(mouseX, mouseY, 40);\n}\n\n// Change the fill color when the user double-clicks.\nfunction doubleClicked() {\n  fill('deeppink');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "registerAddon",
      "file": "src/scripts/parsers/in/p5.js/src/core/main.js",
      "line": 641,
      "itemtype": "method",
      "description": "<p>Loads a p5.js library.</p>\n<p>A library is a function that adds functionality to p5.js by adding methods\nand properties for sketches to use, or for automatically running code at\ndifferent stages of the p5.js lifecycle. Take a look at the\n<a href=\"/contribute/creating_libraries/\">contributor docs for creating libraries</a>\nto learn more about creating libraries.</p>\n",
      "example": [
        "function myAddon(p5, fn, lifecycles) {\n  fn.sayHello = function() {\n    this.textAlign(this.CENTER, this.CENTER);\n    this.text('Hello!', this.width / 2, this.height / 2);\n  };\n}\np5.registerAddon(myAddon);\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n  sayHello(); // The sayHello method is now available!\n\n  describe('The text \"Hello!\"');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "library",
              "description": "The library function to register",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5",
      "static": 1,
      "module": "Structure",
      "submodule": "Structure"
    },
    {
      "name": "clear",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1472,
      "itemtype": "method",
      "description": "<p>Clears the pixels on the canvas.</p>\n<p><code>clear()</code> makes every pixel 100% transparent. Calling <code>clear()</code> doesn't\nclear objects created by <code>createX()</code> functions such as\n<a href=\"#/p5/createGraphics\">createGraphics()</a>,\n<a href=\"#/p5/createVideo\">createVideo()</a>, and\n<a href=\"#/p5/createImg\">createImg()</a>. These objects will remain\nunchanged after calling <code>clear()</code> and can be redrawn.</p>\n<p>In WebGL mode, this function can clear the screen to a specific color. It\ninterprets four numeric parameters as normalized RGBA color values. It also\nclears the depth buffer. If you are not using the WebGL renderer, these\nparameters will have no effect.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A gray square. White circles are drawn as the user moves the mouse. The circles disappear when the user presses the mouse.');\n}\n\nfunction draw() {\n  circle(mouseX, mouseY, 20);\n}\n\nfunction mousePressed() {\n  clear();\n  background(200);\n}",
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n  background(200);\n\n  pg = createGraphics(60, 60);\n  pg.background(200);\n  pg.noStroke();\n  pg.circle(pg.width / 2, pg.height / 2, 15);\n  image(pg, 20, 20);\n\n  describe('A white circle drawn on a gray square. The square gets smaller when the mouse is pressed.');\n}\n\nfunction mousePressed() {\n  clear();\n  image(pg, 20, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  let myWriter = createWriter('numbers.txt');\n\n  // Add some data to the print stream.\n  myWriter.print('Hello p5*js!');\n\n  // Clear the print stream.\n  myWriter.clear();\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "r",
              "description": "normalized red value.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "g",
              "description": "normalized green value.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "b",
              "description": "normalized blue value.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "a",
              "description": "normalized alpha value.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "char",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 657,
      "itemtype": "method",
      "description": "<p>Converts a <code>Number</code> or <code>String</code> to a single-character <code>String</code>.</p>\n<p><code>char()</code> converts numbers to their single-character string representations.</p>\n<p>The parameter, <code>n</code>, is the value to convert. If a number is passed, as in\n<code>char(65)</code>, the corresponding single-character string is returned. If a\nstring is passed, as in <code>char('65')</code>, the string is converted to an integer\n(whole number) and the corresponding single-character string is returned.\nIf an array is passed, as in <code>char([65, 66, 67])</code>, an array of\nsingle-character strings is returned.</p>\n<p>See <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode\" target=\"_blank\">MDN</a>\nfor more information about conversions.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 65;\n\n  // Convert the number to a char.\n  let converted = char(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"65 : A\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = '65';\n\n  // Convert the string to a char.\n  let converted = char(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"65 : A\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let original = ['65', 66, '67'];\n\n  // Convert the string to a char.\n  let converted = char(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Iterate over elements of the converted array.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Display the original and converted values.\n    text(`${original[i]} : ${converted[i]}`, 50, y);\n  }\n\n  describe(\n    'The text \"65 : A\", \"66 : B\", and \"67 : C\" written on three separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String|Number"
            }
          ],
          "return": {
            "description": "converted single-character string.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "Array"
            }
          ],
          "return": {
            "description": "converted single-character strings.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "converted single-character string.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "rotateY",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 666,
      "itemtype": "method",
      "description": "<p>Rotates the coordinate system about the y-axis in WebGL mode.</p>\n<p>The parameter, <code>angle</code>, is the amount to rotate. For example, calling\n<code>rotateY(1)</code> rotates the coordinate system about the y-axis by 1 radian.\n<code>rotateY()</code> interprets angle values using the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, transformations accumulate. For example, calling <code>rotateY(1)</code>\ntwice has the same effect as calling <code>rotateY(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>rotateY(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't cause\nshapes to spin.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateY(QUARTER_PI);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateY(QUARTER_PI / 2);\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateY(QUARTER_PI / 2);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateY(45);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube rotates slowly against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system a little more each frame.\n  let angle = frameCount * 0.01;\n  rotateY(angle);\n\n  // Draw a box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "debugMode",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/interaction.js",
      "line": 666,
      "itemtype": "method",
      "description": "<p>Adds a grid and an axes icon to clarify orientation in 3D sketches.</p>\n<p><code>debugMode()</code> adds a grid that shows where the “ground” is in a sketch. By\ndefault, the grid will run through the origin <code>(0, 0, 0)</code> of the sketch\nalong the XZ plane. <code>debugMode()</code> also adds an axes icon that points along\nthe positive x-, y-, and z-axes. Calling <code>debugMode()</code> displays the grid\nand axes icon with their default size and position.</p>\n<p>There are four ways to call <code>debugMode()</code> with optional parameters to\ncustomize the debugging environment.</p>\n<p>The first way to call <code>debugMode()</code> has one parameter, <code>mode</code>. If the\nsystem constant <code>GRID</code> is passed, as in <code>debugMode(GRID)</code>, then the grid\nwill be displayed and the axes icon will be hidden. If the constant <code>AXES</code>\nis passed, as in <code>debugMode(AXES)</code>, then the axes icon will be displayed\nand the grid will be hidden.</p>\n<p>The second way to call <code>debugMode()</code> has six parameters. The first\nparameter, <code>mode</code>, selects either <code>GRID</code> or <code>AXES</code> to be displayed. The\nnext five parameters, <code>gridSize</code>, <code>gridDivisions</code>, <code>xOff</code>, <code>yOff</code>, and\n<code>zOff</code> are optional. They’re numbers that set the appearance of the grid\n(<code>gridSize</code> and <code>gridDivisions</code>) and the placement of the axes icon\n(<code>xOff</code>, <code>yOff</code>, and <code>zOff</code>). For example, calling\n<code>debugMode(20, 5, 10, 10, 10)</code> sets the <code>gridSize</code> to 20 pixels, the number\nof <code>gridDivisions</code> to 5, and offsets the axes icon by 10 pixels along the\nx-, y-, and z-axes.</p>\n<p>The third way to call <code>debugMode()</code> has five parameters. The first\nparameter, <code>mode</code>, selects either <code>GRID</code> or <code>AXES</code> to be displayed. The\nnext four parameters, <code>axesSize</code>, <code>xOff</code>, <code>yOff</code>, and <code>zOff</code> are optional.\nThey’re numbers that set the appearance of the size of the axes icon\n(<code>axesSize</code>) and its placement (<code>xOff</code>, <code>yOff</code>, and <code>zOff</code>).</p>\n<p>The fourth way to call <code>debugMode()</code> has nine optional parameters. The\nfirst five parameters, <code>gridSize</code>, <code>gridDivisions</code>, <code>gridXOff</code>, <code>gridYOff</code>,\nand <code>gridZOff</code> are numbers that set the appearance of the grid. For\nexample, calling <code>debugMode(100, 5, 0, 0, 0)</code> sets the <code>gridSize</code> to 100,\nthe number of <code>gridDivisions</code> to 5, and sets all the offsets to 0 so that\nthe grid is centered at the origin. The next four parameters, <code>axesSize</code>,\n<code>xOff</code>, <code>yOff</code>, and <code>zOff</code> are numbers that set the appearance of the size\nof the axes icon (<code>axesSize</code>) and its placement (<code>axesXOff</code>, <code>axesYOff</code>,\nand <code>axesZOff</code>). For example, calling\n<code>debugMode(100, 5, 0, 0, 0, 50, 10, 10, 10)</code> sets the <code>gridSize</code> to 100,\nthe number of <code>gridDivisions</code> to 5, and sets all the offsets to 0 so that\nthe grid is centered at the origin. It then sets the <code>axesSize</code> to 50 and\noffsets the icon 10 pixels along each axis.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Enable debug mode.\n  debugMode();\n\n  describe('A multicolor box on a gray background. A grid and axes icon are displayed near the box.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(20, 40);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Enable debug mode.\n  // Only display the axes icon.\n  debugMode(AXES);\n\n  describe('A multicolor box on a gray background. A grid and axes icon are displayed near the box.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(20, 40);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Enable debug mode.\n  // Only display the grid and customize it:\n  // - size: 50\n  // - divisions: 10\n  // - offsets: 0, 20, 0\n  debugMode(GRID, 50, 10, 0, 20, 0);\n\n  describe('A multicolor box on a gray background. A grid is displayed below the box.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(20, 40);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Enable debug mode.\n  // Display the grid and axes icon and customize them:\n  // Grid\n  // ----\n  // - size: 50\n  // - divisions: 10\n  // - offsets: 0, 20, 0\n  // Axes\n  // ----\n  // - size: 50\n  // - offsets: 0, 0, 0\n  debugMode(50, 10, 0, 20, 0, 50, 0, 0, 0);\n\n  describe('A multicolor box on a gray background. A grid is displayed below the box. An axes icon is displayed at the center of the box.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.\n  box(20, 40);\n}"
      ],
      "overloads": [
        {
          "params": []
        },
        {
          "params": [
            {
              "name": "mode",
              "description": "either GRID or AXES",
              "type": "GRID|AXES"
            }
          ]
        },
        {
          "params": [
            {
              "name": "mode",
              "description": "",
              "type": "GRID|AXES"
            },
            {
              "name": "gridSize",
              "description": "side length of the grid.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "gridDivisions",
              "description": "number of divisions in the grid.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "xOff",
              "description": "offset from origin along the x-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "yOff",
              "description": "offset from origin along the y-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "zOff",
              "description": "offset from origin along the z-axis.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "mode",
              "description": "",
              "type": "GRID|AXES"
            },
            {
              "name": "axesSize",
              "description": "length of axes icon markers.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "xOff",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "yOff",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "zOff",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "gridSize",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "gridDivisions",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "gridXOff",
              "description": "grid offset from the origin along the x-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "gridYOff",
              "description": "grid offset from the origin along the y-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "gridZOff",
              "description": "grid offset from the origin along the z-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "axesSize",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "axesXOff",
              "description": "axes icon offset from the origin along the x-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "axesYOff",
              "description": "axes icon offset from the origin along the y-axis.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "axesZOff",
              "description": "axes icon offset from the origin along the z-axis.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Interaction"
    },
    {
      "name": "roll",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 673,
      "itemtype": "method",
      "description": "<p>Rotates the camera in a clockwise/counter-clockwise direction.</p>\n<p>Rolling rotates the camera without changing its orientation. The rotation\nhappens in the camera’s \"local\" space.</p>\n<p>The parameter, <code>angle</code>, is the angle the camera should rotate. Passing a\npositive angle, as in <code>myCamera.roll(0.001)</code>, rotates the camera in counter-clockwise direction.\nPassing a negative angle, as in <code>myCamera.roll(-0.001)</code>, rotates the\ncamera in clockwise direction.</p>\n<p>Note: Angles are interpreted based on the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n",
      "example": [
        "let cam;\nlet delta = 0.01;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  normalMaterial();\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n}\n\nfunction draw() {\n  background(200);\n\n  // Roll camera according to angle 'delta'\n  cam.roll(delta);\n\n  translate(0, 0, 0);\n  box(20);\n  translate(0, 25, 0);\n  box(20);\n  translate(0, 26, 0);\n  box(20);\n  translate(0, 27, 0);\n  box(20);\n  translate(0, 28, 0);\n  box(20);\n  translate(0,29, 0);\n  box(20);\n  translate(0, 30, 0);\n  box(20);\n}"
      ],
      "alt": "camera view rotates in counter clockwise direction with vertically stacked boxes in front of it.",
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "amount to rotate camera in current\n<a href=\"#/p5/angleMode\">angleMode</a> units.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "spline",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 681,
      "itemtype": "method",
      "description": "<p>Draws a curve using a Catmull-Rom spline.</p>\n<p>Spline curves can form shapes and curves that slope gently. They’re like\ncables that are attached to a set of points. By default (<code>ends: INCLUDE</code>),\nthe curve passes through all four points you provide, in order\n<code>p0(x1,y1)</code> -> <code>p1(x2,y2)</code> -> <code>p2(x3,y3)</code> -> <code>p3(x4,y4)</code>. Think of them as\npoints on a curve. If you switch to <code>ends: EXCLUDE</code>, p0 and p3 act\nlike control points and only the middle span <code>p1->p2</code> is drawn.</p>\n<p>Spline curves can also be drawn in 3D using WebGL mode. The 3D version of\n<code>spline()</code> has twelve arguments because each point has x-, y-, and\nz-coordinates.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(200, 200);\n  background(240);\n  noFill();\n\n  stroke(0);\n  strokeWeight(2);\n  spline(40, 60, 100, 40, 120, 120, 60, 140);\n\n  strokeWeight(5);\n  point(40, 60);\n  point(100, 40);\n  point(120, 120);\n  point(60, 140);\n\n  describe('A black spline passes smoothly through four points');\n}",
        "function setup() {\n  createCanvas(200, 200);\n  background(245);\n\n  // Ensure the curve includes both end spans p0->p1 and p2->p3\n  splineProperty('ends', INCLUDE);\n\n  // Control / anchor points\n  const p0 = createVector(30, 160);\n  const p1 = createVector(60, 40);\n  const p2 = createVector(140, 40);\n  const p3 = createVector(170, 160);\n\n  // Draw the spline that passes through ALL four points (INCLUDE)\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n  spline(p0.x, p0.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n\n  // Draw markers + labels\n  fill(255);\n  stroke(0);\n  const r = 6;\n  circle(p0.x, p0.y, r);\n  circle(p1.x, p1.y, r);\n  circle(p2.x, p2.y, r);\n  circle(p3.x, p3.y, r);\n\n  noStroke();\n  fill(0);\n  text('p0', p0.x - 14, p0.y + 14);\n  text('p1', p1.x - 14, p1.y - 8);\n  text('p2', p2.x + 4, p2.y - 8);\n  text('p3', p3.x + 4, p3.y + 14);\n\n  describe('A black Catmull-Rom spline passes through p0, p1, p2, p3 with endpoints included.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.\n  splineProperty('ends', EXCLUDE);\n\n  // Draw a black spline curve.\n  noFill();\n  strokeWeight(1);\n  stroke(0);\n  spline(5, 26, 73, 24, 73, 61, 15, 65);\n\n  // Draw red spline curves from the points.\n  stroke(255, 0, 0);\n  spline(5, 26, 5, 26, 73, 24, 73, 61);\n  spline(73, 24, 73, 61, 15, 65, 15, 65);\n\n  // Draw the points in black.\n  strokeWeight(5);\n  stroke(0);\n  point(73, 24);\n  point(73, 61);\n\n  // Draw the points in red.\n  stroke(255, 0, 0);\n  point(5, 26);\n  point(15, 65);\n\n  describe(\n    'A gray square with a curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'\n  );\n}",
        "let x1 = 5;\nlet y1 = 26;\nlet isChanging = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.\n  splineProperty('ends', EXCLUDE);\n\n  // Draw a black spline curve.\n  noFill();\n  strokeWeight(1);\n  stroke(0);\n  spline(x1, y1, 73, 24, 73, 61, 15, 65);\n\n  // Draw red spline curves from the points.\n  stroke(255, 0, 0);\n  spline(x1, y1, x1, y1, 73, 24, 73, 61);\n  spline(73, 24, 73, 61, 15, 65, 15, 65);\n\n  // Draw the anchor points in black.\n  strokeWeight(5);\n  stroke(0);\n  point(73, 24);\n  point(73, 61);\n\n  // Draw the points in red.\n  stroke(255, 0, 0);\n  point(x1, y1);\n  point(15, 65);\n}\n\n// Start changing the first point if the user clicks near it.\nfunction mousePressed() {\n  if (dist(mouseX, mouseY, x1, y1) < 20) {\n    isChanging = true;\n  }\n}\n\n// Stop changing the first point when the user releases the mouse.\nfunction mouseReleased() {\n  isChanging = false;\n}\n\n// Update the first point while the user drags the mouse.\nfunction mouseDragged() {\n  if (isChanging === true) {\n    x1 = mouseX;\n    y1 = mouseY;\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background('skyblue');\n\n  // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.\n  splineProperty('ends', EXCLUDE);\n\n  // Draw the red balloon.\n  fill('red');\n  spline(-150, 275, 50, 60, 50, 60, 250, 275);\n\n  // Draw the balloon string.\n  line(50, 60, 50, 80);\n\n  describe('A red balloon in a blue sky.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red balloon in a blue sky.');\n}\n\nfunction draw() {\n  background('skyblue');\n\n  // Exclude the ends—skip the outer spans (p0→p1 and p2→p3) so only the middle span (p1→p2) is drawn.\n  splineProperty('ends', EXCLUDE);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the red balloon.\n  fill('red');\n  spline(-200, 225, 0, 0, 10, 0, 0, 10, 0, 200, 225, 0);\n\n  // Draw the balloon string.\n  line(0, 10, 0, 0, 30, 0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "x-coordinate of point p0.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "y-coordinate of point p0.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "x-coordinate of point p1.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "y-coordinate of point p1.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "x-coordinate of point p2.",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "y-coordinate of point p2.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "x-coordinate of point p3.",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "y-coordinate of point p3.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z1",
              "description": "z-coordinate of point p0.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z2",
              "description": "z-coordinate of point p1.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z3",
              "description": "z-coordinate of point p2.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z4",
              "description": "z-coordinate of point p3.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "loadXML",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 691,
      "itemtype": "method",
      "description": "<p>Loads an XML file to create a <a href=\"#/p5.XML\">p5.XML</a> object.</p>\n<p>Extensible Markup Language\n(<a href=\"https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction\" target=\"_blank\">XML</a>)\nis a standard format for sending data between applications. Like HTML, the\nXML format is based on tags and attributes, as in\n<code><time units=\"s\">1234</time></code>.</p>\n<p>The first parameter, <code>path</code>, is always a string with the path to the file.\nPaths to local files should be relative, as in\n<code>loadXML('assets/data.xml')</code>. URLs such as <code>'https://example.com/data.xml'</code>\nmay be blocked due to browser security. The <code>path</code> parameter can also be defined\nas a <code>Request</code>\nobject for more advanced usage.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is\npassed, as in <code>loadXML('assets/data.xml', handleData)</code>, then the\n<code>handleData()</code> function will be called once the data loads. The\n<a href=\"#/p5.XML\">p5.XML</a> object created from the data will be passed\nto <code>handleData()</code> as its only argument. The return value of the <code>handleData()</code>\nfunction will be used as the final return value of <code>loadXML('assets/data.xml', handleData)</code>.</p>\n<p>The third parameter, <code>failureCallback</code>, is also optional. If a function is\npassed, as in <code>loadXML('assets/data.xml', handleData, handleFailure)</code>, then\nthe <code>handleFailure()</code> function will be called if an error occurs while\nloading. The <code>Error</code> object will be passed to <code>handleFailure()</code> as its only\nargument. The return value of the <code>handleFailure()</code> function will be used as the\nfinal return value of <code>loadXML('assets/data.xml', handleData, handleFailure)</code>.</p>\n<p>This function returns a <code>Promise</code> and should be used in an <code>async</code> setup with\n<code>await</code>. See the examples for the usage syntax.</p>\n",
      "example": [
        "let myXML;\n\n// Load the XML and create a p5.XML object.\nasync function setup() {\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array with all mammal tags.\n  let mammals = myXML.getChildren('mammal');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the mammals array.\n  for (let i = 0; i < mammals.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Get the mammal's common name.\n    let name = mammals[i].getContent();\n\n    // Display the mammal's name.\n    text(name, 20, y);\n  }\n\n  describe(\n    'The words \"Goat\", \"Leopard\", and \"Zebra\" written on three separate lines. The text is black on a gray background.'\n  );\n}",
        "let lastMammal;\n\n// Load the XML and create a p5.XML object.\nasync function setup() {\n  await loadXML('assets/animals.xml', handleData);\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(16);\n\n  // Display the content of the last mammal element.\n  text(lastMammal, 50, 50);\n\n  describe('The word \"Zebra\" written in black on a gray background.');\n}\n\n// Get the content of the last mammal element.\nfunction handleData(data) {\n  // Get an array with all mammal elements.\n  let mammals = data.getChildren('mammal');\n\n  // Get the content of the last mammal.\n  lastMammal = mammals[mammals.length - 1].getContent();\n}",
        "let lastMammal;\n\n// Load the XML and preprocess it.\nasync function setup() {\n  await loadXML('assets/animals.xml', handleData, handleError);\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(16);\n\n  // Display the content of the last mammal element.\n  text(lastMammal, 50, 50);\n\n  describe('The word \"Zebra\" written in black on a gray background.');\n}\n\n// Get the content of the last mammal element.\nfunction handleData(data) {\n  // Get an array with all mammal elements.\n  let mammals = data.getChildren('mammal');\n\n  // Get the content of the last mammal.\n  lastMammal = mammals[mammals.length - 1].getContent();\n}\n\n// Log any errors to the console.\nfunction handleError(error) {\n  console.error('Oops!', error);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the XML file to be loaded.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "function to call once the data is\nloaded. Will be passed the\n<a href=\"#/p5.XML\">p5.XML</a> object.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to call if the data fails to\nload. Will be passed an <code>Error</code> event\nobject.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "XML data loaded into a <a href=\"#/p5.XML\">p5.XML</a>\nobject.",
            "type": "Promise<p5.XML>"
          }
        }
      ],
      "return": {
        "description": "XML data loaded into a <a href=\"#/p5.XML\">p5.XML</a>\nobject.",
        "type": "Promise<p5.XML>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "get",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 697,
      "itemtype": "method",
      "description": "<p>Gets a pixel or a region of pixels from the canvas.</p>\n<p><code>get()</code> is easy to use but it's not as fast as\n<a href=\"#/p5/pixels\">pixels</a>. Use <a href=\"#/p5/pixels\">pixels</a>\nto read many pixel values.</p>\n<p>The version of <code>get()</code> with no parameters returns the entire canvas.</p>\n<p>The version of <code>get()</code> with two parameters interprets them as\ncoordinates. It returns an array with the <code>[R, G, B, A]</code> values of the\npixel at the given point.</p>\n<p>The version of <code>get()</code> with four parameters interprets them as coordinates\nand dimensions. It returns a subsection of the canvas as a\n<a href=\"#/p5.Image\">p5.Image</a> object. The first two parameters are the\ncoordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.</p>\n<p>Use <a href=\"#/p5.Image/get\">p5.Image.get()</a> to work directly with\n<a href=\"#/p5.Image\">p5.Image</a> objects.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get the entire canvas.\n  let c = get();\n\n  // Display half the canvas.\n  image(c, 50, 0);\n\n  describe('Two identical mountain landscapes shown side-by-side.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get the color of a pixel.\n  let c = get(50, 90);\n\n  // Style the square with the pixel's color.\n  fill(c);\n  noStroke();\n\n  // Display the square.\n  square(25, 25, 50);\n\n  describe('A mountain landscape with an olive green square in its center.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0);\n\n  // Get a region of the image.\n  let c = get(0, 0, 50, 50);\n\n  // Display the region.\n  image(c, 50, 50);\n\n  describe('A mountain landscape drawn on top of another mountain landscape.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "whole canvas as a <a href=\"#/p5.Image\">p5.Image</a>.",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at (x, y) in array format <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
        "type": "p5.Image"
      },
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "min",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 700,
      "itemtype": "method",
      "description": "<p>Returns the smallest value in a sequence of numbers.</p>\n<p>The version of <code>min()</code> with one parameter interprets it as an array of\nnumbers and returns the smallest number.</p>\n<p>The version of <code>min()</code> with two or more parameters interprets them as\nindividual numbers and returns the smallest number.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Calculate the minimum of 10, 5, and 20.\n  let m = min(10, 5, 20);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the min.\n  text(m, 50, 50);\n\n  describe('The number 5 written in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let numbers = [10, 5, 20];\n\n  // Calculate the minimum of the array.\n  let m = min(numbers);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the min.\n  text(m, 50, 50);\n\n  describe('The number 5 written in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n0",
              "description": "first number to compare.",
              "type": "Number"
            },
            {
              "name": "n1",
              "description": "second number to compare.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "minimum number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "nums",
              "description": "numbers to compare.",
              "type": "Number[]"
            }
          ],
          "return": {
            "description": "",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "minimum number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "windowResized",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 714,
      "itemtype": "method",
      "description": "<p>A function that's called when the browser window is resized.</p>\n<p>Code placed in the body of <code>windowResized()</code> will run when the\nbrowser window's size changes. It's a good place to call\n<a href=\"#/p5/resizeCanvas\">resizeCanvas()</a> or make other\nadjustments to accommodate the new window size.</p>\n<p>The <code>event</code> parameter is optional. If added to the function declaration, it\ncan be used for debugging or other purposes.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n\n  describe('A gray canvas with a white circle at its center. The canvas takes up the entire browser window. It changes size to match the browser window.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a circle at the center.\n  circle(width / 2, height / 2, 50);\n}\n\n// Resize the canvas when the\n// browser's size changes.\nfunction windowResized() {\n  resizeCanvas(windowWidth, windowHeight);\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n}\n\nfunction draw() {\n  background(200);\n\n  describe('A gray canvas that takes up the entire browser window. It changes size to match the browser window.');\n}\n\nfunction windowResized(event) {\n  // Resize the canvas when the\n  // browser's size changes.\n  resizeCanvas(windowWidth, windowHeight);\n\n  // Print the resize event to the console for debugging.\n  print(event);\n}"
      ],
      "alt": "This example does not render anything.\nThis example does not render anything.",
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional resize Event.",
              "optional": 1,
              "type": "Event"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "shuffle",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/utility_functions.js",
      "line": 720,
      "itemtype": "method",
      "description": "<p>Shuffles the elements of an array.</p>\n<p>The first parameter, <code>array</code>, is the array to be shuffled. For example,\ncalling <code>shuffle(myArray)</code> will shuffle the elements of <code>myArray</code>. By\ndefault, the original array won’t be modified. Instead, a copy will be\ncreated, shuffled, and returned.</p>\n<p>The second parameter, <code>modify</code>, is optional. If <code>true</code> is passed, as in\n<code>shuffle(myArray, true)</code>, then the array will be shuffled in place without\nmaking a copy.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of colors.\n  let colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'];\n\n  // Create a shuffled copy of the array.\n  let shuffledColors = shuffle(colors);\n\n  // Draw  a row of circles using the original array.\n  for (let i = 0; i < colors.length; i += 1) {\n    // Calculate the x-coordinate.\n    let x = (i + 1) * 12.5;\n\n    // Style the circle.\n    let c = colors[i];\n    fill(c);\n\n    // Draw the circle.\n    circle(x, 33, 10);\n  }\n\n  // Draw  a row of circles using the original array.\n  for (let i = 0; i < shuffledColors.length; i += 1) {\n    // Calculate the x-coordinate.\n    let x = (i + 1) * 12.5;\n\n    // Style the circle.\n    let c = shuffledColors[i];\n    fill(c);\n\n    // Draw the circle.\n    circle(x, 67, 10);\n  }\n\n  describe(\n    'Two rows of circles on a gray background. The top row follows the color sequence ROYGBIV. The bottom row has all the same colors but they are shuffled.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of colors.\n  let colors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet'];\n\n  // Shuffle the array.\n  shuffle(colors, true);\n\n  // Draw  a row of circles using the original array.\n  for (let i = 0; i < colors.length; i += 1) {\n    // Calculate the x-coordinate.\n    let x = (i + 1) * 12.5;\n\n    // Style the circle.\n    let c = colors[i];\n    fill(c);\n\n    // Draw the circle.\n    circle(x, 50, 10);\n  }\n\n  describe(\n    'A row of colorful circles on a gray background. Their sequence changes each time the sketch runs.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "array",
              "description": "array to shuffle.",
              "type": "Array"
            },
            {
              "name": "modify",
              "description": "if <code>true</code>, shuffle the original array in place. Defaults to <code>false</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "shuffled array.",
            "type": "Array"
          }
        }
      ],
      "return": {
        "description": "shuffled array.",
        "type": "Array"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Utility Functions"
    },
    {
      "name": "noDebugMode",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/interaction.js",
      "line": 734,
      "itemtype": "method",
      "description": "Turns off <a href=\"#/p5/debugMode\">debugMode()</a> in a 3D sketch.",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Enable debug mode.\n  debugMode();\n\n  describe('A multicolor box on a gray background. A grid and axes icon are displayed near the box. They disappear when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the box.\n  normalMaterial();\n\n  // Draw the box.  box(20, 40);\n}\n\n// Disable debug mode when the user double-clicks.\nfunction doubleClicked() {\n  noDebugMode();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Interaction"
    },
    {
      "name": "blue",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 739,
      "itemtype": "method",
      "description": "<p>Gets the blue value of a color.</p>\n<p><code>blue()</code> extracts the blue value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>By default, <code>blue()</code> returns a color's blue value in the range 0\nto 255. If the <a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to RGB, it\nreturns the blue value in the given range.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object using RGB values.\n  let c = color(175, 100, 220);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'blueValue' to 220.\n  let blueValue = blue(c);\n\n  // Draw the right rectangle.\n  fill(0, 0, blueValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is royal blue.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a color array.\n  let c = [175, 100, 220];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'blueValue' to 220.\n  let blueValue = blue(c);\n\n  // Draw the right rectangle.\n  fill(0, 0, blueValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is royal blue.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a CSS color string.\n  let c = 'rgb(175, 100, 220)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'blueValue' to 220.\n  let blueValue = blue(c);\n\n  // Draw the right rectangle.\n  fill(0, 0, blueValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is royal blue.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use RGB color with values in the range 0-100.\n  colorMode(RGB, 100);\n\n  // Create a p5.Color object using RGB values.\n  let c = color(69, 39, 86);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'blueValue' to 86.\n  let blueValue = blue(c);\n\n  // Draw the right rectangle.\n  fill(0, 0, blueValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light purple and the right one is royal blue.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the blue value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the blue value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "unchar",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 739,
      "itemtype": "method",
      "description": "<p>Converts a single-character <code>String</code> to a <code>Number</code>.</p>\n<p><code>unchar()</code> converts single-character strings to their corresponding\ninteger (whole number).</p>\n<p>The parameter, <code>n</code>, is the character to convert. For example,\n<code>unchar('A')</code>, returns the number 65. If an array is passed, as in\n<code>unchar(['A', 'B', 'C'])</code>, an array of integers is returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a string variable.\n  let original = 'A';\n\n  // Convert the string to a number.\n  let converted = unchar(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} : ${converted}`, 50, 50);\n\n  describe('The text \"A : 65\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of characters.\n  let original = ['A', 'B', 'C'];\n\n  // Convert the string to a number.\n  let converted = unchar(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Iterate over elements of the converted array.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Display the original and converted values.\n    text(`${original[i]} : ${converted[i]}`, 50, y);\n  }\n\n  describe(\n    'The text \"A : 65\", \"B : 66\", and \"C :67\" written on three separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String"
            }
          ],
          "return": {
            "description": "converted number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "String[]"
            }
          ],
          "return": {
            "description": "converted numbers.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "converted number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "angleMode",
      "file": "src/scripts/parsers/in/p5.js/src/math/trigonometry.js",
      "line": 740,
      "itemtype": "method",
      "description": "<p>Changes the unit system used to measure angles.</p>\n<p>Degrees and radians are both units for measuring angles. There are 360˚ in\none full rotation. A full rotation is 2 × π (about 6.28) radians.</p>\n<p>Functions such as <a href=\"#/p5/rotate\">rotate()</a> and\n<a href=\"#/p5/sin\">sin()</a> expect angles measured radians by default.\nCalling <code>angleMode(DEGREES)</code> switches to degrees. Calling\n<code>angleMode(RADIANS)</code> switches back to radians.</p>\n<p>Calling <code>angleMode()</code> with no arguments returns current angle mode, which\nis either <code>RADIANS</code> or <code>DEGREES</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Rotate 1/8 turn.\n  rotate(QUARTER_PI);\n\n  // Draw a line.\n  line(0, 0, 80, 0);\n\n  describe('A diagonal line radiating from the top-left corner of a square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Rotate 1/8 turn.\n  rotate(45);\n\n  // Draw a line.\n  line(0, 0, 80, 0);\n\n  describe('A diagonal line radiating from the top-left corner of a square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Calculate the angle to rotate.\n  let angle = TWO_PI / 7;\n\n  // Move the origin to the center.\n  translate(50, 50);\n\n  // Style the flower.\n  noStroke();\n  fill(255, 50);\n\n  // Draw the flower.\n  for (let i = 0; i < 7; i += 1) {\n    ellipse(0, 0, 80, 20);\n    rotate(angle);\n  }\n\n  describe('A translucent white flower on a dark background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Calculate the angle to rotate.\n  let angle = 360 / 7;\n\n  // Move the origin to the center.\n  translate(50, 50);\n\n  // Style the flower.\n  noStroke();\n  fill(255, 50);\n\n  // Draw the flower.\n  for (let i = 0; i < 7; i += 1) {\n    ellipse(0, 0, 80, 20);\n    rotate(angle);\n  }\n\n  describe('A translucent white flower on a dark background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white ball on a string oscillates left and right.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the coordinates.\n  let x = 30 * cos(frameCount * 0.05) + 50;\n  let y = 50;\n\n  // Draw the oscillator.\n  line(50, y, x, y);\n  circle(x, y, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white ball on a string oscillates left and right.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the coordinates.\n  let x = 30 * cos(frameCount * 2.86) + 50;\n  let y = 50;\n\n  // Draw the oscillator.\n  line(50, y, x, y);\n  circle(x, y, 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the upper line.\n  rotate(PI / 6);\n  line(0, 0, 80, 0);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Draw the lower line.\n  rotate(30);\n  line(0, 0, 80, 0);\n\n  describe('Two diagonal lines radiating from the top-left corner of a square. The lines are oriented 30 degrees from the edges of the square and 30 degrees apart from each other.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either RADIANS or DEGREES.",
              "type": "RADIANS|DEGREES"
            }
          ]
        },
        {
          "params": [],
          "return": {
            "description": "mode either RADIANS or DEGREES",
            "type": "RADIANS|DEGREES"
          }
        }
      ],
      "return": {
        "description": "mode either RADIANS or DEGREES",
        "type": "RADIANS|DEGREES"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Trigonometry"
    },
    {
      "name": "sphere",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 741,
      "itemtype": "method",
      "description": "<p>Draws a sphere.</p>\n<p>A sphere is a 3D shape with triangular faces that connect to form a round\nsurface. Spheres with few faces look like crystals. Spheres with many faces\nhave smooth surfaces and look like balls.</p>\n<p>The first parameter, <code>radius</code>, is optional. If a <code>Number</code> is passed, as in\n<code>sphere(20)</code>, it sets the radius of the sphere. By default, <code>radius</code> is 50.</p>\n<p>The second parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>sphere(20, 5)</code>, it sets the number of triangle subdivisions to use\nalong the x-axis. All 3D shapes are made by connecting triangles to form\ntheir surfaces. By default, <code>detailX</code> is 24.</p>\n<p>The third parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>sphere(20, 5, 2)</code>, it sets the number of triangle subdivisions to\nuse along the y-axis. All 3D shapes are made by connecting triangles to\nform their surfaces. By default, <code>detailY</code> is 16.</p>\n<p>Note: <code>sphere()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the sphere.\n  sphere();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the sphere.\n  // Set its radius to 30.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the sphere.\n  // Set its radius to 30.\n  // Set its detailX to 6.\n  sphere(30, 6);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the sphere.\n  // Set its radius to 30.\n  // Set its detailX to 24.\n  // Set its detailY to 4.\n  sphere(30, 24, 4);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radius",
              "description": "radius of the sphere. Defaults to 50.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of triangle subdivisions along the x-axis. Defaults to 24.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis. Defaults to 16.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "loadPixels",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 742,
      "itemtype": "method",
      "description": "<p>Loads the current value of each pixel on the canvas into the\n<a href=\"#/p5/pixels\">pixels</a> array.</p>\n<p><code>loadPixels()</code> must be called before reading from or writing to\n<a href=\"#/p5/pixels\">pixels</a>.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0, 100, 100);\n\n  // Get the pixel density.\n  let d = pixelDensity();\n\n  // Calculate the halfway index in the pixels array.\n  let halfImage = 4 * (d * width) * (d * height / 2);\n\n  // Load the pixels array.\n  loadPixels();\n\n  // Copy the top half of the canvas to the bottom.\n  for (let i = 0; i < halfImage; i += 1) {\n    pixels[i + halfImage] = pixels[i];\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('Two identical images of mountain landscapes, one on top of the other.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "buildFilterShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 742,
      "itemtype": "method",
      "description": "<p>Creates a <a href=\"#/p5.Shader\">p5.Shader</a> object to be used with the\n<a href=\"#/p5/filter\">filter()</a> function.</p>\n<p>The main way to use <code>buildFilterShader</code> is to pass a function in as a parameter.\nThis will let you create a shader using p5.strands.</p>\n<p>In your function, you can use <a href=\"#/p5/filterColor\"><code>filterColor</code></a> with a function\nthat will be called for each pixel on the image to determine its final color. You can\nread the color of the current pixel with <code>getTexture(canvasContent, coord)</code>.\nSee <a href=\"#/p5/getTexture\">getTexture()</a>.</p>\n<pre><code class=\"language-js example\">async function setup() {\n  createCanvas(50, 50, WEBGL);\n  let img = await loadImage('assets/bricks.jpg');\n  let myFilter = buildFilterShader(tintShader);\n\n  image(img, -50, -50);\n  filter(myFilter);\n  describe('Bricks tinted red');\n}\n\nfunction tintShader() {\n  filterColor.begin();\n  let result = getTexture(\n    filterColor.canvasContent,\n    filterColor.texCoord\n  );\n  // Zero out the green and blue channels, leaving red\n  result.g = 0;\n  result.b = 0;\n  filterColor.set(result);\n  filterColor.end();\n}</code></pre><p>You can create uniforms if you want to pass data into your filter from the rest of your sketch.\nFor example, you could pass in the mouse cursor position and use that to control how much\nyou warp the content. If you create a uniform inside the shader using a function like <code>uniformFloat()</code>, with\n<code>uniform</code> + the type of the data, you can set its value using <code>setUniform</code> right before applying the filter.\nIn the example below, move your mouse across the image to see it update the <code>warpAmount</code> uniform:</p>\n<pre><code class=\"language-js example\">let img;\nlet myFilter;\nasync function setup() {\n  createCanvas(50, 50, WEBGL);\n  img = await loadImage('assets/bricks.jpg');\n  myFilter = buildFilterShader(warpShader);\n  describe('Warped bricks');\n}\n\nfunction warpShader() {\n  let warpAmount = uniformFloat();\n  filterColor.begin();\n  let coord = filterColor.texCoord;\n  coord.y += sin(coord.x * 10) * warpAmount;\n  filterColor.set(\n    getTexture(filterColor.canvasContent, coord)\n  );\n  filterColor.end();\n}\n\nfunction draw() {\n  image(img, -50, -50);\n  myFilter.setUniform(\n    'warpAmount',\n    map(mouseX, 0, width, 0, 1, true)\n  );\n  filter(myFilter);\n}</code></pre><p>You can also make filters that do not need any content to be drawn first!\nThere is a lot you can draw just using, for example, the position of the pixel.\n<code>inputs.texCoord</code> has an <code>x</code> and a <code>y</code> property, each with a number between 0 and 1.</p>\n<pre><code class=\"language-js example\">function setup() {\n  createCanvas(50, 50, WEBGL);\n  let myFilter = buildFilterShader(gradient);\n  describe('A gradient with red, green, yellow, and black');\n  filter(myFilter);\n}\n\nfunction gradient() {\n  filterColor.begin();\n  filterColor.set([filterColor.texCoord.x, filterColor.texCoord.y, 0, 1]);\n  filterColor.end();\n}</code></pre><pre><code class=\"language-js example\">function setup() {\n  createCanvas(50, 50, WEBGL);\n  let myFilter = buildFilterShader(gradient);\n  describe('A gradient from red to blue');\n  filter(myFilter);\n}\n\nfunction gradient() {\n  filterColor.begin();\n  filterColor.set(mix(\n    [1, 0, 0, 1], // Red\n    [0, 0, 1, 1], // Blue\n    filterColor.texCoord.x // x coordinate, from 0 to 1\n  ));\n  filterColor.end();\n}</code></pre><p>You can also animate your filters over time using the <code>millis()</code> function.</p>\n<pre><code class=\"language-js example\">let myFilter;\nfunction setup() {\n  createCanvas(50, 50, WEBGL);\n  myFilter = buildFilterShader(gradient);\n  describe('A moving, repeating gradient from red to blue');\n}\n\nfunction gradient() {\n  let time = millis();\n  filterColor.begin();\n  filterColor.set(mix(\n    [1, 0, 0, 1], // Red\n    [0, 0, 1, 1], // Blue\n    sin(filterColor.texCoord.x*15 + time*0.004)/2+0.5\n  ));\n  filterColor.end();\n}\n\nfunction draw() {\n  filter(myFilter);\n}</code></pre><p>We can use the <code>noise()</code> function built into strands to generate a color for each pixel.  (Again no need here for underlying content for the filter to operate on.)  Again we'll animate by using the millis() function to get an up-to-date time value.</p>\n<pre><code class=\"language-js example\">let myFilter;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  myFilter = buildFilterShader(noiseShaderCallback);\n  describe('Evolving animated cloud-like noise in cyan and magenta');\n}\n\nfunction noiseShaderCallback() {\n  let time = millis();\n  filterColor.begin();\n  let coord = filterColor.texCoord;\n\n  //generate a value roughly between 0 and 1\n  let noiseVal = noise(coord.x, coord.y, time / 2000);\n\n  let result = mix(\n    [1, 0, 1, 1], // Magenta\n    [0, 1, 1, 1], // Cyan\n    noiseVal\n  );\n  filterColor.set(result);\n  filterColor.end();\n}\n\nfunction draw() {\n  filter(myFilter);\n}</code></pre><p>Like the <code>modify()</code> method on shaders,\nadvanced users can also fill in <code>filterColor</code> using <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\ninstead of JavaScript.\nRead the <a href=\"#/p5.Shader/modify\">reference entry for <code>modify()</code></a>\nfor more info. Alternatively, <code>buildFilterShader()</code> can also be used like\n<a href=\"#/p5/createShader\">createShader()</a>, but where you only specify a fragment shader.</p>\n<p>For more info about filters and shaders, see Adam Ferriss' <a href=\"https://github.com/aferriss/p5jsShaderExamples\">repo of shader examples</a>\nor the <a href=\"https://p5js.org/learn/getting-started-in-webgl-shaders.html\">Introduction to Shaders</a> tutorial.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function building a p5.strands shader.",
              "type": "Function"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The material shader",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "An object specifying p5.strands hooks in GLSL.",
              "type": "Object"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The material shader",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The material shader",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "loadBytes",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 743,
      "itemtype": "method",
      "description": "This method is suitable for fetching files up to size of 64MB.",
      "example": [
        "let data;\n\nasync function setup() {\n  createCanvas(100, 100); // Create a canvas\n  data = await loadBytes('assets/mammals.xml'); // Load the bytes from the XML file\n\n  background(255); // Set a white background\n  fill(0);       // Set text color to black\n\n  // Display the first 5 byte values on the canvas in hexadecimal format\n  for (let i = 0; i < 5; i++) {\n    let byteHex = data[i].toString(16);\n    text(byteHex, 10, 18 * (i + 1)); // Adjust spacing as needed\n  }\n\n  describe('no image displayed, displays first 5 bytes of mammals.xml in hexadecimal format');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "file",
              "description": "name of the file or URL to load",
              "type": "String|Request"
            },
            {
              "name": "callback",
              "description": "function to be executed after <a href=\"#/p5/loadBytes\">loadBytes()</a>\ncompletes",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to be executed if there\nis an error",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "a Uint8Array containing the loaded buffer",
            "type": "Promise<Uint8Array>"
          }
        }
      ],
      "return": {
        "description": "a Uint8Array containing the loaded buffer",
        "type": "Promise<Uint8Array>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "createSlider",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 748,
      "itemtype": "method",
      "description": "<p>Creates a slider <code><input></input></code> element.</p>\n<p>Range sliders are useful for quickly selecting numbers from a given range.</p>\n<p>The first two parameters, <code>min</code> and <code>max</code>, are numbers that set the\nslider's minimum and maximum.</p>\n<p>The third parameter, <code>value</code>, is optional. It's a number that sets the\nslider's default value.</p>\n<p>The fourth parameter, <code>step</code>, is also optional. It's a number that sets the\nspacing between each value in the slider's range. Setting <code>step</code> to 0\nallows the slider to move smoothly from <code>min</code> to <code>max</code>.</p>\n",
      "example": [
        "let slider;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a slider and place it at the top of the canvas.\n  slider = createSlider(0, 255);\n  slider.position(10, 10);\n  slider.size(80);\n\n  describe('A dark gray square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n  // Use the slider as a grayscale value.\n  let g = slider.value();\n  background(g);\n}",
        "let slider;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a slider and place it at the top of the canvas.\n  // Set its default value to 0.\n  slider = createSlider(0, 255, 0);\n  slider.position(10, 10);\n  slider.size(80);\n\n  describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n  // Use the slider as a grayscale value.\n  let g = slider.value();\n  background(g);\n}",
        "let slider;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a slider and place it at the top of the canvas.\n  // Set its default value to 0.\n  // Set its step size to 50.\n  slider = createSlider(0, 255, 0, 50);\n  slider.position(10, 10);\n  slider.size(80);\n\n  describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n  // Use the slider as a grayscale value.\n  let g = slider.value();\n  background(g);\n}",
        "let slider;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a slider and place it at the top of the canvas.\n  // Set its default value to 0.\n  // Set its step size to 0 so that it moves smoothly.\n  slider = createSlider(0, 255, 0, 0);\n  slider.position(10, 10);\n  slider.size(80);\n\n  describe('A black square with a range slider at the top. The square changes color when the slider is moved.');\n}\n\nfunction draw() {\n  // Use the slider as a grayscale value.\n  let g = slider.value();\n  background(g);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "min",
              "description": "minimum value of the slider.",
              "type": "Number"
            },
            {
              "name": "max",
              "description": "maximum value of the slider.",
              "type": "Number"
            },
            {
              "name": "value",
              "description": "default value of the slider.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "step",
              "description": "size for each step in the slider's range.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "norm",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 750,
      "itemtype": "method",
      "description": "<p>Maps a number from one range to a value between 0 and 1.</p>\n<p>For example, <code>norm(2, 0, 10)</code> returns 0.2. 2's position in the original\nrange [0, 10] is proportional to 0.2's position in the range [0, 1]. This\nis the same as calling <code>map(2, 0, 10, 0, 1)</code>.</p>\n<p>Numbers outside of the original range are not constrained between 0 and 1.\nOut-of-range values are often intentional and useful.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use RGB color with values from 0 to 1.\n  colorMode(RGB, 1);\n\n  describe('A square changes color from black to red as the mouse moves from left to right.');\n}\n\nfunction draw() {\n  // Calculate the redValue.\n  let redValue = norm(mouseX, 0, 100);\n\n  // Paint the background.\n  background(redValue, 0, 0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "incoming value to be normalized.",
              "type": "Number"
            },
            {
              "name": "start",
              "description": "lower bound of the value's current range.",
              "type": "Number"
            },
            {
              "name": "stop",
              "description": "upper bound of the value's current range.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "normalized number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "normalized number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "keyReleased",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 783,
      "itemtype": "method",
      "description": "<p>A function that's called once when any key is released.</p>\n<p>Declaring the function <code>keyReleased()</code> sets a code block to run once\nautomatically when the user releases any key:</p>\n<pre><code class=\"language-js\">function keyReleased() {\n  // Code to run.\n}</code></pre><p>The <a href=\"#/p5/key\">key</a> and <a href=\"#/p5/keyCode\">keyCode</a>\nvariables will be updated with the most recently released value when\n<code>keyReleased()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function keyReleased() {\n  if (key === 'c') {\n    // Code to run.\n  }\n\n  if (keyCode === 13) { // Enter key\n    // Code to run.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>keyReleased()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\" target=\"_blank\">KeyboardEvent</a>\nobject with properties that describe the key press event:</p>\n<pre><code class=\"language-js\">function keyReleased(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>Browsers may have default behaviors attached to various key events. To\nprevent any default behavior for this event, add <code>return false;</code> to the end\nof the function.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square changes color when the user releases a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle value when the user releases a key.\nfunction keyReleased() {\n  if (value === 0) {\n    value = 255;\n  } else {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square becomes white when the user releases the \"w\" key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Set value to 255 the user releases the 'w' key.\nfunction keyReleased() {\n  if (key === 'w') {\n    value = 255;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square turns white when the user presses and releases the left arrow key. It turns black when the user presses and releases the right arrow key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the background color when the user releases an arrow key.\nfunction keyReleased() {\n  if (keyCode === 37) { // Left arrow key\n    value = 255;\n  } else if (keyCode === 39) { // Right arrow key\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>KeyboardEvent</code> callback argument.",
              "optional": 1,
              "type": "KeyboardEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Keyboard"
    },
    {
      "name": "rotateZ",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 789,
      "itemtype": "method",
      "description": "<p>Rotates the coordinate system about the z-axis in WebGL mode.</p>\n<p>The parameter, <code>angle</code>, is the amount to rotate. For example, calling\n<code>rotateZ(1)</code> rotates the coordinate system about the z-axis by 1 radian.\n<code>rotateZ()</code> interprets angle values using the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, transformations accumulate. For example, calling <code>rotateZ(1)</code>\ntwice has the same effect as calling <code>rotateZ(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>rotateZ(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't cause\nshapes to spin.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateZ(QUARTER_PI);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateZ(QUARTER_PI / 2);\n\n  // Rotate the coordinate system 1/16 turn.\n  rotateZ(QUARTER_PI / 2);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system 1/8 turn.\n  rotateZ(45);\n\n  // Draw a box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube rotates slowly against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Rotate the coordinate system a little more each frame.\n  let angle = frameCount * 0.01;\n  rotateZ(angle);\n\n  // Draw a box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "pow",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 795,
      "itemtype": "method",
      "description": "<p>Calculates exponential expressions such as <var>2<sup>3</sup></var>.</p>\n<p>For example, <code>pow(2, 3)</code> evaluates the expression\n2 × 2 × 2. <code>pow(2, -3)</code> evaluates 1 ÷\n(2 × 2 × 2).</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the base of the exponent.\n  let base = 3;\n\n  // Top-left.\n  let d = pow(base, 1);\n  circle(10, 10, d);\n\n  // Left-center.\n  d = pow(base, 2);\n  circle(20, 20, d);\n\n  // Right-center.\n  d = pow(base, 3);\n  circle(40, 40, d);\n\n  // Bottom-right.\n  d = pow(base, 4);\n  circle(80, 80, d);\n\n  describe('A series of circles that grow exponentially from top left to bottom right.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "base of the exponential expression.",
              "type": "Number"
            },
            {
              "name": "e",
              "description": "power by which to raise the base.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "n^e.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "n^e.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "fullscreen",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 800,
      "itemtype": "method",
      "description": "<p>Toggles full-screen mode or returns the current mode.</p>\n<p>Calling <code>fullscreen(true)</code> makes the sketch full-screen. Calling\n<code>fullscreen(false)</code> makes the sketch its original size.</p>\n<p>Calling <code>fullscreen()</code> without an argument returns <code>true</code> if the sketch\nis in full-screen mode and <code>false</code> if not.</p>\n<p>Note: Due to browser restrictions, <code>fullscreen()</code> can only be called with\nuser input such as a mouse press.</p>\n",
      "example": [
        "function setup() {\n  background(200);\n\n  describe('A gray canvas that switches between default and full-screen display when clicked.');\n}\n\n// If the mouse is pressed,\n// toggle full-screen mode.\nfunction mousePressed() {\n  if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n    let fs = fullscreen();\n    fullscreen(!fs);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "val",
              "description": "whether the sketch should be in fullscreen mode.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "current fullscreen state.",
            "type": "Boolean"
          }
        }
      ],
      "return": {
        "description": "current fullscreen state.",
        "type": "Boolean"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "loadBlob",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 801,
      "itemtype": "method",
      "description": "Loads a file at the given path as a Blob, then returns the resulting data or\npasses it to a success callback function, if provided. On load, this function\nreturns a <code>Promise</code> that resolves to a Blob containing the file data.",
      "example": [
        "let myBlob;\n\nasync function setup() {\n  createCanvas(200, 200);\n  background(220);\n  try {\n    // 1. Load an image file as a Blob.\n    myBlob = await loadBlob('assets/flower-1.png');\n\n    // 2. Convert the Blob into an object URL.\n    const objectUrl = URL.createObjectURL(myBlob);\n\n    // 3. Load that object URL into a p5.Image.\n    loadImage(objectUrl, (img) => {\n      // 4. Display the loaded image.\n      image(img, 0, 0, width, height);\n    });\n  } catch (err) {\n    console.error('Error loading blob:', err);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "The path or Request object pointing to the file\nyou want to load.",
              "type": "String|Request"
            },
            {
              "name": "successCallback",
              "description": "Optional. A function to be called if the\nfile successfully loads, receiving the\nresulting Blob as its only argument.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "Optional. A function to be called if an\nerror occurs during loading; receives the\nerror object as its only argument.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "A promise that resolves with the loaded Blob.",
            "type": "Promise<Blob>"
          }
        }
      ],
      "return": {
        "description": "A promise that resolves with the loaded Blob.",
        "type": "Promise<Blob>"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "pointLight",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 807,
      "itemtype": "method",
      "description": "<p>Creates a light that shines from a point in all directions.</p>\n<p>Point lights are like light bulbs that shine in all directions. They can be\nplaced at different positions to achieve different lighting effects. A\nmaximum of 5 point lights can be active at once.</p>\n<p>There are four ways to call <code>pointLight()</code> with parameters to set the\nlight’s color and position.</p>\n<p>The first way to call <code>pointLight()</code> has six parameters. The first three\nparameters, <code>v1</code>, <code>v2</code>, and <code>v3</code>, set the light’s color using the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. The last three parameters, <code>x</code>,\n<code>y</code>, and <code>z</code>, set the light’s position. For example,\n<code>pointLight(255, 0, 0, 50, 0, 0)</code> creates a red <code>(255, 0, 0)</code> light that\nshines from the coordinates <code>(50, 0, 0)</code>.</p>\n<p>The second way to call <code>pointLight()</code> has four parameters. The first three\nparameters, <code>v1</code>, <code>v2</code>, and <code>v3</code>, set the light’s color using the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. The last parameter, position sets\nthe light’s position using a <a href=\"#/p5.Vector\">p5.Vector</a> object.\nFor example, <code>pointLight(255, 0, 0, lightPos)</code> creates a red <code>(255, 0, 0)</code>\nlight that shines from the position set by the <code>lightPos</code> vector.</p>\n<p>The third way to call <code>pointLight()</code> has four parameters. The first\nparameter, <code>color</code>, sets the light’s color using a\n<a href=\"#/p5.Color\">p5.Color</a> object or an array of color values. The\nlast three parameters, <code>x</code>, <code>y</code>, and <code>z</code>, set the light’s position. For\nexample, <code>directionalLight(myColor, 50, 0, 0)</code> creates a light that shines\nfrom the coordinates <code>(50, 0, 0)</code> with the color value of <code>myColor</code>.</p>\n<p>The fourth way to call <code>pointLight()</code> has two parameters. The first\nparameter, <code>color</code>, sets the light’s color using a\n<a href=\"#/p5.Color\">p5.Color</a> object or an array of color values. The\nsecond parameter, <code>position</code>, sets the light’s position using a\n<a href=\"#/p5.Vector\">p5.Vector</a> object. For example,\n<code>directionalLight(myColor, lightPos)</code> creates a light that shines from the\nposition set by the <code>lightPos</code> vector with the color value of <code>myColor</code>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to turn on the point light.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. A red light starts shining from above when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Control the light.\n  if (isLit === true) {\n    // Add a red point light from above.\n    // Use RGB values and XYZ coordinates.\n    pointLight(255, 0, 0, 0, -150, 0);\n  }\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Turn on the point light when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. The top of the sphere appears bright red. The color gets darker toward the bottom.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a red point light from above.\n  // Use a p5.Color object and XYZ directions.\n  let c = color(255, 0, 0);\n  pointLight(c, 0, -150, 0);\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn on a gray background. The top of the sphere appears bright red. The color gets darker toward the bottom.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a red point light from above.\n  // Use a p5.Color object and a p5.Vector object.\n  let c = color(255, 0, 0);\n  let lightPos = createVector(0, -150, 0);\n  pointLight(c, lightPos);\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('Four spheres arranged in a square and drawn on a gray background. The spheres appear bright red toward the center of the square. The color gets darker toward the corners of the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a red point light that points to the center of the scene.\n  // Use a p5.Color object and a p5.Vector object.\n  let c = color(255, 0, 0);\n  let lightPos = createVector(0, 0, 65);\n  pointLight(c, lightPos);\n\n  // Style the spheres.\n  noStroke();\n\n  // Draw a sphere up and to the left.\n  push();\n  translate(-25, -25, 25);\n  sphere(10);\n  pop();\n\n  // Draw a box up and to the right.\n  push();\n  translate(25, -25, 25);\n  sphere(10);\n  pop();\n\n  // Draw a sphere down and to the left.\n  push();\n  translate(-25, 25, 25);\n  sphere(10);\n  pop();\n\n  // Draw a box down and to the right.\n  push();\n  translate(25, 25, 25);\n  sphere(10);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "x-coordinate of the light.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the light.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the light.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "position",
              "description": "position of the light as a\n<a href=\"#/p5.Vector\">p5.Vector</a> object.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or a CSS string.",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "position",
              "description": "",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "point",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 812,
      "itemtype": "method",
      "description": "<p>Draws a single point in space.</p>\n<p>A point's default width is one pixel. To color a point, use the\n<a href=\"#/p5/stroke\">stroke()</a> function. To change its width, use the\n<a href=\"#/p5/strokeWeight\">strokeWeight()</a> function. A point\ncan't be filled, so the <a href=\"#/p5/fill\">fill()</a> function won't\naffect the point's color.</p>\n<p>The version of <code>point()</code> with two parameters allows the point's location to\nbe set with its x- and y-coordinates, as in <code>point(10, 20)</code>.</p>\n<p>The version of <code>point()</code> with three parameters allows the point to be drawn\nin 3D space with x-, y-, and z-coordinates, as in <code>point(10, 20, 30)</code>.\nDoing so requires adding the <code>WEBGL</code> argument to\n<a href=\"#/p5/createCanvas\">createCanvas()</a>.</p>\n<p>The version of <code>point()</code> with one parameter allows the point's location to\nbe set with a <a href=\"#/p5/p5.Vector\">p5.Vector</a> object.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Making point to 5 pixels\n  strokeWeight(5);\n\n  // Top-left.\n  point(30, 20);\n\n  // Top-right.\n  point(85, 20);\n\n  // Bottom-right.\n  point(85, 75);\n\n  // Bottom-left.\n  point(30, 75);\n\n  describe(\n    'Four small, black points drawn on a gray canvas. The points form the corners of a square.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Making point to 5 pixels.\n  strokeWeight(5);\n\n  // Top-left.\n  point(30, 20);\n\n  // Top-right.\n  point(70, 20);\n\n  // Style the next points.\n  stroke('purple');\n  strokeWeight(10);\n\n  // Bottom-right.\n  point(70, 80);\n\n  // Bottom-left.\n  point(30, 80);\n\n  describe(\n    'Four points drawn on a gray canvas. Two are black and two are purple. The points form the corners of a square.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Making point to 5 pixels.\n  strokeWeight(5);\n\n  // Top-left.\n  let a = createVector(30, 20);\n  point(a);\n\n  // Top-right.\n  let b = createVector(70, 20);\n  point(b);\n\n  // Bottom-right.\n  let c = createVector(70, 80);\n  point(c);\n\n  // Bottom-left.\n  let d = createVector(30, 80);\n  point(d);\n\n  describe(\n    'Four small, black points drawn on a gray canvas. The points form the corners of a square.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('Two purple points drawn on a gray canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the points.\n  stroke('purple');\n  strokeWeight(10);\n\n  // Top-left.\n  point(-20, -30);\n\n  // Bottom-right.\n  point(20, 30);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('Two purple points drawn on a gray canvas. The scene spins slowly.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Style the points.\n  stroke('purple');\n  strokeWeight(10);\n\n  // Top-left.\n  point(-20, -30, 0);\n\n  // Bottom-right.\n  point(20, 30, -50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "the x-coordinate.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "the y-coordinate.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "the z-coordinate (for WebGL mode).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "coordinateVector",
              "description": "the coordinate vector.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "alpha",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 829,
      "itemtype": "method",
      "description": "<p>Gets the alpha (transparency) value of a color.</p>\n<p><code>alpha()</code> extracts the alpha value from a\n<a href=\"#/p5.Color\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color(0, 126, 255, 102);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'alphaValue' to 102.\n  let alphaValue = alpha(c);\n\n  // Draw the right rectangle.\n  fill(alphaValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a color array.\n  let c = [0, 126, 255, 102];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'alphaValue' to 102.\n  let alphaValue = alpha(c);\n\n  // Draw the left rectangle.\n  fill(alphaValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a CSS color string.\n  let c = 'rgba(0, 126, 255, 0.4)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'alphaValue' to 102.\n  let alphaValue = alpha(c);\n\n  // Draw the right rectangle.\n  fill(alphaValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is light blue and the right one is charcoal gray.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"#/p5.Color\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the alpha value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the alpha value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "createButton",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 832,
      "itemtype": "method",
      "description": "<p>Creates a <code><button></button></code> element.</p>\n<p>The first parameter, <code>label</code>, is a string that sets the label displayed on\nthe button.</p>\n<p>The second parameter, <code>value</code>, is optional. It's a string that sets the\nbutton's value. See\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#value\" target=\"_blank\">MDN</a>\nfor more details.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a button and place it beneath the canvas.\n  let button = createButton('click me');\n  button.position(0, 100);\n\n  // Call repaint() when the button is pressed.\n  button.mousePressed(repaint);\n\n  describe('A gray square with a button that says \"click me\" beneath it. The square changes color when the button is clicked.');\n}\n\n// Change the background color.\nfunction repaint() {\n  let g = random(255);\n  background(g);\n}",
        "let button;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a button and set its value to 0.\n  // Place the button beneath the canvas.\n  button = createButton('click me', 'red');\n  button.position(0, 100);\n\n  // Call randomColor() when the button is pressed.\n  button.mousePressed(randomColor);\n\n  describe('A red square with a button that says \"click me\" beneath it. The square changes color when the button is clicked.');\n}\n\nfunction draw() {\n  // Use the button's value to set the background color.\n  let c = button.value();\n  background(c);\n}\n\n// Set the button's value to a random color.\nfunction randomColor() {\n  let c = random(['red', 'green', 'blue', 'yellow']);\n  button.value(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "label",
              "description": "label displayed on the button.",
              "type": "String"
            },
            {
              "name": "value",
              "description": "value of the button.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "createFilterShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 832,
      "itemtype": "method",
      "description": "<p>Creates a <a href=\"#/p5.Shader\">p5.Shader</a> object to be used with the\n<a href=\"#/p5/filter\">filter()</a> function using GLSL.</p>\n<p>Since this method requires you to write your shaders in GLSL, it is most suitable\nfor advanced use cases. Consider using <a href=\"#/p5/buildFilterShader\"><code>buildFilterShader</code></a>\nfirst, as a way to create filters in JavaScript using p5.strands.</p>\n<p><code>createFilterShader()</code> works like\n<a href=\"#/p5/createShader\">createShader()</a> but has a default vertex\nshader included. <code>createFilterShader()</code> is intended to be used along with\n<a href=\"#/p5/filter\">filter()</a> for filtering the contents of a canvas.\nA filter shader will be applied to the whole canvas instead of just\n<a href=\"#/p5.Geometry\">p5.Geometry</a> objects.</p>\n<p>The parameter, <code>fragSrc</code>, sets the fragment shader. It’s a string that\ncontains the fragment shader program written in\n<a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>.</p>\n<p>The <a href=\"#/p5.Shader\">p5.Shader</a> object that's created has some\nuniforms that can be set:</p>\n<ul><li><code>sampler2D tex0</code>, which contains the canvas contents as a texture.</li><li><code>vec2 canvasSize</code>, which is the width and height of the canvas, not including pixel density.</li><li><code>vec2 texelSize</code>, which is the size of a physical pixel including pixel density. This is calculated as <code>1.0 / (width * density)</code> for the pixel width and <code>1.0 / (height * density)</code> for the pixel height.</li></ul><p>The <a href=\"#/p5.Shader\">p5.Shader</a> that's created also provides\n<code>varying vec2 vTexCoord</code>, a coordinate with values between 0 and 1.\n<code>vTexCoord</code> describes where on the canvas the pixel will be drawn.</p>\n<p>For more info about filters and shaders, see Adam Ferriss' <a href=\"https://github.com/aferriss/p5jsShaderExamples\">repo of shader examples</a>\nor the <a href=\"https://p5js.org/learn/getting-started-in-webgl-shaders.html\">Introduction to Shaders</a> tutorial.</p>\n",
      "example": [
        "function setup() {\n  let fragSrc = `precision highp float;\n  void main() {\n    gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n  }`;\n\n  createCanvas(100, 100, WEBGL);\n  let s = createFilterShader(fragSrc);\n  filter(s);\n  describe('a yellow canvas');\n}",
        "let img, s;\nasync function setup() {\n  img = await loadImage('assets/bricks.jpg');\n  let fragSrc = `precision highp float;\n\n  // x,y coordinates, given from the vertex shader\n  varying vec2 vTexCoord;\n\n  // the canvas contents, given from filter()\n  uniform sampler2D tex0;\n  // other useful information from the canvas\n  uniform vec2 texelSize;\n  uniform vec2 canvasSize;\n  // a custom variable from this sketch\n  uniform float darkness;\n\n  void main() {\n    // get the color at current pixel\n    vec4 color = texture2D(tex0, vTexCoord);\n    // set the output color\n    color.b = 1.0;\n    color *= darkness;\n    gl_FragColor = vec4(color.rgb, 1.0);\n  }`;\n\n  createCanvas(100, 100, WEBGL);\n  s = createFilterShader(fragSrc);\n}\n\nfunction draw() {\n  image(img, -50, -50);\n  s.setUniform('darkness', 0.5);\n  filter(s);\n  describe('a image of bricks tinted dark blue');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fragSrc",
              "description": "source code for the fragment shader.",
              "type": "String"
            }
          ],
          "return": {
            "description": "new shader object created from the fragment shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "new shader object created from the fragment shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "endShape",
      "file": "src/scripts/parsers/in/p5.js/src/shape/vertex.js",
      "line": 838,
      "itemtype": "method",
      "description": "<p>Concludes the vertices of a custom shape.</p>\n<p>The <a href=\"#/p5/beginShape\">beginShape()</a> and <code>endShape()</code> functions\nallow for creating custom shapes in 2D or 3D.\n<a href=\"#/p5/beginShape\">beginShape()</a> begins adding vertices to a\ncustom shape and <code>endShape()</code> stops adding them.</p>\n<p>The first parameter, <code>mode</code>, is optional. By default, the first and last\nvertices of a shape aren't connected. If the constant <code>CLOSE</code> is passed, as\nin <code>endShape(CLOSE)</code>, then the first and last vertices will be connected.\nWhen CLOSE mode is used for splines (with <code>splineVeertex()</code>), the shape is ended smoothly.</p>\n<p>The second parameter, <code>count</code>, is also optional. In WebGL mode, it’s more\nefficient to draw many copies of the same shape using a technique called\n<a href=\"https://webglfundamentals.org/webgl/lessons/webgl-instanced-drawing.html\" target=\"_blank\">instancing</a>.\nThe <code>count</code> parameter tells WebGL mode how many copies to draw. For\nexample, calling <code>endShape(CLOSE, 400)</code> after drawing a custom shape will\nmake it efficient to draw 400 copies. This feature requires\n<a href=\"https://p5js.org/tutorials/intro-to-shaders/\" target=\"_blank\">writing a custom shader</a>.</p>\n<p>After calling <a href=\"#/p5/beginShape\">beginShape()</a>, shapes can be\nbuilt by calling <a href=\"#/p5/vertex\">vertex()</a>,\n<a href=\"#/p5/bezierVertex\">bezierVertex()</a> and/or\n<a href=\"#/p5/splineVertex\">splineVertex()</a>. Calling\n<code>endShape()</code> will stop adding vertices to the\nshape. Each shape will be outlined with the current stroke color and filled\nwith the current fill color.</p>\n<p>Transformations such as <a href=\"#/p5/translate\">translate()</a>,\n<a href=\"#/p5/rotate\">rotate()</a>, and\n<a href=\"#/p5/scale\">scale()</a> don't work between\n<a href=\"#/p5/beginShape\">beginShape()</a> and <code>endShape()</code>. It's also not\npossible to use other shapes, such as <a href=\"#/p5/ellipse\">ellipse()</a> or\n<a href=\"#/p5/rect\">rect()</a>, between\n<a href=\"#/p5/beginShape\">beginShape()</a> and <code>endShape()</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shapes.\n  noFill();\n\n  // Left triangle.\n  beginShape();\n  vertex(20, 20);\n  vertex(45, 20);\n  vertex(45, 80);\n  endShape(CLOSE);\n\n  // Right triangle.\n  beginShape();\n  vertex(50, 20);\n  vertex(75, 20);\n  vertex(75, 80);\n  endShape();\n\n  describe(\n    'Two sets of black lines drawn on a gray background. The three lines on the left form a right triangle. The two lines on the right form a right angle.'\n  );\n}",
        "function setup() {\n  createCanvas(200, 100);\n\n  background(240);\n\n  noFill();\n  stroke(0);\n\n  // Open shape (left)\n  beginShape();\n  vertex(20, 20);\n  vertex(80, 20);\n  vertex(80, 80);\n  endShape();  // Not closed\n\n  // Closed shape (right)\n  beginShape();\n  vertex(120, 20);\n  vertex(180, 20);\n  vertex(180, 80);\n  endShape(CLOSE);  // Closed\n\n  describe(\n    'Two right-angled shapes on a light gray background. The left shape is open with three lines. The right shape is closed, forming a triangle.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n\n  beginShape();\n\n  splineVertex(32, 91);\n  splineVertex(21, 17);\n  splineVertex(68, 19);\n  splineVertex(82, 91);\n\n  endShape(CLOSE);\n\n  describe(\n    'A curvy four-sided slightly lopsided blob.'\n  );\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `#version 300 es\n\nprecision mediump float;\n\nin vec3 aPosition;\nflat out int instanceID;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvoid main() {\n\n  // Copy the instance ID to the fragment shader.\n  instanceID = gl_InstanceID;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n\n  // gl_InstanceID represents a numeric value for each instance.\n  // Using gl_InstanceID allows us to move each instance separately.\n  // Here we move each instance horizontally by ID * 23.\n  float xOffset = float(gl_InstanceID) * 23.0;\n\n  // Apply the offset to the final position.\n  gl_Position = uProjectionMatrix * uModelViewMatrix * (positionVec4 -\n    vec4(xOffset, 0.0, 0.0, 0.0));\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `#version 300 es\n\nprecision mediump float;\n\nout vec4 outColor;\nflat in int instanceID;\nuniform float numInstances;\n\nvoid main() {\n  vec4 red = vec4(1.0, 0.0, 0.0, 1.0);\n  vec4 blue = vec4(0.0, 0.0, 1.0, 1.0);\n\n  // Normalize the instance ID.\n  float normId = float(instanceID) / numInstances;\n\n  // Mix between two colors using the normalized instance ID.\n  outColor = mix(red, blue, normId);\n}\n`;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  let myShader = createShader(vertSrc, fragSrc);\n\n  background(220);\n\n  // Compile and apply the p5.Shader.\n  shader(myShader);\n\n  // Set the numInstances uniform.\n  myShader.setUniform('numInstances', 4);\n\n  // Translate the origin to help align the drawing.\n  translate(25, -10);\n\n  // Style the shapes.\n  noStroke();\n\n  // Draw the shapes.\n  beginShape();\n  vertex(0, 0);\n  vertex(0, 20);\n  vertex(20, 20);\n  vertex(20, 0);\n  vertex(0, 0);\n  endShape(CLOSE, 4);\n\n  describe('A row of four squares. Their colors transition from purple on the left to red on the right');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "use CLOSE to close the shape",
              "optional": 1,
              "type": "CLOSE"
            },
            {
              "name": "count",
              "description": "number of times you want to draw/instance the shape (for WebGL mode).",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/image/pixels.js",
      "line": 849,
      "itemtype": "method",
      "description": "<p>Sets the color of a pixel or draws an image to the canvas.</p>\n<p><code>set()</code> is easy to use but it's not as fast as\n<a href=\"#/p5/pixels\">pixels</a>. Use <a href=\"#/p5/pixels\">pixels</a>\nto set many pixel values.</p>\n<p><code>set()</code> interprets the first two parameters as x- and y-coordinates. It\ninterprets the last parameter as a grayscale value, a <code>[R, G, B, A]</code> pixel\narray, a <a href=\"#/p5.Color\">p5.Color</a> object, or a\n<a href=\"#/p5.Image\">p5.Image</a> object. If an image is passed, the first\ntwo parameters set the coordinates for the image's upper-left corner,\nregardless of the current <a href=\"#/p5/imageMode\">imageMode()</a>.</p>\n<p><a href=\"#/p5/updatePixels\">updatePixels()</a> must be called after using\n<code>set()</code> for changes to appear.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set four pixels to black.\n  set(30, 20, 0);\n  set(85, 20, 0);\n  set(85, 75, 0);\n  set(30, 75, 0);\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let black = color(0);\n\n  // Set four pixels to black.\n  set(30, 20, black);\n  set(85, 20, black);\n  set(85, 75, black);\n  set(30, 75, black);\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('Four black dots arranged in a square drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(255);\n\n  // Draw a horizontal color gradient.\n  for (let x = 0; x < 100; x += 1) {\n    for (let y = 0; y < 100; y += 1) {\n      // Calculate the grayscale value.\n      let c = map(x, 0, 100, 0, 255);\n\n      // Set the pixel using the grayscale value.\n      set(x, y, c);\n    }\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('A horiztonal color gradient from black to white.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Use the image to set all pixels.\n  set(0, 0, img);\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('An image of a mountain landscape.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "grayscale value | pixel array |\n<a href=\"#/p5.Color\">p5.Color</a> object | <a href=\"#/p5.Image\">p5.Image</a> to copy.",
              "type": "Number|Number[]|Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "round",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 849,
      "itemtype": "method",
      "description": "<p>Calculates the integer closest to a number.</p>\n<p>For example, <code>round(133.8)</code> returns the value 134.</p>\n<p>The second parameter, <code>decimals</code>, is optional. It sets the number of\ndecimal places to use when rounding. For example, <code>round(12.34, 1)</code> returns\n12.3. <code>decimals</code> is 0 by default.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Round a number.\n  let x = round(4.2);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the rounded number.\n  text(x, 50, 50);\n\n  describe('The number 4 written in middle of the canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Round a number to 2 decimal places.\n  let x = round(12.782383, 2);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the rounded number.\n  text(x, 50, 50);\n\n  describe('The number 12.78 written in middle of canvas.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to round.",
              "type": "Number"
            },
            {
              "name": "decimals",
              "description": "number of decimal places to round to, default is 0.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "rounded number.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "rounded number.",
        "type": "Integer"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "hex",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 851,
      "itemtype": "method",
      "description": "<p>Converts a <code>Number</code> to a <code>String</code> with its hexadecimal value.</p>\n<p><code>hex()</code> converts a number to a string with its hexadecimal number value.\nHexadecimal (hex) numbers are base-16, which means there are 16 unique\ndigits. Hex extends the numbers 0–9 with the letters A–F. For example, the\nnumber <code>11</code> (eleven) in base-10 is written as the letter <code>B</code> in hex.</p>\n<p>The first parameter, <code>n</code>, is the number to convert. For example, <code>hex(20)</code>,\nreturns the string <code>'00000014'</code>. If an array is passed, as in\n<code>hex([1, 10, 100])</code>, an array of hexadecimal strings is returned.</p>\n<p>The second parameter, <code>digits</code>, is optional. If a number is passed, as in\n<code>hex(20, 2)</code>, it sets the number of hexadecimal digits to display. For\nexample, calling <code>hex(20, 2)</code> returns the string <code>'14'</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 20;\n\n  // Convert the number to a hex string.\n  let converted = hex(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(14);\n\n  // Display the original and converted values.\n  text(`${original} = ${converted}`, 50, 50);\n\n  describe('The text \"20 = 00000014\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a number variable.\n  let original = 20;\n\n  // Convert the number to a hex string.\n  // Only display two hex digits.\n  let converted = hex(original, 2);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} = ${converted}`, 50, 50);\n\n  describe('The text \"20 = 14\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let original = [1, 10, 100];\n\n  // Convert the numbers to hex strings.\n  // Only use two hex digits.\n  let converted = hex(original, 2);\n\n  // Style the text.\n  textAlign(RIGHT, CENTER);\n  textSize(16);\n\n  // Iterate over the converted values.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Display the original and converted values.\n    text(`${ original[i]} = ${converted[i]}`, 75, y);\n  }\n\n  describe(\n    'The text \"1 = 01\", \"10 = 0A\", and \"100 = 64\" written on three separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "Number"
            },
            {
              "name": "digits",
              "description": "number of digits to include.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "converted hexadecimal value.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "Number[]"
            },
            {
              "name": "digits",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "converted hexadecimal values.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "converted hexadecimal value.",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "splinePoint",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 857,
      "itemtype": "method",
      "description": "<p>Calculates coordinates along a spline curve using interpolation.</p>\n<p><code>splinePoint()</code> calculates coordinates along a spline curve using four\npoints p0, p1, p2, p3. It expects points in the same order as the\n<a href=\"#/p5/spline\">spline()</a> function. <code>splinePoint()</code> works one axis\nat a time. Passing the points' x-coordinates will\ncalculate the x-coordinate of a point on the curve. Passing the\npoints' y-coordinates will calculate the y-coordinate of a point on\nthe curve.</p>\n<p>The first parameter, <code>a</code>, is the coordinate of point p0.</p>\n<p>The second and third parameters, <code>b</code> and <code>c</code>, are the coordinates of\npoints p1 and p2.</p>\n<p>The fourth parameter, <code>d</code>, is the coordinate of point p3.</p>\n<p>The fifth parameter, <code>t</code>, is the amount to interpolate along the span\nfrom p1 to p2. <code>t = 0</code> is p1, <code>t = 1</code> is p2, and <code>t = 0.5</code> is halfway\nbetween them.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n\n  // Set the coordinates for the curve's four points (p0, p1, p2, p3).\n  let x1 = 5;\n  let y1 = 26;\n  let x2 = 73;\n  let y2 = 24;\n  let x3 = 73;\n  let y3 = 61;\n  let x4 = 15;\n  let y4 = 65;\n\n  // Draw the curve.\n  noFill();\n  spline(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Draw circles along the curve's path.\n  fill(255);\n\n  // Top.\n  let x = splinePoint(x1, x2, x3, x4, 0);\n  let y = splinePoint(y1, y2, y3, y4, 0);\n  circle(x, y, 5);\n\n  // Center.\n  x = splinePoint(x1, x2, x3, x4, 0.5);\n  y = splinePoint(y1, y2, y3, y4, 0.5);\n  circle(x, y, 5);\n\n  // Bottom.\n  x = splinePoint(x1, x2, x3, x4, 1);\n  y = splinePoint(y1, y2, y3, y4, 1);\n  circle(x, y, 5);\n\n  describe('A black curve on a gray square. The endpoints and center of the curve are marked with white circles.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black curve on a gray square. A white circle moves back and forth along the curve.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Set the coordinates for the curve's four points (p0, p1, p2, p3).\n  let x1 = 5;\n  let y1 = 26;\n  let x2 = 73;\n  let y2 = 24;\n  let x3 = 73;\n  let y3 = 61;\n  let x4 = 15;\n  let y4 = 65;\n\n  // Draw the curve.\n  noFill();\n  spline(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Calculate the circle's coordinates.\n  let t = 0.5 * sin(frameCount * 0.01) + 0.5;\n  let x = splinePoint(x1, x2, x3, x4, t);\n  let y = splinePoint(y1, y2, y3, y4, t);\n\n  // Draw the circle.\n  fill(255);\n  circle(x, y, 5);\n}",
        "let p0, p1, p2, p3;\n\nfunction setup() {\n  createCanvas(200, 200);\n  splineProperty('ends', INCLUDE); // make endpoints part of the curve\n\n  // Four points forming a gentle arch\n  p0 = createVector(30, 160);\n  p1 = createVector(60, 50);\n  p2 = createVector(140, 50);\n  p3 = createVector(170, 160);\n\n  describe('Black spline through p0–p3. A red dot marks the location at parameter t on p1->p2 using splinePoint.');\n}\n\nfunction draw() {\n  background(245);\n\n  // Draw the spline for context\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n  spline(p0.x, p0.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n\n  // Map mouse X to t in [0, 1] (span p1->p2)\n  let t = constrain(map(mouseX, 0, width, 0, 1), 0, 1);\n\n  // Evaluate the curve point by axis (splinePoint works one axis at a time)\n  let x = splinePoint(p0.x, p1.x, p2.x, p3.x, t);\n  let y = splinePoint(p0.y, p1.y, p2.y, p3.y, t);\n\n  // Marker at the evaluated position\n  noStroke();\n  fill('red');\n  circle(x, y, 8);\n\n  // Draw control/anchor points\n  stroke(0);\n  strokeWeight(1);\n  fill(255);\n  const r = 6;\n  circle(p0.x, p0.y, r);\n  circle(p1.x, p1.y, r);\n  circle(p2.x, p2.y, r);\n  circle(p3.x, p3.y, r);\n\n  // Labels + UI hint\n  noStroke();\n  fill(20);\n  textSize(10);\n  text('p0', p0.x - 12, p0.y + 14);\n  text('p1', p1.x - 12, p1.y - 8);\n  text('p2', p2.x + 4, p2.y - 8);\n  text('p3', p3.x + 4, p3.y + 14);\n  text('t = ' + nf(t, 1, 2) + ' (p1→p2)', 8, 16);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "a",
              "description": "coordinate of point p0.",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "coordinate of point p1.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "coordinate of point p2.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "coordinate of point p3.",
              "type": "Number"
            },
            {
              "name": "t",
              "description": "amount to interpolate between 0 and 1.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "coordinate of a point on the curve.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "coordinate of a point on the curve.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "imageLight",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 869,
      "itemtype": "method",
      "description": "<p>Creates an ambient light from an image.</p>\n<p><code>imageLight()</code> simulates a light shining from all directions. The effect is\nlike placing the sketch at the center of a giant sphere that uses the image\nas its texture. The image's diffuse light will be affected by\n<a href=\"#/p5/fill\">fill()</a> and the specular reflections will be\naffected by <a href=\"#/p5/specularMaterial\">specularMaterial()</a> and\n<a href=\"#/p5/shininess\">shininess()</a>.</p>\n<p>The parameter, <code>img</code>, is the <a href=\"#/p5.Image\">p5.Image</a> object to\nuse as the light source.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet img;\n\nasync function setup() {\n  // Load an image and create a p5.Image object.\n  img = await loadImage('assets/outdoor_spheremap.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere floating above a landscape. The surface of the sphere reflects the landscape.');\n}\n\nfunction draw() {\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the image as a panorama (360˚ background).\n  panorama(img);\n\n  // Add a soft ambient light.\n  ambientLight(50);\n\n  // Add light from the image.\n  imageLight(img);\n\n  // Style the sphere.\n  specularMaterial(20);\n  shininess(100);\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "img",
              "description": "image to use as the light source.",
              "type": "p5.Image"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "pixelDensity",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 871,
      "itemtype": "method",
      "description": "<p>Sets the pixel density or returns the current density.</p>\n<p>Computer displays are grids of little lights called <em>pixels</em>. A\ndisplay's <em>pixel density</em> describes how many pixels it packs into an\narea. Displays with smaller pixels have a higher pixel density and create\nsharper images.</p>\n<p><code>pixelDensity()</code> sets the pixel scaling for high pixel density displays.\nBy default, the pixel density is set to match the display's density.\nCalling <code>pixelDensity(1)</code> turn this off.</p>\n<p>Calling <code>pixelDensity()</code> without an argument returns the current pixel\ndensity.</p>\n",
      "example": [
        "function setup() {\n  // Set the pixel density to 1.\n  pixelDensity(1);\n\n  // Create a canvas and draw\n  // a circle.\n  createCanvas(100, 100);\n  background(200);\n  circle(50, 50, 70);\n\n  describe('A fuzzy white circle on a gray canvas.');\n}",
        "function setup() {\n  // Set the pixel density to 3.\n  pixelDensity(3);\n\n  // Create a canvas, paint the\n  // background, and draw a\n  // circle.\n  createCanvas(100, 100);\n  background(200);\n  circle(50, 50, 70);\n\n  describe('A sharp white circle on a gray canvas.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "val",
              "description": "desired pixel density.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [],
          "return": {
            "description": "current pixel density of the sketch.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "current pixel density of the sketch.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "httpGet",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 873,
      "itemtype": "method",
      "description": "Method for executing an HTTP GET request. If data type is not specified,\nit will default to <code>'text'</code>. This is equivalent to\ncalling <code>httpDo(path, 'GET')</code>. The 'binary' datatype will return\na Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\nwhich can be used to initialize typed arrays (such as Uint8Array).",
      "example": [
        "// META:norender\n// Examples use USGS Earthquake API:\n//   https://earthquake.usgs.gov/fdsnws/event/1/#methods\nlet earthquakes;\nasync function setup() {\n  // Get the most recent earthquake in the database\n  let url =\n'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\n    'format=geojson&limit=1&orderby=time';\n  earthquakes = await httpGet(url, 'json');\n}\n\nfunction draw() {\n  if (!earthquakes) {\n    // Wait until the earthquake data has loaded before drawing.\n    return;\n  }\n  background(200);\n  // Get the magnitude and name of the earthquake out of the loaded JSON\n  let earthquakeMag = earthquakes.features[0].properties.mag;\n  let earthquakeName = earthquakes.features[0].properties.place;\n  ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n  textAlign(CENTER);\n  text(earthquakeName, 0, height - 30, width, 30);\n  noLoop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "name of the file or url to load",
              "type": "String|Request"
            },
            {
              "name": "datatype",
              "description": "\"json\", \"jsonp\", \"binary\", \"arrayBuffer\",\n\"xml\", or \"text\"",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "callback",
              "description": "function to be executed after\n<a href=\"#/p5/httpGet\">httpGet()</a> completes, data is passed in\nas first argument",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
            "type": "Promise"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "callback",
              "description": "",
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "",
            "type": "Promise"
          }
        }
      ],
      "return": {
        "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
        "type": "Promise"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "updatePixels",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1135,
      "itemtype": "method",
      "description": "<p>Updates the canvas with the RGBA values in the\n<a href=\"#/p5/pixels\">pixels</a> array.</p>\n<p><code>updatePixels()</code> only needs to be called after changing values in the\n<a href=\"#/p5/pixels\">pixels</a> array. Such changes can be made directly\nafter calling <a href=\"#/p5/loadPixels\">loadPixels()</a> or by calling\n<a href=\"#/p5/set\">set()</a>.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/rockies.jpg');\n\n  createCanvas(100, 100);\n\n  // Display the image.\n  image(img, 0, 0, 100, 100);\n\n  // Get the pixel density.\n  let d = pixelDensity();\n\n  // Calculate the halfway index in the pixels array.\n  let halfImage = 4 * (d * width) * (d * height / 2);\n\n  // Load the pixels array.\n  loadPixels();\n\n  // Copy the top half of the canvas to the bottom.\n  for (let i = 0; i < halfImage; i += 1) {\n    pixels[i + halfImage] = pixels[i];\n  }\n\n  // Update the canvas.\n  updatePixels();\n\n  describe('Two identical images of mountain landscapes, one on top of the other.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Framebuffer object.\n  let myBuffer = createFramebuffer();\n\n  // Load the pixels array.\n  myBuffer.loadPixels();\n\n  // Get the number of pixels in the\n  // top half of the framebuffer.\n  let numPixels = myBuffer.pixels.length / 2;\n\n  // Set the framebuffer's top half to pink.\n  for (let i = 0; i < numPixels; i += 4) {\n    myBuffer.pixels[i] = 255;\n    myBuffer.pixels[i + 1] = 102;\n    myBuffer.pixels[i + 2] = 204;\n    myBuffer.pixels[i + 3] = 255;\n  }\n\n  // Update the pixels array.\n  myBuffer.updatePixels();\n\n  // Draw the p5.Framebuffer object to the canvas.\n  image(myBuffer, -50, -50);\n\n  describe('A pink rectangle above a gray rectangle.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the upper-left corner of region\nto update.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the upper-left corner of region\nto update.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of region to update.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of region to update.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Pixels"
    },
    {
      "name": "sq",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 908,
      "itemtype": "method",
      "description": "<p>Calculates the square of a number.</p>\n<p>Squaring a number means multiplying the number by itself. For example,\n<code>sq(3)</code> evaluates 3 × 3 which is 9. <code>sq(-3)</code> evaluates -3 × -3\nwhich is also 9. Multiplying two negative numbers produces a positive\nnumber. The value returned by <code>sq()</code> is always positive.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top-left.\n  let d = sq(3);\n  circle(33, 33, d);\n\n  // Bottom-right.\n  d = sq(6);\n  circle(67, 67, d);\n\n  describe('Two white circles. The circle at the top-left is small. The circle at the bottom-right is four times larger.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots that get higher quickly from left to right.');\n}\n\nfunction draw() {\n  // Invert the y-axis.\n  scale(1, -1);\n  translate(0, -100);\n\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 0.01 * sq(x);\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number to square.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "squared number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "squared number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "displayDensity",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 919,
      "itemtype": "method",
      "description": "Returns the display's current pixel density.",
      "example": [
        "function setup() {\n  // Set the pixel density to 1.\n  pixelDensity(1);\n\n  // Create a canvas and draw\n  // a circle.\n  createCanvas(100, 100);\n  background(200);\n  circle(50, 50, 70);\n\n  describe('A fuzzy white circle drawn on a gray background. The circle becomes sharper when the mouse is pressed.');\n}\n\nfunction mousePressed() {\n  // Get the current display density.\n  let d = displayDensity();\n\n  // Use the display density to set\n  // the sketch's pixel density.\n  pixelDensity(d);\n\n  // Paint the background and\n  // draw a circle.\n  background(200);\n  circle(50, 50, 70);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current pixel density of the display.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "current pixel density of the display.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "panorama",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 919,
      "itemtype": "method",
      "description": "<p>Creates an immersive 3D background.</p>\n<p><code>panorama()</code> transforms images containing 360˚ content, such as maps or\nHDRIs, into immersive 3D backgrounds that surround a sketch. Exploring the\nspace requires changing the camera's perspective with functions such as\n<a href=\"#/p5/orbitControl\">orbitControl()</a> or\n<a href=\"#/p5/camera\">camera()</a>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet img;\n\nasync function setup() {\n  // Load an image and create a p5.Image object.\n  img = await loadImage('assets/outdoor_spheremap.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere floating above a landscape. The surface of the sphere reflects the landscape. The full landscape is viewable in 3D as the user drags the mouse.');\n}\n\nfunction draw() {\n  // Add the panorama.\n  panorama(img);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Use the image as a light source.\n  imageLight(img);\n\n  // Style the sphere.\n  noStroke();\n  specularMaterial(50);\n  shininess(200);\n  metalness(100);\n\n  // Draw the sphere.\n  sphere(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "img",
              "description": "360˚ image to use as the background.",
              "type": "p5.Image"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "createCheckbox",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 926,
      "itemtype": "method",
      "description": "<p>Creates a checkbox <code><input></input></code> element.</p>\n<p>Checkboxes extend the <a href=\"#/p5.Element\">p5.Element</a> class with a\n<code>checked()</code> method. Calling <code>myBox.checked()</code> returns <code>true</code> if it the box\nis checked and <code>false</code> if not.</p>\n<p>The first parameter, <code>label</code>, is optional. It's a string that sets the label\nto display next to the checkbox.</p>\n<p>The second parameter, <code>value</code>, is also optional. It's a boolean that sets the\ncheckbox's value.</p>\n",
      "example": [
        "let checkbox;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a checkbox and place it beneath the canvas.\n  checkbox = createCheckbox();\n  checkbox.position(0, 70);\n\n  describe('A black square with a checkbox beneath it. The square turns white when the box is checked.');\n}\n\nfunction draw() {\n  // Use the checkbox to set the background color.\n  if (checkbox.checked()) {\n    background(255);\n  } else {\n    background(0);\n  }\n}",
        "let checkbox;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a checkbox and place it beneath the canvas.\n  // Label the checkbox \"white\".\n  checkbox = createCheckbox(' white');\n  checkbox.position(0, 70);\n\n  describe('A black square with a checkbox labeled \"white\" beneath it. The square turns white when the box is checked.');\n}\n\nfunction draw() {\n  // Use the checkbox to set the background color.\n  if (checkbox.checked()) {\n    background(255);\n  } else {\n    background(0);\n  }\n}",
        "let checkbox;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a checkbox and place it beneath the canvas.\n  // Label the checkbox \"white\" and set its value to true.\n  checkbox = createCheckbox(' white', true);\n  checkbox.position(0, 70);\n\n  describe('A white square with a checkbox labeled \"white\" beneath it. The square turns black when the box is unchecked.');\n}\n\nfunction draw() {\n  // Use the checkbox to set the background color.\n  if (checkbox.checked()) {\n    background(255);\n  } else {\n    background(0);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "label",
              "description": "label displayed after the checkbox.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "value",
              "description": "value of the checkbox. Checked is <code>true</code> and unchecked is <code>false</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "keyTyped",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 932,
      "itemtype": "method",
      "description": "<p>A function that's called once when keys with printable characters are pressed.</p>\n<p>Declaring the function <code>keyTyped()</code> sets a code block to run once\nautomatically when the user presses any key with a printable character such\nas <code>a</code> or 1. Modifier keys such as <code>SHIFT</code>, <code>CONTROL</code>, and the arrow keys\nwill be ignored:</p>\n<pre><code class=\"language-js\">function keyTyped() {\n  // Code to run.\n}</code></pre><p>The <a href=\"#/p5/key\">key</a> and <a href=\"#/p5/keyCode\">keyCode</a>\nvariables will be updated with the most recently released value when\n<code>keyTyped()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function keyTyped() {\n  // Check for the \"c\" character using key.\n  if (key === 'c') {\n    // Code to run.\n  }\n\n  // Check for \"c\" using keyCode.\n  if (keyCode === 67) { // 67 is the ASCII code for 'c'\n    // Code to run.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>keyTyped()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\" target=\"_blank\">KeyboardEvent</a>\nobject with properties that describe the key press event:</p>\n<pre><code class=\"language-js\">function keyReleased(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>Note: Use the <a href=\"#/p5/keyPressed\">keyPressed()</a> function and\n<a href=\"#/p5/keyCode\">keyCode</a> system variable to respond to modifier\nkeys such as <code>ALT</code>.</p>\n<p>Browsers may have default behaviors attached to various key events. To\nprevent any default behavior for this event, add <code>return false;</code> to the end\nof the function.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n// Note: Pressing special keys such as SPACE have no effect.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The inner square changes color when the user presses a key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the square's color when the user types a printable key.\nfunction keyTyped() {\n  if (value === 0) {\n    value = 255;\n  } else {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a white square at its center. The inner square turns black when the user types the \"b\" key. It turns white when the user types the \"a\" key.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Reassign value when the user types the 'a' or 'b' key.\nfunction keyTyped() {\n  if (key === 'a') {\n    value = 255;\n  } else if (key === 'b') {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>KeyboardEvent</code> callback argument.",
              "optional": 1,
              "type": "KeyboardEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Keyboard"
    },
    {
      "name": "hue",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 939,
      "itemtype": "method",
      "description": "<p>Gets the hue value of a color.</p>\n<p><code>hue()</code> extracts the hue value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>Hue describes a color's position on the color wheel. By default, <code>hue()</code>\nreturns a color's HSL hue in the range 0 to 360. If the\n<a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to HSB or HSL, it returns the hue\nvalue in the given mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a p5.Color object.\n  let c = color(0, 50, 100);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Set 'hueValue' to 0.\n  let hueValue = hue(c);\n\n  // Draw the right rectangle.\n  fill(hueValue);\n  rect(50, 20, 35, 60);\n\n  describe(\n    'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a color array.\n  let c = [0, 50, 100];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Set 'hueValue' to 0.\n  let hueValue = hue(c);\n\n  // Draw the right rectangle.\n  fill(hueValue);\n  rect(50, 20, 35, 60);\n\n  describe(\n    'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a CSS color string.\n  let c = 'rgb(255, 128, 128)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 20, 35, 60);\n\n  // Set 'hueValue' to 0.\n  let hueValue = hue(c);\n\n  // Draw the right rectangle.\n  fill(hueValue);\n  rect(50, 20, 35, 60);\n\n  describe(\n    'Two rectangles. The rectangle on the left is salmon pink and the one on the right is black.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the hue value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the hue value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "cylinder",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 940,
      "itemtype": "method",
      "description": "<p>Draws a cylinder.</p>\n<p>A cylinder is a 3D shape with triangular faces that connect a flat bottom\nto a flat top. Cylinders with few faces look like boxes. Cylinders with\nmany faces have smooth surfaces.</p>\n<p>The first parameter, <code>radius</code>, is optional. If a <code>Number</code> is passed, as in\n<code>cylinder(20)</code>, it sets the radius of the cylinder’s base. By default,\n<code>radius</code> is 50.</p>\n<p>The second parameter, <code>height</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cylinder(20, 30)</code>, it sets the cylinder’s height. By default,\n<code>height</code> is set to the cylinder’s <code>radius</code>.</p>\n<p>The third parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cylinder(20, 30, 5)</code>, it sets the number of edges used to form the\ncylinder's top and bottom. Using more edges makes the top and bottom look\nmore like circles. By default, <code>detailX</code> is 24.</p>\n<p>The fourth parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cylinder(20, 30, 5, 2)</code>, it sets the number of triangle subdivisions\nto use along the y-axis, between cylinder's the top and bottom. All 3D\nshapes are made by connecting triangles to form their surfaces. By default,\n<code>detailY</code> is 1.</p>\n<p>The fifth parameter, <code>bottomCap</code>, is also optional. If a <code>false</code> is passed,\nas in <code>cylinder(20, 30, 5, 2, false)</code> the cylinder’s bottom won’t be drawn.\nBy default, <code>bottomCap</code> is <code>true</code>.</p>\n<p>The sixth parameter, <code>topCap</code>, is also optional. If a <code>false</code> is passed, as\nin <code>cylinder(20, 30, 5, 2, false, false)</code> the cylinder’s top won’t be\ndrawn. By default, <code>topCap</code> is <code>true</code>.</p>\n<p>Note: <code>cylinder()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  cylinder();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius and height to 30.\n  cylinder(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius to 30 and height to 50.\n  cylinder(30, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 5.\n  cylinder(30, 50, 5);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 24 and detailY to 2.\n  cylinder(30, 50, 24, 2);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background. Its top is missing.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 24 and detailY to 1.\n  // Don't draw its bottom.\n  cylinder(30, 50, 24, 1, false);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cylinder on a gray background. Its top and bottom are missing.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cylinder.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 24 and detailY to 1.\n  // Don't draw its bottom or top.\n  cylinder(30, 50, 24, 1, false, false);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radius",
              "description": "radius of the cylinder. Defaults to 50.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the cylinder. Defaults to the value of <code>radius</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of edges along the top and bottom. Defaults to 24.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis. Defaults to 1.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "bottomCap",
              "description": "whether to draw the cylinder's bottom. Defaults to <code>true</code>.",
              "optional": 1,
              "type": "Boolean"
            },
            {
              "name": "topCap",
              "description": "whether to draw the cylinder's top. Defaults to <code>true</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "scale",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 949,
      "itemtype": "method",
      "description": "<p>Scales the coordinate system.</p>\n<p>By default, shapes are drawn at their original scale. A rectangle that's 50\npixels wide appears to take up half the width of a 100 pixel-wide canvas.\nThe <code>scale()</code> function can shrink or stretch the coordinate system so that\nshapes appear at different sizes. There are two ways to call <code>scale()</code> with\nparameters that set the scale factor(s).</p>\n<p>The first way to call <code>scale()</code> uses numbers to set the amount of scaling.\nThe first parameter, <code>s</code>, sets the amount to scale each axis. For example,\ncalling <code>scale(2)</code> stretches the x-, y-, and z-axes by a factor of 2. The\nnext two parameters, <code>y</code> and <code>z</code>, are optional. They set the amount to\nscale the y- and z-axes. For example, calling <code>scale(2, 0.5, 1)</code> stretches\nthe x-axis by a factor of 2, shrinks the y-axis by a factor of 0.5, and\nleaves the z-axis unchanged.</p>\n<p>The second way to call <code>scale()</code> uses a <a href=\"#/p5.Vector\">p5.Vector</a>\nobject to set the scale factors. For example, calling <code>scale(myVector)</code>\nuses the x-, y-, and z-components of <code>myVector</code> to set the amount of\nscaling along the x-, y-, and z-axes. Doing so is the same as calling\n<code>scale(myVector.x, myVector.y, myVector.z)</code>.</p>\n<p>By default, transformations accumulate. For example, calling <code>scale(1)</code>\ntwice has the same effect as calling <code>scale(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and <a href=\"#/p5/pop\">pop()</a> functions\ncan be used to isolate transformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>scale(2)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't cause\nshapes to grow continuously.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'Two white squares on a gray background. The larger square appears at the top-center. The smaller square appears at the top-left.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a square at (30, 20).\n  square(30, 20, 40);\n\n  // Scale the coordinate system by a factor of 0.5.\n  scale(0.5);\n\n  // Draw a square at (30, 20).\n  // It appears at (15, 10) after scaling.\n  square(30, 20, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A rectangle and a square drawn in white on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a square at (30, 20).\n  square(30, 20, 40);\n\n  // Scale the coordinate system by factors of\n  // 0.5 along the x-axis and\n  // 1.3 along the y-axis.\n  scale(0.5, 1.3);\n\n  // Draw a square at (30, 20).\n  // It appears as a rectangle at (15, 26) after scaling.\n  square(30, 20, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A rectangle and a square drawn in white on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a square at (30, 20).\n  square(30, 20, 40);\n\n  // Create a p5.Vector object.\n  let v = createVector(0.5, 1.3);\n\n  // Scale the coordinate system by factors of\n  // 0.5 along the x-axis and\n  // 1.3 along the y-axis.\n  scale(v);\n\n  // Draw a square at (30, 20).\n  // It appears as a rectangle at (15, 26) after scaling.\n  square(30, 20, 40);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A red box and a blue box drawn on a gray background. The red box appears embedded in the blue box.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the spheres.\n  noStroke();\n\n  // Draw the red sphere.\n  fill('red');\n  box();\n\n  // Scale the coordinate system by factors of\n  // 0.5 along the x-axis and\n  // 1.3 along the y-axis and\n  // 2 along the z-axis.\n  scale(0.5, 1.3, 2);\n\n  // Draw the blue sphere.\n  fill('blue');\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "s",
              "description": "amount to scale along the positive x-axis.",
              "type": "Number|p5.Vector|Number[]"
            },
            {
              "name": "y",
              "description": "amount to scale along the positive y-axis. Defaults to <code>s</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "amount to scale along the positive z-axis. Defaults to <code>y</code>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "scales",
              "description": "vector whose components should be used to scale.",
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "unhex",
      "file": "src/scripts/parsers/in/p5.js/src/utilities/conversion.js",
      "line": 950,
      "itemtype": "method",
      "description": "<p>Converts a <code>String</code> with a hexadecimal value to a  <code>Number</code>.</p>\n<p><code>unhex()</code> converts a string with its hexadecimal number value to a number.\nHexadecimal (hex) numbers are base-16, which means there are 16 unique\ndigits. Hex extends the numbers 0–9 with the letters A–F. For example, the\nnumber <code>11</code> (eleven) in base-10 is written as the letter <code>B</code> in hex.</p>\n<p>The first parameter, <code>n</code>, is the hex string to convert. For example,\n<code>unhex('FF')</code>, returns the number 255. If an array is passed, as in\n<code>unhex(['00', '80', 'FF'])</code>, an array of numbers is returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a a hex string variable\n  let original = 'FF';\n\n  // Convert the hex string to a number.\n  let converted = unhex(original);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textSize(16);\n\n  // Display the original and converted values.\n  text(`${original} = ${converted}`, 50, 50);\n\n  describe('The text \"FF = 255\" written in black on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an array of numbers.\n  let original = ['00', '80', 'FF'];\n\n  // Convert the numbers to hex strings.\n  // Only use two hex digits.\n  let converted = unhex(original, 2);\n\n  // Style the text.\n  textAlign(RIGHT, CENTER);\n  textSize(16);\n\n  // Iterate over the converted values.\n  for (let i = 0; i < converted.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Display the original and converted values.\n    text(`${ original[i]} = ${converted[i]}`, 80, y);\n  }\n\n  describe(\n    'The text \"00 = 0\", \"80 = 128\", and \"FF = 255\" written on three separate lines. The text is in black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "value to convert.",
              "type": "String"
            }
          ],
          "return": {
            "description": "converted number.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "ns",
              "description": "values to convert.",
              "type": "String[]"
            }
          ],
          "return": {
            "description": "converted numbers.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "converted number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Data",
      "submodule": "Conversion"
    },
    {
      "name": "quad",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 954,
      "itemtype": "method",
      "description": "<p>Draws a quadrilateral (four-sided shape).</p>\n<p>Quadrilaterals include rectangles, squares, rhombuses, and trapezoids. The\nfirst pair of parameters <code>(x1, y1)</code> sets the quad's first point. The next\nthree pairs of parameters set the coordinates for its next three points\n<code>(x2, y2)</code>, <code>(x3, y3)</code>, and <code>(x4, y4)</code>. Points should be added in either\nclockwise or counter-clockwise order.</p>\n<p>The version of <code>quad()</code> with twelve parameters allows the quad to be drawn\nin 3D space. Doing so requires adding the <code>WEBGL</code> argument to\n<a href=\"#/p5/createCanvas\">createCanvas()</a>.</p>\n<p>The thirteenth and fourteenth parameters are optional. In WebGL mode, they\nset the number of segments used to draw the quadrilateral in the x- and\ny-directions. They're both 2 by default.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  quad(20, 20, 80, 20, 80, 80, 20, 80);\n\n  describe('A white square with a black outline drawn on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  quad(20, 30, 80, 30, 80, 70, 20, 70);\n\n  describe('A white rectangle with a black outline drawn on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  quad(50, 62, 86, 50, 50, 38, 14, 50);\n\n  describe('A white rhombus with a black outline drawn on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  quad(20, 50, 80, 30, 80, 70, 20, 70);\n\n  describe('A white trapezoid with a black outline drawn on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  quad(-30, -30, 30, -30, 30, 30, -30, 30);\n\n  describe('A white square with a black outline drawn on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A wavy white surface spins around on gray canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the quad.\n  quad(-30, -30, 0, 30, -30, 0, 30, 30, 20, -30, 30, -20);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "the x-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "the y-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "the x-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "the y-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "the x-coordinate of the third point.",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "the y-coordinate of the third point.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "the x-coordinate of the fourth point.",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "the y-coordinate of the fourth point.",
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of segments in the x-direction.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of segments in the y-direction.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z1",
              "description": "the z-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z2",
              "description": "the z-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z3",
              "description": "the z-coordinate of the third point.",
              "type": "Number"
            },
            {
              "name": "x4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y4",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z4",
              "description": "the z-coordinate of the fourth point.",
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "sqrt",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 961,
      "itemtype": "method",
      "description": "<p>Calculates the square root of a number.</p>\n<p>A number's square root can be multiplied by itself to produce the original\nnumber. For example, <code>sqrt(9)</code> returns 3 because 3 × 3 = 9. <code>sqrt()</code>\nalways returns a positive value. <code>sqrt()</code> doesn't work with negative arguments\nsuch as <code>sqrt(-9)</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top-left.\n  let d = sqrt(16);\n  circle(33, 33, d);\n\n  // Bottom-right.\n  d = sqrt(1600);\n  circle(67, 67, d);\n\n  describe('Two white circles. The circle at the top-left is small. The circle at the bottom-right is ten times larger.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe('A series of black dots that get higher slowly from left to right.');\n}\n\nfunction draw() {\n  // Invert the y-axis.\n  scale(1, -1);\n  translate(0, -100);\n\n  // Calculate the coordinates.\n  let x = frameCount;\n  let y = 5 * sqrt(x);\n\n  // Draw the point.\n  point(x, y);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "non-negative number to square root.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "square root of number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "square root of number.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "httpPost",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 965,
      "itemtype": "method",
      "description": "Method for executing an HTTP POST request. If data type is not specified,\nit will default to <code>'text'</code>. This is equivalent to\ncalling <code>httpDo(path, 'POST')</code>.",
      "example": [
        "// Examples use jsonplaceholder.typicode.com for a Mock Data API\n\nlet url = 'https://jsonplaceholder.typicode.com/posts';\nlet postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is very cool.' };\n\nfunction setup() {\n  createCanvas(100, 100);\n  background(200);\n}\n\nfunction mousePressed() {\n  httpPost(url, postData, 'json', function(result) {\n    strokeWeight(2);\n    text(result.body, mouseX, mouseY);\n  });\n}",
        "let url = 'ttps://invalidURL'; // A bad URL that will cause errors\nlet postData = { title: 'p5 Clicked!', body: 'p5.js is very cool.' };\n\nfunction setup() {\n  createCanvas(100, 100);\n  background(200);\n}\n\nfunction mousePressed() {\n  httpPost(\n    url,\n    postData,\n    'json',\n    function(result) {\n      // ... won't be called\n    },\n    function(error) {\n      strokeWeight(2);\n      text(error.toString(), mouseX, mouseY);\n    }\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "name of the file or url to load",
              "type": "String|Request"
            },
            {
              "name": "data",
              "description": "param data passed sent with request",
              "optional": 1,
              "type": "Object|Boolean"
            },
            {
              "name": "datatype",
              "description": "\"json\", \"jsonp\", \"xml\", or \"text\".\nIf omitted, <a href=\"#/p5/httpPost\">httpPost()</a> will guess.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "callback",
              "description": "function to be executed after\n<a href=\"#/p5/httpPost\">httpPost()</a> completes, data is passed in\nas first argument",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
            "type": "Promise"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "data",
              "description": "",
              "type": "Object|Boolean"
            },
            {
              "name": "callback",
              "description": "",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "",
            "type": "Promise"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "callback",
              "description": "",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "",
            "type": "Promise"
          }
        }
      ],
      "return": {
        "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
        "type": "Promise"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getURL",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 973,
      "itemtype": "method",
      "description": "Returns the sketch's current\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL\" target=\"_blank\">URL</a>\nas a <code>String</code>.",
      "example": [
        "function setup() {\n  background(200);\n\n  // Get the sketch's URL\n  // and display it.\n  let url = getURL();\n  textWrap(CHAR);\n  text(url, 0, 40, 100);\n\n  describe('The URL \"https://p5js.org/reference/p5/getURL\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "url",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "url",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "lights",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 991,
      "itemtype": "method",
      "description": "<p>Places an ambient and directional light in the scene.\nThe lights are set to ambientLight(128, 128, 128) and\ndirectionalLight(128, 128, 128, 0, 0, -1).</p>\n<p>Note: lights need to be called (whether directly or indirectly)\nwithin draw() to remain persistent in a looping program.\nPlacing them in setup() will cause them to only have an effect\nthe first time through the loop.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to turn on the lights.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box drawn against a gray background. The quality of the light changes when the user double-clicks.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Control the lights.\n  if (isLit === true) {\n    lights();\n  }\n\n  // Draw the box.\n  box();\n}\n\n// Turn on the lights when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white box drawn against a gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  ambientLight(128, 128, 128);\n  directionalLight(128, 128, 128, 0, 0, -1);\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "fract",
      "file": "src/scripts/parsers/in/p5.js/src/math/calculation.js",
      "line": 994,
      "itemtype": "method",
      "description": "<p>Calculates the fractional part of a number.</p>\n<p>A number's fractional part includes its decimal values. For example,\n<code>fract(12.34)</code> returns 0.34.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Original number.\n  let n = 56.78;\n  text(n, 50, 33);\n\n  // Fractional part.\n  let f = fract(n);\n  text(f, 50, 67);\n\n  describe('The number 56.78 written above the number 0.78.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "number whose fractional part will be found.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "fractional part of n.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "fractional part of n.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Math",
      "submodule": "Calculation"
    },
    {
      "name": "getURLPath",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1001,
      "itemtype": "method",
      "description": "<p>Returns the current\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#path_to_resource\" target=\"_blank\">URL</a>\npath as an <code>Array</code> of <code>String</code>s.</p>\n<p>For example, consider a sketch hosted at the URL\n<code>https://example.com/sketchbook</code>. Calling <code>getURLPath()</code> returns\n<code>['sketchbook']</code>. For a sketch hosted at the URL\n<code>https://example.com/sketchbook/monday</code>, <code>getURLPath()</code> returns\n<code>['sketchbook', 'monday']</code>.</p>\n",
      "example": [
        "function setup() {\n  background(200);\n\n  // Get the sketch's URL path\n  // and display the first\n  // part.\n  let path = getURLPath();\n  text(path[0], 25, 54);\n\n  describe('The word \"reference\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "path components.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "path components.",
        "type": "String[]"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "splineTangent",
      "file": "src/scripts/parsers/in/p5.js/src/shape/curves.js",
      "line": 1005,
      "itemtype": "method",
      "description": "<p>Calculates coordinates along a line that's tangent to a spline curve.</p>\n<p>Tangent lines skim the surface of a curve. A tangent line's slope equals\nthe curve's slope at the point where it intersects.</p>\n<p><code>splineTangent()</code> calculates coordinates along a tangent line using four\npoints p0, p1, p2, p3. It expects points in the same order as the\n<a href=\"#/p5/spline\">spline()</a> function. <code>splineTangent()</code> works one\naxis at a time. Passing the points' x-coordinates returns the x-component of\nthe tangent vector; passing the points' y-coordinates returns the y-component.\nThe first parameter, <code>a</code>, is the coordinate of point p0.</p>\n<p>The second and third parameters, <code>b</code> and <code>c</code>, are the coordinates of\npoints p1 and p2.</p>\n<p>The fourth parameter, <code>d</code>, is the coordinate of point p3.</p>\n<p>The fifth parameter, <code>t</code>, is the amount to interpolate along the span\nfrom p1 to p2. <code>t = 0</code> is p1, <code>t = 1</code> is p2, and <code>t = 0.5</code> is halfway\nbetween them.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(120, 120);\n  describe('A black spline on a gray canvas. A red dot moves along the curve on its own. A short line shows the tangent direction at the dot.');\n}\n\nfunction draw() {\n  background(240);\n\n  const x1 = 15, y1 = 40;\n  const x2 = 90, y2 = 25;\n  const x3 = 95, y3 = 95;\n  const x4 = 30, y4 = 110;\n\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n  spline(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  const t = 0.5 + 0.5 * sin(frameCount * 0.03);\n\n  const px = splinePoint(x1, x2, x3, x4, t);\n  const py = splinePoint(y1, y2, y3, y4, t);\n\n  let tx = splineTangent(x1, x2, x3, x4, t);\n  let ty = splineTangent(y1, y2, y3, y4, t);\n\n  const m = Math.hypot(tx, ty) || 1;\n  tx = (tx / m) * 16;\n  ty = (ty / m) * 16;\n\n  stroke(0);\n  strokeWeight(2);\n  line(px, py, px + tx, py + ty);\n\n  noStroke();\n  fill('red');\n  circle(px, py, 7);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the coordinates for the curve's four points (p0, p1, p2, p3).\n  let x1 = 5;\n  let y1 = 26;\n  let x2 = 73;\n  let y2 = 24;\n  let x3 = 73;\n  let y3 = 61;\n  let x4 = 15;\n  let y4 = 65;\n\n  // Draw the curve.\n  noFill();\n  spline(x1, y1, x2, y2, x3, y3, x4, y4);\n\n  // Draw tangents along the curve's path.\n  fill(255);\n\n  // Top circle.\n  stroke(0);\n  let x = splinePoint(x1, x2, x3, x4, 0);\n  let y = splinePoint(y1, y2, y3, y4, 0);\n  circle(x, y, 5);\n\n  // Top tangent line.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  let tx = 0.2 * splineTangent(x1, x2, x3, x4, 0);\n  let ty = 0.2 * splineTangent(y1, y2, y3, y4, 0);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  // Center circle.\n  stroke(0);\n  x = splinePoint(x1, x2, x3, x4, 0.5);\n  y = splinePoint(y1, y2, y3, y4, 0.5);\n  circle(x, y, 5);\n\n  // Center tangent line.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  tx = 0.2 * splineTangent(x1, x2, x3, x4, 0.5);\n  ty = 0.2 * splineTangent(y1, y2, y3, y4, 0.5);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  // Bottom circle.\n  stroke(0);\n  x = splinePoint(x1, x2, x3, x4, 1);\n  y = splinePoint(y1, y2, y3, y4, 1);\n  circle(x, y, 5);\n\n  // Bottom tangent line.\n  // Scale the tangent point to draw a shorter line.\n  stroke(255, 0, 0);\n  tx = 0.2 * splineTangent(x1, x2, x3, x4, 1);\n  ty = 0.2 * splineTangent(y1, y2, y3, y4, 1);\n  line(x + tx, y + ty, x - tx, y - ty);\n\n  describe(\n    'A black curve on a gray square. A white circle moves back and forth along the curve.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "a",
              "description": "coordinate of point p0.",
              "type": "Number"
            },
            {
              "name": "b",
              "description": "coordinate of point p1.",
              "type": "Number"
            },
            {
              "name": "c",
              "description": "coordinate of point p2.",
              "type": "Number"
            },
            {
              "name": "d",
              "description": "coordinate of point p3.",
              "type": "Number"
            },
            {
              "name": "t",
              "description": "amount to interpolate between 0 and 1.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "coordinate of a point on the tangent line.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "coordinate of a point on the tangent line.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Curves"
    },
    {
      "name": "normal",
      "file": "src/scripts/parsers/in/p5.js/src/shape/vertex.js",
      "line": 1019,
      "itemtype": "method",
      "description": "<p>Sets the normal vector for vertices in a custom 3D shape.</p>\n<p>3D shapes created with <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> are made by connecting sets of\npoints called vertices. Each vertex added with\n<a href=\"#/p5/vertex\">vertex()</a> has a normal vector that points away\nfrom it. The normal vector controls how light reflects off the shape.</p>\n<p><code>normal()</code> can be called two ways with different parameters to define the\nnormal vector's components.</p>\n<p>The first way to call <code>normal()</code> has three parameters, <code>x</code>, <code>y</code>, and <code>z</code>.\nIf <code>Number</code>s are passed, as in <code>normal(1, 2, 3)</code>, they set the x-, y-, and\nz-components of the normal vector.</p>\n<p>The second way to call <code>normal()</code> has one parameter, <code>vector</code>. If a\n<a href=\"#/p5.Vector\">p5.Vector</a> object is passed, as in\n<code>normal(myVector)</code>, its components will be used to set the normal vector.</p>\n<p><code>normal()</code> changes the normal vector of vertices added to a custom shape\nwith <a href=\"#/p5/vertex\">vertex()</a>. <code>normal()</code> must be called between\nthe <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> functions, just like\n<a href=\"#/p5/vertex\">vertex()</a>. The normal vector set by calling\n<code>normal()</code> will affect all following vertices until <code>normal()</code> is called\nagain:</p>\n<pre><code class=\"language-js\">beginShape();\n\n// Set the vertex normal.\nnormal(-0.4, -0.4, 0.8);\n\n// Add a vertex.\nvertex(-30, -30, 0);\n\n// Set the vertex normal.\nnormal(0, 0, 1);\n\n// Add vertices.\nvertex(30, -30, 0);\nvertex(30, 30, 0);\n\n// Set the vertex normal.\nnormal(0.4, -0.4, 0.8);\n\n// Add a vertex.\nvertex(-30, 30, 0);\n\nendShape();</code></pre>",
      "example": [
        "// Click the and drag the mouse to view the scene from a different angle.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the shape.\n  normalMaterial();\n  noStroke();\n\n  // Draw the shape.\n  beginShape();\n  vertex(-30, -30, 0);\n  vertex(30, -30, 0);\n  vertex(30, 30, 0);\n  vertex(-30, 30, 0);\n  endShape();\n}",
        "// Click the and drag the mouse to view the scene from a different angle.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the shape.\n  normalMaterial();\n  noStroke();\n\n  // Draw the shape.\n  // Use normal() to set vertex normals.\n  beginShape();\n  normal(-0.4, -0.4, 0.8);\n  vertex(-30, -30, 0);\n\n  normal(0, 0, 1);\n  vertex(30, -30, 0);\n  vertex(30, 30, 0);\n\n  normal(0.4, -0.4, 0.8);\n  vertex(-30, 30, 0);\n  endShape();\n}",
        "// Click the and drag the mouse to view the scene from a different angle.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A colorful square on a black background. The square changes color and rotates when the user drags the mouse. Parts of its surface reflect light in different directions.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the shape.\n  normalMaterial();\n  noStroke();\n\n  // Create p5.Vector objects.\n  let n1 = createVector(-0.4, -0.4, 0.8);\n  let n2 = createVector(0, 0, 1);\n  let n3 = createVector(0.4, -0.4, 0.8);\n\n  // Draw the shape.\n  // Use normal() to set vertex normals.\n  beginShape();\n  normal(n1);\n  vertex(-30, -30, 0);\n\n  normal(n2);\n  vertex(30, -30, 0);\n  vertex(30, 30, 0);\n\n  normal(n3);\n  vertex(-30, 30, 0);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "vector",
              "description": "vertex normal as a <a href=\"#/p5.Vector\">p5.Vector</a> object.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-component of the vertex normal.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-component of the vertex normal.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-component of the vertex normal.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "image",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 1022,
      "itemtype": "method",
      "description": "<p>Draws an image to the canvas.</p>\n<p>The first parameter, <code>img</code>, is the source image to be drawn. <code>img</code> can be\nany of the following objects:</p>\n<ul><li><a href=\"#/p5.Image\">p5.Image</a></li><li><a href=\"#/p5.Element\">p5.Element</a></li><li><a href=\"#/p5.Texture\">p5.Texture</a></li><li><a href=\"#/p5.Framebuffer\">p5.Framebuffer</a></li><li><a href=\"#/p5.FramebufferTexture\">p5.FramebufferTexture</a></li></ul><p>The second and third parameters, <code>dx</code> and <code>dy</code>, set the coordinates of the\ndestination image's top left corner. See\n<a href=\"#/p5/imageMode\">imageMode()</a> for other ways to position images.</p>\n<pre><code class=\"language-js example\">let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the image.\n  image(img, 0, 0);\n\n  describe('An image of the underside of a white umbrella with a gridded ceiling above.');\n}</code></pre><p>Here's a diagram that explains how optional parameters work in <code>image()</code>:</p>\n<p><img src=\"assets/drawImage.png\"></img></p>\n<p>The fourth and fifth parameters, <code>dw</code> and <code>dh</code>, are optional. They set the\nthe width and height to draw the destination image. By default, <code>image()</code>\ndraws the full source image at its original size.</p>\n<p>The sixth and seventh parameters, <code>sx</code> and <code>sy</code>, are also optional.\nThese coordinates define the top left corner of a subsection to draw from\nthe source image.</p>\n<p>The eighth and ninth parameters, <code>sw</code> and <code>sh</code>, are also optional.\nThey define the width and height of a subsection to draw from the source\nimage. By default, <code>image()</code> draws the full subsection that begins at\n<code>(sx, sy)</code> and extends to the edges of the source image.</p>\n<p>The ninth parameter, <code>fit</code>, is also optional. It enables a subsection of\nthe source image to be drawn without affecting its aspect ratio. If\n<code>CONTAIN</code> is passed, the full subsection will appear within the destination\nrectangle. If <code>COVER</code> is passed, the subsection will completely cover the\ndestination rectangle. This may have the effect of zooming into the\nsubsection.</p>\n<p>The tenth and eleventh paremeters, <code>xAlign</code> and <code>yAlign</code>, are also\noptional. They determine how to align the fitted subsection. <code>xAlign</code> can\nbe set to either <code>LEFT</code>, <code>RIGHT</code>, or <code>CENTER</code>. <code>yAlign</code> can be set to\neither <code>TOP</code>, <code>BOTTOM</code>, or <code>CENTER</code>. By default, both <code>xAlign</code> and <code>yAlign</code>\nare set to <code>CENTER</code>.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the image.\n  image(img, 10, 10);\n\n  describe('An image of the underside of a white umbrella with a gridded ceiling above. The image has dark gray borders on its left and top.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the image 50x50.\n  image(img, 0, 0, 50, 50);\n\n  describe('An image of the underside of a white umbrella with a gridded ceiling above. The image is drawn in the top left corner of a dark gray square.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the center of the image.\n  image(img, 25, 25, 50, 50, 25, 25, 50, 50);\n\n  describe('An image of a gridded ceiling drawn in the center of a dark gray square.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/moonwalk.jpg');\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the image and scale it to fit within the canvas.\n  image(img, 0, 0, width, height, 0, 0, img.width, img.height, CONTAIN);\n\n  describe('An image of an astronaut on the moon. The top and bottom borders of the image are dark gray.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense50.png');\n\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Draw the image and scale it to cover the canvas.\n  image(img, 0, 0, width, height, 0, 0, img.width, img.height, COVER);\n\n  describe('A pixelated image of the underside of a white umbrella with a gridded ceiling above.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "img",
              "description": "image to display.",
              "type": "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture|p5.Renderer|p5.Graphics"
            },
            {
              "name": "x",
              "description": "x-coordinate of the top-left corner of the image.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the top-left corner of the image.",
              "type": "Number"
            },
            {
              "name": "width",
              "description": "width to draw the image.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height to draw the image.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "img",
              "description": "",
              "type": "p5.Image|p5.Element|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
            },
            {
              "name": "dx",
              "description": "the x-coordinate of the destination\nrectangle in which to draw the source image",
              "type": "Number"
            },
            {
              "name": "dy",
              "description": "the y-coordinate of the destination\nrectangle in which to draw the source image",
              "type": "Number"
            },
            {
              "name": "dWidth",
              "description": "the width of the destination rectangle",
              "type": "Number"
            },
            {
              "name": "dHeight",
              "description": "the height of the destination rectangle",
              "type": "Number"
            },
            {
              "name": "sx",
              "description": "the x-coordinate of the subsection of the source\nimage to draw into the destination rectangle",
              "type": "Number"
            },
            {
              "name": "sy",
              "description": "the y-coordinate of the subsection of the source\nimage to draw into the destination rectangle",
              "type": "Number"
            },
            {
              "name": "sWidth",
              "description": "the width of the subsection of the\nsource image to draw into the destination\nrectangle",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "sHeight",
              "description": "the height of the subsection of the\nsource image to draw into the destination rectangle",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "fit",
              "description": "either CONTAIN or COVER",
              "optional": 1,
              "type": "CONTAIN|COVER"
            },
            {
              "name": "xAlign",
              "description": "either LEFT, RIGHT or CENTER default is CENTER",
              "optional": 1,
              "type": "LEFT|RIGHT|CENTER"
            },
            {
              "name": "yAlign",
              "description": "either TOP, BOTTOM or CENTER default is CENTER",
              "optional": 1,
              "type": "TOP|BOTTOM|CENTER"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "colorMode",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1037,
      "itemtype": "method",
      "description": "<p>Changes the way color values are interpreted.</p>\n<p>By default, the <code>Number</code> parameters for <a href=\"#/p5/fill\">fill()</a>,\n<a href=\"#/p5/stroke\">stroke()</a>,\n<a href=\"#/p5/background\">background()</a>, and\n<a href=\"#/p5/color\">color()</a> are defined by values between 0 and 255\nusing the RGB color model. This is equivalent to calling\n<code>colorMode(RGB, 255)</code>. Pure red is <code>color(255, 0, 0)</code> in this model.</p>\n<p>Calling <code>colorMode(RGB, 100)</code> sets colors to use RGB color values\nbetween 0 and 100. Pure red is <code>color(100, 0, 0)</code> in this model.</p>\n<p>Calling <code>colorMode(HSB)</code> or <code>colorMode(HSL)</code> changes to HSB or HSL systems instead of RGB.\nPure red is <code>color(0, 100, 100)</code> in HSB and <code>color(0, 100, 50)</code> in HSL.</p>\n<p>Some additional color modes that p5.js supports are:</p>\n<p><code>RGBHDR</code> - High Dynamic Range RGB defined within the Display P3 color space.\nColors are expressed with an extended dynamic range. To render these colors\naccurately, you must use the HDR canvas.</p>\n<p><code>HWB</code>    - Hue, Whiteness, Blackness.\nSimilar to HSB and HSL, this mode uses a hue angle.\nInstead of saturation and lightness, HWB defines colors based on the percentage\nof whiteness and blackness. This is the color model used by Chrome's GUI color picker.\nPure red in HWB is represented as <code>color(0, 0, 0)</code> (i.e., hue 0 with 0% whiteness and 0% blackness).</p>\n<pre><code>     &lt;img src=\"assets/hwb.png\"&gt;&lt;/img&gt;</code></pre><p><code>LAB</code>    - Also known as CIE Lab, this color mode defines colors with Lightness, Alpha, and Beta.\nIt is widely used in professional color measurement contexts due to its perceptual uniformity.</p>\n<p><code>LCH</code>    - A more intuitive representation of the CIE Lab color space using Lightness, Chroma, and Hue.\nThis mode separates the color's chromatic intensity (chroma) from its lightness,\nsimplifying color selection and manipulation.</p>\n<p><code>OKLAB</code>  - A variant of the CIE Lab color space that corrects for non-uniformities inherent in LAB.\nThe adjustment provides a more perceptually accurate and uniform representation,\nwhich is particularly beneficial for smooth color transitions.</p>\n<p><code>OKLCH</code>  - An easier-to-use representation of OKLAB, expressing colors in terms of Lightness, Chroma, and Hue.\nThis mode retains the perceptual benefits of OKLAB while offering a more intuitive format for color manipulation.</p>\n<p><a href=\"#/p5.Color\">p5.Color</a> objects remember the mode that they were\ncreated in. Changing modes doesn't affect their appearance.</p>\n<p><code>Single-value (Grayscale) Colors</code>:\nWhen a color is specified with only one parameter (e.g., <code>color(g)</code>), p5.js will interpret it\nas a grayscale color. However, how that single parameter translates into a grayscale value\ndepends on the color mode:</p>\n<ul><li><code>RGB, HSB, and HSL</code>: In RGB, the single value is interpreted using the “blue” maximum\n(i.e., the single parameter is mapped to the blue channel's max).\nIn HSB and HSL, the single value is mapped to Brightness and Lightness max respectively with hue=0 .\nand saturation=0.</li><li><code>LAB, LCH, OKLAB, and OKLCH</code>: The single value is taken to be the <code>lightness (L)</code> component,\nwith the specified max range for that channel.</li><li><code>HWB</code>: Grayscale relies on both the <code>whiteness (W)</code> and <code>blackness (B)</code> channels. Since\na single value cannot directly account for two distinct channels, the library uses an\naverage of their max values to interpret the single grayscale parameter. For instance,\nif W has a max of 50 and B has a max of 100, then the single grayscale parameter\nis mapped using (50 + 100) / 2 = 75 as its effective maximum. More complex or negative\nranges are currently not handled, so results in those cases may be ambiguous.</li></ul>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Fill with pure red.\n  fill(255, 0, 0);\n\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use RGB color with values in the range 0-100.\n  colorMode(RGB, 100);\n\n  // Fill with pure red.\n  fill(100, 0, 0);\n\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Fill with pure red.\n  fill(0, 100, 100);\n\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Fill with pure red.\n  fill(0, 100, 50);\n\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Draw a neutral gray background using the default color mode.\n  background(200);\n\n  // Switch to HWB color mode.\n  // (Assuming p5.js supports HWB with a range of:\n  // hue: 0–360, whiteness: 0–100, blackness: 0–100.)\n  colorMode(HWB);\n\n  // Set fill to pure red in HWB.\n  // Pure red in HWB is: hue = 0°, whiteness = 0%, blackness = 0%.\n  fill(0, 0, 0);\n\n  // Draw a circle at the center.\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center, drawn using HWB color mode.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Draw a neutral gray background using the default color mode.\n  background(200);\n\n  // Switch to LAB color mode.\n  // In this mode, L typically ranges from 0 to 100 while a and b span roughly -128 to 127.\n  colorMode(LAB);\n\n  // Set fill to pure red in LAB.\n  // The sRGB red (255, 0, 0) converts approximately to LAB as:\n  // L = 53, a = 80, b = 67.\n  fill(53, 80, 67);\n\n  // Draw a circle at the center.\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center, drawn using LAB color mode.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Draw a neutral gray background.\n  background(200);\n\n  // Switch to LCH color mode.\n  // In LCH, colors are defined by Lightness, Chroma, and Hue (in degrees).\n  colorMode(LCH);\n\n  // Set fill to an approximation of pure red in LCH:\n  // Lightness ≈ 53, Chroma ≈ 104, Hue ≈ 40°.\n  fill(53, 104, 40);\n\n  // Draw a circle at the center.\n  circle(50, 50, 25);\n\n  describe('A gray square with a red circle at its center, drawn using LCH color mode.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use RGB color with values in the range 0-100.\n  colorMode(RGB, 100);\n\n  for (let x = 0; x < 100; x += 1) {\n    for (let y = 0; y < 100; y += 1) {\n      stroke(x, y, 0);\n      point(x, y);\n    }\n  }\n\n  describe(\n    'A diagonal green to red gradient from bottom-left to top-right with shading transitioning to black at top-left corner.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use HSB color with values in the range 0-100.\n  colorMode(HSB, 100);\n\n  for (let x = 0; x < 100; x += 1) {\n    for (let y = 0; y < 100; y += 1) {\n      stroke(x, y, 100);\n      point(x, y);\n    }\n  }\n\n  describe('A rainbow gradient from left-to-right. Brightness transitions to white at the top.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Color object.\n  let myColor = color(180, 175, 230);\n  background(myColor);\n\n  // Use RGB color with values in the range 0-1.\n  colorMode(RGB, 1);\n\n  // Get the red, green, and blue color components.\n  let redValue = red(myColor);\n  let greenValue = green(myColor);\n  let blueValue = blue(myColor);\n\n  // Round the color components for display.\n  redValue = round(redValue, 2);\n  greenValue = round(greenValue, 2);\n  blueValue = round(blueValue, 2);\n\n  // Display the color components.\n  text(`Red: ${redValue}`, 10, 10, 80, 80);\n  text(`Green: ${greenValue}`, 10, 40, 80, 80);\n  text(`Blue: ${blueValue}`, 10, 70, 80, 80);\n\n  describe('A purple canvas with the red, green, and blue decimal values of the color written on it.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(255);\n\n  // Use RGB color with alpha values in the range 0-1.\n  colorMode(RGB, 255, 255, 255, 1);\n\n  noFill();\n  strokeWeight(4);\n  stroke(255, 0, 10, 0.3);\n  circle(40, 40, 50);\n  circle(50, 60, 50);\n\n  describe('Two overlapping translucent pink circle outlines.');\n}",
        "let hslGraphic, lchGraphic, oklchGraphic;\n\nfunction setup() {\n  createCanvas(600, 200);\n  noLoop();\n\n  // Create three graphics objects for HSL, LCH, and OKLCH color modes\n  hslGraphic = createGraphics(200, 200);\n  lchGraphic = createGraphics(200, 200);\n  oklchGraphic = createGraphics(200, 200);\n\n  // Draw HSL color wheel\n  colorMode(HSL);\n  hslGraphic.translate(100, 100);\n  for (let i = 0; i < 1000; i++) {\n    hslGraphic.stroke(360 / 1000 * i, 70, 50);\n    hslGraphic.line(0, 0, hslGraphic.width / 2, 0);\n    hslGraphic.rotate(TAU / 1000);\n  }\n\n  // Draw LCH color wheel\n  colorMode(LCH);\n  lchGraphic.translate(100, 100);\n  for (let i = 0; i < 1000; i++) {\n    lchGraphic.stroke(54, 106, 360 / 1000 * i);\n    lchGraphic.line(0, 0, lchGraphic.width / 2, 0);\n    lchGraphic.rotate(TAU / 1000);\n  }\n\n  // Draw OKLCH color wheel\n  colorMode(OKLCH);\n  oklchGraphic.translate(100, 100);\n  for (let i = 0; i < 1000; i++) {\n    oklchGraphic.stroke(54, 106, 360 / 1000 * i);\n    oklchGraphic.line(0, 0, oklchGraphic.width / 2, 0);\n    oklchGraphic.rotate(TAU / 1000);\n  }\n}\n\nfunction draw() {\n  // Set the styles\n  colorMode(RGB);\n  background(220);\n\n  // Display the color wheels\n  image(hslGraphic, 0, 0);\n  image(lchGraphic, 200, 0);\n  image(oklchGraphic, 400, 0);\n}",
        "// Example: Single-value (Grayscale) colors in different color modes.\n// The rectangle is filled with one parameter, but its final color depends\n// on how that parameter is interpreted by the current color mode.\n\nfunction setup() {\n  createCanvas(100, 100);\n  noStroke();\n  noLoop();\n}\n\nfunction draw() {\n  // Set color mode to RGB with range 0-255\n  colorMode(RGB, 255);\n\n  // Fill with single grayscale value\n  fill(128);\n  rect(0, 0, 100, 100);\n\n  // Add text label\n  fill(0); // Switch to black text for clarity\n  textSize(14);\n  text(\"RGB (128)\", 10, 20);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either RGB, HSB, HSL,\nor one of the extended modes described above.",
              "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
            },
            {
              "name": "max",
              "description": "range for all values.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current color mode.",
            "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
          }
        },
        {
          "params": [
            {
              "name": "mode",
              "description": "",
              "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
            },
            {
              "name": "max1",
              "description": "range for the red or hue depending on the\ncurrent color mode.",
              "type": "Number"
            },
            {
              "name": "max2",
              "description": "range for the green or saturation depending\non the current color mode.",
              "type": "Number"
            },
            {
              "name": "max3",
              "description": "range for the blue or brightness/lightness\ndepending on the current color mode.",
              "type": "Number"
            },
            {
              "name": "maxA",
              "description": "range for the alpha.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "The current color mode.",
            "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
          }
        },
        {
          "params": [],
          "return": {
            "description": "The current color mode.",
            "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
          }
        }
      ],
      "return": {
        "description": "The current color mode.",
        "type": "RGB|HSB|HSL|RGBHDR|HWB|LAB|LCH|OKLAB|OKLCH"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "getURLParams",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1037,
      "itemtype": "method",
      "description": "<p>Returns the current\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#parameters\" target=\"_blank\">URL parameters</a>\nin an <code>Object</code>.</p>\n<p>For example, calling <code>getURLParams()</code> in a sketch hosted at the URL\n<code>https://p5js.org?year=2014&month=May&day=15</code> returns\n<code>{ year: 2014, month: 'May', day: 15 }</code>.</p>\n",
      "example": [
        "// META:norender\n// Imagine this sketch is hosted at the following URL:\n// https://p5js.org?year=2014&month=May&day=15\n\nfunction setup() {\n  background(200);\n\n  // Get the sketch's URL\n  // parameters and display\n  // them.\n  let params = getURLParams();\n  text(params.day, 10, 20);\n  text(params.month, 10, 40);\n  text(params.year, 10, 60);\n\n  describe('The text \"15\", \"May\", and \"2014\" written in black on separate lines.');\n}"
      ],
      "alt": "This example does not render anything.",
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "URL params",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "URL params",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "shearX",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 1037,
      "itemtype": "method",
      "description": "<p>Shears the x-axis so that shapes appear skewed.</p>\n<p>By default, the x- and y-axes are perpendicular. The <code>shearX()</code> function\ntransforms the coordinate system so that x-coordinates are translated while\ny-coordinates are fixed.</p>\n<p>The first parameter, <code>angle</code>, is the amount to shear. For example, calling\n<code>shearX(1)</code> transforms all x-coordinates using the formula\n<code>x = x + y * tan(angle)</code>. <code>shearX()</code> interprets angle values using the\ncurrent <a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, transformations accumulate. For example, calling\n<code>shearX(1)</code> twice has the same effect as calling <code>shearX(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and\n<a href=\"#/p5/pop\">pop()</a> functions can be used to isolate\ntransformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>shearX(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't\ncause shapes to shear continuously.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white quadrilateral on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Shear the coordinate system along the x-axis.\n  shearX(QUARTER_PI);\n\n  // Draw the square.\n  square(0, 0, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white quadrilateral on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Shear the coordinate system along the x-axis.\n  shearX(45);\n\n  // Draw the square.\n  square(0, 0, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle to shear by in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "lightFalloff",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 1059,
      "itemtype": "method",
      "description": "<p>Sets the falloff rate for <a href=\"#/p5/pointLight\">pointLight()</a>\nand <a href=\"#/p5/spotLight\">spotLight()</a>.</p>\n<p>A light’s falloff describes the intensity of its beam at a distance. For\nexample, a lantern has a slow falloff, a flashlight has a medium falloff,\nand a laser pointer has a sharp falloff.</p>\n<p><code>lightFalloff()</code> has three parameters, <code>constant</code>, <code>linear</code>, and\n<code>quadratic</code>. They’re numbers used to calculate falloff at a distance, <code>d</code>,\nas follows:</p>\n<p><code>falloff = 1 / (constant + d * linear + (d * d) * quadratic)</code></p>\n<p>Note: <code>constant</code>, <code>linear</code>, and <code>quadratic</code> should always be set to values\ngreater than 0.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to change the falloff rate.\n\nlet useFalloff = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A sphere drawn against a gray background. The intensity of the light changes when the user double-clicks.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Set the light falloff.\n  if (useFalloff === true) {\n    lightFalloff(2, 0, 0);\n  }\n\n  // Add a white point light from the front.\n  pointLight(255, 255, 255, 0, 0, 100);\n\n  // Style the sphere.\n  noStroke();\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Change the falloff value when the user double-clicks.\nfunction doubleClicked() {\n  useFalloff = true;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "constant",
              "description": "constant value for calculating falloff.",
              "type": "Number"
            },
            {
              "name": "linear",
              "description": "linear value for calculating falloff.",
              "type": "Number"
            },
            {
              "name": "quadratic",
              "description": "quadratic value for calculating falloff.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "shader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1065,
      "itemtype": "method",
      "description": "<p>Sets the <a href=\"#/p5.Shader\">p5.Shader</a> object to apply while drawing.</p>\n<p>Shaders are programs that run on the graphics processing unit (GPU). They\ncan process many pixels or vertices at the same time, making them fast for\nmany graphics tasks.</p>\n<p>You can make new shaders using p5.strands with the\n<a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader</code></a>,\n<a href=\"#/p5/buildColorShader\"><code>buildColorShader</code></a>, and\n<a href=\"#/p5/buildNormalShader\"><code>buildNormalShader</code></a> functions. You can also use\n<a href=\"#/p5/buildFilterShader\"><code>buildFilterShader</code></a> alongside\n<a href=\"#/p5/filter\"><code>filter</code></a>, and\n<a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader</code></a> alongside\n<a href=\"#/p5/stroke\"><code>stroke</code></a>.</p>\n<p>The parameter, <code>s</code>, is the <a href=\"#/p5.Shader\">p5.Shader</a> object to\napply. For example, calling <code>shader(myShader)</code> applies <code>myShader</code> to\nprocess each pixel on the canvas. This only changes the fill (the inner part of shapes),\nbut does not affect the outlines (strokes) or any images drawn using the <code>image()</code> function.\nThe source code from a <a href=\"#/p5.Shader\">p5.Shader</a> object's\nfragment and vertex shaders will be compiled the first time it's passed to\n<code>shader()</code>.</p>\n<p>Calling <a href=\"#/p5/resetShader\">resetShader()</a> restores a sketch’s\ndefault shaders.</p>\n<p>Note: Shaders can only be used in WebGL mode.</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n  noStroke();\n  describe('A square with dynamically changing colors on a beige background.');\n}\n\nfunction material() {\n  let time = millis() / 1000;\n  finalColor.begin();\n  let r = 0.2 + 0.5 * abs(sin(time + 0));\n  let g = 0.2 + 0.5 * abs(sin(time + 1));\n  let b = 0.2 + 0.5 * abs(sin(time + 2));\n  finalColor.set([r, g, b, 1]);\n  finalColor.end();\n}\n\nfunction draw() {\n  background(245, 245, 220);\n  shader(myShader);\n\n  rectMode(CENTER);\n  rect(0, 0, 50, 50);\n}</code></pre><p>For advanced usage, shaders can be written in a language called\n<a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>.\n<a href=\"#/p5.Shader\">p5.Shader</a> objects can be created in this way using the\n<a href=\"#/p5/createShader\">createShader()</a> and\n<a href=\"#/p5/loadShader\">loadShader()</a> functions.</p>\n<pre><code class=\"language-js\">let fillShader;\n\nlet vertSrc = `\nprecision highp float;\nattribute vec3 aPosition;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying vec3 vPosition;\n\nvoid main() {\n  vPosition = aPosition;\n  gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aPosition, 1.0);\n}\n`;\n\nlet fragSrc = `\nprecision highp float;\nuniform vec3 uLightDir;\nvarying vec3 vPosition;\n\nvoid main() {\n  vec3 lightDir = normalize(uLightDir);\n  float brightness = dot(lightDir, normalize(vPosition));\n  brightness = clamp(brightness, 0.4, 1.0);\n  vec3 color = vec3(0.3, 0.5, 1.0);\n  color = color * brightness * 3.0;\n  gl_FragColor = vec4(color, 1.0);\n}\n`;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  fillShader = createShader(vertSrc, fragSrc);\n  noStroke();\n  describe('A rotating torus with simulated directional lighting.');\n}\n\nfunction draw() {\n  background(20, 20, 40);\n  let lightDir = [0.5, 0.5, 1.0];\n  fillShader.setUniform('uLightDir', lightDir);\n  shader(fillShader);\n  rotateY(frameCount * 0.02);\n  rotateX(frameCount * 0.02);\n  torus(25, 10, 30, 30);\n}</code></pre><pre><code class=\"language-js example\">let fillShader;\n\nlet vertSrc = `\nprecision highp float;\nattribute vec3 aPosition;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uModelViewMatrix;\nvarying vec3 vPosition;\nvoid main() {\n  vPosition = aPosition;\n  gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aPosition, 1.0);\n}\n`;\n\nlet fragSrc = `\nprecision highp float;\nuniform vec3 uLightPos;\nuniform vec3 uFillColor;\nvarying vec3 vPosition;\nvoid main() {\n  float brightness = dot(normalize(uLightPos), normalize(vPosition));\n  brightness = clamp(brightness, 0.0, 1.0);\n  vec3 color = uFillColor * brightness;\n  gl_FragColor = vec4(color, 1.0);\n}\n`;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  fillShader = createShader(vertSrc, fragSrc);\n  shader(fillShader);\n  noStroke();\n  describe('A square affected by both fill color and lighting, with lights controlled by mouse.');\n}\n\nfunction draw() {\n  let lightPos = [(mouseX - width / 2) / width,\n    (mouseY - height / 2) / height, 1.0];\n  fillShader.setUniform('uLightPos', lightPos);\n  let fillColor = [map(mouseX, 0, width, 0, 1),\n    map(mouseY, 0, height, 0, 1), 0.5];\n  fillShader.setUniform('uFillColor', fillColor);\n  plane(width, height);\n}</code></pre><div>\n<p><p>If you want to apply shaders to strokes or images, use the following methods:</p>\n<ul><li><a href=\"#/p5/strokeShader\">strokeShader()</a> : Applies a shader to the stroke (outline) of shapes, allowing independent control over the stroke rendering using shaders.</li><li><a href=\"#/p5/imageShader\">imageShader()</a> : Applies a shader to images or textures, controlling how the shader modifies their appearance during rendering.</li></ul></p>\n</div>",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "s",
              "description": "<a href=\"#/p5.Shader\">p5.Shader</a> object\nto apply.",
              "type": "p5.Shader"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "mouseMoved",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1067,
      "itemtype": "method",
      "description": "<p>A function that's called when the mouse moves.</p>\n<p>Declaring the function <code>mouseMoved()</code> sets a code block to run\nautomatically when the user moves the mouse without clicking any mouse\nbuttons:</p>\n<pre><code class=\"language-js\">function mouseMoved() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mouseMoved()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mouseMoved() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mouseMoved()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse move event:</p>\n<pre><code class=\"language-js\">function mouseMoved(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square becomes lighter as the mouse moves.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\nfunction mouseMoved() {\n  // Update the grayscale value.\n  value += 5;\n\n  // Reset the grayscale value.\n  if (value > 255) {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "mouseDragged",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1067,
      "itemtype": "method",
      "description": "<p>A function that's called when the mouse moves while a button is pressed.</p>\n<p>Declaring the function <code>mouseDragged()</code> sets a code block to run\nautomatically when the user clicks and drags the mouse:</p>\n<pre><code class=\"language-js\">function mouseDragged() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mouseDragged()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mouseDragged() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mouseDragged()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse drag event:</p>\n<pre><code class=\"language-js\">function mouseDragged(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>On touchscreen devices, <code>mouseDragged()</code> will run when a user moves a touch\npoint.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square becomes lighter as the user drags the mouse.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\nfunction mouseDragged() {\n  // Update the grayscale value.\n  value += 5;\n\n  // Reset the grayscale value.\n  if (value > 255) {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "keyIsDown",
      "file": "src/scripts/parsers/in/p5.js/src/events/keyboard.js",
      "line": 1068,
      "itemtype": "method",
      "description": "<p>Returns <code>true</code> if the key it’s checking is pressed and <code>false</code> if not.</p>\n<p><code>keyIsDown()</code> is helpful when checking for multiple different key presses.\nFor example, <code>keyIsDown()</code> can be used to check if both <code>LEFT_ARROW</code> and\n<code>UP_ARROW</code> are pressed:</p>\n<pre><code class=\"language-js\">if (keyIsDown(LEFT_ARROW) && keyIsDown(UP_ARROW)) {\n  // Move diagonally.\n}</code></pre><p><code>keyIsDown()</code> can check for key presses using strings based on\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\" target=\"_blank\">KeyboardEvent.key</a>\nor <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\" target=\"_blank\">KeyboardEvent.code</a> values,\nsuch as <code>keyIsDown('x')</code> or <code>keyIsDown('ArrowLeft')</code>.</p>\n<p>Note: In p5.js 2.0 and newer, numeric keycodes (such as 88 for 'X') are no longer supported.\nThis is a breaking change from previous versions.</p>\n<p>You can still use the p5 constants like <code>LEFT_ARROW</code> which now map to string values\ninternally rather than numeric codes.</p>\n",
      "example": [
        "// Click on the canvas to begin detecting key presses.\n\nlet x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe(\n    'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'\n  );\n}\n\nfunction draw() {\n  // Update x and y if an arrow key is pressed.\n  if (keyIsDown(LEFT_ARROW) === true) {\n    x -= 1;\n  }\n\n  if (keyIsDown(RIGHT_ARROW) === true) {\n    x += 1;\n  }\n\n  if (keyIsDown(UP_ARROW) === true) {\n    y -= 1;\n  }\n\n  if (keyIsDown(DOWN_ARROW) === true) {\n    y += 1;\n  }\n\n  // Style the circle.\n  fill(0);\n\n  // Draw the circle.\n  circle(x, y, 5);\n}",
        "// Click on the canvas to begin detecting key presses.\n\nlet x = 50;\nlet y = 50;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  describe(\n    'A gray square with a black circle at its center. The circle moves when the user presses an arrow key. It leaves a trail as it moves.'\n  );\n}\n\nfunction draw() {\n  // Update x and y if an arrow key is pressed.\n  if (keyIsDown('ArrowLeft') === true) {\n    x -= 1;\n  }\n\n  if (keyIsDown('ArrowRight') === true) {\n    x += 1;\n  }\n\n  if (keyIsDown('ArrowUp') === true) {\n    y -= 1;\n  }\n\n  if (keyIsDown('ArrowDown') === true) {\n    y += 1;\n  }\n\n  // Style the circle.\n  fill(0);\n\n  // Draw the circle.\n  circle(x, y, 5);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "code",
              "description": "key to check.",
              "type": "Number|String"
            }
          ],
          "return": {
            "description": "whether the key is down or not.",
            "type": "Boolean"
          }
        }
      ],
      "return": {
        "description": "whether the key is down or not.",
        "type": "Boolean"
      },
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Keyboard"
    },
    {
      "name": "setContent",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 1080,
      "itemtype": "method",
      "description": "<p>Sets the element's content.</p>\n<p>An element's content is the text between its tags. For example, the element\n<code><language>JavaScript</language></code> has the content <code>JavaScript</code>.</p>\n<p>The parameter, <code>content</code>, is a string with the element's new content.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's original content.\n  let oldContent = reptile.getContent();\n\n  // Set the reptile's content.\n  reptile.setContent('Loggerhead');\n\n  // Get the reptile's new content.\n  let newContent = reptile.getContent();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's old and new content.\n  text(`${oldContent}: ${newContent}`, 5, 50, 90);\n\n  describe(\n    `The text \"${oldContent}: ${newContent}\" written in green on a gray background.`\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "content",
              "description": "new content for the element.",
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "model",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/loading.js",
      "line": 1083,
      "itemtype": "method",
      "description": "<p>Draws a <a href=\"#/p5.Geometry\">p5.Geometry</a> object to the canvas.</p>\n<p>The parameter, <code>model</code>, is the\n<a href=\"#/p5.Geometry\">p5.Geometry</a> object to draw.\n<a href=\"#/p5.Geometry\">p5.Geometry</a> objects can be built with\n<a href=\"#/p5/buildGeometry\">buildGeometry()</a>. They can also be loaded from\na file with <a href=\"#/p5/loadGeometry\">loadGeometry()</a>.</p>\n<p>Note: <code>model()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Geometry object.\n  shape = buildGeometry(createShape);\n\n  describe('A white cone drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the p5.Geometry object.\n  model(shape);\n}\n\n// Create p5.Geometry object from a single cone.\nfunction createShape() {\n  cone();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the p5.Geometry object.\n  shape = buildGeometry(createArrow);\n\n  describe('Two white arrows drawn on a gray background. The arrow on the right rotates slowly.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the arrows.\n  noStroke();\n\n  // Draw the p5.Geometry object.\n  model(shape);\n\n  // Translate and rotate the coordinate system.\n  translate(30, 0, 0);\n  rotateZ(frameCount * 0.01);\n\n  // Draw the p5.Geometry object again.\n  model(shape);\n}\n\nfunction createArrow() {\n  // Add shapes to the p5.Geometry object.\n  push();\n  rotateX(PI);\n  cone(10);\n  translate(0, -10, 0);\n  cylinder(3, 20);\n  pop();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet shape;\n\nasync function setup() {\n  shape = await loadModel('assets/octahedron.obj');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white octahedron drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the shape.\n  model(shape);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "model",
              "description": "3D shape to be drawn.",
              "type": "p5.Geometry"
            },
            {
              "name": "count",
              "description": "number of instances to draw.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Models"
    },
    {
      "name": "rect",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 1093,
      "itemtype": "method",
      "description": "<p>Draws a rectangle.</p>\n<p>A rectangle is a four-sided shape defined by the <code>x</code>, <code>y</code>, <code>w</code>, and <code>h</code>\nparameters. <code>x</code> and <code>y</code> set the location of its top-left corner. <code>w</code> sets\nits width and <code>h</code> sets its height. Every angle in the rectangle measures\n90˚. See <a href=\"#/p5/rectMode\">rectMode()</a> for other ways to define\nrectangles.</p>\n<p>The version of <code>rect()</code> with five parameters creates a rounded rectangle. The\nfifth parameter sets the radius for all four corners.</p>\n<p>The version of <code>rect()</code> with eight parameters also creates a rounded\nrectangle. Each of the last four parameters set the radius of a corner. The\nradii start with the top-left corner and move clockwise around the\nrectangle. If any of these parameters are omitted, they are set to the\nvalue of the last radius that was set.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rect(30, 20, 55, 55);\n\n  describe('A white square with a black outline on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  rect(30, 20, 55, 40);\n\n  describe('A white rectangle with a black outline on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Give all corners a radius of 20.\n  rect(30, 20, 55, 50, 20);\n\n  describe('A white rectangle with a black outline and round edges on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Give each corner a unique radius.\n  rect(30, 20, 55, 50, 20, 15, 10, 5);\n\n  describe('A white rectangle with a black outline and round edges of different radii.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  rect(-20, -30, 55, 55);\n\n  describe('A white square with a black outline on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white square spins around on gray canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the rectangle.\n  rect(-20, -30, 55, 55);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the rectangle.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the rectangle.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the rectangle.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the rectangle.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "tl",
              "description": "optional radius of top-left corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "tr",
              "description": "optional radius of top-right corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "br",
              "description": "optional radius of bottom-right corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bl",
              "description": "optional radius of bottom-left corner.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "",
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of segments in the x-direction (for WebGL mode).",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of segments in the y-direction (for WebGL mode).",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "httpDo",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1104,
      "itemtype": "method",
      "description": "<p>Method for executing an HTTP request. If data type is not specified,\nit will default to <code>'text'</code>.</p>\n<p>This function is meant for more advanced usage of HTTP requests in p5.js. It is\nbest used when a <code>Request</code>\nobject is passed to the <code>path</code> parameter.</p>\n<p>This method is suitable for fetching files up to size of 64MB when \"GET\" is used.</p>\n",
      "example": [
        "// Examples use USGS Earthquake API:\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\n\n// displays an animation of all USGS earthquakes\nlet earthquakes;\nlet eqFeatureIndex = 0;\n\nfunction setup() {\n createCanvas(100,100);\n\n  let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\n\n  const req = new Request(url, {\n   method: 'GET',\n   headers: {authorization: 'Bearer secretKey'}\n });\n // httpDo(path, method, datatype, success, error)\n\n  httpDo(\n    req,\n    'GET',\n   'json',\n    res => {\n     earthquakes = res;\n    },\n   err => {\n     console.error('Error loading data:', err);\n   }\n );\n}\n\nfunction draw() {\n  // wait until the data is loaded\n  if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\n    return;\n  }\n  clear();\n\n  let feature = earthquakes.features[eqFeatureIndex];\n  let mag = feature.properties.mag;\n  let rad = mag / 11 * ((width + height) / 2);\n  fill(255, 0, 0, 100);\n  ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\n\n  if (eqFeatureIndex >= earthquakes.features.length) {\n    eqFeatureIndex = 0;\n  } else {\n    eqFeatureIndex += 1;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "name of the file or url to load",
              "type": "String|Request"
            },
            {
              "name": "method",
              "description": "either \"GET\", \"POST\", \"PUT\", \"DELETE\",\nor other HTTP request methods",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "datatype",
              "description": "\"json\", \"jsonp\", \"xml\", or \"text\"",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "data",
              "description": "param data passed sent with request",
              "optional": 1,
              "type": "Object"
            },
            {
              "name": "callback",
              "description": "function to be executed after\n<a href=\"#/p5/httpGet\">httpGet()</a> completes, data is passed in\nas first argument",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "function to be executed if\nthere is an error, response is passed\nin as first argument",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
            "type": "Promise"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "",
              "type": "String|Request"
            },
            {
              "name": "callback",
              "description": "",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "errorCallback",
              "description": "",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "",
            "type": "Promise"
          }
        }
      ],
      "return": {
        "description": "A promise that resolves with the data when the operation\ncompletes successfully or rejects with the error after\none occurs.",
        "type": "Promise"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "shearY",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 1107,
      "itemtype": "method",
      "description": "<p>Shears the y-axis so that shapes appear skewed.</p>\n<p>By default, the x- and y-axes are perpendicular. The <code>shearY()</code> function\ntransforms the coordinate system so that y-coordinates are translated while\nx-coordinates are fixed.</p>\n<p>The first parameter, <code>angle</code>, is the amount to shear. For example, calling\n<code>shearY(1)</code> transforms all y-coordinates using the formula\n<code>y = y + x * tan(angle)</code>. <code>shearY()</code> interprets angle values using the\ncurrent <a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>By default, transformations accumulate. For example, calling\n<code>shearY(1)</code> twice has the same effect as calling <code>shearY(2)</code> once. The\n<a href=\"#/p5/push\">push()</a> and\n<a href=\"#/p5/pop\">pop()</a> functions can be used to isolate\ntransformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>shearY(1)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't\ncause shapes to shear continuously.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white quadrilateral on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Shear the coordinate system along the y-axis.\n  shearY(QUARTER_PI);\n\n  // Draw the square.\n  square(0, 0, 50);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  describe('A white quadrilateral on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Shear the coordinate system along the y-axis.\n  shearY(45);\n\n  // Draw the square.\n  square(0, 0, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle to shear by in the current <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "saturation",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 1113,
      "itemtype": "method",
      "description": "<p>Gets the saturation value of a color.</p>\n<p><code>saturation()</code> extracts the saturation value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>Saturation is scaled differently in HSB and HSL. By default, <code>saturation()</code>\nreturns a color's HSL saturation in the range 0 to 100. If the\n<a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to HSB or HSL, it returns the\nsaturation value in the given mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a p5.Color object.\n  let c = color(0, 50, 100);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'satValue' to 50.\n  let satValue = saturation(c);\n\n  // Draw the right rectangle.\n  fill(satValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is dark gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a color array.\n  let c = [0, 50, 100];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'satValue' to 100.\n  let satValue = saturation(c);\n\n  // Draw the right rectangle.\n  fill(satValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a CSS color string.\n  let c = 'rgb(255, 128, 128)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'satValue' to 100.\n  let satValue = saturation(c);\n\n  // Draw the right rectangle.\n  fill(satValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a p5.Color object.\n  let c = color(0, 100, 75);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'satValue' to 100.\n  let satValue = saturation(c);\n\n  // Draw the right rectangle.\n  fill(satValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color with values in the range 0-255.\n  colorMode(HSL, 255);\n\n  // Create a p5.Color object.\n  let c = color(0, 255, 191.5);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'satValue' to 255.\n  let satValue = saturation(c);\n\n  // Draw the right rectangle.\n  fill(satValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the saturation value",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the saturation value",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "createSelect",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 1139,
      "itemtype": "method",
      "description": "<p>Creates a dropdown menu <code><select></select></code> element.</p>\n<p>The parameter is optional. If <code>true</code> is passed, as in\n<code>let mySelect = createSelect(true)</code>, then the dropdown will support\nmultiple selections. If an existing <code><select></select></code> element\nis passed, as in <code>let mySelect = createSelect(otherSelect)</code>, the existing\nelement will be wrapped in a new <a href=\"#/p5.Element\">p5.Element</a>\nobject.</p>\n<p>Dropdowns extend the <a href=\"#/p5.Element\">p5.Element</a> class with a few\nhelpful methods for managing options:</p>\n<ul><li><code>mySelect.option(name, [value])</code> adds an option to the menu. The first paremeter, <code>name</code>, is a string that sets the option's name and value. The second parameter, <code>value</code>, is optional. If provided, it sets the value that corresponds to the key <code>name</code>. If an option with <code>name</code> already exists, its value is changed to <code>value</code>.</li><li><code>mySelect.value()</code> returns the currently-selected option's value.</li><li><code>mySelect.selected()</code> returns the currently-selected option.</li><li><code>mySelect.selected(option)</code> selects the given option by default.</li><li><code>mySelect.disable()</code> marks the whole dropdown element as disabled.</li><li><code>mySelect.disable(option)</code> marks a given option as disabled.</li><li><code>mySelect.enable()</code> marks the whole dropdown element as enabled.</li><li><code>mySelect.enable(option)</code> marks a given option as enabled.</li></ul>",
      "example": [
        "let mySelect;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a dropdown and place it beneath the canvas.\n  mySelect = createSelect();\n  mySelect.position(0, 100);\n\n  // Add color options.\n  mySelect.option('red');\n  mySelect.option('green');\n  mySelect.option('blue');\n  mySelect.option('yellow');\n\n  // Set the selected option to \"red\".\n  mySelect.selected('red');\n\n  describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n  // Use the selected value to paint the background.\n  let c = mySelect.selected();\n  background(c);\n}",
        "let mySelect;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a dropdown and place it beneath the canvas.\n  mySelect = createSelect();\n  mySelect.position(0, 100);\n\n  // Add color options.\n  mySelect.option('red');\n  mySelect.option('green');\n  mySelect.option('blue');\n  mySelect.option('yellow');\n\n  // Set the selected option to \"red\".\n  mySelect.selected('red');\n\n  // Disable the \"yellow\" option.\n  mySelect.disable('yellow');\n\n  describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n  // Use the selected value to paint the background.\n  let c = mySelect.selected();\n  background(c);\n}",
        "let mySelect;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a dropdown and place it beneath the canvas.\n  mySelect = createSelect();\n  mySelect.position(0, 100);\n\n  // Add color options with names and values.\n  mySelect.option('one', 'red');\n  mySelect.option('two', 'green');\n  mySelect.option('three', 'blue');\n  mySelect.option('four', 'yellow');\n\n  // Set the selected option to \"one\".\n  mySelect.selected('one');\n\n  describe('A red square with a dropdown menu beneath it. The square changes color when a new color is selected.');\n}\n\nfunction draw() {\n  // Use the selected value to paint the background.\n  let c = mySelect.selected();\n  background(c);\n}",
        "// Hold CTRL to select multiple options on Windows and Linux.\n// Hold CMD to select multiple options on macOS.\nlet mySelect;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a dropdown and allow multiple selections.\n  // Place it beneath the canvas.\n  mySelect = createSelect(true);\n  mySelect.position(0, 100);\n\n  // Add color options.\n  mySelect.option('red');\n  mySelect.option('green');\n  mySelect.option('blue');\n  mySelect.option('yellow');\n\n  describe('A gray square with a dropdown menu beneath it. Colorful circles appear when their color is selected.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use the selected value(s) to draw circles.\n  let colors = mySelect.selected();\n  for (let i = 0; i < colors.length; i += 1) {\n    // Calculate the x-coordinate.\n    let x = 10 + i * 20;\n\n    // Access the color.\n    let c = colors[i];\n\n    // Draw the circle.\n    fill(c);\n    circle(x, 50, 20);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "multiple",
              "description": "support multiple selections.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        },
        {
          "params": [
            {
              "name": "existing",
              "description": "select element to wrap, either as a <a href=\"#/p5.Element\">p5.Element</a> or\na <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement\" target=\"_blank\">HTMLSelectElement</a>.",
              "type": "Object"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "cone",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 1144,
      "itemtype": "method",
      "description": "<p>Draws a cone.</p>\n<p>A cone is a 3D shape with triangular faces that connect a flat bottom to a\nsingle point. Cones with few faces look like pyramids. Cones with many\nfaces have smooth surfaces.</p>\n<p>The first parameter, <code>radius</code>, is optional. If a <code>Number</code> is passed, as in\n<code>cone(20)</code>, it sets the radius of the cone’s base. By default, <code>radius</code> is\n50.</p>\n<p>The second parameter, <code>height</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cone(20, 30)</code>, it sets the cone’s height. By default, <code>height</code> is\nset to the cone’s <code>radius</code>.</p>\n<p>The third parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cone(20, 30, 5)</code>, it sets the number of edges used to form the\ncone's base. Using more edges makes the base look more like a circle. By\ndefault, <code>detailX</code> is 24.</p>\n<p>The fourth parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>cone(20, 30, 5, 7)</code>, it sets the number of triangle subdivisions to\nuse along the y-axis connecting the base to the tip. All 3D shapes are made\nby connecting triangles to form their surfaces. By default, <code>detailY</code> is 1.</p>\n<p>The fifth parameter, <code>cap</code>, is also optional. If a <code>false</code> is passed, as\nin <code>cone(20, 30, 5, 7, false)</code> the cone’s base won’t be drawn. By default,\n<code>cap</code> is <code>true</code>.</p>\n<p>Note: <code>cone()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  cone();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius and height to 30.\n  cone(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius to 30 and height to 50.\n  cone(30, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 5.\n  cone(30, 50, 5);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white pyramid on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 5.\n  cone(30, 50, 5);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 24 and detailY to 2.\n  cone(30, 50, 24, 2);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cone on a gray background. Its base is missing.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the cone.\n  // Set its radius to 30 and height to 50.\n  // Set its detailX to 24 and detailY to 1.\n  // Don't draw its base.\n  cone(30, 50, 24, 1, false);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radius",
              "description": "radius of the cone's base. Defaults to 50.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the cone. Defaults to the value of <code>radius</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of edges used to draw the base. Defaults to 24.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis. Defaults to 1.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "cap",
              "description": "whether to draw the cone's base.  Defaults to <code>true</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "worldToScreen",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1162,
      "itemtype": "method",
      "description": "<p>Converts 3D world coordinates to 2D screen coordinates.</p>\n<p>This function takes a 3D vector and converts its coordinates\nfrom the world space to screen space. This can be useful for placing\n2D elements in a 3D scene or for determining the screen position\nof 3D objects.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(150, 150);\n  let vertices = [\n    createVector(-20, -20),\n    createVector(20, -20),\n    createVector(20, 20),\n    createVector(-20, 20)\n  ];\n\n  push();\n  translate(75, 55);\n  rotate(PI / 4);\n\n  // Convert world coordinates to screen coordinates\n  let screenPos = vertices.map(v => worldToScreen(v));\n  pop();\n\n  background(200);\n\n  stroke(0);\n  fill(100, 150, 255, 100);\n  beginShape();\n  screenPos.forEach(pos => vertex(pos.x, pos.y));\n  endShape(CLOSE);\n\n  screenPos.forEach((pos, i) => {\n    fill(0);\n    textSize(10);\n    if (i === 0) {\n      text(i + 1, pos.x + 3, pos.y - 7);\n    } else if (i === 1) {\n      text(i + 1, pos.x + 7, pos.y + 2);\n    } else if (i === 2) {\n      text(i + 1, pos.x - 2, pos.y + 12);\n    } else if (i === 3) {\n      text(i + 1, pos.x - 12, pos.y - 2);\n    }\n  });\n\n  fill(0);\n  noStroke();\n  textSize(10);\n  let legendY = height - 35;\n  screenPos.forEach((pos, i) => {\n    text(`Vertex ${i + 1}: (${pos.x.toFixed(1)}, ${pos.y.toFixed(1)})`, 5, legendY + i * 10);\n  });\n\n  describe('A rotating square is transformed and drawn using screen coordinates.');\n\n}",
        "let vertices;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  vertices = [\n    createVector(-25, -25, -25),\n    createVector(25, -25, -25),\n    createVector(25, 25, -25),\n    createVector(-25, 25, -25),\n    createVector(-25, -25, 25),\n    createVector(25, -25, 25),\n    createVector(25, 25, 25),\n    createVector(-25, 25, 25)\n  ];\n\n  describe('A rotating cube with points mapped to 2D screen space and displayed as ellipses.');\n\n}\n\nfunction draw() {\n  background(200);\n\n  // Animate rotation\n  let rotationX = millis() / 1000;\n  let rotationY = millis() / 1200;\n\n  push();\n\n  rotateX(rotationX);\n  rotateY(rotationY);\n\n  // Convert world coordinates to screen coordinates\n  let screenPos = vertices.map(v => worldToScreen(v));\n\n  pop();\n\n  screenPos.forEach((pos, i) => {\n\n    let screenX = pos.x - width / 2;\n    let screenY = pos.y - height / 2;\n    fill(0);\n    noStroke();\n    ellipse(screenX, screenY, 3, 3);\n  });\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "The x coordinate in world space. (Or a vector for all three coordinates.)",
              "type": "Number|p5.Vector"
            },
            {
              "name": "y",
              "description": "The y coordinate in world space.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "The z coordinate in world space.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "A vector containing the 2D screen coordinates.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "A vector containing the 2D screen coordinates.",
        "type": "p5.Vector"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "createModel",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/loading.js",
      "line": 1175,
      "itemtype": "method",
      "description": "<p>Load a 3d model from an OBJ or STL string.</p>\n<p>OBJ and STL files lack a built-in sense of scale, causing models exported from different programs to vary in size.\nIf your model doesn't display correctly, consider using <code>loadModel()</code> with <code>normalize</code> set to <code>true</code> to standardize its size.\nFurther adjustments can be made using the <code>scale()</code> function.</p>\n<p>Also, the support for colored STL files is not present. STL files with color will be\nrendered without color properties.</p>\n<ul><li>Options can include:</li></ul><ul><li><code>modelString</code>: Specifies the plain text string of either an stl or obj file to be loaded.</li><li><code>fileType</code>: Defines the file extension of the model.</li><li><code>normalize</code>: Enables standardized size scaling during loading if set to true.</li><li><code>successCallback</code>: Callback for post-loading actions with the 3D model object.</li><li><code>failureCallback</code>: Handles errors if model loading fails, receiving an event error.</li><li><code>flipU</code>: Flips the U texture coordinates of the model.</li><li><code>flipV</code>: Flips the V texture coordinates of the model.</li></ul>",
      "example": [
        "const octahedron_model = `\nv 0.000000E+00 0.000000E+00 40.0000\nv 22.5000 22.5000 0.000000E+00\nv 22.5000 -22.5000 0.000000E+00\nv -22.5000 -22.5000 0.000000E+00\nv -22.5000 22.5000 0.000000E+00\nv 0.000000E+00 0.000000E+00 -40.0000\nf     1 2 3\nf     1 3 4\nf     1 4 5\nf     1 5 2\nf     6 5 4\nf     6 4 3\nf     6 3 2\nf     6 2 5\n`;\n//draw a spinning octahedron\nlet octahedron;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  octahedron = createModel(octahedron_model, '.obj');\n  describe('Vertically rotating 3D octahedron.');\n}\n\nfunction draw() {\n  background(200);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  model(octahedron);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "modelString",
              "description": "String of the object to be loaded",
              "type": "String"
            },
            {
              "name": "fileType",
              "description": "The file extension of the model\n(<code>.stl</code>, <code>.obj</code>).",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "normalize",
              "description": "If true, scale the model to a\nstandardized size when loading",
              "optional": 1,
              "type": "Boolean"
            },
            {
              "name": "successCallback",
              "description": "Function to be called\nonce the model is loaded. Will be passed\nthe 3D model object.",
              "optional": 1,
              "type": "function(p5.Geometry)"
            },
            {
              "name": "failureCallback",
              "description": "called with event error if\nthe model fails to load.",
              "optional": 1,
              "type": "function(Event)"
            }
          ],
          "return": {
            "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
            "type": "p5.Geometry"
          }
        },
        {
          "params": [
            {
              "name": "modelString",
              "description": "",
              "type": "String"
            },
            {
              "name": "fileType",
              "description": "",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "successCallback",
              "description": "",
              "optional": 1,
              "type": "function(p5.Geometry)"
            },
            {
              "name": "failureCallback",
              "description": "",
              "optional": 1,
              "type": "function(Event)"
            }
          ],
          "return": {
            "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
            "type": "p5.Geometry"
          }
        },
        {
          "params": [
            {
              "name": "modelString",
              "description": "",
              "type": "String"
            },
            {
              "name": "fileType",
              "description": "",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "options",
              "description": "",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
            "type": "p5.Geometry"
          }
        }
      ],
      "return": {
        "description": "the <a href=\"#/p5.Geometry\">p5.Geometry</a> object",
        "type": "p5.Geometry"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Models"
    },
    {
      "name": "vertexProperty",
      "file": "src/scripts/parsers/in/p5.js/src/shape/vertex.js",
      "line": 1188,
      "itemtype": "method",
      "description": "<p>Sets the shader's vertex property or attribute variables.</p>\n<p>A vertex property, or vertex attribute, is a variable belonging to a vertex in a shader. p5.js provides some\ndefault properties, such as <code>aPosition</code>, <code>aNormal</code>, <code>aVertexColor</code>, etc. These are\nset using <a href=\"#/p5/vertex\">vertex()</a>, <a href=\"#/p5/normal\">normal()</a>\nand <a href=\"#/p5/fill\">fill()</a> respectively. Custom properties can also\nbe defined within <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a>.</p>\n<p>The first parameter, <code>propertyName</code>, is a string with the property's name.\nThis is the same variable name which should be declared in the shader, such as\n<code>in vec3 aProperty</code>, similar to .<code>setUniform()</code>.</p>\n<p>The second parameter, <code>data</code>, is the value assigned to the shader variable. This\nvalue will be applied to subsequent vertices created with\n<a href=\"#/p5/vertex\">vertex()</a>. It can be a Number or an array of numbers,\nand in the shader program the type can be declared according to the WebGL\nspecification. Common types include <code>float</code>, <code>vec2</code>, <code>vec3</code>, <code>vec4</code> or matrices.</p>\n<p>See also the <a href=\"#/p5/vertexProperty\">vertexProperty()</a> method on\n<a href=\"#/p5/Geometry\">Geometry</a> objects.</p>\n",
      "example": [
        "const vertSrc = `#version 300 es\n precision mediump float;\n uniform mat4 uModelViewMatrix;\n uniform mat4 uProjectionMatrix;\n\n in vec3 aPosition;\n in vec2 aOffset;\n\n void main(){\n   vec4 positionVec4 = vec4(aPosition.xyz, 1.0);\n   positionVec4.xy += aOffset;\n   gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n`;\n\nconst fragSrc = `#version 300 es\n precision mediump float;\n out vec4 outColor;\n void main(){\n   outColor = vec4(0.0, 1.0, 1.0, 1.0);\n }\n`;\n\nfunction setup(){\n  createCanvas(100, 100, WEBGL);\n\n  // Create and use the custom shader.\n  const myShader = createShader(vertSrc, fragSrc);\n  shader(myShader);\n\n  describe('A wobbly, cyan circle on a gray background.');\n}\n\nfunction draw(){\n  // Set the styles\n  background(125);\n  noStroke();\n\n  // Draw the circle.\n  beginShape();\n  for (let i = 0; i < 30; i++){\n    const x = 40 * cos(i/30 * TWO_PI);\n    const y = 40 * sin(i/30 * TWO_PI);\n\n    // Apply some noise to the coordinates.\n    const xOff = 10 * noise(x + millis()/1000) - 5;\n    const yOff = 10 * noise(y + millis()/1000) - 5;\n\n    // Apply these noise values to the following vertex.\n    vertexProperty('aOffset', [xOff, yOff]);\n    vertex(x, y);\n  }\n  endShape(CLOSE);\n}",
        "let myShader;\nconst cols = 10;\nconst rows = 10;\nconst cellSize = 6;\n\nconst vertSrc = `#version 300 es\n  precision mediump float;\n  uniform mat4 uProjectionMatrix;\n  uniform mat4 uModelViewMatrix;\n\n  in vec3 aPosition;\n  in vec3 aNormal;\n  in vec3 aVertexColor;\n  in float aDistance;\n\n  out vec3 vVertexColor;\n\n  void main(){\n    vec4 positionVec4 = vec4(aPosition, 1.0);\n    positionVec4.xyz += aDistance * aNormal * 2.0;;\n    vVertexColor = aVertexColor;\n    gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n  }\n`;\n\nconst fragSrc = `#version 300 es\n  precision mediump float;\n\n  in vec3 vVertexColor;\n  out vec4 outColor;\n\n  void main(){\n    outColor = vec4(vVertexColor, 1.0);\n  }\n`;\n\nfunction setup(){\n  createCanvas(100, 100, WEBGL);\n\n  // Create and apply the custom shader.\n  myShader = createShader(vertSrc, fragSrc);\n  shader(myShader);\n  noStroke();\n  describe('A blue grid, which moves away from the mouse position, on a gray background.');\n}\n\nfunction draw(){\n  background(200);\n\n  // Draw the grid in the middle of the screen.\n  translate(-cols*cellSize/2, -rows*cellSize/2);\n  beginShape(QUADS);\n  for (let i = 0; i < cols; i++) {\n    for (let j = 0; j < rows; j++) {\n\n      // Calculate the cell position.\n      let x = i * cellSize;\n      let y = j * cellSize;\n\n      fill(j/rows*255, j/cols*255, 255);\n\n      // Calculate the distance from the corner of each cell to the mouse.\n      let distance = dist(x, y, mouseX, mouseY);\n\n      // Send the distance to the shader.\n      vertexProperty('aDistance', min(distance, 100));\n\n      vertex(x, y);\n      vertex(x + cellSize, y);\n      vertex(x + cellSize, y + cellSize);\n      vertex(x, y + cellSize);\n    }\n  }\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "attributeName",
              "description": "the name of the vertex attribute.",
              "type": "String"
            },
            {
              "name": "data",
              "description": "the data tied to the vertex attribute.",
              "type": "Number|Number[]"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "square",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 1191,
      "itemtype": "method",
      "description": "<p>Draws a square.</p>\n<p>A square is a four-sided shape defined by the <code>x</code>, <code>y</code>, and <code>s</code>\nparameters. <code>x</code> and <code>y</code> set the location of its top-left corner. <code>s</code> sets\nits width and height. Every angle in the square measures 90˚ and all its\nsides are the same length. See <a href=\"#/p5/rectMode\">rectMode()</a> for\nother ways to define squares.</p>\n<p>The version of <code>square()</code> with four parameters creates a rounded square.\nThe fourth parameter sets the radius for all four corners.</p>\n<p>The version of <code>square()</code> with seven parameters also creates a rounded\nsquare. Each of the last four parameters set the radius of a corner. The\nradii start with the top-left corner and move clockwise around the\nsquare. If any of these parameters are omitted, they are set to the\nvalue of the last radius that was set.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  square(30, 20, 55);\n\n  describe('A white square with a black outline in on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Give all corners a radius of 20.\n  square(30, 20, 55, 20);\n\n  describe(\n    'A white square with a black outline and round edges on a gray canvas.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Give each corner a unique radius.\n  square(30, 20, 55, 20, 15, 10, 5);\n\n  describe('A white square with a black outline and round edges of different radii.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  square(-20, -30, 55);\n\n  describe('A white square with a black outline in on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white square spins around on gray canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the square.\n  square(-20, -30, 55);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the square.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the square.",
              "type": "Number"
            },
            {
              "name": "s",
              "description": "side size of the square.",
              "type": "Number"
            },
            {
              "name": "tl",
              "description": "optional radius of top-left corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "tr",
              "description": "optional radius of top-right corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "br",
              "description": "optional radius of bottom-right corner.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bl",
              "description": "optional radius of bottom-left corner.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "screenToWorld",
      "file": "src/scripts/parsers/in/p5.js/src/core/environment.js",
      "line": 1209,
      "itemtype": "method",
      "description": "<p>Converts 2D screen coordinates to 3D world coordinates.</p>\n<p>This function takes a vector and converts its coordinates from coordinates\non the screen to coordinates in the currently drawn object. This can be\nuseful for determining the mouse position relative to a 2D or 3D object.</p>\n<p>If given, the Z component of the input coordinates is treated as \"depth\",\nor distance from the camera.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  describe('A rotating square with a line passing through the mouse drawn across it.');\n}\n\nfunction draw() {\n  background(220);\n\n  // Move to center and rotate\n  translate(width/2, height/2);\n  rotate(millis() / 1000);\n  rect(-30, -30, 60);\n\n  // Compute the location of the mouse in the coordinates of the square\n  let localMouse = screenToWorld(createVector(mouseX, mouseY));\n\n  // Draw a line parallel to the local Y axis, passing through the mouse\n  line(localMouse.x, -30, localMouse.x, 30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "The x coordinate in screen space. (Or a vector for all three coordinates.)",
              "type": "Number|p5.Vector"
            },
            {
              "name": "y",
              "description": "The y coordinate in screen space.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "The z coordinate in screen space.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "A vector containing the 3D world space coordinates.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "A vector containing the 3D world space coordinates.",
        "type": "p5.Vector"
      },
      "class": "p5",
      "static": false,
      "module": "Environment",
      "submodule": "Environment"
    },
    {
      "name": "mousePressed",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1227,
      "itemtype": "method",
      "description": "<p>A function that's called once when a mouse button is pressed.</p>\n<p>Declaring the function <code>mousePressed()</code> sets a code block to run\nautomatically when the user presses a mouse button:</p>\n<pre><code class=\"language-js\">function mousePressed() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mousePressed()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mousePressed() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mousePressed()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse press event:</p>\n<pre><code class=\"language-js\">function mousePressed(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>On touchscreen devices, <code>mousePressed()</code> will run when a user’s touch\nbegins.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n<p>Note: <code>mousePressed()</code>, <a href=\"#/p5/mouseReleased\">mouseReleased()</a>,\nand <a href=\"#/p5/mouseClicked\">mouseClicked()</a> are all related.\n<code>mousePressed()</code> runs as soon as the user clicks the mouse.\n<a href=\"#/p5/mouseReleased\">mouseReleased()</a> runs as soon as the user\nreleases the mouse click. <a href=\"#/p5/mouseClicked\">mouseClicked()</a>\nruns immediately after <a href=\"#/p5/mouseReleased\">mouseReleased()</a>.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square becomes lighter when the user presses a mouse button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\nfunction mousePressed() {\n  // Update the grayscale value.\n  value += 5;\n\n  // Reset the grayscale value.\n  if (value > 255) {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Style the circle.\n  fill('orange');\n  stroke('royalblue');\n  strokeWeight(10);\n\n  describe(\n    'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'\n  );\n}\n\nfunction draw() {\n  background(220);\n\n  // Draw the circle.\n  circle(50, 50, 20);\n}\n\n// Set the stroke color and weight as soon as the user clicks.\nfunction mousePressed() {\n  stroke('deeppink');\n  strokeWeight(3);\n}\n\n// Set the stroke and fill colors as soon as the user releases\n// the mouse.\nfunction mouseReleased() {\n  stroke('royalblue');\n\n  // This is never visible because fill() is called\n  // in mouseClicked() which runs immediately after\n  // mouseReleased();\n  fill('limegreen');\n}\n\n// Set the fill color and stroke weight after\n// mousePressed() and mouseReleased() are called.\nfunction mouseClicked() {\n  fill('orange');\n  strokeWeight(10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "strokeShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1229,
      "itemtype": "method",
      "description": "<p>Sets the <a href=\"#/p5.Shader\">p5.Shader</a> object to apply for strokes.</p>\n<p>This method applies the given shader to strokes, allowing customization of\nhow lines and outlines are drawn in 3D space. The shader will be used for\nstrokes until <a href=\"#/p5/resetShader\">resetShader()</a> is called or another\nstrokeShader is applied.</p>\n<p>The shader will be used for:</p>\n<ul><li>Strokes only, regardless of whether the uniform <code>uStrokeWeight</code> is present.</li></ul><p>To further customize its behavior, refer to the various hooks provided by\nthe <a href=\"#/p5/baseStrokeShader\">baseStrokeShader()</a> method, which allow\ncontrol over stroke weight, vertex positions, colors, and more.</p>\n",
      "example": [
        "let animatedStrokeShader;\n\nlet vertSrc = `\nprecision mediump int;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform bool uUseLineColor;\nuniform vec4 uMaterialColor;\n\nuniform vec4 uViewport;\nuniform int uPerspective;\nuniform int uStrokeJoin;\n\nattribute vec4 aPosition;\nattribute vec3 aTangentIn;\nattribute vec3 aTangentOut;\nattribute float aSide;\nattribute vec4 aVertexColor;\n\nvoid main() {\n  vec4 posp = uModelViewMatrix * aPosition;\n  vec4 posqIn = uModelViewMatrix * (aPosition + vec4(aTangentIn, 0));\n  vec4 posqOut = uModelViewMatrix * (aPosition + vec4(aTangentOut, 0));\n\n  float facingCamera = pow(\n    abs(normalize(posqIn-posp).z),\n    0.25\n  );\n\n  float scale = mix(1., 0.995, facingCamera);\n\n  posp.xyz = posp.xyz * scale;\n  posqIn.xyz = posqIn.xyz * scale;\n  posqOut.xyz = posqOut.xyz * scale;\n\n  vec4 p = uProjectionMatrix * posp;\n  vec4 qIn = uProjectionMatrix * posqIn;\n  vec4 qOut = uProjectionMatrix * posqOut;\n\n  vec2 tangentIn = normalize((qIn.xy*p.w - p.xy*qIn.w) * uViewport.zw);\n  vec2 tangentOut = normalize((qOut.xy*p.w - p.xy*qOut.w) * uViewport.zw);\n\n  vec2 curPerspScale;\n  if(uPerspective == 1) {\n    curPerspScale = (uProjectionMatrix * vec4(1, sign(uProjectionMatrix[1][1]), 0, 0)).xy;\n  } else {\n    curPerspScale = p.w / (0.5 * uViewport.zw);\n  }\n\n  vec2 offset;\n  vec2 tangent = aTangentIn == vec3(0.) ? tangentOut : tangentIn;\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  float normalOffset = sign(aSide);\n  float tangentOffset = abs(aSide) - 1.;\n  offset = (normal * normalOffset + tangent * tangentOffset) *\n    uStrokeWeight * 0.5;\n\n  gl_Position.xy = p.xy + offset.xy * curPerspScale;\n  gl_Position.zw = p.zw;\n}\n`;\n\nlet fragSrc = `\nprecision mediump float;\nuniform float uTime;\n\nvoid main() {\n  float wave = sin(gl_FragCoord.x * 0.1 + uTime) * 0.5 + 0.5;\n  gl_FragColor = vec4(wave, 0.5, 1.0, 1.0);  // Animated color based on time\n}\n`;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  animatedStrokeShader = createShader(vertSrc, fragSrc);\n  strokeShader(animatedStrokeShader);\n  strokeWeight(4);\n\n  describe('A hollow cube rotating continuously with its stroke colors changing dynamically over time against a static gray background.');\n}\n\nfunction draw() {\n  animatedStrokeShader.setUniform('uTime', millis() / 1000.0);\n  background(250);\n  rotateY(frameCount * 0.02);\n  noFill();\n  orbitControl();\n  box(50);\n}",
        "let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = baseStrokeShader().modify({\n    'float random': `(vec2 p) {\n      vec3 p3  = fract(vec3(p.xyx) * .1471);\n      p3 += dot(p3, p3.yzx + 32.33);\n      return fract((p3.x + p3.y) * p3.z);\n    }`,\n    'Inputs getPixelInputs': `(Inputs inputs) {\n      // Modify alpha with dithering effect\n      float a = inputs.color.a;\n      inputs.color.a = 1.0;\n      inputs.color *= random(inputs.position.xy) > a ? 0.0 : 1.0;\n      return inputs;\n    }`\n  });\n}\n\nfunction draw() {\n  background(255);\n  strokeShader(myShader);\n  strokeWeight(12);\n  beginShape();\n  for (let i = 0; i <= 50; i++) {\n    stroke(\n      map(i, 0, 50, 150, 255),\n      100 + 155 * sin(i / 5),\n      255 * map(i, 0, 50, 1, 0)\n    );\n    vertex(\n      map(i, 0, 50, 1, -1) * width / 3,\n      50 * cos(i / 10 + frameCount / 80)\n    );\n  }\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "s",
              "description": "<a href=\"#/p5.Shader\">p5.Shader</a> object\nto apply for strokes.",
              "type": "p5.Shader"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "brightness",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 1244,
      "itemtype": "method",
      "description": "<p>Gets the brightness value of a color.</p>\n<p><code>brightness()</code> extracts the HSB brightness value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>By default, <code>brightness()</code> returns a color's HSB brightness in the range 0\nto 100. If the <a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to HSB, it\nreturns the brightness value in the given range.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a p5.Color object.\n  let c = color(0, 50, 100);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'brightValue' to 100.\n  let brightValue = brightness(c);\n\n  // Draw the right rectangle.\n  fill(brightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a color array.\n  let c = [0, 50, 100];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'brightValue' to 100.\n  let brightValue = brightness(c);\n\n  // Draw the right rectangle.\n  fill(brightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // Create a CSS color string.\n  let c = 'rgb(255, 128, 128)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'brightValue' to 100.\n  let brightValue = brightness(c);\n\n  // Draw the right rectangle.\n  fill(brightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color with values in the range 0-255.\n  colorMode(HSB, 255);\n\n  // Create a p5.Color object.\n  let c = color(0, 127, 255);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'brightValue' to 255.\n  let brightValue = brightness(c);\n\n  // Draw the right rectangle.\n  fill(brightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is white.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the brightness value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the brightness value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "tint",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 1245,
      "itemtype": "method",
      "description": "<p>Tints images using a color.</p>\n<p>The version of <code>tint()</code> with one parameter interprets it one of four ways.\nIf the parameter is a number, it's interpreted as a grayscale value. If the\nparameter is a string, it's interpreted as a CSS color string. An array of\n<code>[R, G, B, A]</code> values or a <a href=\"#/p5.Color\">p5.Color</a> object can\nalso be used to set the tint color.</p>\n<p>The version of <code>tint()</code> with two parameters uses the first one as a\ngrayscale value and the second as an alpha value. For example, calling\n<code>tint(255, 128)</code> will make an image 50% transparent.</p>\n<p>The version of <code>tint()</code> with three parameters interprets them as RGB or\nHSB values, depending on the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. The optional fourth parameter\nsets the alpha value. For example, <code>tint(255, 0, 0, 100)</code> will give images\na red tint and make them transparent.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  // Left image.\n  image(img, 0, 0);\n\n  // Right image.\n  // Tint with a CSS color string.\n  tint('red');\n  image(img, 50, 0);\n\n  describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  // Left image.\n  image(img, 0, 0);\n\n  // Right image.\n  // Tint with RGB values.\n  tint(255, 0, 0);\n  image(img, 50, 0);\n\n  describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a red tint.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  // Left.\n  image(img, 0, 0);\n\n  // Right.\n  // Tint with RGBA values.\n  tint(255, 0, 0, 100);\n  image(img, 50, 0);\n\n  describe('Two images of an umbrella and a ceiling side-by-side. The image on the right has a transparent red tint.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  // Left.\n  image(img, 0, 0);\n\n  // Right.\n  // Tint with grayscale and alpha values.\n  tint(255, 180);\n  image(img, 50, 0);\n\n  describe('Two images of an umbrella and a ceiling side-by-side. The image on the right is transparent.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue or brightness.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "value",
              "description": "CSS color string.",
              "type": "String"
            }
          ]
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "values",
              "description": "array containing the red, green, blue &\nalpha components of the color.",
              "type": "Number[]"
            }
          ]
        },
        {
          "params": [
            {
              "name": "color",
              "description": "the tint color",
              "type": "p5.Color"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "spotLight",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 1271,
      "itemtype": "method",
      "description": "<p>Creates a light that shines from a point in one direction.</p>\n<p>Spot lights are like flashlights that shine in one direction creating a\ncone of light. The shape of the cone can be controlled using the angle and\nconcentration parameters. A maximum of 5 spot lights can be active at once.</p>\n<p>There are eight ways to call <code>spotLight()</code> with parameters to set the\nlight’s color, position, direction. For example,\n<code>spotLight(255, 0, 0, 0, 0, 0, 1, 0, 0)</code> creates a red <code>(255, 0, 0)</code> light\nat the origin <code>(0, 0, 0)</code> that points to the right <code>(1, 0, 0)</code>.</p>\n<p>The <code>angle</code> parameter is optional. It sets the radius of the light cone.\nFor example, <code>spotLight(255, 0, 0, 0, 0, 0, 1, 0, 0, PI / 16)</code> creates a\nred <code>(255, 0, 0)</code> light at the origin <code>(0, 0, 0)</code> that points to the right\n<code>(1, 0, 0)</code> with an angle of <code>PI / 16</code> radians. By default, <code>angle</code> is\n<code>PI / 3</code> radians.</p>\n<p>The <code>concentration</code> parameter is also optional. It focuses the light\ntowards the center of the light cone. For example,\n<code>spotLight(255, 0, 0, 0, 0, 0, 1, 0, 0, PI / 16, 50)</code> creates a red\n<code>(255, 0, 0)</code> light at the origin <code>(0, 0, 0)</code> that points to the right\n<code>(1, 0, 0)</code> with an angle of <code>PI / 16</code> radians at concentration of 50. By\ndefault, <code>concentration</code> is 100.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to adjust the spotlight.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere drawn on a gray background. A red spotlight starts shining when the user double-clicks.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Control the spotlight.\n  if (isLit === true) {\n    // Add a red spot light that shines into the screen.\n    // Set its angle to PI / 32 radians.\n    spotLight(255, 0, 0, 0, 0, 100, 0, 0, -1, PI / 32);\n  }\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Turn on the spotlight when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click to adjust the spotlight.\n\nlet isLit = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere drawn on a gray background. A red spotlight starts shining when the user double-clicks.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Control the spotlight.\n  if (isLit === true) {\n    // Add a red spot light that shines into the screen.\n    // Set its angle to PI / 3 radians (default).\n    // Set its concentration to 1000.\n    let c = color(255, 0, 0);\n    let position = createVector(0, 0, 100);\n    let direction = createVector(0, 0, -1);\n    spotLight(c, position, direction, PI / 3, 1000);\n  }\n\n  // Draw the sphere.\n  sphere(30);\n}\n\n// Turn on the spotlight when the user double-clicks.\nfunction doubleClicked() {\n  isLit = true;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "x-coordinate of the light.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the light.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the light.",
              "type": "Number"
            },
            {
              "name": "rx",
              "description": "x-component of light direction between -1 and 1.",
              "type": "Number"
            },
            {
              "name": "ry",
              "description": "y-component of light direction between -1 and 1.",
              "type": "Number"
            },
            {
              "name": "rz",
              "description": "z-component of light direction between -1 and 1.",
              "type": "Number"
            },
            {
              "name": "angle",
              "description": "angle of the light cone. Defaults to <code>PI / 3</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "concentration of the light. Defaults to 100.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or a CSS string.",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "position",
              "description": "position of the light as a <a href=\"#/p5.Vector\">p5.Vector</a> object.",
              "type": "p5.Vector"
            },
            {
              "name": "direction",
              "description": "direction of light as a <a href=\"#/p5.Vector\">p5.Vector</a> object.",
              "type": "p5.Vector"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "position",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "direction",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "direction",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "position",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "rx",
              "description": "",
              "type": "Number"
            },
            {
              "name": "ry",
              "description": "",
              "type": "Number"
            },
            {
              "name": "rz",
              "description": "",
              "type": "Number"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "direction",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "",
              "type": "Number"
            },
            {
              "name": "position",
              "description": "",
              "type": "p5.Vector"
            },
            {
              "name": "rx",
              "description": "",
              "type": "Number"
            },
            {
              "name": "ry",
              "description": "",
              "type": "Number"
            },
            {
              "name": "rz",
              "description": "",
              "type": "Number"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "color",
              "description": "",
              "type": "p5.Color|Number[]|String"
            },
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "rx",
              "description": "",
              "type": "Number"
            },
            {
              "name": "ry",
              "description": "",
              "type": "Number"
            },
            {
              "name": "rz",
              "description": "",
              "type": "Number"
            },
            {
              "name": "angle",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "concentration",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "createWriter",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1272,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.PrintWriter\">p5.PrintWriter</a> object.</p>\n<p><a href=\"#/p5.PrintWriter\">p5.PrintWriter</a> objects provide a way to\nsave a sequence of text data, called the print stream, to the user's\ncomputer. They're low-level objects that enable precise control of text\noutput. Functions such as\n<a href=\"#/p5/saveStrings\">saveStrings()</a> and\n<a href=\"#/p5/saveJSON\">saveJSON()</a> are easier to use for simple file\nsaving.</p>\n<p>The first parameter, <code>filename</code>, is the name of the file to be written. If\na string is passed, as in <code>createWriter('words.txt')</code>, a new\n<a href=\"#/p5.PrintWriter\">p5.PrintWriter</a> object will be created that\nwrites to a file named <code>words.txt</code>.</p>\n<p>The second parameter, <code>extension</code>, is optional. If a string is passed, as\nin <code>createWriter('words', 'csv')</code>, the first parameter will be interpreted\nas the file name and the second parameter as the extension.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create a p5.PrintWriter object.\n    let myWriter = createWriter('xo.txt');\n\n    // Add some lines to the print stream.\n    myWriter.print('XOO');\n    myWriter.print('OXO');\n    myWriter.print('OOX');\n\n    // Save the file and close the print stream.\n    myWriter.close();\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create a p5.PrintWriter object.\n    // Use the file format .csv.\n    let myWriter = createWriter('mauna_loa_co2', 'csv');\n\n    // Add some lines to the print stream.\n    myWriter.print('date,ppm_co2');\n    myWriter.print('1960-01-01,316.43');\n    myWriter.print('1970-01-01,325.06');\n    myWriter.print('1980-01-01,337.9');\n    myWriter.print('1990-01-01,353.86');\n    myWriter.print('2000-01-01,369.45');\n    myWriter.print('2020-01-01,413.61');\n\n    // Save the file and close the print stream.\n    myWriter.close();\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the file to create.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "format to use for the file.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "stream for writing data.",
            "type": "p5.PrintWriter"
          }
        }
      ],
      "return": {
        "description": "stream for writing data.",
        "type": "p5.PrintWriter"
      },
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "translate",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 1274,
      "itemtype": "method",
      "description": "<p>Translates the coordinate system.</p>\n<p>By default, the origin <code>(0, 0)</code> is at the sketch's top-left corner in 2D\nmode and center in WebGL mode. The <code>translate()</code> function shifts the origin\nto a different position. Everything drawn after <code>translate()</code> is called\nwill appear to be shifted. There are two ways to call <code>translate()</code> with\nparameters that set the origin's position.</p>\n<p>The first way to call <code>translate()</code> uses numbers to set the amount of\ntranslation. The first two parameters, <code>x</code> and <code>y</code>, set the amount to\ntranslate along the positive x- and y-axes. For example, calling\n<code>translate(20, 30)</code> translates the origin 20 pixels along the x-axis and 30\npixels along the y-axis. The third parameter, <code>z</code>, is optional. It sets the\namount to translate along the positive z-axis. For example, calling\n<code>translate(20, 30, 40)</code> translates the origin 20 pixels along the x-axis,\n30 pixels along the y-axis, and 40 pixels along the z-axis.</p>\n<p>The second way to call <code>translate()</code> uses a\n<a href=\"#/p5.Vector\">p5.Vector</a> object to set the amount of\ntranslation. For example, calling <code>translate(myVector)</code> uses the x-, y-,\nand z-components of <code>myVector</code> to set the amount to translate along the x-,\ny-, and z-axes. Doing so is the same as calling\n<code>translate(myVector.x, myVector.y, myVector.z)</code>.</p>\n<p>By default, transformations accumulate. For example, calling\n<code>translate(10, 0)</code> twice has the same effect as calling\n<code>translate(20, 0)</code> once. The <a href=\"#/p5/push\">push()</a> and\n<a href=\"#/p5/pop\">pop()</a> functions can be used to isolate\ntransformations within distinct drawing groups.</p>\n<p>Note: Transformations are reset at the beginning of the draw loop. Calling\n<code>translate(10, 0)</code> inside the <a href=\"#/p5/draw\">draw()</a> function won't\ncause shapes to move continuously.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw a circle at coordinates (0, 0).\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'Two circles drawn on a gray background. The blue circle on the right overlaps the red circle at the center.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Draw the red circle.\n  fill('red');\n  circle(0, 0, 40);\n\n  // Translate the origin to the right.\n  translate(25, 0);\n\n  // Draw the blue circle.\n  fill('blue');\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle moves slowly from left to right on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the x-coordinate.\n  let x = frameCount * 0.2;\n\n  // Translate the origin.\n  translate(x, 50);\n\n  // Draw a circle at coordinates (0, 0).\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A white circle on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a p5.Vector object.\n  let v = createVector(50, 50);\n\n  // Translate the origin by the vector.\n  translate(v);\n\n  // Draw a circle at coordinates (0, 0).\n  circle(0, 0, 40);\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Two spheres sitting side-by-side on gray background. The sphere at the center is red. The sphere on the right is blue.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Turn on the lights.\n  lights();\n\n  // Style the spheres.\n  noStroke();\n\n  // Draw the red sphere.\n  fill('red');\n  sphere(10);\n\n  // Translate the origin to the right.\n  translate(30, 0, 0);\n\n  // Draw the blue sphere.\n  fill('blue');\n  sphere(10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "amount to translate along the positive x-axis.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "amount to translate along the positive y-axis.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "amount to translate along the positive z-axis.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "vector",
              "description": "vector by which to translate.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "noTint",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 1280,
      "itemtype": "method",
      "description": "<p>Removes the current tint set by <a href=\"#/p5/tint\">tint()</a>.</p>\n<p><code>noTint()</code> restores images to their original colors.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100);\n\n  // Left.\n  // Tint with a CSS color string.\n  tint('red');\n  image(img, 0, 0);\n\n  // Right.\n  // Remove the tint.\n  noTint();\n  image(img, 50, 0);\n\n  describe('Two images of an umbrella and a ceiling side-by-side. The image on the left has a red tint.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "fill",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1287,
      "itemtype": "method",
      "description": "<p>Sets the color used to fill shapes.</p>\n<p>Calling <code>fill(255, 165, 0)</code> or <code>fill('orange')</code> means all shapes drawn\nafter the fill command will be filled with the color orange.</p>\n<p>The version of <code>fill()</code> with one parameter interprets the value one of\nthree ways. If the parameter is a <code>Number</code>, it's interpreted as a grayscale\nvalue. If the parameter is a <code>String</code>, it's interpreted as a CSS color\nstring. A <a href=\"#/p5.Color\">p5.Color</a> object can also be provided to\nset the fill color.</p>\n<p>The version of <code>fill()</code> with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current\n<a href=\"#/p5/colorMode\">colorMode()</a>. The default color space is RGB,\nwith each value in the range from 0 to 255.</p>\n<p>The version of <code>fill()</code> with four parameters interprets them as <code>RGBA</code>, <code>HSBA</code>,\nor <code>HSLA</code> colors, depending on the current <a href=\"#/p5/colorMode\">colorMode()</a>. The last parameter\nsets the alpha (transparency) value.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A grayscale value.\n  fill(51);\n  square(20, 20, 60);\n\n  describe('A dark charcoal gray square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // R, G & B values.\n  fill(255, 204, 0);\n  square(20, 20, 60);\n\n  describe('A yellow square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // R, G, B, and Alpha values.\n  fill(255, 0, 0, 128);\n  square(20, 20, 60);\n\n  describe('A semi-transparent red square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(100);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // H, S & B values.\n  fill(255, 204, 100);\n  square(20, 20, 60);\n\n  describe('A royal blue square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A CSS named color.\n  fill('red');\n  square(20, 20, 60);\n\n  describe('A red square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Three-digit hex RGB notation.\n  fill('#fae');\n  square(20, 20, 60);\n\n  describe('A pink square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Six-digit hex RGB notation.\n  fill('#A251FA');\n  square(20, 20, 60);\n\n  describe('A purple square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Integer RGB notation.\n  fill('rgb(0, 255, 0)');\n  square(20, 20, 60);\n\n  describe('A bright green square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Integer RGBA notation.\n  fill('rgba(0, 255, 0, 0.25)');\n  square(20, 20, 60);\n\n  describe('A soft green rectange with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Percentage RGB notation.\n  fill('rgb(100%, 0%, 10%)');\n  square(20, 20, 60);\n\n  describe('A red square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Percentage RGBA notation.\n  fill('rgba(100%, 0%, 100%, 0.5)');\n  square(20, 20, 60);\n\n  describe('A dark fuchsia square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A p5.Color object.\n  let c = color(0, 0, 255);\n  fill(c);\n  square(20, 20, 60);\n\n  describe('A blue square with a black outline.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red value if color mode is RGB or hue value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green value if color mode is RGB or saturation value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue value if color mode is RGB or brightness value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha value, controls transparency (0 - transparent, 255 - opaque).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "a color string.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "a grayscale value.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "values",
              "description": "an array containing the red, green, blue &\nand alpha components of the color.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "the fill color.",
              "type": "p5.Color"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "triangle",
      "file": "src/scripts/parsers/in/p5.js/src/shape/2d_primitives.js",
      "line": 1294,
      "itemtype": "method",
      "description": "<p>Draws a triangle.</p>\n<p>A triangle is a three-sided shape defined by three points. The\nfirst two parameters specify the triangle's first point <code>(x1, y1)</code>. The\nmiddle two parameters specify its second point <code>(x2, y2)</code>. And the last two\nparameters specify its third point <code>(x3, y3)</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  triangle(30, 75, 58, 20, 86, 75);\n\n  describe('A white triangle with a black outline on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  triangle(-20, 25, 8, -30, 36, 25);\n\n  describe('A white triangle with a black outline on a gray canvas.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white triangle spins around on a gray canvas.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Draw the triangle.\n  triangle(-20, 25, 8, -30, 36, 25);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x1",
              "description": "x-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "y1",
              "description": "y-coordinate of the first point.",
              "type": "Number"
            },
            {
              "name": "x2",
              "description": "x-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "y2",
              "description": "y-coordinate of the second point.",
              "type": "Number"
            },
            {
              "name": "x3",
              "description": "x-coordinate of the third point.",
              "type": "Number"
            },
            {
              "name": "y3",
              "description": "y-coordinate of the third point.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "2D Primitives"
    },
    {
      "name": "text",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Draws text to the canvas.</p>\n<p>The first parameter, <code>str</code>, is the text to be drawn. The second and third\nparameters, <code>x</code> and <code>y</code>, set the coordinates of the text's bottom-left\ncorner. See <a href=\"#/p5/textAlign\">textAlign()</a> for other ways to\nalign text.</p>\n<p>The fourth and fifth parameters, <code>maxWidth</code> and <code>maxHeight</code>, are optional.\nThey set the dimensions of the invisible rectangle containing the text. By\ndefault, they set its  maximum width and height. See\n<a href=\"#/p5/rectMode\">rectMode()</a> for other ways to define the\nrectangular text box. Text will wrap to fit within the text box. Text\noutside of the box won't be drawn.</p>\n<p>Text can be styled a few ways. Call the <a href=\"#/p5/fill\">fill()</a>\nfunction to set the text's fill color. Call\n<a href=\"#/p5/stroke\">stroke()</a> and\n<a href=\"#/p5/strokeWeight\">strokeWeight()</a> to set the text's outline.\nCall <a href=\"#/p5/textSize\">textSize()</a> and\n<a href=\"#/p5/textFont\">textFont()</a> to set the text's size and font,\nrespectively.</p>\n<p>Note: <code>WEBGL</code> mode only supports fonts loaded with\n<a href=\"#/p5/loadFont\">loadFont()</a>. Calling\n<a href=\"#/p5/stroke\">stroke()</a> has no effect in <code>WEBGL</code> mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n  text('hi', 50, 50);\n\n  describe('The text \"hi\" written in black in the middle of a gray square.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background('skyblue');\n  textSize(100);\n  text('🌈', 0, 100);\n\n  describe('A rainbow in a blue sky.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  textSize(32);\n  fill(255);\n  stroke(0);\n  strokeWeight(4);\n  text('hi', 50, 50);\n\n  describe('The text \"hi\" written in white with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background('black');\n  textSize(22);\n  fill('yellow');\n  text('rainbows', 6, 20);\n  fill('cornflowerblue');\n  text('rainbows', 6, 45);\n  fill('tomato');\n  text('rainbows', 6, 70);\n  fill('limegreen');\n  text('rainbows', 6, 95);\n\n  describe('The text \"rainbows\" written on several lines, each in a different color.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n  let s = 'The quick brown fox jumps over the lazy dog.';\n  text(s, 10, 10, 70, 80);\n\n  describe('The sample text \"The quick brown fox...\" written in black across several lines.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n  rectMode(CENTER);\n  let s = 'The quick brown fox jumps over the lazy dog.';\n  text(s, 50, 50, 70, 80);\n\n  describe('The sample text \"The quick brown fox...\" written in black across several lines.');\n}",
        "let font;\n\nasync function setup() {\n  createCanvas(100, 100, WEBGL);\n  font = await loadFont('assets/inconsolata.otf');\n  textFont(font);\n  textSize(32);\n  textAlign(CENTER, CENTER);\n}\n\nfunction draw() {\n  background(200);\n  rotateY(frameCount / 30);\n  text('p5*js', 0, 0);\n\n  describe('The text \"p5*js\" written in white and spinning in 3D.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "text to be displayed.",
              "type": "String|Object|Array|Number|Boolean"
            },
            {
              "name": "x",
              "description": "x-coordinate of the text box.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the text box.",
              "type": "Number"
            },
            {
              "name": "maxWidth",
              "description": "maximum width of the text box. See\n<a href=\"#/p5/rectMode\">rectMode()</a> for\nother options.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "maxHeight",
              "description": "maximum height of the text box. See\n<a href=\"#/p5/rectMode\">rectMode()</a> for\nother options.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textAlign",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets the way text is aligned when <a href=\"#/p5/text\">text()</a> is called.</p>\n<p>By default, calling <code>text('hi', 10, 20)</code> places the bottom-left corner of\nthe text's bounding box at (10, 20).</p>\n<p>The first parameter, <code>horizAlign</code>, changes the way\n<a href=\"#/p5/text\">text()</a> interprets x-coordinates. By default, the\nx-coordinate sets the left edge of the bounding box. <code>textAlign()</code> accepts\nthe following values for <code>horizAlign</code>: <code>LEFT</code>, <code>CENTER</code>, or <code>RIGHT</code>.</p>\n<p>The second parameter, <code>vertAlign</code>, is optional. It changes the way\n<a href=\"#/p5/text\">text()</a> interprets y-coordinates. By default, the\ny-coordinate sets the bottom edge of the bounding box. <code>textAlign()</code>\naccepts the following values for <code>vertAlign</code>: <code>TOP</code>, <code>BOTTOM</code>, <code>CENTER</code>,\nor <code>BASELINE</code>.</p>\n<p>Calling <code>textAlign()</code> without arguments returns the current alignment settings.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw a vertical line.\n  strokeWeight(0.5);\n  line(50, 0, 50, 100);\n\n  // Top line.\n  textSize(16);\n  textAlign(RIGHT);\n  text('ABCD', 50, 30);\n\n  // Middle line.\n  textAlign(CENTER);\n  text('EFGH', 50, 50);\n\n  // Bottom line.\n  textAlign(LEFT);\n  text('IJKL', 50, 70);\n\n  describe('The letters ABCD displayed at top-left, EFGH at center, and IJKL at bottom-right. A vertical line divides the canvas in half.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  strokeWeight(0.5);\n\n  // First line.\n  line(0, 12, width, 12);\n  textAlign(CENTER, TOP);\n  text('TOP', 50, 12);\n\n  // Second line.\n  line(0, 37, width, 37);\n  textAlign(CENTER, CENTER);\n  text('CENTER', 50, 37);\n\n  // Third line.\n  line(0, 62, width, 62);\n  textAlign(CENTER, BASELINE);\n  text('BASELINE', 50, 62);\n\n  // Fourth line.\n  line(0, 97, width, 97);\n  textAlign(CENTER, BOTTOM);\n  text('BOTTOM', 50, 97);\n\n  describe('The words \"TOP\", \"CENTER\", \"BASELINE\", and \"BOTTOM\" each drawn relative to a horizontal line. Their positions demonstrate different vertical alignments.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "horizAlign",
              "description": "horizontal alignment",
              "optional": 1,
              "type": "LEFT|CENTER|RIGHT"
            },
            {
              "name": "vertAlign",
              "description": "vertical alignment",
              "optional": 1,
              "type": "TOP|BOTTOM|CENTER|BASELINE"
            }
          ],
          "return": {
            "description": "If no arguments are provided, returns an object with current horizontal and vertical alignment",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, returns an object with current horizontal and vertical alignment",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textAscent",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Returns the ascent of the text.</p>\n<p>The <code>textAscent()</code> function calculates the distance from the baseline to the\nhighest point of the current font. This value represents the ascent, which is essential\nfor determining the overall height of the text along with <code>textDescent()</code>. If\na text string is provided as an argument, the ascent is calculated based on that specific\nstring; otherwise, the ascent of the current font is returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(400, 300);\n  background(220);\n\n  textSize(48);\n  textAlign(LEFT, BASELINE);\n  textFont('Georgia');\n\n  let s = \"Hello, p5.js!\";\n  let x = 50, y = 150;\n\n  fill(0);\n  text(s, x, y);\n\n  // Get the ascent of the current font\n  let asc = textAscent();\n\n  // Draw a red line at the baseline and a blue line at the ascent position\n  stroke('red');\n  line(x, y, x + 200, y); // Baseline\n  stroke('blue');\n  line(x, y - asc, x + 200, y - asc); // Ascent (top of text)\n\n  noStroke();\n  fill(0);\n  textSize(16);\n  text(\"textAscent: \" + asc.toFixed(2) + \" pixels\", x, y - asc - 10);\n}",
        "let font;\n\nasync function setup()  {\n  font = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textFont(font);\n\n  // Different for each font.\n  let fontScale = 0.8;\n\n  let baseY = 75;\n  strokeWeight(0.5);\n\n  // Draw small text.\n  textSize(24);\n  text('dp', 0, baseY);\n\n  // Draw baseline and ascent.\n  let a = textAscent() * fontScale;\n  line(0, baseY, 23, baseY);\n  line(23, baseY - a, 23, baseY);\n\n  // Draw large text.\n  textSize(48);\n  text('dp', 45, baseY);\n\n  // Draw baseline and ascent.\n  a = textAscent() * fontScale;\n  line(45, baseY, 91, baseY);\n  line(91, baseY - a, 91, baseY);\n\n  describe('The letters \"dp\" written twice in different sizes. Each version has a horizontal baseline. A vertical line extends upward from each baseline to the top of the \"d\".');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "txt",
              "description": "(Optional) The text string for which to calculate the ascent.\nIf omitted, the function returns the ascent for the current font.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "The ascent value in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The ascent value in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textDescent",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Returns the descent of the text.</p>\n<p>The <code>textDescent()</code> function calculates the distance from the baseline to the\nlowest point of the current font. This value represents the descent, which, when combined\nwith the ascent (from <code>textAscent()</code>), determines the overall vertical span of the text.\nIf a text string is provided as an argument, the descent is calculated based on that specific string;\notherwise, the descent of the current font is returned.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(400, 300);\n  background(220);\n\n  textSize(48);\n  textAlign(LEFT, BASELINE);\n  textFont('Georgia');\n\n  let s = \"Hello, p5.js!\";\n  let x = 50, y = 150;\n\n  fill(0);\n  text(s, x, y);\n\n  // Get the descent of the current font\n  let desc = textDescent();\n\n  // Draw a red line at the baseline and a blue line at the bottom of the text\n  stroke('red');\n  line(x, y, x + 200, y); // Baseline\n  stroke('blue');\n  line(x, y + desc, x + 200, y + desc); // Descent (bottom of text)\n\n  noStroke();\n  fill(0);\n  textSize(16);\n  text(\"textDescent: \" + desc.toFixed(2) + \" pixels\", x, y + desc + 20);\n}",
        "let font;\n\nasync function setup()  {\n  font = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the font.\n  textFont(font);\n\n  // Different for each font.\n  let fontScale = 0.9;\n\n  let baseY = 75;\n  strokeWeight(0.5);\n\n  // Draw small text.\n  textSize(24);\n  text('dp', 0, baseY);\n\n  // Draw baseline and descent.\n  let d = textDescent() * fontScale;\n  line(0, baseY, 23, baseY);\n  line(23, baseY, 23, baseY + d);\n\n  // Draw large text.\n  textSize(48);\n  text('dp', 45, baseY);\n\n  // Draw baseline and descent.\n  d = textDescent() * fontScale;\n  line(45, baseY, 91, baseY);\n  line(91, baseY, 91, baseY + d);\n\n  describe('The letters \"dp\" written twice in different sizes. Each version has a horizontal baseline. A vertical line extends downward from each baseline to the bottom of the \"p\".');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "txt",
              "description": "(Optional) The text string for which to calculate the descent.\nIf omitted, the function returns the descent for the current font.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "The descent value in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The descent value in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textLeading",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets the spacing between lines of text when\n<a href=\"#/p5/text\">text()</a> is called.</p>\n<p>Note: Spacing is measured in pixels.</p>\n<p>Calling <code>textLeading()</code> without an argument returns the current spacing.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // \"\\n\" starts a new line of text.\n  let lines = 'one\\ntwo';\n\n  // Left.\n  text(lines, 10, 25);\n\n  // Right.\n  textLeading(30);\n  text(lines, 70, 25);\n\n  describe('The words \"one\" and \"two\" written on separate lines twice. The words on the left have less vertical spacing than the words on the right.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "leading",
              "description": "The new text leading to apply, in pixels",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current text leading",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current text leading",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textFont",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets the font used by the <a href=\"#/p5/text\">text()</a> function.</p>\n<p>The first parameter, <code>font</code>, sets the font. <code>textFont()</code> recognizes either\na <a href=\"#/p5.Font\">p5.Font</a> object or a string with the name of a\nsystem font. For example, <code>'Courier New'</code>.</p>\n<p>The second parameter, <code>size</code>, is optional. It sets the font size in pixels.\nThis has the same effect as calling <a href=\"#/p5/textSize\">textSize()</a>.</p>\n<p>Calling <code>textFont()</code> without arguments returns the current font.</p>\n<p>Note: <code>WEBGL</code> mode only supports fonts loaded with\n<a href=\"#/p5/loadFont\">loadFont()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n  textFont('Courier New');\n  textSize(24);\n  text('hi', 35, 55);\n\n  describe('The text \"hi\" written in a black, monospace font on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background('black');\n  fill('palegreen');\n  textFont('Courier New', 10);\n  text('You turn to the left and see a door. Do you enter?', 5, 5, 90, 90);\n  text('>', 5, 70);\n\n  describe('A text prompt from a game is written in a green, monospace font on a black background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(200);\n  textFont('Verdana');\n  let currentFont = textFont();\n  text(currentFont, 25, 50);\n\n  describe('The text \"Verdana\" written in a black, sans-serif font on a gray background.');\n}",
        "let fontRegular;\nlet fontItalic;\nlet fontBold;\n\nasync function setup() {\n  createCanvas(100, 100);\n  fontRegular = await loadFont('assets/Regular.otf');\n  fontItalic = await loadFont('assets/Italic.ttf');\n  fontBold = await loadFont('assets/Bold.ttf');\n\n  background(200);\n  textFont(fontRegular);\n  text('I am Normal', 10, 30);\n  textFont(fontItalic);\n  text('I am Italic', 10, 50);\n  textFont(fontBold);\n  text('I am Bold', 10, 70);\n\n  describe('The statements \"I am Normal\", \"I am Italic\", and \"I am Bold\" written in black on separate lines. The statements have normal, italic, and bold fonts, respectively.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "font",
              "description": "The font to apply",
              "optional": 1,
              "type": "p5.Font|String|Object"
            },
            {
              "name": "size",
              "description": "An optional text size to apply.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "If no arguments are provided, returns the current font",
            "type": "String|p5.Font"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, returns the current font",
        "type": "String|p5.Font"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textSize",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets or gets the current text size.</p>\n<p>The <code>textSize()</code> function is used to specify the size of the text\nthat will be rendered on the canvas. When called with an argument, it sets the\ntext size to the specified value (which can be a number representing pixels or a\nCSS-style string, e.g., '32px', '2em'). When called without an argument, it\nreturns the current text size in pixels.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(600, 200);\n  background(240);\n\n  // Set the text size to 48 pixels\n  textSize(48);\n  textAlign(CENTER, CENTER);\n  textFont(\"Georgia\");\n\n  // Draw text using the current text size\n  fill(0);\n  text(\"Hello, p5.js!\", width / 2, height / 2);\n\n  // Retrieve and display the current text size\n  let currentSize = textSize();\n  fill(50);\n  textSize(16);\n  text(\"Current text size: \" + currentSize, width / 2, height - 20);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top.\n  textSize(12);\n  text('Font Size 12', 10, 30);\n\n  // Middle.\n  textSize(14);\n  text('Font Size 14', 10, 60);\n\n  // Bottom.\n  textSize(16);\n  text('Font Size 16', 10, 90);\n\n  describe('The text \"Font Size 12\" drawn small, \"Font Size 14\" drawn medium, and \"Font Size 16\" drawn large.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "size",
              "description": "The size to set for the text.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current text size in pixels.",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "The current text size in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current text size in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textStyle",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets the style for system fonts when\n<a href=\"#/p5/text\">text()</a> is called.</p>\n<p>The parameter, <code>style</code>, can be either <code>NORMAL</code>, <code>ITALIC</code>, <code>BOLD</code>, or\n<code>BOLDITALIC</code>.</p>\n<p><code>textStyle()</code> may be overridden by CSS styling. This function doesn't\naffect fonts loaded with <a href=\"#/p5/loadFont\">loadFont()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(12);\n  textAlign(CENTER);\n\n  // First row.\n  textStyle(NORMAL);\n  text('Normal', 50, 15);\n\n  // Second row.\n  textStyle(ITALIC);\n  text('Italic', 50, 40);\n\n  // Third row.\n  textStyle(BOLD);\n  text('Bold', 50, 65);\n\n  // Fourth row.\n  textStyle(BOLDITALIC);\n  text('Bold Italic', 50, 90);\n\n  describe('The words \"Normal\" displayed normally, \"Italic\" in italic, \"Bold\" in bold, and \"Bold Italic\" in bold italics.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "style",
              "description": "The style to use",
              "type": "NORMAL|ITALIC|BOLD|BOLDITALIC"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current style",
            "type": "NORMAL|ITALIC|BOLD|BOLDITALIC"
          }
        },
        {
          "params": [],
          "return": {
            "description": "",
            "type": "NORMAL|BOLD|ITALIC|BOLDITALIC"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current style",
        "type": "NORMAL|ITALIC|BOLD|BOLDITALIC"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textWidth",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Calculates the width of the given text string in pixels.</p>\n<p>The <code>textWidth()</code> function processes the provided text string to determine its tight bounding box\nbased on the current text properties such as font, textSize, and textStyle. Internally, it splits\nthe text into individual lines (if line breaks are present) and computes the bounding box for each\nline using the renderer’s measurement functions. The final width is determined as the maximum width\namong all these lines.</p>\n<p>For example, if the text contains multiple lines due to wrapping or explicit line breaks, textWidth()\nwill return the width of the longest line.</p>\n<p>Note: In p5.js 2.0+, leading and trailing spaces are ignored.\n<code>textWidth(\"  Hello  \")</code> returns the same width as <code>textWidth(\"Hello\")</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(200, 200);\n  background(220);\n\n  // Set text size and alignment\n  textSize(48);\n  textAlign(LEFT, TOP);\n\n  let myText = \"Hello\";\n\n  // Calculate the width of the text\n  let tw = textWidth(myText);\n\n  // Draw the text on the canvas\n  fill(0);\n  text(myText, 50, 50);\n\n  // Display the text width below\n  noStroke();\n  fill(0);\n  textSize(20);\n  text(\"Text width: \" + tw, 10, 150);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(28);\n  strokeWeight(0.5);\n\n  // Calculate the text width.\n  let s = 'yoyo';\n  let w = textWidth(s);\n\n  // Display the text.\n  text(s, 22, 55);\n\n  // Underline the text.\n  line(22, 55, 22 + w, 55);\n\n  describe('The word \"yoyo\" underlined.');\n}",
        "function setup() {\n  createCanvas(200, 160);\n  background(235);\n  noLoop();\n\n  textSize(18);\n  textAlign(LEFT, TOP);\n\n  const x = 12, h = 24;\n  const s1 = 'Hello';\n  const s2 = 'Hello  ';      // 2 trailing spaces\n  const s3 = 'Hello     ';   // many trailing spaces\n\n  // draw text\n  fill(0);\n  text(s1, x, 12);\n  text(s2, x, 56);\n  text(s3, x, 100);\n\n  // measure and draw tight boxes (all same width)\n  noFill(); stroke(255, 0, 0);\n  const w1 = textWidth(s1);\n  const w2 = textWidth(s2);\n  const w3 = textWidth(s3);\n  rect(x, 10,  w1, h);\n  rect(x, 54, w2, h);\n  rect(x, 98, w3, h);\n\n  // small captions show the actual strings (spaces as ·)\n  textSize(10); noStroke(); fill(30);\n  text('\"' + s1.replace(/ /g, '·') + '\"  w=' + w1.toFixed(1), x, 10 + h + 2);\n  text('\"' + s2.replace(/ /g, '·') + '\"  w=' + w2.toFixed(1), x, 54 + h + 2);\n  text('\"' + s3.replace(/ /g, '·') + '\"  w=' + w3.toFixed(1), x, 98 + h + 2);\n\n  describe('Three lines: Hello with 0, 2, and many trailing spaces. Red boxes use textWidth and are identical. Captions show spaces as dots.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(28);\n  strokeWeight(0.5);\n\n  // Calculate the text width.\n  // \"\\n\" starts a new line.\n  let s = 'yo\\nyo';\n  let w = textWidth(s);\n\n  // Display the text.\n  text(s, 22, 55);\n\n  // Underline the text.\n  line(22, 55, 22 + w, 55);\n\n  describe('The word \"yo\" written twice, one copy beneath the other. The words are divided by a horizontal line.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "text",
              "description": "The text to measure",
              "type": "String"
            }
          ],
          "return": {
            "description": "The width of the text",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The width of the text",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textWrap",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets the style for wrapping text when\n<a href=\"#/p5/text\">text()</a> is called.</p>\n<p>The parameter, <code>style</code>, can be one of the following values:</p>\n<p><code>WORD</code> starts new lines of text at spaces. If a string of text doesn't\nhave spaces, it may overflow the text box and the canvas. This is the\ndefault style.</p>\n<p><code>CHAR</code> starts new lines as needed to stay within the text box.</p>\n<p><code>textWrap()</code> only works when the maximum width is set for a text box. For\nexample, calling <code>text('Have a wonderful day', 0, 10, 100)</code> sets the\nmaximum width to 100 pixels.</p>\n<p>Calling <code>textWrap()</code> without an argument returns the current style.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(20);\n  textWrap(WORD);\n\n  // Display the text.\n  text('Have a wonderful day', 0, 10, 100);\n\n  describe('The text \"Have a wonderful day\" written across three lines.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(20);\n  textWrap(CHAR);\n\n  // Display the text.\n  text('Have a wonderful day', 0, 10, 100);\n\n  describe('The text \"Have a wonderful day\" written across two lines.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textSize(20);\n  textWrap(CHAR);\n\n  // Display the text.\n  text('祝你有美好的一天', 0, 10, 100);\n\n  describe('The text \"祝你有美好的一天\" written across two lines.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "style",
              "description": "The wrapping style to use",
              "type": "WORD|CHAR"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current wrapping style",
            "type": "CHAR|WORD"
          }
        },
        {
          "params": [],
          "return": {
            "description": "The current wrapping style",
            "type": "CHAR|WORD"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current wrapping style",
        "type": "CHAR|WORD"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textBounds",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Computes the tight bounding box for a block of text.</p>\n<p>The <code>textBounds()</code> function calculates the precise pixel boundaries that enclose\nthe rendered text based on the current text properties (such as font, textSize, textStyle, and\nalignment). If the text spans multiple lines (due to line breaks or wrapping), the function\nmeasures each line individually and then aggregates these measurements into a single bounding box.\nThe resulting object contains the x and y coordinates along with the width (w) and height (h)\nof the text block.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 200);\n  background(220);\n\n  // Set up text properties for clarity\n  textSize(32);\n  textAlign(LEFT, TOP);\n\n  let txt = \"Hello, World!\";\n  // Compute the bounding box for the text starting at (50, 50)\n  let bounds = textBounds(txt, 50, 50);\n\n  // Draw the text\n  fill(0);\n  text(txt, 50, 50);\n\n  // Draw the computed bounding box in red to visualize the measured area\n  noFill();\n  stroke('red');\n  rect(bounds.x, bounds.y, bounds.w, bounds.h);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "The text string to measure.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "The x-coordinate where the text is drawn.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "The y-coordinate where the text is drawn.",
              "type": "Number"
            },
            {
              "name": "width",
              "description": "(Optional) The maximum width available for the text block.\nWhen specified, the text may be wrapped to fit within this width.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "(Optional) The maximum height available for the text block.\nAny lines exceeding this height will be truncated.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "An object with properties <code>x</code>, <code>y</code>, <code>w</code>, and <code>h</code> that represent the tight\nbounding box of the rendered text.",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "An object with properties <code>x</code>, <code>y</code>, <code>w</code>, and <code>h</code> that represent the tight\nbounding box of the rendered text.",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textDirection",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets or gets the text drawing direction.</p>\n<p>The <code>textDirection()</code> function allows you to specify the direction in which text is\nrendered on the canvas. When provided with a <code>direction</code> parameter (such as \"ltr\" for\nleft-to-right, \"rtl\" for right-to-left, or \"inherit\"), it updates the renderer's state with that\nvalue and applies the new setting. When called without any arguments, it returns the current text\ndirection. This function is particularly useful for rendering text in languages with different\nwriting directions.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 300);\n  background(240);\n\n  textSize(32);\n  textFont(\"Georgia\");\n  textAlign(LEFT, TOP);\n\n  // Set text direction to right-to-left and draw Arabic text.\n  textDirection(\"rtl\");\n  fill(0);\n  text(\"مرحبًا!\", 50, 50);\n\n  // Set text direction to left-to-right and draw English text.\n  textDirection(\"ltr\");\n  text(\"Hello, p5.js!\", 50, 150);\n\n  // Display the current text direction.\n  textSize(16);\n  fill(50);\n  textAlign(LEFT, TOP);\n  text(\"Current textDirection: \" + textDirection(), 50, 250);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "direction",
              "description": "The text direction to set (\"ltr\", \"rtl\", or \"inherit\").",
              "type": "String"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current text direction, either \"ltr\", \"rtl\", or \"inherit\"",
            "type": "String"
          }
        },
        {
          "params": [],
          "return": {
            "description": "The current text direction, either \"ltr\", \"rtl\", or \"inherit\"",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current text direction, either \"ltr\", \"rtl\", or \"inherit\"",
        "type": "String"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textProperty",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets or gets a single text property for the renderer.</p>\n<p>The <code>textProperty()</code> function allows you to set or retrieve a single text-related property,\nsuch as <code>textAlign</code>, <code>textBaseline</code>, <code>fontStyle</code>, or any other property\nthat may be part of the renderer's state, its drawing context, or the canvas style.</p>\n<p>When called with a <code>prop</code> and a <code>value</code>, the function sets the property by checking\nfor its existence in the renderer's state, the drawing context, or the canvas style. If the property is\nsuccessfully modified, the function applies the updated text properties. If called with only the\n<code>prop</code> parameter, the function returns the current value of that property.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 300);\n  background(240);\n\n  // Set the text alignment to CENTER and the baseline to TOP using textProperty.\n  textProperty(\"textAlign\", CENTER);\n  textProperty(\"textBaseline\", TOP);\n\n  // Set additional text properties and draw the text.\n  textSize(32);\n  textFont(\"Georgia\");\n  fill(0);\n  text(\"Hello, World!\", width / 2, 50);\n\n  // Retrieve and display the current text properties.\n  let currentAlign = textProperty(\"textAlign\");\n  let currentBaseline = textProperty(\"textBaseline\");\n\n  textSize(16);\n  textAlign(LEFT, TOP);\n  fill(50);\n  text(\"Current textAlign: \" + currentAlign, 50, 150);\n  text(\"Current textBaseline: \" + currentBaseline, 50, 170);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "prop",
              "description": "The name of the text property to set or get.",
              "type": "String"
            },
            {
              "name": "value",
              "description": "The value to set for the specified text property. If omitted, the current\nvalue of the property is returned"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current value of the specified text property"
          }
        },
        {
          "params": [
            {
              "name": "prop",
              "description": "The name of the text property to set or get.",
              "type": "String"
            }
          ],
          "return": {
            "description": "The current value of the specified text property"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current value of the specified text property"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textProperties",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Gets or sets text properties in batch, similar to calling <code>textProperty()</code>\nmultiple times.</p>\n<p>If an object is passed in, <code>textProperty(key, value)</code> will be called for you\non every key/value pair in the object.</p>\n<p>If no arguments are passed in, an object will be returned with all the current\nproperties.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "properties",
              "description": "An object whose keys are properties to set, and whose\nvalues are what they should be set to.",
              "type": "Object"
            }
          ]
        },
        {
          "params": [],
          "return": {
            "description": "An object with all the possible properties and their current values.",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "An object with all the possible properties and their current values.",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "fontBounds",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Computes a generic (non-tight) bounding box for a block of text.</p>\n<p>The <code>fontBounds()</code> function calculates the bounding box for the text based on the\nfont's intrinsic metrics (such as <code>fontBoundingBoxAscent</code> and\n<code>fontBoundingBoxDescent</code>). Unlike <code>textBounds()</code>, which measures the exact\npixel boundaries of the rendered text, <code>fontBounds()</code> provides a looser measurement\nderived from the font’s default spacing. This measurement is useful for layout purposes where\na consistent approximation of the text's dimensions is desired.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 200);\n  background(240);\n\n  textSize(32);\n  textAlign(LEFT, TOP);\n  textFont('Georgia');\n\n  let txt = \"Hello, World!\";\n  // Compute the bounding box based on the font's intrinsic metrics\n  let bounds = fontBounds(txt, 50, 50);\n\n  fill(0);\n  text(txt, 50, 50);\n\n  noFill();\n  stroke('green');\n  rect(bounds.x, bounds.y, bounds.w, bounds.h);\n\n  noStroke();\n  fill(50);\n  textSize(15);\n  text(\"Font Bounds: x=\" + bounds.x.toFixed(1) + \", y=\" + bounds.y.toFixed(1) +\n       \", w=\" + bounds.w.toFixed(1) + \", h=\" + bounds.h.toFixed(1), 8, 100);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "The text string to measure.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "The x-coordinate where the text is drawn.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "The y-coordinate where the text is drawn.",
              "type": "Number"
            },
            {
              "name": "width",
              "description": "(Optional) The maximum width available for the text block.\nWhen specified, the text may be wrapped to fit within this width.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "(Optional) The maximum height available for the text block.\nAny lines exceeding this height will be truncated.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "An object with properties <code>x</code>, <code>y</code>, <code>w</code>, and <code>h</code> representing the loose\nbounding box of the text based on the font's intrinsic metrics.",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "An object with properties <code>x</code>, <code>y</code>, <code>w</code>, and <code>h</code> representing the loose\nbounding box of the text based on the font's intrinsic metrics.",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "fontWidth",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Returns the loose width of a text string based on the current font.</p>\n<p>The <code>fontWidth()</code> function measures the width of the provided text string using\nthe font's default measurement (i.e., the width property from the text metrics returned by\nthe browser). Unlike <code>textWidth()</code>, which calculates the tight pixel boundaries\nof the text glyphs, <code>fontWidth()</code> uses the font's intrinsic spacing, which may include\nadditional space for character spacing and kerning. This makes it useful for scenarios where\nan approximate width is sufficient for layout and positioning.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 200);\n  background(240);\n\n  textSize(32);\n  textAlign(LEFT, TOP);\n  textFont('Georgia');\n\n  let s = \"Hello, World!\";\n  let fw = fontWidth(s);\n\n  fill(0);\n  text(s, 50, 50);\n\n  stroke('blue');\n  line(50, 90, 50 + fw, 90);\n\n  noStroke();\n  fill(50);\n  textSize(16);\n  text(\"Font width: \" + fw.toFixed(2) + \" pixels\", 50, 100);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "theText",
              "description": "The text string to measure.",
              "type": "String"
            }
          ],
          "return": {
            "description": "The loose width of the text in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The loose width of the text in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "fontAscent",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Returns the loose ascent of the text based on the font's intrinsic metrics.</p>\n<p>The <code>fontAscent()</code> function calculates the ascent of the text using the font's\nintrinsic metrics (e.g., <code>fontBoundingBoxAscent</code>). This value represents the space\nabove the baseline that the font inherently occupies, and is useful for layout purposes when\nan approximate vertical measurement is required.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 300);\n  background(220);\n\n  textSize(35);\n  textAlign(LEFT, BASELINE);\n  textFont('Georgia');\n\n  let s = \"Hello, p5.js!\";\n  let x = 50, y = 150;\n\n  fill(0);\n  text(s, x, y);\n\n  // Get the font descent of the current font\n  let fasc = fontAscent();\n\n  // Draw a red line at the baseline and a blue line at the ascent position\n  stroke('red');\n  line(x, y, x + 200, y); // Baseline\n  stroke('blue');\n  line(x, y - fasc, x + 200, y - fasc); // Font ascent position\n\n  noStroke();\n  fill(0);\n  textSize(16);\n  text(\"fontAscent: \" + fasc.toFixed(2) + \" pixels\", x, y + fdesc + 20);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The loose ascent value in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The loose ascent value in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "fontDescent",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Returns the loose descent of the text based on the font's intrinsic metrics.</p>\n<p>The <code>fontDescent()</code> function calculates the descent of the text using the font's\nintrinsic metrics (e.g., <code>fontBoundingBoxDescent</code>). This value represents the space\nbelow the baseline that the font inherently occupies, and is useful for layout purposes when\nan approximate vertical measurement is required.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 300);\n  background(220);\n\n  textSize(48);\n  textAlign(LEFT, BASELINE);\n  textFont('Georgia');\n\n  let s = \"Hello, p5.js!\";\n  let x = 50, y = 150;\n\n  fill(0);\n  text(s, x, y);\n\n  // Get the font descent of the current font\n  let fdesc = fontDescent();\n\n  // Draw a red line at the baseline and a blue line at the descent position\n  stroke('red');\n  line(x, y, x + 200, y); // Baseline\n  stroke('blue');\n  line(x, y + fdesc, x + 200, y + fdesc); // Font descent position\n\n  noStroke();\n  fill(0);\n  textSize(16);\n  text(\"fontDescent: \" + fdesc.toFixed(2) + \" pixels\", x, y + fdesc + 20);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The loose descent value in pixels.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The loose descent value in pixels.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textWeight",
      "file": "src/scripts/parsers/in/p5.js/src/type/textCore.js",
      "line": 1298,
      "itemtype": "method",
      "description": "<p>Sets or gets the current font weight.</p>\n<p>The <code>textWeight()</code> function is used to specify the weight (thickness) of the text.\nWhen a numeric value is provided, it sets the font weight to that value and updates the\nrendering properties accordingly (including the \"font-variation-settings\" on the canvas style).\nWhen called without an argument, it returns the current font weight setting.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(300, 200);\n  background(240);\n\n  // Set text alignment, size, and font\n  textAlign(LEFT, TOP);\n  textSize(20);\n  textFont(\"Georgia\");\n\n  // Draw text with a normal weight (lighter appearance)\n  push();\n  textWeight(400);  // Set font weight to 400\n  fill(0);\n  text(\"Normal\", 50, 50);\n  let normalWeight = textWeight();  // Should return 400\n  pop();\n\n  // Draw text with a bold weight (heavier appearance)\n  push();\n  textWeight(900);  // Set font weight to 900\n  fill(0);\n  text(\"Bold\", 50, 100);\n  let boldWeight = textWeight();  // Should return 900\n  pop();\n\n  // Display the current font weight values on the canvas\n  textSize(16);\n  fill(50);\n  text(\"Normal Weight: \" + normalWeight, 150, 52);\n  text(\"Bold Weight: \" + boldWeight, 150, 100);\n}",
        "let font;\n\nasync function setup() {\n  createCanvas(100, 100);\n  font = await loadFont(\n    'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap'\n  );\n}\n\nfunction draw() {\n  background(255);\n  textFont(font);\n  textAlign(LEFT, TOP);\n  textSize(35);\n  textWeight(sin(millis() * 0.002) * 200 + 400);\n  text('p5*js', 0, 10);\n  describe('The text p5*js pulsing its weight over time');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "weight",
              "description": "The numeric weight value to set for the text.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "If no arguments are provided, the current font weight",
            "type": "Number"
          }
        },
        {
          "params": [],
          "return": {
            "description": "The current font weight",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "If no arguments are provided, the current font weight",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "ellipsoid",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 1311,
      "itemtype": "method",
      "description": "<p>Draws an ellipsoid.</p>\n<p>An ellipsoid is a 3D shape with triangular faces that connect to form a\nround surface. Ellipsoids with few faces look like crystals. Ellipsoids\nwith many faces have smooth surfaces and look like eggs. <code>ellipsoid()</code>\ndefines a shape by its radii. This is different from\n<a href=\"#/p5/ellipse\">ellipse()</a> which uses diameters\n(width and height).</p>\n<p>The first parameter, <code>radiusX</code>, is optional. If a <code>Number</code> is passed, as in\n<code>ellipsoid(20)</code>, it sets the radius of the ellipsoid along the x-axis. By\ndefault, <code>radiusX</code> is 50.</p>\n<p>The second parameter, <code>radiusY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>ellipsoid(20, 30)</code>, it sets the ellipsoid’s radius along the y-axis.\nBy default, <code>radiusY</code> is set to the ellipsoid’s <code>radiusX</code>.</p>\n<p>The third parameter, <code>radiusZ</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>ellipsoid(20, 30, 40)</code>, it sets the ellipsoid’s radius along the\nz-axis. By default, <code>radiusZ</code> is set to the ellipsoid’s <code>radiusY</code>.</p>\n<p>The fourth parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>ellipsoid(20, 30, 40, 5)</code>, it sets the number of triangle\nsubdivisions to use along the x-axis. All 3D shapes are made by connecting\ntriangles to form their surfaces. By default, <code>detailX</code> is 24.</p>\n<p>The fifth parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>ellipsoid(20, 30, 40, 5, 7)</code>, it sets the number of triangle\nsubdivisions to use along the y-axis. All 3D shapes are made by connecting\ntriangles to form their surfaces. By default, <code>detailY</code> is 16.</p>\n<p>Note: <code>ellipsoid()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white sphere on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the ellipsoid.\n  // Set its radiusX to 30.\n  ellipsoid(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white ellipsoid on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the ellipsoid.\n  // Set its radiusX to 30.\n  // Set its radiusY to 40.\n  ellipsoid(30, 40);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white ellipsoid on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the ellipsoid.\n  // Set its radiusX to 30.\n  // Set its radiusY to 40.\n  // Set its radiusZ to 50.\n  ellipsoid(30, 40, 50);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white ellipsoid on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the ellipsoid.\n  // Set its radiusX to 30.\n  // Set its radiusY to 40.\n  // Set its radiusZ to 50.\n  // Set its detailX to 4.\n  ellipsoid(30, 40, 50, 4);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white ellipsoid on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the ellipsoid.\n  // Set its radiusX to 30.\n  // Set its radiusY to 40.\n  // Set its radiusZ to 50.\n  // Set its detailX to 4.\n  // Set its detailY to 3.\n  ellipsoid(30, 40, 50, 4, 3);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radiusX",
              "description": "radius of the ellipsoid along the x-axis. Defaults to 50.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "radiusY",
              "description": "radius of the ellipsoid along the y-axis. Defaults to <code>radiusX</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "radiusZ",
              "description": "radius of the ellipsoid along the z-axis. Defaults to <code>radiusY</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of triangle subdivisions along the x-axis. Defaults to 24.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis. Defaults to 16.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "noFill",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1340,
      "itemtype": "method",
      "description": "<p>Disables setting the fill color for shapes.</p>\n<p>Calling <code>noFill()</code> is the same as making the fill completely transparent,\nas in <code>fill(0, 0)</code>. If both <a href=\"#/p5/noStroke\">noStroke()</a> and\n<code>noFill()</code> are called, nothing will be drawn to the screen.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the top square.\n  square(32, 10, 35);\n\n  // Draw the bottom square.\n  noFill();\n  square(32, 55, 35);\n\n  describe('A white square on above an empty square. Both squares have black outlines.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A purple cube wireframe spinning on a black canvas.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Style the box.\n  noFill();\n  stroke(100, 100, 240);\n\n  // Rotate the coordinates.\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Draw the box.\n  box(45);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "noLights",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/light.js",
      "line": 1346,
      "itemtype": "method",
      "description": "<p>Removes all lights from the sketch.</p>\n<p>Calling <code>noLights()</code> removes any lights created with\n<a href=\"#/p5/lights\">lights()</a>,\n<a href=\"#/p5/ambientLight\">ambientLight()</a>,\n<a href=\"#/p5/directionalLight\">directionalLight()</a>,\n<a href=\"#/p5/pointLight\">pointLight()</a>, or\n<a href=\"#/p5/spotLight\">spotLight()</a>. These functions may be called\nafter <code>noLights()</code> to create a new lighting scheme.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('Two spheres drawn against a gray background. The top sphere is white and the bottom sphere is red.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the spheres.\n  noStroke();\n\n  // Draw the top sphere.\n  push();\n  translate(0, -25, 0);\n  sphere(20);\n  pop();\n\n  // Turn off the lights.\n  noLights();\n\n  // Add a red directional light that points into the screen.\n  directionalLight(255, 0, 0, 0, 0, -1);\n\n  // Draw the bottom sphere.\n  push();\n  translate(0, 25, 0);\n  sphere(20);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Lights"
    },
    {
      "name": "lightness",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 1374,
      "itemtype": "method",
      "description": "<p>Gets the lightness value of a color.</p>\n<p><code>lightness()</code> extracts the HSL lightness value from a\n<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, an array of color components, or\na CSS color string.</p>\n<p>By default, <code>lightness()</code> returns a color's HSL lightness in the range 0\nto 100. If the <a href=\"/reference/p5/colorMode/\">colorMode()</a> is set to HSL, it\nreturns the lightness value in the given range.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a p5.Color object using HSL values.\n  let c = color(0, 100, 75);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'lightValue' to 75.\n  let lightValue = lightness(c);\n\n  // Draw the right rectangle.\n  fill(lightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a color array.\n  let c = [0, 100, 75];\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'lightValue' to 75.\n  let lightValue = lightness(c);\n\n  // Draw the right rectangle.\n  fill(lightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color.\n  colorMode(HSL);\n\n  // Create a CSS color string.\n  let c = 'rgb(255, 128, 128)';\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'lightValue' to 75.\n  let lightValue = lightness(c);\n\n  // Draw the right rectangle.\n  fill(lightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(50);\n\n  // Use HSL color with values in the range 0-255.\n  colorMode(HSL, 255);\n\n  // Create a p5.Color object using HSL values.\n  let c = color(0, 255, 191.5);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(c);\n  rect(15, 15, 35, 70);\n\n  // Set 'lightValue' to 191.5.\n  let lightValue = lightness(c);\n\n  // Draw the right rectangle.\n  fill(lightValue);\n  rect(50, 15, 35, 70);\n\n  describe('Two rectangles. The left one is salmon pink and the right one is gray.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "color",
              "description": "<a href=\"/reference/p5/p5.Color/\">p5.Color</a> object, array of\ncolor components, or CSS color string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "return": {
            "description": "the lightness value.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "the lightness value.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "imageShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1374,
      "itemtype": "method",
      "description": "<p>Sets the <a href=\"#/p5.Shader\">p5.Shader</a> object to apply for images.</p>\n<p>This method allows the user to apply a custom shader to images, enabling\nadvanced visual effects such as pixel manipulation, color adjustments,\nor dynamic behavior. The shader will be applied to the image drawn using\nthe <a href=\"#/p5/image\">image()</a> function.</p>\n<p>The shader will be used exclusively for:</p>\n<ul><li><code>image()</code> calls, applying only when drawing 2D images.</li><li>This shader will NOT apply to images used in <a href=\"#/p5/texture\">texture()</a> or other 3D contexts.\nAny attempts to use the imageShader in these cases will be ignored.</li></ul>",
      "example": [
        "let img;\nlet imgShader;\n\nasync function setup() {\n  img = await loadImage('assets/outdoor_image.jpg');\n\n  createCanvas(200, 200, WEBGL);\n  noStroke();\n\n  imgShader = createShader(`\n    precision mediump float;\n    attribute vec3 aPosition;\n    attribute vec2 aTexCoord;\n    varying vec2 vTexCoord;\n    uniform mat4 uModelViewMatrix;\n    uniform mat4 uProjectionMatrix;\n\n    void main() {\n      vTexCoord = aTexCoord;\n      gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aPosition, 1.0);\n    }\n  `, `\n    precision mediump float;\n    varying vec2 vTexCoord;\n    uniform sampler2D uTexture;\n    uniform vec2 uMousePos;\n\n    void main() {\n      vec4 texColor = texture2D(uTexture, vTexCoord);\n      // Adjust the color based on mouse position\n      float r = uMousePos.x * texColor.r;\n      float g = uMousePos.y * texColor.g;\n      gl_FragColor = vec4(r, g, texColor.b, texColor.a);\n    }\n  `);\n\n  describe(\n    'An image on a gray background where the colors change based on the mouse position.'\n  );\n}\n\nfunction draw() {\n  background(220);\n\n  imageShader(imgShader);\n\n  // Map the mouse position to a range between 0 and 1\n  let mousePosX = map(mouseX, 0, width, 0, 1);\n  let mousePosY = map(mouseY, 0, height, 0, 1);\n\n  // Pass the mouse position to the shader as a uniform\n  imgShader.setUniform('uMousePos', [mousePosX, mousePosY]);\n\n  // Bind the image texture to the shader\n  imgShader.setUniform('uTexture', img);\n\n  image(img, -width / 2, -height / 2, width, height);\n}",
        "let img;\nlet imgShader;\n\nasync function setup() {\n  img = await loadImage('assets/outdoor_image.jpg');\n\n  createCanvas(200, 200, WEBGL);\n  noStroke();\n\n  imgShader = createShader(`\n    precision mediump float;\n    attribute vec3 aPosition;\n    attribute vec2 aTexCoord;\n    varying vec2 vTexCoord;\n    uniform mat4 uModelViewMatrix;\n    uniform mat4 uProjectionMatrix;\n\n    void main() {\n      vTexCoord = aTexCoord;\n      gl_Position = uProjectionMatrix * uModelViewMatrix * vec4(aPosition, 1.0);\n    }\n  `, `\n    precision mediump float;\n    varying vec2 vTexCoord;\n    uniform sampler2D uTexture;\n    uniform vec2 uMousePos;\n\n    void main() {\n      // Distance from the current pixel to the mouse\n      float distFromMouse = distance(vTexCoord, uMousePos);\n\n      // Adjust pixelation based on distance (closer = more detail, farther = blockier)\n      float pixelSize = mix(0.002, 0.05, distFromMouse);\n      vec2 pixelatedCoord = vec2(floor(vTexCoord.x / pixelSize) * pixelSize,\n                                 floor(vTexCoord.y / pixelSize) * pixelSize);\n\n      vec4 texColor = texture2D(uTexture, pixelatedCoord);\n      gl_FragColor = texColor;\n    }\n  `);\n\n  describe('A static image with a grid-like, pixelated effect created by the shader. Each cell in the grid alternates visibility, producing a dithered visual effect.');\n}\n\nfunction draw() {\n  background(220);\n  imageShader(imgShader);\n\n  let mousePosX = map(mouseX, 0, width, 0, 1);\n  let mousePosY = map(mouseY, 0, height, 0, 1);\n\n  imgShader.setUniform('uMousePos', [mousePosX, mousePosY]);\n  imgShader.setUniform('uTexture', img);\n  image(img, -width / 2, -height / 2, width, height);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "s",
              "description": "<a href=\"#/p5.Shader\">p5.Shader</a> object\nto apply for images.",
              "type": "p5.Shader"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "imageMode",
      "file": "src/scripts/parsers/in/p5.js/src/image/loading_displaying.js",
      "line": 1376,
      "itemtype": "method",
      "description": "<p>Changes the location from which images are drawn when\n<a href=\"#/p5/image\">image()</a> is called.</p>\n<p>By default, the first\ntwo parameters of <a href=\"#/p5/image\">image()</a> are the x- and\ny-coordinates of the image's upper-left corner. The next parameters are\nits width and height. This is the same as calling <code>imageMode(CORNER)</code>.</p>\n<p><code>imageMode(CORNERS)</code> also uses the first two parameters of\n<a href=\"#/p5/image\">image()</a> as the x- and y-coordinates of the image's\ntop-left corner. The third and fourth parameters are the coordinates of its\nbottom-right corner.</p>\n<p><code>imageMode(CENTER)</code> uses the first two parameters of\n<a href=\"#/p5/image\">image()</a> as the x- and y-coordinates of the image's\ncenter. The next parameters are its width and height.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use CORNER mode.\n  imageMode(CORNER);\n\n  // Display the image.\n  image(img, 10, 10, 50, 50);\n\n  describe('A square image of a brick wall is drawn at the top left of a gray square.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use CORNERS mode.\n  imageMode(CORNERS);\n\n  // Display the image.\n  image(img, 10, 10, 90, 40);\n\n  describe('An image of a brick wall is drawn on a gray square. The image is squeezed into a small rectangular area.');\n}",
        "let img;\n\nasync function setup() {\n  // Load the image.\n  img = await loadImage('assets/bricks.jpg');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use CENTER mode.\n  imageMode(CENTER);\n\n  // Display the image.\n  image(img, 50, 50, 80, 80);\n\n  describe('A square image of a brick wall is drawn on a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either CORNER, CORNERS, or CENTER.",
              "type": "CORNER|CORNERS|CENTER"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Image",
      "submodule": "Loading & Displaying"
    },
    {
      "name": "mouseReleased",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1379,
      "itemtype": "method",
      "description": "<p>A function that's called once when a mouse button is released.</p>\n<p>Declaring the function <code>mouseReleased()</code> sets a code block to run\nautomatically when the user releases a mouse button after having pressed\nit:</p>\n<pre><code class=\"language-js\">function mouseReleased() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mouseReleased()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mouseReleased() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mouseReleased()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse release event:</p>\n<pre><code class=\"language-js\">function mouseReleased(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>On touchscreen devices, <code>mouseReleased()</code> will run when a user’s touch\nends.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n<p>Note: <a href=\"#/p5/mousePressed\">mousePressed()</a>, <code>mouseReleased()</code>,\nand <a href=\"#/p5/mouseClicked\">mouseClicked()</a> are all related.\n<a href=\"#/p5/mousePressed\">mousePressed()</a> runs as soon as the user\nclicks the mouse. <code>mouseReleased()</code> runs as soon as the user releases the\nmouse click. <a href=\"#/p5/mouseClicked\">mouseClicked()</a> runs\nimmediately after <code>mouseReleased()</code>.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square becomes lighter when the user presses and releases a mouse button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\nfunction mouseReleased() {\n  // Update the grayscale value.\n  value += 5;\n\n  // Reset the grayscale value.\n  if (value > 255) {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Style the circle.\n  fill('orange');\n  stroke('royalblue');\n  strokeWeight(10);\n\n  describe(\n    'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'\n  );\n}\n\nfunction draw() {\n  background(220);\n\n  // Draw the circle.\n  circle(50, 50, 20);\n}\n\n// Set the stroke color and weight as soon as the user clicks.\nfunction mousePressed() {\n  stroke('deeppink');\n  strokeWeight(3);\n}\n\n// Set the stroke and fill colors as soon as the user releases\n// the mouse.\nfunction mouseReleased() {\n  stroke('royalblue');\n\n  // This is never visible because fill() is called\n  // in mouseClicked() which runs immediately after\n  // mouseReleased();\n  fill('limegreen');\n}\n\n// Set the fill color and stroke weight after\n// mousePressed() and mouseReleased() are called.\nfunction mouseClicked() {\n  fill('orange');\n  strokeWeight(10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "write",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1385,
      "itemtype": "method",
      "description": "<p>Writes data to the print stream without adding new lines.</p>\n<p>The parameter, <code>data</code>, is the data to write. <code>data</code> can be a number or\nstring, as in <code>myWriter.write('hi')</code>, or an array of numbers and strings,\nas in <code>myWriter.write([1, 2, 3])</code>. A comma will be inserted between array\narray elements when they're added to the print stream.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  let myWriter = createWriter('numbers.txt');\n\n  // Add some data to the print stream.\n  myWriter.write('1,2,3,');\n  myWriter.write(['4', '5', '6']);\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "data",
              "description": "data to be written as a string, number,\nor array of strings and numbers.",
              "type": "String|Number|Array"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "noStroke",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1389,
      "itemtype": "method",
      "description": "<p>Disables drawing points, lines, and the outlines of shapes.</p>\n<p>Calling <code>noStroke()</code> is the same as making the stroke completely transparent,\nas in <code>stroke(0, 0)</code>. If both <code>noStroke()</code> and\n<a href=\"#/p5/noFill\">noFill()</a> are called, nothing will be drawn to the\nscreen.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  noStroke();\n  square(20, 20, 60);\n\n  describe('A white square with no outline.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A pink cube with no edge outlines spinning on a black canvas.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Style the box.\n  noStroke();\n  fill(240, 150, 150);\n\n  // Rotate the coordinates.\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Draw the box.\n  box(45);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "createRadio",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 1395,
      "itemtype": "method",
      "description": "<p>Creates a radio button element.</p>\n<p>The parameter is optional. If a string is passed, as in\n<code>let myRadio = createSelect('food')</code>, then each radio option will\nhave <code>\"food\"</code> as its <code>name</code> parameter: <code><input name=\"food\"></input></code>.\nIf an existing <code><div></div></code> or <code><span></span></code>\nelement is passed, as in <code>let myRadio = createSelect(container)</code>, it will\nbecome the radio button's parent element.</p>\n<p>Radio buttons extend the <a href=\"#/p5.Element\">p5.Element</a> class with a few\nhelpful methods for managing options:</p>\n<ul><li><code>myRadio.option(value, [label])</code> adds an option to the menu. The first paremeter, <code>value</code>, is a string that sets the option's value and label. The second parameter, <code>label</code>, is optional. If provided, it sets the label displayed for the <code>value</code>. If an option with <code>value</code> already exists, its label is changed and its value is returned.</li><li><code>myRadio.value()</code> returns the currently-selected option's value.</li><li><code>myRadio.selected()</code> returns the currently-selected option.</li><li><code>myRadio.selected(value)</code> selects the given option and returns it as an <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement\" target=\"_blank\"><code>HTMLInputElement</code></a>.</li><li><code>myRadio.disable(shouldDisable)</code> enables the entire radio button if <code>true</code> is passed and disables it if <code>false</code> is passed.</li></ul>",
      "example": [
        "let style = document.createElement('style');\nstyle.innerHTML = `\n.p5-radio label {\n   display: flex;\n   align-items: center;\n }\n .p5-radio input {\n   margin-right: 5px;\n }\n `;\ndocument.head.appendChild(style);\n\nlet myRadio;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a radio button element and place it\n  // in the top-left corner.\n  myRadio = createRadio();\n  myRadio.position(0, 0);\n  myRadio.class('p5-radio');\n  myRadio.size(60);\n\n  // Add a few color options.\n  myRadio.option('red');\n  myRadio.option('yellow');\n  myRadio.option('blue');\n\n  // Choose a default option.\n  myRadio.selected('yellow');\n\n  describe('A yellow square with three color options listed, \"red\", \"yellow\", and \"blue\". The square changes color when the user selects a new option.');\n}\n\nfunction draw() {\n  // Set the background color using the radio button.\n  let g = myRadio.value();\n  background(g);\n}",
        "let myRadio;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a radio button element and place it\n  // in the top-left corner.\n  myRadio = createRadio();\n  myRadio.position(0, 0);\n  myRadio.size(50);\n\n  // Add a few color options.\n  // Color values are labeled with\n  // emotions they evoke.\n  myRadio.option('red', 'love');\n  myRadio.option('yellow', 'joy');\n  myRadio.option('blue', 'trust');\n\n  // Choose a default option.\n  myRadio.selected('yellow');\n\n  describe('A yellow square with three options listed, \"love\", \"joy\", and \"trust\". The square changes color when the user selects a new option.');\n}\n\nfunction draw() {\n  // Set the background color using the radio button.\n  let c = myRadio.value();\n  background(c);\n}",
        "let myRadio;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a radio button element and place it\n  // in the top-left corner.\n  myRadio = createRadio();\n  myRadio.position(0, 0);\n  myRadio.size(50);\n\n  // Add a few color options.\n  myRadio.option('red');\n  myRadio.option('yellow');\n  myRadio.option('blue');\n\n  // Choose a default option.\n  myRadio.selected('yellow');\n\n  // Create a button and place it beneath the canvas.\n  let btn = createButton('disable');\n  btn.position(0, 100);\n\n  // Call disableRadio() when btn is pressed.\n  btn.mousePressed(disableRadio);\n\n  describe('A yellow square with three options listed, \"red\", \"yellow\", and \"blue\". The square changes color when the user selects a new option. A \"disable\" button beneath the canvas disables the color options when pressed.');\n}\n\nfunction draw() {\n  // Set the background color using the radio button.\n  let c = myRadio.value();\n  background(c);\n}\n\n// Disable myRadio.\nfunction disableRadio() {\n  myRadio.disable(true);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "containerElement",
              "description": "container HTML Element, either a <code><div></div></code>\nor <code><span></span></code>.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        },
        {
          "params": [
            {
              "name": "name",
              "description": "name parameter assigned to each option's <code><input></input></code> element.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        },
        {
          "params": [],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "createVideo",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1402,
      "itemtype": "method",
      "description": "<p>Creates a <code><video></code> element for simple audio/video playback.</p>\n<p><code>createVideo()</code> returns a new\n<a href=\"#/p5.MediaElement\">p5.MediaElement</a> object. Videos are shown by\ndefault. They can be hidden by calling <code>video.hide()</code> and drawn to the\ncanvas using <a href=\"#/p5/image\">image()</a>.</p>\n<p>The first parameter, <code>src</code>, is the path the video. If a single string is\npassed, as in <code>'assets/topsecret.mp4'</code>, a single video is loaded. An array\nof strings can be used to load the same video in different formats. For\nexample, <code>['assets/topsecret.mp4', 'assets/topsecret.ogv', 'assets/topsecret.webm']</code>.\nThis is useful for ensuring that the video can play across different browsers with\ndifferent capabilities. See\n<a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats'>MDN</a>\nfor more information about supported formats.</p>\n<p>The second parameter, <code>callback</code>, is optional. It's a function to call once\nthe video is ready to play.</p>\n",
      "example": [
        "function setup() {\n  noCanvas();\n\n  // Load a video and add it to the page.\n  // Note: this may not work in some browsers.\n  let video = createVideo('assets/small.mp4');\n\n  // Show the default video controls.\n  video.showControls();\n\n  describe('A video of a toy robot with playback controls beneath it.');\n}",
        "function setup() {\n  noCanvas();\n\n  // Load a video and add it to the page.\n  // Provide an array options for different file formats.\n  let video = createVideo(\n    ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm']\n  );\n\n  // Show the default video controls.\n  video.showControls();\n\n  describe('A video of a toy robot with playback controls beneath it.');\n}",
        "let video;\n\nfunction setup() {\n  noCanvas();\n\n  // Load a video and add it to the page.\n  // Provide an array options for different file formats.\n  // Call mute() once the video loads.\n  video = createVideo(\n    ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],\n    muteVideo\n  );\n\n  // Show the default video controls.\n  video.showControls();\n\n  describe('A video of a toy robot with playback controls beneath it.');\n}\n\n// Mute the video once it loads.\nfunction muteVideo() {\n  video.volume(0);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "src",
              "description": "path to a video file, or an array of paths for\nsupporting different browsers.",
              "optional": 1,
              "type": "String|String[]"
            },
            {
              "name": "callback",
              "description": "function to call once the video is ready to play.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
            "type": "p5.MediaElement"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
        "type": "p5.MediaElement"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadFont",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 1419,
      "itemtype": "method",
      "description": "<p>Loads a font and creates a <a href=\"#/p5.Font\">p5.Font</a> object.\n<code>loadFont()</code> can load fonts in either .otf or .ttf format. Loaded fonts can\nbe used to style text on the canvas and in HTML elements.</p>\n<p>The first parameter, <code>path</code>, is the path to a font file.\nPaths to local files should be relative. For example,\n<code>'assets/inconsolata.otf'</code>. The Inconsolata font used in the following\nexamples can be downloaded for free\n<a href=\"https://www.fontsquirrel.com/fonts/inconsolata\" target=\"_blank\">here</a>.\nPaths to remote files should be URLs. For example,\n<code>'https://example.com/inconsolata.otf'</code>. URLs may be blocked due to browser\nsecurity.</p>\n<p>In 2D mode, <code>path</code> can take on a few other forms. It could be a path to a CSS file,\nsuch as one from <a href=\"https://fonts.google.com/\">Google Fonts.</a> It could also\nbe a string with a <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face\">CSS <code>@font-face</code> declaration.</a></p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is\npassed, it will be called once the font has loaded. The callback function\nmay use the new <a href=\"#/p5.Font\">p5.Font</a> object if needed.</p>\n<p>The third parameter, <code>failureCallback</code>, is also optional. If a function is\npassed, it will be called if the font fails to load. The callback function\nmay use the error\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Event\" target=\"_blank\">Event</a>\nobject if needed.</p>\n<p>Fonts can take time to load. <code>await</code> the result of <code>loadFont()</code> in\n<a href=\"#/p5/setup\">setup()</a> before using the result.</p>\n",
      "example": [
        "let font;\n\nasync function setup() {\n  createCanvas(100, 100);\n  font = await loadFont('assets/inconsolata.otf');\n  fill('deeppink');\n  textFont(font);\n  textSize(36);\n  text('p5*js', 10, 50);\n\n  describe('The text \"p5*js\" written in pink on a white background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  loadFont('assets/inconsolata.otf', font => {\n    fill('deeppink');\n    textFont(font);\n    textSize(36);\n    text('p5*js', 10, 50);\n\n    describe('The text \"p5*js\" written in pink on a white background.');\n  });\n}",
        "function setup() {\n  createCanvas(100, 100);\n  loadFont('assets/inconsolata.otf', success, failure);\n}\n\nfunction success(font) {\n  fill('deeppink');\n  textFont(font);\n  textSize(36);\n  text('p5*js', 10, 50);\n\n  describe('The text \"p5*js\" written in pink on a white background.');\n}\n\nfunction failure(event) {\n  console.error('Oops!', event);\n}",
        "async function setup() {\n  createCanvas(100, 100);\n  await loadFont('assets/inconsolata.otf');\n  let p = createP('p5*js');\n  p.style('color', 'deeppink');\n  p.style('font-family', 'Inconsolata');\n  p.style('font-size', '36px');\n  p.position(10, 50);\n\n  describe('The text \"p5*js\" written in pink on a white background.');\n}",
        "// META:norender\n// Some other forms of loading fonts:\nloadFont(\"https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap\");\n\nloadFont('@font-face { font-family: \"Bricolage Grotesque\", serif; font-optical-sizing: auto; font-weight: 400; font-style: normal; font-variation-settings: \"wdth\" 100; }');"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "path",
              "description": "path of the font or CSS file to be loaded, or a CSS <code>@font-face</code> string.",
              "type": "String"
            },
            {
              "name": "name",
              "description": "An alias that can be used for this font in <code>textFont()</code>. Defaults to the name in the font's metadata.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "options",
              "description": "An optional object with extra CSS font face descriptors, or p5.js font settings.",
              "optional": 1,
              "type": "Object"
            },
            {
              "name": "successCallback",
              "description": "function called with the\n<a href=\"#/p5.Font\">p5.Font</a> object after it\nloads.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "failureCallback",
              "description": "function called with the error\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Event\" target=\"_blank\">Event</a>\nobject if the font fails to load.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "<a href=\"#/p5.Font\">p5.Font</a> object.",
            "type": "Promise<p5.Font>"
          }
        },
        {
          "params": [
            {
              "name": "path",
              "description": "path of the font to be loaded.",
              "type": "String"
            },
            {
              "name": "successCallback",
              "description": "function called with the\n<a href=\"#/p5.Font\">p5.Font</a> object after it\nloads.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "failureCallback",
              "description": "function called with the error\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Event\" target=\"_blank\">Event</a>\nobject if the font fails to load.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "The font.",
            "type": "Promise<p5.Font>"
          }
        }
      ],
      "return": {
        "description": "<a href=\"#/p5.Font\">p5.Font</a> object.",
        "type": "Promise<p5.Font>"
      },
      "class": "p5",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "lerpColor",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 1435,
      "itemtype": "method",
      "description": "<p>Blends two colors to find a third color between them.</p>\n<p>The <code>amt</code> parameter specifies the amount to interpolate between the two\nvalues. 0 is equal to the first color, 0.1 is very near the first color,\n0.5 is halfway between the two colors, and so on. Negative numbers are set\nto 0. Numbers greater than 1 are set to 1. This differs from the behavior of\n<a href=\"#/p5/lerp\">lerp</a>. It's necessary because numbers outside of the\ninterval [0, 1] will produce strange and unexpected colors.</p>\n<p>The way that colors are interpolated depends on the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Color objects to interpolate between.\n  let from = color(218, 165, 32);\n  let to = color(72, 61, 139);\n\n  // Create intermediate colors.\n  let interA = lerpColor(from, to, 0.33);\n  let interB = lerpColor(from, to, 0.66);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(from);\n  rect(10, 20, 20, 60);\n\n  // Draw the left-center rectangle.\n  fill(interA);\n  rect(30, 20, 20, 60);\n\n  // Draw the right-center rectangle.\n  fill(interB);\n  rect(50, 20, 20, 60);\n\n  // Draw the right rectangle.\n  fill(to);\n  rect(70, 20, 20, 60);\n\n  describe(\n    'Four rectangles. From left to right, the rectangles are tan, brown, brownish purple, and purple.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "c1",
              "description": "interpolate from this color.",
              "type": "p5.Color"
            },
            {
              "name": "c2",
              "description": "interpolate to this color.",
              "type": "p5.Color"
            },
            {
              "name": "amt",
              "description": "number between 0 and 1.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "interpolated color.",
            "type": "p5.Color"
          }
        }
      ],
      "return": {
        "description": "interpolated color.",
        "type": "p5.Color"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "createAudio",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1446,
      "itemtype": "method",
      "description": "<p>Creates a hidden <code><audio></code> element for simple audio playback.</p>\n<p><code>createAudio()</code> returns a new\n<a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.</p>\n<p>The first parameter, <code>src</code>, is the path the audio. If a single string is\npassed, as in <code>'assets/audio.mp3'</code>, a single audio is loaded. An array\nof strings can be used to load the same audio in different formats. For\nexample, <code>['assets/audio.mp3', 'assets/video.wav']</code>.\nThis is useful for ensuring that the audio can play across different\nbrowsers with different capabilities. See\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats\" target=\"_blank\">MDN</a>\nfor more information about supported formats.</p>\n<p>The second parameter, <code>callback</code>, is optional. It's a function to call once\nthe audio is ready to play.</p>\n",
      "example": [
        "function setup() {\n  noCanvas();\n\n  // Load the audio.\n  let beat = createAudio('assets/beat.mp3');\n\n  // Show the default audio controls.\n  beat.showControls();\n\n  describe('An audio beat plays when the user double-clicks the square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "src",
              "description": "path to an audio file, or an array of paths\nfor supporting different browsers.",
              "optional": 1,
              "type": "String|String[]"
            },
            {
              "name": "callback",
              "description": "function to call once the audio is ready to play.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
            "type": "p5.MediaElement"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
        "type": "p5.MediaElement"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "torus",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 1460,
      "itemtype": "method",
      "description": "<p>Draws a torus.</p>\n<p>A torus is a 3D shape with triangular faces that connect to form a ring.\nToruses with few faces look flattened. Toruses with many faces have smooth\nsurfaces.</p>\n<p>The first parameter, <code>radius</code>, is optional. If a <code>Number</code> is passed, as in\n<code>torus(30)</code>, it sets the radius of the ring. By default, <code>radius</code> is 50.</p>\n<p>The second parameter, <code>tubeRadius</code>, is also optional. If a <code>Number</code> is\npassed, as in <code>torus(30, 15)</code>, it sets the radius of the tube. By default,\n<code>tubeRadius</code> is 10.</p>\n<p>The third parameter, <code>detailX</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>torus(30, 15, 5)</code>, it sets the number of edges used to draw the hole\nof the torus. Using more edges makes the hole look more like a circle. By\ndefault, <code>detailX</code> is 24.</p>\n<p>The fourth parameter, <code>detailY</code>, is also optional. If a <code>Number</code> is passed,\nas in <code>torus(30, 15, 5, 7)</code>, it sets the number of triangle subdivisions to\nuse while filling in the torus’ height. By default, <code>detailY</code> is 16.</p>\n<p>Note: <code>torus()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white torus on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the torus.\n  torus();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white torus on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the torus.\n  // Set its radius to 30.\n  torus(30);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white torus on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the torus.\n  // Set its radius to 30 and tubeRadius to 15.\n  torus(30, 15);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white torus on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the torus.\n  // Set its radius to 30 and tubeRadius to 15.\n  // Set its detailX to 5.\n  torus(30, 15, 5);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white torus on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the torus.\n  // Set its radius to 30 and tubeRadius to 15.\n  // Set its detailX to 5.\n  // Set its detailY to 3.\n  torus(30, 15, 5, 3);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "radius",
              "description": "radius of the torus. Defaults to 50.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "tubeRadius",
              "description": "radius of the tube. Defaults to 10.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "detailX",
              "description": "number of edges that form the hole. Defaults to 24.",
              "optional": 1,
              "type": "Integer"
            },
            {
              "name": "detailY",
              "description": "number of triangle subdivisions along the y-axis. Defaults to 16.",
              "optional": 1,
              "type": "Integer"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "paletteLerp",
      "file": "src/scripts/parsers/in/p5.js/src/color/creating_reading.js",
      "line": 1471,
      "itemtype": "method",
      "description": "<p>Blends multiple colors to find a color between them.</p>\n<p>The <code>amt</code> parameter specifies the amount to interpolate between the color\nstops which are colors at each <code>amt</code> value \"location\" with <code>amt</code> values\nthat are between 2 color stops interpolating between them based on its relative\ndistance to both.</p>\n<p>The way that colors are interpolated depends on the current\n<a href=\"/reference/p5/colorMode/\">colorMode()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(400, 400);\n}\n\nfunction draw() {\n  // The background goes from white to red to green to blue fill\n  background(paletteLerp([\n    ['white', 0],\n    ['red', 0.05],\n    ['green', 0.25],\n    ['blue', 1]\n  ], millis() / 10000 % 1));\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "colors_stops",
              "description": "color stops to interpolate from",
              "type": "[p5.Color|String|Number|Number[], Number][]"
            },
            {
              "name": "amt",
              "description": "number to use to interpolate relative to color stops",
              "type": "Number"
            }
          ],
          "return": {
            "description": "interpolated color.",
            "type": "p5.Color"
          }
        }
      ],
      "return": {
        "description": "interpolated color.",
        "type": "p5.Color"
      },
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Creating & Reading"
    },
    {
      "name": "close",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1514,
      "itemtype": "method",
      "description": "Saves the file and closes the print stream.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  let myWriter = createWriter('cat.txt');\n\n  // Add some data to the print stream.\n  // ASCII art courtesy Wikipedia:\n  // https://en.wikipedia.org/wiki/ASCII_art\n  myWriter.print(' (\\\\_/) ');\n  myWriter.print(\"(='.'=)\");\n  myWriter.print('(\")_(\")');\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "mouseClicked",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1535,
      "itemtype": "method",
      "description": "<p>A function that's called once after a mouse button is pressed and released.</p>\n<p>Declaring the function <code>mouseClicked()</code> sets a code block to run\nautomatically when the user releases a mouse button after having pressed\nit:</p>\n<pre><code class=\"language-js\">function mouseClicked() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mouseClicked()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mouseClicked() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mouseClicked()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse click event:</p>\n<pre><code class=\"language-js\">function mouseClicked(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>On touchscreen devices, <code>mouseClicked()</code> will run when a user’s touch\nends.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n<p>Note: <a href=\"#/p5/mousePressed\">mousePressed()</a>,\n<a href=\"#/p5/mouseReleased\">mouseReleased()</a>,\nand <code>mouseClicked()</code> are all related.\n<a href=\"#/p5/mousePressed\">mousePressed()</a> runs as soon as the user\nclicks the mouse. <a href=\"#/p5/mouseReleased\">mouseReleased()</a> runs as\nsoon as the user releases the mouse click. <code>mouseClicked()</code> runs\nimmediately after <a href=\"#/p5/mouseReleased\">mouseReleased()</a>.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square changes color when the user presses and releases a mouse button.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the square's color when the user clicks.\nfunction mouseClicked() {\n  if (value === 0) {\n    value = 255;\n  } else {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Style the circle.\n  fill('orange');\n  stroke('royalblue');\n  strokeWeight(10);\n\n  describe(\n    'An orange circle with a thick, blue border drawn on a gray background. When the user presses and holds the mouse, the border becomes thin and pink. When the user releases the mouse, the border becomes thicker and changes color to blue.'\n  );\n}\n\nfunction draw() {\n  background(220);\n\n  // Draw the circle.\n  circle(50, 50, 20);\n}\n\n// Set the stroke color and weight as soon as the user clicks.\nfunction mousePressed() {\n  stroke('deeppink');\n  strokeWeight(3);\n}\n\n// Set the stroke and fill colors as soon as the user releases\n// the mouse.\nfunction mouseReleased() {\n  stroke('royalblue');\n\n  // This is never visible because fill() is called\n  // in mouseClicked() which runs immediately after\n  // mouseReleased();\n  fill('limegreen');\n}\n\n// Set the fill color and stroke weight after\n// mousePressed() and mouseReleased() are called.\nfunction mouseClicked() {\n  fill('orange');\n  strokeWeight(10);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "buildMaterialShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1570,
      "itemtype": "method",
      "description": "<p>Create a new shader that can change how fills are drawn. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it\nto any fills you draw.</p>\n<p>The main way to use <code>buildMaterialShader</code> is to pass a function in as a parameter.\nThis will let you create a shader using p5.strands.</p>\n<p>In your function, you can call hooks to change part of the shader. In a material\nshader, these are the hooks available:</p>\n<ul><li><a href=\"#/p5/objectInputs\"><code>objectInputs</code></a>: Update vertices before any positioning has been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/worldInputs\"><code>worldInputs</code></a>: Update vertices after transformations have been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/cameraInputs\"><code>cameraInputs</code></a>: Update vertices after transformations have been applied, relative to the camera. Your function gets run on every vertex.</li><li><a href=\"#/p5/pixelInputs\"><code>pixelInputs</code></a>: Update property values on pixels on the surface of a shape. Your function gets run on every pixel.</li><li><a href=\"#/p5/combineColors\"><code>combineColors</code></a>: Control how the ambient, diffuse, and specular components of lighting are combined into a single color on the surface of a shape. Your function gets run on every pixel.</li><li><a href=\"#/p5/finalColor\"><code>finalColor</code></a>: Update or replace the pixel color on the surface of a shape. Your function gets run on every pixel.</li></ul><p>Read the linked reference page for each hook for more information about how to use them.</p>\n<p>One thing you can do with a material shader is animate the positions of vertices\nover time:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let time = millis();\n  worldInputs.begin();\n  worldInputs.position.y +=\n    20 * sin(time * 0.001 + worldInputs.position.x * 0.05);\n  worldInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  sphere(50);\n}</code></pre><p>There are also many uses in updating values per pixel. This can be a good\nway to give your sketch texture and detail. For example, instead of having a single\nshininess or metalness value for a whole shape, you could vary it in different spots on its surface:</p>\n<pre><code class=\"language-js example\">let myShader;\nlet environment;\n\nasync function setup() {\n  environment = await loadImage('assets/outdoor_spheremap.jpg');\n\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  pixelInputs.begin();\n  let factor = sin(\n    TWO_PI * (pixelInputs.texCoord.x + pixelInputs.texCoord.y)\n  );\n  pixelInputs.shininess = mix(1, 100, factor);\n  pixelInputs.metalness = factor;\n  pixelInputs.end();\n}\n\nfunction draw() {\n  panorama(environment);\n  ambientLight(100);\n  imageLight(environment);\n  rotateY(millis() * 0.001);\n  shader(myShader);\n  noStroke();\n  fill(255);\n  specularMaterial(150);\n  sphere(50);\n}</code></pre><p>A technique seen often in games called bump mapping is to vary the\nnormal, which is the orientation of the surface, per pixel to create texture\nrather than using many tightly packed vertices. Sometimes this can come from\nbump images, but it can also be done generatively with math.</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  pixelInputs.begin();\n  pixelInputs.normal.x += 0.2 * sin(\n    sin(TWO_PI * dot(pixelInputs.texCoord.yx, vec2(10, 25)))\n  );\n  pixelInputs.normal.y += 0.2 * sin(\n    sin(TWO_PI * dot(pixelInputs.texCoord, vec2(10, 25)))\n  );\n  pixelInputs.normal = normalize(pixelInputs.normal);\n  pixelInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  ambientLight(150);\n  pointLight(\n    255, 255, 255,\n    100*cos(frameCount*0.04), -50, 100*sin(frameCount*0.04)\n  );\n  noStroke();\n  fill('red');\n  shininess(200);\n  specularMaterial(255);\n  sphere(50);\n}</code></pre><p>You can also update the final color directly instead of modifying\nlighting settings. Sometimes in photographs, a light source is placed\nbehind the subject to create rim lighting, where the edges of the\nsubject are lit up. This can be simulated by adding white to the final\ncolor on parts of the shape that are facing away from the camera.</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildMaterialShader(material);\n}\n\nfunction material() {\n  let myNormal = sharedVec3();\n\n  pixelInputs.begin();\n  myNormal = pixelInputs.normal;\n  pixelInputs.end();\n\n  finalColor.begin();\n  finalColor.set(mix(\n    [1, 1, 1, 1],\n    finalColor.color,\n    abs(dot(myNormal, [0, 0, 1]))\n  ));\n  finalColor.end();\n}\n\nfunction draw() {\n  background(255);\n  rotateY(millis() * 0.001);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  torus(30);\n}</code></pre><p>Like the <code>modify()</code> method on shaders,\nadvanced users can also fill in hooks using <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\ninstead of JavaScript.\nRead the <a href=\"#/p5.Shader/modify\">reference entry for <code>modify()</code></a>\nfor more info.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function building a p5.strands shader.",
              "type": "Function"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The material shader.",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "An object specifying p5.strands hooks in GLSL.",
              "type": "Object"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The material shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The material shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "createCapture",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1594,
      "itemtype": "method",
      "description": "<p>Creates a <code><video></code> element that \"captures\" the audio/video stream from\nthe webcam and microphone.</p>\n<p><code>createCapture()</code> returns a new\n<a href=\"#/p5.MediaElement\">p5.MediaElement</a> object. Videos are shown by\ndefault. They can be hidden by calling <code>capture.hide()</code> and drawn to the\ncanvas using <a href=\"#/p5/image\">image()</a>.</p>\n<p>The first parameter, <code>type</code>, is optional. It sets the type of capture to\nuse. By default, <code>createCapture()</code> captures both audio and video. If <code>VIDEO</code>\nis passed, as in <code>createCapture(VIDEO)</code>, only video will be captured.\nIf <code>AUDIO</code> is passed, as in <code>createCapture(AUDIO)</code>, only audio will be\ncaptured. A constraints object can also be passed to customize the stream.\nSee the <a href=\"http://w3c.github.io/mediacapture-main/getusermedia.html#media-track-constraints\" target=\"_blank\">\nW3C documentation</a> for possible properties. Different browsers support different\nproperties.</p>\n<p>The 'flipped' property is an optional property which can be set to <code>{flipped:true}</code>\nto mirror the video output.If it is true then it means that video will be mirrored\nor flipped and if nothing is mentioned then by default it will be <code>false</code>.</p>\n<p>The second parameter,<code>callback</code>, is optional. It's a function to call once\nthe capture is ready for use. The callback function should have one\nparameter, <code>stream</code>, that's a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaStream\" target=\"_blank\">MediaStream</a> object.</p>\n<p>Note: <code>createCapture()</code> only works when running a sketch locally or using HTTPS. Learn more\n<a href=\"http://stackoverflow.com/questions/34197653/getusermedia-in-chrome-47-without-using-https\" target=\"_blank\">here</a>\nand <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\" target=\"_blank\">here</a>.</p>\n",
      "example": [
        "function setup() {\n  noCanvas();\n\n  // Create the video capture.\n  createCapture(VIDEO);\n\n  describe('A video stream from the webcam.');\n}",
        "let capture;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create the video capture and hide the element.\n  capture = createCapture(VIDEO);\n  capture.hide();\n\n  describe('A video stream from the webcam with inverted colors.');\n}\n\nfunction draw() {\n  // Draw the video capture within the canvas.\n  image(capture, 0, 0, width, width * capture.height / capture.width);\n\n  // Invert the colors in the stream.\n  filter(INVERT);\n}",
        "let capture;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create the video capture with mirrored output.\n  capture = createCapture(VIDEO,{ flipped:true });\n  capture.size(100,100);\n\n  describe('A video stream from the webcam with flipped or mirrored output.');\n}",
        "function setup() {\n  createCanvas(480, 120);\n\n  // Create a constraints object.\n  let constraints = {\n    video: {\n      mandatory: {\n        minWidth: 1280,\n        minHeight: 720\n      },\n      optional: [{ maxFrameRate: 10 }]\n    },\n    audio: false\n  };\n\n  // Create the video capture.\n  createCapture(constraints);\n\n  describe('A video stream from the webcam.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "type",
              "description": "type of capture, either AUDIO or VIDEO,\nor a constraints object. Both video and audio\naudio streams are captured by default.",
              "optional": 1,
              "type": "AUDIO|VIDEO|Object"
            },
            {
              "name": "flipped",
              "description": "flip the capturing video and mirror the output with <code>{flipped:true}</code>. By\ndefault it is false.",
              "optional": 1,
              "type": "Object"
            },
            {
              "name": "callback",
              "description": "function to call once the stream\nhas loaded.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
            "type": "p5.MediaElement"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.MediaElement\">p5.MediaElement</a> object.",
        "type": "p5.MediaElement"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "stroke",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1604,
      "itemtype": "method",
      "description": "<p>Sets the color used to draw points, lines, and the outlines of shapes.</p>\n<p>Calling <code>stroke(255, 165, 0)</code> or <code>stroke('orange')</code> means all shapes drawn\nafter calling <code>stroke()</code> will be outlined with the color orange. The way\nthese parameters are interpreted may be changed with the\n<a href=\"#/p5/colorMode\">colorMode()</a> function.</p>\n<p>The version of <code>stroke()</code> with one parameter interprets the value one of\nthree ways. If the parameter is a <code>Number</code>, it's interpreted as a grayscale\nvalue. If the parameter is a <code>String</code>, it's interpreted as a CSS color\nstring. A <a href=\"#/p5.Color\">p5.Color</a> object can also be provided to\nset the stroke color.</p>\n<p>The version of <code>stroke()</code> with two parameters interprets the first one as a\ngrayscale value. The second parameter sets the alpha (transparency) value.</p>\n<p>The version of <code>stroke()</code> with three parameters interprets them as RGB, HSB,\nor HSL colors, depending on the current <code>colorMode()</code>.</p>\n<p>The version of <code>stroke()</code> with four parameters interprets them as RGBA, HSBA,\nor HSLA colors, depending on the current <code>colorMode()</code>. The last parameter\nsets the alpha (transparency) value.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A grayscale value.\n  strokeWeight(4);\n  stroke(51);\n  square(20, 20, 60);\n\n  describe('A white square with a dark charcoal gray outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // R, G & B values.\n  stroke(255, 204, 0);\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a yellow outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use HSB color.\n  colorMode(HSB);\n\n  // H, S & B values.\n  strokeWeight(4);\n  stroke(255, 204, 100);\n  square(20, 20, 60);\n\n  describe('A white square with a royal blue outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A CSS named color.\n  stroke('red');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a red outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Three-digit hex RGB notation.\n  stroke('#fae');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a pink outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Six-digit hex RGB notation.\n  stroke('#222222');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a black outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Integer RGB notation.\n  stroke('rgb(0, 255, 0)');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a bright green outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Integer RGBA notation.\n  stroke('rgba(0, 255, 0, 0.25)');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a soft green outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Percentage RGB notation.\n  stroke('rgb(100%, 0%, 10%)');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a red outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Percentage RGBA notation.\n  stroke('rgba(100%, 0%, 100%, 0.5)');\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a dark fuchsia outline.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // A p5.Color object.\n  stroke(color(0, 0, 255));\n  strokeWeight(4);\n  square(20, 20, 60);\n\n  describe('A white square with a blue outline.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red value if color mode is RGB or hue value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green value if color mode is RGB or saturation value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue value if color mode is RGB or brightness value if color mode is HSB.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha value, controls transparency (0 - transparent, 255 - opaque).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "a color string.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "a grayscale value.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "values",
              "description": "an array containing the red, green, blue,\nand alpha components of the color.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "the stroke color.",
              "type": "p5.Color"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "createColorPicker",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 1614,
      "itemtype": "method",
      "description": "<p>Creates a color picker element.</p>\n<p>The parameter, <code>value</code>, is optional. If a color string or\n<a href=\"#/p5.Color\">p5.Color</a> object is passed, it will set the default\ncolor.</p>\n<p>Color pickers extend the <a href=\"#/p5.Element\">p5.Element</a> class with a\ncouple of helpful methods for managing colors:</p>\n<ul><li><code>myPicker.value()</code> returns the current color as a hex string in the format <code>'#rrggbb'</code>.</li><li><code>myPicker.color()</code> returns the current color as a <a href=\"#/p5.Color\">p5.Color</a> object.</li></ul>",
      "example": [
        "let myPicker;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a color picker and set its position.\n  myPicker = createColorPicker('deeppink');\n  myPicker.position(0, 100);\n\n  describe('A pink square with a color picker beneath it. The square changes color when the user picks a new color.');\n}\n\nfunction draw() {\n  // Use the color picker to paint the background.\n  let c = myPicker.color();\n  background(c);\n}",
        "let myPicker;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a color picker and set its position.\n  myPicker = createColorPicker('deeppink');\n  myPicker.position(0, 100);\n\n  describe('A number with the format \"#rrggbb\" is displayed on a pink canvas. The background color and number change when the user picks a new color.');\n}\n\nfunction draw() {\n  // Use the color picker to paint the background.\n  let c = myPicker.value();\n  background(c);\n\n  // Display the current color as a hex string.\n  text(c, 25, 55);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "default color as a <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/color\" target=\"_blank\">CSS color string</a>.",
              "optional": 1,
              "type": "String|p5.Color"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadMaterialShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1630,
      "itemtype": "method",
      "description": "<p>Loads a new shader from a file that can change how fills are drawn. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it\nto any fills you draw.</p>\n<p>Since this function loads data from another file, it returns a <code>Promise</code>.\nUse it in an <code>async function setup</code>, and <code>await</code> its result.</p>\n<pre><code class=\"language-js\">let myShader;\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = await loadMaterialShader('myMaterial.js');\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  sphere(50);\n}</code></pre><p>Inside your shader file, you can call p5.strands hooks to change parts of the shader. For\nexample, you might use the <code>worldInputs</code> hook to change each vertex, or you\nmight use the <code>pixelInputs</code> hook to change each pixel on the surface of a shape.</p>\n<pre><code class=\"language-js\">// myMaterial.js\nlet time = millis();\nworldInputs.begin();\nworldInputs.position.y +=\n  20 * sin(time * 0.001 + worldInputs.position.x * 0.05);\nworldInputs.end();</code></pre><p>Read the reference for <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader</code></a>,\nthe version of <code>loadMaterialShader</code> that takes in a function instead of a separate file,\nfor a full list of hooks you can use and examples for each.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is passed, as in\n<code>loadMaterialShader('myShader.js', onLoaded)</code>, then the <code>onLoaded()</code> function will be called\nonce the shader loads. The shader will be passed to <code>onLoaded()</code> as its only argument.\nThe return value of <code>handleData()</code>, if present, will be used as the final return value of\n<code>loadMaterialShader('myShader.js', onLoaded)</code>.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "url",
              "description": "The URL of your p5.strands JavaScript file.",
              "type": "String"
            },
            {
              "name": "onSuccess",
              "description": "A callback function to run when loading completes.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "onFailure",
              "description": "A callback function to run when loading fails.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "The material shader.",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "The material shader.",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "save",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1635,
      "itemtype": "method",
      "description": "Saves a given element(image, text, json, csv, wav, or html) to the client's\ncomputer. The first parameter can be a pointer to element we want to save.\nThe element can be one of <a href=\"#/p5.Element\">p5.Element</a>,an Array of\nStrings, an Array of JSON, a JSON object, a <a href=\"#/p5.Table\">p5.Table\n</a>, a <a href=\"#/p5.Image\">p5.Image</a>, or a p5.SoundFile (requires\np5.sound). The second parameter is a filename (including extension).The\nthird parameter is for options specific to this type of object. This method\nwill save a file that fits the given parameters.\nIf it is called without specifying an element, by default it will save the\nwhole canvas as an image file. You can optionally specify a filename as\nthe first parameter in such a case.\nNote that it is not recommended to\ncall this method within draw, as it will open a new save dialog on every\nrender.",
      "example": [
        "// META:norender\n// Saves the canvas as an image\ncnv = createCanvas(300, 300);\nsave(cnv, 'myCanvas.jpg');\n\n// Saves the canvas as an image by default\nsave('myCanvas.jpg');\ndescribe('An example for saving a canvas as an image.');",
        "// META:norender\n// Saves p5.Image as an image\nimg = createImage(10, 10);\nsave(img, 'myImage.png');\ndescribe('An example for saving a p5.Image element as an image.');",
        "// META:norender\n// Saves p5.Renderer object as an image\nobj = createGraphics(100, 100);\nsave(obj, 'myObject.png');\ndescribe('An example for saving a p5.Renderer element.');",
        "// META:norender\nlet myTable = new p5.Table();\n// Saves table as html file\nsave(myTable, 'myTable.html');\n\n// Comma Separated Values\nsave(myTable, 'myTable.csv');\n\n// Tab Separated Values\nsave(myTable, 'myTable.tsv');\n\ndescribe(`An example showing how to save a table in formats of\n  HTML, CSV and TSV.`);",
        "// META:norender\nlet myJSON = { a: 1, b: true };\n\n// Saves pretty JSON\nsave(myJSON, 'my.json');\n\n// Optimizes JSON filesize\nsave(myJSON, 'my.json', true);\n\ndescribe('An example for saving JSON to a txt file with some extra arguments.');",
        "// META:norender\n// Saves array of strings to text file with line breaks after each item\nlet arrayOfStrings = ['a', 'b'];\nsave(arrayOfStrings, 'my.txt');\ndescribe(`An example for saving an array of strings to text file\n  with line breaks.`);"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "objectOrFilename",
              "description": "If filename is provided, will\nsave canvas as an image with\neither png or jpg extension\ndepending on the filename.\nIf object is provided, will\nsave depending on the object\nand filename (see examples\nabove).",
              "optional": 1,
              "type": "Object|String"
            },
            {
              "name": "filename",
              "description": "If an object is provided as the first\nparameter, then the second parameter\nindicates the filename,\nand should include an appropriate\nfile extension (see examples above).",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "options",
              "description": "Additional options depend on\nfiletype. For example, when saving JSON,\n<code>true</code> indicates that the\noutput will be optimized for filesize,\nrather than readability.",
              "optional": 1,
              "type": "Boolean|String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "bezierOrder",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 1649,
      "itemtype": "method",
      "description": "<p>Influences the shape of the Bézier curve segment in a custom shape.\nBy default, this is 3; the other possible parameter is 2. This\nresults in quadratic Bézier curves.</p>\n<p><code>bezierVertex()</code> adds a curved segment to custom shapes. The Bézier curves\nit creates are defined like those made by the\n<a href=\"#/p5/bezier\">bezier()</a> function. <code>bezierVertex()</code> must be\ncalled between the\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> functions. There must be at least\none call to <a href=\"#/p5/vertex\">bezierVertex()</a>, before\na number of <code>bezierVertex()</code> calls that is a multiple of the parameter\nset by <a href=\"#/p5/bezierOrder\">bezierOrder(...)</a> (default 3).</p>\n<p>Each curve of order 3 requires three calls to <code>bezierVertex</code>, so\n2 curves would need 7 calls to <code>bezierVertex()</code>:\n(1 one initial anchor point, two sets of 3 curves describing the curves)\nWith <code>bezierOrder(2)</code>, two curves would need 5 calls: 1 + 2 + 2.</p>\n<p>Bézier curves can also be drawn in 3D using WebGL mode.</p>\n<p>Note: <code>bezierVertex()</code> won’t work when an argument is passed to\n<a href=\"#/p5/beginShape\">beginShape()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shape.\n  noFill();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // set the order to 2 for a quadratic Bézier curve\n  bezierOrder(2);\n\n  // Add the first anchor point.\n  bezierVertex(30, 20);\n\n  // Add the Bézier vertex.\n  bezierVertex(80, 20);\n  bezierVertex(50, 50);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('A black curve drawn on a gray square. The curve starts at the top-left corner and ends at the center.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "order",
              "description": "The new order to set. Can be either 2 or 3, by default 3",
              "type": "Number"
            }
          ]
        },
        {
          "params": [],
          "return": {
            "description": "The current Bézier order.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The current Bézier order.",
        "type": "Number"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "doubleClicked",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1658,
      "itemtype": "method",
      "description": "<p>A function that's called once when a mouse button is clicked twice quickly.</p>\n<p>Declaring the function <code>doubleClicked()</code> sets a code block to run\nautomatically when the user presses and releases the mouse button twice\nquickly:</p>\n<pre><code class=\"language-js\">function doubleClicked() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>doubleClicked()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function doubleClicked() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>doubleClicked()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the double-click event:</p>\n<pre><code class=\"language-js\">function doubleClicked(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>On touchscreen devices, code placed in <code>doubleClicked()</code> will run after two\ntouches that occur within a short time.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n",
      "example": [
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black square at its center. The inner square changes color when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the square.\n  fill(value);\n\n  // Draw the square.\n  square(25, 25, 50);\n}\n\n// Toggle the square's color when the user double-clicks.\nfunction doubleClicked() {\n  if (value === 0) {\n    value = 255;\n  } else {\n    value = 0;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "let value = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a black circle at its center. When the user double-clicks on the circle, it changes color to white.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the circle.\n  fill(value);\n\n  // Draw the circle.\n  circle(50, 50, 80);\n}\n\n// Reassign value to 255 when the user double-clicks on the circle.\nfunction doubleClicked() {\n  if (dist(50, 50, mouseX, mouseY) < 40) {\n    value = 255;\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>MouseEvent</code> argument.",
              "optional": 1,
              "type": "MouseEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "baseMaterialShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1661,
      "itemtype": "method",
      "description": "<p>Returns the default shader used for fills when lights or textures are used.</p>\n<p>Calling <a href=\"#/p5/buildMaterialShader\"><code>buildMaterialShader(shaderFunction)</code></a>\nis equivalent to calling <code>baseMaterialShader().modify(shaderFunction)</code>.</p>\n<p>Read <a href=\"#/p5/buildMaterialShader\">the <code>buildMaterialShader</code> reference</a> or\ncall <code>baseMaterialShader().inspectHooks()</code> for more information on what you can do with\nthe base material shader.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The base material shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The base material shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "baseFilterShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1681,
      "itemtype": "method",
      "description": "<p>Returns the base shader used for filters.</p>\n<p>Calling <a href=\"#/p5/buildFilterShader\"><code>buildFilterShader(shaderFunction)</code></a>\nis equivalent to calling <code>baseFilterShader().modify(shaderFunction)</code>.</p>\n<p>Read <a href=\"#/p5/buildFilterShader\">the <code>buildFilterShader</code> reference</a> or\ncall <code>baseFilterShader().inspectHooks()</code> for more information on what you can do with\nthe base filter shader.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The base filter shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The base filter shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "erase",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1682,
      "itemtype": "method",
      "description": "<p>Starts using shapes to erase parts of the canvas.</p>\n<p>All drawing that follows <code>erase()</code> will subtract from the canvas, revealing\nthe web page underneath. The erased areas will become transparent, allowing\nthe content behind the canvas to show through. The\n<a href=\"#/p5/fill\">fill()</a>, <a href=\"#/p5/stroke\">stroke()</a>, and\n<a href=\"#/p5/blendMode\">blendMode()</a> have no effect once <code>erase()</code> is\ncalled.</p>\n<p>The <code>erase()</code> function has two optional parameters. The first parameter\nsets the strength of erasing by the shape's interior. A value of 0 means\nthat no erasing will occur. A value of 255 means that the shape's interior\nwill fully erase the content underneath. The default value is 255\n(full strength).</p>\n<p>The second parameter sets the strength of erasing by the shape's edge. A\nvalue of 0 means that no erasing will occur. A value of 255 means that the\nshape's edge will fully erase the content underneath. The default value is\n255 (full strength).</p>\n<p>To cancel the erasing effect, use the <a href=\"#/p5/noErase\">noErase()</a>\nfunction.</p>\n<p><code>erase()</code> has no effect on drawing done with the\n<a href=\"#/p5/image\">image()</a> and\n<a href=\"#/p5/background\">background()</a> functions.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(100, 100, 250);\n\n  // Draw a pink square.\n  fill(250, 100, 100);\n  square(20, 20, 60);\n\n  // Erase a circular area.\n  erase();\n  circle(25, 30, 30);\n  noErase();\n\n  describe('A purple canvas with a pink square in the middle. A circle is erased from the top-left, leaving a hole.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(100, 100, 250);\n\n  // Draw a pink square.\n  fill(250, 100, 100);\n  square(20, 20, 60);\n\n  // Erase a circular area.\n  strokeWeight(5);\n  erase(150, 255);\n  circle(25, 30, 30);\n  noErase();\n\n  describe('A purple canvas with a pink square in the middle. A circle at the top-left partially erases its interior and a fully erases its outline.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "strengthFill",
              "description": "a number (0-255) for the strength of erasing under a shape's interior.\nDefaults to 255, which is full strength.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "strengthStroke",
              "description": "a number (0-255) for the strength of erasing under a shape's edge.\nDefaults to 255, which is full strength.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "noErase",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 1719,
      "itemtype": "method",
      "description": "<p>Ends erasing that was started with <a href=\"#/p5/erase\">erase()</a>.</p>\n<p>The <a href=\"#/p5/fill\">fill()</a>, <a href=\"#/p5/stroke\">stroke()</a>, and\n<a href=\"#/p5/blendMode\">blendMode()</a> settings will return to what they\nwere prior to calling <a href=\"#/p5/erase\">erase()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(235, 145, 15);\n\n  // Draw the left rectangle.\n  noStroke();\n  fill(30, 45, 220);\n  rect(30, 10, 10, 80);\n\n  // Erase a circle.\n  erase();\n  circle(50, 50, 60);\n  noErase();\n\n  // Draw the right rectangle.\n  rect(70, 10, 10, 80);\n\n  describe('An orange canvas with two tall blue rectangles. A circular hole in the center erases the rectangle on the left but not the one on the right.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "createInput",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 1721,
      "itemtype": "method",
      "description": "<p>Creates a text <code><input></input></code> element.</p>\n<p>Call <code>myInput.size()</code> to set the length of the text box.</p>\n<p>The first parameter, <code>value</code>, is optional. It's a string that sets the\ninput's default value. The input is blank by default.</p>\n<p>The second parameter, <code>type</code>, is also optional. It's a string that\nspecifies the type of text being input. See MDN for a full\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input\" target=\"_blank\">list of options</a>.\nThe default is <code>'text'</code>.</p>\n",
      "example": [
        "let myInput;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create an input element and place it\n  // beneath the canvas.\n  myInput = createInput();\n  myInput.position(0, 100);\n\n  describe('A gray square with a text box beneath it. The text in the square changes when the user types something new in the input bar.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use the input to display a message.\n  let msg = myInput.value();\n  text(msg, 25, 55);\n}",
        "let myInput;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create an input element and place it\n  // beneath the canvas. Set its default\n  // text to \"hello!\".\n  myInput = createInput('hello!');\n  myInput.position(0, 100);\n\n  describe('The text \"hello!\" written at the center of a gray square. A text box beneath the square also says \"hello!\". The text in the square changes when the user types something new in the input bar.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use the input to display a message.\n  let msg = myInput.value();\n  text(msg, 25, 55);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "default value of the input box. Defaults to an empty string <code>''</code>.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "type",
              "description": "type of input. Defaults to <code>'text'</code>.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
            "type": "p5.Element"
          }
        },
        {
          "params": [
            {
              "name": "value",
              "description": "",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Element\">p5.Element</a> object.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "buildNormalShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1786,
      "itemtype": "method",
      "description": "<p>Create a new shader that can change how fills are drawn, based on the material used\nwhen <a href=\"#/p5/normalMaterial\"><code>normalMaterial()</code></a> is active. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it to any fills\nyou draw.</p>\n<p>The main way to use <code>buildNormalShader</code> is to pass a function in as a parameter.\nThis will let you create a shader using p5.strands.</p>\n<p>In your function, you can call hooks to change part of the shader. In a material\nshader, these are the hooks available:</p>\n<ul><li><a href=\"#/p5/objectInputs\"><code>objectInputs</code></a>: Update vertices before any positioning has been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/worldInputs\"><code>worldInputs</code></a>: Update vertices after transformations have been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/cameraInputs\"><code>cameraInputs</code></a>: Update vertices after transformations have been applied, relative to the camera. Your function gets run on every vertex.</li><li><a href=\"#/p5/finalColor\"><code>finalColor</code></a>: Update or replace the pixel color on the surface of a shape. Your function gets run on every pixel.</li></ul><p>Read the linked reference page for each hook for more information about how to use them.</p>\n<p>One thing you may want to do is update the position of all the vertices in an object over time:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildNormalShader(material);\n}\n\nfunction material() {\n  let time = millis();\n  worldInputs.begin();\n  worldInputs.position.y +=\n    20. * sin(time * 0.001 + worldInputs.position.x * 0.05);\n  worldInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  noStroke();\n  sphere(50);\n}</code></pre><p>You may also want to change the colors used. By default, the x, y, and z values of the orientation\nof the surface are mapped directly to red, green, and blue. But you can pick different colors:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildNormalShader(material);\n}\n\nfunction material() {\n  cameraInputs.begin();\n  cameraInputs.normal = abs(cameraInputs.normal);\n  cameraInputs.end();\n\n  finalColor.begin();\n  // Map the r, g, and b values of the old normal to new colors\n  // instead of just red, green, and blue:\n  let newColor =\n    finalColor.color.r * [89, 240, 232] / 255 +\n    finalColor.color.g * [240, 237, 89] / 255 +\n    finalColor.color.b * [205, 55, 222] / 255;\n  newColor = newColor / (finalColor.color.r + finalColor.color.g + finalColor.color.b);\n  finalColor.set([newColor.r, newColor.g, newColor.b, finalColor.color.a]);\n  finalColor.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  noStroke();\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.015);\n  box(100);\n}</code></pre><p>Like the <code>modify()</code> method on shaders,\nadvanced users can also fill in hooks using <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\ninstead of JavaScript.\nRead the <a href=\"#/p5.Shader/modify\">reference entry for <code>modify()</code></a>\nfor more info.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function building a p5.strands shader.",
              "type": "Function"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The normal shader.",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "An object specifying p5.strands hooks in GLSL.",
              "type": "Object"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The normal shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The normal shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "mouseWheel",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1798,
      "itemtype": "method",
      "description": "<p>A function that's called once when the mouse wheel moves.</p>\n<p>Declaring the function <code>mouseWheel()</code> sets a code block to run\nautomatically when the user scrolls with the mouse wheel:</p>\n<pre><code class=\"language-js\">function mouseWheel() {\n  // Code to run.\n}</code></pre><p>The mouse system variables, such as <a href=\"#/p5/mouseX\">mouseX</a> and\n<a href=\"#/p5/mouseY\">mouseY</a>, will be updated with their most recent\nvalue when <code>mouseWheel()</code> is called by p5.js:</p>\n<pre><code class=\"language-js\">function mouseWheel() {\n  if (mouseX &lt; 50) {\n    // Code to run if the mouse is on the left.\n  }\n\n  if (mouseY &gt; 50) {\n    // Code to run if the mouse is near the bottom.\n  }\n}</code></pre><p>The parameter, <code>event</code>, is optional. <code>mouseWheel()</code> is always passed a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\" target=\"_blank\">MouseEvent</a>\nobject with properties that describe the mouse scroll event:</p>\n<pre><code class=\"language-js\">function mouseWheel(event) {\n  // Code to run that uses the event.\n  console.log(event);\n}</code></pre><p>The <code>event</code> object has many properties including <code>delta</code>, a <code>Number</code>\ncontaining the distance that the user scrolled. For example, <code>event.delta</code>\nmight have the value 5 when the user scrolls up. <code>event.delta</code> is positive\nif the user scrolls up and negative if they scroll down. The signs are\nopposite on macOS with \"natural\" scrolling enabled.</p>\n<p>Browsers may have default behaviors attached to various mouse events. For\nexample, some browsers highlight text when the user moves the mouse while\npressing a mouse button. To prevent any default behavior for this event,\nadd <code>return false;</code> to the end of the function.</p>\n<p>Note: On Safari, <code>mouseWheel()</code> may only work as expected if\n<code>return false;</code> is added at the end of the function.</p>\n",
      "example": [
        "let circleSize = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. A white circle at its center grows up when the user scrolls the mouse wheel.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the circle\n  circle(circleSize, 50, 50);\n}\n\n// Increment circleSize when the user scrolls the mouse wheel.\nfunction mouseWheel() {\n  circleSize += 1;\n  // Uncomment to prevent any default behavior.\n  // return false;\n}",
        "let direction = '';\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square. An arrow at its center points up when the user scrolls up. The arrow points down when the user scrolls down.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Draw an arrow that points where\n  // the mouse last scrolled.\n  text(direction, 50, 50);\n}\n\n// Change direction when the user scrolls the mouse wheel.\nfunction mouseWheel(event) {\n  if (event.delta > 0) {\n    direction = '▲';\n  } else {\n    direction = '▼';\n  }\n  // Uncomment to prevent any default behavior.\n  // return false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "event",
              "description": "optional <code>WheelEvent</code> argument.",
              "optional": 1,
              "type": "WheelEvent"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "saveJSON",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1800,
      "itemtype": "method",
      "description": "<p>Saves an <code>Object</code> or <code>Array</code> to a JSON file.</p>\n<p>JavaScript Object Notation\n(<a href=\"https://developer.mozilla.org/en-US/docs/Glossary/JSON\" target=\"_blank\">JSON</a>)\nis a standard format for sending data between applications. The format is\nbased on JavaScript objects which have keys and values. JSON files store\ndata in an object with strings as keys. Values can be strings, numbers,\nBooleans, arrays, <code>null</code>, or other objects.</p>\n<p>The first parameter, <code>json</code>, is the data to save. The data can be an array,\nas in <code>[1, 2, 3]</code>, or an object, as in\n<code>{ x: 50, y: 50, color: 'deeppink' }</code>.</p>\n<p>The second parameter, <code>filename</code>, is a string that sets the file's name.\nFor example, calling <code>saveJSON([1, 2, 3], 'data.json')</code> saves the array\n<code>[1, 2, 3]</code> to a file called <code>data.json</code> on the user's computer.</p>\n<p>The third parameter, <code>optimize</code>, is optional. If <code>true</code> is passed, as in\n<code>saveJSON([1, 2, 3], 'data.json', true)</code>, then all unneeded whitespace will\nbe removed to reduce the file size.</p>\n<p>Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an array.\n    let data = [1, 2, 3];\n\n    // Save the JSON file.\n    saveJSON(data, 'numbers.json');\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an object.\n    let data = { x: mouseX, y: mouseY };\n\n    // Save the JSON file.\n    saveJSON(data, 'state.json');\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an object.\n    let data = { x: mouseX, y: mouseY };\n\n    // Save the JSON file and reduce its size.\n    saveJSON(data, 'state.json', true);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "json",
              "description": "data to save.",
              "type": "Array|Object"
            },
            {
              "name": "filename",
              "description": "name of the file to be saved.",
              "type": "String"
            },
            {
              "name": "optimize",
              "description": "whether to trim unneeded whitespace. Defaults\nto <code>true</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "pop",
      "file": "src/scripts/parsers/in/p5.js/src/core/transform.js",
      "line": 1818,
      "itemtype": "method",
      "description": "<p>Ends a drawing group that contains its own styles and transformations.</p>\n<p>By default, styles such as <a href=\"#/p5/fill\">fill()</a> and\ntransformations such as <a href=\"#/p5/rotate\">rotate()</a> are applied to\nall drawing that follows. The <a href=\"#/p5/push\">push()</a> and <code>pop()</code>\nfunctions can limit the effect of styles and transformations to a specific\ngroup of shapes, images, and text. For example, a group of shapes could be\ntranslated to follow the mouse without affecting the rest of the sketch:</p>\n<pre><code class=\"language-js\">// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw the face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\nellipse(-20, -20, 30, 20);\n\n// Draw the right eye.\nellipse(20, -20, 30, 20);\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);</code></pre><p>In the code snippet above, the bug's position isn't affected by\n<code>translate(mouseX, mouseY)</code> because that transformation is contained\nbetween <a href=\"#/p5/push\">push()</a> and <code>pop()</code>. The bug moves around\nthe entire canvas as expected.</p>\n<p>Note: <a href=\"#/p5/push\">push()</a> and <code>pop()</code> are always called as a\npair. Both functions are required to begin and end a drawing group.</p>\n<p><a href=\"#/p5/push\">push()</a> and <code>pop()</code> can also be nested to create\nsubgroups. For example, the code snippet above could be changed to give\nmore detail to the frog’s eyes:</p>\n<pre><code class=\"language-js\">// Begin the drawing group.\npush();\n\n// Translate the origin to the mouse's position.\ntranslate(mouseX, mouseY);\n\n// Style the face.\nnoStroke();\nfill('green');\n\n// Draw a face.\ncircle(0, 0, 60);\n\n// Style the eyes.\nfill('white');\n\n// Draw the left eye.\npush();\ntranslate(-20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// Draw the right eye.\npush();\ntranslate(20, -20);\nellipse(0, 0, 30, 20);\nfill('black');\ncircle(0, 0, 8);\npop();\n\n// End the drawing group.\npop();\n\n// Draw a bug.\nlet x = random(0, 100);\nlet y = random(0, 100);\ntext('🦟', x, y);</code></pre><p>In this version, the code to draw each eye is contained between its own\n<a href=\"#/p5/push\">push()</a> and <code>pop()</code> functions. Doing so makes it\neasier to add details in the correct part of a drawing.</p>\n<p><a href=\"#/p5/push\">push()</a> and <code>pop()</code> contain the effects of the\nfollowing functions:</p>\n<ul><li><a href=\"#/p5/fill\">fill()</a></li><li><a href=\"#/p5/noFill\">noFill()</a></li><li><a href=\"#/p5/noStroke\">noStroke()</a></li><li><a href=\"#/p5/stroke\">stroke()</a></li><li><a href=\"#/p5/tint\">tint()</a></li><li><a href=\"#/p5/noTint\">noTint()</a></li><li><a href=\"#/p5/strokeWeight\">strokeWeight()</a></li><li><a href=\"#/p5/strokeCap\">strokeCap()</a></li><li><a href=\"#/p5/strokeJoin\">strokeJoin()</a></li><li><a href=\"#/p5/imageMode\">imageMode()</a></li><li><a href=\"#/p5/rectMode\">rectMode()</a></li><li><a href=\"#/p5/ellipseMode\">ellipseMode()</a></li><li><a href=\"#/p5/colorMode\">colorMode()</a></li><li><a href=\"#/p5/textAlign\">textAlign()</a></li><li><a href=\"#/p5/textFont\">textFont()</a></li><li><a href=\"#/p5/textSize\">textSize()</a></li><li><a href=\"#/p5/textLeading\">textLeading()</a></li><li><a href=\"#/p5/applyMatrix\">applyMatrix()</a></li><li><a href=\"#/p5/resetMatrix\">resetMatrix()</a></li><li><a href=\"#/p5/rotate\">rotate()</a></li><li><a href=\"#/p5/scale\">scale()</a></li><li><a href=\"#/p5/shearX\">shearX()</a></li><li><a href=\"#/p5/shearY\">shearY()</a></li><li><a href=\"#/p5/translate\">translate()</a></li></ul><p>In WebGL mode, <a href=\"#/p5/push\">push()</a> and <code>pop()</code> contain the\neffects of a few additional styles:</p>\n<ul><li><a href=\"#/p5/setCamera\">setCamera()</a></li><li><a href=\"#/p5/ambientLight\">ambientLight()</a></li><li><a href=\"#/p5/directionalLight\">directionalLight()</a></li><li><a href=\"#/p5/pointLight\">pointLight()</a> <a href=\"#/p5/texture\">texture()</a></li><li><a href=\"#/p5/specularMaterial\">specularMaterial()</a></li><li><a href=\"#/p5/shininess\">shininess()</a></li><li><a href=\"#/p5/normalMaterial\">normalMaterial()</a></li><li><a href=\"#/p5/shader\">shader()</a></li></ul>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Draw the left circle.\n  circle(25, 50, 20);\n\n  // Begin the drawing group.\n  push();\n\n  // Translate the origin to the center.\n  translate(50, 50);\n\n  // Style the circle.\n  strokeWeight(5);\n  stroke('royalblue');\n  fill('orange');\n\n  // Draw the circle.\n  circle(0, 0, 20);\n\n  // End the drawing group.\n  pop();\n\n  // Draw the right circle.\n  circle(75, 50, 20);\n\n  describe(\n    'Three circles drawn in a row on a gray background. The left and right circles are white with thin, black borders. The middle circle is orange with a thick, blue border.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(24);\n\n  describe('A mosquito buzzes in front of a green frog. The frog follows the mouse as the user moves.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Begin the drawing group.\n  push();\n\n  // Translate the origin to the mouse's position.\n  translate(mouseX, mouseY);\n\n  // Style the face.\n  noStroke();\n  fill('green');\n\n  // Draw a face.\n  circle(0, 0, 60);\n\n  // Style the eyes.\n  fill('white');\n\n  // Draw the left eye.\n  push();\n  translate(-20, -20);\n  ellipse(0, 0, 30, 20);\n  fill('black');\n  circle(0, 0, 8);\n  pop();\n\n  // Draw the right eye.\n  push();\n  translate(20, -20);\n  ellipse(0, 0, 30, 20);\n  fill('black');\n  circle(0, 0, 8);\n  pop();\n\n  // End the drawing group.\n  pop();\n\n  // Draw a bug.\n  let x = random(0, 100);\n  let y = random(0, 100);\n  text('🦟', x, y);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Two spheres drawn on a gray background. The sphere on the left is red and lit from the front. The sphere on the right is a blue wireframe.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the red sphere.\n  push();\n  translate(-25, 0, 0);\n  noStroke();\n  directionalLight(255, 0, 0, 0, 0, -1);\n  sphere(20);\n  pop();\n\n  // Draw the blue sphere.\n  push();\n  translate(25, 0, 0);\n  strokeWeight(0.3);\n  stroke(0, 0, 255);\n  noFill();\n  sphere(20);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Transform",
      "submodule": "Transform"
    },
    {
      "name": "createFileInput",
      "file": "src/scripts/parsers/in/p5.js/src/dom/dom.js",
      "line": 1824,
      "itemtype": "method",
      "description": "<p>Creates an <code><input></input></code> element of type <code>'file'</code>.</p>\n<p><code>createFileInput()</code> allows users to select local files for use in a sketch.\nIt returns a <a href=\"#/p5.File\">p5.File</a> object.</p>\n<p>The first parameter, <code>callback</code>, is a function that's called when the file\nloads. The callback function should have one parameter, <code>file</code>, that's a\n<a href=\"#/p5.File\">p5.File</a> object.</p>\n<p>The second parameter, <code>multiple</code>, is optional. It's a boolean value that\nallows loading multiple files if set to <code>true</code>. If <code>true</code>, <code>callback</code>\nwill be called once per file.</p>\n",
      "example": [
        "// Use the file input to select an image to\n// load and display.\nlet input;\nlet img;\n\nfunction setup() {\n  createCanvas(200, 200);\n\n  // Create a file input and place it beneath\n  // the canvas.\n  input = createFileInput(handleImage);\n  input.position(0, 100);\n\n  describe('A gray square with a file input beneath it. If the user selects an image file to load, it is displayed on the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the image if loaded.\n  if (img) {\n    image(img, 0, 0, width, height);\n  }\n}\n\n// Create an image if the file is an image.\nfunction handleImage(file) {\n  if (file.type === 'image') {\n    img = createImg(file.data, '');\n    img.hide();\n  } else {\n    img = null;\n  }\n}",
        "// Use the file input to select multiple images\n// to load and display.\nlet input;\nlet images = [];\n\nfunction setup() {\n  // Create a file input and place it beneath\n  // the canvas. Allow it to load multiple files.\n  input = createFileInput(handleImage, true);\n  input.position(0, 100);\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the images if loaded. Each image\n  // is drawn 20 pixels lower than the\n  // previous image.\n  for (let i = 0; i < images.length; i += 1) {\n    // Calculate the y-coordinate.\n    let y = i * 20;\n\n    // Draw the image.\n    image(images[i], 0, y, 100, 100);\n  }\n\n  describe('A gray square with a file input beneath it. If the user selects multiple image files to load, they are displayed on the square.');\n}\n\n// Create an image if the file is an image,\n// then add it to the images array.\nfunction handleImage(file) {\n  if (file.type === 'image') {\n    let img = createImg(file.data, '');\n    img.hide();\n    images.push(img);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "function to call once the file loads.",
              "type": "Function"
            },
            {
              "name": "multiple",
              "description": "allow multiple files to be selected.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "The new input element.",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "The new input element.",
        "type": "p5.Element"
      },
      "class": "p5",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loadNormalShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1847,
      "itemtype": "method",
      "description": "<p>Loads a new shader from a file that can change how fills are drawn, based on the material used\nwhen <a href=\"#/p5/normalMaterial\"><code>normalMaterial()</code></a> is active. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it\nto any fills you draw.</p>\n<p>Since this function loads data from another file, it returns a <code>Promise</code>.\nUse it in an <code>async function setup</code>, and <code>await</code> its result.</p>\n<pre><code class=\"language-js\">let myShader;\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = await loadNormalShader('myMaterial.js');\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  sphere(50);\n}</code></pre><p>Inside your shader file, you can call p5.strands hooks to change parts of the shader. For\nexample, you might use the <code>worldInputs</code> hook to change each vertex, or you\nmight use the <code>finalColor</code> hook to change the color of each pixel on the surface of a shape.</p>\n<pre><code class=\"language-js\">// myMaterial.js\nlet time = millis();\nworldInputs.begin();\nworldInputs.position.y +=\n  20 * sin(time * 0.001 + worldInputs.position.x * 0.05);\nworldInputs.end();</code></pre><p>Read the reference for <a href=\"#/p5/buildNormalShader\"><code>buildNormalShader</code></a>,\nthe version of <code>loadNormalShader</code> that takes in a function instead of a separate file,\nfor a full list of hooks you can use and examples for each.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is passed, as in\n<code>loadNormalShader('myShader.js', onLoaded)</code>, then the <code>onLoaded()</code> function will be called\nonce the shader loads. The shader will be passed to <code>onLoaded()</code> as its only argument.\nThe return value of <code>handleData()</code>, if present, will be used as the final return value of\n<code>loadNormalShader('myShader.js', onLoaded)</code>.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "url",
              "description": "The URL of your p5.strands JavaScript file.",
              "type": "String"
            },
            {
              "name": "onSuccess",
              "description": "A callback function to run when loading completes.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "onFailure",
              "description": "A callback function to run when loading fails.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "The normal shader.",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "The normal shader.",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "requestPointerLock",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1858,
      "itemtype": "method",
      "description": "<p>Locks the mouse pointer to its current position and makes it invisible.</p>\n<p><code>requestPointerLock()</code> allows the mouse to move forever without leaving the\nscreen. Calling <code>requestPointerLock()</code> locks the values of\n<a href=\"#/p5/mouseX\">mouseX</a>, <a href=\"#/p5/mouseY\">mouseY</a>,\n<a href=\"#/p5/pmouseX\">pmouseX</a>, and <a href=\"#/p5/pmouseY\">pmouseY</a>.\n<a href=\"#/p5/movedX\">movedX</a> and <a href=\"#/p5/movedY\">movedY</a>\ncontinue updating and can be used to get the distance the mouse moved since\nthe last frame was drawn. Calling\n<a href=\"#/p5/exitPointerLock\">exitPointerLock()</a> resumes updating the\nmouse system variables.</p>\n<p>Note: Most browsers require an input, such as a click, before calling\n<code>requestPointerLock()</code>. It’s recommended to call <code>requestPointerLock()</code> in\nan event function such as <a href=\"#/p5/doubleClicked\">doubleClicked()</a>.</p>\n",
      "example": [
        "let score = 0;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with the text \"Score: X\" at its center. The score increases when the user moves the mouse upward. It decreases when the user moves the mouse downward.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Update the score.\n  score -= movedY;\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the score.\n  text(`Score: ${score}`, 50, 50);\n}\n\n// Lock the pointer when the user double-clicks.\nfunction doubleClicked() {\n  requestPointerLock();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "baseNormalShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1881,
      "itemtype": "method",
      "description": "<p>Returns the default shader used for fills when\n<a href=\"#/p5/normalMaterial\"><code>normalMaterial()</code></a> is activated.</p>\n<p>Calling <a href=\"#/p5/buildNormalShader\"><code>buildNormalShader(shaderFunction)</code></a>\nis equivalent to calling <code>baseNormalShader().modify(shaderFunction)</code>.</p>\n<p>Read <a href=\"#/p5/buildNormalShader\">the <code>buildNormalShader</code> reference</a> or\ncall <code>baseNormalShader().inspectHooks()</code> for more information on what you can do with\nthe base normal shader.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The base material shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The base material shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "exitPointerLock",
      "file": "src/scripts/parsers/in/p5.js/src/events/pointer.js",
      "line": 1923,
      "itemtype": "method",
      "description": "<p>Exits a pointer lock started with\n<a href=\"#/p5/requestPointerLock\">requestPointerLock</a>.</p>\n<p>Calling <code>requestPointerLock()</code> locks the values of\n<a href=\"#/p5/mouseX\">mouseX</a>, <a href=\"#/p5/mouseY\">mouseY</a>,\n<a href=\"#/p5/pmouseX\">pmouseX</a>, and <a href=\"#/p5/pmouseY\">pmouseY</a>.\nCalling <code>exitPointerLock()</code> resumes updating the mouse system variables.</p>\n<p>Note: Most browsers require an input, such as a click, before calling\n<code>requestPointerLock()</code>. It’s recommended to call <code>requestPointerLock()</code> in\nan event function such as <a href=\"#/p5/doubleClicked\">doubleClicked()</a>.</p>\n",
      "example": [
        "let isLocked = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  describe(\n    'A gray square with a word at its center. The word changes between \"Unlocked\" and \"Locked\" when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Tell the user whether the pointer is locked.\n  if (isLocked === true) {\n    text('Locked', 50, 50);\n  } else {\n    text('Unlocked', 50, 50);\n  }\n}\n\n// Toggle the pointer lock when the user double-clicks.\nfunction doubleClicked() {\n  if (isLocked === true) {\n    exitPointerLock();\n    isLocked = false;\n  } else {\n    requestPointerLock();\n    isLocked = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Events",
      "submodule": "Pointer"
    },
    {
      "name": "saveStrings",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1934,
      "itemtype": "method",
      "description": "<p>Saves an <code>Array</code> of <code>String</code>s to a file, one per line.</p>\n<p>The first parameter, <code>list</code>, is an array with the strings to save.</p>\n<p>The second parameter, <code>filename</code>, is a string that sets the file's name.\nFor example, calling <code>saveStrings(['0', '01', '011'], 'data.txt')</code> saves\nthe array <code>['0', '01', '011']</code> to a file called <code>data.txt</code> on the user's\ncomputer.</p>\n<p>The third parameter, <code>extension</code>, is optional. If a string is passed, as in\n<code>saveStrings(['0', '01', '0</code>1'], 'data', 'txt')`, the second parameter will\nbe interpreted as the file name and the third parameter as the extension.</p>\n<p>The fourth parameter, <code>isCRLF</code>, is also optional, If <code>true</code> is passed, as\nin <code>saveStrings(['0', '01', '011'], 'data', 'txt', true)</code>, then two\ncharacters, <code>\\r\\n</code> , will be added to the end of each string to create new\nlines in the saved file. <code>\\r</code> is a carriage return (CR) and <code>\\n</code> is a line\nfeed (LF). By default, only <code>\\n</code> (line feed) is added to each string in\norder to create new lines.</p>\n<p>Note: The browser will either save the file immediately or prompt the user\nwith a dialogue window.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an array.\n    let data = ['0', '01', '011'];\n\n    // Save the text file.\n    saveStrings(data, 'data.txt');\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an array.\n    // ASCII art courtesy Wikipedia:\n    // https://en.wikipedia.org/wiki/ASCII_art\n    let data = [' (\\\\_/) ', \"(='.'=)\", '(\")_(\")'];\n\n    // Save the text file.\n    saveStrings(data, 'cat', 'txt');\n  }\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n    // Create an array.\n    //   +--+\n    //  /  /|\n    // +--+ +\n    // |  |/\n    // +--+\n    let data = ['  +--+', ' /  /|', '+--+ +', '|  |/', '+--+'];\n\n    // Save the text file.\n    // Use CRLF for line endings.\n    saveStrings(data, 'box', 'txt', true);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "list",
              "description": "data to save.",
              "type": "String[]"
            },
            {
              "name": "filename",
              "description": "name of file to be saved.",
              "type": "String"
            },
            {
              "name": "extension",
              "description": "format to use for the file.",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "isCRLF",
              "description": "whether to add <code>\\r\\n</code> to the end of each\nstring. Defaults to <code>false</code>.",
              "optional": 1,
              "type": "Boolean"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "buildColorShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 1950,
      "itemtype": "method",
      "description": "<p>Create a new shader that can change how fills are drawn, based on the default shader\nused when no lights or textures are applied. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it\nto any fills you draw.</p>\n<p>The main way to use <code>buildColorShader</code> is to pass a function in as a parameter.\nThis will let you create a shader using p5.strands.</p>\n<p>In your function, you can call hooks to change part of the shader. In a material\nshader, these are the hooks available:</p>\n<ul><li><a href=\"#/p5/objectInputs\"><code>objectInputs</code></a>: Update vertices before any positioning has been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/worldInputs\"><code>worldInputs</code></a>: Update vertices after transformations have been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/cameraInputs\"><code>cameraInputs</code></a>: Update vertices after transformations have been applied, relative to the camera. Your function gets run on every vertex.</li><li><a href=\"#/p5/finalColor\"><code>finalColor</code></a>: Update or replace the pixel color on the surface of a shape. Your function gets run on every pixel.</li></ul><p>Read the linked reference page for each hook for more information about how to use them.</p>\n<p>One thing you might want to do is modify the position of every vertex over time:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildColorShader(material);\n}\n\nfunction material() {\n  let time = millis();\n  worldInputs.begin();\n  worldInputs.position.y +=\n    20 * sin(time * 0.001 + worldInputs.position.x * 0.05);\n  worldInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  noStroke();\n  fill('red');\n  circle(0, 0, 50);\n}</code></pre><p>Like the <code>modify()</code> method on shaders,\nadvanced users can also fill in hooks using <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\ninstead of JavaScript.\nRead the <a href=\"#/p5.Shader/modify\">reference entry for <code>modify()</code></a>\nfor more info.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function building a p5.strands shader.",
              "type": "Function"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The color shader.",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "An object specifying p5.strands hooks in GLSL.",
              "type": "Object"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The color shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The color shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "splineVertex",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 1964,
      "itemtype": "method",
      "description": "<p>Connects points with a smooth curve (a spline).</p>\n<p><code>splineVertex()</code> adds a curved segment to custom shapes.\nThe curve it creates follows the same rules as the ones\nmade with the <a href=\"#/p5/spline\">spline()</a> function.\n<code>splineVertex()</code> must be called between the\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> functions.</p>\n<p>Spline curves can form shapes and curves that slope gently. They’re like\ncables that are attached to a set of points. <code>splineVertex()</code> draws a smooth\ncurve through the points you give it.\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> in order to draw a curve:</p>\n<p>If you provide three points, the spline will pass through them.\nIt works the same way with any number of points.</p>\n<pre><code class=\"language-js\">beginShape();\n\n// Add the first point.\nsplineVertex(25, 80);\n\n// Add the second point.\nsplineVertex(20, 30);\n\n// Add the last point.\nsplineVertex(85, 60);\n\nendShape();</code></pre><p><img src=\"assets/openCurveSpline.png\"></img></p>\n<p>Passing in <code>CLOSE</code> to <code>endShape()</code> closes the spline smoothly.</p>\n<pre><code class=\"language-js\">beginShape();\n\n// Add the first point.\nsplineVertex(25, 80);\n\n// Add the second point.\nsplineVertex(20, 30);\n\n// Add the second point.\nsplineVertex(85, 60);\n\nendShape(CLOSE);</code></pre><p><img src=\"assets/closeCurveSpline.png\"></img></p>\n<p>By default (<code>ends: INCLUDE</code>), the curve passes through\nall the points you add with <code>splineVertex()</code>, similar to\nthe <a href=\"#/p5/spline\">spline()</a> function. To draw only\nthe middle span p1->p2 (skipping p0->p1 and p2->p3), set\n<code>splineProperty('ends', EXCLUDE)</code>. You don’t need to duplicate\nvertices to draw those spans.</p>\n<p>Spline curves can also be drawn in 3D using WebGL mode. The 3D version of\n<code>splineVertex()</code> has three arguments because each point has x-, y-, and\nz-coordinates. By default, the vertex’s z-coordinate is set to 0.</p>\n<p>Note: <code>splineVertex()</code> won’t work when an argument is passed to\n<a href=\"#/p5/beginShape\">beginShape()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(220);\n  noFill();\n  strokeWeight(1);\n\n  beginShape();\n  splineVertex(25, 80);\n  splineVertex(20, 30);\n  splineVertex(85, 60);\n  endShape();\n\n  strokeWeight(5);\n  stroke(0);\n\n  point(25, 80);\n  point(20, 30);\n  point(85, 60);\n\n  describe(\n    'On a gray background, a black spline passes through three marked points.'\n  );\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(220);\n\n  beginShape();\n  splineVertex(25, 80);\n  splineVertex(20, 30);\n  splineVertex(85, 60);\n  endShape(CLOSE);\n\n  describe(\n    'On a gray background, a closed black spline with a white interior forms a triangular shape with smooth corners.'\n  );\n}",
        "let ringInnerRadius, ringWidth;\nlet radius, dRadius;\nlet theta, dTheta;\nlet time, dTime;\nlet vertexCount, unit, offset;\n\nfunction setup() {\n  createCanvas(400, 400);\n\n  vertexCount = 15;\n  unit = createVector(1, 0);\n  dTheta = TAU / vertexCount;\n  dTime = 0.004;\n\n  ringInnerRadius = 25;\n  ringWidth = 5 * ringInnerRadius;\n\n  offset = width;\n\n  describe(\n    'A white blob with a black outline changes its shape over time.'\n  );\n}\n\nfunction draw() {\n  background(220);\n  strokeWeight(2);\n  translate(width / 2, height / 2);\n\n  time = dTime * frameCount;\n\n  beginShape();\n  for (let i = 0; i < vertexCount; i++) {\n    unit.rotate(dTheta);\n    dRadius = noise(offset + unit.x, offset + unit.y, time) * ringWidth;\n    radius = ringInnerRadius + dRadius;\n    splineVertex(radius * unit.x, radius * unit.y);\n  }\n  endShape(CLOSE);\n}",
        "let vertexA;\nlet vertexB;\nlet vertexC;\nlet vertexD;\nlet vertexE;\nlet vertexF;\n\nlet markerRadius;\n\nlet vectorAB;\nlet vectorFE;\n\nlet endOfTangentB;\nlet endOfTangentE;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Initialize variables\n  // Adjusting vertices A and F affects the slopes at B and E\n\n  vertexA = createVector(35, 85);\n  vertexB = createVector(25, 70);\n  vertexC = createVector(30, 30);\n  vertexD = createVector(70, 30);\n  vertexE = createVector(75, 70);\n  vertexF = createVector(65, 85);\n\n  markerRadius = 4;\n\n  vectorAB = p5.Vector.sub(vertexB, vertexA);\n  vectorFE = p5.Vector.sub(vertexE, vertexF);\n\n  endOfTangentB = p5.Vector.add(vertexC, vectorAB);\n  endOfTangentE = p5.Vector.add(vertexD, vectorFE);\n\n  splineProperty(`ends`, EXCLUDE);\n\n  // Draw figure\n\n  background(220);\n\n  noFill();\n\n  beginShape();\n  splineVertex(vertexA.x, vertexA.y);\n  splineVertex(vertexB.x, vertexB.y);\n  splineVertex(vertexC.x, vertexC.y);\n  splineVertex(vertexD.x, vertexD.y);\n  splineVertex(vertexE.x, vertexE.y);\n  splineVertex(vertexF.x, vertexF.y);\n  endShape();\n\n  stroke('red');\n  line(vertexA.x, vertexA.y, vertexC.x, vertexC.y);\n  line(vertexB.x, vertexB.y, endOfTangentB.x, endOfTangentB.y);\n\n  stroke('blue');\n  line(vertexD.x, vertexD.y, vertexF.x, vertexF.y);\n  line(vertexE.x, vertexE.y, endOfTangentE.x, endOfTangentE.y);\n\n  fill('white');\n  stroke('black');\n  circle(vertexA.x, vertexA.y, markerRadius);\n  circle(vertexB.x, vertexB.y, markerRadius);\n  circle(vertexC.x, vertexC.y, markerRadius);\n  circle(vertexD.x, vertexD.y, markerRadius);\n  circle(vertexE.x, vertexE.y, markerRadius);\n  circle(vertexF.x, vertexF.y, markerRadius);\n\n  fill('black');\n  noStroke();\n  text('A', vertexA.x - 15, vertexA.y + 5);\n  text('B', vertexB.x - 15, vertexB.y + 5);\n  text('C', vertexC.x - 5, vertexC.y - 5);\n  text('D', vertexD.x - 5, vertexD.y - 5);\n  text('E', vertexE.x + 5, vertexE.y + 5);\n  text('F', vertexF.x + 5, vertexF.y + 5);\n\n  describe('On a gray background, a black spline passes through vertices A, B, C, D, E, and F, shown as white circles. A red line segment joining vertices A and C has the same slope as the red tangent segment at B. Similarly, the blue line segment joining vertices D and F has the same slope as the blue tangent at E.');\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A ghost shape drawn in white on a blue background. When the user drags the mouse, the scene rotates to reveal the outline of a second ghost.');\n}\n\nfunction draw() {\n  background('midnightblue');\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Draw the first ghost.\n  noStroke();\n  fill('ghostwhite');\n\n  beginShape();\n  splineVertex(-28, 41, 0);\n  splineVertex(-28, 41, 0);\n  splineVertex(-29, -33, 0);\n  splineVertex(18, -31, 0);\n  splineVertex(34, 41, 0);\n  splineVertex(34, 41, 0);\n  endShape();\n\n  // Draw the second ghost.\n  noFill();\n  stroke('ghostwhite');\n\n  beginShape();\n  splineVertex(-28, 41, -20);\n  splineVertex(-28, 41, -20);\n  splineVertex(-29, -33, -20);\n  splineVertex(18, -31, -20);\n  splineVertex(34, 41, -20);\n  splineVertex(34, 41, -20);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the vertex",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the vertex",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the vertex.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "saveTable",
      "file": "src/scripts/parsers/in/p5.js/src/io/files.js",
      "line": 1995,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Writes the contents of a <a href=\"#/p5.Table\">Table</a> object to a file. Defaults to a\ntext file with comma-separated-values ('csv') but can also\nuse tab separation ('tsv'), or generate an HTML table ('html').\nThe file saving process and location of the saved file will\nvary between web browsers.",
      "example": [
        "let table;\n\nfunction setup() {\n  table = new p5.Table();\n\n  table.addColumn('id');\n  table.addColumn('species');\n  table.addColumn('name');\n\n  let newRow = table.addRow();\n  newRow.setNum('id', table.getRowCount() - 1);\n  newRow.setString('species', 'Panthera leo');\n  newRow.setString('name', 'Lion');\n\n  // To save, un-comment next line then click 'run'\n  // saveTable(table, 'new.csv');\n\n  describe('no image displayed');\n}\n\n// Saves the following to a file called 'new.csv':\n// id,species,name\n// 0,Panthera leo,Lion"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "Table",
              "description": "the <a href=\"#/p5.Table\">Table</a> object to save to a file",
              "type": "p5.Table"
            },
            {
              "name": "filename",
              "description": "the filename to which the Table should be saved",
              "type": "String"
            },
            {
              "name": "options",
              "description": "can be one of \"tsv\", \"csv\", or \"html\"",
              "optional": 1,
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "loadColorShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2011,
      "itemtype": "method",
      "description": "<p>Loads a new shader from a file that can change how fills are drawn, based on the material used\nwhen no lights or textures are active. Pass the resulting\nshader into the <a href=\"#/p5/shader\"><code>shader()</code></a> function to apply it\nto any fills you draw.</p>\n<p>Since this function loads data from another file, it returns a <code>Promise</code>.\nUse it in an <code>async function setup</code>, and <code>await</code> its result.</p>\n<pre><code class=\"language-js\">let myShader;\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = await loadColorShader('myMaterial.js');\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  lights();\n  noStroke();\n  fill('red');\n  circle(0, 0, 50);\n}</code></pre><p>Inside your shader file, you can call p5.strands hooks to change parts of the shader. For\nexample, you might use the <code>worldInputs</code> hook to change each vertex, or you\nmight use the <code>finalColor</code> hook to change the color of each pixel on the surface of a shape.</p>\n<pre><code class=\"language-js\">// myMaterial.js\nlet time = millis();\nworldInputs.begin();\nworldInputs.position.y +=\n  20 * sin(time * 0.001 + worldInputs.position.x * 0.05);\nworldInputs.end();</code></pre><p>Read the reference for <a href=\"#/p5/buildColorShader\"><code>buildColorShader</code></a>,\nthe version of <code>loadColorShader</code> that takes in a function instead of a separate file,\nfor a full list of hooks you can use and examples for each.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is passed, as in\n<code>loadColorShader('myShader.js', onLoaded)</code>, then the <code>onLoaded()</code> function will be called\nonce the shader loads. The shader will be passed to <code>onLoaded()</code> as its only argument.\nThe return value of <code>handleData()</code>, if present, will be used as the final return value of\n<code>loadColorShader('myShader.js', onLoaded)</code>.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "url",
              "description": "The URL of your p5.strands JavaScript file.",
              "type": "String"
            },
            {
              "name": "onSuccess",
              "description": "A callback function to run when loading completes.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "onFailure",
              "description": "A callback function to run when loading fails.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "The color shader.",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "The color shader.",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "baseColorShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2042,
      "itemtype": "method",
      "description": "<p>Returns the default shader used for fills when no lights or textures are activate.</p>\n<p>Calling <a href=\"#/p5/buildColorShader\"><code>buildColorShader(shaderFunction)</code></a>\nis equivalent to calling <code>baseColorShader().modify(shaderFunction)</code>.</p>\n<p>Read <a href=\"#/p5/buildColorShader\">the <code>buildColorShader</code> reference</a> or\ncall <code>baseColorShader().inspectHooks()</code> for more information on what you can do with\nthe base color shader.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The base color shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The base color shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "setAttributes",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.RendererGL.js",
      "line": 2059,
      "itemtype": "method",
      "description": "<p>Set attributes for the WebGL Drawing context.\nThis is a way of adjusting how the WebGL\nrenderer works to fine-tune the display and performance.</p>\n<p>Note that this will reinitialize the drawing context\nif called after the WebGL canvas is made.</p>\n<p>If an object is passed as the parameter, all attributes\nnot declared in the object will be set to defaults.</p>\n<p>The available attributes are:\n<br>\nalpha - indicates if the canvas contains an alpha buffer\ndefault is true</p>\n<p>depth - indicates whether the drawing buffer has a depth buffer\nof at least 16 bits - default is true</p>\n<p>stencil - indicates whether the drawing buffer has a stencil buffer\nof at least 8 bits</p>\n<p>antialias - indicates whether or not to perform anti-aliasing\ndefault is false (true in Safari)</p>\n<p>premultipliedAlpha - indicates that the page compositor will assume\nthe drawing buffer contains colors with pre-multiplied alpha\ndefault is true</p>\n<p>preserveDrawingBuffer - if true the buffers will not be cleared and\nand will preserve their values until cleared or overwritten by author\n(note that p5 clears automatically on draw loop)\ndefault is true</p>\n<p>perPixelLighting - if true, per-pixel lighting will be used in the\nlighting shader otherwise per-vertex lighting is used.\ndefault is true.</p>\n<p>version - either 1 or 2, to specify which WebGL version to ask for. By\ndefault, WebGL 2 will be requested. If WebGL2 is not available, it will\nfall back to WebGL 1. You can check what version is used with by looking at\nthe global <code>webglVersion</code> property.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n  background(255);\n  push();\n  rotateZ(frameCount * 0.02);\n  rotateX(frameCount * 0.02);\n  rotateY(frameCount * 0.02);\n  fill(0, 0, 0);\n  box(50);\n  pop();\n}",
        "// Now with the antialias attribute set to true.\nfunction setup() {\n  setAttributes('antialias', true);\n  createCanvas(100, 100, WEBGL);\n}\n\nfunction draw() {\n  background(255);\n  push();\n  rotateZ(frameCount * 0.02);\n  rotateX(frameCount * 0.02);\n  rotateY(frameCount * 0.02);\n  fill(0, 0, 0);\n  box(50);\n  pop();\n}",
        "// press the mouse button to disable perPixelLighting\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n  noStroke();\n  fill(255);\n}\n\nlet lights = [\n  { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\n  { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\n  { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\n  { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\n  { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\n  { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\n];\n\nfunction draw() {\n  let t = millis() / 1000 + 1000;\n  background(0);\n  directionalLight(color('#222'), 1, 1, 1);\n\n  for (let i = 0; i < lights.length; i++) {\n    let light = lights[i];\n    pointLight(\n      color(light.c),\n      p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\n    );\n  }\n\n  specularMaterial(255);\n  sphere(width * 0.1);\n\n  rotateX(t * 0.77);\n  rotateY(t * 0.83);\n  rotateZ(t * 0.91);\n  torus(width * 0.3, width * 0.07, 24, 10);\n}\n\nfunction mousePressed() {\n  setAttributes('perPixelLighting', false);\n  noStroke();\n  fill(255);\n}\nfunction mouseReleased() {\n  setAttributes('perPixelLighting', true);\n  noStroke();\n  fill(255);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "key",
              "description": "Name of attribute",
              "type": "String"
            },
            {
              "name": "value",
              "description": "New value of named attribute",
              "type": "Boolean"
            }
          ]
        },
        {
          "params": [
            {
              "name": "obj",
              "description": "object with key-value pairs",
              "type": "Object"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "blendMode",
      "file": "src/scripts/parsers/in/p5.js/src/color/setting.js",
      "line": 2139,
      "itemtype": "method",
      "description": "<p>Sets the way colors blend when added to the canvas.</p>\n<p>By default, drawing with a solid color paints over the current pixel values\non the canvas. <code>blendMode()</code> offers many options for blending colors.</p>\n<p>Shapes, images, and text can be used as sources for drawing to the canvas.\nA source pixel changes the color of the canvas pixel where it's drawn. The\nfinal color results from blending the source pixel's color with the canvas\npixel's color. RGB color values from the source and canvas pixels are\ncompared, added, subtracted, multiplied, and divided to create different\neffects. Red values with red values, greens with greens, and blues with\nblues.</p>\n<p>The parameter, <code>mode</code>, sets the blend mode. For example, calling\n<code>blendMode(ADD)</code> sets the blend mode to <code>ADD</code>. The following blend modes\nare available in both 2D and WebGL mode:</p>\n<ul><li><code>BLEND</code>: color values from the source overwrite the canvas. This is the default mode.</li><li><code>ADD</code>: color values from the source are added to values from the canvas.</li><li><code>DARKEST</code>: keeps the darkest color value.</li><li><code>LIGHTEST</code>: keeps the lightest color value.</li><li><code>EXCLUSION</code>: similar to <code>DIFFERENCE</code> but with less contrast.</li><li><code>MULTIPLY</code>: color values from the source are multiplied with values from the canvas. The result is always darker.</li><li><code>SCREEN</code>: all color values are inverted, then multiplied, then inverted again. The result is always lighter. (Opposite of <code>MULTIPLY</code>)</li><li><code>REPLACE</code>: the last source drawn completely replaces the rest of the canvas.</li><li><code>REMOVE</code>: overlapping pixels are removed by making them completely transparent.</li></ul><p>The following blend modes are only available in 2D mode:</p>\n<ul><li><code>DIFFERENCE</code>: color values from the source are subtracted from the values from the canvas. If the difference is a negative number, it's made positive.</li><li><code>OVERLAY</code>: combines <code>MULTIPLY</code> and <code>SCREEN</code>. Dark values in the canvas get darker and light values get lighter.</li><li><code>HARD_LIGHT</code>: combines <code>MULTIPLY</code> and <code>SCREEN</code>. Dark values in the source get darker and light values get lighter.</li><li><code>SOFT_LIGHT</code>: a softer version of <code>HARD_LIGHT</code>.</li><li><code>DODGE</code>: lightens light tones and increases contrast. Divides the canvas color values by the inverted color values from the source.</li><li><code>BURN</code>: darkens dark tones and increases contrast. Divides the source color values by the inverted color values from the canvas, then inverts the result.</li></ul><p>The following blend modes are only available in WebGL mode:</p>\n<ul><li><code>SUBTRACT</code>: RGB values from the source are subtracted from the values from the canvas. If the difference is a negative number, it's made positive. Alpha (transparency) values from the source and canvas are added.</li></ul>",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Use the default blend mode.\n  blendMode(BLEND);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A blue line and a red line form an X on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(ADD);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(DARKEST);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(LIGHTEST);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(EXCLUSION);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A yellow line and a cyan line form an X on a gray background. The area where they overlap is green.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(MULTIPLY);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(SCREEN);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint magenta.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(REPLACE);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A diagonal red line.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(REMOVE);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('The silhouette of an X is missing from a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(DIFFERENCE);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A yellow line and a cyan line form an X on a gray background. The area where they overlap is green.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(OVERLAY);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is bright magenta.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(HARD_LIGHT);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A blue line and a red line form an X on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(SOFT_LIGHT);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is violet.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(DODGE);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A faint blue line and a faint red line form an X on a gray background. The area where they overlap is faint violet.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(BURN);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A blue line and a red line form an X on a gray background. The area where they overlap is black.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Set the blend mode.\n  blendMode(SUBTRACT);\n\n  // Style the lines.\n  strokeWeight(30);\n\n  // Draw the blue line.\n  stroke('blue');\n  line(25, 25, 75, 75);\n\n  // Draw the red line.\n  stroke('red');\n  line(75, 25, 25, 75);\n\n  describe('A yellow line and a turquoise line form an X on a gray background. The area where they overlap is green.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "blend mode to set.\neither BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\nEXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\nSOFT_LIGHT, DODGE, BURN, ADD, REMOVE or SUBTRACT",
              "type": "BLEND|DARKEST|LIGHTEST|DIFFERENCE|MULTIPLY|EXCLUSION|SCREEN|REPLACE|OVERLAY|HARD_LIGHT|SOFT_LIGHT|DODGE|BURN|ADD|REMOVE|SUBTRACT"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Color",
      "submodule": "Setting"
    },
    {
      "name": "camera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2153,
      "itemtype": "method",
      "description": "<p>Sets the position and orientation of the current camera in a 3D sketch.</p>\n<p><code>camera()</code> allows objects to be viewed from different angles. It has nine\nparameters that are all optional.</p>\n<p>The first three parameters, <code>x</code>, <code>y</code>, and <code>z</code>, are the coordinates of the\ncamera’s position. For example, calling <code>camera(0, 0, 0)</code> places the camera\nat the origin <code>(0, 0, 0)</code>. By default, the camera is placed at\n<code>(0, 0, 800)</code>.</p>\n<p>The next three parameters, <code>centerX</code>, <code>centerY</code>, and <code>centerZ</code> are the\ncoordinates of the point where the camera faces. For example, calling\n<code>camera(0, 0, 0, 10, 20, 30)</code> places the camera at the origin <code>(0, 0, 0)</code>\nand points it at <code>(10, 20, 30)</code>. By default, the camera points at the\norigin <code>(0, 0, 0)</code>.</p>\n<p>The last three parameters, <code>upX</code>, <code>upY</code>, and <code>upZ</code> are the components of\nthe \"up\" vector. The \"up\" vector orients the camera’s y-axis. For example,\ncalling <code>camera(0, 0, 0, 10, 20, 30, 0, -1, 0)</code> places the camera at the\norigin <code>(0, 0, 0)</code>, points it at <code>(10, 20, 30)</code>, and sets the \"up\" vector\nto <code>(0, -1, 0)</code> which is like holding it upside-down. By default, the \"up\"\nvector is <code>(0, 1, 0)</code>.</p>\n<p>Note: <code>camera()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Move the camera to the top-right.\n  camera(200, -400, 800);\n\n  // Draw the box.\n  box();\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube apperas to sway left and right on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the camera's x-coordinate.\n  let x = 400 * cos(frameCount * 0.01);\n\n  // Orbit the camera around the box.\n  camera(x, -400, 800);\n\n  // Draw the box.\n  box();\n}",
        "// Adjust the range sliders to change the camera's position.\n\nlet xSlider;\nlet ySlider;\nlet zSlider;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create slider objects to set the camera's coordinates.\n  xSlider = createSlider(-400, 400, 400);\n  xSlider.position(0, 100);\n  xSlider.size(100);\n  ySlider = createSlider(-400, 400, -200);\n  ySlider.position(0, 120);\n  ySlider.size(100);\n  zSlider = createSlider(0, 1600, 800);\n  zSlider.position(0, 140);\n  zSlider.size(100);\n\n  describe(\n    'A white cube drawn against a gray background. Three range sliders appear beneath the image. The camera position changes when the user moves the sliders.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Get the camera's coordinates from the sliders.\n  let x = xSlider.value();\n  let y = ySlider.value();\n  let z = zSlider.value();\n\n  // Move the camera.\n  camera(x, y, z);\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the camera. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the camera. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the camera. Defaults to 800.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerX",
              "description": "x-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerY",
              "description": "y-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerZ",
              "description": "z-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upX",
              "description": "x-component of the camera’s \"up\" vector. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upY",
              "description": "y-component of the camera’s \"up\" vector. Defaults to 1.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upZ",
              "description": "z-component of the camera’s \"up\" vector. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "buildStrokeShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2205,
      "itemtype": "method",
      "description": "<p>Create a new shader that can change how strokes are drawn, based on the default\nshader used for strokes. Pass the resulting shader into the\n<a href=\"#/p5/strokeShader\"><code>strokeShader()</code></a> function to apply it to any\nstrokes you draw.</p>\n<p>The main way to use <code>buildStrokeShader</code> is to pass a function in as a parameter.\nThis will let you create a shader using p5.strands.</p>\n<p>In your function, you can call hooks to change part of the shader. In a material\nshader, these are the hooks available:</p>\n<ul><li><a href=\"#/p5/objectInputs\"><code>objectInputs</code></a>: Update vertices before any positioning has been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/worldInputs\"><code>worldInputs</code></a>: Update vertices after transformations have been applied. Your function gets run on every vertex.</li><li><a href=\"#/p5/cameraInputs\"><code>cameraInputs</code></a>: Update vertices after transformations have been applied, relative to the camera. Your function gets run on every vertex.</li><li><a href=\"#/p5/pixelInputs\"><code>pixelInputs</code></a>: Update property values on pixels on the surface of a shape. Your function gets run on every pixel.</li><li><a href=\"#/p5/finalColor\"><code>finalColor</code></a>: Update or replace the pixel color on the surface of a shape. Your function gets run on every pixel.</li></ul><p>Read the linked reference page for each hook for more information about how to use them.</p>\n<p>One thing you might want to do is update the color of a stroke per pixel. Here, it is being used\nto create a soft texture:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildStrokeShader(material);\n}\n\nfunction material() {\n  pixelInputs.begin();\n  let opacity = 1 - smoothstep(\n    0,\n    15,\n    length(pixelInputs.position - pixelInputs.center)\n  );\n  pixelInputs.color.a *= opacity;\n  pixelInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  strokeShader(myShader);\n  strokeWeight(30);\n  line(\n    -width/3,\n    sin(millis()*0.001) * height/4,\n    width/3,\n    sin(millis()*0.001 + 1) * height/4\n  );\n}</code></pre><p>Rather than using opacity, we could use a form of dithering to get a different\ntexture. This involves using only fully opaque or transparent pixels. Here, we\nrandomly choose which pixels to be transparent:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildStrokeShader(material);\n}\n\nfunction material() {\n  pixelInputs.begin();\n  // Replace alpha in the color with dithering by\n  // randomly setting pixel colors to 0 based on opacity\n  let a = 1;\n  if (noise(pixelInputs.position.xy) &gt; pixelInputs.color.a) {\n    a = 0;\n  }\n  pixelInputs.color.a = a;\n  pixelInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  strokeShader(myShader);\n  strokeWeight(10);\n  beginShape();\n  for (let i = 0; i &lt;= 50; i++) {\n    stroke(\n      0,\n      255\n        * map(i, 0, 20, 0, 1, true)\n        * map(i, 30, 50, 1, 0, true)\n    );\n    vertex(\n      map(i, 0, 50, -1, 1) * width/3,\n      50 * sin(i/10 + frameCount/100)\n    );\n  }\n  endShape();\n}</code></pre><p>You might also want to update some properties per vertex, such as the stroke\nthickness. This lets you create a more varied line:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = buildStrokeShader(material);\n}\n\nfunction material() {\n  let time = millis();\n  worldInputs.begin();\n  // Add a somewhat random offset to the weight\n  // that varies based on position and time\n  let scale = 0.5 + noise(\n    worldInputs.position.x * 0.01,\n    worldInputs.position.y * 0.01,\n    time * 0.0005\n  );\n  worldInputs.weight *= scale;\n  worldInputs.end();\n}\n\nfunction draw() {\n  background(255);\n  strokeShader(myShader);\n  strokeWeight(10);\n  beginShape();\n  for (let i = 0; i &lt;= 50; i++) {\n    let r = map(i, 0, 50, 0, width/3);\n    let x = r*cos(i*0.2);\n    let y = r*sin(i*0.2);\n    vertex(x, y);\n  }\n  endShape();\n}</code></pre><p>Like the <code>modify()</code> method on shaders,\nadvanced users can also fill in hooks using <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\" target=\"_blank\">GLSL</a>\ninstead of JavaScript.\nRead the <a href=\"#/p5.Shader/modify\">reference entry for <code>modify()</code></a>\nfor more info.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function building a p5.strands shader.",
              "type": "Function"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The stroke shader.",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "An object specifying p5.strands hooks in GLSL.",
              "type": "Object"
            },
            {
              "name": "scope",
              "description": "An optional scope object passed to .modify().",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "The stroke shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The stroke shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "splineProperty",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 2249,
      "itemtype": "method",
      "description": "<p>Gets or sets a given spline property.</p>\n<p>Use <code>splineProperty()</code> to adjust the behavior of splines\ncreated with <code>splineVertex()</code> or <code>spline()</code>. You can control\ntwo key aspects of a spline: its end behavior (<code>ends</code>) and\nits curvature (<code>tightness</code>).</p>\n<p>By default, the ends property is set to <code>INCLUDE</code>, which means\nthe spline passes through every point, including the endpoints.\nYou can also set it to <code>EXCLUDE</code> i.e. <code>splineProperty('ends', EXCLUDE)</code>,\nwhich makes the spline pass through all points except the endpoints.</p>\n<p><code>INCLUDE</code> case will have the spline passing through\nall points, like this:</p>\n<pre><code class=\"language-js\">splineProperty('ends', INCLUDE); // no need to set this, as it is the default\nspline(25, 46, 93, 44, 93, 81, 35, 85);\n\npoint(25, 46);\npoint(93, 44);\npoint(93, 81);\npoint(35, 85);</code></pre><p><img src=\"assets/includeSpline.png\"></img></p>\n<p>EXCLUDE case will have the spline passing through\nthe middle points, like this:</p>\n<pre><code class=\"language-js\">splineProperty('ends', EXCLUDE);\nspline(25, 46, 93, 44, 93, 81, 35, 85);\n\npoint(25, 46);\npoint(93, 44);\npoint(93, 81);\npoint(35, 85);</code></pre><p><img src=\"assets/excludeSpline.png\"></img></p>\n<p>By default, the tightness property is set to <code>0</code>,\nproducing a smooth curve that passes evenly through\nthe vertices. Negative values make the curve looser,\nwhile positive values make it tighter. Common values\nrange between -1 and 1, though values outside this\nrange can also be used for different effects.</p>\n<p>For example, To set tightness, use <code>splineProperty('tightness', t)</code>,\n(default: t = 0).</p>\n<p>Here's the example showing negetive value of tightness,\nwhich creates a rounder bulge:</p>\n<pre><code class=\"language-js\">splineProperty('tightness', -5)\nstroke(0);\nstrokeWeight(2);\nspline(25, 46, 93, 44, 93, 81, 35, 85);</code></pre><p><img src=\"assets/roundBulge.png\"></img>\nHere's the example showing positive value of tightness,\nwhich makes the curve tighter and more angular:</p>\n<pre><code class=\"language-js\">splineProperty('tightness', 5)\nstroke(0);\nstrokeWeight(2);\nspline(25, 46, 93, 44, 93, 81, 35, 85);</code></pre><p><img src=\"assets/anglurBulge.png\"></img></p>\n<p>In all cases, the splines in p5.js are <a href = \"https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline\">cardinal splines</a>.\nWhen tightness is 0, these splines are often known as\n<a href=\"https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull%E2%80%93Rom_spline\">Catmull-Rom splines</a></p>\n",
      "example": [
        "// Move the mouse left and right to see the curve change.\n\nlet t;\n\nfunction setup() {\n  createCanvas(100, 100);\n}\n\nfunction draw() {\n  background(240);\n\n  t = map(mouseX, 0, width, -5, 5, true);\n  splineProperty('tightness', t);\n\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n\n  beginShape();\n  splineVertex(10, 26);\n  splineVertex(83, 24);\n\n  splineVertex(83, 61);\n  splineVertex(25, 65);\n  endShape();\n\n  push();\n  strokeWeight(5);\n  point(10, 26);\n  point(83, 24);\n  point(83, 61);\n  point(25, 65);\n  pop();\n\n  fill(0);\n  noStroke();\n  textSize(10);\n  text(`tightness: ${round(t, 1)}`, 15, 90);\n  describe('A black spline forms a sideways U shape through four points. The spline passes through the points more loosely as the mouse moves left of center (negative tightness), and more tightly as it moves right of center (positive tightness). The tightness is displayed at the bottom.');\n}",
        "function setup() {\n  createCanvas(360, 140);\n  background(240);\n  noFill();\n\n  // Right panel: ends = INCLUDE (all spans).\n  push();\n  translate(10, 10);\n  stroke(220);\n  rect(0, 0, 160, 120);\n  fill(30);\n  textSize(11);\n  text('ends: INCLUDE (all spans)', 8, 16);\n  noFill();\n\n  splineProperty('ends', INCLUDE);\n  stroke(0);\n  strokeWeight(2);\n  spline(25, 46, 93, 44, 93, 81, 35, 85);\n\n  // vertices\n  strokeWeight(5);\n  stroke(0);\n  point(25, 46);\n  point(93, 44);\n  point(93, 81);\n  point(35, 85);\n  pop();\n\n  // Right panel: ends = EXCLUDE (middle only).\n  push();\n  translate(190, 10);\n  stroke(220);\n  rect(0, 0, 160, 120);\n  noStroke();\n  fill(30);\n  text('ends: EXCLUDE ', 18, 16);\n  noFill();\n\n  splineProperty('ends', EXCLUDE);\n  stroke(0);\n  strokeWeight(2);\n  spline(25, 46, 93, 44, 93, 81, 35, 85);\n\n  // vertices\n  strokeWeight(5);\n  stroke(0);\n  point(25, 46);\n  point(93, 44);\n  point(93, 81);\n  point(35, 85);\n  pop();\n\n  describe('Left panel shows spline with ends INCLUDE (three spans). Right panel shows EXCLUDE (only the middle span). Four black points mark the vertices.');\n}",
        "let vertexA;\nlet vertexB;\nlet vertexC;\nlet vertexD;\nlet vertexE;\nlet vertexF;\n\nlet markerRadius;\n\nlet vectorAB;\nlet vectorFE;\n\nlet endOfTangentB;\nlet endOfTangentE;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Initialize variables\n  // Adjusting vertices A and F affects the slopes at B and E\n\n  vertexA = createVector(35, 85);\n  vertexB = createVector(25, 70);\n  vertexC = createVector(30, 30);\n  vertexD = createVector(70, 30);\n  vertexE = createVector(75, 70);\n  vertexF = createVector(65, 85);\n\n  markerRadius = 4;\n\n  vectorAB = p5.Vector.sub(vertexB, vertexA);\n  vectorFE = p5.Vector.sub(vertexE, vertexF);\n\n  endOfTangentB = p5.Vector.add(vertexC, vectorAB);\n  endOfTangentE = p5.Vector.add(vertexD, vectorFE);\n\n  splineProperty(`ends`, EXCLUDE);\n\n  // Draw figure\n\n  background(220);\n\n  noFill();\n\n  beginShape();\n  splineVertex(vertexA.x, vertexA.y);\n  splineVertex(vertexB.x, vertexB.y);\n  splineVertex(vertexC.x, vertexC.y);\n  splineVertex(vertexD.x, vertexD.y);\n  splineVertex(vertexE.x, vertexE.y);\n  splineVertex(vertexF.x, vertexF.y);\n  endShape();\n\n  stroke('red');\n  line(vertexA.x, vertexA.y, vertexC.x, vertexC.y);\n  line(vertexB.x, vertexB.y, endOfTangentB.x, endOfTangentB.y);\n\n  stroke('blue');\n  line(vertexD.x, vertexD.y, vertexF.x, vertexF.y);\n  line(vertexE.x, vertexE.y, endOfTangentE.x, endOfTangentE.y);\n\n  fill('white');\n  stroke('black');\n  circle(vertexA.x, vertexA.y, markerRadius);\n  circle(vertexB.x, vertexB.y, markerRadius);\n  circle(vertexC.x, vertexC.y, markerRadius);\n  circle(vertexD.x, vertexD.y, markerRadius);\n  circle(vertexE.x, vertexE.y, markerRadius);\n  circle(vertexF.x, vertexF.y, markerRadius);\n\n  fill('black');\n  noStroke();\n  text('A', vertexA.x - 15, vertexA.y + 5);\n  text('B', vertexB.x - 15, vertexB.y + 5);\n  text('C', vertexC.x - 5, vertexC.y - 5);\n  text('D', vertexD.x - 5, vertexD.y - 5);\n  text('E', vertexE.x + 5, vertexE.y + 5);\n  text('F', vertexF.x + 5, vertexF.y + 5);\n\n  describe('On a gray background, a black spline passes through vertices A, B, C, D, E, and F, shown as white circles. A red line segment joining vertices A and C has the same slope as the red tangent segment at B. Similarly, the blue line segment joining vertices D and F has the same slope as the blue tangent at E.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "property",
              "description": "",
              "type": "String"
            },
            {
              "name": "value",
              "description": "Value to set the given property to."
            }
          ]
        },
        {
          "params": [
            {
              "name": "property",
              "description": "",
              "type": "String"
            }
          ],
          "return": {
            "description": "The current value for the given property."
          }
        }
      ],
      "return": {
        "description": "The current value for the given property."
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "loadStrokeShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2271,
      "itemtype": "method",
      "description": "<p>Loads a new shader from a file that can change how strokes are drawn. Pass the resulting\nshader into the <a href=\"#/p5/strokeShader\"><code>strokeShader()</code></a> function to apply it\nto any strokes you draw.</p>\n<p>Since this function loads data from another file, it returns a <code>Promise</code>.\nUse it in an <code>async function setup</code>, and <code>await</code> its result.</p>\n<pre><code class=\"language-js\">let myShader;\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = await loadStrokeShader('myMaterial.js');\n}\n\nfunction draw() {\n  background(255);\n  strokeShader(myShader);\n  strokeWeight(30);\n  line(\n    -width/3,\n    sin(millis()*0.001) * height/4,\n    width/3,\n    sin(millis()*0.001 + 1) * height/4\n  );\n}</code></pre><p>Inside your shader file, you can call p5.strands hooks to change parts of the shader. For\nexample, you might use the <code>worldInputs</code> hook to change each vertex, or you\nmight use the <code>pixelInputs</code> hook to change each pixel on the surface of a stroke.</p>\n<pre><code class=\"language-js\">// myMaterial.js\npixelInputs.begin();\nlet opacity = 1 - smoothstep(\n  0,\n  15,\n  length(pixelInputs.position - pixelInputs.center)\n);\npixelInputs.color.a *= opacity;\npixelInputs.end();</code></pre><p>Read the reference for <a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader</code></a>,\nthe version of <code>loadStrokeShader</code> that takes in a function instead of a separate file,\nfor a full list of hooks you can use and examples for each.</p>\n<p>The second parameter, <code>successCallback</code>, is optional. If a function is passed, as in\n<code>loadStrokeShader('myShader.js', onLoaded)</code>, then the <code>onLoaded()</code> function will be called\nonce the shader loads. The shader will be passed to <code>onLoaded()</code> as its only argument.\nThe return value of <code>handleData()</code>, if present, will be used as the final return value of\n<code>loadStrokeShader('myShader.js', onLoaded)</code>.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "url",
              "description": "The URL of your p5.strands JavaScript file.",
              "type": "String"
            },
            {
              "name": "onSuccess",
              "description": "A callback function to run when loading completes.",
              "optional": 1,
              "type": "Function"
            },
            {
              "name": "onFailure",
              "description": "A callback function to run when loading fails.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "return": {
            "description": "The stroke shader.",
            "type": "Promise<p5.Shader>"
          }
        }
      ],
      "return": {
        "description": "The stroke shader.",
        "type": "Promise<p5.Shader>"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "perspective",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2277,
      "itemtype": "method",
      "description": "<p>Sets a perspective projection for the current camera in a 3D sketch.</p>\n<p>In a perspective projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes. It’s applied by default in\nWebGL mode.</p>\n<p><code>perspective()</code> changes the camera’s perspective by changing its viewing\nfrustum. The frustum is the volume of space that’s visible to the camera.\nIts shape is a pyramid with its top cut off. The camera is placed where\nthe top of the pyramid should be and views everything between the frustum’s\ntop (near) plane and its bottom (far) plane.</p>\n<p>The first parameter, <code>fovy</code>, is the camera’s vertical field of view. It’s\nan angle that describes how tall or narrow a view the camera has. For\nexample, calling <code>perspective(0.5)</code> sets the camera’s vertical field of\nview to 0.5 radians. By default, <code>fovy</code> is calculated based on the sketch’s\nheight and the camera’s default z-coordinate, which is 800. The formula for\nthe default <code>fovy</code> is <code>2 * atan(height / 2 / 800)</code>.</p>\n<p>The second parameter, <code>aspect</code>, is the camera’s aspect ratio. It’s a number\nthat describes the ratio of the top plane’s width to its height. For\nexample, calling <code>perspective(0.5, 1.5)</code> sets the camera’s field of view to\n0.5 radians and aspect ratio to 1.5, which would make shapes appear thinner\non a square canvas. By default, aspect is set to <code>width / height</code>.</p>\n<p>The third parameter, <code>near</code>, is the distance from the camera to the near\nplane. For example, calling <code>perspective(0.5, 1.5, 100)</code> sets the camera’s\nfield of view to 0.5 radians, its aspect ratio to 1.5, and places the near\nplane 100 pixels from the camera. Any shapes drawn less than 100 pixels\nfrom the camera won’t be visible. By default, near is set to <code>0.1 * 800</code>,\nwhich is 1/10th the default distance between the camera and the origin.</p>\n<p>The fourth parameter, <code>far</code>, is the distance from the camera to the far\nplane. For example, calling <code>perspective(0.5, 1.5, 100, 10000)</code> sets the\ncamera’s field of view to 0.5 radians, its aspect ratio to 1.5, places the\nnear plane 100 pixels from the camera, and places the far plane 10,000\npixels from the camera. Any shapes drawn more than 10,000 pixels from the\ncamera won’t be visible. By default, far is set to <code>10 * 800</code>, which is 10\ntimes the default distance between the camera and the origin.</p>\n<p>Note: <code>perspective()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Double-click to squeeze the box.\n\nlet isSqueezed = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white rectangular prism on a gray background. The box appears to become thinner when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Place the camera at the top-right.\n  camera(400, -400, 800);\n\n  if (isSqueezed === true) {\n    // Set fovy to 0.2.\n    // Set aspect to 1.5.\n    perspective(0.2, 1.5);\n  }\n\n  // Draw the box.\n  box();\n}\n\n// Change the camera's perspective when the user double-clicks.\nfunction doubleClicked() {\n  isSqueezed = true;\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white rectangular prism on a gray background. The prism moves away from the camera until it disappears.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Place the camera at the top-right.\n  camera(400, -400, 800);\n\n  // Set fovy to 0.2.\n  // Set aspect to 1.5.\n  // Set near to 600.\n  // Set far to 1200.\n  perspective(0.2, 1.5, 600, 1200);\n\n  // Move the origin away from the camera.\n  let x = -frameCount;\n  let y = frameCount;\n  let z = -2 * frameCount;\n  translate(x, y, z);\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fovy",
              "description": "camera frustum vertical field of view. Defaults to\n<code>2 * atan(height / 2 / 800)</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "aspect",
              "description": "camera frustum aspect ratio. Defaults to\n<code>width / height</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "distance from the camera to the near clipping plane.\nDefaults to <code>0.1 * 800</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "distance from the camera to the far clipping plane.\nDefaults to <code>10 * 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "baseStrokeShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2302,
      "itemtype": "method",
      "description": "<p>Returns the default shader used for strokes.</p>\n<p>Calling <a href=\"#/p5/buildStrokeShader\"><code>buildStrokeShader(shaderFunction)</code></a>\nis equivalent to calling <code>baseStrokeShader().modify(shaderFunction)</code>.</p>\n<p>Read <a href=\"#/p5/buildStrokeShader\">the <code>buildStrokeShader</code> reference</a> or\ncall <code>baseStrokeShader().inspectHooks()</code> for more information on what you can do with\nthe base material shader.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The base material shader.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "The base material shader.",
        "type": "p5.Shader"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "p5.strands",
      "beta": true
    },
    {
      "name": "splineProperties",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 2355,
      "itemtype": "method",
      "description": "<p>Sets multiple properties for spline curves at once.</p>\n<p><code>splineProperties()</code> accepts an object with key-value pairs to configure\nhow spline curves are drawn. This is a convenient way to set multiple\nspline properties with a single function call, rather than calling\n<a href=\"#/p5/splineProperty\">splineProperty()</a> multiple times.</p>\n<p>The properties object can include:</p>\n<ul><li><code>tightness</code>: A number that controls how tightly the curve fits to the\nvertex points. The default value is 0. Positive values make the curve\ntighter (straighter), while negative values make it looser. Values\nbetween -5 and 5 work best.</li><li><code>ends</code>: Controls whether to draw the end segments of the spline. Set to\n<code>EXCLUDE</code> to skip drawing the segments between the first and second\npoints and between the second-to-last and last points. This is useful\nwhen you want to use the first and last points as control points only.</li></ul><p><code>splineProperties()</code> affects curves drawn with\n<a href=\"#/p5/splineVertex\">splineVertex()</a> within\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a>, as well as curves drawn with\n<a href=\"#/p5/spline\">spline()</a>. The properties remain active until\nchanged by another call to <code>splineProperties()</code> or\n<a href=\"#/p5/splineProperty\">splineProperty()</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n  background(220);\n\n  // Set spline tightness using splineProperties\n  splineProperties({\n    tightness: 0.5\n  });\n\n  // Draw a spline curve\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n\n  beginShape();\n  splineVertex(20, 80);\n  splineVertex(30, 30);\n  splineVertex(70, 30);\n  splineVertex(80, 80);\n  endShape();\n\n  // Show vertex points\n  fill(255, 0, 0);\n  noStroke();\n  circle(20, 80, 6);\n  circle(30, 30, 6);\n  circle(70, 30, 6);\n  circle(80, 80, 6);\n\n  describe('A smooth curved line with tightness 0.5 connecting four red points.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n  background(220);\n\n  // Exclude end segments - first and last points become control points\n  splineProperties({\n    tightness: 0,\n    ends: EXCLUDE\n  });\n\n  // Draw curve only between middle points\n  noFill();\n  stroke(0);\n  strokeWeight(2);\n\n  beginShape();\n  splineVertex(10, 50);  // Control point (affects curve but not drawn to)\n  splineVertex(30, 20);  // Start of visible curve\n  splineVertex(70, 80);  // End of visible curve\n  splineVertex(90, 50);  // Control point (affects curve but not drawn to)\n  endShape();\n\n  // Show all points\n  fill(200, 0, 0);\n  noStroke();\n  circle(10, 50, 6);  // Control point\n  circle(90, 50, 6);  // Control point\n\n  fill(0, 0, 255);\n  circle(30, 20, 6);  // Visible curve point\n  circle(70, 80, 6);  // Visible curve point\n\n  describe('A curved line between two blue points, with red control points at the ends.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "values",
              "description": "an object containing spline property key-value pairs",
              "type": "Object"
            }
          ],
          "return": {
            "description": "",
            "type": "Object"
          },
          "chainable": 1
        }
      ],
      "return": {
        "description": "",
        "type": "Object"
      },
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "resetShader",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2387,
      "itemtype": "method",
      "description": "<p>Restores the default shaders.</p>\n<p><code>resetShader()</code> deactivates any shaders previously applied by\n<a href=\"#/p5/shader\">shader()</a>, <a href=\"#/p5/strokeShader\">strokeShader()</a>,\nor <a href=\"#/p5/imageShader\">imageShader()</a>.</p>\n<p>Note: Shaders can only be used in WebGL mode.</p>\n",
      "example": [
        "// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nuniform mat4 uProjectionMatrix;\nuniform mat4 uModelViewMatrix;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 position = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * position;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision mediump float;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec2 uv = vTexCoord;\n  vec3 color = vec3(uv.x, uv.y, min(uv.x + uv.y, 1.0));\n  gl_FragColor = vec4(color, 1.0);\n}\n`;\n\nlet myShader;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  myShader = createShader(vertSrc, fragSrc);\n\n  describe(\n    'Two rotating cubes on a gray background. The left one has a blue-purple gradient on each face. The right one is red.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw a box using the p5.Shader.\n  // shader() sets the active shader to myShader.\n  shader(myShader);\n  push();\n  translate(-25, 0, 0);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  box(width / 4);\n  pop();\n\n  // Draw a box using the default fill shader.\n  // resetShader() restores the default fill shader.\n  resetShader();\n  fill(255, 0, 0);\n  push();\n  translate(25, 0, 0);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  box(width / 4);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "linePerspective",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2393,
      "itemtype": "method",
      "description": "<p>Enables or disables perspective for lines in 3D sketches.</p>\n<p>In WebGL mode, lines can be drawn with a thinner stroke when they’re\nfurther from the camera. Doing so gives them a more realistic appearance.</p>\n<p>By default, lines are drawn differently based on the type of perspective\nbeing used:</p>\n<ul><li><code>perspective()</code> and <code>frustum()</code> simulate a realistic perspective. In\nthese modes, stroke weight is affected by the line’s distance from the\ncamera. Doing so results in a more natural appearance. <code>perspective()</code> is\nthe default mode for 3D sketches.</li><li><code>ortho()</code> doesn’t simulate a realistic perspective. In this mode, stroke\nweights are consistent regardless of the line’s distance from the camera.\nDoing so results in a more predictable and consistent appearance.</li></ul><p><code>linePerspective()</code> can override the default line drawing mode.</p>\n<p>The parameter, <code>enable</code>, is optional. It’s a <code>Boolean</code> value that sets the\nway lines are drawn. If <code>true</code> is passed, as in <code>linePerspective(true)</code>,\nthen lines will appear thinner when they are further from the camera. If\n<code>false</code> is passed, as in <code>linePerspective(false)</code>, then lines will have\nconsistent stroke weights regardless of their distance from the camera. By\ndefault, <code>linePerspective()</code> is enabled.</p>\n<p>Calling <code>linePerspective()</code> without passing an argument returns <code>true</code> if\nit's enabled and <code>false</code> if not.</p>\n<p>Note: <code>linePerspective()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Double-click the canvas to toggle the line perspective.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A white cube with black edges on a gray background. Its edges toggle between thick and thin when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}\n\n// Toggle the line perspective when the user double-clicks.\nfunction doubleClicked() {\n  let isEnabled = linePerspective();\n  linePerspective(!isEnabled);\n}",
        "// Double-click the canvas to toggle the line perspective.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A row of cubes with black edges on a gray background. Their edges toggle between thick and thin when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Use an orthographic projection.\n  ortho();\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}\n\n// Toggle the line perspective when the user double-clicks.\nfunction doubleClicked() {\n  let isEnabled = linePerspective();\n  linePerspective(!isEnabled);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "enable",
              "description": "whether to enable line perspective.",
              "type": "Boolean"
            }
          ]
        },
        {
          "params": [],
          "return": {
            "description": "whether line perspective is enabled.",
            "type": "boolean"
          }
        }
      ],
      "return": {
        "description": "whether line perspective is enabled.",
        "type": "boolean"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "ortho",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2498,
      "itemtype": "method",
      "description": "<p>Sets an orthographic projection for the current camera in a 3D sketch.</p>\n<p>In an orthographic projection, shapes with the same size always appear the\nsame size, regardless of whether they are near or far from the camera.</p>\n<p><code>ortho()</code> changes the camera’s perspective by changing its viewing frustum\nfrom a truncated pyramid to a rectangular prism. The camera is placed in\nfront of the frustum and views everything between the frustum’s near plane\nand its far plane. <code>ortho()</code> has six optional parameters to define the\nfrustum.</p>\n<p>The first four parameters, <code>left</code>, <code>right</code>, <code>bottom</code>, and <code>top</code>, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\n<code>ortho(-100, 100, 200, -200)</code> creates a frustum that’s 200 pixels wide and\n400 pixels tall. By default, these coordinates are set based on the\nsketch’s width and height, as in\n<code>ortho(-width / 2, width / 2, -height / 2, height / 2)</code>.</p>\n<p>The last two parameters, <code>near</code> and <code>far</code>, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\n<code>ortho(-100, 100, 200, 200, 50, 1000)</code> creates a frustum that’s 200 pixels\nwide, 400 pixels tall, starts 50 pixels from the camera, and ends 1,000\npixels from the camera. By default, <code>near</code> and <code>far</code> are set to 0 and\n<code>max(width, height) + 800</code>, respectively.</p>\n<p>Note: <code>ortho()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A row of tiny, white cubes on a gray background. All the cubes appear the same size.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Apply an orthographic projection.\n  ortho();\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Apply an orthographic projection.\n  // Center the frustum.\n  // Set its width and height to 20.\n  // Place its near plane 300 pixels from the camera.\n  // Place its far plane 350 pixels from the camera.\n  ortho(-10, 10, -10, 10, 300, 350);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "left",
              "description": "x-coordinate of the frustum’s left plane. Defaults to <code>-width / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "right",
              "description": "x-coordinate of the frustum’s right plane. Defaults to <code>width / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bottom",
              "description": "y-coordinate of the frustum’s bottom plane. Defaults to <code>height / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "top",
              "description": "y-coordinate of the frustum’s top plane. Defaults to <code>-height / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "z-coordinate of the frustum’s near plane. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "z-coordinate of the frustum’s far plane. Defaults to <code>max(width, height) + 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "texture",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2545,
      "itemtype": "method",
      "description": "<p>Sets the texture that will be used on shapes.</p>\n<p>A texture is like a skin that wraps around a shape. <code>texture()</code> works with\nbuilt-in shapes, such as <a href=\"#/p5/square\">square()</a> and\n<a href=\"#/p5/sphere\">sphere()</a>, and custom shapes created with\nfunctions such as <a href=\"#/p5/buildGeometry\">buildGeometry()</a>. To\ntexture a geometry created with <a href=\"#/p5/beginShape\">beginShape()</a>,\nuv coordinates must be passed to each\n<a href=\"#/p5/vertex\">vertex()</a> call.</p>\n<p>The parameter, <code>tex</code>, is the texture to apply. <code>texture()</code> can use a range\nof sources including images, videos, and offscreen renderers such as\n<a href=\"#/p5.Graphics\">p5.Graphics</a> and\n<a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> objects.</p>\n<p>To texture a geometry created with <a href=\"#/p5/beginShape\">beginShape()</a>,\nyou will need to specify uv coordinates in <a href=\"#/p5/vertex\">vertex()</a>.</p>\n<p>Note: <code>texture()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load an image and create a p5.Image object.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A spinning cube with an image of a ceiling on each face.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Rotate around the x-, y-, and z-axes.\n  rotateZ(frameCount * 0.01);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Draw the box.\n  box(50);\n}",
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(100, 100);\n\n  // Draw a circle to the p5.Graphics object.\n  pg.background(200);\n  pg.circle(50, 50, 30);\n\n  describe('A spinning cube with circle at the center of each face.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Rotate around the x-, y-, and z-axes.\n  rotateZ(frameCount * 0.01);\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n\n  // Apply the p5.Graphics object as a texture.\n  texture(pg);\n\n  // Draw the box.\n  box(50);\n}",
        "let vid;\n\nfunction setup() {\n  // Load a video and create a p5.MediaElement object.\n  vid = createVideo('assets/fingers.mov');\n\n  createCanvas(100, 100, WEBGL);\n\n  // Hide the video.\n  vid.hide();\n\n  // Set the video to loop.\n  vid.loop();\n\n  describe('A rectangle with video as texture');\n}\n\nfunction draw() {\n  background(0);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Apply the video as a texture.\n  texture(vid);\n\n  // Draw the rectangle.\n  rect(-40, -40, 80, 80);\n}",
        "let vid;\n\nfunction setup() {\n  // Load a video and create a p5.MediaElement object.\n  vid = createVideo('assets/fingers.mov');\n\n  createCanvas(100, 100, WEBGL);\n\n  // Hide the video.\n  vid.hide();\n\n  // Set the video to loop.\n  vid.loop();\n\n  describe('A rectangle with video as texture');\n}\n\nfunction draw() {\n  background(0);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Apply the video as a texture.\n  texture(vid);\n\n  // Draw a custom shape using uv coordinates.\n  beginShape();\n  vertex(-40, -40, 0, 0);\n  vertex(40, -40, 1, 0);\n  vertex(40, 40, 1, 1);\n  vertex(-40, 40, 0, 1);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "tex",
              "description": "media to use as the texture.",
              "type": "p5.Image|p5.MediaElement|p5.Graphics|p5.Texture|p5.Framebuffer|p5.FramebufferTexture"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "vertex",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 2563,
      "itemtype": "method",
      "description": "<p>Adds a vertex to a custom shape.</p>\n<p><code>vertex()</code> sets the coordinates of vertices drawn between the\n<a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a> functions.</p>\n<p>The first two parameters, <code>x</code> and <code>y</code>, set the x- and y-coordinates of the\nvertex.</p>\n<p>The third parameter, <code>z</code>, is optional. It sets the z-coordinate of the\nvertex in WebGL mode. By default, <code>z</code> is 0.</p>\n<p>The fourth and fifth parameters, <code>u</code> and <code>v</code>, are also optional. They set\nthe u- and v-coordinates for the vertex’s texture when used with\n<a href=\"#/p5/endShape\">endShape()</a>. By default, <code>u</code> and <code>v</code> are both 0.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the shape.\n  strokeWeight(3);\n\n  // Start drawing the shape.\n  // Only draw the vertices.\n  beginShape(POINTS);\n\n  // Add the vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape();\n\n  describe('Four black dots that form a square are drawn on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(30, 20);\n  vertex(85, 20);\n  vertex(85, 75);\n  vertex(30, 75);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n\n  describe('A white square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(-20, -30, 0);\n  vertex(35, -30, 0);\n  vertex(35, 25, 0);\n  vertex(-20, 25, 0);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n\n  describe('A white square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white square spins around slowly on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Add vertices.\n  vertex(-20, -30, 0);\n  vertex(35, -30, 0);\n  vertex(35, 25, 0);\n  vertex(-20, 25, 0);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n}",
        "let img;\n\nasync function setup() {\n  // Load an image to apply as a texture.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('A photograph of a ceiling rotates slowly against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Style the shape.\n  noStroke();\n\n  // Apply the texture.\n  texture(img);\n  textureMode(NORMAL);\n\n  // Start drawing the shape\n  beginShape();\n\n  // Add vertices.\n  vertex(-20, -30, 0, 0, 0);\n  vertex(35, -30, 0, 1, 0);\n  vertex(35, 25, 0, 1, 1);\n  vertex(-20, 25, 0, 0, 1);\n\n  // Stop drawing the shape.\n  endShape();\n}",
        "let vid;\nfunction setup() {\n  // Load a video and create a p5.MediaElement object.\n  vid = createVideo('/assets/fingers.mov');\n  createCanvas(100, 100, WEBGL);\n\n  // Hide the video.\n  vid.hide();\n\n  // Set the video to loop.\n  vid.loop();\n\n  describe('A rectangle with video as texture');\n}\n\nfunction draw() {\n  background(0);\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Apply the video as a texture.\n  texture(vid);\n\n  // Draw a custom shape using uv coordinates.\n  beginShape();\n  vertex(-40, -40, 0, 0);\n  vertex(40, -40, 1, 0);\n  vertex(40, 40, 1, 1);\n  vertex(-40, 40, 0, 1);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the vertex.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the vertex.",
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "u-coordinate of the vertex's texture.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "v-coordinate of the vertex's texture.",
              "optional": 1,
              "type": "Number"
            }
          ]
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "",
              "type": "Number"
            },
            {
              "name": "u",
              "description": "u-coordinate of the vertex's texture.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "v",
              "description": "v-coordinate of the vertex's texture.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "curveDetail",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/3d_primitives.js",
      "line": 2587,
      "itemtype": "method",
      "description": "<p>Sets the number of segments used to draw spline curves in WebGL mode.</p>\n<p>In WebGL mode, smooth shapes are drawn using many flat segments. Adding\nmore flat segments makes shapes appear smoother.</p>\n<p>The parameter, <code>detail</code>, is the density of segments to use while drawing a\nspline curve.</p>\n<p>Note: <code>curveDetail()</code> has no effect in 2D mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Set the curveDetail() to 0.5\n  curveDetail(0.5);\n\n  // Do not show all the vertices\n  splineProperty('ends', EXCLUDE)\n\n  // Draw a black spline curve.\n  noFill();\n  strokeWeight(1);\n  stroke(0);\n  spline(-45, -24, 0, 23, -26, 0, 23, 11, 0, -35, 15, 0);\n\n  // Draw red spline curves from the anchor points to the control points.\n  spline(255, 0, 0);\n  spline(-45, -24, 0, -45, -24, 0, 23, -26, 0, 23, 11, 0);\n  spline(23, -26, 0, 23, 11, 0, -35, 15, 0, -35, 15, 0);\n\n  // Draw the anchor points in black.\n  strokeWeight(5);\n  stroke(0);\n  point(23, -26);\n  point(23, 11);\n\n  // Draw the control points in red.\n  stroke(255, 0, 0);\n  point(-45, -24);\n  point(-35, 15);\n\n  describe(\n    'A gray square with a jagged curve drawn in three segments. The curve is a sideways U shape with red segments on top and bottom, and a black segment on the right. The endpoints of all the segments are marked with dots.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "resolution",
              "description": "number of segments to use. Default is 1/4",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "frustum",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2603,
      "itemtype": "method",
      "description": "<p>Sets the frustum of the current camera in a 3D sketch.</p>\n<p>In a frustum projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes.</p>\n<p><code>frustum()</code> changes the default camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.</p>\n<p>The first four parameters, <code>left</code>, <code>right</code>, <code>bottom</code>, and <code>top</code>, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\n<code>frustum(-100, 100, 200, -200)</code> creates a frustum that’s 200 pixels wide\nand 400 pixels tall. By default, these coordinates are set based on the\nsketch’s width and height, as in\n<code>ortho(-width / 20, width / 20, height / 20, -height / 20)</code>.</p>\n<p>The last two parameters, <code>near</code> and <code>far</code>, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\n<code>ortho(-100, 100, 200, -200, 50, 1000)</code> creates a frustum that’s 200 pixels\nwide, 400 pixels tall, starts 50 pixels from the camera, and ends 1,000\npixels from the camera. By default, near is set to <code>0.1 * 800</code>, which is\n1/10th the default distance between the camera and the origin. <code>far</code> is set\nto <code>10 * 800</code>, which is 10 times the default distance between the camera\nand the origin.</p>\n<p>Note: <code>frustum()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A row of white cubes on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Apply the default frustum projection.\n  frustum();\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n  describe('A white cube on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Adjust the frustum.\n  // Center it.\n  // Set its width and height to 20 pixels.\n  // Place its near plane 300 pixels from the camera.\n  // Place its far plane 350 pixels from the camera.\n  frustum(-10, 10, -10, 10, 300, 350);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "left",
              "description": "x-coordinate of the frustum’s left plane. Defaults to <code>-width / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "right",
              "description": "x-coordinate of the frustum’s right plane. Defaults to <code>width / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bottom",
              "description": "y-coordinate of the frustum’s bottom plane. Defaults to <code>height / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "top",
              "description": "y-coordinate of the frustum’s top plane. Defaults to <code>-height / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "z-coordinate of the frustum’s near plane. Defaults to <code>0.1 * 800</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "z-coordinate of the frustum’s far plane. Defaults to <code>10 * 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "createCamera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2676,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Camera\">p5.Camera</a> object.</p>\n<p>The new camera is initialized with a default position <code>(0, 0, 800)</code> and a\ndefault perspective projection. Its properties can be controlled with\n<a href=\"#/p5.Camera\">p5.Camera</a> methods such as\n<code>myCamera.lookAt(0, 0, 0)</code>.</p>\n<p>Note: Every 3D sketch starts with a default camera initialized.\nThis camera can be controlled with the functions\n<a href=\"#/p5/camera\">camera()</a>,\n<a href=\"#/p5/perspective\">perspective()</a>,\n<a href=\"#/p5/ortho\">ortho()</a>, and\n<a href=\"#/p5/frustum\">frustum()</a> if it's the only camera in the scene.</p>\n<p>Note: <code>createCamera()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet usingCam1 = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  // Place it at the top-left.\n  // Point it at the origin.\n  cam2 = createCamera();\n  cam2.setPosition(400, -400, 800);\n  cam2.lookAt(0, 0, 0);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A white cube on a gray background. The camera toggles between frontal and aerial views when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the box.\n  box();\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (usingCam1 === true) {\n    setCamera(cam2);\n    usingCam1 = false;\n  } else {\n    setCamera(cam1);\n    usingCam1 = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "the new camera.",
            "type": "p5.Camera"
          }
        }
      ],
      "return": {
        "description": "the new camera.",
        "type": "p5.Camera"
      },
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "beginContour",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 2677,
      "itemtype": "method",
      "description": "<p>Begins creating a hole within a flat shape.</p>\n<p>The <code>beginContour()</code> and <a href=\"#/p5/endContour\">endContour()</a>\nfunctions allow for creating negative space within custom shapes that are\nflat. <code>beginContour()</code> begins adding vertices to a negative space and\n<a href=\"#/p5/endContour\">endContour()</a> stops adding them.\n<code>beginContour()</code> and <a href=\"#/p5/endContour\">endContour()</a> must be\ncalled between <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a>.</p>\n<p>Transformations such as <a href=\"#/p5/translate\">translate()</a>,\n<a href=\"#/p5/rotate\">rotate()</a>, and <a href=\"#/p5/scale\">scale()</a>\ndon't work between <code>beginContour()</code> and\n<a href=\"#/p5/endContour\">endContour()</a>. It's also not possible to use\nother shapes, such as <a href=\"#/p5/ellipse\">ellipse()</a> or\n<a href=\"#/p5/rect\">rect()</a>, between <code>beginContour()</code> and\n<a href=\"#/p5/endContour\">endContour()</a>.</p>\n<p>Note: The vertices that define a negative space must \"wind\" in the opposite\ndirection from the outer shape. First, draw vertices for the outer shape\nclockwise order. Then, draw vertices for the negative space in\ncounter-clockwise order.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Exterior vertices, clockwise winding.\n  vertex(10, 10);\n  vertex(90, 10);\n  vertex(90, 90);\n  vertex(10, 90);\n\n  // Interior vertices, counter-clockwise winding.\n  beginContour();\n  vertex(30, 30);\n  vertex(30, 70);\n  vertex(70, 70);\n  vertex(70, 30);\n  endContour(CLOSE);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n\n  describe('A white square with a square hole in its center drawn on a gray background.');\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white square with a square hole in its center drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Exterior vertices, clockwise winding.\n  vertex(-40, -40);\n  vertex(40, -40);\n  vertex(40, 40);\n  vertex(-40, 40);\n\n  // Interior vertices, counter-clockwise winding.\n  beginContour();\n  vertex(-20, -20);\n  vertex(-20, 20);\n  vertex(20, 20);\n  vertex(20, -20);\n  endContour(CLOSE);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "textureMode",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2717,
      "itemtype": "method",
      "description": "<p>Changes the coordinate system used for textures when they’re applied to\ncustom shapes.</p>\n<p>In order for <a href=\"#/p5/texture\">texture()</a> to work, a shape needs a\nway to map the points on its surface to the pixels in an image. Built-in\nshapes such as <a href=\"#/p5/rect\">rect()</a> and\n<a href=\"#/p5/box\">box()</a> already have these texture mappings based on\ntheir vertices. Custom shapes created with\n<a href=\"#/p5/vertex\">vertex()</a> require texture mappings to be passed as\nuv coordinates.</p>\n<p>Each call to <a href=\"#/p5/vertex\">vertex()</a> must include 5 arguments,\nas in <code>vertex(x, y, z, u, v)</code>, to map the vertex at coordinates <code>(x, y, z)</code>\nto the pixel at coordinates <code>(u, v)</code> within an image. For example, the\ncorners of a rectangular image are mapped to the corners of a rectangle by default:</p>\n<pre><code class=\"language-js\">// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nrect(0, 0, 30, 50);</code></pre><p>If the image in the code snippet above has dimensions of 300 x 500 pixels,\nthe same result could be achieved as follows:</p>\n<pre><code class=\"language-js\">// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\n\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 300, v: 0\nvertex(30, 0, 0, 300, 0);\n\n// Bottom-right.\n// u: 300, v: 500\nvertex(30, 50, 0, 300, 500);\n\n// Bottom-left.\n// u: 0, v: 500\nvertex(0, 50, 0, 0, 500);\n\nendShape();</code></pre><p><code>textureMode()</code> changes the coordinate system for uv coordinates.</p>\n<p>The parameter, <code>mode</code>, accepts two possible constants. If <code>NORMAL</code> is\npassed, as in <code>textureMode(NORMAL)</code>, then the texture’s uv coordinates can\nbe provided in the range 0 to 1 instead of the image’s dimensions. This can\nbe helpful for using the same code for multiple images of different sizes.\nFor example, the code snippet above could be rewritten as follows:</p>\n<pre><code class=\"language-js\">// Set the texture mode to use normalized coordinates.\ntextureMode(NORMAL);\n\n// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\n\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 1, v: 0\nvertex(30, 0, 0, 1, 0);\n\n// Bottom-right.\n// u: 1, v: 1\nvertex(30, 50, 0, 1, 1);\n\n// Bottom-left.\n// u: 0, v: 1\nvertex(0, 50, 0, 0, 1);\n\nendShape();</code></pre><p>By default, <code>mode</code> is <code>IMAGE</code>, which scales uv coordinates to the\ndimensions of the image. Calling <code>textureMode(IMAGE)</code> applies the default.</p>\n<p>Note: <code>textureMode()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  // Load an image and create a p5.Image object.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('An image of a ceiling against a black background.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Draw the custom shape.\n  // Use the image's width and height as uv coordinates.\n  beginShape();\n  vertex(-30, -30, 0, 0);\n  vertex(30, -30, img.width, 0);\n  vertex(30, 30, img.width, img.height);\n  vertex(-30, 30, 0, img.height);\n  endShape();\n}",
        "let img;\n\nasync function setup() {\n  // Load an image and create a p5.Image object.\n  img = await loadImage('assets/laDefense.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('An image of a ceiling against a black background.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Draw the custom shape.\n  // Use normalized uv coordinates.\n  beginShape();\n  vertex(-30, -30, 0, 0);\n  vertex(30, -30, 1, 0);\n  vertex(30, 30, 1, 1);\n  vertex(-30, 30, 0, 1);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "either IMAGE or NORMAL.",
              "type": "IMAGE|NORMAL"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "setCamera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 2739,
      "itemtype": "method",
      "description": "<p>Sets the current (active) camera of a 3D sketch.</p>\n<p><code>setCamera()</code> allows for switching between multiple cameras created with\n<a href=\"#/p5/createCamera\">createCamera()</a>.</p>\n<p>Note: <code>setCamera()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet usingCam1 = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  // Place it at the top-left.\n  // Point it at the origin.\n  cam2 = createCamera();\n  cam2.setPosition(400, -400, 800);\n  cam2.lookAt(0, 0, 0);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A white cube on a gray background. The camera toggles between frontal and aerial views when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the box.\n  box();\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (usingCam1 === true) {\n    setCamera(cam2);\n    usingCam1 = false;\n  } else {\n    setCamera(cam1);\n    usingCam1 = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "cam",
              "description": "camera that should be made active.",
              "type": "p5.Camera"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "endContour",
      "file": "src/scripts/parsers/in/p5.js/src/shape/custom_shapes.js",
      "line": 2776,
      "itemtype": "method",
      "description": "<p>Stops creating a hole within a flat shape.</p>\n<p>The <a href=\"#/p5/beginContour\">beginContour()</a> and <code>endContour()</code>\nfunctions allow for creating negative space within custom shapes that are\nflat. <a href=\"#/p5/beginContour\">beginContour()</a> begins adding vertices\nto a negative space and <code>endContour()</code> stops adding them.\n<a href=\"#/p5/beginContour\">beginContour()</a> and <code>endContour()</code> must be\ncalled between <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a>.</p>\n<p>By default,\nthe controur has an <code>OPEN</code> end, and to close it,\ncall <code>endContour(CLOSE)</code>. The CLOSE contour mode closes splines smoothly.</p>\n<p>Transformations such as <a href=\"#/p5/translate\">translate()</a>,\n<a href=\"#/p5/rotate\">rotate()</a>, and <a href=\"#/p5/scale\">scale()</a>\ndon't work between <a href=\"#/p5/beginContour\">beginContour()</a> and\n<code>endContour()</code>. It's also not possible to use other shapes, such as\n<a href=\"#/p5/ellipse\">ellipse()</a> or <a href=\"#/p5/rect\">rect()</a>,\nbetween <a href=\"#/p5/beginContour\">beginContour()</a> and <code>endContour()</code>.</p>\n<p>Note: The vertices that define a negative space must \"wind\" in the opposite\ndirection from the outer shape. First, draw vertices for the outer shape\nclockwise order. Then, draw vertices for the negative space in\ncounter-clockwise order.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Exterior vertices, clockwise winding.\n  vertex(10, 10);\n  vertex(90, 10);\n  vertex(90, 90);\n  vertex(10, 90);\n\n  // Interior vertices, counter-clockwise winding.\n  beginContour();\n  vertex(30, 30);\n  vertex(30, 70);\n  vertex(70, 70);\n  vertex(70, 30);\n  endContour(CLOSE);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n\n  describe('A white square with a square hole in its center drawn on a gray background.');\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A white square with a square hole in its center drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Start drawing the shape.\n  beginShape();\n\n  // Exterior vertices, clockwise winding.\n  vertex(-40, -40);\n  vertex(40, -40);\n  vertex(40, 40);\n  vertex(-40, 40);\n\n  // Interior vertices, counter-clockwise winding.\n  beginContour();\n  vertex(-20, -20);\n  vertex(-20, 20);\n  vertex(20, 20);\n  vertex(20, -20);\n  endContour(CLOSE);\n\n  // Stop drawing the shape.\n  endShape(CLOSE);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "mode",
              "description": "By default, the value is OPEN",
              "optional": 1,
              "type": "OPEN|CLOSE"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "Shape",
      "submodule": "Custom Shapes"
    },
    {
      "name": "textureWrap",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 2980,
      "itemtype": "method",
      "description": "<p>Changes the way textures behave when a shape’s uv coordinates go beyond the\ntexture.</p>\n<p>In order for <a href=\"#/p5/texture\">texture()</a> to work, a shape needs a\nway to map the points on its surface to the pixels in an image. Built-in\nshapes such as <a href=\"#/p5/rect\">rect()</a> and\n<a href=\"#/p5/box\">box()</a> already have these texture mappings based on\ntheir vertices. Custom shapes created with\n<a href=\"#/p5/vertex\">vertex()</a> require texture mappings to be passed as\nuv coordinates.</p>\n<p>Each call to <a href=\"#/p5/vertex\">vertex()</a> must include 5 arguments,\nas in <code>vertex(x, y, z, u, v)</code>, to map the vertex at coordinates <code>(x, y, z)</code>\nto the pixel at coordinates <code>(u, v)</code> within an image. For example, the\ncorners of a rectangular image are mapped to the corners of a rectangle by default:</p>\n<pre><code class=\"language-js\">// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nrect(0, 0, 30, 50);</code></pre><p>If the image in the code snippet above has dimensions of 300 x 500 pixels,\nthe same result could be achieved as follows:</p>\n<pre><code class=\"language-js\">// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\n\n// Top-left.\n// u: 0, v: 0\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 300, v: 0\nvertex(30, 0, 0, 300, 0);\n\n// Bottom-right.\n// u: 300, v: 500\nvertex(30, 50, 0, 300, 500);\n\n// Bottom-left.\n// u: 0, v: 500\nvertex(0, 50, 0, 0, 500);\n\nendShape();</code></pre><p><code>textureWrap()</code> controls how textures behave when their uv's go beyond the\ntexture. Doing so can produce interesting visual effects such as tiling.\nFor example, the custom shape above could have u-coordinates are greater\nthan the image’s width:</p>\n<pre><code class=\"language-js\">// Apply the image as a texture.\ntexture(img);\n\n// Draw the rectangle.\nbeginShape();\nvertex(0, 0, 0, 0, 0);\n\n// Top-right.\n// u: 600\nvertex(30, 0, 0, 600, 0);\n\n// Bottom-right.\n// u: 600\nvertex(30, 50, 0, 600, 500);\n\nvertex(0, 50, 0, 0, 500);\nendShape();</code></pre><p>The u-coordinates of 600 are greater than the texture image’s width of 300.\nThis creates interesting possibilities.</p>\n<p>The first parameter, <code>wrapX</code>, accepts three possible constants. If <code>CLAMP</code>\nis passed, as in <code>textureWrap(CLAMP)</code>, the pixels at the edge of the\ntexture will extend to the shape’s edges. If <code>REPEAT</code> is passed, as in\n<code>textureWrap(REPEAT)</code>, the texture will tile repeatedly until reaching the\nshape’s edges. If <code>MIRROR</code> is passed, as in <code>textureWrap(MIRROR)</code>, the\ntexture will tile repeatedly until reaching the shape’s edges, flipping\nits orientation between tiles. By default, textures <code>CLAMP</code>.</p>\n<p>The second parameter, <code>wrapY</code>, is optional. It accepts the same three\nconstants, <code>CLAMP</code>, <code>REPEAT</code>, and <code>MIRROR</code>. If one of these constants is\npassed, as in <code>textureWRAP(MIRROR, REPEAT)</code>, then the texture will <code>MIRROR</code>\nhorizontally and <code>REPEAT</code> vertically. By default, <code>wrapY</code> will be set to\nthe same value as <code>wrapX</code>.</p>\n<p>Note: <code>textureWrap()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/rockies128.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'An image of a landscape occupies the top-left corner of a square. Its edge colors smear to cover the other thre quarters of the square.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Set the texture wrapping.\n  // Note: CLAMP is the default mode.\n  textureWrap(CLAMP);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Style the shape.\n  noStroke();\n\n  // Draw the shape.\n  // Use uv coordinates > 1.\n  beginShape();\n  vertex(-30, -30, 0, 0, 0);\n  vertex(30, -30, 0, 2, 0);\n  vertex(30, 30, 0, 2, 2);\n  vertex(-30, 30, 0, 0, 2);\n  endShape();\n}",
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/rockies128.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe('Four identical images of a landscape arranged in a grid.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Set the texture wrapping.\n  textureWrap(REPEAT);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Style the shape.\n  noStroke();\n\n  // Draw the shape.\n  // Use uv coordinates > 1.\n  beginShape();\n  vertex(-30, -30, 0, 0, 0);\n  vertex(30, -30, 0, 2, 0);\n  vertex(30, 30, 0, 2, 2);\n  vertex(-30, 30, 0, 0, 2);\n  endShape();\n}",
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/rockies128.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Four identical images of a landscape arranged in a grid. The images are reflected horizontally and vertically, creating a kaleidoscope effect.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Set the texture wrapping.\n  textureWrap(MIRROR);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Style the shape.\n  noStroke();\n\n  // Draw the shape.\n  // Use uv coordinates > 1.\n  beginShape();\n  vertex(-30, -30, 0, 0, 0);\n  vertex(30, -30, 0, 2, 0);\n  vertex(30, 30, 0, 2, 2);\n  vertex(-30, 30, 0, 0, 2);\n  endShape();\n}",
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/rockies128.jpg');\n\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Four identical images of a landscape arranged in a grid. The top row and bottom row are reflections of each other.'\n  );\n}\n\nfunction draw() {\n  background(0);\n\n  // Set the texture mode.\n  textureMode(NORMAL);\n\n  // Set the texture wrapping.\n  textureWrap(REPEAT, MIRROR);\n\n  // Apply the image as a texture.\n  texture(img);\n\n  // Style the shape.\n  noStroke();\n\n  // Draw the shape.\n  // Use uv coordinates > 1.\n  beginShape();\n  vertex(-30, -30, 0, 0, 0);\n  vertex(30, -30, 0, 2, 0);\n  vertex(30, 30, 0, 2, 2);\n  vertex(-30, 30, 0, 0, 2);\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "wrapX",
              "description": "either CLAMP, REPEAT, or MIRROR",
              "type": "CLAMP|REPEAT|MIRROR"
            },
            {
              "name": "wrapY",
              "description": "either CLAMP, REPEAT, or MIRROR",
              "optional": 1,
              "type": "CLAMP|REPEAT|MIRROR"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "normalMaterial",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3023,
      "itemtype": "method",
      "description": "<p>Sets the current material as a normal material.</p>\n<p>A normal material sets surfaces facing the x-axis to red, those facing the\ny-axis to green, and those facing the z-axis to blue. Normal material isn't\naffected by light. It’s often used as a placeholder material when debugging.</p>\n<p>Note: <code>normalMaterial()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A multicolor torus drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Style the torus.\n  normalMaterial();\n\n  // Draw the torus.\n  torus(30);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "ambientMaterial",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3229,
      "itemtype": "method",
      "description": "<p>Sets the ambient color of shapes’ surface material.</p>\n<p>The <code>ambientMaterial()</code> color sets the components of the\n<a href=\"#/p5/ambientLight\">ambientLight()</a> color that shapes will\nreflect. For example, calling <code>ambientMaterial(255, 255, 0)</code> would cause a\nshape to reflect red and green light, but not blue light.</p>\n<p><code>ambientMaterial()</code> can be called three ways with different parameters to\nset the material’s color.</p>\n<p>The first way to call <code>ambientMaterial()</code> has one parameter, <code>gray</code>.\nGrayscale values between 0 and 255, as in <code>ambientMaterial(50)</code>, can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.</p>\n<p>The second way to call <code>ambientMaterial()</code> has one parameter, <code>color</code>. A\n<a href=\"#/p5.Color\">p5.Color</a> object, an array of color values, or a\nCSS color string, as in <code>ambientMaterial('magenta')</code>, can be passed to set\nthe material’s color.</p>\n<p>The third way to call <code>ambientMaterial()</code> has three parameters, <code>v1</code>, <code>v2</code>,\nand <code>v3</code>. RGB, HSB, or HSL values, as in <code>ambientMaterial(255, 0, 0)</code>, can\nbe passed to set the material’s colors. Color values will be interpreted\nusing the current <a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n<p>Note: <code>ambientMaterial()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A magenta cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a magenta ambient light.\n  ambientLight(255, 0, 255);\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A purple cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a magenta ambient light.\n  ambientLight(255, 0, 255);\n\n  // Add a dark gray ambient material.\n  ambientMaterial(150);\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a magenta ambient light.\n  ambientLight(255, 0, 255);\n\n  // Add a yellow ambient material using RGB values.\n  ambientMaterial(255, 255, 0);\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a magenta ambient light.\n  ambientLight(255, 0, 255);\n\n  // Add a yellow ambient material using a p5.Color object.\n  let c = color(255, 255, 0);\n  ambientMaterial(c);\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a magenta ambient light.\n  ambientLight(255, 0, 255);\n\n  // Add a yellow ambient material using a color string.\n  ambientMaterial('yellow');\n\n  // Draw the box.\n  box();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A yellow cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white ambient light.\n  ambientLight(255, 255, 255);\n\n  // Add a yellow ambient material using a color string.\n  ambientMaterial('yellow');\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value between 0 (black) and 255 (white).",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or a CSS string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "emissiveMaterial",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3321,
      "itemtype": "method",
      "description": "<p>Sets the emissive color of shapes’ surface material.</p>\n<p>The <code>emissiveMaterial()</code> color sets a color shapes display at full\nstrength, regardless of lighting. This can give the appearance that a shape\nis glowing. However, emissive materials don’t actually emit light that\ncan affect surrounding objects.</p>\n<p><code>emissiveMaterial()</code> can be called three ways with different parameters to\nset the material’s color.</p>\n<p>The first way to call <code>emissiveMaterial()</code> has one parameter, <code>gray</code>.\nGrayscale values between 0 and 255, as in <code>emissiveMaterial(50)</code>, can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.</p>\n<p>The second way to call <code>emissiveMaterial()</code> has one parameter, <code>color</code>. A\n<a href=\"#/p5.Color\">p5.Color</a> object, an array of color values, or a\nCSS color string, as in <code>emissiveMaterial('magenta')</code>, can be passed to set\nthe material’s color.</p>\n<p>The third way to call <code>emissiveMaterial()</code> has four parameters, <code>v1</code>, <code>v2</code>,\n<code>v3</code>, and <code>alpha</code>. <code>alpha</code> is optional. RGBA, HSBA, or HSLA values can be\npassed to set the material’s colors, as in <code>emissiveMaterial(255, 0, 0)</code> or\n<code>emissiveMaterial(255, 0, 0, 30)</code>. Color values will be interpreted using\nthe current <a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n<p>Note: <code>emissiveMaterial()</code> can only be used in WebGL mode.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red cube drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white ambient light.\n  ambientLight(255, 255, 255);\n\n  // Add a red emissive material using RGB values.\n  emissiveMaterial(255, 0, 0);\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value in the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value in the\ncurrent <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha value in the current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value between 0 (black) and 255 (white).",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or a CSS string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "specularMaterial",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3561,
      "itemtype": "method",
      "description": "<p>Sets the specular color of shapes’ surface material.</p>\n<p>The <code>specularMaterial()</code> color sets the components of light color that\nglossy coats on shapes will reflect. For example, calling\n<code>specularMaterial(255, 255, 0)</code> would cause a shape to reflect red and\ngreen light, but not blue light.</p>\n<p>Unlike <a href=\"#/p5/ambientMaterial\">ambientMaterial()</a>,\n<code>specularMaterial()</code> will reflect the full color of light sources including\n<a href=\"#/p5/directionalLight\">directionalLight()</a>,\n<a href=\"#/p5/pointLight\">pointLight()</a>,\nand <a href=\"#/p5/spotLight\">spotLight()</a>. This is what gives it shapes\ntheir \"shiny\" appearance. The material’s shininess can be controlled by the\n<a href=\"#/p5/shininess\">shininess()</a> function.</p>\n<p><code>specularMaterial()</code> can be called three ways with different parameters to\nset the material’s color.</p>\n<p>The first way to call <code>specularMaterial()</code> has one parameter, <code>gray</code>.\nGrayscale values between 0 and 255, as in <code>specularMaterial(50)</code>, can be\npassed to set the material’s color. Higher grayscale values make shapes\nappear brighter.</p>\n<p>The second way to call <code>specularMaterial()</code> has one parameter, <code>color</code>. A\n<a href=\"#/p5.Color\">p5.Color> object, an array of color values, or a CSS\ncolor string, as in <code>specularMaterial('magenta')</code>, can be passed to set the\nmaterial’s color.</p>\n<p>The third way to call <code>specularMaterial()</code> has four parameters, <code>v1</code>, <code>v2</code>,\n<code>v3</code>, and <code>alpha</code>. <code>alpha</code> is optional. RGBA, HSBA, or HSLA values can be\npassed to set the material’s colors, as in <code>specularMaterial(255, 0, 0)</code> or\n<code>specularMaterial(255, 0, 0, 30)</code>. Color values will be interpreted using\nthe current <a href=\"#/p5/colorMode\">colorMode()</a>.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to apply a specular material.\n\nlet isGlossy = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A red torus drawn on a gray background. It becomes glossy when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white point light at the top-right.\n  pointLight(255, 255, 255, 30, -40, 30);\n\n  // Add a glossy coat if the user has double-clicked.\n  if (isGlossy === true) {\n    specularMaterial(255);\n    shininess(50);\n  }\n\n  // Style the torus.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the torus.\n  torus(30);\n}\n\n// Make the torus glossy when the user double-clicks.\nfunction doubleClicked() {\n  isGlossy = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to apply a specular material.\n\nlet isGlossy = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A red torus drawn on a gray background. It becomes glossy and reflects green light when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white point light at the top-right.\n  pointLight(255, 255, 255, 30, -40, 30);\n\n  // Add a glossy green coat if the user has double-clicked.\n  if (isGlossy === true) {\n    specularMaterial(0, 255, 0);\n    shininess(50);\n  }\n\n  // Style the torus.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the torus.\n  torus(30);\n}\n\n// Make the torus glossy when the user double-clicks.\nfunction doubleClicked() {\n  isGlossy = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to apply a specular material.\n\nlet isGlossy = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A red torus drawn on a gray background. It becomes glossy and reflects green light when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white point light at the top-right.\n  pointLight(255, 255, 255, 30, -40, 30);\n\n  // Add a glossy green coat if the user has double-clicked.\n  if (isGlossy === true) {\n    // Create a p5.Color object.\n    let c = color('green');\n    specularMaterial(c);\n    shininess(50);\n  }\n\n  // Style the torus.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the torus.\n  torus(30);\n}\n\n// Make the torus glossy when the user double-clicks.\nfunction doubleClicked() {\n  isGlossy = true;\n}",
        "// Click and drag the mouse to view the scene from different angles.\n// Double-click the canvas to apply a specular material.\n\nlet isGlossy = false;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'A red torus drawn on a gray background. It becomes glossy and reflects green light when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on a white point light at the top-right.\n  pointLight(255, 255, 255, 30, -40, 30);\n\n  // Add a glossy green coat if the user has double-clicked.\n  if (isGlossy === true) {\n    specularMaterial('#00FF00');\n    shininess(50);\n  }\n\n  // Style the torus.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the torus.\n  torus(30);\n}\n\n// Make the torus glossy when the user double-clicks.\nfunction doubleClicked() {\n  isGlossy = true;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "gray",
              "description": "grayscale value between 0 (black) and 255 (white).",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "alpha value in the current current\n<a href=\"#/p5/colorMode\">colorMode()</a>.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v1",
              "description": "red or hue value in\nthe current <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v2",
              "description": "green or saturation value\nin the current <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "v3",
              "description": "blue, brightness, or lightness value\nin the current <a href=\"#/p5/colorMode\">colorMode()</a>.",
              "type": "Number"
            },
            {
              "name": "alpha",
              "description": "",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "color",
              "description": "color as a <a href=\"#/p5.Color\">p5.Color</a> object,\nan array of color values, or a CSS string.",
              "type": "p5.Color|Number[]|String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "shininess",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3630,
      "itemtype": "method",
      "description": "<p>Sets the amount of gloss (\"shininess\") of a\n<a href=\"#/p5/specularMaterial\">specularMaterial()</a>.</p>\n<p>Shiny materials focus reflected light more than dull materials.\n<code>shininess()</code> affects the way materials reflect light sources including\n<a href=\"#/p5/directionalLight\">directionalLight()</a>,\n<a href=\"#/p5/pointLight\">pointLight()</a>,\nand <a href=\"#/p5/spotLight\">spotLight()</a>.</p>\n<p>The parameter, <code>shine</code>, is a number that sets the amount of shininess.\n<code>shine</code> must be greater than 1, which is its default value.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Two red spheres drawn on a gray background. White light reflects from their surfaces as the mouse moves. The right sphere is shinier than the left sphere.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Turn on a red ambient light.\n  ambientLight(255, 0, 0);\n\n  // Get the mouse's coordinates.\n  let mx = mouseX - 50;\n  let my = mouseY - 50;\n\n  // Turn on a white point light that follows the mouse.\n  pointLight(255, 255, 255, mx, my, 50);\n\n  // Style the sphere.\n  noStroke();\n\n  // Add a specular material with a grayscale value.\n  specularMaterial(255);\n\n  // Draw the left sphere with low shininess.\n  translate(-25, 0, 0);\n  shininess(10);\n  sphere(20);\n\n  // Draw the right sphere with high shininess.\n  translate(50, 0, 0);\n  shininess(100);\n  sphere(20);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "shine",
              "description": "amount of shine.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "metalness",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/material.js",
      "line": 3739,
      "itemtype": "method",
      "description": "<p>Sets the amount of \"metalness\" of a\n<a href=\"#/p5/specularMaterial\">specularMaterial()</a>.</p>\n<p><code>metalness()</code> can make materials appear more metallic. It affects the way\nmaterials reflect light sources including\naffects the way materials reflect light sources including\n<a href=\"#/p5/directionalLight\">directionalLight()</a>,\n<a href=\"#/p5/pointLight\">pointLight()</a>,\n<a href=\"#/p5/spotLight\">spotLight()</a>, and\n<a href=\"#/p5/imageLight\">imageLight()</a>.</p>\n<p>The parameter, <code>metallic</code>, is a number that sets the amount of metalness.\n<code>metallic</code> must be greater than 1, which is its default value. Higher\nvalues, such as <code>metalness(100)</code>, make specular materials appear more\nmetallic.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe(\n    'Two blue spheres drawn on a gray background. White light reflects from their surfaces as the mouse moves. The right sphere is more metallic than the left sphere.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Turn on an ambient light.\n  ambientLight(200);\n\n  // Get the mouse's coordinates.\n  let mx = mouseX - 50;\n  let my = mouseY - 50;\n\n  // Turn on a white point light that follows the mouse.\n  pointLight(255, 255, 255, mx, my, 50);\n\n  // Style the spheres.\n  noStroke();\n  fill(30, 30, 255);\n  specularMaterial(255);\n  shininess(20);\n\n  // Draw the left sphere with low metalness.\n  translate(-25, 0, 0);\n  metalness(1);\n  sphere(20);\n\n  // Draw the right sphere with high metalness.\n  translate(50, 0, 0);\n  metalness(50);\n  sphere(20);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet img;\n\nasync function setup() {\n  img = await loadImage('assets/outdoor_spheremap.jpg');\n\n  createCanvas(100 ,100 ,WEBGL);\n\n  describe(\n    'Two spheres floating above a landscape. The surface of the spheres reflect the landscape. The right sphere is more reflective than the left sphere.'\n  );\n}\n\nfunction draw() {\n  // Add the panorama.\n  panorama(img);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Use the image as a light source.\n  imageLight(img);\n\n  // Style the spheres.\n  noStroke();\n  specularMaterial(50);\n  shininess(200);\n\n  // Draw the left sphere with low metalness.\n  translate(-25, 0, 0);\n  metalness(1);\n  sphere(20);\n\n  // Draw the right sphere with high metalness.\n  translate(50, 0, 0);\n  metalness(50);\n  sphere(20);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "metallic",
              "description": "amount of metalness.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "remove",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 47,
      "itemtype": "method",
      "description": "Removes the element, stops all audio/video streams, and removes all\ncallback functions.",
      "example": [
        "let p;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element.\n  p = createP('p5*js');\n  p.position(10, 10);\n\n  describe('The text \"p5*js\" written at the center of a gray square. ');\n}\n\n// Remove the paragraph when the user double-clicks.\nfunction doubleClicked() {\n  p.remove();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "parent",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 205,
      "itemtype": "method",
      "description": "<p>Attaches the element to a parent element.</p>\n<p>For example, a <code><div></div></code> element may be used as a box to\nhold two pieces of text, a header and a paragraph. The\n<code><div></div></code> is the parent element of both the header and\nparagraph.</p>\n<p>The parameter <code>parent</code> can have one of three types. <code>parent</code> can be a\nstring with the parent element's ID, as in\n<code>myElement.parent('container')</code>. It can also be another\n<a href=\"#/p5.Element\">p5.Element</a> object, as in\n<code>myElement.parent(myDiv)</code>. Finally, <code>parent</code> can be an <code>HTMLElement</code>\nobject, as in <code>myElement.parent(anotherElement)</code>.</p>\n<p>Calling <code>myElement.parent()</code> without an argument returns the element's\nparent.</p>\n",
      "example": [
        "function setup()  {\n  background(200);\n\n  // Create a div element.\n  let div = createDiv();\n\n  // Place the div in the top-left corner.\n  div.position(10, 20);\n\n  // Set its width and height.\n  div.size(80, 60);\n\n  // Set its background color to white\n  div.style('background-color', 'white');\n\n  // Align any text to the center.\n  div.style('text-align', 'center');\n\n  // Set its ID to \"container\".\n  div.id('container');\n\n  // Create a paragraph element.\n  let p = createP('p5*js');\n\n  // Make the div its parent\n  // using its ID \"container\".\n  p.parent('container');\n\n  describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}",
        "function setup()  {\n  background(200);\n\n  // Create rectangular div element.\n  let div = createDiv();\n\n  // Place the div in the top-left corner.\n  div.position(10, 20);\n\n  // Set its width and height.\n  div.size(80, 60);\n\n  // Set its background color and align\n  // any text to the center.\n  div.style('background-color', 'white');\n  div.style('text-align', 'center');\n\n  // Create a paragraph element.\n  let p = createP('p5*js');\n\n  // Make the div its parent.\n  p.parent(div);\n\n  describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}",
        "function setup()  {\n  background(200);\n\n  // Create rectangular div element.\n  let div = createDiv();\n\n  // Place the div in the top-left corner.\n  div.position(10, 20);\n\n  // Set its width and height.\n  div.size(80, 60);\n\n  // Set its background color and align\n  // any text to the center.\n  div.style('background-color', 'white');\n  div.style('text-align', 'center');\n\n  // Create a paragraph element.\n  let p = createP('p5*js');\n\n  // Make the div its parent\n  // using the underlying\n  // HTMLElement.\n  p.parent(div.elt);\n\n  describe('The text \"p5*js\" written in black at the center of a white rectangle. The rectangle is inside a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "parent",
              "description": "ID, <a href=\"#/p5.Element\">p5.Element</a>,\nor HTMLElement of desired parent element.",
              "type": "String|p5.Element|Object"
            }
          ],
          "chainable": 1
        },
        {
          "params": [],
          "return": {
            "description": "",
            "type": "p5.Element"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "p5.Element"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "child",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 299,
      "itemtype": "method",
      "description": "<p>Attaches the element as a child of another element.</p>\n<p><code>myElement.child()</code> accepts either a string ID, DOM node, or\n<a href=\"#/p5.Element\">p5.Element</a>. For example,\n<code>myElement.child(otherElement)</code>. If no argument is provided, an array of\nchildren DOM nodes is returned.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div elements.\n  let div0 = createDiv('Parent');\n  let div1 = createDiv('Child');\n\n  // Make div1 the child of div0\n  // using the p5.Element.\n  div0.child(div1);\n\n  describe('A gray square with the words \"Parent\" and \"Child\" written beneath it.');\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div elements.\n  let div0 = createDiv('Parent');\n  let div1 = createDiv('Child');\n\n  // Give div1 an ID.\n  div1.id('apples');\n\n  // Make div1 the child of div0\n  // using its ID.\n  div0.child('apples');\n\n  describe('A gray square with the words \"Parent\" and \"Child\" written beneath it.');\n}",
        "// META:norender\n// This example assumes there is a div already on the page\n// with id \"myChildDiv\".\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div elements.\n  let div0 = createDiv('Parent');\n\n  // Select the child element by its ID.\n  let elt = document.getElementById('myChildDiv');\n\n  // Make div1 the child of div0\n  // using its HTMLElement object.\n  div0.child(elt);\n\n  describe('A gray square with the words \"Parent\" and \"Child\" written beneath it.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "an array of child nodes.",
            "type": "Node[]"
          }
        },
        {
          "params": [
            {
              "name": "child",
              "description": "the ID, DOM node, or <a href=\"#/p5.Element\">p5.Element</a>\nto add to the current element",
              "optional": 1,
              "type": "String|p5.Element"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "an array of child nodes.",
        "type": "Node[]"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "html",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 384,
      "itemtype": "method",
      "description": "<p>Sets the inner HTML of the element, replacing any existing HTML.</p>\n<p>The second parameter, <code>append</code>, is optional. If <code>true</code> is passed, as in\n<code>myElement.html('hi', true)</code>, the HTML is appended instead of replacing\nexisting HTML.</p>\n<p>If no arguments are passed, as in <code>myElement.html()</code>, the element's inner\nHTML is returned.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create the div element and set its size.\n  let div = createDiv('');\n  div.size(100, 100);\n\n  // Set the inner HTML to \"hi\".\n  div.html('hi');\n\n  describe('A gray square with the word \"hi\" written beneath it.');\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div element and set its size.\n  let div = createDiv('Hello ');\n  div.size(100, 100);\n\n  // Append \"World\" to the div's HTML.\n  div.html('World', true);\n\n  describe('A gray square with the text \"Hello World\" written beneath it.');\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div element.\n  let div = createDiv('Hello');\n\n  // Prints \"Hello\" to the console.\n  print(div.html());\n\n  describe('A gray square with the word \"Hello!\" written beneath it.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "the inner HTML of the element",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "html",
              "description": "the HTML to be placed inside the element",
              "optional": 1,
              "type": "String"
            },
            {
              "name": "append",
              "description": "whether to append HTML to existing",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "the inner HTML of the element",
        "type": "String"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "id",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 426,
      "itemtype": "method",
      "description": "<p>Sets the element's ID using a given string.</p>\n<p>Calling <code>myElement.id()</code> without an argument returns its ID as a string.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Set the canvas' ID\n  // to \"mycanvas\".\n  cnv.id('mycanvas');\n\n  // Get the canvas' ID.\n  let id = cnv.id();\n  text(id, 24, 54);\n\n  describe('The text \"mycanvas\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "id",
              "description": "ID of the element.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [],
          "return": {
            "description": "ID of the element.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "ID of the element.",
        "type": "String"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "class",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 471,
      "itemtype": "method",
      "description": "<p>Adds a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class\" target=\"_blank\">class attribute</a>\nto the element using a given string.</p>\n<p>Calling <code>myElement.class()</code> without an argument returns a string with its current classes.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Add the class \"small\" to the\n  // canvas element.\n  cnv.class('small');\n\n  // Get the canvas element's class\n  // and display it.\n  let c = cnv.class();\n  text(c, 35, 54);\n\n  describe('The word \"small\" written in black on a gray canvas.');\n\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "class",
              "description": "class to add.",
              "type": "String"
            }
          ],
          "chainable": 1
        },
        {
          "params": [],
          "return": {
            "description": "element's classes, if any.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "element's classes, if any.",
        "type": "String"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "addClass",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 504,
      "itemtype": "method",
      "description": "Adds a class to the element.",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element.\n  let div = createDiv('div');\n\n  // Add a class to the div.\n  div.addClass('myClass');\n\n  describe('A gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "class",
              "description": "name of class to add.",
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "removeClass",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 548,
      "itemtype": "method",
      "description": "Removes a class from the element.",
      "example": [
        "// META:norender\n// In this example, a class is set when the div is created\n// and removed when mouse is pressed. This could link up\n// with a CSS style rule to toggle style properties.\n\nlet div;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element.\n  div = createDiv('div');\n\n  // Add a class to the div.\n  div.addClass('myClass');\n\n  describe('A gray square.');\n}\n\n// Remove 'myClass' from the div when the user presses the mouse.\nfunction mousePressed() {\n  div.removeClass('myClass');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "class",
              "description": "name of class to remove.",
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "hasClass",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 587,
      "itemtype": "method",
      "description": "Checks if a class is already applied to element.",
      "example": [
        "// META:norender\nlet div;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element.\n  div = createDiv('div');\n\n  // Add the class 'show' to the div.\n  div.addClass('show');\n\n  describe('A gray square.');\n}\n\n// Toggle the class 'show' when the mouse is pressed.\nfunction mousePressed() {\n  if (div.hasClass('show')) {\n    div.addClass('show');\n  } else {\n    div.removeClass('show');\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "c",
              "description": "{String} name of class to check."
            }
          ],
          "return": {
            "description": "a boolean value if element has specified class.",
            "type": "boolean"
          }
        }
      ],
      "return": {
        "description": "a boolean value if element has specified class.",
        "type": "boolean"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "toggleClass",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 620,
      "itemtype": "method",
      "description": "Toggles whether a class is applied to the element.",
      "example": [
        "// META:norender\nlet div;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element.\n  div = createDiv('div');\n\n  // Add the 'show' class to the div.\n  div.addClass('show');\n\n  describe('A gray square.');\n}\n\n// Toggle the 'show' class when the mouse is pressed.\nfunction mousePressed() {\n  div.toggleClass('show');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "c",
              "description": "{String} class name to toggle."
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "center",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 661,
      "itemtype": "method",
      "description": "<p>Centers the element either vertically, horizontally, or both.</p>\n<p><code>center()</code> will center the element relative to its parent or according to\nthe page's body if the element has no parent.</p>\n<p>If no argument is passed, as in <code>myElement.center()</code> the element is aligned\nboth vertically and horizontally.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create the div element and style it.\n  let div = createDiv('');\n  div.size(10, 10);\n  div.style('background-color', 'orange');\n\n  // Center the div relative to the page's body.\n  div.center();\n\n  describe('A gray square and an orange rectangle. The rectangle is at the center of the page.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "align",
              "description": "passing 'vertical', 'horizontal' aligns element accordingly",
              "optional": 1,
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "position",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 746,
      "itemtype": "method",
      "description": "<p>Sets the element's position.</p>\n<p>The first two parameters, <code>x</code> and <code>y</code>, set the element's position relative\nto the top-left corner of the web page.</p>\n<p>The third parameter, <code>positionType</code>, is optional. It sets the element's\n<a target=\"_blank\"\nhref=\"https://developer.mozilla.org/en-US/docs/Web/CSS/position\">positioning scheme</a>.\n<code>positionType</code> is a string that can be either <code>'static'</code>, <code>'fixed'</code>,\n<code>'relative'</code>, <code>'sticky'</code>, <code>'initial'</code>, or <code>'inherit'</code>.</p>\n<p>If no arguments passed, as in <code>myElement.position()</code>, the method returns\nthe element's position in an object, as in <code>{ x: 0, y: 0 }</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Positions the canvas 50px to the right and 100px\n  // below the top-left corner of the window.\n  cnv.position(50, 100);\n\n  describe('A gray square that is 50 pixels to the right and 100 pixels down from the top-left corner of the web page.');\n}",
        "// META:norender\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Positions the canvas at the top-left corner\n  // of the window with a 'fixed' position type.\n  cnv.position(0, 0, 'fixed');\n\n  describe('A gray square in the top-left corner of the web page.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "object of form <code>{ x: 0, y: 0 }</code> containing the element's position.",
            "type": "Object"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "x-position relative to top-left of window (optional)",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-position relative to top-left of window (optional)",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "positionType",
              "description": "it can be static, fixed, relative, sticky, initial or inherit (optional)",
              "optional": 1,
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "object of form <code>{ x: 0, y: 0 }</code> containing the element's position.",
        "type": "Object"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "show",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 796,
      "itemtype": "method",
      "description": "Shows the current element.",
      "example": [
        "let p;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and hide it.\n  p = createP('p5*js');\n  p.position(10, 10);\n  p.hide();\n\n  describe('A gray square. The text \"p5*js\" appears when the user double-clicks the square.');\n}\n\n// Show the paragraph when the user double-clicks.\nfunction doubleClicked() {\n  p.show();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "hide",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 826,
      "itemtype": "method",
      "description": "Hides the current element.",
      "example": [
        "let p;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element.\n  p = createP('p5*js');\n  p.position(10, 10);\n\n  describe('The text \"p5*js\" at the center of a gray square. The text disappears when the user double-clicks the square.');\n}\n\n// Hide the paragraph when the user double-clicks.\nfunction doubleClicked() {\n  p.hide();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "size",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 939,
      "itemtype": "method",
      "description": "<p>Sets the element's width and height.</p>\n<p>Calling <code>myElement.size()</code> without an argument returns the element's size\nas an object with the properties <code>width</code> and <code>height</code>. For example,\n<code>{ width: 20, height: 10 }</code>.</p>\n<p>The first parameter, <code>width</code>, is optional. It's a number used to set the\nelement's width. Calling <code>myElement.size(10)</code></p>\n<p>The second parameter, 'height<code>, is also optional. It's a\nnumber used to set the element's height. For example, calling\n</code>myElement.size(20, 10)` sets the element's width to 20 pixels and height\nto 10 pixels.</p>\n<p>The constant <code>AUTO</code> can be used to adjust one dimension at a time while\nmaintaining the aspect ratio, which is <code>width / height</code>. For example,\nconsider an element that's 200 pixels wide and 100 pixels tall. Calling\n<code>myElement.size(20, AUTO)</code> sets the width to 20 pixels and height to 10\npixels.</p>\n<p>Note: In the case of elements that need to load data, such as images, wait\nto call <code>myElement.size()</code> until after the data loads.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a pink div element and place it at the top-left corner.\n  let div = createDiv();\n  div.position(10, 10);\n  div.style('background-color', 'deeppink');\n\n  // Set the div's width to 80 pixels and height to 20 pixels.\n  div.size(80, 20);\n\n  describe('A gray square with a pink rectangle near its top.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a pink div element and place it at the top-left corner.\n  let div = createDiv();\n  div.position(10, 10);\n  div.style('background-color', 'deeppink');\n\n  // Set the div's width to 80 pixels and height to 40 pixels.\n  div.size(80, 40);\n\n  // Get the div's size as an object.\n  let s = div.size();\n\n  // Display the div's dimensions.\n  div.html(`${s.width} x ${s.height}`);\n\n  describe('A gray square with a pink rectangle near its top. The text \"80 x 40\" is written within the rectangle.');\n}",
        "let img1;\nlet img2;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Load an image of an astronaut on the moon\n  // and place it at the top-left of the canvas.\n  img1 = createImg(\n    'assets/moonwalk.jpg',\n    'An astronaut walking on the moon',\n    ''\n  );\n  img1.position(0, 0);\n\n  // Load an image of an astronaut on the moon\n  // and place it at the top-left of the canvas.\n  // Resize the image once it's loaded.\n  img2 = createImg(\n    'assets/moonwalk.jpg',\n    'An astronaut walking on the moon',\n    '',\n    resizeImage\n  );\n  img2.position(0, 0);\n\n  describe('A gray square two copies of a space image at the top-left. The copy in front is smaller.');\n}\n\n// Resize img2 and keep its aspect ratio.\nfunction resizeImage() {\n  img2.size(50, AUTO);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "width and height of the element in an object.",
            "type": "Object"
          }
        },
        {
          "params": [
            {
              "name": "w",
              "description": "width of the element, either AUTO, or a number.",
              "optional": 1,
              "type": "Number|AUTO"
            },
            {
              "name": "h",
              "description": "height of the element, either AUTO, or a number.",
              "optional": 1,
              "type": "Number|AUTO"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "width and height of the element in an object.",
        "type": "Object"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "style",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1083,
      "itemtype": "method",
      "description": "<p>Applies a style to the element by adding a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax\" target=\"_blank\">CSS declaration</a>.</p>\n<p>The first parameter, <code>property</code>, is a string. If the name of a style\nproperty is passed, as in <code>myElement.style('color')</code>, the method returns\nthe current value as a string or <code>null</code> if it hasn't been set. If a\n<code>property:style</code> string is passed, as in\n<code>myElement.style('color:deeppink')</code>, the method sets the style <code>property</code>\nto <code>value</code>.</p>\n<p>The second parameter, <code>value</code>, is optional. It sets the property's value.\n<code>value</code> can be a string, as in\n<code>myElement.style('color', 'deeppink')</code>, or a\n<a href=\"#/p5.Color\">p5.Color</a> object, as in\n<code>myElement.style('color', myColor)</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and set its font color to \"deeppink\".\n  let p = createP('p5*js');\n  p.position(25, 20);\n  p.style('color', 'deeppink');\n\n  describe('The text p5*js written in pink on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Color object.\n  let c = color('deeppink');\n\n  // Create a paragraph element and set its font color using a p5.Color object.\n  let p = createP('p5*js');\n  p.position(25, 20);\n  p.style('color', c);\n\n  describe('The text p5*js written in pink on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and set its font color to \"deeppink\"\n  // using property:value syntax.\n  let p = createP('p5*js');\n  p.position(25, 20);\n  p.style('color:deeppink');\n\n  describe('The text p5*js written in pink on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an empty paragraph element and set its font color to \"deeppink\".\n  let p = createP();\n  p.position(5, 5);\n  p.style('color', 'deeppink');\n\n  // Get the element's color as an  RGB color string.\n  let c = p.style('color');\n\n  // Set the element's inner HTML using the RGB color string.\n  p.html(c);\n\n  describe('The text \"rgb(255, 20, 147)\" written in pink on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "property",
              "description": "style property to set.",
              "type": "String"
            }
          ],
          "return": {
            "description": "value of the property.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "property",
              "description": "",
              "type": "String"
            },
            {
              "name": "value",
              "description": "value to assign to the property.",
              "type": "String|p5.Color"
            }
          ],
          "return": {
            "description": "value of the property.",
            "type": "String"
          },
          "chainable": 1
        }
      ],
      "return": {
        "description": "value of the property.",
        "type": "String"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "attribute",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1235,
      "itemtype": "method",
      "description": "<p>Adds an\n<a href=\"https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#attributes\" target=\"_blank\">attribute</a>\nto the element.</p>\n<p>This method is useful for advanced tasks. Most commonly-used attributes,\nsuch as <code>id</code>, can be set with their dedicated methods. For example,\n<code>nextButton.id('next')</code> sets an element's <code>id</code> attribute. Calling\n<code>nextButton.attribute('id', 'next')</code> has the same effect.</p>\n<p>The first parameter, <code>attr</code>, is the attribute's name as a string. Calling\n<code>myElement.attribute('align')</code> returns the attribute's current value as a\nstring or <code>null</code> if it hasn't been set.</p>\n<p>The second parameter, <code>value</code>, is optional. It's a string used to set the\nattribute's value. For example, calling\n<code>myElement.attribute('align', 'center')</code> sets the element's horizontal\nalignment to <code>center</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a container div element and place it at the top-left corner.\n  let container = createDiv();\n  container.position(0, 0);\n\n  // Create a paragraph element and place it within the container.\n  // Set its horizontal alignment to \"left\".\n  let p1 = createP('hi');\n  p1.parent(container);\n  p1.attribute('align', 'left');\n\n  // Create a paragraph element and place it within the container.\n  // Set its horizontal alignment to \"center\".\n  let p2 = createP('hi');\n  p2.parent(container);\n  p2.attribute('align', 'center');\n\n  // Create a paragraph element and place it within the container.\n  // Set its horizontal alignment to \"right\".\n  let p3 = createP('hi');\n  p3.parent(container);\n  p3.attribute('align', 'right');\n\n  describe('A gray square with the text \"hi\" written on three separate lines, each placed further to the right.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "value of the attribute.",
            "type": "String"
          }
        },
        {
          "params": [
            {
              "name": "attr",
              "description": "attribute to set.",
              "type": "String"
            },
            {
              "name": "value",
              "description": "value to assign to the attribute.",
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "value of the attribute.",
        "type": "String"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "removeAttribute",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1290,
      "itemtype": "method",
      "description": "<p>Removes an attribute from the element.</p>\n<p>The parameter <code>attr</code> is the attribute's name as a string. For example,\ncalling <code>myElement.removeAttribute('align')</code> removes its <code>align</code>\nattribute if it's been set.</p>\n",
      "example": [
        "let p;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a paragraph element and place it in the center of the canvas.\n  // Set its \"align\" attribute to \"center\".\n  p = createP('hi');\n  p.position(0, 20);\n  p.attribute('align', 'center');\n\n  describe('The text \"hi\" written in black at the center of a gray square. The text moves to the left edge when double-clicked.');\n}\n\n// Remove the 'align' attribute when the user double-clicks the paragraph.\nfunction doubleClicked() {\n  p.removeAttribute('align');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "attr",
              "description": "attribute to remove.",
              "type": "String"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "value",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1367,
      "itemtype": "method",
      "description": "<p>Returns or sets the element's value.</p>\n<p>Calling <code>myElement.value()</code> returns the element's current value.</p>\n<p>The parameter, <code>value</code>, is an optional number or string. If provided,\nas in <code>myElement.value(123)</code>, it's used to set the element's value.</p>\n",
      "example": [
        "let input;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a text input and place it beneath the canvas.\n  // Set its default value to \"hello\".\n  input = createInput('hello');\n  input.position(0, 100);\n\n  describe('The text from an input box is displayed on a gray square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use the input's value to display a message.\n  let msg = input.value();\n  text(msg, 0, 55);\n}",
        "let input;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a text input and place it beneath the canvas.\n  // Set its default value to \"hello\".\n  input = createInput('hello');\n  input.position(0, 100);\n\n  describe('The text from an input box is displayed on a gray square. The text resets to \"hello\" when the user double-clicks the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Use the input's value to display a message.\n  let msg = input.value();\n  text(msg, 0, 55);\n}\n\n// Reset the input's value.\nfunction doubleClicked() {\n  input.value('hello');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "value of the element.",
            "type": "String|Number"
          }
        },
        {
          "params": [
            {
              "name": "value",
              "description": "",
              "type": "String|Number"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "value of the element.",
        "type": "String|Number"
      },
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mousePressed",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1413,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse is pressed over the element.</p>\n<p>Calling <code>myElement.mousePressed(false)</code> disables the function.</p>\n<p>Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the canvas\n  // is pressed.\n  cnv.mousePressed(randomColor);\n\n  describe('A gray square changes color when the mouse is pressed.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse is\npressed over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "doubleClicked",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1462,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse is pressed twice over the element.</p>\n<p>Calling <code>myElement.doubleClicked(false)</code> disables the function.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the\n  // canvas is double-clicked.\n  cnv.doubleClicked(randomColor);\n\n  describe('A gray square changes color when the user double-clicks the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse is\ndouble clicked over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseWheel",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1540,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse wheel scrolls over the element.</p>\n<p>The callback function, <code>fxn</code>, is passed an <code>event</code> object. <code>event</code> has\ntwo numeric properties, <code>deltaY</code> and <code>deltaX</code>. <code>event.deltaY</code> is\nnegative if the mouse wheel rotates away from the user. It's positive if\nthe mouse wheel rotates toward the user. <code>event.deltaX</code> is positive if\nthe mouse wheel moves to the right. It's negative if the mouse wheel moves\nto the left.</p>\n<p>Calling <code>myElement.mouseWheel(false)</code> disables the function.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the\n  // mouse wheel moves.\n  cnv.mouseWheel(randomColor);\n\n  describe('A gray square changes color when the user scrolls the mouse wheel over the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}",
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call changeBackground() when the\n  // mouse wheel moves.\n  cnv.mouseWheel(changeBackground);\n\n  describe('A gray square. When the mouse wheel scrolls over the square, it changes color and displays shapes.');\n}\n\nfunction changeBackground(event) {\n  // Change the background color\n  // based on deltaY.\n  if (event.deltaY > 0) {\n    background('deeppink');\n  } else if (event.deltaY < 0) {\n    background('cornflowerblue');\n  } else {\n    background(200);\n  }\n\n  // Draw a shape based on deltaX.\n  if (event.deltaX > 0) {\n    circle(50, 50, 20);\n  } else if (event.deltaX < 0) {\n    square(40, 40, 20);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse wheel is\nscrolled over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseReleased",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1580,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse is released over the element.</p>\n<p>Calling <code>myElement.mouseReleased(false)</code> disables the function.</p>\n<p>Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when a\n  // mouse press ends.\n  cnv.mouseReleased(randomColor);\n\n  describe('A gray square changes color when the user releases a mouse press.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse is\npressed over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseClicked",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1620,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse is pressed and released over the element.</p>\n<p>Calling <code>myElement.mouseReleased(false)</code> disables the function.</p>\n<p>Note: Some mobile browsers may also trigger this event when the element\nreceives a quick tap.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when a\n  // mouse press ends.\n  cnv.mouseClicked(randomColor);\n\n  describe('A gray square changes color when the user releases a mouse press.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse is\npressed and released over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseMoved",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1657,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse moves over the element.</p>\n<p>Calling <code>myElement.mouseMoved(false)</code> disables the function.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the\n  // mouse moves.\n  cnv.mouseMoved(randomColor);\n\n  describe('A gray square changes color when the mouse moves over the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse\nmoves over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseOver",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1694,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse moves onto the element.</p>\n<p>Calling <code>myElement.mouseOver(false)</code> disables the function.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the\n  // mouse moves onto the canvas.\n  cnv.mouseOver(randomColor);\n\n  describe('A gray square changes color when the mouse moves onto the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse\nmoves onto the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "mouseOut",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1731,
      "itemtype": "method",
      "description": "<p>Calls a function when the mouse moves off the element.</p>\n<p>Calling <code>myElement.mouseOut(false)</code> disables the function.</p>\n",
      "example": [
        "function setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call randomColor() when the\n  // mouse moves off the canvas.\n  cnv.mouseOut(randomColor);\n\n  describe('A gray square changes color when the mouse moves off the canvas.');\n}\n\n// Paint the background either\n// red, yellow, blue, or green.\nfunction randomColor() {\n  let c = random(['red', 'yellow', 'blue', 'green']);\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the mouse\nmoves off the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "dragOver",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1768,
      "itemtype": "method",
      "description": "<p>Calls a function when a file is dragged over the element.</p>\n<p>Calling <code>myElement.dragOver(false)</code> disables the function.</p>\n",
      "example": [
        "// Drag a file over the canvas to test.\n\nfunction setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call helloFile() when a\n  // file is dragged over\n  // the canvas.\n  cnv.dragOver(helloFile);\n\n  describe('A gray square. The text \"hello, file\" appears when a file is dragged over the square.');\n}\n\nfunction helloFile() {\n  text('hello, file', 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the file is\ndragged over the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "dragLeave",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1805,
      "itemtype": "method",
      "description": "<p>Calls a function when a file is dragged off the element.</p>\n<p>Calling <code>myElement.dragLeave(false)</code> disables the function.</p>\n",
      "example": [
        "// Drag a file over, then off\n// the canvas to test.\n\nfunction setup() {\n  // Create a canvas element and\n  // assign it to cnv.\n  let cnv = createCanvas(100, 100);\n\n  background(200);\n\n  // Call byeFile() when a\n  // file is dragged over,\n  // then off the canvas.\n  cnv.dragLeave(byeFile);\n\n  describe('A gray square. The text \"bye, file\" appears when a file is dragged over, then off the square.');\n}\n\nfunction byeFile() {\n  text('bye, file', 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the file is\ndragged off the element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "changed",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1872,
      "itemtype": "method",
      "description": "<p>Calls a function when the element changes.</p>\n<p>Calling <code>myElement.changed(false)</code> disables the function.</p>\n",
      "example": [
        "let dropdown;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a dropdown menu and add a few color options.\n  dropdown = createSelect();\n  dropdown.position(0, 0);\n  dropdown.option('red');\n  dropdown.option('green');\n  dropdown.option('blue');\n\n  // Call paintBackground() when the color option changes.\n  dropdown.changed(paintBackground);\n\n  describe('A gray square with a dropdown menu at the top. The square changes color when an option is selected.');\n}\n\n// Paint the background with the selected color.\nfunction paintBackground() {\n  let c = dropdown.value();\n  background(c);\n}",
        "let checkbox;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a checkbox and place it beneath the canvas.\n  checkbox = createCheckbox(' circle');\n  checkbox.position(0, 100);\n\n  // Call repaint() when the checkbox changes.\n  checkbox.changed(repaint);\n\n  describe('A gray square with a checkbox underneath it that says \"circle\". A white circle appears when the box is checked and disappears otherwise.');\n}\n\n// Paint the background gray and determine whether to draw a circle.\nfunction repaint() {\n  background(200);\n  if (checkbox.checked() === true) {\n    circle(50, 50, 30);\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when the element changes.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "input",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 1937,
      "itemtype": "method",
      "description": "<p>Calls a function when the element receives input.</p>\n<p><code>myElement.input()</code> is often used to with text inputs and sliders. Calling\n<code>myElement.input(false)</code> disables the function.</p>\n",
      "example": [
        "let slider;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a slider and place it beneath the canvas.\n  slider = createSlider(0, 255, 200);\n  slider.position(0, 100);\n\n  // Call repaint() when the slider changes.\n  slider.input(repaint);\n\n  describe('A gray square with a range slider underneath it. The background changes shades of gray when the slider is moved.');\n}\n\n// Paint the background using slider's value.\nfunction repaint() {\n  let g = slider.value();\n  background(g);\n}",
        "let input;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create an input and place it beneath the canvas.\n  input = createInput('');\n  input.position(0, 100);\n\n  // Call repaint() when input is detected.\n  input.input(repaint);\n\n  describe('A gray square with a text input bar beneath it. Any text written in the input appears in the middle of the square.');\n}\n\n// Paint the background gray and display the input's value.\nfunction repaint() {\n  background(200);\n  let msg = input.value();\n  text(msg, 5, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fxn",
              "description": "function to call when input is detected within\nthe element.\n<code>false</code> disables the function.",
              "type": "Function|Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "drop",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2044,
      "itemtype": "method",
      "description": "<p>Calls a function when the user drops a file on the element.</p>\n<p>The first parameter, <code>callback</code>, is a function to call once the file loads.\nThe callback function should have one parameter, <code>file</code>, that's a\n<a href=\"#/p5.File\">p5.File</a> object. If the user drops multiple files on\nthe element, <code>callback</code>, is called once for each file.</p>\n<p>The second parameter, <code>fxn</code>, is a function to call when the browser detects\none or more dropped files. The callback function should have one\nparameter, <code>event</code>, that's a\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/DragEvent\">DragEvent</a>.</p>\n",
      "example": [
        "// Drop an image on the canvas to view\n// this example.\nlet img;\n\nfunction setup() {\n  let c = createCanvas(100, 100);\n\n  background(200);\n\n  // Call handleFile() when a file that's dropped on the canvas has loaded.\n  c.drop(handleFile);\n\n  describe('A gray square. When the user drops an image on the square, it is displayed.');\n}\n\n// Remove the existing image and display the new one.\nfunction handleFile(file) {\n  // Remove the current image, if any.\n  if (img) {\n    img.remove();\n  }\n\n  // Create an <img> element with the\n  // dropped file.\n  img = createImg(file.data, '');\n  img.hide();\n\n  // Draw the image.\n  image(img, 0, 0, width, height);\n}",
        "// Drop an image on the canvas to view\n// this example.\nlet img;\nlet msg;\n\nfunction setup() {\n  let c = createCanvas(100, 100);\n\n  background(200);\n\n  // Call functions when the user drops a file on the canvas\n  // and when the file loads.\n  c.drop(handleFile, handleDrop);\n\n  describe('A gray square. When the user drops an image on the square, it is displayed. The id attribute of canvas element is also displayed.');\n}\n\n// Display the image when it loads.\nfunction handleFile(file) {\n  // Remove the current image, if any.\n  if (img) {\n    img.remove();\n  }\n\n  // Create an img element with the dropped file.\n  img = createImg(file.data, '');\n  img.hide();\n\n  // Draw the image.\n  image(img, 0, 0, width, height);\n}\n\n// Display the file's name when it loads.\nfunction handleDrop(event) {\n  // Remove current paragraph, if any.\n  if (msg) {\n    msg.remove();\n  }\n\n  // Use event to get the drop target's id.\n  let id = event.target.id;\n\n  // Write the canvas' id beneath it.\n  msg = createP(id);\n  msg.position(0, 100);\n\n  // Set the font color randomly for each drop.\n  let c = random(['red', 'green', 'blue']);\n  msg.style('color', c);\n  msg.style('font-size', '12px');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "called when a file loads. Called once for each file dropped.",
              "type": "Function"
            },
            {
              "name": "fxn",
              "description": "called once when any files are dropped.",
              "optional": 1,
              "type": "Function"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "draggable",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.Element.js",
      "line": 2152,
      "itemtype": "method",
      "description": "<p>Makes the element draggable.</p>\n<p>The parameter, <code>elmnt</code>, is optional. If another\n<a href=\"#/p5.Element\">p5.Element</a> object is passed, as in\n<code>myElement.draggable(otherElement)</code>, the other element will become draggable.</p>\n",
      "example": [
        "let stickyNote;\nlet textInput;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a div element and style it.\n  stickyNote = createDiv('Note');\n  stickyNote.position(5, 5);\n  stickyNote.size(80, 20);\n  stickyNote.style('font-size', '16px');\n  stickyNote.style('font-family', 'Comic Sans MS');\n  stickyNote.style('background', 'orchid');\n  stickyNote.style('padding', '5px');\n\n  // Make the note draggable.\n  stickyNote.draggable();\n\n  // Create a panel div and style it.\n  let panel = createDiv('');\n  panel.position(5, 40);\n  panel.size(80, 50);\n  panel.style('background', 'orchid');\n  panel.style('font-size', '16px');\n  panel.style('padding', '5px');\n  panel.style('text-align', 'center');\n\n  // Make the panel draggable.\n  panel.draggable();\n\n  // Create a text input and style it.\n  textInput = createInput('Note');\n  textInput.size(70);\n\n  // Add the input to the panel.\n  textInput.parent(panel);\n\n  // Call handleInput() when text is input.\n  textInput.input(handleInput);\n\n  describe(\n    'A gray square with two purple rectangles that move when dragged. The top rectangle displays the text that is typed into the bottom rectangle.'\n  );\n}\n\n// Update stickyNote's HTML when text is input.\nfunction handleInput() {\n  stickyNote.html(textInput.value());\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "elmnt",
              "description": "another <a href=\"#/p5.Element\">p5.Element</a>.",
              "optional": 1,
              "type": "p5.Element"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Element",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "getParent",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 57,
      "itemtype": "method",
      "description": "Returns the element's parent element as a new <a href=\"#/p5.XML\">p5.XML</a>\nobject.",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array with all mammal elements.\n  let mammals = myXML.getChildren('mammal');\n\n  // Get the first mammal element.\n  let firstMammal = mammals[0];\n\n  // Get the parent element.\n  let parent = firstMammal.getParent();\n\n  // Get the parent element's name.\n  let name = parent.getName();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the parent element's name.\n  text(name, 50, 50);\n\n  describe('The word \"animals\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "parent element.",
            "type": "p5.XML"
          }
        }
      ],
      "return": {
        "description": "parent element.",
        "type": "p5.XML"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getName",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 100,
      "itemtype": "method",
      "description": "<p>Returns the element's name as a <code>String</code>.</p>\n<p>An XML element's name is given by its tag. For example, the element\n<code><language>JavaScript</language></code> has the name <code>language</code>.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array with all mammal elements.\n  let mammals = myXML.getChildren('mammal');\n\n  // Get the first mammal element.\n  let firstMammal = mammals[0];\n\n  // Get the mammal element's name.\n  let name = firstMammal.getName();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's name.\n  text(name, 50, 50);\n\n  describe('The word \"mammal\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "name of the element.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "name of the element.",
        "type": "String"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "setName",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 150,
      "itemtype": "method",
      "description": "<p>Sets the element's tag name.</p>\n<p>An XML element's name is given by its tag. For example, the element\n<code><language>JavaScript</language></code> has the name <code>language</code>.</p>\n<p>The parameter, <code>name</code>, is the element's new name as a string. For example,\ncalling <code>myXML.setName('planet')</code> will make the element's new tag name\n<code><planet></planet></code>.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the element's original name.\n  let oldName = myXML.getName();\n\n  // Set the element's name.\n  myXML.setName('monsters');\n\n  // Get the element's new name.\n  let newName = myXML.getName();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's names.\n  text(oldName, 50, 33);\n  text(newName, 50, 67);\n\n  describe(\n    'The words \"animals\" and \"monsters\" written on separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "new tag name of the element.",
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "hasChildren",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 196,
      "itemtype": "method",
      "description": "Returns <code>true</code> if the element has child elements and <code>false</code> if not.",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Check whether the element has child elements.\n  let isParent = myXML.hasChildren();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Style the text.\n  if (isParent === true) {\n    text('Parent', 50, 50);\n  } else {\n    text('Not Parent', 50, 50);\n  }\n\n  describe('The word \"Parent\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "whether the element has children.",
            "type": "boolean"
          }
        }
      ],
      "return": {
        "description": "whether the element has children.",
        "type": "boolean"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "listChildren",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 240,
      "itemtype": "method",
      "description": "Returns an array with the names of the element's child elements as\n<code>String</code>s.",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the names of the element's children as an array.\n  let children = myXML.listChildren();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < children.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Display the child element's name.\n    text(children[i], 10, y);\n  }\n\n  describe(\n    'The words \"mammal\", \"mammal\", \"mammal\", and \"reptile\" written on separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "names of the child elements.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "names of the child elements.",
        "type": "String[]"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getChildren",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 334,
      "itemtype": "method",
      "description": "<p>Returns an array with the element's child elements as new\n<a href=\"#/p5.XML\">p5.XML</a> objects.</p>\n<p>The parameter, <code>name</code>, is optional. If a string is passed, as in\n<code>myXML.getChildren('cat')</code>, then the method will only return child elements\nwith the tag <code><cat></code>.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array of the child elements.\n  let children = myXML.getChildren();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < children.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 20;\n\n    // Get the child element's content.\n    let content = children[i].getContent();\n\n    // Display the child element's content.\n    text(content, 10, y);\n  }\n\n  describe(\n    'The words \"Goat\", \"Leopard\", \"Zebra\", and \"Turtle\" written on separate lines. The text is black on a gray background.'\n  );\n}",
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get an array of the child elements\n  // that are mammals.\n  let children = myXML.getChildren('mammal');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < children.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 20;\n\n    // Get the child element's content.\n    let content = children[i].getContent();\n\n    // Display the child element's content.\n    text(content, 10, y);\n  }\n\n  describe(\n    'The words \"Goat\", \"Leopard\", and \"Zebra\" written on separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the elements to return.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "child elements.",
            "type": "p5.XML[]"
          }
        }
      ],
      "return": {
        "description": "child elements.",
        "type": "p5.XML[]"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getChild",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 410,
      "itemtype": "method",
      "description": "<p>Returns the first matching child element as a new\n<a href=\"#/p5.XML\">p5.XML</a> object.</p>\n<p>The parameter, <code>name</code>, is optional. If a string is passed, as in\n<code>myXML.getChild('cat')</code>, then the first child element with the tag\n<code><cat></code> will be returned. If a number is passed, as in\n<code>myXML.getChild(1)</code>, then the child element at that index will be returned.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first child element that is a mammal.\n  let goat = myXML.getChild('mammal');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Get the child element's content.\n  let content = goat.getContent();\n\n  // Display the child element's content.\n  text(content, 50, 50);\n\n  describe('The word \"Goat\" written in black on a gray background.');\n}",
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the child element at index 1.\n  let leopard = myXML.getChild(1);\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Get the child element's content.\n  let content = leopard.getContent();\n\n  // Display the child element's content.\n  text(content, 50, 50);\n\n  describe('The word \"Leopard\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "element name or index.",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "child element.",
            "type": "p5.XML"
          }
        }
      ],
      "return": {
        "description": "child element.",
        "type": "p5.XML"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "addChild",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 470,
      "itemtype": "method",
      "description": "<p>Adds a new child element and returns a reference to it.</p>\n<p>The parameter, <code>child</code>, is the <a href=\"#/p5.XML\">p5.XML</a> object to add\nas a child element. For example, calling <code>myXML.addChild(otherXML)</code> inserts\n<code>otherXML</code> as a child element of <code>myXML</code>.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a new p5.XML object.\n  let newAnimal = new p5.XML();\n\n  // Set its properties.\n  newAnimal.setName('hydrozoa');\n  newAnimal.setAttribute('id', 4);\n  newAnimal.setAttribute('species', 'Physalia physalis');\n  newAnimal.setContent('Bluebottle');\n\n  // Add the child element.\n  myXML.addChild(newAnimal);\n\n  // Get the first child element that is a hydrozoa.\n  let blueBottle = myXML.getChild('hydrozoa');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Get the child element's content.\n  let content = blueBottle.getContent();\n\n  // Display the child element's content.\n  text(content, 50, 50);\n\n  describe('The word \"Bluebottle\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "child",
              "description": "child element to add.",
              "type": "p5.XML"
            }
          ],
          "return": {
            "description": "added child element.",
            "type": "p5.XML"
          }
        }
      ],
      "return": {
        "description": "added child element.",
        "type": "p5.XML"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "removeChild",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 569,
      "itemtype": "method",
      "description": "<p>Removes the first matching child element.</p>\n<p>The parameter, <code>name</code>, is the child element to remove. If a string is\npassed, as in <code>myXML.removeChild('cat')</code>, then the first child element\nwith the tag <code><cat></code> will be removed. If a number is passed, as in\n<code>myXML.removeChild(1)</code>, then the child element at that index will be\nremoved.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Remove the first mammal element.\n  myXML.removeChild('mammal');\n\n  // Get an array of child elements.\n  let children = myXML.getChildren();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < children.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Get the child element's content.\n    let content = children[i].getContent();\n\n    // Display the child element's content.\n    text(content, 10, y);\n  }\n\n  describe(\n    'The words \"Leopard\", \"Zebra\", and \"Turtle\" written on separate lines. The text is black on a gray background.'\n  );\n}",
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Remove the element at index 2.\n  myXML.removeChild(2);\n\n  // Get an array of child elements.\n  let children = myXML.getChildren();\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Iterate over the array.\n  for (let i = 0; i < children.length; i += 1) {\n\n    // Calculate the y-coordinate.\n    let y = (i + 1) * 25;\n\n    // Get the child element's content.\n    let content = children[i].getContent();\n\n    // Display the child element's content.\n    text(content, 10, y);\n  }\n\n  describe(\n    'The words \"Goat\", \"Leopard\", and \"Turtle\" written on separate lines. The text is black on a gray background.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name or index of the child element to remove.",
              "type": "String|Integer"
            }
          ]
        }
      ],
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getAttributeCount",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 619,
      "itemtype": "method",
      "description": "Returns the number of attributes the element has.",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first child element.\n  let first = myXML.getChild(0);\n\n  // Get the number of attributes.\n  let numAttributes = first.getAttributeCount();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the number of attributes.\n  text(numAttributes, 50, 50);\n\n  describe('The number \"2\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "number of attributes.",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "number of attributes.",
        "type": "Integer"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "listAttributes",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 660,
      "itemtype": "method",
      "description": "<p>Returns an <code>Array</code> with the names of the element's attributes.</p>\n<p>Note: Use\n<a href=\"#/p5.XML/getString\">myXML.getString()</a> or\n<a href=\"#/p5.XML/getNum\">myXML.getNum()</a> to return an attribute's value.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first child element.\n  let first = myXML.getChild(0);\n\n  // Get the number of attributes.\n  let attributes = first.listAttributes();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's attributes.\n  text(attributes, 50, 50);\n\n  describe('The text \"id,species\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "attribute names.",
            "type": "String[]"
          }
        }
      ],
      "return": {
        "description": "attribute names.",
        "type": "String[]"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "hasAttribute",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 716,
      "itemtype": "method",
      "description": "<p>Returns <code>true</code> if the element has a given attribute and <code>false</code> if not.</p>\n<p>The parameter, <code>name</code>, is a string with the name of the attribute being\nchecked.</p>\n<p>Note: Use\n<a href=\"#/p5.XML/getString\">myXML.getString()</a> or\n<a href=\"#/p5.XML/getNum\">myXML.getNum()</a> to return an attribute's value.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first mammal child element.\n  let mammal = myXML.getChild('mammal');\n\n  // Check whether the element has an\n  // species attribute.\n  let hasSpecies = mammal.hasAttribute('species');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display whether the element has a species attribute.\n  if (hasSpecies === true) {\n    text('Species', 50, 50);\n  } else {\n    text('No species', 50, 50);\n  }\n\n  describe('The text \"Species\" written in black on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the attribute to be checked.",
              "type": "String"
            }
          ],
          "return": {
            "description": "whether the element has the attribute.",
            "type": "boolean"
          }
        }
      ],
      "return": {
        "description": "whether the element has the attribute.",
        "type": "boolean"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getNum",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 809,
      "itemtype": "method",
      "description": "<p>Return an attribute's value as a <code>Number</code>.</p>\n<p>The first parameter, <code>name</code>, is a string with the name of the attribute\nbeing checked. For example, calling <code>myXML.getNum('id')</code> returns the\nelement's <code>id</code> attribute as a number.</p>\n<p>The second parameter, <code>defaultValue</code>, is optional. If a number is passed,\nas in <code>myXML.getNum('id', -1)</code>, it will be returned if the attribute\ndoesn't exist or can't be converted to a number.</p>\n<p>Note: Use\n<a href=\"#/p5.XML/getString\">myXML.getString()</a> or\n<a href=\"#/p5.XML/getNum\">myXML.getNum()</a> to return an attribute's value.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Get the reptile's ID.\n  let id = reptile.getNum('id');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the ID attribute.\n  text(`${content} is ${id + 1}th`, 5, 50, 90);\n\n  describe(`The text \"${content} is ${id + 1}th\" written in black on a gray background.`);\n}",
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Get the reptile's size.\n  let weight = reptile.getNum('weight', 135);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the ID attribute.\n  text(`${content} is ${weight}kg`, 5, 50, 90);\n\n  describe(\n    `The text \"${content} is ${weight}kg\" written in black on a gray background.`\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the attribute to be checked.",
              "type": "String"
            },
            {
              "name": "defaultValue",
              "description": "value to return if the attribute doesn't exist.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "attribute value as a number.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "attribute value as a number.",
        "type": "Number"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getString",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 901,
      "itemtype": "method",
      "description": "<p>Return an attribute's value as a string.</p>\n<p>The first parameter, <code>name</code>, is a string with the name of the attribute\nbeing checked. For example, calling <code>myXML.getString('color')</code> returns the\nelement's <code>id</code> attribute as a string.</p>\n<p>The second parameter, <code>defaultValue</code>, is optional. If a string is passed,\nas in <code>myXML.getString('color', 'deeppink')</code>, it will be returned if the\nattribute doesn't exist.</p>\n<p>Note: Use\n<a href=\"#/p5.XML/getString\">myXML.getString()</a> or\n<a href=\"#/p5.XML/getNum\">myXML.getNum()</a> to return an attribute's value.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Get the reptile's species.\n  let species = reptile.getString('species');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the species attribute.\n  text(`${content}: ${species}`, 5, 50, 90);\n\n  describe(`The text \"${content}: ${species}\" written in black on a gray background.`);\n}",
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Get the reptile's color.\n  let attribute = reptile.getString('color', 'green');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n  fill(attribute);\n\n  // Display the element's content.\n  text(content, 50, 50);\n\n  describe(`The text \"${content}\" written in green on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the attribute to be checked.",
              "type": "String"
            },
            {
              "name": "defaultValue",
              "description": "value to return if the attribute doesn't exist.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "attribute value as a string.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "attribute value as a string.",
        "type": "String"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "setAttribute",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 960,
      "itemtype": "method",
      "description": "<p>Sets an attribute to a given value.</p>\n<p>The first parameter, <code>name</code>, is a string with the name of the attribute\nbeing set.</p>\n<p>The second parameter, <code>value</code>, is the attribute's new value. For example,\ncalling <code>myXML.setAttribute('id', 123)</code> sets the <code>id</code> attribute to the\nvalue 123.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Set the reptile's color.\n  reptile.setAttribute('color', 'green');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Get the reptile's color.\n  let attribute = reptile.getString('color');\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's content.\n  text(`${content} is ${attribute}`, 5, 50, 90);\n\n  describe(\n    `The text \"${content} is ${attribute}\" written in green on a gray background.`\n  );\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "name",
              "description": "name of the attribute to be set.",
              "type": "String"
            },
            {
              "name": "value",
              "description": "attribute's new value.",
              "type": "Number|String|Boolean"
            }
          ]
        }
      ],
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "getContent",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 1026,
      "itemtype": "method",
      "description": "<p>Returns the element's content as a <code>String</code>.</p>\n<p>The parameter, <code>defaultValue</code>, is optional. If a string is passed, as in\n<code>myXML.getContent('???')</code>, it will be returned if the element has no\ncontent.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Get the first reptile child element.\n  let reptile = myXML.getChild('reptile');\n\n  // Get the reptile's content.\n  let content = reptile.getContent();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's content.\n  text(content, 5, 50, 90);\n\n  describe(`The text \"${content}\" written in green on a gray background.`);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.XML object.\n  let blankSpace = new p5.XML();\n\n  // Get the element's content and use a default value.\n  let content = blankSpace.getContent('Your name');\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont('Courier New');\n  textSize(14);\n\n  // Display the element's content.\n  text(content, 5, 50, 90);\n\n  describe(`The text \"${content}\" written in green on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "defaultValue",
              "description": "value to return if the element has no\ncontent.",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "element's content as a string.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "element's content as a string.",
        "type": "String"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "serialize",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.XML.js",
      "line": 1132,
      "itemtype": "method",
      "description": "<p>Returns the element as a <code>String</code>.</p>\n<p><code>myXML.serialize()</code> is useful for sending the element over the network or\nsaving it to a file.</p>\n",
      "example": [
        "let myXML;\n\nasync function setup() {\n  // Load the XML and create a p5.XML object.\n  myXML = await loadXML('assets/animals.xml');\n\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(LEFT, CENTER);\n  textFont('Courier New');\n  textSize(12);\n\n  // Display instructions.\n  text('Double-click to save', 5, 50, 90);\n\n  describe('The text \"Double-click to save\" written in black on a gray background.');\n}\n\n// Save the file when the user double-clicks.\nfunction doubleClicked() {\n  // Create a p5.PrintWriter object.\n  // Use the file format .xml.\n  let myWriter = createWriter('animals', 'xml');\n\n  // Serialize the XML data to a string.\n  let data = myXML.serialize();\n\n  // Write the data to the print stream.\n  myWriter.write(data);\n\n  // Save the file and close the print stream.\n  myWriter.close();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "element as a string.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "element as a string.",
        "type": "String"
      },
      "class": "p5.XML",
      "static": false,
      "module": "IO",
      "submodule": "Input"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 60,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a value in the TableRow's specified column.\nThe column may be specified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Set every row's \"name\" to \"Unicorn\"\n   let rows = table.getRows();\n  for (let r = 0; r < rows.length; r++) {\n    rows[r].set('name', 'Unicorn');\n  }\n\n  // Convert the table to an array\n  let tableArray = table.getArray();\n\n  // Set text properties\n  fill(0);      // Set text color to black\n  textSize(12); // Set text size\n\n  // Display each row of the table on the canvas\n  let y = 20; // Starting y position\n  for (let i = 0; i < tableArray.length; i++) {\n    let rowText = tableArray[i].join(', ');\n    text(rowText, 10, y * 2.5);\n    y += 20; // Increment y position for the next row\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "Column ID (Number)\nor Title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "The value to be stored",
              "type": "String|Number"
            }
          ]
        }
      ],
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "setNum",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 127,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a Float value in the TableRow's specified column.\nThe column may be specified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Update each row's \"id\" to (row index + 10)\n  let rows = table.getRows();\n  for (let r = 0; r < rows.length; r++) {\n    rows[r].setNum('id', r + 10);\n  }\n\n  // Convert the table to a 2D array for display\n  let tableArray = table.getArray();\n\n  // Set text properties\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n\n  // Display each row of the table on the canvas\n  let y = 20;   // Starting y position\n  for (let i = 0; i < tableArray.length; i++) {\n    // Join each row's values with a comma separator\n    let rowText = tableArray[i].join(', ');\n    text(rowText, 10, y * 2.5);\n    y += 20;  // Increment y for the next row\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "Column ID (Number)\nor Title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "The value to be stored\nas a Float",
              "type": "Number|String"
            }
          ]
        }
      ],
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "setString",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 177,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a String value in the TableRow's specified column.\nThe column may be specified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 300x200 canvas and set a white background\n  createCanvas(300, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Update each row's \"name\" field\n  let rows = table.getRows();\n  for (let r = 0; r < rows.length; r++) {\n    let name = rows[r].getString('name');\n    rows[r].setString('name', 'A ' + name + ' named George');\n  }\n\n  // Convert the table to a 2D array for display\n  let tableArray = table.getArray();\n\n  // Set text properties\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n\n  // Display each row of the table on the canvas\n  let y = 20;   // Starting y position\n  for (let i = 0; i < tableArray.length; i++) {\n    let rowText = tableArray[i].join(', ');\n    text(rowText, 10, y * 2.5);\n    y += 20;    // Increment y for the next row\n  }\n\n  // describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "Column ID (Number)\nor Title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "The value to be stored\nas a String",
              "type": "String|Number|Boolean|Object"
            }
          ]
        }
      ],
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "get",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 220,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves a value from the TableRow's specified column.\nThe column may be specified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x100 canvas and set a white background\n  createCanvas(200, 100);\n  background(255);\n\n  // Load the CSV file with a header row\n   table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Extract the names from each row and store them in an array\n  let names = [];\n  let rows = table.getRows();\n  for (let r = 0; r < rows.length; r++) {\n    names.push(rows[r].get('name'));\n  }\n\n  // Set text properties and display the names on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Set text size\n\n  // Join names into a single string separated by commas\n  let namesText = names.join(', ');\n  text(namesText, 35, 50);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "",
            "type": "String|Number"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "String|Number"
      },
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getNum",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 268,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves a Float value from the TableRow's specified\ncolumn. The column may be specified by either its ID or\ntitle.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 300x100 canvas and set a white background\n  createCanvas(300, 100);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  let rows = table.getRows();\n  let minId = Infinity;\n  let maxId = -Infinity;\n\n  for (let r = 0; r < rows.length; r++) {\n    let id = rows[r].getNum('id');\n    minId = min(minId, id);\n    maxId = max(maxId, id);\n   }\n\n  let result = 'minimum id = ' + minId + ', maximum id = ' + maxId;\n\n  // Set text properties and display the result on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Set text size\n  text(result, 10, 50);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "Float Floating point number",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "Float Floating point number",
        "type": "Number"
      },
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getString",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.TableRow.js",
      "line": 322,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves an String value from the TableRow's specified\ncolumn. The column may be specified by either its ID or\ntitle.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x100 canvas and set a white background\n  createCanvas(200, 100);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  let rows = table.getRows();\n  let longest = '';\n  for (let r = 0; r < rows.length; r++) {\n     let species = rows[r].getString('species');\n     if (longest.length < species.length) {\n      longest = species;\n    }\n  }\n\n  let result = 'longest: ' + longest;\n\n  // Set text properties and display the result on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Set text size\n  text(result, 30, 50);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "String",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "String",
        "type": "String"
      },
      "class": "p5.TableRow",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getValue",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 119,
      "itemtype": "method",
      "description": "<p>Retrieves the value at the specified index from the vector.</p>\n<p>This method allows you to get the value of a specific component of the vector\nby providing its index. Think of the vector as a list of numbers, where each\nnumber represents a different direction (like x, y, or z). The index is just\nthe position of the number in that list.</p>\n<p>For example, if you have a vector with values 10, 20, 30 the index 0 would\ngive you the first value 10, index 1 would give you the second value 20,\nand so on.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "index",
              "description": "The position of the value you want to get from the vector.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "The value at the specified position in the vector.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "The value at the specified position in the vector.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "setValue",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 144,
      "itemtype": "method",
      "description": "<p>Sets the value at the specified index of the vector.</p>\n<p>This method allows you to change a specific component of the vector by providing its index and the new value you want to set.\nThink of the vector as a list of numbers, where each number represents a different direction (like x, y, or z).\nThe index is just the position of the number in that list.</p>\n<p>For example, if you have a vector with values [0, 20, 30], and you want to change the second value (20) to 50,\nyou would use this method with index 1 (since indexes start at 0) and value 50.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "index",
              "description": "The position in the vector where you want to set the new value.",
              "type": "Number"
            },
            {
              "name": "value",
              "description": "The new value you want to set at the specified position.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "toString",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 271,
      "itemtype": "method",
      "description": "<p>Returns a string representation of a vector.</p>\n<p>Calling <code>toString()</code> is useful for printing vectors to the console while\ndebugging.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  let v = createVector(20, 30);\n\n  // Prints 'vector[20, 30, 0]'.\n  print(v.toString());\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "string representation of the vector.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "string representation of the vector.",
        "type": "String"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 328,
      "itemtype": "method",
      "description": "<p>Sets the vector's <code>x</code>, <code>y</code>, and <code>z</code> components.</p>\n<p><code>set()</code> can use separate numbers, as in <code>v.set(1, 2, 3)</code>, a\n<a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.set(v2)</code>, or an\narray of numbers, as in <code>v.set([1, 2, 3])</code>.</p>\n<p>If a value isn't provided for a component, it will be set to 0. For\nexample, <code>v.set(4, 5)</code> sets <code>v.x</code> to 4, <code>v.y</code> to 5, and <code>v.z</code> to 0.\nCalling <code>set()</code> with no arguments, as in <code>v.set()</code>, sets all the vector's\ncomponents to 0.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top left.\n  let pos = createVector(25, 25);\n  point(pos);\n\n  // Top right.\n  // set() with numbers.\n  pos.set(75, 25);\n  point(pos);\n\n  // Bottom right.\n  // set() with a p5.Vector.\n  let p2 = createVector(75, 75);\n  pos.set(p2);\n  point(pos);\n\n  // Bottom left.\n  // set() with an array.\n  let arr = [25, 75];\n  pos.set(arr);\n  point(pos);\n\n  describe('Four black dots arranged in a square on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of the vector.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of the vector.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the vector.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "vector to set.",
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "copy",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 364,
      "itemtype": "method",
      "description": "Returns a copy of the <a href=\"#/p5.Vector\">p5.Vector</a> object.",
      "example": [
        "function setup() {\n  createCanvas(100 ,100);\n\n  background(200);\n\n  // Create a p5.Vector object.\n  let pos = createVector(50, 50);\n\n  // Make a copy.\n  let pc = pos.copy();\n\n  // Draw the point.\n  strokeWeight(5);\n  point(pc);\n\n  describe('A black point drawn in the middle of a gray square.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "copy of the <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "copy of the <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "add",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 496,
      "itemtype": "method",
      "description": "<p>Adds to a vector's components.</p>\n<p><code>add()</code> can use separate numbers, as in <code>v.add(1, 2, 3)</code>,\nanother <a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.add(v2)</code>, or\nan array of numbers, as in <code>v.add([1, 2, 3])</code>.</p>\n<p>If a value isn't provided for a component, it won't change. For\nexample, <code>v.add(4, 5)</code> adds 4 to <code>v.x</code>, 5 to <code>v.y</code>, and 0 to <code>v.z</code>.\nCalling <code>add()</code> with no arguments, as in <code>v.add()</code>, has no effect.</p>\n<p>This method supports N-dimensional vectors.</p>\n<p>The static version of <code>add()</code>, as in <code>p5.Vector.add(v2, v1)</code>, returns a new\n<a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginals.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top left.\n  let pos = createVector(25, 25);\n  point(pos);\n\n  // Top right.\n  // Add numbers.\n  pos.add(50, 0);\n  point(pos);\n\n  // Bottom right.\n  // Add a p5.Vector.\n  let p2 = createVector(0, 50);\n  pos.add(p2);\n  point(pos);\n\n  // Bottom left.\n  // Add an array.\n  let arr = [-50, 0];\n  pos.add(arr);\n  point(pos);\n\n  describe('Four black dots arranged in a square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Top left.\n  let p1 = createVector(25, 25);\n\n  // Center.\n  let p2 = createVector(50, 50);\n\n  // Bottom right.\n  // Add p1 and p2.\n  let p3 = p5.Vector.add(p1, p2);\n\n  // Draw the points.\n  strokeWeight(5);\n  point(p1);\n  point(p2);\n  point(p3);\n\n  describe('Three black dots in a diagonal line from top left to bottom right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows drawn on a gray square. A red arrow extends from the top left corner to the center. A blue arrow extends from the tip of the red arrow. A purple arrow extends from the origin to the tip of the blue arrow.');\n}\n\nfunction draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n\n  // Draw the red arrow.\n  let v1 = createVector(50, 50);\n  drawArrow(origin, v1, 'red');\n\n  // Draw the blue arrow.\n  let v2 = createVector(-30, 20);\n  drawArrow(v1, v2, 'blue');\n\n  // Purple arrow.\n  let v3 = p5.Vector.add(v1, v2);\n  drawArrow(origin, v3, 'purple');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of the vector to be added or an array of components.",
              "type": "Number|Array"
            },
            {
              "name": "y",
              "description": "y component of the vector to be added.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the vector to be added.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "The vector to add",
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "rem",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 615,
      "itemtype": "method",
      "description": "<p>Performs modulo (remainder) division with a vector's <code>x</code>, <code>y</code>, and <code>z</code>\ncomponents.</p>\n<p><code>rem()</code> can use separate numbers, as in <code>v.rem(1, 2, 3)</code>,\nanother <a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.rem(v2)</code>, or\nan array of numbers, as in <code>v.rem([1, 2, 3])</code>.</p>\n<p>If only one value is provided, as in <code>v.rem(2)</code>, then all the components\nwill be set to their values modulo 2. If two values are provided, as in\n<code>v.rem(2, 3)</code>, then <code>v.z</code> won't change. Calling <code>rem()</code> with no\narguments, as in <code>v.rem()</code>, has no effect.</p>\n<p>The static version of <code>rem()</code>, as in <code>p5.Vector.rem(v2, v1)</code>, returns a\nnew <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginals.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(3, 4, 5);\n\n  // Divide numbers.\n  v.rem(2);\n\n  // Prints 'p5.Vector Object : [1, 0, 1]'.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(3, 4, 5);\n\n  // Divide numbers.\n  v.rem(2, 3);\n\n  // Prints 'p5.Vector Object : [1, 1, 5]'.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(3, 4, 5);\n\n  // Divide numbers.\n  v.rem(2, 3, 4);\n\n  // Prints 'p5.Vector Object : [1, 1, 1]'.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(3, 4, 5);\n  let v2 = createVector(2, 3, 4);\n\n  // Divide a p5.Vector.\n  v1.rem(v2);\n\n  // Prints 'p5.Vector Object : [1, 1, 1]'.\n  print(v1.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(3, 4, 5);\n\n  // Divide an array.\n  let arr = [2, 3, 4];\n  v.rem(arr);\n\n  // Prints 'p5.Vector Object : [1, 1, 1]'.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(3, 4, 5);\n  let v2 = createVector(2, 3, 4);\n\n  // Divide without modifying the original vectors.\n  let v3 = p5.Vector.rem(v1, v2);\n\n  // Prints 'p5.Vector Object : [1, 1, 1]'.\n  print(v3.toString());\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of divisor vector.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of divisor vector.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of divisor vector.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "divisor vector.",
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "sub",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 789,
      "itemtype": "method",
      "description": "<p>Subtracts from a vector's <code>x</code>, <code>y</code>, and <code>z</code> components.</p>\n<p><code>sub()</code> can use separate numbers, as in <code>v.sub(1, 2, 3)</code>, another\n<a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.sub(v2)</code>, or an array\nof numbers, as in <code>v.sub([1, 2, 3])</code>.</p>\n<p>If a value isn't provided for a component, it won't change. For\nexample, <code>v.sub(4, 5)</code> subtracts 4 from <code>v.x</code>, 5 from <code>v.y</code>, and 0 from <code>v.z</code>.\nCalling <code>sub()</code> with no arguments, as in <code>v.sub()</code>, has no effect.</p>\n<p>The static version of <code>sub()</code>, as in <code>p5.Vector.sub(v2, v1)</code>, returns a new\n<a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginals.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Bottom right.\n  let pos = createVector(75, 75);\n  point(pos);\n\n  // Top right.\n  // Subtract numbers.\n  pos.sub(0, 50);\n  point(pos);\n\n  // Top left.\n  // Subtract a p5.Vector.\n  let p2 = createVector(50, 0);\n  pos.sub(p2);\n  point(pos);\n\n  // Bottom left.\n  // Subtract an array.\n  let arr = [0, -50];\n  pos.sub(arr);\n  point(pos);\n\n  describe('Four black dots arranged in a square on a gray background.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Vector objects.\n  let p1 = createVector(75, 75);\n  let p2 = createVector(50, 50);\n\n  // Subtract with modifying the original vectors.\n  let p3 = p5.Vector.sub(p1, p2);\n\n  // Draw the points.\n  strokeWeight(5);\n  point(p1);\n  point(p2);\n  point(p3);\n\n  describe('Three black dots in a diagonal line from top left to bottom right.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows drawn on a gray square. A red and a blue arrow extend from the top left. A purple arrow extends from the tip of the red arrow to the tip of the blue arrow.');\n}\n\nfunction draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n\n  // Draw the red arrow.\n  let v1 = createVector(50, 50);\n  drawArrow(origin, v1, 'red');\n\n  // Draw the blue arrow.\n  let v2 = createVector(20, 70);\n  drawArrow(origin, v2, 'blue');\n\n  // Purple arrow.\n  let v3 = p5.Vector.sub(v2, v1);\n  drawArrow(v1, v3, 'purple');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of the vector to subtract.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of the vector to subtract.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the vector to subtract.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "value",
              "description": "the vector to subtract",
              "type": "p5.Vector|Number[]"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "mult",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 980,
      "itemtype": "method",
      "description": "<p>Multiplies a vector's <code>x</code>, <code>y</code>, and <code>z</code> components.</p>\n<p><code>mult()</code> can use separate numbers, as in <code>v.mult(1, 2, 3)</code>, another\n<a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.mult(v2)</code>, or an array\nof numbers, as in <code>v.mult([1, 2, 3])</code>.</p>\n<p>If only one value is provided, as in <code>v.mult(2)</code>, then all the components\nwill be multiplied by 2. If a value isn't provided for a component, it\nwon't change. For example, <code>v.mult(4, 5)</code> multiplies <code>v.x</code> by, <code>v.y</code> by 5,\nand <code>v.z</code> by 1. Calling <code>mult()</code> with no arguments, as in <code>v.mult()</code>, has\nno effect.</p>\n<p>The static version of <code>mult()</code>, as in <code>p5.Vector.mult(v, 2)</code>, returns a new\n<a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginals.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top-left.\n  let p = createVector(25, 25);\n  point(p);\n\n  // Center.\n  // Multiply all components by 2.\n  p.mult(2);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the center.');\n}",
        "function setup() {\n  strokeWeight(5);\n\n  // Top-left.\n  let p = createVector(25, 25);\n  point(p);\n\n  // Bottom-right.\n  // Multiply p.x * 2 and p.y * 3\n  p.mult(2, 3);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top-left.\n  let p = createVector(25, 25);\n  point(p);\n\n  // Bottom-right.\n  // Multiply p.x * 2 and p.y * 3\n  let arr = [2, 3];\n  p.mult(arr);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top-left.\n  let p = createVector(25, 25);\n  point(p);\n\n  // Bottom-right.\n  // Multiply p.x * p2.x and p.y * p2.y\n  let p2 = createVector(2, 3);\n  p.mult(p2);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Top-left.\n  let p = createVector(25, 25);\n  point(p);\n\n  // Bottom-right.\n  // Create a new p5.Vector with\n  // p3.x = p.x * p2.x\n  // p3.y = p.y * p2.y\n  let p2 = createVector(2, 3);\n  let p3 = p5.Vector.mult(p, p2);\n  point(p3);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two arrows extending from the top left corner. The blue arrow is twice the length of the red arrow.');\n}\n\nfunction draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n\n  // Draw the red arrow.\n  let v1 = createVector(25, 25);\n  drawArrow(origin, v1, 'red');\n\n  // Draw the blue arrow.\n  let v2 = p5.Vector.mult(v1, 2);\n  drawArrow(origin, v2, 'blue');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "The number to multiply with the vector",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "number to multiply with the x component of the vector.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "number to multiply with the y component of the vector.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "number to multiply with the z component of the vector.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "arr",
              "description": "array to multiply with the components of the vector.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v",
              "description": "vector to multiply with the components of the original vector.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "div",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1196,
      "itemtype": "method",
      "description": "<p>Divides a vector's <code>x</code>, <code>y</code>, and <code>z</code> components.</p>\n<p><code>div()</code> can use separate numbers, as in <code>v.div(1, 2, 3)</code>, another\n<a href=\"#/p5.Vector\">p5.Vector</a> object, as in <code>v.div(v2)</code>, or an array\nof numbers, as in <code>v.div([1, 2, 3])</code>.</p>\n<p>If only one value is provided, as in <code>v.div(2)</code>, then all the components\nwill be divided by 2. If a value isn't provided for a component, it\nwon't change. For example, <code>v.div(4, 5)</code> divides <code>v.x</code> by, <code>v.y</code> by 5,\nand <code>v.z</code> by 1. Calling <code>div()</code> with no arguments, as in <code>v.div()</code>, has\nno effect.</p>\n<p>The static version of <code>div()</code>, as in <code>p5.Vector.div(v, 2)</code>, returns a new\n<a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginals.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Center.\n  let p = createVector(50, 50);\n  point(p);\n\n  // Top-left.\n  // Divide p.x / 2 and p.y / 2\n  p.div(2);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Bottom-right.\n  let p = createVector(50, 75);\n  point(p);\n\n  // Top-left.\n  // Divide p.x / 2 and p.y / 3\n  p.div(2, 3);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Bottom-right.\n  let p = createVector(50, 75);\n  point(p);\n\n  // Top-left.\n  // Divide p.x / 2 and p.y / 3\n  let arr = [2, 3];\n  p.div(arr);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Bottom-right.\n  let p = createVector(50, 75);\n  point(p);\n\n  // Top-left.\n  // Divide p.x / 2 and p.y / 3\n  let p2 = createVector(2, 3);\n  p.div(p2);\n  point(p);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the points.\n  strokeWeight(5);\n\n  // Bottom-right.\n  let p = createVector(50, 75);\n  point(p);\n\n  // Top-left.\n  // Create a new p5.Vector with\n  // p3.x = p.x / p2.x\n  // p3.y = p.y / p2.y\n  let p2 = createVector(2, 3);\n  let p3 = p5.Vector.div(p, p2);\n  point(p3);\n\n  describe('Two black dots drawn on a gray square. One dot is in the top left corner and the other is in the bottom center.');\n}",
        "function draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n\n  // Draw the red arrow.\n  let v1 = createVector(50, 50);\n  drawArrow(origin, v1, 'red');\n\n  // Draw the blue arrow.\n  let v2 = p5.Vector.div(v1, 2);\n  drawArrow(origin, v2, 'blue');\n\n  describe('Two arrows extending from the top left corner. The blue arrow is half the length of the red arrow.');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "n",
              "description": "The number to divide the vector by",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "x",
              "description": "number to divide with the x component of the vector.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "number to divide with the y component of the vector.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "number to divide with the z component of the vector.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "arr",
              "description": "array to divide the components of the vector by.",
              "type": "Number[]"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v",
              "description": "vector to divide the components of the original vector by.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "mag",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1283,
      "itemtype": "method",
      "description": "<p>Calculates the magnitude (length) of the vector.</p>\n<p>Use <a href=\"#/p5/mag\">mag()</a> to calculate the magnitude of a 2D vector\nusing components as in <code>mag(x, y)</code>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Vector object.\n  let p = createVector(30, 40);\n\n  // Draw a line from the origin.\n  line(0, 0, p.x, p.y);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the vector's magnitude.\n  let m = p.mag();\n  text(m, p.x, p.y);\n\n  describe('A diagonal black line extends from the top left corner of a gray square. The number 50 is written at the end of the line.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "magnitude of the vector.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "magnitude of the vector.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "magSq",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1314,
      "itemtype": "method",
      "description": "Calculates the magnitude (length) of the vector squared.",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Vector object.\n  let p = createVector(30, 40);\n\n  // Draw a line from the origin.\n  line(0, 0, p.x, p.y);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the vector's magnitude squared.\n  let m = p.magSq();\n  text(m, p.x, p.y);\n\n  describe('A diagonal black line extends from the top left corner of a gray square. The number 2500 is written at the end of the line.');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "squared magnitude of the vector.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "squared magnitude of the vector.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "dot",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1417,
      "itemtype": "method",
      "description": "<p>Calculates the dot product of two vectors.</p>\n<p>The dot product is a number that describes the overlap between two vectors.\nVisually, the dot product can be thought of as the \"shadow\" one vector\ncasts on another. The dot product's magnitude is largest when two vectors\npoint in the same or opposite directions. Its magnitude is 0 when two\nvectors form a right angle.</p>\n<p>The version of <code>dot()</code> with one parameter interprets it as another\n<a href=\"#/p5.Vector\">p5.Vector</a> object.</p>\n<p>The version of <code>dot()</code> with multiple parameters interprets them as the\n<code>x</code>, <code>y</code>, and <code>z</code> components of another vector.</p>\n<p>The static version of <code>dot()</code>, as in <code>p5.Vector.dot(v1, v2)</code>, is the same\nas calling <code>v1.dot(v2)</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(3, 4);\n  let v2 = createVector(3, 0);\n\n  // Calculate the dot product.\n  let dp = v1.dot(v2);\n\n  // Prints \"9\" to the console.\n  print(dp);\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(1, 0);\n  let v2 = createVector(0, 1);\n\n  // Calculate the dot product.\n  let dp = p5.Vector.dot(v1, v2);\n\n  // Prints \"0\" to the console.\n  print(dp);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two arrows drawn on a gray square. A black arrow points to the right and a red arrow follows the mouse. The text \"v1 • v2 = something\" changes as the mouse moves.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Center.\n  let v0 = createVector(50, 50);\n\n  // Draw the black arrow.\n  let v1 = createVector(30, 0);\n  drawArrow(v0, v1, 'black');\n\n  // Draw the red arrow.\n  let v2 = createVector(mouseX - 50, mouseY - 50);\n  drawArrow(v0, v2, 'red');\n\n  // Display the dot product.\n  let dp = v2.dot(v1);\n  text(`v2 • v1 = ${dp}`, 10, 20);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of the vector.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of the vector.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the vector.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "dot product.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "v",
              "description": "<a href=\"#/p5.Vector\">p5.Vector</a> to be dotted.",
              "type": "p5.Vector"
            }
          ],
          "return": {
            "description": "",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "dot product.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "cross",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1467,
      "itemtype": "method",
      "description": "<p>Calculates the cross product of two vectors.</p>\n<p>The cross product is a vector that points straight out of the plane created\nby two vectors. The cross product's magnitude is the area of the parallelogram\nformed by the original two vectors.</p>\n<p>The static version of <code>cross()</code>, as in <code>p5.Vector.cross(v1, v2)</code>, is the same\nas calling <code>v1.cross(v2)</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(1, 0);\n  let v2 = createVector(3, 4);\n\n  // Calculate the cross product.\n  let cp = v1.cross(v2);\n\n  // Prints \"p5.Vector Object : [0, 0, 4]\" to the console.\n  print(cp.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v1 = createVector(1, 0);\n  let v2 = createVector(3, 4);\n\n  // Calculate the cross product.\n  let cp = p5.Vector.cross(v1, v2);\n\n  // Prints \"p5.Vector Object : [0, 0, 4]\" to the console.\n  print(cp.toString());\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v",
              "description": "<a href=\"#/p5.Vector\">p5.Vector</a> to be crossed.",
              "type": "p5.Vector"
            }
          ],
          "return": {
            "description": "cross product as a <a href=\"#/p5.Vector\">p5.Vector</a>.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "cross product as a <a href=\"#/p5.Vector\">p5.Vector</a>.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "dist",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1577,
      "itemtype": "method",
      "description": "<p>Calculates the distance between two points represented by vectors.</p>\n<p>A point's coordinates can be represented by the components of a vector\nthat extends from the origin to the point.</p>\n<p>The static version of <code>dist()</code>, as in <code>p5.Vector.dist(v1, v2)</code>, is the same\nas calling <code>v1.dist(v2)</code>.</p>\n<p>Use <a href=\"#/p5/dist\">dist()</a> to calculate the distance between points\nusing coordinates as in <code>dist(x1, y1, x2, y2)</code>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Vector objects.\n  let v1 = createVector(1, 0);\n  let v2 = createVector(0, 1);\n\n  // Calculate the distance between them.\n  let d = v1.dist(v2);\n\n  // Prints \"1.414...\" to the console.\n  print(d);\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create p5.Vector objects.\n  let v1 = createVector(1, 0);\n  let v2 = createVector(0, 1);\n\n  // Calculate the distance between them.\n  let d = p5.Vector.dist(v1, v2);\n\n  // Prints \"1.414...\" to the console.\n  print(d);\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows drawn on a gray square. A red and a blue arrow extend from the top left. A purple arrow extends from the tip of the red arrow to the tip of the blue arrow. The number 36 is written in black near the purple arrow.');\n}\n\nfunction draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n\n  // Draw the red arrow.\n  let v1 = createVector(50, 50);\n  drawArrow(origin, v1, 'red');\n\n  // Draw the blue arrow.\n  let v2 = createVector(20, 70);\n  drawArrow(origin, v2, 'blue');\n\n  // Purple arrow.\n  let v3 = p5.Vector.sub(v2, v1);\n  drawArrow(v1, v3, 'purple');\n\n  // Style the text.\n  textAlign(CENTER);\n\n  // Display the magnitude. The same as floor(v3.mag());\n  let m = floor(p5.Vector.dist(v1, v2));\n  text(m, 50, 75);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v",
              "description": "x, y, and z coordinates of a <a href=\"#/p5.Vector\">p5.Vector</a>.",
              "type": "p5.Vector"
            }
          ],
          "return": {
            "description": "distance.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "distance.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math",
      "submodule": "p5.Vector"
    },
    {
      "name": "normalize",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1673,
      "itemtype": "method",
      "description": "<p>Scales the components of a <a href=\"#/p5.Vector\">p5.Vector</a> object so\nthat its magnitude is 1.</p>\n<p>The static version of <code>normalize()</code>,  as in <code>p5.Vector.normalize(v)</code>,\nreturns a new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change\nthe original.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Vector.\n  let v = createVector(10, 20, 2);\n\n  // Normalize.\n  v.normalize();\n\n  // Prints \"p5.Vector Object : [0.445..., 0.890..., 0.089...]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.Vector.\n  let v0 = createVector(10, 20, 2);\n\n  // Create a normalized copy.\n  let v1 = p5.Vector.normalize(v0);\n\n  // Prints \"p5.Vector Object : [10, 20, 2]\" to the console.\n  print(v0.toString());\n  // Prints \"p5.Vector Object : [0.445..., 0.890..., 0.089...]\" to the console.\n  print(v1.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A red and blue arrow extend from the center of a circle. Both arrows follow the mouse, but the blue arrow's length is fixed to the circle's radius.\");\n}\n\nfunction draw() {\n  background(240);\n\n  // Vector to the center.\n  let v0 = createVector(50, 50);\n\n  // Vector from the center to the mouse.\n  let v1 = createVector(mouseX - 50, mouseY - 50);\n\n  // Circle's radius.\n  let r = 25;\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  v1.normalize();\n  drawArrow(v0, v1.mult(r), 'blue');\n\n  // Draw the circle.\n  noFill();\n  circle(50, 50, r * 2);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "normalized <a href=\"#/p5.Vector\">p5.Vector</a>.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "normalized <a href=\"#/p5.Vector\">p5.Vector</a>.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "limit",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1761,
      "itemtype": "method",
      "description": "<p>Limits a vector's magnitude to a maximum value.</p>\n<p>The static version of <code>limit()</code>, as in <code>p5.Vector.limit(v, 5)</code>, returns a\nnew <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginal.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(10, 20, 2);\n\n  // Limit its magnitude.\n  v.limit(5);\n\n  // Prints \"p5.Vector Object : [2.227..., 4.454..., 0.445...]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(10, 20, 2);\n\n  // Create a copy an limit its magintude.\n  let v1 = p5.Vector.limit(v0, 5);\n\n  // Prints \"p5.Vector Object : [2.227..., 4.454..., 0.445...]\" to the console.\n  print(v1.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe(\"A red and blue arrow extend from the center of a circle. Both arrows follow the mouse, but the blue arrow never crosses the circle's edge.\");\n}\nfunction draw() {\n  background(240);\n\n  // Vector to the center.\n  let v0 = createVector(50, 50);\n\n  // Vector from the center to the mouse.\n  let v1 = createVector(mouseX - 50, mouseY - 50);\n\n  // Circle's radius.\n  let r = 25;\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  drawArrow(v0, v1.limit(r), 'blue');\n\n  // Draw the circle.\n  noFill();\n  circle(50, 50, r * 2);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "max",
              "description": "maximum magnitude for the vector.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "setMag",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1850,
      "itemtype": "method",
      "description": "<p>Sets a vector's magnitude to a given value.</p>\n<p>The static version of <code>setMag()</code>, as in <code>p5.Vector.setMag(v, 10)</code>, returns\na new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change the\noriginal.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(3, 4, 0);\n\n  // Prints \"5\" to the console.\n  print(v.mag());\n\n  // Set its magnitude to 10.\n  v.setMag(10);\n\n  // Prints \"p5.Vector Object : [6, 8, 0]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(3, 4, 0);\n\n  // Create a copy with a magnitude of 10.\n  let v1 = p5.Vector.setMag(v0, 10);\n\n  // Prints \"5\" to the console.\n  print(v0.mag());\n\n  // Prints \"p5.Vector Object : [6, 8, 0]\" to the console.\n  print(v1.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two arrows extend from the top left corner of a square toward its center. The red arrow reaches the center and the blue arrow only extends part of the way.');\n}\n\nfunction draw() {\n  background(240);\n\n  let origin = createVector(0, 0);\n  let v = createVector(50, 50);\n\n  // Draw the red arrow.\n  drawArrow(origin, v, 'red');\n\n  // Set v's magnitude to 30.\n  v.setMag(30);\n\n  // Draw the blue arrow.\n  drawArrow(origin, v, 'blue');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "len",
              "description": "new length for this vector.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "heading",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 1947,
      "itemtype": "method",
      "description": "<p>Calculates the angle a 2D vector makes with the positive x-axis.</p>\n<p>By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction.</p>\n<p>If the vector was created with\n<a href=\"#/p5/createVector\">createVector()</a>, <code>heading()</code> returns angles\nin the units of the current <a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>The static version of <code>heading()</code>, as in <code>p5.Vector.heading(v)</code>, works the\nsame way.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(1, 1);\n\n  // Prints \"0.785...\" to the console.\n  print(v.heading());\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Prints \"45\" to the console.\n  print(v.heading());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(1, 1);\n\n  // Prints \"0.785...\" to the console.\n  print(p5.Vector.heading(v));\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Prints \"45\" to the console.\n  print(p5.Vector.heading(v));\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black arrow extends from the top left of a square to its center. The text \"Radians: 0.79\" and \"Degrees: 45\" is written near the tip of the arrow.');\n}\n\nfunction draw() {\n  background(200);\n\n  let origin = createVector(0, 0);\n  let v = createVector(50, 50);\n\n  // Draw the black arrow.\n  drawArrow(origin, v, 'black');\n\n  // Use radians.\n  angleMode(RADIANS);\n\n  // Display the heading in radians.\n  let h = round(v.heading(), 2);\n  text(`Radians: ${h}`, 20, 70);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Display the heading in degrees.\n  h = v.heading();\n  text(`Degrees: ${h}`, 20, 85);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "angle of rotation.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "angle of rotation.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "setHeading",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2039,
      "itemtype": "method",
      "description": "<p>Rotates a 2D vector to a specific angle without changing its magnitude.</p>\n<p>By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction.</p>\n<p>If the vector was created with\n<a href=\"#/p5/createVector\">createVector()</a>, <code>setHeading()</code> uses\nthe units of the current <a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(0, 1);\n\n  // Prints \"1.570...\" to the console.\n  print(v.heading());\n\n  // Point to the left.\n  v.setHeading(PI);\n\n  // Prints \"3.141...\" to the console.\n  print(v.heading());\n}",
        "// META:norender\nfunction setup() {\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Create a p5.Vector object.\n  let v = createVector(0, 1);\n\n  // Prints \"90\" to the console.\n  print(v.heading());\n\n  // Point to the left.\n  v.setHeading(180);\n\n  // Prints \"180\" to the console.\n  print(v.heading());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two arrows extend from the center of a gray square. The red arrow points to the right and the blue arrow points down.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create p5.Vector objects.\n  let v0 = createVector(50, 50);\n  let v1 = createVector(30, 0);\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Point down.\n  v1.setHeading(HALF_PI);\n\n  // Draw the blue arrow.\n  drawArrow(v0, v1, 'blue');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "rotate",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2171,
      "itemtype": "method",
      "description": "<p>Rotates a 2D vector by an angle without changing its magnitude.</p>\n<p>By convention, the positive x-axis has an angle of 0. Angles increase in\nthe clockwise direction.</p>\n<p>If the vector was created with\n<a href=\"#/p5/createVector\">createVector()</a>, <code>rotate()</code> uses\nthe units of the current <a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n<p>The static version of <code>rotate()</code>, as in <code>p5.Vector.rotate(v, PI)</code>,\nreturns a new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change\nthe original.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(1, 0);\n\n  // Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\n  print(v.toString());\n\n  // Rotate a quarter turn.\n  v.rotate(HALF_PI);\n\n  // Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Create a p5.Vector object.\n  let v = createVector(1, 0);\n\n  // Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\n  print(v.toString());\n\n  // Rotate a quarter turn.\n  v.rotate(90);\n\n  // Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(1, 0);\n\n  // Create a rotated copy.\n  let v1 = p5.Vector.rotate(v0, HALF_PI);\n\n  // Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\n  print(v0.toString());\n  // Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\n  print(v1.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Create a p5.Vector object.\n  let v0 = createVector(1, 0);\n\n  // Create a rotated copy.\n  let v1 = p5.Vector.rotate(v0, 90);\n\n  // Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\n  print(v0.toString());\n\n  // Prints \"p5.Vector Object : [0, 1, 0]\" to the console.\n  print(v1.toString());\n}",
        "let v0;\nlet v1;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create p5.Vector objects.\n  v0 = createVector(50, 50);\n  v1 = createVector(30, 0);\n\n  describe('A black arrow extends from the center of a gray square. The arrow rotates clockwise.');\n}\n\nfunction draw() {\n  background(240);\n\n  // Rotate v1.\n  v1.rotate(0.01);\n\n  // Draw the black arrow.\n  drawArrow(v0, v1, 'black');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "angle of rotation.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "angleBetween",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2304,
      "itemtype": "method",
      "description": "<p>Calculates the angle between two vectors.</p>\n<p>The angles returned are signed, which means that\n<code>v1.angleBetween(v2) === -v2.angleBetween(v1)</code>.</p>\n<p>If the vector was created with\n<a href=\"#/p5/createVector\">createVector()</a>, <code>angleBetween()</code> returns\nangles in the units of the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(1, 0);\n  let v1 = createVector(0, 1);\n\n  // Prints \"1.570...\" to the console.\n  print(v0.angleBetween(v1));\n\n  // Prints \"-1.570...\" to the console.\n  print(v1.angleBetween(v0));\n}",
        "// META:norender\nfunction setup() {\n  // Use degrees.\n  angleMode(DEGREES);\n  // Create p5.Vector objects.\n  let v0 = createVector(1, 0);\n  let v1 = createVector(0, 1);\n\n  // Prints \"90\" to the console.\n  print(v0.angleBetween(v1));\n\n  // Prints \"-90\" to the console.\n  print(v1.angleBetween(v0));\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(1, 0);\n  let v1 = createVector(0, 1);\n\n  // Prints \"1.570...\" to the console.\n  print(p5.Vector.angleBetween(v0, v1));\n\n  // Prints \"-1.570...\" to the console.\n  print(p5.Vector.angleBetween(v1, v0));\n}",
        "// META:norender\nfunction setup() {\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Create p5.Vector objects.\n  let v0 = createVector(1, 0);\n  let v1 = createVector(0, 1);\n\n  // Prints \"90\" to the console.\n  print(p5.Vector.angleBetween(v0, v1));\n\n  // Prints \"-90\" to the console.\n  print(p5.Vector.angleBetween(v1, v0));\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Two arrows extend from the center of a gray square. A red arrow points to the right and a blue arrow points down. The text \"Radians: 1.57\" and \"Degrees: 90\" is written above the arrows.');\n}\nfunction draw() {\n  background(200);\n\n  // Create p5.Vector objects.\n  let v0 = createVector(50, 50);\n  let v1 = createVector(30, 0);\n  let v2 = createVector(0, 30);\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  drawArrow(v0, v2, 'blue');\n\n  // Use radians.\n  angleMode(RADIANS);\n\n  // Display the angle in radians.\n  let angle = round(v1.angleBetween(v2), 2);\n  text(`Radians: ${angle}`, 20, 20);\n\n  // Use degrees.\n  angleMode(DEGREES);\n\n  // Display the angle in degrees.\n  angle = round(v1.angleBetween(v2), 2);\n  text(`Degrees: ${angle}`, 20, 35);\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "x, y, and z components of a <a href=\"#/p5.Vector\">p5.Vector</a>.",
              "type": "p5.Vector"
            }
          ],
          "return": {
            "description": "angle between the vectors.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "angle between the vectors.",
        "type": "Number"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "lerp",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2428,
      "itemtype": "method",
      "description": "<p>Calculates new <code>x</code>, <code>y</code>, and <code>z</code> components that are proportionally the\nsame distance between two vectors.</p>\n<p>The <code>amt</code> parameter is the amount to interpolate between the old vector and\nthe new vector. 0.0 keeps all components equal to the old vector's, 0.5 is\nhalfway between, and 1.0 sets all components equal to the new vector's.</p>\n<p>The static version of <code>lerp()</code>, as in <code>p5.Vector.lerp(v0, v1, 0.5)</code>,\nreturns a new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change\nthe original.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(1, 1, 1);\n  let v1 = createVector(3, 3, 3);\n\n  // Interpolate.\n  v0.lerp(v1, 0.5);\n\n  // Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\n  print(v0.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(1, 1, 1);\n\n  // Interpolate.\n  v.lerp(3, 3, 3, 0.5);\n\n  // Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(1, 1, 1);\n  let v1 = createVector(3, 3, 3);\n\n  // Interpolate.\n  let v2 = p5.Vector.lerp(v0, v1, 0.5);\n\n  // Prints \"p5.Vector Object : [2, 2, 2]\" to the console.\n  print(v2.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows extend from the center of a gray square. A red arrow points to the right, a blue arrow points down, and a purple arrow points to the bottom right.');\n}\nfunction draw() {\n  background(200);\n\n  // Create p5.Vector objects.\n  let v0 = createVector(50, 50);\n  let v1 = createVector(30, 0);\n  let v2 = createVector(0, 30);\n\n  // Interpolate.\n  let v3 = p5.Vector.lerp(v1, v2, 0.5);\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  drawArrow(v0, v2, 'blue');\n\n  // Draw the purple arrow.\n  drawArrow(v0, v3, 'purple');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component.",
              "type": "Number"
            },
            {
              "name": "amt",
              "description": "amount of interpolation between 0.0 (old vector)\nand 1.0 (new vector). 0.5 is halfway between.",
              "type": "Number"
            }
          ],
          "chainable": 1
        },
        {
          "params": [
            {
              "name": "v",
              "description": "<a href=\"#/p5.Vector\">p5.Vector</a> to lerp toward.",
              "type": "p5.Vector"
            },
            {
              "name": "amt",
              "description": "",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "slerp",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2565,
      "itemtype": "method",
      "description": "<p>Calculates a new heading and magnitude that are between two vectors.</p>\n<p>The <code>amt</code> parameter is the amount to interpolate between the old vector and\nthe new vector. 0.0 keeps the heading and magnitude equal to the old\nvector's, 0.5 sets them halfway between, and 1.0 sets the heading and\nmagnitude equal to the new vector's.</p>\n<p><code>slerp()</code> differs from <a href=\"#/p5.Vector/lerp\">lerp()</a> because\nit interpolates magnitude. Calling <code>v0.slerp(v1, 0.5)</code> sets <code>v0</code>'s\nmagnitude to a value halfway between its original magnitude and <code>v1</code>'s.\nCalling <code>v0.lerp(v1, 0.5)</code> makes no such guarantee.</p>\n<p>The static version of <code>slerp()</code>, as in <code>p5.Vector.slerp(v0, v1, 0.5)</code>,\nreturns a new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change\nthe original.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(3, 0);\n\n  // Prints \"3\" to the console.\n  print(v0.mag());\n\n  // Prints \"0\" to the console.\n  print(v0.heading());\n\n  // Create a p5.Vector object.\n  let v1 = createVector(0, 1);\n\n  // Prints \"1\" to the console.\n  print(v1.mag());\n\n  // Prints \"1.570...\" to the console.\n  print(v1.heading());\n\n  // Interpolate halfway between v0 and v1.\n  v0.slerp(v1, 0.5);\n\n  // Prints \"2\" to the console.\n  print(v0.mag());\n\n  // Prints \"0.785...\" to the console.\n  print(v0.heading());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v0 = createVector(3, 0);\n\n  // Prints \"3\" to the console.\n  print(v0.mag());\n\n  // Prints \"0\" to the console.\n  print(v0.heading());\n\n  // Create a p5.Vector object.\n  let v1 = createVector(0, 1);\n\n  // Prints \"1\" to the console.\n  print(v1.mag());\n\n  // Prints \"1.570...\" to the console.\n  print(v1.heading());\n\n  // Create a p5.Vector that's halfway between v0 and v1.\n  let v3 = p5.Vector.slerp(v0, v1, 0.5);\n\n  // Prints \"2\" to the console.\n  print(v3.mag());\n\n  // Prints \"0.785...\" to the console.\n  print(v3.heading());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows extend from the center of a gray square. A red arrow points to the right, a blue arrow points to the left, and a purple arrow points down.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create p5.Vector objects.\n  let v0 = createVector(50, 50);\n  let v1 = createVector(20, 0);\n  let v2 = createVector(-40, 0);\n\n  // Create a p5.Vector that's halfway between v1 and v2.\n  let v3 = p5.Vector.slerp(v1, v2, 0.5);\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  drawArrow(v0, v2, 'blue');\n\n  // Draw the purple arrow.\n  drawArrow(v0, v3, 'purple');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "v",
              "description": "<a href=\"#/p5.Vector\">p5.Vector</a> to slerp toward.",
              "type": "p5.Vector"
            },
            {
              "name": "amt",
              "description": "amount of interpolation between 0.0 (old vector)\nand 1.0 (new vector). 0.5 is halfway between.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "reflect",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2731,
      "itemtype": "method",
      "description": "<p>Reflects a vector about a line in 2D or a plane in 3D.</p>\n<p>The orientation of the line or plane is described by a normal vector that\npoints away from the shape.</p>\n<p>The static version of <code>reflect()</code>, as in <code>p5.Vector.reflect(v, n)</code>,\nreturns a new <a href=\"#/p5.Vector\">p5.Vector</a> object and doesn't change\nthe original.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a normal vector.\n  let n = createVector(0, 1);\n  // Create a vector to reflect.\n  let v = createVector(4, 6);\n\n  // Reflect v about n.\n  v.reflect(n);\n\n  // Prints \"p5.Vector Object : [4, -6, 0]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a normal vector.\n  let n = createVector(0, 1);\n\n  // Create a vector to reflect.\n  let v0 = createVector(4, 6);\n\n  // Create a reflected vector.\n  let v1 = p5.Vector.reflect(v0, n);\n\n  // Prints \"p5.Vector Object : [4, -6, 0]\" to the console.\n  print(v1.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('Three arrows extend from the center of a gray square with a vertical line down its middle. A black arrow points to the right, a blue arrow points to the bottom left, and a red arrow points to the bottom right.');\n}\nfunction draw() {\n  background(200);\n\n  // Draw a vertical line.\n  line(50, 0, 50, 100);\n\n  // Create a normal vector.\n  let n = createVector(1, 0);\n\n  // Center.\n  let v0 = createVector(50, 50);\n\n  // Create a vector to reflect.\n  let v1 = createVector(30, 40);\n\n  // Create a reflected vector.\n  let v2 = p5.Vector.reflect(v1, n);\n\n  // Scale the normal vector for drawing.\n  n.setMag(30);\n\n  // Draw the black arrow.\n  drawArrow(v0, n, 'black');\n\n  // Draw the red arrow.\n  drawArrow(v0, v1, 'red');\n\n  // Draw the blue arrow.\n  drawArrow(v0, v2, 'blue');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "surfaceNormal",
              "description": "<a href=\"#/p5.Vector\">p5.Vector</a>\nto reflect about.",
              "type": "p5.Vector"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "array",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2750,
      "itemtype": "method",
      "description": "Returns the vector's components as an array of numbers.",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = createVector(20, 30);\n\n  // Prints \"[20, 30, 0]\" to the console.\n  print(v.array());\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "array with the vector's components.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "array with the vector's components.",
        "type": "Number[]"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "equals",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2823,
      "itemtype": "method",
      "description": "<p>Checks whether all the vector's components are equal to another vector's.</p>\n<p><code>equals()</code> returns <code>true</code> if the vector's components are all the same as another\nvector's and <code>false</code> if not.</p>\n<p>The version of <code>equals()</code> with one parameter interprets it as another\n<a href=\"#/p5.Vector\">p5.Vector</a> object.</p>\n<p>The version of <code>equals()</code> with multiple parameters interprets them as the\ncomponents of another vector. Any missing parameters are assigned the value\n0.</p>\n<p>The static version of <code>equals()</code>, as in <code>p5.Vector.equals(v0, v1)</code>,\ninterprets both parameters as <a href=\"#/p5.Vector\">p5.Vector</a> objects.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(10, 20, 30);\n  let v1 = createVector(10, 20, 30);\n  let v2 = createVector(0, 0, 0);\n\n  // Prints \"true\" to the console.\n  print(v0.equals(v1));\n\n  // Prints \"false\" to the console.\n  print(v0.equals(v2));\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(5, 10, 20);\n  let v1 = createVector(5, 10, 20);\n  let v2 = createVector(13, 10, 19);\n\n  // Prints \"true\" to the console.\n  print(v0.equals(v1.x, v1.y, v1.z));\n\n  // Prints \"false\" to the console.\n  print(v0.equals(v2.x, v2.y, v2.z));\n}",
        "// META:norender\nfunction setup() {\n  // Create p5.Vector objects.\n  let v0 = createVector(10, 20, 30);\n  let v1 = createVector(10, 20, 30);\n  let v2 = createVector(0, 0, 0);\n\n  // Prints \"true\" to the console.\n  print(p5.Vector.equals(v0, v1));\n\n  // Prints \"false\" to the console.\n  print(p5.Vector.equals(v0, v2));\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x component of the vector.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y component of the vector.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z component of the vector.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "whether the vectors are equal.",
            "type": "Boolean"
          }
        },
        {
          "params": [
            {
              "name": "value",
              "description": "vector to compare.",
              "type": "p5.Vector|Array"
            }
          ],
          "return": {
            "description": "",
            "type": "Boolean"
          }
        }
      ],
      "return": {
        "description": "whether the vectors are equal.",
        "type": "Boolean"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "clampToZero",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2853,
      "itemtype": "method",
      "description": "<p>Replaces the components of a <a href=\"#/p5.Vector\">p5.Vector</a> that are very close to zero with zero.</p>\n<p>In computers, handling numbers with decimals can give slightly imprecise answers due to the way those numbers are represented.\nThis can make it hard to check if a number is zero, as it may be close but not exactly zero.\nThis method rounds very close numbers to zero to make those checks easier</p>\n<p>https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "with components very close to zero replaced with zero.",
            "type": "p5.Vector"
          },
          "chainable": 1
        }
      ],
      "return": {
        "description": "with components very close to zero replaced with zero.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": false,
      "module": "Math"
    },
    {
      "name": "fromAngle",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2932,
      "itemtype": "method",
      "description": "Creates a new 2D vector from an angle.",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = p5.Vector.fromAngle(0);\n\n  // Prints \"p5.Vector Object : [1, 0, 0]\" to the console.\n  print(v.toString());\n}",
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = p5.Vector.fromAngle(0, 30);\n\n  // Prints \"p5.Vector Object : [30, 0, 0]\" to the console.\n  print(v.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  describe('A black arrow extends from the center of a gray square. It points to the right.');\n}\nfunction draw() {\n  background(200);\n\n  // Create a p5.Vector to the center.\n  let v0 = createVector(50, 50);\n\n  // Create a p5.Vector with an angle 0 and magnitude 30.\n  let v1 = p5.Vector.fromAngle(0, 30);\n\n  // Draw the black arrow.\n  drawArrow(v0, v1, 'black');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "desired angle, in radians. Unaffected by <a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            },
            {
              "name": "length",
              "description": "length of the new vector (defaults to 1).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": 1,
      "module": "Math"
    },
    {
      "name": "fromAngles",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 2988,
      "itemtype": "method",
      "description": "Creates a new 3D vector from a pair of ISO spherical angles.",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = p5.Vector.fromAngles(0, 0);\n\n  // Prints \"p5.Vector Object : [0, -1, 0]\" to the console.\n  print(v.toString());\n}",
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  describe('A light shines on a pink sphere as it orbits.');\n}\n\nfunction draw() {\n  background(0);\n\n  // Calculate the ISO angles.\n  let theta = frameCount *  0.05;\n  let phi = 0;\n\n  // Create a p5.Vector object.\n  let v = p5.Vector.fromAngles(theta, phi, 100);\n\n  // Create a point light using the p5.Vector.\n  let c = color('deeppink');\n  pointLight(c, v);\n\n  // Style the sphere.\n  fill(255);\n  noStroke();\n\n  // Draw the sphere.\n  sphere(35);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "theta",
              "description": "polar angle in radians (zero is up).",
              "type": "Number"
            },
            {
              "name": "phi",
              "description": "azimuthal angle in radians\n(zero is out of the screen).",
              "type": "Number"
            },
            {
              "name": "length",
              "description": "length of the new vector (defaults to 1).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": 1,
      "module": "Math"
    },
    {
      "name": "random2D",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3061,
      "itemtype": "method",
      "description": "Creates a new 2D unit vector with a random heading.",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = p5.Vector.random2D();\n\n  // Prints \"p5.Vector Object : [x, y]\" to the console\n  // where x and y are small random numbers.\n  print(v.toString());\n}",
        "function setup() {\n  createCanvas(100, 100);\n\n  // Slow the frame rate.\n  frameRate(1);\n\n  describe('A black arrow in extends from the center of a gray square. It changes direction once per second.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Create a p5.Vector to the center.\n  let v0 = createVector(50, 50);\n\n  // Create a random p5.Vector.\n  let v1 = p5.Vector.random2D();\n\n  // Scale v1 for drawing.\n  v1.mult(30);\n\n  // Draw the black arrow.\n  drawArrow(v0, v1, 'black');\n}\n\n// Draws an arrow between two vectors.\nfunction drawArrow(base, vec, myColor) {\n  push();\n  stroke(myColor);\n  strokeWeight(3);\n  fill(myColor);\n  translate(base.x, base.y);\n  line(0, 0, vec.x, vec.y);\n  rotate(vec.heading());\n  let arrowSize = 7;\n  translate(vec.mag() - arrowSize, 0);\n  triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n  pop();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": 1,
      "module": "Math"
    },
    {
      "name": "random3D",
      "file": "src/scripts/parsers/in/p5.js/src/math/p5.Vector.js",
      "line": 3081,
      "itemtype": "method",
      "description": "Creates a new 3D unit vector with a random heading.",
      "example": [
        "// META:norender\nfunction setup() {\n  // Create a p5.Vector object.\n  let v = p5.Vector.random3D();\n\n  // Prints \"p5.Vector Object : [x, y, z]\" to the console\n  // where x, y, and z are small random numbers.\n  print(v.toString());\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
            "type": "p5.Vector"
          }
        }
      ],
      "return": {
        "description": "new <a href=\"#/p5.Vector\">p5.Vector</a> object.",
        "type": "p5.Vector"
      },
      "class": "p5.Vector",
      "static": 1,
      "module": "Math"
    },
    {
      "name": "textToPaths",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 193,
      "itemtype": "method",
      "description": "<p>Returns a flat array of path commands that describe the outlines of a string of text.</p>\n<p>Each command is represented as an array of the form <code>[type, ...coords]</code>, where:</p>\n<ul><li><code>type</code> is one of <code>'M'</code>, <code>'L'</code>, <code>'Q'</code>, <code>'C'</code>, or <code>'Z'</code>,</li><li><code>coords</code> are the numeric values needed for that command.</li></ul><p><code>'M'</code> indicates a \"move to\" (starting a new contour),\n<code>'L'</code> a line segment,\n<code>'Q'</code> a quadratic bezier,\n<code>'C'</code> a cubic bezier, and\n<code>'Z'</code> closes the current path.</p>\n<p>The first two parameters, <code>x</code> and <code>y</code>, specify the baseline origin for the text.\nOptionally, you can provide a <code>width</code> and <code>height</code> for text wrapping; if you don't need\nwrapping, you can omit them and directly pass <code>options</code> as the fourth parameter.</p>\n",
      "example": [
        "let font;\n\nasync function setup() {\n  font = await loadFont('assets/inconsolata.otf');\n  createCanvas(200, 200);\n  background(220);\n  noLoop();\n}\n\nfunction draw() {\n  background(220);\n  stroke(0);\n  noFill();\n  textSize(60);\n\n  // Get path commands for \"Hello\" (drawn at baseline x=50, y=100):\n  const pathCommands = font.textToPaths('Hello', 30, 110);\n\n  beginShape();\n  for (let i = 0; i < pathCommands.length; i++) {\n    const cmd = pathCommands[i];\n    const type = cmd[0];\n\n    switch (type) {\n      case 'M': {\n        // Move to (start a new contour)\n        const x = cmd[1];\n        const y = cmd[2];\n        endContour(); // In case we were already drawing\n        beginContour();\n        vertex(x, y);\n        break;\n      }\n      case 'L': {\n        // Line to\n        const x = cmd[1];\n        const y = cmd[2];\n        vertex(x, y);\n        break;\n      }\n      case 'Q': {\n        // Quadratic bezier\n        const cx = cmd[1];\n        const cy = cmd[2];\n        const x = cmd[3];\n        const y = cmd[4];\n        bezierOrder(2);\n        bezierVertex(cx, cy);\n        bezierVertex(x, y);\n        break;\n      }\n      case 'C': {\n        // Cubic bezier\n        const cx1 = cmd[1];\n        const cy1 = cmd[2];\n        const cx2 = cmd[3];\n        const cy2 = cmd[4];\n        const x = cmd[5];\n        const y = cmd[6];\n        bezierOrder(3);\n        bezierVertex(cx1, cy1);\n        bezierVertex(cx2, cy2);\n        bezierVertex(x, y);\n        break;\n      }\n      case 'Z': {\n        // Close path\n        endContour(CLOSE);\n        beginContour();\n        break;\n      }\n    }\n  }\n  endContour();\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "The text to convert into path commands.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "x‐coordinate of the text baseline.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y‐coordinate of the text baseline.",
              "type": "Number"
            },
            {
              "name": "width",
              "description": "Optional width for text wrapping.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "height",
              "description": "Optional height for text wrapping.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "A flat array of path commands.",
            "type": "Array[]"
          }
        }
      ],
      "return": {
        "description": "A flat array of path commands.",
        "type": "Array[]"
      },
      "class": "p5.Font",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textToPoints",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 265,
      "itemtype": "method",
      "description": "<p>Returns an array of points outlining a string of text written using the\nfont.</p>\n<p>Each point object in the array has three properties that describe the\npoint's location and orientation, called its path angle. For example,\n<code>{ x: 10, y: 20, alpha: 450 }</code>.</p>\n<p>The first parameter, <code>str</code>, is a string of text. The second and third\nparameters, <code>x</code> and <code>y</code>, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\n<a href=\"#/p5/textAlign\">textAlign()</a> for more ways to align text.</p>\n<p>The fourth parameter, <code>options</code>, is also optional. <code>font.textToPoints()</code>\nexpects an object with the following properties:</p>\n<p><code>sampleFactor</code> is the ratio of the text's path length to the number of\nsamples. It defaults to 0.1. Higher values produce more points along the\npath and are more precise.</p>\n<p><code>simplifyThreshold</code> removes collinear points if it's set to a number other\nthan 0. The value represents the threshold angle in radians to use when determining\nwhether two edges are collinear.</p>\n",
      "example": [
        "let font;\n\nasync function setup() {\n  createCanvas(100, 100);\n  font = await loadFont('assets/inconsolata.otf');\n\n  background(200);\n  textSize(35);\n\n  // Get the point array.\n  let points = font.textToPoints('p5*js', 6, 60, { sampleFactor: 0.5 });\n\n  // Draw a dot at each point.\n  for (let p of points) {\n    point(p.x, p.y);\n  }\n\n  describe('A set of black dots outlining the text \"p5*js\" on a gray background.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "string of text.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "x-coordinate of the text.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the text.",
              "type": "Number"
            },
            {
              "name": "options",
              "description": "Configuration:",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "array of point objects, each with <code>x</code>, <code>y</code>, and <code>alpha</code> (path angle) properties.",
            "type": "Object[]"
          }
        }
      ],
      "return": {
        "description": "array of point objects, each with <code>x</code>, <code>y</code>, and <code>alpha</code> (path angle) properties.",
        "type": "Object[]"
      },
      "class": "p5.Font",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textToContours",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 341,
      "itemtype": "method",
      "description": "<p>Returns an array of arrays of points outlining a string of text written using the\nfont. Each array represents a contour, so the letter O will have two outer arrays:\none for the outer edge of the shape, and one for the inner edge of the hole.</p>\n<p>Each point object in a contour array has three properties that describe the\npoint's location and orientation, called its path angle. For example,\n<code>{ x: 10, y: 20, alpha: 450 }</code>.</p>\n<p>The first parameter, <code>str</code>, is a string of text. The second and third\nparameters, <code>x</code> and <code>y</code>, are the text's position. By default, they set the\ncoordinates of the bounding box's bottom-left corner. See\n<a href=\"#/p5/textAlign\">textAlign()</a> for more ways to align text.</p>\n<p>The fourth parameter, <code>options</code>, is also optional. <code>font.textToPoints()</code>\nexpects an object with the following properties:</p>\n<p><code>sampleFactor</code> is the ratio of the text's path length to the number of\nsamples. It defaults to 0.1. Higher values produce more points along the\npath and are more precise.</p>\n<p><code>simplifyThreshold</code> removes collinear points if it's set to a number other\nthan 0. The value represents the threshold angle in radians to use when determining\nwhether two edges are collinear.</p>\n",
      "example": [
        "let font;\n\nasync function setup() {\n  createCanvas(100, 100);\n  font = await loadFont('/assets/inconsolata.otf');\n}\n\nfunction draw() {\n  background(200);\n  textAlign(CENTER, CENTER);\n  textSize(30);\n\n  // Get the point array.\n  let contours = font.textToContours('p5*js', width/2, height/2, { sampleFactor: 0.5 });\n\n  beginShape();\n  for (const pts of contours) {\n    beginContour();\n    for (const pt of pts) {\n      vertex(pt.x + 5*sin(pt.y*0.1 + millis()*0.01), pt.y);\n    }\n    endContour(CLOSE);\n  }\n  endShape();\n\n  describe('The text p5*js wobbling over time');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "string of text.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "x-coordinate of the text.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the text.",
              "type": "Number"
            },
            {
              "name": "options",
              "description": "Configuration options:",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "array of point objects, each with <code>x</code>, <code>y</code>, and <code>alpha</code> (path angle) properties.",
            "type": "Object[][]"
          }
        }
      ],
      "return": {
        "description": "array of point objects, each with <code>x</code>, <code>y</code>, and <code>alpha</code> (path angle) properties.",
        "type": "Object[][]"
      },
      "class": "p5.Font",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "textToModel",
      "file": "src/scripts/parsers/in/p5.js/src/type/p5.Font.js",
      "line": 518,
      "itemtype": "method",
      "description": "<p>Converts text into a 3D model that can be rendered in WebGL mode.</p>\n<p>This method transforms flat text into extruded 3D geometry, allowing\nfor dynamic effects like depth, warping, and custom shading.</p>\n<p>It works by taking the outlines (contours) of each character in the\nprovided text string and constructing a 3D shape from them.</p>\n<p>Once your 3D text is ready, you can rotate it in 3D space using <a href=\"#/p5/orbitControl\">orbitControl()</a>\n— just click and drag with your mouse to see it from all angles!</p>\n<p>Use the extrude slider to give your letters depth: slide it up, and your\nflat text turns into a solid, multi-dimensional object.</p>\n<p>You can also choose from various fonts such as \"Anton\", \"Montserrat\", or \"Source Serif\",\nmuch like selecting fancy fonts in a word processor,</p>\n<p>The generated model (a Geometry object) can be manipulated further—rotated, scaled,\nor styled with shaders—to create engaging, interactive visual art.</p>\n",
      "example": [
        "let font;\nlet geom;\n\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n  font = await loadFont('https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf');\n\n  geom = font.textToModel(\"Hello\", 50, 0, { sampleFactor: 2 });\n  geom.clearColors();\n  geom.normalize();\n}\n\nfunction draw() {\n  background(255);\n  orbitControl();\n  fill(\"red\");\n  strokeWeight(4);\n  scale(min(width, height) / 300);\n  model(geom);\n  describe('A red non-extruded \"Hello\" in Anton on white canvas, rotatable via mouse.');\n}",
        "let font;\nlet geom;\n\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n\n  // Alternative fonts:\n  // Anton: 'https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf'\n  // Montserrat: 'https://fonts.gstatic.com/s/montserrat/v29/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew-Y3tcoqK5.ttf'\n  // Source Serif: 'https://fonts.gstatic.com/s/sourceserif4/v8/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjihdqrhxXD-wGvjU.ttf'\n\n  // Using Source Serif for this example:\n  font = await loadFont('https://fonts.gstatic.com/s/sourceserif4/v8/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjihdqrhxXD-wGvjU.ttf');\n\n  geom = font.textToModel(\"Hello\", 50, 0, { sampleFactor: 2, extrude: 5 });\n  geom.clearColors();\n  geom.normalize();\n}\n\nfunction draw() {\n  background(255);\n  orbitControl();\n  fill(\"red\");\n  strokeWeight(4);\n  scale(min(width, height) / 300);\n  model(geom);\n  describe('3D red extruded \"Hello\" in Source Serif on white, rotatable via mouse.');\n}",
        "let geom;\nlet activeFont;\nlet artShader;\nlet lineShader;\n\n// Define parameters as simple variables\nlet words = 'HELLO';\nlet warp = 1;\nlet extrude = 5;\nlet palette = [\"#ffe03d\", \"#fe4830\", \"#d33033\", \"#6d358a\", \"#1c509e\", \"#00953c\"];\n\nasync function setup() {\n  createCanvas(200, 200, WEBGL);\n\n  // Using Anton as the default font for this example:\n\n // Alternative fonts:\n // Anton: 'https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf'\n // Montserrat: 'https://fonts.gstatic.com/s/montserrat/v29/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew-Y3tcoqK5.ttf'\n // Source Serif: 'https://fonts.gstatic.com/s/sourceserif4/v8/vEFy2_tTDB4M7-auWDN0ahZJW3IX2ih5nk3AucvUHf6OAVIJmeUDygwjihdqrhxXD-wGvjU.ttf'\n  activeFont = await loadFont('https://fonts.gstatic.com/s/anton/v25/1Ptgg87LROyAm0K08i4gS7lu.ttf');\n\n  geom = activeFont.textToModel(words, 0, 50, { sampleFactor: 2, extrude });\n  geom.clearColors();\n  geom.normalize();\n\n  artShader = baseMaterialShader().modify({\n    uniforms: {\n      'float time': () => millis(),\n      'float warp': () => warp,\n      'float numColors': () => palette.length,\n      'vec3[6] colors': () => palette.flatMap((c) => [red(c)/255, green(c)/255, blue(c)/255]),\n    },\n    vertexDeclarations: 'out vec3 vPos;',\n    fragmentDeclarations: 'in vec3 vPos;',\n    'Vertex getObjectInputs': `(Vertex inputs) {\n      vPos = inputs.position;\n      inputs.position.x += 5. * warp * sin(inputs.position.y * 0.1 + time * 0.001) / (1. + warp);\n      inputs.position.y += 5. * warp * sin(inputs.position.x * 0.1 + time * 0.0009) / (1. + warp);\n      return inputs;\n    }`,\n    'vec4 getFinalColor': `(vec4 _c) {\n      float x = vPos.x * 0.005;\n      float a = floor(fract(x) * numColors);\n      float b = a == numColors - 1. ? 0. : a + 1.;\n      float t = fract(x * numColors);\n      vec3 c = mix(colors[int(a)], colors[int(b)], t);\n      return vec4(c, 1.);\n    }`\n  });\n\n  lineShader = baseStrokeShader().modify({\n    uniforms: {\n      'float time': () => millis(),\n      'float warp': () => warp,\n    },\n    'StrokeVertex getObjectInputs': `(StrokeVertex inputs) {\n      inputs.position.x += 5. * warp * sin(inputs.position.y * 0.1 + time * 0.001) / (1. + warp);\n      inputs.position.y += 5. * warp * sin(inputs.position.x * 0.1 + time * 0.0009) / (1. + warp);\n      return inputs;\n    }`,\n  });\n}\n\nfunction draw() {\n  background(255);\n  orbitControl();\n  shader(artShader);\n  strokeShader(lineShader);\n  strokeWeight(4);\n  scale(min(width, height) / 210);\n  model(geom);\n  describe('3D wavy with different color sets \"Hello\" in Anton on white canvas, rotatable via mouse.');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "str",
              "description": "The text string to convert into a 3D model.",
              "type": "String"
            },
            {
              "name": "x",
              "description": "The x-coordinate for the starting position of the text.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "The y-coordinate for the starting position of the text.",
              "type": "Number"
            },
            {
              "name": "width",
              "description": "Maximum width of the text block (wraps text if exceeded).",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "Maximum height of the text block.",
              "type": "Number"
            },
            {
              "name": "options",
              "description": "Configuration options for the 3D text:",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "A geometry object representing the 3D model of the text.",
            "type": "p5.Geometry"
          }
        }
      ],
      "return": {
        "description": "A geometry object representing the 3D model of the text.",
        "type": "p5.Geometry"
      },
      "class": "p5.Font",
      "static": false,
      "module": "Typography"
    },
    {
      "name": "version",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 73,
      "itemtype": "method",
      "description": "<p>Shaders are written in <a href=\"https://developer.mozilla.org/en-US/docs/Games/Techniques/3D_on_the_web/GLSL_Shaders\">GLSL</a>, but\nthere are different versions of GLSL that it might be written in.</p>\n<p>Calling this method on a <code>p5.Shader</code> will return the GLSL version it uses, either <code>100 es</code> or <code>300 es</code>.\nWebGL 1 shaders will only use <code>100 es</code>, and WebGL 2 shaders may use either.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "The GLSL version used by the shader.",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "The GLSL version used by the shader.",
        "type": "String"
      },
      "class": "p5.Shader",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "inspectHooks",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 145,
      "itemtype": "method",
      "description": "<p>Logs the hooks available in this shader, and their current implementation.</p>\n<p>Each shader may let you override bits of its behavior. Each bit is called\na hook. A hook is either for the vertex shader, if it affects the\nposition of vertices, or in the fragment shader, if it affects the pixel\ncolor. This method logs those values to the console, letting you know what\nyou are able to use in a call to\n<a href=\"#/p5.Shader/modify\"><code>modify()</code></a>.</p>\n<p>For example, this shader will produce the following output:</p>\n<pre><code class=\"language-js\">myShader = baseMaterialShader().modify({\n  declarations: 'uniform float time;',\n  'vec3 getWorldPosition': `(vec3 pos) {\n    pos.y += 20. * sin(time * 0.001 + pos.x * 0.05);\n    return pos;\n  }`\n});\nmyShader.inspectHooks();</code></pre><pre><code>==== Vertex shader hooks: ====\nvoid beforeVertex() {}\nvec3 getLocalPosition(vec3 position) { return position; }\n[MODIFIED] vec3 getWorldPosition(vec3 pos) {\n      pos.y += 20. * sin(time * 0.001 + pos.x * 0.05);\n      return pos;\n    }\nvec3 getLocalNormal(vec3 normal) { return normal; }\nvec3 getWorldNormal(vec3 normal) { return normal; }\nvec2 getUV(vec2 uv) { return uv; }\nvec4 getVertexColor(vec4 color) { return color; }\nvoid afterVertex() {}\n\n==== Fragment shader hooks: ====\nvoid beforeFragment() {}\nInputs getPixelInputs(Inputs inputs) { return inputs; }\nvec4 combineColors(ColorComponents components) {\n                vec4 color = vec4(0.);\n                color.rgb += components.diffuse * components.baseColor;\n                color.rgb += components.ambient * components.ambientColor;\n                color.rgb += components.specular * components.specularColor;\n                color.rgb += components.emissive;\n                color.a = components.opacity;\n                return color;\n              }\nvec4 getFinalColor(vec4 color) { return color; }\nvoid afterFragment() {}</code></pre>",
      "example": [],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Shader",
      "static": false,
      "module": "3D",
      "submodule": "Material",
      "beta": true
    },
    {
      "name": "modify",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 368,
      "itemtype": "method",
      "description": "<p>Returns a new shader, based on the original, but with custom snippets\nof shader code replacing default behaviour.</p>\n<p>Each shader may let you override bits of its behavior. Each bit is called\na hook. For example, a hook can let you adjust positions of vertices, or\nthe color of a pixel. You can inspect the different hooks available by calling\n<a href=\"#/p5.Shader/inspectHooks\"><code>yourShader.inspectHooks()</code></a>. You can\nalso read the reference for the default material, normal material, color, line, and point shaders to\nsee what hooks they have available.</p>\n<p><code>modify()</code> can be passed a function as a parameter. Inside, you can override hooks\nby calling them as functions. Each hook will take in a callback that takes in inputs\nand is expected to return an output. For example, here is a function that changes the\nmaterial color to red:</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = baseMaterialShader().modify(() =&gt; {\n    getPixelInputs((inputs) =&gt; {\n      inputs.color = [inputs.texCoord, 0, 1];\n      return inputs;\n    });\n  });\n}\n\nfunction draw() {\n  background(255);\n  noStroke();\n  shader(myShader); // Apply the custom shader\n  plane(width, height); // Draw a plane with the shader applied\n}</code></pre><p>In addition to calling hooks, you can create uniforms, which are special variables\nused to pass data from p5.js into the shader. They can be created by calling <code>uniform</code> + the\ntype of the data, such as <code>uniformFloat</code> for a number or <code>uniformVector2</code> for a two-component vector.\nThey take in a function that returns the data for the variable. You can then reference these\nvariables in your hooks, and their values will update every time you apply\nthe shader with the result of your function.</p>\n<p>Move the mouse over this sketch to increase the moveCounter which will be passed to the shader as a uniform.</p>\n<pre><code class=\"language-js example\">let myShader;\n//count of frames in which mouse has been moved\nlet moveCounter = 0;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = baseMaterialShader().modify(() =&gt; {\n    // Get the move counter from our sketch\n    let count = uniformFloat(() =&gt; moveCounter);\n\n    getPixelInputs((inputs) =&gt; {\n      inputs.color = [\n        inputs.texCoord,\n        sin(count/100) / 2 + 0.5,\n        1,\n      ];\n      return inputs;\n    });\n  });\n}\n\nfunction mouseDragged(){\n  moveCounter += 1;\n}\n\nfunction draw() {\n  background(255);\n  noStroke(255);\n  shader(myShader); // Apply the custom shader\n  plane(width, height); // Draw a plane with the shader applied\n}</code></pre><p>p5.strands functions are special, since they get turned into a shader instead of being\nrun like the rest of your code. They only have access to p5.js functions, and variables\nyou declare inside the <code>modify</code> callback. If you need access to local variables, you\ncan pass them into <code>modify</code> with an optional second parameter, <code>variables</code>. These will\nthen be passed into your function as an argument. If you are\nusing instance mode, you will need to pass your sketch object in this way.</p>\n<p>If you are also using a build system for your sketch, variable names may be changed as\npart of minification. When creating a uniform, you can pass the name of the uniform in\nas a first parameter to ensure it doesn't get changed.</p>\n<pre><code class=\"language-js example\">new p5((sketch) =&gt; {\n  let myShader;\n\n  sketch.setup = function() {\n    sketch.createCanvas(200, 200, sketch.WEBGL);\n    myShader = sketch.baseMaterialShader().modify(({ sketch }) =&gt; {\n      let b = sketch.uniformFloat('b');\n      sketch.getPixelInputs((inputs) =&gt; {\n        inputs.color = [inputs.texCoord, b, 1];\n        return inputs;\n      });\n    }, { sketch });\n  }\n\n  sketch.draw = function() {\n    sketch.background(255);\n    sketch.noStroke();\n    myShader.setUniform('b', 0.5);\n    sketch.shader(myShader); // Apply the custom shader\n    sketch.plane(sketch.width, sketch.height); // Draw a plane with the shader applied\n  }\n});</code></pre><p>You can also write GLSL directly in <code>modify</code> if you need direct access. To do so,\n<code>modify()</code> takes one parameter, <code>hooks</code>, an object with the hooks you want\nto override. Each key of the <code>hooks</code> object is the name\nof a hook, and the value is a string with the GLSL code for your hook.</p>\n<p>If you supply functions that aren't existing hooks, they will get added at the start of\nthe shader as helper functions so that you can use them in your hooks.</p>\n<p>To add new <a href=\"#/p5.Shader/setUniform\">uniforms</a> to your shader, you can pass in a <code>uniforms</code> object containing\nthe type and name of the uniform as the key, and a default value or function returning\na default value as its value. These will be automatically set when the shader is set\nwith <code>shader(yourShader)</code>.</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = baseMaterialShader().modify({\n    uniforms: {\n      'float time': () =&gt; millis() // Uniform for time\n    },\n    'Vertex getWorldInputs': `(Vertex inputs) {\n      inputs.position.y +=\n        20. * sin(time * 0.001 + inputs.position.x * 0.05);\n      return inputs;\n    }`\n  });\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader); // Apply the custom shader\n  lights();         // Enable lighting\n  noStroke();       // Disable stroke\n  fill('red');      // Set fill color to red\n  sphere(50);       // Draw a sphere with the shader applied\n}</code></pre><p>You can also add a <code>declarations</code> key, where the value is a GLSL string declaring\ncustom uniform variables, globals, and functions shared\nbetween hooks. To add declarations just in a vertex or fragment shader, add\n<code>vertexDeclarations</code> and <code>fragmentDeclarations</code> keys.</p>\n<pre><code class=\"language-js example\">let myShader;\n\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  myShader = baseMaterialShader().modify({\n    // Manually specifying a uniform\n    declarations: 'uniform float time;',\n    'Vertex getWorldInputs': `(Vertex inputs) {\n      inputs.position.y +=\n        20. * sin(time * 0.001 + inputs.position.x * 0.05);\n      return inputs;\n    }`\n  });\n}\n\nfunction draw() {\n  background(255);\n  shader(myShader);\n  myShader.setUniform('time', millis());\n  lights();\n  noStroke();\n  fill('red');\n  sphere(50);\n}</code></pre>",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "A function with p5.strands code to modify the shader.",
              "type": "Function"
            },
            {
              "name": "variables",
              "description": "An optional object with local variables p5.strands\nshould have access to.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Shader"
          }
        },
        {
          "params": [
            {
              "name": "hooks",
              "description": "The hooks in the shader to replace.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "p5.Shader"
      },
      "class": "p5.Shader",
      "static": false,
      "module": "3D",
      "submodule": "Material",
      "beta": true
    },
    {
      "name": "copyToContext",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 641,
      "itemtype": "method",
      "description": "<p>Copies the shader from one drawing context to another.</p>\n<p>Each <code>p5.Shader</code> object must be compiled by calling\n<a href=\"#/p5/shader\">shader()</a> before it can run. Compilation happens\nin a drawing context which is usually the main canvas or an instance of\n<a href=\"#/p5.Graphics\">p5.Graphics</a>. A shader can only be used in the\ncontext where it was compiled. The <code>copyToContext()</code> method compiles the\nshader again and copies it to another drawing context where it can be\nreused.</p>\n<p>The parameter, <code>context</code>, is the drawing context where the shader will be\nused. The shader can be copied to an instance of\n<a href=\"#/p5.Graphics\">p5.Graphics</a>, as in\n<code>myShader.copyToContext(pg)</code>. The shader can also be copied from a\n<a href=\"#/p5.Graphics\">p5.Graphics</a> object to the main canvas using\nthe <code>p5.instance</code> variable, as in <code>myShader.copyToContext(p5.instance)</code>.</p>\n<p>Note: A <a href=\"#/p5.Shader\">p5.Shader</a> object created with\n<a href=\"#/p5/createShader\">createShader()</a>,\n<a href=\"#/p5/createFilterShader\">createFilterShader()</a>, or\n<a href=\"#/p5/loadShader\">loadShader()</a>\ncan be used directly with a <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a>\nobject created with\n<a href=\"#/p5/createFramebuffer\">createFramebuffer()</a>. Both objects\nhave the same context as the main canvas.</p>\n",
      "example": [
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision mediump float;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec2 uv = vTexCoord;\n  vec3 color = vec3(uv.x, uv.y, min(uv.x + uv.y, 1.0));\n  gl_FragColor = vec4(color, 1.0);\\\n}\n`;\n\nlet pg;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Shader object.\n  let original = createShader(vertSrc, fragSrc);\n\n  // Compile the p5.Shader object.\n  shader(original);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(50, 50, WEBGL);\n\n  // Copy the original shader to the p5.Graphics object.\n  let copied = original.copyToContext(pg);\n\n  // Apply the copied shader to the p5.Graphics object.\n  pg.shader(copied);\n\n  // Style the display surface.\n  pg.noStroke();\n\n  // Add a display surface for the shader.\n  pg.plane(50, 50);\n\n  describe('A square with purple-blue gradient on its surface drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the p5.Graphics object to the main canvas.\n  image(pg, -25, -25);\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision mediump float;\n\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec2 uv = vTexCoord;\n  vec3 color = vec3(uv.x, uv.y, min(uv.x + uv.y, 1.0));\n  gl_FragColor = vec4(color, 1.0);\n}\n`;\n\nlet copied;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Graphics object.\n  let pg = createGraphics(25, 25, WEBGL);\n\n  // Create a p5.Shader object.\n  let original = pg.createShader(vertSrc, fragSrc);\n\n  // Compile the p5.Shader object.\n  pg.shader(original);\n\n  // Copy the original shader to the main canvas.\n  copied = original.copyToContext(p5.instance);\n\n  // Apply the copied shader to the main canvas.\n  shader(copied);\n\n  describe('A rotating cube with a purple-blue gradient on its surface drawn against a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Rotate around the x-, y-, and z-axes.\n  rotateX(frameCount * 0.01);\n  rotateY(frameCount * 0.01);\n  rotateZ(frameCount * 0.01);\n\n  // Draw the box.\n  box(50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "context",
              "description": "WebGL context for the copied shader.",
              "type": "p5|p5.Graphics"
            }
          ],
          "return": {
            "description": "new shader compiled for the target context.",
            "type": "p5.Shader"
          }
        }
      ],
      "return": {
        "description": "new shader compiled for the target context.",
        "type": "p5.Shader"
      },
      "class": "p5.Shader",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "setUniform",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Shader.js",
      "line": 1015,
      "itemtype": "method",
      "description": "<p>Sets the shader’s uniform (global) variables.</p>\n<p>Shader programs run on the computer’s graphics processing unit (GPU).\nThey live in part of the computer’s memory that’s completely separate\nfrom the sketch that runs them. Uniforms are global variables within a\nshader program. They provide a way to pass values from a sketch running\non the CPU to a shader program running on the GPU.</p>\n<p>The first parameter, <code>uniformName</code>, is a string with the uniform’s name.\nFor the shader above, <code>uniformName</code> would be <code>'r'</code>.</p>\n<p>The second parameter, <code>data</code>, is the value that should be used to set the\nuniform. For example, calling <code>myShader.setUniform('r', 0.5)</code> would set\nthe <code>r</code> uniform in the shader above to <code>0.5</code>. data should match the\nuniform’s type. Numbers, strings, booleans, arrays, and many types of\nimages can all be passed to a shader with <code>setUniform()</code>.</p>\n",
      "example": [
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision mediump float;\n\nuniform float r;\n\nvoid main() {\n  gl_FragColor = vec4(r, 1.0, 1.0, 1.0);\n}\n`;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  let myShader = createShader(vertSrc, fragSrc);\n\n  // Apply the p5.Shader object.\n  shader(myShader);\n\n  // Set the r uniform to 0.5.\n  myShader.setUniform('r', 0.5);\n\n  // Style the drawing surface.\n  noStroke();\n\n  // Add a plane as a drawing surface for the shader.\n  plane(100, 100);\n\n  describe('A cyan square.');\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision mediump float;\n\nuniform float r;\n\nvoid main() {\n  gl_FragColor = vec4(r, 1.0, 1.0, 1.0);\n}\n`;\n\nlet myShader;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  myShader = createShader(vertSrc, fragSrc);\n\n  // Compile and apply the p5.Shader object.\n  shader(myShader);\n\n  describe('A square oscillates color between cyan and white.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the drawing surface.\n  noStroke();\n\n  // Update the r uniform.\n  let nextR = 0.5 * (sin(frameCount * 0.01) + 1);\n  myShader.setUniform('r', nextR);\n\n  // Add a plane as a drawing surface.\n  plane(100, 100);\n}",
        "// Note: A \"uniform\" is a global variable within a shader program.\n\n// Create a string with the vertex shader program.\n// The vertex shader is called for each vertex.\nlet vertSrc = `\nprecision highp float;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vTexCoord = aTexCoord;\n  vec4 positionVec4 = vec4(aPosition, 1.0);\n  gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n`;\n\n// Create a string with the fragment shader program.\n// The fragment shader is called for each pixel.\nlet fragSrc = `\nprecision highp float;\nuniform vec2 p;\nuniform float r;\nconst int numIterations = 500;\nvarying vec2 vTexCoord;\n\nvoid main() {\n  vec2 c = p + gl_FragCoord.xy * r;\n  vec2 z = c;\n  float n = 0.0;\n\n  for (int i = numIterations; i > 0; i--) {\n    if (z.x * z.x + z.y * z.y > 4.0) {\n      n = float(i) / float(numIterations);\n      break;\n    }\n\n    z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + c;\n  }\n\n  gl_FragColor = vec4(\n    0.5 - cos(n * 17.0) / 2.0,\n    0.5 - cos(n * 13.0) / 2.0,\n    0.5 - cos(n * 23.0) / 2.0,\n    1.0\n  );\n}\n`;\n\nlet mandelbrot;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Shader object.\n  mandelbrot = createShader(vertSrc, fragSrc);\n\n  // Compile and apply the p5.Shader object.\n  shader(mandelbrot);\n\n  // Set the shader uniform p to an array.\n  // p is the center point of the Mandelbrot image.\n  mandelbrot.setUniform('p', [-0.74364388703, 0.13182590421]);\n\n  describe('A fractal image zooms in and out of focus.');\n}\n\nfunction draw() {\n  // Set the shader uniform r to a value that oscillates\n  // between 0 and 0.005.\n  // r is the size of the image in Mandelbrot-space.\n  let radius = 0.005 * (sin(frameCount * 0.01) + 1);\n  mandelbrot.setUniform('r', radius);\n\n  // Style the drawing surface.\n  noStroke();\n\n  // Add a plane as a drawing surface.\n  plane(100, 100);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "uniformName",
              "description": "name of the uniform. Must match the name\nused in the vertex and fragment shaders.",
              "type": "String"
            },
            {
              "name": "data",
              "description": "value to assign to the uniform. Must match the uniform’s data type.",
              "type": "Boolean|Number|Number[]|p5.Image|p5.Graphics|p5.MediaElement|p5.Texture"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Shader",
      "static": false,
      "module": "3D",
      "submodule": "Material"
    },
    {
      "name": "addRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 81,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "<p>Use <a href=\"/reference/p5.Table/addRow/\">addRow()</a> to add a new row of data to a <a href=\"#/p5.Table\">p5.Table</a> object. By default,\nan empty row is created. Typically, you would store a reference to\nthe new row in a TableRow object (see newRow in the example above),\nand then set individual values using <a href=\"#/p5/set\">set()</a>.</p>\n<p>If a <a href=\"#/p5.TableRow\">p5.TableRow</a> object is included as a parameter, then that row is\nduplicated and added to the table.</p>\n",
      "example": [
        "// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nasync function setup() {\n  // Create a 300x300 canvas\n  createCanvas(300, 300);\n\n  // Load the CSV file from the assets folder with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Add a new row for \"Wolf\"\n  let newRow = table.addRow();\n  newRow.setString('id', table.getRowCount() - 1);\n  newRow.setString('species', 'Canis Lupus');\n    newRow.setString('name', 'Wolf');\n\n  // Set text properties\n  fill(0);       // Text color: black\n   textSize(12);  // Adjust text size as needed\n\n  // Display the table data on the canvas\n  // Each cell is positioned based on its row and column\n  for (let r = 0; r < table.getRowCount(); r++) {\n    for (let c = 0; c < table.getColumnCount(); c++) {\n      let x = c * 50 + 10;  // Horizontal spacing for each column\n      let y = r * 30 + 20;  // Vertical spacing for each row\n      text(table.getString(r, c), x * c, y);\n    }\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row to be added to the table",
              "optional": 1,
              "type": "p5.TableRow"
            }
          ],
          "return": {
            "description": "the row that was added",
            "type": "p5.TableRow"
          }
        }
      ],
      "return": {
        "description": "the row that was added",
        "type": "p5.TableRow"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "removeRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 133,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Removes a row from the table object.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n   table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Remove the first row from the table\n  table.removeRow(0);\n\n  // Set text properties for drawing on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n\n  // Display the table values on the canvas:\n  // Each row's cell values are joined into a single string and drawn on a new line.\n  let y = 20; // Starting vertical position\n  for (let r = 0; r < table.getRowCount(); r++) {\n    let rowText = \"\";\n    for (let c = 0; c < table.getColumnCount(); c++) {\n      rowText += table.getString(r, c) + \" \";\n    }\n    text(rowText, 18, y * 3);\n    y += 20;\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "id",
              "description": "ID number of the row to remove",
              "type": "Integer"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 174,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Returns a reference to the specified <a href=\"#/p5.TableRow\">p5.TableRow</a>. The reference\ncan then be used to get and set values of the selected row.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Get the row at index 1 (second row)\n  let row = table.getRow(1);\n\n  // Set text properties for drawing on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Set the text size\n\n  // Loop over each column in the row and display its value on the canvas\n  for (let c = 0; c < table.getColumnCount(); c++) {\n    text(row.getString(c), 10, 20 + c * 50 + 20);\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "rowID",
              "description": "ID number of the row to get",
              "type": "Integer"
            }
          ],
          "return": {
            "description": "<a href=\"#/p5.TableRow\">p5.TableRow</a> object",
            "type": "p5.TableRow"
          }
        }
      ],
      "return": {
        "description": "<a href=\"#/p5.TableRow\">p5.TableRow</a> object",
        "type": "p5.TableRow"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getRows",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 222,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Gets all rows from the table. Returns an array of <a href=\"#/p5.TableRow\">p5.TableRow</a>s.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  let rows = table.getRows();\n\n  // Warning: rows is an array of objects.\n  // Set the 'name' of each row to 'Unicorn'\n  for (let r = 0; r < rows.length; r++) {\n    rows[r].set('name', 'Unicorn');\n  }\n\n  // Set text properties\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n\n  // Display the modified table values on the canvas\n  // We'll join each row's values with a space and display each row on a new line.\n  let y = 20; // Starting y position\n  for (let r = 0; r < table.getRowCount(); r++) {\n    let rowText = \"\";\n    for (let c = 0; c < table.getColumnCount(); c++) {\n      rowText += table.getString(r, c) + \" \";\n    }\n    text(rowText, 10, y * 2);\n    y += 20; // Move to next line\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "Array of <a href=\"#/p5.TableRow\">p5.TableRow</a>s",
            "type": "p5.TableRow[]"
          }
        }
      ],
      "return": {
        "description": "Array of <a href=\"#/p5.TableRow\">p5.TableRow</a>s",
        "type": "p5.TableRow[]"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "findRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 264,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Finds the first row in the Table that contains the value\nprovided, and returns a reference to that row. Even if\nmultiple rows are possible matches, only the first matching\nrow is returned. The column to search may be specified by\neither its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 100x100 canvas\n  createCanvas(100, 100);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n   // Find the row with the animal named \"Zebra\"\n  let row = table.findRow('Zebra', 'name');\n\n  // Get the species from the found row\n  let species = row.getString('species');\n\n  // Set text properties and display the species on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n  text(species, 10, 30);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "The value to match",
              "type": "String"
            },
            {
              "name": "column",
              "description": "ID number or title of the\ncolumn to search",
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "",
            "type": "p5.TableRow"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "p5.TableRow"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "findRows",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 327,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Finds the rows in the Table that contain the value\nprovided, and returns references to those rows. Returns an\nArray, so for must be used to iterate through all the rows,\nas shown in the example above. The column to search may be\nspecified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Add another goat entry\n  let newRow = table.addRow();\n  newRow.setString('id', table.getRowCount() - 1);\n  newRow.setString('species', 'Scape Goat');\n  newRow.setString('name', 'Goat');\n\n  // Find rows where the name is \"Goat\"\n  let rows = table.findRows('Goat', 'name');\n\n  // Set text properties\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n\n  // Display the result on the canvas\n  text(rows.length + ' Goats found', 10, 30);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "value",
              "description": "The value to match",
              "type": "String"
            },
            {
              "name": "column",
              "description": "ID number or title of the\ncolumn to search",
              "type": "Integer|String"
            }
          ],
          "return": {
            "description": "An Array of TableRow objects",
            "type": "p5.TableRow[]"
          }
        }
      ],
      "return": {
        "description": "An Array of TableRow objects",
        "type": "p5.TableRow[]"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "matchRow",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 384,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Finds the first row in the Table that matches the regular\nexpression provided, and returns a reference to that row.\nEven if multiple rows are possible matches, only the first\nmatching row is returned. The column to search may be\nspecified by either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Search using the specified regex on column index 1 (species)\n  let mammal = table.matchRow(new RegExp('ant'), 1);\n  let species = mammal.getString(1);  // \"Panthera pardus\"\n\n  // Set text properties for drawing on the canvas\n  fill(0);       // Text color: black\n  textSize(12);  // Adjust text size as needed\n\n  // Display the species on the canvas\n  text(species, 10, 30);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "regexp",
              "description": "The regular expression to match",
              "type": "String|RegExp"
            },
            {
              "name": "column",
              "description": "The column ID (number) or\ntitle (string)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "TableRow object",
            "type": "p5.TableRow"
          }
        }
      ],
      "return": {
        "description": "TableRow object",
        "type": "p5.TableRow"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "matchRows",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 458,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Finds the rows in the Table that match the regular expression provided,\nand returns references to those rows. Returns an array, so for must be\nused to iterate through all the rows, as shown in the example. The\ncolumn to search may be specified by either its ID or title.",
      "example": [
        "let table;\n\nfunction setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Create a new p5.Table and add columns\n  table = new p5.Table();\n  table.addColumn('name');\n  table.addColumn('type');\n\n  // Add rows to the table\n  let newRow = table.addRow();\n  newRow.setString('name', 'Lion');\n  newRow.setString('type', 'Mammal');\n\n  newRow = table.addRow();\n  newRow.setString('name', 'Snake');\n  newRow.setString('type', 'Reptile');\n\n  newRow = table.addRow();\n  newRow.setString('name', 'Mosquito');\n  newRow.setString('type', 'Insect');\n\n  newRow = table.addRow();\n  newRow.setString('name', 'Lizard');\n  newRow.setString('type', 'Reptile');\n\n  // Search for rows where the \"type\" starts with \"R\"\n  let rows = table.matchRows('R.*', 'type');\n\n  // Set text properties for drawing on the canvas\n  fill(0);       // Text color: black\n  textSize(12);  // Text size\n\n  // Display each matching row on the canvas\n  let y = 20;\n  for (let i = 0; i < rows.length; i++) {\n    let output = rows[i].getString('name') + ': ' + rows[i].getString('type');\n    text(output, 10, y);\n    y += 20;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "regexp",
              "description": "The regular expression to match",
              "type": "String"
            },
            {
              "name": "column",
              "description": "The column ID (number) or\ntitle (string)",
              "optional": 1,
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "An Array of TableRow objects",
            "type": "p5.TableRow[]"
          }
        }
      ],
      "return": {
        "description": "An Array of TableRow objects",
        "type": "p5.TableRow[]"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getColumn",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 507,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves all values in the specified column, and returns them\nas an array. The column may be specified by either its ID or title.",
      "example": [
        "// META:norender\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nasync function setup() {\n  // The table is comma separated value \"csv\"\n  // and has a header specifying the columns labels.\n  table = await loadTable('assets/mammals.csv', 'csv', 'header');\n\n  //getColumn returns an array that can be printed directly\n  print(table.getColumn('species'));\n  //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "String or Number of the column to return",
              "type": "String|Number"
            }
          ],
          "return": {
            "description": "Array of column values",
            "type": "Array"
          }
        }
      ],
      "return": {
        "description": "Array of column values",
        "type": "Array"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "clearRows",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 559,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Removes all rows from a Table. While all rows are removed,\ncolumns and column titles are maintained.",
      "example": [
        "// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Clear all rows from the table\n  table.clearRows();\n\n  // Set text properties\n  fill(0);       // Text color: black\n  textSize(12);  // Adjust text size as needed\n\n  // Display the number of rows and columns on the canvas\n  text(table.getRowCount() + ' total rows in table', 10, 30);\n  text(table.getColumnCount() + ' total columns in table', 10, 60);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "addColumn",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 601,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Use <a href=\"/reference/p5.Table/addColumn/\">addColumn()</a> to add a new column to a <a href=\"#/p5.Table\">Table</a> object.\nTypically, you will want to specify a title, so the column\nmay be easily referenced later by name. (If no title is\nspecified, the new column's title will be null.)",
      "example": [
        "let table;\n\nasync function setup() {\n  createCanvas(300, 300);\n  table = await loadTable('/assets/mammals.csv', ',', 'header');\n\n  table.addColumn('carnivore');\n  table.set(0, 'carnivore', 'no');\n  table.set(1, 'carnivore', 'yes');\n  table.set(2, 'carnivore', 'no');\n\n  fill(0);      // Set text color to black\n  textSize(11); // Adjust text size as needed\n\n  for (let r = 0; r < table.getRowCount(); r++) {\n    for (let c = 0; c < table.getColumnCount(); c++) {\n      // Keep column spacing consistent (e.g. 80 pixels apart).\n      let x = c * 80 + 10;\n      let y = r * 30 + 20;\n      // Use x directly, rather than multiplying by c again\n      text(table.getString(r, c), x, y);\n    }\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "title",
              "description": "title of the given column",
              "optional": 1,
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getColumnCount",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 632,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Returns the total number of columns in a Table.",
      "example": [
        "// given the cvs file \"blobs.csv\" in /assets directory\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nasync function setup() {\n  table = await loadTable('assets/blobs.csv');\n\n  createCanvas(200, 100);\n  textAlign(CENTER);\n  background(255);\n}\n\nfunction draw() {\n  let numOfColumn = table.getColumnCount();\n  text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "Number of columns in this table",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "Number of columns in this table",
        "type": "Integer"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getRowCount",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 662,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Returns the total number of rows in a Table.",
      "example": [
        "// given the cvs file \"blobs.csv\" in /assets directory\n//\n// ID, Name, Flavor, Shape, Color\n// Blob1, Blobby, Sweet, Blob, Pink\n// Blob2, Saddy, Savory, Blob, Blue\n\nlet table;\n\nasync function setup() {\n  table = await loadTable('assets/blobs.csv');\n\n  createCanvas(200, 100);\n  textAlign(CENTER);\n  background(255);\n}\n\nfunction draw() {\n  text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "Number of rows in this table",
            "type": "Integer"
          }
        }
      ],
      "return": {
        "description": "Number of rows in this table",
        "type": "Integer"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "removeTokens",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 702,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "<p>Removes any of the specified characters (or \"tokens\").</p>\n<p>If no column is specified, then the values in all columns and\nrows are processed. A specific column may be referenced by\neither its ID or title.</p>\n",
      "example": [
        "// META:norender\nfunction setup() {\n  let table = new p5.Table();\n\n  table.addColumn('name');\n  table.addColumn('type');\n\n  let newRow = table.addRow();\n  newRow.setString('name', '   $Lion  ,');\n  newRow.setString('type', ',,,Mammal');\n\n  newRow = table.addRow();\n  newRow.setString('name', '$Snake  ');\n  newRow.setString('type', ',,,Reptile');\n\n  table.removeTokens(',$ ');\n  print(table.getArray());\n}\n\n// prints:\n//  0  \"Lion\"   \"Mamal\"\n//  1  \"Snake\"  \"Reptile\""
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "chars",
              "description": "String listing characters to be removed",
              "type": "String"
            },
            {
              "name": "column",
              "description": "Column ID (number)\nor name (string)",
              "optional": 1,
              "type": "String|Integer"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "trim",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 770,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Trims leading and trailing whitespace, such as spaces and tabs,\nfrom String table values. If no column is specified, then the\nvalues in all columns and rows are trimmed. A specific column\nmay be referenced by either its ID or title.",
      "example": [
        "// META:norender\nfunction setup() {\n  let table = new p5.Table();\n\n  table.addColumn('name');\n  table.addColumn('type');\n\n  let newRow = table.addRow();\n  newRow.setString('name', '   Lion  ,');\n  newRow.setString('type', ' Mammal  ');\n\n  newRow = table.addRow();\n  newRow.setString('name', '  Snake  ');\n  newRow.setString('type', '  Reptile  ');\n\n  table.trim();\n  print(table.getArray());\n}\n\n// prints:\n//  0  \"Lion\"   \"Mamal\"\n//  1  \"Snake\"  \"Reptile\""
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "Column ID (number)\nor name (string)",
              "optional": 1,
              "type": "String|Integer"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "removeColumn",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 837,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Use <a href=\"/reference/p5.Table/removeColumn/\">removeColumn()</a> to remove an existing column from a Table\nobject. The column to be removed may be identified by either\nits title (a String) or its index value (an int).\nremoveColumn(0) would remove the first column, removeColumn(1)\nwould remove the second column, and so on.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 100x100 canvas\n  createCanvas(100, 100);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n   // Remove the \"id\" column\n   table.removeColumn('id');\n\n  // Get the remaining column count\n  let colCount = table.getColumnCount();\n\n  // Set text properties\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n\n  // Display the column count on the canvas\n  text(colCount, 40, 50);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "column",
              "description": "columnName (string) or ID (number)",
              "type": "String|Integer"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 907,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Update the first row: change species to \"Canis Lupus\" and name to \"Wolf\"\n  table.set(0, 'species', 'Canis Lupus');\n  table.set(0, 'name', 'Wolf');\n\n  // Set text properties for drawing on the canvas\n  fill(0);      // Text color: black\n   textSize(12); // Adjust text size as needed\n\n  // Display the table values on the canvas:\n  // Each row's values are concatenated into a single string and displayed on a new line.\n  let y = 20; // Starting vertical position\n  for (let r = 0; r < table.getRowCount(); r++) {\n    let rowText = \"\";\n    for (let c = 0; c < table.getColumnCount(); c++) {\n      rowText += table.getString(r, c) + \" \";\n    }\n    text(rowText, 10, y * 2.5);\n    y += 20;\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "column ID (Number)\nor title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "value to assign",
              "type": "String|Number"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "setNum",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 948,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a Float value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 100x100 canvas and set a white background\n  createCanvas(100, 100);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Set the value in row 1, column \"id\" to the number 1\n  table.setNum(1, 'id', 1);\n\n  // Get the first column as an array and join its values into a string for display.\n  let col0 = table.getColumn(0);  // Expected output: [\"0\", 1, \"2\"]\n  let output = col0.join(\", \");\n\n  // Set text properties and display the output on the canvas\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n  text(output, 30, 50);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "column ID (Number)\nor title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "value to assign",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "setString",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 998,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Stores a String value in the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified\nby either its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file from the assets folder with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Add a new row with the new animal data\n  let newRow = table.addRow();\n  newRow.setString('id', table.getRowCount() - 1);\n  newRow.setString('species', 'Canis Lupus');\n  newRow.setString('name', 'Wolf');\n\n  // Convert the table to a 2D array\n  let tableArray = table.getArray();\n\n  // Set text properties\n  fill(0);       // Set text color to black\n  textSize(12);  // Adjust text size as needed\n\n  // Display each row of the table on the canvas\n  let y = 20;  // Starting y position\n  for (let i = 0; i < tableArray.length; i++) {\n    // Join the values of each row with a comma separator\n    let rowText = tableArray[i].join(', ');\n    text(rowText, 15, y * 2);\n    y += 20;  // Increment y position for the next row\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "column ID (Number)\nor title (String)",
              "type": "String|Integer"
            },
            {
              "name": "value",
              "description": "value to assign",
              "type": "String"
            }
          ]
        }
      ],
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "get",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1039,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves a value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 100x100 canvas\n  createCanvas(100, 100);\n  background(255); // Set background to white\n\n  // Load the CSV file from the assets folder with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Set text properties for drawing on the canvas\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n\n  // Get the values from the table\n  let value1 = table.get(0, 1);       // Using column index (1) => \"Capra hircus\"\n  let value2 = table.get(0, 'species'); // Using column name => \"Capra hircus\"\n\n  // Display the values on the canvas\n  text(value1, 10, 30);\n  text(value2, 10, 60);\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "",
            "type": "String|Number"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "String|Number"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getNum",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1080,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves a Float value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 100x100 canvas\n  createCanvas(100, 100);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Compute the result: id at row 1, column 0 plus 100 (i.e. 1 + 100 = 101)\n  let result = table.getNum(1, 0) + 100;\n\n  // Set text properties and display the result on the canvas\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n  text(result, 10, 30);  // Display the result at position (10, 30)\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "Number"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getString",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1134,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves a String value from the Table's specified row and column.\nThe row is specified by its ID, while the column may be specified by\neither its ID or title.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas\n  createCanvas(200, 200);\n  background(255); // Set background to white\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Set text properties\n  fill(0);      // Text color: black\n  textSize(12); // Adjust text size as needed\n\n  // Display each table cell value on the canvas one below the other.\n  // We use a variable 'y' to increment the vertical position.\n  let y = 20;\n  text(table.getString(0, 0), 10, y); // 0\n  y += 20;\n  text(table.getString(0, 1), 10, y); // Capra hircus\n  y += 20;\n  text(table.getString(0, 2), 10, y); // Goat\n  y += 20;\n  text(table.getString(1, 0), 10, y); // 1\n  y += 20;\n  text(table.getString(1, 1), 10, y); // Panthera pardus\n  y += 20;\n  text(table.getString(1, 2), 10, y); // Leopard\n  y += 20;\n  text(table.getString(2, 0), 10, y); // 2\n  y += 20;\n  text(table.getString(2, 1), 10, y); // Equus zebra\n  y += 20;\n  text(table.getString(2, 2), 10, y); // Zebra\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "row",
              "description": "row ID",
              "type": "Integer"
            },
            {
              "name": "column",
              "description": "columnName (string) or\nID (number)",
              "type": "String|Integer"
            }
          ],
          "return": {
            "description": "",
            "type": "String"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "String"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getObject",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1173,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves all table data and returns as an object. If a column name is\npassed in, each row object will be stored with that attribute as its\ntitle.",
      "example": [
        "// META:norender\n// Given the CSV file \"mammals.csv\"\n// in the project's \"assets\" folder:\n//\n// id,species,name\n// 0,Capra hircus,Goat\n// 1,Panthera pardus,Leopard\n// 2,Equus zebra,Zebra\n\nlet table;\n\nasync function setup() {\n  // The table is comma separated value \"csv\"\n  // and has a header specifying the columns labels.\n  table = await loadTable('assets/mammals.csv', 'csv', 'header');\n\n  let tableObject = table.getObject();\n\n  print(tableObject);\n  //outputs an object\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "headerColumn",
              "description": "Name of the column which should be used to\ntitle each row object (optional)",
              "optional": 1,
              "type": "String"
            }
          ],
          "return": {
            "description": "",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "Object"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "getArray",
      "file": "src/scripts/parsers/in/p5.js/src/io/p5.Table.js",
      "line": 1229,
      "deprecated": true,
      "deprecationMessage": "p5.Table will be removed in a future version of p5.js to make way for a new, friendlier version :)",
      "itemtype": "method",
      "description": "Retrieves all table data and returns it as a multidimensional array.",
      "example": [
        "let table;\n\nasync function setup() {\n  // Create a 200x200 canvas and set a white background\n  createCanvas(200, 200);\n  background(255);\n\n  // Load the CSV file with a header row\n  table = await loadTable('assets/mammals.csv', ',', 'header');\n\n  // Get the CSV data as a 2D array\n  let tableArray = table.getArray();\n\n  // Set text properties\n  fill(0);      // Set text color to black\n  textSize(12); // Adjust text size as needed\n\n  // Display each row of the CSV on the canvas\n  // Each row is displayed on a separate line\n  for (let i = 0; i < tableArray.length; i++) {\n    let rowText = tableArray[i].join(\", \");\n    text(rowText, 10, 20 + i * 50 + 30);\n  }\n\n  describe('no image displayed');\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "",
            "type": "Array"
          }
        }
      ],
      "return": {
        "description": "",
        "type": "Array"
      },
      "class": "p5.Table",
      "static": false,
      "module": "IO",
      "submodule": "Table"
    },
    {
      "name": "play",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 112,
      "itemtype": "method",
      "description": "Plays audio or video from a media element.",
      "example": [
        "let beat;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display a message.\n  text('Click to play', 50, 50);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"Click to play\" written in black on a gray background. A beat plays when the user clicks the square.');\n}\n\n// Play the beat when the user presses the mouse.\nfunction mousePressed() {\n  beat.play();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "stop",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 190,
      "itemtype": "method",
      "description": "<p>Stops a media element and sets its current time to 0.</p>\n<p>Calling <code>media.play()</code> will restart playing audio/video from the beginning.</p>\n",
      "example": [
        "let beat;\nlet isStopped = true;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"Click to start\" written in black on a gray background. The beat starts or stops when the user presses the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display different instructions based on playback.\n  if (isStopped === true) {\n    text('Click to start', 50, 50);\n  } else {\n    text('Click to stop', 50, 50);\n  }\n}\n\n// Adjust playback when the user presses the mouse.\nfunction mousePressed() {\n  if (isStopped === true) {\n    // If the beat is stopped, play it.\n    beat.play();\n    isStopped = false;\n  } else {\n    // If the beat is playing, stop it.\n    beat.stop();\n    isStopped = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "pause",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 246,
      "itemtype": "method",
      "description": "<p>Pauses a media element.</p>\n<p>Calling <code>media.play()</code> will resume playing audio/video from the moment it paused.</p>\n",
      "example": [
        "let beat;\nlet isPaused = true;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"Click to play\" written in black on a gray background. The beat plays or pauses when the user clicks the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display different instructions based on playback.\n  if (isPaused === true) {\n    text('Click to play', 50, 50);\n  } else {\n    text('Click to pause', 50, 50);\n  }\n}\n\n// Adjust playback when the user presses the mouse.\nfunction mousePressed() {\n  if (isPaused === true) {\n    // If the beat is paused,\n    // play it.\n    beat.play();\n    isPaused = false;\n  } else {\n    // If the beat is playing,\n    // pause it.\n    beat.pause();\n    isPaused = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "loop",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 299,
      "itemtype": "method",
      "description": "Plays the audio/video repeatedly in a loop.",
      "example": [
        "let beat;\nlet isLooping = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"Click to loop\" written in black on a gray background. A beat plays repeatedly in a loop when the user clicks. The beat stops when the user clicks again.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display different instructions based on playback.\n  if (isLooping === true) {\n    text('Click to stop', 50, 50);\n  } else {\n    text('Click to loop', 50, 50);\n  }\n}\n\n// Adjust playback when the user presses the mouse.\nfunction mousePressed() {\n  if (isLooping === true) {\n    // If the beat is looping, stop it.\n    beat.stop();\n    isLooping = false;\n  } else {\n    // If the beat is stopped, loop it.\n    beat.loop();\n    isLooping = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "noLoop",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 354,
      "itemtype": "method",
      "description": "<p>Stops the audio/video from playing in a loop.</p>\n<p>The media will stop when it finishes playing.</p>\n",
      "example": [
        "let beat;\nlet isPlaying = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  describe('The text \"Click to play\" written in black on a gray background. A beat plays when the user clicks. The beat stops when the user clicks again.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display different instructions based on playback.\n  if (isPlaying === true) {\n    text('Click to stop', 50, 50);\n  } else {\n    text('Click to play', 50, 50);\n  }\n}\n\n// Adjust playback when the user presses the mouse.\nfunction mousePressed() {\n  if (isPlaying === true) {\n    // If the beat is playing, stop it.\n    beat.stop();\n    isPlaying = false;\n  } else {\n    // If the beat is stopped, play it.\n    beat.play();\n    isPlaying = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "autoplay",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 432,
      "itemtype": "method",
      "description": "<p>Sets the audio/video to play once it's loaded.</p>\n<p>The parameter, <code>shouldAutoplay</code>, is optional. Calling\n<code>media.autoplay()</code> without an argument causes the media to play\nautomatically. If <code>true</code> is passed, as in <code>media.autoplay(true)</code>, the\nmedia will automatically play. If <code>false</code> is passed, as in\n<code>media.autoPlay(false)</code>, it won't play automatically.</p>\n",
      "example": [
        "let video;\n\nfunction setup() {\n  noCanvas();\n\n  // Call handleVideo() once the video loads.\n  video = createVideo('assets/fingers.mov', handleVideo);\n\n  describe('A video of fingers walking on a treadmill.');\n}\n\n// Set the video's size and play it.\nfunction handleVideo() {\n  video.size(100, 100);\n  video.autoplay();\n}",
        "function setup() {\n  noCanvas();\n\n  // Load a video, but don't play it automatically.\n  let video = createVideo('assets/fingers.mov', handleVideo);\n\n  // Play the video when the user clicks on it.\n  video.mousePressed(handlePress);\n\n  describe('An image of fingers on a treadmill. They start walking when the user double-clicks on them.');\n}\n\n// Set the video's size and playback mode.\nfunction handleVideo() {\n  video.size(100, 100);\n  video.autoplay(false);\n}\n\n// Play the video.\nfunction handleClick() {\n  video.play();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "shouldAutoplay",
              "description": "whether the element should autoplay.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "volume",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 509,
      "itemtype": "method",
      "description": "<p>Sets the audio/video volume.</p>\n<p>Calling <code>media.volume()</code> without an argument returns the current volume\nas a number in the range 0 (off) to 1 (maximum).</p>\n<p>The parameter, <code>val</code>, is optional. It's a number that sets the volume\nfrom 0 (off) to 1 (maximum). For example, calling <code>media.volume(0.5)</code>\nsets the volume to half of its maximum.</p>\n",
      "example": [
        "let dragon;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('The text \"Volume: V\" on a gray square with media controls beneath it. The number \"V\" oscillates between 0 and 1 as the music plays.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Produce a number between 0 and 1.\n  let n = 0.5 * sin(frameCount * 0.01) + 0.5;\n\n  // Use n to set the volume.\n  dragon.volume(n);\n\n  // Get the current volume and display it.\n  let v = dragon.volume();\n\n  // Round v to 1 decimal place for display.\n  v = round(v, 1);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the volume.\n  text(`Volume: ${v}`, 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current volume.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "val",
              "description": "volume between 0.0 and 1.0.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "current volume.",
        "type": "Number"
      },
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "speed",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 574,
      "itemtype": "method",
      "description": "<p>Sets the audio/video playback speed.</p>\n<p>The parameter, <code>val</code>, is optional. It's a number that sets the playback\nspeed. 1 plays the media at normal speed, 0.5 plays it at half speed, 2\nplays it at double speed, and so on. -1 plays the media at normal speed\nin reverse.</p>\n<p>Calling <code>media.speed()</code> returns the current speed as a number.</p>\n<p>Note: Not all browsers support backward playback. Even if they do,\nplayback might not be smooth.</p>\n",
      "example": [
        "let dragon;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('The text \"Speed: S\" on a gray square with media controls beneath it. The number \"S\" oscillates between 0 and 1 as the music plays.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Produce a number between 0 and 2.\n  let n = sin(frameCount * 0.01) + 1;\n\n  // Use n to set the playback speed.\n  dragon.speed(n);\n\n  // Get the current speed and display it.\n  let s = dragon.speed();\n\n  // Round s to 1 decimal place for display.\n  s = round(s, 1);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the speed.\n  text(`Speed: ${s}`, 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "current playback speed.",
            "type": "Number"
          }
        },
        {
          "params": [
            {
              "name": "speed",
              "description": "speed multiplier for playback.",
              "type": "Number"
            }
          ],
          "chainable": 1
        }
      ],
      "return": {
        "description": "current playback speed.",
        "type": "Number"
      },
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "time",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 667,
      "itemtype": "method",
      "description": "<p>Sets the media element's playback time.</p>\n<p>The parameter, <code>time</code>, is optional. It's a number that specifies the\ntime, in seconds, to jump to when playback begins.</p>\n<p>Calling <code>media.time()</code> without an argument returns the number of seconds\nthe audio/video has played.</p>\n<p>Note: Time resets to 0 when looping media restarts.</p>\n",
      "example": [
        "let dragon;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('The text \"S seconds\" on a gray square with media controls beneath it. The number \"S\" increases as the song plays.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get the current playback time.\n  let s = dragon.time();\n\n  // Round s to 1 decimal place for display.\n  s = round(s, 1);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the playback time.\n  text(`${s} seconds`, 50, 50);\n}",
        "let dragon;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  // Jump to 2 seconds to start.\n  dragon.time(2);\n\n  describe('The text \"S seconds\" on a gray square with media controls beneath it. The number \"S\" increases as the song plays.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Get the current playback time.\n  let s = dragon.time();\n\n  // Round s to 1 decimal place for display.\n  s = round(s, 1);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the playback time.\n  text(`${s} seconds`, 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "time",
              "description": "time to jump to (in seconds).",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "current time (in seconds).",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "current time (in seconds).",
        "type": "Number"
      },
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "duration",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 713,
      "itemtype": "method",
      "description": "Returns the audio/video's duration in seconds.",
      "example": [
        "let dragon;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('The text \"S seconds left\" on a gray square with media controls beneath it. The number \"S\" decreases as the song plays.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the time remaining.\n  let s = dragon.duration() - dragon.time();\n\n  // Round s to 1 decimal place for display.\n  s = round(s, 1);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display the time remaining.\n  text(`${s} seconds left`, 50, 50);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "duration (in seconds).",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "duration (in seconds).",
        "type": "Number"
      },
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "onended",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 889,
      "itemtype": "method",
      "description": "<p>Calls a function when the audio/video reaches the end of its playback.</p>\n<p>The element is passed as an argument to the callback function.</p>\n<p>Note: The function won't be called if the media is looping.</p>\n",
      "example": [
        "let beat;\nlet isPlaying = false;\nlet isDone = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  beat = createAudio('assets/beat.mp3');\n\n  // Call handleEnd() when the beat finishes.\n  beat.onended(handleEnd);\n\n  describe('The text \"Click to play\" written in black on a gray square. A beat plays when the user clicks. The text \"Done!\" appears when the beat finishes playing.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(16);\n\n  // Display different messages based on playback.\n  if (isDone === true) {\n    text('Done!', 50, 50);\n  } else if (isPlaying === false) {\n    text('Click to play', 50, 50);\n  } else {\n    text('Playing...', 50, 50);\n  }\n}\n\n// Play the beat when the user presses the mouse.\nfunction mousePressed() {\n  if (isPlaying === false) {\n    isPlaying = true;\n    beat.play();\n  }\n}\n\n// Set isDone when playback ends.\nfunction handleEnd() {\n  isDone = false;\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "function to call when playback ends.\nThe <code>p5.MediaElement</code> is passed as\nthe argument.",
              "type": "Function"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "connect",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 918,
      "itemtype": "method",
      "description": "<p>Sends the element's audio to an output.</p>\n<p>The parameter, <code>audioNode</code>, can be an <code>AudioNode</code> or an object from the\n<code>p5.sound</code> library.</p>\n<p>If no element is provided, as in <code>myElement.connect()</code>, the element\nconnects to the main output. All connections are removed by the\n<code>.disconnect()</code> method.</p>\n<p>Note: This method is meant to be used with the p5.sound.js addon library.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "audioNode",
              "description": "AudioNode from the Web Audio API,\nor an object from the p5.sound library",
              "type": "AudioNode|Object"
            }
          ]
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "disconnect",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 962,
      "itemtype": "method",
      "description": "<p>Disconnect all Web Audio routing, including to the main output.</p>\n<p>This is useful if you want to re-route the output through audio effects,\nfor example.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "showControls",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1001,
      "itemtype": "method",
      "description": "<p>Show the default\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement\" target=\"_blank\">HTMLMediaElement</a>\ncontrols.</p>\n<p>Note: The controls vary between web browsers.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  background('cornflowerblue');\n\n  // Style the text.\n  textAlign(CENTER);\n  textSize(50);\n\n  // Display a dragon.\n  text('🐉', 50, 50);\n\n  // Create a p5.MediaElement using createAudio().\n  let dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('A dragon emoji, 🐉, drawn in the center of a blue square. A song plays in the background. Audio controls are displayed beneath the canvas.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "hideControls",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1053,
      "itemtype": "method",
      "description": "Hide the default\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement\" target=\"_blank\">HTMLMediaElement</a>\ncontrols.",
      "example": [
        "let dragon;\nlet isHidden = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  dragon = createAudio('assets/lucky_dragons.mp3');\n\n  // Show the default media controls.\n  dragon.showControls();\n\n  describe('The text \"Double-click to hide controls\" written in the middle of a gray square. A song plays in the background. Audio controls are displayed beneath the canvas. The controls appear/disappear when the user double-clicks the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Style the text.\n  textAlign(CENTER);\n\n  // Display a different message when controls are hidden or shown.\n  if (isHidden === true) {\n    text('Double-click to show controls', 10, 20, 80, 80);\n  } else {\n    text('Double-click to hide controls', 10, 20, 80, 80);\n  }\n}\n\n// Show/hide controls based on a double-click.\nfunction doubleClicked() {\n  if (isHidden === true) {\n    dragon.showControls();\n    isHidden = false;\n  } else {\n    dragon.hideControls();\n    isHidden = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "addCue",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1104,
      "itemtype": "method",
      "description": "<p>Schedules a function to call when the audio/video reaches a specific time\nduring its playback.</p>\n<p>The first parameter, <code>time</code>, is the time, in seconds, when the function\nshould run. This value is passed to <code>callback</code> as its first argument.</p>\n<p>The second parameter, <code>callback</code>, is the function to call at the specified\ncue time.</p>\n<p>The third parameter, <code>value</code>, is optional and can be any type of value.\n<code>value</code> is passed to <code>callback</code>.</p>\n<p>Calling <code>media.addCue()</code> returns an ID as a string. This is useful for\nremoving the cue later.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  let beat = createAudio('assets/beat.mp3');\n\n  // Play the beat in a loop.\n  beat.loop();\n\n  // Schedule a few events.\n  beat.addCue(0, changeBackground, 'red');\n  beat.addCue(2, changeBackground, 'deeppink');\n  beat.addCue(4, changeBackground, 'orchid');\n  beat.addCue(6, changeBackground, 'lavender');\n\n  describe('A red square with a beat playing in the background. Its color changes every 2 seconds while the audio plays.');\n}\n\n// Change the background color.\nfunction changeBackground(c) {\n  background(c);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "time",
              "description": "cue time to run the callback function.",
              "type": "Number"
            },
            {
              "name": "callback",
              "description": "function to call at the cue time.",
              "type": "Function"
            },
            {
              "name": "value",
              "description": "object to pass as the argument to\n<code>callback</code>.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "id ID of this cue,\nuseful for <code>media.removeCue(id)</code>.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "id ID of this cue,\nuseful for <code>media.removeCue(id)</code>.",
        "type": "Number"
      },
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "removeCue",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1170,
      "itemtype": "method",
      "description": "Removes a callback based on its ID.",
      "example": [
        "let lavenderID;\nlet isRemoved = false;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.MediaElement using createAudio().\n  let beat = createAudio('assets/beat.mp3');\n\n  // Play the beat in a loop.\n  beat.loop();\n\n  // Schedule a few events.\n  beat.addCue(0, changeBackground, 'red');\n  beat.addCue(2, changeBackground, 'deeppink');\n  beat.addCue(4, changeBackground, 'orchid');\n\n  // Record the ID of the \"lavender\" callback.\n  lavenderID = beat.addCue(6, changeBackground, 'lavender');\n\n  describe('The text \"Double-click to remove lavender.\" written on a red square. The color changes every 2 seconds while the audio plays. The lavender option is removed when the user double-clicks the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display different instructions based on the available callbacks.\n  if (isRemoved === false) {\n    text('Double-click to remove lavender.', 10, 10, 80, 80);\n  } else {\n    text('No more lavender.', 10, 10, 80, 80);\n  }\n}\n\n// Change the background color.\nfunction changeBackground(c) {\n  background(c);\n}\n\n// Remove the lavender color-change cue when the user double-clicks.\nfunction doubleClicked() {\n  if (isRemoved === false) {\n    beat.removeCue(lavenderID);\n    isRemoved = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "id",
              "description": "ID of the cue, created by <code>media.addCue()</code>.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "clearCues",
      "file": "src/scripts/parsers/in/p5.js/src/dom/p5.MediaElement.js",
      "line": 1233,
      "itemtype": "method",
      "description": "Removes all functions scheduled with <code>media.addCue()</code>.",
      "example": [
        "let isChanging = true;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  background(200);\n\n  // Create a p5.MediaElement using createAudio().\n  let beat = createAudio('assets/beat.mp3');\n\n  // Play the beat in a loop.\n  beat.loop();\n\n  // Schedule a few events.\n  beat.addCue(0, changeBackground, 'red');\n  beat.addCue(2, changeBackground, 'deeppink');\n  beat.addCue(4, changeBackground, 'orchid');\n  beat.addCue(6, changeBackground, 'lavender');\n\n  describe('The text \"Double-click to stop changing.\" written on a square. The color changes every 2 seconds while the audio plays. The color stops changing when the user double-clicks the square.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display different instructions based on the available callbacks.\n  if (isChanging === true) {\n    text('Double-click to stop changing.', 10, 10, 80, 80);\n  } else {\n    text('No more changes.', 10, 10, 80, 80);\n  }\n}\n\n// Change the background color.\nfunction changeBackground(c) {\n  background(c);\n}\n\n// Remove cued functions and stop changing colors when the user\n// double-clicks.\nfunction doubleClicked() {\n  if (isChanging === true) {\n    beat.clearCues();\n    isChanging = false;\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.MediaElement",
      "static": false,
      "module": "DOM",
      "submodule": "DOM"
    },
    {
      "name": "calculateBoundingBox",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 167,
      "itemtype": "method",
      "description": "<p>Calculates the position and size of the smallest box that contains the geometry.</p>\n<p>A bounding box is the smallest rectangular prism that contains the entire\ngeometry. It's defined by the box's minimum and maximum coordinates along\neach axis, as well as the size (length) and offset (center).</p>\n<p>Calling <code>myGeometry.calculateBoundingBox()</code> returns an object with four\nproperties that describe the bounding box:</p>\n<pre><code class=\"language-js\">// Get myGeometry's bounding box.\nlet bbox = myGeometry.calculateBoundingBox();\n\n// Print the bounding box to the console.\nconsole.log(bbox);\n\n// {\n//  // The minimum coordinate along each axis.\n//  min: { x: -1, y: -2, z: -3 },\n//\n//  // The maximum coordinate along each axis.\n//  max: { x: 1, y: 2, z: 3},\n//\n//  // The size (length) along each axis.\n//  size: { x: 2, y: 4, z: 6},\n//\n//  // The offset (center) along each axis.\n//  offset: { x: 0, y: 0, z: 0}\n// }</code></pre>",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet particles;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a new p5.Geometry object with random spheres.\n  particles = buildGeometry(createParticles);\n\n  describe('Ten white spheres placed randomly against a gray background. A box encloses the spheres.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the particles.\n  noStroke();\n  fill(255);\n\n  // Draw the particles.\n  model(particles);\n\n  // Calculate the bounding box.\n  let bbox = particles.calculateBoundingBox();\n\n  // Translate to the bounding box's center.\n  translate(bbox.offset.x, bbox.offset.y, bbox.offset.z);\n\n  // Style the bounding box.\n  stroke(255);\n  noFill();\n\n  // Draw the bounding box.\n  box(bbox.size.x, bbox.size.y, bbox.size.z);\n}\n\nfunction createParticles() {\n  for (let i = 0; i < 10; i += 1) {\n    // Calculate random coordinates.\n    let x = randomGaussian(0, 15);\n    let y = randomGaussian(0, 15);\n    let z = randomGaussian(0, 15);\n\n    push();\n    // Translate to the particle's coordinates.\n    translate(x, y, z);\n    // Draw the particle.\n    sphere(3);\n    pop();\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "bounding box of the geometry.",
            "type": "Object"
          }
        }
      ],
      "return": {
        "description": "bounding box of the geometry.",
        "type": "Object"
      },
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "clearColors",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 311,
      "itemtype": "method",
      "description": "<p>Removes the geometry’s internal colors.</p>\n<p><code>p5.Geometry</code> objects can be created with \"internal colors\" assigned to\nvertices or the entire shape. When a geometry has internal colors,\n<a href=\"#/p5/fill\">fill()</a> has no effect. Calling\n<code>myGeometry.clearColors()</code> allows the\n<a href=\"#/p5/fill\">fill()</a> function to apply color to the geometry.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Geometry object.\n  // Set its internal color to red.\n  let myGeometry = buildGeometry(function() {\n    fill(255, 0, 0);\n    plane(20);\n  });\n\n  // Style the shape.\n  noStroke();\n\n  // Draw the p5.Geometry object (center).\n  model(myGeometry);\n\n  // Translate the origin to the bottom-right.\n  translate(25, 25, 0);\n\n  // Try to fill the geometry with green.\n  fill(0, 255, 0);\n\n  // Draw the geometry again (bottom-right).\n  model(myGeometry);\n\n  // Clear the geometry's colors.\n  myGeometry.clearColors();\n\n  // Fill the geometry with blue.\n  fill(0, 0, 255);\n\n  // Translate the origin up.\n  translate(0, -50, 0);\n\n  // Draw the geometry again (top-right).\n  model(myGeometry);\n\n  describe(\n    'Three squares drawn against a gray background. Red squares are at the center and the bottom-right. A blue square is at the top-right.'\n  );\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "flipU",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 607,
      "itemtype": "method",
      "description": "<p>Flips the geometry’s texture u-coordinates.</p>\n<p>In order for <a href=\"#/p5/texture\">texture()</a> to work, the geometry\nneeds a way to map the points on its surface to the pixels in a rectangular\nimage that's used as a texture. The geometry's vertex at coordinates\n<code>(x, y, z)</code> maps to the texture image's pixel at coordinates <code>(u, v)</code>.</p>\n<p>The <a href=\"#/p5.Geometry/uvs\">myGeometry.uvs</a> array stores the\n<code>(u, v)</code> coordinates for each vertex in the order it was added to the\ngeometry. Calling <code>myGeometry.flipU()</code> flips a geometry's u-coordinates\nso that the texture appears mirrored horizontally.</p>\n<p>For example, a plane's four vertices are added clockwise starting from the\ntop-left corner. Here's how calling <code>myGeometry.flipU()</code> would change a\nplane's texture coordinates:</p>\n<pre><code class=\"language-js\">// Print the original texture coordinates.\n// Output: [0, 0, 1, 0, 0, 1, 1, 1]\nconsole.log(myGeometry.uvs);\n\n// Flip the u-coordinates.\nmyGeometry.flipU();\n\n// Print the flipped texture coordinates.\n// Output: [1, 0, 0, 0, 1, 1, 0, 1]\nconsole.log(myGeometry.uvs);\n\n// Notice the swaps:\n// Top vertices: [0, 0, 1, 0] --&gt; [1, 0, 0, 0]\n// Bottom vertices: [0, 1, 1, 1] --&gt; [1, 1, 0, 1]</code></pre>",
      "example": [
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/laDefense.jpg');\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create p5.Geometry objects.\n  let geom1 = buildGeometry(createShape);\n  let geom2 = buildGeometry(createShape);\n\n  // Flip geom2's U texture coordinates.\n  geom2.flipU();\n\n  // Left (original).\n  push();\n  translate(-25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom1);\n  pop();\n\n  // Right (flipped).\n  push();\n  translate(25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom2);\n  pop();\n\n  describe(\n    'Two photos of a ceiling on a gray background. The photos are mirror images of each other.'\n  );\n}\n\nfunction createShape() {\n  plane(40);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "computeFaces",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 827,
      "itemtype": "method",
      "description": "<p>Computes the geometry's faces using its vertices.</p>\n<p>All 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to form triangles that\nare stitched together. Each triangular patch on the geometry's surface is\ncalled a face. <code>myGeometry.computeFaces()</code> performs the math needed to\ndefine each face based on the distances between vertices.</p>\n<p>The geometry's vertices are stored as <a href=\"#/p5.Vector\">p5.Vector</a>\nobjects in the <a href=\"#/p5.Geometry/vertices\">myGeometry.vertices</a>\narray. The geometry's first vertex is the\n<a href=\"#/p5.Vector\">p5.Vector</a> object at <code>myGeometry.vertices[0]</code>,\nits second vertex is <code>myGeometry.vertices[1]</code>, its third vertex is\n<code>myGeometry.vertices[2]</code>, and so on.</p>\n<p>Calling <code>myGeometry.computeFaces()</code> fills the\n<a href=\"#/p5.Geometry/faces\">myGeometry.faces</a> array with three-element\narrays that list the vertices that form each face. For example, a geometry\nmade from a rectangle has two faces because a rectangle is made by joining\ntwo triangles. <a href=\"#/p5.Geometry/faces\">myGeometry.faces</a> for a\nrectangle would be the two-dimensional array\n<code>[[0, 1, 2], [2, 1, 3]]</code>. The first face, <code>myGeometry.faces[0]</code>, is the\narray <code>[0, 1, 2]</code> because it's formed by connecting\n<code>myGeometry.vertices[0]</code>, <code>myGeometry.vertices[1]</code>,and\n<code>myGeometry.vertices[2]</code>. The second face, <code>myGeometry.faces[1]</code>, is the\narray <code>[2, 1, 3]</code> because it's formed by connecting\n<code>myGeometry.vertices[2]</code>, <code>myGeometry.vertices[1]</code>, and\n<code>myGeometry.vertices[3]</code>.</p>\n<p>Note: <code>myGeometry.computeFaces()</code> only works when geometries have four or more vertices.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = new p5.Geometry();\n\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(0, 40, 0);\n  let v3 = createVector(40, 0, 0);\n\n  // Add the vertices to myGeometry's vertices array.\n  myGeometry.vertices.push(v0, v1, v2, v3);\n\n  // Compute myGeometry's faces array.\n  myGeometry.computeFaces();\n\n  describe('A red square drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the shape.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object using a callback function.\n  myGeometry = new p5.Geometry(1, 1, createShape);\n\n  describe('A red square drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Style the shape.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(0, 40, 0);\n  let v3 = createVector(40, 0, 0);\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  this.vertices.push(v0, v1, v2, v3);\n\n  // Compute the faces array.\n  this.computeFaces();\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "computeNormals",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 1156,
      "itemtype": "method",
      "description": "<p>Calculates the normal vector for each vertex on the geometry.</p>\n<p>All 3D shapes are made by connecting sets of points called vertices. A\ngeometry's surface is formed by connecting vertices to create triangles\nthat are stitched together. Each triangular patch on the geometry's\nsurface is called a face. <code>myGeometry.computeNormals()</code> performs the\nmath needed to orient each face. Orientation is important for lighting\nand other effects.</p>\n<p>A face's orientation is defined by its normal vector which points out\nof the face and is normal (perpendicular) to the surface. Calling\n<code>myGeometry.computeNormals()</code> first calculates each face's normal vector.\nThen it calculates the normal vector for each vertex by averaging the\nnormal vectors of the faces surrounding the vertex. The vertex normals\nare stored as <a href=\"#/p5.Vector\">p5.Vector</a> objects in the\n<a href=\"#/p5.Geometry/vertexNormals\">myGeometry.vertexNormals</a> array.</p>\n<p>The first parameter, <code>shadingType</code>, is optional. Passing the constant\n<code>FLAT</code>, as in <code>myGeometry.computeNormals(FLAT)</code>, provides neighboring\nfaces with their own copies of the vertices they share. Surfaces appear\ntiled with flat shading. Passing the constant <code>SMOOTH</code>, as in\n<code>myGeometry.computeNormals(SMOOTH)</code>, makes neighboring faces reuse their\nshared vertices. Surfaces appear smoother with smooth shading. By\ndefault, <code>shadingType</code> is <code>FLAT</code>.</p>\n<p>The second parameter, <code>options</code>, is also optional. If an object with a\n<code>roundToPrecision</code> property is passed, as in\n<code>myGeometry.computeNormals(SMOOTH, { roundToPrecision: 5 })</code>, it sets the\nnumber of decimal places to use for calculations. By default,\n<code>roundToPrecision</code> uses 3 decimal places.</p>\n",
      "example": [
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(function() {\n    torus();\n  });\n\n  // Compute the vertex normals.\n  myGeometry.computeNormals();\n\n  describe(\n    \"A white torus drawn on a dark gray background. Red lines extend outward from the torus' vertices.\"\n  );\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(1);\n\n  // Style the helix.\n  stroke(0);\n\n  // Display the helix.\n  model(myGeometry);\n\n  // Style the normal vectors.\n  stroke(255, 0, 0);\n\n  // Iterate over the vertices and vertexNormals arrays.\n  for (let i = 0; i < myGeometry.vertices.length; i += 1) {\n\n    // Get the vertex p5.Vector object.\n    let v = myGeometry.vertices[i];\n\n    // Get the vertex normal p5.Vector object.\n    let n = myGeometry.vertexNormals[i];\n\n    // Calculate a point along the vertex normal.\n    let p = p5.Vector.mult(n, 5);\n\n    // Draw the vertex normal as a red line.\n    push();\n    translate(v);\n    line(0, 0, 0, p.x, p.y, p.z);\n    pop();\n  }\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object using a callback function.\n  myGeometry = new p5.Geometry();\n\n  // Create p5.Vector objects to position the vertices.\n  let v0 = createVector(-40, 0, 0);\n  let v1 = createVector(0, -40, 0);\n  let v2 = createVector(0, 40, 0);\n  let v3 = createVector(40, 0, 0);\n\n  // Add the vertices to the p5.Geometry object's vertices array.\n  myGeometry.vertices.push(v0, v1, v2, v3);\n\n  // Compute the faces array.\n  myGeometry.computeFaces();\n\n  // Compute the surface normals.\n  myGeometry.computeNormals();\n\n  describe('A red square drawn on a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Add a white point light.\n  pointLight(255, 255, 255, 0, 0, 10);\n\n  // Style the p5.Geometry object.\n  noStroke();\n  fill(255, 0, 0);\n\n  // Draw the p5.Geometry object.\n  model(myGeometry);\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(createShape);\n\n  // Compute normals using default (FLAT) shading.\n  myGeometry.computeNormals(FLAT);\n\n  describe('A white, helical structure drawn on a dark gray background. Its faces appear faceted.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(1);\n\n  // Style the helix.\n  noStroke();\n\n  // Display the helix.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create a helical shape.\n  beginShape();\n  for (let i = 0; i < TWO_PI * 3; i += 0.5) {\n    let x = 30 * cos(i);\n    let y = 30 * sin(i);\n    let z = map(i, 0, TWO_PI * 3, -40, 40);\n    vertex(x, y, z);\n  }\n  endShape();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(createShape);\n\n  // Compute normals using smooth shading.\n  myGeometry.computeNormals(SMOOTH);\n\n  describe('A white, helical structure drawn on a dark gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(1);\n\n  // Style the helix.\n  noStroke();\n\n  // Display the helix.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create a helical shape.\n  beginShape();\n  for (let i = 0; i < TWO_PI * 3; i += 0.5) {\n    let x = 30 * cos(i);\n    let y = 30 * sin(i);\n    let z = map(i, 0, TWO_PI * 3, -40, 40);\n    vertex(x, y, z);\n  }\n  endShape();\n}",
        "// Click and drag the mouse to view the scene from different angles.\n\nlet myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Geometry object.\n  myGeometry = buildGeometry(createShape);\n\n  // Create an options object.\n  let options = { roundToPrecision: 5 };\n\n  // Compute normals using smooth shading.\n  myGeometry.computeNormals(SMOOTH, options);\n\n  describe('A white, helical structure drawn on a dark gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Enable orbiting with the mouse.\n  orbitControl();\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate the coordinate system.\n  rotateX(1);\n\n  // Style the helix.\n  noStroke();\n\n  // Display the helix.\n  model(myGeometry);\n}\n\nfunction createShape() {\n  // Create a helical shape.\n  beginShape();\n  for (let i = 0; i < TWO_PI * 3; i += 0.5) {\n    let x = 30 * cos(i);\n    let y = 30 * sin(i);\n    let z = map(i, 0, TWO_PI * 3, -40, 40);\n    vertex(x, y, z);\n  }\n  endShape();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "shadingType",
              "description": "shading type. either FLAT or SMOOTH. Defaults to <code>FLAT</code>.",
              "optional": 1,
              "type": "FLAT|SMOOTH"
            },
            {
              "name": "options",
              "description": "shading options.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "chainable": 1
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "makeEdgesFromFaces",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 1345,
      "itemtype": "method",
      "description": "",
      "example": [
        "let tetrahedron;\nfunction setup() {\n  createCanvas(200, 200, WEBGL);\n  describe('A rotating tetrahedron');\n\n  tetrahedron = new p5.Geometry();\n\n  // Give each geometry a unique gid\n  tetrahedron.gid = 'tetrahedron';\n\n  // Add four points of the tetrahedron\n\n  let radius = 50;\n  // A 2D triangle:\n  tetrahedron.vertices.push(createVector(radius, 0, 0));\n  tetrahedron.vertices.push(createVector(radius, 0, 0).rotate(TWO_PI / 3));\n  tetrahedron.vertices.push(createVector(radius, 0, 0).rotate(TWO_PI * 2 / 3));\n  // Add a tip in the z axis:\n  tetrahedron.vertices.push(createVector(0, 0, radius));\n\n  // Create the four faces by connecting the sets of three points\n  tetrahedron.faces.push([0, 1, 2]);\n  tetrahedron.faces.push([0, 1, 3]);\n  tetrahedron.faces.push([0, 2, 3]);\n  tetrahedron.faces.push([1, 2, 3]);\n  tetrahedron.makeEdgesFromFaces();\n}\n\nfunction draw() {\n  background(200);\n  strokeWeight(2);\n  orbitControl();\n  rotateY(millis() * 0.001);\n  model(tetrahedron);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "normalize",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 1667,
      "itemtype": "method",
      "description": "<p>Transforms the geometry's vertices to fit snugly within a 100×100×100 box\ncentered at the origin.</p>\n<p>Calling <code>myGeometry.normalize()</code> translates the geometry's vertices so that\nthey're centered at the origin <code>(0, 0, 0)</code>. Then it scales the vertices so\nthat they fill a 100×100×100 box. As a result, small geometries will grow\nand large geometries will shrink.</p>\n<p>Note: <code>myGeometry.normalize()</code> only works when called in the\n<a href=\"#/p5/setup\">setup()</a> function.</p>\n",
      "example": [
        "let myGeometry;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a very small torus.\n  myGeometry = buildGeometry(function() {;\n    torus(1, 0.25);\n  });\n\n  // Normalize the torus so its vertices fill\n  // the range [-100, 100].\n  myGeometry.normalize();\n\n  describe('A white torus rotates slowly against a dark gray background.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Turn on the lights.\n  lights();\n\n  // Rotate around the y-axis.\n  rotateY(frameCount * 0.01);\n\n  // Style the torus.\n  noStroke();\n\n  // Draw the torus.\n  model(myGeometry);\n}"
      ],
      "overloads": [
        {
          "params": [],
          "chainable": 1
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "vertexProperty",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 1794,
      "itemtype": "method",
      "description": "<p>Sets the shader's vertex property or attribute variables.</p>\n<p>A vertex property, or vertex attribute, is a variable belonging to a vertex in a shader. p5.js provides some\ndefault properties, such as <code>aPosition</code>, <code>aNormal</code>, <code>aVertexColor</code>, etc. These are\nset using <a href=\"#/p5/vertex\">vertex()</a>, <a href=\"#/p5/normal\">normal()</a>\nand <a href=\"#/p5/fill\">fill()</a> respectively. Custom properties can also\nbe defined within <a href=\"#/p5/beginShape\">beginShape()</a> and\n<a href=\"#/p5/endShape\">endShape()</a>.</p>\n<p>The first parameter, <code>propertyName</code>, is a string with the property's name.\nThis is the same variable name which should be declared in the shader, as in\n<code>in vec3 aProperty</code>, similar to .<code>setUniform()</code>.</p>\n<p>The second parameter, <code>data</code>, is the value assigned to the shader variable. This value\nwill be pushed directly onto the Geometry object. There should be the same number\nof custom property values as vertices, this method should be invoked once for each\nvertex.</p>\n<p>The <code>data</code> can be a Number or an array of numbers. Tn the shader program the type\ncan be declared according to the WebGL specification. Common types include <code>float</code>,\n<code>vec2</code>, <code>vec3</code>, <code>vec4</code> or matrices.</p>\n<p>See also the global <a href=\"#/p5/vertexProperty\">vertexProperty()</a> function.</p>\n",
      "example": [
        "let geo;\n\nfunction cartesianToSpherical(x, y, z) {\n  let r = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2));\n  let theta = acos(z / r);\n  let phi = atan2(y, x);\n  return { theta, phi };\n}\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Modify the material shader to display roughness.\n  const myShader = baseMaterialShader().modify({\n    vertexDeclarations:`in float aRoughness;\n                        out float vRoughness;`,\n    fragmentDeclarations: 'in float vRoughness;',\n    'void afterVertex': `() {\n        vRoughness = aRoughness;\n    }`,\n    'vec4 combineColors': `(ColorComponents components) {\n            vec4 color = vec4(0.);\n            color.rgb += components.diffuse * components.baseColor * (1.0-vRoughness);\n            color.rgb += components.ambient * components.ambientColor;\n            color.rgb += components.specular * components.specularColor * (1.0-vRoughness);\n            color.a = components.opacity;\n            return color;\n    }`\n  });\n\n  // Create the Geometry object.\n  geo = buildGeometry(function() {\n    fill('hotpink');\n    sphere(45, 50, 50);\n  });\n\n  // Set the roughness value for every vertex.\n  for (let v of geo.vertices){\n\n    // convert coordinates to spherical coordinates\n    let spherical = cartesianToSpherical(v.x, v.y, v.z);\n\n    // Set the custom roughness vertex property.\n    let roughness = noise(spherical.theta*5, spherical.phi*5);\n    geo.vertexProperty('aRoughness', roughness);\n  }\n\n  // Use the custom shader.\n  shader(myShader);\n\n  describe('A rough pink sphere rotating on a blue background.');\n}\n\nfunction draw() {\n  // Set some styles and lighting\n  background('lightblue');\n  noStroke();\n\n  specularMaterial(255,125,100);\n  shininess(2);\n\n  directionalLight('white', -1, 1, -1);\n  ambientLight(320);\n\n  rotateY(millis()*0.001);\n\n  // Draw the geometry\n  model(geo);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "propertyName",
              "description": "the name of the vertex property.",
              "type": "String"
            },
            {
              "name": "data",
              "description": "the data tied to the vertex property.",
              "type": "Number|Number[]"
            },
            {
              "name": "size",
              "description": "optional size of each unit of data.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "flipV",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Geometry.js",
      "line": 695,
      "itemtype": "method",
      "description": "<p>Flips the geometry’s texture v-coordinates.</p>\n<p>In order for <a href=\"#/p5/texture\">texture()</a> to work, the geometry\nneeds a way to map the points on its surface to the pixels in a rectangular\nimage that's used as a texture. The geometry's vertex at coordinates\n<code>(x, y, z)</code> maps to the texture image's pixel at coordinates <code>(u, v)</code>.</p>\n<p>The <a href=\"#/p5.Geometry/uvs\">myGeometry.uvs</a> array stores the\n<code>(u, v)</code> coordinates for each vertex in the order it was added to the\ngeometry. Calling <code>myGeometry.flipV()</code> flips a geometry's v-coordinates\nso that the texture appears mirrored vertically.</p>\n<p>For example, a plane's four vertices are added clockwise starting from the\ntop-left corner. Here's how calling <code>myGeometry.flipV()</code> would change a\nplane's texture coordinates:</p>\n<pre><code class=\"language-js\">// Print the original texture coordinates.\n// Output: [0, 0, 1, 0, 0, 1, 1, 1]\nconsole.log(myGeometry.uvs);\n\n// Flip the v-coordinates.\nmyGeometry.flipV();\n\n// Print the flipped texture coordinates.\n// Output: [0, 1, 1, 1, 0, 0, 1, 0]\nconsole.log(myGeometry.uvs);\n\n// Notice the swaps:\n// Left vertices: [0, 0] &lt;--&gt; [1, 0]\n// Right vertices: [1, 0] &lt;--&gt; [1, 1]</code></pre>",
      "example": [
        "let img;\n\nasync function setup() {\n  img = await loadImage('assets/laDefense.jpg');\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create p5.Geometry objects.\n  let geom1 = buildGeometry(createShape);\n  let geom2 = buildGeometry(createShape);\n\n  // Flip geom2's V texture coordinates.\n  geom2.flipV();\n\n  // Left (original).\n  push();\n  translate(-25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom1);\n  pop();\n\n  // Right (flipped).\n  push();\n  translate(25, 0, 0);\n  texture(img);\n  noStroke();\n  model(geom2);\n  pop();\n\n  describe(\n    'Two photos of a ceiling on a gray background. The photos are mirror images of each other.'\n  );\n}\n\nfunction createShape() {\n  plane(40);\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Geometry",
      "static": false,
      "module": "Shape",
      "submodule": "3D Primitives"
    },
    {
      "name": "resize",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 176,
      "itemtype": "method",
      "description": "<p>Resizes the framebuffer to a given width and height.</p>\n<p>The parameters, <code>width</code> and <code>height</code>, set the dimensions of the\nframebuffer. For example, calling <code>myBuffer.resize(300, 500)</code> resizes\nthe framebuffer to 300×500 pixels, then sets <code>myBuffer.width</code> to 300\nand <code>myBuffer.height</code> 500.</p>\n",
      "example": [
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('A multicolor sphere on a white surface. The image grows larger or smaller when the user moves the mouse, revealing a gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw to the p5.Framebuffer object.\n  myBuffer.begin();\n  background(255);\n  normalMaterial();\n  sphere(20);\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object.\n  image(myBuffer, -50, -50);\n}\n\n// Resize the p5.Framebuffer object when the\n// user moves the mouse.\nfunction mouseMoved() {\n  myBuffer.resize(mouseX, mouseY);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "width",
              "description": "width of the framebuffer.",
              "type": "Number"
            },
            {
              "name": "height",
              "description": "height of the framebuffer.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "pixelDensity",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 272,
      "itemtype": "method",
      "description": "<p>Sets the framebuffer's pixel density or returns its current density.</p>\n<p>Computer displays are grids of little lights called pixels. A display's\npixel density describes how many pixels it packs into an area. Displays\nwith smaller pixels have a higher pixel density and create sharper\nimages.</p>\n<p>The parameter, <code>density</code>, is optional. If a number is passed, as in\n<code>myBuffer.pixelDensity(1)</code>, it sets the framebuffer's pixel density. By\ndefault, the framebuffer's pixel density will match that of the canvas\nwhere it was created. All canvases default to match the display's pixel\ndensity.</p>\n<p>Calling <code>myBuffer.pixelDensity()</code> without an argument returns its current\npixel density.</p>\n",
      "example": [
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe(\"A white circle on a gray canvas. The circle's edge become fuzzy while the user presses and holds the mouse.\");\n}\n\nfunction draw() {\n  // Draw to the p5.Framebuffer object.\n  myBuffer.begin();\n  background(200);\n  circle(0, 0, 40);\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object.\n  image(myBuffer, -50, -50);\n}\n\n// Decrease the pixel density when the user\n// presses the mouse.\nfunction mousePressed() {\n  myBuffer.pixelDensity(1);\n}\n\n// Increase the pixel density when the user\n// releases the mouse.\nfunction mouseReleased() {\n  myBuffer.pixelDensity(2);\n}",
        "let myBuffer;\nlet myFont;\n\nasync function setup() {\n  // Load a font and create a p5.Font object.\n  myFont = await loadFont('assets/inconsolata.otf');\n\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  // Get the p5.Framebuffer object's pixel density.\n  let d = myBuffer.pixelDensity();\n\n  // Style the text.\n  textAlign(CENTER, CENTER);\n  textFont(myFont);\n  textSize(16);\n  fill(0);\n\n  // Display the pixel density.\n  text(`Density: ${d}`, 0, 0);\n\n  describe(`The text \"Density: ${d}\" written in black on a gray background.`);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "density",
              "description": "pixel density to set.",
              "optional": 1,
              "type": "Number"
            }
          ],
          "return": {
            "description": "current pixel density.",
            "type": "Number"
          }
        }
      ],
      "return": {
        "description": "current pixel density.",
        "type": "Number"
      },
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "autoSized",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 337,
      "itemtype": "method",
      "description": "<p>Toggles the framebuffer's autosizing mode or returns the current mode.</p>\n<p>By default, the framebuffer automatically resizes to match the canvas\nthat created it. Calling <code>myBuffer.autoSized(false)</code> disables this\nbehavior and calling <code>myBuffer.autoSized(true)</code> re-enables it.</p>\n<p>Calling <code>myBuffer.autoSized()</code> without an argument returns <code>true</code> if\nthe framebuffer automatically resizes and <code>false</code> if not.</p>\n",
      "example": [
        "// Double-click to toggle the autosizing mode.\n\nlet myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('A multicolor sphere on a gray background. The image resizes when the user moves the mouse.');\n}\n\nfunction draw() {\n  background(50);\n\n  // Draw to the p5.Framebuffer object.\n  myBuffer.begin();\n  background(200);\n  normalMaterial();\n  sphere(width / 4);\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object.\n  image(myBuffer, -width / 2, -height / 2);\n}\n\n// Resize the canvas when the user moves the mouse.\nfunction mouseMoved() {\n  let w = constrain(mouseX, 0, 100);\n  let h = constrain(mouseY, 0, 100);\n  resizeCanvas(w, h);\n}\n\n// Toggle autoSizing when the user double-clicks.\n// Note: opened an issue to fix(?) this.\nfunction doubleClicked() {\n  let isAuto = myBuffer.autoSized();\n  myBuffer.autoSized(!isAuto);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "autoSized",
              "description": "whether to automatically resize the framebuffer to match the canvas.",
              "optional": 1,
              "type": "Boolean"
            }
          ],
          "return": {
            "description": "current autosize setting.",
            "type": "Boolean"
          }
        }
      ],
      "return": {
        "description": "current autosize setting.",
        "type": "Boolean"
      },
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "createCamera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 641,
      "itemtype": "method",
      "description": "<p>Creates a new\n<a href=\"#/p5.Camera\">p5.Camera</a> object to use with the framebuffer.</p>\n<p>The new camera is initialized with a default position <code>(0, 0, 800)</code> and a\ndefault perspective projection. Its properties can be controlled with\n<a href=\"#/p5.Camera\">p5.Camera</a> methods such as <code>myCamera.lookAt(0, 0, 0)</code>.</p>\n<p>Framebuffer cameras should be created between calls to\n<a href=\"#/p5.Framebuffer/begin\">myBuffer.begin()</a> and\n<a href=\"#/p5.Framebuffer/end\">myBuffer.end()</a> like so:</p>\n<pre><code class=\"language-js\">let myCamera;\n\nmyBuffer.begin();\n\n// Create the camera for the framebuffer.\nmyCamera = myBuffer.createCamera();\n\nmyBuffer.end();</code></pre><p>Calling <a href=\"#/p5/setCamera\">setCamera()</a> updates the\nframebuffer's projection using the camera.\n<a href=\"#/p5/resetMatrix\">resetMatrix()</a> must also be called for the\nview to change properly:</p>\n<pre><code class=\"language-js\">myBuffer.begin();\n\n// Set the camera for the framebuffer.\nsetCamera(myCamera);\n\n// Reset all transformations.\nresetMatrix();\n\n// Draw stuff...\n\nmyBuffer.end();</code></pre>",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet myBuffer;\nlet cam1;\nlet cam2;\nlet usingCam1 = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  // Create the cameras between begin() and end().\n  myBuffer.begin();\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = myBuffer.createCamera();\n\n  // Create the second camera.\n  // Place it at the top-left.\n  // Point it at the origin.\n  cam2 = myBuffer.createCamera();\n  cam2.setPosition(400, -400, 800);\n  cam2.lookAt(0, 0, 0);\n\n  myBuffer.end();\n\n  describe(\n    'A white cube on a gray background. The camera toggles between frontal and aerial views when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  // Draw to the p5.Framebuffer object.\n  myBuffer.begin();\n  background(200);\n\n  // Set the camera.\n  if (usingCam1 === true) {\n    setCamera(cam1);\n  } else {\n    setCamera(cam2);\n  }\n\n  // Reset all transformations.\n  resetMatrix();\n\n  // Draw the box.\n  box();\n\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object.\n  image(myBuffer, -50, -50);\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (usingCam1 === true) {\n    usingCam1 = false;\n  } else {\n    usingCam1 = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [],
          "return": {
            "description": "new camera.",
            "type": "p5.Camera"
          }
        }
      ],
      "return": {
        "description": "new camera.",
        "type": "p5.Camera"
      },
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "remove",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 712,
      "itemtype": "method",
      "description": "<p>Deletes the framebuffer from GPU memory.</p>\n<p>Calling <code>myBuffer.remove()</code> frees the GPU memory used by the framebuffer.\nThe framebuffer also uses a bit of memory on the CPU which can be freed\nlike so:</p>\n<pre><code class=\"language-js\">// Delete the framebuffer from GPU memory.\nmyBuffer.remove();\n\n// Delete the framebuffer from CPU memory.\nmyBuffer = undefined;</code></pre><p>Note: All variables that reference the framebuffer must be assigned\nthe value <code>undefined</code> to delete the framebuffer from CPU memory. If any\nvariable still refers to the framebuffer, then it won't be garbage\ncollected.</p>\n",
      "example": [
        "// Double-click to remove the p5.Framebuffer object.\n\nlet myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create an options object.\n  let options = { width: 60, height: 60 };\n\n  // Create a p5.Framebuffer object and\n  // configure it using options.\n  myBuffer = createFramebuffer(options);\n\n  describe('A white circle at the center of a dark gray square disappears when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display the p5.Framebuffer object if\n  // it's available.\n  if (myBuffer) {\n    // Draw to the p5.Framebuffer object.\n    myBuffer.begin();\n    background(100);\n    circle(0, 0, 20);\n    myBuffer.end();\n\n    image(myBuffer, -30, -30);\n  }\n}\n\n// Remove the p5.Framebuffer object when the\n// the user double-clicks.\nfunction doubleClicked() {\n  // Delete the framebuffer from GPU memory.\n  myBuffer.remove();\n\n  // Delete the framebuffer from CPU memory.\n  myBuffer = undefined;\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "begin",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 764,
      "itemtype": "method",
      "description": "<p>Begins drawing shapes to the framebuffer.</p>\n<p><code>myBuffer.begin()</code> and <a href=\"#/p5.Framebuffer/end\">myBuffer.end()</a>\nallow shapes to be drawn to the framebuffer. <code>myBuffer.begin()</code> begins\ndrawing to the framebuffer and\n<a href=\"#/p5.Framebuffer/end\">myBuffer.end()</a> stops drawing to the\nframebuffer. Changes won't be visible until the framebuffer is displayed\nas an image or texture.</p>\n",
      "example": [
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('An empty gray canvas. The canvas gets darker and a rotating, multicolor torus appears while the user presses and holds the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Start drawing to the p5.Framebuffer object.\n  myBuffer.begin();\n\n  background(50);\n  rotateY(frameCount * 0.01);\n  normalMaterial();\n  torus(30);\n\n  // Stop drawing to the p5.Framebuffer object.\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object while\n  // the user presses the mouse.\n  if (mouseIsPressed === true) {\n    image(myBuffer, -50, -50);\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "end",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 891,
      "itemtype": "method",
      "description": "<p>Stops drawing shapes to the framebuffer.</p>\n<p><a href=\"#/p5.Framebuffer/begin\">myBuffer.begin()</a> and <code>myBuffer.end()</code>\nallow shapes to be drawn to the framebuffer.\n<a href=\"#/p5.Framebuffer/begin\">myBuffer.begin()</a> begins drawing to\nthe framebuffer and <code>myBuffer.end()</code> stops drawing to the framebuffer.\nChanges won't be visible until the framebuffer is displayed as an image\nor texture.</p>\n",
      "example": [
        "let myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('An empty gray canvas. The canvas gets darker and a rotating, multicolor torus appears while the user presses and holds the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Start drawing to the p5.Framebuffer object.\n  myBuffer.begin();\n\n  background(50);\n  rotateY(frameCount * 0.01);\n  normalMaterial();\n  torus(30);\n\n  // Stop drawing to the p5.Framebuffer object.\n  myBuffer.end();\n\n  // Display the p5.Framebuffer object while\n  // the user presses the mouse.\n  if (mouseIsPressed === true) {\n    image(myBuffer, -50, -50);\n  }\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "draw",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 963,
      "itemtype": "method",
      "description": "<p>Draws to the framebuffer by calling a function that contains drawing\ninstructions.</p>\n<p>The parameter, <code>callback</code>, is a function with the drawing instructions\nfor the framebuffer. For example, calling <code>myBuffer.draw(myFunction)</code>\nwill call a function named <code>myFunction()</code> to draw to the framebuffer.\nDoing so has the same effect as the following:</p>\n<pre><code class=\"language-js\">myBuffer.begin();\nmyFunction();\nmyBuffer.end();</code></pre>",
      "example": [
        "// Click the canvas to display the framebuffer.\n\nlet myBuffer;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Framebuffer object.\n  myBuffer = createFramebuffer();\n\n  describe('An empty gray canvas. The canvas gets darker and a rotating, multicolor torus appears while the user presses and holds the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw to the p5.Framebuffer object.\n  myBuffer.draw(bagel);\n\n  // Display the p5.Framebuffer object while\n  // the user presses the mouse.\n  if (mouseIsPressed === true) {\n    image(myBuffer, -50, -50);\n  }\n}\n\n// Draw a rotating, multicolor torus.\nfunction bagel() {\n  background(50);\n  rotateY(frameCount * 0.01);\n  normalMaterial();\n  torus(30);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "callback",
              "description": "function that draws to the framebuffer.",
              "type": "Function"
            }
          ]
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "loadPixels",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1009,
      "itemtype": "method",
      "description": "<p>Loads the current value of each pixel in the framebuffer into its\n<a href=\"#/p5.Framebuffer/pixels\">pixels</a> array.</p>\n<p><code>myBuffer.loadPixels()</code> must be called before reading from or writing to\n<a href=\"#/p5.Framebuffer/pixels\">myBuffer.pixels</a>.</p>\n",
      "example": [
        "function setup() {\n  createCanvas(100, 100, WEBGL);\n\n  background(200);\n\n  // Create a p5.Framebuffer object.\n  let myBuffer = createFramebuffer();\n\n  // Load the pixels array.\n  myBuffer.loadPixels();\n\n  // Get the number of pixels in the\n  // top half of the framebuffer.\n  let numPixels = myBuffer.pixels.length / 2;\n\n  // Set the framebuffer's top half to pink.\n  for (let i = 0; i < numPixels; i += 4) {\n    myBuffer.pixels[i] = 255;\n    myBuffer.pixels[i + 1] = 102;\n    myBuffer.pixels[i + 2] = 204;\n    myBuffer.pixels[i + 3] = 255;\n  }\n\n  // Update the pixels array.\n  myBuffer.updatePixels();\n\n  // Draw the p5.Framebuffer object to the canvas.\n  image(myBuffer, -50, -50);\n\n  describe('A pink rectangle above a gray rectangle.');\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "get",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Framebuffer.js",
      "line": 1062,
      "itemtype": "method",
      "description": "<p>Gets a pixel or a region of pixels from the framebuffer.</p>\n<p><code>myBuffer.get()</code> is easy to use but it's not as fast as\n<a href=\"#/p5.Framebuffer/pixels\">myBuffer.pixels</a>. Use\n<a href=\"#/p5.Framebuffer/pixels\">myBuffer.pixels</a> to read many pixel\nvalues.</p>\n<p>The version of <code>myBuffer.get()</code> with no parameters returns the entire\nframebuffer as a a <a href=\"#/p5.Image\">p5.Image</a> object.</p>\n<p>The version of <code>myBuffer.get()</code> with two parameters interprets them as\ncoordinates. It returns an array with the <code>[R, G, B, A]</code> values of the\npixel at the given point.</p>\n<p>The version of <code>myBuffer.get()</code> with four parameters interprets them as\ncoordinates and dimensions. It returns a subsection of the framebuffer as\na <a href=\"#/p5.Image\">p5.Image</a> object. The first two parameters are\nthe coordinates for the upper-left corner of the subsection. The last two\nparameters are the width and height of the subsection.</p>\n",
      "example": [],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the pixel. Defaults to 0.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the pixel. Defaults to 0.",
              "type": "Number"
            },
            {
              "name": "w",
              "description": "width of the subsection to be returned.",
              "type": "Number"
            },
            {
              "name": "h",
              "description": "height of the subsection to be returned.",
              "type": "Number"
            }
          ],
          "return": {
            "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [],
          "return": {
            "description": "entire framebuffer as a <a href=\"#/p5.Image\">p5.Image</a> object.",
            "type": "p5.Image"
          }
        },
        {
          "params": [
            {
              "name": "x",
              "description": "",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "",
              "type": "Number"
            }
          ],
          "return": {
            "description": "color of the pixel at <code>(x, y)</code> as an array of color values <code>[R, G, B, A]</code>.",
            "type": "Number[]"
          }
        }
      ],
      "return": {
        "description": "subsection as a <a href=\"#/p5.Image\">p5.Image</a> object.",
        "type": "p5.Image"
      },
      "class": "p5.Framebuffer",
      "static": false,
      "module": "Rendering"
    },
    {
      "name": "perspective",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 185,
      "itemtype": "method",
      "description": "<p>Sets a perspective projection for the camera.</p>\n<p>In a perspective projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes. It’s applied by default in new\n<code>p5.Camera</code> objects.</p>\n<p><code>myCamera.perspective()</code> changes the camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.</p>\n<p>The first parameter, <code>fovy</code>, is the camera’s vertical field of view. It’s\nan angle that describes how tall or narrow a view the camera has. For\nexample, calling <code>myCamera.perspective(0.5)</code> sets the camera’s vertical\nfield of view to 0.5 radians. By default, <code>fovy</code> is calculated based on the\nsketch’s height and the camera’s default z-coordinate, which is 800. The\nformula for the default <code>fovy</code> is <code>2 * atan(height / 2 / 800)</code>.</p>\n<p>The second parameter, <code>aspect</code>, is the camera’s aspect ratio. It’s a number\nthat describes the ratio of the top plane’s width to its height. For\nexample, calling <code>myCamera.perspective(0.5, 1.5)</code> sets the camera’s field\nof view to 0.5 radians and aspect ratio to 1.5, which would make shapes\nappear thinner on a square canvas. By default, <code>aspect</code> is set to\n<code>width / height</code>.</p>\n<p>The third parameter, <code>near</code>, is the distance from the camera to the near\nplane. For example, calling <code>myCamera.perspective(0.5, 1.5, 100)</code> sets the\ncamera’s field of view to 0.5 radians, its aspect ratio to 1.5, and places\nthe near plane 100 pixels from the camera. Any shapes drawn less than 100\npixels from the camera won’t be visible. By default, <code>near</code> is set to\n<code>0.1 * 800</code>, which is 1/10th the default distance between the camera and\nthe origin.</p>\n<p>The fourth parameter, <code>far</code>, is the distance from the camera to the far\nplane. For example, calling <code>myCamera.perspective(0.5, 1.5, 100, 10000)</code>\nsets the camera’s field of view to 0.5 radians, its aspect ratio to 1.5,\nplaces the near plane 100 pixels from the camera, and places the far plane\n10,000 pixels from the camera. Any shapes drawn more than 10,000 pixels\nfrom the camera won’t be visible. By default, <code>far</code> is set to <code>10 * 800</code>,\nwhich is 10 times the default distance between the camera and the origin.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it at the top-right.\n  cam2.camera(400, -400, 800);\n\n  // Set its fovy to 0.2.\n  // Set its aspect to 1.5.\n  // Set its near to 600.\n  // Set its far to 1200.\n  cam2.perspective(0.2, 1.5, 600, 1200);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A white cube on a gray background. The camera toggles between a frontal view and a skewed aerial view when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the box.\n  box();\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}",
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it at the top-right.\n  cam2.camera(400, -400, 800);\n\n  // Set its fovy to 0.2.\n  // Set its aspect to 1.5.\n  // Set its near to 600.\n  // Set its far to 1200.\n  cam2.perspective(0.2, 1.5, 600, 1200);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A white cube moves left and right on a gray background. The camera toggles between a frontal and a skewed aerial view when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin left and right.\n  let x = 100 * sin(frameCount * 0.01);\n  translate(x, 0, 0);\n\n  // Draw the box.\n  box();\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "fovy",
              "description": "camera frustum vertical field of view. Defaults to\n<code>2 * atan(height / 2 / 800)</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "aspect",
              "description": "camera frustum aspect ratio. Defaults to\n<code>width / height</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "distance from the camera to the near clipping plane.\nDefaults to <code>0.1 * 800</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "distance from the camera to the far clipping plane.\nDefaults to <code>10 * 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "ortho",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 402,
      "itemtype": "method",
      "description": "<p>Sets an orthographic projection for the camera.</p>\n<p>In an orthographic projection, shapes with the same size always appear the\nsame size, regardless of whether they are near or far from the camera.</p>\n<p><code>myCamera.ortho()</code> changes the camera’s perspective by changing its viewing\nfrustum from a truncated pyramid to a rectangular prism. The frustum is the\nvolume of space that’s visible to the camera. The camera is placed in front\nof the frustum and views everything within the frustum. <code>myCamera.ortho()</code>\nhas six optional parameters to define the viewing frustum.</p>\n<p>The first four parameters, <code>left</code>, <code>right</code>, <code>bottom</code>, and <code>top</code>, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\n<code>myCamera.ortho(-100, 100, 200, -200)</code> creates a frustum that’s 200 pixels\nwide and 400 pixels tall. By default, these dimensions are set based on\nthe sketch’s width and height, as in\n<code>myCamera.ortho(-width / 2, width / 2, -height / 2, height / 2)</code>.</p>\n<p>The last two parameters, <code>near</code> and <code>far</code>, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\n<code>myCamera.ortho(-100, 100, 200, -200, 50, 1000)</code> creates a frustum that’s\n200 pixels wide, 400 pixels tall, starts 50 pixels from the camera, and\nends 1,000 pixels from the camera. By default, <code>near</code> and <code>far</code> are set to\n0 and <code>max(width, height) + 800</code>, respectively.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Apply an orthographic projection.\n  cam2.ortho();\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A row of white cubes against a gray background. The camera toggles between a perspective and an orthographic projection when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}",
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Apply an orthographic projection.\n  cam2.ortho();\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe('A row of white cubes slither like a snake against a gray background. The camera toggles between a perspective and an orthographic projection when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    push();\n    // Calculate the box's coordinates.\n    let x = 10 * sin(frameCount * 0.02 + i * 0.6);\n    let z = -40 * i;\n    // Translate the origin.\n    translate(x, 0, z);\n    // Draw the box.\n    box(10);\n    pop();\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "left",
              "description": "x-coordinate of the frustum’s left plane. Defaults to <code>-width / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "right",
              "description": "x-coordinate of the frustum’s right plane. Defaults to <code>width / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bottom",
              "description": "y-coordinate of the frustum’s bottom plane. Defaults to <code>height / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "top",
              "description": "y-coordinate of the frustum’s top plane. Defaults to <code>-height / 2</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "z-coordinate of the frustum’s near plane. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "z-coordinate of the frustum’s far plane. Defaults to <code>max(width, height) + 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "frustum",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 531,
      "itemtype": "method",
      "description": "<p>Sets the camera's frustum.</p>\n<p>In a frustum projection, shapes that are further from the camera appear\nsmaller than shapes that are near the camera. This technique, called\nforeshortening, creates realistic 3D scenes.</p>\n<p><code>myCamera.frustum()</code> changes the camera’s perspective by changing its\nviewing frustum. The frustum is the volume of space that’s visible to the\ncamera. The frustum’s shape is a pyramid with its top cut off. The camera\nis placed where the top of the pyramid should be and points towards the\nbase of the pyramid. It views everything within the frustum.</p>\n<p>The first four parameters, <code>left</code>, <code>right</code>, <code>bottom</code>, and <code>top</code>, set the\ncoordinates of the frustum’s sides, bottom, and top. For example, calling\n<code>myCamera.frustum(-100, 100, 200, -200)</code> creates a frustum that’s 200\npixels wide and 400 pixels tall. By default, these coordinates are set\nbased on the sketch’s width and height, as in\n<code>myCamera.frustum(-width / 20, width / 20, height / 20, -height / 20)</code>.</p>\n<p>The last two parameters, <code>near</code> and <code>far</code>, set the distance of the\nfrustum’s near and far plane from the camera. For example, calling\n<code>myCamera.frustum(-100, 100, 200, -200, 50, 1000)</code> creates a frustum that’s\n200 pixels wide, 400 pixels tall, starts 50 pixels from the camera, and ends\n1,000 pixels from the camera. By default, near is set to <code>0.1 * 800</code>, which\nis 1/10th the default distance between the camera and the origin. <code>far</code> is\nset to <code>10 * 800</code>, which is 10 times the default distance between the\ncamera and the origin.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Adjust the frustum.\n  // Center it.\n  // Set its width and height to 20 pixels.\n  // Place its near plane 300 pixels from the camera.\n  // Place its far plane 350 pixels from the camera.\n  cam2.frustum(-10, 10, -10, 10, 300, 350);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A row of white cubes against a gray background. The camera zooms in on one cube when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 600);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -40);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "left",
              "description": "x-coordinate of the frustum’s left plane. Defaults to <code>-width / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "right",
              "description": "x-coordinate of the frustum’s right plane. Defaults to <code>width / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "bottom",
              "description": "y-coordinate of the frustum’s bottom plane. Defaults to <code>height / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "top",
              "description": "y-coordinate of the frustum’s top plane. Defaults to <code>-height / 20</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "near",
              "description": "z-coordinate of the frustum’s near plane. Defaults to <code>0.1 * 800</code>.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "far",
              "description": "z-coordinate of the frustum’s far plane. Defaults to <code>10 * 800</code>.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "pan",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 750,
      "itemtype": "method",
      "description": "<p>Rotates the camera left and right.</p>\n<p>Panning rotates the camera without changing its position. The rotation\nhappens in the camera’s \"local\" space.</p>\n<p>The parameter, <code>angle</code>, is the angle the camera should rotate. Passing a\npositive angle, as in <code>myCamera.pan(0.001)</code>, rotates the camera to the\nright. Passing a negative angle, as in <code>myCamera.pan(-0.001)</code>, rotates the\ncamera to the left.</p>\n<p>Note: Angles are interpreted based on the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n",
      "example": [
        "let cam;\nlet delta = 0.001;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube goes in and out of view as the camera pans left and right.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Pan with the camera.\n  cam.pan(delta);\n\n  // Switch directions every 120 frames.\n  if (frameCount % 120 === 0) {\n    delta *= -1;\n  }\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "amount to rotate in the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "tilt",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 811,
      "itemtype": "method",
      "description": "<p>Rotates the camera up and down.</p>\n<p>Tilting rotates the camera without changing its position. The rotation\nhappens in the camera’s \"local\" space.</p>\n<p>The parameter, <code>angle</code>, is the angle the camera should rotate. Passing a\npositive angle, as in <code>myCamera.tilt(0.001)</code>, rotates the camera down.\nPassing a negative angle, as in <code>myCamera.tilt(-0.001)</code>, rotates the camera\nup.</p>\n<p>Note: Angles are interpreted based on the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.</p>\n",
      "example": [
        "let cam;\nlet delta = 0.001;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(0, 0, 0);\n\n  describe(\n    'A white cube on a gray background. The cube goes in and out of view as the camera tilts up and down.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Pan with the camera.\n  cam.tilt(delta);\n\n  // Switch directions every 120 frames.\n  if (frameCount % 120 === 0) {\n    delta *= -1;\n  }\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "angle",
              "description": "amount to rotate in the current\n<a href=\"#/p5/angleMode\">angleMode()</a>.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "lookAt",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 893,
      "itemtype": "method",
      "description": "<p>Points the camera at a location.</p>\n<p><code>myCamera.lookAt()</code> changes the camera’s orientation without changing its\nposition.</p>\n<p>The parameters, <code>x</code>, <code>y</code>, and <code>z</code>, are the coordinates in \"world\" space\nwhere the camera should point. For example, calling\n<code>myCamera.lookAt(10, 20, 30)</code> points the camera at the coordinates\n<code>(10, 20, 30)</code>.</p>\n",
      "example": [
        "// Double-click to look at a different cube.\n\nlet cam;\nlet isLookingLeft = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create a p5.Camera object.\n  cam = createCamera();\n\n  // Set the camera\n  setCamera(cam);\n\n  // Place the camera at the top-center.\n  cam.setPosition(0, -400, 800);\n\n  // Point the camera at the origin.\n  cam.lookAt(-30, 0, 0);\n\n  describe(\n    'A red cube and a blue cube on a gray background. The camera switches focus between the cubes when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Draw the box on the left.\n  push();\n  // Translate the origin to the left.\n  translate(-30, 0, 0);\n  // Style the box.\n  fill(255, 0, 0);\n  // Draw the box.\n  box(20);\n  pop();\n\n  // Draw the box on the right.\n  push();\n  // Translate the origin to the right.\n  translate(30, 0, 0);\n  // Style the box.\n  fill(0, 0, 255);\n  // Draw the box.\n  box(20);\n  pop();\n}\n\n// Change the camera's focus when the user double-clicks.\nfunction doubleClicked() {\n  if (isLookingLeft === true) {\n    cam.lookAt(30, 0, 0);\n    isLookingLeft = false;\n  } else {\n    cam.lookAt(-30, 0, 0);\n    isLookingLeft = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the position where the camera should look in \"world\" space.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the position where the camera should look in \"world\" space.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the position where the camera should look in \"world\" space.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "camera",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 1068,
      "itemtype": "method",
      "description": "<p>Sets the position and orientation of the camera.</p>\n<p><code>myCamera.camera()</code> allows objects to be viewed from different angles. It\nhas nine parameters that are all optional.</p>\n<p>The first three parameters, <code>x</code>, <code>y</code>, and <code>z</code>, are the coordinates of the\ncamera’s position in \"world\" space. For example, calling\n<code>myCamera.camera(0, 0, 0)</code> places the camera at the origin <code>(0, 0, 0)</code>. By\ndefault, the camera is placed at <code>(0, 0, 800)</code>.</p>\n<p>The next three parameters, <code>centerX</code>, <code>centerY</code>, and <code>centerZ</code> are the\ncoordinates of the point where the camera faces in \"world\" space. For\nexample, calling <code>myCamera.camera(0, 0, 0, 10, 20, 30)</code> places the camera\nat the origin <code>(0, 0, 0)</code> and points it at <code>(10, 20, 30)</code>. By default, the\ncamera points at the origin <code>(0, 0, 0)</code>.</p>\n<p>The last three parameters, <code>upX</code>, <code>upY</code>, and <code>upZ</code> are the components of\nthe \"up\" vector in \"local\" space. The \"up\" vector orients the camera’s\ny-axis. For example, calling\n<code>myCamera.camera(0, 0, 0, 10, 20, 30, 0, -1, 0)</code> places the camera at the\norigin <code>(0, 0, 0)</code>, points it at <code>(10, 20, 30)</code>, and sets the \"up\" vector\nto <code>(0, -1, 0)</code> which is like holding it upside-down. By default, the \"up\"\nvector is <code>(0, 1, 0)</code>.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it at the top-right: (1200, -600, 100)\n  // Point it at the row of boxes: (-10, -10, 400)\n  // Set its \"up\" vector to the default: (0, 1, 0)\n  cam2.camera(1200, -600, 100, -10, -10, 400, 0, 1, 0);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A row of white cubes against a gray background. The camera toggles between a frontal and an aerial view when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -30);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}",
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it at the right: (1200, 0, 100)\n  // Point it at the row of boxes: (-10, -10, 400)\n  // Set its \"up\" vector to the default: (0, 1, 0)\n  cam2.camera(1200, 0, 100, -10, -10, 400, 0, 1, 0);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A row of white cubes against a gray background. The camera toggles between a static frontal view and an orbiting view when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Update cam2's position.\n  let x = 1200 * cos(frameCount * 0.01);\n  let y = -600 * sin(frameCount * 0.01);\n  cam2.camera(x, y, 100, -10, -10, 400, 0, 1, 0);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -30);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate of the camera. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate of the camera. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate of the camera. Defaults to 800.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerX",
              "description": "x-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerY",
              "description": "y-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "centerZ",
              "description": "z-coordinate of the point the camera faces. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upX",
              "description": "x-component of the camera’s \"up\" vector. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upY",
              "description": "x-component of the camera’s \"up\" vector. Defaults to 1.",
              "optional": 1,
              "type": "Number"
            },
            {
              "name": "upZ",
              "description": "z-component of the camera’s \"up\" vector. Defaults to 0.",
              "optional": 1,
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "move",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 1203,
      "itemtype": "method",
      "description": "<p>Moves the camera along its \"local\" axes without changing its orientation.</p>\n<p>The parameters, <code>x</code>, <code>y</code>, and <code>z</code>, are the distances the camera should\nmove. For example, calling <code>myCamera.move(10, 20, 30)</code> moves the camera 10\npixels to the right, 20 pixels down, and 30 pixels backward in its \"local\"\nspace.</p>\n",
      "example": [
        "// Click the canvas to begin detecting key presses.\n\nlet cam;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam = createCamera();\n\n  // Place the camera at the top-right.\n  cam.setPosition(400, -400, 800);\n\n  // Point it at the origin.\n  cam.lookAt(0, 0, 0);\n\n  // Set the camera.\n  setCamera(cam);\n\n  describe(\n    'A white cube drawn against a gray background. The cube appears to move when the user presses certain keys.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Move the camera along its \"local\" axes\n  // when the user presses certain keys.\n\n  // Move horizontally.\n  if (keyIsDown(LEFT_ARROW)) {\n    cam.move(-1, 0, 0);\n  }\n  if (keyIsDown(RIGHT_ARROW)) {\n    cam.move(1, 0, 0);\n  }\n\n  // Move vertically.\n  if (keyIsDown(UP_ARROW)) {\n    cam.move(0, -1, 0);\n  }\n  if (keyIsDown(DOWN_ARROW)) {\n    cam.move(0, 1, 0);\n  }\n\n  // Move in/out of the screen.\n  if (keyIsDown('i')) {\n    cam.move(0, 0, -1);\n  }\n  if (keyIsDown('o')) {\n    cam.move(0, 0, 1);\n  }\n\n  // Draw the box.\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "distance to move along the camera’s \"local\" x-axis.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "distance to move along the camera’s \"local\" y-axis.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "distance to move along the camera’s \"local\" z-axis.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "setPosition",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 1353,
      "itemtype": "method",
      "description": "<p>Sets the camera’s position in \"world\" space without changing its\norientation.</p>\n<p>The parameters, <code>x</code>, <code>y</code>, and <code>z</code>, are the coordinates where the camera\nshould be placed. For example, calling <code>myCamera.setPosition(10, 20, 30)</code>\nplaces the camera at coordinates <code>(10, 20, 30)</code> in \"world\" space.</p>\n",
      "example": [
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it closer to the origin.\n  cam2.setPosition(0, 0, 600);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A row of white cubes against a gray background. The camera toggles the amount of zoom when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -30);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}",
        "// Double-click to toggle between cameras.\n\nlet cam1;\nlet cam2;\nlet isDefaultCamera = true;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam1 = createCamera();\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Place it closer to the origin.\n  cam2.setPosition(0, 0, 600);\n\n  // Set the current camera to cam1.\n  setCamera(cam1);\n\n  describe(\n    'A row of white cubes against a gray background. The camera toggles between a static view and a view that zooms in and out when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Update cam2's z-coordinate.\n  let z = 100 * sin(frameCount * 0.01) + 700;\n  cam2.setPosition(0, 0, z);\n\n  // Translate the origin toward the camera.\n  translate(-10, 10, 500);\n\n  // Rotate the coordinate system.\n  rotateY(-0.1);\n  rotateX(-0.1);\n\n  // Draw the row of boxes.\n  for (let i = 0; i < 6; i += 1) {\n    translate(0, 0, -30);\n    box(10);\n  }\n}\n\n// Toggle the current camera when the user double-clicks.\nfunction doubleClicked() {\n  if (isDefaultCamera === true) {\n    setCamera(cam2);\n    isDefaultCamera = false;\n  } else {\n    setCamera(cam1);\n    isDefaultCamera = true;\n  }\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "x",
              "description": "x-coordinate in \"world\" space.",
              "type": "Number"
            },
            {
              "name": "y",
              "description": "y-coordinate in \"world\" space.",
              "type": "Number"
            },
            {
              "name": "z",
              "description": "z-coordinate in \"world\" space.",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "set",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 1427,
      "itemtype": "method",
      "description": "<p>Sets the camera’s position, orientation, and projection by copying another\ncamera.</p>\n<p>The parameter, <code>cam</code>, is the <code>p5.Camera</code> object to copy. For example, calling\n<code>cam2.set(cam1)</code> will set <code>cam2</code> using <code>cam1</code>’s configuration.</p>\n",
      "example": [
        "// Double-click to \"reset\" the camera zoom.\n\nlet cam1;\nlet cam2;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the first camera.\n  cam1 = createCamera();\n\n  // Place the camera at the top-right.\n  cam1.setPosition(400, -400, 800);\n\n  // Point it at the origin.\n  cam1.lookAt(0, 0, 0);\n\n  // Create the second camera.\n  cam2 = createCamera();\n\n  // Copy cam1's configuration.\n  cam2.set(cam1);\n\n  // Set the camera.\n  setCamera(cam2);\n\n  describe(\n    'A white cube drawn against a gray background. The camera slowly moves forward. The camera resets when the user double-clicks.'\n  );\n}\n\nfunction draw() {\n  background(200);\n\n  // Update cam2's position.\n  cam2.move(0, 0, -1);\n\n  // Draw the box.\n  box();\n}\n\n// \"Reset\" the camera when the user double-clicks.\nfunction doubleClicked() {\n  cam2.set(cam1);\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "cam",
              "description": "camera to copy.",
              "type": "p5.Camera"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "slerp",
      "file": "src/scripts/parsers/in/p5.js/src/webgl/p5.Camera.js",
      "line": 1521,
      "itemtype": "method",
      "description": "<p>Sets the camera’s position and orientation to values that are in-between\nthose of two other cameras.</p>\n<p><code>myCamera.slerp()</code> uses spherical linear interpolation to calculate a\nposition and orientation that’s in-between two other cameras. Doing so is\nhelpful for transitioning smoothly between two perspectives.</p>\n<p>The first two parameters, <code>cam0</code> and <code>cam1</code>, are the <code>p5.Camera</code> objects\nthat should be used to set the current camera.</p>\n<p>The third parameter, <code>amt</code>, is the amount to interpolate between <code>cam0</code> and\n<code>cam1</code>. 0.0 keeps the camera’s position and orientation equal to <code>cam0</code>’s,\n0.5 sets them halfway between <code>cam0</code>’s and <code>cam1</code>’s , and 1.0 sets the\nposition and orientation equal to <code>cam1</code>’s.</p>\n<p>For example, calling <code>myCamera.slerp(cam0, cam1, 0.1)</code> sets cam’s position\nand orientation very close to <code>cam0</code>’s. Calling\n<code>myCamera.slerp(cam0, cam1, 0.9)</code> sets cam’s position and orientation very\nclose to <code>cam1</code>’s.</p>\n<p>Note: All of the cameras must use the same projection.</p>\n",
      "example": [
        "let cam;\nlet cam0;\nlet cam1;\n\nfunction setup() {\n  createCanvas(100, 100, WEBGL);\n\n  // Create the main camera.\n  // Keep its default settings.\n  cam = createCamera();\n\n  // Create the first camera.\n  // Keep its default settings.\n  cam0 = createCamera();\n\n  // Create the second camera.\n  cam1 = createCamera();\n\n  // Place it at the top-right.\n  cam1.setPosition(400, -400, 800);\n\n  // Point it at the origin.\n  cam1.lookAt(0, 0, 0);\n\n  // Set the current camera to cam.\n  setCamera(cam);\n\n  describe('A white cube drawn against a gray background. The camera slowly oscillates between a frontal view and an aerial view.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Calculate the amount to interpolate between cam0 and cam1.\n  let amt = 0.5 * sin(frameCount * 0.01) + 0.5;\n\n  // Update the main camera's position and orientation.\n  cam.slerp(cam0, cam1, amt);\n\n  box();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "cam0",
              "description": "first camera.",
              "type": "p5.Camera"
            },
            {
              "name": "cam1",
              "description": "second camera.",
              "type": "p5.Camera"
            },
            {
              "name": "amt",
              "description": "amount of interpolation between 0.0 (<code>cam0</code>) and 1.0 (<code>cam1</code>).",
              "type": "Number"
            }
          ]
        }
      ],
      "class": "p5.Camera",
      "static": false,
      "module": "3D",
      "submodule": "Camera"
    },
    {
      "name": "reset",
      "file": "src/scripts/parsers/in/p5.js/src/core/p5.Graphics.js",
      "line": 232,
      "itemtype": "method",
      "description": "<p>Resets the graphics buffer's transformations and lighting.</p>\n<p>By default, the main canvas resets certain transformation and lighting\nvalues each time <a href=\"#/p5/draw\">draw()</a> executes. <code>p5.Graphics</code>\nobjects must reset these values manually by calling <code>myGraphics.reset()</code>.</p>\n",
      "example": [
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(60, 60);\n\n  describe('A white circle moves downward slowly within a dark square. The circle resets at the top of the dark square when the user presses the mouse.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the p5.Graphics object's coordinate system.\n  // The translation accumulates; the white circle moves.\n  pg.translate(0, 0.1);\n\n  // Draw to the p5.Graphics object.\n  pg.background(100);\n  pg.circle(30, 0, 10);\n\n  // Display the p5.Graphics object.\n  image(pg, 20, 20);\n\n  // Translate the main canvas' coordinate system.\n  // The translation doesn't accumulate; the dark\n  // square is always in the same place.\n  translate(0, 0.1);\n\n  // Reset the p5.Graphics object when the\n  // user presses the mouse.\n  if (mouseIsPressed === true) {\n    pg.reset();\n  }\n}",
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(60, 60);\n\n  describe('A white circle at the center of a dark gray square. The image is drawn on a light gray background.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Translate the p5.Graphics object's coordinate system.\n  pg.translate(30, 30);\n\n  // Draw to the p5.Graphics object.\n  pg.background(100);\n  pg.circle(0, 0, 10);\n\n  // Display the p5.Graphics object.\n  image(pg, 20, 20);\n\n  // Reset the p5.Graphics object automatically.\n  pg.reset();\n}",
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object using WebGL mode.\n  pg = createGraphics(100, 100, WEBGL);\n\n  describe(\"A sphere lit from above with a red light. The sphere's surface becomes glossy while the user clicks and holds the mouse.\");\n}\n\nfunction draw() {\n  background(200);\n\n  // Add a red point light from the top-right.\n  pg.pointLight(255, 0, 0, 50, -100, 50);\n\n  // Style the sphere.\n  // It should appear glossy when the\n  // lighting values are reset.\n  pg.noStroke();\n  pg.specularMaterial(255);\n  pg.shininess(100);\n\n  // Draw the sphere.\n  pg.sphere(30);\n\n  // Display the p5.Graphics object.\n  image(pg, -50, -50);\n\n  // Reset the p5.Graphics object when\n  // the user presses the mouse.\n  if (mouseIsPressed === true) {\n    pg.reset();\n  }\n}",
        "let pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object using WebGL mode.\n  pg = createGraphics(100, 100, WEBGL);\n\n  describe('A sphere with a glossy surface is lit from the top-right by a red light.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Add a red point light from the top-right.\n  pg.pointLight(255, 0, 0, 50, -100, 50);\n\n  // Style the sphere.\n  pg.noStroke();\n  pg.specularMaterial(255);\n  pg.shininess(100);\n\n  // Draw the sphere.\n  pg.sphere(30);\n\n  // Display the p5.Graphics object.\n  image(pg, 0, 0);\n\n  // Reset the p5.Graphics object automatically.\n  pg.reset();\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Graphics",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "remove",
      "file": "src/scripts/parsers/in/p5.js/src/core/p5.Graphics.js",
      "line": 295,
      "itemtype": "method",
      "description": "<p>Removes the graphics buffer from the web page.</p>\n<p>Calling <code>myGraphics.remove()</code> removes the graphics buffer's\n<code><canvas></code> element from the web page. The graphics buffer also uses\na bit of memory on the CPU that can be freed like so:</p>\n<pre><code class=\"language-js\">// Remove the graphics buffer from the web page.\nmyGraphics.remove();\n\n// Delete the graphics buffer from CPU memory.\nmyGraphics = undefined;</code></pre><p>Note: All variables that reference the graphics buffer must be assigned\nthe value <code>undefined</code> to delete the graphics buffer from CPU memory. If any\nvariable still refers to the graphics buffer, then it won't be garbage\ncollected.</p>\n",
      "example": [
        "// Double-click to remove the p5.Graphics object.\n\nlet pg;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object.\n  pg = createGraphics(60, 60);\n\n  // Draw to the p5.Graphics object.\n  pg.background(100);\n  pg.circle(30, 30, 20);\n\n  describe('A white circle at the center of a dark gray square disappears when the user double-clicks.');\n}\n\nfunction draw() {\n  background(200);\n\n  // Display the p5.Graphics object if\n  // it's available.\n  if (pg) {\n    image(pg, 20, 20);\n  }\n}\n\n// Remove the p5.Graphics object when the\n// the user double-clicks.\nfunction doubleClicked() {\n  // Remove the p5.Graphics object from the web page.\n  pg.remove();\n  pg = undefined;\n}"
      ],
      "overloads": [
        {
          "params": []
        }
      ],
      "class": "p5.Graphics",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "name": "createFramebuffer",
      "file": "src/scripts/parsers/in/p5.js/src/core/p5.Graphics.js",
      "line": 544,
      "itemtype": "method",
      "description": "<p>Creates a new <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object with\nthe same WebGL context as the graphics buffer.</p>\n<p><a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> objects are separate drawing\nsurfaces that can be used as textures in WebGL mode. They're similar to\n<a href=\"#/p5.Graphics\">p5.Graphics</a> objects and generally run much\nfaster when used as textures. Creating a\n<a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object in the same context\nas the graphics buffer makes this speedup possible.</p>\n<p>The parameter, <code>options</code>, is optional. An object can be passed to configure\nthe <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. The available\nproperties are:</p>\n<ul><li><code>format</code>: data format of the texture, either <code>UNSIGNED_BYTE</code>, <code>FLOAT</code>, or <code>HALF_FLOAT</code>. Default is <code>UNSIGNED_BYTE</code>.</li><li><code>channels</code>: whether to store <code>RGB</code> or <code>RGBA</code> color channels. Default is to match the graphics buffer which is <code>RGBA</code>.</li><li><code>depth</code>: whether to include a depth buffer. Default is <code>true</code>.</li><li><code>depthFormat</code>: data format of depth information, either <code>UNSIGNED_INT</code> or <code>FLOAT</code>. Default is <code>FLOAT</code>.</li><li><code>stencil</code>: whether to include a stencil buffer for masking. <code>depth</code> must be <code>true</code> for this feature to work. Defaults to the value of <code>depth</code> which is <code>true</code>.</li><li><code>antialias</code>: whether to perform anti-aliasing. If set to <code>true</code>, as in <code>{ antialias: true }</code>, 2 samples will be used by default. The number of samples can also be set, as in <code>{ antialias: 4 }</code>. Default is to match <a href=\"#/p5/setAttributes\">setAttributes()</a> which is <code>false</code> (<code>true</code> in Safari).</li><li><code>width</code>: width of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the graphics buffer width.</li><li><code>height</code>: height of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the graphics buffer height.</li><li><code>density</code>: pixel density of the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Default is to always match the graphics buffer pixel density.</li><li><code>textureFiltering</code>: how to read values from the <a href=\"#/p5.Framebuffer\">p5.Framebuffer</a> object. Either <code>LINEAR</code> (nearby pixels will be interpolated) or <code>NEAREST</code> (no interpolation). Generally, use <code>LINEAR</code> when using the texture as an image and <code>NEAREST</code> if reading the texture as data. Default is <code>LINEAR</code>.</li></ul><p>If the <code>width</code>, <code>height</code>, or <code>density</code> attributes are set, they won't\nautomatically match the graphics buffer and must be changed manually.</p>\n",
      "example": [
        "// Click and hold a mouse button to change shapes.\n\nlet pg;\nlet torusLayer;\nlet boxLayer;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create a p5.Graphics object using WebGL mode.\n  pg = createGraphics(100, 100, WEBGL);\n\n  // Create the p5.Framebuffer objects.\n  torusLayer = pg.createFramebuffer();\n  boxLayer = pg.createFramebuffer();\n\n  describe('A grid of white toruses rotating against a dark gray background. The shapes become boxes while the user holds a mouse button.');\n}\n\nfunction draw() {\n  // Update and draw the layers offscreen.\n  drawTorus();\n  drawBox();\n\n  // Choose the layer to display.\n  let layer;\n  if (mouseIsPressed === true) {\n    layer = boxLayer;\n  } else {\n    layer = torusLayer;\n  }\n\n  // Draw to the p5.Graphics object.\n  pg.background(50);\n\n  // Iterate from left to right.\n  for (let x = -50; x < 50; x += 25) {\n    // Iterate from top to bottom.\n    for (let y = -50; y < 50; y += 25) {\n      // Draw the layer to the p5.Graphics object\n      pg.image(layer, x, y, 25, 25);\n    }\n  }\n\n  // Display the p5.Graphics object.\n  image(pg, 0, 0);\n}\n\n// Update and draw the torus layer offscreen.\nfunction drawTorus() {\n  // Start drawing to the torus p5.Framebuffer.\n  torusLayer.begin();\n\n  // Clear the drawing surface.\n  pg.clear();\n\n  // Turn on the lights.\n  pg.lights();\n\n  // Rotate the coordinate system.\n  pg.rotateX(frameCount * 0.01);\n  pg.rotateY(frameCount * 0.01);\n\n  // Style the torus.\n  pg.noStroke();\n\n  // Draw the torus.\n  pg.torus(20);\n\n  // Start drawing to the torus p5.Framebuffer.\n  torusLayer.end();\n}\n\n// Update and draw the box layer offscreen.\nfunction drawBox() {\n  // Start drawing to the box p5.Framebuffer.\n  boxLayer.begin();\n\n  // Clear the drawing surface.\n  pg.clear();\n\n  // Turn on the lights.\n  pg.lights();\n\n  // Rotate the coordinate system.\n  pg.rotateX(frameCount * 0.01);\n  pg.rotateY(frameCount * 0.01);\n\n  // Style the box.\n  pg.noStroke();\n\n  // Draw the box.\n  pg.box(30);\n\n  // Start drawing to the box p5.Framebuffer.\n  boxLayer.end();\n}",
        "// Click and hold a mouse button to change shapes.\n\nlet pg;\nlet torusLayer;\nlet boxLayer;\n\nfunction setup() {\n  createCanvas(100, 100);\n\n  // Create an options object.\n  let options = { width: 25, height: 25 };\n\n  // Create a p5.Graphics object using WebGL mode.\n  pg = createGraphics(100, 100, WEBGL);\n\n  // Create the p5.Framebuffer objects.\n  // Use options for configuration.\n  torusLayer = pg.createFramebuffer(options);\n  boxLayer = pg.createFramebuffer(options);\n\n  describe('A grid of white toruses rotating against a dark gray background. The shapes become boxes while the user holds a mouse button.');\n}\n\nfunction draw() {\n  // Update and draw the layers offscreen.\n  drawTorus();\n  drawBox();\n\n  // Choose the layer to display.\n  let layer;\n  if (mouseIsPressed === true) {\n    layer = boxLayer;\n  } else {\n    layer = torusLayer;\n  }\n\n  // Draw to the p5.Graphics object.\n  pg.background(50);\n\n  // Iterate from left to right.\n  for (let x = -50; x < 50; x += 25) {\n    // Iterate from top to bottom.\n    for (let y = -50; y < 50; y += 25) {\n      // Draw the layer to the p5.Graphics object\n      pg.image(layer, x, y);\n    }\n  }\n\n  // Display the p5.Graphics object.\n  image(pg, 0, 0);\n}\n\n// Update and draw the torus layer offscreen.\nfunction drawTorus() {\n  // Start drawing to the torus p5.Framebuffer.\n  torusLayer.begin();\n\n  // Clear the drawing surface.\n  pg.clear();\n\n  // Turn on the lights.\n  pg.lights();\n\n  // Rotate the coordinate system.\n  pg.rotateX(frameCount * 0.01);\n  pg.rotateY(frameCount * 0.01);\n\n  // Style the torus.\n  pg.noStroke();\n\n  // Draw the torus.\n  pg.torus(5, 2.5);\n\n  // Start drawing to the torus p5.Framebuffer.\n  torusLayer.end();\n}\n\n// Update and draw the box layer offscreen.\nfunction drawBox() {\n  // Start drawing to the box p5.Framebuffer.\n  boxLayer.begin();\n\n  // Clear the drawing surface.\n  pg.clear();\n\n  // Turn on the lights.\n  pg.lights();\n\n  // Rotate the coordinate system.\n  pg.rotateX(frameCount * 0.01);\n  pg.rotateY(frameCount * 0.01);\n\n  // Style the box.\n  pg.noStroke();\n\n  // Draw the box.\n  pg.box(7.5);\n\n  // Start drawing to the box p5.Framebuffer.\n  boxLayer.end();\n}"
      ],
      "overloads": [
        {
          "params": [
            {
              "name": "options",
              "description": "configuration options.",
              "optional": 1,
              "type": "Object"
            }
          ],
          "return": {
            "description": "new framebuffer.",
            "type": "p5.Framebuffer"
          }
        }
      ],
      "return": {
        "description": "new framebuffer.",
        "type": "p5.Framebuffer"
      },
      "class": "p5.Graphics",
      "static": false,
      "module": "Rendering",
      "submodule": "Rendering"
    },
    {
      "file": "src/analysis/Amplitude.js",
      "line": 55,
      "description": "Connect an audio source to the amplitude object.",
      "itemtype": "method",
      "name": "setInput",
      "params": [
        {
          "name": "input",
          "description": "- An object that has audio output.",
          "type": "Object"
        }
      ],
      "class": "p5.Amplitude",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/analysis/Amplitude.js",
      "line": 65,
      "description": "Get the current amplitude value of a sound.",
      "itemtype": "method",
      "name": "getLevel",
      "return": {
        "description": "Amplitude level (volume) of a sound.",
        "type": "Number"
      },
      "class": "p5.Amplitude",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/analysis/Amplitude.js",
      "line": 75,
      "description": "Get the current amplitude value of a sound.",
      "itemtype": "method",
      "name": "smooth",
      "params": [
        {
          "name": "Smooth",
          "description": "Amplitude analysis by averaging with the last analysis frame. Off by default.",
          "type": "Number"
        }
      ],
      "class": "p5.Amplitude",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/analysis/FFT.js",
      "line": 82,
      "description": "Returns the frequency spectrum of the input signal.",
      "itemtype": "method",
      "name": "analyze",
      "return": {
        "description": "Array of amplitude values from 0 to 1.",
        "type": "Array"
      },
      "class": "p5.FFT",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/analysis/FFT.js",
      "line": 92,
      "description": "Returns an array of sample values from the input audio.",
      "itemtype": "method",
      "name": "waveform",
      "return": {
        "description": "Array of sample values from -1 to -1.",
        "type": "Array"
      },
      "class": "p5.FFT",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/Utils.js",
      "line": 14,
      "description": "Get the window's audio context.",
      "itemtype": "method",
      "name": "getAudioContext",
      "return": {
        "description": "the audio context",
        "type": "AudioContext"
      },
      "class": "p5",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/Utils.js",
      "line": 30,
      "description": "Sets the AudioContext to a specified context to enable cross library compatibility.",
      "itemtype": "method",
      "name": "setAudioContext",
      "params": [
        {
          "name": "the",
          "description": "desired AudioContext.",
          "type": "AudioContext"
        }
      ],
      "class": "p5",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/Utils.js",
      "line": 39,
      "description": "userStartAudio() starts the AudioContext on a user gesture. It can be placed in a specific interaction function, such as mousePressed().",
      "itemtype": "method",
      "name": "userStartAudio",
      "class": "p5",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/Utils.js",
      "line": 47,
      "description": "userStopAudio() stops the AudioContext on a user gesture.",
      "itemtype": "method",
      "name": "userStopAudio",
      "class": "p5",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/p5soundMixEffect.js",
      "line": 21,
      "description": "Set the wet/dry mix of the effect.",
      "itemtype": "method",
      "name": "wet",
      "params": [
        {
          "name": "amount",
          "description": "Between 0 (dry) and 1 (wet)",
          "type": "Number"
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc, del\n\nfunction setup() {\n  cnv = createCanvas(100, 100);\n  background(220);\n  osc = new p5.Oscillator();\n  osc.disconnect();\n  del = new p5.Delay();\n  osc.connect(del);\n  del.delayTime(0.25);\n  del.feedback(0.5);\n  del.wet(0.5);\n}\n\nfunction mousePressed() {\n  osc.start();\n}\n\nfunction draw() {\n  del.delayTime(map(mouseX, 0, width, 0.01, 0.5));\n  del.wet(map(mouseY, 0, height, 0.1, 0.9));\n  background(220);\n  textAlign(CENTER);\n  textSize(9);\n  text('delay dry/wet: ' + del.wet().toFixed(2), width / 2, height / 2);\n}\n</code>\n</div>"
      ],
      "class": "p5.p5soundMixEffect",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/p5soundNode.js",
      "line": 19,
      "description": "Adjust the amplitude of the p5 sound node.",
      "itemtype": "method",
      "name": "amp",
      "params": [
        {
          "name": "amplitude",
          "description": "Set the amplitude between 0 and 1.0. Or, pass in an object such as an oscillator to modulate amplitude with an audio signal.",
          "type": "Number"
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc, lfo;\nlet cnv;\n\nfunction setup() {\n  describe(\"a sketch that demonstrates amplitude modulation with an LFO and sine tone\");\n  cnv = createCanvas(100, 100);\n  cnv.mousePressed(startSound);\n  textAlign(CENTER);\n  textWrap(WORD);\n  textSize(10);\n  \n  osc = new p5.Oscillator('sine');\n  lfo = new p5.Oscillator(1);\n  lfo.disconnect();\n  osc.amp(lfo);\n}\n\nfunction startSound() {\n  lfo.start();\n  osc.start();\n}\n\nfunction draw(){\n  background(220);\n  text('click to play sound', 0, height/2 - 20, 100);\n  text('control lfo with mouseX position', 0, height/2, 100);\n\n  let freq = map(mouseX, 0, width, 0, 10);\n  lfo.freq(freq);\n}\n</code>\n</div>"
      ],
      "class": "p5.p5soundNode",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/p5soundSource.js",
      "line": 19,
      "description": "Starts the p5 sound source.",
      "itemtype": "method",
      "name": "start",
      "class": "p5.p5soundSource",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/core/p5soundSource.js",
      "line": 28,
      "description": "Stops the p5 sound source.",
      "itemtype": "method",
      "name": "stop",
      "class": "p5.p5soundSource",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Biquad.js",
      "line": 81,
      "description": "The filter's resonance factor.",
      "itemtype": "method",
      "name": "res",
      "params": [
        {
          "name": "resonance",
          "description": "resonance of the filter. A number between 0 and 100. Values closer to 100 can cause the filter to self-oscillate and become loud!",
          "type": "Number"
        }
      ],
      "class": "p5.Biquad",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Biquad.js",
      "line": 91,
      "description": "The gain of the filter in dB units.",
      "itemtype": "method",
      "name": "gain",
      "params": [
        {
          "name": "gain",
          "description": "gain value in dB units. The gain is only used for lowshelf, highshelf, and peaking filters.",
          "type": "Number"
        }
      ],
      "class": "p5.Biquad",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Biquad.js",
      "line": 101,
      "description": "Set the type of the filter.",
      "itemtype": "method",
      "name": "setType",
      "params": [
        {
          "name": "type",
          "description": "type of the filter. Options: \"lowpass\", \"highpass\", \"bandpass\", \"lowshelf\", \"highshelf\", \"notch\", \"allpass\", and \"peaking.\"",
          "type": "String"
        }
      ],
      "class": "p5.Biquad",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Biquad.js",
      "line": 111,
      "description": "Set the cutoff frequency of the filter.",
      "itemtype": "method",
      "name": "freq",
      "params": [
        {
          "name": "cutoffFrequency",
          "description": "the cutoff frequency of the filter.",
          "type": "Number"
        }
      ],
      "class": "p5.Biquad",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Delay.js",
      "line": 57,
      "description": "Set the delay time in seconds.",
      "itemtype": "method",
      "name": "delayTime",
      "params": [
        {
          "name": "delayTime",
          "description": "The delay time in seconds.",
          "type": "Number"
        },
        {
          "name": "rampTime",
          "description": "The time in seconds it takes to ramp to the new delay time. \n                           By default it is 0.1 seconds. Setting it to 0 will change \n                           the delay time immediately and demonstrate legacy behavior.",
          "type": "Number",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet osc, delay, env;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  textAlign(CENTER);\n  textSize(9);\n  text('click and drag mouse', width/2, height/2);\n\n  osc = new p5.Oscillator('sawtooth');\n  osc.amp(0.74);\n  env = new p5.Envelope(0.01);\n  delay = new p5.Delay(0.12, 0.7);\n  \n  osc.disconnect();\n  osc.connect(env);\n  env.disconnect();\n  env.connect(delay);\n\n  cnv.mousePressed(oscStart);\n  cnv.mouseReleased(oscStop);\n  cnv.mouseOut(oscStop);\n  describe('Tap to play a square wave with delay effect.');\n}\n\nfunction oscStart() {\n  background(0, 255, 255);\n  text('release to hear delay', width/2, height/2);\n  osc.start();\n  env.triggerAttack();\n}\n\nfunction oscStop() {\n  background(220);\n  text('click and drag mouse', width/2, height/2);\n  env.triggerRelease();\n} \n  \nfunction draw() {\n  \n  let dtime = map(mouseX, 0, width, 0.1, 0.5);\n  delay.delayTime(dtime);\n}"
      ],
      "class": "p5.Delay",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Delay.js",
      "line": 122,
      "description": "The amount of feedback in the delay line.",
      "itemtype": "method",
      "name": "feedback",
      "params": [
        {
          "name": "feedbackAmount",
          "description": "A number between 0 and 0.99.",
          "type": "Number"
        }
      ],
      "class": "p5.Delay",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Delay.js",
      "line": 132,
      "description": "Process an input signal with a delay effect.",
      "itemtype": "method",
      "name": "process",
      "params": [
        {
          "name": "unit",
          "description": "A p5.sound source such as an Oscillator, Soundfile, or AudioIn object.",
          "type": "Object"
        },
        {
          "name": "delayTime",
          "description": "The amount of delay in seconds. A number between 0 and 1.",
          "type": "Number"
        },
        {
          "name": "feedback",
          "description": "The amount of feedback. A number between 0 and 1.",
          "type": "Number"
        }
      ],
      "class": "p5.Delay",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 43,
      "description": "Trigger the envelope and release it after the sustain time.",
      "itemtype": "method",
      "name": "play",
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 52,
      "description": "Trigger the Attack, and Decay portion of the Envelope. Similar to holding\ndown a key on a piano, but it will hold the sustain level until you let go.",
      "itemtype": "method",
      "name": "triggerAttack",
      "example": [
        "\n<div>\n<code>\nlet osc, env;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  cnv.mousePressed(playSound);\n  cnv.mouseReleased(stopSound);\n  textAlign(CENTER);\n  textSize(10);\n  text('tap to triggerAttack', width/2, height/2);\n\n  osc = new p5.Oscillator();\n  osc.disconnect();\n  env = new p5.Envelope();\n  osc.connect(env);\n}\n\nfunction playSound() {\n  background(0, 255, 255);\n  text('release to release', width/2, height/2);\n  osc.start();\n  env.attackTime(random(0.00, 0.25));\n  env.triggerAttack(0.5);\n}\n\nfunction stopSound() {\n  background(220);\n  text('tap to triggerAttack', width/2, height/2);\n  env.releaseTime(random(0.1, 0.3));\n  env.triggerRelease();\n}\n</code>\n</div>"
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 98,
      "description": "Trigger the Release of the envelope. Similar to releasing the key on \na piano and letting the sound fade according to the release level and \nrelease time.",
      "itemtype": "method",
      "name": "triggerRelease",
      "example": [
        "\n<div>\n<code>\nlet osc, env;\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  cnv.mousePressed(playSound);\n  cnv.mouseReleased(stopSound);\n  textAlign(CENTER);\n  textSize(10);\n  text('tap to triggerAttack', width/2, height/2);\n\n  osc = new p5.Oscillator();\n  osc.disconnect();\n  env = new p5.Envelope();\n  osc.connect(env);\n}\n\nfunction playSound() {\n  background(0, 255, 255);\n  text('release to release', width/2, height/2);\n  osc.start();\n  env.attackTime(random(0.00, 0.25));\n  env.triggerAttack(0.5);\n}\n\nfunction stopSound() {\n  background(220);\n  text('tap to triggerAttack', width/2, height/2);\n  env.releaseTime(random(0.1, 0.3));\n  env.triggerRelease();\n}\n</code>\n</div>"
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 145,
      "itemtype": "method",
      "name": "setInput",
      "params": [
        {
          "name": "unit",
          "description": "A p5.sound Object",
          "type": "Object"
        }
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 154,
      "description": "Sets the attack, decay, sustain, and release times of the envelope.",
      "itemtype": "method",
      "name": "setADSR",
      "params": [
        {
          "name": "attack",
          "description": "how quickly the envelope reaches the maximum level",
          "type": "Number"
        },
        {
          "name": "decay",
          "description": "how quickly the envelope reaches the sustain level",
          "type": "Number"
        },
        {
          "name": "sustain",
          "description": "how long the envelope stays at the decay level",
          "type": "Number"
        },
        {
          "name": "release",
          "description": "how quickly the envelope fades out after the sustain level",
          "type": "Number"
        }
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 170,
      "description": "Sets the release time of the envelope.",
      "itemtype": "method",
      "name": "releaseTime",
      "params": [
        {
          "name": "releaseTime",
          "description": "the release time in seconds",
          "type": "Number"
        }
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Envelope.js",
      "line": 180,
      "description": "Sets the attack time of the envelope.",
      "itemtype": "method",
      "name": "attackTime",
      "params": [
        {
          "name": "attackTime",
          "description": "the attack time in seconds",
          "type": "Number"
        }
      ],
      "class": "p5.Envelope",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner.js",
      "line": 55,
      "description": "Pan a sound source left or right.",
      "itemtype": "method",
      "name": "pan",
      "params": [
        {
          "name": "panAmount",
          "description": "Sets the pan position of the sound source. Can be a value between -1 and 1 or an audio rate signal such as an LFO.",
          "type": "Number, Object"
        }
      ],
      "class": "p5.Panner",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 118,
      "description": "Connects an input source to the 3D panner.",
      "itemtype": "method",
      "name": "process",
      "params": [
        {
          "name": "input",
          "description": "an input source to process with the 3D panner.",
          "type": "Object"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 128,
      "description": "Set the x, y, and z position of the 3D panner.",
      "itemtype": "method",
      "name": "set",
      "params": [
        {
          "name": "xPosition",
          "description": "the x coordinate of the panner.",
          "type": "Number"
        },
        {
          "name": "yPosition",
          "description": "the y coordinate of the panner.",
          "type": "Number"
        },
        {
          "name": "zPosition",
          "description": "the z coordinate of the panner.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 142,
      "description": "The rolloff rate of the panner.",
      "itemtype": "method",
      "name": "setFalloff",
      "params": [
        {
          "name": "rolloffFactor",
          "description": "",
          "type": "Number"
        },
        {
          "name": "maxDistance",
          "description": "",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 154,
      "description": "Set the maximum distance of the panner.",
      "itemtype": "method",
      "name": "maxDist",
      "params": [
        {
          "name": "distance",
          "description": "the maximum distance that the sound source can be heard from.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 164,
      "description": "Set the rolloff rate of the panner.",
      "itemtype": "method",
      "name": "rolloff",
      "params": [
        {
          "name": "r",
          "description": "the rolloff rate of the panner.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 174,
      "description": "Set the X position of the sound source.",
      "itemtype": "method",
      "name": "positionX",
      "params": [
        {
          "name": "positionX",
          "description": "the x position of the sound source.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 184,
      "description": "Set the Y position of the sound source.",
      "itemtype": "method",
      "name": "positionY",
      "params": [
        {
          "name": "positionY",
          "description": "the y position of the sound source.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Panner3D.js",
      "line": 194,
      "description": "Set the Z position of the sound source.",
      "itemtype": "method",
      "name": "positionZ",
      "params": [
        {
          "name": "positionZ",
          "description": "the z position of the sound source.",
          "type": "Number"
        }
      ],
      "class": "p5.Panner3D",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/PitchShifter.js",
      "line": 57,
      "description": "Shift the pitch of the source audio.",
      "itemtype": "method",
      "name": "shift",
      "params": [
        {
          "name": "pitchValue",
          "description": "amount of semitones to shift the pitch",
          "type": "Number"
        }
      ],
      "class": "p5.PitchShifter",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/effects/Reverb.js",
      "line": 58,
      "description": "Set the decay time of the reverb.",
      "itemtype": "method",
      "name": "set",
      "params": [
        {
          "name": "time",
          "description": "Decay time of the reverb in seconds.",
          "type": "Number"
        }
      ],
      "class": "p5.Reverb",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/AudioIn.js",
      "line": 57,
      "description": "Start the audio input.",
      "itemtype": "method",
      "name": "start",
      "class": "p5.AudioIn",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/AudioIn.js",
      "line": 73,
      "description": "Stop the audio input.",
      "itemtype": "method",
      "name": "stop",
      "class": "p5.AudioIn",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/Noise.js",
      "line": 58,
      "itemtype": "method",
      "name": "type",
      "params": [
        {
          "name": "type",
          "description": "- the type of noise (white, pink, brown)",
          "type": "String"
        }
      ],
      "class": "p5.Noise",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/Oscillator.js",
      "line": 84,
      "description": "Adjusts the frequency of the oscillator.",
      "itemtype": "method",
      "name": "freq",
      "params": [
        {
          "name": "frequency",
          "description": "frequency of the oscillator in Hz (cycles per second).",
          "type": "Number"
        },
        {
          "name": "rampTime",
          "description": "the time in seconds it takes to ramp to the new frequency (defaults to 0).",
          "type": "Number",
          "optional": true
        }
      ],
      "class": "p5.Oscillator",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/Oscillator.js",
      "line": 95,
      "description": "Adjusts the phase of the oscillator.",
      "itemtype": "method",
      "name": "phase",
      "params": [
        {
          "name": "phase",
          "description": "phase of the oscillator in degrees (0-360).",
          "type": "Number"
        }
      ],
      "class": "p5.Oscillator",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/Oscillator.js",
      "line": 105,
      "description": "Sets the type of the oscillator.",
      "itemtype": "method",
      "name": "setType",
      "params": [
        {
          "name": "type",
          "description": "type of the oscillator. Options:\n                'sine' (default), 'triangle',\n                'sawtooth', 'square'",
          "type": "String"
        }
      ],
      "class": "p5.Oscillator",
      "module": "p5.sound",
      "submodule": "p5.sound"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 11,
      "description": "loadSound() returns a new SoundFile from a specified\npath. If called during preload(), the SoundFile will be ready\nto play in time for setup() and draw(). If called outside of\npreload, the SoundFile will not be ready immediately, so\nloadSound accepts a callback as the second parameter. Using a\n<a href=\"https://github.com/processing/p5.js/wiki/Local-server\">\nlocal server</a> is recommended when loading external files.",
      "itemtype": "method",
      "name": "loadSound",
      "params": [
        {
          "name": "path",
          "description": "Path to the sound file, or an array with\n                                  paths to soundfiles in multiple formats\n                                  i.e. ['sound.ogg', 'sound.mp3'].\n                                  Alternately, accepts an object: either\n                                  from the HTML5 File API, or a p5.File.",
          "type": "String|Array"
        }
      ],
      "return": {
        "description": "Returns a SoundFile",
        "type": "SoundFile"
      },
      "example": [
        "\n<div><code>\nlet mySound;\nfunction preload() {\n  mySound = loadSound('/assets/doorbell.mp3');\n}\n\n function setup() {\n   let cnv = createCanvas(100, 100);\n   cnv.mousePressed(canvasPressed);\n   background(220);\n   text('tap here to play', 10, 20);\n }\n\n function canvasPressed() {\n   // playing a sound file on a user gesture\n   // is equivalent to `userStartAudio()`\n   mySound.play();\n }\n </code></div>"
      ],
      "class": "p5",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 125,
      "description": "Start the soundfile.",
      "itemtype": "method",
      "name": "start",
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 138,
      "description": "Start the soundfile.",
      "itemtype": "method",
      "name": "play",
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 151,
      "description": "Stop the soundfile.",
      "itemtype": "method",
      "name": "stop",
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 161,
      "description": "Pause the soundfile.",
      "itemtype": "method",
      "name": "pause",
      "example": [
        "\n<div>\n<code>\nlet player;\n\nfunction preload() {\n  player = loadSound('/assets/Damscray_DancingTiger.mp3');\n}\n\nfunction setup() {\n  describe('A sketch that pauses and resumes sound file playback.');\n  let cnv = createCanvas(100, 100);\n  cnv.mousePressed(playSound);\n  background(220);\n  textAlign(CENTER);\n  textWrap(WORD);\n  textSize(10);\n  background(220);\n  text('click to play', 0, 20, 100);\n  \n  player.loop();\n}\n\nfunction playSound() {\n  if (!player.isPlaying()) {\n    player.play();\n    background(220);\n    text('click to pause', 0, 20, 100);\n  }\n  else {\n    player.pause();\n    background(220);\n    text('click to play', 0, 20, 100);\n  }\n}\n</code>\n</div>"
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 210,
      "description": "Loop the soundfile.",
      "itemtype": "method",
      "name": "loop",
      "params": [
        {
          "name": "loopState",
          "description": "Set to True or False in order to set the loop state.",
          "type": "Boolean"
        }
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 220,
      "description": "Set a loop region. The loop() method must be set to true for this to work.",
      "itemtype": "method",
      "name": "setLoop",
      "params": [
        {
          "name": "startTime",
          "description": "The start time of the loop point in seconds.",
          "type": "Number",
          "optional": true
        },
        {
          "name": "duration",
          "description": "The duration of the loop point in seconds.",
          "type": "Number",
          "optional": true
        }
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 232,
      "description": "Change the path for the soundfile.",
      "itemtype": "method",
      "name": "setPath",
      "params": [
        {
          "name": "path",
          "description": "Path to the sound file.",
          "type": "String"
        },
        {
          "name": "successCallback",
          "description": "Function to call when the sound file is loaded.",
          "type": "Function",
          "optional": true
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet soundSource, cnv, btn;\n\nfunction preload() {\n  soundSource = loadSound('/assets/Damscray_-_Dancing_Tiger_01.mp3');\n}\n\nfunction setup() {\n  describe(\n    'a sketch that says click to play sound. there is a button that says load sound. when you click the button, the path of the sound file player changes and the new sound plays.');\n  cnv = createCanvas(100, 100);\n  cnv.mousePressed(playSound);\n  background(220);\n  textAlign(CENTER);\n  textWrap(WORD);\n  textSize(10);\n  text('click to play sound or the button to load a new sound', 0, 20, 100);\n  btn = createButton('New Sound');\n  btn.mousePressed(setNewPath);\n  soundSource.loop();  \n}\n\nfunction playSound() {\n  soundSource.play();\n}\n\nfunction setNewPath() {\n  background(220);\n  text('a new sound was loaded', 0, 20, 100);\n  soundSource.setPath('/assets/Damscray_-_Dancing_Tiger_02.mp3', playSound); \n}\n</code>\n</div>"
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 287,
      "description": "Set the playback rate of the soundfile.",
      "itemtype": "method",
      "name": "rate",
      "params": [
        {
          "name": "rate",
          "description": "1 is normal speed, 2 is double speed. Negative values plays the soundfile backwards.",
          "type": "Number"
        }
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 302,
      "description": "Returns the duration of a sound file in seconds.",
      "itemtype": "method",
      "name": "duration",
      "return": {
        "description": "duration",
        "type": "Number"
      },
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 312,
      "description": "Return the sample rate of the sound file.",
      "itemtype": "method",
      "name": "sampleRate",
      "return": {
        "description": "sampleRate",
        "type": "Number"
      },
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 322,
      "description": "Move the playhead of a soundfile that is currently playing to a new position.",
      "itemtype": "method",
      "name": "jump",
      "params": [
        {
          "name": "timePoint",
          "description": "Time to jump to in seconds.",
          "type": "Number"
        }
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 332,
      "description": "Return the playback state of the soundfile.",
      "itemtype": "method",
      "name": "isPlaying",
      "return": {
        "description": "Playback state, true or false.",
        "type": "Boolean"
      },
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 342,
      "description": "Return the playback state of the soundfile.",
      "itemtype": "method",
      "name": "isLooping",
      "return": {
        "description": "Looping State, true or false.",
        "type": "Boolean"
      },
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 352,
      "description": "Define a function to call when the soundfile is done playing.",
      "itemtype": "method",
      "name": "onended",
      "params": [
        {
          "name": "callback",
          "description": "Name of a function that will be called when the soundfile is done playing.",
          "type": "Function"
        }
      ],
      "example": [
        "\n<div>\n<code>\nlet player;\n\nfunction preload() {\n  player = loadSound('/assets/lucky_dragons_-_power_melody.mp3');\n}\n\nfunction setup() {\n  let cnv = createCanvas(100, 100);\n  background(220);\n  textAlign(CENTER);\n  textSize(10);\n  text('click to play', width/2, height/2);\n  cnv.mousePressed(playSound);\n  player.onended(coolFunction);\n}\n\nfunction coolFunction() {\n  background(220);\n  text('sound is done', width/2, height/2);\n}\n\nfunction playSound() {\n  background(0, 255, 255);\n  text('sound is playing', width/2, height/2);\n  if (!player.isPlaying()) {\n    player.play();\n  }\n}\n</code>\n</div>"
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 395,
      "description": "Return the number of samples in a sound file.",
      "itemtype": "method",
      "name": "frames",
      "return": {
        "description": "The number of samples in the sound file.",
        "type": "Number"
      },
      "example": [
        "\n<div>\n<code>\nlet player;\n\nfunction preload() {\n  player = loadSound('/assets/lucky_dragons_-_power_melody.mp3');\n}\n\nfunction setup() {\n  describe('A sketch that calculates and displays the length of a sound file using number of samples and sample rate.');\n  createCanvas(100, 100);\n  background(220);\n  textAlign(CENTER);\n  textWrap(WORD);\n  textSize(10);\n  frames = player.frames();\n  sampleRate = player.sampleRate();\n  sampleLength = round((frames / sampleRate), 2);\n  info = `sample is ${sampleLength} seconds long`;\n  text(info, 0, 20, 100);\n}\n</code>\n</div>"
      ],
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    },
    {
      "file": "src/sources/SoundFile.js",
      "line": 429,
      "description": "Gets the number of channels in the sound file.",
      "itemtype": "method",
      "name": "channels",
      "return": {
        "description": "Returns the number of channels in the sound file."
      },
      "class": "p5.SoundFile",
      "module": "p5.sound",
      "submodule": "SoundFile"
    }
  ],
  "consts": {
    "let": [],
    "if": [],
    "function": [],
    "Boolean": [],
    "String": [],
    "Number": [],
    "Object": [],
    "async_await": [],
    "Array": [],
    "class": [],
    "for": [],
    "while": [],
    "console": [],
    "VIDEO": [],
    "VERSION": [],
    "RGB": [],
    "AUDIO": [],
    "RGBHDR": [],
    "P2D": [],
    "HSB": [],
    "deviceOrientation": [],
    "accelerationX": [],
    "accelerationY": [],
    "movedX": [],
    "accelerationZ": [],
    "pAccelerationX": [],
    "pAccelerationY": [],
    "movedY": [],
    "pAccelerationZ": [],
    "keyIsPressed": [],
    "frameCount": [],
    "rotationX": [],
    "deltaTime": [],
    "rotationY": [],
    "key": [],
    "focused": [],
    "mouseX": [],
    "rotationZ": [],
    "pRotationX": [],
    "pRotationY": [],
    "mouseY": [],
    "pRotationZ": [],
    "pmouseX": [],
    "code": [],
    "turnAxis": [],
    "pmouseY": [],
    "winMouseX": [],
    "keyCode": [],
    "winMouseY": [],
    "webglVersion": [],
    "pwinMouseX": [],
    "displayWidth": [],
    "displayHeight": [],
    "pwinMouseY": [],
    "windowWidth": [],
    "windowHeight": [],
    "mouseButton": [],
    "touches": [],
    "mouseIsPressed": [],
    "HSL": [],
    "P2DHDR": [],
    "HWB": [],
    "DEGREES": [],
    "LAB": [],
    "LCH": [],
    "OKLAB": [],
    "WEBGL": [],
    "OKLCH": [],
    "WEBGL2": [],
    "RGBA": [],
    "WEBGPU": [],
    "ARROW": [],
    "RADIANS": [],
    "SIMPLE": [],
    "FULL": [],
    "CROSS": [],
    "HAND": [],
    "MOVE": [],
    "TEXT": [],
    "WAIT": [],
    "file": [],
    "type": [],
    "subtype": [],
    "name": [],
    "size": [],
    "data": [],
    "worldInputs": [],
    "combineColors": [],
    "pixelInputs": [],
    "finalColor": [],
    "filterColor": [],
    "objectInputs": [],
    "cameraInputs": [],
    "HALF_PI": [],
    "PI": [],
    "QUARTER_PI": [],
    "TAU": [],
    "TWO_PI": [],
    "DEG_TO_RAD": [],
    "RAD_TO_DEG": [],
    "CORNER": [],
    "CORNERS": [],
    "RADIUS": [],
    "RIGHT": [],
    "LEFT": [],
    "CENTER": [],
    "TOP": [],
    "BOTTOM": [],
    "drawingContext": [],
    "BASELINE": [],
    "POINTS": [],
    "LINES": [],
    "LINE_STRIP": [],
    "LINE_LOOP": [],
    "TRIANGLES": [],
    "disableFriendlyErrors": [],
    "TRIANGLE_FAN": [],
    "TRIANGLE_STRIP": [],
    "QUADS": [],
    "QUAD_STRIP": [],
    "TESS": [],
    "EMPTY_PATH": [],
    "PATH": [],
    "CLOSE": [],
    "OPEN": [],
    "CHORD": [],
    "PIE": [],
    "PROJECT": [],
    "SQUARE": [],
    "ROUND": [],
    "BEVEL": [],
    "MITER": [],
    "AUTO": [],
    "ALT": [],
    "BACKSPACE": [],
    "CONTROL": [],
    "DELETE": [],
    "DOWN_ARROW": [],
    "ENTER": [],
    "ESCAPE": [],
    "LEFT_ARROW": [],
    "OPTION": [],
    "RETURN": [],
    "RIGHT_ARROW": [],
    "SHIFT": [],
    "TAB": [],
    "UP_ARROW": [],
    "BLEND": [],
    "REMOVE": [],
    "ADD": [],
    "DARKEST": [],
    "LIGHTEST": [],
    "DIFFERENCE": [],
    "SUBTRACT": [],
    "EXCLUSION": [],
    "MULTIPLY": [],
    "pixels": [],
    "SCREEN": [],
    "REPLACE": [],
    "OVERLAY": [],
    "HARD_LIGHT": [],
    "SOFT_LIGHT": [],
    "DODGE": [],
    "BURN": [],
    "THRESHOLD": [],
    "GRAY": [],
    "OPAQUE": [],
    "INVERT": [],
    "POSTERIZE": [],
    "DILATE": [],
    "ERODE": [],
    "BLUR": [],
    "NORMAL": [],
    "ITALIC": [],
    "BOLD": [],
    "BOLDITALIC": [],
    "CHAR": [],
    "WORD": [],
    "LINEAR": [],
    "QUADRATIC": [],
    "BEZIER": [],
    "CURVE": [],
    "STROKE": [],
    "FILL": [],
    "TEXTURE": [],
    "IMMEDIATE": [],
    "IMAGE": [],
    "NEAREST": [],
    "REPEAT": [],
    "CLAMP": [],
    "MIRROR": [],
    "FLAT": [],
    "SMOOTH": [],
    "LANDSCAPE": [],
    "PORTRAIT": [],
    "GRID": [],
    "AXES": [],
    "LABEL": [],
    "FALLBACK": [],
    "color": [],
    "depth": [],
    "width": [],
    "height": [],
    "CONTAIN": [],
    "COVER": [],
    "UNSIGNED_BYTE": [],
    "UNSIGNED_INT": [],
    "FLOAT": [],
    "HALF_FLOAT": [],
    "INCLUDE": [],
    "EXCLUDE": [],
    "columns": [],
    "rows": [],
    "src": [],
    "vertices": [],
    "vertexNormals": [],
    "faces": [],
    "uvs": [],
    "gid": [],
    "elt": [],
    "eyeX": [],
    "eyeY": [],
    "eyeZ": [],
    "centerX": [],
    "centerY": [],
    "centerZ": [],
    "upX": [],
    "upY": [],
    "upZ": [],
    "x": [],
    "y": [],
    "z": []
  }
}