connected-spaces-platform.web 5.7.0 → 5.8.1
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 +229 -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 +724 -181
- package/connectedspacesplatform.js +2249 -1172
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +3969 -2054
- 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
|
}
|
|
@@ -1753,11 +1804,11 @@ function csp_common_Map_UInt32_csp_multiplayer_ReplicatedValueFactory(nativePoin
|
|
|
1753
1804
|
}
|
|
1754
1805
|
ProxyClassFactories["csp_common_Map_UInt32_csp_multiplayer_ReplicatedValue"] =
|
|
1755
1806
|
csp_common_Map_UInt32_csp_multiplayer_ReplicatedValueFactory;
|
|
1756
|
-
function
|
|
1757
|
-
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");
|
|
1758
1809
|
}
|
|
1759
|
-
ProxyClassFactories["
|
|
1760
|
-
|
|
1810
|
+
ProxyClassFactories["csp_common_Map_String_csp_multiplayer_ReplicatedValue"] =
|
|
1811
|
+
csp_common_Map_String_csp_multiplayer_ReplicatedValueFactory;
|
|
1761
1812
|
function csp_common_Map_UInt16_csp_multiplayer_ComponentBaseFactory(nativePointer) {
|
|
1762
1813
|
return new Common.Map(nativePointer, NumberFactory, "UInt16", csp_multiplayer_ComponentBaseFactory, "csp_multiplayer_ComponentBase");
|
|
1763
1814
|
}
|
|
@@ -1923,7 +1974,7 @@ export var Multiplayer;
|
|
|
1923
1974
|
ReplicatedValueType[ReplicatedValueType["Vector3"] = 5] = "Vector3";
|
|
1924
1975
|
ReplicatedValueType[ReplicatedValueType["Vector4"] = 6] = "Vector4";
|
|
1925
1976
|
ReplicatedValueType[ReplicatedValueType["Vector2"] = 7] = "Vector2";
|
|
1926
|
-
ReplicatedValueType[ReplicatedValueType["
|
|
1977
|
+
ReplicatedValueType[ReplicatedValueType["StringMap"] = 8] = "StringMap";
|
|
1927
1978
|
})(ReplicatedValueType = Multiplayer.ReplicatedValueType || (Multiplayer.ReplicatedValueType = {}));
|
|
1928
1979
|
})(Multiplayer || (Multiplayer = {}));
|
|
1929
1980
|
(function (Multiplayer) {
|
|
@@ -2006,7 +2057,8 @@ export var Multiplayer;
|
|
|
2006
2057
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["IsARVisible"] = 11] = "IsARVisible";
|
|
2007
2058
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["ThirdPartyComponentRef"] = 12] = "ThirdPartyComponentRef";
|
|
2008
2059
|
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["IsShadowCaster"] = 13] = "IsShadowCaster";
|
|
2009
|
-
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["
|
|
2060
|
+
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["MaterialOverrides"] = 14] = "MaterialOverrides";
|
|
2061
|
+
AnimatedModelPropertyKeys[AnimatedModelPropertyKeys["Num"] = 15] = "Num";
|
|
2010
2062
|
})(AnimatedModelPropertyKeys = Multiplayer.AnimatedModelPropertyKeys || (Multiplayer.AnimatedModelPropertyKeys = {}));
|
|
2011
2063
|
})(Multiplayer || (Multiplayer = {}));
|
|
2012
2064
|
(function (Multiplayer) {
|
|
@@ -2541,7 +2593,8 @@ export var Multiplayer;
|
|
|
2541
2593
|
StaticModelPropertyKeys[StaticModelPropertyKeys["IsARVisible"] = 7] = "IsARVisible";
|
|
2542
2594
|
StaticModelPropertyKeys[StaticModelPropertyKeys["ThirdPartyComponentRef"] = 8] = "ThirdPartyComponentRef";
|
|
2543
2595
|
StaticModelPropertyKeys[StaticModelPropertyKeys["IsShadowCaster"] = 9] = "IsShadowCaster";
|
|
2544
|
-
StaticModelPropertyKeys[StaticModelPropertyKeys["
|
|
2596
|
+
StaticModelPropertyKeys[StaticModelPropertyKeys["MaterialOverrides"] = 10] = "MaterialOverrides";
|
|
2597
|
+
StaticModelPropertyKeys[StaticModelPropertyKeys["Num"] = 11] = "Num";
|
|
2545
2598
|
})(StaticModelPropertyKeys = Multiplayer.StaticModelPropertyKeys || (Multiplayer.StaticModelPropertyKeys = {}));
|
|
2546
2599
|
})(Multiplayer || (Multiplayer = {}));
|
|
2547
2600
|
(function (Multiplayer) {
|
|
@@ -2713,6 +2766,7 @@ export var Multiplayer;
|
|
|
2713
2766
|
EAssetType[EAssetType["HOLOCAP_AUDIO"] = 7] = "HOLOCAP_AUDIO";
|
|
2714
2767
|
EAssetType[EAssetType["AUDIO"] = 8] = "AUDIO";
|
|
2715
2768
|
EAssetType[EAssetType["GAUSSIAN_SPLAT"] = 9] = "GAUSSIAN_SPLAT";
|
|
2769
|
+
EAssetType[EAssetType["MATERIAL"] = 10] = "MATERIAL";
|
|
2716
2770
|
})(EAssetType = Systems.EAssetType || (Systems.EAssetType = {}));
|
|
2717
2771
|
})(Systems || (Systems = {}));
|
|
2718
2772
|
(function (Systems) {
|
|
@@ -2731,6 +2785,39 @@ export var Multiplayer;
|
|
|
2731
2785
|
EAssetCollectionType[EAssetCollectionType["SPACE_THUMBNAIL"] = 4] = "SPACE_THUMBNAIL";
|
|
2732
2786
|
})(EAssetCollectionType = Systems.EAssetCollectionType || (Systems.EAssetCollectionType = {}));
|
|
2733
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 = {}));
|
|
2734
2821
|
(function (Systems) {
|
|
2735
2822
|
/**
|
|
2736
2823
|
@ingroup Event Ticketing System
|
|
@@ -9319,6 +9406,94 @@ export class CSPFoundation {
|
|
|
9319
9406
|
}
|
|
9320
9407
|
Multiplayer.ComponentBase = ComponentBase;
|
|
9321
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 = {}));
|
|
9322
9497
|
(function (Multiplayer) {
|
|
9323
9498
|
/**
|
|
9324
9499
|
* @description Describes the changes an asset has undergone when the client application is connected to a space.
|
|
@@ -9561,6 +9736,48 @@ export class CSPFoundation {
|
|
|
9561
9736
|
}
|
|
9562
9737
|
Multiplayer.SequenceHotspotChangedParams = SequenceHotspotChangedParams;
|
|
9563
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 = {}));
|
|
9564
9781
|
(function (Multiplayer) {
|
|
9565
9782
|
/**
|
|
9566
9783
|
@ingroup Multiplayer
|
|
@@ -9571,54 +9788,6 @@ export class CSPFoundation {
|
|
|
9571
9788
|
constructor(pointer) {
|
|
9572
9789
|
super(pointer);
|
|
9573
9790
|
}
|
|
9574
|
-
/**
|
|
9575
|
-
* @description Sends a network event by EventName to all currently connected clients.
|
|
9576
|
-
* @param eventName - The identifying name for the event.
|
|
9577
|
-
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9578
|
-
* @param callback - A callback with failure state.
|
|
9579
|
-
*/
|
|
9580
|
-
async sendNetworkEvent(eventName, args) {
|
|
9581
|
-
var _resolve;
|
|
9582
|
-
var _promise = new Promise((_r) => {
|
|
9583
|
-
_resolve = _r;
|
|
9584
|
-
});
|
|
9585
|
-
var _callbackPtr;
|
|
9586
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9587
|
-
_resolve(arg1);
|
|
9588
|
-
Module.removeFunction(_callbackPtr);
|
|
9589
|
-
};
|
|
9590
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9591
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SendNetworkEvent_void_StringRC_ArrayRC_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "number", "number"], [this.pointer, eventName, args.pointer, _callbackPtr, 0]);
|
|
9592
|
-
return _promise;
|
|
9593
|
-
}
|
|
9594
|
-
/**
|
|
9595
|
-
* @description Sends a network event by EventName, to TargetClientId.
|
|
9596
|
-
* @param eventName - The identifying name for the event.
|
|
9597
|
-
* @param args - An array of arguments (ReplicatedValue) to be passed as part of the event payload.
|
|
9598
|
-
* @param targetClientId - The client ID to send the event to.
|
|
9599
|
-
* @param callback - A callback with failure state.
|
|
9600
|
-
*/
|
|
9601
|
-
async sendNetworkEventToClient(eventName, args, targetClientId) {
|
|
9602
|
-
var _resolve;
|
|
9603
|
-
var _promise = new Promise((_r) => {
|
|
9604
|
-
_resolve = _r;
|
|
9605
|
-
});
|
|
9606
|
-
var _callbackPtr;
|
|
9607
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9608
|
-
_resolve(arg1);
|
|
9609
|
-
Module.removeFunction(_callbackPtr);
|
|
9610
|
-
};
|
|
9611
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
9612
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SendNetworkEventToClient_void_StringRC_ArrayRC_uint64_t_ErrorCodeCallbackHandler", "void", ["number", "string", "number", "bigint", "number", "number"], [
|
|
9613
|
-
this.pointer,
|
|
9614
|
-
eventName,
|
|
9615
|
-
args.pointer,
|
|
9616
|
-
targetClientId,
|
|
9617
|
-
_callbackPtr,
|
|
9618
|
-
0,
|
|
9619
|
-
]);
|
|
9620
|
-
return _promise;
|
|
9621
|
-
}
|
|
9622
9791
|
/**
|
|
9623
9792
|
* @description Sets a callback for a disconnection event.
|
|
9624
9793
|
* @param callback - The callback for disconnection, contains a string with a reason for disconnection.
|
|
@@ -9668,87 +9837,6 @@ export class CSPFoundation {
|
|
|
9668
9837
|
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9669
9838
|
Module.ccall("csp_multiplayer_MultiplayerConnection_SetNetworkInterruptionCallback_void_NetworkInterruptionCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9670
9839
|
}
|
|
9671
|
-
/**
|
|
9672
|
-
* @description Sets a callback for an asset changed event.
|
|
9673
|
-
* @param callback - Callback to receive data for the asset that has been changed.
|
|
9674
|
-
*/
|
|
9675
|
-
setAssetDetailBlobChangedCallback(callback) {
|
|
9676
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9677
|
-
var _arg1 = new Multiplayer.AssetDetailBlobParams(getNativePointer(arg1));
|
|
9678
|
-
callback(_arg1);
|
|
9679
|
-
};
|
|
9680
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9681
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetAssetDetailBlobChangedCallback_void_AssetDetailBlobChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9682
|
-
}
|
|
9683
|
-
/**
|
|
9684
|
-
* @description Sets a callback for a conversation new message event.
|
|
9685
|
-
* @param callback - Callback to receive ConversationSystem Data when a message is sent.
|
|
9686
|
-
* Callback will have to reset the callback passed to the system to avoid "dangling objects" after use.
|
|
9687
|
-
*/
|
|
9688
|
-
setConversationSystemCallback(callback) {
|
|
9689
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9690
|
-
var _arg1 = new Multiplayer.ConversationSystemParams(getNativePointer(arg1));
|
|
9691
|
-
callback(_arg1);
|
|
9692
|
-
};
|
|
9693
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9694
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetConversationSystemCallback_void_ConversationSystemCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9695
|
-
}
|
|
9696
|
-
/**
|
|
9697
|
-
* @description Sets a callback for an access control changed event.
|
|
9698
|
-
* @param callback - Callback to receive data for the user permissions that has been changed.
|
|
9699
|
-
*/
|
|
9700
|
-
setUserPermissionsChangedCallback(callback) {
|
|
9701
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9702
|
-
var _arg1 = new Multiplayer.UserPermissionsParams(getNativePointer(arg1));
|
|
9703
|
-
callback(_arg1);
|
|
9704
|
-
};
|
|
9705
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9706
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetUserPermissionsChangedCallback_void_UserPermissionsChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9707
|
-
}
|
|
9708
|
-
/**
|
|
9709
|
-
* @description Sets a callback for a sequence changed event.
|
|
9710
|
-
* @param callback - Callback to receive data for the sequence that has been changed.
|
|
9711
|
-
*/
|
|
9712
|
-
setSequenceChangedCallback(callback) {
|
|
9713
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9714
|
-
var _arg1 = new Multiplayer.SequenceChangedParams(getNativePointer(arg1));
|
|
9715
|
-
callback(_arg1);
|
|
9716
|
-
};
|
|
9717
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9718
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9719
|
-
}
|
|
9720
|
-
/**
|
|
9721
|
-
* @description Sets a callback to be fired when a hotspot sequence is changed.
|
|
9722
|
-
* @param callback - Callback to receive data for the hotspot sequence that has been changed.
|
|
9723
|
-
*/
|
|
9724
|
-
setHotspotSequenceChangedCallback(callback) {
|
|
9725
|
-
var _callback = (_stateObject__, arg1) => {
|
|
9726
|
-
var _arg1 = new Multiplayer.SequenceHotspotChangedParams(getNativePointer(arg1));
|
|
9727
|
-
callback(_arg1);
|
|
9728
|
-
};
|
|
9729
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
9730
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_SetHotspotSequenceChangedCallback_void_HotspotSequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
9731
|
-
}
|
|
9732
|
-
/**
|
|
9733
|
-
* @description Registers a callback to listen for the named event.
|
|
9734
|
-
* @param eventName - The identifying name for the event to listen for.
|
|
9735
|
-
* @param callback - A callback to register for the event which contains the parameter payload data.
|
|
9736
|
-
*/
|
|
9737
|
-
listenNetworkEvent(eventName, callback) {
|
|
9738
|
-
var _callback = (_stateObject__, arg1, arg2) => {
|
|
9739
|
-
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
9740
|
-
callback(arg1, _arg2);
|
|
9741
|
-
};
|
|
9742
|
-
var callbackPtr = Module.addFunction(_callback, "viii");
|
|
9743
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_ListenNetworkEvent_void_StringRC_ParameterisedCallbackHandler", "void", ["number", "string", "number"], [this.pointer, eventName, callbackPtr]);
|
|
9744
|
-
}
|
|
9745
|
-
/**
|
|
9746
|
-
* @description Stops the multiplayer connection from listening for a particular network event.
|
|
9747
|
-
* @param eventName - The identifying name for the event to stop listening for.
|
|
9748
|
-
*/
|
|
9749
|
-
stopListenNetworkEvent(eventName) {
|
|
9750
|
-
Module.ccall("csp_multiplayer_MultiplayerConnection_StopListenNetworkEvent_void_StringRC", "void", ["number", "string"], [this.pointer, eventName]);
|
|
9751
|
-
}
|
|
9752
9840
|
/**
|
|
9753
9841
|
* @description Requests the ClientID.
|
|
9754
9842
|
* @return Uint64_t the clientid for this connection.
|
|
@@ -9902,7 +9990,7 @@ export class CSPFoundation {
|
|
|
9902
9990
|
return new ReplicatedValue(_nPtr);
|
|
9903
9991
|
}
|
|
9904
9992
|
/**
|
|
9905
|
-
* @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.
|
|
9906
9994
|
* @param inMapValue - Initial value.
|
|
9907
9995
|
*/
|
|
9908
9996
|
static create_mapValue(mapValue) {
|
|
@@ -10085,22 +10173,23 @@ export class CSPFoundation {
|
|
|
10085
10173
|
return _nPtr;
|
|
10086
10174
|
}
|
|
10087
10175
|
/**
|
|
10088
|
-
* @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.
|
|
10089
10178
|
* /// Use ReplicatedValue::GetReplicatedValueType to ensure type before accessing.
|
|
10090
10179
|
* /// @return csp::common::Map
|
|
10091
10180
|
*/
|
|
10092
|
-
|
|
10181
|
+
getStringMap() {
|
|
10093
10182
|
var _ret = Module._malloc(8);
|
|
10094
|
-
Module.ccall("
|
|
10095
|
-
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");
|
|
10096
10185
|
Module._free(_ret);
|
|
10097
10186
|
return _nPtr;
|
|
10098
10187
|
}
|
|
10099
10188
|
/**
|
|
10100
|
-
* @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.
|
|
10101
10190
|
*/
|
|
10102
|
-
|
|
10103
|
-
Module.ccall("
|
|
10191
|
+
setStringMap(value) {
|
|
10192
|
+
Module.ccall("csp_multiplayer_ReplicatedValue_SetStringMap_void_MapRC", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
10104
10193
|
}
|
|
10105
10194
|
}
|
|
10106
10195
|
Multiplayer.ReplicatedValue = ReplicatedValue;
|
|
@@ -11136,7 +11225,7 @@ export class CSPFoundation {
|
|
|
11136
11225
|
/**
|
|
11137
11226
|
* @description Custom constructor for the SpaceTransform.
|
|
11138
11227
|
* @param position - The position value for the transform.
|
|
11139
|
-
* @param rotation - The rotation value for the transform.
|
|
11228
|
+
* @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
|
|
11140
11229
|
* @param scale - The scale value for the transform.
|
|
11141
11230
|
*/
|
|
11142
11231
|
static create_position_rotation_scale(position, rotation, scale) {
|
|
@@ -11150,10 +11239,15 @@ export class CSPFoundation {
|
|
|
11150
11239
|
* @param spaceTransform - Transform
|
|
11151
11240
|
*/
|
|
11152
11241
|
// operator==
|
|
11242
|
+
/**
|
|
11243
|
+
* @description Inequality operator
|
|
11244
|
+
* @param spaceTransform - Transform
|
|
11245
|
+
*/
|
|
11246
|
+
// operator!=
|
|
11153
11247
|
/**
|
|
11154
11248
|
* @description Multiplication operator
|
|
11155
11249
|
* @param spaceTransform - Transform
|
|
11156
|
-
* NOTE: This
|
|
11250
|
+
* NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
|
|
11157
11251
|
*/
|
|
11158
11252
|
// operator*
|
|
11159
11253
|
delete() {
|
|
@@ -11261,395 +11355,79 @@ export class CSPFoundation {
|
|
|
11261
11355
|
})(Multiplayer || (Multiplayer = {}));
|
|
11262
11356
|
(function (Multiplayer) {
|
|
11263
11357
|
/**
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
class
|
|
11358
|
+
* @description Manages the script attached to an Entity.
|
|
11359
|
+
* /// Provides functions for setting the script source, subscribing to property changes and messages and other script management.
|
|
11360
|
+
*/
|
|
11361
|
+
class EntityScript extends NativeClassWrapper {
|
|
11268
11362
|
/** @internal */
|
|
11269
11363
|
constructor(pointer) {
|
|
11270
11364
|
super(pointer);
|
|
11271
11365
|
}
|
|
11272
11366
|
/**
|
|
11273
|
-
* @description
|
|
11274
|
-
* @param inMultiPlayerConnection - The connection to be used.
|
|
11367
|
+
* @description Destroy the instance of EntityScript.
|
|
11275
11368
|
*/
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11369
|
+
delete() {
|
|
11370
|
+
if (this.ownsPointer && !this.disposed) {
|
|
11371
|
+
Module.ccall("csp_multiplayer_EntityScript_Dtor", "void", ["number"], [this.pointer]);
|
|
11372
|
+
this.disposed = true;
|
|
11373
|
+
}
|
|
11281
11374
|
}
|
|
11282
11375
|
/**
|
|
11283
|
-
* @description
|
|
11284
|
-
* @param
|
|
11285
|
-
* @param callback - Callback when asynchronous task finishes
|
|
11376
|
+
* @description Sets the source code for the script.
|
|
11377
|
+
* @param scriptSource - The source as a string.
|
|
11286
11378
|
*/
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
var _promise = new Promise((_r) => {
|
|
11290
|
-
_resolve = _r;
|
|
11291
|
-
});
|
|
11292
|
-
var _callbackPtr;
|
|
11293
|
-
var _callback = (_stateObject__, result) => {
|
|
11294
|
-
var _resultPtr = getNativePointer(result);
|
|
11295
|
-
var _resultInstance = new Systems.StringResult(_resultPtr);
|
|
11296
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11297
|
-
return;
|
|
11298
|
-
}
|
|
11299
|
-
_resolve(_resultInstance);
|
|
11300
|
-
Module.removeFunction(_callbackPtr);
|
|
11301
|
-
};
|
|
11302
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11303
|
-
Module.ccall("csp_multiplayer_ConversationSystem_CreateConversation_void_StringRC_StringResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, message, _callbackPtr, 0]);
|
|
11304
|
-
return _promise;
|
|
11379
|
+
setScriptSource(scriptSource) {
|
|
11380
|
+
Module.ccall("csp_multiplayer_EntityScript_SetScriptSource_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11305
11381
|
}
|
|
11306
11382
|
/**
|
|
11307
|
-
* @description
|
|
11308
|
-
*
|
|
11309
|
-
* Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11310
|
-
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::NewMessage, ConversationId of type ReplicatedType : String}.
|
|
11311
|
-
* /// @param ConversationId csp::common::String : A new message will be linked to the provided conversation id.
|
|
11312
|
-
* @param senderDisplayName - The display name of the message sender.
|
|
11313
|
-
* @param message - The message to be stored.
|
|
11314
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11383
|
+
* @description Runs the script.
|
|
11384
|
+
* @return True if the script runs successfully or false if there are errors.
|
|
11315
11385
|
*/
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
_resolve = _r;
|
|
11320
|
-
});
|
|
11321
|
-
var _callbackPtr;
|
|
11322
|
-
var _callback = (_stateObject__, result) => {
|
|
11323
|
-
var _resultPtr = getNativePointer(result);
|
|
11324
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11325
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11326
|
-
return;
|
|
11327
|
-
}
|
|
11328
|
-
_resolve(_resultInstance);
|
|
11329
|
-
Module.removeFunction(_callbackPtr);
|
|
11330
|
-
};
|
|
11331
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11332
|
-
Module.ccall("csp_multiplayer_ConversationSystem_AddMessageToConversation_void_StringRC_StringRC_StringRC_MessageResultCallback", "void", ["number", "string", "string", "string", "number", "number"], [
|
|
11333
|
-
this.pointer,
|
|
11334
|
-
conversationId,
|
|
11335
|
-
senderDisplayName,
|
|
11336
|
-
message,
|
|
11337
|
-
_callbackPtr,
|
|
11338
|
-
0,
|
|
11339
|
-
]);
|
|
11340
|
-
return _promise;
|
|
11386
|
+
invoke() {
|
|
11387
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_Invoke_bool", "boolean", ["number"], [this.pointer]);
|
|
11388
|
+
return _result;
|
|
11341
11389
|
}
|
|
11342
11390
|
/**
|
|
11343
|
-
* @description
|
|
11344
|
-
*
|
|
11345
|
-
* @param
|
|
11346
|
-
* For no skip pass nullptr.
|
|
11347
|
-
* @param resultsMaxNumber - Optional parameter representing the maximum number of result entries to be retrieved. For all
|
|
11348
|
-
* available result entries pass nullptr.
|
|
11349
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11391
|
+
* @description Run a script with the given source rather than the stored source.
|
|
11392
|
+
* /// Will be run locally or remotely depending on leader election.
|
|
11393
|
+
* /// @param ScriptSource csp::common::String : The source to use.
|
|
11350
11394
|
*/
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
var _promise = new Promise((_r) => {
|
|
11354
|
-
_resolve = _r;
|
|
11355
|
-
});
|
|
11356
|
-
var _callbackPtr;
|
|
11357
|
-
var _callback = (_stateObject__, result) => {
|
|
11358
|
-
var _resultPtr = getNativePointer(result);
|
|
11359
|
-
var _resultInstance = new Multiplayer.MessageCollectionResult(_resultPtr);
|
|
11360
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11361
|
-
return;
|
|
11362
|
-
}
|
|
11363
|
-
_resolve(_resultInstance);
|
|
11364
|
-
Module.removeFunction(_callbackPtr);
|
|
11365
|
-
};
|
|
11366
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11367
|
-
var resultsSkipNumberPointer = 0;
|
|
11368
|
-
if (resultsSkipNumber != null) {
|
|
11369
|
-
resultsSkipNumberPointer = Module._malloc(4);
|
|
11370
|
-
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
11371
|
-
}
|
|
11372
|
-
var resultsMaxNumberPointer = 0;
|
|
11373
|
-
if (resultsMaxNumber != null) {
|
|
11374
|
-
resultsMaxNumberPointer = Module._malloc(4);
|
|
11375
|
-
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
11376
|
-
}
|
|
11377
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessagesFromConversation_void_StringRC_intRC_intRC_MessageCollectionResultCallback", "void", ["number", "string", "number", "number", "number", "number"], [
|
|
11378
|
-
this.pointer,
|
|
11379
|
-
conversationId,
|
|
11380
|
-
resultsSkipNumberPointer,
|
|
11381
|
-
resultsMaxNumberPointer,
|
|
11382
|
-
_callbackPtr,
|
|
11383
|
-
0,
|
|
11384
|
-
]);
|
|
11385
|
-
if (resultsSkipNumberPointer) {
|
|
11386
|
-
Module._free(resultsSkipNumberPointer);
|
|
11387
|
-
}
|
|
11388
|
-
if (resultsMaxNumberPointer) {
|
|
11389
|
-
Module._free(resultsMaxNumberPointer);
|
|
11390
|
-
}
|
|
11391
|
-
return _promise;
|
|
11395
|
+
runScript(scriptSource) {
|
|
11396
|
+
Module.ccall("csp_multiplayer_EntityScript_RunScript_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11392
11397
|
}
|
|
11393
11398
|
/**
|
|
11394
|
-
* @description
|
|
11395
|
-
* @
|
|
11396
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11399
|
+
* @description Checks if there was an error with the last script invocation.
|
|
11400
|
+
* @return True if there was an error, false otherwise.
|
|
11397
11401
|
*/
|
|
11398
|
-
|
|
11399
|
-
|
|
11400
|
-
|
|
11401
|
-
_resolve = _r;
|
|
11402
|
-
});
|
|
11403
|
-
var _callbackPtr;
|
|
11404
|
-
var _callback = (_stateObject__, result) => {
|
|
11405
|
-
var _resultPtr = getNativePointer(result);
|
|
11406
|
-
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
11407
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11408
|
-
return;
|
|
11409
|
-
}
|
|
11410
|
-
_resolve(_resultInstance);
|
|
11411
|
-
Module.removeFunction(_callbackPtr);
|
|
11412
|
-
};
|
|
11413
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11414
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetConversationInformation_void_StringRC_ConversationResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
11415
|
-
return _promise;
|
|
11402
|
+
hasError() {
|
|
11403
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
|
|
11404
|
+
return _result;
|
|
11416
11405
|
}
|
|
11417
11406
|
/**
|
|
11418
|
-
* @description
|
|
11419
|
-
* @
|
|
11420
|
-
* @param conversationData - Conversation Data.
|
|
11421
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11407
|
+
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
11408
|
+
* @return Text of the last error.
|
|
11422
11409
|
*/
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
var _callback = (_stateObject__, result) => {
|
|
11430
|
-
var _resultPtr = getNativePointer(result);
|
|
11431
|
-
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
11432
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11433
|
-
return;
|
|
11434
|
-
}
|
|
11435
|
-
_resolve(_resultInstance);
|
|
11436
|
-
Module.removeFunction(_callbackPtr);
|
|
11437
|
-
};
|
|
11438
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11439
|
-
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationInformation_void_StringRC_ConversationInfoRC_ConversationResultCallback", "void", ["number", "string", "number", "number", "number"], [
|
|
11440
|
-
this.pointer,
|
|
11441
|
-
conversationId,
|
|
11442
|
-
conversationData.pointer,
|
|
11443
|
-
_callbackPtr,
|
|
11444
|
-
0,
|
|
11445
|
-
]);
|
|
11446
|
-
return _promise;
|
|
11410
|
+
getErrorText() {
|
|
11411
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_GetErrorText_String", "number", ["number"], [this.pointer]);
|
|
11412
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
11413
|
+
free(_result);
|
|
11414
|
+
_result = _resultString;
|
|
11415
|
+
return _result;
|
|
11447
11416
|
}
|
|
11448
11417
|
/**
|
|
11449
|
-
* @description
|
|
11450
|
-
* @
|
|
11451
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11418
|
+
* @description Gets the stored script source code.
|
|
11419
|
+
* @return The source as a string.
|
|
11452
11420
|
*/
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
var _callback = (_stateObject__, result) => {
|
|
11460
|
-
var _resultPtr = getNativePointer(result);
|
|
11461
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11462
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11463
|
-
return;
|
|
11464
|
-
}
|
|
11465
|
-
_resolve(_resultInstance);
|
|
11466
|
-
Module.removeFunction(_callbackPtr);
|
|
11467
|
-
};
|
|
11468
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11469
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessage_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11470
|
-
return _promise;
|
|
11421
|
+
getScriptSource() {
|
|
11422
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_GetScriptSource_String", "number", ["number"], [this.pointer]);
|
|
11423
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
11424
|
+
free(_result);
|
|
11425
|
+
_result = _resultString;
|
|
11426
|
+
return _result;
|
|
11471
11427
|
}
|
|
11472
11428
|
/**
|
|
11473
|
-
* @description Sets the
|
|
11474
|
-
* @param
|
|
11475
|
-
* @param messageData - Message Data.
|
|
11476
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11477
|
-
*/
|
|
11478
|
-
async setMessageInformation(messageId, messageData) {
|
|
11479
|
-
var _resolve;
|
|
11480
|
-
var _promise = new Promise((_r) => {
|
|
11481
|
-
_resolve = _r;
|
|
11482
|
-
});
|
|
11483
|
-
var _callbackPtr;
|
|
11484
|
-
var _callback = (_stateObject__, result) => {
|
|
11485
|
-
var _resultPtr = getNativePointer(result);
|
|
11486
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11487
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11488
|
-
return;
|
|
11489
|
-
}
|
|
11490
|
-
_resolve(_resultInstance);
|
|
11491
|
-
Module.removeFunction(_callbackPtr);
|
|
11492
|
-
};
|
|
11493
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11494
|
-
Module.ccall("csp_multiplayer_ConversationSystem_SetMessageInformation_void_StringRC_MessageInfoRC_MessageResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, messageId, messageData.pointer, _callbackPtr, 0]);
|
|
11495
|
-
return _promise;
|
|
11496
|
-
}
|
|
11497
|
-
/**
|
|
11498
|
-
* @description Retrieves the message information.
|
|
11499
|
-
* @param messageId - Message ID.
|
|
11500
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11501
|
-
*/
|
|
11502
|
-
async getMessageInformation(messageId) {
|
|
11503
|
-
var _resolve;
|
|
11504
|
-
var _promise = new Promise((_r) => {
|
|
11505
|
-
_resolve = _r;
|
|
11506
|
-
});
|
|
11507
|
-
var _callbackPtr;
|
|
11508
|
-
var _callback = (_stateObject__, result) => {
|
|
11509
|
-
var _resultPtr = getNativePointer(result);
|
|
11510
|
-
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
11511
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11512
|
-
return;
|
|
11513
|
-
}
|
|
11514
|
-
_resolve(_resultInstance);
|
|
11515
|
-
Module.removeFunction(_callbackPtr);
|
|
11516
|
-
};
|
|
11517
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11518
|
-
Module.ccall("csp_multiplayer_ConversationSystem_GetMessageInformation_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11519
|
-
return _promise;
|
|
11520
|
-
}
|
|
11521
|
-
/**
|
|
11522
|
-
* @description Deletes all the messages that are part of the conversation.
|
|
11523
|
-
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11524
|
-
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteConversation, ConversationId of type ReplicatedType :
|
|
11525
|
-
* String}.
|
|
11526
|
-
* /// @param ConversationId csp::common::String : ID of the conversation that will be deleted. After this operation finishes successful this ID will
|
|
11527
|
-
* not be valid anymore.
|
|
11528
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11529
|
-
*/
|
|
11530
|
-
async deleteConversation(conversationId) {
|
|
11531
|
-
var _resolve;
|
|
11532
|
-
var _promise = new Promise((_r) => {
|
|
11533
|
-
_resolve = _r;
|
|
11534
|
-
});
|
|
11535
|
-
var _callbackPtr;
|
|
11536
|
-
var _callback = (_stateObject__, result) => {
|
|
11537
|
-
var _resultPtr = getNativePointer(result);
|
|
11538
|
-
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
11539
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11540
|
-
return;
|
|
11541
|
-
}
|
|
11542
|
-
_resolve(_resultInstance);
|
|
11543
|
-
Module.removeFunction(_callbackPtr);
|
|
11544
|
-
};
|
|
11545
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11546
|
-
Module.ccall("csp_multiplayer_ConversationSystem_DeleteConversation_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
11547
|
-
return _promise;
|
|
11548
|
-
}
|
|
11549
|
-
/**
|
|
11550
|
-
* @description Deletes a particular message.
|
|
11551
|
-
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
11552
|
-
* { ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteMessage, MessageId of type ReplicatedType : String }.
|
|
11553
|
-
* /// @param MessageId csp::common::String : ID of the message that will be deleted.
|
|
11554
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11555
|
-
*/
|
|
11556
|
-
async deleteMessage(messageId) {
|
|
11557
|
-
var _resolve;
|
|
11558
|
-
var _promise = new Promise((_r) => {
|
|
11559
|
-
_resolve = _r;
|
|
11560
|
-
});
|
|
11561
|
-
var _callbackPtr;
|
|
11562
|
-
var _callback = (_stateObject__, result) => {
|
|
11563
|
-
var _resultPtr = getNativePointer(result);
|
|
11564
|
-
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
11565
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
11566
|
-
return;
|
|
11567
|
-
}
|
|
11568
|
-
_resolve(_resultInstance);
|
|
11569
|
-
Module.removeFunction(_callbackPtr);
|
|
11570
|
-
};
|
|
11571
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11572
|
-
Module.ccall("csp_multiplayer_ConversationSystem_DeleteMessage_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
11573
|
-
return _promise;
|
|
11574
|
-
}
|
|
11575
|
-
}
|
|
11576
|
-
Multiplayer.ConversationSystem = ConversationSystem;
|
|
11577
|
-
})(Multiplayer || (Multiplayer = {}));
|
|
11578
|
-
(function (Multiplayer) {
|
|
11579
|
-
/**
|
|
11580
|
-
* @description Manages the script attached to an Entity.
|
|
11581
|
-
* /// Provides functions for setting the script source, subscribing to property changes and messages and other script management.
|
|
11582
|
-
*/
|
|
11583
|
-
class EntityScript extends NativeClassWrapper {
|
|
11584
|
-
/** @internal */
|
|
11585
|
-
constructor(pointer) {
|
|
11586
|
-
super(pointer);
|
|
11587
|
-
}
|
|
11588
|
-
/**
|
|
11589
|
-
* @description Destroy the instance of EntityScript.
|
|
11590
|
-
*/
|
|
11591
|
-
delete() {
|
|
11592
|
-
if (this.ownsPointer && !this.disposed) {
|
|
11593
|
-
Module.ccall("csp_multiplayer_EntityScript_Dtor", "void", ["number"], [this.pointer]);
|
|
11594
|
-
this.disposed = true;
|
|
11595
|
-
}
|
|
11596
|
-
}
|
|
11597
|
-
/**
|
|
11598
|
-
* @description Sets the source code for the script.
|
|
11599
|
-
* @param scriptSource - The source as a string.
|
|
11600
|
-
*/
|
|
11601
|
-
setScriptSource(scriptSource) {
|
|
11602
|
-
Module.ccall("csp_multiplayer_EntityScript_SetScriptSource_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11603
|
-
}
|
|
11604
|
-
/**
|
|
11605
|
-
* @description Runs the script.
|
|
11606
|
-
* @return True if the script runs successfully or false if there are errors.
|
|
11607
|
-
*/
|
|
11608
|
-
invoke() {
|
|
11609
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_Invoke_bool", "boolean", ["number"], [this.pointer]);
|
|
11610
|
-
return _result;
|
|
11611
|
-
}
|
|
11612
|
-
/**
|
|
11613
|
-
* @description Run a script with the given source rather than the stored source.
|
|
11614
|
-
* /// Will be run locally or remotely depending on leader election.
|
|
11615
|
-
* /// @param ScriptSource csp::common::String : The source to use.
|
|
11616
|
-
*/
|
|
11617
|
-
runScript(scriptSource) {
|
|
11618
|
-
Module.ccall("csp_multiplayer_EntityScript_RunScript_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11619
|
-
}
|
|
11620
|
-
/**
|
|
11621
|
-
* @description Checks if there was an error with the last script invocation.
|
|
11622
|
-
* @return True if there was an error, false otherwise.
|
|
11623
|
-
*/
|
|
11624
|
-
hasError() {
|
|
11625
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
|
|
11626
|
-
return _result;
|
|
11627
|
-
}
|
|
11628
|
-
/**
|
|
11629
|
-
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
11630
|
-
* @return Text of the last error.
|
|
11631
|
-
*/
|
|
11632
|
-
getErrorText() {
|
|
11633
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_GetErrorText_String", "number", ["number"], [this.pointer]);
|
|
11634
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
11635
|
-
free(_result);
|
|
11636
|
-
_result = _resultString;
|
|
11637
|
-
return _result;
|
|
11638
|
-
}
|
|
11639
|
-
/**
|
|
11640
|
-
* @description Gets the stored script source code.
|
|
11641
|
-
* @return The source as a string.
|
|
11642
|
-
*/
|
|
11643
|
-
getScriptSource() {
|
|
11644
|
-
let _result = Module.ccall("csp_multiplayer_EntityScript_GetScriptSource_String", "number", ["number"], [this.pointer]);
|
|
11645
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
11646
|
-
free(_result);
|
|
11647
|
-
_result = _resultString;
|
|
11648
|
-
return _result;
|
|
11649
|
-
}
|
|
11650
|
-
/**
|
|
11651
|
-
* @description Sets the related component for this script.
|
|
11652
|
-
* @param inEnityScriptComponent - The component related to this script.
|
|
11429
|
+
* @description Sets the related component for this script.
|
|
11430
|
+
* @param inEnityScriptComponent - The component related to this script.
|
|
11653
11431
|
*/
|
|
11654
11432
|
setScriptSpaceComponent(enityScriptComponent) {
|
|
11655
11433
|
Module.ccall("csp_multiplayer_EntityScript_SetScriptSpaceComponent_void_ScriptSpaceComponentP", "void", ["number", "number"], [this.pointer, enityScriptComponent.pointer]);
|
|
@@ -11726,13 +11504,41 @@ export class CSPFoundation {
|
|
|
11726
11504
|
})(Multiplayer || (Multiplayer = {}));
|
|
11727
11505
|
(function (Systems) {
|
|
11728
11506
|
/**
|
|
11729
|
-
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient instance in the constructor of each
|
|
11507
|
+
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or EventBus instance in the constructor of each
|
|
11508
|
+
* System.
|
|
11730
11509
|
*/
|
|
11731
11510
|
class SystemBase extends NativeClassWrapper {
|
|
11732
11511
|
/** @internal */
|
|
11733
11512
|
constructor(pointer) {
|
|
11734
11513
|
super(pointer);
|
|
11735
11514
|
}
|
|
11515
|
+
/**
|
|
11516
|
+
* @description Destructor of the SystemBase base class.
|
|
11517
|
+
*/
|
|
11518
|
+
/**
|
|
11519
|
+
* @description Registers the system to listen for the default event.
|
|
11520
|
+
*/
|
|
11521
|
+
registerSystemCallback() {
|
|
11522
|
+
Module.ccall("csp_systems_SystemBase_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11523
|
+
}
|
|
11524
|
+
/**
|
|
11525
|
+
* @description Deregisters the system from listening for the default event.
|
|
11526
|
+
*/
|
|
11527
|
+
deregisterSystemCallback() {
|
|
11528
|
+
Module.ccall("csp_systems_SystemBase_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11529
|
+
}
|
|
11530
|
+
/**
|
|
11531
|
+
* @description Sets a callback for a default event.
|
|
11532
|
+
* @param callback - Callback to receive data for the system that has been changed.
|
|
11533
|
+
*/
|
|
11534
|
+
setSystemCallback(callback) {
|
|
11535
|
+
var _callback = (_stateObject__, arg1, arg2) => {
|
|
11536
|
+
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
11537
|
+
callback(arg1, _arg2);
|
|
11538
|
+
};
|
|
11539
|
+
var _callbackPtr = Module.addFunction(_callback, "viii");
|
|
11540
|
+
Module.ccall("csp_systems_SystemBase_SetSystemCallback_void_ParameterisedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
11541
|
+
}
|
|
11736
11542
|
}
|
|
11737
11543
|
Systems.SystemBase = SystemBase;
|
|
11738
11544
|
})(Systems || (Systems = {}));
|
|
@@ -11965,6 +11771,13 @@ export class CSPFoundation {
|
|
|
11965
11771
|
Module._free(_ret);
|
|
11966
11772
|
return _nPtr;
|
|
11967
11773
|
}
|
|
11774
|
+
getEventBus() {
|
|
11775
|
+
var _ret = Module._malloc(8);
|
|
11776
|
+
Module.ccall("csp_systems_SystemsManager_GetEventBus_EventBusP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
11777
|
+
var _nPtr = new Multiplayer.EventBus(getNativePointer(_ret));
|
|
11778
|
+
Module._free(_ret);
|
|
11779
|
+
return _nPtr;
|
|
11780
|
+
}
|
|
11968
11781
|
}
|
|
11969
11782
|
Systems.SystemsManager = SystemsManager;
|
|
11970
11783
|
})(Systems || (Systems = {}));
|
|
@@ -12662,73 +12475,340 @@ export class CSPFoundation {
|
|
|
12662
12475
|
})(Systems || (Systems = {}));
|
|
12663
12476
|
(function (Systems) {
|
|
12664
12477
|
/**
|
|
12665
|
-
@ingroup
|
|
12666
|
-
* @description
|
|
12478
|
+
@ingroup Asset System
|
|
12479
|
+
* @description Base class for a material.
|
|
12667
12480
|
*/
|
|
12668
|
-
class
|
|
12481
|
+
class Material extends NativeClassWrapper {
|
|
12669
12482
|
/** @internal */
|
|
12670
12483
|
constructor(pointer) {
|
|
12671
12484
|
super(pointer);
|
|
12672
12485
|
}
|
|
12486
|
+
/**
|
|
12487
|
+
* @description Gets the user-defined name of the material
|
|
12488
|
+
* @return Csp::common::string&
|
|
12489
|
+
*/
|
|
12490
|
+
getName() {
|
|
12491
|
+
let _result = Module.ccall("csp_systems_Material_GetNameC_StringRC", "number", ["number"], [this.pointer]);
|
|
12492
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12493
|
+
free(_result);
|
|
12494
|
+
_result = _resultString;
|
|
12495
|
+
return _result;
|
|
12496
|
+
}
|
|
12497
|
+
/**
|
|
12498
|
+
* @description Gets the collection id for the material
|
|
12499
|
+
* @return Const csp::common::string&
|
|
12500
|
+
*/
|
|
12501
|
+
getMaterialCollectionId() {
|
|
12502
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12503
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12504
|
+
free(_result);
|
|
12505
|
+
_result = _resultString;
|
|
12506
|
+
return _result;
|
|
12507
|
+
}
|
|
12508
|
+
/**
|
|
12509
|
+
* @description Gets the id for the material
|
|
12510
|
+
* @return Const csp::common::string&
|
|
12511
|
+
*/
|
|
12512
|
+
getMaterialId() {
|
|
12513
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12514
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12515
|
+
free(_result);
|
|
12516
|
+
_result = _resultString;
|
|
12517
|
+
return _result;
|
|
12518
|
+
}
|
|
12519
|
+
/**
|
|
12520
|
+
* @description Constructor which links the material to an asset
|
|
12521
|
+
* @param name - The name of the material.
|
|
12522
|
+
* @param materialCollectionId - The asset collection where the material info is stored
|
|
12523
|
+
* @param materialId - The asset where the material info is stored
|
|
12524
|
+
*/
|
|
12525
|
+
static create_name_materialCollectionId_materialId(name, materialCollectionId, materialId) {
|
|
12526
|
+
var _ptr = Module._malloc(8);
|
|
12527
|
+
Module.ccall("csp_systems_Material_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, materialCollectionId, materialId]);
|
|
12528
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12529
|
+
return new Material(_nPtr);
|
|
12530
|
+
}
|
|
12673
12531
|
static create() {
|
|
12674
12532
|
var _ptr = Module._malloc(8);
|
|
12675
|
-
Module.ccall("
|
|
12533
|
+
Module.ccall("csp_systems_Material_Ctor", "void", ["number"], [_ptr]);
|
|
12676
12534
|
var _nPtr = getNativePointer(_ptr);
|
|
12677
|
-
return new
|
|
12535
|
+
return new Material(_nPtr);
|
|
12678
12536
|
}
|
|
12679
12537
|
delete() {
|
|
12680
12538
|
if (this.ownsPointer && !this.disposed) {
|
|
12681
|
-
Module.ccall("
|
|
12539
|
+
Module.ccall("csp_systems_Material_Dtor", "void", ["number"], [this.pointer]);
|
|
12682
12540
|
this.disposed = true;
|
|
12683
12541
|
}
|
|
12684
12542
|
}
|
|
12685
|
-
get amount() {
|
|
12686
|
-
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_Amount", "number", ["number"], [this.pointer]);
|
|
12687
|
-
return _result;
|
|
12688
|
-
}
|
|
12689
|
-
set amount(value) {
|
|
12690
|
-
Module.ccall("csp_systems_CurrencyInfo__Set_Amount", "void", ["number", "number"], [this.pointer, value]);
|
|
12691
|
-
}
|
|
12692
|
-
get currencyCode() {
|
|
12693
|
-
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_CurrencyCode", "string", ["number"], [this.pointer]);
|
|
12694
|
-
return _result;
|
|
12695
|
-
}
|
|
12696
|
-
set currencyCode(value) {
|
|
12697
|
-
Module.ccall("csp_systems_CurrencyInfo__Set_CurrencyCode", "void", ["number", "string"], [this.pointer, value]);
|
|
12698
|
-
}
|
|
12699
12543
|
}
|
|
12700
|
-
Systems.
|
|
12544
|
+
Systems.Material = Material;
|
|
12701
12545
|
})(Systems || (Systems = {}));
|
|
12702
12546
|
(function (Systems) {
|
|
12703
12547
|
/**
|
|
12704
|
-
@ingroup
|
|
12705
|
-
* @description
|
|
12548
|
+
@ingroup Asset System
|
|
12549
|
+
* @description Data class which represents a texture.
|
|
12706
12550
|
*/
|
|
12707
|
-
class
|
|
12551
|
+
class TextureInfo extends NativeClassWrapper {
|
|
12708
12552
|
/** @internal */
|
|
12709
12553
|
constructor(pointer) {
|
|
12710
12554
|
super(pointer);
|
|
12711
12555
|
}
|
|
12556
|
+
/**
|
|
12557
|
+
* @description Default constructor with SourceType set to ETextureResourceType::ImageAsset by default
|
|
12558
|
+
*/
|
|
12712
12559
|
static create() {
|
|
12713
12560
|
var _ptr = Module._malloc(8);
|
|
12714
|
-
Module.ccall("
|
|
12561
|
+
Module.ccall("csp_systems_TextureInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12715
12562
|
var _nPtr = getNativePointer(_ptr);
|
|
12716
|
-
return new
|
|
12563
|
+
return new TextureInfo(_nPtr);
|
|
12717
12564
|
}
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12565
|
+
/**
|
|
12566
|
+
* @description Constructor which associates a texture with an asset, using ETextureResourceType::ImageAsset as it's source type
|
|
12567
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12568
|
+
* @param assetId - The asset where the texture info is stored
|
|
12569
|
+
*/
|
|
12570
|
+
static create_assetCollectionId_assetId(assetCollectionId, assetId) {
|
|
12571
|
+
var _ptr = Module._malloc(8);
|
|
12572
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC_StringRC", "void", ["number", "string", "string"], [_ptr, assetCollectionId, assetId]);
|
|
12573
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12574
|
+
return new TextureInfo(_nPtr);
|
|
12723
12575
|
}
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12576
|
+
/**
|
|
12577
|
+
* @description Constructor which associates a texture with a media component, using ETextureResourceType::Component as it's source type
|
|
12578
|
+
* @param componentId - The component id used as the texture data source
|
|
12579
|
+
*/
|
|
12580
|
+
static create_componentId(componentId) {
|
|
12581
|
+
var _ptr = Module._malloc(8);
|
|
12582
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC", "void", ["number", "string"], [_ptr, componentId]);
|
|
12583
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12584
|
+
return new TextureInfo(_nPtr);
|
|
12727
12585
|
}
|
|
12728
|
-
|
|
12729
|
-
|
|
12586
|
+
/**
|
|
12587
|
+
* @description Sets the textures asset collection id and asset id
|
|
12588
|
+
* Uses ETextureResourceType::ImageAsset as it's source type
|
|
12589
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12590
|
+
* @param assetId - The asset where the texture info is stored
|
|
12591
|
+
*/
|
|
12592
|
+
setCollectionAndAssetId(assetCollectionId, assetId) {
|
|
12593
|
+
Module.ccall("csp_systems_TextureInfo_SetCollectionAndAssetId_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, assetCollectionId, assetId]);
|
|
12730
12594
|
}
|
|
12731
|
-
|
|
12595
|
+
/**
|
|
12596
|
+
* @description Gets the asset collection id for the texture
|
|
12597
|
+
* @return Csp::common::string&
|
|
12598
|
+
*/
|
|
12599
|
+
getAssetCollectionId() {
|
|
12600
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12601
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12602
|
+
free(_result);
|
|
12603
|
+
_result = _resultString;
|
|
12604
|
+
return _result;
|
|
12605
|
+
}
|
|
12606
|
+
/**
|
|
12607
|
+
* @description Gets the asset id for the texture
|
|
12608
|
+
* @return Csp::common::string&
|
|
12609
|
+
*/
|
|
12610
|
+
getAssetId() {
|
|
12611
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12612
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12613
|
+
free(_result);
|
|
12614
|
+
_result = _resultString;
|
|
12615
|
+
return _result;
|
|
12616
|
+
}
|
|
12617
|
+
/**
|
|
12618
|
+
* @description Sets the textures entity component id
|
|
12619
|
+
* Format: {entity.id}-{component.id}
|
|
12620
|
+
* This can be obtained from ComponentBase::GetUniqueComponentId
|
|
12621
|
+
* @param componentId - Const csp::common::string&
|
|
12622
|
+
*/
|
|
12623
|
+
setEntityComponentId(componentId) {
|
|
12624
|
+
Module.ccall("csp_systems_TextureInfo_SetEntityComponentId_void_StringRC", "void", ["number", "string"], [this.pointer, componentId]);
|
|
12625
|
+
}
|
|
12626
|
+
/**
|
|
12627
|
+
* @description Gets the entity component id
|
|
12628
|
+
* @return Csp::common::string&
|
|
12629
|
+
*/
|
|
12630
|
+
getEntityComponentId() {
|
|
12631
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetEntityComponentIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12632
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12633
|
+
free(_result);
|
|
12634
|
+
_result = _resultString;
|
|
12635
|
+
return _result;
|
|
12636
|
+
}
|
|
12637
|
+
/**
|
|
12638
|
+
* @description Gets the source type of this texture
|
|
12639
|
+
* This is set internally by constructors and SetCollectionAndAssetId/SetEntityComponentId
|
|
12640
|
+
* @return ETextureResourceType
|
|
12641
|
+
*/
|
|
12642
|
+
getSourceType() {
|
|
12643
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetSourceTypeC_ETextureResourceType", "number", ["number"], [this.pointer]);
|
|
12644
|
+
return _result;
|
|
12645
|
+
}
|
|
12646
|
+
/**
|
|
12647
|
+
* @description Sets the uv offset of the texture
|
|
12648
|
+
* @param offset - Csp::common::vector2
|
|
12649
|
+
*/
|
|
12650
|
+
setUVOffset(offset) {
|
|
12651
|
+
Module.ccall("csp_systems_TextureInfo_SetUVOffset_void_Vector2", "void", ["number", "number"], [this.pointer, offset.pointer]);
|
|
12652
|
+
}
|
|
12653
|
+
/**
|
|
12654
|
+
* @description Gets the uv offset of the texture
|
|
12655
|
+
* @return Csp::common::vector2
|
|
12656
|
+
*/
|
|
12657
|
+
getUVOffset() {
|
|
12658
|
+
var _ret = Module._malloc(8);
|
|
12659
|
+
Module.ccall("csp_systems_TextureInfo_GetUVOffsetC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12660
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12661
|
+
Module._free(_ret);
|
|
12662
|
+
return _nPtr;
|
|
12663
|
+
}
|
|
12664
|
+
/**
|
|
12665
|
+
* @description Gets the uv rotation of the texture
|
|
12666
|
+
* @param rotation - Float
|
|
12667
|
+
*/
|
|
12668
|
+
setUVRotation(rotation) {
|
|
12669
|
+
assert(rotation >= Limits.FLOAT_MIN);
|
|
12670
|
+
assert(rotation <= Limits.FLOAT_MAX);
|
|
12671
|
+
Module.ccall("csp_systems_TextureInfo_SetUVRotation_void_float", "void", ["number", "number"], [this.pointer, rotation]);
|
|
12672
|
+
}
|
|
12673
|
+
/**
|
|
12674
|
+
* @description Gets the uv rotation of the texture
|
|
12675
|
+
* @return Float
|
|
12676
|
+
*/
|
|
12677
|
+
getUVRotation() {
|
|
12678
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetUVRotationC_float", "number", ["number"], [this.pointer]);
|
|
12679
|
+
return _result;
|
|
12680
|
+
}
|
|
12681
|
+
/**
|
|
12682
|
+
* @description Sets the uv scale of the texture
|
|
12683
|
+
* @param scale - Csp::common::vector2
|
|
12684
|
+
*/
|
|
12685
|
+
setUVScale(scale) {
|
|
12686
|
+
Module.ccall("csp_systems_TextureInfo_SetUVScale_void_Vector2", "void", ["number", "number"], [this.pointer, scale.pointer]);
|
|
12687
|
+
}
|
|
12688
|
+
/**
|
|
12689
|
+
* @description Gets the uv scale of the texture
|
|
12690
|
+
* @return Csp::common::vector2
|
|
12691
|
+
*/
|
|
12692
|
+
getUVScale() {
|
|
12693
|
+
var _ret = Module._malloc(8);
|
|
12694
|
+
Module.ccall("csp_systems_TextureInfo_GetUVScaleC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12695
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12696
|
+
Module._free(_ret);
|
|
12697
|
+
return _nPtr;
|
|
12698
|
+
}
|
|
12699
|
+
/**
|
|
12700
|
+
* @description Sets The set index of texture's TEXCOORD attribute
|
|
12701
|
+
* used for texture coordinate mapping.
|
|
12702
|
+
* @param coord - Int
|
|
12703
|
+
*/
|
|
12704
|
+
setTexCoord(coord) {
|
|
12705
|
+
assert(Number.isInteger(coord));
|
|
12706
|
+
assert(coord >= Limits.INT32_MIN);
|
|
12707
|
+
assert(coord <= Limits.INT32_MAX);
|
|
12708
|
+
Module.ccall("csp_systems_TextureInfo_SetTexCoord_void_int", "void", ["number", "number"], [this.pointer, coord]);
|
|
12709
|
+
}
|
|
12710
|
+
/**
|
|
12711
|
+
* @description Gets the index of texture's TEXCOORD attribute
|
|
12712
|
+
* @return Int
|
|
12713
|
+
*/
|
|
12714
|
+
getTexCoord() {
|
|
12715
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetTexCoordC_int", "number", ["number"], [this.pointer]);
|
|
12716
|
+
return _result;
|
|
12717
|
+
}
|
|
12718
|
+
/**
|
|
12719
|
+
* @description True if this texture has been set for the current material
|
|
12720
|
+
* @return Bool
|
|
12721
|
+
*/
|
|
12722
|
+
isSet() {
|
|
12723
|
+
let _result = Module.ccall("csp_systems_TextureInfo_IsSetC_bool", "boolean", ["number"], [this.pointer]);
|
|
12724
|
+
return _result;
|
|
12725
|
+
}
|
|
12726
|
+
/**
|
|
12727
|
+
* @description Sets if this texture is active for the current material
|
|
12728
|
+
* This is true by default when a new texture is created
|
|
12729
|
+
* @param value - Bool
|
|
12730
|
+
*/
|
|
12731
|
+
setTexture(value) {
|
|
12732
|
+
Module.ccall("csp_systems_TextureInfo_SetTexture_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
|
|
12733
|
+
}
|
|
12734
|
+
delete() {
|
|
12735
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12736
|
+
Module.ccall("csp_systems_TextureInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12737
|
+
this.disposed = true;
|
|
12738
|
+
}
|
|
12739
|
+
}
|
|
12740
|
+
}
|
|
12741
|
+
Systems.TextureInfo = TextureInfo;
|
|
12742
|
+
})(Systems || (Systems = {}));
|
|
12743
|
+
(function (Systems) {
|
|
12744
|
+
/**
|
|
12745
|
+
@ingroup ECommerce System
|
|
12746
|
+
* @description Represents currency information for a product
|
|
12747
|
+
*/
|
|
12748
|
+
class CurrencyInfo extends NativeClassWrapper {
|
|
12749
|
+
/** @internal */
|
|
12750
|
+
constructor(pointer) {
|
|
12751
|
+
super(pointer);
|
|
12752
|
+
}
|
|
12753
|
+
static create() {
|
|
12754
|
+
var _ptr = Module._malloc(8);
|
|
12755
|
+
Module.ccall("csp_systems_CurrencyInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12756
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12757
|
+
return new CurrencyInfo(_nPtr);
|
|
12758
|
+
}
|
|
12759
|
+
delete() {
|
|
12760
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12761
|
+
Module.ccall("csp_systems_CurrencyInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12762
|
+
this.disposed = true;
|
|
12763
|
+
}
|
|
12764
|
+
}
|
|
12765
|
+
get amount() {
|
|
12766
|
+
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_Amount", "number", ["number"], [this.pointer]);
|
|
12767
|
+
return _result;
|
|
12768
|
+
}
|
|
12769
|
+
set amount(value) {
|
|
12770
|
+
Module.ccall("csp_systems_CurrencyInfo__Set_Amount", "void", ["number", "number"], [this.pointer, value]);
|
|
12771
|
+
}
|
|
12772
|
+
get currencyCode() {
|
|
12773
|
+
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_CurrencyCode", "string", ["number"], [this.pointer]);
|
|
12774
|
+
return _result;
|
|
12775
|
+
}
|
|
12776
|
+
set currencyCode(value) {
|
|
12777
|
+
Module.ccall("csp_systems_CurrencyInfo__Set_CurrencyCode", "void", ["number", "string"], [this.pointer, value]);
|
|
12778
|
+
}
|
|
12779
|
+
}
|
|
12780
|
+
Systems.CurrencyInfo = CurrencyInfo;
|
|
12781
|
+
})(Systems || (Systems = {}));
|
|
12782
|
+
(function (Systems) {
|
|
12783
|
+
/**
|
|
12784
|
+
@ingroup ECommerce System
|
|
12785
|
+
* @description Represents media information for a product
|
|
12786
|
+
*/
|
|
12787
|
+
class ProductMediaInfo extends NativeClassWrapper {
|
|
12788
|
+
/** @internal */
|
|
12789
|
+
constructor(pointer) {
|
|
12790
|
+
super(pointer);
|
|
12791
|
+
}
|
|
12792
|
+
static create() {
|
|
12793
|
+
var _ptr = Module._malloc(8);
|
|
12794
|
+
Module.ccall("csp_systems_ProductMediaInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12795
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12796
|
+
return new ProductMediaInfo(_nPtr);
|
|
12797
|
+
}
|
|
12798
|
+
delete() {
|
|
12799
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12800
|
+
Module.ccall("csp_systems_ProductMediaInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12801
|
+
this.disposed = true;
|
|
12802
|
+
}
|
|
12803
|
+
}
|
|
12804
|
+
get mediaContentType() {
|
|
12805
|
+
let _result = Module.ccall("csp_systems_ProductMediaInfo__Get_MediaContentType", "string", ["number"], [this.pointer]);
|
|
12806
|
+
return _result;
|
|
12807
|
+
}
|
|
12808
|
+
set mediaContentType(value) {
|
|
12809
|
+
Module.ccall("csp_systems_ProductMediaInfo__Set_MediaContentType", "void", ["number", "string"], [this.pointer, value]);
|
|
12810
|
+
}
|
|
12811
|
+
get alt() {
|
|
12732
12812
|
let _result = Module.ccall("csp_systems_ProductMediaInfo__Get_Alt", "string", ["number"], [this.pointer]);
|
|
12733
12813
|
return _result;
|
|
12734
12814
|
}
|
|
@@ -13435,7 +13515,7 @@ export class CSPFoundation {
|
|
|
13435
13515
|
}
|
|
13436
13516
|
/**
|
|
13437
13517
|
* @description Set a callback for handling an event log. Can be used to debug Connected Spaces Platform within a client application.
|
|
13438
|
-
* @param inEventCallback - The callback to execute when an
|
|
13518
|
+
* @param inEventCallback - The callback to execute when an event log occurs.
|
|
13439
13519
|
*/
|
|
13440
13520
|
setEventCallback(callback) {
|
|
13441
13521
|
var _callback = (_stateObject__, arg1) => {
|
|
@@ -15432,6 +15512,35 @@ export class CSPFoundation {
|
|
|
15432
15512
|
assert(value <= Limits.INT64_MAX);
|
|
15433
15513
|
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_SetAnimationIndex_void_int64_t", "void", ["number", "bigint"], [this.pointer, value]);
|
|
15434
15514
|
}
|
|
15515
|
+
/**
|
|
15516
|
+
* @description Gets the material overrides of this component.
|
|
15517
|
+
* Should be in the format:
|
|
15518
|
+
* Key = Path to the model
|
|
15519
|
+
* Value = The material id
|
|
15520
|
+
* @return The material overrides on this component.
|
|
15521
|
+
*/
|
|
15522
|
+
getMaterialOverrides() {
|
|
15523
|
+
var _ret = Module._malloc(8);
|
|
15524
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
15525
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
15526
|
+
Module._free(_ret);
|
|
15527
|
+
return _nPtr;
|
|
15528
|
+
}
|
|
15529
|
+
/**
|
|
15530
|
+
* @description Adds a new material override to this component.
|
|
15531
|
+
* @param the - Path to the models material to override.
|
|
15532
|
+
* @param the - Id of the material to override with.
|
|
15533
|
+
*/
|
|
15534
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
15535
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
15536
|
+
}
|
|
15537
|
+
/**
|
|
15538
|
+
* @description Removes a material override from this component.
|
|
15539
|
+
* @param the - Path to the models material to override to be removed.
|
|
15540
|
+
*/
|
|
15541
|
+
removeMaterialOverride(modelPath) {
|
|
15542
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
15543
|
+
}
|
|
15435
15544
|
/**
|
|
15436
15545
|
* \addtogroup IVisibleComponent
|
|
15437
15546
|
@{
|
|
@@ -19479,6 +19588,35 @@ export class CSPFoundation {
|
|
|
19479
19588
|
setExternalResourceAssetCollectionId(value) {
|
|
19480
19589
|
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_SetExternalResourceAssetCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
19481
19590
|
}
|
|
19591
|
+
/**
|
|
19592
|
+
* @description Gets the material overrides of this component.
|
|
19593
|
+
* Should be in the format:
|
|
19594
|
+
* Key = Path to the model
|
|
19595
|
+
* Value = The material id
|
|
19596
|
+
* @return The material overrides on this component.
|
|
19597
|
+
*/
|
|
19598
|
+
getMaterialOverrides() {
|
|
19599
|
+
var _ret = Module._malloc(8);
|
|
19600
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
19601
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
19602
|
+
Module._free(_ret);
|
|
19603
|
+
return _nPtr;
|
|
19604
|
+
}
|
|
19605
|
+
/**
|
|
19606
|
+
* @description Adds a new material override to this component.
|
|
19607
|
+
* @param the - Path to the models material to override.
|
|
19608
|
+
* @param the - Id of the material to override with.
|
|
19609
|
+
*/
|
|
19610
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
19611
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
19612
|
+
}
|
|
19613
|
+
/**
|
|
19614
|
+
* @description Removes a material override from this component.
|
|
19615
|
+
* @param the - Path to the models material to override to be removed.
|
|
19616
|
+
*/
|
|
19617
|
+
removeMaterialOverride(modelPath) {
|
|
19618
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
19619
|
+
}
|
|
19482
19620
|
/**
|
|
19483
19621
|
* \addtogroup ITransformComponent
|
|
19484
19622
|
@{
|
|
@@ -20471,322 +20609,667 @@ export class CSPFoundation {
|
|
|
20471
20609
|
}
|
|
20472
20610
|
Multiplayer.ConversationResult = ConversationResult;
|
|
20473
20611
|
})(Multiplayer || (Multiplayer = {}));
|
|
20474
|
-
(function (
|
|
20475
|
-
/**
|
|
20476
|
-
* @description A result handler that is used to notify a user of an error.
|
|
20477
|
-
*/
|
|
20478
|
-
class NullResult extends Systems.ResultBase {
|
|
20479
|
-
/** @internal */
|
|
20480
|
-
constructor(pointer) {
|
|
20481
|
-
super(pointer);
|
|
20482
|
-
}
|
|
20483
|
-
static fromResultBase(baseInstance) {
|
|
20484
|
-
const nativeClassWrapper = baseInstance;
|
|
20485
|
-
return new Systems.NullResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20486
|
-
}
|
|
20487
|
-
delete() {
|
|
20488
|
-
if (this.ownsPointer && !this.disposed) {
|
|
20489
|
-
Module.ccall("csp_systems_NullResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20490
|
-
this.disposed = true;
|
|
20491
|
-
}
|
|
20492
|
-
}
|
|
20493
|
-
}
|
|
20494
|
-
Systems.NullResult = NullResult;
|
|
20495
|
-
})(Systems || (Systems = {}));
|
|
20496
|
-
(function (Systems) {
|
|
20612
|
+
(function (Multiplayer) {
|
|
20497
20613
|
/**
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20614
|
+
@ingroup Conversation System
|
|
20615
|
+
* @description Public facing system that can handle conversations taking place between users of a space in the form of thread messages.
|
|
20616
|
+
*/
|
|
20617
|
+
class ConversationSystem extends Systems.SystemBase {
|
|
20501
20618
|
/** @internal */
|
|
20502
20619
|
constructor(pointer) {
|
|
20503
20620
|
super(pointer);
|
|
20504
20621
|
}
|
|
20505
|
-
static
|
|
20622
|
+
static fromSystemBase(baseInstance) {
|
|
20506
20623
|
const nativeClassWrapper = baseInstance;
|
|
20507
|
-
return new
|
|
20624
|
+
return new Multiplayer.ConversationSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20508
20625
|
}
|
|
20509
20626
|
/**
|
|
20510
|
-
* @description
|
|
20627
|
+
* @description Constructs a conversation system instance that uses the given multiplayer connection.
|
|
20628
|
+
* @param inMultiPlayerConnection - The connection to be used.
|
|
20511
20629
|
*/
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
if (this.ownsPointer && !this.disposed) {
|
|
20518
|
-
Module.ccall("csp_systems_BooleanResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20519
|
-
this.disposed = true;
|
|
20520
|
-
}
|
|
20521
|
-
}
|
|
20522
|
-
}
|
|
20523
|
-
Systems.BooleanResult = BooleanResult;
|
|
20524
|
-
})(Systems || (Systems = {}));
|
|
20525
|
-
(function (Systems) {
|
|
20526
|
-
/**
|
|
20527
|
-
* @description A result handler that is used to notify a user of an error while passing a String value.
|
|
20528
|
-
*/
|
|
20529
|
-
class StringResult extends Systems.ResultBase {
|
|
20530
|
-
/** @internal */
|
|
20531
|
-
constructor(pointer) {
|
|
20532
|
-
super(pointer);
|
|
20533
|
-
}
|
|
20534
|
-
static fromResultBase(baseInstance) {
|
|
20535
|
-
const nativeClassWrapper = baseInstance;
|
|
20536
|
-
return new Systems.StringResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20630
|
+
static create_multiPlayerConnection(multiPlayerConnection) {
|
|
20631
|
+
var _ptr = Module._malloc(8);
|
|
20632
|
+
Module.ccall("csp_multiplayer_ConversationSystem_Ctor_MultiplayerConnectionP", "void", ["number", "number"], [_ptr, multiPlayerConnection.pointer]);
|
|
20633
|
+
var _nPtr = getNativePointer(_ptr);
|
|
20634
|
+
return new ConversationSystem(_nPtr);
|
|
20537
20635
|
}
|
|
20538
20636
|
/**
|
|
20539
|
-
* @description
|
|
20637
|
+
* @description Creates a new conversation with the initial message and provides the conversation ID to the given callback.
|
|
20638
|
+
* @param message - The message to be stored.
|
|
20639
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20540
20640
|
*/
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
(
|
|
20558
|
-
|
|
20559
|
-
* @description A result handler that is used to notify a user of an error while passing a StringArray value.
|
|
20560
|
-
*/
|
|
20561
|
-
class StringArrayResult extends Systems.ResultBase {
|
|
20562
|
-
/** @internal */
|
|
20563
|
-
constructor(pointer) {
|
|
20564
|
-
super(pointer);
|
|
20565
|
-
}
|
|
20566
|
-
static fromResultBase(baseInstance) {
|
|
20567
|
-
const nativeClassWrapper = baseInstance;
|
|
20568
|
-
return new Systems.StringArrayResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20641
|
+
async createConversation(message) {
|
|
20642
|
+
var _resolve;
|
|
20643
|
+
var _promise = new Promise((_r) => {
|
|
20644
|
+
_resolve = _r;
|
|
20645
|
+
});
|
|
20646
|
+
var _callbackPtr;
|
|
20647
|
+
var _callback = (_stateObject__, result) => {
|
|
20648
|
+
var _resultPtr = getNativePointer(result);
|
|
20649
|
+
var _resultInstance = new Systems.StringResult(_resultPtr);
|
|
20650
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20651
|
+
return;
|
|
20652
|
+
}
|
|
20653
|
+
_resolve(_resultInstance);
|
|
20654
|
+
Module.removeFunction(_callbackPtr);
|
|
20655
|
+
};
|
|
20656
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20657
|
+
Module.ccall("csp_multiplayer_ConversationSystem_CreateConversation_void_StringRC_StringResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, message, _callbackPtr, 0]);
|
|
20658
|
+
return _promise;
|
|
20569
20659
|
}
|
|
20570
20660
|
/**
|
|
20571
|
-
* @description
|
|
20661
|
+
* @description Adds a message to a brand new conversation or to an already existing one
|
|
20662
|
+
* /// Make sure that the user has entered a space through SpaceSystem::EnterSpace() before calling this.
|
|
20663
|
+
* Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20664
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::NewMessage, ConversationId of type ReplicatedType : String}.
|
|
20665
|
+
* /// @param ConversationId csp::common::String : A new message will be linked to the provided conversation id.
|
|
20666
|
+
* @param senderDisplayName - The display name of the message sender.
|
|
20667
|
+
* @param message - The message to be stored.
|
|
20668
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20572
20669
|
*/
|
|
20573
|
-
|
|
20574
|
-
var
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
(
|
|
20590
|
-
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
static fromResultBase(baseInstance) {
|
|
20599
|
-
const nativeClassWrapper = baseInstance;
|
|
20600
|
-
return new Systems.UInt64Result(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20670
|
+
async addMessageToConversation(conversationId, senderDisplayName, message) {
|
|
20671
|
+
var _resolve;
|
|
20672
|
+
var _promise = new Promise((_r) => {
|
|
20673
|
+
_resolve = _r;
|
|
20674
|
+
});
|
|
20675
|
+
var _callbackPtr;
|
|
20676
|
+
var _callback = (_stateObject__, result) => {
|
|
20677
|
+
var _resultPtr = getNativePointer(result);
|
|
20678
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20679
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20680
|
+
return;
|
|
20681
|
+
}
|
|
20682
|
+
_resolve(_resultInstance);
|
|
20683
|
+
Module.removeFunction(_callbackPtr);
|
|
20684
|
+
};
|
|
20685
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20686
|
+
Module.ccall("csp_multiplayer_ConversationSystem_AddMessageToConversation_void_StringRC_StringRC_StringRC_MessageResultCallback", "void", ["number", "string", "string", "string", "number", "number"], [
|
|
20687
|
+
this.pointer,
|
|
20688
|
+
conversationId,
|
|
20689
|
+
senderDisplayName,
|
|
20690
|
+
message,
|
|
20691
|
+
_callbackPtr,
|
|
20692
|
+
0,
|
|
20693
|
+
]);
|
|
20694
|
+
return _promise;
|
|
20601
20695
|
}
|
|
20602
20696
|
/**
|
|
20603
|
-
* @description
|
|
20697
|
+
* @description Retrieves messages that are linked to the provided Conversation ID.
|
|
20698
|
+
* @param conversationId - Conversation ID.
|
|
20699
|
+
* @param resultsSkipNumber - Optional parameter representing the number of result entries that will be skipped from the result.
|
|
20700
|
+
* For no skip pass nullptr.
|
|
20701
|
+
* @param resultsMaxNumber - Optional parameter representing the maximum number of result entries to be retrieved. For all
|
|
20702
|
+
* available result entries pass nullptr.
|
|
20703
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20604
20704
|
*/
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20705
|
+
async getMessagesFromConversation(conversationId, resultsSkipNumber, resultsMaxNumber) {
|
|
20706
|
+
var _resolve;
|
|
20707
|
+
var _promise = new Promise((_r) => {
|
|
20708
|
+
_resolve = _r;
|
|
20709
|
+
});
|
|
20710
|
+
var _callbackPtr;
|
|
20711
|
+
var _callback = (_stateObject__, result) => {
|
|
20712
|
+
var _resultPtr = getNativePointer(result);
|
|
20713
|
+
var _resultInstance = new Multiplayer.MessageCollectionResult(_resultPtr);
|
|
20714
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20715
|
+
return;
|
|
20716
|
+
}
|
|
20717
|
+
_resolve(_resultInstance);
|
|
20718
|
+
Module.removeFunction(_callbackPtr);
|
|
20719
|
+
};
|
|
20720
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20721
|
+
var resultsSkipNumberPointer = 0;
|
|
20722
|
+
if (resultsSkipNumber != null) {
|
|
20723
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
20724
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
20616
20725
|
}
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
(function (Systems) {
|
|
20622
|
-
/**
|
|
20623
|
-
* @description A result handler that is used to notify a user of an error while providing an event for a callback response, in addition to
|
|
20624
|
-
* passing a Map of Strings representing the HTTP Responses.
|
|
20625
|
-
*/
|
|
20626
|
-
class HTTPHeadersResult extends Systems.ResultBase {
|
|
20627
|
-
/** @internal */
|
|
20628
|
-
constructor(pointer) {
|
|
20629
|
-
super(pointer);
|
|
20630
|
-
}
|
|
20631
|
-
static fromResultBase(baseInstance) {
|
|
20632
|
-
const nativeClassWrapper = baseInstance;
|
|
20633
|
-
return new Systems.HTTPHeadersResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20634
|
-
}
|
|
20635
|
-
/**
|
|
20636
|
-
* @description A getter which returns the map of strings representing HTTP responses passed via the result.
|
|
20637
|
-
*/
|
|
20638
|
-
getValue() {
|
|
20639
|
-
var _ret = Module._malloc(8);
|
|
20640
|
-
Module.ccall("csp_systems_HTTPHeadersResult_GetValueC_MapRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
20641
|
-
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
20642
|
-
Module._free(_ret);
|
|
20643
|
-
return _nPtr;
|
|
20644
|
-
}
|
|
20645
|
-
delete() {
|
|
20646
|
-
if (this.ownsPointer && !this.disposed) {
|
|
20647
|
-
Module.ccall("csp_systems_HTTPHeadersResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20648
|
-
this.disposed = true;
|
|
20726
|
+
var resultsMaxNumberPointer = 0;
|
|
20727
|
+
if (resultsMaxNumber != null) {
|
|
20728
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
20729
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
20649
20730
|
}
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
const nativeClassWrapper = baseInstance;
|
|
20666
|
-
return new Systems.AssetResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20731
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessagesFromConversation_void_StringRC_intRC_intRC_MessageCollectionResultCallback", "void", ["number", "string", "number", "number", "number", "number"], [
|
|
20732
|
+
this.pointer,
|
|
20733
|
+
conversationId,
|
|
20734
|
+
resultsSkipNumberPointer,
|
|
20735
|
+
resultsMaxNumberPointer,
|
|
20736
|
+
_callbackPtr,
|
|
20737
|
+
0,
|
|
20738
|
+
]);
|
|
20739
|
+
if (resultsSkipNumberPointer) {
|
|
20740
|
+
Module._free(resultsSkipNumberPointer);
|
|
20741
|
+
}
|
|
20742
|
+
if (resultsMaxNumberPointer) {
|
|
20743
|
+
Module._free(resultsMaxNumberPointer);
|
|
20744
|
+
}
|
|
20745
|
+
return _promise;
|
|
20667
20746
|
}
|
|
20668
20747
|
/**
|
|
20669
|
-
* @description Retrieves the
|
|
20670
|
-
* @
|
|
20748
|
+
* @description Retrieves the conversation information.
|
|
20749
|
+
* @param conversationId - Conversation ID.
|
|
20750
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20671
20751
|
*/
|
|
20672
|
-
|
|
20673
|
-
var
|
|
20674
|
-
|
|
20675
|
-
|
|
20676
|
-
|
|
20677
|
-
|
|
20678
|
-
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20684
|
-
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
(
|
|
20689
|
-
|
|
20690
|
-
@ingroup Asset System
|
|
20691
|
-
* @description Data class used to contain information when attempting to get an array of assets.
|
|
20692
|
-
*/
|
|
20693
|
-
class AssetsResult extends Systems.ResultBase {
|
|
20694
|
-
/** @internal */
|
|
20695
|
-
constructor(pointer) {
|
|
20696
|
-
super(pointer);
|
|
20697
|
-
}
|
|
20698
|
-
static fromResultBase(baseInstance) {
|
|
20699
|
-
const nativeClassWrapper = baseInstance;
|
|
20700
|
-
return new Systems.AssetsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20752
|
+
async getConversationInformation(conversationId) {
|
|
20753
|
+
var _resolve;
|
|
20754
|
+
var _promise = new Promise((_r) => {
|
|
20755
|
+
_resolve = _r;
|
|
20756
|
+
});
|
|
20757
|
+
var _callbackPtr;
|
|
20758
|
+
var _callback = (_stateObject__, result) => {
|
|
20759
|
+
var _resultPtr = getNativePointer(result);
|
|
20760
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20761
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20762
|
+
return;
|
|
20763
|
+
}
|
|
20764
|
+
_resolve(_resultInstance);
|
|
20765
|
+
Module.removeFunction(_callbackPtr);
|
|
20766
|
+
};
|
|
20767
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20768
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetConversationInformation_void_StringRC_ConversationResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20769
|
+
return _promise;
|
|
20701
20770
|
}
|
|
20702
20771
|
/**
|
|
20703
|
-
* @description
|
|
20704
|
-
* @
|
|
20772
|
+
* @description Sets the conversation information.
|
|
20773
|
+
* @param conversationId - Conversation ID.
|
|
20774
|
+
* @param conversationData - Conversation Data.
|
|
20775
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20705
20776
|
*/
|
|
20706
|
-
|
|
20707
|
-
var
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20777
|
+
async setConversationInformation(conversationId, conversationData) {
|
|
20778
|
+
var _resolve;
|
|
20779
|
+
var _promise = new Promise((_r) => {
|
|
20780
|
+
_resolve = _r;
|
|
20781
|
+
});
|
|
20782
|
+
var _callbackPtr;
|
|
20783
|
+
var _callback = (_stateObject__, result) => {
|
|
20784
|
+
var _resultPtr = getNativePointer(result);
|
|
20785
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20786
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20787
|
+
return;
|
|
20788
|
+
}
|
|
20789
|
+
_resolve(_resultInstance);
|
|
20790
|
+
Module.removeFunction(_callbackPtr);
|
|
20791
|
+
};
|
|
20792
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20793
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationInformation_void_StringRC_ConversationInfoRC_ConversationResultCallback", "void", ["number", "string", "number", "number", "number"], [
|
|
20794
|
+
this.pointer,
|
|
20795
|
+
conversationId,
|
|
20796
|
+
conversationData.pointer,
|
|
20797
|
+
_callbackPtr,
|
|
20798
|
+
0,
|
|
20799
|
+
]);
|
|
20800
|
+
return _promise;
|
|
20801
|
+
}
|
|
20802
|
+
/**
|
|
20803
|
+
* @description Retrieves one particular message.
|
|
20804
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20805
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20806
|
+
*/
|
|
20807
|
+
async getMessage(messageId) {
|
|
20808
|
+
var _resolve;
|
|
20809
|
+
var _promise = new Promise((_r) => {
|
|
20810
|
+
_resolve = _r;
|
|
20811
|
+
});
|
|
20812
|
+
var _callbackPtr;
|
|
20813
|
+
var _callback = (_stateObject__, result) => {
|
|
20814
|
+
var _resultPtr = getNativePointer(result);
|
|
20815
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20816
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20817
|
+
return;
|
|
20818
|
+
}
|
|
20819
|
+
_resolve(_resultInstance);
|
|
20820
|
+
Module.removeFunction(_callbackPtr);
|
|
20821
|
+
};
|
|
20822
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20823
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessage_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20824
|
+
return _promise;
|
|
20825
|
+
}
|
|
20826
|
+
/**
|
|
20827
|
+
* @description Sets the message information.
|
|
20828
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20829
|
+
* @param messageData - Message Data.
|
|
20830
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20831
|
+
*/
|
|
20832
|
+
async setMessageInformation(messageId, messageData) {
|
|
20833
|
+
var _resolve;
|
|
20834
|
+
var _promise = new Promise((_r) => {
|
|
20835
|
+
_resolve = _r;
|
|
20836
|
+
});
|
|
20837
|
+
var _callbackPtr;
|
|
20838
|
+
var _callback = (_stateObject__, result) => {
|
|
20839
|
+
var _resultPtr = getNativePointer(result);
|
|
20840
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20841
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20842
|
+
return;
|
|
20843
|
+
}
|
|
20844
|
+
_resolve(_resultInstance);
|
|
20845
|
+
Module.removeFunction(_callbackPtr);
|
|
20846
|
+
};
|
|
20847
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20848
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetMessageInformation_void_StringRC_MessageInfoRC_MessageResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, messageId, messageData.pointer, _callbackPtr, 0]);
|
|
20849
|
+
return _promise;
|
|
20850
|
+
}
|
|
20851
|
+
/**
|
|
20852
|
+
* @description Retrieves the message information.
|
|
20853
|
+
* @param messageId - Message ID.
|
|
20854
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20855
|
+
*/
|
|
20856
|
+
async getMessageInformation(messageId) {
|
|
20857
|
+
var _resolve;
|
|
20858
|
+
var _promise = new Promise((_r) => {
|
|
20859
|
+
_resolve = _r;
|
|
20860
|
+
});
|
|
20861
|
+
var _callbackPtr;
|
|
20862
|
+
var _callback = (_stateObject__, result) => {
|
|
20863
|
+
var _resultPtr = getNativePointer(result);
|
|
20864
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20865
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20866
|
+
return;
|
|
20867
|
+
}
|
|
20868
|
+
_resolve(_resultInstance);
|
|
20869
|
+
Module.removeFunction(_callbackPtr);
|
|
20870
|
+
};
|
|
20871
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20872
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessageInformation_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20873
|
+
return _promise;
|
|
20874
|
+
}
|
|
20875
|
+
/**
|
|
20876
|
+
* @description Deletes all the messages that are part of the conversation.
|
|
20877
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20878
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteConversation, ConversationId of type ReplicatedType :
|
|
20879
|
+
* String}.
|
|
20880
|
+
* /// @param ConversationId csp::common::String : ID of the conversation that will be deleted. After this operation finishes successful this ID will
|
|
20881
|
+
* not be valid anymore.
|
|
20882
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20883
|
+
*/
|
|
20884
|
+
async deleteConversation(conversationId) {
|
|
20885
|
+
var _resolve;
|
|
20886
|
+
var _promise = new Promise((_r) => {
|
|
20887
|
+
_resolve = _r;
|
|
20888
|
+
});
|
|
20889
|
+
var _callbackPtr;
|
|
20890
|
+
var _callback = (_stateObject__, result) => {
|
|
20891
|
+
var _resultPtr = getNativePointer(result);
|
|
20892
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20893
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20894
|
+
return;
|
|
20895
|
+
}
|
|
20896
|
+
_resolve(_resultInstance);
|
|
20897
|
+
Module.removeFunction(_callbackPtr);
|
|
20898
|
+
};
|
|
20899
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20900
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteConversation_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20901
|
+
return _promise;
|
|
20902
|
+
}
|
|
20903
|
+
/**
|
|
20904
|
+
* @description Deletes a particular message.
|
|
20905
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20906
|
+
* { ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteMessage, MessageId of type ReplicatedType : String }.
|
|
20907
|
+
* /// @param MessageId csp::common::String : ID of the message that will be deleted.
|
|
20908
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20909
|
+
*/
|
|
20910
|
+
async deleteMessage(messageId) {
|
|
20911
|
+
var _resolve;
|
|
20912
|
+
var _promise = new Promise((_r) => {
|
|
20913
|
+
_resolve = _r;
|
|
20914
|
+
});
|
|
20915
|
+
var _callbackPtr;
|
|
20916
|
+
var _callback = (_stateObject__, result) => {
|
|
20917
|
+
var _resultPtr = getNativePointer(result);
|
|
20918
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20919
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20920
|
+
return;
|
|
20921
|
+
}
|
|
20922
|
+
_resolve(_resultInstance);
|
|
20923
|
+
Module.removeFunction(_callbackPtr);
|
|
20924
|
+
};
|
|
20925
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20926
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteMessage_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20927
|
+
return _promise;
|
|
20928
|
+
}
|
|
20929
|
+
/**
|
|
20930
|
+
* @description Sets a callback for a conversation new message event.
|
|
20931
|
+
* @param callback - Callback to receive ConversationSystem Data when a message is sent.
|
|
20932
|
+
* Callback will have to reset the callback passed to the system to avoid "dangling objects" after use.
|
|
20933
|
+
*/
|
|
20934
|
+
setConversationSystemCallback(callback) {
|
|
20935
|
+
var _callback = (_stateObject__, arg1) => {
|
|
20936
|
+
var _arg1 = new Multiplayer.ConversationSystemParams(getNativePointer(arg1));
|
|
20937
|
+
callback(_arg1);
|
|
20938
|
+
};
|
|
20939
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
20940
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationSystemCallback_void_ConversationSystemCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
20941
|
+
}
|
|
20942
|
+
/**
|
|
20943
|
+
* @description Registers the system to listen for the named event.
|
|
20944
|
+
*/
|
|
20945
|
+
registerSystemCallback() {
|
|
20946
|
+
Module.ccall("csp_multiplayer_ConversationSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20947
|
+
}
|
|
20948
|
+
/**
|
|
20949
|
+
* @description Deregisters the system from listening for the named event.
|
|
20950
|
+
*/
|
|
20951
|
+
deregisterSystemCallback() {
|
|
20952
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20953
|
+
}
|
|
20954
|
+
}
|
|
20955
|
+
Multiplayer.ConversationSystem = ConversationSystem;
|
|
20956
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
20957
|
+
(function (Systems) {
|
|
20958
|
+
/**
|
|
20959
|
+
* @description A result handler that is used to notify a user of an error.
|
|
20960
|
+
*/
|
|
20961
|
+
class NullResult extends Systems.ResultBase {
|
|
20962
|
+
/** @internal */
|
|
20963
|
+
constructor(pointer) {
|
|
20964
|
+
super(pointer);
|
|
20965
|
+
}
|
|
20966
|
+
static fromResultBase(baseInstance) {
|
|
20967
|
+
const nativeClassWrapper = baseInstance;
|
|
20968
|
+
return new Systems.NullResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20712
20969
|
}
|
|
20713
20970
|
delete() {
|
|
20714
20971
|
if (this.ownsPointer && !this.disposed) {
|
|
20715
|
-
Module.ccall("
|
|
20972
|
+
Module.ccall("csp_systems_NullResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20716
20973
|
this.disposed = true;
|
|
20717
20974
|
}
|
|
20718
20975
|
}
|
|
20719
20976
|
}
|
|
20720
|
-
Systems.
|
|
20977
|
+
Systems.NullResult = NullResult;
|
|
20721
20978
|
})(Systems || (Systems = {}));
|
|
20722
20979
|
(function (Systems) {
|
|
20723
20980
|
/**
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
class UriResult extends Systems.ResultBase {
|
|
20981
|
+
* @description A result handler that is used to notify a user of an error while passing a boolean value.
|
|
20982
|
+
*/
|
|
20983
|
+
class BooleanResult extends Systems.ResultBase {
|
|
20728
20984
|
/** @internal */
|
|
20729
20985
|
constructor(pointer) {
|
|
20730
20986
|
super(pointer);
|
|
20731
20987
|
}
|
|
20732
20988
|
static fromResultBase(baseInstance) {
|
|
20733
20989
|
const nativeClassWrapper = baseInstance;
|
|
20734
|
-
return new Systems.
|
|
20990
|
+
return new Systems.BooleanResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20735
20991
|
}
|
|
20736
20992
|
/**
|
|
20737
|
-
* @description
|
|
20738
|
-
* @return Uri of the uploaded asset.
|
|
20993
|
+
* @description A getter which returns the bool passed via the result.
|
|
20739
20994
|
*/
|
|
20740
|
-
|
|
20741
|
-
let _result = Module.ccall("
|
|
20742
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
20743
|
-
free(_result);
|
|
20744
|
-
_result = _resultString;
|
|
20995
|
+
getValue() {
|
|
20996
|
+
let _result = Module.ccall("csp_systems_BooleanResult_GetValueC_bool", "boolean", ["number"], [this.pointer]);
|
|
20745
20997
|
return _result;
|
|
20746
20998
|
}
|
|
20747
|
-
setUri(value) {
|
|
20748
|
-
Module.ccall("csp_systems_UriResult_SetUri_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
20749
|
-
}
|
|
20750
20999
|
delete() {
|
|
20751
21000
|
if (this.ownsPointer && !this.disposed) {
|
|
20752
|
-
Module.ccall("
|
|
21001
|
+
Module.ccall("csp_systems_BooleanResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20753
21002
|
this.disposed = true;
|
|
20754
21003
|
}
|
|
20755
21004
|
}
|
|
20756
21005
|
}
|
|
20757
|
-
Systems.
|
|
21006
|
+
Systems.BooleanResult = BooleanResult;
|
|
20758
21007
|
})(Systems || (Systems = {}));
|
|
20759
21008
|
(function (Systems) {
|
|
20760
21009
|
/**
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
class AssetDataResult extends Systems.ResultBase {
|
|
21010
|
+
* @description A result handler that is used to notify a user of an error while passing a String value.
|
|
21011
|
+
*/
|
|
21012
|
+
class StringResult extends Systems.ResultBase {
|
|
20765
21013
|
/** @internal */
|
|
20766
21014
|
constructor(pointer) {
|
|
20767
21015
|
super(pointer);
|
|
20768
21016
|
}
|
|
20769
21017
|
static fromResultBase(baseInstance) {
|
|
20770
21018
|
const nativeClassWrapper = baseInstance;
|
|
20771
|
-
return new Systems.
|
|
21019
|
+
return new Systems.StringResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20772
21020
|
}
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
21021
|
+
/**
|
|
21022
|
+
* @description A getter which returns the String passed via the result.
|
|
21023
|
+
*/
|
|
21024
|
+
getValue() {
|
|
21025
|
+
let _result = Module.ccall("csp_systems_StringResult_GetValueC_StringRC", "number", ["number"], [this.pointer]);
|
|
21026
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
21027
|
+
free(_result);
|
|
21028
|
+
_result = _resultString;
|
|
21029
|
+
return _result;
|
|
20778
21030
|
}
|
|
20779
21031
|
delete() {
|
|
20780
21032
|
if (this.ownsPointer && !this.disposed) {
|
|
20781
|
-
Module.ccall("
|
|
21033
|
+
Module.ccall("csp_systems_StringResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20782
21034
|
this.disposed = true;
|
|
20783
21035
|
}
|
|
20784
21036
|
}
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
21037
|
+
}
|
|
21038
|
+
Systems.StringResult = StringResult;
|
|
21039
|
+
})(Systems || (Systems = {}));
|
|
21040
|
+
(function (Systems) {
|
|
21041
|
+
/**
|
|
21042
|
+
* @description A result handler that is used to notify a user of an error while passing a StringArray value.
|
|
21043
|
+
*/
|
|
21044
|
+
class StringArrayResult extends Systems.ResultBase {
|
|
21045
|
+
/** @internal */
|
|
21046
|
+
constructor(pointer) {
|
|
21047
|
+
super(pointer);
|
|
21048
|
+
}
|
|
21049
|
+
static fromResultBase(baseInstance) {
|
|
21050
|
+
const nativeClassWrapper = baseInstance;
|
|
21051
|
+
return new Systems.StringArrayResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21052
|
+
}
|
|
21053
|
+
/**
|
|
21054
|
+
* @description A getter which returns the StringArray passed via the result.
|
|
21055
|
+
*/
|
|
21056
|
+
getValue() {
|
|
21057
|
+
var _ret = Module._malloc(8);
|
|
21058
|
+
Module.ccall("csp_systems_StringArrayResult_GetValueC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21059
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), StringFactory, "String");
|
|
21060
|
+
Module._free(_ret);
|
|
21061
|
+
return _nPtr;
|
|
21062
|
+
}
|
|
21063
|
+
delete() {
|
|
21064
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21065
|
+
Module.ccall("csp_systems_StringArrayResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21066
|
+
this.disposed = true;
|
|
21067
|
+
}
|
|
21068
|
+
}
|
|
21069
|
+
}
|
|
21070
|
+
Systems.StringArrayResult = StringArrayResult;
|
|
21071
|
+
})(Systems || (Systems = {}));
|
|
21072
|
+
(function (Systems) {
|
|
21073
|
+
/**
|
|
21074
|
+
* @description A result handler that is used to notify a user of an error while passing a uint64_t value.
|
|
21075
|
+
*/
|
|
21076
|
+
class UInt64Result extends Systems.ResultBase {
|
|
21077
|
+
/** @internal */
|
|
21078
|
+
constructor(pointer) {
|
|
21079
|
+
super(pointer);
|
|
21080
|
+
}
|
|
21081
|
+
static fromResultBase(baseInstance) {
|
|
21082
|
+
const nativeClassWrapper = baseInstance;
|
|
21083
|
+
return new Systems.UInt64Result(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21084
|
+
}
|
|
21085
|
+
/**
|
|
21086
|
+
* @description A getter which returns the uint64_t passed via the result.
|
|
21087
|
+
*/
|
|
21088
|
+
getValue() {
|
|
21089
|
+
let _result = Module.ccall("csp_systems_UInt64Result_GetValueC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
21090
|
+
const _unfixedValue = _result;
|
|
21091
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
21092
|
+
_result = _fixedValue;
|
|
21093
|
+
return _result;
|
|
21094
|
+
}
|
|
21095
|
+
delete() {
|
|
21096
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21097
|
+
Module.ccall("csp_systems_UInt64Result_Dtor", "void", ["number"], [this.pointer]);
|
|
21098
|
+
this.disposed = true;
|
|
21099
|
+
}
|
|
21100
|
+
}
|
|
21101
|
+
}
|
|
21102
|
+
Systems.UInt64Result = UInt64Result;
|
|
21103
|
+
})(Systems || (Systems = {}));
|
|
21104
|
+
(function (Systems) {
|
|
21105
|
+
/**
|
|
21106
|
+
* @description A result handler that is used to notify a user of an error while providing an event for a callback response, in addition to
|
|
21107
|
+
* passing a Map of Strings representing the HTTP Responses.
|
|
21108
|
+
*/
|
|
21109
|
+
class HTTPHeadersResult extends Systems.ResultBase {
|
|
21110
|
+
/** @internal */
|
|
21111
|
+
constructor(pointer) {
|
|
21112
|
+
super(pointer);
|
|
21113
|
+
}
|
|
21114
|
+
static fromResultBase(baseInstance) {
|
|
21115
|
+
const nativeClassWrapper = baseInstance;
|
|
21116
|
+
return new Systems.HTTPHeadersResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21117
|
+
}
|
|
21118
|
+
/**
|
|
21119
|
+
* @description A getter which returns the map of strings representing HTTP responses passed via the result.
|
|
21120
|
+
*/
|
|
21121
|
+
getValue() {
|
|
21122
|
+
var _ret = Module._malloc(8);
|
|
21123
|
+
Module.ccall("csp_systems_HTTPHeadersResult_GetValueC_MapRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21124
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
21125
|
+
Module._free(_ret);
|
|
21126
|
+
return _nPtr;
|
|
21127
|
+
}
|
|
21128
|
+
delete() {
|
|
21129
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21130
|
+
Module.ccall("csp_systems_HTTPHeadersResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21131
|
+
this.disposed = true;
|
|
21132
|
+
}
|
|
21133
|
+
}
|
|
21134
|
+
}
|
|
21135
|
+
Systems.HTTPHeadersResult = HTTPHeadersResult;
|
|
21136
|
+
})(Systems || (Systems = {}));
|
|
21137
|
+
(function (Systems) {
|
|
21138
|
+
/**
|
|
21139
|
+
@ingroup Asset System
|
|
21140
|
+
* @description Data class used to contain information when creating an asset.
|
|
21141
|
+
*/
|
|
21142
|
+
class AssetResult extends Systems.ResultBase {
|
|
21143
|
+
/** @internal */
|
|
21144
|
+
constructor(pointer) {
|
|
21145
|
+
super(pointer);
|
|
21146
|
+
}
|
|
21147
|
+
static fromResultBase(baseInstance) {
|
|
21148
|
+
const nativeClassWrapper = baseInstance;
|
|
21149
|
+
return new Systems.AssetResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21150
|
+
}
|
|
21151
|
+
/**
|
|
21152
|
+
* @description Retrieves the asset result.
|
|
21153
|
+
* @return Const ref of asset class.
|
|
21154
|
+
*/
|
|
21155
|
+
getAsset() {
|
|
21156
|
+
var _ret = Module._malloc(8);
|
|
21157
|
+
Module.ccall("csp_systems_AssetResult_GetAsset_AssetR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21158
|
+
var _nPtr = new Systems.Asset(getNativePointer(_ret));
|
|
21159
|
+
Module._free(_ret);
|
|
21160
|
+
return _nPtr;
|
|
21161
|
+
}
|
|
21162
|
+
delete() {
|
|
21163
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21164
|
+
Module.ccall("csp_systems_AssetResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21165
|
+
this.disposed = true;
|
|
21166
|
+
}
|
|
21167
|
+
}
|
|
21168
|
+
}
|
|
21169
|
+
Systems.AssetResult = AssetResult;
|
|
21170
|
+
})(Systems || (Systems = {}));
|
|
21171
|
+
(function (Systems) {
|
|
21172
|
+
/**
|
|
21173
|
+
@ingroup Asset System
|
|
21174
|
+
* @description Data class used to contain information when attempting to get an array of assets.
|
|
21175
|
+
*/
|
|
21176
|
+
class AssetsResult extends Systems.ResultBase {
|
|
21177
|
+
/** @internal */
|
|
21178
|
+
constructor(pointer) {
|
|
21179
|
+
super(pointer);
|
|
21180
|
+
}
|
|
21181
|
+
static fromResultBase(baseInstance) {
|
|
21182
|
+
const nativeClassWrapper = baseInstance;
|
|
21183
|
+
return new Systems.AssetsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21184
|
+
}
|
|
21185
|
+
/**
|
|
21186
|
+
* @description Retrieves the asset array being stored as a pointer.
|
|
21187
|
+
* @return Pointer to asset array being stored.
|
|
21188
|
+
*/
|
|
21189
|
+
getAssets() {
|
|
21190
|
+
var _ret = Module._malloc(8);
|
|
21191
|
+
Module.ccall("csp_systems_AssetsResult_GetAssets_ArrayR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21192
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_AssetFactory, "csp_systems_Asset");
|
|
21193
|
+
Module._free(_ret);
|
|
21194
|
+
return _nPtr;
|
|
21195
|
+
}
|
|
21196
|
+
delete() {
|
|
21197
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21198
|
+
Module.ccall("csp_systems_AssetsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21199
|
+
this.disposed = true;
|
|
21200
|
+
}
|
|
21201
|
+
}
|
|
21202
|
+
}
|
|
21203
|
+
Systems.AssetsResult = AssetsResult;
|
|
21204
|
+
})(Systems || (Systems = {}));
|
|
21205
|
+
(function (Systems) {
|
|
21206
|
+
/**
|
|
21207
|
+
@ingroup Asset System
|
|
21208
|
+
* @description Data class used to contain information when attempting to upload an asset.
|
|
21209
|
+
*/
|
|
21210
|
+
class UriResult extends Systems.ResultBase {
|
|
21211
|
+
/** @internal */
|
|
21212
|
+
constructor(pointer) {
|
|
21213
|
+
super(pointer);
|
|
21214
|
+
}
|
|
21215
|
+
static fromResultBase(baseInstance) {
|
|
21216
|
+
const nativeClassWrapper = baseInstance;
|
|
21217
|
+
return new Systems.UriResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21218
|
+
}
|
|
21219
|
+
/**
|
|
21220
|
+
* @description Retrieves the uri for the asset uploaded.
|
|
21221
|
+
* @return Uri of the uploaded asset.
|
|
21222
|
+
*/
|
|
21223
|
+
getUri() {
|
|
21224
|
+
let _result = Module.ccall("csp_systems_UriResult_GetUri_StringR", "number", ["number"], [this.pointer]);
|
|
21225
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
21226
|
+
free(_result);
|
|
21227
|
+
_result = _resultString;
|
|
21228
|
+
return _result;
|
|
21229
|
+
}
|
|
21230
|
+
setUri(value) {
|
|
21231
|
+
Module.ccall("csp_systems_UriResult_SetUri_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
21232
|
+
}
|
|
21233
|
+
delete() {
|
|
21234
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21235
|
+
Module.ccall("csp_systems_UriResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21236
|
+
this.disposed = true;
|
|
21237
|
+
}
|
|
21238
|
+
}
|
|
21239
|
+
}
|
|
21240
|
+
Systems.UriResult = UriResult;
|
|
21241
|
+
})(Systems || (Systems = {}));
|
|
21242
|
+
(function (Systems) {
|
|
21243
|
+
/**
|
|
21244
|
+
@ingroup Asset System
|
|
21245
|
+
* @description Data class used to contain information when attempting to download asset data.
|
|
21246
|
+
*/
|
|
21247
|
+
class AssetDataResult extends Systems.ResultBase {
|
|
21248
|
+
/** @internal */
|
|
21249
|
+
constructor(pointer) {
|
|
21250
|
+
super(pointer);
|
|
21251
|
+
}
|
|
21252
|
+
static fromResultBase(baseInstance) {
|
|
21253
|
+
const nativeClassWrapper = baseInstance;
|
|
21254
|
+
return new Systems.AssetDataResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21255
|
+
}
|
|
21256
|
+
static create_other(other) {
|
|
21257
|
+
var _ptr = Module._malloc(8);
|
|
21258
|
+
Module.ccall("csp_systems_AssetDataResult_Ctor_AssetDataResultRC", "void", ["number", "number"], [_ptr, other.pointer]);
|
|
21259
|
+
var _nPtr = getNativePointer(_ptr);
|
|
21260
|
+
return new AssetDataResult(_nPtr);
|
|
21261
|
+
}
|
|
21262
|
+
delete() {
|
|
21263
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21264
|
+
Module.ccall("csp_systems_AssetDataResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21265
|
+
this.disposed = true;
|
|
21266
|
+
}
|
|
21267
|
+
}
|
|
21268
|
+
/**
|
|
21269
|
+
* @description Retrieves the data from the result.
|
|
21270
|
+
*/
|
|
21271
|
+
getData() {
|
|
21272
|
+
var _ret = Module._malloc(8);
|
|
20790
21273
|
Module.ccall("csp_systems_AssetDataResult_GetDataC_voidPC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
20791
21274
|
var _nPtr = getNativePointer(_ret).pointer;
|
|
20792
21275
|
Module._free(_ret);
|
|
@@ -20901,16 +21384,328 @@ export class CSPFoundation {
|
|
|
20901
21384
|
return new Systems.AssetSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20902
21385
|
}
|
|
20903
21386
|
/**
|
|
20904
|
-
* @description Creates an asset collection.
|
|
20905
|
-
* @param space - Optional space to associate the asset collection with
|
|
20906
|
-
* @param parentAssetCollectionId - Optional parent asset collection id
|
|
20907
|
-
* @param assetCollectionName - Name of the asset collection
|
|
20908
|
-
* @param metadata - Optional metadata info to be associated with the asset collection
|
|
20909
|
-
* @param type - Type of the new asset collection
|
|
20910
|
-
* @param tags - Optional array of strings to add to the asset collection as tags
|
|
21387
|
+
* @description Creates an asset collection.
|
|
21388
|
+
* @param space - Optional space to associate the asset collection with
|
|
21389
|
+
* @param parentAssetCollectionId - Optional parent asset collection id
|
|
21390
|
+
* @param assetCollectionName - Name of the asset collection
|
|
21391
|
+
* @param metadata - Optional metadata info to be associated with the asset collection
|
|
21392
|
+
* @param type - Type of the new asset collection
|
|
21393
|
+
* @param tags - Optional array of strings to add to the asset collection as tags
|
|
21394
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21395
|
+
*/
|
|
21396
|
+
async createAssetCollection(spaceId, parentAssetCollectionId, assetCollectionName, metadata, type, tags) {
|
|
21397
|
+
var _resolve;
|
|
21398
|
+
var _promise = new Promise((_r) => {
|
|
21399
|
+
_resolve = _r;
|
|
21400
|
+
});
|
|
21401
|
+
var _callbackPtr;
|
|
21402
|
+
var _callback = (_stateObject__, result) => {
|
|
21403
|
+
var _resultPtr = getNativePointer(result);
|
|
21404
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21405
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21406
|
+
return;
|
|
21407
|
+
}
|
|
21408
|
+
_resolve(_resultInstance);
|
|
21409
|
+
Module.removeFunction(_callbackPtr);
|
|
21410
|
+
};
|
|
21411
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21412
|
+
Module.ccall("csp_systems_AssetSystem_CreateAssetCollection_void_StringRC_StringRC_StringRC_MapRC_EAssetCollectionTypeC_ArrayRC_AssetCollectionResultCallback", "void", [
|
|
21413
|
+
"number",
|
|
21414
|
+
"string",
|
|
21415
|
+
"string",
|
|
21416
|
+
"string",
|
|
21417
|
+
"number",
|
|
21418
|
+
"number",
|
|
21419
|
+
"number",
|
|
21420
|
+
"number",
|
|
21421
|
+
"number",
|
|
21422
|
+
], [
|
|
21423
|
+
this.pointer,
|
|
21424
|
+
spaceId,
|
|
21425
|
+
parentAssetCollectionId,
|
|
21426
|
+
assetCollectionName,
|
|
21427
|
+
metadata != null ? metadata.pointer : 0,
|
|
21428
|
+
type,
|
|
21429
|
+
tags != null ? tags.pointer : 0,
|
|
21430
|
+
_callbackPtr,
|
|
21431
|
+
0,
|
|
21432
|
+
]);
|
|
21433
|
+
return _promise;
|
|
21434
|
+
}
|
|
21435
|
+
/**
|
|
21436
|
+
* @description Deletes a given asset collection.
|
|
21437
|
+
* @param assetCollection - Asset collection to delete
|
|
21438
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21439
|
+
*/
|
|
21440
|
+
async deleteAssetCollection(assetCollection) {
|
|
21441
|
+
var _resolve;
|
|
21442
|
+
var _promise = new Promise((_r) => {
|
|
21443
|
+
_resolve = _r;
|
|
21444
|
+
});
|
|
21445
|
+
var _callbackPtr;
|
|
21446
|
+
var _callback = (_stateObject__, result) => {
|
|
21447
|
+
var _resultPtr = getNativePointer(result);
|
|
21448
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21449
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21450
|
+
return;
|
|
21451
|
+
}
|
|
21452
|
+
_resolve(_resultInstance);
|
|
21453
|
+
Module.removeFunction(_callbackPtr);
|
|
21454
|
+
};
|
|
21455
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21456
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAssetCollection_void_AssetCollectionRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21457
|
+
return _promise;
|
|
21458
|
+
}
|
|
21459
|
+
/**
|
|
21460
|
+
* @description Copies an array of asset collections to another space. Note that all source asset collections must belong to the same space.
|
|
21461
|
+
* @param sourceAssetCollections - The array of asset collections to copy. They must all belong to the same
|
|
21462
|
+
* space.
|
|
21463
|
+
* @param destSpaceId - The unique identifier of the space to copy these asset collections to.
|
|
21464
|
+
* @param copyAsync - Whether to instruct the services to perform the copy of the asset collections
|
|
21465
|
+
* asynchronously.
|
|
21466
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21467
|
+
*/
|
|
21468
|
+
async copyAssetCollectionsToSpace(sourceAssetCollections, destSpaceId, copyAsync) {
|
|
21469
|
+
var _resolve;
|
|
21470
|
+
var _promise = new Promise((_r) => {
|
|
21471
|
+
_resolve = _r;
|
|
21472
|
+
});
|
|
21473
|
+
var _callbackPtr;
|
|
21474
|
+
var _callback = (_stateObject__, result) => {
|
|
21475
|
+
var _resultPtr = getNativePointer(result);
|
|
21476
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21477
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21478
|
+
return;
|
|
21479
|
+
}
|
|
21480
|
+
_resolve(_resultInstance);
|
|
21481
|
+
Module.removeFunction(_callbackPtr);
|
|
21482
|
+
};
|
|
21483
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21484
|
+
Module.ccall("csp_systems_AssetSystem_CopyAssetCollectionsToSpace_void_ArrayR_StringRC_bool_AssetCollectionsResultCallback", "void", ["number", "number", "string", "boolean", "number", "number"], [
|
|
21485
|
+
this.pointer,
|
|
21486
|
+
sourceAssetCollections.pointer,
|
|
21487
|
+
destSpaceId,
|
|
21488
|
+
copyAsync,
|
|
21489
|
+
_callbackPtr,
|
|
21490
|
+
0,
|
|
21491
|
+
]);
|
|
21492
|
+
return _promise;
|
|
21493
|
+
}
|
|
21494
|
+
/**
|
|
21495
|
+
* @description Finds an asset collection by its Id.
|
|
21496
|
+
* @param assetCollectionId - Asset collection to delete
|
|
21497
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21498
|
+
*/
|
|
21499
|
+
async getAssetCollectionById(assetCollectionId) {
|
|
21500
|
+
var _resolve;
|
|
21501
|
+
var _promise = new Promise((_r) => {
|
|
21502
|
+
_resolve = _r;
|
|
21503
|
+
});
|
|
21504
|
+
var _callbackPtr;
|
|
21505
|
+
var _callback = (_stateObject__, result) => {
|
|
21506
|
+
var _resultPtr = getNativePointer(result);
|
|
21507
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21508
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21509
|
+
return;
|
|
21510
|
+
}
|
|
21511
|
+
_resolve(_resultInstance);
|
|
21512
|
+
Module.removeFunction(_callbackPtr);
|
|
21513
|
+
};
|
|
21514
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21515
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionById_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionId, _callbackPtr, 0]);
|
|
21516
|
+
return _promise;
|
|
21517
|
+
}
|
|
21518
|
+
/**
|
|
21519
|
+
* @description Finds an asset collection by its Name.
|
|
21520
|
+
* @param assetCollectionName - Name of the asset collection to be retrieved
|
|
21521
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21522
|
+
*/
|
|
21523
|
+
async getAssetCollectionByName(assetCollectionName) {
|
|
21524
|
+
var _resolve;
|
|
21525
|
+
var _promise = new Promise((_r) => {
|
|
21526
|
+
_resolve = _r;
|
|
21527
|
+
});
|
|
21528
|
+
var _callbackPtr;
|
|
21529
|
+
var _callback = (_stateObject__, result) => {
|
|
21530
|
+
var _resultPtr = getNativePointer(result);
|
|
21531
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21532
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21533
|
+
return;
|
|
21534
|
+
}
|
|
21535
|
+
_resolve(_resultInstance);
|
|
21536
|
+
Module.removeFunction(_callbackPtr);
|
|
21537
|
+
};
|
|
21538
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21539
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionByName_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionName, _callbackPtr, 0]);
|
|
21540
|
+
return _promise;
|
|
21541
|
+
}
|
|
21542
|
+
/**
|
|
21543
|
+
* @description Retrieves asset collections based on the specified search criteria.
|
|
21544
|
+
* Results pagination is supported through the use of ResultsSkipNumber and ResultsMaxNumber.
|
|
21545
|
+
* @param space - Optional space to get asset collections associated with it
|
|
21546
|
+
* @param assetCollectionParentId - Optional asset collection parent id to get asset collections associated with it
|
|
21547
|
+
* @param assetCollectionType - Type of the asset collection
|
|
21548
|
+
* @param assetCollectionTags - Optional array of strings representing asset collection tags
|
|
21549
|
+
* @param assetCollectionNames - Optional array of strings representing asset
|
|
21550
|
+
* collection names
|
|
21551
|
+
* @param resultsSkipNumber - Optional param representing the number of result entries that will be skipped from the result. for no skip pass
|
|
21552
|
+
* nullptr.
|
|
21553
|
+
* @param resultsMaxNumber - Optional param representing the maximum number of result entries to be retrieved. for all available result
|
|
21554
|
+
* entries pass nullptr.
|
|
21555
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21556
|
+
*/
|
|
21557
|
+
async findAssetCollections(ids, parentId, names, types, tags, spaceIds, resultsSkipNumber, resultsMaxNumber) {
|
|
21558
|
+
var _resolve;
|
|
21559
|
+
var _promise = new Promise((_r) => {
|
|
21560
|
+
_resolve = _r;
|
|
21561
|
+
});
|
|
21562
|
+
var _callbackPtr;
|
|
21563
|
+
var _callback = (_stateObject__, result) => {
|
|
21564
|
+
var _resultPtr = getNativePointer(result);
|
|
21565
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21566
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21567
|
+
return;
|
|
21568
|
+
}
|
|
21569
|
+
_resolve(_resultInstance);
|
|
21570
|
+
Module.removeFunction(_callbackPtr);
|
|
21571
|
+
};
|
|
21572
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21573
|
+
var resultsSkipNumberPointer = 0;
|
|
21574
|
+
if (resultsSkipNumber != null) {
|
|
21575
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
21576
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
21577
|
+
}
|
|
21578
|
+
var resultsMaxNumberPointer = 0;
|
|
21579
|
+
if (resultsMaxNumber != null) {
|
|
21580
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
21581
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
21582
|
+
}
|
|
21583
|
+
Module.ccall("csp_systems_AssetSystem_FindAssetCollections_void_ArrayRC_StringRC_ArrayRC_ArrayRC_ArrayRC_ArrayRC_intRC_intRC_AssetCollectionsResultCallback", "void", [
|
|
21584
|
+
"number",
|
|
21585
|
+
"number",
|
|
21586
|
+
"string",
|
|
21587
|
+
"number",
|
|
21588
|
+
"number",
|
|
21589
|
+
"number",
|
|
21590
|
+
"number",
|
|
21591
|
+
"number",
|
|
21592
|
+
"number",
|
|
21593
|
+
"number",
|
|
21594
|
+
"number",
|
|
21595
|
+
], [
|
|
21596
|
+
this.pointer,
|
|
21597
|
+
ids != null ? ids.pointer : 0,
|
|
21598
|
+
parentId,
|
|
21599
|
+
names != null ? names.pointer : 0,
|
|
21600
|
+
types != null ? types.pointer : 0,
|
|
21601
|
+
tags != null ? tags.pointer : 0,
|
|
21602
|
+
spaceIds != null ? spaceIds.pointer : 0,
|
|
21603
|
+
resultsSkipNumberPointer,
|
|
21604
|
+
resultsMaxNumberPointer,
|
|
21605
|
+
_callbackPtr,
|
|
21606
|
+
0,
|
|
21607
|
+
]);
|
|
21608
|
+
if (resultsSkipNumberPointer) {
|
|
21609
|
+
Module._free(resultsSkipNumberPointer);
|
|
21610
|
+
}
|
|
21611
|
+
if (resultsMaxNumberPointer) {
|
|
21612
|
+
Module._free(resultsMaxNumberPointer);
|
|
21613
|
+
}
|
|
21614
|
+
return _promise;
|
|
21615
|
+
}
|
|
21616
|
+
/**
|
|
21617
|
+
* @description Updates the Metadata field of an Asset Collection
|
|
21618
|
+
* @param assetCollection - Asset collection to be updated
|
|
21619
|
+
* @param newMetadata - The new metadata information that will replace the previous
|
|
21620
|
+
* @param tags - Optional array of strings to replace the tags
|
|
21621
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21622
|
+
*/
|
|
21623
|
+
async updateAssetCollectionMetadata(assetCollection, newMetadata, tags) {
|
|
21624
|
+
var _resolve;
|
|
21625
|
+
var _promise = new Promise((_r) => {
|
|
21626
|
+
_resolve = _r;
|
|
21627
|
+
});
|
|
21628
|
+
var _callbackPtr;
|
|
21629
|
+
var _callback = (_stateObject__, result) => {
|
|
21630
|
+
var _resultPtr = getNativePointer(result);
|
|
21631
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21632
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21633
|
+
return;
|
|
21634
|
+
}
|
|
21635
|
+
_resolve(_resultInstance);
|
|
21636
|
+
Module.removeFunction(_callbackPtr);
|
|
21637
|
+
};
|
|
21638
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21639
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAssetCollectionMetadata_void_AssetCollectionRC_MapRC_ArrayRC_AssetCollectionResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21640
|
+
this.pointer,
|
|
21641
|
+
assetCollection.pointer,
|
|
21642
|
+
newMetadata.pointer,
|
|
21643
|
+
tags != null ? tags.pointer : 0,
|
|
21644
|
+
_callbackPtr,
|
|
21645
|
+
0,
|
|
21646
|
+
]);
|
|
21647
|
+
return _promise;
|
|
21648
|
+
}
|
|
21649
|
+
/**
|
|
21650
|
+
* @description Creates a new asset.
|
|
21651
|
+
* @param assetCollection - The parent collection for the asset to be associated with
|
|
21652
|
+
* @param name - Name of the asset collection
|
|
21653
|
+
* @param thirdPartyPackagedAssetIdentifier - Optional id to a third party packaged asset identifier
|
|
21654
|
+
* @param thirdPartyPlatform - Optional enum class for third part platform
|
|
21655
|
+
* @param type - Type of the asset
|
|
21656
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21657
|
+
*/
|
|
21658
|
+
async createAsset(assetCollection, name, thirdPartyPackagedAssetIdentifier, thirdPartyPlatform, type) {
|
|
21659
|
+
var _resolve;
|
|
21660
|
+
var _promise = new Promise((_r) => {
|
|
21661
|
+
_resolve = _r;
|
|
21662
|
+
});
|
|
21663
|
+
var _callbackPtr;
|
|
21664
|
+
var _callback = (_stateObject__, result) => {
|
|
21665
|
+
var _resultPtr = getNativePointer(result);
|
|
21666
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21667
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21668
|
+
return;
|
|
21669
|
+
}
|
|
21670
|
+
_resolve(_resultInstance);
|
|
21671
|
+
Module.removeFunction(_callbackPtr);
|
|
21672
|
+
};
|
|
21673
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21674
|
+
var thirdPartyPlatformPointer = 0;
|
|
21675
|
+
if (thirdPartyPlatform != null) {
|
|
21676
|
+
thirdPartyPlatformPointer = Module._malloc(4);
|
|
21677
|
+
Module.setValue(thirdPartyPlatformPointer, thirdPartyPlatform, "i32");
|
|
21678
|
+
}
|
|
21679
|
+
Module.ccall("csp_systems_AssetSystem_CreateAsset_void_AssetCollectionRC_StringRC_StringRC_EThirdPartyPlatformRC_EAssetType_AssetResultCallback", "void", [
|
|
21680
|
+
"number",
|
|
21681
|
+
"number",
|
|
21682
|
+
"string",
|
|
21683
|
+
"string",
|
|
21684
|
+
"number",
|
|
21685
|
+
"number",
|
|
21686
|
+
"number",
|
|
21687
|
+
"number",
|
|
21688
|
+
], [
|
|
21689
|
+
this.pointer,
|
|
21690
|
+
assetCollection.pointer,
|
|
21691
|
+
name,
|
|
21692
|
+
thirdPartyPackagedAssetIdentifier,
|
|
21693
|
+
thirdPartyPlatformPointer,
|
|
21694
|
+
type,
|
|
21695
|
+
_callbackPtr,
|
|
21696
|
+
0,
|
|
21697
|
+
]);
|
|
21698
|
+
if (thirdPartyPlatformPointer) {
|
|
21699
|
+
Module._free(thirdPartyPlatformPointer);
|
|
21700
|
+
}
|
|
21701
|
+
return _promise;
|
|
21702
|
+
}
|
|
21703
|
+
/**
|
|
21704
|
+
* @description Update a given asset.
|
|
21705
|
+
* @param asset - Asset to update
|
|
20911
21706
|
* @param callback - Callback when asynchronous task finishes
|
|
20912
21707
|
*/
|
|
20913
|
-
async
|
|
21708
|
+
async updateAsset(asset) {
|
|
20914
21709
|
var _resolve;
|
|
20915
21710
|
var _promise = new Promise((_r) => {
|
|
20916
21711
|
_resolve = _r;
|
|
@@ -20918,7 +21713,7 @@ export class CSPFoundation {
|
|
|
20918
21713
|
var _callbackPtr;
|
|
20919
21714
|
var _callback = (_stateObject__, result) => {
|
|
20920
21715
|
var _resultPtr = getNativePointer(result);
|
|
20921
|
-
var _resultInstance = new Systems.
|
|
21716
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
20922
21717
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20923
21718
|
return;
|
|
20924
21719
|
}
|
|
@@ -20926,35 +21721,16 @@ export class CSPFoundation {
|
|
|
20926
21721
|
Module.removeFunction(_callbackPtr);
|
|
20927
21722
|
};
|
|
20928
21723
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20929
|
-
Module.ccall("
|
|
20930
|
-
"number",
|
|
20931
|
-
"string",
|
|
20932
|
-
"string",
|
|
20933
|
-
"string",
|
|
20934
|
-
"number",
|
|
20935
|
-
"number",
|
|
20936
|
-
"number",
|
|
20937
|
-
"number",
|
|
20938
|
-
"number",
|
|
20939
|
-
], [
|
|
20940
|
-
this.pointer,
|
|
20941
|
-
spaceId,
|
|
20942
|
-
parentAssetCollectionId,
|
|
20943
|
-
assetCollectionName,
|
|
20944
|
-
metadata != null ? metadata.pointer : 0,
|
|
20945
|
-
type,
|
|
20946
|
-
tags != null ? tags.pointer : 0,
|
|
20947
|
-
_callbackPtr,
|
|
20948
|
-
0,
|
|
20949
|
-
]);
|
|
21724
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAsset_void_AssetRC_AssetResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
20950
21725
|
return _promise;
|
|
20951
21726
|
}
|
|
20952
21727
|
/**
|
|
20953
|
-
* @description Deletes a given asset
|
|
20954
|
-
* @param assetCollection -
|
|
21728
|
+
* @description Deletes a given asset.
|
|
21729
|
+
* @param assetCollection - The parent collection that the asset is associated with
|
|
21730
|
+
* @param asset - Asset to delete
|
|
20955
21731
|
* @param callback - Callback when asynchronous task finishes
|
|
20956
21732
|
*/
|
|
20957
|
-
async
|
|
21733
|
+
async deleteAsset(assetCollection, asset) {
|
|
20958
21734
|
var _resolve;
|
|
20959
21735
|
var _promise = new Promise((_r) => {
|
|
20960
21736
|
_resolve = _r;
|
|
@@ -20970,19 +21746,15 @@ export class CSPFoundation {
|
|
|
20970
21746
|
Module.removeFunction(_callbackPtr);
|
|
20971
21747
|
};
|
|
20972
21748
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20973
|
-
Module.ccall("
|
|
21749
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAsset_void_AssetCollectionRC_AssetRC_NullResultCallback", "void", ["number", "number", "number", "number", "number"], [this.pointer, assetCollection.pointer, asset.pointer, _callbackPtr, 0]);
|
|
20974
21750
|
return _promise;
|
|
20975
21751
|
}
|
|
20976
21752
|
/**
|
|
20977
|
-
* @description
|
|
20978
|
-
* @param
|
|
20979
|
-
* space.
|
|
20980
|
-
* @param destSpaceId - The unique identifier of the space to copy these asset collections to.
|
|
20981
|
-
* @param copyAsync - Whether to instruct the services to perform the copy of the asset collections
|
|
20982
|
-
* asynchronously.
|
|
21753
|
+
* @description Retrieves all assets in a given asset collection.
|
|
21754
|
+
* @param assetCollection - Collection to get all assets from
|
|
20983
21755
|
* @param callback - Callback when asynchronous task finishes
|
|
20984
21756
|
*/
|
|
20985
|
-
async
|
|
21757
|
+
async getAssetsInCollection(assetCollection) {
|
|
20986
21758
|
var _resolve;
|
|
20987
21759
|
var _promise = new Promise((_r) => {
|
|
20988
21760
|
_resolve = _r;
|
|
@@ -20990,7 +21762,7 @@ export class CSPFoundation {
|
|
|
20990
21762
|
var _callbackPtr;
|
|
20991
21763
|
var _callback = (_stateObject__, result) => {
|
|
20992
21764
|
var _resultPtr = getNativePointer(result);
|
|
20993
|
-
var _resultInstance = new Systems.
|
|
21765
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
20994
21766
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20995
21767
|
return;
|
|
20996
21768
|
}
|
|
@@ -20998,22 +21770,16 @@ export class CSPFoundation {
|
|
|
20998
21770
|
Module.removeFunction(_callbackPtr);
|
|
20999
21771
|
};
|
|
21000
21772
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21001
|
-
Module.ccall("
|
|
21002
|
-
this.pointer,
|
|
21003
|
-
sourceAssetCollections.pointer,
|
|
21004
|
-
destSpaceId,
|
|
21005
|
-
copyAsync,
|
|
21006
|
-
_callbackPtr,
|
|
21007
|
-
0,
|
|
21008
|
-
]);
|
|
21773
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsInCollection_void_AssetCollectionRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21009
21774
|
return _promise;
|
|
21010
21775
|
}
|
|
21011
21776
|
/**
|
|
21012
|
-
* @description
|
|
21013
|
-
* @param assetCollectionId -
|
|
21777
|
+
* @description Retrieves the asset specified by the Id
|
|
21778
|
+
* @param assetCollectionId - The id of the asset collection containing the asset
|
|
21779
|
+
* @param assetId - The id of the asset to retrieve
|
|
21014
21780
|
* @param callback - Callback when asynchronous task finishes
|
|
21015
21781
|
*/
|
|
21016
|
-
async
|
|
21782
|
+
async getAssetById(assetCollectionId, assetId) {
|
|
21017
21783
|
var _resolve;
|
|
21018
21784
|
var _promise = new Promise((_r) => {
|
|
21019
21785
|
_resolve = _r;
|
|
@@ -21021,7 +21787,7 @@ export class CSPFoundation {
|
|
|
21021
21787
|
var _callbackPtr;
|
|
21022
21788
|
var _callback = (_stateObject__, result) => {
|
|
21023
21789
|
var _resultPtr = getNativePointer(result);
|
|
21024
|
-
var _resultInstance = new Systems.
|
|
21790
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21025
21791
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21026
21792
|
return;
|
|
21027
21793
|
}
|
|
@@ -21029,15 +21795,15 @@ export class CSPFoundation {
|
|
|
21029
21795
|
Module.removeFunction(_callbackPtr);
|
|
21030
21796
|
};
|
|
21031
21797
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21032
|
-
Module.ccall("
|
|
21798
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetById_void_StringRC_StringRC_AssetResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21033
21799
|
return _promise;
|
|
21034
21800
|
}
|
|
21035
21801
|
/**
|
|
21036
|
-
* @description
|
|
21037
|
-
* @param
|
|
21802
|
+
* @description Retrieves all assets that belong to the asset collections with the give Ids.
|
|
21803
|
+
* @param assetCollectionIds - Collection of asset collection ids get all assets from
|
|
21038
21804
|
* @param callback - Callback when asynchronous task finishes
|
|
21039
21805
|
*/
|
|
21040
|
-
async
|
|
21806
|
+
async getAssetsByCollectionIds(assetCollectionIds) {
|
|
21041
21807
|
var _resolve;
|
|
21042
21808
|
var _promise = new Promise((_r) => {
|
|
21043
21809
|
_resolve = _r;
|
|
@@ -21045,7 +21811,7 @@ export class CSPFoundation {
|
|
|
21045
21811
|
var _callbackPtr;
|
|
21046
21812
|
var _callback = (_stateObject__, result) => {
|
|
21047
21813
|
var _resultPtr = getNativePointer(result);
|
|
21048
|
-
var _resultInstance = new Systems.
|
|
21814
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21049
21815
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21050
21816
|
return;
|
|
21051
21817
|
}
|
|
@@ -21053,25 +21819,19 @@ export class CSPFoundation {
|
|
|
21053
21819
|
Module.removeFunction(_callbackPtr);
|
|
21054
21820
|
};
|
|
21055
21821
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21056
|
-
Module.ccall("
|
|
21822
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCollectionIds_void_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollectionIds.pointer, _callbackPtr, 0]);
|
|
21057
21823
|
return _promise;
|
|
21058
21824
|
}
|
|
21059
21825
|
/**
|
|
21060
|
-
* @description Retrieves
|
|
21061
|
-
*
|
|
21062
|
-
*
|
|
21063
|
-
* @param
|
|
21064
|
-
* @param
|
|
21065
|
-
* @param
|
|
21066
|
-
* @param assetCollectionNames - Optional array of strings representing asset
|
|
21067
|
-
* collection names
|
|
21068
|
-
* @param resultsSkipNumber - Optional param representing the number of result entries that will be skipped from the result. for no skip pass
|
|
21069
|
-
* nullptr.
|
|
21070
|
-
* @param resultsMaxNumber - Optional param representing the maximum number of result entries to be retrieved. for all available result
|
|
21071
|
-
* entries pass nullptr.
|
|
21826
|
+
* @description Retrieves assets based on the specified search criteria.
|
|
21827
|
+
* @param assetCollectionIds - The asset collection ids that will be used as search criteria. note that
|
|
21828
|
+
* you have to pass at least one Id.
|
|
21829
|
+
* @param assetIds - Optional array of strings representing asset ids
|
|
21830
|
+
* @param assetNames - Optional array of strings representing asset names
|
|
21831
|
+
* @param assetTypes - Optional array of asset types
|
|
21072
21832
|
* @param callback - Callback when asynchronous task finishes
|
|
21073
21833
|
*/
|
|
21074
|
-
async
|
|
21834
|
+
async getAssetsByCriteria(assetCollectionIds, assetIds, assetNames, assetTypes) {
|
|
21075
21835
|
var _resolve;
|
|
21076
21836
|
var _promise = new Promise((_r) => {
|
|
21077
21837
|
_resolve = _r;
|
|
@@ -21079,7 +21839,7 @@ export class CSPFoundation {
|
|
|
21079
21839
|
var _callbackPtr;
|
|
21080
21840
|
var _callback = (_stateObject__, result) => {
|
|
21081
21841
|
var _resultPtr = getNativePointer(result);
|
|
21082
|
-
var _resultInstance = new Systems.
|
|
21842
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21083
21843
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21084
21844
|
return;
|
|
21085
21845
|
}
|
|
@@ -21087,57 +21847,26 @@ export class CSPFoundation {
|
|
|
21087
21847
|
Module.removeFunction(_callbackPtr);
|
|
21088
21848
|
};
|
|
21089
21849
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21090
|
-
|
|
21091
|
-
if (resultsSkipNumber != null) {
|
|
21092
|
-
resultsSkipNumberPointer = Module._malloc(4);
|
|
21093
|
-
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
21094
|
-
}
|
|
21095
|
-
var resultsMaxNumberPointer = 0;
|
|
21096
|
-
if (resultsMaxNumber != null) {
|
|
21097
|
-
resultsMaxNumberPointer = Module._malloc(4);
|
|
21098
|
-
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
21099
|
-
}
|
|
21100
|
-
Module.ccall("csp_systems_AssetSystem_FindAssetCollections_void_ArrayRC_StringRC_ArrayRC_ArrayRC_ArrayRC_ArrayRC_intRC_intRC_AssetCollectionsResultCallback", "void", [
|
|
21101
|
-
"number",
|
|
21102
|
-
"number",
|
|
21103
|
-
"string",
|
|
21104
|
-
"number",
|
|
21105
|
-
"number",
|
|
21106
|
-
"number",
|
|
21107
|
-
"number",
|
|
21108
|
-
"number",
|
|
21109
|
-
"number",
|
|
21110
|
-
"number",
|
|
21111
|
-
"number",
|
|
21112
|
-
], [
|
|
21850
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCriteria_void_ArrayRC_ArrayRC_ArrayRC_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21113
21851
|
this.pointer,
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
tags != null ? tags.pointer : 0,
|
|
21119
|
-
spaceIds != null ? spaceIds.pointer : 0,
|
|
21120
|
-
resultsSkipNumberPointer,
|
|
21121
|
-
resultsMaxNumberPointer,
|
|
21852
|
+
assetCollectionIds.pointer,
|
|
21853
|
+
assetIds != null ? assetIds.pointer : 0,
|
|
21854
|
+
assetNames != null ? assetNames.pointer : 0,
|
|
21855
|
+
assetTypes != null ? assetTypes.pointer : 0,
|
|
21122
21856
|
_callbackPtr,
|
|
21123
21857
|
0,
|
|
21124
21858
|
]);
|
|
21125
|
-
if (resultsSkipNumberPointer) {
|
|
21126
|
-
Module._free(resultsSkipNumberPointer);
|
|
21127
|
-
}
|
|
21128
|
-
if (resultsMaxNumberPointer) {
|
|
21129
|
-
Module._free(resultsMaxNumberPointer);
|
|
21130
|
-
}
|
|
21131
21859
|
return _promise;
|
|
21132
21860
|
}
|
|
21133
21861
|
/**
|
|
21134
|
-
* @description
|
|
21135
|
-
* @param assetCollection -
|
|
21136
|
-
* @param
|
|
21137
|
-
* @param
|
|
21862
|
+
* @description Uploads data for the given asset to CHS from the given source.
|
|
21863
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21864
|
+
* @param asset - Asset to upload data for
|
|
21865
|
+
* @param assetDataSource - Asset data to upload
|
|
21866
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21138
21867
|
* @param callback - Callback when asynchronous task finishes
|
|
21139
21868
|
*/
|
|
21140
|
-
async
|
|
21869
|
+
async uploadAssetData(assetCollection, asset, assetDataSource, progressCallback) {
|
|
21141
21870
|
var _resolve;
|
|
21142
21871
|
var _promise = new Promise((_r) => {
|
|
21143
21872
|
_resolve = _r;
|
|
@@ -21145,34 +21874,37 @@ export class CSPFoundation {
|
|
|
21145
21874
|
var _callbackPtr;
|
|
21146
21875
|
var _callback = (_stateObject__, result) => {
|
|
21147
21876
|
var _resultPtr = getNativePointer(result);
|
|
21148
|
-
var _resultInstance = new Systems.
|
|
21877
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21149
21878
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21879
|
+
if (progressCallback != null) {
|
|
21880
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21881
|
+
}
|
|
21150
21882
|
return;
|
|
21151
21883
|
}
|
|
21152
21884
|
_resolve(_resultInstance);
|
|
21153
21885
|
Module.removeFunction(_callbackPtr);
|
|
21154
21886
|
};
|
|
21155
21887
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21156
|
-
Module.ccall("
|
|
21888
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetData_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21157
21889
|
this.pointer,
|
|
21158
21890
|
assetCollection.pointer,
|
|
21159
|
-
|
|
21160
|
-
|
|
21891
|
+
asset.pointer,
|
|
21892
|
+
assetDataSource.pointer,
|
|
21161
21893
|
_callbackPtr,
|
|
21162
21894
|
0,
|
|
21163
21895
|
]);
|
|
21164
21896
|
return _promise;
|
|
21165
21897
|
}
|
|
21166
21898
|
/**
|
|
21167
|
-
* @description
|
|
21168
|
-
* @param assetCollection -
|
|
21169
|
-
* @param
|
|
21170
|
-
* @param
|
|
21171
|
-
*
|
|
21172
|
-
* @param
|
|
21899
|
+
* @description Uploads data for the given asset to CHS from the given source, taking a CancellationToken to allow cancelling the request.
|
|
21900
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21901
|
+
* @param asset - Asset to upload data for
|
|
21902
|
+
* @param assetDataSource - Asset data to upload
|
|
21903
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21904
|
+
* @param cancellationToken - Token for cancelling upload
|
|
21173
21905
|
* @param callback - Callback when asynchronous task finishes
|
|
21174
21906
|
*/
|
|
21175
|
-
async
|
|
21907
|
+
async uploadAssetDataEx(assetCollection, asset, assetDataSource, cancellationToken, progressCallback) {
|
|
21176
21908
|
var _resolve;
|
|
21177
21909
|
var _promise = new Promise((_r) => {
|
|
21178
21910
|
_resolve = _r;
|
|
@@ -21180,7 +21912,42 @@ export class CSPFoundation {
|
|
|
21180
21912
|
var _callbackPtr;
|
|
21181
21913
|
var _callback = (_stateObject__, result) => {
|
|
21182
21914
|
var _resultPtr = getNativePointer(result);
|
|
21183
|
-
var _resultInstance = new Systems.
|
|
21915
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21916
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21917
|
+
if (progressCallback != null) {
|
|
21918
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21919
|
+
}
|
|
21920
|
+
return;
|
|
21921
|
+
}
|
|
21922
|
+
_resolve(_resultInstance);
|
|
21923
|
+
Module.removeFunction(_callbackPtr);
|
|
21924
|
+
};
|
|
21925
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21926
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetDataEx_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_CancellationTokenR_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21927
|
+
this.pointer,
|
|
21928
|
+
assetCollection.pointer,
|
|
21929
|
+
asset.pointer,
|
|
21930
|
+
assetDataSource.pointer,
|
|
21931
|
+
cancellationToken.pointer,
|
|
21932
|
+
_callbackPtr,
|
|
21933
|
+
0,
|
|
21934
|
+
]);
|
|
21935
|
+
return _promise;
|
|
21936
|
+
}
|
|
21937
|
+
/**
|
|
21938
|
+
* @description Downloads data for a given Asset from CHS.
|
|
21939
|
+
* @param asset - Asset to download data for
|
|
21940
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21941
|
+
*/
|
|
21942
|
+
async downloadAssetData(asset) {
|
|
21943
|
+
var _resolve;
|
|
21944
|
+
var _promise = new Promise((_r) => {
|
|
21945
|
+
_resolve = _r;
|
|
21946
|
+
});
|
|
21947
|
+
var _callbackPtr;
|
|
21948
|
+
var _callback = (_stateObject__, result) => {
|
|
21949
|
+
var _resultPtr = getNativePointer(result);
|
|
21950
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21184
21951
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21185
21952
|
return;
|
|
21186
21953
|
}
|
|
@@ -21188,41 +21955,46 @@ export class CSPFoundation {
|
|
|
21188
21955
|
Module.removeFunction(_callbackPtr);
|
|
21189
21956
|
};
|
|
21190
21957
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21205
|
-
|
|
21958
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetData_void_AssetRC_AssetDataResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21959
|
+
return _promise;
|
|
21960
|
+
}
|
|
21961
|
+
/**
|
|
21962
|
+
* @description Downloads data for a given Asset from CHS, taking a CancellationToken to allow cancelling the request.
|
|
21963
|
+
* @param asset - Asset to download data for
|
|
21964
|
+
* @param cancellationToken - Token for cancelling download
|
|
21965
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21966
|
+
*/
|
|
21967
|
+
async downloadAssetDataEx(asset, cancellationToken) {
|
|
21968
|
+
var _resolve;
|
|
21969
|
+
var _promise = new Promise((_r) => {
|
|
21970
|
+
_resolve = _r;
|
|
21971
|
+
});
|
|
21972
|
+
var _callbackPtr;
|
|
21973
|
+
var _callback = (_stateObject__, result) => {
|
|
21974
|
+
var _resultPtr = getNativePointer(result);
|
|
21975
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21976
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21977
|
+
return;
|
|
21978
|
+
}
|
|
21979
|
+
_resolve(_resultInstance);
|
|
21980
|
+
Module.removeFunction(_callbackPtr);
|
|
21981
|
+
};
|
|
21982
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21983
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetDataEx_void_AssetRC_CancellationTokenR_AssetDataResultCallback", "void", ["number", "number", "number", "number", "number"], [
|
|
21206
21984
|
this.pointer,
|
|
21207
|
-
|
|
21208
|
-
|
|
21209
|
-
thirdPartyPackagedAssetIdentifier,
|
|
21210
|
-
thirdPartyPlatformPointer,
|
|
21211
|
-
type,
|
|
21985
|
+
asset.pointer,
|
|
21986
|
+
cancellationToken.pointer,
|
|
21212
21987
|
_callbackPtr,
|
|
21213
21988
|
0,
|
|
21214
21989
|
]);
|
|
21215
|
-
if (thirdPartyPlatformPointer) {
|
|
21216
|
-
Module._free(thirdPartyPlatformPointer);
|
|
21217
|
-
}
|
|
21218
21990
|
return _promise;
|
|
21219
21991
|
}
|
|
21220
21992
|
/**
|
|
21221
|
-
* @description
|
|
21222
|
-
* @param asset - Asset to
|
|
21993
|
+
* @description Get the size of the data associated with an Asset.
|
|
21994
|
+
* @param asset - Asset to get data size for
|
|
21223
21995
|
* @param callback - Callback when asynchronous task finishes
|
|
21224
21996
|
*/
|
|
21225
|
-
async
|
|
21997
|
+
async getAssetDataSize(asset) {
|
|
21226
21998
|
var _resolve;
|
|
21227
21999
|
var _promise = new Promise((_r) => {
|
|
21228
22000
|
_resolve = _r;
|
|
@@ -21230,7 +22002,7 @@ export class CSPFoundation {
|
|
|
21230
22002
|
var _callbackPtr;
|
|
21231
22003
|
var _callback = (_stateObject__, result) => {
|
|
21232
22004
|
var _resultPtr = getNativePointer(result);
|
|
21233
|
-
var _resultInstance = new Systems.
|
|
22005
|
+
var _resultInstance = new Systems.UInt64Result(_resultPtr);
|
|
21234
22006
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21235
22007
|
return;
|
|
21236
22008
|
}
|
|
@@ -21238,16 +22010,15 @@ export class CSPFoundation {
|
|
|
21238
22010
|
Module.removeFunction(_callbackPtr);
|
|
21239
22011
|
};
|
|
21240
22012
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21241
|
-
Module.ccall("
|
|
22013
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetDataSize_void_AssetRC_UInt64ResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21242
22014
|
return _promise;
|
|
21243
22015
|
}
|
|
21244
22016
|
/**
|
|
21245
|
-
* @description
|
|
21246
|
-
* @param assetCollection -
|
|
21247
|
-
* @param asset - Asset to delete
|
|
22017
|
+
* @description Gets a LOD chain within the given AssetCollection.
|
|
22018
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
21248
22019
|
* @param callback - Callback when asynchronous task finishes
|
|
21249
22020
|
*/
|
|
21250
|
-
async
|
|
22021
|
+
async getLODChain(assetCollection) {
|
|
21251
22022
|
var _resolve;
|
|
21252
22023
|
var _promise = new Promise((_r) => {
|
|
21253
22024
|
_resolve = _r;
|
|
@@ -21255,7 +22026,7 @@ export class CSPFoundation {
|
|
|
21255
22026
|
var _callbackPtr;
|
|
21256
22027
|
var _callback = (_stateObject__, result) => {
|
|
21257
22028
|
var _resultPtr = getNativePointer(result);
|
|
21258
|
-
var _resultInstance = new Systems.
|
|
22029
|
+
var _resultInstance = new Systems.LODChainResult(_resultPtr);
|
|
21259
22030
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21260
22031
|
return;
|
|
21261
22032
|
}
|
|
@@ -21263,15 +22034,17 @@ export class CSPFoundation {
|
|
|
21263
22034
|
Module.removeFunction(_callbackPtr);
|
|
21264
22035
|
};
|
|
21265
22036
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21266
|
-
Module.ccall("
|
|
22037
|
+
Module.ccall("csp_systems_AssetSystem_GetLODChain_void_AssetCollectionRC_LODChainResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21267
22038
|
return _promise;
|
|
21268
22039
|
}
|
|
21269
22040
|
/**
|
|
21270
|
-
* @description
|
|
21271
|
-
* @param assetCollection -
|
|
22041
|
+
* @description Registers an asset to the LOD chain
|
|
22042
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
22043
|
+
* @param asset - Asset to register as LOD
|
|
22044
|
+
* @param asset - LOD level for Asset to be registered to
|
|
21272
22045
|
* @param callback - Callback when asynchronous task finishes
|
|
21273
22046
|
*/
|
|
21274
|
-
async
|
|
22047
|
+
async registerAssetToLODChain(assetCollection, asset, lODLevel, progressCallback) {
|
|
21275
22048
|
var _resolve;
|
|
21276
22049
|
var _promise = new Promise((_r) => {
|
|
21277
22050
|
_resolve = _r;
|
|
@@ -21279,24 +22052,34 @@ export class CSPFoundation {
|
|
|
21279
22052
|
var _callbackPtr;
|
|
21280
22053
|
var _callback = (_stateObject__, result) => {
|
|
21281
22054
|
var _resultPtr = getNativePointer(result);
|
|
21282
|
-
var _resultInstance = new Systems.
|
|
22055
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21283
22056
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
22057
|
+
if (progressCallback != null) {
|
|
22058
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
22059
|
+
}
|
|
21284
22060
|
return;
|
|
21285
22061
|
}
|
|
21286
22062
|
_resolve(_resultInstance);
|
|
21287
22063
|
Module.removeFunction(_callbackPtr);
|
|
21288
22064
|
};
|
|
21289
22065
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21290
|
-
Module.ccall("
|
|
22066
|
+
Module.ccall("csp_systems_AssetSystem_RegisterAssetToLODChain_void_AssetCollectionRC_AssetRC_int_AssetResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
22067
|
+
this.pointer,
|
|
22068
|
+
assetCollection.pointer,
|
|
22069
|
+
asset.pointer,
|
|
22070
|
+
lODLevel,
|
|
22071
|
+
_callbackPtr,
|
|
22072
|
+
0,
|
|
22073
|
+
]);
|
|
21291
22074
|
return _promise;
|
|
21292
22075
|
}
|
|
21293
22076
|
/**
|
|
21294
|
-
* @description
|
|
21295
|
-
* @param
|
|
21296
|
-
* @param
|
|
21297
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22077
|
+
* @description Creates a new material backed by an AssetCollection/Asset.
|
|
22078
|
+
* @param name - The name of the new material.
|
|
22079
|
+
* @param spaceId - The space id this material is associated with.
|
|
22080
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21298
22081
|
*/
|
|
21299
|
-
async
|
|
22082
|
+
async createMaterial(name, spaceId) {
|
|
21300
22083
|
var _resolve;
|
|
21301
22084
|
var _promise = new Promise((_r) => {
|
|
21302
22085
|
_resolve = _r;
|
|
@@ -21304,7 +22087,7 @@ export class CSPFoundation {
|
|
|
21304
22087
|
var _callbackPtr;
|
|
21305
22088
|
var _callback = (_stateObject__, result) => {
|
|
21306
22089
|
var _resultPtr = getNativePointer(result);
|
|
21307
|
-
var _resultInstance = new Systems.
|
|
22090
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21308
22091
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21309
22092
|
return;
|
|
21310
22093
|
}
|
|
@@ -21312,15 +22095,18 @@ export class CSPFoundation {
|
|
|
21312
22095
|
Module.removeFunction(_callbackPtr);
|
|
21313
22096
|
};
|
|
21314
22097
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21315
|
-
Module.ccall("
|
|
22098
|
+
Module.ccall("csp_systems_AssetSystem_CreateMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, name, spaceId, _callbackPtr, 0]);
|
|
21316
22099
|
return _promise;
|
|
21317
22100
|
}
|
|
21318
22101
|
/**
|
|
21319
|
-
* @description
|
|
21320
|
-
*
|
|
21321
|
-
*
|
|
22102
|
+
* @description Updates an existing material's properties.
|
|
22103
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22104
|
+
* If the material doesn't exist, EResultCode::Failed will be returned.
|
|
22105
|
+
* If the material hasn't changed, EResultCode::Success will still be returned.
|
|
22106
|
+
* @param material - The material to update
|
|
22107
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21322
22108
|
*/
|
|
21323
|
-
async
|
|
22109
|
+
async updateMaterial(material) {
|
|
21324
22110
|
var _resolve;
|
|
21325
22111
|
var _promise = new Promise((_r) => {
|
|
21326
22112
|
_resolve = _r;
|
|
@@ -21328,7 +22114,7 @@ export class CSPFoundation {
|
|
|
21328
22114
|
var _callbackPtr;
|
|
21329
22115
|
var _callback = (_stateObject__, result) => {
|
|
21330
22116
|
var _resultPtr = getNativePointer(result);
|
|
21331
|
-
var _resultInstance = new Systems.
|
|
22117
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21332
22118
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21333
22119
|
return;
|
|
21334
22120
|
}
|
|
@@ -21336,19 +22122,16 @@ export class CSPFoundation {
|
|
|
21336
22122
|
Module.removeFunction(_callbackPtr);
|
|
21337
22123
|
};
|
|
21338
22124
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21339
|
-
Module.ccall("
|
|
22125
|
+
Module.ccall("csp_systems_AssetSystem_UpdateMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21340
22126
|
return _promise;
|
|
21341
22127
|
}
|
|
21342
22128
|
/**
|
|
21343
|
-
* @description
|
|
21344
|
-
*
|
|
21345
|
-
*
|
|
21346
|
-
* @param
|
|
21347
|
-
* @param assetNames - Optional array of strings representing asset names
|
|
21348
|
-
* @param assetTypes - Optional array of asset types
|
|
21349
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22129
|
+
* @description Deletes a given material.
|
|
22130
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22131
|
+
* @param material - The material to delete
|
|
22132
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21350
22133
|
*/
|
|
21351
|
-
async
|
|
22134
|
+
async deleteMaterial(material) {
|
|
21352
22135
|
var _resolve;
|
|
21353
22136
|
var _promise = new Promise((_r) => {
|
|
21354
22137
|
_resolve = _r;
|
|
@@ -21356,7 +22139,7 @@ export class CSPFoundation {
|
|
|
21356
22139
|
var _callbackPtr;
|
|
21357
22140
|
var _callback = (_stateObject__, result) => {
|
|
21358
22141
|
var _resultPtr = getNativePointer(result);
|
|
21359
|
-
var _resultInstance = new Systems.
|
|
22142
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21360
22143
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21361
22144
|
return;
|
|
21362
22145
|
}
|
|
@@ -21364,26 +22147,15 @@ export class CSPFoundation {
|
|
|
21364
22147
|
Module.removeFunction(_callbackPtr);
|
|
21365
22148
|
};
|
|
21366
22149
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21367
|
-
Module.ccall("
|
|
21368
|
-
this.pointer,
|
|
21369
|
-
assetCollectionIds.pointer,
|
|
21370
|
-
assetIds != null ? assetIds.pointer : 0,
|
|
21371
|
-
assetNames != null ? assetNames.pointer : 0,
|
|
21372
|
-
assetTypes != null ? assetTypes.pointer : 0,
|
|
21373
|
-
_callbackPtr,
|
|
21374
|
-
0,
|
|
21375
|
-
]);
|
|
22150
|
+
Module.ccall("csp_systems_AssetSystem_DeleteMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21376
22151
|
return _promise;
|
|
21377
22152
|
}
|
|
21378
22153
|
/**
|
|
21379
|
-
* @description
|
|
21380
|
-
* @param
|
|
21381
|
-
* @param
|
|
21382
|
-
* @param assetDataSource - Asset data to upload
|
|
21383
|
-
* AssetDataSource is an interface. A derived class must be passed.
|
|
21384
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22154
|
+
* @description Gets all materials associated with the given space.
|
|
22155
|
+
* @param spaceId - The space id the material is associated with.
|
|
22156
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21385
22157
|
*/
|
|
21386
|
-
async
|
|
22158
|
+
async getMaterials(spaceId) {
|
|
21387
22159
|
var _resolve;
|
|
21388
22160
|
var _promise = new Promise((_r) => {
|
|
21389
22161
|
_resolve = _r;
|
|
@@ -21391,37 +22163,24 @@ export class CSPFoundation {
|
|
|
21391
22163
|
var _callbackPtr;
|
|
21392
22164
|
var _callback = (_stateObject__, result) => {
|
|
21393
22165
|
var _resultPtr = getNativePointer(result);
|
|
21394
|
-
var _resultInstance = new Systems.
|
|
22166
|
+
var _resultInstance = new Systems.GLTFMaterialsResult(_resultPtr);
|
|
21395
22167
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21396
|
-
if (progressCallback != null) {
|
|
21397
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21398
|
-
}
|
|
21399
22168
|
return;
|
|
21400
22169
|
}
|
|
21401
22170
|
_resolve(_resultInstance);
|
|
21402
22171
|
Module.removeFunction(_callbackPtr);
|
|
21403
22172
|
};
|
|
21404
22173
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21405
|
-
Module.ccall("
|
|
21406
|
-
this.pointer,
|
|
21407
|
-
assetCollection.pointer,
|
|
21408
|
-
asset.pointer,
|
|
21409
|
-
assetDataSource.pointer,
|
|
21410
|
-
_callbackPtr,
|
|
21411
|
-
0,
|
|
21412
|
-
]);
|
|
22174
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterials_void_StringRC_GLTFMaterialsResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, spaceId, _callbackPtr, 0]);
|
|
21413
22175
|
return _promise;
|
|
21414
22176
|
}
|
|
21415
22177
|
/**
|
|
21416
|
-
* @description
|
|
21417
|
-
* @param
|
|
21418
|
-
* @param
|
|
21419
|
-
* @param
|
|
21420
|
-
* AssetDataSource is an interface. A derived class must be passed.
|
|
21421
|
-
* @param cancellationToken - Token for cancelling upload
|
|
21422
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22178
|
+
* @description Gets a material using its AssetCollection and Asset Id.
|
|
22179
|
+
* @param assetCollectionId - The asset collection id this material is associated with.
|
|
22180
|
+
* @param assetId - The asset id this material is associated with.
|
|
22181
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21423
22182
|
*/
|
|
21424
|
-
async
|
|
22183
|
+
async getMaterial(assetCollectionId, assetId) {
|
|
21425
22184
|
var _resolve;
|
|
21426
22185
|
var _promise = new Promise((_r) => {
|
|
21427
22186
|
_resolve = _r;
|
|
@@ -21429,169 +22188,400 @@ export class CSPFoundation {
|
|
|
21429
22188
|
var _callbackPtr;
|
|
21430
22189
|
var _callback = (_stateObject__, result) => {
|
|
21431
22190
|
var _resultPtr = getNativePointer(result);
|
|
21432
|
-
var _resultInstance = new Systems.
|
|
22191
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21433
22192
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21434
|
-
if (progressCallback != null) {
|
|
21435
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21436
|
-
}
|
|
21437
22193
|
return;
|
|
21438
22194
|
}
|
|
21439
22195
|
_resolve(_resultInstance);
|
|
21440
22196
|
Module.removeFunction(_callbackPtr);
|
|
21441
22197
|
};
|
|
21442
22198
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21443
|
-
Module.ccall("
|
|
21444
|
-
this.pointer,
|
|
21445
|
-
assetCollection.pointer,
|
|
21446
|
-
asset.pointer,
|
|
21447
|
-
assetDataSource.pointer,
|
|
21448
|
-
cancellationToken.pointer,
|
|
21449
|
-
_callbackPtr,
|
|
21450
|
-
0,
|
|
21451
|
-
]);
|
|
22199
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21452
22200
|
return _promise;
|
|
21453
22201
|
}
|
|
21454
22202
|
/**
|
|
21455
|
-
* @description
|
|
21456
|
-
* @param
|
|
21457
|
-
|
|
22203
|
+
* @description Sets a callback for an asset changed event.
|
|
22204
|
+
* @param callback - Callback to receive data for the asset that has been changed.
|
|
22205
|
+
*/
|
|
22206
|
+
setAssetDetailBlobChangedCallback(callback) {
|
|
22207
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22208
|
+
var _arg1 = new Multiplayer.AssetDetailBlobParams(getNativePointer(arg1));
|
|
22209
|
+
callback(_arg1);
|
|
22210
|
+
};
|
|
22211
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22212
|
+
Module.ccall("csp_systems_AssetSystem_SetAssetDetailBlobChangedCallback_void_AssetDetailBlobChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22213
|
+
}
|
|
22214
|
+
/**
|
|
22215
|
+
* @description Sets a callback for a material changed event.
|
|
22216
|
+
* @param callback - Callback to receive data for the material that has been changed.
|
|
22217
|
+
*/
|
|
22218
|
+
setMaterialChangedCallback(callback) {
|
|
22219
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22220
|
+
var _arg1 = new Multiplayer.MaterialChangedParams(getNativePointer(arg1));
|
|
22221
|
+
callback(_arg1);
|
|
22222
|
+
};
|
|
22223
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22224
|
+
Module.ccall("csp_systems_AssetSystem_SetMaterialChangedCallback_void_MaterialChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22225
|
+
}
|
|
22226
|
+
/**
|
|
22227
|
+
* @description Registers the system to listen for the named event.
|
|
22228
|
+
*/
|
|
22229
|
+
registerSystemCallback() {
|
|
22230
|
+
Module.ccall("csp_systems_AssetSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22231
|
+
}
|
|
22232
|
+
/**
|
|
22233
|
+
* @description Deregisters the system from listening for the named event.
|
|
22234
|
+
*/
|
|
22235
|
+
deregisterSystemCallback() {
|
|
22236
|
+
Module.ccall("csp_systems_AssetSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22237
|
+
}
|
|
22238
|
+
}
|
|
22239
|
+
Systems.AssetSystem = AssetSystem;
|
|
22240
|
+
})(Systems || (Systems = {}));
|
|
22241
|
+
(function (Systems) {
|
|
22242
|
+
/**
|
|
22243
|
+
@ingroup Asset System
|
|
22244
|
+
* @description Data class which represents a GLTF material.
|
|
22245
|
+
*/
|
|
22246
|
+
class GLTFMaterial extends Systems.Material {
|
|
22247
|
+
/** @internal */
|
|
22248
|
+
constructor(pointer) {
|
|
22249
|
+
super(pointer);
|
|
22250
|
+
}
|
|
22251
|
+
static fromMaterial(baseInstance) {
|
|
22252
|
+
const nativeClassWrapper = baseInstance;
|
|
22253
|
+
return new Systems.GLTFMaterial(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22254
|
+
}
|
|
22255
|
+
/**
|
|
22256
|
+
* Sets how to alpha value is interpreted
|
|
22257
|
+
* @param mode - EAlphaMode
|
|
22258
|
+
*/
|
|
22259
|
+
setAlphaMode(mode) {
|
|
22260
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaMode_void_EAlphaMode", "void", ["number", "number"], [this.pointer, mode]);
|
|
22261
|
+
}
|
|
22262
|
+
/**
|
|
22263
|
+
* Gets how to alpha value is interpreted
|
|
22264
|
+
* @return EAlphaMode
|
|
22265
|
+
*/
|
|
22266
|
+
getAlphaMode() {
|
|
22267
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaModeC_EAlphaMode", "number", ["number"], [this.pointer]);
|
|
22268
|
+
return _result;
|
|
22269
|
+
}
|
|
22270
|
+
/**
|
|
22271
|
+
* @description Sets the alpha cutoff value
|
|
22272
|
+
* When alphaMode is set to MASK the alphaCutoff property specifies the cutoff threshold.
|
|
22273
|
+
* If the alpha value is greater than or equal to the alphaCutoff value then it is rendered as fully opaque,
|
|
22274
|
+
* otherwise, it is rendered as fully transparent. alphaCutoff value is ignored for other modes.
|
|
22275
|
+
* @param cutoff - Float
|
|
22276
|
+
*/
|
|
22277
|
+
setAlphaCutoff(cutoff) {
|
|
22278
|
+
assert(cutoff >= Limits.FLOAT_MIN);
|
|
22279
|
+
assert(cutoff <= Limits.FLOAT_MAX);
|
|
22280
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaCutoff_void_float", "void", ["number", "number"], [this.pointer, cutoff]);
|
|
22281
|
+
}
|
|
22282
|
+
/**
|
|
22283
|
+
* Gets the alpha cutoff value
|
|
22284
|
+
* @return Float
|
|
22285
|
+
*/
|
|
22286
|
+
getAlphaCutoff() {
|
|
22287
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaCutoffC_float", "number", ["number"], [this.pointer]);
|
|
22288
|
+
return _result;
|
|
22289
|
+
}
|
|
22290
|
+
/**
|
|
22291
|
+
* @description Sets the doubleSided property which specifies whether the material is double sided.
|
|
22292
|
+
* When this value is false, back - face culling is enabled, i.e., only front-facing triangles are rendered.
|
|
22293
|
+
* When this value is true, back - face culling is disabled and double sided lighting is enabled.
|
|
22294
|
+
* @param doubleSided - Bool
|
|
22295
|
+
*/
|
|
22296
|
+
setDoubleSided(doubleSided) {
|
|
22297
|
+
Module.ccall("csp_systems_GLTFMaterial_SetDoubleSided_void_bool", "void", ["number", "boolean"], [this.pointer, doubleSided]);
|
|
22298
|
+
}
|
|
22299
|
+
/**
|
|
22300
|
+
* @description Gets the double sided value
|
|
22301
|
+
* @return Bool
|
|
22302
|
+
*/
|
|
22303
|
+
getDoubleSided() {
|
|
22304
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetDoubleSidedC_bool", "boolean", ["number"], [this.pointer]);
|
|
22305
|
+
return _result;
|
|
22306
|
+
}
|
|
22307
|
+
/**
|
|
22308
|
+
* @description Sets the factors for the base color of the material.
|
|
22309
|
+
* This value defines linear multipliers for the sampled texels of the base color texture.
|
|
22310
|
+
* @param factor - Const csp::common::vector4&
|
|
22311
|
+
*/
|
|
22312
|
+
setBaseColorFactor(factor) {
|
|
22313
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorFactor_void_Vector4RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22314
|
+
}
|
|
22315
|
+
/**
|
|
22316
|
+
* @description Gets the factor of the base color texture
|
|
22317
|
+
* @return Csp::common::vector4&
|
|
22318
|
+
*/
|
|
22319
|
+
getBaseColorFactor() {
|
|
22320
|
+
var _ret = Module._malloc(8);
|
|
22321
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorFactorC_Vector4RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22322
|
+
var _nPtr = new Common.Vector4(getNativePointer(_ret));
|
|
22323
|
+
Module._free(_ret);
|
|
22324
|
+
return _nPtr;
|
|
22325
|
+
}
|
|
22326
|
+
/**
|
|
22327
|
+
* @description Sets the factor for the metalness of the material.
|
|
22328
|
+
* This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.
|
|
22329
|
+
* @param factor - Float
|
|
22330
|
+
*/
|
|
22331
|
+
setMetallicFactor(factor) {
|
|
22332
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22333
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22334
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22335
|
+
}
|
|
22336
|
+
/**
|
|
22337
|
+
* @description Gets the factor of the metallic texture
|
|
22338
|
+
* @return Float
|
|
22339
|
+
*/
|
|
22340
|
+
getMetallicFactor() {
|
|
22341
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetMetallicFactorC_float", "number", ["number"], [this.pointer]);
|
|
22342
|
+
return _result;
|
|
22343
|
+
}
|
|
22344
|
+
/**
|
|
22345
|
+
* @description Sets the factor for the roughness of the material.
|
|
22346
|
+
* This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.
|
|
22347
|
+
* @param factor - Float
|
|
22348
|
+
*/
|
|
22349
|
+
setRoughnessFactor(factor) {
|
|
22350
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22351
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22352
|
+
Module.ccall("csp_systems_GLTFMaterial_SetRoughnessFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22353
|
+
}
|
|
22354
|
+
/**
|
|
22355
|
+
* @description Gets the factor of the roughness texture
|
|
22356
|
+
* @return Float
|
|
22357
|
+
*/
|
|
22358
|
+
getRoughnessFactor() {
|
|
22359
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetRoughnessFactorC_float", "number", ["number"], [this.pointer]);
|
|
22360
|
+
return _result;
|
|
22361
|
+
}
|
|
22362
|
+
/**
|
|
22363
|
+
* @description Sets factors for the emissive color of the material.
|
|
22364
|
+
* This value defines linear multipliers for the sampled texels of the emissive texture.
|
|
22365
|
+
* @param factor - Const csp::common::vector3&
|
|
22366
|
+
*/
|
|
22367
|
+
setEmissiveFactor(factor) {
|
|
22368
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveFactor_void_Vector3RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22369
|
+
}
|
|
22370
|
+
/**
|
|
22371
|
+
* @description Gets the factor of the emissive color texture
|
|
22372
|
+
* @return Csp::common::vector3&
|
|
22373
|
+
*/
|
|
22374
|
+
getEmissiveFactor() {
|
|
22375
|
+
var _ret = Module._malloc(8);
|
|
22376
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveFactorC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22377
|
+
var _nPtr = new Common.Vector3(getNativePointer(_ret));
|
|
22378
|
+
Module._free(_ret);
|
|
22379
|
+
return _nPtr;
|
|
22380
|
+
}
|
|
22381
|
+
/**
|
|
22382
|
+
* @description Sets the base color texture. The first three components (RGB) MUST be encoded with the sRGB transfer function.
|
|
22383
|
+
* They specify the base color of the material.
|
|
22384
|
+
* If the fourth component (A) is present, it represents the linear alpha coverage of the material.
|
|
22385
|
+
* Otherwise, the alpha coverage is equal to 1.0. The material.alphaMode property specifies how alpha is interpreted.
|
|
22386
|
+
* The stored texels MUST NOT be premultiplied.
|
|
22387
|
+
* When undefined, the texture MUST be sampled as having 1.0 in all components.
|
|
22388
|
+
* @param texture - Const textureinfo&
|
|
22389
|
+
*/
|
|
22390
|
+
setBaseColorTexture(texture) {
|
|
22391
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22392
|
+
}
|
|
22393
|
+
/**
|
|
22394
|
+
* @description Gets the base color texture
|
|
22395
|
+
* @return Const textureinfo&
|
|
22396
|
+
*/
|
|
22397
|
+
getBaseColorTexture() {
|
|
22398
|
+
var _ret = Module._malloc(8);
|
|
22399
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22400
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22401
|
+
Module._free(_ret);
|
|
22402
|
+
return _nPtr;
|
|
22403
|
+
}
|
|
22404
|
+
/**
|
|
22405
|
+
* @description Sets the metallic-roughness texture.
|
|
22406
|
+
* The metalness values are sampled from the B channel.
|
|
22407
|
+
* The roughness values are sampled from the G channel.
|
|
22408
|
+
* These values MUST be encoded with a linear transfer function.
|
|
22409
|
+
* If other channels are present (R or A), they MUST be ignored for metallic-roughness calculations.
|
|
22410
|
+
* When undefined, the texture MUST be sampled as having 1.0 in G and B components.
|
|
22411
|
+
* @param texture - Const textureinfo&
|
|
22412
|
+
*/
|
|
22413
|
+
setMetallicRoughnessTexture(texture) {
|
|
22414
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicRoughnessTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22415
|
+
}
|
|
22416
|
+
/**
|
|
22417
|
+
* @description Gets the metallic-roughness texture
|
|
22418
|
+
* @return Const textureinfo&
|
|
22419
|
+
*/
|
|
22420
|
+
getMetallicRoughnessTexture() {
|
|
22421
|
+
var _ret = Module._malloc(8);
|
|
22422
|
+
Module.ccall("csp_systems_GLTFMaterial_GetMetallicRoughnessTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22423
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22424
|
+
Module._free(_ret);
|
|
22425
|
+
return _nPtr;
|
|
22426
|
+
}
|
|
22427
|
+
/**
|
|
22428
|
+
* @description Sets the tangent space normal texture.
|
|
22429
|
+
* The texture encodes RGB components with linear transfer function.
|
|
22430
|
+
* Each texel represents the XYZ components of a normal vector in tangent space.
|
|
22431
|
+
* The normal vectors use the convention +X is right and +Y is up. +Z points toward the viewer.
|
|
22432
|
+
* If a fourth component (A) is present, it MUST be ignored. When undefined, the material does not have a tangent space normal texture.
|
|
22433
|
+
* @param texture - Const textureinfo&
|
|
22434
|
+
*/
|
|
22435
|
+
setNormalTexture(texture) {
|
|
22436
|
+
Module.ccall("csp_systems_GLTFMaterial_SetNormalTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22437
|
+
}
|
|
22438
|
+
/**
|
|
22439
|
+
* @description Gets the tangent space normal texture.
|
|
22440
|
+
* @return Const textureinfo&
|
|
21458
22441
|
*/
|
|
21459
|
-
|
|
21460
|
-
var
|
|
21461
|
-
|
|
21462
|
-
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
var _callback = (_stateObject__, result) => {
|
|
21466
|
-
var _resultPtr = getNativePointer(result);
|
|
21467
|
-
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21468
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21469
|
-
return;
|
|
21470
|
-
}
|
|
21471
|
-
_resolve(_resultInstance);
|
|
21472
|
-
Module.removeFunction(_callbackPtr);
|
|
21473
|
-
};
|
|
21474
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21475
|
-
Module.ccall("csp_systems_AssetSystem_DownloadAssetData_void_AssetRC_AssetDataResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21476
|
-
return _promise;
|
|
22442
|
+
getNormalTexture() {
|
|
22443
|
+
var _ret = Module._malloc(8);
|
|
22444
|
+
Module.ccall("csp_systems_GLTFMaterial_GetNormalTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22445
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22446
|
+
Module._free(_ret);
|
|
22447
|
+
return _nPtr;
|
|
21477
22448
|
}
|
|
21478
22449
|
/**
|
|
21479
|
-
* @description
|
|
21480
|
-
*
|
|
21481
|
-
*
|
|
21482
|
-
*
|
|
22450
|
+
* @description Sets the occlusion texture.
|
|
22451
|
+
* The occlusion values are linearly sampled from the R channel.
|
|
22452
|
+
* Higher values indicate areas that receive full indirect lighting and lower values indicate no indirect lighting.
|
|
22453
|
+
* If other channels are present (GBA), they MUST be ignored for occlusion calculations.
|
|
22454
|
+
* When undefined, the material does not have an occlusion texture.
|
|
22455
|
+
* @param texture - Const textureinfo&
|
|
21483
22456
|
*/
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
var _promise = new Promise((_r) => {
|
|
21487
|
-
_resolve = _r;
|
|
21488
|
-
});
|
|
21489
|
-
var _callbackPtr;
|
|
21490
|
-
var _callback = (_stateObject__, result) => {
|
|
21491
|
-
var _resultPtr = getNativePointer(result);
|
|
21492
|
-
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21493
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21494
|
-
return;
|
|
21495
|
-
}
|
|
21496
|
-
_resolve(_resultInstance);
|
|
21497
|
-
Module.removeFunction(_callbackPtr);
|
|
21498
|
-
};
|
|
21499
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21500
|
-
Module.ccall("csp_systems_AssetSystem_DownloadAssetDataEx_void_AssetRC_CancellationTokenR_AssetDataResultCallback", "void", ["number", "number", "number", "number", "number"], [
|
|
21501
|
-
this.pointer,
|
|
21502
|
-
asset.pointer,
|
|
21503
|
-
cancellationToken.pointer,
|
|
21504
|
-
_callbackPtr,
|
|
21505
|
-
0,
|
|
21506
|
-
]);
|
|
21507
|
-
return _promise;
|
|
22457
|
+
setOcclusionTexture(texture) {
|
|
22458
|
+
Module.ccall("csp_systems_GLTFMaterial_SetOcclusionTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21508
22459
|
}
|
|
21509
22460
|
/**
|
|
21510
|
-
* @description
|
|
21511
|
-
* @
|
|
21512
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22461
|
+
* @description Gets the occlusion texture
|
|
22462
|
+
* @return Const textureinfo&
|
|
21513
22463
|
*/
|
|
21514
|
-
|
|
21515
|
-
var
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
var _callback = (_stateObject__, result) => {
|
|
21521
|
-
var _resultPtr = getNativePointer(result);
|
|
21522
|
-
var _resultInstance = new Systems.UInt64Result(_resultPtr);
|
|
21523
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21524
|
-
return;
|
|
21525
|
-
}
|
|
21526
|
-
_resolve(_resultInstance);
|
|
21527
|
-
Module.removeFunction(_callbackPtr);
|
|
21528
|
-
};
|
|
21529
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21530
|
-
Module.ccall("csp_systems_AssetSystem_GetAssetDataSize_void_AssetRC_UInt64ResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21531
|
-
return _promise;
|
|
22464
|
+
getOcclusionTexture() {
|
|
22465
|
+
var _ret = Module._malloc(8);
|
|
22466
|
+
Module.ccall("csp_systems_GLTFMaterial_GetOcclusionTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22467
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22468
|
+
Module._free(_ret);
|
|
22469
|
+
return _nPtr;
|
|
21532
22470
|
}
|
|
21533
22471
|
/**
|
|
21534
|
-
* @description
|
|
21535
|
-
*
|
|
21536
|
-
*
|
|
22472
|
+
* @description Sets the emissive texture.
|
|
22473
|
+
* It controls the color and intensity of the light being emitted by the material.
|
|
22474
|
+
* This texture contains RGB components encoded with the sRGB transfer function.
|
|
22475
|
+
* If a fourth component (A) is present, it MUST be ignored.
|
|
22476
|
+
* When undefined, the texture MUST be sampled as having 1.0 in RGB components.
|
|
22477
|
+
* @param texture - Const textureinfo&
|
|
21537
22478
|
*/
|
|
21538
|
-
|
|
21539
|
-
|
|
21540
|
-
var _promise = new Promise((_r) => {
|
|
21541
|
-
_resolve = _r;
|
|
21542
|
-
});
|
|
21543
|
-
var _callbackPtr;
|
|
21544
|
-
var _callback = (_stateObject__, result) => {
|
|
21545
|
-
var _resultPtr = getNativePointer(result);
|
|
21546
|
-
var _resultInstance = new Systems.LODChainResult(_resultPtr);
|
|
21547
|
-
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21548
|
-
return;
|
|
21549
|
-
}
|
|
21550
|
-
_resolve(_resultInstance);
|
|
21551
|
-
Module.removeFunction(_callbackPtr);
|
|
21552
|
-
};
|
|
21553
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21554
|
-
Module.ccall("csp_systems_AssetSystem_GetLODChain_void_AssetCollectionRC_LODChainResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21555
|
-
return _promise;
|
|
22479
|
+
setEmissiveTexture(texture) {
|
|
22480
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21556
22481
|
}
|
|
21557
22482
|
/**
|
|
21558
|
-
* @description
|
|
21559
|
-
* @
|
|
21560
|
-
* @param asset - Asset to register as LOD
|
|
21561
|
-
* @param asset - LOD level for Asset to be registered to
|
|
21562
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22483
|
+
* @description Gets the emissive texture
|
|
22484
|
+
* @return Const textureinfo&
|
|
21563
22485
|
*/
|
|
21564
|
-
|
|
21565
|
-
var
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
|
|
21580
|
-
|
|
21581
|
-
|
|
21582
|
-
|
|
21583
|
-
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
22486
|
+
getEmissiveTexture() {
|
|
22487
|
+
var _ret = Module._malloc(8);
|
|
22488
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22489
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22490
|
+
Module._free(_ret);
|
|
22491
|
+
return _nPtr;
|
|
22492
|
+
}
|
|
22493
|
+
/**
|
|
22494
|
+
* @description Constructor which links the material to an asset
|
|
22495
|
+
* @param name - The name of the material.
|
|
22496
|
+
* @param assetCollectionId - The asset collection where the material info is stored
|
|
22497
|
+
* @param assetId - The asset where the material info is stored
|
|
22498
|
+
*/
|
|
22499
|
+
static create_name_assetCollectionId_assetId(name, assetCollectionId, assetId) {
|
|
22500
|
+
var _ptr = Module._malloc(8);
|
|
22501
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, assetCollectionId, assetId]);
|
|
22502
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22503
|
+
return new GLTFMaterial(_nPtr);
|
|
22504
|
+
}
|
|
22505
|
+
static create() {
|
|
22506
|
+
var _ptr = Module._malloc(8);
|
|
22507
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor", "void", ["number"], [_ptr]);
|
|
22508
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22509
|
+
return new GLTFMaterial(_nPtr);
|
|
22510
|
+
}
|
|
22511
|
+
delete() {
|
|
22512
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22513
|
+
Module.ccall("csp_systems_GLTFMaterial_Dtor", "void", ["number"], [this.pointer]);
|
|
22514
|
+
this.disposed = true;
|
|
22515
|
+
}
|
|
21592
22516
|
}
|
|
21593
22517
|
}
|
|
21594
|
-
Systems.
|
|
22518
|
+
Systems.GLTFMaterial = GLTFMaterial;
|
|
22519
|
+
})(Systems || (Systems = {}));
|
|
22520
|
+
(function (Systems) {
|
|
22521
|
+
/**
|
|
22522
|
+
@ingroup Asset System
|
|
22523
|
+
* @description Data class used to contain information when attempting to download material data.
|
|
22524
|
+
*/
|
|
22525
|
+
class GLTFMaterialResult extends Systems.ResultBase {
|
|
22526
|
+
/** @internal */
|
|
22527
|
+
constructor(pointer) {
|
|
22528
|
+
super(pointer);
|
|
22529
|
+
}
|
|
22530
|
+
static fromResultBase(baseInstance) {
|
|
22531
|
+
const nativeClassWrapper = baseInstance;
|
|
22532
|
+
return new Systems.GLTFMaterialResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22533
|
+
}
|
|
22534
|
+
/**
|
|
22535
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22536
|
+
*/
|
|
22537
|
+
getGLTFMaterial() {
|
|
22538
|
+
var _ret = Module._malloc(8);
|
|
22539
|
+
Module.ccall("csp_systems_GLTFMaterialResult_GetGLTFMaterialC_GLTFMaterialRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22540
|
+
var _nPtr = new Systems.GLTFMaterial(getNativePointer(_ret));
|
|
22541
|
+
Module._free(_ret);
|
|
22542
|
+
return _nPtr;
|
|
22543
|
+
}
|
|
22544
|
+
delete() {
|
|
22545
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22546
|
+
Module.ccall("csp_systems_GLTFMaterialResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22547
|
+
this.disposed = true;
|
|
22548
|
+
}
|
|
22549
|
+
}
|
|
22550
|
+
}
|
|
22551
|
+
Systems.GLTFMaterialResult = GLTFMaterialResult;
|
|
22552
|
+
})(Systems || (Systems = {}));
|
|
22553
|
+
(function (Systems) {
|
|
22554
|
+
/**
|
|
22555
|
+
@ingroup Asset System
|
|
22556
|
+
* @description Data class used to contain information when attempting to download a collection of material data.
|
|
22557
|
+
*/
|
|
22558
|
+
class GLTFMaterialsResult extends Systems.ResultBase {
|
|
22559
|
+
/** @internal */
|
|
22560
|
+
constructor(pointer) {
|
|
22561
|
+
super(pointer);
|
|
22562
|
+
}
|
|
22563
|
+
static fromResultBase(baseInstance) {
|
|
22564
|
+
const nativeClassWrapper = baseInstance;
|
|
22565
|
+
return new Systems.GLTFMaterialsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22566
|
+
}
|
|
22567
|
+
/**
|
|
22568
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22569
|
+
*/
|
|
22570
|
+
getGLTFMaterials() {
|
|
22571
|
+
var _ret = Module._malloc(8);
|
|
22572
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_GetGLTFMaterialsC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22573
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
22574
|
+
Module._free(_ret);
|
|
22575
|
+
return _nPtr;
|
|
22576
|
+
}
|
|
22577
|
+
delete() {
|
|
22578
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22579
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22580
|
+
this.disposed = true;
|
|
22581
|
+
}
|
|
22582
|
+
}
|
|
22583
|
+
}
|
|
22584
|
+
Systems.GLTFMaterialsResult = GLTFMaterialsResult;
|
|
21595
22585
|
})(Systems || (Systems = {}));
|
|
21596
22586
|
(function (Systems) {
|
|
21597
22587
|
/**
|
|
@@ -22755,9 +23745,9 @@ export class CSPFoundation {
|
|
|
22755
23745
|
const nativeClassWrapper = baseInstance;
|
|
22756
23746
|
return new Systems.HotspotSequenceSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22757
23747
|
}
|
|
22758
|
-
static
|
|
23748
|
+
static create_sequenceSystem_spaceSystem_eventBus(sequenceSystem, spaceSystem, eventBus) {
|
|
22759
23749
|
var _ptr = Module._malloc(8);
|
|
22760
|
-
Module.ccall("
|
|
23750
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_Ctor_SequenceSystemP_SpaceSystemP_EventBusP", "void", ["number", "number", "number", "number"], [_ptr, sequenceSystem.pointer, spaceSystem.pointer, eventBus.pointer]);
|
|
22761
23751
|
var _nPtr = getNativePointer(_ptr);
|
|
22762
23752
|
return new HotspotSequenceSystem(_nPtr);
|
|
22763
23753
|
}
|
|
@@ -22938,6 +23928,30 @@ export class CSPFoundation {
|
|
|
22938
23928
|
Module.ccall("csp_systems_HotspotSequenceSystem_RemoveItemFromGroups_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, itemName, _callbackPtr, 0]);
|
|
22939
23929
|
return _promise;
|
|
22940
23930
|
}
|
|
23931
|
+
/**
|
|
23932
|
+
* @description Sets a callback to be fired when a hotspot sequence is changed.
|
|
23933
|
+
* @param callback - Callback to receive data for the hotspot sequence that has been changed.
|
|
23934
|
+
*/
|
|
23935
|
+
setHotspotSequenceChangedCallback(callback) {
|
|
23936
|
+
var _callback = (_stateObject__, arg1) => {
|
|
23937
|
+
var _arg1 = new Multiplayer.SequenceHotspotChangedParams(getNativePointer(arg1));
|
|
23938
|
+
callback(_arg1);
|
|
23939
|
+
};
|
|
23940
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
23941
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_SetHotspotSequenceChangedCallback_void_HotspotSequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
23942
|
+
}
|
|
23943
|
+
/**
|
|
23944
|
+
* @description Registers the system to listen for the named event.
|
|
23945
|
+
*/
|
|
23946
|
+
registerSystemCallback() {
|
|
23947
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23948
|
+
}
|
|
23949
|
+
/**
|
|
23950
|
+
* @description Deregisters the system from listening for the named event.
|
|
23951
|
+
*/
|
|
23952
|
+
deregisterSystemCallback() {
|
|
23953
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23954
|
+
}
|
|
22941
23955
|
}
|
|
22942
23956
|
Systems.HotspotSequenceSystem = HotspotSequenceSystem;
|
|
22943
23957
|
})(Systems || (Systems = {}));
|
|
@@ -24112,6 +25126,30 @@ export class CSPFoundation {
|
|
|
24112
25126
|
Module.ccall("csp_systems_SequenceSystem_DeleteSequences_void_ArrayRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, sequenceKeys.pointer, _callbackPtr, 0]);
|
|
24113
25127
|
return _promise;
|
|
24114
25128
|
}
|
|
25129
|
+
/**
|
|
25130
|
+
* @description Sets a callback for a sequence changed event.
|
|
25131
|
+
* @param callback - Callback to receive data for the sequence that has been changed.
|
|
25132
|
+
*/
|
|
25133
|
+
setSequenceChangedCallback(callback) {
|
|
25134
|
+
var _callback = (_stateObject__, arg1) => {
|
|
25135
|
+
var _arg1 = new Multiplayer.SequenceChangedParams(getNativePointer(arg1));
|
|
25136
|
+
callback(_arg1);
|
|
25137
|
+
};
|
|
25138
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
25139
|
+
Module.ccall("csp_systems_SequenceSystem_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
25140
|
+
}
|
|
25141
|
+
/**
|
|
25142
|
+
* @description Registers the system to listen for the named event.
|
|
25143
|
+
*/
|
|
25144
|
+
registerSystemCallback() {
|
|
25145
|
+
Module.ccall("csp_systems_SequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25146
|
+
}
|
|
25147
|
+
/**
|
|
25148
|
+
* @description Deregisters the system from listening for the named event.
|
|
25149
|
+
*/
|
|
25150
|
+
deregisterSystemCallback() {
|
|
25151
|
+
Module.ccall("csp_systems_SequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25152
|
+
}
|
|
24115
25153
|
}
|
|
24116
25154
|
Systems.SequenceSystem = SequenceSystem;
|
|
24117
25155
|
})(Systems || (Systems = {}));
|
|
@@ -26823,7 +27861,8 @@ export class CSPFoundation {
|
|
|
26823
27861
|
* @description Retrieves an array with all the Points of Interest that are located inside the circular area defined by the parameters..
|
|
26824
27862
|
* @param originLocation - The latitude and longitude coordinates of origin of the search location.
|
|
26825
27863
|
* @param areaRadius - The Radius of the circular area to search around the provided origin.
|
|
26826
|
-
* @param type - The type of POI to search for. If none is specified, all types will be included in
|
|
27864
|
+
* @param type - The type of POI to search for. If none is specified, all types will be included in
|
|
27865
|
+
* the returned set.
|
|
26827
27866
|
* @param callback - Callback when asynchronous task finishes.
|
|
26828
27867
|
*/
|
|
26829
27868
|
async getPOIsInArea(originLocation, areaRadius, type) {
|
|
@@ -27763,6 +28802,30 @@ export class CSPFoundation {
|
|
|
27763
28802
|
Module.ccall("csp_systems_UserSystem_GetCheckoutSessionUrl_void_TierNames_StringResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, tier, _callbackPtr, 0]);
|
|
27764
28803
|
return _promise;
|
|
27765
28804
|
}
|
|
28805
|
+
/**
|
|
28806
|
+
* @description Sets a callback for an access control changed event.
|
|
28807
|
+
* @param callback - Callback to receive data for the user permissions that has been changed.
|
|
28808
|
+
*/
|
|
28809
|
+
setUserPermissionsChangedCallback(callback) {
|
|
28810
|
+
var _callback = (_stateObject__, arg1) => {
|
|
28811
|
+
var _arg1 = new Multiplayer.UserPermissionsParams(getNativePointer(arg1));
|
|
28812
|
+
callback(_arg1);
|
|
28813
|
+
};
|
|
28814
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
28815
|
+
Module.ccall("csp_systems_UserSystem_SetUserPermissionsChangedCallback_void_UserPermissionsChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
28816
|
+
}
|
|
28817
|
+
/**
|
|
28818
|
+
* @description Registers the system to listen for the named event.
|
|
28819
|
+
*/
|
|
28820
|
+
registerSystemCallback() {
|
|
28821
|
+
Module.ccall("csp_systems_UserSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28822
|
+
}
|
|
28823
|
+
/**
|
|
28824
|
+
* @description Deregisters the system from listening for the named event.
|
|
28825
|
+
*/
|
|
28826
|
+
deregisterSystemCallback() {
|
|
28827
|
+
Module.ccall("csp_systems_UserSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28828
|
+
}
|
|
27766
28829
|
}
|
|
27767
28830
|
Systems.UserSystem = UserSystem;
|
|
27768
28831
|
})(Systems || (Systems = {}));
|
|
@@ -27844,6 +28907,13 @@ export class CSPFoundation {
|
|
|
27844
28907
|
Module._free(_ret);
|
|
27845
28908
|
return _inst;
|
|
27846
28909
|
}
|
|
28910
|
+
static ofcsp_systems_GLTFMaterial() {
|
|
28911
|
+
var _ret = Module._malloc(8);
|
|
28912
|
+
Module.ccall("csp_common_Array_Ctor_csp_systems_GLTFMaterial", "void", ["number"], [_ret]);
|
|
28913
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
28914
|
+
Module._free(_ret);
|
|
28915
|
+
return _inst;
|
|
28916
|
+
}
|
|
27847
28917
|
static ofcsp_systems_LODAsset() {
|
|
27848
28918
|
var _ret = Module._malloc(8);
|
|
27849
28919
|
Module.ccall("csp_common_Array_Ctor_csp_systems_LODAsset", "void", ["number"], [_ret]);
|
|
@@ -28145,6 +29215,13 @@ export class CSPFoundation {
|
|
|
28145
29215
|
Module._free(_ret);
|
|
28146
29216
|
return _inst;
|
|
28147
29217
|
}
|
|
29218
|
+
static ofcsp_systems_GLTFMaterial_number(size) {
|
|
29219
|
+
var _ret = Module._malloc(8);
|
|
29220
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_GLTFMaterial", "void", ["number", "number"], [_ret, size]);
|
|
29221
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
29222
|
+
Module._free(_ret);
|
|
29223
|
+
return _inst;
|
|
29224
|
+
}
|
|
28148
29225
|
static ofcsp_systems_LODAsset_number(size) {
|
|
28149
29226
|
var _ret = Module._malloc(8);
|
|
28150
29227
|
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_LODAsset", "void", ["number", "number"], [_ret, size]);
|
|
@@ -28551,10 +29628,10 @@ export class CSPFoundation {
|
|
|
28551
29628
|
Module._free(_ret);
|
|
28552
29629
|
return _inst;
|
|
28553
29630
|
}
|
|
28554
|
-
static
|
|
29631
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue() {
|
|
28555
29632
|
var _ret = Module._malloc(8);
|
|
28556
|
-
Module.ccall("
|
|
28557
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29633
|
+
Module.ccall("csp_common_Map_Ctor_String_csp_multiplayer_ReplicatedValue", "void", ["number"], [_ret]);
|
|
29634
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28558
29635
|
Module._free(_ret);
|
|
28559
29636
|
return _inst;
|
|
28560
29637
|
}
|
|
@@ -28593,10 +29670,10 @@ export class CSPFoundation {
|
|
|
28593
29670
|
Module._free(_ret);
|
|
28594
29671
|
return _inst;
|
|
28595
29672
|
}
|
|
28596
|
-
static
|
|
29673
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue_Map(other) {
|
|
28597
29674
|
var _ret = Module._malloc(8);
|
|
28598
|
-
Module.ccall("
|
|
28599
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29675
|
+
Module.ccall("csp_common_Map_Ctor_MapRC_String_csp_multiplayer_ReplicatedValue", "void", ["number", "number"], [_ret, other.pointer]);
|
|
29676
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28600
29677
|
Module._free(_ret);
|
|
28601
29678
|
return _inst;
|
|
28602
29679
|
}
|