Page 2 of 2
Re: icon library
Posted: 14 Apr 2015 19:29
by Softcore
And you CAN make scripts with user defined variables
Lemur user guide page 69 and one more example at the end of page 85
Re: icon library
Posted: 14 Apr 2015 19:41
by ndivuyo
yea, you make them when you make the script. So if you made a script called circle(). instead of just typing circle and pressing enter/ok, type in circle(x,y,r) or whatever variables you want. Then those will be ready to use inside the script itself.
This is separate from the custom expression button which creates variables outside of the script.
Re: icon library
Posted: 14 Apr 2015 19:46
by Voice303
ndivuyo wrote:yea, you make them when you make the script. So if you made a script called circle(). instead of just typing circle and pressing enter/ok, type in circle(x,y,r) or whatever variables you want. Then those will be ready to use inside the script itself.
This is separate from the custom expression button which creates variables outside of the script.
Thanks for the clarification!
I thought it was only expressions that could do that and that you had to set script arguments by selecting a type such as OSC, Touch Down, Touch Up, etc. I was confused because expressions and scripts presented different ways of interfacing to arguments, I didn't realize they shared a common one as well.
Re: icon library
Posted: 15 Apr 2015 04:37
by Macciza
Looks like you need to have another read of the manual . . ..
You can also do single line functions with defined arguments by entering function_name(args) when creating an expression . . .
Re: icon library
Posted: 15 Apr 2015 04:38
by Macciza
Also, posted to Facebook . . .
Library organisation is important, and best worked out before too much other work gets done. There is lots I would do differently. Am working on some examples but it requires some thought and all that. It also depends on use case etc.
Problems I see are implicit linking of icons to canvas size, weird resizing etc. I would probably have args for context,location, size and rotation i.e. icon(ctx,x,y,size,rot), have icon drawn at nominal size and size, rotation transforms applied. Further considerations are whether you want all functions to be separate paths,separately stroked or as compoundable paths that can then be all stroked together; or different functions for both cases? Do you leave all drawing attributes (color,width) etc to the calling scope or have them as arguments to the functions? Have to have a bit of a think...
Also is this ultimately meant to be a library that integrates with standard lemur guy objects or as part of canvas-based guy object system with interactive icons and or objects??
Re: icon library
Posted: 15 Apr 2015 05:37
by Suloo
personally i want to use them only with canvas objects, since with a custom canvas background-color all other non canvas library objects are optically useless because of the black background.
see here, that doesn't look too good, having a transparent option for all non canvas objects would be quite helpful actualy:
Also stacking another canvas object ontop of the non canvas objects is not a good option imho, because then i double the amount of objects (performance) and also i cannot see an underliying multiball, fadercap or icon.
So i would need to add that on the canvas anyway..
cheers
Re: icon library
Posted: 16 Apr 2015 06:33
by Macciza
Depends on complexity and size of project but stacking canvas on top of standard objects is an easy way to re-skin them, and saves you having to implement all the cars and features in scripts ....
The idea is that you don't see the generic objects but instead a custom graphic controlled by it ....