Browse files

weird startvalue stuff

  • Loading branch information...
1 parent 3c6e0aa commit d1aec943f4926b85b5b30e78be183fb88a6e3e78 @andrewfitz committed Jun 8, 2010
View
2 as3/com/desuade/motion/controllers/ColorKeyframeContainer.as
@@ -75,7 +75,7 @@ package com.desuade.motion.controllers {
/**
* @private
*/
- internal override function setStartValue($target:Object, $property:String, $keyframe:String):void {
+ internal override function setStartValue($target:Object, $property:String, $keyframe:String, $sequence:Array):void {
var nvo:Object = generateStartValue($target, $property, $keyframe);
if($property == null){
$target.transform.colorTransform = new ColorTransform(nvo.redMultiplier, nvo.greenMultiplier, nvo.blueMultiplier, $target.alpha, nvo.redOffset, nvo.greenOffset, nvo.blueOffset);
View
12 as3/com/desuade/motion/controllers/KeyframeContainer.as
@@ -256,8 +256,8 @@ package com.desuade.motion.controllers {
/**
* @private
*/
- internal function setStartValue($target:Object, $property:String, $keyframe:String):void {
- $target[$property] = generateStartValue($target, $property, $keyframe);
+ internal function setStartValue($target:Object, $property:String, $keyframe:String, $sequence:Array):void {
+ $target[$property] = ($sequence != null) ? $sequence[0].value : generateStartValue($target, $property, $keyframe);
}
/**
@@ -289,7 +289,7 @@ package com.desuade.motion.controllers {
var pa:Array = getOrderedLabels();
var ta:Array = [];
//skip begin keyframe (i=1), it gets set and doesn't need to be tweened to initial value
- for (var i:int = 1; i < pa.length; i++) {
+ for (var i:int = 0; i < pa.length; i++) {
//if null, sets it to starting value
var np:Object = this[pa[i]];
var nuv:Number;
@@ -298,17 +298,19 @@ package com.desuade.motion.controllers {
} else {
var nnnv:* = np.value;
if(typeof nnnv == 'string'){
- var nfpv:Number = (ta.length == 0) ? $target[$property] : ta[ta.length-1].value;
+ var nfpv:Number = (i == 0) ? $target[$property] : ta[ta.length-1].value;
nuv = nfpv + Number(nnnv);
} else nuv = nnnv;
}
var nv:Number = (np.spread !== '0') ? Random.fromRange(nuv, ((typeof np.spread == 'string') ? nuv + Number(np.spread) : np.spread), precision) : nuv;
- var tmo:Object = {property:$property, value:nv, ease:np.ease, duration:calculateDuration($duration, this[pa[i-1]].position, np.position), delay:0};
+ trace($property + ": " + nv);
+ var tmo:Object = {property:$property, value:nv, ease:np.ease, duration:(i == 0) ? 0 : calculateDuration($duration, this[pa[i-1]].position, np.position), delay:0};
for (var h:String in np.extras) {
tmo[h] = np.extras[h];
}
ta.push(tmo);
}
+ //ta.shift();
return ta;
}
View
2 as3/com/desuade/motion/controllers/MotionController.as
@@ -219,7 +219,7 @@ package com.desuade.motion.controllers {
* @param keyframe This is the label of the keyframe to generate a starting value from.
*/
public function setStartValue($keyframe:String = 'begin'):void {
- keyframes.setStartValue(target, property, $keyframe);
+ keyframes.setStartValue(target, property, $keyframe, _sequence);
}
/**
View
4 as3/com/desuade/partigen/emitters/BasicEmitter.as
@@ -342,11 +342,11 @@ package com.desuade.partigen.emitters {
* @param burst The amount of particles to create at once.
*/
public function emit($burst:int = 1):void {
- var times:int = getTimer();
+ //var times:int = getTimer();
for (var i:int = 0; i < $burst; i++) {
createParticle((life > 0) ? randomLife() : 0);
}
- trace("Loop time: " + String(getTimer()-times));
+ //trace("Loop time: " + String(getTimer()-times));
}
/**
View
4 as3/com/desuade/partigen/particles/BasicParticle.as
@@ -161,8 +161,8 @@ package com.desuade.partigen.particles {
*/
protected function rearrangeGroup($proximity:int):void {
if($proximity <= 0) {
- for (var i:int = 0; i < group.length; i++) {
- group[i].x = group[i].y = 0;
+ for (var j:int = 0; j < group.length; j++) {
+ group[j].x = group[j].y = 0;
}
} else {
for (var i:int = 0; i < group.length; i++) {
View
4 as3/com/desuade/partigen/particles/BasicPixelParticle.as
@@ -157,8 +157,8 @@ package com.desuade.partigen.particles {
*/
protected function rearrangeGroup($proximity:int):void {
if($proximity <= 0) {
- for (var i:int = 0; i < group.length; i++) {
- group[i][0] = group[i][1] = 0;
+ for (var j:int = 0; j < group.length; j++) {
+ group[j][0] = group[j][1] = 0;
}
} else {
for (var i:int = 0; i < group.length; i++) {
View
5 changelog.txt
@@ -1,10 +1,13 @@
Desuade Library Change Log - http://desuade.com/
------------------------------------------------
+pool.dispose not freeing memory?
+
+
Motion Package 1.1.1 & Partigen 2.5 (2010/06/04)
Partigen:
-added: PixelRenderer & PixelParticle classes for high-performance pixel-based effects
- -added: BasicPool class for partigen package using object pooling to greatly increase performance
+ -added: BasicPool class for Partigen package using object pooling to greatly increase performance
-added: Emitter.particleFilters and XML support for dynamic filters on particles
-added: BitmapRenderer automagicmode - starts/stops the renderer on demand, no need for manual control
-added: Emitter.cacheParticleAsBitmap for particles

0 comments on commit d1aec94

Please sign in to comment.