@@ -411,9 +411,9 @@ spine.ColorTimeline = function (frameCount) {
411411spine . ColorTimeline . prototype = {
412412 slotIndex : 0 ,
413413 getFrameCount : function ( ) {
414- return this . frames . length / 2 ;
414+ return this . frames . length / 5 ;
415415 } ,
416- setFrame : function ( frameIndex , time , x , y ) {
416+ setFrame : function ( frameIndex , time , r , g , b , a ) {
417417 frameIndex *= 5 ;
418418 this . frames [ frameIndex ] = time ;
419419 this . frames [ frameIndex + 1 ] = r ;
@@ -1111,7 +1111,7 @@ spine.SkeletonJson.readCurve = function (timeline, frameIndex, valueMap) {
11111111} ;
11121112spine . SkeletonJson . toColor = function ( hexString , colorIndex ) {
11131113 if ( hexString . length != 8 ) throw "Color hexidecimal length must be 8, recieved: " + hexString ;
1114- return parseInt ( hexString . substring ( colorIndex * 2 , 2 ) , 16 ) / 255 ;
1114+ return parseInt ( hexString . substr ( colorIndex * 2 , 2 ) , 16 ) / 255 ;
11151115} ;
11161116
11171117spine . Atlas = function ( atlasText , textureLoader ) {
@@ -1452,6 +1452,9 @@ PIXI.Spine.prototype.updateTransform = function () {
14521452 slotContainer . scale . y = bone . worldScaleY ;
14531453
14541454 slotContainer . rotation = - ( slot . bone . worldRotation * Math . PI / 180 ) ;
1455+
1456+ slotContainer . alpha = slot . a ;
1457+ slot . currentSprite . tint = PIXI . rgb2hex ( [ slot . r , slot . g , slot . b ] ) ;
14551458 }
14561459
14571460 PIXI . DisplayObjectContainer . prototype . updateTransform . call ( this ) ;
0 commit comments