|
2 | 2 | "project": {
|
3 | 3 | "name": "p5",
|
4 | 4 | "description": "[](https://www.npmjs.com/package/p5)",
|
5 |
| - "version": "1.11.7", |
| 5 | + "version": "1.11.8", |
6 | 6 | "url": "https://github.com/processing/p5.js#readme"
|
7 | 7 | },
|
8 | 8 | "files": {
|
|
3144 | 3144 | "namespace": "",
|
3145 | 3145 | "file": "lib/addons/p5.sound.js",
|
3146 | 3146 | "line": 8308,
|
3147 |
| - "description": "<p>Reverb adds depth to a sound through a large number of decaying\nechoes. It creates the perception that sound is occurring in a\nphysical space. The p5.Reverb has paramters for Time (how long does the\nreverb last) and decayRate (how much the sound decays with each echo)\nthat can be set with the .set() or .process() methods. The p5.Convolver\nextends p5.Reverb allowing you to recreate the sound of actual physical\nspaces through convolution.</p>\n<p>This class extends <a href = \"/reference/#/p5.Effect\">p5.Effect</a>.\nMethods <a href = \"/reference/#/p5.Effect/amp\">amp()</a>, <a href = \"/reference/#/p5.Effect/chain\">chain()</a>,\n<a href = \"/reference/#/p5.Effect/drywet\">drywet()</a>, <a href = \"/reference/#/p5.Effect/connect\">connect()</a>, and\n<a href = \"/reference/#/p5.Effect/disconnect\">disconnect()</a> are available.</p>\n", |
| 3147 | + "description": "<p>Reverb adds depth to a sound through a large number of decaying\nechoes. It creates the perception that sound is occurring in a\nphysical space. The p5.Reverb has parameters for Time (how long does the\nreverb last) and decayRate (how much the sound decays with each echo)\nthat can be set with the .set() or .process() methods. The p5.Convolver\nextends p5.Reverb allowing you to recreate the sound of actual physical\nspaces through convolution.</p>\n<p>This class extends <a href = \"/reference/#/p5.Effect\">p5.Effect</a>.\nMethods <a href = \"/reference/#/p5.Effect/amp\">amp()</a>, <a href = \"/reference/#/p5.Effect/chain\">chain()</a>,\n<a href = \"/reference/#/p5.Effect/drywet\">drywet()</a>, <a href = \"/reference/#/p5.Effect/connect\">connect()</a>, and\n<a href = \"/reference/#/p5.Effect/disconnect\">disconnect()</a> are available.</p>\n", |
3148 | 3148 | "extends": "p5.Effect",
|
3149 | 3149 | "is_constructor": 1,
|
3150 | 3150 | "example": [
|
|
13948 | 13948 | }
|
13949 | 13949 | ],
|
13950 | 13950 | "example": [
|
13951 |
| - "\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nlet img;\n\n// Load the image.\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\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}\n</code>\n</div>" |
| 13951 | + "\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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 horizontal color gradient from black to white drawn on a gray background.');\n}\n</code>\n</div>\n\n<div>\n<code>\nlet img;\n\n// Load the image.\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\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}\n</code>\n</div>" |
13952 | 13952 | ],
|
13953 | 13953 | "class": "p5.Image",
|
13954 | 13954 | "module": "Image",
|
|
14819 | 14819 | }
|
14820 | 14820 | ],
|
14821 | 14821 | "example": [
|
14822 |
| - "\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nlet img;\n\n// Load the image.\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\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}\n</code>\n</div>" |
| 14822 | + "\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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}\n</code>\n</div>\n\n<div>\n<code>\nfunction 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 horizontal color gradient from black to white.');\n}\n</code>\n</div>\n\n<div>\n<code>\nlet img;\n\n// Load the image.\nfunction preload() {\n img = loadImage('assets/rockies.jpg');\n}\n\nfunction setup() {\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}\n</code>\n</div>" |
14823 | 14823 | ],
|
14824 | 14824 | "class": "p5",
|
14825 | 14825 | "module": "Image",
|
|
16170 | 16170 | "type": "String"
|
16171 | 16171 | },
|
16172 | 16172 | "example": [
|
16173 |
| - "\n<div class=\"norender\">\n<code>\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\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n</code>\n</div>" |
| 16173 | + "\n<div class=\"norender\">\n<code>\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\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n print(table.getString(0, 0)); // 0\n print(table.getString(0, 1)); // Capra hircus\n print(table.getString(0, 2)); // Goat\n print(table.getString(1, 0)); // 1\n print(table.getString(1, 1)); // Panthera pardus\n print(table.getString(1, 2)); // Leopard\n print(table.getString(2, 0)); // 2\n print(table.getString(2, 1)); // Equus zebra\n print(table.getString(2, 2)); // Zebra\n describe('no image displayed');\n}\n</code>\n</div>" |
16174 | 16174 | ],
|
16175 | 16175 | "class": "p5.Table",
|
16176 | 16176 | "module": "IO",
|
|
16212 | 16212 | "type": "Array"
|
16213 | 16213 | },
|
16214 | 16214 | "example": [
|
16215 |
| - "\n<div class=\"norender\">\n<code>\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,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifiying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n</code>\n</div>" |
| 16215 | + "\n<div class=\"norender\">\n<code>\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,Leoperd\n// 2,Equus zebra,Zebra\n\nlet table;\n\nfunction preload() {\n // table is comma separated value \"CSV\"\n // and has specifying header for column labels\n table = loadTable('assets/mammals.csv', 'csv', 'header');\n}\n\nfunction setup() {\n let tableArray = table.getArray();\n for (let i = 0; i < tableArray.length; i++) {\n print(tableArray[i]);\n }\n describe('no image displayed');\n}\n</code>\n</div>" |
16216 | 16216 | ],
|
16217 | 16217 | "class": "p5.Table",
|
16218 | 16218 | "module": "IO",
|
|
28983 | 28983 | {
|
28984 | 28984 | "file": "lib/addons/p5.sound.js",
|
28985 | 28985 | "line": 9729,
|
28986 |
| - "description": "<p>Getters and Setters, setting any paramter will result in a change in the clock's\nfrequency, that will be reflected after the next callback\nbeats per minute (defaults to 60)</p>\n", |
| 28986 | + "description": "<p>Getters and Setters, setting any parameter will result in a change in the clock's\nfrequency, that will be reflected after the next callback\nbeats per minute (defaults to 60)</p>\n", |
28987 | 28987 | "itemtype": "property",
|
28988 | 28988 | "name": "bpm",
|
28989 | 28989 | "type": "Number",
|
|
29201 | 29201 | {
|
29202 | 29202 | "file": "lib/addons/p5.sound.js",
|
29203 | 29203 | "line": 10112,
|
29204 |
| - "description": "<p>Set the paramters of a compressor.</p>\n", |
| 29204 | + "description": "<p>Set the parameters of a compressor.</p>\n", |
29205 | 29205 | "itemtype": "method",
|
29206 | 29206 | "name": "set",
|
29207 | 29207 | "params": [
|
|
0 commit comments