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

Updated builds.

上级 911e0fb7
......@@ -14203,23 +14203,27 @@
normalizeNormals: function () {
var normals = this.attributes.normal;
var vector = new Vector3();
var x, y, z, n;
return function normalizeNormals() {
var normals = this.attributes.normal;
for ( var i = 0, il = normals.count; i < il; i ++ ) {
x = normals.getX( i );
y = normals.getY( i );
z = normals.getZ( i );
vector.x = normals.getX( i );
vector.y = normals.getY( i );
vector.z = normals.getZ( i );
n = 1.0 / Math.sqrt( x * x + y * y + z * z );
vector.normalize();
normals.setXYZ( i, x * n, y * n, z * n );
normals.setXYZ( i, vector.x, vector.y, vector.z );
}
},
};
}(),
toNonIndexed: function () {
......@@ -21701,11 +21705,11 @@
function renderObject( object, scene, camera, geometry, material, group ) {
object.onBeforeRender( _this, scene, camera, geometry, material, group );
object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
object.onBeforeRender( _this, scene, camera, geometry, material, group );
if ( object.isImmediateRenderObject ) {
state.setMaterial( material );
......@@ -41948,7 +41952,7 @@
geometry2.addAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
geometry2.computeBoundingSphere();
this.add( new THREE.Mesh( geometry2, new LineBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
//
......@@ -41969,6 +41973,8 @@
this.lookAt( this.plane.normal );
this.updateMatrixWorld( true );
};
/**
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -14197,23 +14197,27 @@ Object.assign( BufferGeometry.prototype, EventDispatcher.prototype, {
normalizeNormals: function () {
var normals = this.attributes.normal;
var vector = new Vector3();
var x, y, z, n;
return function normalizeNormals() {
var normals = this.attributes.normal;
for ( var i = 0, il = normals.count; i < il; i ++ ) {
x = normals.getX( i );
y = normals.getY( i );
z = normals.getZ( i );
vector.x = normals.getX( i );
vector.y = normals.getY( i );
vector.z = normals.getZ( i );
n = 1.0 / Math.sqrt( x * x + y * y + z * z );
vector.normalize();
normals.setXYZ( i, x * n, y * n, z * n );
normals.setXYZ( i, vector.x, vector.y, vector.z );
}
},
};
}(),
toNonIndexed: function () {
......@@ -21695,11 +21699,11 @@ function WebGLRenderer( parameters ) {
function renderObject( object, scene, camera, geometry, material, group ) {
object.onBeforeRender( _this, scene, camera, geometry, material, group );
object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
object.normalMatrix.getNormalMatrix( object.modelViewMatrix );
object.onBeforeRender( _this, scene, camera, geometry, material, group );
if ( object.isImmediateRenderObject ) {
state.setMaterial( material );
......@@ -41942,7 +41946,7 @@ function PlaneHelper( plane, size, hex ) {
geometry2.addAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
geometry2.computeBoundingSphere();
this.add( new THREE.Mesh( geometry2, new LineBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false } ) ) );
//
......@@ -41963,6 +41967,8 @@ PlaneHelper.prototype.onBeforeRender = function () {
this.lookAt( this.plane.normal );
this.updateMatrixWorld( true );
};
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册