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

BufferGeometryUtils: Return BufferGeometry if it is already the type.

上级 d4319710
...@@ -7,6 +7,12 @@ THREE.BufferGeometryUtils = { ...@@ -7,6 +7,12 @@ THREE.BufferGeometryUtils = {
fromGeometry: function geometryToBufferGeometry( geometry, settings ) { fromGeometry: function geometryToBufferGeometry( geometry, settings ) {
if ( geometry instanceof THREE.BufferGeometry ) {
return geometry;
}
settings = settings || { 'vertexColors': THREE.NoColors }; settings = settings || { 'vertexColors': THREE.NoColors };
var vertices = geometry.vertices; var vertices = geometry.vertices;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册