Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
attributeName: 'aTextureCoord',
size: 2,
uploadFunction: this.uploadUvs,
offset: 0,
},
// tintData
{
attributeName: 'aColor',
size: 1,
type: TYPES.UNSIGNED_BYTE,
uploadFunction: this.uploadTint,
offset: 0,
},
];
this.shader = Shader.from(vertex, fragment, {});
/**
* The WebGL state in which this renderer will work.
*
* @member {PIXI.State}
* @readonly
*/
this.state = State.for2d();
}
for (let i = 0; i < maxTextures; i++)
{
sampleValues[i] = i;
}
const uniforms = {
default: UniformGroup.from({ uSamplers: sampleValues }, true),
};
let fragmentSrc = fragTemplate;
fragmentSrc = fragmentSrc.replace(/%count%/gi, maxTextures);
fragmentSrc = fragmentSrc.replace(/%forloop%/gi, generateSampleSrc(maxTextures));
const shader = Shader.from(vertex, fragmentSrc, uniforms);
return shader;
}
constructor(renderer)
{
super(renderer);
const uniforms = { globals: this.renderer.globalUniforms };
this.shader = Shader.from(vertex, fragment, uniforms);
this.simpleShader = Shader.from(vertex, fragmentSimple, uniforms);
this.quad = new QuadUv();
/**
* The WebGL state in which this renderer will work.
*
* @member {PIXI.State}
* @readonly
*/
this.state = State.for2d();
}
constructor(renderer)
{
super(renderer);
const uniforms = { globals: this.renderer.globalUniforms };
this.shader = Shader.from(vertex, fragment, uniforms);
this.simpleShader = Shader.from(vertex, fragmentSimple, uniforms);
this.quad = new QuadUv();
/**
* The WebGL state in which this renderer will work.
*
* @member {PIXI.State}
* @readonly
*/
this.state = State.for2d();
}