提交 abfd5aea 编写于 作者: M Mr.doob

Updated builds.

上级 22163e46
......@@ -17131,7 +17131,6 @@ THREE.ShaderLib = {
"uniform vec3 diffuse;",
"uniform vec3 emissive;",
"uniform float opacity;",
"varying vec3 vLightFront;",
......@@ -17251,7 +17250,7 @@ THREE.ShaderLib = {
THREE.ShaderChunk[ "skinnormal_vertex" ],
THREE.ShaderChunk[ "defaultnormal_vertex" ],
"#ifndef FLAT_SHADED",
"#ifndef FLAT_SHADED", // Normal computed with derivatives when FLAT_SHADED
" vNormal = normalize( transformedNormal );",
......@@ -17278,11 +17277,10 @@ THREE.ShaderLib = {
"#define PHONG",
"uniform vec3 diffuse;",
"uniform float opacity;",
"uniform vec3 emissive;",
"uniform vec3 specular;",
"uniform float shininess;",
"uniform float opacity;",
THREE.ShaderChunk[ "common" ],
THREE.ShaderChunk[ "color_pars_fragment" ],
......@@ -17473,6 +17471,9 @@ THREE.ShaderLib = {
THREE.ShaderChunk[ "logdepthbuf_fragment" ],
THREE.ShaderChunk[ "color_fragment" ],
" outgoingLight = diffuseColor.rgb;", // simple shader
THREE.ShaderChunk[ "fog_fragment" ],
" gl_FragColor = vec4( outgoingLight, diffuseColor.a );", // TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
......@@ -33816,11 +33817,20 @@ THREE.DirectionalLightHelper.prototype.update = function () {
/**
* @author WestLangley / http://github.com/WestLangley
* @param object THREE.Mesh whose geometry will be used
* @param hex line color
* @param thresholdAngle the minimim angle (in degrees),
* between the face normals of adjacent faces,
* that is required to render an edge. A value of 10 means
* an edge is only rendered if the angle is at least 10 degrees.
*/
THREE.EdgesHelper = function ( object, hex ) {
THREE.EdgesHelper = function ( object, hex, thresholdAngle ) {
var color = ( hex !== undefined ) ? hex : 0xffffff;
thresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 1;
var thresholdDot = Math.cos( THREE.Math.degToRad( thresholdAngle ) );
var edge = [ 0, 0 ], hash = {};
var sortFunction = function ( a, b ) { return a - b };
......@@ -33883,7 +33893,7 @@ THREE.EdgesHelper = function ( object, hex ) {
var h = hash[ key ];
if ( h.face2 === undefined || faces[ h.face1 ].normal.dot( faces[ h.face2 ].normal ) < 0.9999 ) { // hardwired const OK
if ( h.face2 === undefined || faces[ h.face1 ].normal.dot( faces[ h.face2 ].normal ) <= thresholdDot ) {
var vertex = vertices[ h.vert1 ];
coords[ index ++ ] = vertex.x;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册