Skip to content

Latest commit

 

History

History
148 lines (95 loc) · 4.56 KB

API.md

File metadata and controls

148 lines (95 loc) · 4.56 KB

API documentation

GraphqlClient

The client can be used to interact with the GraphQL API of Thorium.

Param Type Description
protocol string The protocol of the GraphQL server
address string The IP of the Thorium server
port string The port of the Thorium server
clientId string The ID of the client that will be used in Thorium to identify this client

GraphqlClient.getClient ⇒ Object

Singleton client

Returns: Object - client - The instance of the GraphqlClient

Param Type Description
type string What kind of GraphQL client (either thorium or luminave)
protocol string The protocol of the graphql client
address string The IP of the Thorium server
port string The port of the Thorium server
clientId string The ID of the client that will be used in Thorium to identify this client

GraphqlClient.getError ⇒ *

Based on the error gives back only network errors

Returns: * - error

Param Type Description
error * The GraphQL error

ThoriumLighting

Get the lighting information out of Thorium for a specific simulator

Param Type Description
args Object The arguments to configure ThoriumLighting
args.simulatorId String The ID of the simulator that has the lighting information

thoriumLighting.subsciption()

Subscribe to lighting changes

thoriumLighting.dataChanged(oldValue, newValue)

Check the data that is coming from Thorium to see if it changed

Param Type Description
oldValue Object The old data
newValue Object The new data

thoriumLighting.disconnectedCallback()

Clean up when the component gets destroyed

thoriumAvailableCards

The cards that are available for the Thorium client and can be choosen when using the Thorium Server backend

getTimelineScenes() ⇒ undefined

Get all scenes of the timeline

updateTimeline(scenes) ⇒ undefined

Update the timeline with the scenes

Param Type Description
scenes Array.<Object> The scenes to update the timeline with

setAnimation(animation) ⇒ undefined

Update animation data

Param Type Description
animation Array.<Object> The animation data from other applications, for example Thorium

transformLightingToScenes(lighting) ⇒ Array.<Object>

Transform the Lighting from Thorium into scenes for luminave

Returns: Array.<Object> - A list of scenes

Param Type Description
lighting Object The lighting data from Thorium

transformLightingToAnimation(lighting) ⇒ Object

Transform the Lighting from Thorium into animation for luminave

Returns: Object - - An animation

Param Type Description
lighting Object The lighting data from Thorium

createScene(name) ⇒ Object

Create a scene that can be used in luminave

Returns: Object - The luminave scene

Param Type Description
name String The name of the scene