Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
shader.uniforms.uMapCoord = uv.mapCoord.toArray(true);
shader.uniforms.uClampFrame = uv.uClampFrame;
shader.uniforms.uClampOffset = uv.uClampOffset;
}
shader.uniforms.uTransform = tempMat.toArray(true);
shader.uniforms.uColor = premultiplyTintToRgba(ts.tint, ts.worldAlpha,
shader.uniforms.uColor, baseTex.alphaMode);
shader.uniforms.translationMatrix = ts.transform.worldTransform.toArray(true);
shader.uniforms.uSampler = tex;
renderer.shader.bind(shader);
renderer.geometry.bind(quad);// , renderer.shader.getGLShader());
this.state.blendMode = correctBlendMode(ts.blendMode, baseTex.alphaMode);
renderer.state.set(this.state);
renderer.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);
}
}
else if (totalChildren > maxSize && !container.autoResize)
{
totalChildren = maxSize;
}
let buffers = container._buffers;
if (!buffers)
{
buffers = container._buffers = this.generateBuffers(container);
}
const baseTexture = children[0]._texture.baseTexture;
// if the uvs have not updated then no point rendering just yet!
this.state.blendMode = correctBlendMode(container.blendMode, baseTexture.alphaMode);
renderer.state.set(this.state);
const gl = renderer.gl;
const m = container.worldTransform.copyTo(this.tempMatrix);
m.prepend(renderer.globalUniforms.uniforms.projectionMatrix);
this.shader.uniforms.translationMatrix = m.toArray(true);
this.shader.uniforms.uColor = premultiplyRgba(container.tintRgb,
container.worldAlpha, this.shader.uniforms.uColor, baseTexture.alphaMode);
this.shader.uniforms.uSampler = baseTexture;
this.renderer.shader.bind(this.shader);