add options to load_url for grouping and file name
This commit is contained in:
parent
7fb36b91a6
commit
9e89eef250
2 changed files with 4 additions and 4 deletions
|
|
@ -9,7 +9,7 @@
|
|||
function load(url, options = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let xhr = new XMLHttpRequest();
|
||||
let file = (((url.split('?')[0]).split('#')[0]).split('/')).pop();
|
||||
let file = options.file || options.filename || (((url.split('?')[0]).split('#')[0]).split('/')).pop();
|
||||
let ext = file.split('.').pop().toLowerCase();
|
||||
let deftype = ext === "obj" ? "text" : "arraybuffer";
|
||||
let datatype = options.datatype || deftype;
|
||||
|
|
|
|||
Loading…
Reference in a new issue