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
{{ message }}
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: src-docs/docs/advanced/getting-started.md
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,17 @@ The API and its documentation can be downloaded from **[RxLaboratory](https://rx
8
8
9
9
## Include it in your script
10
10
11
-
Just save the two files `DuGR_api.jsxinc` and `DuAEF_DuGR_api.jsxinc`in the folder where you're working and writing your own script.
11
+
The DuGR API comes in a few files:
12
12
13
-
-`DuAEF_DuGR_api.jsxinc` is the complete API, including all dependencies. This is the one you should use by default.
13
+
-`DuGR_API.jsxinc` is the complete API, including all dependencies. This is the only file you should include in your script by default.
14
14
15
-
-`DuGR_api.jsxinc` includes only the *DuGR API* without any dependencies. You'll have to include dependencies by yourself; The list of these dependencies can be found in the [API reference](http://dugr.rxlab.io/) (see *Requires* on the linked page). At the time we're writing this documentation, it's just *DuAEF*. You may use this file if you plan to combine several different API using *DuAEF*, to be sure to include it only once.
15
+
- A Subfolder called `libs` contains the actual API code, separated in a few different libraries. These may be useful if you need to handle specific versions of these libraries, if you know what you're doing... Have a look at the main `DuGR_API.jsxinc` file if you want to see in which order they should be included in your scripts.
16
+
17
+
All these files (both the `.jsxinc` file and the `libs` folder) need to be located next to your script in the following examples.
16
18
17
19
### Using only DuGR
18
20
19
-
If you're only needing the DuGR API, you just have to include `DuAEF_Duik_api.jsxinc` at the beginning of your own script.
21
+
If you're only needing the DuGR API, you just have to include `DuGR_API.jsxinc` at the beginning of your own script.
20
22
21
23
Here's an example.
22
24
@@ -26,13 +28,13 @@ Here's an example.
26
28
(function(thisObj)
27
29
{
28
30
// If you only need Duik, just include DuAEF_Duik_api at the beginning
29
-
#include "DuAEF_DuGR_api.jsxinc";
31
+
#include "DuGR_API.jsxinc";
30
32
31
33
```
32
34
33
35
### Combining the DuGR API with other APIs and DuAEF
34
36
35
-
If you're going to include APIs other than DuGR, you'll need to include everything separately to be sure that all frameworks are included only once. In this case, include `DuGR_api.jsxinc` and the other APIs at the beginning of your script.
37
+
If you're going to include APIs other than DuGR, you'll need to include everything separately to be sure that all frameworks are included only once. In this case, include the APIs at the beginning of your script.
36
38
37
39
Here's an example:
38
40
@@ -43,9 +45,8 @@ Here's an example:
43
45
{
44
46
// If you need to combine DuGR and other APIs like DuIO
45
47
// Include DuAEF first, and then stand-alone APIs
46
-
#include "DuAEF.jsxinc";
47
-
#include "DuGR_api.jsxinc";
48
-
#include "DuIO_api.jsxinc";
48
+
#include "libs/DuAEF.jsxinc";
49
+
#include "libs/api.jsxinc"; // DuGR API, you may rename it if needed.
49
50
50
51
// Now you can also include any other API which also depends on DuAEF or one of the above APIs
51
52
#include "another_API.jsxinc"
@@ -114,7 +115,7 @@ Don't forget to close the anonymous function we've created at the beginning to a
114
115
(function(thisObj)
115
116
{
116
117
// If you only need Duik, just include DuAEF_Duik_api at the beginning
117
-
#include "DuAEF_DuGR_api.jsxinc";
118
+
#include "DuGR_api.jsxinc";
118
119
119
120
// Running the init() method of DuAEF is required to setup everything properly.
0 commit comments