pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
21 lines (19 loc) • 844 B
JavaScript
;
class GpuParticleContainerAdaptor {
execute(particleContainerPipe, container) {
const renderer = particleContainerPipe.renderer;
const shader = container.shader || particleContainerPipe.defaultShader;
shader.groups[0] = renderer.renderPipes.uniformBatch.getUniformBindGroup(particleContainerPipe.localUniforms, true);
shader.groups[1] = renderer.texture.getTextureBindGroup(container.texture);
const state = particleContainerPipe.state;
const buffer = particleContainerPipe.getBuffers(container);
renderer.encoder.draw({
geometry: buffer.geometry,
shader: container.shader || particleContainerPipe.defaultShader,
state,
size: container.particleChildren.length * 6
});
}
}
export { GpuParticleContainerAdaptor };
//# sourceMappingURL=GpuParticleContainerAdaptor.mjs.map