Can you guys explain these refences? I couldn’t find anywhere. Thank you!
huh?
I have programming experience. I started codea yesterday. I watched some tutorials and i have decided to read all the refences. There are 335 topics and i found these. I think some of them are fuctions some of them classes idk. What are these pictures (im also learning english. I tried my best
)
@Ignatz they’re the icons in the Codea reference.
T
is Type
m:
is method
f
is function
=
are system-defined variables.
?
is general discussion of a section
For example:
- An example of a type is
color
. You create instances of a type through assignment/ instantiation. eg This creates an instance ofcolor
which I’ve chosen to namebrightRed
:
brightRed = color(255,0,0)
-
Functions are various commands associated with that type, eg
stroke
,fill
etc. I can use thebrightRed
I just instantiated with these commands. eg to set the line colour to bright red:
stroke(brightRed)
- A method is a kind of function that belongs to a given type and is applied to an instance of that type, using Lua’s colon notation. That’s why it’s
m:
m colon. eg, the methods forcolor
are:blend
and:mix
. Here I apply theblend
method to thebrightRed
instance I created earlier:
brightBlue = color(0,0,255)
purple = brightRed:blend(brightBlue)
- System-defined variables. If they’re ALL CAPS they’re constant (or relatively constant.
WIDTH
andHEIGHT
change when orientation changes)
I understand now. Thank you so much