How to use the WebGLCubeRenderTarget function from three

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

0
1
2
3
4
5
6
7
8
9
const THREE = require('three');


export default class Hill {
  constructor() {
    var cubeRenderTarget = new THREE.WebGLCubeRenderTarget(128);
    this.cubeCamera = new THREE.CubeCamera(1, 15000, cubeRenderTarget);
    this.instances = 6;
    this.uniforms = {
      time: {
fork icon260
star icon0
watch icon0

11
12
13
14
15
16
17
18
19
20
textureEncoding: THREE.sRGBEncoding,

addEquiRectangularMap(path, renderer, scene) {
  const loader = new THREE.TextureLoader();
  const texture = loader.load(path, () => {
    const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);
    rt.fromEquirectangularTexture(renderer, texture);
    scene.background = rt.texture;
  });
},
fork icon0
star icon1
watch icon2

21
22
23
24
25
26
27
28
29
30
sky_uniforms['rayleigh'].value = 2
sky_uniforms['luminance'].value = 1
sky_uniforms['mieCoefficient'].value = 0.005
sky_uniforms['mieDirectionalG'].value = 0.8

cube_render_target = new THREE.WebGLCubeRenderTarget(512, {
    format: THREE.RGBFormat,
    generateMipmaps: true,
    minFilter: THREE.LinearMipmapLinearFilter
})
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in three

Sorted by popularity

function icon

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