1- var GetValue = require ( '../../utils/object/GetValue ' ) ;
1+ var GetFastValue = require ( '../../utils/object/GetFastValue ' ) ;
22
33var SpriteSheet = function ( texture , sourceIndex , x , y , width , height , config )
44{
5- var frameWidth = GetValue ( config , 'frameWidth' , null ) ;
6- var frameHeight = GetValue ( config , 'frameHeight' , frameWidth ) ;
5+ var frameWidth = GetFastValue ( config , 'frameWidth' , null ) ;
6+ var frameHeight = GetFastValue ( config , 'frameHeight' , frameWidth ) ;
77
88 // If missing we can't proceed
99 if ( frameWidth === null )
@@ -16,10 +16,10 @@ var SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)
1616
1717 texture . add ( '__BASE' , sourceIndex , 0 , 0 , source . width , source . height ) ;
1818
19- var startFrame = GetValue ( config , 'startFrame' , 0 ) ;
20- var endFrame = GetValue ( config , 'endFrame' , - 1 ) ;
21- var margin = GetValue ( config , 'margin' , 0 ) ;
22- var spacing = GetValue ( config , 'spacing' , 0 ) ;
19+ var startFrame = GetFastValue ( config , 'startFrame' , 0 ) ;
20+ var endFrame = GetFastValue ( config , 'endFrame' , - 1 ) ;
21+ var margin = GetFastValue ( config , 'margin' , 0 ) ;
22+ var spacing = GetFastValue ( config , 'spacing' , 0 ) ;
2323
2424 var row = Math . floor ( ( width - margin ) / ( frameWidth + spacing ) ) ;
2525 var column = Math . floor ( ( height - margin ) / ( frameHeight + spacing ) ) ;
0 commit comments