Warning on Shapes3D

Hi, I’m trying to use Shapes3D library from Quark to use the pick function, but in the example, on the first click this warning is shown:

smooth() can only be used before beginDraw()

and no pick is performed.
is it a known/important issue?

Shape3D v.2.2
Processing v.3.5.3

1 Like

hi spiderdab,
i try it and also see the smooth warning,
but the cube pick ( in form of a random color change / see code )
works here, using example Shapes 3D / S3D4P_Picking

win 7 64b / processing 3.5.3 JAVA mode / library Sape3D v.2.2

1 Like

Ok, but can you confirm that the very first click doesn’t select anything?

ok, seems so, first click ( where ever ) displays that warning
and if the click was on an object the color change does not work,
second time ok…
but if you read

you know you just have to wait for the new v3.
but then help with testing will be needed…

I knew about the first click problem but to be honest I never found out why it happened. :thinking:

The smooth warning is issued by Processing and I will have to double check I fixed that for the new version. At the moment simply ignore it.

Shapes3D V3 is well advanced and I am updating my website with new guides so please have a look and let me know what you think. The shape picking has been improved, it is more accurate, no longer misses the first click and informs the user which part of the shape has been clicked. So for a Box not only will you know it has been clicked but which face you clicked on. :smile_cat:

Both V2 and V3 use a colour picking algorithm for shape selection. It creates an offscreen buffer on first use so there is a slight millisecond delay on first click. This is called lazy instantiation since the buffer is only created if needed.

3 Likes

:tada: :partying_face: