Merge branch 'master' into feature/sgct-gui

This commit is contained in:
GPayne
2022-03-27 13:18:57 -06:00
1110 changed files with 33004 additions and 11255 deletions
+4 -4
View File
@@ -27,9 +27,9 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(OpenSpace)
set(OPENSPACE_VERSION_MAJOR 0)
set(OPENSPACE_VERSION_MINOR 17)
set(OPENSPACE_VERSION_PATCH 1)
set(OPENSPACE_VERSION_STRING "Beta-10")
set(OPENSPACE_VERSION_MINOR 18)
set(OPENSPACE_VERSION_PATCH -1)
set(OPENSPACE_VERSION_STRING "Beta-11")
set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}")
set(OPENSPACE_CMAKE_EXT_DIR "${OPENSPACE_BASE_DIR}/support/cmake")
@@ -143,8 +143,8 @@ if (UNIX)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_ENABLE_EXPERIMENTAL" CACHE STRING "" FORCE)
set(OpenGL_GL_PREFERENCE "GLVND" CACHE STRING "OpenGL Preference setting necessary for linux" FORCE)
set(ASSIMP_BUILD_MINIZIP ON CACHE BOOL "Set to have assimp build minizip" FORCE)
endif ()
set(ASSIMP_BUILD_MINIZIP ON CACHE BOOL "Set to have assimp build minizip" FORCE)
endif ()
add_subdirectory(ext)
Vendored
+28 -57
View File
@@ -29,42 +29,6 @@ def moduleCMakeFlags() {
modules = bat(returnStdout: true, script: '@dir modules /b /ad /on').trim().split('\r\n');
}
// def dirs = readDir();
// def currentDir = new File('.')
// def dirs = []
// currentDir.eachFile FileType.DIRECTORIES, {
// dirs << it.name
// }
// def moduleFlags = [
// 'atmosphere',
// 'base',
// // 'cefwebgui',
// 'debugging',
// 'digitaluniverse',
// 'fieldlines',
// 'fieldlinessequence',
// 'fitsfilereader',
// 'gaia',
// 'galaxy',
// 'globebrowsing',
// 'imgui',
// 'iswa',
// 'kameleon',
// 'kameleonvolume',
// 'multiresvolume',
// 'server',
// 'space',
// 'spacecraftinstruments',
// 'space',
// 'spout',
// 'sync',
// 'touch',
// 'toyvolume',
// 'volume',
// // 'webbrowser',
// // 'webgui'
// ];
def flags = '';
for (module in modules) {
flags += "-DOPENSPACE_MODULE_${module.toUpperCase()}=ON "
@@ -72,8 +36,6 @@ def moduleCMakeFlags() {
return flags;
}
// echo flags
//
// Pipeline start
//
@@ -110,12 +72,14 @@ linux_gcc_make: {
cmakeCompileOptions += ' -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS:STRING="-DGLM_ENABLE_EXPERIMENTAL"';
cmakeCompileOptions += ' -DOpenGL_GL_PREFERENCE:STRING=GLVND -DASSIMP_BUILD_MINIZIP=1';
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-make');
compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), cmakeCompileOptions, '', 'build-make');
compileHelper.recordCompileIssues(compileHelper.Gcc());
}
stage('linux-gcc-make/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
testHelper.runUnitTests('bin/codegentest');
testHelper.runUnitTests('bin/SGCTTest');
testHelper.runUnitTests('bin/GhoulTest');
testHelper.runUnitTests('bin/OpenSpaceTest');
}
cleanWs()
} // node('linux')
@@ -132,11 +96,13 @@ linux_gcc_ninja: {
def cmakeCompileOptions = moduleCMakeFlags();
cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release';
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, 'OpenSpace', 'build-ninja');
compileHelper.build(compileHelper.Ninja(), compileHelper.Gcc(), cmakeCompileOptions, '', 'build-ninja');
}
stage('linux-gcc-ninja/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
testHelper.runUnitTests('bin/codegentest');
testHelper.runUnitTests('bin/SGCTTest');
testHelper.runUnitTests('bin/GhoulTest');
testHelper.runUnitTests('bin/OpenSpaceTest');
}
cleanWs()
} // node('linux')
@@ -153,12 +119,14 @@ linux_clang_make: {
def cmakeCompileOptions = moduleCMakeFlags()
cmakeCompileOptions += ' -DMAKE_BUILD_TYPE=Release'
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-make');
compileHelper.build(compileHelper.Make(), compileHelper.Clang(), cmakeCompileOptions, '', 'build-make');
compileHelper.recordCompileIssues(compileHelper.Clang());
}
stage('linux-clang-make/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
testHelper.runUnitTests('bin/codegentest');
testHelper.runUnitTests('bin/SGCTTest');
testHelper.runUnitTests('bin/GhoulTest');
testHelper.runUnitTests('bin/OpenSpaceTest');
}
cleanWs()
} // node('linux')
@@ -175,11 +143,13 @@ linux_clang_ninja: {
def cmakeCompileOptions = moduleCMakeFlags()
cmakeCompileOptions += '-DMAKE_BUILD_TYPE=Release'
// Not sure why the linking of OpenSpaceTest takes so long
compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, 'OpenSpace', 'build-ninja');
compileHelper.build(compileHelper.Ninja(), compileHelper.Clang(), cmakeCompileOptions, '', 'build-ninja');
}
stage('linux-clang-ninja/test') {
// testHelper.runUnitTests('build/OpenSpaceTest');
// testHelper.runUnitTests('bin/codegentest')
testHelper.runUnitTests('bin/codegentest');
testHelper.runUnitTests('bin/SGCTTest');
testHelper.runUnitTests('bin/GhoulTest');
testHelper.runUnitTests('bin/OpenSpaceTest');
}
cleanWs()
} // node('linux')
@@ -197,9 +167,10 @@ windows_msvc: {
compileHelper.recordCompileIssues(compileHelper.VisualStudio());
}
stage('windows-msvc/test') {
// Currently, the unit tests are failing on Windows
// testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest')
testHelper.runUnitTests('bin\\Debug\\codegentest')
testHelper.runUnitTests('bin\\Debug\\codegentest');
testHelper.runUnitTests('bin\\Debug\\SGCTTest');
testHelper.runUnitTests('bin\\Debug\\GhoulTest');
testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest');
}
cleanWs()
} // node('windows')
@@ -236,8 +207,8 @@ macos_make: {
compileHelper.build(compileHelper.Make(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-make');
}
stage('macos-make/test') {
// Currently, the unit tests are crashing on OS X
// testHelper.runUnitTests('build/Debug/OpenSpaceTest')
testHelper.runUnitTests('bin/Debug/OpenSpaceTest')
testHelper.runUnitTests('bin/Debug/codegentest')
}
cleanWs()
} // node('macos')
@@ -254,8 +225,8 @@ macos_xcode: {
compileHelper.build(compileHelper.Xcode(), compileHelper.Xcode(), moduleCMakeFlags(), '', 'build-xcode');
}
stage('macos-xcode/test') {
// Currently, the unit tests are crashing on OS X
// testHelper.runUnitTests('build/Debug/OpenSpaceTest')
testHelper.runUnitTests('bin/Debug/OpenSpaceTest')
testHelper.runUnitTests('bin/Debug/codegentest')
}
cleanWs()
} // node('macos')
+1
View File
@@ -123,6 +123,7 @@ set_folder_location(quat "External")
set_folder_location(tinyxml2static "External")
set_folder_location(vrpn "External")
set_folder_location(zlibstatic "External")
set_folder_location(SGCTTest "Unit Tests")
if (UNIX AND (NOT APPLE))
target_link_libraries(OpenSpace PRIVATE Xcursor Xinerama X11)
@@ -65,6 +65,8 @@ private slots:
void transitionToEditMode();
void parseSelections();
void selectLineFromScriptLog();
private:
void createWidgets();
@@ -81,6 +83,8 @@ private:
QListWidget* _list = nullptr;
QPushButton* _addButton = nullptr;
QPushButton* _removeButton = nullptr;
QPushButton* _fillFromScriptLog = nullptr;
QLabel* _commandLabel = nullptr;
QComboBox* _commandCombo = nullptr;
QLabel* _propertyLabel = nullptr;
@@ -391,13 +391,18 @@ void LauncherWindow::populateProfilesList(std::string preset) {
++_userAssetCount;
// Add all the files with the .profile extension to the dropdown
std::vector<fs::directory_entry> profiles;
for (const fs::directory_entry& p : fs::directory_iterator(_userProfilePath)) {
if (p.path().extension() != ".profile") {
continue;
}
_profileBox->addItem(QString::fromStdString(p.path().stem().string()));
profiles.push_back(p);
++_userAssetCount;
}
std::sort(profiles.begin(), profiles.end());
for (const fs::directory_entry& p : profiles) {
_profileBox->addItem(QString::fromStdString(p.path().stem().string()));
}
_profileBox->addItem(QString::fromStdString("--- OpenSpace Profiles ---"));
model = qobject_cast<const QStandardItemModel*>(_profileBox->model());
@@ -405,11 +410,17 @@ void LauncherWindow::populateProfilesList(std::string preset) {
++_userAssetCount;
// Add all the files with the .profile extension to the dropdown
for (const fs::directory_entry& p : fs::directory_iterator(_profilePath)) {
if (p.path().extension() != ".profile") {
profiles.clear();
for (const fs::directory_entry& path : fs::directory_iterator(_profilePath)) {
if (path.path().extension() != ".profile") {
continue;
}
_profileBox->addItem(QString::fromStdString(p.path().stem().string()));
profiles.push_back(path);
}
std::sort(profiles.begin(), profiles.end());
//add sorted items to list
for (const fs::directory_entry& profile : profiles) {
_profileBox->addItem(QString::fromStdString(profile.path().stem().string()));
}
// Try to find the requested profile and set it as the current one
@@ -451,8 +462,15 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) {
bool hasXmlConfig = false;
// Add all the files with the .xml or .json extension to the dropdown
//sort files
std::vector<fs::directory_entry> files;
for (const fs::directory_entry& p : fs::directory_iterator(_userConfigPath)) {
files.push_back(p);
}
std::sort(files.begin(), files.end());
// Add all the files with the .xml or .json extension to the dropdown
for (const fs::directory_entry& p : files) {
bool isConfigFile = handleConfigurationFile(*_windowConfigBox, p);
if (isConfigFile) {
++_userConfigCount;
@@ -465,8 +483,14 @@ void LauncherWindow::populateWindowConfigsList(std::string preset) {
model->item(_userConfigCount)->setEnabled(false);
if (std::filesystem::exists(_configPath)) {
// Add all the files with the .xml or .json extension to the dropdown
//sort files
files.clear();
for (const fs::directory_entry& p : fs::directory_iterator(_configPath)) {
files.push_back(p);
}
std::sort(files.begin(), files.end());
// Add all the files with the .xml or .json extension to the dropdown
for (const fs::directory_entry& p : files) {
handleConfigurationFile(*_windowConfigBox, p);
hasXmlConfig |= p.path().extension() == ".xml";
}
@@ -546,7 +546,7 @@ void ActionDialog::actionSaved() {
// If we got this far, we have a new identifier and it is a new one, so we need to
// update other keybinds now
ghoul_assert(
_keybindingWidgets.list->count() == _keybindingsData.size(),
_keybindingWidgets.list->count() == static_cast<int>(_keybindingsData.size()),
"The list and data got out of sync"
);
for (int i = 0; i < _keybindingWidgets.list->count(); ++i) {
@@ -25,14 +25,17 @@
#include "profile/propertiesdialog.h"
#include "profile/line.h"
#include <ghoul/filesystem/filesystem.h>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QEvent>
#include <QFile>
#include <QKeyEvent>
#include <QLabel>
#include <QLineEdit>
#include <QListWidget>
#include <QPushButton>
#include <QTextStream>
#include <QVBoxLayout>
#include <iostream>
@@ -93,6 +96,13 @@ void PropertiesDialog::createWidgets() {
}
layout->addWidget(new Line);
{
_fillFromScriptLog = new QPushButton("Fill from ScriptLog");
connect(
_fillFromScriptLog, &QPushButton::clicked,
this, &PropertiesDialog::selectLineFromScriptLog
);
layout->addWidget(_fillFromScriptLog);
_commandLabel = new QLabel("Property Set Command");
layout->addWidget(_commandLabel);
@@ -333,6 +343,7 @@ void PropertiesDialog::transitionFromEditMode() {
}
void PropertiesDialog::editBoxDisabled(bool disabled) {
_fillFromScriptLog->setDisabled(disabled);
_commandLabel->setDisabled(disabled);
_commandCombo->setDisabled(disabled);
_propertyLabel->setDisabled(disabled);
@@ -368,3 +379,89 @@ void PropertiesDialog::keyPressEvent(QKeyEvent* evt) {
QDialog::keyPressEvent(evt);
}
void PropertiesDialog::selectLineFromScriptLog() {
QComboBox* comboBox = new QComboBox;
QFile file(QString::fromStdString(absPath("${LOGS}/scriptLog.txt").string()));
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QTextStream in(&file);
while (!in.atEnd()) {
QString line = in.readLine();
// removing return from a few statments
// these are usually generated by gui panels
line.remove(QRegularExpression("^return "));
if (line.isEmpty()) {
continue;
}
if (!line.startsWith("openspace.setPropertyValue")) {
continue;
}
comboBox->addItem(line);
}
}
QDialog dialog;
connect(&dialog, &QDialog::finished, [this, comboBox](int result) {
if (result == QDialog::Rejected) {
return;
}
QString text = comboBox->currentText();
if (!text.startsWith("openspace.setPropertyValue")) {
return;
}
// We have a string that is of the form:
// openspace.setPropertyValue('prop', value);
if (text.startsWith("openspace.setPropertyValueSingle")) {
_commandCombo->setCurrentIndex(0);
std::string_view prefix = "openspace.setPropertyValueSingle";
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
}
else {
// command == "openspace.setPropertyValue"
_commandCombo->setCurrentIndex(1);
std::string_view prefix = "openspace.setPropertyValue";
text = text.mid(static_cast<int>(prefix.size()) + 1); // +1 for (
}
// Remove everything past the closing brace
text = text.left(text.indexOf(")"));
QStringList textList = text.split(",");
if (textList.size() < 2) {
return;
}
// Remove the string markers around the property
QString property = textList[0].mid(1, textList[0].size() - 2);
textList.removeFirst();
QString value = textList.join(",");
_propertyEdit->setText(property.trimmed());
_valueEdit->setText(value.trimmed());
});
QLayout* layout = new QVBoxLayout;
QLabel* label = new QLabel("Select a line from the Script Log to add");
layout->addWidget(label);
layout->addWidget(comboBox);
QDialogButtonBox* bb = new QDialogButtonBox(
QDialogButtonBox::Ok | QDialogButtonBox::Cancel
);
connect(bb, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
connect(bb, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
layout->addWidget(bb);
dialog.setLayout(layout);
dialog.exec();
}
+63 -70
View File
@@ -79,7 +79,7 @@
#endif // OPENVR_SUPPORT
#ifdef OPENSPACE_HAS_SPOUT
#include "SpoutLibrary.h"
#include <modules/spout/spoutwrapper.h>
#endif // OPENSPACE_HAS_SPOUT
#ifdef OPENSPACE_HAS_NVTOOLS
@@ -120,16 +120,11 @@ Window* FirstOpenVRWindow = nullptr;
* the \c leftOrMain and \c right members respectively.
*/
struct SpoutWindow {
struct SpoutData {
SPOUTHANDLE handle = nullptr;
bool initialized = false;
};
/// The left framebuffer (or main, if there is no stereo rendering)
SpoutData leftOrMain;
openspace::spout::SpoutSender leftOrMain;
/// The right framebuffer
SpoutData right;
openspace::spout::SpoutSender right;
/// The window ID of this windows
size_t windowId = size_t(-1);
@@ -291,41 +286,33 @@ void mainInitFunc(GLFWwindow*) {
#ifdef OPENSPACE_HAS_SPOUT
SpoutWindow w;
w.windowId = i;
bool retValue = true;
std::string mainWindowName = window.name();
const Window::StereoMode sm = window.stereoMode();
const bool hasStereo = (sm != Window::StereoMode::NoStereo) &&
(sm < Window::StereoMode::SideBySide);
if (hasStereo) {
SpoutWindow::SpoutData& left = w.leftOrMain;
left.handle = GetSpout();
left.initialized = left.handle->CreateSender(
(window.name() + "_left").c_str(),
window.framebufferResolution().x,
window.framebufferResolution().y
);
SpoutWindow::SpoutData& right = w.right;
right.handle = GetSpout();
right.initialized = right.handle->CreateSender(
(window.name() + "_right").c_str(),
window.framebufferResolution().x,
window.framebufferResolution().y
);
}
else {
SpoutWindow::SpoutData& main = w.leftOrMain;
main.handle = GetSpout();
main.initialized = main.handle->CreateSender(
window.name().c_str(),
mainWindowName = window.name() + "_left";
retValue &= w.right.updateSenderName((window.name() + "_right").c_str());
retValue &= w.right.updateSenderSize(
window.framebufferResolution().x,
window.framebufferResolution().y
);
}
SpoutWindows.push_back(std::move(w));
retValue &= w.leftOrMain.updateSenderName(mainWindowName.c_str());
retValue &= w.leftOrMain.updateSenderSize(
window.framebufferResolution().x,
window.framebufferResolution().y
);
w.windowId = i;
if (retValue) {
SpoutWindows.push_back(std::move(w));
}
#else
LWARNING("Spout was requested, but program was compiled without Spout support");
#endif // OPENSPACE_HAS_SPOUT
@@ -513,6 +500,29 @@ void mainRenderFunc(const sgct::RenderData& data) {
currentModelMatrix = modelMatrix;
currentModelViewProjectionMatrix = modelMatrix * viewMatrix * projectionMatrix;
global::openSpaceEngine->render(modelMatrix, viewMatrix, projectionMatrix);
#ifdef OPENSPACE_HAS_SPOUT
for (SpoutWindow& w : SpoutWindows) {
sgct::Window& window = *Engine::instance().windows()[w.windowId];
int width = window.framebufferResolution().x;
int height = window.framebufferResolution().y;
w.leftOrMain.saveGLState();
if (w.leftOrMain.isCreated() && w.leftOrMain.updateSenderSize(width, height))
{
GLuint texId = window.frameBufferTexture(Window::TextureIndex::LeftEye);
w.leftOrMain.updateSender(texId, static_cast<int>(GL_TEXTURE_2D));
}
if (w.right.isCreated() && w.right.updateSenderSize(width, height)) {
GLuint texId = window.frameBufferTexture(Window::TextureIndex::RightEye);
w.right.updateSender(texId, static_cast<int>(GL_TEXTURE_2D));
}
w.leftOrMain.restoreGLState();
}
#endif // OPENSPACE_HAS_SPOUT
}
catch (const ghoul::RuntimeError& e) {
LERRORC(e.component, e.message);
@@ -564,34 +574,6 @@ void mainPostDrawFunc() {
global::openSpaceEngine->postDraw();
#ifdef OPENSPACE_HAS_SPOUT
for (const SpoutWindow& w : SpoutWindows) {
sgct::Window& window = *Engine::instance().windows()[w.windowId];
if (w.leftOrMain.initialized) {
const GLuint texId = window.frameBufferTexture(Window::TextureIndex::LeftEye);
glBindTexture(GL_TEXTURE_2D, texId);
w.leftOrMain.handle->SendTexture(
texId,
GLuint(GL_TEXTURE_2D),
window.framebufferResolution().x,
window.framebufferResolution().y
);
}
if (w.right.initialized) {
const GLuint tId = window.frameBufferTexture(Window::TextureIndex::RightEye);
glBindTexture(GL_TEXTURE_2D, tId);
w.right.handle->SendTexture(
tId,
GLuint(GL_TEXTURE_2D),
window.framebufferResolution().x,
window.framebufferResolution().y
);
}
}
glBindTexture(GL_TEXTURE_2D, 0);
#endif // OPENSPACE_HAS_SPOUT
LTRACE("main::mainPostDrawFunc(end)");
}
@@ -797,8 +779,8 @@ void setSgctDelegateFunctions() {
Viewport* viewport = currentWindow->viewports().front().get();
if (viewport != nullptr) {
if (viewport->hasSubViewports() && viewport->nonLinearProjection()) {
int res = viewport->nonLinearProjection()->cubemapResolution();
return glm::ivec2(res, res);
ivec2 dim = viewport->nonLinearProjection()->cubemapResolution();
return glm::ivec2(dim.x, dim.y);
}
else if (currentWindow->viewports().size() > 1) {
// @TODO (abock, 2020-04-09) This should probably be based on the current
@@ -1138,10 +1120,27 @@ int main(int argc, char* argv[]) {
std::filesystem::path base = configurationFilePath.parent_path();
FileSys.registerPathToken("${BASE}", base);
// The previous incarnation of this was initializing GLFW to get the primary
// monitor's resolution, but that had some massive performance implications as
// there was some issue with the swap buffer handling inside of GLFW. My
// assumption is that GLFW doesn't like being initialized, destroyed, and then
// initialized again. Therefore we are using the platform specific functions now
glm::ivec2 size = glm::ivec2(1920, 1080);
#ifdef WIN32
DEVMODEW dm = { 0 };
dm.dmSize = sizeof(DEVMODEW);
BOOL success = EnumDisplaySettingsW(nullptr, ENUM_CURRENT_SETTINGS, &dm);
if (success) {
size.x = dm.dmPelsWidth;
size.y = dm.dmPelsHeight;
}
#endif // WIN32
// Loading configuration from disk
LDEBUG("Loading configuration from disk");
*global::configuration = configuration::loadConfigurationFromFile(
configurationFilePath.string(),
size,
commandlineArguments.configurationOverride
);
@@ -1344,14 +1343,8 @@ int main(int argc, char* argv[]) {
#ifdef OPENSPACE_HAS_SPOUT
for (SpoutWindow& w : SpoutWindows) {
if (w.leftOrMain.handle) {
w.leftOrMain.handle->ReleaseReceiver();
w.leftOrMain.handle->Release();
}
if (w.right.handle) {
w.right.handle->ReleaseReceiver();
w.right.handle->Release();
}
w.leftOrMain.release();
w.right.release();
}
#endif // OPENSPACE_HAS_SPOUT
+16
View File
@@ -55,6 +55,9 @@
#include <openspace/scene/rotation.h>
#include <openspace/scene/scale.h>
#include <openspace/engine/moduleengine.h>
#ifdef WIN32
#include <Windows.h>
#endif // WIN32
namespace {
const std::string ConfigurationFile = "openspace.cfg";
@@ -127,8 +130,21 @@ int main(int argc, char** argv) {
constexpr const char* BasePathToken = "${BASE}";
FileSys.registerPathToken(BasePathToken, base);
// Using same configuration for size as in apps/OpenSpace/main.cpp
glm::ivec2 size = glm::ivec2(1920, 1080);
#ifdef WIN32
DEVMODEW dm = { 0 };
dm.dmSize = sizeof(DEVMODEW);
BOOL success = EnumDisplaySettingsW(nullptr, ENUM_CURRENT_SETTINGS, &dm);
if (success) {
size.x = dm.dmPelsWidth;
size.y = dm.dmPelsHeight;
}
#endif // WIN32
*global::configuration = configuration::loadConfigurationFromFile(
configFile.string(),
size,
""
);
openspace::global::openSpaceEngine->registerPathTokens();
+5 -4
View File
@@ -77,6 +77,11 @@ int main(int argc, char** argv) {
)
);
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Debug,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
commandlineParser.setCommandLine(arguments);
commandlineParser.execute();
@@ -98,10 +103,6 @@ int main(int argc, char** argv) {
settings.changeHostPassword = defaultChangeHostPassword.str();
}
ghoul::logging::LogManager::initialize(
ghoul::logging::LogLevel::Debug,
ghoul::logging::LogManager::ImmediateFlush::Yes
);
LINFO(fmt::format("Connection password: {}", settings.password));
LINFO(fmt::format("Host password: {}", settings.changeHostPassword));
+67
View File
@@ -0,0 +1,67 @@
{
"version": 1,
"masteraddress": "localhost",
"externalcontrolport": 20500,
"settings": {
"display": {
"swapinterval": 0
}
},
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"name": "OpenSpace",
"pos": { "x": 50, "y": 50 },
"size": { "x": 1280, "y": 720 },
"stereo": "none",
"tags": [ "Spout" ],
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"tracked": true,
"projection": {
"type": "PlanarProjection",
"fov": {
"hfov": 80.0,
"vfov": 50.53401565551758
},
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 }
}
}
]
},
{
"name": "GUI",
"pos": { "x": 50, "y": 50 },
"size": { "x": 1280, "y": 720 },
"stereo": "none",
"tags": [ "GUI" ],
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"type": "PlanarProjection",
"fov": {
"hfov": 80.0,
"vfov": 50.53401565551758
},
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 }
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.06499999761581421,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
-36
View File
@@ -1,36 +0,0 @@
{
"version": 1,
"masteraddress": "localhost",
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"fullscreen": false,
"name": "OpenSpace",
"stereo": "none",
"size": { "x": 1024, "y": 1024 },
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"type": "SpoutOutputProjection",
"quality": "1k",
"mappingspoutname": "OpenSpace",
"background": { "r": 0.1, "g": 0.1, "b": 0.1, "a": 1.0 }
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.06,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
+60
View File
@@ -0,0 +1,60 @@
{
"version": 1,
"masteraddress": "localhost",
"scene": {
"offset": { "x": 0.0, "y": 0.0, "z": 0.0 },
"orientation": { "yaw": 0.0, "pitch": -90.0, "roll": 0.0 },
"scale": 1.0
},
"settings": {
"display": {
"swapinterval": 1
}
},
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"name": "OpenSpace",
"size": { "x": 1024, "y": 1024 },
"stereo": "none",
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"type": "SpoutOutputProjection",
"background": {
"r": 0.1,
"g": 0.1,
"b": 0.1,
"a": 1.0
},
"channels": {
"bottom": true,
"left": true,
"right": true,
"top": true,
"zleft": true,
"zright": true
},
"mapping": "cubemap",
"mappingspoutname": "OS_CUBEMAP",
"orientation": { "pitch": 0.0, "roll": 0.0, "yaw": 0.0 },
"quality": "1024"
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.05999999865889549,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
+60
View File
@@ -0,0 +1,60 @@
{
"version": 1,
"masteraddress": "localhost",
"scene": {
"offset": { "x": 0.0, "y": 0.0, "z": 0.0 },
"orientation": { "yaw": 0.0, "pitch": -90.0, "roll": 0.0 },
"scale": 1.0
},
"settings": {
"display": {
"swapinterval": 1
}
},
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"name": "OpenSpace",
"size": { "x": 1024, "y": 1024 },
"stereo": "none",
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"type": "SpoutOutputProjection",
"background": {
"r": 0.1,
"g": 0.1,
"b": 0.1,
"a": 1.0
},
"channels": {
"bottom": true,
"left": true,
"right": true,
"top": true,
"zleft": true,
"zright": true
},
"mapping": "equirectangular",
"mappingspoutname": "OS_EQUIRECTANGULAR",
"orientation": { "pitch": 0.0, "roll": 0.0, "yaw": 0.0 },
"quality": "1024"
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.06,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
+60
View File
@@ -0,0 +1,60 @@
{
"version": 1,
"masteraddress": "localhost",
"scene": {
"offset": { "x": 0.0, "y": 0.0, "z": 0.0 },
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 },
"scale": 1.0
},
"settings": {
"display": {
"swapinterval": 1
}
},
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"name": "OpenSpace",
"size": { "x": 1024, "y": 1024 },
"stereo": "none",
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"type": "SpoutOutputProjection",
"background": {
"r": 0.1,
"g": 0.1,
"b": 0.1,
"a": 1.0
},
"channels": {
"bottom": false,
"left": true,
"right": true,
"top": true,
"zleft": true,
"zright": false
},
"mapping": "fisheye",
"mappingspoutname": "OS_FISHEYE",
"orientation": { "pitch": 0.0, "roll": 0.0, "yaw": 45.0 },
"quality": "1024"
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.06,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
+59
View File
@@ -0,0 +1,59 @@
{
"version": 1,
"masteraddress": "localhost",
"scene": {
"offset": { "x": 0.0, "y": 0.0, "z": 0.0 },
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 },
"scale": 1.0
},
"settings": {
"display": {
"swapinterval": 1
}
},
"nodes": [
{
"address": "localhost",
"port": 20401,
"windows": [
{
"name": "OpenSpace",
"size": { "x": 1440, "y": 810 },
"stereo": "none",
"viewports": [
{
"pos": { "x": 0.0, "y": 0.0 },
"size": { "x": 1.0, "y": 1.0 },
"projection": {
"PlanarProjection": {
"fov": {
"hfov": 80.0,
"vfov": 50.534015846724
},
"orientation": { "yaw": 0.0, "pitch": 0.0, "roll": 0.0 }
},
"background": {
"r": 0.1,
"g": 0.1,
"b": 0.1,
"a": 1.0
},
"drawMain": true,
"height": "1080",
"mappingspoutname": "OS_FLAT",
"type": "SpoutFlatProjection",
"width": "1920"
}
}
]
}
]
}
],
"users": [
{
"eyeseparation": 0.05999999865889549,
"pos": { "x": 0.0, "y": 0.0, "z": 0.0 }
}
]
}
+13 -3
View File
@@ -99,7 +99,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.action.removeAction(toggle_trail.Identifier)
openspace.action.removeAction(show_trail.Identifier)
openspace.action.removeAction(hide_trail.Identifier)
openspace.action.removeAction(toggle_trail)
openspace.action.removeAction(show_trail)
openspace.action.removeAction(hide_trail)
end)
asset.meta = {
Name = "Actions - Toggle current Trails",
Version = "1.0",
Description = [[ Asset providing actions to toggle trails]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
-1
View File
@@ -24,7 +24,6 @@ asset.require("util/launcher_images")
asset.require("scene/milkyway/exoplanets/exoplanets_data")
asset.require("scene/milkyway/exoplanets/exoplanets_textures")
local assetHelper = asset.require("util/asset_helper")
asset.require("scene/digitaluniverse/2dF")
asset.require("scene/digitaluniverse/2mass")
asset.require("scene/digitaluniverse/6dF")
+2 -3
View File
@@ -1,6 +1,5 @@
-- This is a blank scene that that just sets up the default menus/dasboard/keys, etc.
local assetHelper = asset.require("util/asset_helper")
local propertyHelper = asset.require("util/property_helper")
-- Specifying which other assets should be loaded in this scene
@@ -59,9 +58,9 @@ asset.onInitialize(function ()
end)
asset.onDeinitialize(function ()
openspace.action.removeAction(toggle_trails.Identifier)
openspace.action.removeAction(toggle_trails)
openspace.clearKey(toggle_trails.Key)
openspace.action.removeAction(toggle_planet_labels.Identifier)
openspace.action.removeAction(toggle_planet_labels)
openspace.clearKey(toggle_planet_labels.Key)
end)
@@ -87,3 +87,14 @@ asset.onInitialize(function ()
end
end
end)
asset.meta = {
Name = "Customization - GlobeBrowsing",
Version = "1.0",
Description = [[ This asset adds planetary images that can be downloaded separately
and placed in the OpenSpaceData folder]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+10
View File
@@ -6,3 +6,13 @@ asset.export("webguiDevelopmentMode", false)
-- 2) Clone the repository: https://github.com/OpenSpace/OpenSpace-WebGuiFrontend
-- 3) Install nodejs (including npm)
-- 4) Within the repository, run `npm install` and `npm start`
asset.meta = {
Name = "Customization - User Interface",
Version = "1.0",
Description = [[ This asset is used by developers working on the GUI.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -9,5 +9,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - Date",
Version = "1.0",
Description = [[ This asset provides a Date dashboard item.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
@@ -4,3 +4,13 @@ asset.require("./distance")
asset.require("./framerate")
asset.require("./parallelconnection")
asset.require("./globelocation")
asset.meta = {
Name = "Dashboard - Default Items",
Version = "1.0",
Description = [[ This asset provides the default items for the dashboard.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -9,5 +9,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - Distance",
Version = "1.0",
Description = [[ This asset provides a Distance dashboard item.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -9,5 +9,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - Framerate",
Version = "1.0",
Description = [[ This asset provides a Framerate dashboard item.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -9,5 +9,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - GlobeLocation",
Version = "1.0",
Description = [[ This asset provides a GlobeLocation dashboard item.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -9,5 +9,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - ParallelConnection",
Version = "1.0",
Description = [[ This asset provides a ParallelConnection dashboard item.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
@@ -9,5 +9,18 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - Simulation Increment",
Version = "1.0",
Description = [[ This asset provides a dashboard item that shows the simulation
increment, meaning how fast the in-game time progresses relative to the wall-clock.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+13 -1
View File
@@ -10,5 +10,17 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(item.Identifier)
openspace.dashboard.removeDashboardItem(item)
end)
asset.export(item)
asset.meta = {
Name = "Dashboard - Velocity",
Version = "1.0",
Description = [[ This asset provides a dashboard item that shows the camera's velocity]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}
+31 -55
View File
@@ -1,5 +1,4 @@
local assetHelper = asset.require("util/asset_helper")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.syncedResource({
@@ -28,12 +27,7 @@ local animationLoop = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -62,12 +56,7 @@ local animationLoopInf = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -96,12 +85,7 @@ local animationOnce = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -130,12 +114,7 @@ local animationBounceInf = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -164,12 +143,7 @@ local animationBounce = {
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -181,13 +155,28 @@ local animationBounce = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
animationLoop,
animationLoopInf,
animationOnce,
animationBounceInf,
animationBounce
})
asset.onInitialize(function()
openspace.addSceneGraphNode(animationLoop)
openspace.addSceneGraphNode(animationLoopInf)
openspace.addSceneGraphNode(animationOnce)
openspace.addSceneGraphNode(animationBounceInf)
openspace.addSceneGraphNode(animationBounce)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(animationBounce)
openspace.removeSceneGraphNode(animationBounceInf)
openspace.removeSceneGraphNode(animationOnce)
openspace.removeSceneGraphNode(animationLoopInf)
openspace.removeSceneGraphNode(animationLoop)
end)
asset.export(animationLoop)
asset.export(animationLoopInf)
asset.export(animationOnce)
asset.export(animationBounceInf)
asset.export(animationBounce)
-- Asset
asset.meta = {
@@ -196,17 +185,11 @@ asset.meta = {
Description = "Simple animation example asset with an animated box model",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {
"animationLoop",
"animationLoopInf",
"animationOnce",
"animationBounceInf",
"animationBounce"
}
License = "MIT license"
}
-- Model
-- @TODO: At the moment, this overwrites the previous meta description. Probably needs a way to specify multiple meta's per file?
asset.meta = {
Name = "Animated Box Model",
Version = "1.0",
@@ -216,12 +199,5 @@ asset.meta = {
License = [[
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]],
Identifiers = {
"animationLoop",
"animationLoopInf",
"animationOnce",
"animationBounceInf",
"animationBounce"
}
]]
}
+4 -10
View File
@@ -1,5 +1,4 @@
local assetHelper = asset.require("util/asset_helper")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local generic_action = {
@@ -35,12 +34,7 @@ local obj = {
GeometryFile = model .. "BoxAnimated.glb",
ModelScale = 1.0,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
@@ -63,6 +57,6 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(obj.Identifier)
openspace.action.removeAction(generic_action.Identifier)
openspace.removeSceneGraphNode(obj)
openspace.action.removeAction(generic_action)
end)
+83 -49
View File
@@ -1,50 +1,84 @@
local assetHelper = asset.require("util/asset_helper")
local angle = {
Type = "DashboardItemAngle",
Identifier = "Angle",
GuiName = "Angle",
ReferenceType = "Node",
ReferenceNodeName = "Earth",
DestinationType = "Node",
DestinationNodeName = "Moon"
}
assetHelper.registerDashboardItems(asset, {
{
Type = "DashboardItemAngle",
Identifier = "Angle",
GuiName = "Angle",
ReferenceType = "Node",
ReferenceNodeName = "Earth",
DestinationType = "Node",
DestinationNodeName = "Moon"
},
{
Type = "DashboardItemDate",
Identifier = "Date",
GuiName = "Date"
},
{
Type = "DashboardItemSimulationIncrement",
Identifier = "SimulationIncrement",
GuiName = "Simulation Increment"
},
{
Type = "DashboardItemDistance",
Identifier = "Distance",
GuiName = "Distance"
},
{
Type = "DashboardItemFramerate",
Identifier = "Framerate",
GuiName = "Framerate"
},
{
Type = "DashboardItemParallelConnection",
Identifier = "ParallelConnection",
GuiName = "Parallel Connection"
},
{
Type = "DashboardItemMission",
Identifier = "Mission",
GuiName = "Mission"
},
{
Type = "DashboardItemPropertyValue",
Identifier = "asd",
GuiName = "adasd",
URI = "Scene.Earth.Renderable.Enabled",
DisplayString = "Earth is enabled: {}"
}
})
local date = {
Type = "DashboardItemDate",
Identifier = "Date",
GuiName = "Date"
}
local simulation_increment = {
Type = "DashboardItemSimulationIncrement",
Identifier = "SimulationIncrement",
GuiName = "Simulation Increment"
}
local distance = {
Type = "DashboardItemDistance",
Identifier = "Distance",
GuiName = "Distance"
}
local framerate = {
Type = "DashboardItemFramerate",
Identifier = "Framerate",
GuiName = "Framerate"
}
local parallel_connection = {
Type = "DashboardItemParallelConnection",
Identifier = "ParallelConnection",
GuiName = "Parallel Connection"
}
local mission = {
Type = "DashboardItemMission",
Identifier = "Mission",
GuiName = "Mission"
}
local property_value = {
Type = "DashboardItemPropertyValue",
Identifier = "asd",
GuiName = "adasd",
URI = "Scene.Earth.Renderable.Enabled",
DisplayString = "Earth is enabled: {}"
}
asset.onInitialize(function()
openspace.dashboard.addDashboardItem(angle)
openspace.dashboard.addDashboardItem(date)
openspace.dashboard.addDashboardItem(simulation_increment)
openspace.dashboard.addDashboardItem(distance)
openspace.dashboard.addDashboardItem(framerate)
openspace.dashboard.addDashboardItem(parallel_connection)
openspace.dashboard.addDashboardItem(mission)
openspace.dashboard.addDashboardItem(property_value)
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(property_value)
openspace.dashboard.removeDashboardItem(mission)
openspace.dashboard.removeDashboardItem(parallel_connection)
openspace.dashboard.removeDashboardItem(framerate)
openspace.dashboard.removeDashboardItem(distance)
openspace.dashboard.removeDashboardItem(simulation_increment)
openspace.dashboard.removeDashboardItem(date)
openspace.dashboard.removeDashboardItem(angle)
end)
asset.export(property_value)
asset.export(mission)
asset.export(parallel_connection)
asset.export(framerate)
asset.export(distance)
asset.export(simulation_increment)
asset.export(date)
asset.export(angle)
+13 -6
View File
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
-- @TODO (emmbr 2020-02-03) Potential threading issue later on? This will run on the main thread
local cyanTexture = openspace.createSingleColorImage("example_disc_color1", { 0.0, 1.0, 1.0 })
local purpleTexture = openspace.createSingleColorImage("example_disc_color2", { 0.5, 0.0, 0.5 })
@@ -40,7 +38,16 @@ local FullEllipticDisc = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
BasicDisc,
FullEllipticDisc
})
asset.onInitialize(function()
openspace.addSceneGraphNode(BasicDisc)
openspace.addSceneGraphNode(FullEllipticDisc)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(FullEllipticDisc)
openspace.removeSceneGraphNode(BasicDisc)
end)
asset.export(BasicDisc)
asset.export(FullEllipticDisc)
+9 -2
View File
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local earth = asset.require("scene/solarsystem/planets/earth/earth")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
@@ -44,4 +43,12 @@ local Example_GlobeRotation = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Example_GlobeRotation })
asset.onInitialize(function()
openspace.addSceneGraphNode(Example_GlobeRotation)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Example_GlobeRotation)
end)
asset.export(Example_GlobeRotation)
+12 -5
View File
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local earth = asset.require("scene/solarsystem/planets/earth/earth")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
@@ -53,7 +52,15 @@ local Example_Adaptive_Height = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
Example_Fixed_Height,
Example_Adaptive_Height
})
asset.onInitialize(function()
openspace.addSceneGraphNode(Example_Fixed_Height)
openspace.addSceneGraphNode(Example_Adaptive_Height)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Example_Adaptive_Height)
openspace.removeSceneGraphNode(Example_Fixed_Height)
end)
asset.export(Example_Fixed_Height)
asset.export(Example_Adaptive_Height)
+18 -8
View File
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper)
local scale = 149597870700 -- 1 AU
local radialGrid = {
@@ -90,9 +88,21 @@ local boxGrid = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radialGrid,
planarGrid,
sphericalGrid,
boxGrid
})
asset.onInitialize(function()
openspace.addSceneGraphNode(radialGrid)
openspace.addSceneGraphNode(planarGrid)
openspace.addSceneGraphNode(sphericalGrid)
openspace.addSceneGraphNode(boxGrid)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(boxGrid)
openspace.removeSceneGraphNode(sphericalGrid)
openspace.removeSceneGraphNode(planarGrid)
openspace.removeSceneGraphNode(radialGrid)
end)
asset.export(radialGrid)
asset.export(sphericalGrid)
asset.export(planarGrid)
asset.export(boxGrid)
+2 -2
View File
@@ -33,14 +33,14 @@ function previous()
stateMachine.goToPreviousState()
end
asset.onInitialize(function ()
asset.onInitialize(function()
stateMachine = stateMachineHelper.createStateMachine(states)
openspace.bindKey("RIGHT", "next()")
openspace.bindKey("LEFT", "previous()")
end)
asset.onDeinitialize(function ()
asset.onDeinitialize(function()
stateMachine = nil
openspace.clearKey("RIGHT")
openspace.clearKey("LEFT")
@@ -1,5 +1,4 @@
local assetHelper = asset.require("util/asset_helper")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.syncedResource({
@@ -23,12 +22,7 @@ local model = {
GeometryFile = model .. "BoxAnimated.glb",
ModelScale = 3E7,
LightSources = {
{
Type = "SceneGraphLightSource",
Identifier = "Sun",
Node = sunTransforms.SolarSystemBarycenter.Identifier,
Intensity = 1.0
}
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true,
@@ -42,4 +36,12 @@ local model = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { model })
asset.onInitialize(function()
openspace.addSceneGraphNode(model)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(model)
end)
asset.export(model)
+12 -6
View File
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local scale = 149597870700 -- 1 AU
local circle = {
@@ -46,7 +44,15 @@ local ellipse = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
circle,
ellipse
})
asset.onInitialize(function()
openspace.addSceneGraphNode(circle)
openspace.addSceneGraphNode(ellipse)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(ellipse)
openspace.removeSceneGraphNode(circle)
end)
asset.export(circle)
asset.export(ellipse)
@@ -1,6 +1,5 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SPOUT enabled
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
@@ -22,5 +21,12 @@ local RenderablePlaneImageOnline = {
local objects = { RenderablePlaneImageOnline }
assetHelper.registerSceneGraphNodesAndExport(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(RenderablePlaneImageOnline)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(RenderablePlaneImageOnline)
end)
asset.export(RenderablePlaneImageOnline)
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local spec = {
Type = "ScreenSpaceBrowser",
Identifier = "ScreenSpaceBrowserExample",
@@ -7,4 +5,12 @@ local spec = {
Url = "https://www.openspaceproject.com/"
};
assetHelper.registerScreenSpaceRenderables(asset, { spec })
asset.onInitialize(function()
openspace.addScreenSpaceRenderable(spec)
end)
asset.onDeinitialize(function()
openspace.removeScreenSpaceRenderable(spec)
end)
asset.export(spec)
+9 -3
View File
@@ -1,6 +1,5 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SPOUT enabled
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
@@ -21,5 +20,12 @@ local Spout = {
local objects = { Spout }
assetHelper.registerSceneGraphNodesAndExport(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(Spout)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Spout)
end)
asset.export(Spout)
+22 -3
View File
@@ -1,4 +1,4 @@
local assetHelper = asset.require("util/asset_helper")
local spheres = {}
local i = 1
for z=1,3 do
@@ -9,7 +9,7 @@ for z=1,3 do
Transform = {
Translation = {
Type = "StaticTranslation",
Position = {x, y, z}
Position = { x, y, z }
}
},
Renderable = {
@@ -26,8 +26,27 @@ for z=1,3 do
Path = "/Other/Spheres"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { sphere })
table.insert(spheres, sphere)
i = i + 1
end
end
end
asset.onInitialize(function()
for _, n in ipairs(spheres) do
openspace.addSceneGraphNode(n)
end
end)
asset.onDeinitialize(function()
for _, n in ipairs(spheres) do
openspace.removeSceneGraphNode(n)
end
end)
for _, n in ipairs(spheres) do
asset.export(n)
end
@@ -40,11 +40,16 @@ local layer_folder = {
Description = [[ Temporal coverage: 01 Jan 1981 - 31 Dec 2020.]]
}
asset.onInitialize(function ()
asset.onInitialize(function()
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_prototype)
openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer_folder)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer_folder)
openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer_prototype)
end)
asset.export("layer", layer_prototype)
asset.meta = {
@@ -1,7 +1,5 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SYNC enabled
local assetHelper = asset.require("util/asset_helper")
asset.syncedResource({
Name = "Example Single",
Type = "UrlSynchronization",
@@ -4,7 +4,6 @@
-- the volume data itself needs to be generated,
-- using the task 'data/tasks/volume/generate_cartesian.task'
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local sunRadius = 695508000
@@ -34,5 +33,12 @@ local volume = {
}
}
local objects = { volume }
assetHelper.registerSceneGraphNodes(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)
asset.export(volume)
@@ -4,35 +4,41 @@
-- the volume data itself needs to be generated,
-- using the task 'data/tasks/volume/generate_cartesian_sequence.task'
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local sunRadius = 695508000
local volume = {
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("cartesiansequence"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * sunRadius
}
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("cartesiansequence"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * sunRadius
}
}
}
local objects = { volume }
assetHelper.registerSceneGraphNodes(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)
asset.export(volume)
@@ -4,35 +4,41 @@
-- the volume data itself needs to be generated,
-- using the task 'data/tasks/volume/generate_spherical.task'
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local astronomicalUnit = 149597870700
local volume = {
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("spherical"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Spherical",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = astronomicalUnit
}
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("spherical"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Spherical",
SecondsBefore = 50*365*24*60*60, -- 50 years before
SecondsAfter = 50*365*24*60*60 -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = astronomicalUnit
}
}
}
local objects = { volume }
assetHelper.registerSceneGraphNodes(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(volume)
end)
asset.export(volume)
+9 -3
View File
@@ -1,6 +1,5 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_TOYVOLUME enabled
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local ToyVolume = {
@@ -18,5 +17,12 @@ local ToyVolume = {
}
}
local objects = { ToyVolume }
assetHelper.registerSceneGraphNodesAndExport(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(ToyVolume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(ToyVolume)
end)
asset.export(ToyVolume)
+17 -2
View File
@@ -1,5 +1,20 @@
local assetHelper = asset.require("util/asset_helper")
local bookmarkHelper = asset.require("util/generate_bookmarks")
local nodes = bookmarkHelper.getBookmarks("Local Bookmarks", "${ASSETS}/customization/localbookmarks.csv")
assetHelper.registerSceneGraphNodesAndExport(asset, nodes);
asset.onInitialize(function()
for _, n in ipairs(nodes) do
openspace.addSceneGraphNode(n)
end
end)
asset.onDeinitialize(function()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n)
end
end)
for _, n in ipairs(nodes) do
asset.export(n)
end
+5 -2
View File
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local bookmarkHelper = asset.require("util/generate_bookmarks")
local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v1/bookmarks.csv"
@@ -23,6 +22,10 @@ end)
asset.onDeinitialize(function ()
for _, n in ipairs(nodes) do
openspace.removeSceneGraphNode(n.Identifier);
openspace.removeSceneGraphNode(n);
end
end)
for _, n in ipairs(nodes) do
asset.export(n);
end
-2
View File
@@ -1,7 +1,5 @@
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SYNC enabled
local assetHelper = asset.require("util/asset_helper")
asset.syncedResource({
Type = "UrlSynchronization",
Name = "Icons",
+13 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "2dF Textures",
Type = "HttpSynchronization",
@@ -53,15 +49,24 @@ local object = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "2dF Galaxies",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for the The Two-degree Field (2dF) Survey.]],
Author = "Brian Abbott (AMNH), Eric Gawiser (Rutgers U)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"2dF"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "2MASS Textures",
Type = "HttpSynchronization",
@@ -49,16 +45,24 @@ local object = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "2MASS Galaxies",
Version = "1.0",
Version = "1.1",
Description = [[ Digital Universe asset for the Two Micron All-Sky Survey (2MASS)
survey]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"2MASS"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "6dF Textures",
Type = "HttpSynchronization",
@@ -51,15 +47,23 @@ local object = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "6dF Galaxies",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for The Six-degree Field (6dF) Galaxy Survey]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"6dF"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Abell Textures",
Type = "HttpSynchronization",
@@ -60,15 +56,23 @@ local object = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Abell Galaxy Clusters",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for The Abell catalog]],
Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Abell"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Alternate Star Labels Speck Files",
Type = "HttpSynchronization",
@@ -37,14 +33,23 @@ local object = {
}
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Stars Labels - Alternate",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for alternate start labels]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"StarLabelsAlternate"}
License = "AMNH Digital Universe"
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Background Radiation Speck Files",
Type = "HttpSynchronization",
@@ -33,7 +29,7 @@ local wmap = {
Texture = textures .. "wmap_ilc_7yr_v4_200uK_RGB_sos.png",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -59,7 +55,7 @@ local cbe = {
Texture = textures .. "COBErect.png",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -85,7 +81,7 @@ local planck = {
Texture = textures .. "cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -111,7 +107,7 @@ local Halpha = {
Opacity = 0.4,
Texture = textures .. "mwHalpha-f.png",
Orientation = "Inside",
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
MirrorTexture = true,
FadeOutThreshold = 0.025,
Background = true
@@ -123,14 +119,30 @@ local Halpha = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
wmap, cbe, planck, Halpha
})
asset.onInitialize(function()
openspace.addSceneGraphNode(wmap)
openspace.addSceneGraphNode(cbe)
openspace.addSceneGraphNode(planck)
openspace.addSceneGraphNode(Halpha)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Halpha)
openspace.removeSceneGraphNode(planck)
openspace.removeSceneGraphNode(cbe)
openspace.removeSceneGraphNode(wmap)
end)
asset.export(wmap)
asset.export(cbe)
asset.export(planck)
asset.export(Halpha)
asset.meta = {
Name = "Background Radiation",
Version = "2.0",
Version = "2.1",
Description = [[Various AllSky images for the Milky Way and observable Universe.
Included: Wilkinson Microwave Anisotropy Probe (WMAP), Cosmic Background Explorer,
Planck, and H Alpha <br><br> Data Reference: Planck/ESA and the Planck
@@ -138,6 +150,5 @@ asset.meta = {
Finkbeiner (Princeton)]],
Author = "Brian Abbott (AMNH), OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"WMAP", "CBE", "Planck", "HAlpha"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Background Radiation Textures",
Type = "HttpSynchronization",
@@ -30,7 +26,7 @@ local multiverse_planck_1 = {
Texture = textures .. "cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -60,7 +56,7 @@ local multiverse_planck_2 = {
Texture = textures .. "cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -90,7 +86,7 @@ local multiverse_planck_3 = {
Texture = textures .. "cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -120,7 +116,7 @@ local multiverse_planck_4 = {
Texture = textures .. "cmb4k.jpg",
Orientation = "Both",
MirrorTexture = true,
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
FadeInThreshold = 0.4
},
GUI = {
@@ -130,20 +126,34 @@ local multiverse_planck_4 = {
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, multiverse_planck_4
})
asset.onInitialize(function()
openspace.addSceneGraphNode(multiverse_planck_1)
openspace.addSceneGraphNode(multiverse_planck_2)
openspace.addSceneGraphNode(multiverse_planck_3)
openspace.addSceneGraphNode(multiverse_planck_4)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(multiverse_planck_4)
openspace.removeSceneGraphNode(multiverse_planck_3)
openspace.removeSceneGraphNode(multiverse_planck_2)
openspace.removeSceneGraphNode(multiverse_planck_1)
end)
asset.export(multiverse_planck_1)
asset.export(multiverse_planck_2)
asset.export(multiverse_planck_3)
asset.export(multiverse_planck_4)
asset.meta = {
Name = "Multiverse Background Radiation",
Version = "2.0",
Version = "2.1",
Description = [[ Non-physical representation of the location of hypothetical
cosmic microwave background radiation images how they would be observed from other
locations in the universe. <br> This is not a measured dataset!]],
Author = "Brian Abbott (AMNH), OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = { "PlanckMultiverse1", "PlanckMultiverse2",
"PlanckMultiverse3", "PlanckMultiverse4" }
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Clusters Speck Files",
Type = "HttpSynchronization",
@@ -40,15 +36,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Galaxy Clusters Labels",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for Galaxy Clusters]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"GalaxyClusterLabels"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local data = asset.syncedResource({
Name = "Constellation Bounds Data",
Type = "HttpSynchronization",
@@ -42,16 +38,24 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Constellation Bounds",
Version = "1.0",
Version = "1.1",
Description = [[DU asset providing a Spherical mesh dividing the sky into regions that
fit the constellations.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"ConstellationBounds"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Constellation Speck Files",
Type = "HttpSynchronization",
@@ -60,15 +56,26 @@ local constellations = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { constellationsExtragalactic, constellations })
asset.onInitialize(function()
openspace.addSceneGraphNode(constellationsExtragalactic)
openspace.addSceneGraphNode(constellations)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(constellations)
openspace.removeSceneGraphNode(constellationsExtragalactic)
end)
asset.export(constellationsExtragalactic)
asset.export(constellations)
asset.meta = {
Name = "Constellations",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for constellation lines]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Constellations", "ConstellationsExtragalactic"}
License = "AMNH Digital Universe"
}
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Deep Sky Objects Textures",
Type = "HttpSynchronization",
@@ -92,15 +90,26 @@ local deepSkyImages = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { deepSkyPoints, deepSkyImages })
asset.onInitialize(function()
openspace.addSceneGraphNode(deepSkyPoints)
openspace.addSceneGraphNode(deepSkyImages)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(deepSkyImages)
openspace.removeSceneGraphNode(deepSkyPoints)
end)
asset.export(deepSkyPoints)
asset.export(deepSkyImages)
asset.meta = {
Name = "Deep Sky Objects Images",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for Deep Sky Objects and their Images]],
Author = "Nate Greenstein, Matt Everhart, Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"DeepSkyObjects", "DeepSkyObjectsImages"}
License = "AMNH Digital Universe"
}
@@ -34,3 +34,14 @@ asset.require("./superclusters")
asset.require("./supernovaremnants")
asset.require("./tully")
asset.require("./voids")
asset.meta = {
Name = "Digital Universe",
Version = "1.0",
Description = [[This asset is a meta asset, containing all the assets from the AMNH
Digital Universe.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Brown Dwarf Textures",
Type = "HttpSynchronization",
@@ -62,15 +58,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Brown Dwarfs",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Brown Dwarfs]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Dwarfs"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Exoplanets Textures",
Type = "HttpSynchronization",
@@ -50,15 +46,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Exoplanets",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for Exoplanets]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Exoplanets"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Globular Clusters Textures",
Type = "HttpSynchronization",
@@ -54,12 +50,21 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Globular Clusters",
Version = "2.0",
Version = "2.1",
Description = [[Census: 157 globular clusters. DU Version 2.6. Globular star clusters
are gravitationally bound groups of 100,000 to 1 million stars. They are compact,
spherical “balls” of stars with very high stellar densities in their centers (stars
@@ -73,6 +78,5 @@ asset.meta = {
Properties of Galactic Globular Clusters, C. Francis+ (U Cambridge)]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"GlobularClusters"}
License = "AMNH Digital Universe"
}
+26 -12
View File
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local earth_transforms = asset.require("scene/solarsystem/planets/earth/transforms")
@@ -513,16 +512,35 @@ local plane20Gly = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels, galactic,
galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly, plane100ly, plane1kly,
plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly, plane20Gly
})
local nodes = {
radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels,
galactic, galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly,
plane100ly, plane1kly, plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly,
plane20Gly
}
asset.onInitialize(function()
for i, node in ipairs(nodes) do
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]
openspace.removeSceneGraphNode(node)
end
end)
for i, node in ipairs(nodes) do
asset.export(node)
end
asset.meta = {
Name = "Grids",
Version = "2.0",
Version = "2.1",
Description = [[Various grids for showing size reference. Included: 10,000 light year
grid, 10 light year grid, 20 billion light year grid, 10 million light year grid,
100 light year grid, 100 million light year grid, Ecliptic Coordinate Sphere
@@ -532,9 +550,5 @@ asset.meta = {
1,000 light year grid, 1 million light year grid, 1 light year grid]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"RadioSphere", "OortSphere", "EclipticSphere", "EclipticSphereLabels",
"Equatorial", "EquatorialSphereLabels", "GalacticSphere", "GalacticSphereLabels",
"1ldGrid", "1lmGrid", "1lyGrid", "10lyGrid", "100lyGrid", "1klyGrid", "10klyGrid",
"100klyGrid", "1MlyGrid", "10MlyGrid", "100MlyGrid", "20GlyGrid"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Galaxy Groups Speck Files",
Type = "HttpSynchronization",
@@ -40,15 +36,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Galaxy Group Labels",
Version = "1.0",
Version = "1.1",
Author = "Brian Abbott (AMNH)",
Description = [[Digital Universe asset for Galaxy Groups]],
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"NearbyGalaxyGroups"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "HII Regions Textures",
Type = "HttpSynchronization",
@@ -52,15 +48,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "HII Regions",
Version = "1.0",
Version = "1.1",
Description = [[Digital Universe asset for HII Regions]],
Author = "Carter Emmart, Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"HIIRegions"}
License = "AMNH Digital Universe"
}
+11 -5
View File
@@ -1,5 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local circle = asset.syncedResource({
Name = "Circle",
Type = "HttpSynchronization",
@@ -48,14 +46,22 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Hubble Ultra Deep Field",
Version = "1.1",
Version = "1.2",
Description = "Hubble Ultra Deep Field galaxy survey",
Author = "Frank Summers (STScI), Brian Abbott (AMNH)",
Identifiers = {"HubbleDeepField"},
URL = "http://www.haydenplanetarium.org/universe",
License = [[
Copyright (c) American Museum of Natural History. All rights reserved.<br><br>
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Kepler Textures",
Type = "HttpSynchronization",
@@ -48,15 +44,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Kepler Planetary Candidates",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Kepler Planetary Candidates]],
Author = "Brian Abbott, Emily Rice, and Jason No (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"KeplerPlanetaryCandidates"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Local Dwarfs Textures",
Type = "HttpSynchronization",
@@ -54,15 +50,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Local Group",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for the Local Goup]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"LocalDwarfGalaxies"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local planeTextures = asset.syncedResource({
Name = "Milky Way Plane Textures",
Type = "HttpSynchronization",
@@ -47,16 +43,24 @@ local plane = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { plane })
asset.onInitialize(function()
openspace.addSceneGraphNode(plane)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(plane)
end)
asset.export(plane)
asset.meta = {
Name = "MilkyWay Galaxy",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset containt 2D image of the MilkyWay. For
extragalactic viewing]],
Author = "Brian Abbott, Carter Emmart (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"MilkyWayGalaxyImage"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local planeTextures = asset.syncedResource({
Name = "Milky Way Plane Textures",
Type = "HttpSynchronization",
@@ -44,12 +40,21 @@ local plane = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { plane })
asset.onInitialize(function()
openspace.addSceneGraphNode(plane)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(plane)
end)
asset.export(plane)
asset.meta = {
Name = "Milky Way Arms Labels",
Version = "1.0",
Version = "1.1",
Description = [[ Image with arm labels for the Milky Way galaxy]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
@@ -72,6 +77,5 @@ asset.meta = {
WARRANTY of any kind. We provide the Atlas as is and take no responsibility for
any damage resulting from the use of this Atlas. The entire risk as to the quality
and performance of this product is with the user. <br><br> For more information,
please visit http://www.haydenplanetarium.org/universe]],
Identifiers = {"MilkyWayGalaxyArmLabelsImage"}
please visit http://www.haydenplanetarium.org/universe]]
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local homespeck = asset.syncedResource({
Name = "Home Speck File",
Type = "HttpSynchronization",
@@ -40,15 +36,23 @@ local homeLabel = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { homeLabel })
asset.onInitialize(function()
openspace.addSceneGraphNode(homeLabel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(homeLabel)
end)
asset.export(homeLabel)
asset.meta = {
Name = "Home Label",
Version = "1.0",
Version = "1.1",
Description = [[Label for the Milky Way titled "Home", sided for the galactic level]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"HomeLabel"}
License = "MIT license"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local sphereTextures = asset.syncedResource({
Name = "Milky Way Sphere Textures",
Type = "HttpSynchronization",
@@ -25,7 +21,7 @@ local sphere = {
Opacity = 0.35,
Texture = sphereTextures .. "DarkUniverse_mellinger_4k.jpg",
Orientation = "Inside",
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
MirrorTexture = true,
FadeOutThreshold = 0.0015,
Background = true
@@ -38,15 +34,23 @@ local sphere = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { sphere })
asset.onInitialize(function()
openspace.addSceneGraphNode(sphere)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(sphere)
end)
asset.export(sphere)
asset.meta = {
Name = "Milky Way Galaxy Sphere",
Version = "2.0",
Version = "2.1",
Description = [[All sky image of the Milky Way]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"MilkyWay"}
License = "MIT license"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "OB Associations Textures",
Type = "HttpSynchronization",
@@ -56,15 +52,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "OB Associations",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for OB Associations]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"OBAssociations"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Open Clusters Textures",
Type = "HttpSynchronization",
@@ -52,15 +48,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Open Star Clusters",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Open Star Clusters]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"OpenStarClusters"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Planetary Nebulae Textures",
Type = "HttpSynchronization",
@@ -49,15 +45,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Planetary Nebulae",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Planetary Nebulae]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"PlanetaryNebulae"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Pulsars Textures",
Type = "HttpSynchronization",
@@ -53,15 +49,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Pulsars",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Pulsars.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Pulsars"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Quasars Textures",
Type = "HttpSynchronization",
@@ -45,15 +41,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Quasars",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Quasars.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Quasars"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Sloan Digital Sky Survey Textures",
Type = "HttpSynchronization",
@@ -59,15 +55,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Sloan Digital Sky Survey",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for The Sloan Digital Sky Survey (SDSS).]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"SloanDigitalSkySurvey"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Star Labels Speck Files",
Type = "HttpSynchronization",
@@ -30,15 +26,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Star Labels",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for labels of the stars.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"StarsLabels"}
License = "AMNH Digital Universe"
}
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
local earth_transforms = asset.require("scene/solarsystem/planets/earth/transforms")
@@ -163,22 +162,38 @@ local pM_J13420Orbit = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
local nodes = {
sunOrbit, barnardsOrbit, pM_J13420Orbit, lSRJ0822Orbit, lSR1826Orbit,
lacaille9352Orbit, kapteynsOrbit
})
}
asset.onInitialize(function()
for i, node in ipairs(nodes) do
openspace.addSceneGraphNode(node)
end
end)
asset.onDeinitialize(function()
for i = #nodes, 1, -1 do
local node = nodes[i]
openspace.removeSceneGraphNode(node)
end
end)
for i, node in ipairs(nodes) do
asset.export(node)
end
asset.meta = {
Name = "Star Orbits",
Version = "1.0",
Version = "1.1",
Description = [[Select Star Orbital paths that delineate their trajectory around the
Milky Way over 1 billion years into the future. Included: Sun, Barnards, Kapteyns,
Lacaille 9352, LSR1826+3014, LSRJ0822+1700, PM_J13420-3415. <br><br> Data
Reference: Sebastien Lepine (AMNH)]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"SunOrbit", "BarnardsOrbit", "KapteynsOrbit", "pM_J13420Orbit",
"LSR1826Orbit", "LSRJ0822Orbit", "lacaille9352Orbit"}
License = "AMNH Digital Universe"
}
+15 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Stars Speck Files",
Type = "HttpSynchronization",
@@ -98,15 +94,26 @@ local sunstar = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { stars, sunstar })
asset.onInitialize(function()
openspace.addSceneGraphNode(stars)
openspace.addSceneGraphNode(sunstar)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(sunstar)
openspace.removeSceneGraphNode(stars)
end)
asset.export(stars)
asset.export(sunstar)
asset.meta = {
Name = "Stars",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for the stars.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Stars"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Galaxy Superclusters Textures",
Type = "HttpSynchronization",
@@ -48,15 +44,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Galaxy Superclusters",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Galaxy Superclusters.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"GalaxySuperclusters"}
License = "AMNH Digital Universe"
}
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Supernova Remnants Textures",
Type = "HttpSynchronization",
@@ -48,15 +44,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Supernova Remnants",
Version = "2.0",
Version = "2.1",
Description = [[Digital Universe asset for Supernova Remnants.]],
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"SupernovaRemnants"}
License = "AMNH Digital Universe"
}
+15 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "Tully Textures",
Type = "HttpSynchronization",
@@ -110,16 +106,27 @@ local tullyImages = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { tullyPoints, tullyImages })
asset.onInitialize(function()
openspace.addSceneGraphNode(tullyPoints)
openspace.addSceneGraphNode(tullyImages)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(tullyImages)
openspace.removeSceneGraphNode(tullyPoints)
end)
asset.export(tullyPoints)
asset.export(tullyImages)
asset.meta = {
Name = "Tully Galaxies",
Version = "3.0",
Version = "3.1",
Description = [[Digital Universe asset for Tully Galaxies, including point cloud and
images.]],
Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"TullyGalaxies" , "TullyGalaxiesImages"}
License = "AMNH Digital Universe"
}
+12 -8
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Voids Speck Files",
Type = "HttpSynchronization",
@@ -40,15 +36,23 @@ local object = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "Voids",
Version = "2.0",
Version = "2.1",
Author = "Brian Abbott (AMNH)",
Description = [[Digital Universe asset for Cosmic voids.]],
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"Voids"}
License = "AMNH Digital Universe"
}
@@ -65,7 +65,8 @@ local createConstellations = function (baseIdentifier, guiPath, constellationfil
Tag = { "ConstellationArtImage", group },
GUI = {
Name = name .. " Image",
Path = "/Milky Way/" .. guiPath
Path = "/Milky Way/" .. guiPath,
Description = name .. " Constellation Image"
}
}
table.insert(genConstellations, aconstellation);
@@ -156,15 +157,18 @@ asset.onDeinitialize(function ()
openspace.removeSceneGraphNode(n.Identifier);
end
openspace.action.removeAction(show_art.Identifier)
openspace.action.removeAction(hide_art.Identifier)
openspace.action.removeAction(disable_art.Identifier)
openspace.action.removeAction(show_art)
openspace.action.removeAction(hide_art)
openspace.action.removeAction(disable_art)
end)
for _, n in ipairs(nodes) do
asset.export(n)
end
asset.meta = {
Name = "Constellation Images",
Version = "1.0",
Version = "1.1",
Description = "Artistic images depicting the constellations",
Author = "James Hedberg",
URL = "http://jameshedberg.com",
+24 -7
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Apogee Speck Files",
Type = "HttpSynchronization",
@@ -24,7 +20,7 @@ local textures = asset.syncedResource({
})
local gaia_abundance_apogee = {
Identifier = "Gaia Abundance Apogee",
Identifier = "GaiaAbundanceApogee",
Renderable = {
Type = "RenderableStars",
Enabled = false,
@@ -52,8 +48,29 @@ local gaia_abundance_apogee = {
}
},
GUI = {
Path = "/Milky Way/Gaia"
Path = "/Milky Way/Gaia",
Name = "Gaia Abundance Apogee",
Description = "Data set of stars color coded by metallicity."
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { gaia_abundance_apogee })
asset.onInitialize(function()
openspace.addSceneGraphNode(gaia_abundance_apogee)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(gaia_abundance_apogee)
end)
asset.export(gaia_abundance_apogee)
asset.meta = {
Name = "Gaia Abundance Apogee",
Version = "1.0",
Description = [[This asset contains a RenderableStars dataset with metallicity data.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT License"
}
@@ -28,3 +28,14 @@ end)
asset.export("GaiaDR2_618M", gaia618DestinationExtracted)
asset.export("GaiaFullDataset", gaiaFull)
asset.meta = {
Name = "GaiaDR2 Download Stars",
Version = "1.1",
Description = [[This asset contains code to sync gaia subsets from the OpenSpace
servers. Edit this file to choose which subsets to sync. WARNING can use 150GB],
Author = "ESA/Gaia/DPAC",
URL = "https://gea.esac.esa.int/archive/documentation/GDR2/index.html",
License = [[The Gaia data are open and free to use, provided credit is given to 'ESA/Gaia/DPAC'. In general, access to, and use of, ESA's Gaia Archive (hereafter called 'the website') constitutes acceptance of the following general terms and conditions. Neither ESA nor any other party involved in creating, producing, or delivering the website shall be liable for any direct, incidental, consequential, indirect, or punitive damages arising out of user access to, or use of, the website. The website does not guarantee the accuracy of information provided by external sources and accepts no responsibility or liability for any consequences arising from the use of such data.]]
}
@@ -1,6 +1,8 @@
local assetHelper = asset.require("util/asset_helper")
local fullOS = openspace.systemCapabilities.fullOperatingSystem()
if string.find(fullOS, "Darwin") then
openspace.printWarning("Gaia module (RenderableGaiaStars) not supported on mac")
return
end
-- Download a preprocessed binary octree of Radial Velocity subset values per star (preprocessed into 8 binary files).
local starsFolder = asset.syncedResource({
@@ -55,8 +57,29 @@ local GaiaStars = {
},
GUI = {
Name = "Gaia Stars",
Path = "/Milky Way"
Path = "/Milky Way",
Description = "Radial Velocity subset of GaiaDR2."
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { GaiaStars })
asset.onInitialize(function()
openspace.addSceneGraphNode(GaiaStars)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(GaiaStars)
end)
asset.export(GaiaStars)
asset.meta = {
Name = "Gaia Stars",
Version = "1.0",
Description = [[This asset contains a subset of GaiaDR2. This subset contains 7.5M stars which have
accurate values for a number of columns. ]],
Author = "ESA/Gaia/DPAC",
URL = "https://gea.esac.esa.int/archive/documentation/GDR2/index.html",
License = [[The Gaia data are open and free to use, provided credit is given to 'ESA/Gaia/DPAC'. In general, access to, and use of, ESA's Gaia Archive (hereafter called 'the website') constitutes acceptance of the following general terms and conditions. Neither ESA nor any other party involved in creating, producing, or delivering the website shall be liable for any direct, incidental, consequential, indirect, or punitive damages arising out of user access to, or use of, the website. The website does not guarantee the accuracy of information provided by external sources and accepts no responsibility or liability for any consequences arising from the use of such data.]]
}
+24 -7
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local speck = asset.syncedResource({
Name = "Galah Speck Files",
Type = "HttpSynchronization",
@@ -24,7 +20,7 @@ local textures = asset.syncedResource({
})
local gaia_abundance_galah = {
Identifier = "Gaia Abundance Galah",
Identifier = "GaiaAbundanceGalah",
Renderable = {
Type = "RenderableStars",
Enabled = false,
@@ -52,8 +48,29 @@ local gaia_abundance_galah = {
}
},
GUI = {
Path = "/Milky Way/Gaia"
Path = "/Milky Way/Gaia",
Name = "Gaia Abundance Galah",
Description = "Data set of stars color coded by metallicity."
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { gaia_abundance_galah })
asset.onInitialize(function()
openspace.addSceneGraphNode(gaia_abundance_galah)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(gaia_abundance_galah)
end)
asset.export(gaia_abundance_galah)
asset.meta = {
Name = "Gaia Abundance Galah",
Version = "1.0",
Description = [[This asset contains a RenderableStars dataset with metallicity data.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT License"
}
+25 -7
View File
@@ -1,7 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local textures = asset.syncedResource({
Name = "ESO Milky Way Textures",
Type = "HttpSynchronization",
@@ -23,7 +19,7 @@ local object = {
Segments = 40,
Opacity = 0.4,
Texture = textures .. "eso0932a_blend.png",
UseAdditiveBlending = true,
RenderBinMode = "PreDeferredTransparent",
Orientation = "Inside",
MirrorTexture = true,
FadeOutThreshold = 0.01,
@@ -31,8 +27,30 @@ local object = {
},
GUI = {
Name = "Milky Way (ESO)",
Path = "/Milky Way/Milky Way"
Path = "/Milky Way/Milky Way",
Description = "Milky Way Galaxy image (alternate)"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { object })
asset.onInitialize(function()
openspace.addSceneGraphNode(object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(object)
end)
asset.export(object)
asset.meta = {
Name = "MilkyWay Galaxy (ESO)",
Version = "1.0",
Description = [[This asset contains an alternate to the Digital Universe image for the
Milky Way from ESO.]],
Author = "ESO/S. Brunier",
URL = "https://www.eso.org/public/usa/images/eso0932a/",
License = "Creative Commons Attribution 4.0 International License"
}
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("scene/solarsystem/sun/transforms")
@@ -46,21 +45,30 @@ local MilkyWayVolumeGalaxy = {
},
GUI = {
Path = "/Milky Way",
Name = "Milky Way Volume"
Name = "Milky Way Volume",
Description = [[Volumetric rendering of Milky Way galaxy based on simulation from
NAOJ.]]
}
}
local objects = { MilkyWayVolumeGalaxy }
assetHelper.registerSceneGraphNodesAndExport(asset, objects)
asset.onInitialize(function()
openspace.addSceneGraphNode(MilkyWayVolumeGalaxy)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(MilkyWayVolumeGalaxy)
end)
asset.export(MilkyWayVolumeGalaxy)
asset.meta = {
Name = "Milky Way Volume",
Version = "1.0",
Description = [[Volumetric rendering of Milky Way galaxy based on simulation from
Version = "1.1",
Description = [[Volumetric rendering of Milky Way galaxy based on simulations from
NAOJ.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT License",
Identifiers = {"MilkyWayVolume"}
License = "MIT License"
}
@@ -1,4 +1,3 @@
local assetHelper = asset.require("util/asset_helper")
local transforms = asset.require("./transforms")
@@ -51,16 +50,24 @@ local OrionClusterStars = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, { OrionClusterStars })
asset.onInitialize(function()
openspace.addSceneGraphNode(OrionClusterStars)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(OrionClusterStars)
end)
asset.export(OrionClusterStars)
asset.meta = {
Name = "Orion Nebula Star Cluster",
Version = "1.0",
Version = "1.1",
Description = [[ Digital Universe asset for the Orion star cluster. To be used in
conjunction with nebula model. Use orionnebula.asset to include both.]],
Author = "AMNH Digital Universe",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"OrionClusterStars"}
License = "AMNH Digital Universe"
}
@@ -1,10 +1,6 @@
local assetHelper = asset.require("util/asset_helper")
local sunTransforms = asset.require("scene/solarsystem/sun/transforms")
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("./transforms")
local center = sunTransforms.SolarSystemBarycenter.Identifier;
local LIGHTS = assetHelper.getDefaultLightSources(center);
local sync = asset.syncedResource({
Name = "Orion Nebula Model",
Type = "HttpSynchronization",
@@ -67,12 +63,18 @@ local OrionNebulaModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Model",
Path = "/Milky Way/Orion",
Hidden = true,
Description = "Orion Nebula 3D model. See Orion Nebula for description."
}
}
@@ -96,7 +98,14 @@ local OrionNebulaShocksModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Shocks",
@@ -125,7 +134,14 @@ local OrionNebulaProplydsModel = {
DiffuseIntensity = 1.0,
--PerformShading = false,
RotationVector = { 0.000000, 22.300000, 0.000000 },
LightSources = LIGHTS;
LightSources = {
sun.LightSource,
{
Identifier = "Camera",
Type = "CameraLightSource",
Intensity = 0.5
}
}
},
GUI = {
Name = "Orion Nebula Proplyds",
@@ -135,23 +151,34 @@ local OrionNebulaProplydsModel = {
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {
NebulaHolder,
OrionNebulaModel,
OrionNebulaShocksModel,
OrionNebulaProplydsModel
})
asset.onInitialize(function()
openspace.addSceneGraphNode(NebulaHolder)
openspace.addSceneGraphNode(OrionNebulaModel)
openspace.addSceneGraphNode(OrionNebulaShocksModel)
openspace.addSceneGraphNode(OrionNebulaProplydsModel)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(OrionNebulaProplydsModel)
openspace.removeSceneGraphNode(OrionNebulaShocksModel)
openspace.removeSceneGraphNode(OrionNebulaModel)
openspace.removeSceneGraphNode(NebulaHolder)
end)
asset.export(NebulaHolder)
asset.export(OrionNebulaModel)
asset.export(OrionNebulaShocksModel)
asset.export(OrionNebulaProplydsModel)
asset.meta = {
Name = "Orion Nebula Model",
Version = "1.0",
Version = "1.1",
Description = [[ Digital Universe asset for the Orion nebula 3D model. This asset
contains seperate models for the nebula, proplyds and shocks. To be used in
conjunction with orion star cluster. Use orionnebula.asset to include both.]],
Author = "AMNH Digital Universe",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe",
Identifiers = {"OrionNebulaHolder", "OrionNebulaModel", "OrionNebulaProplydsModel",
"OrionNebulaShocksModel"}
License = "AMNH Digital Universe"
}

Some files were not shown because too many files have changed in this diff Show More