1.6.0 • Published 5 years ago

three.js-fbo v1.6.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

three.js-fbo

FBO Module for use with THREE.js. Very useful for computing particles.

Example

Example use case.

import * as THREE from 'three';
import FBO from 'three.js-fbo';

let material; // a THREE.js material

const positionFBO = new FBO({
  tWidth = 512, // simulation texture width
  tHeight = 512,// simulation texture height
  numTargets = 3, // number of targets
  filterType = THREE.NearestFilter, // THREE.js texture filter type
  format = THREE.RGBAFormat, // THREE.js texture format type
  renderer, // THREE.js renderer
  uniforms, // uniforms to pass to shaders
  simulationVertexShader, // simulation vertex shader
  simulationFragmentShader // simulation fragment shader
});

// your render animation event func
render() {
	positionFBO.simulate();
	material.uniforms.tPosition.value = positionFBO.getCurrentFrame();
}

Contributors

1.6.0

5 years ago

1.5.0

6 years ago

1.4.4

6 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago