Files
OpenSpace/data/assets/examples/renderable/renderablepointcloud/pointcloud_scaled.asset
Emma Broman 8a42657deb Feature/examples naming (#3305)
* 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
2024-06-13 10:42:00 +02:00

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)