| 632 | class Advection extends ShaderPass { |
| 633 | line!: THREE.LineSegments; |
| 634 | constructor(simProps: any) { |
| 635 | super({ |
| 636 | material: { |
| 637 | vertexShader: face_vert, |
| 638 | fragmentShader: advection_frag, |
| 639 | uniforms: { |
| 640 | boundarySpace: { value: simProps.cellScale }, |
| 641 | px: { value: simProps.cellScale }, |
| 642 | fboSize: { value: simProps.fboSize }, |
| 643 | velocity: { value: simProps.src.texture }, |
| 644 | dt: { value: simProps.dt }, |
| 645 | isBFECC: { value: true }, |
| 646 | }, |
| 647 | }, |
| 648 | output: simProps.dst, |
| 649 | }); |
| 650 | this.uniforms = this.props.material.uniforms; |
| 651 | this.init(); |
| 652 | } |
| 653 | init() { |
| 654 | super.init(); |
| 655 | this.createBoundary(); |