Forums > Javascript

New mgraphics JSUI scripts

November 26, 2011 | 5:35 pm

I updated a couple of my JSUI scripts to work with mgraphics instead of sketch. This is particularly nice for ol.pngknob.js which now supports transparent backgrounds.

https://github.com/olilarkin/olControls

[attachment=177458,2976] [attachment=177458,2977]

Attachments:
  1. clickedlist.png

November 28, 2011 | 11:18 pm

Dude – nicely done!


November 29, 2011 | 8:58 pm

i just updated it, adding a couple more .png files to the help patch.

I've been trying to figure out mgraphics from your examples and from the Jgraphics stuff in the sdk, but still don't understand a few things. I want to be able to specify the colour of the text and a background colour (potentially transparent) in ol.pngknob.js but when I tried that it changed the colours of the image as well. Any ideas?

by the way the povray scripts to make the knob images can be found here:

https://github.com/olilarkin/guiutilities

[attachment=177827,2997]

Attachments:
  1. sequentialcircuits.png

November 30, 2011 | 5:48 am

The color settings are single-state, so each time you change it you are changing the colors for the next drawing function. Instead, you need to change a color, draw some portion, change a color, draw the next portion. It helps to save()/restore() after each section so you don’t have to undo any transformations that you might have done along the way.

Hope that helps!

[ddg]


November 30, 2011 | 7:59 pm

thanks for the info…it did help! i updated the script

oli


June 10, 2012 | 9:12 pm

added a couple of new ones (a pattr aware trajectory BPF function and a heart-rate monitor, a bit like multislider in scroll mode)

https://github.com/olilarkin/olControls

[attachment=196251,4012] [attachment=196251,4013]

Attachments:
  1. datadisplay.png

Viewing 6 posts - 1 through 6 (of 6 total)