提交 27f42fbe 编写于 作者: D Daniel Hritzkiv 提交者: Mr.doob

Handle line continuation character in OBJs (#9643)

This targets separate but logically joined lines (separated by a continuation character, e.g. `\`) and joins them.
上级 7e45dac4
......@@ -430,6 +430,13 @@ THREE.OBJLoader.prototype = {
text = text.replace( /\r\n/g, '\n' );
}
if ( text.indexOf( '\\\n' ) !== - 1) {
// join lines separated by a line continuation character (\)
text = text.replace( /\\\n/g, '' );
}
var lines = text.split( '\n' );
var line = '', lineFirstChar = '', lineSecondChar = '';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册