Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
currentTexture = nextTexture;
if (nextTexture._batchEnabled !== TICK)
{
if (textureCount === MAX_TEXTURES)
{
TICK++;
textureCount = 0;
if (currentGroup.size > 0)
{
currentGroup = DRAW_CALL_POOL.pop();
if (!currentGroup)
{
currentGroup = new BatchDrawCall();
currentGroup.textures = new BatchTextureArray();
}
this.drawCalls.push(currentGroup);
}
currentGroup.start = index;
currentGroup.size = 0;
currentGroup.textures.count = 0;
currentGroup.type = drawMode;
}
// TODO add this to the render part..
nextTexture.touched = 1;// touch;
nextTexture._batchEnabled = TICK;
nextTexture._batchLocation = textureCount;
nextTexture.wrapMode = 10497;