Yep your snippet is welcome if you're still ok :)
Thx a lot
Yann
On Aug 17, 1:07 pm, cjorba wrote:
> if you want an even smoother animation you can use the ge "frameend"
> event instead of the setInterval javascript funciton. This way your
> funcion will be called every time a frame is drawn. Then you'll need
> to calculate the number of degrees to rotate theearthbetween each
> frame based on a speed you define (speed variable) and the time
> elapsed since the last frame (you'll need to keep a last timestamp
> variable from the last call to your function). This way you'll get the
> best fps you can get, and therefore an animation that is as fluid as
> it can be.
>
> If you need a code snippet just ask for it and I'll post it.
>
> On Aug 14, 8:22 am, choi2k wrote:
>
>
>
> > Great! Thank you very much !
>
> > On 8月14日, 下午2時00分, TinyGrasshopper wrote:
>
> > > You could set the fly to speed to just teleport straight to the new
> > > location (no animation) and then use very small increments so it still
> > > looks smooth.
>
> > > From this thread:
http://groups.google.com/group/google-earth-browser-plugin/browse_thr...
> > > you can set the fly to speed to teleport using:
>
> > > ge.getOptions().setFlyToSpeed(ge.SPEED_TELEPORT);
>
> > > Cheers,
> > > Chris
>
> > > On Aug 14, 3:26 pm, choi2k wrote:
>
> > > > Thanks, Chris. It works.
> > > > I have tried to move the camera before. However, the zoom in and zoom
> > > > out effect by using setAbstractView made therotationnot smooth..
> > > > If I set the FlytoSpeed, it is much better!
>
> > > > Here is my code, is there any better way to do it?
> > > > //=============================
> > > > function startRotate(){
>
> > > > if(!rotateInterval){
> > > > rotateInterval = setInterval("setRotation()", 100);
> > > > }else{
> > > > clearInterval(rotateInterval);
> > > > }
> > > > DS_ge.getOptions().setFlyToSpeed(500);
>
> > > > }
>
> > > > function setRotation(){
> > > > if(count != 360){
> > > > var lookAt =
> > > > DS_ge.getView().copyAsLookAt(DS_ge.ALTITUDE_RELATIVE_TO_GROUND);
> > > > lookAt.setLongitude(lookAt.getLongitude() + 5);
> > > > DS_ge.getView().setAbstractView(lookAt);
> > > > count += 5;
> > > > }else{
> > > > clearInterval(rotateInterval);
> > > > }}
>
> > > > //=============================
>
> > > > On 8月14日, 上午11時58分, TinyGrasshopper wrote:
>
> > > > > Hi choi2k,
>
> > > > > You can do it with javascript. Rather than rotating theearth, you
> > > > > move the camera to look a different point on theearth. Have a look at
> > > > > the "move camera" example here:
>
> > > > >
http://www.google.com/earth/plugin/examples/samples/index.html
>
> > > > > Also:
>
> > > > > ge.getOptions().setFlyToSpeed(<number>);
>
> > > > > will allow you to set how fast the plugin animates the transition from
> > > > > where the camera currently is to where you've asked it to be.
>
> > > > > Cheers,
> > > > > Chris
>
> > > > > On Aug 14, 1:29 pm, choi2k wrote:
>
> > > > > > Hi all,
>
> > > > > > I believe it can be done with javascript. However, I find no relate
> > > > > > information from Internet. How to rotate theearthinside GE plugin on
> > > > > > its own axis smoothly?
>
> > > > > > Thanks- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -