mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 04:49:12 -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
37 lines
854 B
Lua
37 lines
854 B
Lua
local syncedDirectory = asset.syncedResource({
|
|
Name = "General SPK Kernels",
|
|
Type = "HttpSynchronization",
|
|
Identifier = "general_spk",
|
|
Version = 1
|
|
})
|
|
|
|
local kernels = {
|
|
asset.localResource("naif0012.tls"),
|
|
-- Leapseconds:
|
|
asset.localResource("pck00010.tpc"),
|
|
syncedDirectory .. "de430_1850-2150.bsp"
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
for _, kernel in ipairs(kernels) do
|
|
openspace.spice.loadKernel(kernel)
|
|
end
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
for i = #kernels, 1, -1 do
|
|
openspace.spice.unloadKernel(kernels[i])
|
|
end
|
|
end)
|
|
|
|
|
|
asset.meta = {
|
|
Name = "SPICE Base",
|
|
Version = "1.0",
|
|
Description = [[ This asset contains the spice base kernels. With positions
|
|
for Solar System bodies from 1850 to 2150]],
|
|
Author = "OpenSpace Team",
|
|
URL = "https://naif.jpl.nasa.gov/naif/data_generic.html",
|
|
License = "NASA"
|
|
}
|