I have made some progress, but now I get this zoom in effect every time I try to pan.
jQuery.fx.step.pan = function(fx) { if(fx.state == 0) { fx.end = fx.options.curAnim.pan fx.start = fx.elem.attributes.getNamedItem('viewBox').nodeValue.split(' ') fx.dist = fx.end.map(function(val, i){ return val - fx.start[i] }) status(fx.dist) } fx.elem.setAttribute('viewBox', fx.dist.map(function(val){ return fx.pos * val }).join(' ')) } pan = [x, y, map.view.width, map.view.height].map( function(val){ return val * map.tile }) $('svg').animate({pan: pan}, {duration: 1000}) On Jul 10, 4:48 pm, Vez <[EMAIL PROTECTED]> wrote: > I am the amazing jQuery SVG plugin with the animation extension for a > browser-based game. > > When the character walks around, the camera follows him. Right now I > just pan the in huge chunks with this code: > > svg.configure({viewBox: x+' '+y+' '+width+' '+height}) > > So I need to make a custom animation. Here's what I have so far. > > jQuery.fx.step.panX = function(fx) > { > fx.elem.setAttribute('viewBox', fx.now+' '+y+' '+width+' '+height) > > } > > svg.animate({panX: x}, 100) > > As you can see, it only works for the x-axis. How do I animate more > than one variable at a time? > > Thanks for the help.