From ea270d33b0a143367a6ed116ee218aeacd66ae00 Mon Sep 17 00:00:00 2001 From: Derrick McMillen Date: Thu, 25 Jan 2018 16:52:51 -0800 Subject: [PATCH 1/2] Includes p5.js as a default library. Try snapshot ?snapshot=61ba517e-c300-4154-ac84-dbab2845a23c --- bower.json | 1 + src/config/libraries.js | 330 ++++++++++++++++++++++++++++++++++++ src/config/libraryAssets.js | 3 + yarn.lock | 10 ++ 4 files changed, 344 insertions(+) diff --git a/bower.json b/bower.json index 6e9b5233fa..5b39093648 100644 --- a/bower.json +++ b/bower.json @@ -33,6 +33,7 @@ "lodash": "^4.11.2", "mustache.js": "mustache#^2.2.1", "normalize-css": "normalize.css#^4.1.1", + "p5js": "^0.5.13", "react": "^15.0.1", "roboto-webfont-bower": "roboto-webfont#^0.1.1", "underscore": "^1.8.3" diff --git a/src/config/libraries.js b/src/config/libraries.js index bef0dfdd64..93e2f7ddcb 100644 --- a/src/config/libraries.js +++ b/src/config/libraries.js @@ -15,4 +15,334 @@ export default { name: 'Bootstrap', dependsOn: ['jquery'], }, + p5: { + name: 'p5.js', + predefined: [ + 'ADD', + 'ALT', + 'ARROW', + 'AUTO', + 'BACKSPACE', + 'BASELINE', + 'BEVEL', + 'BEZIER', + 'BLEND', + 'BOLD', + 'BOTTOM', + 'BURN', + 'CENTER', + 'CHORD', + 'CLOSE', + 'CONTROL', + 'CORNER', + 'CORNERS', + 'CROSS', + 'CURVE', + 'DARKEST', + 'DEGREES', + 'DELETE', + 'DIFFERENCE', + 'DODGE', + 'DOWN_ARROW', + 'ENTER', + 'ESCAPE', + 'EXCLUSION', + 'HALF_PI', + 'HAND', + 'HARD_LIGHT', + 'HSB', + 'ITALIC', + 'LEFT', + 'LEFT_ARROW', + 'LIGHTEST', + 'LINEAR', + 'LINES', + 'MITER', + 'MOVE', + 'MULTIPLY', + 'NORMAL', + 'OPEN', + 'OPTION', + 'OVERLAY', + 'PI', + 'PIE', + 'POINTS', + 'PROJECT', + 'QUADRATIC', + 'QUADS', + 'QUAD_STRIP', + 'QUARTER_PI', + 'RADIANS', + 'RADIUS', + 'REPLACE', + 'RETURN', + 'RGB', + 'RIGHT', + 'RIGHT_ARROW', + 'ROUND', + 'SCREEN', + 'SHIFT', + 'SOFT_LIGHT', + 'SQUARE', + 'TAB', + 'TAU', + 'TEXT', + 'TOP', + 'TRIANGLES', + 'TRIANGLE_FAN', + 'TRIANGLE_STRIP', + 'TWO_PI', + 'UP_ARROW', + 'WAIT', + 'abs', + 'acos', + 'alpha', + 'angleMode', + 'append', + 'applyMatrix', + 'arc', + 'arrayCopy', + 'asin', + 'atan', + 'atan2', + 'background', + 'beginContour', + 'beginRaw', + 'beginRecord', + 'beginShape', + 'bezier', + 'bezierDetail', + 'bezierPoint', + 'bezierTangent', + 'bezierVertex', + 'blend', + 'blendMode', + 'blue', + 'brightness', + 'ceil', + 'clear', + 'color', + 'colorMode', + 'concat', + 'constrain', + 'copy', + 'cos', + 'createCanvas', + 'createGraphics', + 'createImage', + 'createInput', + 'createOutput', + 'createReader', + 'createVector', + 'createWriter', + 'cursor', + 'curve', + 'curveDetail', + 'curvePoint', + 'curveTangent', + 'curveTightness', + 'curveVertex', + 'day', + 'degrees', + 'devicePixelScaling', + 'displayHeight', + 'displayWidth', + 'dist', + 'downloadFile', + 'draw', + 'ellipse', + 'ellipseMode', + 'endContour', + 'endRaw', + 'endRecord', + 'endShape', + 'exit', + 'exp', + 'fill', + 'filter', + 'float', + 'floor', + 'focused', + 'frameCount', + 'frameRate', + 'fullscreen', + 'get', + 'getFrameRate', + 'getURL', + 'getURLParams', + 'getURLPath', + 'green', + 'height', + 'hour', + 'httpDo', + 'httpGet', + 'httpPost', + 'hue', + 'image', + 'imageMode', + 'int', + 'isKeyPressed', + 'isMousePressed', + 'join', + 'key', + 'keyCode', + 'keyIsDown', + 'keyIsPressed', + 'lerp', + 'lerpColor', + 'line', + 'loadBytes', + 'loadImage', + 'loadJSON', + 'loadPixels', + 'loadStrings', + 'loadTable', + 'loadXML', + 'log', + 'loop', + 'mag', + 'map', + 'match', + 'matchAll', + 'max', + 'millis', + 'min', + 'minute', + 'month', + 'mouseButton', + 'mouseIsPressed', + 'mouseX', + 'mouseY', + 'nf', + 'nfc', + 'nfp', + 'nfs', + 'noCanvas', + 'noCursor', + 'noFill', + 'noLoop', + 'noSmooth', + 'noStroke', + 'noTint', + 'noise', + 'noiseDetail', + 'noiseSeed', + 'norm', + 'onblur', + 'onclick', + 'onkeydown', + 'onkeypress', + 'onkeyup', + 'onmousedown', + 'onmousemove', + 'onmouseup', + 'onmousewheel', + 'onresize', + 'ontouchend', + 'ontouchmove', + 'ontouchstart', + 'parseXML', + 'pixels', + 'pmouseX', + 'pmouseY', + 'point', + 'pop', + 'popMatrix', + 'popStyle', + 'pow', + 'print', + 'printMatrix', + 'println', + 'ptouchX', + 'ptouchY', + 'push', + 'pushMatrix', + 'pushStyle', + 'pwinMouseX', + 'pwinMouseY', + 'quad', + 'quadraticVertex', + 'radians', + 'random', + 'randomGaussian', + 'randomSeed', + 'rect', + 'rectMode', + 'red', + 'redraw', + 'registerMethod', + 'registerPreloadMethod', + 'resetMatrix', + 'resizeCanvas', + 'reverse', + 'rotate', + 'rotateX', + 'rotateY', + 'round', + 'saturation', + 'save', + 'saveBytes', + 'saveCanvas', + 'saveFrames', + 'saveJSON', + 'saveJSONArray', + 'saveJSONObject', + 'saveStream', + 'saveStrings', + 'saveTable', + 'saveXML', + 'scale', + 'second', + 'selectFolder', + 'selectInput', + 'selectOutput', + 'set', + 'setFrameRate', + 'setup', + 'shearX', + 'shearY', + 'shorten', + 'sin', + 'size', + 'smooth', + 'sort', + 'splice', + 'split', + 'splitTokens', + 'sq', + 'sqrt', + 'stroke', + 'strokeCap', + 'strokeJoin', + 'strokeWeight', + 'subset', + 'tan', + 'text', + 'textAlign', + 'textAscent', + 'textDescent', + 'textFont', + 'textLeading', + 'textSize', + 'textStyle', + 'textWidth', + 'tint', + 'touchIsDown', + 'touchX', + 'touchY', + 'touches', + 'translate', + 'triangle', + 'trim', + 'updatePixels', + 'vertex', + 'width', + 'winMouseX', + 'winMouseY', + 'windowHeight', + 'windowWidth', + 'writeFile', + 'year', + ], + }, }; diff --git a/src/config/libraryAssets.js b/src/config/libraryAssets.js index 49ae6397e0..65b2f25d4e 100644 --- a/src/config/libraryAssets.js +++ b/src/config/libraryAssets.js @@ -7,6 +7,7 @@ import BOOTSTRAP_CSS from '../../bower_components/bootstrap/dist/css/bootstrap.min.css'; import BOOTSTRAP_JS from '../../bower_components/bootstrap/dist/js/bootstrap.min.js'; +import P5 from '../../bower_components/p5js/lib/p5.min.js'; export const jquery = {javascript: JQUERY}; @@ -15,3 +16,5 @@ export const lodash = {javascript: LODASH}; export const mustache = {javascript: MUSTACHE}; export const bootstrap = {css: BOOTSTRAP_CSS, javascript: BOOTSTRAP_JS}; + +export const p5 = {javascript: P5}; diff --git a/yarn.lock b/yarn.lock index 98aa18431e..a887bfcdfa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6368,6 +6368,10 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-bin-setup@^1.0.0: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-bin-setup/-/node-bin-setup-1.0.6.tgz#4b5c9bb937ece702d7069b36ca78af4684677528" + node-fetch@1.6.3: version "1.6.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" @@ -6476,6 +6480,12 @@ node-static@^0.7.9: mime "^1.2.9" optimist ">=0.3.4" +node@^9.4.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/node/-/node-9.4.0.tgz#607459ecd79af0f91e74318124bec0537644cdee" + dependencies: + node-bin-setup "^1.0.0" + nopt@3.0.x: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" From f47bff1c046e0fa9fdd913d9caa6b82553c6c0df Mon Sep 17 00:00:00 2001 From: Derrick McMillen Date: Fri, 26 Jan 2018 07:28:50 -0800 Subject: [PATCH 2/2] Removing arbitrary addition to yarn.lock --- yarn.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a887bfcdfa..fc08f03817 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6482,9 +6482,6 @@ node-static@^0.7.9: node@^9.4.0: version "9.4.0" - resolved "https://registry.yarnpkg.com/node/-/node-9.4.0.tgz#607459ecd79af0f91e74318124bec0537644cdee" - dependencies: - node-bin-setup "^1.0.0" nopt@3.0.x: version "3.0.6"