@inweb/client 25.3.13 → 25.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +13 -10
- package/dist/client.js +20 -2
- package/dist/client.js.map +1 -1
- package/dist/client.min.js +1 -1
- package/dist/client.module.js +8 -2
- package/dist/client.module.js.map +1 -1
- package/lib/Api/Model.d.ts +14 -0
- package/package.json +3 -3
- package/src/Api/Model.ts +20 -0
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (C) 2002-
|
|
1
|
+
Copyright (C) 2002-2024, Open Design Alliance (the "Alliance").
|
|
2
2
|
All rights reserved.
|
|
3
3
|
|
|
4
4
|
This software and its documentation and related materials are owned by
|
|
@@ -13,7 +13,7 @@ with their copyright notices:
|
|
|
13
13
|
|
|
14
14
|
This application incorporates Open Design Alliance software pursuant to a
|
|
15
15
|
license agreement with Open Design Alliance.
|
|
16
|
-
Open Design Alliance Copyright (C) 2002-
|
|
16
|
+
Open Design Alliance Copyright (C) 2002-2024 by Open Design Alliance.
|
|
17
17
|
All rights reserved.
|
|
18
18
|
|
|
19
19
|
By use of this software, its documentation or related materials, you
|
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@ This library enables you to integrate the [inWEB Open Cloud](https://www.opendes
|
|
|
8
8
|
|
|
9
9
|
### CDN or static hosting
|
|
10
10
|
|
|
11
|
-
For CDN, you can use [unpkg](https://unpkg.com/) or [jsDelivr](https://www.jsdelivr.com/) (replace `25.
|
|
11
|
+
For CDN, you can use [unpkg](https://unpkg.com/) or [jsDelivr](https://www.jsdelivr.com/) (replace `25.3` with a version you need):
|
|
12
12
|
|
|
13
|
-
```
|
|
14
|
-
<script src="https://unpkg.com/@inweb/client@25.
|
|
13
|
+
```html
|
|
14
|
+
<script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
The global namespace for `Client.js` is `ODA.Api`.
|
|
@@ -34,15 +34,18 @@ import { Client } from "@inweb/client";
|
|
|
34
34
|
|
|
35
35
|
Login to the `Open Cloud Server` and get the file list from the server:
|
|
36
36
|
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
|
|
37
|
+
```html
|
|
38
|
+
<script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
<script>
|
|
41
|
+
const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
client
|
|
44
|
+
.signInWithEmail("email", "password")
|
|
45
|
+
.then(() => client.getFiles())
|
|
46
|
+
.then((files) => files.result.map((file) => file.name))
|
|
47
|
+
.then((names) => console.log(names));
|
|
48
|
+
</script>
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
To learn more, see [First application guide](https://cloud.opendesign.com/docs/index.html#/guide).
|
package/dist/client.js
CHANGED
|
@@ -139,6 +139,24 @@
|
|
|
139
139
|
getModels() {
|
|
140
140
|
return Promise.resolve([this]);
|
|
141
141
|
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns a model transformation.
|
|
144
|
+
*
|
|
145
|
+
* @param handle - Model handle.
|
|
146
|
+
*/
|
|
147
|
+
getModelTransformMatrix(handle) {
|
|
148
|
+
return this.file.getModelTransformMatrix(handle);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Set or delete a model transformation.
|
|
152
|
+
*
|
|
153
|
+
* @async
|
|
154
|
+
* @param handle - Model handle.
|
|
155
|
+
* @param transform - Transformation matrix. To delete transformation provide this to `undefined`.
|
|
156
|
+
*/
|
|
157
|
+
setModelTransformMatrix(handle, transform) {
|
|
158
|
+
return this.file.setModelTransformMatrix(handle, transform).then(() => this);
|
|
159
|
+
}
|
|
142
160
|
/**
|
|
143
161
|
* Returns model viewpoint list.
|
|
144
162
|
*
|
|
@@ -3569,7 +3587,7 @@
|
|
|
3569
3587
|
.then((data) => ({
|
|
3570
3588
|
...data,
|
|
3571
3589
|
server: data.version,
|
|
3572
|
-
client: "25.3.
|
|
3590
|
+
client: "25.3.17",
|
|
3573
3591
|
}));
|
|
3574
3592
|
}
|
|
3575
3593
|
/**
|
|
@@ -4205,7 +4223,7 @@
|
|
|
4205
4223
|
}
|
|
4206
4224
|
|
|
4207
4225
|
///////////////////////////////////////////////////////////////////////////////
|
|
4208
|
-
const version = "25.3.
|
|
4226
|
+
const version = "25.3.17";
|
|
4209
4227
|
|
|
4210
4228
|
exports.Assembly = Assembly;
|
|
4211
4229
|
exports.ClashTest = ClashTest;
|