From: Laszlo T. <las...@po...> - 2001-10-30 21:57:58
|
This slide utility was part of the DynAPI 2.0 Why was it taken out? It is very handy, and still works with the new 2.55a version (as far as I can tell from the limited testing i've done). Please put it back in the package: /* DynAPI Distribution Slide Extensions Modified: 2000.10.27 The DynAPI Distribution is distributed under the terms of the GNU LGPL license. */ DynLayer.prototype.slideTo = function (endx,endy,inc,speed) { if (endx==null) endx = this.x if (endy==null) endy = this.y var distx = endx-this.x var disty = endy-this.y this.slideStart(endx,endy,distx,disty,inc,speed) } DynLayer.prototype.slideBy = function (distx,disty,inc,speed) { if (distx==null) distx = 0 if (disty==null) disty = 0 var endx = this.x+distx var endy = this.y+disty this.slideStart(endx,endy,distx,disty,inc,speed) } DynLayer.prototype.slideStart = function (endx,endy,distx,disty,inc,speed) { if (this.slideActive) return if (!inc) inc = 10 if (!speed) speed = 20 this.slideN = Math.floor(Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc) if (this.slideN==0) return this.slideEndX = endx this.slideEndY = endy this.slideDX = distx/this.slideN this.slideDY = disty/this.slideN this.slideActive = true this.slideI = 0 this.slideInterval = setInterval(this+".slide()",speed) } DynLayer.prototype.slide = function () { if (!this.slideActive) { clearInterval(this.slideInterval) this.slideActive = false } else if (this.slideI++ < this.slideN) { this.moveBy(this.slideDX,this.slideDY) this.invokeEvent("slide") } else { this.moveTo(this.slideEndX,this.slideEndY) this.invokeEvent("slide") this.slideActive = false clearInterval(this.slideInterval) this.invokeEvent("slideend") } } |
From: Richard B. <ma...@ri...> - 2001-10-30 22:39:23
|
Hi, Checkout the pathanim examples in release 2.55a, you will see the slideTo function is available there. You now include pathanim.js and thread.js, when animation is needed. This was done because thread.js should work as a load-balancer, which gives all your animations the same priority. slideBy was dropped, as it was though so simple to do : myLayer.slideTo(myLayer.getX()+10,null) Not everyone agreed with this at the time, but that's the way it turned out. It might be a nice idea to have a official library of addon functions that work with DynAPI (there is also a nice glide script available), but most effort is going into browser compatibility, and performance at the moment. Cheers, Richard. www.richardinfo.com ----- Original Message ----- From: "Laszlo Teglas" <las...@po...> To: <Dyn...@li...> Sent: Tuesday, October 30, 2001 10:59 PM Subject: [Dynapi-Chat] slide utility > > This slide utility was part of the DynAPI 2.0 > Why was it taken out? > It is very handy, and still works with the new 2.55a version (as far as I > can tell from the limited testing i've done). > > Please put it back in the package: > > > /* > DynAPI Distribution > Slide Extensions > Modified: 2000.10.27 > > The DynAPI Distribution is distributed under the terms of the GNU LGPL > license. > */ > DynLayer.prototype.slideTo = function (endx,endy,inc,speed) { > if (endx==null) endx = this.x > if (endy==null) endy = this.y > var distx = endx-this.x > var disty = endy-this.y > this.slideStart(endx,endy,distx,disty,inc,speed) > } > DynLayer.prototype.slideBy = function (distx,disty,inc,speed) { > if (distx==null) distx = 0 > if (disty==null) disty = 0 > var endx = this.x+distx > var endy = this.y+disty > this.slideStart(endx,endy,distx,disty,inc,speed) > } > DynLayer.prototype.slideStart = function (endx,endy,distx,disty,inc,speed) { > if (this.slideActive) return > if (!inc) inc = 10 > if (!speed) speed = 20 > this.slideN = Math.floor(Math.sqrt(Math.pow(distx,2) + > Math.pow(disty,2))/inc) > if (this.slideN==0) return > this.slideEndX = endx > this.slideEndY = endy > this.slideDX = distx/this.slideN > this.slideDY = disty/this.slideN > this.slideActive = true > this.slideI = 0 > this.slideInterval = setInterval(this+".slide()",speed) > } > DynLayer.prototype.slide = function () { > if (!this.slideActive) { > clearInterval(this.slideInterval) > this.slideActive = false > } > else if (this.slideI++ < this.slideN) { > this.moveBy(this.slideDX,this.slideDY) > this.invokeEvent("slide") > } > else { > this.moveTo(this.slideEndX,this.slideEndY) > this.invokeEvent("slide") > this.slideActive = false > clearInterval(this.slideInterval) > this.invokeEvent("slideend") > } > } > > > _______________________________________________ > Dynapi-Chat mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-chat > |
From: Michael P. <mp...@ph...> - 2001-10-30 23:59:26
Attachments:
anim.zip
|
I haven't done the glide methods yet, but here's a collection of the animations that I have ported across. Note: the code is out of the AfroAPI and will require a bit of tweaking to put is back in DynAPI mode. If someone wants to do it, I am willing to give them all the help they need. My current workload doesns't allow me the time at the moment. Richard Bennett wrote: > It might be a nice idea to have a official library of addon functions that > work with DynAPI (there is also a nice glide script available) -- Michael Pemberton mp...@ph... ICQ: 12107010 |
From: Dan S. <dy...@dy...> - 2001-10-31 00:20:41
|
My port of the glide animation from DynAPI1 is here: http://www.dynapi.net:81/dynapi-beta/window/dynapi/src/lib/dynapi/util/glide.js It's kinda messy but it works. Dan Steinman On Wed, Oct 31, 2001 at 11:02:39AM +1100, Michael Pemberton wrote: > I haven't done the glide methods yet, but here's a collection of the animations > that I have ported across. > > Note: the code is out of the AfroAPI and will require a bit of tweaking to put > is back in DynAPI mode. If someone wants to do it, I am willing to give them > all the help they need. My current workload doesns't allow me the time at the > moment. > > Richard Bennett wrote: > > > It might be a nice idea to have a official library of addon functions that > > work with DynAPI (there is also a nice glide script available) > > -- > Michael Pemberton > mp...@ph... > ICQ: 12107010 > |
From: Richard B. <ma...@ri...> - 2001-11-01 14:44:39
|
Hi, The new window widget is really cool. the re-write looks promising too, just a shame so many object names have been changed. Especially because the changes seem to lean towards Java, more than towards DOM. Good to see you catered for backwards-compatible code though. How about making the directories browseable on the server? Saves guessing the file-names to download the API, which you know we'll do anyway :o) Looking forward to the next releases, cheers, Richard. ----- Original Message ----- From: "Dan Steinman" <dy...@dy...> To: <dyn...@li...urceforge.ndt>; <Dyn...@li...> Sent: Wednesday, October 31, 2001 1:26 AM Subject: Re: [Dynapi-Dev] Re: [Dynapi-Chat] slide utility > My port of the glide animation from DynAPI1 is here: > http://www.dynapi.net:81/dynapi-beta/window/dynapi/src/lib/dynapi/util/glide .js > > It's kinda messy but it works. > > Dan Steinman > > > On Wed, Oct 31, 2001 at 11:02:39AM +1100, Michael Pemberton wrote: > > I haven't done the glide methods yet, but here's a collection of the animations > > that I have ported across. > > > > Note: the code is out of the AfroAPI and will require a bit of tweaking to put > > is back in DynAPI mode. If someone wants to do it, I am willing to give them > > all the help they need. My current workload doesns't allow me the time at the > > moment. > > > > Richard Bennett wrote: > > > > > It might be a nice idea to have a official library of addon functions that > > > work with DynAPI (there is also a nice glide script available) > > > > -- > > Michael Pemberton > > mp...@ph... > > ICQ: 12107010 > > > > > > _______________________________________________ > Dynapi-Chat mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-chat > |