migrated old manual test to new testing system. fixed tweening issues

This commit is contained in:
Eric Rowell
2013-12-05 23:10:42 -08:00
parent c7bb7d90ad
commit 50b3220812
35 changed files with 93 additions and 8773 deletions

View File

@@ -7,6 +7,17 @@ var assert = chai.assert,
assertionCount = 0,
assertions = document.createElement('em');
window.requestAnimFrame = (function(callback){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback){
window.setTimeout(callback, 1000 / 30);
};
})();
function init() {
// assert extenders so that we can count assertions
assert = function() {
@@ -38,6 +49,8 @@ function init() {
mochaStats.appendChild(li);
}
}
addStats();
}
@@ -45,6 +58,28 @@ function init() {
Kinetic.enableTrace = true;
function addStats() {
stats = new Stats();
stats.setMode(0);
stats.domElement.style.position = 'fixed';
stats.domElement.style.left = '0px';
stats.domElement.style.top = '0px';
document.getElementsByTagName('body')[0].appendChild( stats.domElement );
function animate(lastTime){
stats.begin();
requestAnimFrame(function(){
stats.end();
animate(lastTime);
});
}
animate();
}
function addStage() {
var container = document.createElement('div'),