How to use the FloatType function from three

Find comprehensive JavaScript three.FloatType code examples handpicked from public code repositorys.

18
19
20
21
22
23
24
25
26
    stencilBuffer: false,
    wrapS: THREE.ClampToEdgeWrapping,
    wrapT: THREE.ClampToEdgeWrapping,
    format: THREE.RGBFormat,
    flipY: false
    // type: THREE.FloatType
    // type: THREE.HalfFloatType
  }
};
fork icon4
star icon25
watch icon2

+ 3 other calls in file

14
15
16
17
18
19
20
21
22
23

/* Create 8 render passes of varying resolution */

// Render pass 1
/*var renderTarget1 = new THREE.WebGLRenderTarget(Math.ceil(windowResPow2.innerWidth * OneOver2Pow7), Math.ceil(windowResPow2.innerHeight * OneOver2Pow7));
renderTarget1.type = THREE.FloatType;
var composer1 = new EffectComposer(renderer, renderTarget1);

    var conemarchPass1 = new EffectComposer.ShaderPass({
    uniforms: {
fork icon1
star icon0
watch icon1

+ 3 other calls in file

22
23
24
25
26
27
28
29
30
31
}

// source from https://github.com/spite/codevember-2016
export  function createRenderTarget(renderer) {

    var type = THREE.FloatType;
    if( renderer.extensions.get( 'OES_texture_float_linear' ) === null ) type = THREE.HalfFloatType;

    var rt = new THREE.WebGLRenderTarget( 1, 1, {
        wrapS: THREE.ClampToEdgeWrapping,
fork icon0
star icon0
watch icon2

213
214
215
216
217
218
219
220
221
222
}
makeMesh(volume, cm, climMin, climMax, alphaTest, level) {
  var texture = new THREE.DataTexture3D(
    volume.data, volume.xLength, volume.yLength, volume.zLength)
  texture.format = THREE.RedFormat
  texture.type = THREE.FloatType
  texture.minFilter = texture.magFilter = THREE.LinearFilter;
  texture.unpackAlignment = 1;
  var shader = VolumeRenderShader1;
  var uniforms = THREE.UniformsUtils.clone( shader.uniforms );
fork icon0
star icon0
watch icon4

+ 3 other calls in file

107
108
109
110
111
112
113
114
115
116
  //wrapS: THREE.RepeatWrapping,
  //wrapT: THREE.RepeatWrapping,
  minFilter: THREE.LinearFilter,
  magFilter: THREE.NearestFilter,
  format: THREE.RGBAFormat,
  type: THREE.FloatType
};

// TODO: check if WebGL2, if so it is built in
//console.log(renderer.getContext().getExtension('OES_texture_float'));
fork icon0
star icon0
watch icon2

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)