From db8a22f4417fdb8a21bbe4393fe00f917b63ec3b Mon Sep 17 00:00:00 2001 From: bluepichu Date: Wed, 2 Nov 2016 17:44:27 -0400 Subject: [PATCH 1/2] pixi.js - Fix "hex2string" bug --- pixi.js/pixi.js-tests.ts | 2 +- pixi.js/pixi.js.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pixi.js/pixi.js-tests.ts b/pixi.js/pixi.js-tests.ts index ac50d9d955..1e6a88ff3b 100644 --- a/pixi.js/pixi.js-tests.ts +++ b/pixi.js/pixi.js-tests.ts @@ -274,7 +274,7 @@ namespace basics { // draw a circle, set the lineStyle to zero so the circle doesn't have an outline this.graphics.lineStyle(0); - this.graphics.beginFill(0xFFFF0B, 0.5); + this.graphics.beginFill(PIXI.utils.hex2string(0xFFFF0B), 0.5); this.graphics.drawCircle(470, 90, 60); this.graphics.endFill(); diff --git a/pixi.js/pixi.js.d.ts b/pixi.js/pixi.js.d.ts index d8e6bf86d7..3de0f3f296 100644 --- a/pixi.js/pixi.js.d.ts +++ b/pixi.js/pixi.js.d.ts @@ -1103,7 +1103,7 @@ declare namespace PIXI { static uuid(): number; static hex2rgb(hex: number, out?: number[]): number[]; - static hex2String(hex: number): string; + static hex2string(hex: number): string; static rgb2hex(rgb: Number[]): number; static canUseNewCanvasBlendModel(): boolean; static getNextPowerOfTwo(number: number): number; From ccf944ff703b6580f1155ad07367c60a43557382 Mon Sep 17 00:00:00 2001 From: bluepichu Date: Wed, 2 Nov 2016 17:53:35 -0400 Subject: [PATCH 2/2] Replace hex2string test with a legal use --- pixi.js/pixi.js-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixi.js/pixi.js-tests.ts b/pixi.js/pixi.js-tests.ts index 1e6a88ff3b..f54da3fb00 100644 --- a/pixi.js/pixi.js-tests.ts +++ b/pixi.js/pixi.js-tests.ts @@ -274,7 +274,7 @@ namespace basics { // draw a circle, set the lineStyle to zero so the circle doesn't have an outline this.graphics.lineStyle(0); - this.graphics.beginFill(PIXI.utils.hex2string(0xFFFF0B), 0.5); + this.graphics.beginFill(0xFFFF0B, 0.5); this.graphics.drawCircle(470, 90, 60); this.graphics.endFill(); @@ -461,7 +461,7 @@ namespace basics { var style: PIXI.TextStyle = { font: '36px Arial bold italic', - fill: '#F7EDCA', + fill: PIXI.utils.hex2string(0xF7EDCA), stroke: '#4a1850', strokeThickness: 5, dropShadow: true,