How to use the CubeReflectionMapping function from three

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

182
183
184
185
186
187
188
189
190
191
    image_base_path + 'negy.jpg',
    image_base_path + 'posz.jpg',
    image_base_path + 'negz.jpg',
]);
textureCube.format = THREE.RGBAFormat;
textureCube.mapping = THREE.CubeReflectionMapping;
textureCube.encoding = THREE.sRGBEncoding;

// Skybox
scene.background = textureCube;
fork icon75
star icon0
watch icon0

27
28
29
30
31
32
33
34
35
36

this.cubeCamera = new THREE.CubeCamera(1, 1000, 128);
this.cubeCamera.renderTarget.texture.generateMipmaps = true;
this.cubeCamera.renderTarget.texture.minFilter = THREE.LinearMipMapLinearFilter;
// this.cubeCamera.renderTarget.texture.magFilter = THREE.LinearFilter;
this.cubeCamera.renderTarget.texture.mapping = THREE.CubeReflectionMapping;
this.scene.add(this.cubeCamera);


this.loadGLTFScene();
fork icon0
star icon3
watch icon3

+ 3 other calls in file

118
119
120
121
122
123
124
125
126
127
let hdrMaterial = materialFolder.addFolder("HDR Material");
hdrMaterial.add(materialContr, 'variationHDR').listen();
materialFolder.add(materialContr, 'openCubeCamera').listen();
materialFolder.add(materialContr, 'switchEnvMapType', ['reflection', 'refraction']).onChange(function(type){
        if(type == 'reflection'){
                envMapSphere.material.envMap.mapping = THREE.CubeReflectionMapping;
        }
        if(type == 'refraction'){
                envMapSphere.material.envMap.mapping = THREE.CubeRefractionMapping;
        }
fork icon0
star icon0
watch icon1

+ 3 other calls in file

Other functions in three

Sorted by popularity

function icon

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