processing.js 3.6 KB

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