command SetViewDirection[...] no longer works like last week

Patrick Clément shared this question 3 years ago
Answered

Hi,


try :


https://www.geogebra.org/ma...


web version works very well.


Download file, and open with new

version of GGB :


command

SetViewDirection[...] is very slow to perform (clic on stop)


...?


I

think it is no longer possible to do the same application with new versions of GGB

...

Comments (5)

photo
1

Hi,


Thanks for the report. In the new versions, geogebra records all calls to commands changing 3D view orientation, scaling etc. (Before that, a new call to e.g. SetViewDirection() was immediately cancelling the current animation.)


I'll have a deeper look at your worksheet if something can be fixed to avoid this problem; in the meanwhile, this change in the "tt" script may make it work again:

SetViewDirection[Vector[P+(0,0,h),V], false]


All the best,

Mathieu

photo
1

Hi again,

You are calling CenterView() (in "t" script) and SetViewDirection() (in "tt" script), so the two 3D view changes are mixed and I think there is no simple fix for your issue. But maybe you can get back what you want to do by changing the "tt" script as described above, and also changing the "start" button script as follow (to get back nice starting animation) :


SetActiveView[-1]

SetValue[V,Rotate[V,-a/10,P]]

CenterView[V]

SetViewDirection[Vector[P+(0,0,h),V]]

ZoomIn[z(C_7)/h]

SetActiveView[1]

StartAnimation[t,true]

StartAnimation[tt,true]


So here you ask for CenterView(), then SetViewDirection() with a nice animation (without "false" in parameters), then ZoomIn(). All will be stacked and processed one after the other (in the new version). Then you start animations.


Cheers,

Mathieu

photo
1

Hi,

it's work : thank you very much !

Merci beaucoup Mathieu : ça semble même être plus simple qu'avant.

Patrick.

photo
1

In the current GeoGebra version, using Javascript, is it possible for a new call of SetViewDirection() or CenterView() to immediately cancel the current running 3D view commands (SetViewDirection() or CenterView calls)? In other words, is it possible to disable the recording of all calls of 3D view commands? (setting 'animated' to false in SetViewDirection() doesn't seem to help make it).

In addition, what is the distance between the near clip plane to the "camera" in the viewing frustum of GeoGebra (e.g. in meter)? Is it possible to set it to zero? (otherwise it clips a front object which is not desired.)

Thanks a lot!

photo
1

1) sorry, no


2) please post your .ggb file in a new thread

Comments have been locked on this page!

© 2021 International GeoGebra Institute