Skip to content

Commit ddeac1f

Browse files
committed
Swapped to using GetFastValue
1 parent 5d8b22c commit ddeac1f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

v3/src/textures/parsers/SpriteSheet.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
var GetValue = require('../../utils/object/GetValue');
1+
var GetFastValue = require('../../utils/object/GetFastValue');
22

33
var 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

Comments
 (0)