Processing 3+(API)语言参考资料

参考。Reference.Processing was designed to be a flexible software sketchbook.
结构 Structure

()(parentheses)        ,(comma)         .(dot)         /**/(multiline comment)

/***/(doc comment)        //(comment)       ;(semicolon)        =(assign)

[](array access)         {}(curly braces)        catch        class

draw()         exit()         extends         false         final         implements        import

loop()         new        noLoop()        null       popStyle()       private

pushStyle()        redraw()       return        setup()        static        super         this

thread()        true       try        void

环境 Environment

cursor()         delay()         displayDensity()         focused         frameCount

frameRate()          frameRate        fullScreen()        height

noCursor()        noSmooth()        pixelDensity()

pixelHeight          pixelWidth         settings()        size()        smooth()        width

数据 Data Primitive

boolean         byte        char        color        double        float        int        long

复合 Composite

Array        ArrayList        DoubleDict        DoubleList       FloatDict       FloatList

HashMap        IntDict         IntList        JSONArray        JSONObject        LongDict

LongList        Object        String        StringDict        StringList          Table

TableRow        XML

转换 Conversion

binary()        boolean()        byte()        char()        float()       hex()        int()

str()        unbinary()         unhex()

字符串函数 String Functions

join()        match()        matchAll()        nf()        nfc()        nfp()        nfs()

split()         splitTokens()        trim()

数组函数 Array Functions

append()         arrayCopy()         concat()        expand()

reverse()        shorten()        sort()        splice()        subset()

控制 Control

Relational Operators

!=(不等于)        <(小于)        <=(小于等于)        ==(相等)

>(大于)        >=(大于等于)

Iteration

for…while

Conditionals

?:(conditional)        break        case        continue

default        elseif        switch

逻辑操作符 Logical Operators

!(logical NOT)        &&(logical AND)        ||(logical OR)

形状 Shape

createShape()        loadShape()         PShape

2D Primitives

arc()        ellipse()        line()        point()        quad()        rect()        triangle()

曲线 Curves

bezier()        bezierDetail()        bezierPoint()        bezierTangent()        curve()

curveDetail()        curvePoint()        curveTangent()        curveTightness()

3D Primitives

box()          sphere()        sphereDetail()

Attributes

ellipseMode()         rectMode()        strokeCap()        strokeJoin()

strokeWeight()

Vertex

beginContour()        beginShape()        bezierVertex()        curveVertex()

endContour()        endShape()         quadraticVertex()        vertex()

Loading&Displaying

shape()        shapeMode()

Input

Mouse

mouseButton        mouseClicked()        mouseDragged()        mouseMoved()

mousePressed()         mousePressed        mouseReleased()        mouseWheel()

mouseX        mouseY        pmouseX        pmouseY

Keyboard

key        keyCode        keyPressed()        keyPressed        keyReleased()

keyTyped()

Files

BufferedReader        createInput()        createReader()        launch()

loadBytes()        loadJSONArray()        loadJSONObject()        loadStrings()

loadTable()        loadXML()        parseJSONArray()        parseJSONObject()

parseXML()        selectFolder()        selectInput()

时间和日期 Time&Date

day()        hour()        millis()        minute()        month()        second()        year()

输出 Output

文本区域 TextArea

print()        printArray()        println()

Image

save()        saveFrame()

Files

beginRaw()        beginRecord()        createOutput()        createWriter()

endRaw()        endRecord()        PrintWritersaveBytes()        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()

MaterialProperties

ambient()        emissive()        shininess()        specular()

Color

Setting

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()

Math

PVector

Operators

%(modulo)        *(multiply)        *=(multiplyassign)          +(addition)

++(increment)    +=(addassign)        -(minus)         –(decrement)

-=(subtractassign)        /(divide)        /=(divideassign)

BitwiseOperators

&(bitwise AND)        <<(left shift)        >(right shift)        |(bitwise OR)

Calculation

abs()        ceil()        constrain()        dist()        exp()

floor()         lerp()        log()        mag()        map()

max()        min()        norm()        pow()        round()

sq()        sqrt()

三角函数 Trigonometry

acos()     asin()     atan()     atan2()     cos()     degrees()

radians()     sin()         tan()

Random

noise()    noiseDetail()    noiseSeed()    random()    randomGaussian()

randomSeed()

Constants

HALF_PI    PI    QUARTER_PI    TAU    TWO_PI