|
@@ -5990,9 +5990,16 @@ THREE.Projector = function() {
|
|
_vector3 = new THREE.Vector3(),
|
|
_vector3 = new THREE.Vector3(),
|
|
_vector4 = new THREE.Vector4(),
|
|
_vector4 = new THREE.Vector4(),
|
|
|
|
|
|
|
|
+ _viewMatrix = new THREE.Matrix4(),
|
|
_viewProjectionMatrix = new THREE.Matrix4(),
|
|
_viewProjectionMatrix = new THREE.Matrix4(),
|
|
|
|
+
|
|
|
|
+ _modelMatrix,
|
|
_modelViewProjectionMatrix = new THREE.Matrix4(),
|
|
_modelViewProjectionMatrix = new THREE.Matrix4(),
|
|
|
|
+
|
|
_normalMatrix = new THREE.Matrix3(),
|
|
_normalMatrix = new THREE.Matrix3(),
|
|
|
|
+ _normalViewMatrix = new THREE.Matrix3(),
|
|
|
|
+
|
|
|
|
+ _centroid = new THREE.Vector3(),
|
|
|
|
|
|
_frustum = new THREE.Frustum(),
|
|
_frustum = new THREE.Frustum(),
|
|
|
|
|
|
@@ -6141,10 +6148,10 @@ THREE.Projector = function() {
|
|
this.projectScene = function ( scene, camera, sortObjects, sortElements ) {
|
|
this.projectScene = function ( scene, camera, sortObjects, sortElements ) {
|
|
|
|
|
|
var near = camera.near, far = camera.far, visible = false,
|
|
var near = camera.near, far = camera.far, visible = false,
|
|
- o, ol, v, vl, f, fl, n, nl, c, cl, u, ul, object, modelMatrix,
|
|
|
|
|
|
+ o, ol, v, vl, f, fl, n, nl, c, cl, u, ul, object,
|
|
geometry, vertices, vertex, vertexPositionScreen,
|
|
geometry, vertices, vertex, vertexPositionScreen,
|
|
- faces, face, faceVertexNormals, normal, faceVertexUvs, uvs,
|
|
|
|
- v1, v2, v3, v4, isFaceMaterial, objectMaterials, material, side;
|
|
|
|
|
|
+ faces, face, faceVertexNormals, faceVertexUvs, uvs,
|
|
|
|
+ v1, v2, v3, v4, isFaceMaterial, objectMaterials;
|
|
|
|
|
|
_face3Count = 0;
|
|
_face3Count = 0;
|
|
_face4Count = 0;
|
|
_face4Count = 0;
|
|
@@ -6157,9 +6164,11 @@ THREE.Projector = function() {
|
|
|
|
|
|
if ( camera.parent === undefined ) camera.updateMatrixWorld();
|
|
if ( camera.parent === undefined ) camera.updateMatrixWorld();
|
|
|
|
|
|
- camera.matrixWorldInverse.getInverse( camera.matrixWorld );
|
|
|
|
|
|
+ _viewMatrix.getInverse( camera.matrixWorld );
|
|
|
|
+ _viewProjectionMatrix.multiply( camera.projectionMatrix, _viewMatrix );
|
|
|
|
|
|
- _viewProjectionMatrix.multiply( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
|
|
|
|
+ _normalViewMatrix.getInverse( _viewMatrix );
|
|
|
|
+ _normalViewMatrix.transpose();
|
|
|
|
|
|
_frustum.setFromMatrix( _viewProjectionMatrix );
|
|
_frustum.setFromMatrix( _viewProjectionMatrix );
|
|
|
|
|
|
@@ -6169,7 +6178,7 @@ THREE.Projector = function() {
|
|
|
|
|
|
object = _renderData.objects[ o ].object;
|
|
object = _renderData.objects[ o ].object;
|
|
|
|
|
|
- modelMatrix = object.matrixWorld;
|
|
|
|
|
|
+ _modelMatrix = object.matrixWorld;
|
|
|
|
|
|
_vertexCount = 0;
|
|
_vertexCount = 0;
|
|
|
|
|
|
@@ -6181,20 +6190,18 @@ THREE.Projector = function() {
|
|
faces = geometry.faces;
|
|
faces = geometry.faces;
|
|
faceVertexUvs = geometry.faceVertexUvs;
|
|
faceVertexUvs = geometry.faceVertexUvs;
|
|
|
|
|
|
- _normalMatrix.getInverse( modelMatrix );
|
|
|
|
|
|
+ _normalMatrix.getInverse( _modelMatrix );
|
|
_normalMatrix.transpose();
|
|
_normalMatrix.transpose();
|
|
|
|
|
|
isFaceMaterial = object.material instanceof THREE.MeshFaceMaterial;
|
|
isFaceMaterial = object.material instanceof THREE.MeshFaceMaterial;
|
|
objectMaterials = isFaceMaterial === true ? object.material : null;
|
|
objectMaterials = isFaceMaterial === true ? object.material : null;
|
|
|
|
|
|
- side = object.material.side;
|
|
|
|
-
|
|
|
|
for ( v = 0, vl = vertices.length; v < vl; v ++ ) {
|
|
for ( v = 0, vl = vertices.length; v < vl; v ++ ) {
|
|
|
|
|
|
_vertex = getNextVertexInPool();
|
|
_vertex = getNextVertexInPool();
|
|
_vertex.positionWorld.copy( vertices[ v ] );
|
|
_vertex.positionWorld.copy( vertices[ v ] );
|
|
|
|
|
|
- modelMatrix.multiplyVector3( _vertex.positionWorld );
|
|
|
|
|
|
+ _modelMatrix.multiplyVector3( _vertex.positionWorld );
|
|
|
|
|
|
_vertex.positionScreen.copy( _vertex.positionWorld );
|
|
_vertex.positionScreen.copy( _vertex.positionWorld );
|
|
_viewProjectionMatrix.multiplyVector4( _vertex.positionScreen );
|
|
_viewProjectionMatrix.multiplyVector4( _vertex.positionScreen );
|
|
@@ -6210,11 +6217,13 @@ THREE.Projector = function() {
|
|
|
|
|
|
face = faces[ f ];
|
|
face = faces[ f ];
|
|
|
|
|
|
- material = isFaceMaterial === true ? objectMaterials.materials[ face.materialIndex ] : object.material;
|
|
|
|
|
|
+ var material = isFaceMaterial === true
|
|
|
|
+ ? objectMaterials.materials[ face.materialIndex ]
|
|
|
|
+ : object.material;
|
|
|
|
|
|
if ( material === undefined ) continue;
|
|
if ( material === undefined ) continue;
|
|
|
|
|
|
- side = material.side;
|
|
|
|
|
|
+ var side = material.side;
|
|
|
|
|
|
if ( face instanceof THREE.Face3 ) {
|
|
if ( face instanceof THREE.Face3 ) {
|
|
|
|
|
|
@@ -6285,27 +6294,42 @@ THREE.Projector = function() {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- _face.normalWorld.copy( face.normal );
|
|
|
|
|
|
+ _face.normalModel.copy( face.normal );
|
|
|
|
|
|
- if ( visible === false && ( side === THREE.BackSide || side === THREE.DoubleSide ) ) _face.normalWorld.negate();
|
|
|
|
- _normalMatrix.multiplyVector3( _face.normalWorld ).normalize();
|
|
|
|
|
|
+ if ( visible === false && ( side === THREE.BackSide || side === THREE.DoubleSide ) ) {
|
|
|
|
|
|
- _face.centroidWorld.copy( face.centroid );
|
|
|
|
- modelMatrix.multiplyVector3( _face.centroidWorld );
|
|
|
|
|
|
+ _face.normalModel.negate();
|
|
|
|
|
|
- _face.centroidScreen.copy( _face.centroidWorld );
|
|
|
|
- _viewProjectionMatrix.multiplyVector3( _face.centroidScreen );
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ _normalMatrix.multiplyVector3( _face.normalModel );
|
|
|
|
+ _face.normalModel.normalize();
|
|
|
|
+
|
|
|
|
+ _face.normalModelView.copy( _face.normalModel );
|
|
|
|
+ _normalViewMatrix.multiplyVector3( _face.normalModelView );
|
|
|
|
+
|
|
|
|
+ _face.centroidModel.copy( face.centroid );
|
|
|
|
+ _modelMatrix.multiplyVector3( _face.centroidModel );
|
|
|
|
|
|
faceVertexNormals = face.vertexNormals;
|
|
faceVertexNormals = face.vertexNormals;
|
|
|
|
|
|
for ( n = 0, nl = faceVertexNormals.length; n < nl; n ++ ) {
|
|
for ( n = 0, nl = faceVertexNormals.length; n < nl; n ++ ) {
|
|
|
|
|
|
- normal = _face.vertexNormalsWorld[ n ];
|
|
|
|
- normal.copy( faceVertexNormals[ n ] );
|
|
|
|
|
|
+ var normalModel = _face.vertexNormalsModel[ n ];
|
|
|
|
+ normalModel.copy( faceVertexNormals[ n ] );
|
|
|
|
+
|
|
|
|
+ if ( visible === false && ( side === THREE.BackSide || side === THREE.DoubleSide ) ) {
|
|
|
|
+
|
|
|
|
+ normalModel.negate();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
- if ( visible === false && ( side === THREE.BackSide || side === THREE.DoubleSide ) ) normal.negate();
|
|
|
|
|
|
+ _normalMatrix.multiplyVector3( normalModel )
|
|
|
|
+ normalModel.normalize();
|
|
|
|
|
|
- _normalMatrix.multiplyVector3( normal ).normalize();
|
|
|
|
|
|
+ var normalModelView = _face.vertexNormalsModelView[ n ];
|
|
|
|
+ normalModelView.copy( normalModel );
|
|
|
|
+ _normalViewMatrix.multiplyVector3( normalModelView )
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -6328,7 +6352,10 @@ THREE.Projector = function() {
|
|
_face.color = face.color;
|
|
_face.color = face.color;
|
|
_face.material = material;
|
|
_face.material = material;
|
|
|
|
|
|
- _face.z = _face.centroidScreen.z;
|
|
|
|
|
|
+ _centroid.copy( _face.centroidModel )
|
|
|
|
+ _viewProjectionMatrix.multiplyVector3( _centroid );
|
|
|
|
+
|
|
|
|
+ _face.z = _centroid.z;
|
|
|
|
|
|
_renderData.elements.push( _face );
|
|
_renderData.elements.push( _face );
|
|
|
|
|
|
@@ -6336,12 +6363,13 @@ THREE.Projector = function() {
|
|
|
|
|
|
} else if ( object instanceof THREE.Line ) {
|
|
} else if ( object instanceof THREE.Line ) {
|
|
|
|
|
|
- _modelViewProjectionMatrix.multiply( _viewProjectionMatrix, modelMatrix );
|
|
|
|
|
|
+ _modelViewProjectionMatrix.multiply( _viewProjectionMatrix, _modelMatrix );
|
|
|
|
|
|
vertices = object.geometry.vertices;
|
|
vertices = object.geometry.vertices;
|
|
|
|
|
|
v1 = getNextVertexInPool();
|
|
v1 = getNextVertexInPool();
|
|
v1.positionScreen.copy( vertices[ 0 ] );
|
|
v1.positionScreen.copy( vertices[ 0 ] );
|
|
|
|
+
|
|
_modelViewProjectionMatrix.multiplyVector4( v1.positionScreen );
|
|
_modelViewProjectionMatrix.multiplyVector4( v1.positionScreen );
|
|
|
|
|
|
// Handle LineStrip and LinePieces
|
|
// Handle LineStrip and LinePieces
|
|
@@ -6351,6 +6379,7 @@ THREE.Projector = function() {
|
|
|
|
|
|
v1 = getNextVertexInPool();
|
|
v1 = getNextVertexInPool();
|
|
v1.positionScreen.copy( vertices[ v ] );
|
|
v1.positionScreen.copy( vertices[ v ] );
|
|
|
|
+
|
|
_modelViewProjectionMatrix.multiplyVector4( v1.positionScreen );
|
|
_modelViewProjectionMatrix.multiplyVector4( v1.positionScreen );
|
|
|
|
|
|
if ( ( v + 1 ) % step > 0 ) continue;
|
|
if ( ( v + 1 ) % step > 0 ) continue;
|
|
@@ -6388,11 +6417,11 @@ THREE.Projector = function() {
|
|
|
|
|
|
object = _renderData.sprites[ o ].object;
|
|
object = _renderData.sprites[ o ].object;
|
|
|
|
|
|
- modelMatrix = object.matrixWorld;
|
|
|
|
|
|
+ _modelMatrix = object.matrixWorld;
|
|
|
|
|
|
if ( object instanceof THREE.Particle ) {
|
|
if ( object instanceof THREE.Particle ) {
|
|
|
|
|
|
- _vector4.set( modelMatrix.elements[12], modelMatrix.elements[13], modelMatrix.elements[14], 1 );
|
|
|
|
|
|
+ _vector4.set( _modelMatrix.elements[12], _modelMatrix.elements[13], _modelMatrix.elements[14], 1 );
|
|
_viewProjectionMatrix.multiplyVector4( _vector4 );
|
|
_viewProjectionMatrix.multiplyVector4( _vector4 );
|
|
|
|
|
|
_vector4.z /= _vector4.w;
|
|
_vector4.z /= _vector4.w;
|
|
@@ -14062,9 +14091,9 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
_color1.g = _color2.g = _color3.g = _ambientLight.g;
|
|
_color1.g = _color2.g = _color3.g = _ambientLight.g;
|
|
_color1.b = _color2.b = _color3.b = _ambientLight.b;
|
|
_color1.b = _color2.b = _color3.b = _ambientLight.b;
|
|
|
|
|
|
- calculateLight( element.v1.positionWorld, element.vertexNormalsWorld[ 0 ], _color1 );
|
|
|
|
- calculateLight( element.v2.positionWorld, element.vertexNormalsWorld[ 1 ], _color2 );
|
|
|
|
- calculateLight( element.v3.positionWorld, element.vertexNormalsWorld[ 2 ], _color3 );
|
|
|
|
|
|
+ calculateLight( element.v1.positionWorld, element.vertexNormalsModel[ 0 ], _color1 );
|
|
|
|
+ calculateLight( element.v2.positionWorld, element.vertexNormalsModel[ 1 ], _color2 );
|
|
|
|
+ calculateLight( element.v3.positionWorld, element.vertexNormalsModel[ 2 ], _color3 );
|
|
|
|
|
|
_color1.r = _color1.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color1.r = _color1.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color1.g = _color1.g * _diffuseColor.g + _emissiveColor.g;
|
|
_color1.g = _color1.g * _diffuseColor.g + _emissiveColor.g;
|
|
@@ -14092,7 +14121,7 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
_color.g = _ambientLight.g;
|
|
_color.g = _ambientLight.g;
|
|
_color.b = _ambientLight.b;
|
|
_color.b = _ambientLight.b;
|
|
|
|
|
|
- calculateLight( element.centroidWorld, element.normalWorld, _color );
|
|
|
|
|
|
+ calculateLight( element.centroidModel, element.normalModel, _color );
|
|
|
|
|
|
_color.r = _color.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color.r = _color.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color.g = _color.g * _diffuseColor.g + _emissiveColor.g;
|
|
_color.g = _color.g * _diffuseColor.g + _emissiveColor.g;
|
|
@@ -14128,19 +14157,17 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
|
|
|
if ( material.envMap.mapping instanceof THREE.SphericalReflectionMapping ) {
|
|
if ( material.envMap.mapping instanceof THREE.SphericalReflectionMapping ) {
|
|
|
|
|
|
- var cameraMatrix = camera.matrixWorldInverse;
|
|
|
|
|
|
+ _vector3.copy( element.vertexNormalsModelView[ uv1 ] );
|
|
|
|
+ _uv1x = 0.5 * _vector3.x + 0.5;
|
|
|
|
+ _uv1y = 0.5 * _vector3.y + 0.5;
|
|
|
|
|
|
- _vector3.copy( element.vertexNormalsWorld[ uv1 ] );
|
|
|
|
- _uv1x = ( _vector3.x * cameraMatrix.elements[0] + _vector3.y * cameraMatrix.elements[4] + _vector3.z * cameraMatrix.elements[8] ) * 0.5 + 0.5;
|
|
|
|
- _uv1y = ( _vector3.x * cameraMatrix.elements[1] + _vector3.y * cameraMatrix.elements[5] + _vector3.z * cameraMatrix.elements[9] ) * 0.5 + 0.5;
|
|
|
|
|
|
+ _vector3.copy( element.vertexNormalsModelView[ uv2 ] );
|
|
|
|
+ _uv2x = 0.5 * _vector3.x + 0.5;
|
|
|
|
+ _uv2y = 0.5 * _vector3.y + 0.5;
|
|
|
|
|
|
- _vector3.copy( element.vertexNormalsWorld[ uv2 ] );
|
|
|
|
- _uv2x = ( _vector3.x * cameraMatrix.elements[0] + _vector3.y * cameraMatrix.elements[4] + _vector3.z * cameraMatrix.elements[8] ) * 0.5 + 0.5;
|
|
|
|
- _uv2y = ( _vector3.x * cameraMatrix.elements[1] + _vector3.y * cameraMatrix.elements[5] + _vector3.z * cameraMatrix.elements[9] ) * 0.5 + 0.5;
|
|
|
|
-
|
|
|
|
- _vector3.copy( element.vertexNormalsWorld[ uv3 ] );
|
|
|
|
- _uv3x = ( _vector3.x * cameraMatrix.elements[0] + _vector3.y * cameraMatrix.elements[4] + _vector3.z * cameraMatrix.elements[8] ) * 0.5 + 0.5;
|
|
|
|
- _uv3y = ( _vector3.x * cameraMatrix.elements[1] + _vector3.y * cameraMatrix.elements[5] + _vector3.z * cameraMatrix.elements[9] ) * 0.5 + 0.5;
|
|
|
|
|
|
+ _vector3.copy( element.vertexNormalsModelView[ uv3 ] );
|
|
|
|
+ _uv3x = 0.5 * _vector3.x + 0.5;
|
|
|
|
+ _uv3y = 0.5 * _vector3.y + 0.5;
|
|
|
|
|
|
patternPath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y, material.envMap );
|
|
patternPath( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _uv1x, _uv1y, _uv2x, _uv2y, _uv3x, _uv3y, material.envMap );
|
|
|
|
|
|
@@ -14188,9 +14215,9 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
|
|
|
} else if ( material instanceof THREE.MeshNormalMaterial ) {
|
|
} else if ( material instanceof THREE.MeshNormalMaterial ) {
|
|
|
|
|
|
- _color.r = normalToComponent( element.normalWorld.x );
|
|
|
|
- _color.g = normalToComponent( element.normalWorld.y );
|
|
|
|
- _color.b = normalToComponent( element.normalWorld.z );
|
|
|
|
|
|
+ _color.r = 0.5 * element.normalModelView.x + 0.5;
|
|
|
|
+ _color.g = 0.5 * element.normalModelView.y + 0.5;
|
|
|
|
+ _color.b = 0.5 * element.normalModelView.z + 0.5;
|
|
|
|
|
|
material.wireframe === true
|
|
material.wireframe === true
|
|
? strokePath( _color, material.wireframeLinewidth, material.wireframeLinecap, material.wireframeLinejoin )
|
|
? strokePath( _color, material.wireframeLinewidth, material.wireframeLinecap, material.wireframeLinejoin )
|
|
@@ -14247,10 +14274,10 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
_color1.g = _color2.g = _color3.g = _color4.g = _ambientLight.g;
|
|
_color1.g = _color2.g = _color3.g = _color4.g = _ambientLight.g;
|
|
_color1.b = _color2.b = _color3.b = _color4.b = _ambientLight.b;
|
|
_color1.b = _color2.b = _color3.b = _color4.b = _ambientLight.b;
|
|
|
|
|
|
- calculateLight( element.v1.positionWorld, element.vertexNormalsWorld[ 0 ], _color1 );
|
|
|
|
- calculateLight( element.v2.positionWorld, element.vertexNormalsWorld[ 1 ], _color2 );
|
|
|
|
- calculateLight( element.v4.positionWorld, element.vertexNormalsWorld[ 3 ], _color3 );
|
|
|
|
- calculateLight( element.v3.positionWorld, element.vertexNormalsWorld[ 2 ], _color4 );
|
|
|
|
|
|
+ calculateLight( element.v1.positionWorld, element.vertexNormalsModel[ 0 ], _color1 );
|
|
|
|
+ calculateLight( element.v2.positionWorld, element.vertexNormalsModel[ 1 ], _color2 );
|
|
|
|
+ calculateLight( element.v4.positionWorld, element.vertexNormalsModel[ 3 ], _color3 );
|
|
|
|
+ calculateLight( element.v3.positionWorld, element.vertexNormalsModel[ 2 ], _color4 );
|
|
|
|
|
|
_color1.r = _color1.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color1.r = _color1.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color1.g = _color1.g * _diffuseColor.g + _emissiveColor.g;
|
|
_color1.g = _color1.g * _diffuseColor.g + _emissiveColor.g;
|
|
@@ -14284,7 +14311,7 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
_color.g = _ambientLight.g;
|
|
_color.g = _ambientLight.g;
|
|
_color.b = _ambientLight.b;
|
|
_color.b = _ambientLight.b;
|
|
|
|
|
|
- calculateLight( element.centroidWorld, element.normalWorld, _color );
|
|
|
|
|
|
+ calculateLight( element.centroidModel, element.normalModel, _color );
|
|
|
|
|
|
_color.r = _color.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color.r = _color.r * _diffuseColor.r + _emissiveColor.r;
|
|
_color.g = _color.g * _diffuseColor.g + _emissiveColor.g;
|
|
_color.g = _color.g * _diffuseColor.g + _emissiveColor.g;
|
|
@@ -14332,9 +14359,9 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
|
|
|
} else if ( material instanceof THREE.MeshNormalMaterial ) {
|
|
} else if ( material instanceof THREE.MeshNormalMaterial ) {
|
|
|
|
|
|
- _color.r = normalToComponent( element.normalWorld.x );
|
|
|
|
- _color.g = normalToComponent( element.normalWorld.y );
|
|
|
|
- _color.b = normalToComponent( element.normalWorld.z );
|
|
|
|
|
|
+ _color.r = 0.5 * element.normalModelView.x + 0.5;
|
|
|
|
+ _color.g = 0.5 * element.normalModelView.y + 0.5;
|
|
|
|
+ _color.b = 0.5 * element.normalModelView.z + 0.5;
|
|
|
|
|
|
drawQuad( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _v4x, _v4y );
|
|
drawQuad( _v1x, _v1y, _v2x, _v2y, _v3x, _v3y, _v4x, _v4y );
|
|
|
|
|
|
@@ -14575,13 +14602,6 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- function normalToComponent( normal ) {
|
|
|
|
-
|
|
|
|
- var component = ( normal + 1 ) * 0.5;
|
|
|
|
- return component < 0 ? 0 : ( component > 1 ? 1 : component );
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Hide anti-alias gaps
|
|
// Hide anti-alias gaps
|
|
|
|
|
|
function expand( v1, v2 ) {
|
|
function expand( v1, v2 ) {
|
|
@@ -24754,7 +24774,7 @@ THREE.RenderableVertex.prototype.copy = function ( vertex ) {
|
|
this.positionWorld.copy( vertex.positionWorld );
|
|
this.positionWorld.copy( vertex.positionWorld );
|
|
this.positionScreen.copy( vertex.positionScreen );
|
|
this.positionScreen.copy( vertex.positionScreen );
|
|
|
|
|
|
-}
|
|
|
|
|
|
+};
|
|
/**
|
|
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author mrdoob / http://mrdoob.com/
|
|
*/
|
|
*/
|
|
@@ -24765,12 +24785,14 @@ THREE.RenderableFace3 = function () {
|
|
this.v2 = new THREE.RenderableVertex();
|
|
this.v2 = new THREE.RenderableVertex();
|
|
this.v3 = new THREE.RenderableVertex();
|
|
this.v3 = new THREE.RenderableVertex();
|
|
|
|
|
|
- this.centroidWorld = new THREE.Vector3();
|
|
|
|
- this.centroidScreen = new THREE.Vector3();
|
|
|
|
|
|
+ this.centroidModel = new THREE.Vector3();
|
|
|
|
+
|
|
|
|
+ this.normalModel = new THREE.Vector3();
|
|
|
|
+ this.normalModelView = new THREE.Vector3();
|
|
|
|
|
|
- this.normalWorld = new THREE.Vector3();
|
|
|
|
- this.vertexNormalsWorld = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
this.vertexNormalsLength = 0;
|
|
this.vertexNormalsLength = 0;
|
|
|
|
+ this.vertexNormalsModel = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
+ this.vertexNormalsModelView = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
|
|
this.color = null;
|
|
this.color = null;
|
|
this.material = null;
|
|
this.material = null;
|
|
@@ -24790,12 +24812,14 @@ THREE.RenderableFace4 = function () {
|
|
this.v3 = new THREE.RenderableVertex();
|
|
this.v3 = new THREE.RenderableVertex();
|
|
this.v4 = new THREE.RenderableVertex();
|
|
this.v4 = new THREE.RenderableVertex();
|
|
|
|
|
|
- this.centroidWorld = new THREE.Vector3();
|
|
|
|
- this.centroidScreen = new THREE.Vector3();
|
|
|
|
|
|
+ this.centroidModel = new THREE.Vector3();
|
|
|
|
+
|
|
|
|
+ this.normalModel = new THREE.Vector3();
|
|
|
|
+ this.normalModelView = new THREE.Vector3();
|
|
|
|
|
|
- this.normalWorld = new THREE.Vector3();
|
|
|
|
- this.vertexNormalsWorld = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
this.vertexNormalsLength = 0;
|
|
this.vertexNormalsLength = 0;
|
|
|
|
+ this.vertexNormalsModel = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
+ this.vertexNormalsModelView = [ new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3() ];
|
|
|
|
|
|
this.color = null;
|
|
this.color = null;
|
|
this.material = null;
|
|
this.material = null;
|