TimelineTranslation

Inherits Translation

Members

Name

Documentation

Type

Description

Optional

Keyframes

A table of keyframes, with keys formatted as YYYY-MM-DDTHH:MM:SS and values that are valid Translation objects

Table

Table parameters

No

ShouldInterpolate

If this value is set to ‘true’, an interpolation is applied between the given keyframes. If this value is set to ‘false’, the interpolation is not applied.

Boolean

Value of type ‘Boolean’

Yes

Inherited members from Translation

Name

Documentation

Type

Description

Optional

Type

The type of translation that is described in this element. The available types of translations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation

String

Must name a valid Translation type

No

Table parameters for Keyframes

A table of keyframes, with keys formatted as YYYY-MM-DDTHH:MM:SS and values that are valid Translation objects

  • Optional: No

Name

Documentation

Type

Description

Optional

*

Table

Translation

No

Asset Examples

Basic

This asset creates a scene graph node that only displays coordinate axes whose translation of the coordinate axes is determined by a timeline of individual translations. These translations are provided as keyframes that interpolate seamlessly between different positions.

This example will only work if the in-game time is set to January 1st, 2000.

 1local Node = {
 2  Identifier = "TimelineTranslation_Example",
 3  Transform = {
 4    Translation = {
 5      Type = "TimelineTranslation",
 6      Keyframes = {
 7        -- The first timeline entry
 8        ["2000 JAN 01 00:00:00"] = {
 9          Type = "StaticTranslation",
10          Position = { -10.0, 0.0, 0.0 }
11        },
12        -- The second timeline entry
13        ["2000 JAN 01 12:00:00"] = {
14          Type = "StaticTranslation",
15          Position = { 0.0, 0.0, 0.0 }
16        },
17        -- The third timeline entry
18        ["2000 JAN 01 23:59:59"] = {
19          Type = "StaticTranslation",
20          Position = { 10.0, 0.0, 0.0 }
21        }
22      }
23    }
24  },
25  Renderable = {
26    Type = "RenderableCartesianAxes"
27  },
28  GUI = {
29    Name = "TimelineTranslation - Basic",
30    Path = "/Examples"
31  }
32}
33
34asset.onInitialize(function()
35  openspace.addSceneGraphNode(Node)
36end)
37
38asset.onDeinitialize(function()
39  openspace.removeSceneGraphNode(Node)
40end)
No Interpolation

This asset creates a scene graph node that only displays coordinate axes whose translation of the coordinate axes is determined by a timeline of individual translations that are used without interpolating between the timeline entries. These translations are keyframes that are used to change between different positions.

This example transitions between three positions. In this example, the interpolation between entries is disabled, which will cause the coordinate axes to change their position abruptly when the translation changes. If the interpolation were enabled, the orientation of the coordinate axes would transition seamlessly instead at the provided times.

This example will only work if the in-game time is set to January 1st, 2000.

 1local Node = {
 2  Identifier = "TimelineTranslation_Example_NoInterpolation",
 3  Transform = {
 4    Translation = {
 5      Type = "TimelineTranslation",
 6      Keyframes = {
 7        -- The first timeline entry
 8        ["2000 JAN 01 00:00:00"] = {
 9          Type = "StaticTranslation",
10          Position = { -10.0, 0.0, 0.0 }
11        },
12        -- The second timeline entry
13        ["2000 JAN 01 12:00:00"] = {
14          Type = "StaticTranslation",
15          Position = { 0.0, 0.0, 0.0 }
16        },
17        -- The third timeline entry
18        ["2000 JAN 01 23:59:59"] = {
19          Type = "StaticTranslation",
20          Position = { 10.0, 0.0, 0.0 }
21        }
22      },
23      ShouldInterpolate = false
24    }
25  },
26  Renderable = {
27    Type = "RenderableCartesianAxes"
28  },
29  GUI = {
30    Name = "TimelineTranslation - No Interpolation",
31    Path = "/Examples"
32  }
33}
34
35asset.onInitialize(function()
36  openspace.addSceneGraphNode(Node)
37end)
38
39asset.onDeinitialize(function()
40  openspace.removeSceneGraphNode(Node)
41end)