Add Emsctipted implementation for algorithm.

This commit is contained in:
Oleg Sh
2021-12-08 21:48:50 +02:00
parent 056d4fce12
commit 513fb80a0c
15 changed files with 128 additions and 70 deletions

View File

@@ -53,6 +53,7 @@ function Application(document, window)
this.defaultVertexSize = null;
this.defaultEdgeWidth = null;
this.processEmscriptenFunction = null;
};
// List of graph.
@@ -1839,4 +1840,20 @@ Application.prototype.ResetEdgeWidth = function()
{
this.graph.edges[i].model.width = this.GetDefaultEdgeWidth();
}
}
Application.prototype.setEmscripten = function(processFunction)
{
this.processEmscriptenFunction = processFunction;
console.log("Emscripten set");
}
Application.prototype.isSupportEmscripten = function ()
{
return this.processEmscriptenFunction != null;
}
Application.prototype.processEmscripten = function (inputData)
{
return this.processEmscriptenFunction(inputData);
}