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;
75
0
0
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();
0
3
3
+ 3 other calls in file
GitHub: zDawnING/MyLearnWebGL
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; }
0
0
1
+ 3 other calls in file
three.Vector3 is the most popular function in three (22341 examples)