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

JSONLoader: Moved .withCredentials under .open. See #2927.

上级 ff67978e
......@@ -32,8 +32,6 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
var length = 0;
xhr.withCredentials = this.withCredentials;
xhr.onreadystatechange = function () {
if ( xhr.readyState === xhr.DONE ) {
......@@ -86,6 +84,7 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
};
xhr.open( "GET", url, true );
xhr.withCredentials = this.withCredentials;
xhr.send( null );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册