From 8f1450eccaa7b3471760ecafc05cf895d0d3d63b Mon Sep 17 00:00:00 2001 From: Robert Plante Date: Mon, 23 Nov 2015 12:46:12 -0500 Subject: [PATCH] Update to BitmapData.setHSL to follow conventions --- src/gameobjects/BitmapData.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gameobjects/BitmapData.js b/src/gameobjects/BitmapData.js index deb7e94e1..5d425202a 100644 --- a/src/gameobjects/BitmapData.js +++ b/src/gameobjects/BitmapData.js @@ -782,9 +782,10 @@ Phaser.BitmapData.prototype = { * @return {Phaser.BitmapData} This BitmapData object for method chaining. */ setHSL: function (h, s, l, region) { - var bHaveH = typeof(h) === "number", - bHaveS = typeof(s) === "number", - bHaveL = typeof(l) === "number"; + + var bHaveH = h || h === 0; + var bHaveS = s || s === 0; + var bHaveL = l || l === 0; if (!bHaveH && !bHaveS && !bHaveL) {