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

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"
}