How to use the OneFactor function from three
Find comprehensive JavaScript three.OneFactor code examples handpicked from public code repositorys.
433 434 435 436 437 438 439 440 441
transparent: true, opacity: 0.1 }); planeMat.blending = THREE.CustomBlending; planeMat.blendSrc = THREE.OneFactor; planeMat.blendDst = THREE.OneFactor; planeMat.blendEquation = THREE.ReverseSubtractEquation; const fadePlane = new THREE.Mesh(planeGeo, planeMat); scene.add(fadePlane);
0
8
0
152 153 154 155 156 157 158 159 160 161
const fadeMaterial = new THREE.MeshBasicMaterial({ color: fadeColor, }); fadeMaterial.blending = THREE.CustomBlending; fadeMaterial.blendSrc = THREE.OneFactor; fadeMaterial.blendDst = THREE.OneFactor; fadeMaterial.blendEquation = THREE.ReverseSubtractEquation; const fadePlane = new THREE.Mesh(fadeGeometry, fadeMaterial); scene.add(fadePlane); this.fadePlane = fadePlane;
0
8
0
563 564 565 566 567 568 569 570 571
texture.minFilter = THREE.NearestFilter // map texture to material, keep transparency and fix transparent z-fighting var mat = new THREE.MeshLambertMaterial({map: texture, transparent: true, alphaTest: 0.5}) mat.blending = THREE.CustomBlending mat.blendSrc = THREE.OneFactor mat.blendDst = THREE.OneMinusSrcAlphaFactor materials.push(mat)
0
2
0
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
materialParams.blendSrc = WEBGL_BLEND_FUNCS[blendFuncSeparate[0]]; materialParams.blendDst = WEBGL_BLEND_FUNCS[blendFuncSeparate[1]]; materialParams.blendSrcAlpha = WEBGL_BLEND_FUNCS[blendFuncSeparate[2]]; materialParams.blendDstAlpha = WEBGL_BLEND_FUNCS[blendFuncSeparate[3]]; } else { materialParams.blendSrc = THREE.OneFactor; materialParams.blendDst = THREE.ZeroFactor; materialParams.blendSrcAlpha = THREE.OneFactor; materialParams.blendDstAlpha = THREE.ZeroFactor; }
0
1
0
+ 19 other calls in file
three.Vector3 is the most popular function in three (22341 examples)