processing.js 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. Language: Processing
  3. Description: Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts.
  4. Author: Erik Paluka <erik.paluka@gmail.com>
  5. Website: https://processing.org
  6. Category: graphics
  7. */
  8. function processing(hljs) {
  9. return {
  10. name: 'Processing',
  11. keywords: {
  12. keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +
  13. 'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +
  14. 'Object StringDict StringList Table TableRow XML ' +
  15. // Java keywords
  16. 'false synchronized int abstract float private char boolean static null if const ' +
  17. 'for true while long throw strictfp finally protected import native final return void ' +
  18. 'enum else break transient new catch instanceof byte super volatile case assert short ' +
  19. 'package default double public try this switch continue throws protected public private',
  20. literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',
  21. title: 'setup draw',
  22. built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +
  23. 'keyCode pixels focused frameCount frameRate height width ' +
  24. 'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +
  25. 'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +
  26. 'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +
  27. 'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +
  28. 'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +
  29. 'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +
  30. 'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +
  31. 'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +
  32. 'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +
  33. 'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +
  34. 'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +
  35. 'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +
  36. 'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +
  37. 'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +
  38. 'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +
  39. 'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +
  40. 'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +
  41. 'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +
  42. 'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +
  43. 'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +
  44. 'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +
  45. 'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'
  46. },
  47. contains: [
  48. hljs.C_LINE_COMMENT_MODE,
  49. hljs.C_BLOCK_COMMENT_MODE,
  50. hljs.APOS_STRING_MODE,
  51. hljs.QUOTE_STRING_MODE,
  52. hljs.C_NUMBER_MODE
  53. ]
  54. };
  55. }
  56. module.exports = processing;