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

WebGLObjects: Don't updateFromMaterial when using BufferGeometry.

上级 78dcfff7
...@@ -9,9 +9,6 @@ THREE.WebGLObjects = function ( gl, info ) { ...@@ -9,9 +9,6 @@ THREE.WebGLObjects = function ( gl, info ) {
var geometries = new THREE.WebGLGeometries( gl, info ); var geometries = new THREE.WebGLGeometries( gl, info );
var geometryGroups = {};
var geometryGroupCounter = 0;
// //
function onObjectRemoved( event ) { function onObjectRemoved( event ) {
...@@ -118,10 +115,13 @@ THREE.WebGLObjects = function ( gl, info ) { ...@@ -118,10 +115,13 @@ THREE.WebGLObjects = function ( gl, info ) {
if ( object.geometry instanceof THREE.DynamicGeometry ) { if ( object.geometry instanceof THREE.DynamicGeometry ) {
geometry.updateFromObject( object ); geometry.updateFromObject( object );
geometry.updateFromMaterial( object.material );
} } else if ( object.geometry instanceof THREE.Geometry ) {
geometry.updateFromMaterial( object.material ); geometry.updateFromMaterial( object.material );
}
// //
...@@ -199,7 +199,9 @@ THREE.WebGLObjects = function ( gl, info ) { ...@@ -199,7 +199,9 @@ THREE.WebGLObjects = function ( gl, info ) {
update( object ); update( object );
} }
} }
}
};
}; };
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册