How to use the RGBFormat function from three
Find comprehensive JavaScript three.RGBFormat code examples handpicked from public code repositorys.
GitHub: mattdesl/filmic-gl
56 57 58 59 60 61 62 63 64 65
var reflectionCube = THREE.ImageUtils.loadTextureCube( urls ); reflectionCube.format = THREE.RGBFormat; var refractionCube = new THREE.Texture( reflectionCube.image, new THREE.CubeRefractionMapping() ); refractionCube.format = THREE.RGBFormat; var r = 10; var sphereGeo = new THREE.SphereGeometry(r, 50, 50); var colors = [
2
51
7
+ 3 other calls in file
1835 1836 1837 1838 1839 1840 1841 1842 1843
case "aoMap": case "emissiveMap": case "metalnessMap": case "normalMap": case "roughnessMap": texture.format = THREE.RGBFormat; break; } }
3
7
8
+ 14 other calls in file
174 175 176 177 178 179 180 181 182 183
image_base_path + "posx.jpg", image_base_path + "negx.jpg", image_base_path + "posy.jpg", image_base_path + "negy.jpg", image_base_path + "posz.jpg", image_base_path + "negz.jpg" ]; textureCube = new THREE.CubeTextureLoader().load( urls ); textureCube.format = THREE.RGBFormat; textureCube.mapping = THREE.CubeReflectionMapping; textureCube.encoding = THREE.sRGBEncoding; var cubeShader = THREE.ShaderLib[ "cube" ];
75
0
1
252 253 254 255 256 257 258 259 260 261
geometry.computeBoundingSphere(); var videoTexture = new THREE.VideoTexture(video); videoTexture.minFilter = THREE.NearestFilter; videoTexture.magFilter = THREE.NearestFilter; videoTexture.format = THREE.RGBFormat; videoTexture.flipY = false; // The material is different if the see through camera is provided inside the vrDisplay or not. var material;
0
2
0
GitHub: VeinKowal/veins
1975 1976 1977 1978 1979 1980 1981 1982 1983 1984
} texture.flipY = false; if (textureDef.name) texture.name = textureDef.name; // When there is definitely no alpha channel in the texture, set RGBFormat to save space. if (!hasAlpha) texture.format = _three.RGBFormat; var samplers = json.samplers || {}; var sampler = samplers[textureDef.sampler] || {}; texture.magFilter = WEBGL_FILTERS[sampler.magFilter] || _three.LinearFilter; texture.minFilter = WEBGL_FILTERS[sampler.minFilter] || _three.LinearMipmapLinearFilter;
0
1
0
GitHub: ateriad/titar
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139
// an image canvas is used this.videoTexture.generateMipmaps = false; this.videoTexture.minFilter = THREE.LinearFilter; this.videoTexture.magFilter = THREE.LinearFilter; this.videoTexture.format = THREE.RGBFormat; this.changeProjection_(this.currentProjection_); if (this.currentProjection_ === 'NONE') { this.log('Projection is NONE, dont init');
0
0
1
+ 20 other calls in file
40 41 42 43 44 45 46 47 48
} }, createSkyBox: function (scene, urls, size) { let skyboxCubemap = new THREE.CubeTextureLoader().load(urls); skyboxCubemap.format = THREE.RGBFormat; let skyboxShader = THREE.ShaderLib['cube']; skyboxShader.uniforms['tCube'].value = skyboxCubemap;
0
0
0
7 8 9 10 11 12 13 14 15 16 17
} from "three"; import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"; import "./App.css"; extend({ OrbitControls }); const THREE = require('three'); const format = THREE.RGBFormat; const CameraControls = () => { const { camera,
0
0
0
+ 6 other calls in file
GitHub: MichaelPolla/mip-viewer
516 517 518 519 520 521 522 523 524
} // standard var envMap = new THREE.CubeTextureLoader().load(cubeMapURLs); envMap.format = THREE.RGBFormat; return Promise.resolve(envMap); }
0
0
0
+ 5 other calls in file
three.Vector3 is the most popular function in three (22341 examples)