From f5c7c1497c1b5742448eeeee158aaf4b420d6eac Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 22:08:10 -0400 Subject: [PATCH 1/7] add back kind labels and ghost previews to hinter --- client/utils/p5-hinter.js | 2 +- server/scripts/update-p5-hinter.js | 46 ++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/client/utils/p5-hinter.js b/client/utils/p5-hinter.js index a9c8c38c75..dee7c9870b 100644 --- a/client/utils/p5-hinter.js +++ b/client/utils/p5-hinter.js @@ -1,3 +1,3 @@ /* eslint-disable */ /* generated: do not edit! helper file for hinter. generated by update-p5-hinter script */ -exports.p5Hinter = [{"label":"describe","type":"method","params":[{"p":"text","o":false},{"p":"display","o":true}],"p5DocPath":"describe"},{"label":"describeElement","type":"method","params":[{"p":"name","o":false},{"p":"text","o":false},{"p":"display","o":true}],"p5DocPath":"describeElement"},{"label":"textOutput","type":"method","params":[{"p":"display","o":true}],"p5DocPath":"textOutput"},{"label":"gridOutput","type":"method","params":[{"p":"display","o":true}],"p5DocPath":"gridOutput"},{"label":"alpha","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"alpha"},{"label":"blue","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"blue"},{"label":"brightness","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"brightness"},{"label":"color","type":"method","p5DocPath":"color"},{"label":"green","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"green"},{"label":"hue","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"hue"},{"label":"lerpColor","type":"method","params":[{"p":"c1","o":false},{"p":"c2","o":false},{"p":"amt","o":false}],"p5DocPath":"lerpColor"},{"label":"paletteLerp","type":"method","params":[{"p":"colors_stops","o":false},{"p":"amt","o":false}],"p5DocPath":"paletteLerp"},{"label":"lightness","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"lightness"},{"label":"red","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"red"},{"label":"saturation","type":"method","params":[{"p":"color","o":false}],"p5DocPath":"saturation"},{"label":"beginClip","type":"method","params":[{"p":"options","o":true}],"p5DocPath":"beginClip"},{"label":"endClip","type":"method","p5DocPath":"endClip"},{"label":"clip","type":"method","params":[{"p":"callback","o":false},{"p":"options","o":true}],"p5DocPath":"clip"},{"label":"background","type":"method","p5DocPath":"background"},{"label":"clear","type":"method","params":[{"p":"r","o":true},{"p":"g","o":true},{"p":"b","o":true},{"p":"a","o":true}],"p5DocPath":"clear"},{"label":"colorMode","type":"method","p5DocPath":"colorMode"},{"label":"fill","type":"method","p5DocPath":"fill"},{"label":"noFill","type":"method","p5DocPath":"noFill"},{"label":"noStroke","type":"method","p5DocPath":"noStroke"},{"label":"stroke","type":"method","p5DocPath":"stroke"},{"label":"erase","type":"method","params":[{"p":"strengthFill","o":true},{"p":"strengthStroke","o":true}],"p5DocPath":"erase"},{"label":"noErase","type":"method","p5DocPath":"noErase"},{"label":"arc","type":"method","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"w","o":false},{"p":"h","o":false},{"p":"start","o":false},{"p":"stop","o":false},{"p":"mode","o":true},{"p":"detail","o":true}],"p5DocPath":"arc"},{"label":"ellipse","type":"method","p5DocPath":"ellipse"},{"label":"circle","type":"method","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"d","o":false}],"p5DocPath":"circle"},{"label":"line","type":"method","p5DocPath":"line"},{"label":"point","type":"method","p5DocPath":"point"},{"label":"quad","type":"method","p5DocPath":"quad"},{"label":"rect","type":"method","p5DocPath":"rect"},{"label":"square","type":"method","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"s","o":false},{"p":"tl","o":true},{"p":"tr","o":true},{"p":"br","o":true},{"p":"bl","o":true}],"p5DocPath":"square"},{"label":"triangle","type":"method","params":[{"p":"x1","o":false},{"p":"y1","o":false},{"p":"x2","o":false},{"p":"y2","o":false},{"p":"x3","o":false},{"p":"y3","o":false}],"p5DocPath":"triangle"},{"label":"ellipseMode","type":"method","params":[{"p":"mode","o":false}],"p5DocPath":"ellipseMode"},{"label":"noSmooth","type":"method","p5DocPath":"noSmooth"},{"label":"rectMode","type":"method","params":[{"p":"mode","o":false}],"p5DocPath":"rectMode"},{"label":"smooth","type":"method","p5DocPath":"smooth"},{"label":"strokeCap","type":"method","params":[{"p":"cap","o":false}],"p5DocPath":"strokeCap"},{"label":"strokeJoin","type":"method","params":[{"p":"join","o":false}],"p5DocPath":"strokeJoin"},{"label":"strokeWeight","type":"method","params":[{"p":"weight","o":false}],"p5DocPath":"strokeWeight"},{"label":"bezier","type":"method","p5DocPath":"bezier"},{"label":"bezierDetail","type":"method","params":[{"p":"detail","o":false}],"p5DocPath":"bezierDetail"},{"label":"bezierPoint","type":"method","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"p5DocPath":"bezierPoint"},{"label":"bezierTangent","type":"method","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"p5DocPath":"bezierTangent"},{"label":"curve","type":"method","p5DocPath":"curve"},{"label":"curveDetail","type":"method","params":[{"p":"resolution","o":false}],"p5DocPath":"curveDetail"},{"label":"curveTightness","type":"method","params":[{"p":"amount","o":false}],"p5DocPath":"curveTightness"},{"label":"curvePoint","type":"method","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"p5DocPath":"curvePoint"},{"label":"curveTangent","type":"method","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"p5DocPath":"curveTangent"},{"label":"beginContour","type":"method","p5DocPath":"beginContour"},{"label":"beginShape","type":"method","params":[{"p":"kind","o":true}],"p5DocPath":"beginShape"},{"label":"bezierVertex","type":"method","p5DocPath":"bezierVertex"},{"label":"curveVertex","type":"method","p5DocPath":"curveVertex"},{"label":"endContour","type":"method","p5DocPath":"endContour"},{"label":"endShape","type":"method","params":[{"p":"mode","o":true},{"p":"count","o":true}],"p5DocPath":"endShape"},{"label":"quadraticVertex","type":"method","p5DocPath":"quadraticVertex"},{"label":"vertex","type":"method","p5DocPath":"vertex"},{"label":"normal","type":"method","p5DocPath":"normal"},{"label":"VERSION","type":"constant","params":[],"p5DocPath":"VERSION"},{"label":"P2D","type":"constant","params":[],"p5DocPath":"P2D"},{"label":"WEBGL","type":"constant","params":[],"p5DocPath":"WEBGL"},{"label":"WEBGL2","type":"constant","params":[],"p5DocPath":"WEBGL2"},{"label":"ARROW","type":"constant","params":[],"p5DocPath":"ARROW"},{"label":"CROSS","type":"constant","params":[],"p5DocPath":"CROSS"},{"label":"HAND","type":"constant","params":[],"p5DocPath":"HAND"},{"label":"MOVE","type":"constant","params":[],"p5DocPath":"MOVE"},{"label":"TEXT","type":"constant","params":[],"p5DocPath":"TEXT"},{"label":"WAIT","type":"constant","params":[],"p5DocPath":"WAIT"},{"label":"HALF_PI","type":"constant","params":[],"p5DocPath":"HALF_PI"},{"label":"PI","type":"constant","params":[],"p5DocPath":"PI"},{"label":"QUARTER_PI","type":"constant","params":[],"p5DocPath":"QUARTER_PI"},{"label":"TAU","type":"constant","params":[],"p5DocPath":"TAU"},{"label":"TWO_PI","type":"constant","params":[],"p5DocPath":"TWO_PI"},{"label":"DEGREES","type":"constant","params":[],"p5DocPath":"DEGREES"},{"label":"RADIANS","type":"constant","params":[],"p5DocPath":"RADIANS"},{"label":"CORNER","type":"constant","params":[],"p5DocPath":"CORNER"},{"label":"CORNERS","type":"constant","params":[],"p5DocPath":"CORNERS"},{"label":"RADIUS","type":"constant","params":[],"p5DocPath":"RADIUS"},{"label":"RIGHT","type":"constant","params":[],"p5DocPath":"RIGHT"},{"label":"LEFT","type":"constant","params":[],"p5DocPath":"LEFT"},{"label":"CENTER","type":"constant","params":[],"p5DocPath":"CENTER"},{"label":"TOP","type":"constant","params":[],"p5DocPath":"TOP"},{"label":"BOTTOM","type":"constant","params":[],"p5DocPath":"BOTTOM"},{"label":"BASELINE","type":"constant","params":[],"p5DocPath":"BASELINE"},{"label":"POINTS","type":"constant","params":[],"p5DocPath":"POINTS"},{"label":"LINES","type":"constant","params":[],"p5DocPath":"LINES"},{"label":"LINE_STRIP","type":"constant","params":[],"p5DocPath":"LINE_STRIP"},{"label":"LINE_LOOP","type":"constant","params":[],"p5DocPath":"LINE_LOOP"},{"label":"TRIANGLES","type":"constant","params":[],"p5DocPath":"TRIANGLES"},{"label":"TRIANGLE_FAN","type":"constant","params":[],"p5DocPath":"TRIANGLE_FAN"},{"label":"TRIANGLE_STRIP","type":"constant","params":[],"p5DocPath":"TRIANGLE_STRIP"},{"label":"QUADS","type":"constant","params":[],"p5DocPath":"QUADS"},{"label":"QUAD_STRIP","type":"constant","params":[],"p5DocPath":"QUAD_STRIP"},{"label":"TESS","type":"constant","params":[],"p5DocPath":"TESS"},{"label":"CLOSE","type":"constant","params":[],"p5DocPath":"CLOSE"},{"label":"OPEN","type":"constant","params":[],"p5DocPath":"OPEN"},{"label":"CHORD","type":"constant","params":[],"p5DocPath":"CHORD"},{"label":"PIE","type":"constant","params":[],"p5DocPath":"PIE"},{"label":"PROJECT","type":"constant","params":[],"p5DocPath":"PROJECT"},{"label":"SQUARE","type":"constant","params":[],"p5DocPath":"SQUARE"},{"label":"ROUND","type":"constant","params":[],"p5DocPath":"ROUND"},{"label":"BEVEL","type":"constant","params":[],"p5DocPath":"BEVEL"},{"label":"MITER","type":"constant","params":[],"p5DocPath":"MITER"},{"label":"RGB","type":"constant","params":[],"p5DocPath":"RGB"},{"label":"HSB","type":"constant","params":[],"p5DocPath":"HSB"},{"label":"HSL","type":"constant","params":[],"p5DocPath":"HSL"},{"label":"AUTO","type":"constant","params":[],"p5DocPath":"AUTO"},{"label":"ALT","type":"constant","params":[],"p5DocPath":"ALT"},{"label":"BACKSPACE","type":"constant","params":[],"p5DocPath":"BACKSPACE"},{"label":"CONTROL","type":"constant","params":[],"p5DocPath":"CONTROL"},{"label":"DELETE","type":"constant","params":[],"p5DocPath":"DELETE"},{"label":"DOWN_ARROW","type":"constant","params":[],"p5DocPath":"DOWN_ARROW"},{"label":"ENTER","type":"constant","params":[],"p5DocPath":"ENTER"},{"label":"ESCAPE","type":"constant","params":[],"p5DocPath":"ESCAPE"},{"label":"LEFT_ARROW","type":"constant","params":[],"p5DocPath":"LEFT_ARROW"},{"label":"OPTION","type":"constant","params":[],"p5DocPath":"OPTION"},{"label":"RETURN","type":"constant","params":[],"p5DocPath":"RETURN"},{"label":"RIGHT_ARROW","type":"constant","params":[],"p5DocPath":"RIGHT_ARROW"},{"label":"SHIFT","type":"constant","params":[],"p5DocPath":"SHIFT"},{"label":"TAB","type":"constant","params":[],"p5DocPath":"TAB"},{"label":"UP_ARROW","type":"constant","params":[],"p5DocPath":"UP_ARROW"},{"label":"BLEND","type":"constant","params":[],"p5DocPath":"BLEND"},{"label":"REMOVE","type":"constant","params":[],"p5DocPath":"REMOVE"},{"label":"ADD","type":"constant","params":[],"p5DocPath":"ADD"},{"label":"DARKEST","type":"constant","params":[],"p5DocPath":"DARKEST"},{"label":"LIGHTEST","type":"constant","params":[],"p5DocPath":"LIGHTEST"},{"label":"DIFFERENCE","type":"constant","params":[],"p5DocPath":"DIFFERENCE"},{"label":"SUBTRACT","type":"constant","params":[],"p5DocPath":"SUBTRACT"},{"label":"EXCLUSION","type":"constant","params":[],"p5DocPath":"EXCLUSION"},{"label":"MULTIPLY","type":"constant","params":[],"p5DocPath":"MULTIPLY"},{"label":"SCREEN","type":"constant","params":[],"p5DocPath":"SCREEN"},{"label":"REPLACE","type":"constant","params":[],"p5DocPath":"REPLACE"},{"label":"OVERLAY","type":"constant","params":[],"p5DocPath":"OVERLAY"},{"label":"HARD_LIGHT","type":"constant","params":[],"p5DocPath":"HARD_LIGHT"},{"label":"SOFT_LIGHT","type":"constant","params":[],"p5DocPath":"SOFT_LIGHT"},{"label":"DODGE","type":"constant","params":[],"p5DocPath":"DODGE"},{"label":"BURN","type":"constant","params":[],"p5DocPath":"BURN"},{"label":"THRESHOLD","type":"constant","params":[],"p5DocPath":"THRESHOLD"},{"label":"GRAY","type":"constant","params":[],"p5DocPath":"GRAY"},{"label":"OPAQUE","type":"constant","params":[],"p5DocPath":"OPAQUE"},{"label":"INVERT","type":"constant","params":[],"p5DocPath":"INVERT"},{"label":"POSTERIZE","type":"constant","params":[],"p5DocPath":"POSTERIZE"},{"label":"DILATE","type":"constant","params":[],"p5DocPath":"DILATE"},{"label":"ERODE","type":"constant","params":[],"p5DocPath":"ERODE"},{"label":"BLUR","type":"constant","params":[],"p5DocPath":"BLUR"},{"label":"NORMAL","type":"constant","params":[],"p5DocPath":"NORMAL"},{"label":"ITALIC","type":"constant","params":[],"p5DocPath":"ITALIC"},{"label":"BOLD","type":"constant","params":[],"p5DocPath":"BOLD"},{"label":"BOLDITALIC","type":"constant","params":[],"p5DocPath":"BOLDITALIC"},{"label":"CHAR","type":"constant","params":[],"p5DocPath":"CHAR"},{"label":"WORD","type":"constant","params":[],"p5DocPath":"WORD"},{"label":"LINEAR","type":"constant","params":[],"p5DocPath":"LINEAR"},{"label":"QUADRATIC","type":"constant","params":[],"p5DocPath":"QUADRATIC"},{"label":"BEZIER","type":"constant","params":[],"p5DocPath":"BEZIER"},{"label":"CURVE","type":"constant","params":[],"p5DocPath":"CURVE"},{"label":"STROKE","type":"constant","params":[],"p5DocPath":"STROKE"},{"label":"FILL","type":"constant","params":[],"p5DocPath":"FILL"},{"label":"TEXTURE","type":"constant","params":[],"p5DocPath":"TEXTURE"},{"label":"IMMEDIATE","type":"constant","params":[],"p5DocPath":"IMMEDIATE"},{"label":"IMAGE","type":"constant","params":[],"p5DocPath":"IMAGE"},{"label":"NEAREST","type":"constant","params":[],"p5DocPath":"NEAREST"},{"label":"REPEAT","type":"constant","params":[],"p5DocPath":"REPEAT"},{"label":"CLAMP","type":"constant","params":[],"p5DocPath":"CLAMP"},{"label":"MIRROR","type":"constant","params":[],"p5DocPath":"MIRROR"},{"label":"FLAT","type":"constant","params":[],"p5DocPath":"FLAT"},{"label":"SMOOTH","type":"constant","params":[],"p5DocPath":"SMOOTH"},{"label":"LANDSCAPE","type":"constant","params":[],"p5DocPath":"LANDSCAPE"},{"label":"PORTRAIT","type":"constant","params":[],"p5DocPath":"PORTRAIT"},{"label":"GRID","type":"constant","params":[],"p5DocPath":"GRID"},{"label":"AXES","type":"constant","params":[],"p5DocPath":"AXES"},{"label":"LABEL","type":"constant","params":[],"p5DocPath":"LABEL"},{"label":"FALLBACK","type":"constant","params":[],"p5DocPath":"FALLBACK"},{"label":"CONTAIN","type":"constant","params":[],"p5DocPath":"CONTAIN"},{"label":"COVER","type":"constant","params":[],"p5DocPath":"COVER"},{"label":"UNSIGNED_BYTE","type":"constant","params":[],"p5DocPath":"UNSIGNED_BYTE"},{"label":"UNSIGNED_INT","type":"constant","params":[],"p5DocPath":"UNSIGNED_INT"},{"label":"FLOAT","type":"constant","params":[],"p5DocPath":"FLOAT"},{"label":"HALF_FLOAT","type":"constant","params":[],"p5DocPath":"HALF_FLOAT"},{"label":"RGBA","type":"constant","params":[],"p5DocPath":"RGBA"},{"label":"print","type":"method","params":[{"p":"contents","o":false}],"p5DocPath":"print"},{"label":"frameCount","type":"variable","params":[],"p5DocPath":"frameCount"},{"label":"deltaTime","type":"variable","params":[],"p5DocPath":"deltaTime"},{"label":"focused","type":"variable","params":[],"p5DocPath":"focused"},{"label":"cursor","type":"method","params":[{"p":"type","o":false},{"p":"x","o":true},{"p":"y","o":true}],"p5DocPath":"cursor"},{"label":"frameRate","type":"method","p5DocPath":"frameRate"},{"label":"getTargetFrameRate","type":"method","p5DocPath":"getTargetFrameRate"},{"label":"noCursor","type":"method","p5DocPath":"noCursor"},{"label":"webglVersion","type":"variable","params":[],"p5DocPath":"webglVersion"},{"label":"displayWidth","type":"variable","params":[],"p5DocPath":"displayWidth"},{"label":"displayHeight","type":"variable","params":[],"p5DocPath":"displayHeight"},{"label":"windowWidth","type":"variable","params":[],"p5DocPath":"windowWidth"},{"label":"windowHeight","type":"variable","params":[],"p5DocPath":"windowHeight"},{"label":"windowResized","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"windowResized"},{"label":"width","type":"variable","params":[],"p5DocPath":"width"},{"label":"height","type":"variable","params":[],"p5DocPath":"height"},{"label":"fullscreen","type":"method","params":[{"p":"val","o":true}],"p5DocPath":"fullscreen"},{"label":"pixelDensity","type":"method","p5DocPath":"pixelDensity"},{"label":"displayDensity","type":"method","p5DocPath":"displayDensity"},{"label":"getURL","type":"method","p5DocPath":"getURL"},{"label":"getURLPath","type":"method","p5DocPath":"getURLPath"},{"label":"getURLParams","type":"method","p5DocPath":"getURLParams"},{"label":"preload","type":"method","p5DocPath":"preload"},{"label":"setup","type":"method","p5DocPath":"setup"},{"label":"draw","type":"method","p5DocPath":"draw"},{"label":"remove","type":"method","p5DocPath":"remove"},{"label":"disableFriendlyErrors","type":"variable","params":[],"p5DocPath":"disableFriendlyErrors"},{"label":"createCanvas","type":"method","p5DocPath":"createCanvas"},{"label":"resizeCanvas","type":"method","params":[{"p":"width","o":false},{"p":"height","o":false},{"p":"noRedraw","o":true}],"p5DocPath":"resizeCanvas"},{"label":"noCanvas","type":"method","p5DocPath":"noCanvas"},{"label":"createGraphics","type":"method","p5DocPath":"createGraphics"},{"label":"createFramebuffer","type":"method","params":[{"p":"options","o":true}],"p5DocPath":"createFramebuffer"},{"label":"clearDepth","type":"method","params":[{"p":"depth","o":true}],"p5DocPath":"clearDepth"},{"label":"blendMode","type":"method","params":[{"p":"mode","o":false}],"p5DocPath":"blendMode"},{"label":"drawingContext","type":"variable","params":[],"p5DocPath":"drawingContext"},{"label":"noLoop","type":"method","p5DocPath":"noLoop"},{"label":"loop","type":"method","p5DocPath":"loop"},{"label":"isLooping","type":"method","p5DocPath":"isLooping"},{"label":"push","type":"method","p5DocPath":"push"},{"label":"pop","type":"method","p5DocPath":"pop"},{"label":"redraw","type":"method","params":[{"p":"n","o":true}],"p5DocPath":"redraw"},{"label":"p5","type":"method","params":[{"p":"sketch","o":false},{"p":"node","o":false}],"p5DocPath":"p5"},{"label":"applyMatrix","type":"method","p5DocPath":"applyMatrix"},{"label":"resetMatrix","type":"method","p5DocPath":"resetMatrix"},{"label":"rotate","type":"method","params":[{"p":"angle","o":false},{"p":"axis","o":true}],"p5DocPath":"rotate"},{"label":"rotateX","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"rotateX"},{"label":"rotateY","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"rotateY"},{"label":"rotateZ","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"rotateZ"},{"label":"scale","type":"method","p5DocPath":"scale"},{"label":"shearX","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"shearX"},{"label":"shearY","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"shearY"},{"label":"translate","type":"method","p5DocPath":"translate"},{"label":"storeItem","type":"method","params":[{"p":"key","o":false},{"p":"value","o":false}],"p5DocPath":"storeItem"},{"label":"getItem","type":"method","params":[{"p":"key","o":false}],"p5DocPath":"getItem"},{"label":"clearStorage","type":"method","p5DocPath":"clearStorage"},{"label":"removeItem","type":"method","params":[{"p":"key","o":false}],"p5DocPath":"removeItem"},{"label":"createStringDict","type":"method","p5DocPath":"createStringDict"},{"label":"createNumberDict","type":"method","p5DocPath":"createNumberDict"},{"label":"select","type":"method","params":[{"p":"selectors","o":false},{"p":"container","o":true}],"p5DocPath":"select"},{"label":"selectAll","type":"method","params":[{"p":"selectors","o":false},{"p":"container","o":true}],"p5DocPath":"selectAll"},{"label":"removeElements","type":"method","p5DocPath":"removeElements"},{"label":"changed","type":"method","params":[{"p":"fxn","o":false}],"p5DocPath":"changed"},{"label":"input","type":"method","params":[{"p":"fxn","o":false}],"p5DocPath":"input"},{"label":"createDiv","type":"method","params":[{"p":"html","o":true}],"p5DocPath":"createDiv"},{"label":"createP","type":"method","params":[{"p":"html","o":true}],"p5DocPath":"createP"},{"label":"createSpan","type":"method","params":[{"p":"html","o":true}],"p5DocPath":"createSpan"},{"label":"createImg","type":"method","p5DocPath":"createImg"},{"label":"createA","type":"method","params":[{"p":"href","o":false},{"p":"html","o":false},{"p":"target","o":true}],"p5DocPath":"createA"},{"label":"createSlider","type":"method","params":[{"p":"min","o":false},{"p":"max","o":false},{"p":"value","o":true},{"p":"step","o":true}],"p5DocPath":"createSlider"},{"label":"createButton","type":"method","params":[{"p":"label","o":false},{"p":"value","o":true}],"p5DocPath":"createButton"},{"label":"createCheckbox","type":"method","params":[{"p":"label","o":true},{"p":"value","o":true}],"p5DocPath":"createCheckbox"},{"label":"createSelect","type":"method","p5DocPath":"createSelect"},{"label":"createRadio","type":"method","p5DocPath":"createRadio"},{"label":"createColorPicker","type":"method","params":[{"p":"value","o":true}],"p5DocPath":"createColorPicker"},{"label":"createInput","type":"method","p5DocPath":"createInput"},{"label":"createFileInput","type":"method","params":[{"p":"callback","o":false},{"p":"multiple","o":true}],"p5DocPath":"createFileInput"},{"label":"createVideo","type":"method","params":[{"p":"src","o":false},{"p":"callback","o":true}],"p5DocPath":"createVideo"},{"label":"createAudio","type":"method","params":[{"p":"src","o":true},{"p":"callback","o":true}],"p5DocPath":"createAudio"},{"label":"createCapture","type":"method","params":[{"p":"type","o":true},{"p":"flipped","o":true},{"p":"callback","o":true}],"p5DocPath":"createCapture"},{"label":"createElement","type":"method","params":[{"p":"tag","o":false},{"p":"content","o":true}],"p5DocPath":"createElement"},{"label":"deviceOrientation","type":"variable","params":[],"p5DocPath":"deviceOrientation"},{"label":"accelerationX","type":"variable","params":[],"p5DocPath":"accelerationX"},{"label":"accelerationY","type":"variable","params":[],"p5DocPath":"accelerationY"},{"label":"accelerationZ","type":"variable","params":[],"p5DocPath":"accelerationZ"},{"label":"pAccelerationX","type":"variable","params":[],"p5DocPath":"pAccelerationX"},{"label":"pAccelerationY","type":"variable","params":[],"p5DocPath":"pAccelerationY"},{"label":"pAccelerationZ","type":"variable","params":[],"p5DocPath":"pAccelerationZ"},{"label":"rotationX","type":"variable","params":[],"p5DocPath":"rotationX"},{"label":"rotationY","type":"variable","params":[],"p5DocPath":"rotationY"},{"label":"rotationZ","type":"variable","params":[],"p5DocPath":"rotationZ"},{"label":"pRotationX","type":"variable","params":[],"p5DocPath":"pRotationX"},{"label":"pRotationY","type":"variable","params":[],"p5DocPath":"pRotationY"},{"label":"pRotationZ","type":"variable","params":[],"p5DocPath":"pRotationZ"},{"label":"turnAxis","type":"variable","params":[],"p5DocPath":"turnAxis"},{"label":"setMoveThreshold","type":"method","params":[{"p":"value","o":false}],"p5DocPath":"setMoveThreshold"},{"label":"setShakeThreshold","type":"method","params":[{"p":"value","o":false}],"p5DocPath":"setShakeThreshold"},{"label":"deviceMoved","type":"method","p5DocPath":"deviceMoved"},{"label":"deviceTurned","type":"method","p5DocPath":"deviceTurned"},{"label":"deviceShaken","type":"method","p5DocPath":"deviceShaken"},{"label":"keyIsPressed","type":"variable","params":[],"p5DocPath":"keyIsPressed"},{"label":"key","type":"variable","params":[],"p5DocPath":"key"},{"label":"keyCode","type":"variable","params":[],"p5DocPath":"keyCode"},{"label":"keyPressed","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"keyPressed"},{"label":"keyReleased","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"keyReleased"},{"label":"keyTyped","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"keyTyped"},{"label":"keyIsDown","type":"method","params":[{"p":"code","o":false}],"p5DocPath":"keyIsDown"},{"label":"movedX","type":"variable","params":[],"p5DocPath":"movedX"},{"label":"movedY","type":"variable","params":[],"p5DocPath":"movedY"},{"label":"mouseX","type":"variable","params":[],"p5DocPath":"mouseX"},{"label":"mouseY","type":"variable","params":[],"p5DocPath":"mouseY"},{"label":"pmouseX","type":"variable","params":[],"p5DocPath":"pmouseX"},{"label":"pmouseY","type":"variable","params":[],"p5DocPath":"pmouseY"},{"label":"winMouseX","type":"variable","params":[],"p5DocPath":"winMouseX"},{"label":"winMouseY","type":"variable","params":[],"p5DocPath":"winMouseY"},{"label":"pwinMouseX","type":"variable","params":[],"p5DocPath":"pwinMouseX"},{"label":"pwinMouseY","type":"variable","params":[],"p5DocPath":"pwinMouseY"},{"label":"mouseButton","type":"variable","params":[],"p5DocPath":"mouseButton"},{"label":"mouseIsPressed","type":"variable","params":[],"p5DocPath":"mouseIsPressed"},{"label":"mouseMoved","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mouseMoved"},{"label":"mouseDragged","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mouseDragged"},{"label":"mousePressed","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mousePressed"},{"label":"mouseReleased","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mouseReleased"},{"label":"mouseClicked","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mouseClicked"},{"label":"doubleClicked","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"doubleClicked"},{"label":"mouseWheel","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"mouseWheel"},{"label":"requestPointerLock","type":"method","p5DocPath":"requestPointerLock"},{"label":"exitPointerLock","type":"method","p5DocPath":"exitPointerLock"},{"label":"touches","type":"variable","params":[],"p5DocPath":"touches"},{"label":"touchStarted","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"touchStarted"},{"label":"touchMoved","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"touchMoved"},{"label":"touchEnded","type":"method","params":[{"p":"event","o":true}],"p5DocPath":"touchEnded"},{"label":"createImage","type":"method","params":[{"p":"width","o":false},{"p":"height","o":false}],"p5DocPath":"createImage"},{"label":"saveCanvas","type":"method","p5DocPath":"saveCanvas"},{"label":"saveFrames","type":"method","params":[{"p":"filename","o":false},{"p":"extension","o":false},{"p":"duration","o":false},{"p":"framerate","o":false},{"p":"callback","o":true}],"p5DocPath":"saveFrames"},{"label":"loadImage","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"p5DocPath":"loadImage"},{"label":"saveGif","type":"method","params":[{"p":"filename","o":false},{"p":"duration","o":false},{"p":"options","o":true}],"p5DocPath":"saveGif"},{"label":"image","type":"method","p5DocPath":"image"},{"label":"tint","type":"method","p5DocPath":"tint"},{"label":"noTint","type":"method","p5DocPath":"noTint"},{"label":"imageMode","type":"method","params":[{"p":"mode","o":false}],"p5DocPath":"imageMode"},{"label":"pixels","type":"variable","params":[],"p5DocPath":"pixels"},{"label":"blend","type":"method","p5DocPath":"blend"},{"label":"copy","type":"method","p5DocPath":"copy"},{"label":"filter","type":"method","p5DocPath":"filter"},{"label":"get","type":"method","p5DocPath":"get"},{"label":"loadPixels","type":"method","p5DocPath":"loadPixels"},{"label":"set","type":"method","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"c","o":false}],"p5DocPath":"set"},{"label":"updatePixels","type":"method","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"w","o":true},{"p":"h","o":true}],"p5DocPath":"updatePixels"},{"label":"loadJSON","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"loadJSON"},{"label":"loadStrings","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"loadStrings"},{"label":"loadTable","type":"method","params":[{"p":"filename","o":false},{"p":"extension","o":true},{"p":"header","o":true},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"loadTable"},{"label":"loadXML","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"loadXML"},{"label":"loadBytes","type":"method","params":[{"p":"file","o":false},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"loadBytes"},{"label":"httpGet","type":"method","p5DocPath":"httpGet"},{"label":"httpPost","type":"method","p5DocPath":"httpPost"},{"label":"httpDo","type":"method","p5DocPath":"httpDo"},{"label":"createWriter","type":"method","params":[{"p":"name","o":false},{"p":"extension","o":true}],"p5DocPath":"createWriter"},{"label":"save","type":"method","params":[{"p":"objectOrFilename","o":true},{"p":"filename","o":true},{"p":"options","o":true}],"p5DocPath":"save"},{"label":"saveJSON","type":"method","params":[{"p":"json","o":false},{"p":"filename","o":false},{"p":"optimize","o":true}],"p5DocPath":"saveJSON"},{"label":"saveStrings","type":"method","params":[{"p":"list","o":false},{"p":"filename","o":false},{"p":"extension","o":true},{"p":"isCRLF","o":true}],"p5DocPath":"saveStrings"},{"label":"saveTable","type":"method","params":[{"p":"Table","o":false},{"p":"filename","o":false},{"p":"options","o":true}],"p5DocPath":"saveTable"},{"label":"abs","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"abs"},{"label":"ceil","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"ceil"},{"label":"constrain","type":"method","params":[{"p":"n","o":false},{"p":"low","o":false},{"p":"high","o":false}],"p5DocPath":"constrain"},{"label":"dist","type":"method","p5DocPath":"dist"},{"label":"exp","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"exp"},{"label":"floor","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"floor"},{"label":"lerp","type":"method","params":[{"p":"start","o":false},{"p":"stop","o":false},{"p":"amt","o":false}],"p5DocPath":"lerp"},{"label":"log","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"log"},{"label":"mag","type":"method","params":[{"p":"x","o":false},{"p":"y","o":false}],"p5DocPath":"mag"},{"label":"map","type":"method","params":[{"p":"value","o":false},{"p":"start1","o":false},{"p":"stop1","o":false},{"p":"start2","o":false},{"p":"stop2","o":false},{"p":"withinBounds","o":true}],"p5DocPath":"map"},{"label":"max","type":"method","p5DocPath":"max"},{"label":"min","type":"method","p5DocPath":"min"},{"label":"norm","type":"method","params":[{"p":"value","o":false},{"p":"start","o":false},{"p":"stop","o":false}],"p5DocPath":"norm"},{"label":"pow","type":"method","params":[{"p":"n","o":false},{"p":"e","o":false}],"p5DocPath":"pow"},{"label":"round","type":"method","params":[{"p":"n","o":false},{"p":"decimals","o":true}],"p5DocPath":"round"},{"label":"sq","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"sq"},{"label":"sqrt","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"sqrt"},{"label":"fract","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"fract"},{"label":"createVector","type":"method","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"z","o":true}],"p5DocPath":"createVector"},{"label":"noise","type":"method","params":[{"p":"x","o":false},{"p":"y","o":true},{"p":"z","o":true}],"p5DocPath":"noise"},{"label":"noiseDetail","type":"method","params":[{"p":"lod","o":false},{"p":"falloff","o":false}],"p5DocPath":"noiseDetail"},{"label":"noiseSeed","type":"method","params":[{"p":"seed","o":false}],"p5DocPath":"noiseSeed"},{"label":"randomSeed","type":"method","params":[{"p":"seed","o":false}],"p5DocPath":"randomSeed"},{"label":"random","type":"method","p5DocPath":"random"},{"label":"randomGaussian","type":"method","params":[{"p":"mean","o":true},{"p":"sd","o":true}],"p5DocPath":"randomGaussian"},{"label":"acos","type":"method","params":[{"p":"value","o":false}],"p5DocPath":"acos"},{"label":"asin","type":"method","params":[{"p":"value","o":false}],"p5DocPath":"asin"},{"label":"atan","type":"method","params":[{"p":"value","o":false}],"p5DocPath":"atan"},{"label":"atan2","type":"method","params":[{"p":"y","o":false},{"p":"x","o":false}],"p5DocPath":"atan2"},{"label":"cos","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"cos"},{"label":"sin","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"sin"},{"label":"tan","type":"method","params":[{"p":"angle","o":false}],"p5DocPath":"tan"},{"label":"degrees","type":"method","params":[{"p":"radians","o":false}],"p5DocPath":"degrees"},{"label":"radians","type":"method","params":[{"p":"degrees","o":false}],"p5DocPath":"radians"},{"label":"angleMode","type":"method","p5DocPath":"angleMode"},{"label":"textAlign","type":"method","p5DocPath":"textAlign"},{"label":"textLeading","type":"method","p5DocPath":"textLeading"},{"label":"textSize","type":"method","p5DocPath":"textSize"},{"label":"textStyle","type":"method","p5DocPath":"textStyle"},{"label":"textWidth","type":"method","params":[{"p":"str","o":false}],"p5DocPath":"textWidth"},{"label":"textAscent","type":"method","p5DocPath":"textAscent"},{"label":"textDescent","type":"method","p5DocPath":"textDescent"},{"label":"textWrap","type":"method","params":[{"p":"style","o":false}],"p5DocPath":"textWrap"},{"label":"loadFont","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"p5DocPath":"loadFont"},{"label":"text","type":"method","params":[{"p":"str","o":false},{"p":"x","o":false},{"p":"y","o":false},{"p":"maxWidth","o":true},{"p":"maxHeight","o":true}],"p5DocPath":"text"},{"label":"textFont","type":"method","p5DocPath":"textFont"},{"label":"append","type":"method","params":[{"p":"array","o":false},{"p":"value","o":false}],"p5DocPath":"append"},{"label":"arrayCopy","type":"method","p5DocPath":"arrayCopy"},{"label":"concat","type":"method","params":[{"p":"a","o":false},{"p":"b","o":false}],"p5DocPath":"concat"},{"label":"reverse","type":"method","params":[{"p":"list","o":false}],"p5DocPath":"reverse"},{"label":"shorten","type":"method","params":[{"p":"list","o":false}],"p5DocPath":"shorten"},{"label":"shuffle","type":"method","params":[{"p":"array","o":false},{"p":"bool","o":true}],"p5DocPath":"shuffle"},{"label":"sort","type":"method","params":[{"p":"list","o":false},{"p":"count","o":true}],"p5DocPath":"sort"},{"label":"splice","type":"method","params":[{"p":"list","o":false},{"p":"value","o":false},{"p":"position","o":false}],"p5DocPath":"splice"},{"label":"subset","type":"method","params":[{"p":"list","o":false},{"p":"start","o":false},{"p":"count","o":true}],"p5DocPath":"subset"},{"label":"float","type":"method","p5DocPath":"float"},{"label":"int","type":"method","p5DocPath":"int"},{"label":"str","type":"method","params":[{"p":"n","o":false}],"p5DocPath":"str"},{"label":"boolean","type":"method","p5DocPath":"boolean"},{"label":"byte","type":"method","p5DocPath":"byte"},{"label":"char","type":"method","p5DocPath":"char"},{"label":"unchar","type":"method","p5DocPath":"unchar"},{"label":"hex","type":"method","p5DocPath":"hex"},{"label":"unhex","type":"method","p5DocPath":"unhex"},{"label":"join","type":"method","params":[{"p":"list","o":false},{"p":"separator","o":false}],"p5DocPath":"join"},{"label":"match","type":"method","params":[{"p":"str","o":false},{"p":"regexp","o":false}],"p5DocPath":"match"},{"label":"matchAll","type":"method","params":[{"p":"str","o":false},{"p":"regexp","o":false}],"p5DocPath":"matchAll"},{"label":"nf","type":"method","p5DocPath":"nf"},{"label":"nfc","type":"method","p5DocPath":"nfc"},{"label":"nfp","type":"method","p5DocPath":"nfp"},{"label":"nfs","type":"method","p5DocPath":"nfs"},{"label":"split","type":"method","params":[{"p":"value","o":false},{"p":"delim","o":false}],"p5DocPath":"split"},{"label":"splitTokens","type":"method","params":[{"p":"value","o":false},{"p":"delim","o":true}],"p5DocPath":"splitTokens"},{"label":"trim","type":"method","p5DocPath":"trim"},{"label":"day","type":"method","p5DocPath":"day"},{"label":"hour","type":"method","p5DocPath":"hour"},{"label":"minute","type":"method","p5DocPath":"minute"},{"label":"millis","type":"method","p5DocPath":"millis"},{"label":"month","type":"method","p5DocPath":"month"},{"label":"second","type":"method","p5DocPath":"second"},{"label":"year","type":"method","p5DocPath":"year"},{"label":"beginGeometry","type":"method","p5DocPath":"beginGeometry"},{"label":"endGeometry","type":"method","p5DocPath":"endGeometry"},{"label":"buildGeometry","type":"method","params":[{"p":"callback","o":false}],"p5DocPath":"buildGeometry"},{"label":"freeGeometry","type":"method","params":[{"p":"geometry","o":false}],"p5DocPath":"freeGeometry"},{"label":"plane","type":"method","params":[{"p":"width","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"p5DocPath":"plane"},{"label":"box","type":"method","params":[{"p":"width","o":true},{"p":"height","o":true},{"p":"depth","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"p5DocPath":"box"},{"label":"sphere","type":"method","params":[{"p":"radius","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"p5DocPath":"sphere"},{"label":"cylinder","type":"method","params":[{"p":"radius","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true},{"p":"bottomCap","o":true},{"p":"topCap","o":true}],"p5DocPath":"cylinder"},{"label":"cone","type":"method","params":[{"p":"radius","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true},{"p":"cap","o":true}],"p5DocPath":"cone"},{"label":"ellipsoid","type":"method","params":[{"p":"radiusX","o":true},{"p":"radiusY","o":true},{"p":"radiusZ","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"p5DocPath":"ellipsoid"},{"label":"torus","type":"method","params":[{"p":"radius","o":true},{"p":"tubeRadius","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"p5DocPath":"torus"},{"label":"orbitControl","type":"method","params":[{"p":"sensitivityX","o":true},{"p":"sensitivityY","o":true},{"p":"sensitivityZ","o":true},{"p":"options","o":true}],"p5DocPath":"orbitControl"},{"label":"debugMode","type":"method","p5DocPath":"debugMode"},{"label":"noDebugMode","type":"method","p5DocPath":"noDebugMode"},{"label":"ambientLight","type":"method","p5DocPath":"ambientLight"},{"label":"specularColor","type":"method","p5DocPath":"specularColor"},{"label":"directionalLight","type":"method","p5DocPath":"directionalLight"},{"label":"pointLight","type":"method","p5DocPath":"pointLight"},{"label":"imageLight","type":"method","params":[{"p":"img","o":false}],"p5DocPath":"imageLight"},{"label":"panorama","type":"method","params":[{"p":"img","o":false}],"p5DocPath":"panorama"},{"label":"lights","type":"method","p5DocPath":"lights"},{"label":"lightFalloff","type":"method","params":[{"p":"constant","o":false},{"p":"linear","o":false},{"p":"quadratic","o":false}],"p5DocPath":"lightFalloff"},{"label":"spotLight","type":"method","p5DocPath":"spotLight"},{"label":"noLights","type":"method","p5DocPath":"noLights"},{"label":"loadModel","type":"method","p5DocPath":"loadModel"},{"label":"model","type":"method","params":[{"p":"model","o":false}],"p5DocPath":"model"},{"label":"createModel","type":"method","p5DocPath":"createModel"},{"label":"loadShader","type":"method","params":[{"p":"vertFilename","o":false},{"p":"fragFilename","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"p5DocPath":"loadShader"},{"label":"createShader","type":"method","params":[{"p":"vertSrc","o":false},{"p":"fragSrc","o":false},{"p":"options","o":true}],"p5DocPath":"createShader"},{"label":"createFilterShader","type":"method","params":[{"p":"fragSrc","o":false}],"p5DocPath":"createFilterShader"},{"label":"shader","type":"method","params":[{"p":"s","o":false}],"p5DocPath":"shader"},{"label":"baseMaterialShader","type":"method","p5DocPath":"baseMaterialShader"},{"label":"baseNormalShader","type":"method","p5DocPath":"baseNormalShader"},{"label":"baseColorShader","type":"method","p5DocPath":"baseColorShader"},{"label":"baseStrokeShader","type":"method","p5DocPath":"baseStrokeShader"},{"label":"resetShader","type":"method","p5DocPath":"resetShader"},{"label":"texture","type":"method","params":[{"p":"tex","o":false}],"p5DocPath":"texture"},{"label":"textureMode","type":"method","params":[{"p":"mode","o":false}],"p5DocPath":"textureMode"},{"label":"textureWrap","type":"method","params":[{"p":"wrapX","o":false},{"p":"wrapY","o":true}],"p5DocPath":"textureWrap"},{"label":"normalMaterial","type":"method","p5DocPath":"normalMaterial"},{"label":"ambientMaterial","type":"method","p5DocPath":"ambientMaterial"},{"label":"emissiveMaterial","type":"method","p5DocPath":"emissiveMaterial"},{"label":"specularMaterial","type":"method","p5DocPath":"specularMaterial"},{"label":"shininess","type":"method","params":[{"p":"shine","o":false}],"p5DocPath":"shininess"},{"label":"metalness","type":"method","params":[{"p":"metallic","o":false}],"p5DocPath":"metalness"},{"label":"camera","type":"method","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"z","o":true},{"p":"centerX","o":true},{"p":"centerY","o":true},{"p":"centerZ","o":true},{"p":"upX","o":true},{"p":"upY","o":true},{"p":"upZ","o":true}],"p5DocPath":"camera"},{"label":"perspective","type":"method","params":[{"p":"fovy","o":true},{"p":"aspect","o":true},{"p":"near","o":true},{"p":"far","o":true}],"p5DocPath":"perspective"},{"label":"linePerspective","type":"method","p5DocPath":"linePerspective"},{"label":"ortho","type":"method","params":[{"p":"left","o":true},{"p":"right","o":true},{"p":"bottom","o":true},{"p":"top","o":true},{"p":"near","o":true},{"p":"far","o":true}],"p5DocPath":"ortho"},{"label":"frustum","type":"method","params":[{"p":"left","o":true},{"p":"right","o":true},{"p":"bottom","o":true},{"p":"top","o":true},{"p":"near","o":true},{"p":"far","o":true}],"p5DocPath":"frustum"},{"label":"createCamera","type":"method","p5DocPath":"createCamera"},{"label":"setCamera","type":"method","params":[{"p":"cam","o":false}],"p5DocPath":"setCamera"},{"label":"setAttributes","type":"method","p5DocPath":"setAttributes"},{"label":"getAudioContext","type":"method","p5DocPath":"getAudioContext"},{"label":"userStartAudio","type":"method","params":[{"p":"elements","o":true},{"p":"callback","o":true}],"p5DocPath":"userStartAudio"},{"label":"getOutputVolume","type":"method","p5DocPath":"getOutputVolume"},{"label":"outputVolume","type":"method","params":[{"p":"volume","o":false},{"p":"rampTime","o":true},{"p":"timeFromNow","o":true}],"p5DocPath":"outputVolume"},{"label":"soundOut","type":"variable","params":[],"p5DocPath":"soundOut"},{"label":"sampleRate","type":"method","p5DocPath":"sampleRate"},{"label":"freqToMidi","type":"method","params":[{"p":"frequency","o":false}],"p5DocPath":"freqToMidi"},{"label":"midiToFreq","type":"method","params":[{"p":"midiNote","o":false}],"p5DocPath":"midiToFreq"},{"label":"soundFormats","type":"method","params":[{"p":"formats","o":true}],"p5DocPath":"soundFormats"},{"label":"saveSound","type":"method","params":[{"p":"soundFile","o":false},{"p":"fileName","o":false}],"p5DocPath":"saveSound"},{"label":"loadSound","type":"method","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true},{"p":"whileLoading","o":true}],"p5DocPath":"loadSound"},{"label":"createConvolver","type":"method","params":[{"p":"path","o":false},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"p5DocPath":"createConvolver"},{"label":"setBPM","type":"method","params":[{"p":"BPM","o":false},{"p":"rampTime","o":false}],"p5DocPath":"setBPM"},{"label":"true","type":"boolean","p5DocPath":"boolean"},{"label":"false","type":"boolean","p5DocPath":"boolean"},{"label":"await","type":"keyword"},{"label":"class","type":"keyword","p5DocPath":"class"},{"label":"const","type":"keyword","p5DocPath":"const"},{"label":"else","type":"keyword","p5DocPath":"if-else"},{"label":"export","type":"keyword"},{"label":"for","type":"keyword","p5DocPath":"for"},{"label":"function","type":"keyword","p5DocPath":"function"},{"label":"if","type":"keyword","p5DocPath":"if-else"},{"label":"return","type":"keyword","p5DocPath":"return"},{"label":"while","type":"keyword","p5DocPath":"while"},{"label":"with","type":"keyword"},{"label":"let","type":"keyword","p5DocPath":"let"},{"label":"Array","type":"obj"},{"label":"Boolean","type":"obj"},{"label":"Date","type":"obj"},{"label":"Error","type":"obj"},{"label":"Function","type":"obj"},{"label":"JSON","type":"obj","p5DocPath":"JSON"},{"label":"Math","type":"obj"},{"label":"Number","type":"obj"},{"label":"Object","type":"obj"},{"label":"RegExp","type":"obj"},{"label":"String","type":"obj"},{"label":"Promise","type":"obj"},{"label":"Set","type":"obj"},{"label":"Map","type":"obj"},{"label":"Symbol","type":"obj"},{"label":"WeakMap","type":"obj"},{"label":"WeakSet","type":"obj"},{"label":"ArrayBuffer","type":"obj"},{"label":"DataView","type":"obj"},{"label":"Int32Array","type":"obj"},{"label":"Uint32Array","type":"obj"},{"label":"Float32Array","type":"obj"},{"label":"window","type":"obj"},{"label":"document","type":"obj"},{"label":"navigator","type":"obj"},{"label":"console","type":"obj","p5DocPath":"console"},{"label":"localStorage","type":"obj"},{"label":"sessionStorage","type":"obj"},{"label":"history","type":"obj"},{"label":"location","type":"obj"}]; +exports.p5Hinter = [{"label":"describe","type":"method","kindLabel":"fun","params":[{"p":"text","o":false},{"p":"display","o":true}],"preview":"describe(text, [display])","p5DocPath":"describe"},{"label":"describeElement","type":"method","kindLabel":"fun","params":[{"p":"name","o":false},{"p":"text","o":false},{"p":"display","o":true}],"preview":"describeElement(name, text, [display])","p5DocPath":"describeElement"},{"label":"textOutput","type":"method","kindLabel":"fun","params":[{"p":"display","o":true}],"preview":"textOutput([display])","p5DocPath":"textOutput"},{"label":"gridOutput","type":"method","kindLabel":"fun","params":[{"p":"display","o":true}],"preview":"gridOutput([display])","p5DocPath":"gridOutput"},{"label":"alpha","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"alpha(color)","p5DocPath":"alpha"},{"label":"blue","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"blue(color)","p5DocPath":"blue"},{"label":"brightness","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"brightness(color)","p5DocPath":"brightness"},{"label":"color","type":"method","kindLabel":"fun","preview":"color()","p5DocPath":"color"},{"label":"green","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"green(color)","p5DocPath":"green"},{"label":"hue","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"hue(color)","p5DocPath":"hue"},{"label":"lerpColor","type":"method","kindLabel":"fun","params":[{"p":"c1","o":false},{"p":"c2","o":false},{"p":"amt","o":false}],"preview":"lerpColor(c1, c2, amt)","p5DocPath":"lerpColor"},{"label":"paletteLerp","type":"method","kindLabel":"fun","params":[{"p":"colors_stops","o":false},{"p":"amt","o":false}],"preview":"paletteLerp(colors_stops, amt)","p5DocPath":"paletteLerp"},{"label":"lightness","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"lightness(color)","p5DocPath":"lightness"},{"label":"red","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"red(color)","p5DocPath":"red"},{"label":"saturation","type":"method","kindLabel":"fun","params":[{"p":"color","o":false}],"preview":"saturation(color)","p5DocPath":"saturation"},{"label":"beginClip","type":"method","kindLabel":"fun","params":[{"p":"options","o":true}],"preview":"beginClip([options])","p5DocPath":"beginClip"},{"label":"endClip","type":"method","kindLabel":"fun","preview":"endClip()","p5DocPath":"endClip"},{"label":"clip","type":"method","kindLabel":"fun","params":[{"p":"callback","o":false},{"p":"options","o":true}],"preview":"clip(callback, [options])","p5DocPath":"clip"},{"label":"background","type":"method","kindLabel":"fun","preview":"background()","p5DocPath":"background"},{"label":"clear","type":"method","kindLabel":"fun","params":[{"p":"r","o":true},{"p":"g","o":true},{"p":"b","o":true},{"p":"a","o":true}],"preview":"clear([r], [g], [b], [a])","p5DocPath":"clear"},{"label":"colorMode","type":"method","kindLabel":"fun","preview":"colorMode()","p5DocPath":"colorMode"},{"label":"fill","type":"method","kindLabel":"fun","preview":"fill()","p5DocPath":"fill"},{"label":"noFill","type":"method","kindLabel":"fun","preview":"noFill()","p5DocPath":"noFill"},{"label":"noStroke","type":"method","kindLabel":"fun","preview":"noStroke()","p5DocPath":"noStroke"},{"label":"stroke","type":"method","kindLabel":"fun","preview":"stroke()","p5DocPath":"stroke"},{"label":"erase","type":"method","kindLabel":"fun","params":[{"p":"strengthFill","o":true},{"p":"strengthStroke","o":true}],"preview":"erase([strengthFill], [strengthStroke])","p5DocPath":"erase"},{"label":"noErase","type":"method","kindLabel":"fun","preview":"noErase()","p5DocPath":"noErase"},{"label":"arc","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"w","o":false},{"p":"h","o":false},{"p":"start","o":false},{"p":"stop","o":false},{"p":"mode","o":true},{"p":"detail","o":true}],"preview":"arc(x, y, w, h, start, stop, [mode], [detail])","p5DocPath":"arc"},{"label":"ellipse","type":"method","kindLabel":"fun","preview":"ellipse()","p5DocPath":"ellipse"},{"label":"circle","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"d","o":false}],"preview":"circle(x, y, d)","p5DocPath":"circle"},{"label":"line","type":"method","kindLabel":"fun","preview":"line()","p5DocPath":"line"},{"label":"point","type":"method","kindLabel":"fun","preview":"point()","p5DocPath":"point"},{"label":"quad","type":"method","kindLabel":"fun","preview":"quad()","p5DocPath":"quad"},{"label":"rect","type":"method","kindLabel":"fun","preview":"rect()","p5DocPath":"rect"},{"label":"square","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"s","o":false},{"p":"tl","o":true},{"p":"tr","o":true},{"p":"br","o":true},{"p":"bl","o":true}],"preview":"square(x, y, s, [tl], [tr], [br], [bl])","p5DocPath":"square"},{"label":"triangle","type":"method","kindLabel":"fun","params":[{"p":"x1","o":false},{"p":"y1","o":false},{"p":"x2","o":false},{"p":"y2","o":false},{"p":"x3","o":false},{"p":"y3","o":false}],"preview":"triangle(x1, y1, x2, y2, x3, y3)","p5DocPath":"triangle"},{"label":"ellipseMode","type":"method","kindLabel":"fun","params":[{"p":"mode","o":false}],"preview":"ellipseMode(mode)","p5DocPath":"ellipseMode"},{"label":"noSmooth","type":"method","kindLabel":"fun","preview":"noSmooth()","p5DocPath":"noSmooth"},{"label":"rectMode","type":"method","kindLabel":"fun","params":[{"p":"mode","o":false}],"preview":"rectMode(mode)","p5DocPath":"rectMode"},{"label":"smooth","type":"method","kindLabel":"fun","preview":"smooth()","p5DocPath":"smooth"},{"label":"strokeCap","type":"method","kindLabel":"fun","params":[{"p":"cap","o":false}],"preview":"strokeCap(cap)","p5DocPath":"strokeCap"},{"label":"strokeJoin","type":"method","kindLabel":"fun","params":[{"p":"join","o":false}],"preview":"strokeJoin(join)","p5DocPath":"strokeJoin"},{"label":"strokeWeight","type":"method","kindLabel":"fun","params":[{"p":"weight","o":false}],"preview":"strokeWeight(weight)","p5DocPath":"strokeWeight"},{"label":"bezier","type":"method","kindLabel":"fun","preview":"bezier()","p5DocPath":"bezier"},{"label":"bezierDetail","type":"method","kindLabel":"fun","params":[{"p":"detail","o":false}],"preview":"bezierDetail(detail)","p5DocPath":"bezierDetail"},{"label":"bezierPoint","type":"method","kindLabel":"fun","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"preview":"bezierPoint(a, b, c, d, t)","p5DocPath":"bezierPoint"},{"label":"bezierTangent","type":"method","kindLabel":"fun","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"preview":"bezierTangent(a, b, c, d, t)","p5DocPath":"bezierTangent"},{"label":"curve","type":"method","kindLabel":"fun","preview":"curve()","p5DocPath":"curve"},{"label":"curveDetail","type":"method","kindLabel":"fun","params":[{"p":"resolution","o":false}],"preview":"curveDetail(resolution)","p5DocPath":"curveDetail"},{"label":"curveTightness","type":"method","kindLabel":"fun","params":[{"p":"amount","o":false}],"preview":"curveTightness(amount)","p5DocPath":"curveTightness"},{"label":"curvePoint","type":"method","kindLabel":"fun","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"preview":"curvePoint(a, b, c, d, t)","p5DocPath":"curvePoint"},{"label":"curveTangent","type":"method","kindLabel":"fun","params":[{"p":"a","o":false},{"p":"b","o":false},{"p":"c","o":false},{"p":"d","o":false},{"p":"t","o":false}],"preview":"curveTangent(a, b, c, d, t)","p5DocPath":"curveTangent"},{"label":"beginContour","type":"method","kindLabel":"fun","preview":"beginContour()","p5DocPath":"beginContour"},{"label":"beginShape","type":"method","kindLabel":"fun","params":[{"p":"kind","o":true}],"preview":"beginShape([kind])","p5DocPath":"beginShape"},{"label":"bezierVertex","type":"method","kindLabel":"fun","preview":"bezierVertex()","p5DocPath":"bezierVertex"},{"label":"curveVertex","type":"method","kindLabel":"fun","preview":"curveVertex()","p5DocPath":"curveVertex"},{"label":"endContour","type":"method","kindLabel":"fun","preview":"endContour()","p5DocPath":"endContour"},{"label":"endShape","type":"method","kindLabel":"fun","params":[{"p":"mode","o":true},{"p":"count","o":true}],"preview":"endShape([mode], [count])","p5DocPath":"endShape"},{"label":"quadraticVertex","type":"method","kindLabel":"fun","preview":"quadraticVertex()","p5DocPath":"quadraticVertex"},{"label":"vertex","type":"method","kindLabel":"fun","preview":"vertex()","p5DocPath":"vertex"},{"label":"normal","type":"method","kindLabel":"fun","preview":"normal()","p5DocPath":"normal"},{"label":"VERSION","type":"constant","kindLabel":"const","params":[],"preview":"VERSION","p5DocPath":"VERSION"},{"label":"P2D","type":"constant","kindLabel":"const","params":[],"preview":"P2D","p5DocPath":"P2D"},{"label":"WEBGL","type":"constant","kindLabel":"const","params":[],"preview":"WEBGL","p5DocPath":"WEBGL"},{"label":"WEBGL2","type":"constant","kindLabel":"const","params":[],"preview":"WEBGL2","p5DocPath":"WEBGL2"},{"label":"ARROW","type":"constant","kindLabel":"const","params":[],"preview":"ARROW","p5DocPath":"ARROW"},{"label":"CROSS","type":"constant","kindLabel":"const","params":[],"preview":"CROSS","p5DocPath":"CROSS"},{"label":"HAND","type":"constant","kindLabel":"const","params":[],"preview":"HAND","p5DocPath":"HAND"},{"label":"MOVE","type":"constant","kindLabel":"const","params":[],"preview":"MOVE","p5DocPath":"MOVE"},{"label":"TEXT","type":"constant","kindLabel":"const","params":[],"preview":"TEXT","p5DocPath":"TEXT"},{"label":"WAIT","type":"constant","kindLabel":"const","params":[],"preview":"WAIT","p5DocPath":"WAIT"},{"label":"HALF_PI","type":"constant","kindLabel":"const","params":[],"preview":"HALF_PI","p5DocPath":"HALF_PI"},{"label":"PI","type":"constant","kindLabel":"const","params":[],"preview":"PI","p5DocPath":"PI"},{"label":"QUARTER_PI","type":"constant","kindLabel":"const","params":[],"preview":"QUARTER_PI","p5DocPath":"QUARTER_PI"},{"label":"TAU","type":"constant","kindLabel":"const","params":[],"preview":"TAU","p5DocPath":"TAU"},{"label":"TWO_PI","type":"constant","kindLabel":"const","params":[],"preview":"TWO_PI","p5DocPath":"TWO_PI"},{"label":"DEGREES","type":"constant","kindLabel":"const","params":[],"preview":"DEGREES","p5DocPath":"DEGREES"},{"label":"RADIANS","type":"constant","kindLabel":"const","params":[],"preview":"RADIANS","p5DocPath":"RADIANS"},{"label":"CORNER","type":"constant","kindLabel":"const","params":[],"preview":"CORNER","p5DocPath":"CORNER"},{"label":"CORNERS","type":"constant","kindLabel":"const","params":[],"preview":"CORNERS","p5DocPath":"CORNERS"},{"label":"RADIUS","type":"constant","kindLabel":"const","params":[],"preview":"RADIUS","p5DocPath":"RADIUS"},{"label":"RIGHT","type":"constant","kindLabel":"const","params":[],"preview":"RIGHT","p5DocPath":"RIGHT"},{"label":"LEFT","type":"constant","kindLabel":"const","params":[],"preview":"LEFT","p5DocPath":"LEFT"},{"label":"CENTER","type":"constant","kindLabel":"const","params":[],"preview":"CENTER","p5DocPath":"CENTER"},{"label":"TOP","type":"constant","kindLabel":"const","params":[],"preview":"TOP","p5DocPath":"TOP"},{"label":"BOTTOM","type":"constant","kindLabel":"const","params":[],"preview":"BOTTOM","p5DocPath":"BOTTOM"},{"label":"BASELINE","type":"constant","kindLabel":"const","params":[],"preview":"BASELINE","p5DocPath":"BASELINE"},{"label":"POINTS","type":"constant","kindLabel":"const","params":[],"preview":"POINTS","p5DocPath":"POINTS"},{"label":"LINES","type":"constant","kindLabel":"const","params":[],"preview":"LINES","p5DocPath":"LINES"},{"label":"LINE_STRIP","type":"constant","kindLabel":"const","params":[],"preview":"LINE_STRIP","p5DocPath":"LINE_STRIP"},{"label":"LINE_LOOP","type":"constant","kindLabel":"const","params":[],"preview":"LINE_LOOP","p5DocPath":"LINE_LOOP"},{"label":"TRIANGLES","type":"constant","kindLabel":"const","params":[],"preview":"TRIANGLES","p5DocPath":"TRIANGLES"},{"label":"TRIANGLE_FAN","type":"constant","kindLabel":"const","params":[],"preview":"TRIANGLE_FAN","p5DocPath":"TRIANGLE_FAN"},{"label":"TRIANGLE_STRIP","type":"constant","kindLabel":"const","params":[],"preview":"TRIANGLE_STRIP","p5DocPath":"TRIANGLE_STRIP"},{"label":"QUADS","type":"constant","kindLabel":"const","params":[],"preview":"QUADS","p5DocPath":"QUADS"},{"label":"QUAD_STRIP","type":"constant","kindLabel":"const","params":[],"preview":"QUAD_STRIP","p5DocPath":"QUAD_STRIP"},{"label":"TESS","type":"constant","kindLabel":"const","params":[],"preview":"TESS","p5DocPath":"TESS"},{"label":"CLOSE","type":"constant","kindLabel":"const","params":[],"preview":"CLOSE","p5DocPath":"CLOSE"},{"label":"OPEN","type":"constant","kindLabel":"const","params":[],"preview":"OPEN","p5DocPath":"OPEN"},{"label":"CHORD","type":"constant","kindLabel":"const","params":[],"preview":"CHORD","p5DocPath":"CHORD"},{"label":"PIE","type":"constant","kindLabel":"const","params":[],"preview":"PIE","p5DocPath":"PIE"},{"label":"PROJECT","type":"constant","kindLabel":"const","params":[],"preview":"PROJECT","p5DocPath":"PROJECT"},{"label":"SQUARE","type":"constant","kindLabel":"const","params":[],"preview":"SQUARE","p5DocPath":"SQUARE"},{"label":"ROUND","type":"constant","kindLabel":"const","params":[],"preview":"ROUND","p5DocPath":"ROUND"},{"label":"BEVEL","type":"constant","kindLabel":"const","params":[],"preview":"BEVEL","p5DocPath":"BEVEL"},{"label":"MITER","type":"constant","kindLabel":"const","params":[],"preview":"MITER","p5DocPath":"MITER"},{"label":"RGB","type":"constant","kindLabel":"const","params":[],"preview":"RGB","p5DocPath":"RGB"},{"label":"HSB","type":"constant","kindLabel":"const","params":[],"preview":"HSB","p5DocPath":"HSB"},{"label":"HSL","type":"constant","kindLabel":"const","params":[],"preview":"HSL","p5DocPath":"HSL"},{"label":"AUTO","type":"constant","kindLabel":"const","params":[],"preview":"AUTO","p5DocPath":"AUTO"},{"label":"ALT","type":"constant","kindLabel":"const","params":[],"preview":"ALT","p5DocPath":"ALT"},{"label":"BACKSPACE","type":"constant","kindLabel":"const","params":[],"preview":"BACKSPACE","p5DocPath":"BACKSPACE"},{"label":"CONTROL","type":"constant","kindLabel":"const","params":[],"preview":"CONTROL","p5DocPath":"CONTROL"},{"label":"DELETE","type":"constant","kindLabel":"const","params":[],"preview":"DELETE","p5DocPath":"DELETE"},{"label":"DOWN_ARROW","type":"constant","kindLabel":"const","params":[],"preview":"DOWN_ARROW","p5DocPath":"DOWN_ARROW"},{"label":"ENTER","type":"constant","kindLabel":"const","params":[],"preview":"ENTER","p5DocPath":"ENTER"},{"label":"ESCAPE","type":"constant","kindLabel":"const","params":[],"preview":"ESCAPE","p5DocPath":"ESCAPE"},{"label":"LEFT_ARROW","type":"constant","kindLabel":"const","params":[],"preview":"LEFT_ARROW","p5DocPath":"LEFT_ARROW"},{"label":"OPTION","type":"constant","kindLabel":"const","params":[],"preview":"OPTION","p5DocPath":"OPTION"},{"label":"RETURN","type":"constant","kindLabel":"const","params":[],"preview":"RETURN","p5DocPath":"RETURN"},{"label":"RIGHT_ARROW","type":"constant","kindLabel":"const","params":[],"preview":"RIGHT_ARROW","p5DocPath":"RIGHT_ARROW"},{"label":"SHIFT","type":"constant","kindLabel":"const","params":[],"preview":"SHIFT","p5DocPath":"SHIFT"},{"label":"TAB","type":"constant","kindLabel":"const","params":[],"preview":"TAB","p5DocPath":"TAB"},{"label":"UP_ARROW","type":"constant","kindLabel":"const","params":[],"preview":"UP_ARROW","p5DocPath":"UP_ARROW"},{"label":"BLEND","type":"constant","kindLabel":"const","params":[],"preview":"BLEND","p5DocPath":"BLEND"},{"label":"REMOVE","type":"constant","kindLabel":"const","params":[],"preview":"REMOVE","p5DocPath":"REMOVE"},{"label":"ADD","type":"constant","kindLabel":"const","params":[],"preview":"ADD","p5DocPath":"ADD"},{"label":"DARKEST","type":"constant","kindLabel":"const","params":[],"preview":"DARKEST","p5DocPath":"DARKEST"},{"label":"LIGHTEST","type":"constant","kindLabel":"const","params":[],"preview":"LIGHTEST","p5DocPath":"LIGHTEST"},{"label":"DIFFERENCE","type":"constant","kindLabel":"const","params":[],"preview":"DIFFERENCE","p5DocPath":"DIFFERENCE"},{"label":"SUBTRACT","type":"constant","kindLabel":"const","params":[],"preview":"SUBTRACT","p5DocPath":"SUBTRACT"},{"label":"EXCLUSION","type":"constant","kindLabel":"const","params":[],"preview":"EXCLUSION","p5DocPath":"EXCLUSION"},{"label":"MULTIPLY","type":"constant","kindLabel":"const","params":[],"preview":"MULTIPLY","p5DocPath":"MULTIPLY"},{"label":"SCREEN","type":"constant","kindLabel":"const","params":[],"preview":"SCREEN","p5DocPath":"SCREEN"},{"label":"REPLACE","type":"constant","kindLabel":"const","params":[],"preview":"REPLACE","p5DocPath":"REPLACE"},{"label":"OVERLAY","type":"constant","kindLabel":"const","params":[],"preview":"OVERLAY","p5DocPath":"OVERLAY"},{"label":"HARD_LIGHT","type":"constant","kindLabel":"const","params":[],"preview":"HARD_LIGHT","p5DocPath":"HARD_LIGHT"},{"label":"SOFT_LIGHT","type":"constant","kindLabel":"const","params":[],"preview":"SOFT_LIGHT","p5DocPath":"SOFT_LIGHT"},{"label":"DODGE","type":"constant","kindLabel":"const","params":[],"preview":"DODGE","p5DocPath":"DODGE"},{"label":"BURN","type":"constant","kindLabel":"const","params":[],"preview":"BURN","p5DocPath":"BURN"},{"label":"THRESHOLD","type":"constant","kindLabel":"const","params":[],"preview":"THRESHOLD","p5DocPath":"THRESHOLD"},{"label":"GRAY","type":"constant","kindLabel":"const","params":[],"preview":"GRAY","p5DocPath":"GRAY"},{"label":"OPAQUE","type":"constant","kindLabel":"const","params":[],"preview":"OPAQUE","p5DocPath":"OPAQUE"},{"label":"INVERT","type":"constant","kindLabel":"const","params":[],"preview":"INVERT","p5DocPath":"INVERT"},{"label":"POSTERIZE","type":"constant","kindLabel":"const","params":[],"preview":"POSTERIZE","p5DocPath":"POSTERIZE"},{"label":"DILATE","type":"constant","kindLabel":"const","params":[],"preview":"DILATE","p5DocPath":"DILATE"},{"label":"ERODE","type":"constant","kindLabel":"const","params":[],"preview":"ERODE","p5DocPath":"ERODE"},{"label":"BLUR","type":"constant","kindLabel":"const","params":[],"preview":"BLUR","p5DocPath":"BLUR"},{"label":"NORMAL","type":"constant","kindLabel":"const","params":[],"preview":"NORMAL","p5DocPath":"NORMAL"},{"label":"ITALIC","type":"constant","kindLabel":"const","params":[],"preview":"ITALIC","p5DocPath":"ITALIC"},{"label":"BOLD","type":"constant","kindLabel":"const","params":[],"preview":"BOLD","p5DocPath":"BOLD"},{"label":"BOLDITALIC","type":"constant","kindLabel":"const","params":[],"preview":"BOLDITALIC","p5DocPath":"BOLDITALIC"},{"label":"CHAR","type":"constant","kindLabel":"const","params":[],"preview":"CHAR","p5DocPath":"CHAR"},{"label":"WORD","type":"constant","kindLabel":"const","params":[],"preview":"WORD","p5DocPath":"WORD"},{"label":"LINEAR","type":"constant","kindLabel":"const","params":[],"preview":"LINEAR","p5DocPath":"LINEAR"},{"label":"QUADRATIC","type":"constant","kindLabel":"const","params":[],"preview":"QUADRATIC","p5DocPath":"QUADRATIC"},{"label":"BEZIER","type":"constant","kindLabel":"const","params":[],"preview":"BEZIER","p5DocPath":"BEZIER"},{"label":"CURVE","type":"constant","kindLabel":"const","params":[],"preview":"CURVE","p5DocPath":"CURVE"},{"label":"STROKE","type":"constant","kindLabel":"const","params":[],"preview":"STROKE","p5DocPath":"STROKE"},{"label":"FILL","type":"constant","kindLabel":"const","params":[],"preview":"FILL","p5DocPath":"FILL"},{"label":"TEXTURE","type":"constant","kindLabel":"const","params":[],"preview":"TEXTURE","p5DocPath":"TEXTURE"},{"label":"IMMEDIATE","type":"constant","kindLabel":"const","params":[],"preview":"IMMEDIATE","p5DocPath":"IMMEDIATE"},{"label":"IMAGE","type":"constant","kindLabel":"const","params":[],"preview":"IMAGE","p5DocPath":"IMAGE"},{"label":"NEAREST","type":"constant","kindLabel":"const","params":[],"preview":"NEAREST","p5DocPath":"NEAREST"},{"label":"REPEAT","type":"constant","kindLabel":"const","params":[],"preview":"REPEAT","p5DocPath":"REPEAT"},{"label":"CLAMP","type":"constant","kindLabel":"const","params":[],"preview":"CLAMP","p5DocPath":"CLAMP"},{"label":"MIRROR","type":"constant","kindLabel":"const","params":[],"preview":"MIRROR","p5DocPath":"MIRROR"},{"label":"FLAT","type":"constant","kindLabel":"const","params":[],"preview":"FLAT","p5DocPath":"FLAT"},{"label":"SMOOTH","type":"constant","kindLabel":"const","params":[],"preview":"SMOOTH","p5DocPath":"SMOOTH"},{"label":"LANDSCAPE","type":"constant","kindLabel":"const","params":[],"preview":"LANDSCAPE","p5DocPath":"LANDSCAPE"},{"label":"PORTRAIT","type":"constant","kindLabel":"const","params":[],"preview":"PORTRAIT","p5DocPath":"PORTRAIT"},{"label":"GRID","type":"constant","kindLabel":"const","params":[],"preview":"GRID","p5DocPath":"GRID"},{"label":"AXES","type":"constant","kindLabel":"const","params":[],"preview":"AXES","p5DocPath":"AXES"},{"label":"LABEL","type":"constant","kindLabel":"const","params":[],"preview":"LABEL","p5DocPath":"LABEL"},{"label":"FALLBACK","type":"constant","kindLabel":"const","params":[],"preview":"FALLBACK","p5DocPath":"FALLBACK"},{"label":"CONTAIN","type":"constant","kindLabel":"const","params":[],"preview":"CONTAIN","p5DocPath":"CONTAIN"},{"label":"COVER","type":"constant","kindLabel":"const","params":[],"preview":"COVER","p5DocPath":"COVER"},{"label":"UNSIGNED_BYTE","type":"constant","kindLabel":"const","params":[],"preview":"UNSIGNED_BYTE","p5DocPath":"UNSIGNED_BYTE"},{"label":"UNSIGNED_INT","type":"constant","kindLabel":"const","params":[],"preview":"UNSIGNED_INT","p5DocPath":"UNSIGNED_INT"},{"label":"FLOAT","type":"constant","kindLabel":"const","params":[],"preview":"FLOAT","p5DocPath":"FLOAT"},{"label":"HALF_FLOAT","type":"constant","kindLabel":"const","params":[],"preview":"HALF_FLOAT","p5DocPath":"HALF_FLOAT"},{"label":"RGBA","type":"constant","kindLabel":"const","params":[],"preview":"RGBA","p5DocPath":"RGBA"},{"label":"print","type":"method","kindLabel":"fun","params":[{"p":"contents","o":false}],"preview":"print(contents)","p5DocPath":"print"},{"label":"frameCount","type":"variable","kindLabel":"var","params":[],"preview":"frameCount","p5DocPath":"frameCount"},{"label":"deltaTime","type":"variable","kindLabel":"var","params":[],"preview":"deltaTime","p5DocPath":"deltaTime"},{"label":"focused","type":"variable","kindLabel":"var","params":[],"preview":"focused","p5DocPath":"focused"},{"label":"cursor","type":"method","kindLabel":"fun","params":[{"p":"type","o":false},{"p":"x","o":true},{"p":"y","o":true}],"preview":"cursor(type, [x], [y])","p5DocPath":"cursor"},{"label":"frameRate","type":"method","kindLabel":"fun","preview":"frameRate()","p5DocPath":"frameRate"},{"label":"getTargetFrameRate","type":"method","kindLabel":"fun","preview":"getTargetFrameRate()","p5DocPath":"getTargetFrameRate"},{"label":"noCursor","type":"method","kindLabel":"fun","preview":"noCursor()","p5DocPath":"noCursor"},{"label":"webglVersion","type":"variable","kindLabel":"var","params":[],"preview":"webglVersion","p5DocPath":"webglVersion"},{"label":"displayWidth","type":"variable","kindLabel":"var","params":[],"preview":"displayWidth","p5DocPath":"displayWidth"},{"label":"displayHeight","type":"variable","kindLabel":"var","params":[],"preview":"displayHeight","p5DocPath":"displayHeight"},{"label":"windowWidth","type":"variable","kindLabel":"var","params":[],"preview":"windowWidth","p5DocPath":"windowWidth"},{"label":"windowHeight","type":"variable","kindLabel":"var","params":[],"preview":"windowHeight","p5DocPath":"windowHeight"},{"label":"windowResized","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"windowResized([event])","p5DocPath":"windowResized"},{"label":"width","type":"variable","kindLabel":"var","params":[],"preview":"width","p5DocPath":"width"},{"label":"height","type":"variable","kindLabel":"var","params":[],"preview":"height","p5DocPath":"height"},{"label":"fullscreen","type":"method","kindLabel":"fun","params":[{"p":"val","o":true}],"preview":"fullscreen([val])","p5DocPath":"fullscreen"},{"label":"pixelDensity","type":"method","kindLabel":"fun","preview":"pixelDensity()","p5DocPath":"pixelDensity"},{"label":"displayDensity","type":"method","kindLabel":"fun","preview":"displayDensity()","p5DocPath":"displayDensity"},{"label":"getURL","type":"method","kindLabel":"fun","preview":"getURL()","p5DocPath":"getURL"},{"label":"getURLPath","type":"method","kindLabel":"fun","preview":"getURLPath()","p5DocPath":"getURLPath"},{"label":"getURLParams","type":"method","kindLabel":"fun","preview":"getURLParams()","p5DocPath":"getURLParams"},{"label":"preload","type":"method","kindLabel":"fun","preview":"preload()","p5DocPath":"preload"},{"label":"setup","type":"method","kindLabel":"fun","preview":"setup()","p5DocPath":"setup"},{"label":"draw","type":"method","kindLabel":"fun","preview":"draw()","p5DocPath":"draw"},{"label":"remove","type":"method","kindLabel":"fun","preview":"remove()","p5DocPath":"remove"},{"label":"disableFriendlyErrors","type":"variable","kindLabel":"var","params":[],"preview":"disableFriendlyErrors","p5DocPath":"disableFriendlyErrors"},{"label":"createCanvas","type":"method","kindLabel":"fun","preview":"createCanvas()","p5DocPath":"createCanvas"},{"label":"resizeCanvas","type":"method","kindLabel":"fun","params":[{"p":"width","o":false},{"p":"height","o":false},{"p":"noRedraw","o":true}],"preview":"resizeCanvas(width, height, [noRedraw])","p5DocPath":"resizeCanvas"},{"label":"noCanvas","type":"method","kindLabel":"fun","preview":"noCanvas()","p5DocPath":"noCanvas"},{"label":"createGraphics","type":"method","kindLabel":"fun","preview":"createGraphics()","p5DocPath":"createGraphics"},{"label":"createFramebuffer","type":"method","kindLabel":"fun","params":[{"p":"options","o":true}],"preview":"createFramebuffer([options])","p5DocPath":"createFramebuffer"},{"label":"clearDepth","type":"method","kindLabel":"fun","params":[{"p":"depth","o":true}],"preview":"clearDepth([depth])","p5DocPath":"clearDepth"},{"label":"blendMode","type":"method","kindLabel":"fun","params":[{"p":"mode","o":false}],"preview":"blendMode(mode)","p5DocPath":"blendMode"},{"label":"drawingContext","type":"variable","kindLabel":"var","params":[],"preview":"drawingContext","p5DocPath":"drawingContext"},{"label":"noLoop","type":"method","kindLabel":"fun","preview":"noLoop()","p5DocPath":"noLoop"},{"label":"loop","type":"method","kindLabel":"fun","preview":"loop()","p5DocPath":"loop"},{"label":"isLooping","type":"method","kindLabel":"fun","preview":"isLooping()","p5DocPath":"isLooping"},{"label":"push","type":"method","kindLabel":"fun","preview":"push()","p5DocPath":"push"},{"label":"pop","type":"method","kindLabel":"fun","preview":"pop()","p5DocPath":"pop"},{"label":"redraw","type":"method","kindLabel":"fun","params":[{"p":"n","o":true}],"preview":"redraw([n])","p5DocPath":"redraw"},{"label":"p5","type":"method","kindLabel":"fun","params":[{"p":"sketch","o":false},{"p":"node","o":false}],"preview":"p5(sketch, node)","p5DocPath":"p5"},{"label":"applyMatrix","type":"method","kindLabel":"fun","preview":"applyMatrix()","p5DocPath":"applyMatrix"},{"label":"resetMatrix","type":"method","kindLabel":"fun","preview":"resetMatrix()","p5DocPath":"resetMatrix"},{"label":"rotate","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false},{"p":"axis","o":true}],"preview":"rotate(angle, [axis])","p5DocPath":"rotate"},{"label":"rotateX","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"rotateX(angle)","p5DocPath":"rotateX"},{"label":"rotateY","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"rotateY(angle)","p5DocPath":"rotateY"},{"label":"rotateZ","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"rotateZ(angle)","p5DocPath":"rotateZ"},{"label":"scale","type":"method","kindLabel":"fun","preview":"scale()","p5DocPath":"scale"},{"label":"shearX","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"shearX(angle)","p5DocPath":"shearX"},{"label":"shearY","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"shearY(angle)","p5DocPath":"shearY"},{"label":"translate","type":"method","kindLabel":"fun","preview":"translate()","p5DocPath":"translate"},{"label":"storeItem","type":"method","kindLabel":"fun","params":[{"p":"key","o":false},{"p":"value","o":false}],"preview":"storeItem(key, value)","p5DocPath":"storeItem"},{"label":"getItem","type":"method","kindLabel":"fun","params":[{"p":"key","o":false}],"preview":"getItem(key)","p5DocPath":"getItem"},{"label":"clearStorage","type":"method","kindLabel":"fun","preview":"clearStorage()","p5DocPath":"clearStorage"},{"label":"removeItem","type":"method","kindLabel":"fun","params":[{"p":"key","o":false}],"preview":"removeItem(key)","p5DocPath":"removeItem"},{"label":"createStringDict","type":"method","kindLabel":"fun","preview":"createStringDict()","p5DocPath":"createStringDict"},{"label":"createNumberDict","type":"method","kindLabel":"fun","preview":"createNumberDict()","p5DocPath":"createNumberDict"},{"label":"select","type":"method","kindLabel":"fun","params":[{"p":"selectors","o":false},{"p":"container","o":true}],"preview":"select(selectors, [container])","p5DocPath":"select"},{"label":"selectAll","type":"method","kindLabel":"fun","params":[{"p":"selectors","o":false},{"p":"container","o":true}],"preview":"selectAll(selectors, [container])","p5DocPath":"selectAll"},{"label":"removeElements","type":"method","kindLabel":"fun","preview":"removeElements()","p5DocPath":"removeElements"},{"label":"changed","type":"method","kindLabel":"fun","params":[{"p":"fxn","o":false}],"preview":"changed(fxn)","p5DocPath":"changed"},{"label":"input","type":"method","kindLabel":"fun","params":[{"p":"fxn","o":false}],"preview":"input(fxn)","p5DocPath":"input"},{"label":"createDiv","type":"method","kindLabel":"fun","params":[{"p":"html","o":true}],"preview":"createDiv([html])","p5DocPath":"createDiv"},{"label":"createP","type":"method","kindLabel":"fun","params":[{"p":"html","o":true}],"preview":"createP([html])","p5DocPath":"createP"},{"label":"createSpan","type":"method","kindLabel":"fun","params":[{"p":"html","o":true}],"preview":"createSpan([html])","p5DocPath":"createSpan"},{"label":"createImg","type":"method","kindLabel":"fun","preview":"createImg()","p5DocPath":"createImg"},{"label":"createA","type":"method","kindLabel":"fun","params":[{"p":"href","o":false},{"p":"html","o":false},{"p":"target","o":true}],"preview":"createA(href, html, [target])","p5DocPath":"createA"},{"label":"createSlider","type":"method","kindLabel":"fun","params":[{"p":"min","o":false},{"p":"max","o":false},{"p":"value","o":true},{"p":"step","o":true}],"preview":"createSlider(min, max, [value], [step])","p5DocPath":"createSlider"},{"label":"createButton","type":"method","kindLabel":"fun","params":[{"p":"label","o":false},{"p":"value","o":true}],"preview":"createButton(label, [value])","p5DocPath":"createButton"},{"label":"createCheckbox","type":"method","kindLabel":"fun","params":[{"p":"label","o":true},{"p":"value","o":true}],"preview":"createCheckbox([label], [value])","p5DocPath":"createCheckbox"},{"label":"createSelect","type":"method","kindLabel":"fun","preview":"createSelect()","p5DocPath":"createSelect"},{"label":"createRadio","type":"method","kindLabel":"fun","preview":"createRadio()","p5DocPath":"createRadio"},{"label":"createColorPicker","type":"method","kindLabel":"fun","params":[{"p":"value","o":true}],"preview":"createColorPicker([value])","p5DocPath":"createColorPicker"},{"label":"createInput","type":"method","kindLabel":"fun","preview":"createInput()","p5DocPath":"createInput"},{"label":"createFileInput","type":"method","kindLabel":"fun","params":[{"p":"callback","o":false},{"p":"multiple","o":true}],"preview":"createFileInput(callback, [multiple])","p5DocPath":"createFileInput"},{"label":"createVideo","type":"method","kindLabel":"fun","params":[{"p":"src","o":false},{"p":"callback","o":true}],"preview":"createVideo(src, [callback])","p5DocPath":"createVideo"},{"label":"createAudio","type":"method","kindLabel":"fun","params":[{"p":"src","o":true},{"p":"callback","o":true}],"preview":"createAudio([src], [callback])","p5DocPath":"createAudio"},{"label":"createCapture","type":"method","kindLabel":"fun","params":[{"p":"type","o":true},{"p":"flipped","o":true},{"p":"callback","o":true}],"preview":"createCapture([type], [flipped], [callback])","p5DocPath":"createCapture"},{"label":"createElement","type":"method","kindLabel":"fun","params":[{"p":"tag","o":false},{"p":"content","o":true}],"preview":"createElement(tag, [content])","p5DocPath":"createElement"},{"label":"deviceOrientation","type":"variable","kindLabel":"var","params":[],"preview":"deviceOrientation","p5DocPath":"deviceOrientation"},{"label":"accelerationX","type":"variable","kindLabel":"var","params":[],"preview":"accelerationX","p5DocPath":"accelerationX"},{"label":"accelerationY","type":"variable","kindLabel":"var","params":[],"preview":"accelerationY","p5DocPath":"accelerationY"},{"label":"accelerationZ","type":"variable","kindLabel":"var","params":[],"preview":"accelerationZ","p5DocPath":"accelerationZ"},{"label":"pAccelerationX","type":"variable","kindLabel":"var","params":[],"preview":"pAccelerationX","p5DocPath":"pAccelerationX"},{"label":"pAccelerationY","type":"variable","kindLabel":"var","params":[],"preview":"pAccelerationY","p5DocPath":"pAccelerationY"},{"label":"pAccelerationZ","type":"variable","kindLabel":"var","params":[],"preview":"pAccelerationZ","p5DocPath":"pAccelerationZ"},{"label":"rotationX","type":"variable","kindLabel":"var","params":[],"preview":"rotationX","p5DocPath":"rotationX"},{"label":"rotationY","type":"variable","kindLabel":"var","params":[],"preview":"rotationY","p5DocPath":"rotationY"},{"label":"rotationZ","type":"variable","kindLabel":"var","params":[],"preview":"rotationZ","p5DocPath":"rotationZ"},{"label":"pRotationX","type":"variable","kindLabel":"var","params":[],"preview":"pRotationX","p5DocPath":"pRotationX"},{"label":"pRotationY","type":"variable","kindLabel":"var","params":[],"preview":"pRotationY","p5DocPath":"pRotationY"},{"label":"pRotationZ","type":"variable","kindLabel":"var","params":[],"preview":"pRotationZ","p5DocPath":"pRotationZ"},{"label":"turnAxis","type":"variable","kindLabel":"var","params":[],"preview":"turnAxis","p5DocPath":"turnAxis"},{"label":"setMoveThreshold","type":"method","kindLabel":"fun","params":[{"p":"value","o":false}],"preview":"setMoveThreshold(value)","p5DocPath":"setMoveThreshold"},{"label":"setShakeThreshold","type":"method","kindLabel":"fun","params":[{"p":"value","o":false}],"preview":"setShakeThreshold(value)","p5DocPath":"setShakeThreshold"},{"label":"deviceMoved","type":"method","kindLabel":"fun","preview":"deviceMoved()","p5DocPath":"deviceMoved"},{"label":"deviceTurned","type":"method","kindLabel":"fun","preview":"deviceTurned()","p5DocPath":"deviceTurned"},{"label":"deviceShaken","type":"method","kindLabel":"fun","preview":"deviceShaken()","p5DocPath":"deviceShaken"},{"label":"keyIsPressed","type":"variable","kindLabel":"var","params":[],"preview":"keyIsPressed","p5DocPath":"keyIsPressed"},{"label":"key","type":"variable","kindLabel":"var","params":[],"preview":"key","p5DocPath":"key"},{"label":"keyCode","type":"variable","kindLabel":"var","params":[],"preview":"keyCode","p5DocPath":"keyCode"},{"label":"keyPressed","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"keyPressed([event])","p5DocPath":"keyPressed"},{"label":"keyReleased","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"keyReleased([event])","p5DocPath":"keyReleased"},{"label":"keyTyped","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"keyTyped([event])","p5DocPath":"keyTyped"},{"label":"keyIsDown","type":"method","kindLabel":"fun","params":[{"p":"code","o":false}],"preview":"keyIsDown(code)","p5DocPath":"keyIsDown"},{"label":"movedX","type":"variable","kindLabel":"var","params":[],"preview":"movedX","p5DocPath":"movedX"},{"label":"movedY","type":"variable","kindLabel":"var","params":[],"preview":"movedY","p5DocPath":"movedY"},{"label":"mouseX","type":"variable","kindLabel":"var","params":[],"preview":"mouseX","p5DocPath":"mouseX"},{"label":"mouseY","type":"variable","kindLabel":"var","params":[],"preview":"mouseY","p5DocPath":"mouseY"},{"label":"pmouseX","type":"variable","kindLabel":"var","params":[],"preview":"pmouseX","p5DocPath":"pmouseX"},{"label":"pmouseY","type":"variable","kindLabel":"var","params":[],"preview":"pmouseY","p5DocPath":"pmouseY"},{"label":"winMouseX","type":"variable","kindLabel":"var","params":[],"preview":"winMouseX","p5DocPath":"winMouseX"},{"label":"winMouseY","type":"variable","kindLabel":"var","params":[],"preview":"winMouseY","p5DocPath":"winMouseY"},{"label":"pwinMouseX","type":"variable","kindLabel":"var","params":[],"preview":"pwinMouseX","p5DocPath":"pwinMouseX"},{"label":"pwinMouseY","type":"variable","kindLabel":"var","params":[],"preview":"pwinMouseY","p5DocPath":"pwinMouseY"},{"label":"mouseButton","type":"variable","kindLabel":"var","params":[],"preview":"mouseButton","p5DocPath":"mouseButton"},{"label":"mouseIsPressed","type":"variable","kindLabel":"var","params":[],"preview":"mouseIsPressed","p5DocPath":"mouseIsPressed"},{"label":"mouseMoved","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mouseMoved([event])","p5DocPath":"mouseMoved"},{"label":"mouseDragged","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mouseDragged([event])","p5DocPath":"mouseDragged"},{"label":"mousePressed","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mousePressed([event])","p5DocPath":"mousePressed"},{"label":"mouseReleased","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mouseReleased([event])","p5DocPath":"mouseReleased"},{"label":"mouseClicked","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mouseClicked([event])","p5DocPath":"mouseClicked"},{"label":"doubleClicked","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"doubleClicked([event])","p5DocPath":"doubleClicked"},{"label":"mouseWheel","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"mouseWheel([event])","p5DocPath":"mouseWheel"},{"label":"requestPointerLock","type":"method","kindLabel":"fun","preview":"requestPointerLock()","p5DocPath":"requestPointerLock"},{"label":"exitPointerLock","type":"method","kindLabel":"fun","preview":"exitPointerLock()","p5DocPath":"exitPointerLock"},{"label":"touches","type":"variable","kindLabel":"var","params":[],"preview":"touches","p5DocPath":"touches"},{"label":"touchStarted","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"touchStarted([event])","p5DocPath":"touchStarted"},{"label":"touchMoved","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"touchMoved([event])","p5DocPath":"touchMoved"},{"label":"touchEnded","type":"method","kindLabel":"fun","params":[{"p":"event","o":true}],"preview":"touchEnded([event])","p5DocPath":"touchEnded"},{"label":"createImage","type":"method","kindLabel":"fun","params":[{"p":"width","o":false},{"p":"height","o":false}],"preview":"createImage(width, height)","p5DocPath":"createImage"},{"label":"saveCanvas","type":"method","kindLabel":"fun","preview":"saveCanvas()","p5DocPath":"saveCanvas"},{"label":"saveFrames","type":"method","kindLabel":"fun","params":[{"p":"filename","o":false},{"p":"extension","o":false},{"p":"duration","o":false},{"p":"framerate","o":false},{"p":"callback","o":true}],"preview":"saveFrames(filename, extension, duration, framerate, [callback])","p5DocPath":"saveFrames"},{"label":"loadImage","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"preview":"loadImage(path, [successCallback], [failureCallback])","p5DocPath":"loadImage"},{"label":"saveGif","type":"method","kindLabel":"fun","params":[{"p":"filename","o":false},{"p":"duration","o":false},{"p":"options","o":true}],"preview":"saveGif(filename, duration, [options])","p5DocPath":"saveGif"},{"label":"image","type":"method","kindLabel":"fun","preview":"image()","p5DocPath":"image"},{"label":"tint","type":"method","kindLabel":"fun","preview":"tint()","p5DocPath":"tint"},{"label":"noTint","type":"method","kindLabel":"fun","preview":"noTint()","p5DocPath":"noTint"},{"label":"imageMode","type":"method","kindLabel":"fun","params":[{"p":"mode","o":false}],"preview":"imageMode(mode)","p5DocPath":"imageMode"},{"label":"pixels","type":"variable","kindLabel":"var","params":[],"preview":"pixels","p5DocPath":"pixels"},{"label":"blend","type":"method","kindLabel":"fun","preview":"blend()","p5DocPath":"blend"},{"label":"copy","type":"method","kindLabel":"fun","preview":"copy()","p5DocPath":"copy"},{"label":"filter","type":"method","kindLabel":"fun","preview":"filter()","p5DocPath":"filter"},{"label":"get","type":"method","kindLabel":"fun","preview":"get()","p5DocPath":"get"},{"label":"loadPixels","type":"method","kindLabel":"fun","preview":"loadPixels()","p5DocPath":"loadPixels"},{"label":"set","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":false},{"p":"c","o":false}],"preview":"set(x, y, c)","p5DocPath":"set"},{"label":"updatePixels","type":"method","kindLabel":"fun","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"w","o":true},{"p":"h","o":true}],"preview":"updatePixels([x], [y], [w], [h])","p5DocPath":"updatePixels"},{"label":"loadJSON","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"preview":"loadJSON(path, [successCallback], [errorCallback])","p5DocPath":"loadJSON"},{"label":"loadStrings","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"preview":"loadStrings(path, [successCallback], [errorCallback])","p5DocPath":"loadStrings"},{"label":"loadTable","type":"method","kindLabel":"fun","params":[{"p":"filename","o":false},{"p":"extension","o":true},{"p":"header","o":true},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"preview":"loadTable(filename, [extension], [header], [callback], [errorCallback])","p5DocPath":"loadTable"},{"label":"loadXML","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true}],"preview":"loadXML(path, [successCallback], [errorCallback])","p5DocPath":"loadXML"},{"label":"loadBytes","type":"method","kindLabel":"fun","params":[{"p":"file","o":false},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"preview":"loadBytes(file, [callback], [errorCallback])","p5DocPath":"loadBytes"},{"label":"httpGet","type":"method","kindLabel":"fun","preview":"httpGet()","p5DocPath":"httpGet"},{"label":"httpPost","type":"method","kindLabel":"fun","preview":"httpPost()","p5DocPath":"httpPost"},{"label":"httpDo","type":"method","kindLabel":"fun","preview":"httpDo()","p5DocPath":"httpDo"},{"label":"createWriter","type":"method","kindLabel":"fun","params":[{"p":"name","o":false},{"p":"extension","o":true}],"preview":"createWriter(name, [extension])","p5DocPath":"createWriter"},{"label":"save","type":"method","kindLabel":"fun","params":[{"p":"objectOrFilename","o":true},{"p":"filename","o":true},{"p":"options","o":true}],"preview":"save([objectOrFilename], [filename], [options])","p5DocPath":"save"},{"label":"saveJSON","type":"method","kindLabel":"fun","params":[{"p":"json","o":false},{"p":"filename","o":false},{"p":"optimize","o":true}],"preview":"saveJSON(json, filename, [optimize])","p5DocPath":"saveJSON"},{"label":"saveStrings","type":"method","kindLabel":"fun","params":[{"p":"list","o":false},{"p":"filename","o":false},{"p":"extension","o":true},{"p":"isCRLF","o":true}],"preview":"saveStrings(list, filename, [extension], [isCRLF])","p5DocPath":"saveStrings"},{"label":"saveTable","type":"method","kindLabel":"fun","params":[{"p":"Table","o":false},{"p":"filename","o":false},{"p":"options","o":true}],"preview":"saveTable(Table, filename, [options])","p5DocPath":"saveTable"},{"label":"abs","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"abs(n)","p5DocPath":"abs"},{"label":"ceil","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"ceil(n)","p5DocPath":"ceil"},{"label":"constrain","type":"method","kindLabel":"fun","params":[{"p":"n","o":false},{"p":"low","o":false},{"p":"high","o":false}],"preview":"constrain(n, low, high)","p5DocPath":"constrain"},{"label":"dist","type":"method","kindLabel":"fun","preview":"dist()","p5DocPath":"dist"},{"label":"exp","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"exp(n)","p5DocPath":"exp"},{"label":"floor","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"floor(n)","p5DocPath":"floor"},{"label":"lerp","type":"method","kindLabel":"fun","params":[{"p":"start","o":false},{"p":"stop","o":false},{"p":"amt","o":false}],"preview":"lerp(start, stop, amt)","p5DocPath":"lerp"},{"label":"log","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"log(n)","p5DocPath":"log"},{"label":"mag","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":false}],"preview":"mag(x, y)","p5DocPath":"mag"},{"label":"map","type":"method","kindLabel":"fun","params":[{"p":"value","o":false},{"p":"start1","o":false},{"p":"stop1","o":false},{"p":"start2","o":false},{"p":"stop2","o":false},{"p":"withinBounds","o":true}],"preview":"map(value, start1, stop1, start2, stop2, [withinBounds])","p5DocPath":"map"},{"label":"max","type":"method","kindLabel":"fun","preview":"max()","p5DocPath":"max"},{"label":"min","type":"method","kindLabel":"fun","preview":"min()","p5DocPath":"min"},{"label":"norm","type":"method","kindLabel":"fun","params":[{"p":"value","o":false},{"p":"start","o":false},{"p":"stop","o":false}],"preview":"norm(value, start, stop)","p5DocPath":"norm"},{"label":"pow","type":"method","kindLabel":"fun","params":[{"p":"n","o":false},{"p":"e","o":false}],"preview":"pow(n, e)","p5DocPath":"pow"},{"label":"round","type":"method","kindLabel":"fun","params":[{"p":"n","o":false},{"p":"decimals","o":true}],"preview":"round(n, [decimals])","p5DocPath":"round"},{"label":"sq","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"sq(n)","p5DocPath":"sq"},{"label":"sqrt","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"sqrt(n)","p5DocPath":"sqrt"},{"label":"fract","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"fract(n)","p5DocPath":"fract"},{"label":"createVector","type":"method","kindLabel":"fun","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"z","o":true}],"preview":"createVector([x], [y], [z])","p5DocPath":"createVector"},{"label":"noise","type":"method","kindLabel":"fun","params":[{"p":"x","o":false},{"p":"y","o":true},{"p":"z","o":true}],"preview":"noise(x, [y], [z])","p5DocPath":"noise"},{"label":"noiseDetail","type":"method","kindLabel":"fun","params":[{"p":"lod","o":false},{"p":"falloff","o":false}],"preview":"noiseDetail(lod, falloff)","p5DocPath":"noiseDetail"},{"label":"noiseSeed","type":"method","kindLabel":"fun","params":[{"p":"seed","o":false}],"preview":"noiseSeed(seed)","p5DocPath":"noiseSeed"},{"label":"randomSeed","type":"method","kindLabel":"fun","params":[{"p":"seed","o":false}],"preview":"randomSeed(seed)","p5DocPath":"randomSeed"},{"label":"random","type":"method","kindLabel":"fun","preview":"random()","p5DocPath":"random"},{"label":"randomGaussian","type":"method","kindLabel":"fun","params":[{"p":"mean","o":true},{"p":"sd","o":true}],"preview":"randomGaussian([mean], [sd])","p5DocPath":"randomGaussian"},{"label":"acos","type":"method","kindLabel":"fun","params":[{"p":"value","o":false}],"preview":"acos(value)","p5DocPath":"acos"},{"label":"asin","type":"method","kindLabel":"fun","params":[{"p":"value","o":false}],"preview":"asin(value)","p5DocPath":"asin"},{"label":"atan","type":"method","kindLabel":"fun","params":[{"p":"value","o":false}],"preview":"atan(value)","p5DocPath":"atan"},{"label":"atan2","type":"method","kindLabel":"fun","params":[{"p":"y","o":false},{"p":"x","o":false}],"preview":"atan2(y, x)","p5DocPath":"atan2"},{"label":"cos","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"cos(angle)","p5DocPath":"cos"},{"label":"sin","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"sin(angle)","p5DocPath":"sin"},{"label":"tan","type":"method","kindLabel":"fun","params":[{"p":"angle","o":false}],"preview":"tan(angle)","p5DocPath":"tan"},{"label":"degrees","type":"method","kindLabel":"fun","params":[{"p":"radians","o":false}],"preview":"degrees(radians)","p5DocPath":"degrees"},{"label":"radians","type":"method","kindLabel":"fun","params":[{"p":"degrees","o":false}],"preview":"radians(degrees)","p5DocPath":"radians"},{"label":"angleMode","type":"method","kindLabel":"fun","preview":"angleMode()","p5DocPath":"angleMode"},{"label":"textAlign","type":"method","kindLabel":"fun","preview":"textAlign()","p5DocPath":"textAlign"},{"label":"textLeading","type":"method","kindLabel":"fun","preview":"textLeading()","p5DocPath":"textLeading"},{"label":"textSize","type":"method","kindLabel":"fun","preview":"textSize()","p5DocPath":"textSize"},{"label":"textStyle","type":"method","kindLabel":"fun","preview":"textStyle()","p5DocPath":"textStyle"},{"label":"textWidth","type":"method","kindLabel":"fun","params":[{"p":"str","o":false}],"preview":"textWidth(str)","p5DocPath":"textWidth"},{"label":"textAscent","type":"method","kindLabel":"fun","preview":"textAscent()","p5DocPath":"textAscent"},{"label":"textDescent","type":"method","kindLabel":"fun","preview":"textDescent()","p5DocPath":"textDescent"},{"label":"textWrap","type":"method","kindLabel":"fun","params":[{"p":"style","o":false}],"preview":"textWrap(style)","p5DocPath":"textWrap"},{"label":"loadFont","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"preview":"loadFont(path, [successCallback], [failureCallback])","p5DocPath":"loadFont"},{"label":"text","type":"method","kindLabel":"fun","params":[{"p":"str","o":false},{"p":"x","o":false},{"p":"y","o":false},{"p":"maxWidth","o":true},{"p":"maxHeight","o":true}],"preview":"text(str, x, y, [maxWidth], [maxHeight])","p5DocPath":"text"},{"label":"textFont","type":"method","kindLabel":"fun","preview":"textFont()","p5DocPath":"textFont"},{"label":"append","type":"method","kindLabel":"fun","params":[{"p":"array","o":false},{"p":"value","o":false}],"preview":"append(array, value)","p5DocPath":"append"},{"label":"arrayCopy","type":"method","kindLabel":"fun","preview":"arrayCopy()","p5DocPath":"arrayCopy"},{"label":"concat","type":"method","kindLabel":"fun","params":[{"p":"a","o":false},{"p":"b","o":false}],"preview":"concat(a, b)","p5DocPath":"concat"},{"label":"reverse","type":"method","kindLabel":"fun","params":[{"p":"list","o":false}],"preview":"reverse(list)","p5DocPath":"reverse"},{"label":"shorten","type":"method","kindLabel":"fun","params":[{"p":"list","o":false}],"preview":"shorten(list)","p5DocPath":"shorten"},{"label":"shuffle","type":"method","kindLabel":"fun","params":[{"p":"array","o":false},{"p":"bool","o":true}],"preview":"shuffle(array, [bool])","p5DocPath":"shuffle"},{"label":"sort","type":"method","kindLabel":"fun","params":[{"p":"list","o":false},{"p":"count","o":true}],"preview":"sort(list, [count])","p5DocPath":"sort"},{"label":"splice","type":"method","kindLabel":"fun","params":[{"p":"list","o":false},{"p":"value","o":false},{"p":"position","o":false}],"preview":"splice(list, value, position)","p5DocPath":"splice"},{"label":"subset","type":"method","kindLabel":"fun","params":[{"p":"list","o":false},{"p":"start","o":false},{"p":"count","o":true}],"preview":"subset(list, start, [count])","p5DocPath":"subset"},{"label":"float","type":"method","kindLabel":"fun","preview":"float()","p5DocPath":"float"},{"label":"int","type":"method","kindLabel":"fun","preview":"int()","p5DocPath":"int"},{"label":"str","type":"method","kindLabel":"fun","params":[{"p":"n","o":false}],"preview":"str(n)","p5DocPath":"str"},{"label":"boolean","type":"method","kindLabel":"fun","preview":"boolean()","p5DocPath":"boolean"},{"label":"byte","type":"method","kindLabel":"fun","preview":"byte()","p5DocPath":"byte"},{"label":"char","type":"method","kindLabel":"fun","preview":"char()","p5DocPath":"char"},{"label":"unchar","type":"method","kindLabel":"fun","preview":"unchar()","p5DocPath":"unchar"},{"label":"hex","type":"method","kindLabel":"fun","preview":"hex()","p5DocPath":"hex"},{"label":"unhex","type":"method","kindLabel":"fun","preview":"unhex()","p5DocPath":"unhex"},{"label":"join","type":"method","kindLabel":"fun","params":[{"p":"list","o":false},{"p":"separator","o":false}],"preview":"join(list, separator)","p5DocPath":"join"},{"label":"match","type":"method","kindLabel":"fun","params":[{"p":"str","o":false},{"p":"regexp","o":false}],"preview":"match(str, regexp)","p5DocPath":"match"},{"label":"matchAll","type":"method","kindLabel":"fun","params":[{"p":"str","o":false},{"p":"regexp","o":false}],"preview":"matchAll(str, regexp)","p5DocPath":"matchAll"},{"label":"nf","type":"method","kindLabel":"fun","preview":"nf()","p5DocPath":"nf"},{"label":"nfc","type":"method","kindLabel":"fun","preview":"nfc()","p5DocPath":"nfc"},{"label":"nfp","type":"method","kindLabel":"fun","preview":"nfp()","p5DocPath":"nfp"},{"label":"nfs","type":"method","kindLabel":"fun","preview":"nfs()","p5DocPath":"nfs"},{"label":"split","type":"method","kindLabel":"fun","params":[{"p":"value","o":false},{"p":"delim","o":false}],"preview":"split(value, delim)","p5DocPath":"split"},{"label":"splitTokens","type":"method","kindLabel":"fun","params":[{"p":"value","o":false},{"p":"delim","o":true}],"preview":"splitTokens(value, [delim])","p5DocPath":"splitTokens"},{"label":"trim","type":"method","kindLabel":"fun","preview":"trim()","p5DocPath":"trim"},{"label":"day","type":"method","kindLabel":"fun","preview":"day()","p5DocPath":"day"},{"label":"hour","type":"method","kindLabel":"fun","preview":"hour()","p5DocPath":"hour"},{"label":"minute","type":"method","kindLabel":"fun","preview":"minute()","p5DocPath":"minute"},{"label":"millis","type":"method","kindLabel":"fun","preview":"millis()","p5DocPath":"millis"},{"label":"month","type":"method","kindLabel":"fun","preview":"month()","p5DocPath":"month"},{"label":"second","type":"method","kindLabel":"fun","preview":"second()","p5DocPath":"second"},{"label":"year","type":"method","kindLabel":"fun","preview":"year()","p5DocPath":"year"},{"label":"beginGeometry","type":"method","kindLabel":"fun","preview":"beginGeometry()","p5DocPath":"beginGeometry"},{"label":"endGeometry","type":"method","kindLabel":"fun","preview":"endGeometry()","p5DocPath":"endGeometry"},{"label":"buildGeometry","type":"method","kindLabel":"fun","params":[{"p":"callback","o":false}],"preview":"buildGeometry(callback)","p5DocPath":"buildGeometry"},{"label":"freeGeometry","type":"method","kindLabel":"fun","params":[{"p":"geometry","o":false}],"preview":"freeGeometry(geometry)","p5DocPath":"freeGeometry"},{"label":"plane","type":"method","kindLabel":"fun","params":[{"p":"width","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"preview":"plane([width], [height], [detailX], [detailY])","p5DocPath":"plane"},{"label":"box","type":"method","kindLabel":"fun","params":[{"p":"width","o":true},{"p":"height","o":true},{"p":"depth","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"preview":"box([width], [height], [depth], [detailX], [detailY])","p5DocPath":"box"},{"label":"sphere","type":"method","kindLabel":"fun","params":[{"p":"radius","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"preview":"sphere([radius], [detailX], [detailY])","p5DocPath":"sphere"},{"label":"cylinder","type":"method","kindLabel":"fun","params":[{"p":"radius","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true},{"p":"bottomCap","o":true},{"p":"topCap","o":true}],"preview":"cylinder([radius], [height], [detailX], [detailY], [bottomCap], [topCap])","p5DocPath":"cylinder"},{"label":"cone","type":"method","kindLabel":"fun","params":[{"p":"radius","o":true},{"p":"height","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true},{"p":"cap","o":true}],"preview":"cone([radius], [height], [detailX], [detailY], [cap])","p5DocPath":"cone"},{"label":"ellipsoid","type":"method","kindLabel":"fun","params":[{"p":"radiusX","o":true},{"p":"radiusY","o":true},{"p":"radiusZ","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"preview":"ellipsoid([radiusX], [radiusY], [radiusZ], [detailX], [detailY])","p5DocPath":"ellipsoid"},{"label":"torus","type":"method","kindLabel":"fun","params":[{"p":"radius","o":true},{"p":"tubeRadius","o":true},{"p":"detailX","o":true},{"p":"detailY","o":true}],"preview":"torus([radius], [tubeRadius], [detailX], [detailY])","p5DocPath":"torus"},{"label":"orbitControl","type":"method","kindLabel":"fun","params":[{"p":"sensitivityX","o":true},{"p":"sensitivityY","o":true},{"p":"sensitivityZ","o":true},{"p":"options","o":true}],"preview":"orbitControl([sensitivityX], [sensitivityY], [sensitivityZ], [options])","p5DocPath":"orbitControl"},{"label":"debugMode","type":"method","kindLabel":"fun","preview":"debugMode()","p5DocPath":"debugMode"},{"label":"noDebugMode","type":"method","kindLabel":"fun","preview":"noDebugMode()","p5DocPath":"noDebugMode"},{"label":"ambientLight","type":"method","kindLabel":"fun","preview":"ambientLight()","p5DocPath":"ambientLight"},{"label":"specularColor","type":"method","kindLabel":"fun","preview":"specularColor()","p5DocPath":"specularColor"},{"label":"directionalLight","type":"method","kindLabel":"fun","preview":"directionalLight()","p5DocPath":"directionalLight"},{"label":"pointLight","type":"method","kindLabel":"fun","preview":"pointLight()","p5DocPath":"pointLight"},{"label":"imageLight","type":"method","kindLabel":"fun","params":[{"p":"img","o":false}],"preview":"imageLight(img)","p5DocPath":"imageLight"},{"label":"panorama","type":"method","kindLabel":"fun","params":[{"p":"img","o":false}],"preview":"panorama(img)","p5DocPath":"panorama"},{"label":"lights","type":"method","kindLabel":"fun","preview":"lights()","p5DocPath":"lights"},{"label":"lightFalloff","type":"method","kindLabel":"fun","params":[{"p":"constant","o":false},{"p":"linear","o":false},{"p":"quadratic","o":false}],"preview":"lightFalloff(constant, linear, quadratic)","p5DocPath":"lightFalloff"},{"label":"spotLight","type":"method","kindLabel":"fun","preview":"spotLight()","p5DocPath":"spotLight"},{"label":"noLights","type":"method","kindLabel":"fun","preview":"noLights()","p5DocPath":"noLights"},{"label":"loadModel","type":"method","kindLabel":"fun","preview":"loadModel()","p5DocPath":"loadModel"},{"label":"model","type":"method","kindLabel":"fun","params":[{"p":"model","o":false}],"preview":"model(model)","p5DocPath":"model"},{"label":"createModel","type":"method","kindLabel":"fun","preview":"createModel()","p5DocPath":"createModel"},{"label":"loadShader","type":"method","kindLabel":"fun","params":[{"p":"vertFilename","o":false},{"p":"fragFilename","o":false},{"p":"successCallback","o":true},{"p":"failureCallback","o":true}],"preview":"loadShader(vertFilename, fragFilename, [successCallback], [failureCallback])","p5DocPath":"loadShader"},{"label":"createShader","type":"method","kindLabel":"fun","params":[{"p":"vertSrc","o":false},{"p":"fragSrc","o":false},{"p":"options","o":true}],"preview":"createShader(vertSrc, fragSrc, [options])","p5DocPath":"createShader"},{"label":"createFilterShader","type":"method","kindLabel":"fun","params":[{"p":"fragSrc","o":false}],"preview":"createFilterShader(fragSrc)","p5DocPath":"createFilterShader"},{"label":"shader","type":"method","kindLabel":"fun","params":[{"p":"s","o":false}],"preview":"shader(s)","p5DocPath":"shader"},{"label":"baseMaterialShader","type":"method","kindLabel":"fun","preview":"baseMaterialShader()","p5DocPath":"baseMaterialShader"},{"label":"baseNormalShader","type":"method","kindLabel":"fun","preview":"baseNormalShader()","p5DocPath":"baseNormalShader"},{"label":"baseColorShader","type":"method","kindLabel":"fun","preview":"baseColorShader()","p5DocPath":"baseColorShader"},{"label":"baseStrokeShader","type":"method","kindLabel":"fun","preview":"baseStrokeShader()","p5DocPath":"baseStrokeShader"},{"label":"resetShader","type":"method","kindLabel":"fun","preview":"resetShader()","p5DocPath":"resetShader"},{"label":"texture","type":"method","kindLabel":"fun","params":[{"p":"tex","o":false}],"preview":"texture(tex)","p5DocPath":"texture"},{"label":"textureMode","type":"method","kindLabel":"fun","params":[{"p":"mode","o":false}],"preview":"textureMode(mode)","p5DocPath":"textureMode"},{"label":"textureWrap","type":"method","kindLabel":"fun","params":[{"p":"wrapX","o":false},{"p":"wrapY","o":true}],"preview":"textureWrap(wrapX, [wrapY])","p5DocPath":"textureWrap"},{"label":"normalMaterial","type":"method","kindLabel":"fun","preview":"normalMaterial()","p5DocPath":"normalMaterial"},{"label":"ambientMaterial","type":"method","kindLabel":"fun","preview":"ambientMaterial()","p5DocPath":"ambientMaterial"},{"label":"emissiveMaterial","type":"method","kindLabel":"fun","preview":"emissiveMaterial()","p5DocPath":"emissiveMaterial"},{"label":"specularMaterial","type":"method","kindLabel":"fun","preview":"specularMaterial()","p5DocPath":"specularMaterial"},{"label":"shininess","type":"method","kindLabel":"fun","params":[{"p":"shine","o":false}],"preview":"shininess(shine)","p5DocPath":"shininess"},{"label":"metalness","type":"method","kindLabel":"fun","params":[{"p":"metallic","o":false}],"preview":"metalness(metallic)","p5DocPath":"metalness"},{"label":"camera","type":"method","kindLabel":"fun","params":[{"p":"x","o":true},{"p":"y","o":true},{"p":"z","o":true},{"p":"centerX","o":true},{"p":"centerY","o":true},{"p":"centerZ","o":true},{"p":"upX","o":true},{"p":"upY","o":true},{"p":"upZ","o":true}],"preview":"camera([x], [y], [z], [centerX], [centerY], [centerZ], [upX], [upY], [upZ])","p5DocPath":"camera"},{"label":"perspective","type":"method","kindLabel":"fun","params":[{"p":"fovy","o":true},{"p":"aspect","o":true},{"p":"near","o":true},{"p":"far","o":true}],"preview":"perspective([fovy], [aspect], [near], [far])","p5DocPath":"perspective"},{"label":"linePerspective","type":"method","kindLabel":"fun","preview":"linePerspective()","p5DocPath":"linePerspective"},{"label":"ortho","type":"method","kindLabel":"fun","params":[{"p":"left","o":true},{"p":"right","o":true},{"p":"bottom","o":true},{"p":"top","o":true},{"p":"near","o":true},{"p":"far","o":true}],"preview":"ortho([left], [right], [bottom], [top], [near], [far])","p5DocPath":"ortho"},{"label":"frustum","type":"method","kindLabel":"fun","params":[{"p":"left","o":true},{"p":"right","o":true},{"p":"bottom","o":true},{"p":"top","o":true},{"p":"near","o":true},{"p":"far","o":true}],"preview":"frustum([left], [right], [bottom], [top], [near], [far])","p5DocPath":"frustum"},{"label":"createCamera","type":"method","kindLabel":"fun","preview":"createCamera()","p5DocPath":"createCamera"},{"label":"setCamera","type":"method","kindLabel":"fun","params":[{"p":"cam","o":false}],"preview":"setCamera(cam)","p5DocPath":"setCamera"},{"label":"setAttributes","type":"method","kindLabel":"fun","preview":"setAttributes()","p5DocPath":"setAttributes"},{"label":"getAudioContext","type":"method","kindLabel":"fun","preview":"getAudioContext()","p5DocPath":"getAudioContext"},{"label":"userStartAudio","type":"method","kindLabel":"fun","params":[{"p":"elements","o":true},{"p":"callback","o":true}],"preview":"userStartAudio([elements], [callback])","p5DocPath":"userStartAudio"},{"label":"getOutputVolume","type":"method","kindLabel":"fun","preview":"getOutputVolume()","p5DocPath":"getOutputVolume"},{"label":"outputVolume","type":"method","kindLabel":"fun","params":[{"p":"volume","o":false},{"p":"rampTime","o":true},{"p":"timeFromNow","o":true}],"preview":"outputVolume(volume, [rampTime], [timeFromNow])","p5DocPath":"outputVolume"},{"label":"soundOut","type":"variable","kindLabel":"var","params":[],"preview":"soundOut","p5DocPath":"soundOut"},{"label":"sampleRate","type":"method","kindLabel":"fun","preview":"sampleRate()","p5DocPath":"sampleRate"},{"label":"freqToMidi","type":"method","kindLabel":"fun","params":[{"p":"frequency","o":false}],"preview":"freqToMidi(frequency)","p5DocPath":"freqToMidi"},{"label":"midiToFreq","type":"method","kindLabel":"fun","params":[{"p":"midiNote","o":false}],"preview":"midiToFreq(midiNote)","p5DocPath":"midiToFreq"},{"label":"soundFormats","type":"method","kindLabel":"fun","params":[{"p":"formats","o":true}],"preview":"soundFormats([formats])","p5DocPath":"soundFormats"},{"label":"saveSound","type":"method","kindLabel":"fun","params":[{"p":"soundFile","o":false},{"p":"fileName","o":false}],"preview":"saveSound(soundFile, fileName)","p5DocPath":"saveSound"},{"label":"loadSound","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"successCallback","o":true},{"p":"errorCallback","o":true},{"p":"whileLoading","o":true}],"preview":"loadSound(path, [successCallback], [errorCallback], [whileLoading])","p5DocPath":"loadSound"},{"label":"createConvolver","type":"method","kindLabel":"fun","params":[{"p":"path","o":false},{"p":"callback","o":true},{"p":"errorCallback","o":true}],"preview":"createConvolver(path, [callback], [errorCallback])","p5DocPath":"createConvolver"},{"label":"setBPM","type":"method","kindLabel":"fun","params":[{"p":"BPM","o":false},{"p":"rampTime","o":false}],"preview":"setBPM(BPM, rampTime)","p5DocPath":"setBPM"},{"label":"true","type":"boolean","kindLabel":"bool","params":[],"preview":"true","p5DocPath":"boolean"},{"label":"false","type":"boolean","kindLabel":"bool","params":[],"preview":"false","p5DocPath":"boolean"},{"label":"await","type":"keyword","kindLabel":"keyword","params":[],"preview":"await"},{"label":"class","type":"keyword","kindLabel":"keyword","params":[],"preview":"class","p5DocPath":"class"},{"label":"const","type":"keyword","kindLabel":"keyword","params":[],"preview":"const","p5DocPath":"const"},{"label":"else","type":"keyword","kindLabel":"keyword","params":[],"preview":"else","p5DocPath":"if-else"},{"label":"export","type":"keyword","kindLabel":"keyword","params":[],"preview":"export"},{"label":"for","type":"keyword","kindLabel":"keyword","params":[],"preview":"for","p5DocPath":"for"},{"label":"function","type":"keyword","kindLabel":"keyword","params":[],"preview":"function","p5DocPath":"function"},{"label":"if","type":"keyword","kindLabel":"keyword","params":[],"preview":"if","p5DocPath":"if-else"},{"label":"return","type":"keyword","kindLabel":"keyword","params":[],"preview":"return","p5DocPath":"return"},{"label":"while","type":"keyword","kindLabel":"keyword","params":[],"preview":"while","p5DocPath":"while"},{"label":"with","type":"keyword","kindLabel":"keyword","params":[],"preview":"with"},{"label":"let","type":"keyword","kindLabel":"keyword","params":[],"preview":"let","p5DocPath":"let"},{"label":"Array","type":"obj","kindLabel":"obj","params":[],"preview":"Array"},{"label":"Boolean","type":"obj","kindLabel":"obj","params":[],"preview":"Boolean"},{"label":"Date","type":"obj","kindLabel":"obj","params":[],"preview":"Date"},{"label":"Error","type":"obj","kindLabel":"obj","params":[],"preview":"Error"},{"label":"Function","type":"obj","kindLabel":"obj","params":[],"preview":"Function"},{"label":"JSON","type":"obj","kindLabel":"obj","params":[],"preview":"JSON","p5DocPath":"JSON"},{"label":"Math","type":"obj","kindLabel":"obj","params":[],"preview":"Math"},{"label":"Number","type":"obj","kindLabel":"obj","params":[],"preview":"Number"},{"label":"Object","type":"obj","kindLabel":"obj","params":[],"preview":"Object"},{"label":"RegExp","type":"obj","kindLabel":"obj","params":[],"preview":"RegExp"},{"label":"String","type":"obj","kindLabel":"obj","params":[],"preview":"String"},{"label":"Promise","type":"obj","kindLabel":"obj","params":[],"preview":"Promise"},{"label":"Set","type":"obj","kindLabel":"obj","params":[],"preview":"Set"},{"label":"Map","type":"obj","kindLabel":"obj","params":[],"preview":"Map"},{"label":"Symbol","type":"obj","kindLabel":"obj","params":[],"preview":"Symbol"},{"label":"WeakMap","type":"obj","kindLabel":"obj","params":[],"preview":"WeakMap"},{"label":"WeakSet","type":"obj","kindLabel":"obj","params":[],"preview":"WeakSet"},{"label":"ArrayBuffer","type":"obj","kindLabel":"obj","params":[],"preview":"ArrayBuffer"},{"label":"DataView","type":"obj","kindLabel":"obj","params":[],"preview":"DataView"},{"label":"Int32Array","type":"obj","kindLabel":"obj","params":[],"preview":"Int32Array"},{"label":"Uint32Array","type":"obj","kindLabel":"obj","params":[],"preview":"Uint32Array"},{"label":"Float32Array","type":"obj","kindLabel":"obj","params":[],"preview":"Float32Array"},{"label":"window","type":"obj","kindLabel":"obj","params":[],"preview":"window"},{"label":"document","type":"obj","kindLabel":"obj","params":[],"preview":"document"},{"label":"navigator","type":"obj","kindLabel":"obj","params":[],"preview":"navigator"},{"label":"console","type":"obj","kindLabel":"obj","params":[],"preview":"console","p5DocPath":"console"},{"label":"localStorage","type":"obj","kindLabel":"obj","params":[],"preview":"localStorage"},{"label":"sessionStorage","type":"obj","kindLabel":"obj","params":[],"preview":"sessionStorage"},{"label":"history","type":"obj","kindLabel":"obj","params":[],"preview":"history"},{"label":"location","type":"obj","kindLabel":"obj","params":[],"preview":"location"}]; diff --git a/server/scripts/update-p5-hinter.js b/server/scripts/update-p5-hinter.js index 0c6b4a7cc5..d438c28ca0 100644 --- a/server/scripts/update-p5-hinter.js +++ b/server/scripts/update-p5-hinter.js @@ -53,6 +53,39 @@ const reservedObjects = [ { name: 'location', p5DocPath: undefined } ]; +function getKindLabel(type) { + switch (type) { + case 'method': + return 'fun'; + case 'variable': + return 'var'; + case 'constant': + return 'const'; + case 'keyword': + return 'kw'; + case 'boolean': + return 'bool'; + case 'obj': + return 'obj'; + default: + return type; + } +} + +// create ghost text preview for methods +function makePreview(label, type, params = []) { + const formattedParams = params + .map((param) => (param.o ? `[${param.p}]` : param.p)) + .join(', '); + + if (type === 'method') { + return `${label}(${formattedParams})`; + } + + return label; +} + +// TODO: add back in reference version switching depending user's p5.js version axios .get('https://p5js.org/reference/data.json') .then((response) => { @@ -73,8 +106,6 @@ axios if (obj.itemtype === 'method') { itemType = 'method'; - // Adds the parameters to the method. - // I'm not sure this will be used but we can at least keep it around. params = obj.params?.map((param) => ({ p: param.name, // param name o: param.optional ?? false // optional @@ -86,7 +117,9 @@ axios p5Keywords.push({ label: obj.name, type: itemType, + kindLabel: getKindLabel(itemType), params, + preview: makePreview(obj.name, itemType, params), p5DocPath: obj.name }); } @@ -96,6 +129,9 @@ axios p5Keywords.push({ label: bol, type: 'boolean', + kindLabel: 'bool', + params: [], + preview: bol, p5DocPath: 'boolean' }); }); @@ -104,6 +140,9 @@ axios p5Keywords.push({ label: keyword.name, type: 'keyword', + kindLabel: 'keyword', + params: [], + preview: keyword.name, p5DocPath: keyword.p5DocPath }); }); @@ -112,6 +151,9 @@ axios p5Keywords.push({ label: keyword.name, type: 'obj', + kindLabel: 'obj', + params: [], + preview: keyword.name, p5DocPath: keyword.p5DocPath }); }); From 0e255430dabb05c171ed3c4ce00486c8e44007a5 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 22:28:29 -0400 Subject: [PATCH 2/7] add keyboard behavior and custom UI for hinter dropdown --- .../IDE/components/Editor/stateUtils.js | 131 +++++++++++++++++- 1 file changed, 127 insertions(+), 4 deletions(-) diff --git a/client/modules/IDE/components/Editor/stateUtils.js b/client/modules/IDE/components/Editor/stateUtils.js index e3a90e813a..750f1b0f1c 100644 --- a/client/modules/IDE/components/Editor/stateUtils.js +++ b/client/modules/IDE/components/Editor/stateUtils.js @@ -22,7 +22,9 @@ import { import { autocompletion, closeBrackets, - closeBracketsKeymap + closeBracketsKeymap, + completionStatus, + selectedCompletionIndex } from '@codemirror/autocomplete'; import { highlightSelectionMatches, @@ -258,15 +260,136 @@ function getFileEmmetConfig(fileName) { } } +function focusOnReferenceArrow(view) { + if (completionStatus(view.state) !== 'active') return false; + + const selectedIndex = selectedCompletionIndex(view.state); + if (selectedIndex == null || selectedIndex < 0) return false; + + const tooltip = view.dom.querySelector('.cm-tooltip-autocomplete'); + if (!tooltip) return false; + + const options = tooltip.querySelectorAll('li.CodeMirror-hint'); + const selectedOption = options[selectedIndex]; + if (!selectedOption) return false; + + const link = selectedOption.querySelector('.cm-completionRefLink'); + if (!link) return false; + + link.focus(); + link.classList.add('focused-hint-link'); + + const cleanup = () => { + link.classList.remove('focused-hint-link'); + link.removeEventListener('blur', cleanup); + }; + link.addEventListener('blur', cleanup); + + return true; +} + // Extra custom keymaps. // TODO: We need to add sublime mappings + other missing extra mappings here. -const extraKeymaps = [{ key: 'Tab', run: insertTab, shift: indentLess }]; +const extraKeymaps = [ + { key: 'ArrowRight', run: focusOnReferenceArrow }, + { key: 'Tab', run: insertTab, shift: indentLess } +]; const emmetKeymaps = [{ key: 'Tab', run: expandAbbreviation }]; export const AUTOCOMPLETE_OPTIONS = { tooltipClass: () => 'CodeMirror-hints', - optionClass: () => 'CodeMirror-hint', - closeOnBlur: false + closeOnBlur: false, + icons: false, + + // handle css classes + optionClass(completion) { + let className = 'CodeMirror-hint'; + + if (completion.type) { + className += ` hint-type-${completion.type}`; + } + + if (completion.p5DocPath) { + className += ' has-doc-link'; + } + + return className; + }, + + addToOptions: [ + { + position: 60, + render(completion) { + const kind = document.createElement('span'); + kind.className = 'cm-completionKind'; + kind.textContent = completion.kindLabel || completion.type || ''; + return kind; + } + }, + { + position: 80, + render(completion, state, view) { + if (!completion.p5DocPath) return null; + + // TODO: add in reference url version switching + const link = document.createElement('a'); + link.className = 'cm-completionRefLink'; + link.href = `https://p5js.org/reference/p5/${completion.p5DocPath}`; + link.target = '_blank'; + link.rel = 'noopener noreferrer'; + link.tabIndex = -1; + link.setAttribute('aria-label', `Open ${completion.label} reference`); + + link.innerHTML = ` + open ${completion.label} reference + + `; + + link.addEventListener('mousedown', (event) => { + event.preventDefault(); + event.stopPropagation(); + }); + + link.addEventListener('click', (event) => { + event.stopPropagation(); + }); + + link.addEventListener('keydown', (event) => { + if (event.key === 'ArrowLeft' || event.key === 'Escape') { + event.preventDefault(); + event.stopPropagation(); + link.classList.remove('focused-hint-link'); + view.focus(); + } + }); + + return link; + } + }, + { + position: 100, + render(completion) { + if (!completion.blacklisted) return null; + + const warning = document.createElement('div'); + warning.className = 'cm-completionWarning'; + + const icon = document.createElement('span'); + icon.className = 'cm-completionWarningIcon'; + icon.setAttribute('aria-hidden', 'true'); + icon.textContent = '⚠️'; + + const text = document.createElement('span'); + text.className = 'cm-completionWarningText'; + text.textContent = 'use with caution in this context'; + + warning.appendChild(icon); + warning.appendChild(text); + + return warning; + } + } + ] }; /** From 3cc073ea14c2ceee218f4acc4a12cc1551abf9df Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 22:56:48 -0400 Subject: [PATCH 3/7] refactor contextaware and analyzer utils to adapt to cm6 --- client/utils/contextAwareHinter.js | 296 +++++++++++++++++++---------- client/utils/getContext.js | 8 +- client/utils/p5CodeAstAnalyzer.js | 9 +- 3 files changed, 197 insertions(+), 116 deletions(-) diff --git a/client/utils/contextAwareHinter.js b/client/utils/contextAwareHinter.js index a90b88cd0e..f9fc11be39 100644 --- a/client/utils/contextAwareHinter.js +++ b/client/utils/contextAwareHinter.js @@ -4,17 +4,145 @@ import classMap from './p5-instance-methods-and-creators.json'; const scopeMap = require('./p5-scope-function-access-map.json'); -function getExpressionBeforeCursor(cm) { - const cursor = cm.getCursor(); - const line = cm.getLine(cursor.line); - const uptoCursor = line.slice(0, cursor.ch); +function getCurrentWordInfo(context) { + const word = context.matchBefore(/\w*/); + + if (!word) { + return { + text: '', + from: context.pos, + to: context.pos + }; + } + + return { + text: word.text || '', + from: word.from, + to: context.pos + }; +} + +function getExpressionBeforeCursor(state, pos) { + const line = state.doc.lineAt(pos); + const uptoCursor = line.text.slice(0, pos - line.from); const match = uptoCursor.match( /([a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*)\.(?:[a-zA-Z_$][\w$]*)?$/ ); return match ? match[1] : null; } -export default function contextAwareHinter(cm, options = {}) { +function getTypedMemberInfo(state, pos) { + const line = state.doc.lineAt(pos); + const uptoCursor = line.text.slice(0, pos - line.from); + const dotMatch = uptoCursor.match(/\.([a-zA-Z_$][\w$]*)?$/); + + if (!dotMatch) { + return { + typed: '', + from: pos, + to: pos + }; + } + + const typed = dotMatch[1] || ''; + const methodStart = pos - dotMatch[0].length + 1; + + return { + typed, + from: methodStart, + to: pos + }; +} + +function formatPreview(label, params = []) { + if (!params.length) return `${label}()`; + + return `${label}(${params + .map((param) => (param.o ? `[${param.p}]` : param.p)) + .join(', ')})`; +} + +function makeBaseHintLookup(hints) { + const byLabel = new Map(); + + hints.forEach((hint) => { + if (hint?.label) { + byLabel.set(hint.label, hint); + } + }); + + return byLabel; +} + +function buildMethodOption(methodName, baseHint, range) { + const params = baseHint?.params || []; + + return { + label: methodName, + type: 'method', + kindLabel: baseHint?.kindLabel || 'fun', + params, + p5DocPath: baseHint?.p5DocPath, + preview: baseHint?.preview || formatPreview(methodName, params), + from: range.from, + to: range.to + }; +} + +function buildVarOrFunctionOption({ + name, + isFunc, + userDefinedFunctionMetadata, + blacklist, + range +}) { + const fnMeta = userDefinedFunctionMetadata[name]; + const params = fnMeta?.params || []; + + let preview; + + if (isFunc) { + if (fnMeta?.text) { + preview = formatPreview(fnMeta.text, params); + } else { + preview = formatPreview(name, params); + } + } else { + preview = undefined; + } + + const isBlacklisted = blacklist.includes(name); + + return { + label: fnMeta?.text || name, + type: isFunc ? 'method' : 'variable', + kindLabel: isFunc ? 'fun' : 'var', + params, + p5DocPath: undefined, + preview, + blacklisted: isBlacklisted, + warning: isBlacklisted ? '⚠️ use with caution in this context' : null, + from: range.from, + to: range.to + }; +} + +function buildGlobalHintOption(hint, blacklist, range) { + return { + ...hint, + blacklisted: blacklist.includes(hint.label), + warning: blacklist.includes(hint.label) + ? '⚠️ use with caution in this context' + : null, + from: range.from, + to: range.to + }; +} + +export default function contextAwareHinter(context, { hints = [] } = {}) { + const { state, pos } = context; + const cm = state.doc.toString(); + const { variableToP5ClassMap = {}, scopeToDeclaredVarsMap = {}, @@ -22,12 +150,9 @@ export default function contextAwareHinter(cm, options = {}) { userDefinedClassMetadata = {} } = p5CodeAstAnalyzer(cm) || {}; - const { hinter } = options; - if (!hinter || typeof hinter.search !== 'function') { - return []; - } + const baseHintLookup = makeBaseHintLookup(hints); - const baseExpression = getExpressionBeforeCursor(cm); + const baseExpression = getExpressionBeforeCursor(state, pos); if (baseExpression) { const className = variableToP5ClassMap[baseExpression]; @@ -38,61 +163,36 @@ export default function contextAwareHinter(cm, options = {}) { let methods = []; if (userClassEntry?.methods) { - const { methods: userMethods } = userClassEntry; - methods = userMethods; + methods = userClassEntry.methods; } else if (className && classMap[className]?.methods) { - const { methods: classMethods } = classMap[className]; - methods = classMethods; + methods = classMap[className].methods; } else { return []; } - const cursor = cm.getCursor(); - const lineText = cm.getLine(cursor.line); - const dotMatch = lineText - .slice(0, cursor.ch) - .match(/\.([a-zA-Z_$][\w$]*)?$/); - - let from = cursor; - if (dotMatch) { - const fullMatch = dotMatch[0]; - const methodStart = cursor.ch - fullMatch.length + 1; - from = { line: cursor.line, ch: methodStart }; - } else { - from = cursor; - } - - const to = { line: cursor.line, ch: cursor.ch }; - const typed = dotMatch?.[1]?.toLowerCase() || ''; - - const methodHints = methods - .filter((method) => method.toLowerCase().startsWith(typed)) - .map((method) => ({ - item: { - text: method, - type: 'fun', - isMethod: true - }, - displayText: method, - from, - to - })); - - return methodHints; + const memberInfo = getTypedMemberInfo(state, pos); + const typedLower = memberInfo.typed.toLowerCase(); + + const options = methods + .filter((method) => method.toLowerCase().startsWith(typedLower)) + .map((method) => + buildMethodOption(method, baseHintLookup.get(method), memberInfo) + ); + + return { + from: memberInfo.from, + to: memberInfo.to, + options, + filter: false + }; } - const { line, ch } = cm.getCursor(); - const { string } = cm.getTokenAt({ line, ch }); - const currentWord = string.trim(); - - const currentContext = getContext(cm); - const allHints = hinter.search(currentWord); + const wordInfo = getCurrentWordInfo(context); + const lowerCurrentWord = wordInfo.text.toLowerCase(); - // const whitelist = scopeMap[currentContext]?.whitelist || []; + const currentContext = getContext(cm, pos); const blacklist = scopeMap[currentContext]?.blacklist || []; - const lowerCurrentWord = currentWord.toLowerCase(); - function isInScope(varName) { return Object.entries(scopeToDeclaredVarsMap).some( ([scope, vars]) => @@ -103,13 +203,13 @@ export default function contextAwareHinter(cm, options = {}) { const allVarNames = Array.from( new Set( Object.values(scopeToDeclaredVarsMap) - .map((s) => Object.keys(s)) + .map((scopeVars) => Object.keys(scopeVars)) .flat() .filter((name) => typeof name === 'string') ) ); - const varHints = allVarNames + const localOptions = allVarNames .filter( (varName) => varName.toLowerCase().startsWith(lowerCurrentWord) && isInScope(varName) @@ -120,70 +220,58 @@ export default function contextAwareHinter(cm, options = {}) { (!scopeToDeclaredVarsMap[currentContext]?.[varName] && scopeToDeclaredVarsMap.global?.[varName] === 'fun'); - const baseItem = isFunc - ? { ...userDefinedFunctionMetadata[varName] } - : { - text: varName, - type: 'var', - params: [], - p5: false - }; - - return { - item: baseItem, - isBlacklisted: blacklist.includes(varName) - }; + return buildVarOrFunctionOption({ + name: varName, + isFunc, + userDefinedFunctionMetadata, + blacklist, + range: wordInfo + }); }); - const filteredHints = allHints + const globalOptions = hints .filter( - (h) => - h && - h.item && - typeof h.item.text === 'string' && - h.item.text.toLowerCase().startsWith(lowerCurrentWord) + (hint) => + hint && + typeof hint.label === 'string' && + hint.label.toLowerCase().startsWith(lowerCurrentWord) ) - .map((hint) => { - const name = hint.item?.text || ''; - const isBlacklisted = blacklist.includes(name); - - return { - ...hint, - isBlacklisted - }; - }); + .map((hint) => buildGlobalHintOption(hint, blacklist, wordInfo)); - const combinedHints = [...varHints, ...filteredHints]; + const combinedOptions = [...localOptions, ...globalOptions]; const typePriority = { - fun: 0, - var: 1, + method: 0, + variable: 1, keyword: 2, - other: 3 + constant: 3, + boolean: 4, + obj: 5, + other: 6 }; - const sorted = combinedHints.sort((a, b) => { - const nameA = a.item?.text || ''; - const nameB = b.item?.text || ''; - const typeA = a.item?.type || 'other'; - const typeB = b.item?.type || 'other'; - - const isBlacklistedA = a.isBlacklisted ? 1 : 0; - const isBlacklistedB = b.isBlacklisted ? 1 : 0; - - const typeScoreA = typePriority[typeA] ?? typePriority.other; - const typeScoreB = typePriority[typeB] ?? typePriority.other; + combinedOptions.sort((a, b) => { + const isBlacklistedA = a.blacklisted ? 1 : 0; + const isBlacklistedB = b.blacklisted ? 1 : 0; if (isBlacklistedA !== isBlacklistedB) { return isBlacklistedA - isBlacklistedB; } - if (typeScoreA !== typeScoreB) { - return typeScoreA - typeScoreB; + const typeA = typePriority[a.type] ?? typePriority.other; + const typeB = typePriority[b.type] ?? typePriority.other; + + if (typeA !== typeB) { + return typeA - typeB; } - return nameA.localeCompare(nameB); + return a.label.localeCompare(b.label); }); - return sorted; + return { + from: wordInfo.from, + to: wordInfo.to, + options: combinedOptions, + filter: false + }; } diff --git a/client/utils/getContext.js b/client/utils/getContext.js index beddef71f7..2e9a11ebdc 100644 --- a/client/utils/getContext.js +++ b/client/utils/getContext.js @@ -1,11 +1,7 @@ const parser = require('@babel/parser'); const traverse = require('@babel/traverse').default; -export default function getContext(_cm) { - const code = _cm.getValue(); - const cursor = _cm.getCursor(); - const offset = _cm.indexFromPos(cursor); - +export default function getContext(code, pos) { let ast; try { ast = parser.parse(code, { @@ -21,7 +17,7 @@ export default function getContext(_cm) { traverse(ast, { Function(path) { const { node } = path; - if (offset >= node.start && offset <= node.end) { + if (pos >= node.start && pos <= node.end) { if (node.id && node.id.name) { context = node.id.name; } else { diff --git a/client/utils/p5CodeAstAnalyzer.js b/client/utils/p5CodeAstAnalyzer.js index 5aaa5ec7be..3307af8c5a 100644 --- a/client/utils/p5CodeAstAnalyzer.js +++ b/client/utils/p5CodeAstAnalyzer.js @@ -24,8 +24,7 @@ let lastValidResult = { userDefinedClassMetadata: {} }; -function _p5CodeAstAnalyzer(_cm) { - const code = _cm.getValue(); +function _p5CodeAstAnalyzer(code) { let ast; try { @@ -153,8 +152,7 @@ function _p5CodeAstAnalyzer(_cm) { expr.left.object.type === 'ThisExpression' && expr.left.property.type === 'Identifier' ) { - const propName = expr.left.property.name; - classInfo.fields.add(propName); + classInfo.fields.add(expr.left.property.name); } }, @@ -165,8 +163,7 @@ function _p5CodeAstAnalyzer(_cm) { callee.object.type === 'ThisExpression' && callee.property.type === 'Identifier' ) { - const methodName = callee.property.name; - classInfo.fields.add(methodName); + classInfo.fields.add(callee.property.name); } } }, From 4be55d1a867d0eac133dfe59b017f42ac80e02f7 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:01:47 -0400 Subject: [PATCH 4/7] integrate context awareness and ghost text --- .../IDE/components/Editor/p5JavaScript.js | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/client/modules/IDE/components/Editor/p5JavaScript.js b/client/modules/IDE/components/Editor/p5JavaScript.js index 4d8b27b7e6..f66315202c 100644 --- a/client/modules/IDE/components/Editor/p5JavaScript.js +++ b/client/modules/IDE/components/Editor/p5JavaScript.js @@ -1,46 +1,19 @@ import { LanguageSupport } from '@codemirror/language'; import { javascript } from '@codemirror/lang-javascript'; import { p5Hinter } from '../../../../utils/p5-hinter'; +import { p5CompletionPreview } from './p5CompletionPreview'; +import contextAwareHinter from '../../../../utils/contextAwareHinter'; function testCompletions(context) { const word = context.matchBefore(/\w*/); - if (word.from === word.to && !context.explicit) return null; - function addDomNodeInfo(item) { - const itemCopy = { ...item }; - - if (item.p5DocPath) { - // TODO: Use the option below to add the p5 link for *all* hints. - // https://codemirror.net/docs/ref/#autocomplete.autocompletion^config.addToOptions - itemCopy.info = () => { - const domNode = document.createElement('a'); - domNode.href = `https://p5js.org/reference/p5/${item.p5DocPath}`; - domNode.role = 'link'; - domNode.target = '_blank'; - domNode.onclick = (event) => event.stopPropagation(); - domNode.innerHTML = ` - open ${item.label} reference - - `; - return { - dom: domNode, - destroy: () => { - // Cleanup logic if needed - domNode.remove(); - } - }; - }; - } - - return itemCopy; + if (!word && !context.explicit) { + return null; } - const hinterWithDomNodes = p5Hinter.map(addDomNodeInfo); - - return { - from: word.from, - options: hinterWithDomNodes - }; + return contextAwareHinter(context, { + hints: p5Hinter + }); } export default function p5JavaScript() { @@ -49,6 +22,7 @@ export default function p5JavaScript() { jsLang.extension, jsLang.language.data.of({ autocomplete: testCompletions - }) + }), + p5CompletionPreview() ]); } From e77e2a66dcf1b46b8ffc276f846631f978f9c1c8 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:04:41 -0400 Subject: [PATCH 5/7] update func name, add ghost text util --- .../components/Editor/p5CompletionPreview.js | 106 ++++++++++++++++++ .../IDE/components/Editor/p5JavaScript.js | 4 +- 2 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 client/modules/IDE/components/Editor/p5CompletionPreview.js diff --git a/client/modules/IDE/components/Editor/p5CompletionPreview.js b/client/modules/IDE/components/Editor/p5CompletionPreview.js new file mode 100644 index 0000000000..67855150f0 --- /dev/null +++ b/client/modules/IDE/components/Editor/p5CompletionPreview.js @@ -0,0 +1,106 @@ +import { StateField, RangeSetBuilder } from '@codemirror/state'; +import { Decoration, EditorView, WidgetType } from '@codemirror/view'; +import { selectedCompletion, completionStatus } from '@codemirror/autocomplete'; + +// TODO: Review +class GhostTextWidget extends WidgetType { + constructor(text) { + super(); + this.text = text; + } + + eq(other) { + return other.text === this.text; + } + + toDOM() { + const span = document.createElement('span'); + span.className = 'cm-ghostCompletion'; + span.textContent = this.text; + return span; + } + + ignoreEvent() { + return true; + } +} + +function getCurrentWord(state) { + const { from, to, empty } = state.selection.main; + if (!empty) return null; + + const line = state.doc.lineAt(from); + const before = line.text.slice(0, from - line.from); + const match = before.match(/\w+$/); + + if (!match) return null; + + const word = match[0]; + return { + text: word, + from: from - word.length, + to + }; +} + +function buildGhostText(state) { + if (completionStatus(state) !== 'active') return null; + + const selected = selectedCompletion(state); + if (!selected) return null; + + const word = getCurrentWord(state); + if (!word) return null; + + const preview = selected.preview || selected.label; + if (!preview) return null; + + if (!preview.toLowerCase().startsWith(word.text.toLowerCase())) return null; + + const remainder = preview.slice(word.text.length); + if (!remainder) return null; + + return { + pos: word.to, + text: remainder + }; +} + +const ghostTextField = StateField.define({ + create(state) { + return Decoration.none; + }, + + update(deco, tr) { + const builder = new RangeSetBuilder(); + const ghost = buildGhostText(tr.state); + + if (ghost) { + builder.add( + ghost.pos, + ghost.pos, + Decoration.widget({ + widget: new GhostTextWidget(ghost.text), + side: 1 + }) + ); + } + + return builder.finish(); + }, + + provide: (field) => EditorView.decorations.from(field) +}); + +export const p5CompletionPreviewTheme = EditorView.theme({ + '.cm-ghostCompletion': { + opacity: '0.55', + fontStyle: 'italic', + pointerEvents: 'none', + whiteSpace: 'pre' + } +}); + +export function p5CompletionPreview() { + return [ghostTextField, p5CompletionPreviewTheme]; +} diff --git a/client/modules/IDE/components/Editor/p5JavaScript.js b/client/modules/IDE/components/Editor/p5JavaScript.js index f66315202c..f729899dd9 100644 --- a/client/modules/IDE/components/Editor/p5JavaScript.js +++ b/client/modules/IDE/components/Editor/p5JavaScript.js @@ -4,7 +4,7 @@ import { p5Hinter } from '../../../../utils/p5-hinter'; import { p5CompletionPreview } from './p5CompletionPreview'; import contextAwareHinter from '../../../../utils/contextAwareHinter'; -function testCompletions(context) { +function addCompletions(context) { const word = context.matchBefore(/\w*/); if (!word && !context.explicit) { @@ -21,7 +21,7 @@ export default function p5JavaScript() { return new LanguageSupport(jsLang.language, [ jsLang.extension, jsLang.language.data.of({ - autocomplete: testCompletions + autocomplete: addCompletions }), p5CompletionPreview() ]); From 5931f136ff693bdffded31b7b3d4460ba4bd3fe2 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:05:31 -0400 Subject: [PATCH 6/7] add styling for hinter --- client/styles/components/_hints.scss | 251 ++++++++++++++++++++++++--- 1 file changed, 230 insertions(+), 21 deletions(-) diff --git a/client/styles/components/_hints.scss b/client/styles/components/_hints.scss index 0a18c5abfb..0237ac29b8 100644 --- a/client/styles/components/_hints.scss +++ b/client/styles/components/_hints.scss @@ -2,40 +2,249 @@ .cm-tooltip-autocomplete.CodeMirror-hints { box-shadow: 0 0 #{math.div(18, $base-font-size)}rem 0 rgba(0, 0, 0, 0.16); - border: #{math.div(1, $base-font-size)}rem solid #A6A6A6; + border: #{math.div(1, $base-font-size)}rem solid #a6a6a6; font-family: Inconsolata, monospace; - + font-size: 1rem; + @include themify() { - .cm-completionInfo { - background: getThemifyVariable('hint-arrow-background-color'); - height: 1.2em; - left: auto; - right: 0px; - padding: 0 6px; - white-space: nowrap; - - a { - color: getThemifyVariable('hint-arrow-color'); + background: getThemifyVariable('hint-background-color'); + color: getThemifyVariable('hint-text-color'); + } + + ul { + @include themify() { + background: getThemifyVariable('hint-background-color'); + } + } + + li.CodeMirror-hint { + display: grid; + grid-template-columns: minmax(0, 1fr) auto #{math.div(40, $base-font-size)}rem; + align-items: center; + min-height: #{math.div(24, $base-font-size)}rem; + font-weight: 500; + + @include themify() { + background: getThemifyVariable('hint-background-color'); + color: getThemifyVariable('hint-text-color'); + border-bottom: #{math.div(1, $base-font-size)}rem solid + getThemifyVariable('hint-item-border-bottom-color'); + } + + &:hover:not([aria-selected='true']) { + @include themify() { + background: getThemifyVariable('hint-item-hover-background-color'); } + } + + &[aria-selected='true'] { + @include themify() { + background: getThemifyVariable('hint-item-active-background-color'); + color: getThemifyVariable('hint-item-active-text-color'); + outline: getThemifyVariable('hint-item-active-outline'); + outline-offset: getThemifyVariable('hint-item-active-outline-offset'); + } + + .cm-completionKind { + @include themify() { + color: getThemifyVariable('hint-item-active-type-text-color'); + } + } + + .cm-completionMatchedText { + color: inherit; + } + } + + &.blacklisted { + height: auto; + min-height: 3.2rem; // enough to show the warning + content + } + } + + .cm-completionLabel { + grid-column: 1; + justify-self: start; + margin-left: #{math.div(12, $base-font-size)}rem; + line-height: 1.1; + font-weight: 600; + color: inherit; + background: transparent; + } + + .cm-completionMatchedText { + color: inherit; + text-decoration: none; + font-weight: inherit; + } + + .cm-completionDetail { + display: none; + } + + .cm-completionKind { + grid-column: 2; + justify-self: end; + padding-right: #{math.div(28, $base-font-size)}rem; + font-size: 0.8rem; + + @include themify() { + color: getThemifyVariable('hint-type-text-color'); + } + } + + .cm-completionRefLink { + grid-column: 3; + display: flex; + align-items: center; + justify-content: center; + align-self: stretch; + width: 75%; + text-decoration: none; + + @include themify() { + background: getThemifyVariable('hint-arrow-background-color'); + color: getThemifyVariable('hint-arrow-color'); + } - &:hover, &:active, &.focused-hint-link { + &:hover, + &:active, + &.focused-hint-link { + @include themify() { background: getThemifyVariable('hint-arrow-background-active-color'); } + } + + &.focused-hint-link { + width: 100%; + height: 100%; + margin: 0; + align-self: stretch; - &.focused-hint-link { - outline: #{math.div(3, $base-font-size)}rem solid getThemifyVariable('hint-arrow-focus-outline-color'); + @include themify() { + outline: #{math.div(3, $base-font-size)}rem solid + getThemifyVariable('hint-arrow-focus-outline-color'); outline-offset: #{math.div(-3, $base-font-size)}rem; } } + } - .hint-hidden { - @extend %hidden-element; - display: none; + .cm-completionRefLink--disabled, + li:not(.has-doc-link) .cm-completionRefLink { + @include themify() { + background: getThemifyVariable('hint-no-link-background-color'); + color: getThemifyVariable('hint-arrow-color'); } } - .CodeMirror-hint.blacklisted { - height: auto; - min-height: 3.2rem; // enough to show the warning + content + // label colors + li.hint-type-method, + li.hint-type-obj { + .cm-completionLabel, + .cm-completionMatchedText { + @include themify() { + color: getThemifyVariable('hint-fun-text-color'); + } + } + } + + li.hint-type-variable, + li.hint-type-constant, + li.hint-type-boolean { + .cm-completionLabel, + .cm-completionMatchedText { + @include themify() { + color: getThemifyVariable('hint-var-text-color'); + } + } + } + + li.hint-type-keyword { + .cm-completionLabel, + .cm-completionMatchedText { + @include themify() { + color: getThemifyVariable('hint-keyword-text-color'); + } + } + } + + // highlighted completion label colors + li.hint-type-method[aria-selected='true'], + li.hint-type-obj[aria-selected='true'] { + .cm-completionLabel { + @include themify() { + background: getThemifyVariable('hint-fun-text-color'); + color: getThemifyVariable('hint-item-active-text-color'); + border-bottom: #{math.div(1, $base-font-size)}rem solid + getThemifyVariable('hint-fun-active-border-bottom-color'); + } + } + } + + li.hint-type-variable[aria-selected='true'], + li.hint-type-constant[aria-selected='true'], + li.hint-type-boolean[aria-selected='true'] { + .cm-completionLabel { + @include themify() { + background: getThemifyVariable('hint-var-text-color'); + color: getThemifyVariable('hint-item-active-text-color'); + border-bottom: #{math.div(1, $base-font-size)}rem solid + getThemifyVariable('hint-var-active-border-bottom-color'); + } + } + } + + li.hint-type-keyword[aria-selected='true'] { + .cm-completionLabel { + @include themify() { + background: getThemifyVariable('hint-keyword-text-color'); + color: getThemifyVariable('hint-item-active-text-color'); + } + } + } + + .cm-completionWarning { + grid-column: 1 / 4; + display: inline-flex; + align-items: center; + gap: 0.35rem; + width: fit-content; + margin: 0.35rem 0.75rem 0.5rem 0.75rem; + padding: 0.32rem 0.55rem; + border: 1px solid #d9a300; + border-radius: 0.45rem; + background: #f3e7b7; + color: #9a6b00; + font-size: 0.8rem; + line-height: 1.1; + white-space: nowrap; + } + + .cm-completionWarningIcon { + flex: 0 0 auto; + font-size: 1rem; + } + + .cm-completionWarningText { + line-height: 1.1; + } + + .cm-ghostCompletion { + @include themify() { + color: getThemifyVariable('hint-inline-text-color'); + } + } + + .cm-ghostCompletion.cm-ghostCompletion--light { + @include themify() { + color: getThemifyVariable('hint-inline-text-color-light'); + } + } + + .hint-hidden { + @include themify() { + @extend %hidden-element; + display: none; + } } } From d411d2dc79202a8ef6b90948c7937406a77695e4 Mon Sep 17 00:00:00 2001 From: raclim <43053081+raclim@users.noreply.github.com> Date: Thu, 26 Mar 2026 21:02:48 -0400 Subject: [PATCH 7/7] tweak wording --- .../IDE/components/Editor/p5CompletionPreview.js | 10 ++++++---- client/styles/components/_hints.scss | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/modules/IDE/components/Editor/p5CompletionPreview.js b/client/modules/IDE/components/Editor/p5CompletionPreview.js index 67855150f0..5538744db7 100644 --- a/client/modules/IDE/components/Editor/p5CompletionPreview.js +++ b/client/modules/IDE/components/Editor/p5CompletionPreview.js @@ -2,7 +2,6 @@ import { StateField, RangeSetBuilder } from '@codemirror/state'; import { Decoration, EditorView, WidgetType } from '@codemirror/view'; import { selectedCompletion, completionStatus } from '@codemirror/autocomplete'; -// TODO: Review class GhostTextWidget extends WidgetType { constructor(text) { super(); @@ -44,6 +43,9 @@ function getCurrentWord(state) { } function buildGhostText(state) { + // only show ghost text if autocomplete is on, + // user is typing, and if preview matches typed text + if (completionStatus(state) !== 'active') return null; const selected = selectedCompletion(state); @@ -72,11 +74,11 @@ const ghostTextField = StateField.define({ }, update(deco, tr) { - const builder = new RangeSetBuilder(); + const decorationBuilder = new RangeSetBuilder(); const ghost = buildGhostText(tr.state); if (ghost) { - builder.add( + decorationBuilder.add( ghost.pos, ghost.pos, Decoration.widget({ @@ -86,7 +88,7 @@ const ghostTextField = StateField.define({ ); } - return builder.finish(); + return decorationBuilder.finish(); }, provide: (field) => EditorView.decorations.from(field) diff --git a/client/styles/components/_hints.scss b/client/styles/components/_hints.scss index 0237ac29b8..2c22413ed0 100644 --- a/client/styles/components/_hints.scss +++ b/client/styles/components/_hints.scss @@ -2,7 +2,7 @@ .cm-tooltip-autocomplete.CodeMirror-hints { box-shadow: 0 0 #{math.div(18, $base-font-size)}rem 0 rgba(0, 0, 0, 0.16); - border: #{math.div(1, $base-font-size)}rem solid #a6a6a6; + border: #{math.div(1, $base-font-size)}rem solid #A6A6A6; font-family: Inconsolata, monospace; font-size: 1rem;