mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 02:20:11 -05:00
705c898ccd
* 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
45 lines
933 B
Lua
45 lines
933 B
Lua
local data = asset.syncedResource({
|
|
Name = "Example Globe Video",
|
|
Type = "UrlSynchronization",
|
|
Identifier = "example_globe_video",
|
|
Url = "http://liu-se.cdn.openspaceproject.com/files/examples/video/test-video.mp4"
|
|
})
|
|
|
|
|
|
local Sphere = {
|
|
Identifier = "ExampleVideoOnSphere",
|
|
Renderable = {
|
|
Type = "RenderableVideoSphere",
|
|
Size = 100.0,
|
|
Segments = 80,
|
|
Video = data .. "test-video.mp4",
|
|
Orientation = "Both"
|
|
},
|
|
GUI = {
|
|
Name = "Video Sphere",
|
|
Path = "/Other/Spheres"
|
|
}
|
|
}
|
|
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(Sphere)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Sphere)
|
|
end)
|
|
|
|
asset.export(Sphere)
|
|
|
|
|
|
|
|
asset.meta = {
|
|
Name = "Video Player on Sphere",
|
|
Version = "1.0",
|
|
Description = "An example asset that shows how to include a video on a sphere",
|
|
Author = "OpenSpace Team",
|
|
URL = "https://openspaceproject.com",
|
|
License = "MIT"
|
|
}
|