From a138be3f9208e1607cadeef7178d68eb4e784aea Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 21 Aug 2024 10:33:59 +0200 Subject: [PATCH] Add example for StaticTranslation (#3385) --- .../statictranslation/static.asset | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 data/assets/examples/translation/statictranslation/static.asset diff --git a/data/assets/examples/translation/statictranslation/static.asset b/data/assets/examples/translation/statictranslation/static.asset new file mode 100644 index 0000000000..c5f0e40b50 --- /dev/null +++ b/data/assets/examples/translation/statictranslation/static.asset @@ -0,0 +1,29 @@ +-- Basic +-- This asset creates a set of coordinate axes that are offset from their original +-- position by a fixed and static amount. In this specific example, the axes are offset +-- by 50 meters along the y-axis and 10 meters along the negative z-axis. + +local Node = { + Identifier = "StaticTranslation_Example", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 50.0, -10.0 } + } + }, + Renderable = { + Type = "RenderableCartesianAxes" + }, + GUI = { + Name = "StaticTranslation - Basic", + Path = "/Examples" + } +} + +asset.onInitialize(function() + openspace.addSceneGraphNode(Node) +end) + +asset.onDeinitialize(function() + openspace.removeSceneGraphNode(Node) +end)