controlP5 examples
See original GitHub issueHi,
I’m a teacher trying to use processing.py in HS. I have limitations, so little snippets of documentation really help.
The controlP5 example here in gitHub under examples.py/ThirdParty doesn’t work. You move the sliders but the rectangles don’t change color. After creating sliderValue
you can’t access the value later with fill(sliderValue)
as you can in the Java version.
In the closed Bug #52 thread, JDF uses something like the following (but with Textfield
):
cp5.addSlider("A").setPosition(100, 200).setRange(0,255).setValue(100).setSize(200, 40)
print cp5.get(Slider,"A").getValue()
This also works
slider1=cp5.addSlider("A").setPosition(100,200).setRange(0,255).setValue(100).setSize(200,40)
print slider1.getValue()
which is probably 6 of one, half a dozen of another. Is it? The second approach renders the “A” as something of a dummy name, but slider1.getValue()
seems more readable.
- Will the ability to just use the slider name (as in the Java version) as a variable be added?
- Should we make working Python versions of some controlP5 examples?
- If we make Python examples that work now, should it be with
cp5.get(Slider,"A").getValue()
style orslider1.getValue()
style? - Can I help?
Thanks! ms
Issue Analytics
- State:
- Created 9 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I wonder if I should go ahead and just wire in controlEvent like I do with other libraries.
Hi all: I’m trying to use ControlP5 in Python mode … the function
controlEvent(theEvent):
doesn’t work!! Can anybody help me? The source code is in https://github.com/PymientoProject/josemaria/tree/master/SuperFormulaPy