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

OBJLoader: Added support to vertex/uv for completeness sake.

上级 3b1a002d
......@@ -46,6 +46,17 @@ THREE.OBJLoader.prototype.parse = function ( data, callback ) {
}
// faces: vertex/uv
pattern = /f ([\d]+)\/([\d]+) ([\d]+)\/([\d]+) ([\d]+)\/([\d]+)/g;
while ( ( result = pattern.exec( data ) ) != null ) {
var face = new THREE.Face3( parseInt( result[ 1 ] ) - 1, parseInt( result[ 3 ] ) - 1, parseInt( result[ 5 ] ) - 1 );
geometry.faces.push( face );
}
// faces: vertex/uv/normal
pattern = /f ([\d]+)\/([\d]+)\/([\d]+) ([\d]+)\/([\d]+)\/([\d]+) ([\d]+)\/([\d]+)\/([\d]+)/g;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册