[Golist] upcoming Go version 0.4.5...

Moses Gunesch moses at goasap.org
Sat Mar 22 09:10:09 PDT 2008


Need y'all's opinion on something...

Unfortunately LinearGo's constructor inputs are going to need to  
change on the next release (see my previous email – this release will  
add a useFrames option). Sorry, I know that is really inconvenient  
because it means that your tween classes will need to be fixed – but  
this should be the last time this happens for LinearGo.

A useFrames option will be added to the constructor. I also realized  
at this update that easing has an extraEasingParams setting, but  
easingOnCycle doesn't – oops. So extraEasingParamsOnCycle is being  
added to LinearGo as well.


Option A: This would be the most complete version of the constructor –  
on the downside it's pretty ugly.

public function LinearGo(delay	 		: Number=NaN,
			duration 		: Number=NaN,
			easing 			: Function=null,
			extraEasingParams	: Array=null,
			cycles			: Number=NaN,
			easingOnCycle		: Function=null,
			extraEasingParamsOnCycle: Array=null, // NEW
			useRelative		: Boolean=false,
			useRounding		: Boolean=false,
			useFrames		: Boolean=false, // NEW
			pulseInterval		: Number=NaN)


Option B: Omit the 2 extraEasing inputs considering how infrequently  
they are actually used. This cleans up the constructor quite a bit.  
Subclasses could of course choose to add them back in if that is their  
preference, and of course any tween can first be instantiated then  
these special settings can be applied afterwards.

(If you're unfamiliar, these params are settings for Back & Elastic  
easings like overshoot and amplitude, very few people know how to use  
them effectively so they are practically a moot point.)


public function LinearGo(delay	 	: Number=NaN,
			duration 	: Number=NaN,
			easing 		: Function=null,
			cycles		: Number=NaN,
			easingOnCycle	: Function=null,
			useRelative	: Boolean=false,
			useRounding	: Boolean=false,
			useFrames	: Boolean=false,
			pulseInterval	: Number=NaN)

So what do you think... completeness or tidiness?

-moses



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080322/fe57d057/attachment.html 


More information about the GoList mailing list