processing.js 3.5 KB

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