Skip to content

Commit

Permalink
improve vars types
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Nov 21, 2024
1 parent c0fdf4c commit 1d785b4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build/artoolkitNFT.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/artoolkitNFT_embed_ES6_wasm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/artoolkitNFT_thread.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/artoolkitNFT_wasm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/artoolkitNFT_wasm.simd.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions js/artoolkitNFT.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,11 @@
onerror(errorNumber);
}

var loadZFT = (prefix) => {
let marker_num = prefix.substring(11);
var prefixTemp = '/tempMarkerNFT_' + marker_num;
const loadZFT = (prefix) => {
const marker_num = prefix.substring(11);
const prefixTemp = '/tempMarkerNFT_' + marker_num;

var response = Module._decompressZFT(prefix, prefixTemp);
const response = Module._decompressZFT(prefix, prefixTemp);

let contentIsetUint8 = FS.readFile(prefixTemp + '.iset');
let contentFsetUint8 = FS.readFile(prefixTemp + '.fset');
Expand Down Expand Up @@ -978,8 +978,8 @@
}

function Uint8ArrayToStr(array) {
var out, i, len, c;
var char2, char3;
let out, i, len, c;
let char2, char3;

out = "";
len = array.length;
Expand Down
23 changes: 13 additions & 10 deletions js/artoolkitNFT_ES6.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,11 @@ function addNFTMarkers(arId, urls, callback, onerror) {
onerror(errorNumber);
};

var loadZFT = (prefix) => {
let marker_num = prefix.substring(11);
var prefixTemp = '/tempMarkerNFT_' + marker_num;
const loadZFT = (prefix) => {
const marker_num = prefix.substring(11);
const prefixTemp = '/tempMarkerNFT_' + marker_num;

var response = Module._decompressZFT(prefix, prefixTemp);
const response = Module._decompressZFT(prefix, prefixTemp);

let contentIsetUint8 = FS.readFile(prefixTemp + '.iset');
let contentFsetUint8 = FS.readFile(prefixTemp + '.fset');
Expand All @@ -935,11 +935,14 @@ function addNFTMarkers(arId, urls, callback, onerror) {
let contentFset = new Uint8Array(hexStrFset.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
let contentFset3 = new Uint8Array(hexStrFset3.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));

writeByteArrayToFS(prefix + '.fset', contentFset, function(){});
writeByteArrayToFS(prefix + '.iset', contentIset, function(){});
writeByteArrayToFS(prefix + '.fset3', contentFset3, function(){});
writeByteArrayToFS(prefix + '.fset', contentFset, function () {
});
writeByteArrayToFS(prefix + '.iset', contentIset, function () {
});
writeByteArrayToFS(prefix + '.fset3', contentFset3, function () {
});

}
};

const onSuccessZFT = function(){
loadZFT(arguments[1]);
Expand Down Expand Up @@ -985,8 +988,8 @@ function checkZFT(url){
}

function Uint8ArrayToStr(array) {
var out, i, len, c;
var char2, char3;
let out, i, len, c;
let char2, char3;

out = "";
len = array.length;
Expand Down

0 comments on commit 1d785b4

Please sign in to comment.