@3dverse/api 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_prebuild/wrapper.d.ts +106 -28
- package/dist/index.js +58 -10
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +55 -10
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -279,15 +279,11 @@ function createSubfolder({
|
|
279
279
|
});
|
280
280
|
}
|
281
281
|
function listFolderSubFolders({
|
282
|
-
folder_id
|
283
|
-
depth = 0
|
282
|
+
folder_id
|
284
283
|
}) {
|
285
284
|
return axiosInstance({
|
286
285
|
method: "get",
|
287
|
-
url: "/folders/" + folder_id + "/folders"
|
288
|
-
params: {
|
289
|
-
depth
|
290
|
-
}
|
286
|
+
url: "/folders/" + folder_id + "/folders"
|
291
287
|
});
|
292
288
|
}
|
293
289
|
function getSourceFilesInFolder({
|
@@ -369,6 +365,38 @@ function moveAssets({
|
|
369
365
|
data: asset_ids
|
370
366
|
});
|
371
367
|
}
|
368
|
+
function createMaterial({
|
369
|
+
folder_id,
|
370
|
+
dataJson,
|
371
|
+
isDoubleSided,
|
372
|
+
name,
|
373
|
+
shaderRef
|
374
|
+
}) {
|
375
|
+
return axiosInstance({
|
376
|
+
method: "post",
|
377
|
+
url: "/folders/" + folder_id + "/assets/materials",
|
378
|
+
data: {
|
379
|
+
dataJson,
|
380
|
+
isDoubleSided,
|
381
|
+
name,
|
382
|
+
shaderRef
|
383
|
+
}
|
384
|
+
});
|
385
|
+
}
|
386
|
+
function createCubemap({
|
387
|
+
folder_id,
|
388
|
+
faces,
|
389
|
+
name
|
390
|
+
}) {
|
391
|
+
return axiosInstance({
|
392
|
+
method: "post",
|
393
|
+
url: "/folders/" + folder_id + "/assets/cubemaps",
|
394
|
+
data: {
|
395
|
+
faces,
|
396
|
+
name
|
397
|
+
}
|
398
|
+
});
|
399
|
+
}
|
372
400
|
function getSessionsInFolder({
|
373
401
|
folder_id
|
374
402
|
}) {
|
@@ -588,12 +616,16 @@ function renameAsset({
|
|
588
616
|
}
|
589
617
|
function getAssetPayload({
|
590
618
|
asset_container_with_payload,
|
591
|
-
asset_id
|
619
|
+
asset_id,
|
620
|
+
sub_resource
|
592
621
|
}) {
|
593
622
|
return axiosInstance({
|
594
623
|
method: "get",
|
595
624
|
url: "/assets/" + asset_container_with_payload + "/" + asset_id + "/payload",
|
596
|
-
responseType: "arraybuffer"
|
625
|
+
responseType: "arraybuffer",
|
626
|
+
params: {
|
627
|
+
sub_resource
|
628
|
+
}
|
597
629
|
});
|
598
630
|
}
|
599
631
|
function getAssetHistory({
|
@@ -676,14 +708,16 @@ function exportAsset({
|
|
676
708
|
asset_container_exportable,
|
677
709
|
asset_id,
|
678
710
|
format,
|
679
|
-
scale = 1
|
711
|
+
scale = 1,
|
712
|
+
sub_mesh_index
|
680
713
|
}) {
|
681
714
|
return axiosInstance({
|
682
715
|
method: "get",
|
683
716
|
url: "/assets/" + asset_container_exportable + "/" + asset_id + "/exports/" + format,
|
684
717
|
responseType: "arraybuffer",
|
685
718
|
params: {
|
686
|
-
scale
|
719
|
+
scale,
|
720
|
+
sub_mesh_index
|
687
721
|
}
|
688
722
|
});
|
689
723
|
}
|
@@ -736,6 +770,14 @@ function deleteEntity({
|
|
736
770
|
url: "/assets/scenes/" + scene_id + "/entities/" + entity_id
|
737
771
|
});
|
738
772
|
}
|
773
|
+
function getSceneSettings({
|
774
|
+
scene_id
|
775
|
+
}) {
|
776
|
+
return axiosInstance({
|
777
|
+
method: "get",
|
778
|
+
url: "/assets/scenes/" + scene_id + "/settings"
|
779
|
+
});
|
780
|
+
}
|
739
781
|
function getRunningSessions({
|
740
782
|
filters
|
741
783
|
}) {
|
@@ -909,8 +951,10 @@ export {
|
|
909
951
|
UnexpectedServiceError,
|
910
952
|
axiosInstance,
|
911
953
|
createAsset,
|
954
|
+
createCubemap,
|
912
955
|
createFolder,
|
913
956
|
createGroup,
|
957
|
+
createMaterial,
|
914
958
|
createSession,
|
915
959
|
createSubfolder,
|
916
960
|
deleteAsset,
|
@@ -943,6 +987,7 @@ export {
|
|
943
987
|
getRunningSessions,
|
944
988
|
getSceneAABB,
|
945
989
|
getSceneSessions,
|
990
|
+
getSceneSettings,
|
946
991
|
getSession,
|
947
992
|
getSessionsInFolder,
|
948
993
|
getSourceFileAssets,
|