You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Not an issue but a question.
Sorry I am not very familiar with node.
Built and ran the project example and everything works fine.
I run the node example with: npm run-cript start-example-node and the script runs but nothing is drawn (there are logs in the terminal).
I expect a native imgui window drawn form node script call.
I would like to run the example
import * as ImGui from "imgui-js";
let show: boolean = true;
function draw(): void {
if (ImGui.Button("Toggle")) { show = !show; }
if (show) {
ImGui.Begin("My Window", (_ = show) => show = _, ImGui.WindowFlags.AlwaysAutoResize));
ImGui.Text("Hello, World!");
ImGui.End();
}
}
from node.
Is this possible? Is there anything that needs to be done in the example/index.js script?
Thanks in advanced.
Edit1: There is an error Cannot find name 'System'.ts(2304) error obtained at System.import("main") in the index.js script.
Node version: v17.5.0
Edit2: Seems that window is undefined at the main.ts render loop:
Hello,
Not an issue but a question.
Sorry I am not very familiar with node.
Built and ran the project example and everything works fine.
I run the node example with:
npm run-cript start-example-node
and the script runs but nothing is drawn (there are logs in the terminal).I expect a native imgui window drawn form node script call.
I would like to run the example
from node.
Is this possible? Is there anything that needs to be done in the example/index.js script?
Thanks in advanced.
Edit1: There is an error
Cannot find name 'System'.ts(2304)
error obtained atSystem.import("main")
in the index.js script.Node version: v17.5.0
Edit2: Seems that window is undefined at the main.ts render loop:
Which makes sense if method is being called from node and node within the browser. However what is the purpose of the node example then?
The text was updated successfully, but these errors were encountered: