提交 57929ae7 编写于 作者: E Elijah Snyder

Set default scale for amf documents without a scale attribute

上级 675c971f
......@@ -175,7 +175,11 @@ THREE.AMFLoader.prototype = {
_loadDocumentScale: function ( xmldata ) {
var scale = 1.0;
var unit = xmldata.documentElement.attributes['unit'].value.toLowerCase();
var unit = 'millimeter';
if( xmldata.documentElement.attributes['unit'] !== undefined ) {
unit = xmldata.documentElement.attributes['unit'].value.toLowerCase();
}
var scale_units = {
'millimeter': 1.0,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册