diff --git a/snippets/processing.snippets b/snippets/processing.snippets index dcaed54..60fd79e 100755 --- a/snippets/processing.snippets +++ b/snippets/processing.snippets @@ -281,20 +281,16 @@ snippet gl gl clear gl.glClear(${1:GL.GL_COLOR_BUFFER_BIT}${2: | }${0:GL.GL_DEPTH_BUFFER_BIT}); #frame operations -snippet fr framerate +snippet frameRate frameRate(${1:30}); ${0} -snippet fr frameRate - frameRate -snippet fr frameCount - frameCount -snippet fr saveFrame +snippet saveFrame saveFrame("${1:filename-####}${0:.ext}"); #size -snippet size normal size +snippet size normal size(${1:200}, ${2:200}${0:, P3D}); -snippet size opengl size +snippet size opengl size(${1:200}, ${2:200}${0:, OPENGL}); #PRIMITIVES @@ -327,300 +323,238 @@ snippet object ${1:Object} ${2:o}${3: = new $1}(${0}); #curve -snippet curve curve +snippet curve curve(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${6:y3}, ${7:x4}, ${0:y4}); -snippet curve curve 3D +snippet curve 3D curve(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${6:z2}, ${7:x3}, ${8:y3}, ${9:z3}, ${10:x4}, ${11:y4}, ${0:z4}); -snippet curve curve Detail +snippet curveDetail curveDetail(${0:detail}); -snippet curve curve point +snippet curvePoint curvePoint(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t}); -snippet curve curve tightness +snippet curveTightness curveTightness(${0:squishy}); #bezier -snippet bezier bezier +snippet bezier bezier(${1:x1}, ${2:y1}, ${3:cx1}, ${4:cy1}, ${5:cx2}, ${6:cy2}, ${7:x2}, ${0:y2}); -snippet bezier bezier 3D +snippet bezier 3D bezier(${1:x1}, ${2:y1}, ${3:z1}, ${4:cx1}, ${5:cy1}, ${6:cz1}, ${7:cx2}, ${8:cy2}, ${9:cz2}, ${10:x2}, ${11:y2}, ${0:z2}); -snippet bezier bezier detail +snippet bezierDetail bezierDetail(${0:detail}); -snippet bezier bezier tangent +snippet bezierTangent bezierTangent(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t}); -snippet bezier bezier point +snippet bezierPoint bezierPoint(${1:a}, ${2:b}, ${3:c}, ${4:d}, ${0:t}); #vertex -snippet vertex vertex +snippet vertex vertex(${1:x}, ${2:y}${3:, }${4:u}${5:, }${0:v}); -snippet vertex vertex 3D +snippet vertex 3D vertex(${1:x}, ${2:y}, ${3:z}${4:, }${5:u}${6:, }${0:v}); -snippet vertex vertex bezier +snippet bezierVertex bezierVertex(${1:cx1}, ${2:cy1}, ${3:cx2}, ${4:cy2}, ${5:x}, ${0:y}); -snippet vertex vertex bezier 3D +snippet bezierVertex 3D bezierVertex(${1:cx1}, ${2:cy1}, ${3:cz1}, ${4:cx2}, ${5:cy2}, ${6:cz2}, ${7:x}, ${8:y}, ${0:z}); -snippet vertex vertex curve +snippet curveVertex curveVertex(${1:x}, ${0:y}); -snippet vertex vertex curve 3D +snippet curveVertex 3D curveVertex(${1:x}, ${2:y}, ${0:z}); #stroke -snippet stroke stroke +snippet stroke stroke(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha}); -snippet stroke stroke weight +snippet strokeWeight strokeWeight(${0:1}); -snippet stroke no stroke - noStroke(); #mouse -snippet mouse mouse x - mouseX -snippet mouse mouse y - mouseY -snippet mouse mouse drag +snippet mouseDragged void mouseDragged(){ ${0} } -snippet mouse mouse move +snippet mouseMoved void mouseMoved(){ ${0} } -snippet mouse mouse release +snippet mouseReleased void mouseReleased(){ ${0} } -snippet mouse mouse pressed +snippet mousePressed void mousePressed(){ ${0} } -snippet mouse mouse pressed? - mousePressed -snippet mouse mouse button? - mouseButton -snippet mouse pmouse X - pmouseX -snippet mouse pmouse Y - pmouseY #key -snippet key keycode? - keyCode -snippet key key - key -snippet key key released +snippet keyReleased void keyReleased(){ ${0} } -snippet key key typed +snippet keyTyped void keyTyped(){ ${0} } -snippet key key pressed +snippet keyPressed void keyPressed(){ ${0} } -snippet key key pressed? - keyPressed #file -snippet file load string +snippet loadStrings loadStrings("${0:filename}"); -snippet file save string +snippet saveStrings saveStrings(${1:filename}, ${0:strings}); -snippet file load bytes +snippet loadBytes loadBytes("${0:filename}"); -snippet file begin record +snippet beginRecord beginRecord(${1:renderer}, ${0:filename}); -snippet file end record - endRecord(); -snippet file save bytes +snippet saveBytes saveBytes(${1:filename}, ${0:bytes}); -snippet file create writer +snippet createWriter createWriter(${0:filename}); -snippet file create reader +snippet createReader createReader(${0:filename}); -#time -snippet time hour - hour() -snippet time milliseconds - millis() -snippet time year - year() -snippet time minutes - minutes() -snippet time month - month() -snippet time second - second() - #matrix -snippet matrix reset matrix - translate(${1:x}, ${2:y}, ${0:z}); -snippet matrix print matrix - printMatrix(); -snippet matrix push matrix +snippet pushMatrix pushMatrix(); ${0:}; popMatrix(); #text -snippet txt text data +snippet text data text(${1:data}, ${2:x}, ${3:y}${4:, }${0:z}); -snippet txt text string data +snippet text stringdata text(${1:stringdata}, ${2:x}, ${3:y}, ${4:width}, ${5:height}${6:, }${0:z}); -snippet txt text size +snippet textSize textSize(${0:size}); -snippet txt text leading +snippet textLeading textLeading(${0:size}); -snippet txt text width +snippet textWidth textWidth(${0:data}); -snippet txt text descent - textDescent(); -snippet txt text ascent - textAscent(); -snippet txt font +snippet font PFont ${1:font}; $1 = loadFont("${0:FFScala-32.vlw}"); #load font -snippet txt load font +snippet loadFont ${1:font} = loadFont("${0:FFScala-32.vlw}"); -snippet txt text font +snippet textFont textFont(${1:font}${2:, }${0:size}); #math -snippet math tangent +snippet tan tan(${0:rad}); -snippet math atan +snippet atan atan(${0:rad}); -snippet math atan2 +snippet atan2 atan2(${0:rad}); -snippet math sin +snippet sin sin(${0:rad}); -snippet math asin +snippet asin asin(${0:rad}); -snippet math cos +snippet cos cos(${0:rad}); -snippet math acos +snippet acos acos(${0:rad}); -snippet math degrees +snippet degrees degrees(${0:rad}); -snippet math radians +snippet radians radians(${0:deg}); -snippet math random seed +snippet randomSseed randomSeed(${0:value}); -snippet math random +snippet random random(${1:value1}${2:, }${0:value2}); -snippet math half PI - HALF_PI -snippet math 2 PI - TWO_PI -snippet math PI - PI -snippet math pow +snippet pow pow(${1:num}, ${0:exponent}); -snippet math floor +snippet floor floor(${0:value}); -snippet math sqrt +snippet sqrt sqrt(${0:value}); -snippet math abs +snippet abs abs(${0:value}); -snippet math sq +snippet sq sq(${0:value}); -snippet math ceil +snippet ceil ceil(${0:value}); -snippet math exp +snippet exp exp(${0:value}); -snippet math round +snippet round round(${0:value}}; -snippet math min +snippet min min(${1:value1}, ${2:value2}${3:, }${0:value3}); -snippet math max +snippet max max(${1:value1}, ${2:value2}${3:, }${0:value3}); -snippet math array max +snippet max array max(${0:array}); -snippet math array min +snippet min array min(${0:array}); -snippet math logarithm +snippet log log(${0:value}); -snippet math map +snippet map map(${1:value}, ${2:low1}, ${4:high1}, ${5:low2}, ${0:high2}); -snippet math normalize +snippet norm norm(${1:value}, ${2:low}, ${0:high}); -snippet math constrain +snippet constrain constrain(${1:value}, ${2:min}, ${0:max}); -snippet math magnitude of a vector +snippet mag mag(${1:a}, ${2:b}${3:, }${0:c}); -snippet math distance +snippet dist dist(${1:x1}, ${2:y1}, ${4:x2}, ${0:y2}); -snippet math distance 3D +snippet dist 3D dist(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${0:z2}); #noise math -snippet noise set noise +snippet noise noise(${1:x}${2:, }${3:y}${4:, }${0:z}); -snippet noise noise detail +snippet noiseDetail noiseDetail(${1:octaves}${2:, }${0:falloff}); -snippet noise noise seed +snippet noiseSeed noiseSeed(${0:x}); #material -snippet material shininess +snippet shininess shininess(${0:shine}); -snippet material specular +snippet specular specular(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha}); -snippet material ambient +snippet ambient ambient(${1:value1}, ${2:value2}, ${0:value3}); -snippet material emissive +snippet emissive emissive(${1:value1}, ${2:value2}, ${0:value3}); #light -snippet light no light - noLights(); -snippet light light - lights(); -snippet light diretional light +snippet diretionalLight directionalLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:nx}, ${5:ny}, ${0:nz}); -snippet light point light +snippet pointLight pointLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:nx}, ${5:ny}, ${0:nz}); -snippet light falloff light +snippet lightFalloff lightFalloff(${1:constant}, ${2:linear}, ${0:quadratic}); -snippet light normal light +snippet normal normal(${1:nx}, ${2:ny}, ${0:nz}); -snippet light specular light +snippet lightFalloff lightFalloff(${1:v1}, ${2:v2}, ${0:v3}); -snippet light ambient light +snippet ambientLight ambientLight(${1:v1}, ${2:v2}, ${3:v3}${7:, ${4:x}, ${5:y}, ${0:z}}); -snippet light spot light +snippet spotLight spotLight(${1:v1}, ${2:v2}, ${3:v3}, ${4:x}, ${5:y}, ${6:z}, ${7:nx}, ${8:ny}, ${9:nz}, ${10:angle}, ${0:concentration}); #camera -snippet cam camera +snippet camera camera(${1:eyeX}, ${2:eyeY}, ${3:eyeZ}, ${4:centerX}, ${5:centerY}, ${6:centerZ}, ${7:upX}, ${8:upY}, ${0:upZ}); -snippet cam ortho +snippet ortho ortho(${1:left}, ${2:right}, ${3:bottom}, ${4:top}, ${5:near}, ${0:far}); -snippet cam begin camera - beginCamera(); -snippet cam end camera - endCamera(); -snippet cam print camera - printCamera(); -snippet cam print camera projection - printProjection(); -snippet cam perspective camera +snippet perspective perspective(${1:fov}, ${2:aspect}, ${3:zNear}, ${0:zFar}); -snippet cam frustrum +snippet frustrum frustrum(${1:left}, ${2:right}, ${3:bottom}, ${4:top}, ${5:near}, ${0:far}); #transformations -snippet trans rotate +snippet rotate rotate${1:X}(${0:angle}); -snippet trans translate +snippet translate translate(${1:x}, ${2:y}${3:, }${0:z}); -snippet trans scale size +snippet scale size scale(${0:size}); -snippet trans scale +snippet scale scale(${1:x}, ${2:y}${3:, }${0:z}); #coordinates @@ -628,119 +562,109 @@ snippet coord ${1:model/screen}${2:X}(${3:x}, ${4:y}, ${0:z}); #effects -snippet fx brightness +snippet brightness brightness(${0:color}); -snippet fx lerp color +snippet lerpColor lerpColor(${1:c1}, ${2:c2}, ${0:amt}); -snippet fx saturation +snippet saturation saturation(${0:color}); -snippet fx hue +snippet hue hue(${0:color}); -snippet fx alpha +snippet alpha alpha(${0:color}); -snippet fx tint +snippet tint tint(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha}); -snippet fx notint - noTint(); #pixel -snippet px set pixel +snippet set pixel set(${1:x}, ${2:y}, ${0:color/image}); -snippet px update pixel - updatePixels(); -snippet px load pixel - loadPixels(); -snippet px pixels +snippet pixels pixels[${0:index}] -snippet px get pixel +snippet get pixel get(${1:x}, ${2:y}${3:, }${4:width}${5:, }${0:height}); #geometric figures -snippet geof triangle +snippet triangle triangle(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${0:y3}); -snippet geof line +snippet line line(${1:x1}, ${2:y1}, ${3:x2}, ${0:y2}); -snippet geof line 3D +snippet line 3D line(${1:x1}, ${2:y1}, ${3:z1}, ${4:x2}, ${5:y2}, ${0:z2}); -snippet geof arc +snippet arc arc(${1:x}, ${2:y}, ${3:width}, ${4:height}, ${5:start}, ${0:stop}); -snippet geof point +snippet point point(${1:x}, ${2:y}${3:, }${0:z}); -snippet geof quad +snippet quad quad(${1:x1}, ${2:y1}, ${3:x2}, ${4:y2}, ${5:x3}, ${6:y3}, ${7:x4}, ${0:y4}); -snippet geof ellipse +snippet ellipse ellipse(${1:x}, ${2:y}, ${3:width}, ${0:height}); -snippet geof rect +snippet rect rect(${1:x}, ${2:y}, ${3:width}, ${0:height}); -snippet geof box +snippet box box(${1:width}, ${2:height}, ${0:depth}); -snippet geof sphere +snippet sphere sphere(${0:radius}); -snippet geof sphere details +snippet sphereDetails sphereDetail(${0:n}); -snippet geof set smooth - smooth(); -snippet geof set no smooth - noSmooth(); #array operations -snippet arrop normal split +snippet split split("${1:str}"${2: , }${0:delimiter}); -snippet arrop split Tokens +snippet splitTokens splitTokens(${1:str}${2:, }${0:tokens}); -snippet arrop join +snippet join join(${1:strgArray}${2: , }${0:seperator}); -snippet arrop shorten +snippet shorten shorten(${0:array}); -snippet arrop concat +snippet concat concat(${1:array1}, ${0:array2}); -snippet arrop subset +snippet subset subset(${1:array}, ${0:offset}); -snippet arrop append +snippet append append(${1:array}, ${0:element}); -snippet arrop reverse +snippet reverse reverse(${0:array}); -snippet arrop splice +snippet splice splice(${1:array}, ${2:value/array2}, ${0:index}); -snippet arrop sort +snippet sort sort(${1:dataArray}${2:, }${0:count}); -snippet arrop expand +snippet expand expand(${1:array}${2:, }${0:newSize}); -snippet arrop array copy +snippet arrayCopy arrayCopy(${1:src}, ${2:dest}, ${3:, }${0:length}); #string operations -snippet strop str +snippet str str("${0:str}"); -snippet strop match +snippet match match(${1:str}, ${0:regexp}); -snippet strop trim +snippet trim trim(${0:str}); -snippet strop nf +snippet nf nf(${2:value}, ${3:left}${4:, }${0:right}); -snippet strop nfs +snippet nfs nfs(${2:value}, ${3:left}${4:, }${0:right}); -snippet strop nfp +snippet nfp nfp(${2:value}, ${3:left}${4:, }${0:right}); -snippet strop nfc +snippet nfc nfc(${1:value}${2:, }${0:right}); #convert -snippet convert unbinary +snippet unbinary unbinary("${0:str}"}); -snippet convert hexadecimal +snippet hexadecimal hex(${0:c}); -snippet convert unhex +snippet unhex unhex(${0:c}); -snippet convert binary +snippet binary binary(${1:value}${2:, }${0:digits}); #image operations -snippet image load image +snippet loadImage loadImage(${0:filename}); -snippet image image +snippet image image(${1:img}, ${2:x}, ${3:y}${4:, }${5:width}${6:, }${0:height}); -snippet copy copy +snippet copy copy(${1:srcImg}${2:, }${3:x}, ${4:y}, ${5:width}, ${6:height}, ${7:dx}, ${8:dy}, ${9:dwidth}, ${0:dheight}); @@ -755,9 +679,6 @@ snippet pimage PImage(${1:width}, ${0:height}); #UTILS -#nofill -snippet nofill - noFill(); #fill snippet fill fill(${1:value1}, ${2:value2}, ${3:value3}${4:, }${0:alpha});