Skip to content

Commit

Permalink
Merge pull request #6777 from davepagurek/initial-conversion-script
Browse files Browse the repository at this point in the history
Add initial conversion script from Documentation.js to old format
  • Loading branch information
limzykenneth authored Jul 7, 2024
2 parents 2ceea58 + bb7a311 commit 3148e25
Show file tree
Hide file tree
Showing 50 changed files with 46,368 additions and 1,870 deletions.
27,999 changes: 27,999 additions & 0 deletions docs/converted.json

Large diffs are not rendered by default.

16,154 changes: 16,154 additions & 0 deletions docs/parameterData.json.bak

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "rollup -c",
"preview": "vite",
"dev": "grunt yui browserify:dev connect:yui watch:quick",
"docs": "documentation build ./src/app.js -o ./docs/data.json",
"docs": "documentation build ./src/**/*.js ./src/**/**/*.js -o ./docs/data.json && node ./utils/convert.js",
"test": "vitest run",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
Expand Down Expand Up @@ -40,7 +40,7 @@
"core-js": "^3.6.5",
"dayjs": "^1.11.10",
"derequire": "^2.0.0",
"documentation": "^14.0.2",
"documentation": "^14.0.3",
"eslint": "^8.54.0",
"file-saver": "^1.3.8",
"gifenc": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/accessibility/describe.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const labelTableElId = '_lte_'; //Label Table Element
*
* @method describe
* @param {String} text description of the canvas.
* @param {Constant} [display] either LABEL or FALLBACK.
* @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
*
* @example
* <div>
Expand Down Expand Up @@ -185,7 +185,7 @@ p5.prototype.describe = function(text, display) {
* @method describeElement
* @param {String} name name of the element.
* @param {String} text description of the element.
* @param {Constant} [display] either LABEL or FALLBACK.
* @param {(FALLBACK|LABEL)} [display] either LABEL or FALLBACK.
*
* @example
* <div>
Expand Down
4 changes: 2 additions & 2 deletions src/accessibility/outputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import p5 from '../core/main';
* to learn more about making sketches accessible.
*
* @method textOutput
* @param {Constant} [display] either FALLBACK or LABEL.
* @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
*
* @example
* <div>
Expand Down Expand Up @@ -173,7 +173,7 @@ p5.prototype.textOutput = function(display) {
* to learn more about making sketches accessible.
*
* @method gridOutput
* @param {Constant} [display] either FALLBACK or LABEL.
* @param {(FALLBACK|LABEL)} [display] either FALLBACK or LABEL.
*
* @example
* <div>
Expand Down
14 changes: 5 additions & 9 deletions src/color/p5.Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import p5 from '../core/main';
import * as constants from '../core/constants';
import color_conversion from './color_conversion';

/**
/*
* CSS named colors.
* @private
*/
const namedColors = {
aliceblue: '#f0f8ff',
Expand Down Expand Up @@ -165,7 +166,7 @@ const namedColors = {
yellowgreen: '#9acd32'
};

/**
/*
* These regular expressions are used to build up the patterns for matching
* viable CSS color strings: fragmenting the regexes in this way increases the
* legibility and comprehensibility of the code.
Expand All @@ -178,8 +179,9 @@ const INTEGER = /(\d{1,3})/; // Match integers: 79, 255, etc.
const DECIMAL = /((?:\d+(?:\.\d+)?)|(?:\.\d+))/; // Match 129.6, 79, .9, etc.
const PERCENT = new RegExp(`${DECIMAL.source}%`); // Match 12.9%, 79%, .9%, etc.

/**
/*
* Full color string patterns. The capture groups are necessary.
* @private
*/
const colorPatterns = {
// Match colors in format #XXX, e.g. #416.
Expand Down Expand Up @@ -336,7 +338,6 @@ const colorPatterns = {
* instance of this class.
*
* @class p5.Color
* @constructor
* @param {p5} [pInst] pointer to p5 instance.
*
* @param {Number[]|String} vals an array containing the color values
Expand Down Expand Up @@ -370,7 +371,6 @@ p5.Color = class Color {
* `myColor.toString('#rrggbb')`, it will determine how the color string is
* formatted. By default, color strings are formatted as `'rgba(r, g, b, a)'`.
*
* @method toString
* @param {String} [format] how the color string will be formatted.
* Leaving this empty formats the string as rgba(r, g, b, a).
* '#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.
Expand Down Expand Up @@ -574,7 +574,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setRed
* @param {Number} red the new red value.
*
* @example
Expand Down Expand Up @@ -616,7 +615,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setGreen
* @param {Number} green the new green value.
*
* @example
Expand Down Expand Up @@ -658,7 +656,6 @@ p5.Color = class Color {
* The range depends on the <a href="#/p5/colorMode">colorMode()</a>. In the
* default RGB mode it's between 0 and 255.
*
* @method setBlue
* @param {Number} blue the new blue value.
*
* @example
Expand Down Expand Up @@ -701,7 +698,6 @@ p5.Color = class Color {
* <a href="#/p5/colorMode">colorMode()</a>. In the default RGB mode it's
* between 0 and 255.
*
* @method setAlpha
* @param {Number} alpha the new alpha value.
*
* @example
Expand Down
4 changes: 2 additions & 2 deletions src/color/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ p5.prototype.clear = function(...args) {
* created in. Changing modes doesn't affect their appearance.
*
* @method colorMode
* @param {Constant} mode either RGB, HSB or HSL, corresponding to
* @param {(RGB|HSB|HSL)} mode either RGB, HSB or HSL, corresponding to
* Red/Green/Blue and Hue/Saturation/Brightness
* (or Lightness).
* @param {Number} [max] range for all values.
Expand Down Expand Up @@ -937,7 +937,7 @@ p5.prototype.clear = function(...args) {

/**
* @method colorMode
* @param {Constant} mode
* @param {(RGB|HSB|HSL)} mode
* @param {Number} max1 range for the red or hue depending on the
* current color mode.
* @param {Number} max2 range for the green or saturation depending
Expand Down
Loading

0 comments on commit 3148e25

Please sign in to comment.