mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-04 10:28:37 -06:00
- Remove the asset_helper file and call the onInitialize and onDeinitialize functions directly - Small compile fix on Windows - Removes the need for the registerIdentifierWithMeta function by automatically doing that for all asset.export statements - Allow the passing of either identifiers (as before) or entire tables to the removeSceneGraphNode, removeScreenSpaceRenderable, deleteLayer, removeAction, and export methods. In that case, the Identifier key from the table is extracted and used instead
33 lines
788 B
Lua
33 lines
788 B
Lua
-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SPOUT enabled
|
|
|
|
local transforms = asset.require("scene/solarsystem/sun/transforms")
|
|
|
|
|
|
|
|
local RenderablePlaneImageOnline = {
|
|
Identifier = "RenderablePlaneImageOnline",
|
|
Parent = transforms.SolarSystemBarycenter.Identifier,
|
|
Renderable = {
|
|
Type = "RenderablePlaneImageOnline",
|
|
Size = 3.0E11,
|
|
Origin = "Center",
|
|
Billboard = true,
|
|
URL = "http://data.openspaceproject.com/examples/renderableplaneimageonline.jpg"
|
|
},
|
|
GUI = {
|
|
Path = "/Examples"
|
|
}
|
|
}
|
|
|
|
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(RenderablePlaneImageOnline)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(RenderablePlaneImageOnline)
|
|
end)
|
|
|
|
asset.export(RenderablePlaneImageOnline)
|