Files
OpenSpace/data/assets/examples/volume/generated/cartesian.asset
T
Alexander Bock 705c898ccd Asset File cleanup (#2713)
* Updating all assets to new coding style
* Cleaning up asset files
* Moving default_actions and default_keybindings files
* Changing procedural globes to explicitly specified globes
* Move Spice loading explicitly to the initialize part and also deinitialize
* Removing unused asset files
  * Removing asset_helper
  * Removing scale_model_helper asset
  * Removing script_scheduler_helper
  * Removing testing_keybindings
  * Remove procedural_globe
2023-05-28 17:23:20 +02:00

46 lines
1.0 KiB
Lua

-- Before using this example,
-- the volume data itself needs to be generated,
-- using the task 'data/tasks/volume/generate_cartesian.task'
local transforms = asset.require("scene/solarsystem/sun/transforms")
local SunRadius = 695508000
local Volume = {
Identifier = "GeneratedVolume",
Parent = transforms.SolarSystemBarycenter.Identifier,
Transform = {
Scale = {
Type = "StaticScale",
Scale = 1000 * SunRadius
}
},
Renderable = {
Type = "RenderableTimeVaryingVolume",
SourceDirectory = asset.localResource("cartesian"),
TransferFunction = asset.localResource("../transferfunction.txt"),
StepSize = 0.01,
MinValue = 0,
MaxValue = 1,
GridType = "Cartesian",
SecondsBefore = 50 * 365 * 24 * 60 * 60, -- 50 years before
SecondsAfter = 50 * 365 * 24 * 60 * 60 -- 50 years after
},
GUI = {
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Volume)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Volume)
end)
asset.export(Volume)