sojamo / controlp5

A gui library for processing.org
GNU Lesser General Public License v2.1
490 stars 142 forks source link

ControlP5 Slider examples not working. #146

Open nnuvo opened 5 years ago

nnuvo commented 5 years ago

Processing 3.4, 2.2.5.

Slider2D example The function arrayValue() does not exist

Slider example "slider" can not be resolved to a variable

kayserifserif commented 5 years ago

Are you accessing the examples through the ControlP5 website (Slider2D, Slider)? I think the examples there are outdated!

Try looking at the examples on the reference page (click on the class and then click on the green "+Example" button), or on the GitHub page.

P.S. The fix to the first one is just to change arrayValue() to getArrayValue(). The slider example is working for me though.

LightMike commented 4 years ago

Hello, yes, sample still not updated:

float y0 = cos(map(i-1,0,s.getArrayValue()[0],-PI,PI)) s.getArrayValue()[1]; float y1 = cos(map(i,0,s.getArrayValue()[0],-PI,PI)) s.getArrayValue()[1];