connected-spaces-platform.web 5.6.0 → 5.8.0
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/Debug/ConnectedSpacesPlatform_WASM.js +269 -31
- package/Debug/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/Debug/ConnectedSpacesPlatform_WASM.wasm.debug.wasm +0 -0
- package/README.md +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.js +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/connectedspacesplatform.d.ts +725 -164
- package/connectedspacesplatform.js +2170 -1045
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +4106 -2029
- package/package.json +1 -1
|
@@ -561,6 +561,19 @@ function csp_systems_EAssetCollectionTypeFactory(nativePointer) {
|
|
|
561
561
|
}
|
|
562
562
|
ProxyClassFactories["csp_systems_EAssetCollectionType"] =
|
|
563
563
|
csp_systems_EAssetCollectionTypeFactory;
|
|
564
|
+
function csp_systems_EAlphaModeFactory(nativePointer) {
|
|
565
|
+
return nativePointer.pointer;
|
|
566
|
+
}
|
|
567
|
+
ProxyClassFactories["csp_systems_EAlphaMode"] = csp_systems_EAlphaModeFactory;
|
|
568
|
+
function csp_systems_EShaderTypeFactory(nativePointer) {
|
|
569
|
+
return nativePointer.pointer;
|
|
570
|
+
}
|
|
571
|
+
ProxyClassFactories["csp_systems_EShaderType"] = csp_systems_EShaderTypeFactory;
|
|
572
|
+
function csp_systems_ETextureResourceTypeFactory(nativePointer) {
|
|
573
|
+
return nativePointer.pointer;
|
|
574
|
+
}
|
|
575
|
+
ProxyClassFactories["csp_systems_ETextureResourceType"] =
|
|
576
|
+
csp_systems_ETextureResourceTypeFactory;
|
|
564
577
|
function csp_systems_EventTicketingVendorFactory(nativePointer) {
|
|
565
578
|
return nativePointer.pointer;
|
|
566
579
|
}
|
|
@@ -678,6 +691,11 @@ function csp_multiplayer_ComponentBaseFactory(nativePointer) {
|
|
|
678
691
|
}
|
|
679
692
|
ProxyClassFactories["csp_multiplayer_ComponentBase"] =
|
|
680
693
|
csp_multiplayer_ComponentBaseFactory;
|
|
694
|
+
function csp_multiplayer_EventBusFactory(nativePointer) {
|
|
695
|
+
return new Multiplayer.EventBus(nativePointer);
|
|
696
|
+
}
|
|
697
|
+
ProxyClassFactories["csp_multiplayer_EventBus"] =
|
|
698
|
+
csp_multiplayer_EventBusFactory;
|
|
681
699
|
function csp_multiplayer_AssetDetailBlobParamsFactory(nativePointer) {
|
|
682
700
|
return new Multiplayer.AssetDetailBlobParams(nativePointer);
|
|
683
701
|
}
|
|
@@ -703,6 +721,11 @@ function csp_multiplayer_SequenceHotspotChangedParamsFactory(nativePointer) {
|
|
|
703
721
|
}
|
|
704
722
|
ProxyClassFactories["csp_multiplayer_SequenceHotspotChangedParams"] =
|
|
705
723
|
csp_multiplayer_SequenceHotspotChangedParamsFactory;
|
|
724
|
+
function csp_multiplayer_MaterialChangedParamsFactory(nativePointer) {
|
|
725
|
+
return new Multiplayer.MaterialChangedParams(nativePointer);
|
|
726
|
+
}
|
|
727
|
+
ProxyClassFactories["csp_multiplayer_MaterialChangedParams"] =
|
|
728
|
+
csp_multiplayer_MaterialChangedParamsFactory;
|
|
706
729
|
function csp_multiplayer_MultiplayerConnectionFactory(nativePointer) {
|
|
707
730
|
return new Multiplayer.MultiplayerConnection(nativePointer);
|
|
708
731
|
}
|
|
@@ -738,11 +761,6 @@ function csp_multiplayer_BaseMessageInfoFactory(nativePointer) {
|
|
|
738
761
|
}
|
|
739
762
|
ProxyClassFactories["csp_multiplayer_BaseMessageInfo"] =
|
|
740
763
|
csp_multiplayer_BaseMessageInfoFactory;
|
|
741
|
-
function csp_multiplayer_ConversationSystemFactory(nativePointer) {
|
|
742
|
-
return new Multiplayer.ConversationSystem(nativePointer);
|
|
743
|
-
}
|
|
744
|
-
ProxyClassFactories["csp_multiplayer_ConversationSystem"] =
|
|
745
|
-
csp_multiplayer_ConversationSystemFactory;
|
|
746
764
|
function csp_multiplayer_EntityScriptFactory(nativePointer) {
|
|
747
765
|
return new Multiplayer.EntityScript(nativePointer);
|
|
748
766
|
}
|
|
@@ -803,6 +821,14 @@ function csp_systems_LODChainFactory(nativePointer) {
|
|
|
803
821
|
return new Systems.LODChain(nativePointer);
|
|
804
822
|
}
|
|
805
823
|
ProxyClassFactories["csp_systems_LODChain"] = csp_systems_LODChainFactory;
|
|
824
|
+
function csp_systems_MaterialFactory(nativePointer) {
|
|
825
|
+
return new Systems.Material(nativePointer);
|
|
826
|
+
}
|
|
827
|
+
ProxyClassFactories["csp_systems_Material"] = csp_systems_MaterialFactory;
|
|
828
|
+
function csp_systems_TextureInfoFactory(nativePointer) {
|
|
829
|
+
return new Systems.TextureInfo(nativePointer);
|
|
830
|
+
}
|
|
831
|
+
ProxyClassFactories["csp_systems_TextureInfo"] = csp_systems_TextureInfoFactory;
|
|
806
832
|
function csp_systems_CurrencyInfoFactory(nativePointer) {
|
|
807
833
|
return new Systems.CurrencyInfo(nativePointer);
|
|
808
834
|
}
|
|
@@ -1145,6 +1171,11 @@ function csp_multiplayer_ConversationResultFactory(nativePointer) {
|
|
|
1145
1171
|
}
|
|
1146
1172
|
ProxyClassFactories["csp_multiplayer_ConversationResult"] =
|
|
1147
1173
|
csp_multiplayer_ConversationResultFactory;
|
|
1174
|
+
function csp_multiplayer_ConversationSystemFactory(nativePointer) {
|
|
1175
|
+
return new Multiplayer.ConversationSystem(nativePointer);
|
|
1176
|
+
}
|
|
1177
|
+
ProxyClassFactories["csp_multiplayer_ConversationSystem"] =
|
|
1178
|
+
csp_multiplayer_ConversationSystemFactory;
|
|
1148
1179
|
function csp_systems_NullResultFactory(nativePointer) {
|
|
1149
1180
|
return new Systems.NullResult(nativePointer);
|
|
1150
1181
|
}
|
|
@@ -1206,6 +1237,21 @@ function csp_systems_AssetSystemFactory(nativePointer) {
|
|
|
1206
1237
|
return new Systems.AssetSystem(nativePointer);
|
|
1207
1238
|
}
|
|
1208
1239
|
ProxyClassFactories["csp_systems_AssetSystem"] = csp_systems_AssetSystemFactory;
|
|
1240
|
+
function csp_systems_GLTFMaterialFactory(nativePointer) {
|
|
1241
|
+
return new Systems.GLTFMaterial(nativePointer);
|
|
1242
|
+
}
|
|
1243
|
+
ProxyClassFactories["csp_systems_GLTFMaterial"] =
|
|
1244
|
+
csp_systems_GLTFMaterialFactory;
|
|
1245
|
+
function csp_systems_GLTFMaterialResultFactory(nativePointer) {
|
|
1246
|
+
return new Systems.GLTFMaterialResult(nativePointer);
|
|
1247
|
+
}
|
|
1248
|
+
ProxyClassFactories["csp_systems_GLTFMaterialResult"] =
|
|
1249
|
+
csp_systems_GLTFMaterialResultFactory;
|
|
1250
|
+
function csp_systems_GLTFMaterialsResultFactory(nativePointer) {
|
|
1251
|
+
return new Systems.GLTFMaterialsResult(nativePointer);
|
|
1252
|
+
}
|
|
1253
|
+
ProxyClassFactories["csp_systems_GLTFMaterialsResult"] =
|
|
1254
|
+
csp_systems_GLTFMaterialsResultFactory;
|
|
1209
1255
|
function csp_systems_LODChainResultFactory(nativePointer) {
|
|
1210
1256
|
return new Systems.LODChainResult(nativePointer);
|
|
1211
1257
|
}
|
|
@@ -1572,6 +1618,11 @@ function csp_common_Array_csp_systems_EAssetTypeFactory(nativePointer) {
|
|
|
1572
1618
|
}
|
|
1573
1619
|
ProxyClassFactories["csp_common_Array_csp_systems_EAssetType"] =
|
|
1574
1620
|
csp_common_Array_csp_systems_EAssetTypeFactory;
|
|
1621
|
+
function csp_common_Array_csp_systems_GLTFMaterialFactory(nativePointer) {
|
|
1622
|
+
return new Common.Array(nativePointer, csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
1623
|
+
}
|
|
1624
|
+
ProxyClassFactories["csp_common_Array_csp_systems_GLTFMaterial"] =
|
|
1625
|
+
csp_common_Array_csp_systems_GLTFMaterialFactory;
|
|
1575
1626
|
function csp_common_Array_csp_systems_LODAssetFactory(nativePointer) {
|
|
1576
1627
|
return new Common.Array(nativePointer, csp_systems_LODAssetFactory, "csp_systems_LODAsset");
|
|
1577
1628
|
}
|
|
@@ -1729,6 +1780,11 @@ function csp_common_Array_csp_common_Map_String_StringFactory(nativePointer) {
|
|
|
1729
1780
|
}
|
|
1730
1781
|
ProxyClassFactories["csp_common_Array_csp_common_Map_String_String"] =
|
|
1731
1782
|
csp_common_Array_csp_common_Map_String_StringFactory;
|
|
1783
|
+
function csp_common_Array_csp_common_Array_StringFactory(nativePointer) {
|
|
1784
|
+
return new Common.Array(nativePointer, csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
1785
|
+
}
|
|
1786
|
+
ProxyClassFactories["csp_common_Array_csp_common_Array_String"] =
|
|
1787
|
+
csp_common_Array_csp_common_Array_StringFactory;
|
|
1732
1788
|
function csp_common_List_csp_multiplayer_SpaceEntityFactory(nativePointer) {
|
|
1733
1789
|
return new Common.List(nativePointer, csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
|
|
1734
1790
|
}
|
|
@@ -1748,11 +1804,11 @@ function csp_common_Map_UInt32_csp_multiplayer_ReplicatedValueFactory(nativePoin
|
|
|
1748
1804
|
}
|
|
1749
1805
|
ProxyClassFactories["csp_common_Map_UInt32_csp_multiplayer_ReplicatedValue"] =
|
|
1750
1806
|
csp_common_Map_UInt32_csp_multiplayer_ReplicatedValueFactory;
|
|
1751
|
-
function
|
|
1752
|
-
return new Common.Map(nativePointer,
|
|
1807
|
+
function csp_common_Map_String_csp_multiplayer_ReplicatedValueFactory(nativePointer) {
|
|
1808
|
+
return new Common.Map(nativePointer, StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
1753
1809
|
}
|
|
1754
|
-
ProxyClassFactories["
|
|
1755
|
-
|
|
1810
|
+
ProxyClassFactories["csp_common_Map_String_csp_multiplayer_ReplicatedValue"] =
|
|
1811
|
+
csp_common_Map_String_csp_multiplayer_ReplicatedValueFactory;
|
|
1756
1812
|
function csp_common_Map_UInt16_csp_multiplayer_ComponentBaseFactory(nativePointer) {
|
|
1757
1813
|
return new Common.Map(nativePointer, NumberFactory, "UInt16", csp_multiplayer_ComponentBaseFactory, "csp_multiplayer_ComponentBase");
|
|
1758
1814
|
}
|
|
@@ -1768,6 +1824,11 @@ function csp_common_Map_String_csp_common_Map_String_StringFactory(nativePointer
|
|
|
1768
1824
|
}
|
|
1769
1825
|
ProxyClassFactories["csp_common_Map_String_csp_common_Map_String_String"] =
|
|
1770
1826
|
csp_common_Map_String_csp_common_Map_String_StringFactory;
|
|
1827
|
+
function csp_common_Map_String_csp_common_Array_StringFactory(nativePointer) {
|
|
1828
|
+
return new Common.Map(nativePointer, StringFactory, "String", csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
1829
|
+
}
|
|
1830
|
+
ProxyClassFactories["csp_common_Map_String_csp_common_Array_String"] =
|
|
1831
|
+
csp_common_Map_String_csp_common_Array_StringFactory;
|
|
1771
1832
|
export var Systems;
|
|
1772
1833
|
(function (Systems) {
|
|
1773
1834
|
/**
|
|
@@ -1913,7 +1974,7 @@ export var Multiplayer;
|
|
|
1913
1974
|
ReplicatedValueType[ReplicatedValueType["Vector3"] = 5] = "Vector3";
|
|
1914
1975
|
ReplicatedValueType[ReplicatedValueType["Vector4"] = 6] = "Vector4";
|
|
1915
1976
|
ReplicatedValueType[ReplicatedValueType["Vector2"] = 7] = "Vector2";
|
|
1916
|
-
ReplicatedValueType[ReplicatedValueType["
|
|
1977
|
+
ReplicatedValueType[ReplicatedValueType["StringMap"] = 8] = "StringMap";
|
|
1917
1978
|
})(ReplicatedValueType = Multiplayer.ReplicatedValueType || (Multiplayer.ReplicatedValueType = {}));
|
|
1918
1979
|
})(Multiplayer || (Multiplayer = {}));
|
|
1919
1980
|
(function (Multiplayer) {
|
|
@@ -1996,7 +2057,8 @@ export var Multiplayer;
|
|
|
1996
2057
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["IsARVisible"] = 11] = "IsARVisible";
|
|
1997
2058
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["ThirdPartyComponentRef"] = 12] = "ThirdPartyComponentRef";
|
|
1998
2059
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["IsShadowCaster"] = 13] = "IsShadowCaster";
|
|
1999
|
-
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["
|
|
2060
|
+
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["MaterialOverrides"] = 14] = "MaterialOverrides";
|
|
2061
|
+
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["Num"] = 15] = "Num";
|
|
2000
2062
|
})(AnimatedModelPropertyKeys = Multiplayer.AnimatedModelPropertyKeys || (Multiplayer.AnimatedModelPropertyKeys = {}));
|
|
2001
2063
|
})(Multiplayer || (Multiplayer = {}));
|
|
2002
2064
|
(function (Multiplayer) {
|
|
@@ -2531,7 +2593,8 @@ export var Multiplayer;
|
|
|
2531
2593
|
StaticModelPropertyKeys[StaticModelPropertyKeys["IsARVisible"] = 7] = "IsARVisible";
|
|
2532
2594
|
StaticModelPropertyKeys[StaticModelPropertyKeys["ThirdPartyComponentRef"] = 8] = "ThirdPartyComponentRef";
|
|
2533
2595
|
StaticModelPropertyKeys[StaticModelPropertyKeys["IsShadowCaster"] = 9] = "IsShadowCaster";
|
|
2534
|
-
StaticModelPropertyKeys[StaticModelPropertyKeys["
|
|
2596
|
+
StaticModelPropertyKeys[StaticModelPropertyKeys["MaterialOverrides"] = 10] = "MaterialOverrides";
|
|
2597
|
+
StaticModelPropertyKeys[StaticModelPropertyKeys["Num"] = 11] = "Num";
|
|
2535
2598
|
})(StaticModelPropertyKeys = Multiplayer.StaticModelPropertyKeys || (Multiplayer.StaticModelPropertyKeys = {}));
|
|
2536
2599
|
})(Multiplayer || (Multiplayer = {}));
|
|
2537
2600
|
(function (Multiplayer) {
|
|
@@ -2703,6 +2766,7 @@ export var Multiplayer;
|
|
|
2703
2766
|
EAssetType[EAssetType["HOLOCAP_AUDIO"] = 7] = "HOLOCAP_AUDIO";
|
|
2704
2767
|
EAssetType[EAssetType["AUDIO"] = 8] = "AUDIO";
|
|
2705
2768
|
EAssetType[EAssetType["GAUSSIAN_SPLAT"] = 9] = "GAUSSIAN_SPLAT";
|
|
2769
|
+
EAssetType[EAssetType["MATERIAL"] = 10] = "MATERIAL";
|
|
2706
2770
|
})(EAssetType = Systems.EAssetType || (Systems.EAssetType = {}));
|
|
2707
2771
|
})(Systems || (Systems = {}));
|
|
2708
2772
|
(function (Systems) {
|
|
@@ -2721,6 +2785,39 @@ export var Multiplayer;
|
|
|
2721
2785
|
EAssetCollectionType[EAssetCollectionType["SPACE_THUMBNAIL"] = 4] = "SPACE_THUMBNAIL";
|
|
2722
2786
|
})(EAssetCollectionType = Systems.EAssetCollectionType || (Systems.EAssetCollectionType = {}));
|
|
2723
2787
|
})(Systems || (Systems = {}));
|
|
2788
|
+
(function (Systems) {
|
|
2789
|
+
/**
|
|
2790
|
+
* @description Defines how to alpha value is interpreted
|
|
2791
|
+
* The alpha value is taken from the fourth component of the base color for metallic-roughness material model
|
|
2792
|
+
*/
|
|
2793
|
+
let EAlphaMode;
|
|
2794
|
+
(function (EAlphaMode) {
|
|
2795
|
+
EAlphaMode[EAlphaMode["Opaque"] = 0] = "Opaque";
|
|
2796
|
+
EAlphaMode[EAlphaMode["Mask"] = 1] = "Mask";
|
|
2797
|
+
EAlphaMode[EAlphaMode["Blend"] = 2] = "Blend";
|
|
2798
|
+
})(EAlphaMode = Systems.EAlphaMode || (Systems.EAlphaMode = {}));
|
|
2799
|
+
})(Systems || (Systems = {}));
|
|
2800
|
+
(function (Systems) {
|
|
2801
|
+
/**
|
|
2802
|
+
* @description Enum representing the shader type of a material. Currently not in use.
|
|
2803
|
+
*/
|
|
2804
|
+
let EShaderType;
|
|
2805
|
+
(function (EShaderType) {
|
|
2806
|
+
EShaderType[EShaderType["Standard"] = 0] = "Standard";
|
|
2807
|
+
})(EShaderType = Systems.EShaderType || (Systems.EShaderType = {}));
|
|
2808
|
+
})(Systems || (Systems = {}));
|
|
2809
|
+
(function (Systems) {
|
|
2810
|
+
/**
|
|
2811
|
+
* @description Enum representing the source type of the texture
|
|
2812
|
+
* If Component is set, the data of the texture comes from the specified media component
|
|
2813
|
+
* If ImageAsset is set, th data of the texture comes from the specified asset
|
|
2814
|
+
*/
|
|
2815
|
+
let ETextureResourceType;
|
|
2816
|
+
(function (ETextureResourceType) {
|
|
2817
|
+
ETextureResourceType[ETextureResourceType["Component"] = 0] = "Component";
|
|
2818
|
+
ETextureResourceType[ETextureResourceType["ImageAsset"] = 1] = "ImageAsset";
|
|
2819
|
+
})(ETextureResourceType = Systems.ETextureResourceType || (Systems.ETextureResourceType = {}));
|
|
2820
|
+
})(Systems || (Systems = {}));
|
|
2724
2821
|
(function (Systems) {
|
|
2725
2822
|
/**
|
|
2726
2823
|
@ingroup Event Ticketing System
|
|
@@ -9309,6 +9406,94 @@ export class CSPFoundation {
|
|
|
9309
9406
|
}
|
|
9310
9407
|
Multiplayer.ComponentBase = ComponentBase;
|
|
9311
9408
|
})(Multiplayer || (Multiplayer = {}));
|
|
9409
|
+
(function (Multiplayer) {
|
|
9410
|
+
/**
|
|
9411
|
+
@ingroup Multiplayer
|
|
9412
|
+
* @description Handling of all network events.
|
|
9413
|
+
*/
|
|
9414
|
+
class EventBus extends NativeClassWrapper {
|
|
9415
|
+
/** @internal */
|
|
9416
|
+
constructor(pointer) {
|
|
9417
|
+
super(pointer);
|
|
9418
|
+
}
|
|
9419
|
+
/**
|
|
9420
|
+
* @description Sends a network event by EventName to all currently connected clients.
|
|
9421
|
+
* @param eventName - The identifying name for the event.
|
|
9422
|
+
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9423
|
+
* @param callback - A callback with failure state.
|
|
9424
|
+
*/
|
|
9425
|
+
async sendNetworkEvent(eventName, args) {
|
|
9426
|
+
var _resolve;
|
|
9427
|
+
var _promise = new Promise((_r) => {
|
|
9428
|
+
_resolve = _r;
|
|
9429
|
+
});
|
|
9430
|
+
var _callbackPtr;
|
|
9431
|
+
var _callback = (_stateObject__, arg1) => {
|
|
9432
|
+
_resolve(arg1);
|
|
9433
|
+
Module.removeFunction(_callbackPtr);
|
|
9434
|
+
};
|
|
9435
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9436
|
+
Module.ccall("csp_multiplayer_EventBus_SendNetworkEvent_void_StringRC_ArrayRC_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "number", "number"], [this.pointer, eventName, args.pointer, _callbackPtr, 0]);
|
|
9437
|
+
return _promise;
|
|
9438
|
+
}
|
|
9439
|
+
/**
|
|
9440
|
+
* @description Sends a network event by EventName, to TargetClientId.
|
|
9441
|
+
* @param eventName - The identifying name for the event.
|
|
9442
|
+
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9443
|
+
* @param targetClientId - The client ID to send the event to.
|
|
9444
|
+
* @param callback - A callback with failure state.
|
|
9445
|
+
*/
|
|
9446
|
+
async sendNetworkEventToClient(eventName, args, targetClientId) {
|
|
9447
|
+
var _resolve;
|
|
9448
|
+
var _promise = new Promise((_r) => {
|
|
9449
|
+
_resolve = _r;
|
|
9450
|
+
});
|
|
9451
|
+
var _callbackPtr;
|
|
9452
|
+
var _callback = (_stateObject__, arg1) => {
|
|
9453
|
+
_resolve(arg1);
|
|
9454
|
+
Module.removeFunction(_callbackPtr);
|
|
9455
|
+
};
|
|
9456
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9457
|
+
Module.ccall("csp_multiplayer_EventBus_SendNetworkEventToClient_void_StringRC_ArrayRC_uint64_t_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "bigint", "number", "number"], [
|
|
9458
|
+
this.pointer,
|
|
9459
|
+
eventName,
|
|
9460
|
+
args.pointer,
|
|
9461
|
+
targetClientId,
|
|
9462
|
+
_callbackPtr,
|
|
9463
|
+
0,
|
|
9464
|
+
]);
|
|
9465
|
+
return _promise;
|
|
9466
|
+
}
|
|
9467
|
+
/**
|
|
9468
|
+
* @description Registers a callback to listen for the named event
|
|
9469
|
+
* @param eventName - The identifying name for the event to listen for.
|
|
9470
|
+
* @param callback - A callback to register for the event which contains the parameter payload data.
|
|
9471
|
+
*/
|
|
9472
|
+
listenNetworkEvent(eventName, callback) {
|
|
9473
|
+
var _callback = (_stateObject__, arg1, arg2) => {
|
|
9474
|
+
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
9475
|
+
callback(arg1, _arg2);
|
|
9476
|
+
};
|
|
9477
|
+
var callbackPtr = Module.addFunction(_callback, "viii");
|
|
9478
|
+
Module.ccall("csp_multiplayer_EventBus_ListenNetworkEvent_void_StringRC_ParameterisedCallbackHandler", "void", ["number", "string", "number"], [this.pointer, eventName, callbackPtr]);
|
|
9479
|
+
}
|
|
9480
|
+
/**
|
|
9481
|
+
* @description Stops the event bus from listening for a particular event, for any system or callback
|
|
9482
|
+
* @description that were registered.
|
|
9483
|
+
* @param eventName - The identifying name for the event to stop listening for.
|
|
9484
|
+
*/
|
|
9485
|
+
stopListenNetworkEvent(eventName) {
|
|
9486
|
+
Module.ccall("csp_multiplayer_EventBus_StopListenNetworkEvent_void_StringRC", "void", ["number", "string"], [this.pointer, eventName]);
|
|
9487
|
+
}
|
|
9488
|
+
/**
|
|
9489
|
+
* @description Instructs the event bus to start listening to messages
|
|
9490
|
+
*/
|
|
9491
|
+
startEventMessageListening() {
|
|
9492
|
+
Module.ccall("csp_multiplayer_EventBus_StartEventMessageListening_void", "void", ["number"], [this.pointer]);
|
|
9493
|
+
}
|
|
9494
|
+
}
|
|
9495
|
+
Multiplayer.EventBus = EventBus;
|
|
9496
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
9312
9497
|
(function (Multiplayer) {
|
|
9313
9498
|
/**
|
|
9314
9499
|
* @description Describes the changes an asset has undergone when the client application is connected to a space.
|
|
@@ -9551,6 +9736,48 @@ export class CSPFoundation {
|
|
|
9551
9736
|
}
|
|
9552
9737
|
Multiplayer.SequenceHotspotChangedParams = SequenceHotspotChangedParams;
|
|
9553
9738
|
})(Multiplayer || (Multiplayer = {}));
|
|
9739
|
+
(function (Multiplayer) {
|
|
9740
|
+
class MaterialChangedParams extends NativeClassWrapper {
|
|
9741
|
+
/** @internal */
|
|
9742
|
+
constructor(pointer) {
|
|
9743
|
+
super(pointer);
|
|
9744
|
+
}
|
|
9745
|
+
static create() {
|
|
9746
|
+
var _ptr = Module._malloc(8);
|
|
9747
|
+
Module.ccall("csp_multiplayer_MaterialChangedParams_Ctor", "void", ["number"], [_ptr]);
|
|
9748
|
+
var _nPtr = getNativePointer(_ptr);
|
|
9749
|
+
return new MaterialChangedParams(_nPtr);
|
|
9750
|
+
}
|
|
9751
|
+
delete() {
|
|
9752
|
+
if (this.ownsPointer && !this.disposed) {
|
|
9753
|
+
Module.ccall("csp_multiplayer_MaterialChangedParams_Dtor", "void", ["number"], [this.pointer]);
|
|
9754
|
+
this.disposed = true;
|
|
9755
|
+
}
|
|
9756
|
+
}
|
|
9757
|
+
get materialCollectionId() {
|
|
9758
|
+
let _result = Module.ccall("csp_multiplayer_MaterialChangedParams__Get_MaterialCollectionId", "string", ["number"], [this.pointer]);
|
|
9759
|
+
return _result;
|
|
9760
|
+
}
|
|
9761
|
+
set materialCollectionId(value) {
|
|
9762
|
+
Module.ccall("csp_multiplayer_MaterialChangedParams__Set_MaterialCollectionId", "void", ["number", "string"], [this.pointer, value]);
|
|
9763
|
+
}
|
|
9764
|
+
get materialId() {
|
|
9765
|
+
let _result = Module.ccall("csp_multiplayer_MaterialChangedParams__Get_MaterialId", "string", ["number"], [this.pointer]);
|
|
9766
|
+
return _result;
|
|
9767
|
+
}
|
|
9768
|
+
set materialId(value) {
|
|
9769
|
+
Module.ccall("csp_multiplayer_MaterialChangedParams__Set_MaterialId", "void", ["number", "string"], [this.pointer, value]);
|
|
9770
|
+
}
|
|
9771
|
+
get changeType() {
|
|
9772
|
+
let _result = Module.ccall("csp_multiplayer_MaterialChangedParams__Get_ChangeType", "number", ["number"], [this.pointer]);
|
|
9773
|
+
return _result;
|
|
9774
|
+
}
|
|
9775
|
+
set changeType(value) {
|
|
9776
|
+
Module.ccall("csp_multiplayer_MaterialChangedParams__Set_ChangeType", "void", ["number", "number"], [this.pointer, value]);
|
|
9777
|
+
}
|
|
9778
|
+
}
|
|
9779
|
+
Multiplayer.MaterialChangedParams = MaterialChangedParams;
|
|
9780
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
9554
9781
|
(function (Multiplayer) {
|
|
9555
9782
|
/**
|
|
9556
9783
|
@ingroup Multiplayer
|
|
@@ -9561,54 +9788,6 @@ export class CSPFoundation {
|
|
|
9561
9788
|
constructor(pointer) {
|
|
9562
9789
|
super(pointer);
|
|
9563
9790
|
}
|
|
9564
|
-
/**
|
|
9565
|
-
* @description Sends a network event by EventName to all currently connected clients.
|
|
9566
|
-
* @param eventName - The identifying name for the event.
|
|
9567
|
-
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9568
|
-
* @param callback - A callback with failure state.
|
|
9569
|
-
*/
|
|
9570
|
-
async sendNetworkEvent(eventName, args) {
|
|
9571
|
-
var _resolve;
|
|
9572
|
-
var _promise = new Promise((_r) => {
|
|
9573
|
-
_resolve = _r;
|
|
9574
|
-
});
|
|
9575
|
-
var _callbackPtr;
|
|
9576
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9577
|
-
_resolve(arg1);
|
|
9578
|
-
Module.removeFunction(_callbackPtr);
|
|
9579
|
-
};
|
|
9580
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9581
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SendNetworkEvent_void_StringRC_ArrayRC_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "number", "number"], [this.pointer, eventName, args.pointer, _callbackPtr, 0]);
|
|
9582
|
-
return _promise;
|
|
9583
|
-
}
|
|
9584
|
-
/**
|
|
9585
|
-
* @description Sends a network event by EventName, to TargetClientId.
|
|
9586
|
-
* @param eventName - The identifying name for the event.
|
|
9587
|
-
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9588
|
-
* @param targetClientId - The client ID to send the event to.
|
|
9589
|
-
* @param callback - A callback with failure state.
|
|
9590
|
-
*/
|
|
9591
|
-
async sendNetworkEventToClient(eventName, args, targetClientId) {
|
|
9592
|
-
var _resolve;
|
|
9593
|
-
var _promise = new Promise((_r) => {
|
|
9594
|
-
_resolve = _r;
|
|
9595
|
-
});
|
|
9596
|
-
var _callbackPtr;
|
|
9597
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9598
|
-
_resolve(arg1);
|
|
9599
|
-
Module.removeFunction(_callbackPtr);
|
|
9600
|
-
};
|
|
9601
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9602
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SendNetworkEventToClient_void_StringRC_ArrayRC_uint64_t_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "bigint", "number", "number"], [
|
|
9603
|
-
this.pointer,
|
|
9604
|
-
eventName,
|
|
9605
|
-
args.pointer,
|
|
9606
|
-
targetClientId,
|
|
9607
|
-
_callbackPtr,
|
|
9608
|
-
0,
|
|
9609
|
-
]);
|
|
9610
|
-
return _promise;
|
|
9611
|
-
}
|
|
9612
9791
|
/**
|
|
9613
9792
|
* @description Sets a callback for a disconnection event.
|
|
9614
9793
|
* @param callback - The callback for disconnection, contains a string with a reason for disconnection.
|
|
@@ -9659,136 +9838,55 @@ export class CSPFoundation {
|
|
|
9659
9838
|
Module.ccall("csp_multiplayer_MultiplayerConnection_SetNetworkInterruptionCallback_void_NetworkInterruptionCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9660
9839
|
}
|
|
9661
9840
|
/**
|
|
9662
|
-
* @description
|
|
9663
|
-
* @
|
|
9841
|
+
* @description Requests the ClientID.
|
|
9842
|
+
* @return Uint64_t the clientid for this connection.
|
|
9664
9843
|
*/
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetAssetDetailBlobChangedCallback_void_AssetDetailBlobChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9844
|
+
getClientId() {
|
|
9845
|
+
let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetClientIdC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
9846
|
+
const _unfixedValue = _result;
|
|
9847
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
9848
|
+
_result = _fixedValue;
|
|
9849
|
+
return _result;
|
|
9672
9850
|
}
|
|
9673
9851
|
/**
|
|
9674
|
-
* @description
|
|
9675
|
-
* @
|
|
9676
|
-
* Callback will have to reset the callback passed to the system to avoid "dangling objects" after use.
|
|
9852
|
+
* @description Gets a pointer to the conversation system.
|
|
9853
|
+
* @return A pointer to the conversation system.
|
|
9677
9854
|
*/
|
|
9678
|
-
|
|
9679
|
-
var
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetConversationSystemCallback_void_ConversationSystemCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9855
|
+
getConversationSystem() {
|
|
9856
|
+
var _ret = Module._malloc(8);
|
|
9857
|
+
Module.ccall("csp_multiplayer_MultiplayerConnection_GetConversationSystemC_ConversationSystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
9858
|
+
var _nPtr = new Multiplayer.ConversationSystem(getNativePointer(_ret));
|
|
9859
|
+
Module._free(_ret);
|
|
9860
|
+
return _nPtr;
|
|
9685
9861
|
}
|
|
9686
9862
|
/**
|
|
9687
|
-
* @description
|
|
9688
|
-
* @
|
|
9863
|
+
* @description Gets the current connection state.
|
|
9864
|
+
* @return A ConnectionState enum value.
|
|
9689
9865
|
*/
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
callback(_arg1);
|
|
9694
|
-
};
|
|
9695
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9696
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetUserPermissionsChangedCallback_void_UserPermissionsChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9866
|
+
getConnectionState() {
|
|
9867
|
+
let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetConnectionStateC_ConnectionState", "number", ["number"], [this.pointer]);
|
|
9868
|
+
return _result;
|
|
9697
9869
|
}
|
|
9698
9870
|
/**
|
|
9699
|
-
* @description Sets
|
|
9700
|
-
*
|
|
9871
|
+
* @description Sets the Self Messaging flag for this client.
|
|
9872
|
+
* This allows a client to declare that it wishes to recieve every patch and object message it sends.
|
|
9873
|
+
@warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
|
|
9874
|
+
* @param allowSelfMessaging - True to allow and false to disallow.
|
|
9875
|
+
* @param callback - A callback with failure state.
|
|
9701
9876
|
*/
|
|
9702
|
-
|
|
9877
|
+
async setAllowSelfMessagingFlag(allowSelfMessaging) {
|
|
9878
|
+
var _resolve;
|
|
9879
|
+
var _promise = new Promise((_r) => {
|
|
9880
|
+
_resolve = _r;
|
|
9881
|
+
});
|
|
9882
|
+
var _callbackPtr;
|
|
9703
9883
|
var _callback = (_stateObject__, arg1) => {
|
|
9704
|
-
|
|
9705
|
-
|
|
9884
|
+
_resolve(arg1);
|
|
9885
|
+
Module.removeFunction(_callbackPtr);
|
|
9706
9886
|
};
|
|
9707
|
-
|
|
9708
|
-
Module.ccall("
|
|
9709
|
-
|
|
9710
|
-
/**
|
|
9711
|
-
* @description Sets a callback to be fired when a hotspot sequence is changed.
|
|
9712
|
-
* @param callback - Callback to receive data for the hotspot sequence that has been changed.
|
|
9713
|
-
*/
|
|
9714
|
-
setHotspotSequenceChangedCallback(callback) {
|
|
9715
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9716
|
-
var _arg1 = new Multiplayer.SequenceHotspotChangedParams(getNativePointer(arg1));
|
|
9717
|
-
callback(_arg1);
|
|
9718
|
-
};
|
|
9719
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9720
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetHotspotSequenceChangedCallback_void_HotspotSequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9721
|
-
}
|
|
9722
|
-
/**
|
|
9723
|
-
* @description Registers a callback to listen for the named event.
|
|
9724
|
-
* @param eventName - The identifying name for the event to listen for.
|
|
9725
|
-
* @param callback - A callback to register for the event which contains the parameter payload data.
|
|
9726
|
-
*/
|
|
9727
|
-
listenNetworkEvent(eventName, callback) {
|
|
9728
|
-
var _callback = (_stateObject__, arg1, arg2) => {
|
|
9729
|
-
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
9730
|
-
callback(arg1, _arg2);
|
|
9731
|
-
};
|
|
9732
|
-
var callbackPtr = Module.addFunction(_callback, "viii");
|
|
9733
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_ListenNetworkEvent_void_StringRC_ParameterisedCallbackHandler", "void", ["number", "string", "number"], [this.pointer, eventName, callbackPtr]);
|
|
9734
|
-
}
|
|
9735
|
-
/**
|
|
9736
|
-
* @description Stops the multiplayer connection from listening for a particular network event.
|
|
9737
|
-
* @param eventName - The identifying name for the event to stop listening for.
|
|
9738
|
-
*/
|
|
9739
|
-
stopListenNetworkEvent(eventName) {
|
|
9740
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_StopListenNetworkEvent_void_StringRC", "void", ["number", "string"], [this.pointer, eventName]);
|
|
9741
|
-
}
|
|
9742
|
-
/**
|
|
9743
|
-
* @description Requests the ClientID.
|
|
9744
|
-
* @return Uint64_t the clientid for this connection.
|
|
9745
|
-
*/
|
|
9746
|
-
getClientId() {
|
|
9747
|
-
let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetClientIdC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
9748
|
-
const _unfixedValue = _result;
|
|
9749
|
-
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
9750
|
-
_result = _fixedValue;
|
|
9751
|
-
return _result;
|
|
9752
|
-
}
|
|
9753
|
-
/**
|
|
9754
|
-
* @description Gets a pointer to the conversation system.
|
|
9755
|
-
* @return A pointer to the conversation system.
|
|
9756
|
-
*/
|
|
9757
|
-
getConversationSystem() {
|
|
9758
|
-
var _ret = Module._malloc(8);
|
|
9759
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_GetConversationSystemC_ConversationSystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
9760
|
-
var _nPtr = new Multiplayer.ConversationSystem(getNativePointer(_ret));
|
|
9761
|
-
Module._free(_ret);
|
|
9762
|
-
return _nPtr;
|
|
9763
|
-
}
|
|
9764
|
-
/**
|
|
9765
|
-
* @description Gets the current connection state.
|
|
9766
|
-
* @return A ConnectionState enum value.
|
|
9767
|
-
*/
|
|
9768
|
-
getConnectionState() {
|
|
9769
|
-
let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetConnectionStateC_ConnectionState", "number", ["number"], [this.pointer]);
|
|
9770
|
-
return _result;
|
|
9771
|
-
}
|
|
9772
|
-
/**
|
|
9773
|
-
* @description Sets the Self Messaging flag for this client.
|
|
9774
|
-
* This allows a client to declare that it wishes to recieve every patch and object message it sends.
|
|
9775
|
-
@warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
|
|
9776
|
-
* @param allowSelfMessaging - True to allow and false to disallow.
|
|
9777
|
-
* @param callback - A callback with failure state.
|
|
9778
|
-
*/
|
|
9779
|
-
async setAllowSelfMessagingFlag(allowSelfMessaging) {
|
|
9780
|
-
var _resolve;
|
|
9781
|
-
var _promise = new Promise((_r) => {
|
|
9782
|
-
_resolve = _r;
|
|
9783
|
-
});
|
|
9784
|
-
var _callbackPtr;
|
|
9785
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9786
|
-
_resolve(arg1);
|
|
9787
|
-
Module.removeFunction(_callbackPtr);
|
|
9788
|
-
};
|
|
9789
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9790
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetAllowSelfMessagingFlag_void_boolC_ErrorCodeCallbackHandler", "void", ["number", "boolean", "number", "number"], [this.pointer, allowSelfMessaging, _callbackPtr, 0]);
|
|
9791
|
-
return _promise;
|
|
9887
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9888
|
+
Module.ccall("csp_multiplayer_MultiplayerConnection_SetAllowSelfMessagingFlag_void_boolC_ErrorCodeCallbackHandler", "void", ["number", "boolean", "number", "number"], [this.pointer, allowSelfMessaging, _callbackPtr, 0]);
|
|
9889
|
+
return _promise;
|
|
9792
9890
|
}
|
|
9793
9891
|
/**
|
|
9794
9892
|
* @description Gets the bool representing if we're using self-messaging or not.
|
|
@@ -9892,7 +9990,7 @@ export class CSPFoundation {
|
|
|
9892
9990
|
return new ReplicatedValue(_nPtr);
|
|
9893
9991
|
}
|
|
9894
9992
|
/**
|
|
9895
|
-
* @description Construct a ReplicatedValue based on an csp::common::Map type.
|
|
9993
|
+
* @description Construct a ReplicatedValue based on an csp::common::Map type with a string value as the key.
|
|
9896
9994
|
* @param inMapValue - Initial value.
|
|
9897
9995
|
*/
|
|
9898
9996
|
static create_mapValue(mapValue) {
|
|
@@ -10075,22 +10173,23 @@ export class CSPFoundation {
|
|
|
10075
10173
|
return _nPtr;
|
|
10076
10174
|
}
|
|
10077
10175
|
/**
|
|
10078
|
-
* @description Get a csp::common::Map value
|
|
10176
|
+
* @description Get a csp::common::Map value with a string value as the key.
|
|
10177
|
+
* This will assert if not a csp::common::Map type with a string value as the key.
|
|
10079
10178
|
* /// Use ReplicatedValue::GetReplicatedValueType to ensure type before accessing.
|
|
10080
10179
|
* /// @return csp::common::Map
|
|
10081
10180
|
*/
|
|
10082
|
-
|
|
10181
|
+
getStringMap() {
|
|
10083
10182
|
var _ret = Module._malloc(8);
|
|
10084
|
-
Module.ccall("
|
|
10085
|
-
var _nPtr = new Common.Map(getNativePointer(_ret),
|
|
10183
|
+
Module.ccall("csp_multiplayer_ReplicatedValue_GetStringMapC_MapRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
10184
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
10086
10185
|
Module._free(_ret);
|
|
10087
10186
|
return _nPtr;
|
|
10088
10187
|
}
|
|
10089
10188
|
/**
|
|
10090
|
-
* @description Set a Map value for this replicated value from a csp::common::Map, will overwrite
|
|
10189
|
+
* @description Set a string Map value for this replicated value from a csp::common::Map, will overwrite any previous value.
|
|
10091
10190
|
*/
|
|
10092
|
-
|
|
10093
|
-
Module.ccall("
|
|
10191
|
+
setStringMap(value) {
|
|
10192
|
+
Module.ccall("csp_multiplayer_ReplicatedValue_SetStringMap_void_MapRC", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
10094
10193
|
}
|
|
10095
10194
|
}
|
|
10096
10195
|
Multiplayer.ReplicatedValue = ReplicatedValue;
|
|
@@ -11251,373 +11350,57 @@ export class CSPFoundation {
|
|
|
11251
11350
|
})(Multiplayer || (Multiplayer = {}));
|
|
11252
11351
|
(function (Multiplayer) {
|
|
11253
11352
|
/**
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
class
|
|
11353
|
+
* @description Manages the script attached to an Entity.
|
|
11354
|
+
* /// Provides functions for setting the script source, subscribing to property changes and messages and other script management.
|
|
11355
|
+
*/
|
|
11356
|
+
class EntityScript extends NativeClassWrapper {
|
|
11258
11357
|
/** @internal */
|
|
11259
11358
|
constructor(pointer) {
|
|
11260
11359
|
super(pointer);
|
|
11261
11360
|
}
|
|
11262
11361
|
/**
|
|
11263
|
-
* @description
|
|
11264
|
-
* @param inMultiPlayerConnection - The connection to be used.
|
|
11362
|
+
* @description Destroy the instance of EntityScript.
|
|
11265
11363
|
*/
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11364
|
+
delete() {
|
|
11365
|
+
if (this.ownsPointer && !this.disposed) {
|
|
11366
|
+
Module.ccall("csp_multiplayer_EntityScript_Dtor", "void", ["number"], [this.pointer]);
|
|
11367
|
+
this.disposed = true;
|
|
11368
|
+
}
|
|
11271
11369
|
}
|
|
11272
11370
|
/**
|
|
11273
|
-
* @description
|
|
11274
|
-
* @param
|
|
11275
|
-
* @param callback - Callback when asynchronous task finishes
|
|
11371
|
+
* @description Sets the source code for the script.
|
|
11372
|
+
* @param scriptSource - The source as a string.
|
|
11276
11373
|
*/
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
var _promise = new Promise((_r) => {
|
|
11280
|
-
_resolve = _r;
|
|
11281
|
-
});
|
|
11282
|
-
var _callbackPtr;
|
|
11283
|
-
var _callback = (_stateObject__, result) => {
|
|
11284
|
-
var _resultPtr = getNativePointer(result);
|
|
11285
|
-
var _resultInstance = new Systems.StringResult(_resultPtr);
|
|
11286
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11287
|
-
return;
|
|
11288
|
-
}
|
|
11289
|
-
_resolve(_resultInstance);
|
|
11290
|
-
Module.removeFunction(_callbackPtr);
|
|
11291
|
-
};
|
|
11292
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11293
|
-
Module.ccall("csp_multiplayer_ConversationSystem_CreateConversation_void_StringRC_StringResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, message, _callbackPtr, 0]);
|
|
11294
|
-
return _promise;
|
|
11374
|
+
setScriptSource(scriptSource) {
|
|
11375
|
+
Module.ccall("csp_multiplayer_EntityScript_SetScriptSource_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11295
11376
|
}
|
|
11296
11377
|
/**
|
|
11297
|
-
* @description
|
|
11298
|
-
*
|
|
11299
|
-
* Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11300
|
-
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::NewMessage, ConversationId of type ReplicatedType : String}.
|
|
11301
|
-
* /// @param ConversationId csp::common::String : A new message will be linked to the provided conversation id.
|
|
11302
|
-
* @param senderDisplayName - The display name of the message sender.
|
|
11303
|
-
* @param message - The message to be stored.
|
|
11304
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11378
|
+
* @description Runs the script.
|
|
11379
|
+
* @return True if the script runs successfully or false if there are errors.
|
|
11305
11380
|
*/
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
_resolve = _r;
|
|
11310
|
-
});
|
|
11311
|
-
var _callbackPtr;
|
|
11312
|
-
var _callback = (_stateObject__, result) => {
|
|
11313
|
-
var _resultPtr = getNativePointer(result);
|
|
11314
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11315
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11316
|
-
return;
|
|
11317
|
-
}
|
|
11318
|
-
_resolve(_resultInstance);
|
|
11319
|
-
Module.removeFunction(_callbackPtr);
|
|
11320
|
-
};
|
|
11321
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11322
|
-
Module.ccall("csp_multiplayer_ConversationSystem_AddMessageToConversation_void_StringRC_StringRC_StringRC_MessageResultCallback", "void", ["number", "string", "string", "string", "number", "number"], [
|
|
11323
|
-
this.pointer,
|
|
11324
|
-
conversationId,
|
|
11325
|
-
senderDisplayName,
|
|
11326
|
-
message,
|
|
11327
|
-
_callbackPtr,
|
|
11328
|
-
0,
|
|
11329
|
-
]);
|
|
11330
|
-
return _promise;
|
|
11381
|
+
invoke() {
|
|
11382
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_Invoke_bool", "boolean", ["number"], [this.pointer]);
|
|
11383
|
+
return _result;
|
|
11331
11384
|
}
|
|
11332
11385
|
/**
|
|
11333
|
-
* @description
|
|
11334
|
-
*
|
|
11335
|
-
* @param
|
|
11336
|
-
* For no skip pass nullptr.
|
|
11337
|
-
* @param resultsMaxNumber - Optional parameter representing the maximum number of result entries to be retrieved. For all
|
|
11338
|
-
* available result entries pass nullptr.
|
|
11339
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11386
|
+
* @description Run a script with the given source rather than the stored source.
|
|
11387
|
+
* /// Will be run locally or remotely depending on leader election.
|
|
11388
|
+
* /// @param ScriptSource csp::common::String : The source to use.
|
|
11340
11389
|
*/
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
var _promise = new Promise((_r) => {
|
|
11344
|
-
_resolve = _r;
|
|
11345
|
-
});
|
|
11346
|
-
var _callbackPtr;
|
|
11347
|
-
var _callback = (_stateObject__, result) => {
|
|
11348
|
-
var _resultPtr = getNativePointer(result);
|
|
11349
|
-
var _resultInstance = new Multiplayer.MessageCollectionResult(_resultPtr);
|
|
11350
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11351
|
-
return;
|
|
11352
|
-
}
|
|
11353
|
-
_resolve(_resultInstance);
|
|
11354
|
-
Module.removeFunction(_callbackPtr);
|
|
11355
|
-
};
|
|
11356
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11357
|
-
var resultsSkipNumberPointer = 0;
|
|
11358
|
-
if (resultsSkipNumber != null) {
|
|
11359
|
-
resultsSkipNumberPointer = Module._malloc(4);
|
|
11360
|
-
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
11361
|
-
}
|
|
11362
|
-
var resultsMaxNumberPointer = 0;
|
|
11363
|
-
if (resultsMaxNumber != null) {
|
|
11364
|
-
resultsMaxNumberPointer = Module._malloc(4);
|
|
11365
|
-
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
11366
|
-
}
|
|
11367
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessagesFromConversation_void_StringRC_intRC_intRC_MessageCollectionResultCallback", "void", ["number", "string", "number", "number", "number", "number"], [
|
|
11368
|
-
this.pointer,
|
|
11369
|
-
conversationId,
|
|
11370
|
-
resultsSkipNumberPointer,
|
|
11371
|
-
resultsMaxNumberPointer,
|
|
11372
|
-
_callbackPtr,
|
|
11373
|
-
0,
|
|
11374
|
-
]);
|
|
11375
|
-
if (resultsSkipNumberPointer) {
|
|
11376
|
-
Module._free(resultsSkipNumberPointer);
|
|
11377
|
-
}
|
|
11378
|
-
if (resultsMaxNumberPointer) {
|
|
11379
|
-
Module._free(resultsMaxNumberPointer);
|
|
11380
|
-
}
|
|
11381
|
-
return _promise;
|
|
11390
|
+
runScript(scriptSource) {
|
|
11391
|
+
Module.ccall("csp_multiplayer_EntityScript_RunScript_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11382
11392
|
}
|
|
11383
11393
|
/**
|
|
11384
|
-
* @description
|
|
11385
|
-
* @
|
|
11386
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11394
|
+
* @description Checks if there was an error with the last script invocation.
|
|
11395
|
+
* @return True if there was an error, false otherwise.
|
|
11387
11396
|
*/
|
|
11388
|
-
|
|
11389
|
-
|
|
11390
|
-
|
|
11391
|
-
_resolve = _r;
|
|
11392
|
-
});
|
|
11393
|
-
var _callbackPtr;
|
|
11394
|
-
var _callback = (_stateObject__, result) => {
|
|
11395
|
-
var _resultPtr = getNativePointer(result);
|
|
11396
|
-
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
11397
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11398
|
-
return;
|
|
11399
|
-
}
|
|
11400
|
-
_resolve(_resultInstance);
|
|
11401
|
-
Module.removeFunction(_callbackPtr);
|
|
11402
|
-
};
|
|
11403
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11404
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetConversationInformation_void_StringRC_ConversationResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
11405
|
-
return _promise;
|
|
11397
|
+
hasError() {
|
|
11398
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
|
|
11399
|
+
return _result;
|
|
11406
11400
|
}
|
|
11407
11401
|
/**
|
|
11408
|
-
* @description
|
|
11409
|
-
* @
|
|
11410
|
-
* @param conversationData - Conversation Data.
|
|
11411
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11412
|
-
*/
|
|
11413
|
-
async setConversationInformation(conversationId, conversationData) {
|
|
11414
|
-
var _resolve;
|
|
11415
|
-
var _promise = new Promise((_r) => {
|
|
11416
|
-
_resolve = _r;
|
|
11417
|
-
});
|
|
11418
|
-
var _callbackPtr;
|
|
11419
|
-
var _callback = (_stateObject__, result) => {
|
|
11420
|
-
var _resultPtr = getNativePointer(result);
|
|
11421
|
-
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
11422
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11423
|
-
return;
|
|
11424
|
-
}
|
|
11425
|
-
_resolve(_resultInstance);
|
|
11426
|
-
Module.removeFunction(_callbackPtr);
|
|
11427
|
-
};
|
|
11428
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11429
|
-
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationInformation_void_StringRC_ConversationInfoRC_ConversationResultCallback", "void", ["number", "string", "number", "number", "number"], [
|
|
11430
|
-
this.pointer,
|
|
11431
|
-
conversationId,
|
|
11432
|
-
conversationData.pointer,
|
|
11433
|
-
_callbackPtr,
|
|
11434
|
-
0,
|
|
11435
|
-
]);
|
|
11436
|
-
return _promise;
|
|
11437
|
-
}
|
|
11438
|
-
/**
|
|
11439
|
-
* @description Retrieves one particular message.
|
|
11440
|
-
* @param messageId - ID of the message to be retrieved.
|
|
11441
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11442
|
-
*/
|
|
11443
|
-
async getMessage(messageId) {
|
|
11444
|
-
var _resolve;
|
|
11445
|
-
var _promise = new Promise((_r) => {
|
|
11446
|
-
_resolve = _r;
|
|
11447
|
-
});
|
|
11448
|
-
var _callbackPtr;
|
|
11449
|
-
var _callback = (_stateObject__, result) => {
|
|
11450
|
-
var _resultPtr = getNativePointer(result);
|
|
11451
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11452
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11453
|
-
return;
|
|
11454
|
-
}
|
|
11455
|
-
_resolve(_resultInstance);
|
|
11456
|
-
Module.removeFunction(_callbackPtr);
|
|
11457
|
-
};
|
|
11458
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11459
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessage_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11460
|
-
return _promise;
|
|
11461
|
-
}
|
|
11462
|
-
/**
|
|
11463
|
-
* @description Sets the message information.
|
|
11464
|
-
* @param messageId - ID of the message to be retrieved.
|
|
11465
|
-
* @param messageData - Message Data.
|
|
11466
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11467
|
-
*/
|
|
11468
|
-
async setMessageInformation(messageId, messageData) {
|
|
11469
|
-
var _resolve;
|
|
11470
|
-
var _promise = new Promise((_r) => {
|
|
11471
|
-
_resolve = _r;
|
|
11472
|
-
});
|
|
11473
|
-
var _callbackPtr;
|
|
11474
|
-
var _callback = (_stateObject__, result) => {
|
|
11475
|
-
var _resultPtr = getNativePointer(result);
|
|
11476
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11477
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11478
|
-
return;
|
|
11479
|
-
}
|
|
11480
|
-
_resolve(_resultInstance);
|
|
11481
|
-
Module.removeFunction(_callbackPtr);
|
|
11482
|
-
};
|
|
11483
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11484
|
-
Module.ccall("csp_multiplayer_ConversationSystem_SetMessageInformation_void_StringRC_MessageInfoRC_MessageResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, messageId, messageData.pointer, _callbackPtr, 0]);
|
|
11485
|
-
return _promise;
|
|
11486
|
-
}
|
|
11487
|
-
/**
|
|
11488
|
-
* @description Retrieves the message information.
|
|
11489
|
-
* @param messageId - Message ID.
|
|
11490
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11491
|
-
*/
|
|
11492
|
-
async getMessageInformation(messageId) {
|
|
11493
|
-
var _resolve;
|
|
11494
|
-
var _promise = new Promise((_r) => {
|
|
11495
|
-
_resolve = _r;
|
|
11496
|
-
});
|
|
11497
|
-
var _callbackPtr;
|
|
11498
|
-
var _callback = (_stateObject__, result) => {
|
|
11499
|
-
var _resultPtr = getNativePointer(result);
|
|
11500
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11501
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11502
|
-
return;
|
|
11503
|
-
}
|
|
11504
|
-
_resolve(_resultInstance);
|
|
11505
|
-
Module.removeFunction(_callbackPtr);
|
|
11506
|
-
};
|
|
11507
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11508
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessageInformation_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11509
|
-
return _promise;
|
|
11510
|
-
}
|
|
11511
|
-
/**
|
|
11512
|
-
* @description Deletes all the messages that are part of the conversation.
|
|
11513
|
-
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11514
|
-
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteConversation, ConversationId of type ReplicatedType :
|
|
11515
|
-
* String}.
|
|
11516
|
-
* /// @param ConversationId csp::common::String : ID of the conversation that will be deleted. After this operation finishes successful this ID will
|
|
11517
|
-
* not be valid anymore.
|
|
11518
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11519
|
-
*/
|
|
11520
|
-
async deleteConversation(conversationId) {
|
|
11521
|
-
var _resolve;
|
|
11522
|
-
var _promise = new Promise((_r) => {
|
|
11523
|
-
_resolve = _r;
|
|
11524
|
-
});
|
|
11525
|
-
var _callbackPtr;
|
|
11526
|
-
var _callback = (_stateObject__, result) => {
|
|
11527
|
-
var _resultPtr = getNativePointer(result);
|
|
11528
|
-
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
11529
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11530
|
-
return;
|
|
11531
|
-
}
|
|
11532
|
-
_resolve(_resultInstance);
|
|
11533
|
-
Module.removeFunction(_callbackPtr);
|
|
11534
|
-
};
|
|
11535
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11536
|
-
Module.ccall("csp_multiplayer_ConversationSystem_DeleteConversation_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
11537
|
-
return _promise;
|
|
11538
|
-
}
|
|
11539
|
-
/**
|
|
11540
|
-
* @description Deletes a particular message.
|
|
11541
|
-
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11542
|
-
* { ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteMessage, MessageId of type ReplicatedType : String }.
|
|
11543
|
-
* /// @param MessageId csp::common::String : ID of the message that will be deleted.
|
|
11544
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11545
|
-
*/
|
|
11546
|
-
async deleteMessage(messageId) {
|
|
11547
|
-
var _resolve;
|
|
11548
|
-
var _promise = new Promise((_r) => {
|
|
11549
|
-
_resolve = _r;
|
|
11550
|
-
});
|
|
11551
|
-
var _callbackPtr;
|
|
11552
|
-
var _callback = (_stateObject__, result) => {
|
|
11553
|
-
var _resultPtr = getNativePointer(result);
|
|
11554
|
-
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
11555
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11556
|
-
return;
|
|
11557
|
-
}
|
|
11558
|
-
_resolve(_resultInstance);
|
|
11559
|
-
Module.removeFunction(_callbackPtr);
|
|
11560
|
-
};
|
|
11561
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11562
|
-
Module.ccall("csp_multiplayer_ConversationSystem_DeleteMessage_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11563
|
-
return _promise;
|
|
11564
|
-
}
|
|
11565
|
-
}
|
|
11566
|
-
Multiplayer.ConversationSystem = ConversationSystem;
|
|
11567
|
-
})(Multiplayer || (Multiplayer = {}));
|
|
11568
|
-
(function (Multiplayer) {
|
|
11569
|
-
/**
|
|
11570
|
-
* @description Manages the script attached to an Entity.
|
|
11571
|
-
* /// Provides functions for setting the script source, subscribing to property changes and messages and other script management.
|
|
11572
|
-
*/
|
|
11573
|
-
class EntityScript extends NativeClassWrapper {
|
|
11574
|
-
/** @internal */
|
|
11575
|
-
constructor(pointer) {
|
|
11576
|
-
super(pointer);
|
|
11577
|
-
}
|
|
11578
|
-
/**
|
|
11579
|
-
* @description Destroy the instance of EntityScript.
|
|
11580
|
-
*/
|
|
11581
|
-
delete() {
|
|
11582
|
-
if (this.ownsPointer && !this.disposed) {
|
|
11583
|
-
Module.ccall("csp_multiplayer_EntityScript_Dtor", "void", ["number"], [this.pointer]);
|
|
11584
|
-
this.disposed = true;
|
|
11585
|
-
}
|
|
11586
|
-
}
|
|
11587
|
-
/**
|
|
11588
|
-
* @description Sets the source code for the script.
|
|
11589
|
-
* @param scriptSource - The source as a string.
|
|
11590
|
-
*/
|
|
11591
|
-
setScriptSource(scriptSource) {
|
|
11592
|
-
Module.ccall("csp_multiplayer_EntityScript_SetScriptSource_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11593
|
-
}
|
|
11594
|
-
/**
|
|
11595
|
-
* @description Runs the script.
|
|
11596
|
-
* @return True if the script runs successfully or false if there are errors.
|
|
11597
|
-
*/
|
|
11598
|
-
invoke() {
|
|
11599
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_Invoke_bool", "boolean", ["number"], [this.pointer]);
|
|
11600
|
-
return _result;
|
|
11601
|
-
}
|
|
11602
|
-
/**
|
|
11603
|
-
* @description Run a script with the given source rather than the stored source.
|
|
11604
|
-
* /// Will be run locally or remotely depending on leader election.
|
|
11605
|
-
* /// @param ScriptSource csp::common::String : The source to use.
|
|
11606
|
-
*/
|
|
11607
|
-
runScript(scriptSource) {
|
|
11608
|
-
Module.ccall("csp_multiplayer_EntityScript_RunScript_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11609
|
-
}
|
|
11610
|
-
/**
|
|
11611
|
-
* @description Checks if there was an error with the last script invocation.
|
|
11612
|
-
* @return True if there was an error, false otherwise.
|
|
11613
|
-
*/
|
|
11614
|
-
hasError() {
|
|
11615
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
|
|
11616
|
-
return _result;
|
|
11617
|
-
}
|
|
11618
|
-
/**
|
|
11619
|
-
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
11620
|
-
* @return Text of the last error.
|
|
11402
|
+
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
11403
|
+
* @return Text of the last error.
|
|
11621
11404
|
*/
|
|
11622
11405
|
getErrorText() {
|
|
11623
11406
|
let _result = Module.ccall("csp_multiplayer_EntityScript_GetErrorText_String", "number", ["number"], [this.pointer]);
|
|
@@ -11716,13 +11499,41 @@ export class CSPFoundation {
|
|
|
11716
11499
|
})(Multiplayer || (Multiplayer = {}));
|
|
11717
11500
|
(function (Systems) {
|
|
11718
11501
|
/**
|
|
11719
|
-
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient instance in the constructor of each
|
|
11502
|
+
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or EventBus instance in the constructor of each
|
|
11503
|
+
* System.
|
|
11720
11504
|
*/
|
|
11721
11505
|
class SystemBase extends NativeClassWrapper {
|
|
11722
11506
|
/** @internal */
|
|
11723
11507
|
constructor(pointer) {
|
|
11724
11508
|
super(pointer);
|
|
11725
11509
|
}
|
|
11510
|
+
/**
|
|
11511
|
+
* @description Destructor of the SystemBase base class.
|
|
11512
|
+
*/
|
|
11513
|
+
/**
|
|
11514
|
+
* @description Registers the system to listen for the default event.
|
|
11515
|
+
*/
|
|
11516
|
+
registerSystemCallback() {
|
|
11517
|
+
Module.ccall("csp_systems_SystemBase_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11518
|
+
}
|
|
11519
|
+
/**
|
|
11520
|
+
* @description Deregisters the system from listening for the default event.
|
|
11521
|
+
*/
|
|
11522
|
+
deregisterSystemCallback() {
|
|
11523
|
+
Module.ccall("csp_systems_SystemBase_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11524
|
+
}
|
|
11525
|
+
/**
|
|
11526
|
+
* @description Sets a callback for a default event.
|
|
11527
|
+
* @param callback - Callback to receive data for the system that has been changed.
|
|
11528
|
+
*/
|
|
11529
|
+
setSystemCallback(callback) {
|
|
11530
|
+
var _callback = (_stateObject__, arg1, arg2) => {
|
|
11531
|
+
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
11532
|
+
callback(arg1, _arg2);
|
|
11533
|
+
};
|
|
11534
|
+
var _callbackPtr = Module.addFunction(_callback, "viii");
|
|
11535
|
+
Module.ccall("csp_systems_SystemBase_SetSystemCallback_void_ParameterisedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
11536
|
+
}
|
|
11726
11537
|
}
|
|
11727
11538
|
Systems.SystemBase = SystemBase;
|
|
11728
11539
|
})(Systems || (Systems = {}));
|
|
@@ -11955,6 +11766,13 @@ export class CSPFoundation {
|
|
|
11955
11766
|
Module._free(_ret);
|
|
11956
11767
|
return _nPtr;
|
|
11957
11768
|
}
|
|
11769
|
+
getEventBus() {
|
|
11770
|
+
var _ret = Module._malloc(8);
|
|
11771
|
+
Module.ccall("csp_systems_SystemsManager_GetEventBus_EventBusP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
11772
|
+
var _nPtr = new Multiplayer.EventBus(getNativePointer(_ret));
|
|
11773
|
+
Module._free(_ret);
|
|
11774
|
+
return _nPtr;
|
|
11775
|
+
}
|
|
11958
11776
|
}
|
|
11959
11777
|
Systems.SystemsManager = SystemsManager;
|
|
11960
11778
|
})(Systems || (Systems = {}));
|
|
@@ -12652,30 +12470,297 @@ export class CSPFoundation {
|
|
|
12652
12470
|
})(Systems || (Systems = {}));
|
|
12653
12471
|
(function (Systems) {
|
|
12654
12472
|
/**
|
|
12655
|
-
@ingroup
|
|
12656
|
-
* @description
|
|
12473
|
+
@ingroup Asset System
|
|
12474
|
+
* @description Base class for a material.
|
|
12657
12475
|
*/
|
|
12658
|
-
class
|
|
12476
|
+
class Material extends NativeClassWrapper {
|
|
12659
12477
|
/** @internal */
|
|
12660
12478
|
constructor(pointer) {
|
|
12661
12479
|
super(pointer);
|
|
12662
12480
|
}
|
|
12481
|
+
/**
|
|
12482
|
+
* @description Gets the user-defined name of the material
|
|
12483
|
+
* @return Csp::common::string&
|
|
12484
|
+
*/
|
|
12485
|
+
getName() {
|
|
12486
|
+
let _result = Module.ccall("csp_systems_Material_GetNameC_StringRC", "number", ["number"], [this.pointer]);
|
|
12487
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12488
|
+
free(_result);
|
|
12489
|
+
_result = _resultString;
|
|
12490
|
+
return _result;
|
|
12491
|
+
}
|
|
12492
|
+
/**
|
|
12493
|
+
* @description Gets the collection id for the material
|
|
12494
|
+
* @return Const csp::common::string&
|
|
12495
|
+
*/
|
|
12496
|
+
getMaterialCollectionId() {
|
|
12497
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12498
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12499
|
+
free(_result);
|
|
12500
|
+
_result = _resultString;
|
|
12501
|
+
return _result;
|
|
12502
|
+
}
|
|
12503
|
+
/**
|
|
12504
|
+
* @description Gets the id for the material
|
|
12505
|
+
* @return Const csp::common::string&
|
|
12506
|
+
*/
|
|
12507
|
+
getMaterialId() {
|
|
12508
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12509
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12510
|
+
free(_result);
|
|
12511
|
+
_result = _resultString;
|
|
12512
|
+
return _result;
|
|
12513
|
+
}
|
|
12514
|
+
/**
|
|
12515
|
+
* @description Constructor which links the material to an asset
|
|
12516
|
+
* @param name - The name of the material.
|
|
12517
|
+
* @param materialCollectionId - The asset collection where the material info is stored
|
|
12518
|
+
* @param materialId - The asset where the material info is stored
|
|
12519
|
+
*/
|
|
12520
|
+
static create_name_materialCollectionId_materialId(name, materialCollectionId, materialId) {
|
|
12521
|
+
var _ptr = Module._malloc(8);
|
|
12522
|
+
Module.ccall("csp_systems_Material_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, materialCollectionId, materialId]);
|
|
12523
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12524
|
+
return new Material(_nPtr);
|
|
12525
|
+
}
|
|
12663
12526
|
static create() {
|
|
12664
12527
|
var _ptr = Module._malloc(8);
|
|
12665
|
-
Module.ccall("
|
|
12528
|
+
Module.ccall("csp_systems_Material_Ctor", "void", ["number"], [_ptr]);
|
|
12666
12529
|
var _nPtr = getNativePointer(_ptr);
|
|
12667
|
-
return new
|
|
12530
|
+
return new Material(_nPtr);
|
|
12668
12531
|
}
|
|
12669
12532
|
delete() {
|
|
12670
12533
|
if (this.ownsPointer && !this.disposed) {
|
|
12671
|
-
Module.ccall("
|
|
12534
|
+
Module.ccall("csp_systems_Material_Dtor", "void", ["number"], [this.pointer]);
|
|
12672
12535
|
this.disposed = true;
|
|
12673
12536
|
}
|
|
12674
12537
|
}
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12538
|
+
}
|
|
12539
|
+
Systems.Material = Material;
|
|
12540
|
+
})(Systems || (Systems = {}));
|
|
12541
|
+
(function (Systems) {
|
|
12542
|
+
/**
|
|
12543
|
+
@ingroup Asset System
|
|
12544
|
+
* @description Data class which represents a texture.
|
|
12545
|
+
*/
|
|
12546
|
+
class TextureInfo extends NativeClassWrapper {
|
|
12547
|
+
/** @internal */
|
|
12548
|
+
constructor(pointer) {
|
|
12549
|
+
super(pointer);
|
|
12550
|
+
}
|
|
12551
|
+
/**
|
|
12552
|
+
* @description Default constructor with SourceType set to ETextureResourceType::ImageAsset by default
|
|
12553
|
+
*/
|
|
12554
|
+
static create() {
|
|
12555
|
+
var _ptr = Module._malloc(8);
|
|
12556
|
+
Module.ccall("csp_systems_TextureInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12557
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12558
|
+
return new TextureInfo(_nPtr);
|
|
12559
|
+
}
|
|
12560
|
+
/**
|
|
12561
|
+
* @description Constructor which associates a texture with an asset, using ETextureResourceType::ImageAsset as it's source type
|
|
12562
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12563
|
+
* @param assetId - The asset where the texture info is stored
|
|
12564
|
+
*/
|
|
12565
|
+
static create_assetCollectionId_assetId(assetCollectionId, assetId) {
|
|
12566
|
+
var _ptr = Module._malloc(8);
|
|
12567
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC_StringRC", "void", ["number", "string", "string"], [_ptr, assetCollectionId, assetId]);
|
|
12568
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12569
|
+
return new TextureInfo(_nPtr);
|
|
12570
|
+
}
|
|
12571
|
+
/**
|
|
12572
|
+
* @description Constructor which associates a texture with a media component, using ETextureResourceType::Component as it's source type
|
|
12573
|
+
* @param componentId - The component id used as the texture data source
|
|
12574
|
+
*/
|
|
12575
|
+
static create_componentId(componentId) {
|
|
12576
|
+
var _ptr = Module._malloc(8);
|
|
12577
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC", "void", ["number", "string"], [_ptr, componentId]);
|
|
12578
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12579
|
+
return new TextureInfo(_nPtr);
|
|
12580
|
+
}
|
|
12581
|
+
/**
|
|
12582
|
+
* @description Sets the textures asset collection id and asset id
|
|
12583
|
+
* Uses ETextureResourceType::ImageAsset as it's source type
|
|
12584
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12585
|
+
* @param assetId - The asset where the texture info is stored
|
|
12586
|
+
*/
|
|
12587
|
+
setCollectionAndAssetId(assetCollectionId, assetId) {
|
|
12588
|
+
Module.ccall("csp_systems_TextureInfo_SetCollectionAndAssetId_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, assetCollectionId, assetId]);
|
|
12589
|
+
}
|
|
12590
|
+
/**
|
|
12591
|
+
* @description Gets the asset collection id for the texture
|
|
12592
|
+
* @return Csp::common::string&
|
|
12593
|
+
*/
|
|
12594
|
+
getAssetCollectionId() {
|
|
12595
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12596
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12597
|
+
free(_result);
|
|
12598
|
+
_result = _resultString;
|
|
12599
|
+
return _result;
|
|
12600
|
+
}
|
|
12601
|
+
/**
|
|
12602
|
+
* @description Gets the asset id for the texture
|
|
12603
|
+
* @return Csp::common::string&
|
|
12604
|
+
*/
|
|
12605
|
+
getAssetId() {
|
|
12606
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12607
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12608
|
+
free(_result);
|
|
12609
|
+
_result = _resultString;
|
|
12610
|
+
return _result;
|
|
12611
|
+
}
|
|
12612
|
+
/**
|
|
12613
|
+
* @description Sets the textures entity component id
|
|
12614
|
+
* Format: {entity.id}-{component.id}
|
|
12615
|
+
* This can be obtained from ComponentBase::GetUniqueComponentId
|
|
12616
|
+
* @param componentId - Const csp::common::string&
|
|
12617
|
+
*/
|
|
12618
|
+
setEntityComponentId(componentId) {
|
|
12619
|
+
Module.ccall("csp_systems_TextureInfo_SetEntityComponentId_void_StringRC", "void", ["number", "string"], [this.pointer, componentId]);
|
|
12620
|
+
}
|
|
12621
|
+
/**
|
|
12622
|
+
* @description Gets the entity component id
|
|
12623
|
+
* @return Csp::common::string&
|
|
12624
|
+
*/
|
|
12625
|
+
getEntityComponentId() {
|
|
12626
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetEntityComponentIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12627
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12628
|
+
free(_result);
|
|
12629
|
+
_result = _resultString;
|
|
12630
|
+
return _result;
|
|
12631
|
+
}
|
|
12632
|
+
/**
|
|
12633
|
+
* @description Gets the source type of this texture
|
|
12634
|
+
* This is set internally by constructors and SetCollectionAndAssetId/SetEntityComponentId
|
|
12635
|
+
* @return ETextureResourceType
|
|
12636
|
+
*/
|
|
12637
|
+
getSourceType() {
|
|
12638
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetSourceTypeC_ETextureResourceType", "number", ["number"], [this.pointer]);
|
|
12639
|
+
return _result;
|
|
12640
|
+
}
|
|
12641
|
+
/**
|
|
12642
|
+
* @description Sets the uv offset of the texture
|
|
12643
|
+
* @param offset - Csp::common::vector2
|
|
12644
|
+
*/
|
|
12645
|
+
setUVOffset(offset) {
|
|
12646
|
+
Module.ccall("csp_systems_TextureInfo_SetUVOffset_void_Vector2", "void", ["number", "number"], [this.pointer, offset.pointer]);
|
|
12647
|
+
}
|
|
12648
|
+
/**
|
|
12649
|
+
* @description Gets the uv offset of the texture
|
|
12650
|
+
* @return Csp::common::vector2
|
|
12651
|
+
*/
|
|
12652
|
+
getUVOffset() {
|
|
12653
|
+
var _ret = Module._malloc(8);
|
|
12654
|
+
Module.ccall("csp_systems_TextureInfo_GetUVOffsetC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12655
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12656
|
+
Module._free(_ret);
|
|
12657
|
+
return _nPtr;
|
|
12658
|
+
}
|
|
12659
|
+
/**
|
|
12660
|
+
* @description Gets the uv rotation of the texture
|
|
12661
|
+
* @param rotation - Float
|
|
12662
|
+
*/
|
|
12663
|
+
setUVRotation(rotation) {
|
|
12664
|
+
assert(rotation >= Limits.FLOAT_MIN);
|
|
12665
|
+
assert(rotation <= Limits.FLOAT_MAX);
|
|
12666
|
+
Module.ccall("csp_systems_TextureInfo_SetUVRotation_void_float", "void", ["number", "number"], [this.pointer, rotation]);
|
|
12667
|
+
}
|
|
12668
|
+
/**
|
|
12669
|
+
* @description Gets the uv rotation of the texture
|
|
12670
|
+
* @return Float
|
|
12671
|
+
*/
|
|
12672
|
+
getUVRotation() {
|
|
12673
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetUVRotationC_float", "number", ["number"], [this.pointer]);
|
|
12674
|
+
return _result;
|
|
12675
|
+
}
|
|
12676
|
+
/**
|
|
12677
|
+
* @description Sets the uv scale of the texture
|
|
12678
|
+
* @param scale - Csp::common::vector2
|
|
12679
|
+
*/
|
|
12680
|
+
setUVScale(scale) {
|
|
12681
|
+
Module.ccall("csp_systems_TextureInfo_SetUVScale_void_Vector2", "void", ["number", "number"], [this.pointer, scale.pointer]);
|
|
12682
|
+
}
|
|
12683
|
+
/**
|
|
12684
|
+
* @description Gets the uv scale of the texture
|
|
12685
|
+
* @return Csp::common::vector2
|
|
12686
|
+
*/
|
|
12687
|
+
getUVScale() {
|
|
12688
|
+
var _ret = Module._malloc(8);
|
|
12689
|
+
Module.ccall("csp_systems_TextureInfo_GetUVScaleC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12690
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12691
|
+
Module._free(_ret);
|
|
12692
|
+
return _nPtr;
|
|
12693
|
+
}
|
|
12694
|
+
/**
|
|
12695
|
+
* @description Sets The set index of texture's TEXCOORD attribute
|
|
12696
|
+
* used for texture coordinate mapping.
|
|
12697
|
+
* @param coord - Int
|
|
12698
|
+
*/
|
|
12699
|
+
setTexCoord(coord) {
|
|
12700
|
+
assert(Number.isInteger(coord));
|
|
12701
|
+
assert(coord >= Limits.INT32_MIN);
|
|
12702
|
+
assert(coord <= Limits.INT32_MAX);
|
|
12703
|
+
Module.ccall("csp_systems_TextureInfo_SetTexCoord_void_int", "void", ["number", "number"], [this.pointer, coord]);
|
|
12704
|
+
}
|
|
12705
|
+
/**
|
|
12706
|
+
* @description Gets the index of texture's TEXCOORD attribute
|
|
12707
|
+
* @return Int
|
|
12708
|
+
*/
|
|
12709
|
+
getTexCoord() {
|
|
12710
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetTexCoordC_int", "number", ["number"], [this.pointer]);
|
|
12711
|
+
return _result;
|
|
12712
|
+
}
|
|
12713
|
+
/**
|
|
12714
|
+
* @description True if this texture has been set for the current material
|
|
12715
|
+
* @return Bool
|
|
12716
|
+
*/
|
|
12717
|
+
isSet() {
|
|
12718
|
+
let _result = Module.ccall("csp_systems_TextureInfo_IsSetC_bool", "boolean", ["number"], [this.pointer]);
|
|
12719
|
+
return _result;
|
|
12720
|
+
}
|
|
12721
|
+
/**
|
|
12722
|
+
* @description Sets if this texture is active for the current material
|
|
12723
|
+
* This is true by default when a new texture is created
|
|
12724
|
+
* @param value - Bool
|
|
12725
|
+
*/
|
|
12726
|
+
setTexture(value) {
|
|
12727
|
+
Module.ccall("csp_systems_TextureInfo_SetTexture_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
|
|
12728
|
+
}
|
|
12729
|
+
delete() {
|
|
12730
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12731
|
+
Module.ccall("csp_systems_TextureInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12732
|
+
this.disposed = true;
|
|
12733
|
+
}
|
|
12734
|
+
}
|
|
12735
|
+
}
|
|
12736
|
+
Systems.TextureInfo = TextureInfo;
|
|
12737
|
+
})(Systems || (Systems = {}));
|
|
12738
|
+
(function (Systems) {
|
|
12739
|
+
/**
|
|
12740
|
+
@ingroup ECommerce System
|
|
12741
|
+
* @description Represents currency information for a product
|
|
12742
|
+
*/
|
|
12743
|
+
class CurrencyInfo extends NativeClassWrapper {
|
|
12744
|
+
/** @internal */
|
|
12745
|
+
constructor(pointer) {
|
|
12746
|
+
super(pointer);
|
|
12747
|
+
}
|
|
12748
|
+
static create() {
|
|
12749
|
+
var _ptr = Module._malloc(8);
|
|
12750
|
+
Module.ccall("csp_systems_CurrencyInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12751
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12752
|
+
return new CurrencyInfo(_nPtr);
|
|
12753
|
+
}
|
|
12754
|
+
delete() {
|
|
12755
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12756
|
+
Module.ccall("csp_systems_CurrencyInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12757
|
+
this.disposed = true;
|
|
12758
|
+
}
|
|
12759
|
+
}
|
|
12760
|
+
get amount() {
|
|
12761
|
+
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_Amount", "number", ["number"], [this.pointer]);
|
|
12762
|
+
return _result;
|
|
12763
|
+
}
|
|
12679
12764
|
set amount(value) {
|
|
12680
12765
|
Module.ccall("csp_systems_CurrencyInfo__Set_Amount", "void", ["number", "number"], [this.pointer, value]);
|
|
12681
12766
|
}
|
|
@@ -15422,6 +15507,35 @@ export class CSPFoundation {
|
|
|
15422
15507
|
assert(value <= Limits.INT64_MAX);
|
|
15423
15508
|
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_SetAnimationIndex_void_int64_t", "void", ["number", "bigint"], [this.pointer, value]);
|
|
15424
15509
|
}
|
|
15510
|
+
/**
|
|
15511
|
+
* @description Gets the material overrides of this component.
|
|
15512
|
+
* Should be in the format:
|
|
15513
|
+
* Key = Path to the model
|
|
15514
|
+
* Value = The material id
|
|
15515
|
+
* @return The material overrides on this component.
|
|
15516
|
+
*/
|
|
15517
|
+
getMaterialOverrides() {
|
|
15518
|
+
var _ret = Module._malloc(8);
|
|
15519
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
15520
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
15521
|
+
Module._free(_ret);
|
|
15522
|
+
return _nPtr;
|
|
15523
|
+
}
|
|
15524
|
+
/**
|
|
15525
|
+
* @description Adds a new material override to this component.
|
|
15526
|
+
* @param the - Path to the models material to override.
|
|
15527
|
+
* @param the - Id of the material to override with.
|
|
15528
|
+
*/
|
|
15529
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
15530
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
15531
|
+
}
|
|
15532
|
+
/**
|
|
15533
|
+
* @description Removes a material override from this component.
|
|
15534
|
+
* @param the - Path to the models material to override to be removed.
|
|
15535
|
+
*/
|
|
15536
|
+
removeMaterialOverride(modelPath) {
|
|
15537
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
15538
|
+
}
|
|
15425
15539
|
/**
|
|
15426
15540
|
* \addtogroup IVisibleComponent
|
|
15427
15541
|
@{
|
|
@@ -19469,6 +19583,35 @@ export class CSPFoundation {
|
|
|
19469
19583
|
setExternalResourceAssetCollectionId(value) {
|
|
19470
19584
|
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_SetExternalResourceAssetCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
19471
19585
|
}
|
|
19586
|
+
/**
|
|
19587
|
+
* @description Gets the material overrides of this component.
|
|
19588
|
+
* Should be in the format:
|
|
19589
|
+
* Key = Path to the model
|
|
19590
|
+
* Value = The material id
|
|
19591
|
+
* @return The material overrides on this component.
|
|
19592
|
+
*/
|
|
19593
|
+
getMaterialOverrides() {
|
|
19594
|
+
var _ret = Module._malloc(8);
|
|
19595
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
19596
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
19597
|
+
Module._free(_ret);
|
|
19598
|
+
return _nPtr;
|
|
19599
|
+
}
|
|
19600
|
+
/**
|
|
19601
|
+
* @description Adds a new material override to this component.
|
|
19602
|
+
* @param the - Path to the models material to override.
|
|
19603
|
+
* @param the - Id of the material to override with.
|
|
19604
|
+
*/
|
|
19605
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
19606
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
19607
|
+
}
|
|
19608
|
+
/**
|
|
19609
|
+
* @description Removes a material override from this component.
|
|
19610
|
+
* @param the - Path to the models material to override to be removed.
|
|
19611
|
+
*/
|
|
19612
|
+
removeMaterialOverride(modelPath) {
|
|
19613
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
19614
|
+
}
|
|
19472
19615
|
/**
|
|
19473
19616
|
* \addtogroup ITransformComponent
|
|
19474
19617
|
@{
|
|
@@ -20461,82 +20604,427 @@ export class CSPFoundation {
|
|
|
20461
20604
|
}
|
|
20462
20605
|
Multiplayer.ConversationResult = ConversationResult;
|
|
20463
20606
|
})(Multiplayer || (Multiplayer = {}));
|
|
20464
|
-
(function (
|
|
20465
|
-
/**
|
|
20466
|
-
* @description A result handler that is used to notify a user of an error.
|
|
20467
|
-
*/
|
|
20468
|
-
class NullResult extends Systems.ResultBase {
|
|
20469
|
-
/** @internal */
|
|
20470
|
-
constructor(pointer) {
|
|
20471
|
-
super(pointer);
|
|
20472
|
-
}
|
|
20473
|
-
static fromResultBase(baseInstance) {
|
|
20474
|
-
const nativeClassWrapper = baseInstance;
|
|
20475
|
-
return new Systems.NullResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20476
|
-
}
|
|
20477
|
-
delete() {
|
|
20478
|
-
if (this.ownsPointer && !this.disposed) {
|
|
20479
|
-
Module.ccall("csp_systems_NullResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20480
|
-
this.disposed = true;
|
|
20481
|
-
}
|
|
20482
|
-
}
|
|
20483
|
-
}
|
|
20484
|
-
Systems.NullResult = NullResult;
|
|
20485
|
-
})(Systems || (Systems = {}));
|
|
20486
|
-
(function (Systems) {
|
|
20607
|
+
(function (Multiplayer) {
|
|
20487
20608
|
/**
|
|
20488
|
-
|
|
20489
|
-
|
|
20490
|
-
|
|
20609
|
+
@ingroup Conversation System
|
|
20610
|
+
* @description Public facing system that can handle conversations taking place between users of a space in the form of thread messages.
|
|
20611
|
+
*/
|
|
20612
|
+
class ConversationSystem extends Systems.SystemBase {
|
|
20491
20613
|
/** @internal */
|
|
20492
20614
|
constructor(pointer) {
|
|
20493
20615
|
super(pointer);
|
|
20494
20616
|
}
|
|
20495
|
-
static
|
|
20617
|
+
static fromSystemBase(baseInstance) {
|
|
20496
20618
|
const nativeClassWrapper = baseInstance;
|
|
20497
|
-
return new
|
|
20619
|
+
return new Multiplayer.ConversationSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20498
20620
|
}
|
|
20499
20621
|
/**
|
|
20500
|
-
* @description
|
|
20622
|
+
* @description Constructs a conversation system instance that uses the given multiplayer connection.
|
|
20623
|
+
* @param inMultiPlayerConnection - The connection to be used.
|
|
20501
20624
|
*/
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20506
|
-
|
|
20507
|
-
if (this.ownsPointer && !this.disposed) {
|
|
20508
|
-
Module.ccall("csp_systems_BooleanResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20509
|
-
this.disposed = true;
|
|
20510
|
-
}
|
|
20511
|
-
}
|
|
20512
|
-
}
|
|
20513
|
-
Systems.BooleanResult = BooleanResult;
|
|
20514
|
-
})(Systems || (Systems = {}));
|
|
20515
|
-
(function (Systems) {
|
|
20516
|
-
/**
|
|
20517
|
-
* @description A result handler that is used to notify a user of an error while passing a String value.
|
|
20518
|
-
*/
|
|
20519
|
-
class StringResult extends Systems.ResultBase {
|
|
20520
|
-
/** @internal */
|
|
20521
|
-
constructor(pointer) {
|
|
20522
|
-
super(pointer);
|
|
20523
|
-
}
|
|
20524
|
-
static fromResultBase(baseInstance) {
|
|
20525
|
-
const nativeClassWrapper = baseInstance;
|
|
20526
|
-
return new Systems.StringResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20625
|
+
static create_multiPlayerConnection(multiPlayerConnection) {
|
|
20626
|
+
var _ptr = Module._malloc(8);
|
|
20627
|
+
Module.ccall("csp_multiplayer_ConversationSystem_Ctor_MultiplayerConnectionP", "void", ["number", "number"], [_ptr, multiPlayerConnection.pointer]);
|
|
20628
|
+
var _nPtr = getNativePointer(_ptr);
|
|
20629
|
+
return new ConversationSystem(_nPtr);
|
|
20527
20630
|
}
|
|
20528
20631
|
/**
|
|
20529
|
-
* @description
|
|
20632
|
+
* @description Creates a new conversation with the initial message and provides the conversation ID to the given callback.
|
|
20633
|
+
* @param message - The message to be stored.
|
|
20634
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20530
20635
|
*/
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20636
|
+
async createConversation(message) {
|
|
20637
|
+
var _resolve;
|
|
20638
|
+
var _promise = new Promise((_r) => {
|
|
20639
|
+
_resolve = _r;
|
|
20640
|
+
});
|
|
20641
|
+
var _callbackPtr;
|
|
20642
|
+
var _callback = (_stateObject__, result) => {
|
|
20643
|
+
var _resultPtr = getNativePointer(result);
|
|
20644
|
+
var _resultInstance = new Systems.StringResult(_resultPtr);
|
|
20645
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20646
|
+
return;
|
|
20647
|
+
}
|
|
20648
|
+
_resolve(_resultInstance);
|
|
20649
|
+
Module.removeFunction(_callbackPtr);
|
|
20650
|
+
};
|
|
20651
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20652
|
+
Module.ccall("csp_multiplayer_ConversationSystem_CreateConversation_void_StringRC_StringResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, message, _callbackPtr, 0]);
|
|
20653
|
+
return _promise;
|
|
20537
20654
|
}
|
|
20538
|
-
|
|
20539
|
-
|
|
20655
|
+
/**
|
|
20656
|
+
* @description Adds a message to a brand new conversation or to an already existing one
|
|
20657
|
+
* /// Make sure that the user has entered a space through SpaceSystem::EnterSpace() before calling this.
|
|
20658
|
+
* Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20659
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::NewMessage, ConversationId of type ReplicatedType : String}.
|
|
20660
|
+
* /// @param ConversationId csp::common::String : A new message will be linked to the provided conversation id.
|
|
20661
|
+
* @param senderDisplayName - The display name of the message sender.
|
|
20662
|
+
* @param message - The message to be stored.
|
|
20663
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20664
|
+
*/
|
|
20665
|
+
async addMessageToConversation(conversationId, senderDisplayName, message) {
|
|
20666
|
+
var _resolve;
|
|
20667
|
+
var _promise = new Promise((_r) => {
|
|
20668
|
+
_resolve = _r;
|
|
20669
|
+
});
|
|
20670
|
+
var _callbackPtr;
|
|
20671
|
+
var _callback = (_stateObject__, result) => {
|
|
20672
|
+
var _resultPtr = getNativePointer(result);
|
|
20673
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20674
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20675
|
+
return;
|
|
20676
|
+
}
|
|
20677
|
+
_resolve(_resultInstance);
|
|
20678
|
+
Module.removeFunction(_callbackPtr);
|
|
20679
|
+
};
|
|
20680
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20681
|
+
Module.ccall("csp_multiplayer_ConversationSystem_AddMessageToConversation_void_StringRC_StringRC_StringRC_MessageResultCallback", "void", ["number", "string", "string", "string", "number", "number"], [
|
|
20682
|
+
this.pointer,
|
|
20683
|
+
conversationId,
|
|
20684
|
+
senderDisplayName,
|
|
20685
|
+
message,
|
|
20686
|
+
_callbackPtr,
|
|
20687
|
+
0,
|
|
20688
|
+
]);
|
|
20689
|
+
return _promise;
|
|
20690
|
+
}
|
|
20691
|
+
/**
|
|
20692
|
+
* @description Retrieves messages that are linked to the provided Conversation ID.
|
|
20693
|
+
* @param conversationId - Conversation ID.
|
|
20694
|
+
* @param resultsSkipNumber - Optional parameter representing the number of result entries that will be skipped from the result.
|
|
20695
|
+
* For no skip pass nullptr.
|
|
20696
|
+
* @param resultsMaxNumber - Optional parameter representing the maximum number of result entries to be retrieved. For all
|
|
20697
|
+
* available result entries pass nullptr.
|
|
20698
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20699
|
+
*/
|
|
20700
|
+
async getMessagesFromConversation(conversationId, resultsSkipNumber, resultsMaxNumber) {
|
|
20701
|
+
var _resolve;
|
|
20702
|
+
var _promise = new Promise((_r) => {
|
|
20703
|
+
_resolve = _r;
|
|
20704
|
+
});
|
|
20705
|
+
var _callbackPtr;
|
|
20706
|
+
var _callback = (_stateObject__, result) => {
|
|
20707
|
+
var _resultPtr = getNativePointer(result);
|
|
20708
|
+
var _resultInstance = new Multiplayer.MessageCollectionResult(_resultPtr);
|
|
20709
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20710
|
+
return;
|
|
20711
|
+
}
|
|
20712
|
+
_resolve(_resultInstance);
|
|
20713
|
+
Module.removeFunction(_callbackPtr);
|
|
20714
|
+
};
|
|
20715
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20716
|
+
var resultsSkipNumberPointer = 0;
|
|
20717
|
+
if (resultsSkipNumber != null) {
|
|
20718
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
20719
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
20720
|
+
}
|
|
20721
|
+
var resultsMaxNumberPointer = 0;
|
|
20722
|
+
if (resultsMaxNumber != null) {
|
|
20723
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
20724
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
20725
|
+
}
|
|
20726
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessagesFromConversation_void_StringRC_intRC_intRC_MessageCollectionResultCallback", "void", ["number", "string", "number", "number", "number", "number"], [
|
|
20727
|
+
this.pointer,
|
|
20728
|
+
conversationId,
|
|
20729
|
+
resultsSkipNumberPointer,
|
|
20730
|
+
resultsMaxNumberPointer,
|
|
20731
|
+
_callbackPtr,
|
|
20732
|
+
0,
|
|
20733
|
+
]);
|
|
20734
|
+
if (resultsSkipNumberPointer) {
|
|
20735
|
+
Module._free(resultsSkipNumberPointer);
|
|
20736
|
+
}
|
|
20737
|
+
if (resultsMaxNumberPointer) {
|
|
20738
|
+
Module._free(resultsMaxNumberPointer);
|
|
20739
|
+
}
|
|
20740
|
+
return _promise;
|
|
20741
|
+
}
|
|
20742
|
+
/**
|
|
20743
|
+
* @description Retrieves the conversation information.
|
|
20744
|
+
* @param conversationId - Conversation ID.
|
|
20745
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20746
|
+
*/
|
|
20747
|
+
async getConversationInformation(conversationId) {
|
|
20748
|
+
var _resolve;
|
|
20749
|
+
var _promise = new Promise((_r) => {
|
|
20750
|
+
_resolve = _r;
|
|
20751
|
+
});
|
|
20752
|
+
var _callbackPtr;
|
|
20753
|
+
var _callback = (_stateObject__, result) => {
|
|
20754
|
+
var _resultPtr = getNativePointer(result);
|
|
20755
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20756
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20757
|
+
return;
|
|
20758
|
+
}
|
|
20759
|
+
_resolve(_resultInstance);
|
|
20760
|
+
Module.removeFunction(_callbackPtr);
|
|
20761
|
+
};
|
|
20762
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20763
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetConversationInformation_void_StringRC_ConversationResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20764
|
+
return _promise;
|
|
20765
|
+
}
|
|
20766
|
+
/**
|
|
20767
|
+
* @description Sets the conversation information.
|
|
20768
|
+
* @param conversationId - Conversation ID.
|
|
20769
|
+
* @param conversationData - Conversation Data.
|
|
20770
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20771
|
+
*/
|
|
20772
|
+
async setConversationInformation(conversationId, conversationData) {
|
|
20773
|
+
var _resolve;
|
|
20774
|
+
var _promise = new Promise((_r) => {
|
|
20775
|
+
_resolve = _r;
|
|
20776
|
+
});
|
|
20777
|
+
var _callbackPtr;
|
|
20778
|
+
var _callback = (_stateObject__, result) => {
|
|
20779
|
+
var _resultPtr = getNativePointer(result);
|
|
20780
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20781
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20782
|
+
return;
|
|
20783
|
+
}
|
|
20784
|
+
_resolve(_resultInstance);
|
|
20785
|
+
Module.removeFunction(_callbackPtr);
|
|
20786
|
+
};
|
|
20787
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20788
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationInformation_void_StringRC_ConversationInfoRC_ConversationResultCallback", "void", ["number", "string", "number", "number", "number"], [
|
|
20789
|
+
this.pointer,
|
|
20790
|
+
conversationId,
|
|
20791
|
+
conversationData.pointer,
|
|
20792
|
+
_callbackPtr,
|
|
20793
|
+
0,
|
|
20794
|
+
]);
|
|
20795
|
+
return _promise;
|
|
20796
|
+
}
|
|
20797
|
+
/**
|
|
20798
|
+
* @description Retrieves one particular message.
|
|
20799
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20800
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20801
|
+
*/
|
|
20802
|
+
async getMessage(messageId) {
|
|
20803
|
+
var _resolve;
|
|
20804
|
+
var _promise = new Promise((_r) => {
|
|
20805
|
+
_resolve = _r;
|
|
20806
|
+
});
|
|
20807
|
+
var _callbackPtr;
|
|
20808
|
+
var _callback = (_stateObject__, result) => {
|
|
20809
|
+
var _resultPtr = getNativePointer(result);
|
|
20810
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20811
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20812
|
+
return;
|
|
20813
|
+
}
|
|
20814
|
+
_resolve(_resultInstance);
|
|
20815
|
+
Module.removeFunction(_callbackPtr);
|
|
20816
|
+
};
|
|
20817
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20818
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessage_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20819
|
+
return _promise;
|
|
20820
|
+
}
|
|
20821
|
+
/**
|
|
20822
|
+
* @description Sets the message information.
|
|
20823
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20824
|
+
* @param messageData - Message Data.
|
|
20825
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20826
|
+
*/
|
|
20827
|
+
async setMessageInformation(messageId, messageData) {
|
|
20828
|
+
var _resolve;
|
|
20829
|
+
var _promise = new Promise((_r) => {
|
|
20830
|
+
_resolve = _r;
|
|
20831
|
+
});
|
|
20832
|
+
var _callbackPtr;
|
|
20833
|
+
var _callback = (_stateObject__, result) => {
|
|
20834
|
+
var _resultPtr = getNativePointer(result);
|
|
20835
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20836
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20837
|
+
return;
|
|
20838
|
+
}
|
|
20839
|
+
_resolve(_resultInstance);
|
|
20840
|
+
Module.removeFunction(_callbackPtr);
|
|
20841
|
+
};
|
|
20842
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20843
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetMessageInformation_void_StringRC_MessageInfoRC_MessageResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, messageId, messageData.pointer, _callbackPtr, 0]);
|
|
20844
|
+
return _promise;
|
|
20845
|
+
}
|
|
20846
|
+
/**
|
|
20847
|
+
* @description Retrieves the message information.
|
|
20848
|
+
* @param messageId - Message ID.
|
|
20849
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20850
|
+
*/
|
|
20851
|
+
async getMessageInformation(messageId) {
|
|
20852
|
+
var _resolve;
|
|
20853
|
+
var _promise = new Promise((_r) => {
|
|
20854
|
+
_resolve = _r;
|
|
20855
|
+
});
|
|
20856
|
+
var _callbackPtr;
|
|
20857
|
+
var _callback = (_stateObject__, result) => {
|
|
20858
|
+
var _resultPtr = getNativePointer(result);
|
|
20859
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20860
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20861
|
+
return;
|
|
20862
|
+
}
|
|
20863
|
+
_resolve(_resultInstance);
|
|
20864
|
+
Module.removeFunction(_callbackPtr);
|
|
20865
|
+
};
|
|
20866
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20867
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessageInformation_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20868
|
+
return _promise;
|
|
20869
|
+
}
|
|
20870
|
+
/**
|
|
20871
|
+
* @description Deletes all the messages that are part of the conversation.
|
|
20872
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20873
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteConversation, ConversationId of type ReplicatedType :
|
|
20874
|
+
* String}.
|
|
20875
|
+
* /// @param ConversationId csp::common::String : ID of the conversation that will be deleted. After this operation finishes successful this ID will
|
|
20876
|
+
* not be valid anymore.
|
|
20877
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20878
|
+
*/
|
|
20879
|
+
async deleteConversation(conversationId) {
|
|
20880
|
+
var _resolve;
|
|
20881
|
+
var _promise = new Promise((_r) => {
|
|
20882
|
+
_resolve = _r;
|
|
20883
|
+
});
|
|
20884
|
+
var _callbackPtr;
|
|
20885
|
+
var _callback = (_stateObject__, result) => {
|
|
20886
|
+
var _resultPtr = getNativePointer(result);
|
|
20887
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20888
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20889
|
+
return;
|
|
20890
|
+
}
|
|
20891
|
+
_resolve(_resultInstance);
|
|
20892
|
+
Module.removeFunction(_callbackPtr);
|
|
20893
|
+
};
|
|
20894
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20895
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteConversation_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20896
|
+
return _promise;
|
|
20897
|
+
}
|
|
20898
|
+
/**
|
|
20899
|
+
* @description Deletes a particular message.
|
|
20900
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20901
|
+
* { ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteMessage, MessageId of type ReplicatedType : String }.
|
|
20902
|
+
* /// @param MessageId csp::common::String : ID of the message that will be deleted.
|
|
20903
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20904
|
+
*/
|
|
20905
|
+
async deleteMessage(messageId) {
|
|
20906
|
+
var _resolve;
|
|
20907
|
+
var _promise = new Promise((_r) => {
|
|
20908
|
+
_resolve = _r;
|
|
20909
|
+
});
|
|
20910
|
+
var _callbackPtr;
|
|
20911
|
+
var _callback = (_stateObject__, result) => {
|
|
20912
|
+
var _resultPtr = getNativePointer(result);
|
|
20913
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20914
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20915
|
+
return;
|
|
20916
|
+
}
|
|
20917
|
+
_resolve(_resultInstance);
|
|
20918
|
+
Module.removeFunction(_callbackPtr);
|
|
20919
|
+
};
|
|
20920
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20921
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteMessage_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20922
|
+
return _promise;
|
|
20923
|
+
}
|
|
20924
|
+
/**
|
|
20925
|
+
* @description Sets a callback for a conversation new message event.
|
|
20926
|
+
* @param callback - Callback to receive ConversationSystem Data when a message is sent.
|
|
20927
|
+
* Callback will have to reset the callback passed to the system to avoid "dangling objects" after use.
|
|
20928
|
+
*/
|
|
20929
|
+
setConversationSystemCallback(callback) {
|
|
20930
|
+
var _callback = (_stateObject__, arg1) => {
|
|
20931
|
+
var _arg1 = new Multiplayer.ConversationSystemParams(getNativePointer(arg1));
|
|
20932
|
+
callback(_arg1);
|
|
20933
|
+
};
|
|
20934
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
20935
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationSystemCallback_void_ConversationSystemCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
20936
|
+
}
|
|
20937
|
+
/**
|
|
20938
|
+
* @description Registers the system to listen for the named event.
|
|
20939
|
+
*/
|
|
20940
|
+
registerSystemCallback() {
|
|
20941
|
+
Module.ccall("csp_multiplayer_ConversationSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20942
|
+
}
|
|
20943
|
+
/**
|
|
20944
|
+
* @description Deregisters the system from listening for the named event.
|
|
20945
|
+
*/
|
|
20946
|
+
deregisterSystemCallback() {
|
|
20947
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20948
|
+
}
|
|
20949
|
+
}
|
|
20950
|
+
Multiplayer.ConversationSystem = ConversationSystem;
|
|
20951
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
20952
|
+
(function (Systems) {
|
|
20953
|
+
/**
|
|
20954
|
+
* @description A result handler that is used to notify a user of an error.
|
|
20955
|
+
*/
|
|
20956
|
+
class NullResult extends Systems.ResultBase {
|
|
20957
|
+
/** @internal */
|
|
20958
|
+
constructor(pointer) {
|
|
20959
|
+
super(pointer);
|
|
20960
|
+
}
|
|
20961
|
+
static fromResultBase(baseInstance) {
|
|
20962
|
+
const nativeClassWrapper = baseInstance;
|
|
20963
|
+
return new Systems.NullResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20964
|
+
}
|
|
20965
|
+
delete() {
|
|
20966
|
+
if (this.ownsPointer && !this.disposed) {
|
|
20967
|
+
Module.ccall("csp_systems_NullResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20968
|
+
this.disposed = true;
|
|
20969
|
+
}
|
|
20970
|
+
}
|
|
20971
|
+
}
|
|
20972
|
+
Systems.NullResult = NullResult;
|
|
20973
|
+
})(Systems || (Systems = {}));
|
|
20974
|
+
(function (Systems) {
|
|
20975
|
+
/**
|
|
20976
|
+
* @description A result handler that is used to notify a user of an error while passing a boolean value.
|
|
20977
|
+
*/
|
|
20978
|
+
class BooleanResult extends Systems.ResultBase {
|
|
20979
|
+
/** @internal */
|
|
20980
|
+
constructor(pointer) {
|
|
20981
|
+
super(pointer);
|
|
20982
|
+
}
|
|
20983
|
+
static fromResultBase(baseInstance) {
|
|
20984
|
+
const nativeClassWrapper = baseInstance;
|
|
20985
|
+
return new Systems.BooleanResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20986
|
+
}
|
|
20987
|
+
/**
|
|
20988
|
+
* @description A getter which returns the bool passed via the result.
|
|
20989
|
+
*/
|
|
20990
|
+
getValue() {
|
|
20991
|
+
let _result = Module.ccall("csp_systems_BooleanResult_GetValueC_bool", "boolean", ["number"], [this.pointer]);
|
|
20992
|
+
return _result;
|
|
20993
|
+
}
|
|
20994
|
+
delete() {
|
|
20995
|
+
if (this.ownsPointer && !this.disposed) {
|
|
20996
|
+
Module.ccall("csp_systems_BooleanResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20997
|
+
this.disposed = true;
|
|
20998
|
+
}
|
|
20999
|
+
}
|
|
21000
|
+
}
|
|
21001
|
+
Systems.BooleanResult = BooleanResult;
|
|
21002
|
+
})(Systems || (Systems = {}));
|
|
21003
|
+
(function (Systems) {
|
|
21004
|
+
/**
|
|
21005
|
+
* @description A result handler that is used to notify a user of an error while passing a String value.
|
|
21006
|
+
*/
|
|
21007
|
+
class StringResult extends Systems.ResultBase {
|
|
21008
|
+
/** @internal */
|
|
21009
|
+
constructor(pointer) {
|
|
21010
|
+
super(pointer);
|
|
21011
|
+
}
|
|
21012
|
+
static fromResultBase(baseInstance) {
|
|
21013
|
+
const nativeClassWrapper = baseInstance;
|
|
21014
|
+
return new Systems.StringResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21015
|
+
}
|
|
21016
|
+
/**
|
|
21017
|
+
* @description A getter which returns the String passed via the result.
|
|
21018
|
+
*/
|
|
21019
|
+
getValue() {
|
|
21020
|
+
let _result = Module.ccall("csp_systems_StringResult_GetValueC_StringRC", "number", ["number"], [this.pointer]);
|
|
21021
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
21022
|
+
free(_result);
|
|
21023
|
+
_result = _resultString;
|
|
21024
|
+
return _result;
|
|
21025
|
+
}
|
|
21026
|
+
delete() {
|
|
21027
|
+
if (this.ownsPointer && !this.disposed) {
|
|
20540
21028
|
Module.ccall("csp_systems_StringResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20541
21029
|
this.disposed = true;
|
|
20542
21030
|
}
|
|
@@ -20783,124 +21271,386 @@ export class CSPFoundation {
|
|
|
20783
21271
|
return _nPtr;
|
|
20784
21272
|
}
|
|
20785
21273
|
/**
|
|
20786
|
-
* @description Gets the length of data returned.
|
|
21274
|
+
* @description Gets the length of data returned.
|
|
21275
|
+
*/
|
|
21276
|
+
getDataLength() {
|
|
21277
|
+
let _result = Module.ccall("csp_systems_AssetDataResult_GetDataLengthC_size_t", "number", ["number"], [this.pointer]);
|
|
21278
|
+
const _unfixedValue = _result;
|
|
21279
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
21280
|
+
_result = _fixedValue;
|
|
21281
|
+
return _result;
|
|
21282
|
+
}
|
|
21283
|
+
}
|
|
21284
|
+
Systems.AssetDataResult = AssetDataResult;
|
|
21285
|
+
})(Systems || (Systems = {}));
|
|
21286
|
+
(function (Systems) {
|
|
21287
|
+
/**
|
|
21288
|
+
@ingroup Asset System
|
|
21289
|
+
* @description Data class used to contain information when creating an asset collection.
|
|
21290
|
+
*/
|
|
21291
|
+
class AssetCollectionResult extends Systems.ResultBase {
|
|
21292
|
+
/** @internal */
|
|
21293
|
+
constructor(pointer) {
|
|
21294
|
+
super(pointer);
|
|
21295
|
+
}
|
|
21296
|
+
static fromResultBase(baseInstance) {
|
|
21297
|
+
const nativeClassWrapper = baseInstance;
|
|
21298
|
+
return new Systems.AssetCollectionResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21299
|
+
}
|
|
21300
|
+
/**
|
|
21301
|
+
* @description Retrieves the asset collection result.
|
|
21302
|
+
* @return Const ref of asset collection class
|
|
21303
|
+
*/
|
|
21304
|
+
getAssetCollection() {
|
|
21305
|
+
var _ret = Module._malloc(8);
|
|
21306
|
+
Module.ccall("csp_systems_AssetCollectionResult_GetAssetCollection_AssetCollectionR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21307
|
+
var _nPtr = new Systems.AssetCollection(getNativePointer(_ret));
|
|
21308
|
+
Module._free(_ret);
|
|
21309
|
+
return _nPtr;
|
|
21310
|
+
}
|
|
21311
|
+
delete() {
|
|
21312
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21313
|
+
Module.ccall("csp_systems_AssetCollectionResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21314
|
+
this.disposed = true;
|
|
21315
|
+
}
|
|
21316
|
+
}
|
|
21317
|
+
}
|
|
21318
|
+
Systems.AssetCollectionResult = AssetCollectionResult;
|
|
21319
|
+
})(Systems || (Systems = {}));
|
|
21320
|
+
(function (Systems) {
|
|
21321
|
+
/**
|
|
21322
|
+
@ingroup Asset System
|
|
21323
|
+
* @description Data class used to contain information when attempting to get an array of asset collections.
|
|
21324
|
+
*/
|
|
21325
|
+
class AssetCollectionsResult extends Systems.ResultBase {
|
|
21326
|
+
/** @internal */
|
|
21327
|
+
constructor(pointer) {
|
|
21328
|
+
super(pointer);
|
|
21329
|
+
}
|
|
21330
|
+
static fromResultBase(baseInstance) {
|
|
21331
|
+
const nativeClassWrapper = baseInstance;
|
|
21332
|
+
return new Systems.AssetCollectionsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21333
|
+
}
|
|
21334
|
+
/**
|
|
21335
|
+
* @description Retrieves the asset collection array being stored as a pointer.
|
|
21336
|
+
* @return Pointer to asset collection array
|
|
21337
|
+
*/
|
|
21338
|
+
getAssetCollections() {
|
|
21339
|
+
var _ret = Module._malloc(8);
|
|
21340
|
+
Module.ccall("csp_systems_AssetCollectionsResult_GetAssetCollections_ArrayR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21341
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_AssetCollectionFactory, "csp_systems_AssetCollection");
|
|
21342
|
+
Module._free(_ret);
|
|
21343
|
+
return _nPtr;
|
|
21344
|
+
}
|
|
21345
|
+
/**
|
|
21346
|
+
* @description Retrieves the async operation total number of result asset collections.
|
|
21347
|
+
* If the async operation was using pagination this count number represents the sum of asset collection sizes from every page.
|
|
21348
|
+
* If the async operation is not using pagination this count number will be equal to the AssetCollections array size.
|
|
21349
|
+
* @return Count number as described above
|
|
21350
|
+
*/
|
|
21351
|
+
getTotalCount() {
|
|
21352
|
+
let _result = Module.ccall("csp_systems_AssetCollectionsResult_GetTotalCountC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
21353
|
+
const _unfixedValue = _result;
|
|
21354
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
21355
|
+
_result = _fixedValue;
|
|
21356
|
+
return _result;
|
|
21357
|
+
}
|
|
21358
|
+
delete() {
|
|
21359
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21360
|
+
Module.ccall("csp_systems_AssetCollectionsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21361
|
+
this.disposed = true;
|
|
21362
|
+
}
|
|
21363
|
+
}
|
|
21364
|
+
}
|
|
21365
|
+
Systems.AssetCollectionsResult = AssetCollectionsResult;
|
|
21366
|
+
})(Systems || (Systems = {}));
|
|
21367
|
+
(function (Systems) {
|
|
21368
|
+
/**
|
|
21369
|
+
@ingroup Asset System
|
|
21370
|
+
* @description Public facing system that allows uploading/downloading and creation of assets.
|
|
21371
|
+
*/
|
|
21372
|
+
class AssetSystem extends Systems.SystemBase {
|
|
21373
|
+
/** @internal */
|
|
21374
|
+
constructor(pointer) {
|
|
21375
|
+
super(pointer);
|
|
21376
|
+
}
|
|
21377
|
+
static fromSystemBase(baseInstance) {
|
|
21378
|
+
const nativeClassWrapper = baseInstance;
|
|
21379
|
+
return new Systems.AssetSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21380
|
+
}
|
|
21381
|
+
/**
|
|
21382
|
+
* @description Creates an asset collection.
|
|
21383
|
+
* @param space - Optional space to associate the asset collection with
|
|
21384
|
+
* @param parentAssetCollectionId - Optional parent asset collection id
|
|
21385
|
+
* @param assetCollectionName - Name of the asset collection
|
|
21386
|
+
* @param metadata - Optional metadata info to be associated with the asset collection
|
|
21387
|
+
* @param type - Type of the new asset collection
|
|
21388
|
+
* @param tags - Optional array of strings to add to the asset collection as tags
|
|
21389
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21390
|
+
*/
|
|
21391
|
+
async createAssetCollection(spaceId, parentAssetCollectionId, assetCollectionName, metadata, type, tags) {
|
|
21392
|
+
var _resolve;
|
|
21393
|
+
var _promise = new Promise((_r) => {
|
|
21394
|
+
_resolve = _r;
|
|
21395
|
+
});
|
|
21396
|
+
var _callbackPtr;
|
|
21397
|
+
var _callback = (_stateObject__, result) => {
|
|
21398
|
+
var _resultPtr = getNativePointer(result);
|
|
21399
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21400
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21401
|
+
return;
|
|
21402
|
+
}
|
|
21403
|
+
_resolve(_resultInstance);
|
|
21404
|
+
Module.removeFunction(_callbackPtr);
|
|
21405
|
+
};
|
|
21406
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21407
|
+
Module.ccall("csp_systems_AssetSystem_CreateAssetCollection_void_StringRC_StringRC_StringRC_MapRC_EAssetCollectionTypeC_ArrayRC_AssetCollectionResultCallback", "void", [
|
|
21408
|
+
"number",
|
|
21409
|
+
"string",
|
|
21410
|
+
"string",
|
|
21411
|
+
"string",
|
|
21412
|
+
"number",
|
|
21413
|
+
"number",
|
|
21414
|
+
"number",
|
|
21415
|
+
"number",
|
|
21416
|
+
"number",
|
|
21417
|
+
], [
|
|
21418
|
+
this.pointer,
|
|
21419
|
+
spaceId,
|
|
21420
|
+
parentAssetCollectionId,
|
|
21421
|
+
assetCollectionName,
|
|
21422
|
+
metadata != null ? metadata.pointer : 0,
|
|
21423
|
+
type,
|
|
21424
|
+
tags != null ? tags.pointer : 0,
|
|
21425
|
+
_callbackPtr,
|
|
21426
|
+
0,
|
|
21427
|
+
]);
|
|
21428
|
+
return _promise;
|
|
21429
|
+
}
|
|
21430
|
+
/**
|
|
21431
|
+
* @description Deletes a given asset collection.
|
|
21432
|
+
* @param assetCollection - Asset collection to delete
|
|
21433
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21434
|
+
*/
|
|
21435
|
+
async deleteAssetCollection(assetCollection) {
|
|
21436
|
+
var _resolve;
|
|
21437
|
+
var _promise = new Promise((_r) => {
|
|
21438
|
+
_resolve = _r;
|
|
21439
|
+
});
|
|
21440
|
+
var _callbackPtr;
|
|
21441
|
+
var _callback = (_stateObject__, result) => {
|
|
21442
|
+
var _resultPtr = getNativePointer(result);
|
|
21443
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21444
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21445
|
+
return;
|
|
21446
|
+
}
|
|
21447
|
+
_resolve(_resultInstance);
|
|
21448
|
+
Module.removeFunction(_callbackPtr);
|
|
21449
|
+
};
|
|
21450
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21451
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAssetCollection_void_AssetCollectionRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21452
|
+
return _promise;
|
|
21453
|
+
}
|
|
21454
|
+
/**
|
|
21455
|
+
* @description Copies an array of asset collections to another space. Note that all source asset collections must belong to the same space.
|
|
21456
|
+
* @param sourceAssetCollections - The array of asset collections to copy. They must all belong to the same
|
|
21457
|
+
* space.
|
|
21458
|
+
* @param destSpaceId - The unique identifier of the space to copy these asset collections to.
|
|
21459
|
+
* @param copyAsync - Whether to instruct the services to perform the copy of the asset collections
|
|
21460
|
+
* asynchronously.
|
|
21461
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21462
|
+
*/
|
|
21463
|
+
async copyAssetCollectionsToSpace(sourceAssetCollections, destSpaceId, copyAsync) {
|
|
21464
|
+
var _resolve;
|
|
21465
|
+
var _promise = new Promise((_r) => {
|
|
21466
|
+
_resolve = _r;
|
|
21467
|
+
});
|
|
21468
|
+
var _callbackPtr;
|
|
21469
|
+
var _callback = (_stateObject__, result) => {
|
|
21470
|
+
var _resultPtr = getNativePointer(result);
|
|
21471
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21472
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21473
|
+
return;
|
|
21474
|
+
}
|
|
21475
|
+
_resolve(_resultInstance);
|
|
21476
|
+
Module.removeFunction(_callbackPtr);
|
|
21477
|
+
};
|
|
21478
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21479
|
+
Module.ccall("csp_systems_AssetSystem_CopyAssetCollectionsToSpace_void_ArrayR_StringRC_bool_AssetCollectionsResultCallback", "void", ["number", "number", "string", "boolean", "number", "number"], [
|
|
21480
|
+
this.pointer,
|
|
21481
|
+
sourceAssetCollections.pointer,
|
|
21482
|
+
destSpaceId,
|
|
21483
|
+
copyAsync,
|
|
21484
|
+
_callbackPtr,
|
|
21485
|
+
0,
|
|
21486
|
+
]);
|
|
21487
|
+
return _promise;
|
|
21488
|
+
}
|
|
21489
|
+
/**
|
|
21490
|
+
* @description Finds an asset collection by its Id.
|
|
21491
|
+
* @param assetCollectionId - Asset collection to delete
|
|
21492
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20787
21493
|
*/
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
super(pointer);
|
|
20807
|
-
}
|
|
20808
|
-
static fromResultBase(baseInstance) {
|
|
20809
|
-
const nativeClassWrapper = baseInstance;
|
|
20810
|
-
return new Systems.AssetCollectionResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21494
|
+
async getAssetCollectionById(assetCollectionId) {
|
|
21495
|
+
var _resolve;
|
|
21496
|
+
var _promise = new Promise((_r) => {
|
|
21497
|
+
_resolve = _r;
|
|
21498
|
+
});
|
|
21499
|
+
var _callbackPtr;
|
|
21500
|
+
var _callback = (_stateObject__, result) => {
|
|
21501
|
+
var _resultPtr = getNativePointer(result);
|
|
21502
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21503
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21504
|
+
return;
|
|
21505
|
+
}
|
|
21506
|
+
_resolve(_resultInstance);
|
|
21507
|
+
Module.removeFunction(_callbackPtr);
|
|
21508
|
+
};
|
|
21509
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21510
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionById_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionId, _callbackPtr, 0]);
|
|
21511
|
+
return _promise;
|
|
20811
21512
|
}
|
|
20812
21513
|
/**
|
|
20813
|
-
* @description
|
|
20814
|
-
* @
|
|
21514
|
+
* @description Finds an asset collection by its Name.
|
|
21515
|
+
* @param assetCollectionName - Name of the asset collection to be retrieved
|
|
21516
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20815
21517
|
*/
|
|
20816
|
-
|
|
20817
|
-
var
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
|
|
20821
|
-
|
|
20822
|
-
|
|
20823
|
-
|
|
20824
|
-
|
|
20825
|
-
|
|
20826
|
-
|
|
20827
|
-
|
|
20828
|
-
|
|
20829
|
-
|
|
20830
|
-
|
|
20831
|
-
|
|
20832
|
-
(
|
|
20833
|
-
|
|
20834
|
-
@ingroup Asset System
|
|
20835
|
-
* @description Data class used to contain information when attempting to get an array of asset collections.
|
|
20836
|
-
*/
|
|
20837
|
-
class AssetCollectionsResult extends Systems.ResultBase {
|
|
20838
|
-
/** @internal */
|
|
20839
|
-
constructor(pointer) {
|
|
20840
|
-
super(pointer);
|
|
20841
|
-
}
|
|
20842
|
-
static fromResultBase(baseInstance) {
|
|
20843
|
-
const nativeClassWrapper = baseInstance;
|
|
20844
|
-
return new Systems.AssetCollectionsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21518
|
+
async getAssetCollectionByName(assetCollectionName) {
|
|
21519
|
+
var _resolve;
|
|
21520
|
+
var _promise = new Promise((_r) => {
|
|
21521
|
+
_resolve = _r;
|
|
21522
|
+
});
|
|
21523
|
+
var _callbackPtr;
|
|
21524
|
+
var _callback = (_stateObject__, result) => {
|
|
21525
|
+
var _resultPtr = getNativePointer(result);
|
|
21526
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21527
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21528
|
+
return;
|
|
21529
|
+
}
|
|
21530
|
+
_resolve(_resultInstance);
|
|
21531
|
+
Module.removeFunction(_callbackPtr);
|
|
21532
|
+
};
|
|
21533
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21534
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionByName_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionName, _callbackPtr, 0]);
|
|
21535
|
+
return _promise;
|
|
20845
21536
|
}
|
|
20846
21537
|
/**
|
|
20847
|
-
* @description Retrieves
|
|
20848
|
-
*
|
|
21538
|
+
* @description Retrieves asset collections based on the specified search criteria.
|
|
21539
|
+
* Results pagination is supported through the use of ResultsSkipNumber and ResultsMaxNumber.
|
|
21540
|
+
* @param space - Optional space to get asset collections associated with it
|
|
21541
|
+
* @param assetCollectionParentId - Optional asset collection parent id to get asset collections associated with it
|
|
21542
|
+
* @param assetCollectionType - Type of the asset collection
|
|
21543
|
+
* @param assetCollectionTags - Optional array of strings representing asset collection tags
|
|
21544
|
+
* @param assetCollectionNames - Optional array of strings representing asset
|
|
21545
|
+
* collection names
|
|
21546
|
+
* @param resultsSkipNumber - Optional param representing the number of result entries that will be skipped from the result. for no skip pass
|
|
21547
|
+
* nullptr.
|
|
21548
|
+
* @param resultsMaxNumber - Optional param representing the maximum number of result entries to be retrieved. for all available result
|
|
21549
|
+
* entries pass nullptr.
|
|
21550
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20849
21551
|
*/
|
|
20850
|
-
|
|
20851
|
-
var
|
|
20852
|
-
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
|
-
|
|
21552
|
+
async findAssetCollections(ids, parentId, names, types, tags, spaceIds, resultsSkipNumber, resultsMaxNumber) {
|
|
21553
|
+
var _resolve;
|
|
21554
|
+
var _promise = new Promise((_r) => {
|
|
21555
|
+
_resolve = _r;
|
|
21556
|
+
});
|
|
21557
|
+
var _callbackPtr;
|
|
21558
|
+
var _callback = (_stateObject__, result) => {
|
|
21559
|
+
var _resultPtr = getNativePointer(result);
|
|
21560
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21561
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21562
|
+
return;
|
|
21563
|
+
}
|
|
21564
|
+
_resolve(_resultInstance);
|
|
21565
|
+
Module.removeFunction(_callbackPtr);
|
|
21566
|
+
};
|
|
21567
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21568
|
+
var resultsSkipNumberPointer = 0;
|
|
21569
|
+
if (resultsSkipNumber != null) {
|
|
21570
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
21571
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
21572
|
+
}
|
|
21573
|
+
var resultsMaxNumberPointer = 0;
|
|
21574
|
+
if (resultsMaxNumber != null) {
|
|
21575
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
21576
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
21577
|
+
}
|
|
21578
|
+
Module.ccall("csp_systems_AssetSystem_FindAssetCollections_void_ArrayRC_StringRC_ArrayRC_ArrayRC_ArrayRC_ArrayRC_intRC_intRC_AssetCollectionsResultCallback", "void", [
|
|
21579
|
+
"number",
|
|
21580
|
+
"number",
|
|
21581
|
+
"string",
|
|
21582
|
+
"number",
|
|
21583
|
+
"number",
|
|
21584
|
+
"number",
|
|
21585
|
+
"number",
|
|
21586
|
+
"number",
|
|
21587
|
+
"number",
|
|
21588
|
+
"number",
|
|
21589
|
+
"number",
|
|
21590
|
+
], [
|
|
21591
|
+
this.pointer,
|
|
21592
|
+
ids != null ? ids.pointer : 0,
|
|
21593
|
+
parentId,
|
|
21594
|
+
names != null ? names.pointer : 0,
|
|
21595
|
+
types != null ? types.pointer : 0,
|
|
21596
|
+
tags != null ? tags.pointer : 0,
|
|
21597
|
+
spaceIds != null ? spaceIds.pointer : 0,
|
|
21598
|
+
resultsSkipNumberPointer,
|
|
21599
|
+
resultsMaxNumberPointer,
|
|
21600
|
+
_callbackPtr,
|
|
21601
|
+
0,
|
|
21602
|
+
]);
|
|
21603
|
+
if (resultsSkipNumberPointer) {
|
|
21604
|
+
Module._free(resultsSkipNumberPointer);
|
|
21605
|
+
}
|
|
21606
|
+
if (resultsMaxNumberPointer) {
|
|
21607
|
+
Module._free(resultsMaxNumberPointer);
|
|
21608
|
+
}
|
|
21609
|
+
return _promise;
|
|
20856
21610
|
}
|
|
20857
21611
|
/**
|
|
20858
|
-
* @description
|
|
20859
|
-
*
|
|
20860
|
-
*
|
|
20861
|
-
* @
|
|
21612
|
+
* @description Updates the Metadata field of an Asset Collection
|
|
21613
|
+
* @param assetCollection - Asset collection to be updated
|
|
21614
|
+
* @param newMetadata - The new metadata information that will replace the previous
|
|
21615
|
+
* @param tags - Optional array of strings to replace the tags
|
|
21616
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20862
21617
|
*/
|
|
20863
|
-
|
|
20864
|
-
|
|
20865
|
-
|
|
20866
|
-
|
|
20867
|
-
|
|
20868
|
-
|
|
20869
|
-
|
|
20870
|
-
|
|
20871
|
-
|
|
20872
|
-
|
|
20873
|
-
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
(
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
|
|
20883
|
-
|
|
20884
|
-
|
|
20885
|
-
|
|
20886
|
-
|
|
20887
|
-
|
|
20888
|
-
}
|
|
20889
|
-
static fromSystemBase(baseInstance) {
|
|
20890
|
-
const nativeClassWrapper = baseInstance;
|
|
20891
|
-
return new Systems.AssetSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21618
|
+
async updateAssetCollectionMetadata(assetCollection, newMetadata, tags) {
|
|
21619
|
+
var _resolve;
|
|
21620
|
+
var _promise = new Promise((_r) => {
|
|
21621
|
+
_resolve = _r;
|
|
21622
|
+
});
|
|
21623
|
+
var _callbackPtr;
|
|
21624
|
+
var _callback = (_stateObject__, result) => {
|
|
21625
|
+
var _resultPtr = getNativePointer(result);
|
|
21626
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21627
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21628
|
+
return;
|
|
21629
|
+
}
|
|
21630
|
+
_resolve(_resultInstance);
|
|
21631
|
+
Module.removeFunction(_callbackPtr);
|
|
21632
|
+
};
|
|
21633
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21634
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAssetCollectionMetadata_void_AssetCollectionRC_MapRC_ArrayRC_AssetCollectionResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21635
|
+
this.pointer,
|
|
21636
|
+
assetCollection.pointer,
|
|
21637
|
+
newMetadata.pointer,
|
|
21638
|
+
tags != null ? tags.pointer : 0,
|
|
21639
|
+
_callbackPtr,
|
|
21640
|
+
0,
|
|
21641
|
+
]);
|
|
21642
|
+
return _promise;
|
|
20892
21643
|
}
|
|
20893
21644
|
/**
|
|
20894
|
-
* @description Creates
|
|
20895
|
-
* @param
|
|
20896
|
-
* @param
|
|
20897
|
-
* @param
|
|
20898
|
-
* @param
|
|
20899
|
-
* @param type - Type of the
|
|
20900
|
-
* @param tags - Optional array of strings to add to the asset collection as tags
|
|
21645
|
+
* @description Creates a new asset.
|
|
21646
|
+
* @param assetCollection - The parent collection for the asset to be associated with
|
|
21647
|
+
* @param name - Name of the asset collection
|
|
21648
|
+
* @param thirdPartyPackagedAssetIdentifier - Optional id to a third party packaged asset identifier
|
|
21649
|
+
* @param thirdPartyPlatform - Optional enum class for third part platform
|
|
21650
|
+
* @param type - Type of the asset
|
|
20901
21651
|
* @param callback - Callback when asynchronous task finishes
|
|
20902
21652
|
*/
|
|
20903
|
-
async
|
|
21653
|
+
async createAsset(assetCollection, name, thirdPartyPackagedAssetIdentifier, thirdPartyPlatform, type) {
|
|
20904
21654
|
var _resolve;
|
|
20905
21655
|
var _promise = new Promise((_r) => {
|
|
20906
21656
|
_resolve = _r;
|
|
@@ -20908,7 +21658,7 @@ export class CSPFoundation {
|
|
|
20908
21658
|
var _callbackPtr;
|
|
20909
21659
|
var _callback = (_stateObject__, result) => {
|
|
20910
21660
|
var _resultPtr = getNativePointer(result);
|
|
20911
|
-
var _resultInstance = new Systems.
|
|
21661
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
20912
21662
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20913
21663
|
return;
|
|
20914
21664
|
}
|
|
@@ -20916,35 +21666,66 @@ export class CSPFoundation {
|
|
|
20916
21666
|
Module.removeFunction(_callbackPtr);
|
|
20917
21667
|
};
|
|
20918
21668
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20919
|
-
|
|
21669
|
+
var thirdPartyPlatformPointer = 0;
|
|
21670
|
+
if (thirdPartyPlatform != null) {
|
|
21671
|
+
thirdPartyPlatformPointer = Module._malloc(4);
|
|
21672
|
+
Module.setValue(thirdPartyPlatformPointer, thirdPartyPlatform, "i32");
|
|
21673
|
+
}
|
|
21674
|
+
Module.ccall("csp_systems_AssetSystem_CreateAsset_void_AssetCollectionRC_StringRC_StringRC_EThirdPartyPlatformRC_EAssetType_AssetResultCallback", "void", [
|
|
21675
|
+
"number",
|
|
20920
21676
|
"number",
|
|
20921
|
-
"string",
|
|
20922
21677
|
"string",
|
|
20923
21678
|
"string",
|
|
20924
21679
|
"number",
|
|
20925
21680
|
"number",
|
|
20926
21681
|
"number",
|
|
20927
21682
|
"number",
|
|
20928
|
-
"number",
|
|
20929
21683
|
], [
|
|
20930
21684
|
this.pointer,
|
|
20931
|
-
|
|
20932
|
-
|
|
20933
|
-
|
|
20934
|
-
|
|
21685
|
+
assetCollection.pointer,
|
|
21686
|
+
name,
|
|
21687
|
+
thirdPartyPackagedAssetIdentifier,
|
|
21688
|
+
thirdPartyPlatformPointer,
|
|
20935
21689
|
type,
|
|
20936
|
-
tags != null ? tags.pointer : 0,
|
|
20937
21690
|
_callbackPtr,
|
|
20938
21691
|
0,
|
|
20939
21692
|
]);
|
|
21693
|
+
if (thirdPartyPlatformPointer) {
|
|
21694
|
+
Module._free(thirdPartyPlatformPointer);
|
|
21695
|
+
}
|
|
20940
21696
|
return _promise;
|
|
20941
21697
|
}
|
|
20942
21698
|
/**
|
|
20943
|
-
* @description
|
|
20944
|
-
* @param
|
|
21699
|
+
* @description Update a given asset.
|
|
21700
|
+
* @param asset - Asset to update
|
|
20945
21701
|
* @param callback - Callback when asynchronous task finishes
|
|
20946
21702
|
*/
|
|
20947
|
-
async
|
|
21703
|
+
async updateAsset(asset) {
|
|
21704
|
+
var _resolve;
|
|
21705
|
+
var _promise = new Promise((_r) => {
|
|
21706
|
+
_resolve = _r;
|
|
21707
|
+
});
|
|
21708
|
+
var _callbackPtr;
|
|
21709
|
+
var _callback = (_stateObject__, result) => {
|
|
21710
|
+
var _resultPtr = getNativePointer(result);
|
|
21711
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21712
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21713
|
+
return;
|
|
21714
|
+
}
|
|
21715
|
+
_resolve(_resultInstance);
|
|
21716
|
+
Module.removeFunction(_callbackPtr);
|
|
21717
|
+
};
|
|
21718
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21719
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAsset_void_AssetRC_AssetResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21720
|
+
return _promise;
|
|
21721
|
+
}
|
|
21722
|
+
/**
|
|
21723
|
+
* @description Deletes a given asset.
|
|
21724
|
+
* @param assetCollection - The parent collection that the asset is associated with
|
|
21725
|
+
* @param asset - Asset to delete
|
|
21726
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21727
|
+
*/
|
|
21728
|
+
async deleteAsset(assetCollection, asset) {
|
|
20948
21729
|
var _resolve;
|
|
20949
21730
|
var _promise = new Promise((_r) => {
|
|
20950
21731
|
_resolve = _r;
|
|
@@ -20960,19 +21741,15 @@ export class CSPFoundation {
|
|
|
20960
21741
|
Module.removeFunction(_callbackPtr);
|
|
20961
21742
|
};
|
|
20962
21743
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20963
|
-
Module.ccall("
|
|
21744
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAsset_void_AssetCollectionRC_AssetRC_NullResultCallback", "void", ["number", "number", "number", "number", "number"], [this.pointer, assetCollection.pointer, asset.pointer, _callbackPtr, 0]);
|
|
20964
21745
|
return _promise;
|
|
20965
21746
|
}
|
|
20966
21747
|
/**
|
|
20967
|
-
* @description
|
|
20968
|
-
* @param
|
|
20969
|
-
* space.
|
|
20970
|
-
* @param destSpaceId - The unique identifier of the space to copy these asset collections to.
|
|
20971
|
-
* @param copyAsync - Whether to instruct the services to perform the copy of the asset collections
|
|
20972
|
-
* asynchronously.
|
|
21748
|
+
* @description Retrieves all assets in a given asset collection.
|
|
21749
|
+
* @param assetCollection - Collection to get all assets from
|
|
20973
21750
|
* @param callback - Callback when asynchronous task finishes
|
|
20974
21751
|
*/
|
|
20975
|
-
async
|
|
21752
|
+
async getAssetsInCollection(assetCollection) {
|
|
20976
21753
|
var _resolve;
|
|
20977
21754
|
var _promise = new Promise((_r) => {
|
|
20978
21755
|
_resolve = _r;
|
|
@@ -20980,7 +21757,7 @@ export class CSPFoundation {
|
|
|
20980
21757
|
var _callbackPtr;
|
|
20981
21758
|
var _callback = (_stateObject__, result) => {
|
|
20982
21759
|
var _resultPtr = getNativePointer(result);
|
|
20983
|
-
var _resultInstance = new Systems.
|
|
21760
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
20984
21761
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20985
21762
|
return;
|
|
20986
21763
|
}
|
|
@@ -20988,22 +21765,16 @@ export class CSPFoundation {
|
|
|
20988
21765
|
Module.removeFunction(_callbackPtr);
|
|
20989
21766
|
};
|
|
20990
21767
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20991
|
-
Module.ccall("
|
|
20992
|
-
this.pointer,
|
|
20993
|
-
sourceAssetCollections.pointer,
|
|
20994
|
-
destSpaceId,
|
|
20995
|
-
copyAsync,
|
|
20996
|
-
_callbackPtr,
|
|
20997
|
-
0,
|
|
20998
|
-
]);
|
|
21768
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsInCollection_void_AssetCollectionRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
20999
21769
|
return _promise;
|
|
21000
21770
|
}
|
|
21001
21771
|
/**
|
|
21002
|
-
* @description
|
|
21003
|
-
* @param assetCollectionId -
|
|
21772
|
+
* @description Retrieves the asset specified by the Id
|
|
21773
|
+
* @param assetCollectionId - The id of the asset collection containing the asset
|
|
21774
|
+
* @param assetId - The id of the asset to retrieve
|
|
21004
21775
|
* @param callback - Callback when asynchronous task finishes
|
|
21005
21776
|
*/
|
|
21006
|
-
async
|
|
21777
|
+
async getAssetById(assetCollectionId, assetId) {
|
|
21007
21778
|
var _resolve;
|
|
21008
21779
|
var _promise = new Promise((_r) => {
|
|
21009
21780
|
_resolve = _r;
|
|
@@ -21011,7 +21782,7 @@ export class CSPFoundation {
|
|
|
21011
21782
|
var _callbackPtr;
|
|
21012
21783
|
var _callback = (_stateObject__, result) => {
|
|
21013
21784
|
var _resultPtr = getNativePointer(result);
|
|
21014
|
-
var _resultInstance = new Systems.
|
|
21785
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21015
21786
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21016
21787
|
return;
|
|
21017
21788
|
}
|
|
@@ -21019,15 +21790,15 @@ export class CSPFoundation {
|
|
|
21019
21790
|
Module.removeFunction(_callbackPtr);
|
|
21020
21791
|
};
|
|
21021
21792
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21022
|
-
Module.ccall("
|
|
21793
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetById_void_StringRC_StringRC_AssetResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21023
21794
|
return _promise;
|
|
21024
21795
|
}
|
|
21025
21796
|
/**
|
|
21026
|
-
* @description
|
|
21027
|
-
* @param
|
|
21797
|
+
* @description Retrieves all assets that belong to the asset collections with the give Ids.
|
|
21798
|
+
* @param assetCollectionIds - Collection of asset collection ids get all assets from
|
|
21028
21799
|
* @param callback - Callback when asynchronous task finishes
|
|
21029
21800
|
*/
|
|
21030
|
-
async
|
|
21801
|
+
async getAssetsByCollectionIds(assetCollectionIds) {
|
|
21031
21802
|
var _resolve;
|
|
21032
21803
|
var _promise = new Promise((_r) => {
|
|
21033
21804
|
_resolve = _r;
|
|
@@ -21035,7 +21806,7 @@ export class CSPFoundation {
|
|
|
21035
21806
|
var _callbackPtr;
|
|
21036
21807
|
var _callback = (_stateObject__, result) => {
|
|
21037
21808
|
var _resultPtr = getNativePointer(result);
|
|
21038
|
-
var _resultInstance = new Systems.
|
|
21809
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21039
21810
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21040
21811
|
return;
|
|
21041
21812
|
}
|
|
@@ -21043,25 +21814,19 @@ export class CSPFoundation {
|
|
|
21043
21814
|
Module.removeFunction(_callbackPtr);
|
|
21044
21815
|
};
|
|
21045
21816
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21046
|
-
Module.ccall("
|
|
21817
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCollectionIds_void_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollectionIds.pointer, _callbackPtr, 0]);
|
|
21047
21818
|
return _promise;
|
|
21048
21819
|
}
|
|
21049
21820
|
/**
|
|
21050
|
-
* @description Retrieves
|
|
21051
|
-
*
|
|
21052
|
-
*
|
|
21053
|
-
* @param
|
|
21054
|
-
* @param
|
|
21055
|
-
* @param
|
|
21056
|
-
* @param assetCollectionNames - Optional array of strings representing asset
|
|
21057
|
-
* collection names
|
|
21058
|
-
* @param resultsSkipNumber - Optional param representing the number of result entries that will be skipped from the result. for no skip pass
|
|
21059
|
-
* nullptr.
|
|
21060
|
-
* @param resultsMaxNumber - Optional param representing the maximum number of result entries to be retrieved. for all available result
|
|
21061
|
-
* entries pass nullptr.
|
|
21821
|
+
* @description Retrieves assets based on the specified search criteria.
|
|
21822
|
+
* @param assetCollectionIds - The asset collection ids that will be used as search criteria. note that
|
|
21823
|
+
* you have to pass at least one Id.
|
|
21824
|
+
* @param assetIds - Optional array of strings representing asset ids
|
|
21825
|
+
* @param assetNames - Optional array of strings representing asset names
|
|
21826
|
+
* @param assetTypes - Optional array of asset types
|
|
21062
21827
|
* @param callback - Callback when asynchronous task finishes
|
|
21063
21828
|
*/
|
|
21064
|
-
async
|
|
21829
|
+
async getAssetsByCriteria(assetCollectionIds, assetIds, assetNames, assetTypes) {
|
|
21065
21830
|
var _resolve;
|
|
21066
21831
|
var _promise = new Promise((_r) => {
|
|
21067
21832
|
_resolve = _r;
|
|
@@ -21069,7 +21834,7 @@ export class CSPFoundation {
|
|
|
21069
21834
|
var _callbackPtr;
|
|
21070
21835
|
var _callback = (_stateObject__, result) => {
|
|
21071
21836
|
var _resultPtr = getNativePointer(result);
|
|
21072
|
-
var _resultInstance = new Systems.
|
|
21837
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21073
21838
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21074
21839
|
return;
|
|
21075
21840
|
}
|
|
@@ -21077,57 +21842,26 @@ export class CSPFoundation {
|
|
|
21077
21842
|
Module.removeFunction(_callbackPtr);
|
|
21078
21843
|
};
|
|
21079
21844
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21080
|
-
|
|
21081
|
-
if (resultsSkipNumber != null) {
|
|
21082
|
-
resultsSkipNumberPointer = Module._malloc(4);
|
|
21083
|
-
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
21084
|
-
}
|
|
21085
|
-
var resultsMaxNumberPointer = 0;
|
|
21086
|
-
if (resultsMaxNumber != null) {
|
|
21087
|
-
resultsMaxNumberPointer = Module._malloc(4);
|
|
21088
|
-
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
21089
|
-
}
|
|
21090
|
-
Module.ccall("csp_systems_AssetSystem_FindAssetCollections_void_ArrayRC_StringRC_ArrayRC_ArrayRC_ArrayRC_ArrayRC_intRC_intRC_AssetCollectionsResultCallback", "void", [
|
|
21091
|
-
"number",
|
|
21092
|
-
"number",
|
|
21093
|
-
"string",
|
|
21094
|
-
"number",
|
|
21095
|
-
"number",
|
|
21096
|
-
"number",
|
|
21097
|
-
"number",
|
|
21098
|
-
"number",
|
|
21099
|
-
"number",
|
|
21100
|
-
"number",
|
|
21101
|
-
"number",
|
|
21102
|
-
], [
|
|
21845
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCriteria_void_ArrayRC_ArrayRC_ArrayRC_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21103
21846
|
this.pointer,
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
tags != null ? tags.pointer : 0,
|
|
21109
|
-
spaceIds != null ? spaceIds.pointer : 0,
|
|
21110
|
-
resultsSkipNumberPointer,
|
|
21111
|
-
resultsMaxNumberPointer,
|
|
21847
|
+
assetCollectionIds.pointer,
|
|
21848
|
+
assetIds != null ? assetIds.pointer : 0,
|
|
21849
|
+
assetNames != null ? assetNames.pointer : 0,
|
|
21850
|
+
assetTypes != null ? assetTypes.pointer : 0,
|
|
21112
21851
|
_callbackPtr,
|
|
21113
21852
|
0,
|
|
21114
21853
|
]);
|
|
21115
|
-
if (resultsSkipNumberPointer) {
|
|
21116
|
-
Module._free(resultsSkipNumberPointer);
|
|
21117
|
-
}
|
|
21118
|
-
if (resultsMaxNumberPointer) {
|
|
21119
|
-
Module._free(resultsMaxNumberPointer);
|
|
21120
|
-
}
|
|
21121
21854
|
return _promise;
|
|
21122
21855
|
}
|
|
21123
21856
|
/**
|
|
21124
|
-
* @description
|
|
21125
|
-
* @param assetCollection -
|
|
21126
|
-
* @param
|
|
21127
|
-
* @param
|
|
21857
|
+
* @description Uploads data for the given asset to CHS from the given source.
|
|
21858
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21859
|
+
* @param asset - Asset to upload data for
|
|
21860
|
+
* @param assetDataSource - Asset data to upload
|
|
21861
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21128
21862
|
* @param callback - Callback when asynchronous task finishes
|
|
21129
21863
|
*/
|
|
21130
|
-
async
|
|
21864
|
+
async uploadAssetData(assetCollection, asset, assetDataSource, progressCallback) {
|
|
21131
21865
|
var _resolve;
|
|
21132
21866
|
var _promise = new Promise((_r) => {
|
|
21133
21867
|
_resolve = _r;
|
|
@@ -21135,34 +21869,37 @@ export class CSPFoundation {
|
|
|
21135
21869
|
var _callbackPtr;
|
|
21136
21870
|
var _callback = (_stateObject__, result) => {
|
|
21137
21871
|
var _resultPtr = getNativePointer(result);
|
|
21138
|
-
var _resultInstance = new Systems.
|
|
21872
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21139
21873
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21874
|
+
if (progressCallback != null) {
|
|
21875
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21876
|
+
}
|
|
21140
21877
|
return;
|
|
21141
21878
|
}
|
|
21142
21879
|
_resolve(_resultInstance);
|
|
21143
21880
|
Module.removeFunction(_callbackPtr);
|
|
21144
21881
|
};
|
|
21145
21882
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21146
|
-
Module.ccall("
|
|
21883
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetData_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21147
21884
|
this.pointer,
|
|
21148
21885
|
assetCollection.pointer,
|
|
21149
|
-
|
|
21150
|
-
|
|
21886
|
+
asset.pointer,
|
|
21887
|
+
assetDataSource.pointer,
|
|
21151
21888
|
_callbackPtr,
|
|
21152
21889
|
0,
|
|
21153
21890
|
]);
|
|
21154
21891
|
return _promise;
|
|
21155
21892
|
}
|
|
21156
21893
|
/**
|
|
21157
|
-
* @description
|
|
21158
|
-
* @param assetCollection -
|
|
21159
|
-
* @param
|
|
21160
|
-
* @param
|
|
21161
|
-
*
|
|
21162
|
-
* @param
|
|
21894
|
+
* @description Uploads data for the given asset to CHS from the given source, taking a CancellationToken to allow cancelling the request.
|
|
21895
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21896
|
+
* @param asset - Asset to upload data for
|
|
21897
|
+
* @param assetDataSource - Asset data to upload
|
|
21898
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21899
|
+
* @param cancellationToken - Token for cancelling upload
|
|
21163
21900
|
* @param callback - Callback when asynchronous task finishes
|
|
21164
21901
|
*/
|
|
21165
|
-
async
|
|
21902
|
+
async uploadAssetDataEx(assetCollection, asset, assetDataSource, cancellationToken, progressCallback) {
|
|
21166
21903
|
var _resolve;
|
|
21167
21904
|
var _promise = new Promise((_r) => {
|
|
21168
21905
|
_resolve = _r;
|
|
@@ -21170,49 +21907,59 @@ export class CSPFoundation {
|
|
|
21170
21907
|
var _callbackPtr;
|
|
21171
21908
|
var _callback = (_stateObject__, result) => {
|
|
21172
21909
|
var _resultPtr = getNativePointer(result);
|
|
21173
|
-
var _resultInstance = new Systems.
|
|
21910
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21174
21911
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21912
|
+
if (progressCallback != null) {
|
|
21913
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21914
|
+
}
|
|
21175
21915
|
return;
|
|
21176
21916
|
}
|
|
21177
21917
|
_resolve(_resultInstance);
|
|
21178
21918
|
Module.removeFunction(_callbackPtr);
|
|
21179
21919
|
};
|
|
21180
21920
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21181
|
-
|
|
21182
|
-
if (thirdPartyPlatform != null) {
|
|
21183
|
-
thirdPartyPlatformPointer = Module._malloc(4);
|
|
21184
|
-
Module.setValue(thirdPartyPlatformPointer, thirdPartyPlatform, "i32");
|
|
21185
|
-
}
|
|
21186
|
-
Module.ccall("csp_systems_AssetSystem_CreateAsset_void_AssetCollectionRC_StringRC_StringRC_EThirdPartyPlatformRC_EAssetType_AssetResultCallback", "void", [
|
|
21187
|
-
"number",
|
|
21188
|
-
"number",
|
|
21189
|
-
"string",
|
|
21190
|
-
"string",
|
|
21191
|
-
"number",
|
|
21192
|
-
"number",
|
|
21193
|
-
"number",
|
|
21194
|
-
"number",
|
|
21195
|
-
], [
|
|
21921
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetDataEx_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_CancellationTokenR_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21196
21922
|
this.pointer,
|
|
21197
21923
|
assetCollection.pointer,
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
type,
|
|
21924
|
+
asset.pointer,
|
|
21925
|
+
assetDataSource.pointer,
|
|
21926
|
+
cancellationToken.pointer,
|
|
21202
21927
|
_callbackPtr,
|
|
21203
21928
|
0,
|
|
21204
21929
|
]);
|
|
21205
|
-
if (thirdPartyPlatformPointer) {
|
|
21206
|
-
Module._free(thirdPartyPlatformPointer);
|
|
21207
|
-
}
|
|
21208
21930
|
return _promise;
|
|
21209
21931
|
}
|
|
21210
21932
|
/**
|
|
21211
|
-
* @description
|
|
21212
|
-
* @param asset - Asset to
|
|
21933
|
+
* @description Downloads data for a given Asset from CHS.
|
|
21934
|
+
* @param asset - Asset to download data for
|
|
21935
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21936
|
+
*/
|
|
21937
|
+
async downloadAssetData(asset) {
|
|
21938
|
+
var _resolve;
|
|
21939
|
+
var _promise = new Promise((_r) => {
|
|
21940
|
+
_resolve = _r;
|
|
21941
|
+
});
|
|
21942
|
+
var _callbackPtr;
|
|
21943
|
+
var _callback = (_stateObject__, result) => {
|
|
21944
|
+
var _resultPtr = getNativePointer(result);
|
|
21945
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21946
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21947
|
+
return;
|
|
21948
|
+
}
|
|
21949
|
+
_resolve(_resultInstance);
|
|
21950
|
+
Module.removeFunction(_callbackPtr);
|
|
21951
|
+
};
|
|
21952
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21953
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetData_void_AssetRC_AssetDataResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21954
|
+
return _promise;
|
|
21955
|
+
}
|
|
21956
|
+
/**
|
|
21957
|
+
* @description Downloads data for a given Asset from CHS, taking a CancellationToken to allow cancelling the request.
|
|
21958
|
+
* @param asset - Asset to download data for
|
|
21959
|
+
* @param cancellationToken - Token for cancelling download
|
|
21213
21960
|
* @param callback - Callback when asynchronous task finishes
|
|
21214
21961
|
*/
|
|
21215
|
-
async
|
|
21962
|
+
async downloadAssetDataEx(asset, cancellationToken) {
|
|
21216
21963
|
var _resolve;
|
|
21217
21964
|
var _promise = new Promise((_r) => {
|
|
21218
21965
|
_resolve = _r;
|
|
@@ -21220,7 +21967,7 @@ export class CSPFoundation {
|
|
|
21220
21967
|
var _callbackPtr;
|
|
21221
21968
|
var _callback = (_stateObject__, result) => {
|
|
21222
21969
|
var _resultPtr = getNativePointer(result);
|
|
21223
|
-
var _resultInstance = new Systems.
|
|
21970
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21224
21971
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21225
21972
|
return;
|
|
21226
21973
|
}
|
|
@@ -21228,16 +21975,21 @@ export class CSPFoundation {
|
|
|
21228
21975
|
Module.removeFunction(_callbackPtr);
|
|
21229
21976
|
};
|
|
21230
21977
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21231
|
-
Module.ccall("
|
|
21978
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetDataEx_void_AssetRC_CancellationTokenR_AssetDataResultCallback", "void", ["number", "number", "number", "number", "number"], [
|
|
21979
|
+
this.pointer,
|
|
21980
|
+
asset.pointer,
|
|
21981
|
+
cancellationToken.pointer,
|
|
21982
|
+
_callbackPtr,
|
|
21983
|
+
0,
|
|
21984
|
+
]);
|
|
21232
21985
|
return _promise;
|
|
21233
21986
|
}
|
|
21234
21987
|
/**
|
|
21235
|
-
* @description
|
|
21236
|
-
* @param
|
|
21237
|
-
* @param asset - Asset to delete
|
|
21988
|
+
* @description Get the size of the data associated with an Asset.
|
|
21989
|
+
* @param asset - Asset to get data size for
|
|
21238
21990
|
* @param callback - Callback when asynchronous task finishes
|
|
21239
21991
|
*/
|
|
21240
|
-
async
|
|
21992
|
+
async getAssetDataSize(asset) {
|
|
21241
21993
|
var _resolve;
|
|
21242
21994
|
var _promise = new Promise((_r) => {
|
|
21243
21995
|
_resolve = _r;
|
|
@@ -21245,7 +21997,7 @@ export class CSPFoundation {
|
|
|
21245
21997
|
var _callbackPtr;
|
|
21246
21998
|
var _callback = (_stateObject__, result) => {
|
|
21247
21999
|
var _resultPtr = getNativePointer(result);
|
|
21248
|
-
var _resultInstance = new Systems.
|
|
22000
|
+
var _resultInstance = new Systems.UInt64Result(_resultPtr);
|
|
21249
22001
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21250
22002
|
return;
|
|
21251
22003
|
}
|
|
@@ -21253,15 +22005,15 @@ export class CSPFoundation {
|
|
|
21253
22005
|
Module.removeFunction(_callbackPtr);
|
|
21254
22006
|
};
|
|
21255
22007
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21256
|
-
Module.ccall("
|
|
22008
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetDataSize_void_AssetRC_UInt64ResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21257
22009
|
return _promise;
|
|
21258
22010
|
}
|
|
21259
22011
|
/**
|
|
21260
|
-
* @description
|
|
21261
|
-
* @param assetCollection -
|
|
22012
|
+
* @description Gets a LOD chain within the given AssetCollection.
|
|
22013
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
21262
22014
|
* @param callback - Callback when asynchronous task finishes
|
|
21263
22015
|
*/
|
|
21264
|
-
async
|
|
22016
|
+
async getLODChain(assetCollection) {
|
|
21265
22017
|
var _resolve;
|
|
21266
22018
|
var _promise = new Promise((_r) => {
|
|
21267
22019
|
_resolve = _r;
|
|
@@ -21269,7 +22021,7 @@ export class CSPFoundation {
|
|
|
21269
22021
|
var _callbackPtr;
|
|
21270
22022
|
var _callback = (_stateObject__, result) => {
|
|
21271
22023
|
var _resultPtr = getNativePointer(result);
|
|
21272
|
-
var _resultInstance = new Systems.
|
|
22024
|
+
var _resultInstance = new Systems.LODChainResult(_resultPtr);
|
|
21273
22025
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21274
22026
|
return;
|
|
21275
22027
|
}
|
|
@@ -21277,16 +22029,17 @@ export class CSPFoundation {
|
|
|
21277
22029
|
Module.removeFunction(_callbackPtr);
|
|
21278
22030
|
};
|
|
21279
22031
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21280
|
-
Module.ccall("
|
|
22032
|
+
Module.ccall("csp_systems_AssetSystem_GetLODChain_void_AssetCollectionRC_LODChainResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21281
22033
|
return _promise;
|
|
21282
22034
|
}
|
|
21283
22035
|
/**
|
|
21284
|
-
* @description
|
|
21285
|
-
* @param
|
|
21286
|
-
* @param
|
|
22036
|
+
* @description Registers an asset to the LOD chain
|
|
22037
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
22038
|
+
* @param asset - Asset to register as LOD
|
|
22039
|
+
* @param asset - LOD level for Asset to be registered to
|
|
21287
22040
|
* @param callback - Callback when asynchronous task finishes
|
|
21288
22041
|
*/
|
|
21289
|
-
async
|
|
22042
|
+
async registerAssetToLODChain(assetCollection, asset, lODLevel, progressCallback) {
|
|
21290
22043
|
var _resolve;
|
|
21291
22044
|
var _promise = new Promise((_r) => {
|
|
21292
22045
|
_resolve = _r;
|
|
@@ -21296,21 +22049,32 @@ export class CSPFoundation {
|
|
|
21296
22049
|
var _resultPtr = getNativePointer(result);
|
|
21297
22050
|
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21298
22051
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
22052
|
+
if (progressCallback != null) {
|
|
22053
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
22054
|
+
}
|
|
21299
22055
|
return;
|
|
21300
22056
|
}
|
|
21301
22057
|
_resolve(_resultInstance);
|
|
21302
22058
|
Module.removeFunction(_callbackPtr);
|
|
21303
22059
|
};
|
|
21304
22060
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21305
|
-
Module.ccall("
|
|
22061
|
+
Module.ccall("csp_systems_AssetSystem_RegisterAssetToLODChain_void_AssetCollectionRC_AssetRC_int_AssetResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
22062
|
+
this.pointer,
|
|
22063
|
+
assetCollection.pointer,
|
|
22064
|
+
asset.pointer,
|
|
22065
|
+
lODLevel,
|
|
22066
|
+
_callbackPtr,
|
|
22067
|
+
0,
|
|
22068
|
+
]);
|
|
21306
22069
|
return _promise;
|
|
21307
22070
|
}
|
|
21308
22071
|
/**
|
|
21309
|
-
* @description
|
|
21310
|
-
* @param
|
|
21311
|
-
* @param
|
|
22072
|
+
* @description Creates a new material backed by an AssetCollection/Asset.
|
|
22073
|
+
* @param name - The name of the new material.
|
|
22074
|
+
* @param spaceId - The space id this material is associated with.
|
|
22075
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21312
22076
|
*/
|
|
21313
|
-
async
|
|
22077
|
+
async createMaterial(name, spaceId) {
|
|
21314
22078
|
var _resolve;
|
|
21315
22079
|
var _promise = new Promise((_r) => {
|
|
21316
22080
|
_resolve = _r;
|
|
@@ -21318,7 +22082,7 @@ export class CSPFoundation {
|
|
|
21318
22082
|
var _callbackPtr;
|
|
21319
22083
|
var _callback = (_stateObject__, result) => {
|
|
21320
22084
|
var _resultPtr = getNativePointer(result);
|
|
21321
|
-
var _resultInstance = new Systems.
|
|
22085
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21322
22086
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21323
22087
|
return;
|
|
21324
22088
|
}
|
|
@@ -21326,19 +22090,18 @@ export class CSPFoundation {
|
|
|
21326
22090
|
Module.removeFunction(_callbackPtr);
|
|
21327
22091
|
};
|
|
21328
22092
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21329
|
-
Module.ccall("
|
|
22093
|
+
Module.ccall("csp_systems_AssetSystem_CreateMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, name, spaceId, _callbackPtr, 0]);
|
|
21330
22094
|
return _promise;
|
|
21331
22095
|
}
|
|
21332
22096
|
/**
|
|
21333
|
-
* @description
|
|
21334
|
-
*
|
|
21335
|
-
*
|
|
21336
|
-
*
|
|
21337
|
-
* @param
|
|
21338
|
-
* @param
|
|
21339
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22097
|
+
* @description Updates an existing material's properties.
|
|
22098
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22099
|
+
* If the material doesn't exist, EResultCode::Failed will be returned.
|
|
22100
|
+
* If the material hasn't changed, EResultCode::Success will still be returned.
|
|
22101
|
+
* @param material - The material to update
|
|
22102
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21340
22103
|
*/
|
|
21341
|
-
async
|
|
22104
|
+
async updateMaterial(material) {
|
|
21342
22105
|
var _resolve;
|
|
21343
22106
|
var _promise = new Promise((_r) => {
|
|
21344
22107
|
_resolve = _r;
|
|
@@ -21346,7 +22109,7 @@ export class CSPFoundation {
|
|
|
21346
22109
|
var _callbackPtr;
|
|
21347
22110
|
var _callback = (_stateObject__, result) => {
|
|
21348
22111
|
var _resultPtr = getNativePointer(result);
|
|
21349
|
-
var _resultInstance = new Systems.
|
|
22112
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21350
22113
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21351
22114
|
return;
|
|
21352
22115
|
}
|
|
@@ -21354,26 +22117,16 @@ export class CSPFoundation {
|
|
|
21354
22117
|
Module.removeFunction(_callbackPtr);
|
|
21355
22118
|
};
|
|
21356
22119
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21357
|
-
Module.ccall("
|
|
21358
|
-
this.pointer,
|
|
21359
|
-
assetCollectionIds.pointer,
|
|
21360
|
-
assetIds != null ? assetIds.pointer : 0,
|
|
21361
|
-
assetNames != null ? assetNames.pointer : 0,
|
|
21362
|
-
assetTypes != null ? assetTypes.pointer : 0,
|
|
21363
|
-
_callbackPtr,
|
|
21364
|
-
0,
|
|
21365
|
-
]);
|
|
22120
|
+
Module.ccall("csp_systems_AssetSystem_UpdateMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21366
22121
|
return _promise;
|
|
21367
22122
|
}
|
|
21368
22123
|
/**
|
|
21369
|
-
* @description
|
|
21370
|
-
*
|
|
21371
|
-
* @param
|
|
21372
|
-
* @param
|
|
21373
|
-
* AssetDataSource is an interface. A derived class must be passed.
|
|
21374
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22124
|
+
* @description Deletes a given material.
|
|
22125
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22126
|
+
* @param material - The material to delete
|
|
22127
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21375
22128
|
*/
|
|
21376
|
-
async
|
|
22129
|
+
async deleteMaterial(material) {
|
|
21377
22130
|
var _resolve;
|
|
21378
22131
|
var _promise = new Promise((_r) => {
|
|
21379
22132
|
_resolve = _r;
|
|
@@ -21381,37 +22134,23 @@ export class CSPFoundation {
|
|
|
21381
22134
|
var _callbackPtr;
|
|
21382
22135
|
var _callback = (_stateObject__, result) => {
|
|
21383
22136
|
var _resultPtr = getNativePointer(result);
|
|
21384
|
-
var _resultInstance = new Systems.
|
|
22137
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21385
22138
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21386
|
-
if (progressCallback != null) {
|
|
21387
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21388
|
-
}
|
|
21389
22139
|
return;
|
|
21390
22140
|
}
|
|
21391
22141
|
_resolve(_resultInstance);
|
|
21392
22142
|
Module.removeFunction(_callbackPtr);
|
|
21393
22143
|
};
|
|
21394
22144
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21395
|
-
Module.ccall("
|
|
21396
|
-
this.pointer,
|
|
21397
|
-
assetCollection.pointer,
|
|
21398
|
-
asset.pointer,
|
|
21399
|
-
assetDataSource.pointer,
|
|
21400
|
-
_callbackPtr,
|
|
21401
|
-
0,
|
|
21402
|
-
]);
|
|
22145
|
+
Module.ccall("csp_systems_AssetSystem_DeleteMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21403
22146
|
return _promise;
|
|
21404
22147
|
}
|
|
21405
22148
|
/**
|
|
21406
|
-
* @description
|
|
21407
|
-
* @param
|
|
21408
|
-
* @param
|
|
21409
|
-
* @param assetDataSource - Asset data to upload
|
|
21410
|
-
* AssetDataSource is an interface. A derived class must be passed.
|
|
21411
|
-
* @param cancellationToken - Token for cancelling upload
|
|
21412
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22149
|
+
* @description Gets all materials associated with the given space.
|
|
22150
|
+
* @param spaceId - The space id the material is associated with.
|
|
22151
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21413
22152
|
*/
|
|
21414
|
-
async
|
|
22153
|
+
async getMaterials(spaceId) {
|
|
21415
22154
|
var _resolve;
|
|
21416
22155
|
var _promise = new Promise((_r) => {
|
|
21417
22156
|
_resolve = _r;
|
|
@@ -21419,34 +22158,24 @@ export class CSPFoundation {
|
|
|
21419
22158
|
var _callbackPtr;
|
|
21420
22159
|
var _callback = (_stateObject__, result) => {
|
|
21421
22160
|
var _resultPtr = getNativePointer(result);
|
|
21422
|
-
var _resultInstance = new Systems.
|
|
22161
|
+
var _resultInstance = new Systems.GLTFMaterialsResult(_resultPtr);
|
|
21423
22162
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21424
|
-
if (progressCallback != null) {
|
|
21425
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21426
|
-
}
|
|
21427
22163
|
return;
|
|
21428
22164
|
}
|
|
21429
22165
|
_resolve(_resultInstance);
|
|
21430
22166
|
Module.removeFunction(_callbackPtr);
|
|
21431
22167
|
};
|
|
21432
22168
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21433
|
-
Module.ccall("
|
|
21434
|
-
this.pointer,
|
|
21435
|
-
assetCollection.pointer,
|
|
21436
|
-
asset.pointer,
|
|
21437
|
-
assetDataSource.pointer,
|
|
21438
|
-
cancellationToken.pointer,
|
|
21439
|
-
_callbackPtr,
|
|
21440
|
-
0,
|
|
21441
|
-
]);
|
|
22169
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterials_void_StringRC_GLTFMaterialsResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, spaceId, _callbackPtr, 0]);
|
|
21442
22170
|
return _promise;
|
|
21443
22171
|
}
|
|
21444
22172
|
/**
|
|
21445
|
-
* @description
|
|
21446
|
-
* @param
|
|
21447
|
-
* @param
|
|
22173
|
+
* @description Gets a material using its AssetCollection and Asset Id.
|
|
22174
|
+
* @param assetCollectionId - The asset collection id this material is associated with.
|
|
22175
|
+
* @param assetId - The asset id this material is associated with.
|
|
22176
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21448
22177
|
*/
|
|
21449
|
-
async
|
|
22178
|
+
async getMaterial(assetCollectionId, assetId) {
|
|
21450
22179
|
var _resolve;
|
|
21451
22180
|
var _promise = new Promise((_r) => {
|
|
21452
22181
|
_resolve = _r;
|
|
@@ -21454,7 +22183,7 @@ export class CSPFoundation {
|
|
|
21454
22183
|
var _callbackPtr;
|
|
21455
22184
|
var _callback = (_stateObject__, result) => {
|
|
21456
22185
|
var _resultPtr = getNativePointer(result);
|
|
21457
|
-
var _resultInstance = new Systems.
|
|
22186
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21458
22187
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21459
22188
|
return;
|
|
21460
22189
|
}
|
|
@@ -21462,126 +22191,392 @@ export class CSPFoundation {
|
|
|
21462
22191
|
Module.removeFunction(_callbackPtr);
|
|
21463
22192
|
};
|
|
21464
22193
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21465
|
-
Module.ccall("
|
|
22194
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21466
22195
|
return _promise;
|
|
21467
22196
|
}
|
|
21468
22197
|
/**
|
|
21469
|
-
* @description
|
|
21470
|
-
* @param
|
|
21471
|
-
|
|
21472
|
-
|
|
22198
|
+
* @description Sets a callback for an asset changed event.
|
|
22199
|
+
* @param callback - Callback to receive data for the asset that has been changed.
|
|
22200
|
+
*/
|
|
22201
|
+
setAssetDetailBlobChangedCallback(callback) {
|
|
22202
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22203
|
+
var _arg1 = new Multiplayer.AssetDetailBlobParams(getNativePointer(arg1));
|
|
22204
|
+
callback(_arg1);
|
|
22205
|
+
};
|
|
22206
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22207
|
+
Module.ccall("csp_systems_AssetSystem_SetAssetDetailBlobChangedCallback_void_AssetDetailBlobChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22208
|
+
}
|
|
22209
|
+
/**
|
|
22210
|
+
* @description Sets a callback for a material changed event.
|
|
22211
|
+
* @param callback - Callback to receive data for the material that has been changed.
|
|
22212
|
+
*/
|
|
22213
|
+
setMaterialChangedCallback(callback) {
|
|
22214
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22215
|
+
var _arg1 = new Multiplayer.MaterialChangedParams(getNativePointer(arg1));
|
|
22216
|
+
callback(_arg1);
|
|
22217
|
+
};
|
|
22218
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22219
|
+
Module.ccall("csp_systems_AssetSystem_SetMaterialChangedCallback_void_MaterialChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22220
|
+
}
|
|
22221
|
+
/**
|
|
22222
|
+
* @description Registers the system to listen for the named event.
|
|
22223
|
+
*/
|
|
22224
|
+
registerSystemCallback() {
|
|
22225
|
+
Module.ccall("csp_systems_AssetSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22226
|
+
}
|
|
22227
|
+
/**
|
|
22228
|
+
* @description Deregisters the system from listening for the named event.
|
|
22229
|
+
*/
|
|
22230
|
+
deregisterSystemCallback() {
|
|
22231
|
+
Module.ccall("csp_systems_AssetSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22232
|
+
}
|
|
22233
|
+
}
|
|
22234
|
+
Systems.AssetSystem = AssetSystem;
|
|
22235
|
+
})(Systems || (Systems = {}));
|
|
22236
|
+
(function (Systems) {
|
|
22237
|
+
/**
|
|
22238
|
+
@ingroup Asset System
|
|
22239
|
+
* @description Data class which represents a GLTF material.
|
|
22240
|
+
*/
|
|
22241
|
+
class GLTFMaterial extends Systems.Material {
|
|
22242
|
+
/** @internal */
|
|
22243
|
+
constructor(pointer) {
|
|
22244
|
+
super(pointer);
|
|
22245
|
+
}
|
|
22246
|
+
static fromMaterial(baseInstance) {
|
|
22247
|
+
const nativeClassWrapper = baseInstance;
|
|
22248
|
+
return new Systems.GLTFMaterial(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22249
|
+
}
|
|
22250
|
+
/**
|
|
22251
|
+
* Sets how to alpha value is interpreted
|
|
22252
|
+
* @param mode - EAlphaMode
|
|
22253
|
+
*/
|
|
22254
|
+
setAlphaMode(mode) {
|
|
22255
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaMode_void_EAlphaMode", "void", ["number", "number"], [this.pointer, mode]);
|
|
22256
|
+
}
|
|
22257
|
+
/**
|
|
22258
|
+
* Gets how to alpha value is interpreted
|
|
22259
|
+
* @return EAlphaMode
|
|
22260
|
+
*/
|
|
22261
|
+
getAlphaMode() {
|
|
22262
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaModeC_EAlphaMode", "number", ["number"], [this.pointer]);
|
|
22263
|
+
return _result;
|
|
22264
|
+
}
|
|
22265
|
+
/**
|
|
22266
|
+
* @description Sets the alpha cutoff value
|
|
22267
|
+
* When alphaMode is set to MASK the alphaCutoff property specifies the cutoff threshold.
|
|
22268
|
+
* If the alpha value is greater than or equal to the alphaCutoff value then it is rendered as fully opaque,
|
|
22269
|
+
* otherwise, it is rendered as fully transparent. alphaCutoff value is ignored for other modes.
|
|
22270
|
+
* @param cutoff - Float
|
|
22271
|
+
*/
|
|
22272
|
+
setAlphaCutoff(cutoff) {
|
|
22273
|
+
assert(cutoff >= Limits.FLOAT_MIN);
|
|
22274
|
+
assert(cutoff <= Limits.FLOAT_MAX);
|
|
22275
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaCutoff_void_float", "void", ["number", "number"], [this.pointer, cutoff]);
|
|
22276
|
+
}
|
|
22277
|
+
/**
|
|
22278
|
+
* Gets the alpha cutoff value
|
|
22279
|
+
* @return Float
|
|
22280
|
+
*/
|
|
22281
|
+
getAlphaCutoff() {
|
|
22282
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaCutoffC_float", "number", ["number"], [this.pointer]);
|
|
22283
|
+
return _result;
|
|
22284
|
+
}
|
|
22285
|
+
/**
|
|
22286
|
+
* @description Sets the doubleSided property which specifies whether the material is double sided.
|
|
22287
|
+
* When this value is false, back - face culling is enabled, i.e., only front-facing triangles are rendered.
|
|
22288
|
+
* When this value is true, back - face culling is disabled and double sided lighting is enabled.
|
|
22289
|
+
* @param doubleSided - Bool
|
|
22290
|
+
*/
|
|
22291
|
+
setDoubleSided(doubleSided) {
|
|
22292
|
+
Module.ccall("csp_systems_GLTFMaterial_SetDoubleSided_void_bool", "void", ["number", "boolean"], [this.pointer, doubleSided]);
|
|
22293
|
+
}
|
|
22294
|
+
/**
|
|
22295
|
+
* @description Gets the double sided value
|
|
22296
|
+
* @return Bool
|
|
22297
|
+
*/
|
|
22298
|
+
getDoubleSided() {
|
|
22299
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetDoubleSidedC_bool", "boolean", ["number"], [this.pointer]);
|
|
22300
|
+
return _result;
|
|
22301
|
+
}
|
|
22302
|
+
/**
|
|
22303
|
+
* @description Sets the factors for the base color of the material.
|
|
22304
|
+
* This value defines linear multipliers for the sampled texels of the base color texture.
|
|
22305
|
+
* @param factor - Const csp::common::vector4&
|
|
22306
|
+
*/
|
|
22307
|
+
setBaseColorFactor(factor) {
|
|
22308
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorFactor_void_Vector4RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22309
|
+
}
|
|
22310
|
+
/**
|
|
22311
|
+
* @description Gets the factor of the base color texture
|
|
22312
|
+
* @return Csp::common::vector4&
|
|
22313
|
+
*/
|
|
22314
|
+
getBaseColorFactor() {
|
|
22315
|
+
var _ret = Module._malloc(8);
|
|
22316
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorFactorC_Vector4RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22317
|
+
var _nPtr = new Common.Vector4(getNativePointer(_ret));
|
|
22318
|
+
Module._free(_ret);
|
|
22319
|
+
return _nPtr;
|
|
22320
|
+
}
|
|
22321
|
+
/**
|
|
22322
|
+
* @description Sets the factor for the metalness of the material.
|
|
22323
|
+
* This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.
|
|
22324
|
+
* @param factor - Float
|
|
22325
|
+
*/
|
|
22326
|
+
setMetallicFactor(factor) {
|
|
22327
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22328
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22329
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22330
|
+
}
|
|
22331
|
+
/**
|
|
22332
|
+
* @description Gets the factor of the metallic texture
|
|
22333
|
+
* @return Float
|
|
22334
|
+
*/
|
|
22335
|
+
getMetallicFactor() {
|
|
22336
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetMetallicFactorC_float", "number", ["number"], [this.pointer]);
|
|
22337
|
+
return _result;
|
|
22338
|
+
}
|
|
22339
|
+
/**
|
|
22340
|
+
* @description Sets the factor for the roughness of the material.
|
|
22341
|
+
* This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.
|
|
22342
|
+
* @param factor - Float
|
|
22343
|
+
*/
|
|
22344
|
+
setRoughnessFactor(factor) {
|
|
22345
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22346
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22347
|
+
Module.ccall("csp_systems_GLTFMaterial_SetRoughnessFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22348
|
+
}
|
|
22349
|
+
/**
|
|
22350
|
+
* @description Gets the factor of the roughness texture
|
|
22351
|
+
* @return Float
|
|
22352
|
+
*/
|
|
22353
|
+
getRoughnessFactor() {
|
|
22354
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetRoughnessFactorC_float", "number", ["number"], [this.pointer]);
|
|
22355
|
+
return _result;
|
|
22356
|
+
}
|
|
22357
|
+
/**
|
|
22358
|
+
* @description Sets factors for the emissive color of the material.
|
|
22359
|
+
* This value defines linear multipliers for the sampled texels of the emissive texture.
|
|
22360
|
+
* @param factor - Const csp::common::vector3&
|
|
22361
|
+
*/
|
|
22362
|
+
setEmissiveFactor(factor) {
|
|
22363
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveFactor_void_Vector3RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22364
|
+
}
|
|
22365
|
+
/**
|
|
22366
|
+
* @description Gets the factor of the emissive color texture
|
|
22367
|
+
* @return Csp::common::vector3&
|
|
22368
|
+
*/
|
|
22369
|
+
getEmissiveFactor() {
|
|
22370
|
+
var _ret = Module._malloc(8);
|
|
22371
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveFactorC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22372
|
+
var _nPtr = new Common.Vector3(getNativePointer(_ret));
|
|
22373
|
+
Module._free(_ret);
|
|
22374
|
+
return _nPtr;
|
|
22375
|
+
}
|
|
22376
|
+
/**
|
|
22377
|
+
* @description Sets the base color texture. The first three components (RGB) MUST be encoded with the sRGB transfer function.
|
|
22378
|
+
* They specify the base color of the material.
|
|
22379
|
+
* If the fourth component (A) is present, it represents the linear alpha coverage of the material.
|
|
22380
|
+
* Otherwise, the alpha coverage is equal to 1.0. The material.alphaMode property specifies how alpha is interpreted.
|
|
22381
|
+
* The stored texels MUST NOT be premultiplied.
|
|
22382
|
+
* When undefined, the texture MUST be sampled as having 1.0 in all components.
|
|
22383
|
+
* @param texture - Const textureinfo&
|
|
22384
|
+
*/
|
|
22385
|
+
setBaseColorTexture(texture) {
|
|
22386
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22387
|
+
}
|
|
22388
|
+
/**
|
|
22389
|
+
* @description Gets the base color texture
|
|
22390
|
+
* @return Const textureinfo&
|
|
22391
|
+
*/
|
|
22392
|
+
getBaseColorTexture() {
|
|
22393
|
+
var _ret = Module._malloc(8);
|
|
22394
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22395
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22396
|
+
Module._free(_ret);
|
|
22397
|
+
return _nPtr;
|
|
22398
|
+
}
|
|
22399
|
+
/**
|
|
22400
|
+
* @description Sets the metallic-roughness texture.
|
|
22401
|
+
* The metalness values are sampled from the B channel.
|
|
22402
|
+
* The roughness values are sampled from the G channel.
|
|
22403
|
+
* These values MUST be encoded with a linear transfer function.
|
|
22404
|
+
* If other channels are present (R or A), they MUST be ignored for metallic-roughness calculations.
|
|
22405
|
+
* When undefined, the texture MUST be sampled as having 1.0 in G and B components.
|
|
22406
|
+
* @param texture - Const textureinfo&
|
|
22407
|
+
*/
|
|
22408
|
+
setMetallicRoughnessTexture(texture) {
|
|
22409
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicRoughnessTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22410
|
+
}
|
|
22411
|
+
/**
|
|
22412
|
+
* @description Gets the metallic-roughness texture
|
|
22413
|
+
* @return Const textureinfo&
|
|
22414
|
+
*/
|
|
22415
|
+
getMetallicRoughnessTexture() {
|
|
22416
|
+
var _ret = Module._malloc(8);
|
|
22417
|
+
Module.ccall("csp_systems_GLTFMaterial_GetMetallicRoughnessTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22418
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22419
|
+
Module._free(_ret);
|
|
22420
|
+
return _nPtr;
|
|
22421
|
+
}
|
|
22422
|
+
/**
|
|
22423
|
+
* @description Sets the tangent space normal texture.
|
|
22424
|
+
* The texture encodes RGB components with linear transfer function.
|
|
22425
|
+
* Each texel represents the XYZ components of a normal vector in tangent space.
|
|
22426
|
+
* The normal vectors use the convention +X is right and +Y is up. +Z points toward the viewer.
|
|
22427
|
+
* If a fourth component (A) is present, it MUST be ignored. When undefined, the material does not have a tangent space normal texture.
|
|
22428
|
+
* @param texture - Const textureinfo&
|
|
22429
|
+
*/
|
|
22430
|
+
setNormalTexture(texture) {
|
|
22431
|
+
Module.ccall("csp_systems_GLTFMaterial_SetNormalTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22432
|
+
}
|
|
22433
|
+
/**
|
|
22434
|
+
* @description Gets the tangent space normal texture.
|
|
22435
|
+
* @return Const textureinfo&
|
|
22436
|
+
*/
|
|
22437
|
+
getNormalTexture() {
|
|
22438
|
+
var _ret = Module._malloc(8);
|
|
22439
|
+
Module.ccall("csp_systems_GLTFMaterial_GetNormalTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22440
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22441
|
+
Module._free(_ret);
|
|
22442
|
+
return _nPtr;
|
|
22443
|
+
}
|
|
22444
|
+
/**
|
|
22445
|
+
* @description Sets the occlusion texture.
|
|
22446
|
+
* The occlusion values are linearly sampled from the R channel.
|
|
22447
|
+
* Higher values indicate areas that receive full indirect lighting and lower values indicate no indirect lighting.
|
|
22448
|
+
* If other channels are present (GBA), they MUST be ignored for occlusion calculations.
|
|
22449
|
+
* When undefined, the material does not have an occlusion texture.
|
|
22450
|
+
* @param texture - Const textureinfo&
|
|
21473
22451
|
*/
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
var _promise = new Promise((_r) => {
|
|
21477
|
-
_resolve = _r;
|
|
21478
|
-
});
|
|
21479
|
-
var _callbackPtr;
|
|
21480
|
-
var _callback = (_stateObject__, result) => {
|
|
21481
|
-
var _resultPtr = getNativePointer(result);
|
|
21482
|
-
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21483
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21484
|
-
return;
|
|
21485
|
-
}
|
|
21486
|
-
_resolve(_resultInstance);
|
|
21487
|
-
Module.removeFunction(_callbackPtr);
|
|
21488
|
-
};
|
|
21489
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21490
|
-
Module.ccall("csp_systems_AssetSystem_DownloadAssetDataEx_void_AssetRC_CancellationTokenR_AssetDataResultCallback", "void", ["number", "number", "number", "number", "number"], [
|
|
21491
|
-
this.pointer,
|
|
21492
|
-
asset.pointer,
|
|
21493
|
-
cancellationToken.pointer,
|
|
21494
|
-
_callbackPtr,
|
|
21495
|
-
0,
|
|
21496
|
-
]);
|
|
21497
|
-
return _promise;
|
|
22452
|
+
setOcclusionTexture(texture) {
|
|
22453
|
+
Module.ccall("csp_systems_GLTFMaterial_SetOcclusionTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21498
22454
|
}
|
|
21499
22455
|
/**
|
|
21500
|
-
* @description
|
|
21501
|
-
* @
|
|
21502
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22456
|
+
* @description Gets the occlusion texture
|
|
22457
|
+
* @return Const textureinfo&
|
|
21503
22458
|
*/
|
|
21504
|
-
|
|
21505
|
-
var
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
var _callback = (_stateObject__, result) => {
|
|
21511
|
-
var _resultPtr = getNativePointer(result);
|
|
21512
|
-
var _resultInstance = new Systems.UInt64Result(_resultPtr);
|
|
21513
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21514
|
-
return;
|
|
21515
|
-
}
|
|
21516
|
-
_resolve(_resultInstance);
|
|
21517
|
-
Module.removeFunction(_callbackPtr);
|
|
21518
|
-
};
|
|
21519
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21520
|
-
Module.ccall("csp_systems_AssetSystem_GetAssetDataSize_void_AssetRC_UInt64ResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21521
|
-
return _promise;
|
|
22459
|
+
getOcclusionTexture() {
|
|
22460
|
+
var _ret = Module._malloc(8);
|
|
22461
|
+
Module.ccall("csp_systems_GLTFMaterial_GetOcclusionTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22462
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22463
|
+
Module._free(_ret);
|
|
22464
|
+
return _nPtr;
|
|
21522
22465
|
}
|
|
21523
22466
|
/**
|
|
21524
|
-
* @description
|
|
21525
|
-
*
|
|
21526
|
-
*
|
|
22467
|
+
* @description Sets the emissive texture.
|
|
22468
|
+
* It controls the color and intensity of the light being emitted by the material.
|
|
22469
|
+
* This texture contains RGB components encoded with the sRGB transfer function.
|
|
22470
|
+
* If a fourth component (A) is present, it MUST be ignored.
|
|
22471
|
+
* When undefined, the texture MUST be sampled as having 1.0 in RGB components.
|
|
22472
|
+
* @param texture - Const textureinfo&
|
|
21527
22473
|
*/
|
|
21528
|
-
|
|
21529
|
-
|
|
21530
|
-
var _promise = new Promise((_r) => {
|
|
21531
|
-
_resolve = _r;
|
|
21532
|
-
});
|
|
21533
|
-
var _callbackPtr;
|
|
21534
|
-
var _callback = (_stateObject__, result) => {
|
|
21535
|
-
var _resultPtr = getNativePointer(result);
|
|
21536
|
-
var _resultInstance = new Systems.LODChainResult(_resultPtr);
|
|
21537
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21538
|
-
return;
|
|
21539
|
-
}
|
|
21540
|
-
_resolve(_resultInstance);
|
|
21541
|
-
Module.removeFunction(_callbackPtr);
|
|
21542
|
-
};
|
|
21543
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21544
|
-
Module.ccall("csp_systems_AssetSystem_GetLODChain_void_AssetCollectionRC_LODChainResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21545
|
-
return _promise;
|
|
22474
|
+
setEmissiveTexture(texture) {
|
|
22475
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21546
22476
|
}
|
|
21547
22477
|
/**
|
|
21548
|
-
* @description
|
|
21549
|
-
* @
|
|
21550
|
-
* @param asset - Asset to register as LOD
|
|
21551
|
-
* @param asset - LOD level for Asset to be registered to
|
|
21552
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22478
|
+
* @description Gets the emissive texture
|
|
22479
|
+
* @return Const textureinfo&
|
|
21553
22480
|
*/
|
|
21554
|
-
|
|
21555
|
-
var
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
|
|
21562
|
-
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
|
|
21580
|
-
|
|
21581
|
-
|
|
22481
|
+
getEmissiveTexture() {
|
|
22482
|
+
var _ret = Module._malloc(8);
|
|
22483
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22484
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22485
|
+
Module._free(_ret);
|
|
22486
|
+
return _nPtr;
|
|
22487
|
+
}
|
|
22488
|
+
/**
|
|
22489
|
+
* @description Constructor which links the material to an asset
|
|
22490
|
+
* @param name - The name of the material.
|
|
22491
|
+
* @param assetCollectionId - The asset collection where the material info is stored
|
|
22492
|
+
* @param assetId - The asset where the material info is stored
|
|
22493
|
+
*/
|
|
22494
|
+
static create_name_assetCollectionId_assetId(name, assetCollectionId, assetId) {
|
|
22495
|
+
var _ptr = Module._malloc(8);
|
|
22496
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, assetCollectionId, assetId]);
|
|
22497
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22498
|
+
return new GLTFMaterial(_nPtr);
|
|
22499
|
+
}
|
|
22500
|
+
static create() {
|
|
22501
|
+
var _ptr = Module._malloc(8);
|
|
22502
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor", "void", ["number"], [_ptr]);
|
|
22503
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22504
|
+
return new GLTFMaterial(_nPtr);
|
|
22505
|
+
}
|
|
22506
|
+
delete() {
|
|
22507
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22508
|
+
Module.ccall("csp_systems_GLTFMaterial_Dtor", "void", ["number"], [this.pointer]);
|
|
22509
|
+
this.disposed = true;
|
|
22510
|
+
}
|
|
21582
22511
|
}
|
|
21583
22512
|
}
|
|
21584
|
-
Systems.
|
|
22513
|
+
Systems.GLTFMaterial = GLTFMaterial;
|
|
22514
|
+
})(Systems || (Systems = {}));
|
|
22515
|
+
(function (Systems) {
|
|
22516
|
+
/**
|
|
22517
|
+
@ingroup Asset System
|
|
22518
|
+
* @description Data class used to contain information when attempting to download material data.
|
|
22519
|
+
*/
|
|
22520
|
+
class GLTFMaterialResult extends Systems.ResultBase {
|
|
22521
|
+
/** @internal */
|
|
22522
|
+
constructor(pointer) {
|
|
22523
|
+
super(pointer);
|
|
22524
|
+
}
|
|
22525
|
+
static fromResultBase(baseInstance) {
|
|
22526
|
+
const nativeClassWrapper = baseInstance;
|
|
22527
|
+
return new Systems.GLTFMaterialResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22528
|
+
}
|
|
22529
|
+
/**
|
|
22530
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22531
|
+
*/
|
|
22532
|
+
getGLTFMaterial() {
|
|
22533
|
+
var _ret = Module._malloc(8);
|
|
22534
|
+
Module.ccall("csp_systems_GLTFMaterialResult_GetGLTFMaterialC_GLTFMaterialRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22535
|
+
var _nPtr = new Systems.GLTFMaterial(getNativePointer(_ret));
|
|
22536
|
+
Module._free(_ret);
|
|
22537
|
+
return _nPtr;
|
|
22538
|
+
}
|
|
22539
|
+
delete() {
|
|
22540
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22541
|
+
Module.ccall("csp_systems_GLTFMaterialResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22542
|
+
this.disposed = true;
|
|
22543
|
+
}
|
|
22544
|
+
}
|
|
22545
|
+
}
|
|
22546
|
+
Systems.GLTFMaterialResult = GLTFMaterialResult;
|
|
22547
|
+
})(Systems || (Systems = {}));
|
|
22548
|
+
(function (Systems) {
|
|
22549
|
+
/**
|
|
22550
|
+
@ingroup Asset System
|
|
22551
|
+
* @description Data class used to contain information when attempting to download a collection of material data.
|
|
22552
|
+
*/
|
|
22553
|
+
class GLTFMaterialsResult extends Systems.ResultBase {
|
|
22554
|
+
/** @internal */
|
|
22555
|
+
constructor(pointer) {
|
|
22556
|
+
super(pointer);
|
|
22557
|
+
}
|
|
22558
|
+
static fromResultBase(baseInstance) {
|
|
22559
|
+
const nativeClassWrapper = baseInstance;
|
|
22560
|
+
return new Systems.GLTFMaterialsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22561
|
+
}
|
|
22562
|
+
/**
|
|
22563
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22564
|
+
*/
|
|
22565
|
+
getGLTFMaterials() {
|
|
22566
|
+
var _ret = Module._malloc(8);
|
|
22567
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_GetGLTFMaterialsC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22568
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
22569
|
+
Module._free(_ret);
|
|
22570
|
+
return _nPtr;
|
|
22571
|
+
}
|
|
22572
|
+
delete() {
|
|
22573
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22574
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22575
|
+
this.disposed = true;
|
|
22576
|
+
}
|
|
22577
|
+
}
|
|
22578
|
+
}
|
|
22579
|
+
Systems.GLTFMaterialsResult = GLTFMaterialsResult;
|
|
21585
22580
|
})(Systems || (Systems = {}));
|
|
21586
22581
|
(function (Systems) {
|
|
21587
22582
|
/**
|
|
@@ -22745,9 +23740,9 @@ export class CSPFoundation {
|
|
|
22745
23740
|
const nativeClassWrapper = baseInstance;
|
|
22746
23741
|
return new Systems.HotspotSequenceSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22747
23742
|
}
|
|
22748
|
-
static
|
|
23743
|
+
static create_sequenceSystem_spaceSystem_eventBus(sequenceSystem, spaceSystem, eventBus) {
|
|
22749
23744
|
var _ptr = Module._malloc(8);
|
|
22750
|
-
Module.ccall("
|
|
23745
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_Ctor_SequenceSystemP_SpaceSystemP_EventBusP", "void", ["number", "number", "number", "number"], [_ptr, sequenceSystem.pointer, spaceSystem.pointer, eventBus.pointer]);
|
|
22751
23746
|
var _nPtr = getNativePointer(_ptr);
|
|
22752
23747
|
return new HotspotSequenceSystem(_nPtr);
|
|
22753
23748
|
}
|
|
@@ -22928,6 +23923,30 @@ export class CSPFoundation {
|
|
|
22928
23923
|
Module.ccall("csp_systems_HotspotSequenceSystem_RemoveItemFromGroups_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, itemName, _callbackPtr, 0]);
|
|
22929
23924
|
return _promise;
|
|
22930
23925
|
}
|
|
23926
|
+
/**
|
|
23927
|
+
* @description Sets a callback to be fired when a hotspot sequence is changed.
|
|
23928
|
+
* @param callback - Callback to receive data for the hotspot sequence that has been changed.
|
|
23929
|
+
*/
|
|
23930
|
+
setHotspotSequenceChangedCallback(callback) {
|
|
23931
|
+
var _callback = (_stateObject__, arg1) => {
|
|
23932
|
+
var _arg1 = new Multiplayer.SequenceHotspotChangedParams(getNativePointer(arg1));
|
|
23933
|
+
callback(_arg1);
|
|
23934
|
+
};
|
|
23935
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
23936
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_SetHotspotSequenceChangedCallback_void_HotspotSequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
23937
|
+
}
|
|
23938
|
+
/**
|
|
23939
|
+
* @description Registers the system to listen for the named event.
|
|
23940
|
+
*/
|
|
23941
|
+
registerSystemCallback() {
|
|
23942
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23943
|
+
}
|
|
23944
|
+
/**
|
|
23945
|
+
* @description Deregisters the system from listening for the named event.
|
|
23946
|
+
*/
|
|
23947
|
+
deregisterSystemCallback() {
|
|
23948
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23949
|
+
}
|
|
22931
23950
|
}
|
|
22932
23951
|
Systems.HotspotSequenceSystem = HotspotSequenceSystem;
|
|
22933
23952
|
})(Systems || (Systems = {}));
|
|
@@ -24102,6 +25121,30 @@ export class CSPFoundation {
|
|
|
24102
25121
|
Module.ccall("csp_systems_SequenceSystem_DeleteSequences_void_ArrayRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, sequenceKeys.pointer, _callbackPtr, 0]);
|
|
24103
25122
|
return _promise;
|
|
24104
25123
|
}
|
|
25124
|
+
/**
|
|
25125
|
+
* @description Sets a callback for a sequence changed event.
|
|
25126
|
+
* @param callback - Callback to receive data for the sequence that has been changed.
|
|
25127
|
+
*/
|
|
25128
|
+
setSequenceChangedCallback(callback) {
|
|
25129
|
+
var _callback = (_stateObject__, arg1) => {
|
|
25130
|
+
var _arg1 = new Multiplayer.SequenceChangedParams(getNativePointer(arg1));
|
|
25131
|
+
callback(_arg1);
|
|
25132
|
+
};
|
|
25133
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
25134
|
+
Module.ccall("csp_systems_SequenceSystem_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
25135
|
+
}
|
|
25136
|
+
/**
|
|
25137
|
+
* @description Registers the system to listen for the named event.
|
|
25138
|
+
*/
|
|
25139
|
+
registerSystemCallback() {
|
|
25140
|
+
Module.ccall("csp_systems_SequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25141
|
+
}
|
|
25142
|
+
/**
|
|
25143
|
+
* @description Deregisters the system from listening for the named event.
|
|
25144
|
+
*/
|
|
25145
|
+
deregisterSystemCallback() {
|
|
25146
|
+
Module.ccall("csp_systems_SequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25147
|
+
}
|
|
24105
25148
|
}
|
|
24106
25149
|
Systems.SequenceSystem = SequenceSystem;
|
|
24107
25150
|
})(Systems || (Systems = {}));
|
|
@@ -24915,6 +25958,13 @@ export class CSPFoundation {
|
|
|
24915
25958
|
Module._free(_ret);
|
|
24916
25959
|
return _nPtr;
|
|
24917
25960
|
}
|
|
25961
|
+
getTags() {
|
|
25962
|
+
var _ret = Module._malloc(8);
|
|
25963
|
+
Module.ccall("csp_systems_SpaceMetadataResult_GetTagsC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
25964
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), StringFactory, "String");
|
|
25965
|
+
Module._free(_ret);
|
|
25966
|
+
return _nPtr;
|
|
25967
|
+
}
|
|
24918
25968
|
delete() {
|
|
24919
25969
|
if (this.ownsPointer && !this.disposed) {
|
|
24920
25970
|
Module.ccall("csp_systems_SpaceMetadataResult_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -24945,6 +25995,13 @@ export class CSPFoundation {
|
|
|
24945
25995
|
Module._free(_ret);
|
|
24946
25996
|
return _nPtr;
|
|
24947
25997
|
}
|
|
25998
|
+
getTags() {
|
|
25999
|
+
var _ret = Module._malloc(8);
|
|
26000
|
+
Module.ccall("csp_systems_SpacesMetadataResult_GetTagsC_MapRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
26001
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
26002
|
+
Module._free(_ret);
|
|
26003
|
+
return _nPtr;
|
|
26004
|
+
}
|
|
24948
26005
|
delete() {
|
|
24949
26006
|
if (this.ownsPointer && !this.disposed) {
|
|
24950
26007
|
Module.ccall("csp_systems_SpacesMetadataResult_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -25752,7 +26809,8 @@ export class CSPFoundation {
|
|
|
25752
26809
|
* @description Updates the Space metadata information with the new one provided
|
|
25753
26810
|
* @param spaceId - ID of Space for which the metadata will be updated
|
|
25754
26811
|
* @param newMetadata - New metadata information that will replace the previous one
|
|
25755
|
-
* @param tags -
|
|
26812
|
+
* @param tags - Array of strings that will replace the tags on the space. If unset, the existing tags on
|
|
26813
|
+
* the AssetCollection will be unmodified.
|
|
25756
26814
|
* @param callback - Callback when asynchronous task finishes
|
|
25757
26815
|
*/
|
|
25758
26816
|
async updateSpaceMetadata(spaceId, newMetadata, tags) {
|
|
@@ -26798,7 +27856,8 @@ export class CSPFoundation {
|
|
|
26798
27856
|
* @description Retrieves an array with all the Points of Interest that are located inside the circular area defined by the parameters..
|
|
26799
27857
|
* @param originLocation - The latitude and longitude coordinates of origin of the search location.
|
|
26800
27858
|
* @param areaRadius - The Radius of the circular area to search around the provided origin.
|
|
26801
|
-
* @param type - The type of POI to search for. If none is specified, all types will be included in
|
|
27859
|
+
* @param type - The type of POI to search for. If none is specified, all types will be included in
|
|
27860
|
+
* the returned set.
|
|
26802
27861
|
* @param callback - Callback when asynchronous task finishes.
|
|
26803
27862
|
*/
|
|
26804
27863
|
async getPOIsInArea(originLocation, areaRadius, type) {
|
|
@@ -27738,6 +28797,30 @@ export class CSPFoundation {
|
|
|
27738
28797
|
Module.ccall("csp_systems_UserSystem_GetCheckoutSessionUrl_void_TierNames_StringResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, tier, _callbackPtr, 0]);
|
|
27739
28798
|
return _promise;
|
|
27740
28799
|
}
|
|
28800
|
+
/**
|
|
28801
|
+
* @description Sets a callback for an access control changed event.
|
|
28802
|
+
* @param callback - Callback to receive data for the user permissions that has been changed.
|
|
28803
|
+
*/
|
|
28804
|
+
setUserPermissionsChangedCallback(callback) {
|
|
28805
|
+
var _callback = (_stateObject__, arg1) => {
|
|
28806
|
+
var _arg1 = new Multiplayer.UserPermissionsParams(getNativePointer(arg1));
|
|
28807
|
+
callback(_arg1);
|
|
28808
|
+
};
|
|
28809
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
28810
|
+
Module.ccall("csp_systems_UserSystem_SetUserPermissionsChangedCallback_void_UserPermissionsChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
28811
|
+
}
|
|
28812
|
+
/**
|
|
28813
|
+
* @description Registers the system to listen for the named event.
|
|
28814
|
+
*/
|
|
28815
|
+
registerSystemCallback() {
|
|
28816
|
+
Module.ccall("csp_systems_UserSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28817
|
+
}
|
|
28818
|
+
/**
|
|
28819
|
+
* @description Deregisters the system from listening for the named event.
|
|
28820
|
+
*/
|
|
28821
|
+
deregisterSystemCallback() {
|
|
28822
|
+
Module.ccall("csp_systems_UserSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28823
|
+
}
|
|
27741
28824
|
}
|
|
27742
28825
|
Systems.UserSystem = UserSystem;
|
|
27743
28826
|
})(Systems || (Systems = {}));
|
|
@@ -27819,6 +28902,13 @@ export class CSPFoundation {
|
|
|
27819
28902
|
Module._free(_ret);
|
|
27820
28903
|
return _inst;
|
|
27821
28904
|
}
|
|
28905
|
+
static ofcsp_systems_GLTFMaterial() {
|
|
28906
|
+
var _ret = Module._malloc(8);
|
|
28907
|
+
Module.ccall("csp_common_Array_Ctor_csp_systems_GLTFMaterial", "void", ["number"], [_ret]);
|
|
28908
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
28909
|
+
Module._free(_ret);
|
|
28910
|
+
return _inst;
|
|
28911
|
+
}
|
|
27822
28912
|
static ofcsp_systems_LODAsset() {
|
|
27823
28913
|
var _ret = Module._malloc(8);
|
|
27824
28914
|
Module.ccall("csp_common_Array_Ctor_csp_systems_LODAsset", "void", ["number"], [_ret]);
|
|
@@ -28043,6 +29133,13 @@ export class CSPFoundation {
|
|
|
28043
29133
|
Module._free(_ret);
|
|
28044
29134
|
return _inst;
|
|
28045
29135
|
}
|
|
29136
|
+
static ofcsp_common_Array_String() {
|
|
29137
|
+
var _ret = Module._malloc(8);
|
|
29138
|
+
Module.ccall("csp_common_Array_Ctor_csp_common_Array_String", "void", ["number"], [_ret]);
|
|
29139
|
+
var _inst = new Array(getNativePointer(_ret), csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
29140
|
+
Module._free(_ret);
|
|
29141
|
+
return _inst;
|
|
29142
|
+
}
|
|
28046
29143
|
static ofcsp_multiplayer_ReplicatedValue_number(size) {
|
|
28047
29144
|
var _ret = Module._malloc(8);
|
|
28048
29145
|
Module.ccall("csp_common_Array_Conv_size_tC_csp_multiplayer_ReplicatedValue", "void", ["number", "number"], [_ret, size]);
|
|
@@ -28113,6 +29210,13 @@ export class CSPFoundation {
|
|
|
28113
29210
|
Module._free(_ret);
|
|
28114
29211
|
return _inst;
|
|
28115
29212
|
}
|
|
29213
|
+
static ofcsp_systems_GLTFMaterial_number(size) {
|
|
29214
|
+
var _ret = Module._malloc(8);
|
|
29215
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_GLTFMaterial", "void", ["number", "number"], [_ret, size]);
|
|
29216
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
29217
|
+
Module._free(_ret);
|
|
29218
|
+
return _inst;
|
|
29219
|
+
}
|
|
28116
29220
|
static ofcsp_systems_LODAsset_number(size) {
|
|
28117
29221
|
var _ret = Module._malloc(8);
|
|
28118
29222
|
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_LODAsset", "void", ["number", "number"], [_ret, size]);
|
|
@@ -28337,6 +29441,13 @@ export class CSPFoundation {
|
|
|
28337
29441
|
Module._free(_ret);
|
|
28338
29442
|
return _inst;
|
|
28339
29443
|
}
|
|
29444
|
+
static ofcsp_common_Array_String_number(size) {
|
|
29445
|
+
var _ret = Module._malloc(8);
|
|
29446
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_common_Array_String", "void", ["number", "number"], [_ret, size]);
|
|
29447
|
+
var _inst = new Array(getNativePointer(_ret), csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
29448
|
+
Module._free(_ret);
|
|
29449
|
+
return _inst;
|
|
29450
|
+
}
|
|
28340
29451
|
delete() {
|
|
28341
29452
|
if (this.ownsPointer && !this.disposed) {
|
|
28342
29453
|
Module.ccall(`csp_common_Array_Dtor_${this.TTypeName}`, "void", ["number"], [this.pointer]);
|
|
@@ -28512,10 +29623,10 @@ export class CSPFoundation {
|
|
|
28512
29623
|
Module._free(_ret);
|
|
28513
29624
|
return _inst;
|
|
28514
29625
|
}
|
|
28515
|
-
static
|
|
29626
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue() {
|
|
28516
29627
|
var _ret = Module._malloc(8);
|
|
28517
|
-
Module.ccall("
|
|
28518
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29628
|
+
Module.ccall("csp_common_Map_Ctor_String_csp_multiplayer_ReplicatedValue", "void", ["number"], [_ret]);
|
|
29629
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28519
29630
|
Module._free(_ret);
|
|
28520
29631
|
return _inst;
|
|
28521
29632
|
}
|
|
@@ -28540,6 +29651,13 @@ export class CSPFoundation {
|
|
|
28540
29651
|
Module._free(_ret);
|
|
28541
29652
|
return _inst;
|
|
28542
29653
|
}
|
|
29654
|
+
static ofStringAndcsp_common_Array_String() {
|
|
29655
|
+
var _ret = Module._malloc(8);
|
|
29656
|
+
Module.ccall("csp_common_Map_Ctor_String_csp_common_Array_String", "void", ["number"], [_ret]);
|
|
29657
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
29658
|
+
Module._free(_ret);
|
|
29659
|
+
return _inst;
|
|
29660
|
+
}
|
|
28543
29661
|
static ofUInt32Andcsp_multiplayer_ReplicatedValue_Map(other) {
|
|
28544
29662
|
var _ret = Module._malloc(8);
|
|
28545
29663
|
Module.ccall("csp_common_Map_Ctor_MapRC_UInt32_csp_multiplayer_ReplicatedValue", "void", ["number", "number"], [_ret, other.pointer]);
|
|
@@ -28547,10 +29665,10 @@ export class CSPFoundation {
|
|
|
28547
29665
|
Module._free(_ret);
|
|
28548
29666
|
return _inst;
|
|
28549
29667
|
}
|
|
28550
|
-
static
|
|
29668
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue_Map(other) {
|
|
28551
29669
|
var _ret = Module._malloc(8);
|
|
28552
|
-
Module.ccall("
|
|
28553
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29670
|
+
Module.ccall("csp_common_Map_Ctor_MapRC_String_csp_multiplayer_ReplicatedValue", "void", ["number", "number"], [_ret, other.pointer]);
|
|
29671
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28554
29672
|
Module._free(_ret);
|
|
28555
29673
|
return _inst;
|
|
28556
29674
|
}
|
|
@@ -28575,6 +29693,13 @@ export class CSPFoundation {
|
|
|
28575
29693
|
Module._free(_ret);
|
|
28576
29694
|
return _inst;
|
|
28577
29695
|
}
|
|
29696
|
+
static ofStringAndcsp_common_Array_String_Map(other) {
|
|
29697
|
+
var _ret = Module._malloc(8);
|
|
29698
|
+
Module.ccall("csp_common_Map_Ctor_MapRC_String_csp_common_Array_String", "void", ["number", "number"], [_ret, other.pointer]);
|
|
29699
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_common_Array_StringFactory, "csp_common_Array_String");
|
|
29700
|
+
Module._free(_ret);
|
|
29701
|
+
return _inst;
|
|
29702
|
+
}
|
|
28578
29703
|
delete() {
|
|
28579
29704
|
if (this.ownsPointer && !this.disposed) {
|
|
28580
29705
|
Module.ccall(`csp_common_Map_Dtor_${this.TKeyTypeName}_${this.TValueTypeName}`, "void", ["number"], [this.pointer]);
|