Files
OpenSpace/data/assets/examples/spheres.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

52 lines
999 B
Lua

local spheres = {}
local i = 1
for z = 1,3 do
for y = 1,3 do
for x = 1,3 do
local Sphere = {
Identifier = "ExampleSphere" .. i,
Transform = {
Translation = {
Type = "StaticTranslation",
Position = { x, y, z }
}
},
Renderable = {
Type = "RenderableSphere",
Size = 0.20 + i * 0.01,
Segments = 80,
Opacity = 1,
Texture = openspace.absPath("${DATA}/test2.jpg"),
Orientation = "Both",
},
GUI = {
Name = "Test Sphere " .. i,
Path = "/Other/Spheres"
}
}
table.insert(spheres, Sphere)
i = i + 1
end
end
end
asset.onInitialize(function()
for _, n in ipairs(spheres) do
openspace.addSceneGraphNode(n)
end
end)
asset.onDeinitialize(function()
for _, n in ipairs(spheres) do
openspace.removeSceneGraphNode(n)
end
end)
for _, n in ipairs(spheres) do
asset.export(n)
end