MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / Divergence

Class Divergence

components/liquid-ether.tsx:791–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789 }
790
791 class Divergence extends ShaderPass {
792 constructor(simProps: any) {
793 super({
794 material: {
795 vertexShader: face_vert,
796 fragmentShader: divergence_frag,
797 uniforms: {
798 boundarySpace: { value: simProps.boundarySpace },
799 velocity: { value: simProps.src.texture },
800 px: { value: simProps.cellScale },
801 dt: { value: simProps.dt },
802 },
803 },
804 output: simProps.dst,
805 });
806 this.init();
807 }
808 update(...args: any[]) {
809 const { vel } = (args[0] || {}) as { vel?: any };
810 if (this.uniforms && vel) {
811 this.uniforms.velocity.value = vel.texture;
812 }
813 super.update();
814 }
815 }
816
817 class Poisson extends ShaderPass {
818 constructor(simProps: any) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected