File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,23 +13,9 @@ info_t get_info()
1313 return { DULCIFICUM_VERSION, DULCIFICUM_HASH };
1414}
1515
16- emscripten::val gcode_2_miracle_jtp_bytes (const std::string& content, const size_t nb_extruders = 2 )
17- {
18- const auto json = dulcificum::GCode2Miracle_JTP (content, nb_extruders);
19-
20- // Allocate a standalone ArrayBuffer-backed Uint8Array so callers can transfer it.
21- auto uint8_array_ctor = emscripten::val::global (" Uint8Array" );
22- auto out = uint8_array_ctor.new_ (json.size ());
23- out.call <void >(" set" , emscripten::val (emscripten::typed_memory_view (
24- json.size (),
25- reinterpret_cast <const unsigned char *>(json.data ()))));
26- return out;
27- }
28-
2916EMSCRIPTEN_BINDINGS (dulcificum)
3017{
3118 emscripten::function (" gcode_2_miracle_jtp" , &dulcificum::GCode2Miracle_JTP);
32- emscripten::function (" gcode_2_miracle_jtp_bytes" , &gcode_2_miracle_jtp_bytes);
3319 // Binding for info_t structure
3420 emscripten::value_object<info_t >(" info_t" )
3521 .field (" dulcificum_version" , &info_t ::dulcificum_version)
You can’t perform that action at this time.
0 commit comments