mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
37 lines
913 B
Lua
37 lines
913 B
Lua
-- To learn how you can include your own video, see the wiki
|
|
-- http://wiki.openspaceproject.com/docs/builders/assets/resources.html
|
|
|
|
local earth = asset.require("scene/solarsystem/planets/earth/earth")
|
|
|
|
|
|
|
|
local Layer = {
|
|
Name = "Globe Video Loop Example",
|
|
Identifier = "GlobeVideoLoopExample",
|
|
Enabled = true,
|
|
Type = "VideoTileProvider",
|
|
Video = asset.resource("examplevideo.mp4"),
|
|
}
|
|
|
|
|
|
asset.onInitialize(function()
|
|
openspace.globebrowsing.addLayer(earth.Earth.Identifier, "ColorLayers", Layer)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.globebrowsing.deleteLayer(earth.Earth.Identifier, "ColorLayers", Layer)
|
|
end)
|
|
|
|
asset.export("layer", Layer)
|
|
|
|
|
|
|
|
asset.meta = {
|
|
Name = "Video Player on Globe Example",
|
|
Version = "1.0",
|
|
Description = "An example asset that shows how to include a video on Earth.",
|
|
Author = "OpenSpace Team",
|
|
URL = "https://openspaceproject.com",
|
|
License = "MIT"
|
|
}
|