Typed array in Daz script
Philemo_Carrara
Posts: 1,175
I have a javascript library that reads and writes C++ style data in binary format from/to a file. To do that, I use typed arrays (float32array,arraybuffer...).
I need to port this library to Daz/QtScript. QTScript is supposedly compatible with ECMA-262 which defines typed array, but I can't manage to make it work.
Does anybody have tried that ?
Comments
Daz Studio 4.x is built on the Qt 4.x framework. To know exactly which version a particular build of Daz Studio is using, execute
App.aboutQt();
in the Script IDE pane. Currently, that is Qt 4.8.7. Work is being done behind the scenes to migrate to the current version of Qt (e.g., see the various "source maintenance" comments in the change log), but that will not be part of the Daz Studio 4.x life-cycle as it is not ABI/API compatible.There are multiple editions of ECMA-262. Qt 4.8.7 supports ECMA-262 5th edition (perhaps 5.1, I haven't personally tested each stated difference).
ArrayBuffer
andFloat32Array
were not added until ECMA-262 6th edition.-Rob
For a better view of how much of the ECMA-262 6th edition Global Object is supported...
-Rob
Thank you so much Rob for those detailed explanations. I had a vague hope of avoiding a plugin, but I see I won't have a choice. I saw in one of your other posts how to add new objects and functions to the script engine and I'll start from there.
I'll use your script to assert what is available in scripting.