( v1, v2, v3, v4, v5, v6, element, material )
| 14156 | } |
| 14157 | |
| 14158 | function renderFace4( v1, v2, v3, v4, v5, v6, element, material ) { |
| 14159 | |
| 14160 | _this.info.render.vertices += 4; |
| 14161 | _this.info.render.faces ++; |
| 14162 | |
| 14163 | setOpacity( material.opacity ); |
| 14164 | setBlending( material.blending ); |
| 14165 | |
| 14166 | if ( ( material.map !== undefined && material.map !== null ) || ( material.envMap !== undefined && material.envMap !== null ) ) { |
| 14167 | |
| 14168 | // Let renderFace3() handle this |
| 14169 | |
| 14170 | renderFace3( v1, v2, v4, 0, 1, 3, element, material ); |
| 14171 | renderFace3( v5, v3, v6, 1, 2, 3, element, material ); |
| 14172 | |
| 14173 | return; |
| 14174 | |
| 14175 | } |
| 14176 | |
| 14177 | _v1x = v1.positionScreen.x; _v1y = v1.positionScreen.y; |
| 14178 | _v2x = v2.positionScreen.x; _v2y = v2.positionScreen.y; |
| 14179 | _v3x = v3.positionScreen.x; _v3y = v3.positionScreen.y; |
| 14180 | _v4x = v4.positionScreen.x; _v4y = v4.positionScreen.y; |
| 14181 | _v5x = v5.positionScreen.x; _v5y = v5.positionScreen.y; |
| 14182 | _v6x = v6.positionScreen.x; _v6y = v6.positionScreen.y; |
| 14183 | |
| 14184 | if ( material instanceof THREE.MeshLambertMaterial || material instanceof THREE.MeshPhongMaterial ) { |
| 14185 | |
| 14186 | _diffuseColor.copy( material.color ); |
| 14187 | _emissiveColor.copy( material.emissive ); |
| 14188 | |
| 14189 | if ( material.vertexColors === THREE.FaceColors ) { |
| 14190 | |
| 14191 | _diffuseColor.multiply( element.color ); |
| 14192 | |
| 14193 | } |
| 14194 | |
| 14195 | if ( _enableLighting === true ) { |
| 14196 | |
| 14197 | if ( material.wireframe === false && material.shading == THREE.SmoothShading && element.vertexNormalsLength == 4 ) { |
| 14198 | |
| 14199 | _color1.copy( _ambientLight ); |
| 14200 | _color2.copy( _ambientLight ); |
| 14201 | _color3.copy( _ambientLight ); |
| 14202 | _color4.copy( _ambientLight ); |
| 14203 | |
| 14204 | calculateLight( element.v1.positionWorld, element.vertexNormalsModel[ 0 ], _color1 ); |
| 14205 | calculateLight( element.v2.positionWorld, element.vertexNormalsModel[ 1 ], _color2 ); |
| 14206 | calculateLight( element.v4.positionWorld, element.vertexNormalsModel[ 3 ], _color3 ); |
| 14207 | calculateLight( element.v3.positionWorld, element.vertexNormalsModel[ 2 ], _color4 ); |
| 14208 | |
| 14209 | _color1.multiply( _diffuseColor ).add( _emissiveColor ); |
| 14210 | _color2.multiply( _diffuseColor ).add( _emissiveColor ); |
| 14211 | _color3.multiply( _diffuseColor ).add( _emissiveColor ); |
| 14212 | _color4.multiply( _diffuseColor ).add( _emissiveColor ); |
| 14213 | |
| 14214 | _image = getGradientTexture( _color1, _color2, _color3, _color4 ); |
| 14215 |
no test coverage detected