Created
March 26, 2021 11:09
-
-
Save gtk2k/01f1fed49fb6ca561262bd975a66a19f to your computer and use it in GitHub Desktop.
jslib_test_snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergeInto(LibraryManager.library, { | |
binaryInit: function (ptrArray, size) { | |
Module.refByteArray = new Uint8Array(buffer, ptrArray, size); | |
setInterval(function () { | |
Module.refByteArray[1] += 2; | |
if (Module.refByteArray[1] >= 200) | |
Module.refByteArray[1] = 0; | |
}, 1000); | |
}, | |
consoleLog: function (val) { | |
console.log(Module.refByteArray[0], val); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment