You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
testLoad();
var str =
'U2tldGNoVXAgU1RMIFVudGl0bGVkLTU2ZTNlMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAMAAAAAAAAAAAAAAAAAIC/AACgQAAAoEAAAKDAAACgwAAAoMAAAKDAAACgwAAAoEAAAKDAAAAAAAAAAAAAAAAAgL8AAKDAAACgwAAAoMAAAKBAAACgQAAAoMAAAKBAAACgwAAAoMAAAAAAAIAAAIC/AAAAgAAAoEAAAKDAAACgQAAAoMAAAKDAAACgwAAAoEAAAKDAAACgwAAAAAAAgAAAgL8AAACAAACgwAAAoMAAAKDAAACgQAAAoMAAAKBAAACgwAAAoMAAAKBAAAAAAIC/AAAAAAAAAAAAAKDAAACgQAAAoEAAAKDAAACgwAAAoMAAAKDAAACgwAAAoEAAAAAAgL8AAAAAAAAAAAAAoMAAAKDAAACgwAAAoMAAAKBAAACgQAAAoMAAAKBAAACgwAAAAAAAAAAAAAAAAIA/AACgQAAAoMAAAKBAAACgwAAAoEAAAKBAAACgwAAAoMAAAKBAAAAAAAAAAAAAAAAAgD8AAKDAAACgQAAAoEAAAKBAAACgwAAAoEAAAKBAAACgQAAAoEAAAAAAgD8AAAAAAAAAAAAAoEAAAKBAAACgwAAAoEAAAKDAAACgQAAAoEAAAKDAAACgwAAAAACAPwAAAAAAAAAAAACgQAAAoMAAAKBAAACgQAAAoEAAAKDAAACgQAAAoEAAAKBAAAAAAAAAAACAPwAAAAAAAKDAAACgQAAAoEAAAKBAAACgQAAAoMAAAKDAAACgQAAAoMAAAAAAAAAAAIA/AAAAAAAAoEAAAKBAAACgwAAAoMAAAKBAAACgQAAAoEAAAKBAAACgQAAA';
function testLoad() {
console.log('tesload');
// var f1 = base64toFile(str);
// var f2 = base64ToBlob(str, '.stl');
Describe the bug
testLoad();
var str =
'U2tldGNoVXAgU1RMIFVudGl0bGVkLTU2ZTNlMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAMAAAAAAAAAAAAAAAAAIC/AACgQAAAoEAAAKDAAACgwAAAoMAAAKDAAACgwAAAoEAAAKDAAAAAAAAAAAAAAAAAgL8AAKDAAACgwAAAoMAAAKBAAACgQAAAoMAAAKBAAACgwAAAoMAAAAAAAIAAAIC/AAAAgAAAoEAAAKDAAACgQAAAoMAAAKDAAACgwAAAoEAAAKDAAACgwAAAAAAAgAAAgL8AAACAAACgwAAAoMAAAKDAAACgQAAAoMAAAKBAAACgwAAAoMAAAKBAAAAAAIC/AAAAAAAAAAAAAKDAAACgQAAAoEAAAKDAAACgwAAAoMAAAKDAAACgwAAAoEAAAAAAgL8AAAAAAAAAAAAAoMAAAKDAAACgwAAAoMAAAKBAAACgQAAAoMAAAKBAAACgwAAAAAAAAAAAAAAAAIA/AACgQAAAoMAAAKBAAACgwAAAoEAAAKBAAACgwAAAoMAAAKBAAAAAAAAAAAAAAAAAgD8AAKDAAACgQAAAoEAAAKBAAACgwAAAoEAAAKBAAACgQAAAoEAAAAAAgD8AAAAAAAAAAAAAoEAAAKBAAACgwAAAoEAAAKDAAACgQAAAoEAAAKDAAACgwAAAAACAPwAAAAAAAAAAAACgQAAAoMAAAKBAAACgQAAAoEAAAKDAAACgQAAAoEAAAKBAAAAAAAAAAACAPwAAAAAAAKDAAACgQAAAoEAAAKBAAACgQAAAoMAAAKDAAACgQAAAoMAAAAAAAAAAAIA/AAAAAAAAoEAAAKBAAACgwAAAoMAAAKBAAACgQAAAoEAAAKBAAACgQAAA';
function testLoad() {
console.log('tesload');
// var f1 = base64toFile(str);
// var f2 = base64ToBlob(str, '.stl');
console.log('tesload1');
// loader.loadFile(f1);
// loader.loadString(f1);
// loader.loadBinaryData(f1);
// loader.loadFile(f1);
console.log('tesload2');
// loader.loadFile(f2);
// loader.loadString(f2);
// loader.loadBinaryData(f2);
// loader.loadFile(f2);
console.log('tesload3');
// loader.loadFile(str);
loader.loadString(str);
loader.loadBinaryData(str);
loader.loadFile(str);
// var to = base64ToBlob(str, 'zip');
// loader.loadFile(base64ToBlob(to));
// loader.loadString(to);
// loader.loadBinaryData(to);
// loader.loadFile(to);
}
function base64ToBlob(code, suffix) {
code = code.replace(/[\n\r]/g, '');
// atob() 方法用于解码使用 base-64 编码的字符串。
const raw = window.atob(code);
const rawLength = raw.length;
const uInt8Array = new Uint8Array(rawLength);
for (let i = 0; i < rawLength; ++i) {
uInt8Array[i] = raw.charCodeAt(i);
}
return new Blob([uInt8Array], {type:
application/${suffix}
});}
Reproduction
thanks
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: