You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Extracts the DPI scaling for either the GUI window or if there is no dedicated GUI window, the first window.
336
338
*/
@@ -553,7 +555,7 @@ export interface openspace {
553
555
554
556
\\param filePath The location where the data will be saved. Any file that already exists in that location will be overwritten \\param base64Data The base64 encoded data that should be saved to the provided file
* Collects all changes that have been made since startup, including all property changes and assets required, requested, or removed. All changes will be added to the profile that OpenSpace was started with, and the new saved file will contain all of this information. If the argument is provided, the settings will be saved into new profile with that name. If the argument is blank, the current profile will be saved to a backup file and the original profile will be overwritten. The second argument determines if a file that already exists should be overwritten, which is 'false' by default.
559
561
*/
@@ -848,13 +850,13 @@ interface audioLibrary {
848
850
/**
849
851
* Starts playing the audio file located and the provided \\p path. The \\p loop parameter determines whether the file is only played once, or on a loop. The sound is later referred to by the \\p identifier name. The audio file will be played in \"background\" mode, which means that each channel will be played at full volume. To play a video using spatial audio, use the #playAudio3d function instead.
850
852
851
-
\\param path The audio file that should be played \\param identifier The name for the sound that is used to refer to the sound \\param loop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
853
+
\\param path The audio file that should be played \\param identifier The name for the sound that is used to refer to the sound \\param shouldLoop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
* Starts playing the audio file located and the provided \\p path. The \\p loop parameter determines whether the file is only played once, or on a loop. The sound is later referred to by the \\p identifier name. The \\p position parameter determines the spatial location of the sound in a meter-based coordinate system. The position of the listener is (0,0,0) with the forward direction along the +y axis. This means that the \"left\" channel in a stereo setting is towards -x and the \"right\" channel towards x. This default value can be customized through the #set3dListenerParameters function. If you want to play a video without spatial audio, use the #playAudio function instead.
856
858
857
-
\\param path The audio file that should be played \\param identifier The name for the sound that is used to refer to the sound \\param position The position of the audio file in the 3D environment \\param loop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
859
+
\\param path The audio file that should be played \\param identifier The name for the sound that is used to refer to the sound \\param position The position of the audio file in the 3D environment \\param shouldLoop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
* Updates the 3D position of a track started through the #playAudio3d function. See that function and the #set3dListenerParameters function for a complete description. The \\p identifier must be a name for a sound that was started through the #playAudio3d function.
878
880
879
-
\\param handle A valid handle for a track started through the #playAudio3d function \\param position The new position from which the track originates
881
+
\\param identifier A valid identifier for a track started through the #playAudio3d function \\param position The new position from which the track originates
* Controls whether the track referred to by the \\p identifier should be looping or just be played once. If a track is converted to not looping, it will finish playing until the end of the file. The \\p identifier must be a name for a sound that was started through the #playAudio or #playAudio3d functions.
890
892
891
-
\\param identifier The identifier to the track that should be stopped \\param loop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
893
+
\\param identifier The identifier to the track that should be stopped \\param shouldLoop If `Yes` then the song will be played in a loop until the program is closed or the playing is stopped through the #stopAudio function
* Sets the position of the speaker for the provided \\p channel to the provided \\p position. In general, this is considered an advanced feature to accommodate non-standard audio environments.
896
898
897
899
\\param channel The channel whose speaker's position should be changed \\param position The new position for the speaker
* Sets the volume of the track referred to by \\p handle to the new \\p volume. The volume should be a number bigger than 0, where 1 is the maximum volume level. The \\p fade controls whether the volume change should be immediately (if it is 0) or over how many seconds it should change. The default is for it to change over 500 ms.
902
904
903
-
\\param handle The handle to the track whose volume should be changed \\param volume The new volume level. Must be greater or equal to 0 \\param fade How much time the fade from the current volume to the new volume should take
905
+
\\param identifier The identifier to the track whose volume should be changed \\param volume The new volume level. Must be greater or equal to 0 \\param fade How much time the fade from the current volume to the new volume should take
* Stops all currently playing tracks. After this function, none of the identifiers used to previously play a sound a valid any longer, but can still be used by the #playAudio or #playAudio3d functions to start a new sound. This function behaves the same way as if manually calling #stopAudio on all of the sounds that have been started.
912
916
*/
@@ -920,7 +924,7 @@ interface audioLibrary {
920
924
/**
921
925
* Returns the volume for the track referred to by the \\p handle. The number returned will be greater or equal to 0.
922
926
923
-
\\return The volume for the track referred to by the \\p handle, which will be greater or equal to 0
927
+
\\param identifier The identifier to the track whose volume should be returned \\return The volume for the track referred to by the \\p handle, which will be greater or equal to 0
* Directly adds to the global roll of the camera. This is a rotation around the line between the focus node and the camera (not always the same as the camera view direction)
1444
+
* Adds an instantaneous impulse to the global roll of the camera. This is a rotation around the line between the focus node and the camera. This is almost always the same as the forward direction of the camera, unless a local rotation has panned the camera away from the focus object. The global roll corresponds to using the middle mouse button and moving the mouse left and right. The unit for the provided parameter is somewhat arbitrary and the magnitude depends on the explicit use-case (continuously executing this function vs an individual impulse), but typically a range of [-250, 250] produces reasonable results.
1441
1445
1442
-
\\param value the value to add
1446
+
\\param value A positive value rolls the camera to the left and a negative value rolls the camera to the right
1443
1447
*/
1444
1448
addGlobalRoll: (value: number)=>Promise<void>
1445
1449
/**
1446
-
* Directly add to the global rotation of the camera (around the focus node).
1450
+
* Adds an instantaneous impulse to the global rotation of the camera (around the focus node). This type of rotation corresponds to using the left mouse button and moving the mouse to rotate around the current focus object. The units for the provided parameters are somewhat arbitrary and the magnitude depends on the explicit use-case (continuously executing this function vs an individual impulse), but typically a range of [-500, 500] produces reasonable results.
1447
1451
1448
-
\\param xValue the value to add in the x-direction (a positive value rotates to the right and a negative value to the left) \\param yValue the value to add in the y-direction (a positive value rotates the focus upwards and a negative value downwards)
1452
+
\\param horizontal The value to add in the x-direction (a positive value rotates to the right and a negative value to the left) \\param vertical The value to add in the y-direction (a positive value rotates the focus upwards and a negative value downwards)
* Directly adds to the local roll of the camera. This is the rotation around the camera's forward/view direction.
1456
+
* Adds an instantaneous impulse to the local roll of the camera. This is the rotation around the camera's forward direction and corresponds to using the middle mouse button and pressing and holding the middle mouse button while moving the mouse to the left and right. The unit for the provided parameter is somewhat arbitrary and the magnitude depends on the explicit use-case (continuously executing this function vs an individual impulse), but typically a range of [-250, 250] produces reasonable results.
1453
1457
1454
-
\\param value the value to add
1458
+
\\param value A positive value rolls the camera to the left and a negative value rolls the camera to the right
1455
1459
*/
1456
1460
addLocalRoll: (value: number)=>Promise<void>
1457
1461
/**
1458
-
* Directly adds to the local rotation of the camera (around the camera's current position).
1462
+
* Adds an instantaneous impulse to the local rotation of the camera (around the camera's current position). This type of rotation corresponds to using the left mouse button and pressing the Ctrl key while moving mouse to rotate around the current camera position. The units for the provided parameters are somewhat arbitrary and the magnitude depends on the explicit use-case (continuously executing this function vs an individual impulse), but typically a range of [-250, 250] produces reasonable results.
1459
1463
1460
-
\\param xValue the value to add in the x-direction (a positive value rotates to the left and a negative value to the right) \\param yValue the value to add in the y-direction (a positive value rotates the camera upwards and a negative value downwards)
1464
+
\\param horizontal The value to add in the x-direction (a positive value rotates to the left and a negative value to the right) \\param vertical The value to add in the y-direction (a positive value rotates the camera upwards and a negative value downwards)
* Directly adds to the truck movement of the camera. This is the movement along the line from the camera to the focus node.
1465
-
1466
-
A positive value moves the camera closer to the focus, and a negative value moves the camera further away.
1468
+
* Adds an instantaneous impulse to create a truck movement of the camera. This is the movement along the line from the camera to the focus node and corresponds to using the right mouse button and moving the mous up and down. The unit for the provided parameter is somewhat arbitrary and the magnitude depends on the explicit use-case (continuously executing this function vs an individual impulse), but typically a range of [-1000, 1000] produces reasonable results.
1467
1469
1468
-
\\param value the value to add
1470
+
\\param value A positive value moves the camera closer to the focus node, and a negative value moves the camera further away.
1469
1471
*/
1470
1472
addTruckMovement: (value: number)=>Promise<void>
1471
1473
/**
@@ -2241,7 +2243,7 @@ Note that providing time zone using the Z format is not supported. UTC is assume
2241
2243
2242
2244
\\param time The time to set. If the parameter is a number, the value is the number of seconds past the J2000 epoch. If it is a string, it has to be a valid ISO 8601-like date string of the format YYYY-MM-DDTHH:MN:SS. \\param interpolationDuration The number of seconds that the interpolation should be done over. If excluded, the time is decided based on the default value for time interpolation specified in the TimeManager.
* Increment the current simulation time by the specified number of seconds, using interpolation.
2247
2249
@@ -2311,11 +2313,11 @@ Note that providing time zone using the Z format is not supported. UTC is assume
2311
2313
*/
2312
2314
setTime: (time: number|string)=>Promise<void>
2313
2315
/**
2314
-
* Returns the current time as an date stringof the form (YYYY MON DDTHR:MN:SC.### ::RND) as returned by SPICE.
2316
+
* Returns the current time as an date string. The format of the returned string can be adjusted by providing the format picture. The default picture that is used will be (YYYY MON DDTHR:MN:SC.### ::RND). See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html for documentation on how the format string can be formatted
2315
2317
2316
2318
\\return The current time, in the format used by SPICE (YYYY MON DDTHR:MN:SC.### ::RND)
2317
2319
*/
2318
-
SPICE: ()=>Promise<string>
2320
+
SPICE: (format?: string)=>Promise<string>
2319
2321
/**
2320
2322
* Toggle the pause function, i.e. if the simulation is paused it will resume, and otherwise it will be paused. Note that to pause means temporarily setting the delta time to 0, and unpausing means restoring it to whatever delta time value is set.
0 commit comments