Added SpriteSheet support to chuck animations

This commit is contained in:
logsol 2015-01-14 17:31:38 +01:00
parent c6add97a38
commit dbde25f76e
259 changed files with 2533 additions and 5 deletions

View file

@ -107,6 +107,9 @@ function (Parent, Settings, Nc, Exception, ColorConverter, Layer) {
var texturePaths = [];
for (var i = start; i <= end; i++) {
/*
// Multiple File Animations
texturePaths.push(
Settings.GRAPHICS_PATH
+ Settings.GRAPHICS_SUBPATH_CHARACTERS
@ -115,8 +118,15 @@ function (Parent, Settings, Nc, Exception, ColorConverter, Layer) {
+ padF(i)
+ ".png"
);
*/
// Single File Animations (animation names from chuck_sheet.json, use option fromFrame=true)
texturePaths.push(
"Chuck" + arm.toUpperCaseFirstChar() + "0" + padF(i) + ".png"
);
}
var callback = function(mesh) {
self.animatedMeshesContainer[arm][key] = mesh;
Nc.trigger(Nc.ns.client.view.mesh.add, self.layerId, mesh);
@ -130,12 +140,13 @@ function (Parent, Settings, Nc, Exception, ColorConverter, Layer) {
x: 0,
y: 40 * 4
},
width: 35,
height: 40,
xScale: 0.25,
yScale: 0.25,
anchor: {
x: 0.5,
y: 0
}
},
fromFrame: true
});
}