Skip to content

Commit 954e7ef

Browse files
authored
Merge pull request phaserjs#3086 from Twilrom/master
Some bug fixes
2 parents 5598ee7 + 05a06b2 commit 954e7ef

10 files changed

Lines changed: 8 additions & 31 deletions

File tree

v3/src/curves/cubicbezier/CubicBezierCurve.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ var CubicBezierCurve = new Class({
7474
}
7575

7676
graphics.strokePath();
77-
graphics.closePath();
7877

7978
// So you can chain graphics calls
8079
return graphics;

v3/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ var DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPerc
7878
ctx.beginPath();
7979
ctx.rect(0, 0, src.cropWidth, src.cropHeight);
8080
ctx.clip();
81-
ctx.closePath();
8281
}
8382

8483
for (var index = 0; index < textLength; ++index)

v3/src/gameobjects/graphics/Graphics.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ var Graphics = new Class({
158158
{
159159
this.beginPath();
160160
this.arc(x, y, radius, 0, MATH_CONST.PI2);
161-
this.fillPath();
162161
this.closePath();
162+
this.fillPath();
163163

164164
return this;
165165
},
@@ -203,9 +203,8 @@ var Graphics = new Class({
203203
this.lineTo(x + width, y);
204204
this.lineTo(x + width, y + height);
205205
this.lineTo(x, y + height);
206-
this.lineTo(x, y);
207-
this.strokePath();
208206
this.closePath();
207+
this.strokePath();
209208

210209
return this;
211210
},
@@ -272,7 +271,6 @@ var Graphics = new Class({
272271
this.moveTo(x1, y1);
273272
this.lineTo(x2, y2);
274273
this.strokePath();
275-
this.closePath();
276274

277275
return this;
278276
},
@@ -330,8 +328,6 @@ var Graphics = new Class({
330328
this.lineTo(points[i].x, points[i].y);
331329
}
332330

333-
this.closePath();
334-
335331
this.strokePath();
336332

337333
return this;

v3/src/gameobjects/graphics/GraphicsCanvasRenderer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
124124
ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);
125125
ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);
126126
ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);
127-
ctx.lineTo(commandBuffer[index + 1], commandBuffer[index + 2]);
128127
ctx.closePath();
129128
ctx.fill();
130129
index += 6;
@@ -135,7 +134,6 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
135134
ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);
136135
ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);
137136
ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);
138-
ctx.lineTo(commandBuffer[index + 1], commandBuffer[index + 2]);
139137
ctx.closePath();
140138
ctx.stroke();
141139
index += 6;

v3/src/input/local/inc/ProcessDownEvents.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ var ProcessDownEvents = function (pointer)
1818

1919
this.events.dispatch(new InputEvent.GAME_OBJECT_DOWN(pointer, gameObject));
2020

21-
if (gameObject.input)
22-
{
23-
gameObject.input.onDown(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
24-
}
21+
gameObject.input.onDown(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
2522

2623
if (this.topOnly)
2724
{

v3/src/input/local/inc/ProcessMoveEvents.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ var ProcessMoveEvents = function (pointer)
1818

1919
this.events.dispatch(new InputEvent.GAME_OBJECT_MOVE(pointer, gameObject));
2020

21-
if (gameObject.input)
22-
{
23-
gameObject.input.onMove(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
24-
}
21+
gameObject.input.onMove(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
2522

2623
if (this.topOnly)
2724
{

v3/src/input/local/inc/ProcessOverOutEvents.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ var ProcessOverOutEvents = function (pointer)
6464

6565
this.events.dispatch(new InputEvent.GAME_OBJECT_OUT(pointer, gameObject));
6666

67-
if (gameObject.input)
68-
{
69-
gameObject.input.onOut(gameObject, pointer);
70-
}
67+
gameObject.input.onOut(gameObject, pointer);
7168

7269
if (this.topOnly)
7370
{
@@ -97,10 +94,7 @@ var ProcessOverOutEvents = function (pointer)
9794

9895
this.events.dispatch(new InputEvent.GAME_OBJECT_OVER(pointer, gameObject));
9996

100-
if (gameObject.input)
101-
{
102-
gameObject.input.onOver(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
103-
}
97+
gameObject.input.onOver(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
10498

10599
if (this.topOnly)
106100
{

v3/src/input/local/inc/ProcessUpEvents.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ var ProcessUpEvents = function (pointer)
1818

1919
this.events.dispatch(new InputEvent.GAME_OBJECT_UP(pointer, gameObject));
2020

21-
if (gameObject.input)
22-
{
23-
gameObject.input.onUp(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
24-
}
21+
gameObject.input.onUp(gameObject, pointer, gameObject.input.localX, gameObject.input.localY);
2522

2623
if (this.topOnly)
2724
{

v3/src/renderer/canvas/CanvasRenderer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ var CanvasRenderer = new Class({
205205
ctx.beginPath();
206206
ctx.rect(camera.x, camera.y, camera.width, camera.height);
207207
ctx.clip();
208-
ctx.closePath();
209208
}
210209

211210
var matrix = camera.matrix.matrix;

v3/src/renderer/webgl/WebGLRenderer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ var WebGLRenderer = new Class({
451451

452452
var list = children.list;
453453
var length = list.length;
454+
var renderer;
454455

455456
for (var index = 0; index < length; ++index)
456457
{

0 commit comments

Comments
 (0)