Answer the question
In order to leave comments, you need to log in
How to pass object from JS to eel? Or does eel only support string?
How to pass object from js to eel?
I am trying to export the result of js code.
Sample code from three.js
js
//TEXT
let exporter_stl = new STLExporter();
function exportASCII_stl() {
const result = exporter_stl.parse( scene );
console.log(result)
let res = await eel.test_link(result,'stl')();
}
//Binary
function exportBinary_stl() {
const result = exporter_stl.parse( scene, { binary: true } );
console.log(result)
eel(result,'stl');
let res = await eel.test_link(result,'stl')();
}
setTimeout(exportBinary_stl, 3000);
@eel.expose
def test_link(content,format):
print(content)
file = open('test.'+format, 'w+')
file.write(content)
file.close()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question