diff --git a/packages/graphics/src/GraphicsGeometry.js b/packages/graphics/src/GraphicsGeometry.js index 1384f18..0471c85 100644 --- a/packages/graphics/src/GraphicsGeometry.js +++ b/packages/graphics/src/GraphicsGeometry.js @@ -1,6 +1,7 @@ import { SHAPES } from '@pixi/math'; import { Bounds } from '@pixi/display'; import { BatchGeometry, BatchDrawCall } from '@pixi/core'; +import { DRAW_MODES } from '@pixi/constants'; import GraphicsData from './GraphicsData'; import buildCircle from './utils/buildCircle'; @@ -599,12 +600,14 @@ currentGroup.textureCount = 0; currentGroup.start = 0; + currentGroup.size = 0; + currentGroup.type = DRAW_MODES.TRIANGLES; let textureCount = 0; let currentTexture = null; let textureId = 0; let native = false; - let drawMode = 4; + let drawMode = DRAW_MODES.TRIANGLES; let index = 0; @@ -625,7 +628,7 @@ if (native !== style.native) { native = style.native; - drawMode = native ? 1 : 4; + drawMode = native ? DRAW_MODES.LINES : DRAW_MODES.TRIANGLES; // force the batch to break! currentTexture = null;