提交 d1e290cd 编写于 作者: F Fernando Serrano 提交者: Mr.doob

Fix OBJ loader with empty uvs or normals

上级 927ab472
......@@ -286,19 +286,17 @@ THREE.OBJLoader = ( function () {
this.addVertex( ia, ib, ic );
if ( ua !== undefined ) {
if ( ua !== undefined && ua !== '' ) {
var uvLen = this.uvs.length;
ia = this.parseUVIndex( ua, uvLen );
ib = this.parseUVIndex( ub, uvLen );
ic = this.parseUVIndex( uc, uvLen );
this.addUV( ia, ib, ic );
}
if ( na !== undefined ) {
if ( na !== undefined && na !== '' ) {
// Normals are many times the same. If so, skip function call and parseInt.
var nLen = this.normals.length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册