Skip to content

Commit f406b68

Browse files
committed
Fix graphics moveFxTo and lineFxTo not work
1 parent cbfc208 commit f406b68

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

src/gameobjects/graphics/GraphicsWebGLRenderer.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,41 @@ var GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, ca
302302
path.push(lastPath);
303303
break;
304304

305+
case Commands.LINE_FX_TO:
306+
if (lastPath !== null)
307+
{
308+
lastPath.points.push(new Point(
309+
commands[++cmdIndex],
310+
commands[++cmdIndex],
311+
commands[++cmdIndex],
312+
commands[++cmdIndex],
313+
commands[++cmdIndex] * alpha
314+
));
315+
}
316+
else
317+
{
318+
lastPath = new Path(
319+
commands[++cmdIndex],
320+
commands[++cmdIndex],
321+
commands[++cmdIndex],
322+
commands[++cmdIndex],
323+
commands[++cmdIndex] * alpha
324+
);
325+
path.push(lastPath);
326+
}
327+
break;
328+
329+
case Commands.MOVE_FX_TO:
330+
lastPath = new Path(
331+
commands[++cmdIndex],
332+
commands[++cmdIndex],
333+
commands[++cmdIndex],
334+
commands[++cmdIndex],
335+
commands[++cmdIndex] * alpha
336+
);
337+
path.push(lastPath);
338+
break;
339+
305340
case Commands.SAVE:
306341
matrixStack.push(currentMatrix.copyToArray());
307342
break;

0 commit comments

Comments
 (0)