mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Ensure all nodes in a cluster establish contact with their own instance of the wwt application (needs an updated website version - this update will not work with the current website version on the server)
This commit is contained in:
@@ -267,6 +267,13 @@ namespace openspace {
|
||||
"Add one or multiple exoplanet systems to the scene, as specified by the "
|
||||
"input. An input string should be the name of the system host star"
|
||||
},
|
||||
{
|
||||
"startSetup",
|
||||
&skybrowser::luascriptfunctions::startSetup,
|
||||
"string or list of strings",
|
||||
"Add one or multiple exoplanet systems to the scene, as specified by the "
|
||||
"input. An input string should be the name of the system host star"
|
||||
},
|
||||
};
|
||||
|
||||
return res;
|
||||
|
||||
@@ -163,6 +163,20 @@ int loadImagesToWWT(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int startSetup(lua_State* L) {
|
||||
// This is called when the sky_browser website is connected to OpenSpace
|
||||
ghoul::lua::checkArgumentsAndThrow(L, 0, "lua::startSetup");
|
||||
|
||||
// To ensure each node in a cluster calls its own instance of the wwt application
|
||||
// Do not send this script to the other nodes
|
||||
openspace::global::scriptEngine->queueScript(
|
||||
"openspace.skybrowser.sendOutIdsToBrowsers();",
|
||||
scripting::ScriptEngine::RemoteScripting::No
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sendOutIdsToBrowsers(lua_State* L) {
|
||||
// This is called when the sky_browser website is connected to OpenSpace
|
||||
ghoul::lua::checkArgumentsAndThrow(L, 0, "lua::sendOutIdsToBrowsers");
|
||||
@@ -512,8 +526,8 @@ int createTargetBrowserPair(lua_State* L) {
|
||||
std::string idTarget = "SkyTarget" + std::to_string(noOfPairs);
|
||||
glm::vec3 positionBrowser = { -1.0f, -0.5f, -2.1f };
|
||||
std::string guiPath = "/SkyBrowser";
|
||||
std::string url = "https://data.openspaceproject.com/dist/skybrowser/page/";
|
||||
//std::string url = "http://localhost:8000"; // check webgl version
|
||||
//std::string url = "https://data.openspaceproject.com/dist/skybrowser/page/";
|
||||
std::string url = "http://localhost:8000"; // check webgl version
|
||||
//std::string url = "https://get.webgl.org";
|
||||
glm::ivec3 color = randomBorderColor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user