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

WebGLObjects: Robustness.

上级 58ca27e0
......@@ -178,25 +178,37 @@ THREE.WebGLObjects = function ( gl, info ) {
var bufferGeometry = geometries[ geometry.id ];
if ( geometry.verticesNeedUpdate === true ) {
if ( object instanceof THREE.PointCloud || object instanceof THREE.Line ) {
var attribute = bufferGeometry.attributes.position;
if ( geometry.verticesNeedUpdate === true ) {
attribute.copyVector3sArray( geometry.vertices );
attribute.needsUpdate = true;
var attribute = bufferGeometry.attributes.position;
geometry.verticesNeedUpdate = false;
if ( attribute !== undefined ) {
}
attribute.copyVector3sArray( geometry.vertices );
attribute.needsUpdate = true;
}
geometry.verticesNeedUpdate = false;
}
if ( geometry.colorsNeedUpdate === true ) {
if ( geometry.colorsNeedUpdate === true ) {
var attribute = bufferGeometry.attributes.color;
var attribute = bufferGeometry.attributes.color;
attribute.copyColorsArray( geometry.colors );
attribute.needsUpdate = true;
if ( attribute !== undefined ) {
geometry.colorsNeedUpdate = false;
attribute.copyColorsArray( geometry.colors );
attribute.needsUpdate = true;
}
geometry.colorsNeedUpdate = false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册