return f(Ay*t*t*t + By*t*t + Cy*t);\r
};\r
} else if (this.mode === "discrete") {\r
+ this.to.call();\r
return function (t) {\r
return isNaN(t) ? this.string\r
- : this.to.from.string;\r
+ : this.to.advance(0);\r
}.bind(this);\r
}\r
}\r
call: function() {\r
return function (t) {\r
return isNaN(t) ? this.string\r
- : this.to.string;\r
+ : this.to.advance(1);\r
}.bind(this);\r
}\r
} ) );\r
\r
/*additive属性がsum (加法アニメーション)の場合*/\r
if (ele.getAttributeNS(null, "additive") === "sum") {\r
+ var attrValue = ele.parentNode.getAttributeNS(null, this.attrName);\r
ele.addEventListener("beginEvent", function(evt) {\r
to.forEach( function(x) {\r
- x.to.setAdditive(evt.target.parentNode.getAttributeNS(null, this.attrName));\r
+ x.to.setAdditive(attrValue);\r
} )\r
- }.bind(this), false);\r
+ }, false);\r
}\r
/*acuumulate属性がsum (蓄積アニメーション)の場合*/\r
if (ele.getAttributeNS(null, "accumulate") === "sum") {\r
calc.mode = "discrete";\r
calc.keyTime = 0.5;\r
calc.to.degit = 1;\r
+ calc.to.string = "1";\r
calc.to.from.string = "0.5";\r
expect(calc.call()(0.2)).toBe("0.5");\r
expect(calc.call()(0.3)).toBe("0.5");\r
ele.setAttributeNS(null, "calcMode", "discrete");\r
$animate.init(ele);\r
expect($animate.mode).toBe("discrete");\r
- f(24, "M20 0 L20 30");\r
- f(25, "M20 0 L20 30");\r
- f(37, "M20 20 L10 30");\r
- f(48, "M20 20 L10 30");\r
+ f(24, "M20.0 0.0 L20.0 30.0");\r
+ f(25, "M20.0 0.0 L20.0 30.0");\r
+ f(37, "M20.0 20.0 L10.0 30.0");\r
+ f(48, "M20.0 20.0 L10.0 30.0");\r
} );\r
/*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/\r
it("should be this for the value (the valid partion )", function() {\r
ele.setAttributeNS(null, "calcMode", "discrete");\r
ele.setAttributeNS(null, "keyTimes", "0.1;0.5;0.4");\r
$animate.init(ele);\r
- f(1, "M20 0 L20 30");\r
- f(4, "M20 0 L20 30");\r
- f(5, "M20 24 L20 30");\r
- f(25, "M20 24 L20 30");\r
- f(29, "M20 26.4 L20 30");\r
- f(48, "M20 26.4 L20 30");\r
+ f(1, "M20.0 0.0 L20.0 30.0");\r
+ f(4, "M20.0 0.0 L20.0 30.0");\r
+ f(5, "M20.0 24.0 L20.0 30.0");\r
+ f(25, "M20.0 24.0 L20.0 30.0");\r
+ f(29, "M20.0 26.4 L20.0 30.0");\r
+ f(48, "M20.0 26.4 L20.0 30.0");\r
\r
frame.timelines.length = 0;\r
ele.setAttributeNS(null, "calcMode", "spline");\r