Довідник Processing
Конструкції мови
()(круглі дужки) ,(кома) .(крапка) /* */(багаторядковий коментар) /** */(документуючий коментар) //(однорядковий коментар) ; (крапка з комою) = (присвоювання) оператор доступу до масиву фігурні дужки catch class draw() exit() extends false final implements import loop() new noLoop() null popStyle() private public pushStyle() redraw() return setup() static super this thread() true try void
Оточення
cursor() delay() displayDensity() focused frameCount frameRate() frameRate fullScreen() height noCursor() noSmooth() pixelDensity() pixelHeight pixelWidth settings() size() smooth() width
Дані
Примітивні типи даних
boolean byte char color double float int long
Складні(складені) типи даних
Array ArrayList FloatDict FloatList HashMap IntDict IntList JSONArray JSONObject Object String StringDict StringList Table TableRow XML
Конвертація
binary() boolean() byte() char() float() hex() int() str() unbinary() unhex()
Рядкові функції
join() match() matchAll() nf() nfc() nfp() nfs() split() splitTokens() trim()
Функції масиву
append() arrayCopy() concat() expand() reverse() shorten() sort() splice() subset()
Керування
Оператори порівняння
== (оператор дорівнює) != (оператор не дорівнює) < (оператор менше) > (оператор більше) <= (оператор менше або рівне) >= (оператор більше або рівне)
Цикли
for while
Умовний вираз
?:(умовний оператор) break case continue default else if switch
Логічні оператори
! (логічне НЕ) && (логічне І) || (логічне АБО)
Форма
createShape() loadShape() PShape
2D-примітиви
arc() ellipse() line() point() quad() rect() triangle()
Криві
bezier() bezierDetail() bezierPoint() bezierTangent() curve() curveDetail() curvePoint() curveTangent() curveTightness()
3D-примітиви
box() sphere() sphereDetail()
Attributes
ellipseMode() rectMode() strokeCap() strokeJoin() strokeWeight()
Vertex
beginContour() beginShape() bezierVertex() curveVertex() endContour() endShape() quadraticVertex() vertex()
Loading & Displaying
shape() shapeMode()
Введення
Миша
mouseButton mouseClicked() mouseDragged() mouseMoved() mousePressed() mousePressed mouseReleased() mouseWheel() mouseX mouseY pmouseX pmouseY
Клавіатура
key keyCode keyPressed() keyPressed keyReleased() keyTyped()
Файли
BufferedReader createInput() createReader() launch() loadBytes() loadJSONArray() loadJSONObject() loadStrings() loadTable() loadXML() parseJSONArray() parseJSONObject() parseXML() selectFolder() selectInput()
Дата та час
day() hour() millis() minute() month() second() year()
Виведення
Text Area
print() printArray() println()
Image
save() saveFrame()
Files
beginRaw() beginRecord() createOutput() createWriter() endRaw() endRecord() PrintWriter saveBytes() saveJSONArray() saveJSONObject() saveStream() saveStrings() saveTable() saveXML() selectOutput()
Transform
applyMatrix() popMatrix() printMatrix() pushMatrix() resetMatrix() rotate() rotateX() rotateY() rotateZ() scale() shearX() shearY() translate()
Lights, Camera
Lights
ambientLight() directionalLight() lightFalloff() lights() lightSpecular() noLights() normal() pointLight() spotLight()
Camera
beginCamera() camera() endCamera() frustum() ortho() perspective() printCamera() printProjection()
Coordinates
modelX() modelY() modelZ() screenX() screenY() screenZ()
Material Properties
ambient() emissive() shininess() specular()
Колір
Налаштування
background() clear() colorMode() fill() noFill() noStroke() stroke()
Creating & Reading
alpha() blue() brightness() color() green() hue() lerpColor() red() saturation()
Image
createImage() PImage
Loading & Displaying
image() imageMode() loadImage() noTint() requestImage() tint()
Textures
texture() textureMode() textureWrap()
Pixels
blend() copy() filter() get() loadPixels() массив pixels set() updatePixels()
Rendering
blendMode() clip() createGraphics() noClip() PGraphics
Shaders
loadShader() PShader resetShader() shader()
Typography
PFont
Loading & Displaying
createFont() loadFont() text() textFont()
Attributes
textAlign() textLeading() textMode() textSize() textWidth()
Metrics
textAscent() textDescent()
Математика
PVector
Операторы
% (оператор деления по модулю) * (оператор умножения) *= (умножение с присваиванием) + (оператор сложения) ++ (инкремент) += (сложение с присваиванием) - (оператор вычитания) -- (декремент) -= (вычитание с присваиванием) / (оператор деления) /= (деление с присваиванием)
Побитовые операторы
Побитовый оператор AND Побитовый оператор сдвига влево Побитовый оператор сдвига вправо Побитовый оператор OR
Вычисление
abs() ceil() constrain() dist() exp() floor() lerp() log() mag() map() max() min() norm() pow() round() sq() sqrt()
Тригонометрия
acos() asin() atan() atan2() cos() degrees() radians() sin() tan()
Генерация случайных чисел
noise() noiseDetail() noiseSeed() random() randomGaussian() randomSeed()
Константы
HALF_PI PI QUARTER_PI TAU TWO_PI