mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-01 17:20:09 -06:00
* Update name and path format of examples that follow the new structure * Fix a broken (updated) property name in an example * Make other examples' GUI paths more consistent * Put them all in the Examples folder
34 lines
1001 B
Lua
34 lines
1001 B
Lua
-- Point Size / Scaling
|
|
-- This example creates a point cloud where the size of the points is set by entering a
|
|
-- a scale exponent. This makes it so that the points will be given a world-scale size of
|
|
-- 10 to the power of the provided scale exponent.
|
|
|
|
local Node = {
|
|
Identifier = "RenderablePointCloud_Example_Scaled",
|
|
Renderable = {
|
|
Type = "RenderablePointCloud",
|
|
File = asset.resource("data/dummydata.csv"),
|
|
Coloring = {
|
|
FixedColor = { 0.0, 0.0, 0.8 }
|
|
},
|
|
SizeSettings = {
|
|
-- We set the exponent for the scale explicitly, to a value that
|
|
-- gives the points a suitable size based on their world-space coordinates
|
|
ScaleExponent = 6.5
|
|
}
|
|
},
|
|
GUI = {
|
|
Name = "RenderablePointCloud - Point Size / Scaling",
|
|
Path = "/Examples",
|
|
Description = "Point cloud with configured point size"
|
|
}
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
openspace.addSceneGraphNode(Node)
|
|
end)
|
|
|
|
asset.onDeinitialize(function()
|
|
openspace.removeSceneGraphNode(Node)
|
|
end)
|