@3dverse/api 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_prebuild/wrapper.d.ts +371 -6
- package/dist/index.js +38 -2
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +36 -2
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -333,7 +333,8 @@ function getFolderAssets({
|
|
333
333
|
folder_id,
|
334
334
|
offset = 0,
|
335
335
|
limit = 10,
|
336
|
-
filter
|
336
|
+
filter,
|
337
|
+
recursive = false
|
337
338
|
}) {
|
338
339
|
return axiosInstance({
|
339
340
|
method: "get",
|
@@ -341,8 +342,12 @@ function getFolderAssets({
|
|
341
342
|
params: {
|
342
343
|
offset,
|
343
344
|
limit,
|
344
|
-
filter
|
345
|
+
filter,
|
346
|
+
recursive
|
345
347
|
}
|
348
|
+
}).then((response) => {
|
349
|
+
response.headers["x-assets-count"] = JSON.parse(response.headers["x-assets-count"]);
|
350
|
+
return response;
|
346
351
|
});
|
347
352
|
}
|
348
353
|
function createAsset({
|
@@ -397,6 +402,23 @@ function createCubemap({
|
|
397
402
|
}
|
398
403
|
});
|
399
404
|
}
|
405
|
+
function importAssets({
|
406
|
+
folder_id,
|
407
|
+
overwrite = "never",
|
408
|
+
body
|
409
|
+
}) {
|
410
|
+
return axiosInstance({
|
411
|
+
method: "put",
|
412
|
+
url: "/folders/" + folder_id + "/packages",
|
413
|
+
headers: {
|
414
|
+
"Content-Type": "application/zip"
|
415
|
+
},
|
416
|
+
params: {
|
417
|
+
overwrite
|
418
|
+
},
|
419
|
+
data: body
|
420
|
+
});
|
421
|
+
}
|
400
422
|
function getSessionsInFolder({
|
401
423
|
folder_id
|
402
424
|
}) {
|
@@ -737,6 +759,16 @@ function getSceneAABB({
|
|
737
759
|
url: "/assets/scenes/" + scene_id + "/aabb"
|
738
760
|
});
|
739
761
|
}
|
762
|
+
function createEntity({
|
763
|
+
scene_id,
|
764
|
+
entity_components
|
765
|
+
}) {
|
766
|
+
return axiosInstance({
|
767
|
+
method: "post",
|
768
|
+
url: "/assets/scenes/" + scene_id + "/entities",
|
769
|
+
data: entity_components
|
770
|
+
});
|
771
|
+
}
|
740
772
|
function getEntity({
|
741
773
|
scene_id,
|
742
774
|
entity_id,
|
@@ -952,6 +984,7 @@ export {
|
|
952
984
|
axiosInstance,
|
953
985
|
createAsset,
|
954
986
|
createCubemap,
|
987
|
+
createEntity,
|
955
988
|
createFolder,
|
956
989
|
createGroup,
|
957
990
|
createMaterial,
|
@@ -1001,6 +1034,7 @@ export {
|
|
1001
1034
|
getUserUploadTasks,
|
1002
1035
|
grantMemberAccessToFolder,
|
1003
1036
|
grantMemberAccessToGroup,
|
1037
|
+
importAssets,
|
1004
1038
|
joinSession,
|
1005
1039
|
joinSessionAsGuest,
|
1006
1040
|
kickClientFromSession,
|