Merge remote-tracking branch 'origin/master' into feature/aurorasaurus

This commit is contained in:
lundkvistarn
2024-09-16 15:32:28 -04:00
656 changed files with 7885 additions and 5214 deletions

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2023 #
# Copyright (c) 2014-2024 #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
# software and associated documentation files (the "Software"), to deal in the Software #
@@ -27,10 +27,11 @@ cmake_policy(VERSION 3.25)
project(OpenSpace)
set(OPENSPACE_VERSION_MAJOR 0)
set(OPENSPACE_VERSION_MINOR 20)
set(OPENSPACE_VERSION_PATCH 0)
set(OPENSPACE_VERSION_STRING "Beta-13")
set(OPENSPACE_RELEASE_BUILD OFF)
set(OPENSPACE_VERSION_MAJOR)
set(OPENSPACE_VERSION_MINOR)
set(OPENSPACE_VERSION_PATCH)
set(OPENSPACE_VERSION_STRING)
include(${PROJECT_SOURCE_DIR}/support/cmake/module_common.cmake)
include(${PROJECT_SOURCE_DIR}/ext/ghoul/support/cmake/message_macros.cmake)
@@ -88,18 +89,6 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# See if working directory is clean or not
execute_process(
COMMAND git diff-index --quiet HEAD --
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE OPENSPACE_GIT_STATUS_RETURN
)
if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0)
set(OPENSPACE_GIT_STATUS "uncommitted changes")
else ()
set(OPENSPACE_GIT_STATUS "")
endif ()
if (MSVC)
option(OPENSPACE_BREAK_ON_FLOATING_POINT_EXCEPTION "Raise exceptions when encountering Inf's or Nan's in floating point numbers" OFF)

View File

@@ -41,7 +41,7 @@ This repository contains the source code and example profiles for OpenSpace, but
Requirements for compiling are:
- CMake version 3.25 or above
- C++ compiler supporting C++20/C++23 (MSVC 19.39, GCC13, Clang17, AppleClang 15.0.0)
- C++ compiler supporting C++20/C++23 (Visual Studio 2022 17.11, GCC13, Clang17, AppleClang 15.0.0)
- [Boost](http://www.boost.org/)
- [Qt](http://www.qt.io/download)

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2023 #
# Copyright (c) 2014-2024 #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
# software and associated documentation files (the "Software"), to deal in the Software #

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2023 #
# Copyright (c) 2014-2024 #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
# software and associated documentation files (the "Software"), to deal in the Software #
@@ -147,10 +147,9 @@ if (WIN32)
# Find the windeployqt application
get_target_property(_qmake_executable Qt6::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
add_custom_command(
TARGET OpenSpace POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" --verbose 0 --no-compiler-runtime --no-translations \"$<TARGET_FILE:OpenSpace>\"
COMMAND "${WINDEPLOYQT_EXECUTABLE}" --verbose 0 --no-compiler-runtime --no-translations \"$<TARGET_FILE:OpenSpace>\"
COMMENT "Deploying Qt libraries"
)
endif ()

View File

@@ -2,7 +2,7 @@
# #
# OpenSpace #
# #
# Copyright (c) 2014-2023 #
# Copyright (c) 2014-2024 #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy of this #
# software and associated documentation files (the "Software"), to deal in the Software #

View File

@@ -44,7 +44,7 @@ public:
bool useCheckboxes);
/**
* Function that uses the #QtFileSystemModel class to search the given directory.
* Function that uses the QtFileSystemModel class to search the given directory.
*
* \param dir The directory from which to start the search from
*/

View File

@@ -51,8 +51,8 @@ public:
* \param sgctConfigEnabled `true` if window selection combo box will be enabled
* \param sgctConfigName The name of the sgct configuration function used to generate
* window config (blank if file is used)
* \param parentItem The parent that contains this (and possibly other) children
* in the tree structure.
* \param parent The parent that contains this (and possibly other) children in the
* tree structure.
*/
LauncherWindow(bool profileEnabled, const openspace::Configuration& globalConfig,
bool sgctConfigEnabled, std::string sgctConfigName, QWidget* parent);

View File

@@ -59,7 +59,7 @@ public:
int role = Qt::DisplayRole) const final;
/**
* Returns the index of item in #QModelIndex object form.
* Returns the index of item in QModelIndex object form.
*
* \param row The row number
* \param column The column number
@@ -116,7 +116,7 @@ public:
* Return the Qt flags of the item specified by index, which can include
* Qt::ItemIsEnabled, Qt::ItemIsSelectable.
*
* \param index The index specified by the #QModelIndex index
* \param index The index specified by the QModelIndex index
* \return The Qt flags
*/
Qt::ItemFlags flags(const QModelIndex& index) const final;
@@ -125,7 +125,7 @@ public:
* Set data at index \p index.
*
* \param index Location of the item to set
* \param value The #QVariant data element to store at column \p column
* \param value The QVariant data element to store at column \p column
* \param role Qt-specific role to define context of the call
* \return `true` if the data set was successful
*/
@@ -133,7 +133,7 @@ public:
int role = Qt::EditRole) final;
/**
* Returns a vector of all #Assets selected in the tree view.
* Returns a vector of all #Asset%s selected in the tree view.
*
* \param outputPaths The vector of paths that were selected
* \param outputItems The vector of AssetTreeItem that were selected

View File

@@ -41,8 +41,8 @@ public:
* Constructor for camera gui class
*
* \param parent Pointer to parent Qt widget
* \param profile The #openspace::Profile::CameraType object containing all data of
* the new or imported profile
* \param camera The #openspace::Profile::CameraType object containing all data of the
* new or imported profile
*/
CameraDialog(QWidget* parent, std::optional<openspace::Profile::CameraType>* camera);

View File

@@ -40,8 +40,8 @@ public:
* Constructor for deltaTimes class.
*
* \param parent Pointer to parent Qt widget
* \param profile The list of delta times containing all data of the new or imported
* profile
* \param deltaTimes The list of delta times containing all data of the new or
* imported profile
*/
DeltaTimesDialog(QWidget* parent, std::vector<double>* deltaTimes);

View File

@@ -39,8 +39,8 @@ public:
* Constructor for markNodes class.
*
* \param parent Pointer to parent Qt widget
* \param profile The list of marked nodes containing all data of the new or imported
* profile
* \param markedNodes The list of marked nodes containing all data of the new or
* imported profile
*/
MarkNodesDialog(QWidget* parent, std::vector<std::string>* markedNodes);

View File

@@ -40,8 +40,8 @@ public:
* Constructor for meta class.
*
* \param parent Pointer to parent Qt widget
* \param profile The #openspace::Profile::Meta object containing all data of the
* new or imported profile
* \param meta The #openspace::Profile::Meta object containing all data of the new or
* imported profile
*/
MetaDialog(QWidget* parent, std::optional<openspace::Profile::Meta>* meta);

View File

@@ -42,7 +42,7 @@ public:
* Constructor for modules class.
*
* \param parent Pointer to parent Qt widget
* \param profile The #openspace::Profile::Module object containing all data of the
* \param modules The #openspace::Profile::Module object containing all data of the
* new or imported profile
*/
ModulesDialog(QWidget* parent, std::vector<openspace::Profile::Module>* modules);

View File

@@ -45,9 +45,9 @@ public:
* each monitor
* \param nMaxWindows The maximum number of windows allowed (depends on the number of
* monitors in the system)
* \param winColors An array of QColor objects for window colors. The indexing of this
* array matches the window indexing used elsewhere in the class. This allows
* for a unique color for each window
* \param windowColors An array of QColor objects for window colors. The indexing of
* this array matches the window indexing used elsewhere in the class. This
* allows for a unique color for each window
* \param resetToDefault If set to true, all display and window settings will be
* initialized to their default values
* \param parent The parent to which this widget belongs

View File

@@ -224,7 +224,7 @@ LauncherWindow::LauncherWindow(bool profileEnabled,
qInstallMessageHandler(
[](QtMsgType type, const QMessageLogContext&, const QString& msg) {
if (type == QtCriticalMsg || type == QtFatalMsg || type == QtSystemMsg) {
if (type == QtCriticalMsg || type == QtFatalMsg || type == QtCriticalMsg) {
std::cerr << msg.toStdString() << '\n';
}
}

View File

@@ -151,7 +151,7 @@ bool AssetTreeItem::insertColumns(int position, int columns) {
_itemData.insert(_itemData.begin() + position, QVariant());
}
for (AssetTreeItem* child : qAsConst(_childItems)) {
for (AssetTreeItem* child : _childItems) {
child->insertColumns(position, columns);
}

View File

@@ -140,20 +140,36 @@ LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) {
LINFO(s);
}
std::string dumpFile = std::format(
"OpenSpace_{}_{}_{}-{}-{}-{}-{}-{}-{}--{}--{}.dmp",
OPENSPACE_VERSION_MAJOR,
OPENSPACE_VERSION_MINOR,
OPENSPACE_VERSION_PATCH,
stLocalTime.wYear,
stLocalTime.wMonth,
stLocalTime.wDay,
stLocalTime.wHour,
stLocalTime.wMinute,
stLocalTime.wSecond,
GetCurrentProcessId(),
GetCurrentThreadId()
);
std::string dumpFile;
if (OPENSPACE_IS_RELEASE_BUILD) {
dumpFile = std::format(
"OpenSpace_{}_{}_{}-{}-{}-{}-{}-{}-{}--{}--{}.dmp",
OPENSPACE_VERSION_MAJOR,
OPENSPACE_VERSION_MINOR,
OPENSPACE_VERSION_PATCH,
stLocalTime.wYear,
stLocalTime.wMonth,
stLocalTime.wDay,
stLocalTime.wHour,
stLocalTime.wMinute,
stLocalTime.wSecond,
GetCurrentProcessId(),
GetCurrentThreadId()
);
}
else {
dumpFile = std::format(
"OpenSpace_{}-{}-{}-{}-{}-{}--{}--{}.dmp",
stLocalTime.wYear,
stLocalTime.wMonth,
stLocalTime.wDay,
stLocalTime.wHour,
stLocalTime.wMinute,
stLocalTime.wSecond,
GetCurrentProcessId(),
GetCurrentThreadId()
);
}
LINFO(std::format("Creating dump file: {}", dumpFile));
@@ -995,6 +1011,54 @@ void setSgctDelegateFunctions() {
sgctDelegate.setStatisticsGraphScale = [](float scale) {
sgct::Engine::instance().setStatsGraphScale(scale);
};
sgctDelegate.setMouseCursor = [](WindowDelegate::Cursor mouse) {
static std::unordered_map<WindowDelegate::Cursor, GLFWcursor*> Cursors = {
{
WindowDelegate::Cursor::Arrow,
glfwCreateStandardCursor(GLFW_ARROW_CURSOR)
},
{
WindowDelegate::Cursor::IBeam,
glfwCreateStandardCursor(GLFW_IBEAM_CURSOR)
},
{
WindowDelegate::Cursor::CrossHair,
glfwCreateStandardCursor(GLFW_CROSSHAIR_CURSOR)
},
{
WindowDelegate::Cursor::PointingHand,
glfwCreateStandardCursor(GLFW_POINTING_HAND_CURSOR)
},
{
WindowDelegate::Cursor::ResizeEW,
glfwCreateStandardCursor(GLFW_RESIZE_EW_CURSOR)
},
{
WindowDelegate::Cursor::ResizeNS,
glfwCreateStandardCursor(GLFW_RESIZE_NS_CURSOR)
},
{
WindowDelegate::Cursor::ResizeNWSE,
glfwCreateStandardCursor(GLFW_RESIZE_NWSE_CURSOR)
},
{
WindowDelegate::Cursor::ResizeNESW,
glfwCreateStandardCursor(GLFW_RESIZE_NESW_CURSOR)
},
{
WindowDelegate::Cursor::ResizeAll,
glfwCreateStandardCursor(GLFW_RESIZE_ALL_CURSOR)
},
{
WindowDelegate::Cursor::NotAllowed,
glfwCreateStandardCursor(GLFW_NOT_ALLOWED_CURSOR)
},
};
ghoul_assert(
Cursors.find(mouse) != Cursors.end(), "Tried to create non-existent cursor"
);
glfwSetCursor(glfwGetCurrentContext(), Cursors[mouse]);
};
}
std::string setWindowConfigPresetForGui(const std::string& labelFromCfgFile,
@@ -1016,11 +1080,13 @@ std::string setWindowConfigPresetForGui(const std::string& labelFromCfgFile,
return preset;
}
std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTConfig,
const std::string& windowConfiguration,
const std::string& labelFromCfgFile)
std::pair<std::string, bool> selectedSgctProfileFromLauncher(LauncherWindow& lw,
bool hasCliSGCTConfig,
const std::string& windowConfiguration,
const std::string& labelFromCfgFile)
{
std::string config = windowConfiguration;
bool isGeneratedConfig = false;
if (!hasCliSGCTConfig) {
config = lw.selectedWindowConfig();
if (config.find(labelFromCfgFile) != std::string::npos) {
@@ -1029,6 +1095,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC
}
else {
config = windowConfiguration;
isGeneratedConfig = true;
}
}
else {
@@ -1054,7 +1121,7 @@ std::string selectedSgctProfileFromLauncher(LauncherWindow& lw, bool hasCliSGCTC
}
global::configuration->windowConfiguration = config;
}
return config;
return { config, isGeneratedConfig };
}
} // namespace
@@ -1167,6 +1234,7 @@ int main(int argc, char* argv[]) {
// Create the OpenSpace engine and get arguments for the SGCT engine
std::string windowConfiguration;
bool isGeneratedWindowConfig = true;
try {
// Find configuration
std::filesystem::path configurationFilePath;
@@ -1371,12 +1439,13 @@ int main(int argc, char* argv[]) {
);
global::configuration->profile = win.selectedProfile();
windowConfiguration = selectedSgctProfileFromLauncher(
win,
commandlineArguments.windowConfig.has_value(),
windowConfiguration,
labelFromCfgFile
);
std::tie(windowConfiguration, isGeneratedWindowConfig) =
selectedSgctProfileFromLauncher(
win,
commandlineArguments.windowConfig.has_value(),
windowConfiguration,
labelFromCfgFile
);
}
else {
glfwInit();
@@ -1387,6 +1456,20 @@ int main(int argc, char* argv[]) {
}
{
openspace::Settings settings = loadSettings();
settings.hasStartedBefore = true;
const std::filesystem::path p = global::configuration->profile;
const std::filesystem::path reducedName = p.filename().replace_extension();
settings.profile = reducedName.string();
settings.configuration =
isGeneratedWindowConfig ? "" : global::configuration->windowConfiguration;
saveSettings(settings, findSettings());
}
// Prepend the outgoing sgctArguments with the program name
// as well as the configuration file that sgct is supposed to use
arguments.insert(arguments.begin(), argv[0]);
@@ -1476,27 +1559,6 @@ int main(int argc, char* argv[]) {
// Only timeout after 15 minutes
Engine::instance().setSyncParameters(false, 15.f * 60.f);
{
openspace::Settings settings = loadSettings();
settings.hasStartedBefore = true;
if (settings.rememberLastProfile) {
const std::filesystem::path p = global::configuration->profile;
const std::filesystem::path reducedName = p.filename().replace_extension();
settings.profile = reducedName.string();
}
if (settings.rememberLastConfiguration &&
!global::configuration->sgctConfigNameInitialized.empty())
{
// We only want to store the window configuration if it was not a dynamically
// created one
settings.configuration = global::configuration->windowConfiguration;
}
saveSettings(settings, findSettings());
}
LINFO("Starting rendering loop");
Engine::instance().exec();
LINFO("Ending rendering loop");

View File

@@ -18,7 +18,6 @@
"stereo": "none",
"pos": { "x": 50, "y": 50 },
"size": { "x": 1280, "y": 720 },
"res": { "x": 2560, "y": 1440 },
"viewports": [
{
"tracked": true,

View File

@@ -42,29 +42,31 @@ asset.require("scene/digitaluniverse/2dF")
asset.require("scene/digitaluniverse/2mass")
asset.require("scene/digitaluniverse/6dF")
asset.require("scene/digitaluniverse/abell")
asset.require("scene/digitaluniverse/allsky_hydrogenalpha")
asset.require("scene/digitaluniverse/allsky_visible")
asset.require("scene/digitaluniverse/alternatestarlabels")
asset.require("scene/digitaluniverse/backgroundradiation")
asset.require("scene/digitaluniverse/clusters")
asset.require("scene/digitaluniverse/brown_dwarfs")
asset.require("scene/digitaluniverse/galaxy_clusters")
asset.require("scene/digitaluniverse/constellationbounds")
asset.require("scene/digitaluniverse/constellations")
asset.require("scene/digitaluniverse/deepsky")
asset.require("scene/digitaluniverse/dwarfs")
asset.require("scene/digitaluniverse/exoplanets")
asset.require("scene/digitaluniverse/exoplanets_candidates")
asset.require("scene/digitaluniverse/globularclusters")
asset.require("scene/digitaluniverse/grids")
asset.require("scene/digitaluniverse/groups")
asset.require("scene/digitaluniverse/galaxy_groups")
asset.require("scene/digitaluniverse/h2regions")
asset.require("scene/digitaluniverse/localdwarfs")
asset.require("scene/digitaluniverse/local_group_dwarfs")
asset.require("scene/digitaluniverse/milkyway")
asset.require("scene/digitaluniverse/milkyway_arm_labels")
asset.require("scene/digitaluniverse/milkyway_label")
asset.require("scene/digitaluniverse/milkyway_sphere")
asset.require("scene/digitaluniverse/obassociations")
asset.require("scene/digitaluniverse/oort_cloud")
asset.require("scene/digitaluniverse/openclusters")
asset.require("scene/digitaluniverse/planetarynebulae")
asset.require("scene/digitaluniverse/pulsars")
asset.require("scene/digitaluniverse/quasars")
asset.require("scene/digitaluniverse/star_uncertainty")
asset.require("scene/digitaluniverse/starlabels")
asset.require("scene/digitaluniverse/starorbits")
asset.require("scene/digitaluniverse/stars")
@@ -72,6 +74,7 @@ asset.require("scene/digitaluniverse/superclusters")
asset.require("scene/digitaluniverse/supernovaremnants")
asset.require("scene/digitaluniverse/tully")
asset.require("scene/digitaluniverse/voids")
asset.require("scene/digitaluniverse/white_dwarfs")
asset.require("nightsky/nightsky")
asset.require("customization/globebrowsing")
@@ -84,4 +87,13 @@ asset.onInitialize(function()
openspace.globebrowsing.loadWMSServersFromFile(
openspace.absPath("${DATA}/globebrowsing_servers.lua")
)
openspace.setGuiOrder(
"/",
{ "Solar System", "Milky Way", "Universe", "Night Sky", "Examples" }
)
openspace.setGuiOrder(
"/Solar System",
{ "Planets", "Dwarf Planets", "Sun", "Solar System Barycenter" }
)
end)

View File

@@ -22,6 +22,5 @@ asset.require("modules/touch/default_settings")
asset.onInitialize(function()
webGui.setCefRoute("onscreen")
openspace.setDefaultGuiSorting()
openspace.setPropertyValueSingle("RenderEngine.VerticalLogOffset", 0.100000)
end)

View File

@@ -18,6 +18,7 @@ local TogglePlanetLabels = {
IsLocal = false
}
asset.onInitialize(function()
openspace.action.registerAction(TogglePlanetLabels)
openspace.bindKey("L", TogglePlanetLabels.Identifier)

View File

@@ -15,7 +15,9 @@ local ToggleShutdown = {
Identifier = "os.ToggleShutdown",
Name = "Toggle shutdown",
Command = "openspace.toggleShutdown()",
Documentation = "Toggles the shutdown that will stop OpenSpace after a grace period. Press again to cancel the shutdown during this period",
Documentation = [[
Toggles the shutdown that will stop OpenSpace after a grace period. Press again to
cancel the shutdown during this period]],
GuiPath = "/System",
IsLocal = true
}
@@ -24,7 +26,8 @@ local TakeScreenshot = {
Identifier = "os.TakeScreenshot",
Name = "Take screenshot",
Command = "openspace.takeScreenshot()",
Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory",
Documentation = [[Saves the contents of the screen to a file in the ${SCREENSHOTS}
directory]],
GuiPath = "/System/Rendering",
IsLocal = true
}
@@ -51,7 +54,8 @@ local ToggleRotationFriction = {
Identifier = "os.ToggleRotationFriction",
Name = "Toggle rotation friction",
Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.RotationalFriction"),
Documentation = "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely",
Documentation = [[Toggles the rotational friction of the camera. If it is disabled, the
camera rotates around the focus object indefinitely]],
GuiPath = "/Navigation",
IsLocal = true
}
@@ -60,7 +64,8 @@ local ToggleZoomFriction = {
Identifier = "os.ToggleZoomFriction",
Name = "Toggle zoom friction",
Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.ZoomFriction"),
Documentation = "Toggles the zoom friction of the camera. If it is disabled, the camera rises up from or closes in towards the focus object indefinitely",
Documentation = [[Toggles the zoom friction of the camera. If it is disabled, the camera
rises up from or closes in towards the focus object indefinitely]],
GuiPath = "/Navigation",
IsLocal = true
}
@@ -69,7 +74,8 @@ local ToggleRollFriction = {
Identifier = "os.ToggleRollFriction",
Name = "Toggle roll friction",
Command = propertyHelper.invert("NavigationHandler.OrbitalNavigator.Friction.RollFriction"),
Documentation = "Toggles the roll friction of the camera. If it is disabled, the camera rolls around its own axis indefinitely",
Documentation = [[Toggles the roll friction of the camera. If it is disabled, the camera
rolls around its own axis indefinitely]],
GuiPath = "/Navigation",
IsLocal = true
}
@@ -84,7 +90,8 @@ local FadeToBlack = {
openspace.setPropertyValueSingle("RenderEngine.BlackoutFactor", 1.0, 3)
end
]],
Documentation = "Toggles the fade to black within 3 seconds or shows the rendering after 3 seconds",
Documentation = [[Toggles the fade to black within 3 seconds or shows the rendering
after 3 seconds]],
GuiPath = "/Rendering",
IsLocal = false
}
@@ -126,7 +133,8 @@ local NextDeltaStepInterpolate = {
Identifier = "os.NextDeltaStepInterpolate",
Name = "Next simulation time step (interpolate)",
Command = "openspace.time.interpolateNextDeltaTimeStep()",
Documentation = "Smoothly interpolates the simulation speed to the next simulation time step, if one exists",
Documentation = [[Smoothly interpolates the simulation speed to the next simulation time
step, if one exists]],
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
@@ -135,7 +143,8 @@ local NextDeltaStepImmediate = {
Identifier = "os.NextDeltaStepImmediate",
Name = "Next simulation time step (immediate)",
Command = "openspace.time.setNextDeltaTimeStep()",
Documentation = "Immediately set the simulation speed to the next simulation time step, if one exists",
Documentation = [[Immediately set the simulation speed to the next simulation time step,
if one exists]],
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
@@ -144,7 +153,8 @@ local PreviousDeltaStepInterpolate = {
Identifier = "os.PreviousDeltaStepInterpolate",
Name = "Previous simulation time step (interpolate)",
Command = "openspace.time.interpolatePreviousDeltaTimeStep()",
Documentation = "Smoothly interpolates the simulation speed to the previous simulation time step, if one exists",
Documentation = [[Smoothly interpolates the simulation speed to the previous simulation
time step, if one exists]],
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
@@ -153,7 +163,44 @@ local PreviousDeltaStepImmediate = {
Identifier = "os.PreviousDeltaStepImmediate",
Name = "Previous simulation time step (immediate)",
Command = "openspace.time.setPreviousDeltaTimeStep()",
Documentation = "Immediately set the simulation speed to the previous simulation time step, if one exists",
Documentation = [[Immediately set the simulation speed to the previous simulation time
step, if one exists]],
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
local RealTimeDeltaStepInterpolate = {
Identifier = "os.RealTimeDeltaStepInterpolate",
Name = "Reset the simulation time to realtime (interpolate)",
Command = "openspace.time.interpolateDeltaTime(1)",
Documentation = "Smoothly interpolate the simulation speed to match real-time speed",
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
local RealTimeDeltaStepImmediate = {
Identifier = "os.RealTimeDeltaStepImmediate",
Name = "Reset the simulation time to realtime (immediate)",
Command = "openspace.time.setDeltaTime(1)",
Documentation = "Immediately set the simulation speed to match real-time speed",
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
local DateToNowInterpolate = {
Identifier = "os.DateToNowInterpolate",
Name = "Set the in-game time to now (interpolate)",
Command = "openspace.time.interpolateTime(openspace.time.currentWallTime())",
Documentation = "Immediately set the current in-game time to the 'now' time",
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
local DateToNowImmediate = {
Identifier = "os.DateToNowImmediate",
Name = "Set the in-game time to now (immediate)",
Command = "openspace.time.setTime(openspace.time.currentWallTime())",
Documentation = "Smoothly interpolate the current in-game time to the 'now' time",
GuiPath = "/Time/Simulation Speed",
IsLocal = true
}
@@ -167,6 +214,7 @@ local ReloadGui = {
IsLocal = true
}
asset.onInitialize(function()
openspace.action.registerAction(ToggleNativeUi)
openspace.bindKey("F1", ToggleNativeUi.Identifier)
@@ -217,6 +265,18 @@ asset.onInitialize(function()
openspace.action.registerAction(PreviousDeltaStepImmediate)
openspace.bindKey("Shift+Left", PreviousDeltaStepImmediate.Identifier)
openspace.action.registerAction(RealTimeDeltaStepInterpolate)
openspace.bindKey("Down", RealTimeDeltaStepInterpolate.Identifier)
openspace.action.registerAction(RealTimeDeltaStepImmediate)
openspace.bindKey("Shift+Down", RealTimeDeltaStepImmediate.Identifier)
openspace.action.registerAction(DateToNowInterpolate)
openspace.bindKey("Up", DateToNowInterpolate.Identifier)
openspace.action.registerAction(DateToNowImmediate)
openspace.bindKey("Shift+Up", DateToNowImmediate.Identifier)
openspace.action.registerAction(ReloadGui)
openspace.bindKey("F5", ReloadGui.Identifier)
end)
@@ -225,6 +285,18 @@ asset.onDeinitialize(function()
openspace.clearKey("F5")
openspace.action.removeAction(ReloadGui)
openspace.clearKey("Shift+Up")
openspace.action.removeAction(DateToNowImmediate)
openspace.clearKey("Up")
openspace.action.removeAction(DateToNowInterpolate)
openspace.clearKey("Shift+Down")
openspace.action.removeAction(RealTimeDeltaStepImmediate)
openspace.clearKey("Down")
openspace.action.removeAction(RealTimeDeltaStepInterpolate)
openspace.clearKey("Shift+Left")
openspace.action.removeAction(PreviousDeltaStepImmediate)

View File

@@ -4,11 +4,10 @@ local sunAsset = asset.require("scene/solarsystem/sun/transforms")
local modelFolder = asset.resource({
Name = "Scale Burj Khalifa",
Type = "UrlSynchronization",
Name = "Scale Model Burj Khalifa",
Type = "HttpSynchronization",
Identifier = "scale_model_burj_khalifa",
Url = "https://wms.openspace.amnh.org/static/sync/url/scalemodels/Burj_Khalifa.osmodel",
Filename = "Burj_Khalifa.osmodel"
Version = 1
})

View File

@@ -1,196 +0,0 @@
local sun = asset.require("scene/solarsystem/sun/transforms")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local StartTime = "2021 06 01 00:00:00"
local AnimationLoop = {
Identifier = "AnimationLoop",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, -11E7, 0.0 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
EnableAnimation = true,
AnimationMode = "LoopFromStart",
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "Animated Model (LoopFromStart)",
Path = "/Examples",
Description = "Simple animated box model with the animation mode 'LoopFromStart'"
}
}
local AnimationLoopInf = {
Identifier = "AnimationLoopInf",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 11E7, 0.0 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
EnableAnimation = true,
AnimationMode = "LoopInfinitely",
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "Animated Model (LoopInfinitely)",
Path = "/Examples",
Description = "Simple animated box model with the animation mode 'LoopInfinitely'"
}
}
local AnimationOnce = {
Identifier = "AnimationOnce",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 11E7, 0.0, 0.0 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
EnableAnimation = true,
AnimationMode = "Once",
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "Animated Model (Once)",
Path = "/Examples",
Description = "Simple animated box model with the animation mode 'Once'"
}
}
local AnimationBounceInf = {
Identifier = "AnimationBounceInf",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, 11E7 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
EnableAnimation = true,
AnimationMode = "BounceInfinitely",
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "Animated Model (BounceInfinitely)",
Path = "/Examples",
Description = "Simple animated box model with the animation mode 'BounceInfinitely'"
}
}
local AnimationBounce = {
Identifier = "AnimationBounce",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 0.0, -11E7 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
EnableAnimation = true,
AnimationMode = "BounceFromStart",
AnimationStartTime = StartTime,
ModelScale = 3E7,
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "Animated Model (BounceFromStart)",
Path = "/Examples",
Description = "Simple animated box model with the animation mode 'BounceFromStart'"
}
}
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.meta = {
Name = "Animation Example asset",
Description = "Simple animation example asset with an animated box model",
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
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",
Description = "Simple animated box model",
Author = "Cesium, https://cesium.com/",
URL = "https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated",
License = [[
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]
}

View File

@@ -186,6 +186,7 @@ asset.export(ElapsedTime)
asset.export(InputState)
asset.meta = {
Name = "Dashboard Items Example",
Description = [[Examples of different types of dashboard items. These are dynamic

View File

@@ -121,6 +121,7 @@ asset.export(SunIAUAxes)
asset.export(SolarSystemBarycenterAxes)
asset.meta = {
Name = "Debug Coordinates",
Description = [[A set of coordinate axes demonstrating different XYZ coordinate

View File

@@ -53,6 +53,7 @@ asset.export(BasicDisc)
asset.export(FullEllipticDisc)
asset.meta = {
Name = "Example Discs",
Description = [[Examples of different types of rendered discs.]],

View File

@@ -51,6 +51,7 @@ asset.export(ExamplePolygon)
asset.export(ExamplePolygonDiffHeights)
asset.meta = {
Name = "GeoJson Example - Multiple Polygons",
Description = [[GeoJson example asset with multiple polygons]],

View File

@@ -1,70 +0,0 @@
local sun = asset.require("scene/solarsystem/sun/transforms")
local earth = asset.require("scene/solarsystem/planets/earth/earth")
local models = asset.resource({
Name = "New Horizons Model",
Type = "HttpSynchronization",
Identifier = "newhorizons_model",
Version = 2
})
local ExampleGlobeRotation = {
Identifier = "ExampleGlobeRotation",
Parent = earth.Earth.Identifier,
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = earth.Earth.Identifier,
Latitude = 40.7306,
Longitude = -73.9352,
Altitude = 6,
UseHeightmap = true
},
Rotation = {
Type = "GlobeRotation",
Globe = earth.Earth.Identifier,
Latitude = 40.7306,
Longitude = -73.9352
-- Can be used to to put flat on leaning surfaces, but also leads to updating
-- the rotation every frame
--UseHeightmap = true
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = models .. "NewHorizonsCleanModel.obj",
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "GlobeRotation",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(ExampleGlobeRotation)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(ExampleGlobeRotation)
end)
asset.export(ExampleGlobeRotation)
asset.meta = {
Name = "GlobeRotation Example",
Description = [[An example that demonstrates how to load a 3D model from a geometry
file, placing it on a planetary surface and rotate it to align with the surface
normal using a "GlobeRotation" transform. Note that "GlobeTranslation" is needed to
put the model in the correct location.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -76,6 +76,7 @@ asset.export(ExampleFixedHeight)
asset.export(ExampleAdaptiveHeight)
asset.meta = {
Name = "GlobeTranslation Example",
Description = [[An example that demonstrates how to place an object on a planet surface

View File

@@ -19,7 +19,7 @@ local RadialGrid = {
},
GUI = {
Name = "Example Radial Grid",
Description = [[A circular 2D grid, with segments based on the radius and angle.]],
Description = "A circular 2D grid, with segments based on the radius and angle.",
Path = "/Examples/Grids"
}
}
@@ -44,7 +44,7 @@ local PlanarGrid = {
},
GUI = {
Name = "Example Grid",
Description = [[A basic 2D grid, with a given size and number of segments.]],
Description = "A basic 2D grid, with a given size and number of segments.",
Path = "/Examples/Grids"
}
}
@@ -65,7 +65,7 @@ local SphericalGrid = {
},
GUI = {
Name = "Example Spherical Grid",
Description = [[A grid in the form of a 3D sphere.]],
Description = "A grid in the form of a 3D sphere.",
Path = "/Examples/Grids"
}
}
@@ -87,7 +87,7 @@ local BoxGrid = {
},
GUI = {
Name = "Example Box Grid",
Description = [[A grid in the form of a 3D box.]],
Description = "A grid in the form of a 3D box.",
Path = "/Examples/Grids"
}
}
@@ -113,6 +113,7 @@ asset.export(SphericalGrid)
asset.export(BoxGrid)
asset.meta = {
Name = "Example Grids",
Description = [[Examples of different types of rendered grids.]],

View File

@@ -96,6 +96,7 @@ asset.onInitialize(function()
end)
asset.meta = {
Name = "Joystick example",
Description = [[Example asset that binds a joystick to use for input and navigation.

View File

@@ -1,53 +0,0 @@
local sun = asset.require("scene/solarsystem/sun/sun")
local transforms = asset.require("scene/solarsystem/planets/earth/transforms")
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Model = {
Identifier = "ModelShader",
Parent = transforms.EarthCenter.Identifier,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { -11E7, 0.0, 0.0 }
}
},
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
ModelScale = 3E7,
-- (malej 2023-MAY-22) Note that PerformShading should be false in this example,
-- since these example shaders dont't contain any light calculations
PerformShading = false,
VertexShader = asset.resource("model_vs.glsl"),
FragmentShader = asset.resource("model_fs.glsl"),
EnableAnimation = true,
AnimationStartTime = "2023 05 11 00:00:00",
AnimationTimeScale = "Second",
AnimationMode = "LoopInfinitely"
},
GUI = {
Name = "Model Shader",
Path = "/Examples",
Description = "Simple box model with a custom shader"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Model)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Model)
end)
asset.export(Model)

View File

@@ -18,7 +18,7 @@ local FlipUpsideDown = {
Up = {0.0, 0.0, -1.0}
}
-- Set the navigation state with the new navigation state variable
openspace.navigation.setNavigationState(newNavState)
openspace.navigation.setNavigationState(newNavState)
]],
GUI = {
Name = "Basic",

View File

@@ -15,7 +15,7 @@ local RenderableNodeLineExample = {
GUI = {
Name = "RenderableNodeLine - Basic",
Path = "/Examples",
Description = [[Draws a line between two nodes in the scene.]]
Description = "Draws a line between two nodes in the scene."
}
}

View File

@@ -59,6 +59,7 @@ asset.export(Circle)
asset.export(Ellipse)
asset.meta = {
Name = "Primitives Example",
Description = [[Examples of different simple rendered primitives, such as circles

View File

@@ -0,0 +1,50 @@
-- Custom Shaders
-- This example loads a model with custom shaders.
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Shader",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- PerformShading is turned off since the provided custom shaders does not do any
-- light calculations
PerformShading = false,
-- Custom shaders
VertexShader = asset.resource("../data/model_vs.glsl"),
FragmentShader = asset.resource("../data/model_fs.glsl"),
},
GUI = {
Name = "RenderableModel - Custom Shaders",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,43 @@
-- Basic
-- This example loads a model.
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
},
GUI = {
Name = "RenderableModel - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,49 @@
-- Animation
-- This example loads a model with an animation. The animation starts at a set time, in
-- this case "2024 07 09 12:00:00".
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Animation",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Animation Parameters:
EnableAnimation = true,
-- Start the animation and play it once at this time
AnimationStartTime = "2024 07 09 12:00:00",
},
GUI = {
Name = "RenderableModel - Basic Animation",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,52 @@
-- Animation Bounce From Start
-- This example loads a model with an animation. The animation starts at a set time, in
-- this case "2024 07 09 12:00:00" and is set to bounce after that time (bounce is similar
-- to a boomerang for videos).
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Animation_Bounce",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Animation Parameters:
EnableAnimation = true,
-- Start the animation and play it once at this time
AnimationStartTime = "2024 07 09 12:00:00",
-- Bounce the animation after the set start time
AnimationMode = "BounceFromStart",
},
GUI = {
Name = "RenderableModel - Animation Bounce From Start",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,52 @@
-- Animation Bounce Infinitely
-- This example loads a model with an animation. The animation starts at a set time, in
-- this case "2024 07 09 12:00:00" and is set to bounce both before and after that time
-- (bounce is similar to a boomerang for videos).
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Animation_Bounce_Infinitely",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Animation Parameters:
EnableAnimation = true,
-- Start the animation and play it once at this time
AnimationStartTime = "2024 07 09 12:00:00",
-- Bounce the animation both before and after the set start time
AnimationMode = "BounceInfinitely",
},
GUI = {
Name = "RenderableModel - Animation Bounce Infinitely",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,51 @@
-- Animation Loop From Start
-- This example loads a model with an animation. The animation starts at a set time, in
-- this case "2024 07 09 12:00:00" and is set to loop after that time.
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Animation_Loop",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Animation Parameters:
EnableAnimation = true,
-- Start the animation and play it once at this time
AnimationStartTime = "2024 07 09 12:00:00",
-- Loop the animation after the set start time
AnimationMode = "LoopFromStart",
},
GUI = {
Name = "RenderableModel - Animation Loop From Start",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,51 @@
-- Animation Loop Infinitely
-- This example loads a model with an animation. The animation starts at a set time, in
-- this case "2024 07 09 12:00:00" and is set to loop both before and after that time.
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Animation_Loop_Infinitely",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Animation Parameters:
EnableAnimation = true,
-- Start the animation and play it once at this time
AnimationStartTime = "2024 07 09 12:00:00",
-- Loop the animation both before and after the set start time
AnimationMode = "LoopInfinitely",
},
GUI = {
Name = "RenderableModel - Animation Loop Infinitely",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,51 @@
-- Lighting
-- This example loads a model and load the Sun to illuminate it.
-- Load the asset of the Sun to illuminate the model
local sun = asset.require("scene/solarsystem/sun/transforms")
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Animated Box",
Type = "HttpSynchronization",
Identifier = "animated_box",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Lighting",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "BoxAnimated.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
-- Add the Sun as a light source to illuminate the model
LightSources = {
sun.LightSource
}
},
GUI = {
Name = "RenderableModel - Lighting",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Cesium, https://cesium.com/
URL = https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BoxAnimated
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -0,0 +1,43 @@
-- Vertex Colors
-- This example loads a model with vertex colors as material.
-- Load the example model from OpenSpace servers
-- If you want to use your own model, this block of code can be safely deleted
local model = asset.resource({
Name = "Vertex Colors Test Model",
Type = "HttpSynchronization",
Identifier = "model_vertex_color_test",
Version = 1
})
local Node = {
Identifier = "RenderableModel_Example_Vertex_Colors",
Renderable = {
Type = "RenderableModel",
GeometryFile = model .. "VertexColorTest.glb",
-- Use the line below insted of the one above if you want to use your own model
--GeometryFile = "C:/path/to/model.fbx",
},
GUI = {
Name = "RenderableModel - Vertex Colors",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)
-- Model credit
--[[
Author = Ed Mackey
URL = "https://github.com/KhronosGroup/glTF-Sample-Models/tree/main/2.0/VertexColorTest"
License =
Creative Commons Attribution 4.0 International License,
https://creativecommons.org/licenses/by/4.0/
]]

View File

@@ -60,7 +60,6 @@ local Node = {
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)

View File

@@ -43,7 +43,6 @@ local Node = {
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)

View File

@@ -57,7 +57,6 @@ local Node_Invert = {
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
openspace.addSceneGraphNode(Node_Invert)

View File

@@ -0,0 +1,29 @@
-- Basic
-- This asset applies a rotation to a set of coordinate axes that makes them rotate at a
-- constant rate of one revolution around the z-axis every 2 seconds.
local Node = {
Identifier = "ConstantRotation_Example",
Transform = {
Rotation = {
Type = "ConstantRotation",
RotationAxis = { 0.0, 0.0, 1.0 },
RotationRate = 0.5
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "ConstantRotation - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)

View File

@@ -0,0 +1,57 @@
-- Angle
-- This asset creates a rotation that places a coordinate axes on the surface of a
-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface
-- of the globe. Additionally, the coordinate axes are rotated around the up-axis by a
-- fixed amount.
--
-- In order for this feature to work properly, the coordinate axes need to be located at
-- the same place as well, so this example also needs a `GlobeTranslation` applied.
-- The example needs a `RenderableGlobe` as a parent to function
local Globe = {
Identifier = "GlobeRotation_Example_Angle_Globe",
Renderable = {
Type = "RenderableGlobe"
},
GUI = {
Name = "GlobeRotation - Angle (Globe)",
Path = "/Examples"
}
}
local Node = {
Identifier = "GlobeRotation_Example_Angle",
Parent = "GlobeRotation_Example_Angle_Globe",
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = "GlobeRotation_Example_Angle_Globe",
Latitude = 20.0,
Longitude = -45.0
},
Rotation = {
Type = "GlobeRotation",
Globe = "GlobeRotation_Example_Angle_Globe",
Latitude = 20.0,
Longitude = -45.0,
Angle = 45.0
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "GlobeRotation - Angle",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Globe)
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
openspace.removeSceneGraphNode(Globe)
end)

View File

@@ -0,0 +1,55 @@
-- Basic
-- This asset creates a rotation that places a coordinate axes on the surface of a
-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface
-- of the globe.
--
-- In order for this feature to work properly, the coordinate axes need to be located at
-- the same place as well, so this example also needs a `GlobeTranslation` applied.
-- The example needs a `RenderableGlobe` as a parent to function
local Globe = {
Identifier = "GlobeRotation_Example_Globe",
Renderable = {
Type = "RenderableGlobe"
},
GUI = {
Name = "GlobeRotation - Basic (Globe)",
Path = "/Examples"
}
}
local Node = {
Identifier = "GlobeRotation_Example",
Parent = "GlobeRotation_Example_Globe",
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = "GlobeRotation_Example_Globe",
Latitude = 20.0,
Longitude = -45.0
},
Rotation = {
Type = "GlobeRotation",
Globe = "GlobeRotation_Example_Globe",
Latitude = 20.0,
Longitude = -45.0
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "GlobeRotation - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Globe)
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
openspace.removeSceneGraphNode(Globe)
end)

View File

@@ -0,0 +1,61 @@
-- UseCamera
-- This asset creates a rotation that places a coordinate axes on the surface of a
-- planetary body. The rotation causes the coordinate axes to remain fixed to the surface
-- of the globe. In this example, the rotation of the object will be updated based on the
-- location of the camera. When loading this example, make sure to focus the camera on
-- the Globe object for the follow-function to work.
--
-- In order for this feature to work properly, the coordinate axes need to be located at
-- the same place as well, so this example also needs a `GlobeTranslation` applied, which
-- in this case also updated based on the camera location.
-- The example needs a `RenderableGlobe` as a parent to function
local Globe = {
Identifier = "GlobeRotation_Example_UseCamera_Globe",
Renderable = {
Type = "RenderableGlobe"
},
GUI = {
Name = "GlobeRotation - UseCamera (Globe)",
Path = "/Examples"
}
}
local Node = {
Identifier = "GlobeRotation_Example_UseCamera",
Parent = "GlobeRotation_Example_UseCamera_Globe",
Transform = {
Translation = {
Type = "GlobeTranslation",
Globe = "GlobeRotation_Example_UseCamera_Globe",
Latitude = 20.0,
Longitude = -45.0,
UseCamera = true
},
Rotation = {
Type = "GlobeRotation",
Globe = "GlobeRotation_Example_UseCamera_Globe",
Latitude = 20.0,
Longitude = -45.0,
Angle = 45.0,
UseCamera = true
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "GlobeRotation - UseCamera",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Globe)
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
openspace.removeSceneGraphNode(Globe)
end)

View File

@@ -0,0 +1,36 @@
-- Fixed Date
-- This asset creates a rotation provided by a SPICE kernel and applies it to a
-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes
-- are determined by SPICE, in this case pretending that the coordinate axes are rotating
-- at the same rate as Earth. In this specific example, the orientation is independent of
-- the actual in-game time in OpenSpace and only uses a fixed date of 2000 JAN 01 instead.
-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel
asset.require("spice/core")
local Node = {
Identifier = "SpiceRotation_Example_FixedDate",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC",
FixedDate = "2000 JAN 01 00:00:00.000"
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "SpiceRotation - Fixed Date",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)

View File

@@ -0,0 +1,34 @@
-- Basic
-- This asset creates a rotation provided by a SPICE kernel and applies it to a
-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes
-- are determined by SPICE, in this case pretending that the coordinate axes are rotating
-- at the same rate as Earth.
-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel
asset.require("spice/core")
local Node = {
Identifier = "SpiceRotation_Example",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC"
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "SpiceRotation - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)

View File

@@ -0,0 +1,41 @@
-- TimeFrame
-- This asset creates a rotation provided by a SPICE kernel and applies it to a
-- SceneGraphNode that only displays coordinate axes. The rotation of the coordinate axes
-- are determined by SPICE, in this case pretending that the coordinate axes are rotating
-- at the same rate as Earth. In this example, the rotation is only calculated between
-- 2000 JAN 01 and 2002 JAN 01 to exemplify a use-case in which the data from the SPICE
-- kernel is not available for the whole duration.
-- Load the default SPICE kernels, which is the planetary constants and the DE430 kernel
asset.require("spice/core")
local Node = {
Identifier = "SpiceRotation_Example_TimeFrame",
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_EARTH",
DestinationFrame = "GALACTIC",
TimeFrame = {
Type = "TimeFrameInterval",
Start = "2000 JAN 01",
End = "2002 JAN 01"
}
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "SpiceRotation - TimeFrame",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)

View File

@@ -17,6 +17,7 @@ end)
asset.export(Browser)
asset.meta = {
Name = "ScreenSpaceBrowser Example",
Description = [[Example of how to load and show a webpage in the rendering. The loaded

View File

@@ -0,0 +1,43 @@
local Dashboard = {
Identifier = "ScreenSpaceTime",
Name = "Time",
Type = "ScreenSpaceDashboard",
FaceCamera = false,
Scale = 3.0,
Items = {
{
Type = "DashboardItemDate",
Identifier = "Date",
GuiName = "Date",
FontSize = 72,
FormatString = "{}",
TimeFormat = "YYYY MON DD HR:MN:SC.### ::RND"
}
}
}
asset.onInitialize(function()
openspace.addScreenSpaceRenderable(Dashboard)
openspace.setPropertyValueSingle("ScreenSpace.ScreenSpaceTime.Size", {0.000000,0.000000,640.000000,320.000000})
end)
asset.onDeinitialize(function()
openspace.addScreenSpaceRenderable(Dashboard)
end)
asset.export(Dashboard)
asset.meta = {
Name = "ScreenSpace - Date",
Description = [[
This asset provides a Date dashboard item that is shown on a screen space object.
This can be place on a dome surface to show the current time to the audience.
]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -51,6 +51,7 @@ for _, n in ipairs(spheres) do
end
asset.meta = {
Name = "Spheres Example",
Description = [[Example showing how to render textured spheres in 3D space. Some

View File

@@ -73,6 +73,7 @@ asset.onInitialize(function()
end)
asset.meta = {
Name = "State Machine",
Description = [[Example of how to create a state machine in OpenSpace, where each

View File

@@ -14,7 +14,6 @@ asset.onInitialize(function()
openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)
asset.onDeinitialize(function()
openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
end)

View File

@@ -0,0 +1,29 @@
-- Basic
-- This asset creates a set of coordinate axes that are offset from their original
-- position by a fixed and static amount. In this specific example, the axes are offset
-- by 50 meters along the y-axis and 10 meters along the negative z-axis.
local Node = {
Identifier = "StaticTranslation_Example",
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { 0.0, 50.0, -10.0 }
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "StaticTranslation - Basic",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)

View File

@@ -20,17 +20,12 @@ asset.resource({
Type = "UrlSynchronization",
Identifier = "example_large",
Url = {
"http://speedtest.tele2.net/1GB.zip",
"http://speedtest.tele2.net/100MB.zip",
"https://proof.ovh.net/files/1Gb.dat",
"https://proof.ovh.net/files/100Mb.dat",
"https://speed.hetzner.de/1GB.bin",
"https://speed.hetzner.de/100MB.bin",
"http://ipv4.download.thinkbroadband.com/1GB.zip",
"http://ipv4.download.thinkbroadband.com/512MB.zip",
"http://ipv4.download.thinkbroadband.com/200MB.zip",
"http://ipv4.download.thinkbroadband.com/100MB.zip",
"http://ipv4.download.thinkbroadband.com/50MB.zip",
@@ -56,11 +51,12 @@ asset.resource({
Name = "Example No Hash",
Type = "UrlSynchronization",
Identifier = "no_hash",
Url = "http://wms.itn.liu.se/Mercury/Messenger_Mosaic/Messenger_Mosaic.wms",
Url = "http://liu-se.wms.openspaceproject.com/Mercury/Messenger_Mosaic/Messenger_Mosaic.wms",
UseHash = false
})
asset.meta = {
Name = "UrlSynchronization",
Description = [[Example showing how to load resources (any type of data file) from

View File

@@ -18,7 +18,7 @@ local Sphere = {
asset.onInitialize(function()
openspace.addSceneGraphNode(Sphere)
openspace.addSceneGraphNode(Sphere)
end)
asset.onDeinitialize(function()

View File

@@ -25,8 +25,8 @@ local Volume = {
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before
SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after
SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before
SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after
},
GUI = {
Path = "/Examples"

View File

@@ -11,6 +11,12 @@ local SunRadius = 695508000
local Volume = {
Identifier = "GeneratedVolumeCartesianSequence",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * SunRadius
}
},
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.resource("cartesiansequence"),
@@ -19,17 +25,11 @@ local Volume = {
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before
SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after
SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before
SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after
},
GUI = {
Path = "/Examples"
},
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * SunRadius
}
}
}

View File

@@ -25,8 +25,8 @@ local Volume = {
MinValue = 0,
MaxValue = 1,
GridType = "Spherical",
SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before
SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after
SecondsBefore = 50 * openspace.time.secondsPerYear(), -- 50 years before
SecondsAfter = 50 * openspace.time.secondsPerYear() -- 50 years after
},
GUI = {
Path = "/Examples"

View File

@@ -4,6 +4,8 @@ local bookmarkHelper = asset.require("util/generate_bookmarks")
-- ensure that it is loaded first
asset.require("scene/solarsystem/planets/earth/earth")
local localBookmarks = openspace.absPath("${USER}/bookmarks/localbookmarks.csv")
local bookmarksDirectory = openspace.absPath("${USER}/bookmarks")
@@ -13,15 +15,11 @@ end
-- Create bookmarks file if it does not exist
if not openspace.fileExists(localBookmarks) then
local file = io.open(localBookmarks, "w")
file:write(
"Group (optional),Name (required),Globe (optional),Lat (required if globe)," ..
"Lon (required if globe),Altitude (optional if globe),x (required if not globe)," ..
"y (required if not globe),z (required if not globe),Scale (optional)," ..
"LineWidth (optional)\n" ..
"NASA,Kennedy Space Center,Earth,28.6658276,-80.70282839,,,,,,\n"
openspace.downloadFile(
"http://liu-se.cdn.openspaceproject.com/files/misc/localbookmarks.csv",
openspace.absPath("${USER}/bookmarks/localbookmarks.csv"),
true
)
file:close()
end
local nodes = bookmarkHelper.loadBookmarks(
@@ -29,6 +27,7 @@ local nodes = bookmarkHelper.loadBookmarks(
"${USER}/bookmarks/localbookmarks.csv"
)
asset.onInitialize(function()
for _, n in ipairs(nodes) do
local success, error = pcall(openspace.addSceneGraphNode, n)

View File

@@ -1,6 +1,8 @@
local bookmarkHelper = asset.require("util/generate_bookmarks")
local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v2/bookmarks.csv"
local dataProvider = "http://data.openspaceproject.com/files/bookmarks/v3/bookmarks.csv"
local bookmarksCSV = asset.resource({
Identifier = "openspace_bookmarks",
@@ -11,8 +13,10 @@ local bookmarksCSV = asset.resource({
Url = dataProvider
})
local nodes = {}
asset.onInitialize(function()
nodes = bookmarkHelper.loadBookmarks("OpenSpace Bookmarks", bookmarksCSV .. "bookmarks.csv")
for _, n in ipairs(nodes) do

View File

@@ -1,5 +1,7 @@
local transforms = asset.require("scene/solarsystem/sun/transforms")
local imageFolder = asset.resource({
Name = "Hover Circle Image",
Type = "HttpSynchronization",

View File

@@ -25,8 +25,8 @@ local AltAzGridPosition = {
}
},
GUI = {
Name = "Altitude/Azimuth Grid Position",
Path = "/Other/Night Sky",
Name = "Altitude-Azimuth Grid Position",
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth",
Hidden = true
}
}
@@ -48,21 +48,20 @@ local AltAzGrid = {
Type = "RenderableSphericalGrid",
Enabled = asset.enabled,
Opacity = 0.8,
Color = { 0.4, 0.8, 0.4 },
Color = { 0.2, 0.4, 0.2 },
LineWidth = 2.0,
RenderBinMode = "PostDeferredTransparent"
},
GUI = {
Name = "Altitude/Azimuth Grid",
Name = "Altitude-Azimuth Grid",
Description = [[A local Altitude/Azimuth grid centered around your position on a
planetary surface. The grid can be toggled, hidden or shown using the accompanying
actions in the actions panel, under "Night Sky". Use these actions to move it to
another planet. The default is Earth.]],
Path = "/Other/Night Sky"
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth"
}
}
local ShowAltaz = {
Identifier = "os.nightsky.ShowAltaz",
Name = "Show Alt/Az grid",
@@ -102,6 +101,7 @@ local ToggleAltaz = {
IsLocal = false
}
asset.onInitialize(function()
openspace.addSceneGraphNode(AltAzGridPosition)
openspace.addSceneGraphNode(AltAzGrid)
@@ -126,6 +126,7 @@ asset.export("HideAltaz", HideAltaz.Identifier)
asset.export("ToggleAltaz", ToggleAltaz.Identifier)
asset.meta = {
Name = "Altitude/Azimuth Grid",
Description = [[A local Altitude/Azimuth grid centered around your position on a

View File

@@ -33,7 +33,7 @@ local CardinalDirectionsPosition = {
},
GUI = {
Name = "Cardinal Directions Position",
Path = "/Other/Night Sky",
Path = "/Night Sky",
Hidden = true
}
}
@@ -63,7 +63,7 @@ local CardinalDirectionSphere = {
Description = [[A textured sphere showing the cardinal directions.
The sphere is placed on the planet surface and follows the camera's movements.
]],
Path = "/Other/Night Sky"
Path = "/Night Sky"
}
}
@@ -129,6 +129,7 @@ local HideNesw = {
IsLocal = false
}
asset.onInitialize(function()
openspace.addSceneGraphNode(CardinalDirectionsPosition)
openspace.addSceneGraphNode(CardinalDirectionSphere)
@@ -158,6 +159,7 @@ asset.export("ShowNeswLettersSmall", ShowNeswLettersSmall.Identifier)
asset.export("HideNesw", HideNesw.Identifier)
asset.meta = {
Name = "Cardinal Directions",
Description = [[Adds a sphere showing the cardinal directions, that follows the camera

View File

@@ -11,9 +11,9 @@ local textures = asset.resource({
local EclipticRotationMatrix = {
-0.05487554, 0.4941095, -0.8676661,
-0.9938214, -0.1109906, -0.0003515167,
-0.09647644, 0.8622859, 0.4971472
-0.05487554, 0.4941095, -0.8676661,
-0.9938214, -0.1109906, -0.0003515167,
-0.09647644, 0.8622859, 0.4971472
}
local EclipticLine = {
@@ -22,7 +22,7 @@ local EclipticLine = {
Transform = {
Scale = {
Type = "StaticScale",
Scale = 4.28601E17
Scale = 9.46377307652E17
},
Rotation = {
Type = "StaticRotation",
@@ -32,16 +32,15 @@ local EclipticLine = {
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
Color = { 1.0, 1.0, 1.0 },
LineWidth = 3.0,
Color = { 0.5, 0.24, 0.24 },
LineWidth = 4.0,
GridSegments = { 1, 1 },
Radii = { 0.5, 0.5 },
Enabled = asset.enabled
},
GUI = {
Name = "Ecliptic Line",
Name = "Ecliptic",
Description = "A line representation of the Ecliptic plane.",
Path = "/Other/Lines"
Path = "/Night Sky/Coordinate Systems/Ecliptic"
}
}
@@ -57,7 +56,7 @@ local EclipticBand = {
Renderable = {
Type = "RenderableSphereImageLocal",
Texture = textures .. "band2x.png",
Size = 4.28601E17,
Size = 9.46377307652E17,
Segments = 50,
DisableFadeInOut = true,
Orientation = "Inside",
@@ -67,7 +66,7 @@ local EclipticBand = {
GUI = {
Name = "Ecliptic Band",
Description = "A band representation of the Ecliptic plane.",
Path = "/Other/Lines"
Path = "/Night Sky/Coordinate Systems/Ecliptic"
}
}
@@ -162,6 +161,7 @@ asset.export("HideEclipticBand", HideEclipticBand.Identifier)
asset.export("ToggleEclipticBand", ToggleEclipticBand.Identifier)
asset.meta = {
Name = "Ecliptic Band/Line",
Description = [[A line and band representation of the Ecliptic plane, including actions

View File

@@ -3,9 +3,9 @@ local transforms = asset.require("scene/solarsystem/sun/transforms")
local EquatorialRotationMatrix = {
-0.05487554, 0.4941095, -0.8676661,
-0.8734371, -0.4448296, -0.1980764,
-0.483835, 0.7469823, 0.4559838
-0.05487554, 0.4941095, -0.8676661,
-0.8734371, -0.4448296, -0.1980764,
-0.483835, 0.7469823, 0.4559838
}
@@ -19,22 +19,21 @@ local EquatorialLine = {
},
Scale = {
Type = "StaticScale",
Scale = 4.28601E17
Scale = 7.5686E17
}
},
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
Color = { 1.0, 1.0, 1.0 },
LineWidth = 3.0,
Color = { 0.6, 0.6, 0.2 },
LineWidth = 4.0,
GridSegments = { 1, 1 },
Radii = { 0.5, 0.5 },
Enabled = asset.enabled
},
GUI = {
Name = "Equatorial Line",
Name = "Celestial Equator",
Description = "A line representation of the Equatorial plane.",
Path = "/Other/Lines"
Path = "/Night Sky/Coordinate Systems/Equatorial"
}
}
@@ -90,6 +89,7 @@ asset.export("HideEquatorialLine", HideEquatorialLine.Identifier)
asset.export("ToggleEquatorialLine", ToggleEquatorialLine.Identifier)
asset.meta = {
Name = "Equatorial Line",
Description = [[A line representation of the Equatorial plane, including actions

View File

@@ -2,29 +2,28 @@ local transforms = asset.require("scene/solarsystem/sun/transforms")
local GalacticBand = {
Identifier = "GalacticBand",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 9.46377307652E18
}
},
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
Color = { 1.0, 1.0, 1.0 },
LineWidth = 3.0,
GridSegments = { 1, 1 },
Radii = { 0.5, 0.5 },
Enabled = asset.enabled
},
GUI = {
Name = "Galactic Equator Line",
Description = "A line representation of the Galactic Equator plane.",
Path = "/Other/Lines"
local GalacticLine = {
Identifier = "GalacticLine",
Parent = transforms.SolarSystemBarycenter.Name,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 9.46377307652E18
}
},
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
Color = { 0.08, 0.40, 0.40 },
LineWidth = 4.0,
GridSegments = { 1, 1 },
Enabled = asset.enabled
},
GUI = {
Name = "Galactic Equator",
Description = "A line representation of the Galactic Equator plane.",
Path = "/Night Sky/Coordinate Systems/Galactic"
}
}
@@ -59,8 +58,9 @@ local ToggleGalacticBand = {
IsLocal = false
}
asset.onInitialize(function()
openspace.addSceneGraphNode(GalacticBand)
openspace.addSceneGraphNode(GalacticLine)
openspace.action.registerAction(ShowGalacticBand)
openspace.action.registerAction(HideGalacticBand)
end)
@@ -68,14 +68,15 @@ end)
asset.onDeinitialize(function()
openspace.action.removeAction(HideGalacticBand)
openspace.action.removeAction(ShowGalacticBand)
openspace.removeSceneGraphNode(GalacticBand)
openspace.removeSceneGraphNode(GalacticLine)
end)
asset.export(GalacticBand)
asset.export(GalacticLine)
asset.export("ShowGalacticBand", ShowGalacticBand.Identifier)
asset.export("HideGalacticBand", HideGalacticBand.Identifier)
asset.meta = {
Name = "Galactic Line",
Description = [[A line representation of the Galactic Equator plane, including actions

View File

@@ -42,7 +42,6 @@ local LightPollutionSphere = {
Orientation = "Inside",
MirrorTexture = true,
FadeOutThreshold = 1.00,
Background = true,
RenderBinMode = "PostDeferredTransparent",
Enabled = asset.enabled
},
@@ -51,7 +50,7 @@ local LightPollutionSphere = {
Description = [[A sphere used to simulate the effect of light pollution on
the night sky. Different pollution levels can be set using the provided actions.
These alter the opacity of the sphere.]],
Path = "/Other/Night Sky",
Path = "/Night Sky/Effects",
Hidden = false
}
}
@@ -63,7 +62,7 @@ local SetLightPollutionLevel1 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.9, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.9, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.01, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.1, 0.3)
]],
@@ -79,7 +78,7 @@ local SetLightPollutionLevel2 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.8, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.8, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.02, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.0, 0.3)
]],
@@ -95,7 +94,7 @@ local SetLightPollutionLevel3 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.7, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.7, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.03, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.9, 0.3)
]],
@@ -111,7 +110,7 @@ local SetLightPollutionLevel4 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.6, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.6, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.04, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.8, 0.3)
]],
@@ -127,7 +126,7 @@ local SetLightPollutionLevel5 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.5, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.5, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.05, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.8, 0.4)
]],
@@ -143,7 +142,7 @@ local SetLightPollutionLevel6 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.4, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.4, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.06, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.7, 0.4)
]],
@@ -159,7 +158,7 @@ local SetLightPollutionLevel7 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.3, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.3, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.07, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.6, 0.4)
]],
@@ -175,7 +174,7 @@ local SetLightPollutionLevel8 = {
openspace.globebrowsing.setNodePositionFromCamera("LightPollutionSphere", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.2, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.2, 0.3)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.08, 0.5)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.5, 0.4)
]],
@@ -192,7 +191,7 @@ local SetLightPollutionLevel9 = {
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 1.0)
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Opacity", 0.09, 0.5)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 0.1, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 0.1, 0.3)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 5.4, 0.4)
]],
Documentation = "Adds a light pollution sphere and lowers the level of the stars by 0.9",
@@ -206,7 +205,7 @@ local UndoLightPollution = {
Command = [[
openspace.setPropertyValueSingle("Scene.LightPollutionSphere.Renderable.Fade", 0.0, 0.3)
openspace.setPropertyValueSingle("Scene.Stars.Renderable.MagnitudeExponent", 6.2, 0.3)
openspace.setPropertyValueSingle("Scene.MilkyWay.Renderable.Fade", 1.0, 0.3)
openspace.setPropertyValueSingle("Scene.AllSky_Visible.Renderable.Fade", 1.0, 0.3)
]],
Documentation = "Hides the light pollution sphere and resets the stars",
GuiPath = "/Night Sky/Light Pollution",
@@ -255,6 +254,7 @@ asset.export("SetLightPollutionLevel9", SetLightPollutionLevel9.Identifier)
asset.export("UndoLightPollution", UndoLightPollution.Identifier)
asset.meta = {
Name = "Light Pollution",
Description = [[Includes a sphere used to simulate the effect of light pollution on

View File

@@ -24,7 +24,7 @@ local MeridianPosition = {
},
GUI = {
Name = "Local Meridian Position",
Path = "/Other/Lines",
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth",
Hidden = true
}
}
@@ -41,17 +41,16 @@ local MeridianPlane = {
Renderable = {
Type = "RenderableRadialGrid",
Opacity = 0.8,
Color = { 1.0, 1.0, 1.0 },
LineWidth = 3.0,
Color = { 0.4, 0.8, 0.4 },
LineWidth = 6.0,
GridSegments = { 1, 1 },
Radii = { 0.5, 0.5 },
Enabled = asset.enabled,
RenderBinMode = "PostDeferredTransparent"
},
GUI = {
Name = "Local Meridian",
Description = [[A line representation of the Local Meridian]],
Path = "/Other/Lines"
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth"
}
}
@@ -81,7 +80,6 @@ local HideMeridian = {
IsLocal = false
}
local ToggleMeridian = {
Identifier = "os.nightsky.ToggleMeridian",
Name = "Toggle local meridian",
@@ -121,6 +119,7 @@ asset.export("HideMeridian", HideMeridian.Identifier)
asset.export("ToggleMeridian", ToggleMeridian.Identifier)
asset.meta = {
Name = "Meridian",
Description = [[A line representation of the Local Meridian, including actions

View File

@@ -11,6 +11,7 @@ asset.require("actions/nightsky/camera", false)
asset.require("actions/nightsky/daytime", false)
asset.meta = {
Name = "Night Sky Assets",
Description = [[A collection of assets useful for studying the night sky.]],

View File

@@ -32,7 +32,8 @@ local Mercury = {
Name = "Night Sky Mercury",
Description = [[A night sky version of the planet Mercury, making it visible as
a bright object on the sky (textured representation).]],
Path = "/Other/Night Sky/Planets"
Path = "/Night Sky/Planets",
OrderingNumber = 1
}
}
@@ -54,7 +55,8 @@ local Venus = {
Name = "Night Sky Venus",
Description = [[A night sky version of the planet Venus, making it visible as
a bright object on the sky (textured representation).]],
Path = "/Other/Night Sky/Planets"
Path = "/Night Sky/Planets",
OrderingNumber = 2
}
}
@@ -74,7 +76,8 @@ local Mars = {
Tag = { "nightsky_billboard" },
GUI = {
Name = "Night Sky Mars",
Path = "/Other/Night Sky/Planets"
Path = "/Night Sky/Planets",
OrderingNumber = 4
}
}
@@ -96,7 +99,8 @@ local Jupiter = {
Name = "Night Sky Jupiter",
Description = [[A night sky version of the planet Jupiter, making it visible as
a bright object on the sky (textured representation).]],
Path = "/Other/Night Sky/Planets"
Path = "/Night Sky/Planets",
OrderingNumber = 5
}
}
@@ -118,7 +122,8 @@ local Saturn = {
Name = "Night Sky Saturn",
Description = [[A night sky version of the planet Saturn, making it visible as
a bright object on the sky (textured representation).]],
Path = "/Other/Night Sky/Planets"
Path = "/Night Sky/Planets",
OrderingNumber = 6
}
}
@@ -154,7 +159,6 @@ local HideNightSkyPlanets = {
IsLocal = false
}
local ToggleNightSkyPlanets = {
Identifier = "os.nightsky.ToggleNightSkyPlanets",
Name = "Toggle night sky planets",
@@ -176,6 +180,7 @@ local ToggleNightSkyPlanets = {
IsLocal = false
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Mercury)
openspace.addSceneGraphNode(Venus)
@@ -208,6 +213,7 @@ asset.export("HideNightSkyPlanets", HideNightSkyPlanets.Identifier)
asset.export("ToggleNightSkyPlanets", ToggleNightSkyPlanets.Identifier)
asset.meta = {
Name = "Night Sky Planets",
Description = [[A collection of night sky versions of the planets Mercury, Venus,

View File

@@ -33,7 +33,7 @@ local ZenithPosition = {
},
GUI = {
Name = "Zenith Position",
Path = "/Other/Points",
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth",
Hidden = true
}
}
@@ -61,7 +61,7 @@ local ZenithDot = {
Description = [[A dot representation of the Local Zenith, based on the camera's
current position on a planet. Use the provided show or toggle action to move it
between planets. The default is Earth.]],
Path = "/Other/Points"
Path = "/Night Sky/Coordinate Systems/Altitude-Azimuth"
}
}
@@ -106,6 +106,7 @@ local ToggleZenith = {
IsLocal = false
}
asset.onInitialize(function()
openspace.addSceneGraphNode(ZenithPosition)
openspace.addSceneGraphNode(ZenithDot)
@@ -129,6 +130,7 @@ asset.export("HideZenith", HideZenith.Identifier)
asset.export("ToggleZenith", ToggleZenith.Identifier)
asset.meta = {
Name = "Zenith",
Description = [[A dot representation of the Local Zenith (based on the current

View File

@@ -1,8 +1,8 @@
local textures = asset.resource({
Name = "2dF Textures",
Name = "Point Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_2dF_textures",
Version = 2
Identifier = "digitaluniverse_point_textures",
Version = 1
})
local speck = asset.resource({
@@ -41,20 +41,13 @@ local Object = {
},
GUI = {
Name = "2dF Galaxies",
Path = "/Universe/Galaxies",
Description = [[Census 229,293 galaxies. DU Version 1.7. <br> The Two-degree Field
(2dF) Survey was a project designed to map portions of the extragalactic universe. The
2dF instrument was mounted on the 3.9-meter (12.8-foot) Anglo-Australian Telescope
(AAT), located 450 km (280 miles) northwest of Sydney. The telescope has a two-degree
field of view on the sky, enabling large parts of the sky to be observed at one time.
For each pointing of the telescope, the instrument can acquire up to 400 spectra
simultaneously via optical fibers that feed into two spectrographs. Each spectrograph
sees light that is between 350 nm and 800 nm, spanning the visible spectrum. <br><br>
The 2dF survey has three main components: the North Galactic Pole strip, the South
Galactic Pole strip, and the random fields that surround the South Galactic Pole
strip. The galaxy survey is composed of about 230,000 galaxies with brightness and
redshift measurements. (Description from URL) <br><br> Data Reference: 2dF Galaxy
Redshift Survey (2dFGRS Team, 1998-2003)]]
Path = "/Universe/Deep Sky Surveys",
Description = [[The Two-degree Field (2dF) Survey was a project designed to map
portions of the extragalactic universe. The 2dF survey has three main components:
the North Galactic Pole strip, the South Galactic Pole strip, and the random fields
that surround the South Galactic Pole strip. Colors: Orange galaxies show dense
regions of galaxies, aqua galaxies are areas of intermediate density, and green
galaxies are areas of lower density. Census: 229,293 galaxies.]]
}
}
@@ -73,7 +66,7 @@ asset.export(Object)
asset.meta = {
Name = "2dF Galaxies",
Description = "Digital Universe asset for the The Two-degree Field (2dF) Survey",
Description = Object.GUI.Description,
Author = "Brian Abbott (AMNH), Eric Gawiser (Rutgers U)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -1,8 +1,8 @@
local textures = asset.resource({
Name = "2MASS Textures",
Name = "Point Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_2mass_textures",
Version = 2
Identifier = "digitaluniverse_point_textures",
Version = 1
})
local speck = asset.resource({
@@ -42,14 +42,14 @@ local Object = {
},
GUI = {
Name = "2MASS Galaxies",
Path = "/Universe/Galaxies",
Path = "/Universe/Nearby Surveys",
Description = [[The Two Micron All-Sky Survey (2MASS) is an infrared survey of the
sky published in 2003. Because it is looking in the infrared, and this is a composite
of the 2MASS point-source catalog, most of the light from this survey is starlight. In
visible light, clouds of gas and dust obscure our view. However, in infrared, the
longer wavelengths of light can penetrate these clouds without being scattered,
thereby revealing stars that would normally be hidden to our eye.
(Description from URL)]]
sky published in 2003. Taken from two telescopes in Arizona and Chile, it offers an
all-sky view of galaxies beyond the Milky Way. Because it is infrared, the light
detected is mostly from cool stars within the galaxies, which comprises the majority
of mass in a galaxy. Colors: Orange galaxies show dense regions of galaxies, aqua
galaxies are areas of intermediate density, and green galaxies are areas of lower
density. Census: 43,533 galaxies.]]
}
}
@@ -68,7 +68,7 @@ asset.export(Object)
asset.meta = {
Name = "2MASS Galaxies",
Description = "Digital Universe asset for the Two Micron All-Sky Survey (2MASS) survey",
Description = Object.GUI.Description,
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -1,8 +1,8 @@
local textures = asset.resource({
Name = "6dF Textures",
Name = "Point Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_6dF_textures",
Version = 2
Identifier = "digitaluniverse_point_textures",
Version = 1
})
local speck = asset.resource({
@@ -42,18 +42,13 @@ local Object = {
},
GUI = {
Name = "6dF Galaxies",
Path = "/Universe/Galaxies",
Description = [[Census 109,569 galaxies. DU Version 1.4.<br> The Six-degree Field
(6dF) Galaxy Survey mapped nearly half the sky from the Anglo-Australian
Observatory. Unlike previous datasets, this one is not all-sky, meaning there
are patches of sky that are not covered. In this case, the entire northern
hemisphere has no coverage at all. This catalog overlaps with the Tully
dataset, and there is a noticeable difference in the quality of these
datasets. Tully is much tighter and the structure is more apparent, while the
6dF data are more spread out. This is because of local motions within galaxy
clusters have not been corrected in these data. (Description from URL)
<br><br> Data Reference: The 6dF Galaxy Survey Redshift Catalogue
(Jones+, 2009)]]
Path = "/Universe/Deep Sky Surveys",
Description = [[The Six-degree Field (6dF) Galaxy Survey mapped nearly half the sky
from the Anglo-Australian Observatory. Because it's a southern hemisphere survey,
there is no coverage in these data for the northern hemisphere's sky. As with all
galaxy surveys, the organge galaxies are in relatively dense areas, the green
galaxies are in relatively sparse areas, and the aqua galaxies are between. Census:
109,569 galaxies.]]
}
}
@@ -72,7 +67,7 @@ asset.export(Object)
asset.meta = {
Name = "6dF Galaxies",
Description = "Digital Universe asset for The Six-degree Field (6dF) Galaxy Survey",
Description = Object.GUI.Description,
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -1,8 +1,12 @@
local transforms = asset.require("./transforms")
local textures = asset.resource({
Name = "Abell Textures",
Name = "Point Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_abell_textures",
Version = 2
Identifier = "digitaluniverse_point_textures",
Version = 1
})
local speck = asset.resource({
@@ -13,13 +17,6 @@ local speck = asset.resource({
})
local TransformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local Object = {
Identifier = "Abell",
Renderable = {
@@ -30,10 +27,10 @@ local Object = {
File = speck .. "abell.label",
Opacity = 1.0,
Color = { 0.0, 0.8, 0.0 },
Size = 22,
Size = 21.2,
MinMaxSize = { 10, 12 },
Unit = "Mpc",
TransformationMatrix = TransformMatrix
TransformationMatrix = transforms.Supergalactic
},
Opacity = 1.0,
Coloring = {
@@ -44,28 +41,23 @@ local Object = {
File = textures .. "point3A.png",
},
Unit = "Mpc",
TransformationMatrix = TransformMatrix,
TransformationMatrix = transforms.Supergalactic,
SizeSettings = {
ScaleExponent = 22.6,
ScaleExponent = 23.2,
MaxSize = 0.27,
EnableMaxSizeControl = true
}
},
GUI = {
Name = "Abell Galaxy Clusters",
Path = "/Universe/Galaxies",
Description = [[Census 2,246 galaxies. DU Version 1.4. <br> The Abell catalog
includes all the nearby, and not so nearby, galaxy clusters. The northern
hemisphere survey, published in 1958, was compiled by George Abell (1927-1983)
from the Palomar Sky Survey plates. A subsequent southern hemisphere catalog
was published posthumously in 1989. Further analysis by Brent Tully determined
their distance and three-dimensional distribution. Each point in this data set
represents a cluster of tens to hundreds (possibly even thousands) of
galaxies, similar to the Virgo or Fornax Clusters. You will notice some points
are assigned colors while most are gray. The data set also has an arbitrary
cut-off for completeness, resulting in the rectangular shape of the data set.
(Description from URL) <br><br> Data Reference: Abell Clusters of Rich
Galaxies, Brent Tully (U Hawaii), Stuart Levy (NCSA/UIUC)]]
Path = "/Universe/Deep Sky Surveys",
Description = [[The Abell catalog includes all the nearby, and not so nearby, galaxy
clusters. The northern hemisphere survey, published in 1958, was compiled by George
Abell from the Palomar Sky Survey plates. A subsequent southern hemisphere catalog
was published posthumously in 1989. Each point in this data set represents a
cluster of tens to hundreds (possibly even thousands) of galaxies, similar to the
Virgo or Fornax Clusters. The data have an arbitrary cut-off for completeness,
resulting in the rectangular shape of the data set. Census: 2,246 galaxy clusters.]]
}
}
@@ -84,7 +76,7 @@ asset.export(Object)
asset.meta = {
Name = "Abell Galaxy Clusters",
Description = "Digital Universe asset for The Abell catalog",
Description = Object.GUI.Description,
Author = "Stuart Levy (NCSA/UIUC), Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -0,0 +1,67 @@
local textures = asset.resource({
Name = "Multiwavelength Milky Way Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_multiwavelength_milkyway_textures",
Version = 1
})
local Object = {
Identifier = "AllSky_HAlpha",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, math.pi }
}
},
Renderable = {
Type = "RenderableSphereImageLocal",
Enabled = false,
Size = 9.2E21,
Segments = 40,
Opacity = 0.4,
Texture = textures .. "mwHalpha-f.png",
Orientation = "Inside",
MirrorTexture = true,
FadeOutThreshold = 0.025
},
GUI = {
Name = "Hydrogen Alpha",
Path = "/Milky Way/All Sky Images",
Description = [[Hydrogen-alpha is a term that describes light from the ground state of
the hydrogen atom. When an electron in an atom moves from one energy level to a
higher one, we say the atom is excited. When the electron moves back down to the
lower energy level, light is released at a wavelength commensurate with the energy
between the two levels. For the H-alpha line, this energy difference translates to a
wavelength in the extreme red end of the visible spectrum. This survey of the sky is
a snapshot of light from this wavelength.
One distinctive element of the sky at this wavelength is the presence of large,
spherical bubbles surrounding hot stars. Many nebulae and star-forming regions are
visible, including the Great Nebula of Orion. We also see that galaxies emit H-alpha
light, including the Andromeda Galaxy and the faint M33, the large face-on spiral in
Triangulum, and the Large and Small Magellanic Clouds (LMC and SMC) in the southern
sky. Census: 1 all-sky image.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Object)
end)
asset.export(Object)
asset.meta = {
Name = "Milky Way All-Sky Hydrogen Alpha",
Description = Object.GUI.Description,
Author = "Brian Abbott, Carter Emmart (AMNH), OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -0,0 +1,59 @@
local textures = asset.resource({
Name = "Milky Way All Sky Textures",
Type = "HttpSynchronization",
Identifier = "milkyway_textures",
Version = 2
})
local Object = {
Identifier = "AllSky_Visible",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, math.pi }
}
},
Renderable = {
Type = "RenderableSphereImageLocal",
Size = 9.2E21,
Segments = 40,
Opacity = 0.25,
Texture = textures .. "DarkUniverse_mellinger_4k.jpg",
Orientation = "Inside",
MirrorTexture = true,
FadeOutThreshold = 0.0015,
DimInAtmosphere = true
},
Tag = { "daytime_hidden" },
GUI = {
Name = "Visible Milky Way",
Path = "/Milky Way/All Sky Images",
Description = [[An all-sky image of the night sky as our eye sees it (in the visible
spectrum), with the stars removed. You will see the brightest part of the Galaxy if
you look toward Galactic center toward the constellations Scorpius and Sagittarius.
This bright haze is the light from millions of stars; the dark lanes are foreground
dust clouds, obscuring our view of the stars behind them. Census: 1 all-sky image.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Object)
end)
asset.export(Object)
asset.meta = {
Name = "Milky Way All-Sky Visible Light",
Description = Object.GUI.Description,
Author = "Brian Abbott, Carter Emmart (AMNH), OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -2,7 +2,7 @@ local speck = asset.resource({
Name = "Alternate Star Labels Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_alternatestarlabels_speck",
Version = 2
Version = 3
})
@@ -13,10 +13,10 @@ local Object = {
Enabled = false,
Labels = {
Enabled = true,
File = speck .. "altstarlabels.label",
File = speck .. "stars_alt_labels.label",
Color = { 0.4, 0.4, 0.4 },
Size = 14.7,
MinMaxSize = { 6, 20 },
MinMaxSize = { 15, 20 },
Unit = "pc"
},
Opacity = 0.65,
@@ -25,13 +25,9 @@ local Object = {
GUI = {
Name = "Stars Labels - Alternate",
Path = "/Milky Way/Stars",
Description = [[Census 3,395 star names. DU Version 1.8. <br>The main star data
identify the accepted IAU star names for the brightest stars. However, astronomers
have long cataloged thousands of stars beyond the brightest ones we see. Several
attempts over thousands of years to name all the visible stars have led to two
main catalogs: Johann Bayer's Catalog from 1603 and John Flamsteed's Catalog
published in 1725. (Description from URL) <br><br> Data Reference: Various
sources]]
Description = [[Alternate star labels for the stars. Priority goes to Bayer IDs
(Greek designations, like Alpha Orionis), then to Flamsteed numbers (like 1
Orionis).]]
}
}
@@ -49,9 +45,9 @@ asset.export(Object)
asset.meta = {
Name = "Stars Labels - Alternate",
Description = "Digital Universe asset for alternate start labels",
Author = "Brian Abbott (AMNH)",
Name = "Alternative Labels for the Stars",
Description = Object.GUI.Description,
Author = "Zack Reeves, Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -13,6 +13,38 @@ local textures = asset.resource({
})
local COBE = {
Identifier = "COBE",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, math.pi }
}
},
Renderable = {
Type = "RenderableSphereImageLocal",
Enabled = false,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.5,
Texture = textures .. "COBErect.png",
Orientation = "Both",
MirrorTexture = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "1990 COBE CMB",
Path = "/Universe/Cosmic Microwave Background",
Description = [[In 1990, COBE, the Cosmic Background Explorer, took the first
detailed map of the cosmic microwave background light. The red areas are
relatively hotter areas of the CMB, while the blue areas are cooler than the
average. The lines of latitude and longitude are baked into this image, and
reflect galactic coordinates. Image resolution is 7 degrees. Census: 1
all-sky image.]]
}
}
local WMAP = {
Identifier = "WMAP",
Transform = {
@@ -33,35 +65,16 @@ local WMAP = {
FadeInThreshold = 0.4
},
GUI = {
Name = "Wilkinson Microwave Anisotropy Probe (WMAP)",
Path = "/Universe/Cosmic Microwave Background"
Name = "2003 WMAP CMB",
Path = "/Universe/Cosmic Microwave Background",
Description = [[WMAP, the Wilkinson Microwave Anisotropy Probe, released this all-sky
image of the cosmic microwave background light in 2003. The blue colors are slightly
cooler than average and red is slightly warmer, with fluctuations of about a
100,000th of a degree above or below the average. The resolution on this image is
0.5 degrees. Census: 1 all-sky image.]]
}
}
local CBE = {
Identifier = "CBE",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, math.pi }
}
},
Renderable = {
Type = "RenderableSphereImageLocal",
Enabled = false,
Size = 3975.41417036064E23,
Segments = 80,
Opacity = 0.5,
Texture = textures .. "COBErect.png",
Orientation = "Both",
MirrorTexture = true,
FadeInThreshold = 0.4
},
GUI = {
Name = "Cosmic Background Explorer",
Path = "/Universe/Cosmic Microwave Background"
}
}
local Planck = {
Identifier = "Planck",
@@ -83,67 +96,43 @@ local Planck = {
FadeInThreshold = 0.4
},
GUI = {
Name = "Planck",
Path = "/Universe/Cosmic Microwave Background"
}
}
local HAlpha = {
Identifier = "HAlpha",
Transform = {
Rotation = {
Type = "StaticRotation",
Rotation = { 0, 0, math.pi }
}
},
Renderable = {
Type = "RenderableSphereImageLocal",
Enabled = false,
Size = 9.2E21,
Segments = 40,
Opacity = 0.4,
Texture = textures .. "mwHalpha-f.png",
Orientation = "Inside",
MirrorTexture = true,
FadeOutThreshold = 0.025,
Background = true
},
GUI = {
Name = "H Alpha",
Path = "/Milky Way/All Sky Images"
Name = "2013 Planck CMB",
Path = "/Universe/Cosmic Microwave Background",
Description = [[The Planck mission's 2013 image of the cosmic microwave background
light release is the most detailed view of the CMB we have to date. The orange
areas represent the slightly hotter areas, and the blue areas show the areas that
are slightly cooler. The resolution on this image is 0.16 degrees. Census: 1
all-sky image.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(COBE)
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)
openspace.removeSceneGraphNode(COBE)
end)
asset.export(COBE)
asset.export(WMAP)
asset.export(CBE)
asset.export(Planck)
asset.export(HAlpha)
asset.meta = {
Name = "Background Radiation",
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
Collaboration, Wilkinson Microwave Anisotropy Probe/NASA, Doug
Finkbeiner (Princeton)]],
Name = "Cosmic Microwave Background",
Description = [[All-sky images of the Cosmic Microwave Background Light. The CMB has
been mapped by three main missions: COBE, WMAP, and Planck. The images are not true
all-sky images because the light from our own galaxy has been subtracted out of them.
From the discovery of the CMB in 1964, to the three space telescopes whose images we
see in this asset, we've gained a more detailed view of the CMB light, thereby telling
us more about the origin of the universe.]],
Author = "Brian Abbott (AMNH), OpenSpace Team",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -0,0 +1,79 @@
local textures = asset.resource({
Name = "Point Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_point_textures",
Version = 1
})
local speck = asset.resource({
Name = "Brown Dwarf Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_brown_dwarfs_speck",
Version = 1
})
local Object = {
Identifier = "BrownDwarfs",
Renderable = {
Type = "RenderablePointCloud",
Enabled = false,
File = speck .. "bd.speck",
Texture = {
File = textures .. "point3.png"
},
Unit = "pc",
Coloring = {
FixedColor = { 0.4, 0.0, 0.1 },
ColorMapping = {
File = speck .. "bd.cmap",
ParameterOptions = {
{ Key = "typeindex", Range = { 1.0, 4.0 } }
}
}
},
SizeSettings = {
ScaleExponent = 15.8,
MaxSize = 0.7,
EnableMaxSizeControl = true
}
},
GUI = {
Name = "Brown Dwarfs",
Path = "/Milky Way/Substellar Objects",
Description = [[For decades it was believed that M stars were the coolest stars in
the Galaxy. Some M stars, called red dwarfs, make up 70% of the stars in the
Galaxy. However, a new class of objects, even cooler than M stars, was recently
discovered and given a spectral type of L. L-type objects straddle the boundary
between red dwarfs and brown dwarfs and they are typically very dim stars or brown
dwarfs. Even cooler than L-type objects are T-type objects. These are mostly brown
dwarfs and resemble large, massive, Jupiter-like objects, too large to be planets
and typically too small to be stars. Beyond the T dwarfs are the Y-type objects,
which are even more dim. Brown dwarfs are extremely difficult to see, mainly because
they are so dim in optical light. However, they appear brighter in infrared light.
Colors: We represent these objects as exaggeratged points and they are either red
for L type objects, Maroon for T type, and purple for Y type objects. Census:
2,196 objects.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Object)
end)
asset.export(Object)
asset.meta = {
Name = "Brown Dwarfs",
Author = "Brian Abbott, Zack Reeves, Jackie Faherty (AMNH)",
Description = Object.GUI.Description,
License = "AMNH Digital Universe",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
}

View File

@@ -35,10 +35,12 @@ local Object = {
}
},
GUI = {
Name = "Constellation Bounds",
Name = "Constellation Boundaries",
Path = "/Milky Way/Constellations",
Description = [[A Spherical mesh dividing the sky into regions that fit the
constellations]]
Description = [[As a continent is divided into countries, astronomers divide the sky
into 88 regions called constellations. Every object falls into one of these 88
regions. The boundaries of these regions are shown in this asset. Use these in
concert with the constellation labels. Census: 88 constellations.]]
}
}
@@ -57,8 +59,7 @@ asset.export(Object)
asset.meta = {
Name = "Constellation Bounds",
Description = [[DU asset providing a Spherical mesh dividing the sky into regions that
fit the constellations]],
Description = Object.GUI.Description,
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -6,14 +6,10 @@ local speck = asset.resource({
Name = "Constellation Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_constellations_data",
Version = 2
Version = 3
})
local zodiacs = {
"CNC", "TAU", "PSC", "ARI", "LIB", "AQR", "CAP", "SCO", "VIR", "SGR", "GEM", "LEO"
}
local function zodiacsString(zodiacsList)
local zodiacsString = "{"
local isFirst = true
@@ -35,31 +31,6 @@ local function zodiacsString(zodiacsList)
return zodiacsString
end
local ConstellationsExtragalactic = {
Identifier = "ConstellationsExtragalactic",
Renderable = {
Type = "RenderableConstellationLines",
Enabled = false,
Labels = {
File = speck .. "constellationsEXGAL.label",
Opacity = 0.4,
Color = { 0.8, 0.8, 0.8 },
Size = 20.0,
MinMaxSize = { 20, 30 },
Unit = "Mpc"
},
Opacity = 0.4,
File = speck .. "constellationsEXGAL.speck",
NamesFile = speck .. "constellations.dat",
Colors = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } },
Unit = "Mpc",
-- Selection = zodiacs
},
GUI = {
Name = "Constellations (Extragalactic)",
Path = "/Milky Way/Constellations"
}
}
local Constellations = {
Identifier = "Constellations",
@@ -67,7 +38,7 @@ local Constellations = {
Type = "RenderableConstellationLines",
Enabled = false,
Labels = {
File = speck .. "constellations.label",
File = speck .. "constellation_lines.label",
Opacity = 0.3,
Color = { 0.8, 0.8, 0.8 },
Size = 14.5,
@@ -75,7 +46,7 @@ local Constellations = {
Unit = "pc"
},
Opacity = 0.3,
File = speck .. "constellations.speck",
File = speck .. "constellation_lines.speck",
NamesFile = speck .. "constellations.dat",
Colors = { { 0.6, 0.4, 0.4 }, { 0.8, 0.0, 0.0 }, { 0.0, 0.3, 0.8 } },
Unit = "pc",
@@ -83,22 +54,17 @@ local Constellations = {
},
Tag = { "daytime_hidden" },
GUI = {
Name = "Constellations",
Name = "Constellation Lines",
Path = "/Milky Way/Constellations",
Description = [[Census 88 constellations and labels. DU Version 3.4. <br> These
modern constellations are largely based on those of the Babylonians and
Greeks; however, most cultures have their own figures and stories of the sky.
More than half the official constellations adopted by scientists in 1930 were
known to the ancients over 2,000 years ago. Each star falls into one of these
88 regions. Of course, today we know the stars in any given constellation do
not necessarily have any physical relationship with one another. One star may
be nearby, while an adjacent star in the sky may be far away.(Description
from URL) <br><br> Data Reference: various]]
Description = [[Lines connecting the stars that make up the constellation figures.
We represent the constellations by connecting the main stars that make up the
constellation "stick figures," as seen from Earth. Colors: most constellations
are pink, while the zodical constellations are red. We also color Orion and Ursa
Major blue as two recognizable constellations in the night sky. Census: 88
constellations.]]
}
}
local zodiacsString = zodiacsString(zodiacs)
-- Actions
local ShowConstellations = {
Identifier = "os.constellations.ShowConstellations",
@@ -123,21 +89,29 @@ local HideConstellations = {
IsLocal = false
}
local ShowZodiacs = {
Identifier = "os.constellation.ShowZodiacs",
Name = "Show zodiac",
Command = [[
openspace.setPropertyValueSingle("Scene.Constellations.Renderable.ConstellationSelection", ]] .. zodiacsString .. [[)
openspace.fadeIn("Scene.Constellations.Renderable")
]],
Documentation = "Shows the zodiac constellations lines",
GuiPath = "/Constellations/Lines",
IsLocal = false
}
local ShowZodiacsIdentifier = "os.constellation.ShowZodiacs"
asset.onInitialize(function()
openspace.addSceneGraphNode(ConstellationsExtragalactic)
-- Defining this in here as the zodiacsString function requires the file synchronization
-- to be completed
local zodiacsString = zodiacsString({
"CNC", "TAU", "PSC", "ARI", "LIB", "AQR", "CAP", "SCO", "VIR", "SGR", "GEM", "LEO"
})
local ShowZodiacs = {
Identifier = ShowZodiacsIdentifier,
Name = "Show zodiac",
Command = [[
openspace.setPropertyValueSingle("Scene.Constellations.Renderable.ConstellationSelection", ]] .. zodiacsString .. [[)
openspace.fadeIn("Scene.Constellations.Renderable")
]],
Documentation = "Shows the zodiac constellations lines",
GuiPath = "/Constellations/Lines",
IsLocal = false
}
openspace.addSceneGraphNode(Constellations)
openspace.action.registerAction(ShowConstellations)
@@ -146,26 +120,23 @@ asset.onInitialize(function()
end)
asset.onDeinitialize(function()
openspace.action.removeAction(ShowZodiacs)
openspace.action.removeAction(ShowZodiacsIdentifier)
openspace.action.removeAction(HideConstellations)
openspace.action.removeAction(ShowConstellations)
openspace.removeSceneGraphNode(Constellations)
openspace.removeSceneGraphNode(ConstellationsExtragalactic)
end)
asset.export(ConstellationsExtragalactic)
asset.export(Constellations)
asset.export("ShowConstellations", ShowConstellations.Identifier)
asset.export("HideConstellations", HideConstellations.Identifier)
asset.export("ShowZodiacs", ShowZodiacs.Identifier)
asset.export("ShowZodiacs", ShowZodiacsIdentifier)
asset.meta = {
Name = "Constellations",
Description = "Digital Universe asset for constellation lines",
Author = "Brian Abbott (AMNH)",
Description = Constellations.GUI.Description,
Author = "Brian Abbott, Zack Reeves (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -49,7 +49,7 @@ local DeepSkyObjects = {
},
GUI = {
Name = "Deep Sky Objects Points",
Path = "/Universe/Galaxies",
Path = "/Universe/Nearby Surveys",
Description = "Point cloud and labels for Deep Sky Objects"
}
}
@@ -87,7 +87,7 @@ local DeepSkyObjectsImages = {
},
GUI = {
Name = "Deep Sky Objects Images",
Path = "/Universe/Galaxies",
Path = "/Universe/Nearby Surveys",
Description = [[Census: 63 images and labels. DU Version 1.3. <br> These data are
2-D images of Messier objects placed in 3-D space. Not only do we place these
images at the proper location and give them the correct orientation, we also

View File

@@ -3,44 +3,46 @@ asset.require("./2dF")
asset.require("./2mass")
asset.require("./6dF")
asset.require("./abell")
asset.require("./alternatestarlabels")
asset.require("./allsky_hydrogenalpha")
asset.require("./allsky_visible")
asset.require("./backgroundradiation")
asset.require("./backgroundradiation_multiverse")
asset.require("./clusters")
asset.require("./brown_dwarfs")
asset.require("./galaxy_clusters")
asset.require("./constellationbounds")
asset.require("./constellations")
asset.require("./deepsky")
asset.require("./dwarfs")
asset.require("./exoplanets")
asset.require("./exoplanets_candidates")
asset.require("./globularclusters")
asset.require("./grids")
asset.require("./groups")
asset.require("./galaxy_groups")
asset.require("./h2regions")
asset.require("./localdwarfs")
asset.require("./local_group_dwarfs")
asset.require("./milkyway")
asset.require("./milkyway_arm_labels")
asset.require("./milkyway_label")
asset.require("./milkyway_sphere")
asset.require("./obassociations")
asset.require("./oort_cloud")
asset.require("./openclusters")
asset.require("./planetarynebulae")
asset.require("./pulsars")
asset.require("./quasars")
asset.require("./starlabels")
asset.require("./alternatestarlabels")
asset.require("./starorbits")
asset.require("./star_uncertainty")
asset.require("./stars")
asset.require("./superclusters")
asset.require("./supernovaremnants")
asset.require("./tully")
asset.require("./voids")
asset.require("./white_dwarfs")
asset.meta = {
Name = "Digital Universe",
Description = [[This asset is a meta asset, containing all the assets from the AMNH
Digital Universe]],
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"

View File

@@ -1,91 +0,0 @@
local textures = asset.resource({
Name = "Brown Dwarf Textures",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_dwarfs_textures",
Version = 1
})
local speck = asset.resource({
Name = "Brown Dwarf Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_dwarfs_speck",
Version = 3
})
local Object = {
Identifier = "Dwarfs",
Renderable = {
Type = "RenderablePointCloud",
Enabled = false,
File = speck .. "dwarfs.speck",
Labels = {
File = speck .. "dwarfs.label",
Color = { 0.5, 0.1, 0.2 },
Size = 14.6,
MinMaxSize = { 10, 20 },
Unit = "pc"
},
Opacity = 1.0,
Texture = {
File = textures .. "point3.png",
},
Unit = "pc",
Coloring = {
FixedColor = { 0.4, 0.0, 0.1 },
ColorMapping = {
File = speck .. "dwarfs.cmap",
ParameterOptions = {
{ Key = "typeindex", Range = { 1.0, 4.0 } }
}
}
},
SizeSettings = {
ScaleExponent = 16.2,
MaxSize = 0.7,
EnableMaxSizeControl = true
}
},
GUI = {
Name = "Brown Dwarfs",
Path = "/Milky Way",
Description = [[Census: 785 L dwarfs, 101 T dwarfs, 17 Y dwarfs. DU Version 6.4.
<br> In astronomy, there are dwarf stars-red, white, and brown-dwarf novae,
and even dwarf galaxies. As you might imagine, astronomers use the term dwarf
when they refer to the smaller objects in any given class. For decades it was
believed that M stars were the coolest stars in the Galaxy. Some M stars,
called red dwarfs, make up 70% of the stars in the Galaxy, including our
nearest known neighbor, Proxima Centauri. However, a new class of objects,
even cooler than M stars, was recently discovered and given a spectral type
of L. L-type objects straddle the boundary between red dwarfs and brown
dwarfs, the latter of which are not massive enough to ignite the nuclear
processes necessary for it to shine as a star. L-type objects are typically
very dim stars or brown dwarfs. Even cooler than L-type objects are T-type
objects. These are mostly brown dwarfs and resemble large, massive,
Jupiter-like objects, too large to be planets and typically too small to be
stars. Beyond the T dwarfs are the Y-type objects, which are even more
dim.(Description from URL) <br><br> Data Reference: The Brown Dwarf Kinematics
Project (Faherty+ 2019)]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Object)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Object)
end)
asset.export(Object)
asset.meta = {
Name = "Brown Dwarfs",
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"
}

View File

@@ -9,7 +9,7 @@ local speck = asset.resource({
Name = "Exoplanets Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_exoplanets_speck",
Version = 3
Version = 4
})
@@ -22,7 +22,7 @@ local Object = {
Labels = {
File = speck .. "expl.label",
Color = { 0.3, 0.3, 0.8 },
Size = 14.8,
Size = 13.75,
MinMaxSize = { 10, 100 },
Unit = "pc"
},
@@ -40,13 +40,14 @@ local Object = {
GUI = {
Name = "Exoplanets",
Path = "/Milky Way/Exoplanets",
Description = [[Census: 5,361 planets in 3,982 systems. DU Version 20.12. <br>
Extrasolar planets, or exoplanets, are a relatively new phenomenon in
astronomy. While many astronomers believed in their existence, no
observational evidence was available until 1995. Since that time, scientists
have discovered thousands of systems consisting of one or more planets around
a host star.(Description from URL) <br><br> Data Reference: NASA Exoplanet
Archive (CalTech/NASA)]]
Description = [[Extrasolar planets, or exoplanets, are a relatively new phenomenon in
astronomy - no observational evidence was available until 1995. To the eye,
exoplanets are lost in the glare of their host star. Unconventional techniques are
required to infer or observe them. Here, exoplanet systems are represented by a blue
ring centered on each host star. The ring is not intended to signify an orbit, but
serve only as a marker. The labels list the host star name, and if there is more
than one planet, will list the number of planets in parentheses. Census: 5,589
planets in 4,139 systems.]]
}
}
@@ -65,8 +66,8 @@ asset.export(Object)
asset.meta = {
Name = "Exoplanets",
Description = "Digital Universe asset for Exoplanets",
Author = "Brian Abbott (AMNH)",
Description = Object.GUI.Description,
Author = "Brian Abbott, Zack Reeves (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -9,7 +9,7 @@ local speck = asset.resource({
Name = "Exoplanets Candidates Speck Files",
Type = "HttpSynchronization",
Identifier = "digitaluniverse_exoplanets_candidates_speck",
Version = 1
Version = 2
})
@@ -19,13 +19,19 @@ local Object = {
Type = "RenderablePointCloud",
Enabled = false,
Opacity = 0.99,
File = speck .. "exoplanet_candidates.speck",
File = speck .. "expl_candidates.speck",
Unit = "pc",
Texture = {
File = textures .. "halo.png",
},
Coloring = {
FixedColor = { 1.0, 1.0, 0.0 }
FixedColor = { 1.0, 1.0, 0.0 },
ColorMapping = {
File = speck .. "expl_candidates.cmap",
ParameterOptions = {
{ Key = "survey_num" }
}
}
},
SizeSettings = {
ScaleExponent = 17.8,
@@ -34,18 +40,16 @@ local Object = {
}
},
GUI = {
Name = "Planetary Candidates",
Name = "Exoplanetary Candidates",
Path = "/Milky Way/Exoplanets",
Description = [[Census: 6,082 stars with candidate planetary systems. DU Version 11.8.
<br> The exoplanet candidate stars are likely hosts for exoplanets. These are stars
plucked from NASA's Kepler and TESS space telescopes. The Kepler mission was
designed to stare at one spot, roughly twelve degrees across, in the constellation
Cygnus. By staring at one spot, the spacecraft could monitor over 500,000 stars in
that field for subtle variations in brightness. The data included here are the stars
that are considered good candidates to host planets. Rather than represent them
Description = [[The exoplanet candidate stars are likely hosts for exoplanets. These
are stars plucked from NASA's Kepler and TESS space telescopes. Further observations
are needed to confirm a planet's existence. Rather than represent them
photo-realistically, with accurate colors, we choose to visualize them as generic,
pure yellow stars. (Description from URL) <br><br> Data Reference: NASA Exoplanet
Archive (CalTech/NASA)]]
colored stars. The nature of these stars is not important, it is the sheer numbers
of potential exoplanets that allows us to wonder just how many we will find in the
entire Galaxy. Colors: Yellow denote Kepler candidates, Orange stars are from the K2
mission, and green stars are from TESS. Census: 7,225 candidate stars.]]
}
}
@@ -63,9 +67,9 @@ asset.export(Object)
asset.meta = {
Name = "Planetary Candidates",
Description = "Digital Universe asset for Planetary Candidates",
Author = "Brian Abbott, Emily Rice, and Jason No (AMNH)",
Name = "Exoplanetary Candidates",
Description = Object.GUI.Description,
Author = "Brian Abbott, Zack Reeves, Emily Rice, and Jason No (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

View File

@@ -1,3 +1,7 @@
local transforms = asset.require("./transforms")
local speck = asset.resource({
Name = "Clusters Speck Files",
Type = "HttpSynchronization",
@@ -6,13 +10,6 @@ local speck = asset.resource({
})
local TransformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local Object = {
Identifier = "GalaxyClusterLabels",
Renderable = {
@@ -21,24 +18,22 @@ local Object = {
Labels = {
Enabled = true,
File = speck .. "galclust.label",
Color = { 1.0, 0.44, 0.0 },
Color = { 0.9, 0.5, 0.22 },
Size = 22,
MinMaxSize = { 8, 20 },
MinMaxSize = { 8, 15 },
Unit = "Mpc",
TransformationMatrix = TransformMatrix
TransformationMatrix = transforms.Supergalactic
},
Opacity = 0.65,
Unit = "Mpc",
TransformationMatrix = TransformMatrix
TransformationMatrix = transforms.Supergalactic
},
GUI = {
Name = "Galaxy Cluster Labels",
Path = "/Universe/Galaxies",
Description = [[Census 15 galaxy cluster labels. DU Version 1.2. <br>The Galaxy
clusters dataset is a series of labels that mark where the large clusters of
galaxies are in the nearby universe. These labels must be used in conjunction
with the Tully galaxy group.(Description from URL) <br><br> Data Reference:
Brian Abbott (AMNH)]]
Path = "/Universe/Nearby Surveys",
Description = [[The galaxy clusters dataset is a series of labels that mark where the
large clusters of galaxies are in the nearby universe. These labels must be used in
conjunction with the Tully galaxy group. Census: 15 galaxy cluster labels.]]
}
}
@@ -57,7 +52,7 @@ asset.export(Object)
asset.meta = {
Name = "Galaxy Clusters Labels",
Description = "Digital Universe asset for Galaxy Clusters",
Description = Object.GUI.Description,
Author = "Brian Abbott (AMNH)",
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"

View File

@@ -1,3 +1,7 @@
local transforms = asset.require("./transforms")
local speck = asset.resource({
Name = "Galaxy Groups Speck Files",
Type = "HttpSynchronization",
@@ -6,13 +10,6 @@ local speck = asset.resource({
})
local TransformMatrix = {
-0.7357425748, 0.67726129641, 0.0, 0.0,
-0.074553778365, -0.080991471307, 0.9939225904, 0.0,
0.67314530211, 0.73127116582, 0.11008126223, 0.0,
0.0, 0.0, 0.0, 1.0
}
local Object = {
Identifier = "NearbyGalaxyGroups",
Renderable = {
@@ -21,23 +18,22 @@ local Object = {
Labels = {
Enabled = true,
File = speck .. "groups.label",
Color = { 0.1, 0.6, 0.2 },
Size = 21.5,
Color = { 0.1, 0.4, 0.2 },
Size = 20.4,
MinMaxSize = { 8, 20 },
Unit = "Mpc",
TransformationMatrix = TransformMatrix
TransformationMatrix = transforms.Supergalactic
},
Opacity = 0.65,
Unit = "Mpc",
TransformationMatrix = TransformMatrix
TransformationMatrix = transforms.Supergalactic
},
GUI = {
Name = "Galaxy Group Labels",
Path = "/Universe/Galaxies",
Description = [[Census: 62 galaxy group labels. DU Version 1.2. <br> The Galaxy
Groups data are a set of labels that mark the nearby galaxy groups. The Milky Way
is in the Local Group, and we are surrounded by many other groups.(Description
from URL) <br><br> Data Reference: Brian Abbott (AMNH)]]
Path = "/Universe/Nearby Surveys",
Description = [[The Galaxy Groups data are a set of labels that mark the nearby
galaxy groups. The Milky Way is in the Local Group, and we are surrounded by
many other groups delineated by these labels. Census: 62 galaxy group labels.]]
}
}
@@ -57,7 +53,7 @@ asset.export(Object)
asset.meta = {
Name = "Galaxy Group Labels",
Author = "Brian Abbott (AMNH)",
Description = "Digital Universe asset for Galaxy Groups",
Description = Object.GUI.Description,
URL = "https://www.amnh.org/research/hayden-planetarium/digital-universe",
License = "AMNH Digital Universe"
}

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