Function Categories in Reference
Closed this issue · 1 comments
As we discussed, I had a look at the categorizing of basil functions and re-ordered and re-structured them to better reflect the categories they actually belong in and to be better aligned with the categories of Processing and P5.js
One note on constants: I had a look at Processing's handling of constants and I quite like it, I think we should adopt it: They make a difference between constants that are only supposed to be used as function arguments (CENTER
, CORNER
etc.), which do not get listed in the reference. Then there are those constants that are not necessarily used as function parameters (PI
, TAU
etc.) and those are the only ones that get listed in the reference.
As I said, I think we should do the same, as we have a lot of constants by now and many of them cannot be put into specific categories. That means the only constants we do list in the reference would be: VERSION
, SCRIPTNAME
, LOREM
and the mathematical ones (PI
, TAU
etc.)
Without further ado, here is the new list:
Structure
- draw()
- loop()
- mode()
- noLoop()
- setup()
Environment
- delay()
- frameRate()
- height
- inspect()
- printInfo()
- projectFolder()
- prop()
- size()
- width
Constants
- SCRIPTNAME
- VERSION
Data
Collections
- forEach()
Conversion
- binary()
- hex()
- unbinary()
- unhex()
CSV
- CSV.decode()
- CSV.delimiter()
- CSV.encode()
HashList
- HashList()
- HashList.clear()
- HashList.get()
- HashList.getKeys()
- HashList.getKeysByValues()
- HashList.getSortedKeys()
- HashList.getValues()
- HashList.hasKey()
- HashList.hasValue()
- HashList.remove()
- HashList.set()
JSON
- JSON.decode()
- JSON.encode()
String Functions
- endsWith()
- isURL()
- join()
- nf()
- nfc()
- nfp()
- nfs()
- split()
- splitTokens()
- startsWith()
- trim()
- trimWord()
Type-Check
- isArray()
- isInteger()
- isNumber()
- isString()
- isText()
Shape
Attributes
- ellipseMode()
- rectMode()
- strokeWeight()
Primitives
- arc()
- ellipse()
- line()
- rect()
Vertex
- addPath()
- beginShape()
- endShape()
- vertex()
Input
- shellExecute()
Files
- download()
- file()
- files()
- folder()
- loadString()
- loadStrings()
- selectFile()
- selectFiles()
- selectFolder()
Time & Date
- day()
- hour()
- millis()
- millisecond()
- minute()
- month()
- second()
- timestamp()
- weekday()
- year()
Output
Console
- print()
- println()
Files
- savePDF()
- savePNG()
- saveString()
- saveStrings()
Transform
- applyMatrix()
- popMatrix()
- printMatrix()
- pushMatrix()
- resetMatrix()
- rotate()
- scale()
- transform()
- translate()
Color
- blendMode()
- color()
- colorMode()
- fill()
- fillTint()
- gradient()
- gradientMode()
- lerpColor()
- noFill()
- noStroke()
- opacity()
- stroke()
- strokeTint()
- swatch()
Image
- image()
- imageMode()
Document
- clear()
- close()
- doc()
- layer()
- remove()
- revert()
- units()
Canvas
- bleeds()
- canvasMode()
- guideX()
- guideY()
- margins()
- pasteboard()
Page
- addPage()
- nextPage()
- page()
- pageCount()
- pageNumber()
- previousPage()
- removePage()
Page Items
- applyObjectStyle()
- arrange()
- bounds()
- duplicate()
- group()
- items()
- label()
- labels()
- nameOnPage()
- objectStyle()
- selection()
- selections()
- ungroup()
Text
- addToStory()
- characters()
- lines()
- linkTextFrames()
- paragraphs()
- placeholder()
- stories()
- words()
Typography
- text()
Attributes
- textAlign()
- textFont()
- textKerning()
- textLeading()
- textSize()
- textTracking()
Styling
- applyCharacterStyle()
- applyParagraphStyle()
- characterStyle()
- paragraphStyle()
- typo()
Constants
- LOREM
Math
Calculation
- abs()
- ceil()
- constrain()
- dist()
- exp()
- floor()
- lerp()
- log()
- mag()
- map()
- max()
- min()
- norm()
- pow()
- round()
- sq()
- sqrt()
Random
- noise()
- noiseDetail()
- noiseSeed()
- random()
- randomSeed()
Trigonometry
- acos()
- asin()
- atan()
- atan2()
- cos()
- degrees()
- radians()
- sin()
- tan()
Vector
- Vector()
- Vector.add()
- Vector.angleBetween()
- Vector.array()
- Vector.cross()
- Vector.cross()
- Vector.dist()
- Vector.dist()
- Vector.div()
- Vector.dot()
- Vector.dot()
- Vector.get()
- Vector.heading()
- Vector.limit()
- Vector.mag()
- Vector.mult()
- Vector.normalize()
- Vector.set()
- Vector.sub()
- Vector.toString()
Constants
- EPSILON
- HALF_PI
- KAPPA
- PI
- QUARTER_PI
- SINCOS_LENGTH
- TWO_PI
@basiljs Could you guys please have a look at this list and let me know if you think some of the sorting does not work for you? Otherwise I will go ahead after a few days and change the categories accordingly. Thanks!