connected-spaces-platform.web 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Debug/ConnectedSpacesPlatform_WASM.js +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 +717 -163
- package/connectedspacesplatform.js +2243 -1171
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +4376 -2449
- 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;
|
|
@@ -11261,398 +11350,82 @@ export class CSPFoundation {
|
|
|
11261
11350
|
})(Multiplayer || (Multiplayer = {}));
|
|
11262
11351
|
(function (Multiplayer) {
|
|
11263
11352
|
/**
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
class
|
|
11353
|
+
* @description Manages the script attached to an Entity.
|
|
11354
|
+
* /// Provides functions for setting the script source, subscribing to property changes and messages and other script management.
|
|
11355
|
+
*/
|
|
11356
|
+
class EntityScript extends NativeClassWrapper {
|
|
11268
11357
|
/** @internal */
|
|
11269
11358
|
constructor(pointer) {
|
|
11270
11359
|
super(pointer);
|
|
11271
11360
|
}
|
|
11272
11361
|
/**
|
|
11273
|
-
* @description
|
|
11274
|
-
* @param inMultiPlayerConnection - The connection to be used.
|
|
11362
|
+
* @description Destroy the instance of EntityScript.
|
|
11275
11363
|
*/
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11364
|
+
delete() {
|
|
11365
|
+
if (this.ownsPointer && !this.disposed) {
|
|
11366
|
+
Module.ccall("csp_multiplayer_EntityScript_Dtor", "void", ["number"], [this.pointer]);
|
|
11367
|
+
this.disposed = true;
|
|
11368
|
+
}
|
|
11281
11369
|
}
|
|
11282
11370
|
/**
|
|
11283
|
-
* @description
|
|
11284
|
-
* @param
|
|
11285
|
-
* @param callback - Callback when asynchronous task finishes
|
|
11371
|
+
* @description Sets the source code for the script.
|
|
11372
|
+
* @param scriptSource - The source as a string.
|
|
11286
11373
|
*/
|
|
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;
|
|
11374
|
+
setScriptSource(scriptSource) {
|
|
11375
|
+
Module.ccall("csp_multiplayer_EntityScript_SetScriptSource_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11305
11376
|
}
|
|
11306
11377
|
/**
|
|
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.
|
|
11378
|
+
* @description Runs the script.
|
|
11379
|
+
* @return True if the script runs successfully or false if there are errors.
|
|
11315
11380
|
*/
|
|
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;
|
|
11381
|
+
invoke() {
|
|
11382
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_Invoke_bool", "boolean", ["number"], [this.pointer]);
|
|
11383
|
+
return _result;
|
|
11341
11384
|
}
|
|
11342
11385
|
/**
|
|
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.
|
|
11386
|
+
* @description Run a script with the given source rather than the stored source.
|
|
11387
|
+
* /// Will be run locally or remotely depending on leader election.
|
|
11388
|
+
* /// @param ScriptSource csp::common::String : The source to use.
|
|
11350
11389
|
*/
|
|
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;
|
|
11390
|
+
runScript(scriptSource) {
|
|
11391
|
+
Module.ccall("csp_multiplayer_EntityScript_RunScript_void_StringRC", "void", ["number", "string"], [this.pointer, scriptSource]);
|
|
11392
11392
|
}
|
|
11393
11393
|
/**
|
|
11394
|
-
* @description
|
|
11395
|
-
* @
|
|
11396
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11394
|
+
* @description Checks if there was an error with the last script invocation.
|
|
11395
|
+
* @return True if there was an error, false otherwise.
|
|
11397
11396
|
*/
|
|
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;
|
|
11397
|
+
hasError() {
|
|
11398
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_HasError_bool", "boolean", ["number"], [this.pointer]);
|
|
11399
|
+
return _result;
|
|
11416
11400
|
}
|
|
11417
11401
|
/**
|
|
11418
|
-
* @description
|
|
11419
|
-
* @
|
|
11420
|
-
* @param conversationData - Conversation Data.
|
|
11421
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11402
|
+
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
11403
|
+
* @return Text of the last error.
|
|
11422
11404
|
*/
|
|
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;
|
|
11405
|
+
getErrorText() {
|
|
11406
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_GetErrorText_String", "number", ["number"], [this.pointer]);
|
|
11407
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
11408
|
+
free(_result);
|
|
11409
|
+
_result = _resultString;
|
|
11410
|
+
return _result;
|
|
11447
11411
|
}
|
|
11448
11412
|
/**
|
|
11449
|
-
* @description
|
|
11450
|
-
* @
|
|
11451
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11413
|
+
* @description Gets the stored script source code.
|
|
11414
|
+
* @return The source as a string.
|
|
11452
11415
|
*/
|
|
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;
|
|
11416
|
+
getScriptSource() {
|
|
11417
|
+
let _result = Module.ccall("csp_multiplayer_EntityScript_GetScriptSource_String", "number", ["number"], [this.pointer]);
|
|
11418
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
11419
|
+
free(_result);
|
|
11420
|
+
_result = _resultString;
|
|
11421
|
+
return _result;
|
|
11471
11422
|
}
|
|
11472
11423
|
/**
|
|
11473
|
-
* @description Sets the
|
|
11474
|
-
* @param
|
|
11475
|
-
* @param messageData - Message Data.
|
|
11476
|
-
* @param callback - Callback when asynchronous task finishes.
|
|
11424
|
+
* @description Sets the related component for this script.
|
|
11425
|
+
* @param inEnityScriptComponent - The component related to this script.
|
|
11477
11426
|
*/
|
|
11478
|
-
|
|
11479
|
-
|
|
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.
|
|
11653
|
-
*/
|
|
11654
|
-
setScriptSpaceComponent(enityScriptComponent) {
|
|
11655
|
-
Module.ccall("csp_multiplayer_EntityScript_SetScriptSpaceComponent_void_ScriptSpaceComponentP", "void", ["number", "number"], [this.pointer, enityScriptComponent.pointer]);
|
|
11427
|
+
setScriptSpaceComponent(enityScriptComponent) {
|
|
11428
|
+
Module.ccall("csp_multiplayer_EntityScript_SetScriptSpaceComponent_void_ScriptSpaceComponentP", "void", ["number", "number"], [this.pointer, enityScriptComponent.pointer]);
|
|
11656
11429
|
}
|
|
11657
11430
|
/**
|
|
11658
11431
|
* @description Called when a component property changes so that a message can be passed to the script if a subscription has been setup.
|
|
@@ -11726,13 +11499,41 @@ export class CSPFoundation {
|
|
|
11726
11499
|
})(Multiplayer || (Multiplayer = {}));
|
|
11727
11500
|
(function (Systems) {
|
|
11728
11501
|
/**
|
|
11729
|
-
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient instance in the constructor of each
|
|
11502
|
+
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or EventBus instance in the constructor of each
|
|
11503
|
+
* System.
|
|
11730
11504
|
*/
|
|
11731
11505
|
class SystemBase extends NativeClassWrapper {
|
|
11732
11506
|
/** @internal */
|
|
11733
11507
|
constructor(pointer) {
|
|
11734
11508
|
super(pointer);
|
|
11735
11509
|
}
|
|
11510
|
+
/**
|
|
11511
|
+
* @description Destructor of the SystemBase base class.
|
|
11512
|
+
*/
|
|
11513
|
+
/**
|
|
11514
|
+
* @description Registers the system to listen for the default event.
|
|
11515
|
+
*/
|
|
11516
|
+
registerSystemCallback() {
|
|
11517
|
+
Module.ccall("csp_systems_SystemBase_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11518
|
+
}
|
|
11519
|
+
/**
|
|
11520
|
+
* @description Deregisters the system from listening for the default event.
|
|
11521
|
+
*/
|
|
11522
|
+
deregisterSystemCallback() {
|
|
11523
|
+
Module.ccall("csp_systems_SystemBase_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
11524
|
+
}
|
|
11525
|
+
/**
|
|
11526
|
+
* @description Sets a callback for a default event.
|
|
11527
|
+
* @param callback - Callback to receive data for the system that has been changed.
|
|
11528
|
+
*/
|
|
11529
|
+
setSystemCallback(callback) {
|
|
11530
|
+
var _callback = (_stateObject__, arg1, arg2) => {
|
|
11531
|
+
var _arg2 = new Common.Array(getNativePointer(arg2), csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
11532
|
+
callback(arg1, _arg2);
|
|
11533
|
+
};
|
|
11534
|
+
var _callbackPtr = Module.addFunction(_callback, "viii");
|
|
11535
|
+
Module.ccall("csp_systems_SystemBase_SetSystemCallback_void_ParameterisedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
11536
|
+
}
|
|
11736
11537
|
}
|
|
11737
11538
|
Systems.SystemBase = SystemBase;
|
|
11738
11539
|
})(Systems || (Systems = {}));
|
|
@@ -11965,6 +11766,13 @@ export class CSPFoundation {
|
|
|
11965
11766
|
Module._free(_ret);
|
|
11966
11767
|
return _nPtr;
|
|
11967
11768
|
}
|
|
11769
|
+
getEventBus() {
|
|
11770
|
+
var _ret = Module._malloc(8);
|
|
11771
|
+
Module.ccall("csp_systems_SystemsManager_GetEventBus_EventBusP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
11772
|
+
var _nPtr = new Multiplayer.EventBus(getNativePointer(_ret));
|
|
11773
|
+
Module._free(_ret);
|
|
11774
|
+
return _nPtr;
|
|
11775
|
+
}
|
|
11968
11776
|
}
|
|
11969
11777
|
Systems.SystemsManager = SystemsManager;
|
|
11970
11778
|
})(Systems || (Systems = {}));
|
|
@@ -12662,73 +12470,340 @@ export class CSPFoundation {
|
|
|
12662
12470
|
})(Systems || (Systems = {}));
|
|
12663
12471
|
(function (Systems) {
|
|
12664
12472
|
/**
|
|
12665
|
-
@ingroup
|
|
12666
|
-
* @description
|
|
12473
|
+
@ingroup Asset System
|
|
12474
|
+
* @description Base class for a material.
|
|
12667
12475
|
*/
|
|
12668
|
-
class
|
|
12476
|
+
class Material extends NativeClassWrapper {
|
|
12669
12477
|
/** @internal */
|
|
12670
12478
|
constructor(pointer) {
|
|
12671
12479
|
super(pointer);
|
|
12672
12480
|
}
|
|
12481
|
+
/**
|
|
12482
|
+
* @description Gets the user-defined name of the material
|
|
12483
|
+
* @return Csp::common::string&
|
|
12484
|
+
*/
|
|
12485
|
+
getName() {
|
|
12486
|
+
let _result = Module.ccall("csp_systems_Material_GetNameC_StringRC", "number", ["number"], [this.pointer]);
|
|
12487
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12488
|
+
free(_result);
|
|
12489
|
+
_result = _resultString;
|
|
12490
|
+
return _result;
|
|
12491
|
+
}
|
|
12492
|
+
/**
|
|
12493
|
+
* @description Gets the collection id for the material
|
|
12494
|
+
* @return Const csp::common::string&
|
|
12495
|
+
*/
|
|
12496
|
+
getMaterialCollectionId() {
|
|
12497
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12498
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12499
|
+
free(_result);
|
|
12500
|
+
_result = _resultString;
|
|
12501
|
+
return _result;
|
|
12502
|
+
}
|
|
12503
|
+
/**
|
|
12504
|
+
* @description Gets the id for the material
|
|
12505
|
+
* @return Const csp::common::string&
|
|
12506
|
+
*/
|
|
12507
|
+
getMaterialId() {
|
|
12508
|
+
let _result = Module.ccall("csp_systems_Material_GetMaterialIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12509
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12510
|
+
free(_result);
|
|
12511
|
+
_result = _resultString;
|
|
12512
|
+
return _result;
|
|
12513
|
+
}
|
|
12514
|
+
/**
|
|
12515
|
+
* @description Constructor which links the material to an asset
|
|
12516
|
+
* @param name - The name of the material.
|
|
12517
|
+
* @param materialCollectionId - The asset collection where the material info is stored
|
|
12518
|
+
* @param materialId - The asset where the material info is stored
|
|
12519
|
+
*/
|
|
12520
|
+
static create_name_materialCollectionId_materialId(name, materialCollectionId, materialId) {
|
|
12521
|
+
var _ptr = Module._malloc(8);
|
|
12522
|
+
Module.ccall("csp_systems_Material_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, materialCollectionId, materialId]);
|
|
12523
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12524
|
+
return new Material(_nPtr);
|
|
12525
|
+
}
|
|
12673
12526
|
static create() {
|
|
12674
12527
|
var _ptr = Module._malloc(8);
|
|
12675
|
-
Module.ccall("
|
|
12528
|
+
Module.ccall("csp_systems_Material_Ctor", "void", ["number"], [_ptr]);
|
|
12676
12529
|
var _nPtr = getNativePointer(_ptr);
|
|
12677
|
-
return new
|
|
12530
|
+
return new Material(_nPtr);
|
|
12678
12531
|
}
|
|
12679
12532
|
delete() {
|
|
12680
12533
|
if (this.ownsPointer && !this.disposed) {
|
|
12681
|
-
Module.ccall("
|
|
12534
|
+
Module.ccall("csp_systems_Material_Dtor", "void", ["number"], [this.pointer]);
|
|
12682
12535
|
this.disposed = true;
|
|
12683
12536
|
}
|
|
12684
12537
|
}
|
|
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
12538
|
}
|
|
12700
|
-
Systems.
|
|
12539
|
+
Systems.Material = Material;
|
|
12701
12540
|
})(Systems || (Systems = {}));
|
|
12702
12541
|
(function (Systems) {
|
|
12703
12542
|
/**
|
|
12704
|
-
@ingroup
|
|
12705
|
-
* @description
|
|
12543
|
+
@ingroup Asset System
|
|
12544
|
+
* @description Data class which represents a texture.
|
|
12706
12545
|
*/
|
|
12707
|
-
class
|
|
12546
|
+
class TextureInfo extends NativeClassWrapper {
|
|
12708
12547
|
/** @internal */
|
|
12709
12548
|
constructor(pointer) {
|
|
12710
12549
|
super(pointer);
|
|
12711
12550
|
}
|
|
12551
|
+
/**
|
|
12552
|
+
* @description Default constructor with SourceType set to ETextureResourceType::ImageAsset by default
|
|
12553
|
+
*/
|
|
12712
12554
|
static create() {
|
|
12713
12555
|
var _ptr = Module._malloc(8);
|
|
12714
|
-
Module.ccall("
|
|
12556
|
+
Module.ccall("csp_systems_TextureInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12715
12557
|
var _nPtr = getNativePointer(_ptr);
|
|
12716
|
-
return new
|
|
12558
|
+
return new TextureInfo(_nPtr);
|
|
12717
12559
|
}
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12560
|
+
/**
|
|
12561
|
+
* @description Constructor which associates a texture with an asset, using ETextureResourceType::ImageAsset as it's source type
|
|
12562
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12563
|
+
* @param assetId - The asset where the texture info is stored
|
|
12564
|
+
*/
|
|
12565
|
+
static create_assetCollectionId_assetId(assetCollectionId, assetId) {
|
|
12566
|
+
var _ptr = Module._malloc(8);
|
|
12567
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC_StringRC", "void", ["number", "string", "string"], [_ptr, assetCollectionId, assetId]);
|
|
12568
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12569
|
+
return new TextureInfo(_nPtr);
|
|
12723
12570
|
}
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12571
|
+
/**
|
|
12572
|
+
* @description Constructor which associates a texture with a media component, using ETextureResourceType::Component as it's source type
|
|
12573
|
+
* @param componentId - The component id used as the texture data source
|
|
12574
|
+
*/
|
|
12575
|
+
static create_componentId(componentId) {
|
|
12576
|
+
var _ptr = Module._malloc(8);
|
|
12577
|
+
Module.ccall("csp_systems_TextureInfo_Ctor_StringRC", "void", ["number", "string"], [_ptr, componentId]);
|
|
12578
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12579
|
+
return new TextureInfo(_nPtr);
|
|
12727
12580
|
}
|
|
12728
|
-
|
|
12729
|
-
|
|
12581
|
+
/**
|
|
12582
|
+
* @description Sets the textures asset collection id and asset id
|
|
12583
|
+
* Uses ETextureResourceType::ImageAsset as it's source type
|
|
12584
|
+
* @param assetCollectionId - The asset collection where the texture info is stored
|
|
12585
|
+
* @param assetId - The asset where the texture info is stored
|
|
12586
|
+
*/
|
|
12587
|
+
setCollectionAndAssetId(assetCollectionId, assetId) {
|
|
12588
|
+
Module.ccall("csp_systems_TextureInfo_SetCollectionAndAssetId_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, assetCollectionId, assetId]);
|
|
12730
12589
|
}
|
|
12731
|
-
|
|
12590
|
+
/**
|
|
12591
|
+
* @description Gets the asset collection id for the texture
|
|
12592
|
+
* @return Csp::common::string&
|
|
12593
|
+
*/
|
|
12594
|
+
getAssetCollectionId() {
|
|
12595
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12596
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12597
|
+
free(_result);
|
|
12598
|
+
_result = _resultString;
|
|
12599
|
+
return _result;
|
|
12600
|
+
}
|
|
12601
|
+
/**
|
|
12602
|
+
* @description Gets the asset id for the texture
|
|
12603
|
+
* @return Csp::common::string&
|
|
12604
|
+
*/
|
|
12605
|
+
getAssetId() {
|
|
12606
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetAssetIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12607
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12608
|
+
free(_result);
|
|
12609
|
+
_result = _resultString;
|
|
12610
|
+
return _result;
|
|
12611
|
+
}
|
|
12612
|
+
/**
|
|
12613
|
+
* @description Sets the textures entity component id
|
|
12614
|
+
* Format: {entity.id}-{component.id}
|
|
12615
|
+
* This can be obtained from ComponentBase::GetUniqueComponentId
|
|
12616
|
+
* @param componentId - Const csp::common::string&
|
|
12617
|
+
*/
|
|
12618
|
+
setEntityComponentId(componentId) {
|
|
12619
|
+
Module.ccall("csp_systems_TextureInfo_SetEntityComponentId_void_StringRC", "void", ["number", "string"], [this.pointer, componentId]);
|
|
12620
|
+
}
|
|
12621
|
+
/**
|
|
12622
|
+
* @description Gets the entity component id
|
|
12623
|
+
* @return Csp::common::string&
|
|
12624
|
+
*/
|
|
12625
|
+
getEntityComponentId() {
|
|
12626
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetEntityComponentIdC_StringRC", "number", ["number"], [this.pointer]);
|
|
12627
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
12628
|
+
free(_result);
|
|
12629
|
+
_result = _resultString;
|
|
12630
|
+
return _result;
|
|
12631
|
+
}
|
|
12632
|
+
/**
|
|
12633
|
+
* @description Gets the source type of this texture
|
|
12634
|
+
* This is set internally by constructors and SetCollectionAndAssetId/SetEntityComponentId
|
|
12635
|
+
* @return ETextureResourceType
|
|
12636
|
+
*/
|
|
12637
|
+
getSourceType() {
|
|
12638
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetSourceTypeC_ETextureResourceType", "number", ["number"], [this.pointer]);
|
|
12639
|
+
return _result;
|
|
12640
|
+
}
|
|
12641
|
+
/**
|
|
12642
|
+
* @description Sets the uv offset of the texture
|
|
12643
|
+
* @param offset - Csp::common::vector2
|
|
12644
|
+
*/
|
|
12645
|
+
setUVOffset(offset) {
|
|
12646
|
+
Module.ccall("csp_systems_TextureInfo_SetUVOffset_void_Vector2", "void", ["number", "number"], [this.pointer, offset.pointer]);
|
|
12647
|
+
}
|
|
12648
|
+
/**
|
|
12649
|
+
* @description Gets the uv offset of the texture
|
|
12650
|
+
* @return Csp::common::vector2
|
|
12651
|
+
*/
|
|
12652
|
+
getUVOffset() {
|
|
12653
|
+
var _ret = Module._malloc(8);
|
|
12654
|
+
Module.ccall("csp_systems_TextureInfo_GetUVOffsetC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12655
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12656
|
+
Module._free(_ret);
|
|
12657
|
+
return _nPtr;
|
|
12658
|
+
}
|
|
12659
|
+
/**
|
|
12660
|
+
* @description Gets the uv rotation of the texture
|
|
12661
|
+
* @param rotation - Float
|
|
12662
|
+
*/
|
|
12663
|
+
setUVRotation(rotation) {
|
|
12664
|
+
assert(rotation >= Limits.FLOAT_MIN);
|
|
12665
|
+
assert(rotation <= Limits.FLOAT_MAX);
|
|
12666
|
+
Module.ccall("csp_systems_TextureInfo_SetUVRotation_void_float", "void", ["number", "number"], [this.pointer, rotation]);
|
|
12667
|
+
}
|
|
12668
|
+
/**
|
|
12669
|
+
* @description Gets the uv rotation of the texture
|
|
12670
|
+
* @return Float
|
|
12671
|
+
*/
|
|
12672
|
+
getUVRotation() {
|
|
12673
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetUVRotationC_float", "number", ["number"], [this.pointer]);
|
|
12674
|
+
return _result;
|
|
12675
|
+
}
|
|
12676
|
+
/**
|
|
12677
|
+
* @description Sets the uv scale of the texture
|
|
12678
|
+
* @param scale - Csp::common::vector2
|
|
12679
|
+
*/
|
|
12680
|
+
setUVScale(scale) {
|
|
12681
|
+
Module.ccall("csp_systems_TextureInfo_SetUVScale_void_Vector2", "void", ["number", "number"], [this.pointer, scale.pointer]);
|
|
12682
|
+
}
|
|
12683
|
+
/**
|
|
12684
|
+
* @description Gets the uv scale of the texture
|
|
12685
|
+
* @return Csp::common::vector2
|
|
12686
|
+
*/
|
|
12687
|
+
getUVScale() {
|
|
12688
|
+
var _ret = Module._malloc(8);
|
|
12689
|
+
Module.ccall("csp_systems_TextureInfo_GetUVScaleC_Vector2", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12690
|
+
var _nPtr = new Common.Vector2(getNativePointer(_ret));
|
|
12691
|
+
Module._free(_ret);
|
|
12692
|
+
return _nPtr;
|
|
12693
|
+
}
|
|
12694
|
+
/**
|
|
12695
|
+
* @description Sets The set index of texture's TEXCOORD attribute
|
|
12696
|
+
* used for texture coordinate mapping.
|
|
12697
|
+
* @param coord - Int
|
|
12698
|
+
*/
|
|
12699
|
+
setTexCoord(coord) {
|
|
12700
|
+
assert(Number.isInteger(coord));
|
|
12701
|
+
assert(coord >= Limits.INT32_MIN);
|
|
12702
|
+
assert(coord <= Limits.INT32_MAX);
|
|
12703
|
+
Module.ccall("csp_systems_TextureInfo_SetTexCoord_void_int", "void", ["number", "number"], [this.pointer, coord]);
|
|
12704
|
+
}
|
|
12705
|
+
/**
|
|
12706
|
+
* @description Gets the index of texture's TEXCOORD attribute
|
|
12707
|
+
* @return Int
|
|
12708
|
+
*/
|
|
12709
|
+
getTexCoord() {
|
|
12710
|
+
let _result = Module.ccall("csp_systems_TextureInfo_GetTexCoordC_int", "number", ["number"], [this.pointer]);
|
|
12711
|
+
return _result;
|
|
12712
|
+
}
|
|
12713
|
+
/**
|
|
12714
|
+
* @description True if this texture has been set for the current material
|
|
12715
|
+
* @return Bool
|
|
12716
|
+
*/
|
|
12717
|
+
isSet() {
|
|
12718
|
+
let _result = Module.ccall("csp_systems_TextureInfo_IsSetC_bool", "boolean", ["number"], [this.pointer]);
|
|
12719
|
+
return _result;
|
|
12720
|
+
}
|
|
12721
|
+
/**
|
|
12722
|
+
* @description Sets if this texture is active for the current material
|
|
12723
|
+
* This is true by default when a new texture is created
|
|
12724
|
+
* @param value - Bool
|
|
12725
|
+
*/
|
|
12726
|
+
setTexture(value) {
|
|
12727
|
+
Module.ccall("csp_systems_TextureInfo_SetTexture_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
|
|
12728
|
+
}
|
|
12729
|
+
delete() {
|
|
12730
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12731
|
+
Module.ccall("csp_systems_TextureInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12732
|
+
this.disposed = true;
|
|
12733
|
+
}
|
|
12734
|
+
}
|
|
12735
|
+
}
|
|
12736
|
+
Systems.TextureInfo = TextureInfo;
|
|
12737
|
+
})(Systems || (Systems = {}));
|
|
12738
|
+
(function (Systems) {
|
|
12739
|
+
/**
|
|
12740
|
+
@ingroup ECommerce System
|
|
12741
|
+
* @description Represents currency information for a product
|
|
12742
|
+
*/
|
|
12743
|
+
class CurrencyInfo extends NativeClassWrapper {
|
|
12744
|
+
/** @internal */
|
|
12745
|
+
constructor(pointer) {
|
|
12746
|
+
super(pointer);
|
|
12747
|
+
}
|
|
12748
|
+
static create() {
|
|
12749
|
+
var _ptr = Module._malloc(8);
|
|
12750
|
+
Module.ccall("csp_systems_CurrencyInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12751
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12752
|
+
return new CurrencyInfo(_nPtr);
|
|
12753
|
+
}
|
|
12754
|
+
delete() {
|
|
12755
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12756
|
+
Module.ccall("csp_systems_CurrencyInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12757
|
+
this.disposed = true;
|
|
12758
|
+
}
|
|
12759
|
+
}
|
|
12760
|
+
get amount() {
|
|
12761
|
+
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_Amount", "number", ["number"], [this.pointer]);
|
|
12762
|
+
return _result;
|
|
12763
|
+
}
|
|
12764
|
+
set amount(value) {
|
|
12765
|
+
Module.ccall("csp_systems_CurrencyInfo__Set_Amount", "void", ["number", "number"], [this.pointer, value]);
|
|
12766
|
+
}
|
|
12767
|
+
get currencyCode() {
|
|
12768
|
+
let _result = Module.ccall("csp_systems_CurrencyInfo__Get_CurrencyCode", "string", ["number"], [this.pointer]);
|
|
12769
|
+
return _result;
|
|
12770
|
+
}
|
|
12771
|
+
set currencyCode(value) {
|
|
12772
|
+
Module.ccall("csp_systems_CurrencyInfo__Set_CurrencyCode", "void", ["number", "string"], [this.pointer, value]);
|
|
12773
|
+
}
|
|
12774
|
+
}
|
|
12775
|
+
Systems.CurrencyInfo = CurrencyInfo;
|
|
12776
|
+
})(Systems || (Systems = {}));
|
|
12777
|
+
(function (Systems) {
|
|
12778
|
+
/**
|
|
12779
|
+
@ingroup ECommerce System
|
|
12780
|
+
* @description Represents media information for a product
|
|
12781
|
+
*/
|
|
12782
|
+
class ProductMediaInfo extends NativeClassWrapper {
|
|
12783
|
+
/** @internal */
|
|
12784
|
+
constructor(pointer) {
|
|
12785
|
+
super(pointer);
|
|
12786
|
+
}
|
|
12787
|
+
static create() {
|
|
12788
|
+
var _ptr = Module._malloc(8);
|
|
12789
|
+
Module.ccall("csp_systems_ProductMediaInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12790
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12791
|
+
return new ProductMediaInfo(_nPtr);
|
|
12792
|
+
}
|
|
12793
|
+
delete() {
|
|
12794
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12795
|
+
Module.ccall("csp_systems_ProductMediaInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12796
|
+
this.disposed = true;
|
|
12797
|
+
}
|
|
12798
|
+
}
|
|
12799
|
+
get mediaContentType() {
|
|
12800
|
+
let _result = Module.ccall("csp_systems_ProductMediaInfo__Get_MediaContentType", "string", ["number"], [this.pointer]);
|
|
12801
|
+
return _result;
|
|
12802
|
+
}
|
|
12803
|
+
set mediaContentType(value) {
|
|
12804
|
+
Module.ccall("csp_systems_ProductMediaInfo__Set_MediaContentType", "void", ["number", "string"], [this.pointer, value]);
|
|
12805
|
+
}
|
|
12806
|
+
get alt() {
|
|
12732
12807
|
let _result = Module.ccall("csp_systems_ProductMediaInfo__Get_Alt", "string", ["number"], [this.pointer]);
|
|
12733
12808
|
return _result;
|
|
12734
12809
|
}
|
|
@@ -15432,6 +15507,35 @@ export class CSPFoundation {
|
|
|
15432
15507
|
assert(value <= Limits.INT64_MAX);
|
|
15433
15508
|
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_SetAnimationIndex_void_int64_t", "void", ["number", "bigint"], [this.pointer, value]);
|
|
15434
15509
|
}
|
|
15510
|
+
/**
|
|
15511
|
+
* @description Gets the material overrides of this component.
|
|
15512
|
+
* Should be in the format:
|
|
15513
|
+
* Key = Path to the model
|
|
15514
|
+
* Value = The material id
|
|
15515
|
+
* @return The material overrides on this component.
|
|
15516
|
+
*/
|
|
15517
|
+
getMaterialOverrides() {
|
|
15518
|
+
var _ret = Module._malloc(8);
|
|
15519
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
15520
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
15521
|
+
Module._free(_ret);
|
|
15522
|
+
return _nPtr;
|
|
15523
|
+
}
|
|
15524
|
+
/**
|
|
15525
|
+
* @description Adds a new material override to this component.
|
|
15526
|
+
* @param the - Path to the models material to override.
|
|
15527
|
+
* @param the - Id of the material to override with.
|
|
15528
|
+
*/
|
|
15529
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
15530
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
15531
|
+
}
|
|
15532
|
+
/**
|
|
15533
|
+
* @description Removes a material override from this component.
|
|
15534
|
+
* @param the - Path to the models material to override to be removed.
|
|
15535
|
+
*/
|
|
15536
|
+
removeMaterialOverride(modelPath) {
|
|
15537
|
+
Module.ccall("csp_multiplayer_AnimatedModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
15538
|
+
}
|
|
15435
15539
|
/**
|
|
15436
15540
|
* \addtogroup IVisibleComponent
|
|
15437
15541
|
@{
|
|
@@ -19479,6 +19583,35 @@ export class CSPFoundation {
|
|
|
19479
19583
|
setExternalResourceAssetCollectionId(value) {
|
|
19480
19584
|
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_SetExternalResourceAssetCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
19481
19585
|
}
|
|
19586
|
+
/**
|
|
19587
|
+
* @description Gets the material overrides of this component.
|
|
19588
|
+
* Should be in the format:
|
|
19589
|
+
* Key = Path to the model
|
|
19590
|
+
* Value = The material id
|
|
19591
|
+
* @return The material overrides on this component.
|
|
19592
|
+
*/
|
|
19593
|
+
getMaterialOverrides() {
|
|
19594
|
+
var _ret = Module._malloc(8);
|
|
19595
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_GetMaterialOverridesC_Map", "void", ["number", "number"], [_ret, this.pointer]);
|
|
19596
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
19597
|
+
Module._free(_ret);
|
|
19598
|
+
return _nPtr;
|
|
19599
|
+
}
|
|
19600
|
+
/**
|
|
19601
|
+
* @description Adds a new material override to this component.
|
|
19602
|
+
* @param the - Path to the models material to override.
|
|
19603
|
+
* @param the - Id of the material to override with.
|
|
19604
|
+
*/
|
|
19605
|
+
addMaterialOverride(modelPath, materialAssetId) {
|
|
19606
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_AddMaterialOverride_void_StringRC_StringRC", "void", ["number", "string", "string"], [this.pointer, modelPath, materialAssetId]);
|
|
19607
|
+
}
|
|
19608
|
+
/**
|
|
19609
|
+
* @description Removes a material override from this component.
|
|
19610
|
+
* @param the - Path to the models material to override to be removed.
|
|
19611
|
+
*/
|
|
19612
|
+
removeMaterialOverride(modelPath) {
|
|
19613
|
+
Module.ccall("csp_multiplayer_StaticModelSpaceComponent_RemoveMaterialOverride_void_StringRC", "void", ["number", "string"], [this.pointer, modelPath]);
|
|
19614
|
+
}
|
|
19482
19615
|
/**
|
|
19483
19616
|
* \addtogroup ITransformComponent
|
|
19484
19617
|
@{
|
|
@@ -20471,322 +20604,667 @@ export class CSPFoundation {
|
|
|
20471
20604
|
}
|
|
20472
20605
|
Multiplayer.ConversationResult = ConversationResult;
|
|
20473
20606
|
})(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) {
|
|
20607
|
+
(function (Multiplayer) {
|
|
20497
20608
|
/**
|
|
20498
|
-
|
|
20499
|
-
|
|
20500
|
-
|
|
20609
|
+
@ingroup Conversation System
|
|
20610
|
+
* @description Public facing system that can handle conversations taking place between users of a space in the form of thread messages.
|
|
20611
|
+
*/
|
|
20612
|
+
class ConversationSystem extends Systems.SystemBase {
|
|
20501
20613
|
/** @internal */
|
|
20502
20614
|
constructor(pointer) {
|
|
20503
20615
|
super(pointer);
|
|
20504
20616
|
}
|
|
20505
|
-
static
|
|
20617
|
+
static fromSystemBase(baseInstance) {
|
|
20506
20618
|
const nativeClassWrapper = baseInstance;
|
|
20507
|
-
return new
|
|
20619
|
+
return new Multiplayer.ConversationSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20508
20620
|
}
|
|
20509
20621
|
/**
|
|
20510
|
-
* @description
|
|
20622
|
+
* @description Constructs a conversation system instance that uses the given multiplayer connection.
|
|
20623
|
+
* @param inMultiPlayerConnection - The connection to be used.
|
|
20511
20624
|
*/
|
|
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));
|
|
20625
|
+
static create_multiPlayerConnection(multiPlayerConnection) {
|
|
20626
|
+
var _ptr = Module._malloc(8);
|
|
20627
|
+
Module.ccall("csp_multiplayer_ConversationSystem_Ctor_MultiplayerConnectionP", "void", ["number", "number"], [_ptr, multiPlayerConnection.pointer]);
|
|
20628
|
+
var _nPtr = getNativePointer(_ptr);
|
|
20629
|
+
return new ConversationSystem(_nPtr);
|
|
20537
20630
|
}
|
|
20538
20631
|
/**
|
|
20539
|
-
* @description
|
|
20632
|
+
* @description Creates a new conversation with the initial message and provides the conversation ID to the given callback.
|
|
20633
|
+
* @param message - The message to be stored.
|
|
20634
|
+
* @param callback - Callback when asynchronous task finishes
|
|
20540
20635
|
*/
|
|
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));
|
|
20636
|
+
async createConversation(message) {
|
|
20637
|
+
var _resolve;
|
|
20638
|
+
var _promise = new Promise((_r) => {
|
|
20639
|
+
_resolve = _r;
|
|
20640
|
+
});
|
|
20641
|
+
var _callbackPtr;
|
|
20642
|
+
var _callback = (_stateObject__, result) => {
|
|
20643
|
+
var _resultPtr = getNativePointer(result);
|
|
20644
|
+
var _resultInstance = new Systems.StringResult(_resultPtr);
|
|
20645
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20646
|
+
return;
|
|
20647
|
+
}
|
|
20648
|
+
_resolve(_resultInstance);
|
|
20649
|
+
Module.removeFunction(_callbackPtr);
|
|
20650
|
+
};
|
|
20651
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20652
|
+
Module.ccall("csp_multiplayer_ConversationSystem_CreateConversation_void_StringRC_StringResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, message, _callbackPtr, 0]);
|
|
20653
|
+
return _promise;
|
|
20569
20654
|
}
|
|
20570
20655
|
/**
|
|
20571
|
-
* @description
|
|
20656
|
+
* @description Adds a message to a brand new conversation or to an already existing one
|
|
20657
|
+
* /// Make sure that the user has entered a space through SpaceSystem::EnterSpace() before calling this.
|
|
20658
|
+
* Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20659
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::NewMessage, ConversationId of type ReplicatedType : String}.
|
|
20660
|
+
* /// @param ConversationId csp::common::String : A new message will be linked to the provided conversation id.
|
|
20661
|
+
* @param senderDisplayName - The display name of the message sender.
|
|
20662
|
+
* @param message - The message to be stored.
|
|
20663
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20572
20664
|
*/
|
|
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));
|
|
20665
|
+
async addMessageToConversation(conversationId, senderDisplayName, message) {
|
|
20666
|
+
var _resolve;
|
|
20667
|
+
var _promise = new Promise((_r) => {
|
|
20668
|
+
_resolve = _r;
|
|
20669
|
+
});
|
|
20670
|
+
var _callbackPtr;
|
|
20671
|
+
var _callback = (_stateObject__, result) => {
|
|
20672
|
+
var _resultPtr = getNativePointer(result);
|
|
20673
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20674
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20675
|
+
return;
|
|
20676
|
+
}
|
|
20677
|
+
_resolve(_resultInstance);
|
|
20678
|
+
Module.removeFunction(_callbackPtr);
|
|
20679
|
+
};
|
|
20680
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20681
|
+
Module.ccall("csp_multiplayer_ConversationSystem_AddMessageToConversation_void_StringRC_StringRC_StringRC_MessageResultCallback", "void", ["number", "string", "string", "string", "number", "number"], [
|
|
20682
|
+
this.pointer,
|
|
20683
|
+
conversationId,
|
|
20684
|
+
senderDisplayName,
|
|
20685
|
+
message,
|
|
20686
|
+
_callbackPtr,
|
|
20687
|
+
0,
|
|
20688
|
+
]);
|
|
20689
|
+
return _promise;
|
|
20601
20690
|
}
|
|
20602
20691
|
/**
|
|
20603
|
-
* @description
|
|
20692
|
+
* @description Retrieves messages that are linked to the provided Conversation ID.
|
|
20693
|
+
* @param conversationId - Conversation ID.
|
|
20694
|
+
* @param resultsSkipNumber - Optional parameter representing the number of result entries that will be skipped from the result.
|
|
20695
|
+
* For no skip pass nullptr.
|
|
20696
|
+
* @param resultsMaxNumber - Optional parameter representing the maximum number of result entries to be retrieved. For all
|
|
20697
|
+
* available result entries pass nullptr.
|
|
20698
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20604
20699
|
*/
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20700
|
+
async getMessagesFromConversation(conversationId, resultsSkipNumber, resultsMaxNumber) {
|
|
20701
|
+
var _resolve;
|
|
20702
|
+
var _promise = new Promise((_r) => {
|
|
20703
|
+
_resolve = _r;
|
|
20704
|
+
});
|
|
20705
|
+
var _callbackPtr;
|
|
20706
|
+
var _callback = (_stateObject__, result) => {
|
|
20707
|
+
var _resultPtr = getNativePointer(result);
|
|
20708
|
+
var _resultInstance = new Multiplayer.MessageCollectionResult(_resultPtr);
|
|
20709
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20710
|
+
return;
|
|
20711
|
+
}
|
|
20712
|
+
_resolve(_resultInstance);
|
|
20713
|
+
Module.removeFunction(_callbackPtr);
|
|
20714
|
+
};
|
|
20715
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20716
|
+
var resultsSkipNumberPointer = 0;
|
|
20717
|
+
if (resultsSkipNumber != null) {
|
|
20718
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
20719
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
20616
20720
|
}
|
|
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;
|
|
20721
|
+
var resultsMaxNumberPointer = 0;
|
|
20722
|
+
if (resultsMaxNumber != null) {
|
|
20723
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
20724
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
20649
20725
|
}
|
|
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));
|
|
20726
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessagesFromConversation_void_StringRC_intRC_intRC_MessageCollectionResultCallback", "void", ["number", "string", "number", "number", "number", "number"], [
|
|
20727
|
+
this.pointer,
|
|
20728
|
+
conversationId,
|
|
20729
|
+
resultsSkipNumberPointer,
|
|
20730
|
+
resultsMaxNumberPointer,
|
|
20731
|
+
_callbackPtr,
|
|
20732
|
+
0,
|
|
20733
|
+
]);
|
|
20734
|
+
if (resultsSkipNumberPointer) {
|
|
20735
|
+
Module._free(resultsSkipNumberPointer);
|
|
20736
|
+
}
|
|
20737
|
+
if (resultsMaxNumberPointer) {
|
|
20738
|
+
Module._free(resultsMaxNumberPointer);
|
|
20739
|
+
}
|
|
20740
|
+
return _promise;
|
|
20667
20741
|
}
|
|
20668
20742
|
/**
|
|
20669
|
-
* @description Retrieves the
|
|
20670
|
-
* @
|
|
20743
|
+
* @description Retrieves the conversation information.
|
|
20744
|
+
* @param conversationId - Conversation ID.
|
|
20745
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20671
20746
|
*/
|
|
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));
|
|
20747
|
+
async getConversationInformation(conversationId) {
|
|
20748
|
+
var _resolve;
|
|
20749
|
+
var _promise = new Promise((_r) => {
|
|
20750
|
+
_resolve = _r;
|
|
20751
|
+
});
|
|
20752
|
+
var _callbackPtr;
|
|
20753
|
+
var _callback = (_stateObject__, result) => {
|
|
20754
|
+
var _resultPtr = getNativePointer(result);
|
|
20755
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20756
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20757
|
+
return;
|
|
20758
|
+
}
|
|
20759
|
+
_resolve(_resultInstance);
|
|
20760
|
+
Module.removeFunction(_callbackPtr);
|
|
20761
|
+
};
|
|
20762
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20763
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetConversationInformation_void_StringRC_ConversationResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20764
|
+
return _promise;
|
|
20701
20765
|
}
|
|
20702
20766
|
/**
|
|
20703
|
-
* @description
|
|
20704
|
-
* @
|
|
20767
|
+
* @description Sets the conversation information.
|
|
20768
|
+
* @param conversationId - Conversation ID.
|
|
20769
|
+
* @param conversationData - Conversation Data.
|
|
20770
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20705
20771
|
*/
|
|
20706
|
-
|
|
20707
|
-
var
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20772
|
+
async setConversationInformation(conversationId, conversationData) {
|
|
20773
|
+
var _resolve;
|
|
20774
|
+
var _promise = new Promise((_r) => {
|
|
20775
|
+
_resolve = _r;
|
|
20776
|
+
});
|
|
20777
|
+
var _callbackPtr;
|
|
20778
|
+
var _callback = (_stateObject__, result) => {
|
|
20779
|
+
var _resultPtr = getNativePointer(result);
|
|
20780
|
+
var _resultInstance = new Multiplayer.ConversationResult(_resultPtr);
|
|
20781
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20782
|
+
return;
|
|
20783
|
+
}
|
|
20784
|
+
_resolve(_resultInstance);
|
|
20785
|
+
Module.removeFunction(_callbackPtr);
|
|
20786
|
+
};
|
|
20787
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20788
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationInformation_void_StringRC_ConversationInfoRC_ConversationResultCallback", "void", ["number", "string", "number", "number", "number"], [
|
|
20789
|
+
this.pointer,
|
|
20790
|
+
conversationId,
|
|
20791
|
+
conversationData.pointer,
|
|
20792
|
+
_callbackPtr,
|
|
20793
|
+
0,
|
|
20794
|
+
]);
|
|
20795
|
+
return _promise;
|
|
20796
|
+
}
|
|
20797
|
+
/**
|
|
20798
|
+
* @description Retrieves one particular message.
|
|
20799
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20800
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20801
|
+
*/
|
|
20802
|
+
async getMessage(messageId) {
|
|
20803
|
+
var _resolve;
|
|
20804
|
+
var _promise = new Promise((_r) => {
|
|
20805
|
+
_resolve = _r;
|
|
20806
|
+
});
|
|
20807
|
+
var _callbackPtr;
|
|
20808
|
+
var _callback = (_stateObject__, result) => {
|
|
20809
|
+
var _resultPtr = getNativePointer(result);
|
|
20810
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20811
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20812
|
+
return;
|
|
20813
|
+
}
|
|
20814
|
+
_resolve(_resultInstance);
|
|
20815
|
+
Module.removeFunction(_callbackPtr);
|
|
20816
|
+
};
|
|
20817
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20818
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessage_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20819
|
+
return _promise;
|
|
20820
|
+
}
|
|
20821
|
+
/**
|
|
20822
|
+
* @description Sets the message information.
|
|
20823
|
+
* @param messageId - ID of the message to be retrieved.
|
|
20824
|
+
* @param messageData - Message Data.
|
|
20825
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20826
|
+
*/
|
|
20827
|
+
async setMessageInformation(messageId, messageData) {
|
|
20828
|
+
var _resolve;
|
|
20829
|
+
var _promise = new Promise((_r) => {
|
|
20830
|
+
_resolve = _r;
|
|
20831
|
+
});
|
|
20832
|
+
var _callbackPtr;
|
|
20833
|
+
var _callback = (_stateObject__, result) => {
|
|
20834
|
+
var _resultPtr = getNativePointer(result);
|
|
20835
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20836
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20837
|
+
return;
|
|
20838
|
+
}
|
|
20839
|
+
_resolve(_resultInstance);
|
|
20840
|
+
Module.removeFunction(_callbackPtr);
|
|
20841
|
+
};
|
|
20842
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20843
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetMessageInformation_void_StringRC_MessageInfoRC_MessageResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, messageId, messageData.pointer, _callbackPtr, 0]);
|
|
20844
|
+
return _promise;
|
|
20845
|
+
}
|
|
20846
|
+
/**
|
|
20847
|
+
* @description Retrieves the message information.
|
|
20848
|
+
* @param messageId - Message ID.
|
|
20849
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20850
|
+
*/
|
|
20851
|
+
async getMessageInformation(messageId) {
|
|
20852
|
+
var _resolve;
|
|
20853
|
+
var _promise = new Promise((_r) => {
|
|
20854
|
+
_resolve = _r;
|
|
20855
|
+
});
|
|
20856
|
+
var _callbackPtr;
|
|
20857
|
+
var _callback = (_stateObject__, result) => {
|
|
20858
|
+
var _resultPtr = getNativePointer(result);
|
|
20859
|
+
var _resultInstance = new Multiplayer.MessageResult(_resultPtr);
|
|
20860
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20861
|
+
return;
|
|
20862
|
+
}
|
|
20863
|
+
_resolve(_resultInstance);
|
|
20864
|
+
Module.removeFunction(_callbackPtr);
|
|
20865
|
+
};
|
|
20866
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20867
|
+
Module.ccall("csp_multiplayer_ConversationSystem_GetMessageInformation_void_StringRC_MessageResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20868
|
+
return _promise;
|
|
20869
|
+
}
|
|
20870
|
+
/**
|
|
20871
|
+
* @description Deletes all the messages that are part of the conversation.
|
|
20872
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20873
|
+
* {ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteConversation, ConversationId of type ReplicatedType :
|
|
20874
|
+
* String}.
|
|
20875
|
+
* /// @param ConversationId csp::common::String : ID of the conversation that will be deleted. After this operation finishes successful this ID will
|
|
20876
|
+
* not be valid anymore.
|
|
20877
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20878
|
+
*/
|
|
20879
|
+
async deleteConversation(conversationId) {
|
|
20880
|
+
var _resolve;
|
|
20881
|
+
var _promise = new Promise((_r) => {
|
|
20882
|
+
_resolve = _r;
|
|
20883
|
+
});
|
|
20884
|
+
var _callbackPtr;
|
|
20885
|
+
var _callback = (_stateObject__, result) => {
|
|
20886
|
+
var _resultPtr = getNativePointer(result);
|
|
20887
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20888
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20889
|
+
return;
|
|
20890
|
+
}
|
|
20891
|
+
_resolve(_resultInstance);
|
|
20892
|
+
Module.removeFunction(_callbackPtr);
|
|
20893
|
+
};
|
|
20894
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20895
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteConversation_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, conversationId, _callbackPtr, 0]);
|
|
20896
|
+
return _promise;
|
|
20897
|
+
}
|
|
20898
|
+
/**
|
|
20899
|
+
* @description Deletes a particular message.
|
|
20900
|
+
* /// Sends a network event acknowledgement that can be listened for called "ConversationSystem" containing:
|
|
20901
|
+
* { ConversationSystemParams of type ReplicatedType : ConversationMessageType::DeleteMessage, MessageId of type ReplicatedType : String }.
|
|
20902
|
+
* /// @param MessageId csp::common::String : ID of the message that will be deleted.
|
|
20903
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
20904
|
+
*/
|
|
20905
|
+
async deleteMessage(messageId) {
|
|
20906
|
+
var _resolve;
|
|
20907
|
+
var _promise = new Promise((_r) => {
|
|
20908
|
+
_resolve = _r;
|
|
20909
|
+
});
|
|
20910
|
+
var _callbackPtr;
|
|
20911
|
+
var _callback = (_stateObject__, result) => {
|
|
20912
|
+
var _resultPtr = getNativePointer(result);
|
|
20913
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
20914
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20915
|
+
return;
|
|
20916
|
+
}
|
|
20917
|
+
_resolve(_resultInstance);
|
|
20918
|
+
Module.removeFunction(_callbackPtr);
|
|
20919
|
+
};
|
|
20920
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20921
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeleteMessage_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, messageId, _callbackPtr, 0]);
|
|
20922
|
+
return _promise;
|
|
20923
|
+
}
|
|
20924
|
+
/**
|
|
20925
|
+
* @description Sets a callback for a conversation new message event.
|
|
20926
|
+
* @param callback - Callback to receive ConversationSystem Data when a message is sent.
|
|
20927
|
+
* Callback will have to reset the callback passed to the system to avoid "dangling objects" after use.
|
|
20928
|
+
*/
|
|
20929
|
+
setConversationSystemCallback(callback) {
|
|
20930
|
+
var _callback = (_stateObject__, arg1) => {
|
|
20931
|
+
var _arg1 = new Multiplayer.ConversationSystemParams(getNativePointer(arg1));
|
|
20932
|
+
callback(_arg1);
|
|
20933
|
+
};
|
|
20934
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
20935
|
+
Module.ccall("csp_multiplayer_ConversationSystem_SetConversationSystemCallback_void_ConversationSystemCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
20936
|
+
}
|
|
20937
|
+
/**
|
|
20938
|
+
* @description Registers the system to listen for the named event.
|
|
20939
|
+
*/
|
|
20940
|
+
registerSystemCallback() {
|
|
20941
|
+
Module.ccall("csp_multiplayer_ConversationSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20942
|
+
}
|
|
20943
|
+
/**
|
|
20944
|
+
* @description Deregisters the system from listening for the named event.
|
|
20945
|
+
*/
|
|
20946
|
+
deregisterSystemCallback() {
|
|
20947
|
+
Module.ccall("csp_multiplayer_ConversationSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
20948
|
+
}
|
|
20949
|
+
}
|
|
20950
|
+
Multiplayer.ConversationSystem = ConversationSystem;
|
|
20951
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
20952
|
+
(function (Systems) {
|
|
20953
|
+
/**
|
|
20954
|
+
* @description A result handler that is used to notify a user of an error.
|
|
20955
|
+
*/
|
|
20956
|
+
class NullResult extends Systems.ResultBase {
|
|
20957
|
+
/** @internal */
|
|
20958
|
+
constructor(pointer) {
|
|
20959
|
+
super(pointer);
|
|
20960
|
+
}
|
|
20961
|
+
static fromResultBase(baseInstance) {
|
|
20962
|
+
const nativeClassWrapper = baseInstance;
|
|
20963
|
+
return new Systems.NullResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20712
20964
|
}
|
|
20713
20965
|
delete() {
|
|
20714
20966
|
if (this.ownsPointer && !this.disposed) {
|
|
20715
|
-
Module.ccall("
|
|
20967
|
+
Module.ccall("csp_systems_NullResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20716
20968
|
this.disposed = true;
|
|
20717
20969
|
}
|
|
20718
20970
|
}
|
|
20719
20971
|
}
|
|
20720
|
-
Systems.
|
|
20972
|
+
Systems.NullResult = NullResult;
|
|
20721
20973
|
})(Systems || (Systems = {}));
|
|
20722
20974
|
(function (Systems) {
|
|
20723
20975
|
/**
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
class UriResult extends Systems.ResultBase {
|
|
20976
|
+
* @description A result handler that is used to notify a user of an error while passing a boolean value.
|
|
20977
|
+
*/
|
|
20978
|
+
class BooleanResult extends Systems.ResultBase {
|
|
20728
20979
|
/** @internal */
|
|
20729
20980
|
constructor(pointer) {
|
|
20730
20981
|
super(pointer);
|
|
20731
20982
|
}
|
|
20732
20983
|
static fromResultBase(baseInstance) {
|
|
20733
20984
|
const nativeClassWrapper = baseInstance;
|
|
20734
|
-
return new Systems.
|
|
20985
|
+
return new Systems.BooleanResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20735
20986
|
}
|
|
20736
20987
|
/**
|
|
20737
|
-
* @description
|
|
20738
|
-
* @return Uri of the uploaded asset.
|
|
20988
|
+
* @description A getter which returns the bool passed via the result.
|
|
20739
20989
|
*/
|
|
20740
|
-
|
|
20741
|
-
let _result = Module.ccall("
|
|
20742
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
20743
|
-
free(_result);
|
|
20744
|
-
_result = _resultString;
|
|
20990
|
+
getValue() {
|
|
20991
|
+
let _result = Module.ccall("csp_systems_BooleanResult_GetValueC_bool", "boolean", ["number"], [this.pointer]);
|
|
20745
20992
|
return _result;
|
|
20746
20993
|
}
|
|
20747
|
-
setUri(value) {
|
|
20748
|
-
Module.ccall("csp_systems_UriResult_SetUri_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
20749
|
-
}
|
|
20750
20994
|
delete() {
|
|
20751
20995
|
if (this.ownsPointer && !this.disposed) {
|
|
20752
|
-
Module.ccall("
|
|
20996
|
+
Module.ccall("csp_systems_BooleanResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20753
20997
|
this.disposed = true;
|
|
20754
20998
|
}
|
|
20755
20999
|
}
|
|
20756
21000
|
}
|
|
20757
|
-
Systems.
|
|
21001
|
+
Systems.BooleanResult = BooleanResult;
|
|
20758
21002
|
})(Systems || (Systems = {}));
|
|
20759
21003
|
(function (Systems) {
|
|
20760
21004
|
/**
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
class AssetDataResult extends Systems.ResultBase {
|
|
21005
|
+
* @description A result handler that is used to notify a user of an error while passing a String value.
|
|
21006
|
+
*/
|
|
21007
|
+
class StringResult extends Systems.ResultBase {
|
|
20765
21008
|
/** @internal */
|
|
20766
21009
|
constructor(pointer) {
|
|
20767
21010
|
super(pointer);
|
|
20768
21011
|
}
|
|
20769
21012
|
static fromResultBase(baseInstance) {
|
|
20770
21013
|
const nativeClassWrapper = baseInstance;
|
|
20771
|
-
return new Systems.
|
|
21014
|
+
return new Systems.StringResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20772
21015
|
}
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
21016
|
+
/**
|
|
21017
|
+
* @description A getter which returns the String passed via the result.
|
|
21018
|
+
*/
|
|
21019
|
+
getValue() {
|
|
21020
|
+
let _result = Module.ccall("csp_systems_StringResult_GetValueC_StringRC", "number", ["number"], [this.pointer]);
|
|
21021
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
21022
|
+
free(_result);
|
|
21023
|
+
_result = _resultString;
|
|
21024
|
+
return _result;
|
|
20778
21025
|
}
|
|
20779
21026
|
delete() {
|
|
20780
21027
|
if (this.ownsPointer && !this.disposed) {
|
|
20781
|
-
Module.ccall("
|
|
21028
|
+
Module.ccall("csp_systems_StringResult_Dtor", "void", ["number"], [this.pointer]);
|
|
20782
21029
|
this.disposed = true;
|
|
20783
21030
|
}
|
|
20784
21031
|
}
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
21032
|
+
}
|
|
21033
|
+
Systems.StringResult = StringResult;
|
|
21034
|
+
})(Systems || (Systems = {}));
|
|
21035
|
+
(function (Systems) {
|
|
21036
|
+
/**
|
|
21037
|
+
* @description A result handler that is used to notify a user of an error while passing a StringArray value.
|
|
21038
|
+
*/
|
|
21039
|
+
class StringArrayResult extends Systems.ResultBase {
|
|
21040
|
+
/** @internal */
|
|
21041
|
+
constructor(pointer) {
|
|
21042
|
+
super(pointer);
|
|
21043
|
+
}
|
|
21044
|
+
static fromResultBase(baseInstance) {
|
|
21045
|
+
const nativeClassWrapper = baseInstance;
|
|
21046
|
+
return new Systems.StringArrayResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21047
|
+
}
|
|
21048
|
+
/**
|
|
21049
|
+
* @description A getter which returns the StringArray passed via the result.
|
|
21050
|
+
*/
|
|
21051
|
+
getValue() {
|
|
21052
|
+
var _ret = Module._malloc(8);
|
|
21053
|
+
Module.ccall("csp_systems_StringArrayResult_GetValueC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21054
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), StringFactory, "String");
|
|
21055
|
+
Module._free(_ret);
|
|
21056
|
+
return _nPtr;
|
|
21057
|
+
}
|
|
21058
|
+
delete() {
|
|
21059
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21060
|
+
Module.ccall("csp_systems_StringArrayResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21061
|
+
this.disposed = true;
|
|
21062
|
+
}
|
|
21063
|
+
}
|
|
21064
|
+
}
|
|
21065
|
+
Systems.StringArrayResult = StringArrayResult;
|
|
21066
|
+
})(Systems || (Systems = {}));
|
|
21067
|
+
(function (Systems) {
|
|
21068
|
+
/**
|
|
21069
|
+
* @description A result handler that is used to notify a user of an error while passing a uint64_t value.
|
|
21070
|
+
*/
|
|
21071
|
+
class UInt64Result extends Systems.ResultBase {
|
|
21072
|
+
/** @internal */
|
|
21073
|
+
constructor(pointer) {
|
|
21074
|
+
super(pointer);
|
|
21075
|
+
}
|
|
21076
|
+
static fromResultBase(baseInstance) {
|
|
21077
|
+
const nativeClassWrapper = baseInstance;
|
|
21078
|
+
return new Systems.UInt64Result(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21079
|
+
}
|
|
21080
|
+
/**
|
|
21081
|
+
* @description A getter which returns the uint64_t passed via the result.
|
|
21082
|
+
*/
|
|
21083
|
+
getValue() {
|
|
21084
|
+
let _result = Module.ccall("csp_systems_UInt64Result_GetValueC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
21085
|
+
const _unfixedValue = _result;
|
|
21086
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
21087
|
+
_result = _fixedValue;
|
|
21088
|
+
return _result;
|
|
21089
|
+
}
|
|
21090
|
+
delete() {
|
|
21091
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21092
|
+
Module.ccall("csp_systems_UInt64Result_Dtor", "void", ["number"], [this.pointer]);
|
|
21093
|
+
this.disposed = true;
|
|
21094
|
+
}
|
|
21095
|
+
}
|
|
21096
|
+
}
|
|
21097
|
+
Systems.UInt64Result = UInt64Result;
|
|
21098
|
+
})(Systems || (Systems = {}));
|
|
21099
|
+
(function (Systems) {
|
|
21100
|
+
/**
|
|
21101
|
+
* @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
|
|
21102
|
+
* passing a Map of Strings representing the HTTP Responses.
|
|
21103
|
+
*/
|
|
21104
|
+
class HTTPHeadersResult extends Systems.ResultBase {
|
|
21105
|
+
/** @internal */
|
|
21106
|
+
constructor(pointer) {
|
|
21107
|
+
super(pointer);
|
|
21108
|
+
}
|
|
21109
|
+
static fromResultBase(baseInstance) {
|
|
21110
|
+
const nativeClassWrapper = baseInstance;
|
|
21111
|
+
return new Systems.HTTPHeadersResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21112
|
+
}
|
|
21113
|
+
/**
|
|
21114
|
+
* @description A getter which returns the map of strings representing HTTP responses passed via the result.
|
|
21115
|
+
*/
|
|
21116
|
+
getValue() {
|
|
21117
|
+
var _ret = Module._malloc(8);
|
|
21118
|
+
Module.ccall("csp_systems_HTTPHeadersResult_GetValueC_MapRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21119
|
+
var _nPtr = new Common.Map(getNativePointer(_ret), StringFactory, "String", StringFactory, "String");
|
|
21120
|
+
Module._free(_ret);
|
|
21121
|
+
return _nPtr;
|
|
21122
|
+
}
|
|
21123
|
+
delete() {
|
|
21124
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21125
|
+
Module.ccall("csp_systems_HTTPHeadersResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21126
|
+
this.disposed = true;
|
|
21127
|
+
}
|
|
21128
|
+
}
|
|
21129
|
+
}
|
|
21130
|
+
Systems.HTTPHeadersResult = HTTPHeadersResult;
|
|
21131
|
+
})(Systems || (Systems = {}));
|
|
21132
|
+
(function (Systems) {
|
|
21133
|
+
/**
|
|
21134
|
+
@ingroup Asset System
|
|
21135
|
+
* @description Data class used to contain information when creating an asset.
|
|
21136
|
+
*/
|
|
21137
|
+
class AssetResult extends Systems.ResultBase {
|
|
21138
|
+
/** @internal */
|
|
21139
|
+
constructor(pointer) {
|
|
21140
|
+
super(pointer);
|
|
21141
|
+
}
|
|
21142
|
+
static fromResultBase(baseInstance) {
|
|
21143
|
+
const nativeClassWrapper = baseInstance;
|
|
21144
|
+
return new Systems.AssetResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21145
|
+
}
|
|
21146
|
+
/**
|
|
21147
|
+
* @description Retrieves the asset result.
|
|
21148
|
+
* @return Const ref of asset class.
|
|
21149
|
+
*/
|
|
21150
|
+
getAsset() {
|
|
21151
|
+
var _ret = Module._malloc(8);
|
|
21152
|
+
Module.ccall("csp_systems_AssetResult_GetAsset_AssetR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21153
|
+
var _nPtr = new Systems.Asset(getNativePointer(_ret));
|
|
21154
|
+
Module._free(_ret);
|
|
21155
|
+
return _nPtr;
|
|
21156
|
+
}
|
|
21157
|
+
delete() {
|
|
21158
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21159
|
+
Module.ccall("csp_systems_AssetResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21160
|
+
this.disposed = true;
|
|
21161
|
+
}
|
|
21162
|
+
}
|
|
21163
|
+
}
|
|
21164
|
+
Systems.AssetResult = AssetResult;
|
|
21165
|
+
})(Systems || (Systems = {}));
|
|
21166
|
+
(function (Systems) {
|
|
21167
|
+
/**
|
|
21168
|
+
@ingroup Asset System
|
|
21169
|
+
* @description Data class used to contain information when attempting to get an array of assets.
|
|
21170
|
+
*/
|
|
21171
|
+
class AssetsResult extends Systems.ResultBase {
|
|
21172
|
+
/** @internal */
|
|
21173
|
+
constructor(pointer) {
|
|
21174
|
+
super(pointer);
|
|
21175
|
+
}
|
|
21176
|
+
static fromResultBase(baseInstance) {
|
|
21177
|
+
const nativeClassWrapper = baseInstance;
|
|
21178
|
+
return new Systems.AssetsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21179
|
+
}
|
|
21180
|
+
/**
|
|
21181
|
+
* @description Retrieves the asset array being stored as a pointer.
|
|
21182
|
+
* @return Pointer to asset array being stored.
|
|
21183
|
+
*/
|
|
21184
|
+
getAssets() {
|
|
21185
|
+
var _ret = Module._malloc(8);
|
|
21186
|
+
Module.ccall("csp_systems_AssetsResult_GetAssets_ArrayR", "void", ["number", "number"], [_ret, this.pointer]);
|
|
21187
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_AssetFactory, "csp_systems_Asset");
|
|
21188
|
+
Module._free(_ret);
|
|
21189
|
+
return _nPtr;
|
|
21190
|
+
}
|
|
21191
|
+
delete() {
|
|
21192
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21193
|
+
Module.ccall("csp_systems_AssetsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21194
|
+
this.disposed = true;
|
|
21195
|
+
}
|
|
21196
|
+
}
|
|
21197
|
+
}
|
|
21198
|
+
Systems.AssetsResult = AssetsResult;
|
|
21199
|
+
})(Systems || (Systems = {}));
|
|
21200
|
+
(function (Systems) {
|
|
21201
|
+
/**
|
|
21202
|
+
@ingroup Asset System
|
|
21203
|
+
* @description Data class used to contain information when attempting to upload an asset.
|
|
21204
|
+
*/
|
|
21205
|
+
class UriResult extends Systems.ResultBase {
|
|
21206
|
+
/** @internal */
|
|
21207
|
+
constructor(pointer) {
|
|
21208
|
+
super(pointer);
|
|
21209
|
+
}
|
|
21210
|
+
static fromResultBase(baseInstance) {
|
|
21211
|
+
const nativeClassWrapper = baseInstance;
|
|
21212
|
+
return new Systems.UriResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21213
|
+
}
|
|
21214
|
+
/**
|
|
21215
|
+
* @description Retrieves the uri for the asset uploaded.
|
|
21216
|
+
* @return Uri of the uploaded asset.
|
|
21217
|
+
*/
|
|
21218
|
+
getUri() {
|
|
21219
|
+
let _result = Module.ccall("csp_systems_UriResult_GetUri_StringR", "number", ["number"], [this.pointer]);
|
|
21220
|
+
const _resultString = Module.UTF8ToString(_result);
|
|
21221
|
+
free(_result);
|
|
21222
|
+
_result = _resultString;
|
|
21223
|
+
return _result;
|
|
21224
|
+
}
|
|
21225
|
+
setUri(value) {
|
|
21226
|
+
Module.ccall("csp_systems_UriResult_SetUri_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
|
|
21227
|
+
}
|
|
21228
|
+
delete() {
|
|
21229
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21230
|
+
Module.ccall("csp_systems_UriResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21231
|
+
this.disposed = true;
|
|
21232
|
+
}
|
|
21233
|
+
}
|
|
21234
|
+
}
|
|
21235
|
+
Systems.UriResult = UriResult;
|
|
21236
|
+
})(Systems || (Systems = {}));
|
|
21237
|
+
(function (Systems) {
|
|
21238
|
+
/**
|
|
21239
|
+
@ingroup Asset System
|
|
21240
|
+
* @description Data class used to contain information when attempting to download asset data.
|
|
21241
|
+
*/
|
|
21242
|
+
class AssetDataResult extends Systems.ResultBase {
|
|
21243
|
+
/** @internal */
|
|
21244
|
+
constructor(pointer) {
|
|
21245
|
+
super(pointer);
|
|
21246
|
+
}
|
|
21247
|
+
static fromResultBase(baseInstance) {
|
|
21248
|
+
const nativeClassWrapper = baseInstance;
|
|
21249
|
+
return new Systems.AssetDataResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21250
|
+
}
|
|
21251
|
+
static create_other(other) {
|
|
21252
|
+
var _ptr = Module._malloc(8);
|
|
21253
|
+
Module.ccall("csp_systems_AssetDataResult_Ctor_AssetDataResultRC", "void", ["number", "number"], [_ptr, other.pointer]);
|
|
21254
|
+
var _nPtr = getNativePointer(_ptr);
|
|
21255
|
+
return new AssetDataResult(_nPtr);
|
|
21256
|
+
}
|
|
21257
|
+
delete() {
|
|
21258
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21259
|
+
Module.ccall("csp_systems_AssetDataResult_Dtor", "void", ["number"], [this.pointer]);
|
|
21260
|
+
this.disposed = true;
|
|
21261
|
+
}
|
|
21262
|
+
}
|
|
21263
|
+
/**
|
|
21264
|
+
* @description Retrieves the data from the result.
|
|
21265
|
+
*/
|
|
21266
|
+
getData() {
|
|
21267
|
+
var _ret = Module._malloc(8);
|
|
20790
21268
|
Module.ccall("csp_systems_AssetDataResult_GetDataC_voidPC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
20791
21269
|
var _nPtr = getNativePointer(_ret).pointer;
|
|
20792
21270
|
Module._free(_ret);
|
|
@@ -20901,16 +21379,328 @@ export class CSPFoundation {
|
|
|
20901
21379
|
return new Systems.AssetSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
20902
21380
|
}
|
|
20903
21381
|
/**
|
|
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
|
|
21382
|
+
* @description Creates an asset collection.
|
|
21383
|
+
* @param space - Optional space to associate the asset collection with
|
|
21384
|
+
* @param parentAssetCollectionId - Optional parent asset collection id
|
|
21385
|
+
* @param assetCollectionName - Name of the asset collection
|
|
21386
|
+
* @param metadata - Optional metadata info to be associated with the asset collection
|
|
21387
|
+
* @param type - Type of the new asset collection
|
|
21388
|
+
* @param tags - Optional array of strings to add to the asset collection as tags
|
|
21389
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21390
|
+
*/
|
|
21391
|
+
async createAssetCollection(spaceId, parentAssetCollectionId, assetCollectionName, metadata, type, tags) {
|
|
21392
|
+
var _resolve;
|
|
21393
|
+
var _promise = new Promise((_r) => {
|
|
21394
|
+
_resolve = _r;
|
|
21395
|
+
});
|
|
21396
|
+
var _callbackPtr;
|
|
21397
|
+
var _callback = (_stateObject__, result) => {
|
|
21398
|
+
var _resultPtr = getNativePointer(result);
|
|
21399
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21400
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21401
|
+
return;
|
|
21402
|
+
}
|
|
21403
|
+
_resolve(_resultInstance);
|
|
21404
|
+
Module.removeFunction(_callbackPtr);
|
|
21405
|
+
};
|
|
21406
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21407
|
+
Module.ccall("csp_systems_AssetSystem_CreateAssetCollection_void_StringRC_StringRC_StringRC_MapRC_EAssetCollectionTypeC_ArrayRC_AssetCollectionResultCallback", "void", [
|
|
21408
|
+
"number",
|
|
21409
|
+
"string",
|
|
21410
|
+
"string",
|
|
21411
|
+
"string",
|
|
21412
|
+
"number",
|
|
21413
|
+
"number",
|
|
21414
|
+
"number",
|
|
21415
|
+
"number",
|
|
21416
|
+
"number",
|
|
21417
|
+
], [
|
|
21418
|
+
this.pointer,
|
|
21419
|
+
spaceId,
|
|
21420
|
+
parentAssetCollectionId,
|
|
21421
|
+
assetCollectionName,
|
|
21422
|
+
metadata != null ? metadata.pointer : 0,
|
|
21423
|
+
type,
|
|
21424
|
+
tags != null ? tags.pointer : 0,
|
|
21425
|
+
_callbackPtr,
|
|
21426
|
+
0,
|
|
21427
|
+
]);
|
|
21428
|
+
return _promise;
|
|
21429
|
+
}
|
|
21430
|
+
/**
|
|
21431
|
+
* @description Deletes a given asset collection.
|
|
21432
|
+
* @param assetCollection - Asset collection to delete
|
|
21433
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21434
|
+
*/
|
|
21435
|
+
async deleteAssetCollection(assetCollection) {
|
|
21436
|
+
var _resolve;
|
|
21437
|
+
var _promise = new Promise((_r) => {
|
|
21438
|
+
_resolve = _r;
|
|
21439
|
+
});
|
|
21440
|
+
var _callbackPtr;
|
|
21441
|
+
var _callback = (_stateObject__, result) => {
|
|
21442
|
+
var _resultPtr = getNativePointer(result);
|
|
21443
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21444
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21445
|
+
return;
|
|
21446
|
+
}
|
|
21447
|
+
_resolve(_resultInstance);
|
|
21448
|
+
Module.removeFunction(_callbackPtr);
|
|
21449
|
+
};
|
|
21450
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21451
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAssetCollection_void_AssetCollectionRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21452
|
+
return _promise;
|
|
21453
|
+
}
|
|
21454
|
+
/**
|
|
21455
|
+
* @description Copies an array of asset collections to another space. Note that all source asset collections must belong to the same space.
|
|
21456
|
+
* @param sourceAssetCollections - The array of asset collections to copy. They must all belong to the same
|
|
21457
|
+
* space.
|
|
21458
|
+
* @param destSpaceId - The unique identifier of the space to copy these asset collections to.
|
|
21459
|
+
* @param copyAsync - Whether to instruct the services to perform the copy of the asset collections
|
|
21460
|
+
* asynchronously.
|
|
21461
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21462
|
+
*/
|
|
21463
|
+
async copyAssetCollectionsToSpace(sourceAssetCollections, destSpaceId, copyAsync) {
|
|
21464
|
+
var _resolve;
|
|
21465
|
+
var _promise = new Promise((_r) => {
|
|
21466
|
+
_resolve = _r;
|
|
21467
|
+
});
|
|
21468
|
+
var _callbackPtr;
|
|
21469
|
+
var _callback = (_stateObject__, result) => {
|
|
21470
|
+
var _resultPtr = getNativePointer(result);
|
|
21471
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21472
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21473
|
+
return;
|
|
21474
|
+
}
|
|
21475
|
+
_resolve(_resultInstance);
|
|
21476
|
+
Module.removeFunction(_callbackPtr);
|
|
21477
|
+
};
|
|
21478
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21479
|
+
Module.ccall("csp_systems_AssetSystem_CopyAssetCollectionsToSpace_void_ArrayR_StringRC_bool_AssetCollectionsResultCallback", "void", ["number", "number", "string", "boolean", "number", "number"], [
|
|
21480
|
+
this.pointer,
|
|
21481
|
+
sourceAssetCollections.pointer,
|
|
21482
|
+
destSpaceId,
|
|
21483
|
+
copyAsync,
|
|
21484
|
+
_callbackPtr,
|
|
21485
|
+
0,
|
|
21486
|
+
]);
|
|
21487
|
+
return _promise;
|
|
21488
|
+
}
|
|
21489
|
+
/**
|
|
21490
|
+
* @description Finds an asset collection by its Id.
|
|
21491
|
+
* @param assetCollectionId - Asset collection to delete
|
|
21492
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21493
|
+
*/
|
|
21494
|
+
async getAssetCollectionById(assetCollectionId) {
|
|
21495
|
+
var _resolve;
|
|
21496
|
+
var _promise = new Promise((_r) => {
|
|
21497
|
+
_resolve = _r;
|
|
21498
|
+
});
|
|
21499
|
+
var _callbackPtr;
|
|
21500
|
+
var _callback = (_stateObject__, result) => {
|
|
21501
|
+
var _resultPtr = getNativePointer(result);
|
|
21502
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21503
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21504
|
+
return;
|
|
21505
|
+
}
|
|
21506
|
+
_resolve(_resultInstance);
|
|
21507
|
+
Module.removeFunction(_callbackPtr);
|
|
21508
|
+
};
|
|
21509
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21510
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionById_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionId, _callbackPtr, 0]);
|
|
21511
|
+
return _promise;
|
|
21512
|
+
}
|
|
21513
|
+
/**
|
|
21514
|
+
* @description Finds an asset collection by its Name.
|
|
21515
|
+
* @param assetCollectionName - Name of the asset collection to be retrieved
|
|
21516
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21517
|
+
*/
|
|
21518
|
+
async getAssetCollectionByName(assetCollectionName) {
|
|
21519
|
+
var _resolve;
|
|
21520
|
+
var _promise = new Promise((_r) => {
|
|
21521
|
+
_resolve = _r;
|
|
21522
|
+
});
|
|
21523
|
+
var _callbackPtr;
|
|
21524
|
+
var _callback = (_stateObject__, result) => {
|
|
21525
|
+
var _resultPtr = getNativePointer(result);
|
|
21526
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21527
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21528
|
+
return;
|
|
21529
|
+
}
|
|
21530
|
+
_resolve(_resultInstance);
|
|
21531
|
+
Module.removeFunction(_callbackPtr);
|
|
21532
|
+
};
|
|
21533
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21534
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetCollectionByName_void_StringRC_AssetCollectionResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, assetCollectionName, _callbackPtr, 0]);
|
|
21535
|
+
return _promise;
|
|
21536
|
+
}
|
|
21537
|
+
/**
|
|
21538
|
+
* @description Retrieves asset collections based on the specified search criteria.
|
|
21539
|
+
* Results pagination is supported through the use of ResultsSkipNumber and ResultsMaxNumber.
|
|
21540
|
+
* @param space - Optional space to get asset collections associated with it
|
|
21541
|
+
* @param assetCollectionParentId - Optional asset collection parent id to get asset collections associated with it
|
|
21542
|
+
* @param assetCollectionType - Type of the asset collection
|
|
21543
|
+
* @param assetCollectionTags - Optional array of strings representing asset collection tags
|
|
21544
|
+
* @param assetCollectionNames - Optional array of strings representing asset
|
|
21545
|
+
* collection names
|
|
21546
|
+
* @param resultsSkipNumber - Optional param representing the number of result entries that will be skipped from the result. for no skip pass
|
|
21547
|
+
* nullptr.
|
|
21548
|
+
* @param resultsMaxNumber - Optional param representing the maximum number of result entries to be retrieved. for all available result
|
|
21549
|
+
* entries pass nullptr.
|
|
21550
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21551
|
+
*/
|
|
21552
|
+
async findAssetCollections(ids, parentId, names, types, tags, spaceIds, resultsSkipNumber, resultsMaxNumber) {
|
|
21553
|
+
var _resolve;
|
|
21554
|
+
var _promise = new Promise((_r) => {
|
|
21555
|
+
_resolve = _r;
|
|
21556
|
+
});
|
|
21557
|
+
var _callbackPtr;
|
|
21558
|
+
var _callback = (_stateObject__, result) => {
|
|
21559
|
+
var _resultPtr = getNativePointer(result);
|
|
21560
|
+
var _resultInstance = new Systems.AssetCollectionsResult(_resultPtr);
|
|
21561
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21562
|
+
return;
|
|
21563
|
+
}
|
|
21564
|
+
_resolve(_resultInstance);
|
|
21565
|
+
Module.removeFunction(_callbackPtr);
|
|
21566
|
+
};
|
|
21567
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21568
|
+
var resultsSkipNumberPointer = 0;
|
|
21569
|
+
if (resultsSkipNumber != null) {
|
|
21570
|
+
resultsSkipNumberPointer = Module._malloc(4);
|
|
21571
|
+
Module.setValue(resultsSkipNumberPointer, resultsSkipNumber, "i32");
|
|
21572
|
+
}
|
|
21573
|
+
var resultsMaxNumberPointer = 0;
|
|
21574
|
+
if (resultsMaxNumber != null) {
|
|
21575
|
+
resultsMaxNumberPointer = Module._malloc(4);
|
|
21576
|
+
Module.setValue(resultsMaxNumberPointer, resultsMaxNumber, "i32");
|
|
21577
|
+
}
|
|
21578
|
+
Module.ccall("csp_systems_AssetSystem_FindAssetCollections_void_ArrayRC_StringRC_ArrayRC_ArrayRC_ArrayRC_ArrayRC_intRC_intRC_AssetCollectionsResultCallback", "void", [
|
|
21579
|
+
"number",
|
|
21580
|
+
"number",
|
|
21581
|
+
"string",
|
|
21582
|
+
"number",
|
|
21583
|
+
"number",
|
|
21584
|
+
"number",
|
|
21585
|
+
"number",
|
|
21586
|
+
"number",
|
|
21587
|
+
"number",
|
|
21588
|
+
"number",
|
|
21589
|
+
"number",
|
|
21590
|
+
], [
|
|
21591
|
+
this.pointer,
|
|
21592
|
+
ids != null ? ids.pointer : 0,
|
|
21593
|
+
parentId,
|
|
21594
|
+
names != null ? names.pointer : 0,
|
|
21595
|
+
types != null ? types.pointer : 0,
|
|
21596
|
+
tags != null ? tags.pointer : 0,
|
|
21597
|
+
spaceIds != null ? spaceIds.pointer : 0,
|
|
21598
|
+
resultsSkipNumberPointer,
|
|
21599
|
+
resultsMaxNumberPointer,
|
|
21600
|
+
_callbackPtr,
|
|
21601
|
+
0,
|
|
21602
|
+
]);
|
|
21603
|
+
if (resultsSkipNumberPointer) {
|
|
21604
|
+
Module._free(resultsSkipNumberPointer);
|
|
21605
|
+
}
|
|
21606
|
+
if (resultsMaxNumberPointer) {
|
|
21607
|
+
Module._free(resultsMaxNumberPointer);
|
|
21608
|
+
}
|
|
21609
|
+
return _promise;
|
|
21610
|
+
}
|
|
21611
|
+
/**
|
|
21612
|
+
* @description Updates the Metadata field of an Asset Collection
|
|
21613
|
+
* @param assetCollection - Asset collection to be updated
|
|
21614
|
+
* @param newMetadata - The new metadata information that will replace the previous
|
|
21615
|
+
* @param tags - Optional array of strings to replace the tags
|
|
21616
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21617
|
+
*/
|
|
21618
|
+
async updateAssetCollectionMetadata(assetCollection, newMetadata, tags) {
|
|
21619
|
+
var _resolve;
|
|
21620
|
+
var _promise = new Promise((_r) => {
|
|
21621
|
+
_resolve = _r;
|
|
21622
|
+
});
|
|
21623
|
+
var _callbackPtr;
|
|
21624
|
+
var _callback = (_stateObject__, result) => {
|
|
21625
|
+
var _resultPtr = getNativePointer(result);
|
|
21626
|
+
var _resultInstance = new Systems.AssetCollectionResult(_resultPtr);
|
|
21627
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21628
|
+
return;
|
|
21629
|
+
}
|
|
21630
|
+
_resolve(_resultInstance);
|
|
21631
|
+
Module.removeFunction(_callbackPtr);
|
|
21632
|
+
};
|
|
21633
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21634
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAssetCollectionMetadata_void_AssetCollectionRC_MapRC_ArrayRC_AssetCollectionResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21635
|
+
this.pointer,
|
|
21636
|
+
assetCollection.pointer,
|
|
21637
|
+
newMetadata.pointer,
|
|
21638
|
+
tags != null ? tags.pointer : 0,
|
|
21639
|
+
_callbackPtr,
|
|
21640
|
+
0,
|
|
21641
|
+
]);
|
|
21642
|
+
return _promise;
|
|
21643
|
+
}
|
|
21644
|
+
/**
|
|
21645
|
+
* @description Creates a new asset.
|
|
21646
|
+
* @param assetCollection - The parent collection for the asset to be associated with
|
|
21647
|
+
* @param name - Name of the asset collection
|
|
21648
|
+
* @param thirdPartyPackagedAssetIdentifier - Optional id to a third party packaged asset identifier
|
|
21649
|
+
* @param thirdPartyPlatform - Optional enum class for third part platform
|
|
21650
|
+
* @param type - Type of the asset
|
|
21651
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21652
|
+
*/
|
|
21653
|
+
async createAsset(assetCollection, name, thirdPartyPackagedAssetIdentifier, thirdPartyPlatform, type) {
|
|
21654
|
+
var _resolve;
|
|
21655
|
+
var _promise = new Promise((_r) => {
|
|
21656
|
+
_resolve = _r;
|
|
21657
|
+
});
|
|
21658
|
+
var _callbackPtr;
|
|
21659
|
+
var _callback = (_stateObject__, result) => {
|
|
21660
|
+
var _resultPtr = getNativePointer(result);
|
|
21661
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21662
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21663
|
+
return;
|
|
21664
|
+
}
|
|
21665
|
+
_resolve(_resultInstance);
|
|
21666
|
+
Module.removeFunction(_callbackPtr);
|
|
21667
|
+
};
|
|
21668
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21669
|
+
var thirdPartyPlatformPointer = 0;
|
|
21670
|
+
if (thirdPartyPlatform != null) {
|
|
21671
|
+
thirdPartyPlatformPointer = Module._malloc(4);
|
|
21672
|
+
Module.setValue(thirdPartyPlatformPointer, thirdPartyPlatform, "i32");
|
|
21673
|
+
}
|
|
21674
|
+
Module.ccall("csp_systems_AssetSystem_CreateAsset_void_AssetCollectionRC_StringRC_StringRC_EThirdPartyPlatformRC_EAssetType_AssetResultCallback", "void", [
|
|
21675
|
+
"number",
|
|
21676
|
+
"number",
|
|
21677
|
+
"string",
|
|
21678
|
+
"string",
|
|
21679
|
+
"number",
|
|
21680
|
+
"number",
|
|
21681
|
+
"number",
|
|
21682
|
+
"number",
|
|
21683
|
+
], [
|
|
21684
|
+
this.pointer,
|
|
21685
|
+
assetCollection.pointer,
|
|
21686
|
+
name,
|
|
21687
|
+
thirdPartyPackagedAssetIdentifier,
|
|
21688
|
+
thirdPartyPlatformPointer,
|
|
21689
|
+
type,
|
|
21690
|
+
_callbackPtr,
|
|
21691
|
+
0,
|
|
21692
|
+
]);
|
|
21693
|
+
if (thirdPartyPlatformPointer) {
|
|
21694
|
+
Module._free(thirdPartyPlatformPointer);
|
|
21695
|
+
}
|
|
21696
|
+
return _promise;
|
|
21697
|
+
}
|
|
21698
|
+
/**
|
|
21699
|
+
* @description Update a given asset.
|
|
21700
|
+
* @param asset - Asset to update
|
|
20911
21701
|
* @param callback - Callback when asynchronous task finishes
|
|
20912
21702
|
*/
|
|
20913
|
-
async
|
|
21703
|
+
async updateAsset(asset) {
|
|
20914
21704
|
var _resolve;
|
|
20915
21705
|
var _promise = new Promise((_r) => {
|
|
20916
21706
|
_resolve = _r;
|
|
@@ -20918,7 +21708,7 @@ export class CSPFoundation {
|
|
|
20918
21708
|
var _callbackPtr;
|
|
20919
21709
|
var _callback = (_stateObject__, result) => {
|
|
20920
21710
|
var _resultPtr = getNativePointer(result);
|
|
20921
|
-
var _resultInstance = new Systems.
|
|
21711
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
20922
21712
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20923
21713
|
return;
|
|
20924
21714
|
}
|
|
@@ -20926,35 +21716,16 @@ export class CSPFoundation {
|
|
|
20926
21716
|
Module.removeFunction(_callbackPtr);
|
|
20927
21717
|
};
|
|
20928
21718
|
_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
|
-
]);
|
|
21719
|
+
Module.ccall("csp_systems_AssetSystem_UpdateAsset_void_AssetRC_AssetResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
20950
21720
|
return _promise;
|
|
20951
21721
|
}
|
|
20952
21722
|
/**
|
|
20953
|
-
* @description Deletes a given asset
|
|
20954
|
-
* @param assetCollection -
|
|
21723
|
+
* @description Deletes a given asset.
|
|
21724
|
+
* @param assetCollection - The parent collection that the asset is associated with
|
|
21725
|
+
* @param asset - Asset to delete
|
|
20955
21726
|
* @param callback - Callback when asynchronous task finishes
|
|
20956
21727
|
*/
|
|
20957
|
-
async
|
|
21728
|
+
async deleteAsset(assetCollection, asset) {
|
|
20958
21729
|
var _resolve;
|
|
20959
21730
|
var _promise = new Promise((_r) => {
|
|
20960
21731
|
_resolve = _r;
|
|
@@ -20970,19 +21741,15 @@ export class CSPFoundation {
|
|
|
20970
21741
|
Module.removeFunction(_callbackPtr);
|
|
20971
21742
|
};
|
|
20972
21743
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
20973
|
-
Module.ccall("
|
|
21744
|
+
Module.ccall("csp_systems_AssetSystem_DeleteAsset_void_AssetCollectionRC_AssetRC_NullResultCallback", "void", ["number", "number", "number", "number", "number"], [this.pointer, assetCollection.pointer, asset.pointer, _callbackPtr, 0]);
|
|
20974
21745
|
return _promise;
|
|
20975
21746
|
}
|
|
20976
21747
|
/**
|
|
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.
|
|
21748
|
+
* @description Retrieves all assets in a given asset collection.
|
|
21749
|
+
* @param assetCollection - Collection to get all assets from
|
|
20983
21750
|
* @param callback - Callback when asynchronous task finishes
|
|
20984
21751
|
*/
|
|
20985
|
-
async
|
|
21752
|
+
async getAssetsInCollection(assetCollection) {
|
|
20986
21753
|
var _resolve;
|
|
20987
21754
|
var _promise = new Promise((_r) => {
|
|
20988
21755
|
_resolve = _r;
|
|
@@ -20990,7 +21757,7 @@ export class CSPFoundation {
|
|
|
20990
21757
|
var _callbackPtr;
|
|
20991
21758
|
var _callback = (_stateObject__, result) => {
|
|
20992
21759
|
var _resultPtr = getNativePointer(result);
|
|
20993
|
-
var _resultInstance = new Systems.
|
|
21760
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
20994
21761
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
20995
21762
|
return;
|
|
20996
21763
|
}
|
|
@@ -20998,22 +21765,16 @@ export class CSPFoundation {
|
|
|
20998
21765
|
Module.removeFunction(_callbackPtr);
|
|
20999
21766
|
};
|
|
21000
21767
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21001
|
-
Module.ccall("
|
|
21002
|
-
this.pointer,
|
|
21003
|
-
sourceAssetCollections.pointer,
|
|
21004
|
-
destSpaceId,
|
|
21005
|
-
copyAsync,
|
|
21006
|
-
_callbackPtr,
|
|
21007
|
-
0,
|
|
21008
|
-
]);
|
|
21768
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsInCollection_void_AssetCollectionRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21009
21769
|
return _promise;
|
|
21010
21770
|
}
|
|
21011
21771
|
/**
|
|
21012
|
-
* @description
|
|
21013
|
-
* @param assetCollectionId -
|
|
21772
|
+
* @description Retrieves the asset specified by the Id
|
|
21773
|
+
* @param assetCollectionId - The id of the asset collection containing the asset
|
|
21774
|
+
* @param assetId - The id of the asset to retrieve
|
|
21014
21775
|
* @param callback - Callback when asynchronous task finishes
|
|
21015
21776
|
*/
|
|
21016
|
-
async
|
|
21777
|
+
async getAssetById(assetCollectionId, assetId) {
|
|
21017
21778
|
var _resolve;
|
|
21018
21779
|
var _promise = new Promise((_r) => {
|
|
21019
21780
|
_resolve = _r;
|
|
@@ -21021,7 +21782,7 @@ export class CSPFoundation {
|
|
|
21021
21782
|
var _callbackPtr;
|
|
21022
21783
|
var _callback = (_stateObject__, result) => {
|
|
21023
21784
|
var _resultPtr = getNativePointer(result);
|
|
21024
|
-
var _resultInstance = new Systems.
|
|
21785
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21025
21786
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21026
21787
|
return;
|
|
21027
21788
|
}
|
|
@@ -21029,15 +21790,15 @@ export class CSPFoundation {
|
|
|
21029
21790
|
Module.removeFunction(_callbackPtr);
|
|
21030
21791
|
};
|
|
21031
21792
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21032
|
-
Module.ccall("
|
|
21793
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetById_void_StringRC_StringRC_AssetResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21033
21794
|
return _promise;
|
|
21034
21795
|
}
|
|
21035
21796
|
/**
|
|
21036
|
-
* @description
|
|
21037
|
-
* @param
|
|
21797
|
+
* @description Retrieves all assets that belong to the asset collections with the give Ids.
|
|
21798
|
+
* @param assetCollectionIds - Collection of asset collection ids get all assets from
|
|
21038
21799
|
* @param callback - Callback when asynchronous task finishes
|
|
21039
21800
|
*/
|
|
21040
|
-
async
|
|
21801
|
+
async getAssetsByCollectionIds(assetCollectionIds) {
|
|
21041
21802
|
var _resolve;
|
|
21042
21803
|
var _promise = new Promise((_r) => {
|
|
21043
21804
|
_resolve = _r;
|
|
@@ -21045,7 +21806,7 @@ export class CSPFoundation {
|
|
|
21045
21806
|
var _callbackPtr;
|
|
21046
21807
|
var _callback = (_stateObject__, result) => {
|
|
21047
21808
|
var _resultPtr = getNativePointer(result);
|
|
21048
|
-
var _resultInstance = new Systems.
|
|
21809
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21049
21810
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21050
21811
|
return;
|
|
21051
21812
|
}
|
|
@@ -21053,25 +21814,19 @@ export class CSPFoundation {
|
|
|
21053
21814
|
Module.removeFunction(_callbackPtr);
|
|
21054
21815
|
};
|
|
21055
21816
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21056
|
-
Module.ccall("
|
|
21817
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCollectionIds_void_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollectionIds.pointer, _callbackPtr, 0]);
|
|
21057
21818
|
return _promise;
|
|
21058
21819
|
}
|
|
21059
21820
|
/**
|
|
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.
|
|
21821
|
+
* @description Retrieves assets based on the specified search criteria.
|
|
21822
|
+
* @param assetCollectionIds - The asset collection ids that will be used as search criteria. note that
|
|
21823
|
+
* you have to pass at least one Id.
|
|
21824
|
+
* @param assetIds - Optional array of strings representing asset ids
|
|
21825
|
+
* @param assetNames - Optional array of strings representing asset names
|
|
21826
|
+
* @param assetTypes - Optional array of asset types
|
|
21072
21827
|
* @param callback - Callback when asynchronous task finishes
|
|
21073
21828
|
*/
|
|
21074
|
-
async
|
|
21829
|
+
async getAssetsByCriteria(assetCollectionIds, assetIds, assetNames, assetTypes) {
|
|
21075
21830
|
var _resolve;
|
|
21076
21831
|
var _promise = new Promise((_r) => {
|
|
21077
21832
|
_resolve = _r;
|
|
@@ -21079,7 +21834,7 @@ export class CSPFoundation {
|
|
|
21079
21834
|
var _callbackPtr;
|
|
21080
21835
|
var _callback = (_stateObject__, result) => {
|
|
21081
21836
|
var _resultPtr = getNativePointer(result);
|
|
21082
|
-
var _resultInstance = new Systems.
|
|
21837
|
+
var _resultInstance = new Systems.AssetsResult(_resultPtr);
|
|
21083
21838
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21084
21839
|
return;
|
|
21085
21840
|
}
|
|
@@ -21087,57 +21842,26 @@ export class CSPFoundation {
|
|
|
21087
21842
|
Module.removeFunction(_callbackPtr);
|
|
21088
21843
|
};
|
|
21089
21844
|
_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
|
-
], [
|
|
21845
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetsByCriteria_void_ArrayRC_ArrayRC_ArrayRC_ArrayRC_AssetsResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21113
21846
|
this.pointer,
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
tags != null ? tags.pointer : 0,
|
|
21119
|
-
spaceIds != null ? spaceIds.pointer : 0,
|
|
21120
|
-
resultsSkipNumberPointer,
|
|
21121
|
-
resultsMaxNumberPointer,
|
|
21847
|
+
assetCollectionIds.pointer,
|
|
21848
|
+
assetIds != null ? assetIds.pointer : 0,
|
|
21849
|
+
assetNames != null ? assetNames.pointer : 0,
|
|
21850
|
+
assetTypes != null ? assetTypes.pointer : 0,
|
|
21122
21851
|
_callbackPtr,
|
|
21123
21852
|
0,
|
|
21124
21853
|
]);
|
|
21125
|
-
if (resultsSkipNumberPointer) {
|
|
21126
|
-
Module._free(resultsSkipNumberPointer);
|
|
21127
|
-
}
|
|
21128
|
-
if (resultsMaxNumberPointer) {
|
|
21129
|
-
Module._free(resultsMaxNumberPointer);
|
|
21130
|
-
}
|
|
21131
21854
|
return _promise;
|
|
21132
21855
|
}
|
|
21133
21856
|
/**
|
|
21134
|
-
* @description
|
|
21135
|
-
* @param assetCollection -
|
|
21136
|
-
* @param
|
|
21137
|
-
* @param
|
|
21857
|
+
* @description Uploads data for the given asset to CHS from the given source.
|
|
21858
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21859
|
+
* @param asset - Asset to upload data for
|
|
21860
|
+
* @param assetDataSource - Asset data to upload
|
|
21861
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21138
21862
|
* @param callback - Callback when asynchronous task finishes
|
|
21139
21863
|
*/
|
|
21140
|
-
async
|
|
21864
|
+
async uploadAssetData(assetCollection, asset, assetDataSource, progressCallback) {
|
|
21141
21865
|
var _resolve;
|
|
21142
21866
|
var _promise = new Promise((_r) => {
|
|
21143
21867
|
_resolve = _r;
|
|
@@ -21145,34 +21869,37 @@ export class CSPFoundation {
|
|
|
21145
21869
|
var _callbackPtr;
|
|
21146
21870
|
var _callback = (_stateObject__, result) => {
|
|
21147
21871
|
var _resultPtr = getNativePointer(result);
|
|
21148
|
-
var _resultInstance = new Systems.
|
|
21872
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21149
21873
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21874
|
+
if (progressCallback != null) {
|
|
21875
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21876
|
+
}
|
|
21150
21877
|
return;
|
|
21151
21878
|
}
|
|
21152
21879
|
_resolve(_resultInstance);
|
|
21153
21880
|
Module.removeFunction(_callbackPtr);
|
|
21154
21881
|
};
|
|
21155
21882
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21156
|
-
Module.ccall("
|
|
21883
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetData_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
21157
21884
|
this.pointer,
|
|
21158
21885
|
assetCollection.pointer,
|
|
21159
|
-
|
|
21160
|
-
|
|
21886
|
+
asset.pointer,
|
|
21887
|
+
assetDataSource.pointer,
|
|
21161
21888
|
_callbackPtr,
|
|
21162
21889
|
0,
|
|
21163
21890
|
]);
|
|
21164
21891
|
return _promise;
|
|
21165
21892
|
}
|
|
21166
21893
|
/**
|
|
21167
|
-
* @description
|
|
21168
|
-
* @param assetCollection -
|
|
21169
|
-
* @param
|
|
21170
|
-
* @param
|
|
21171
|
-
*
|
|
21172
|
-
* @param
|
|
21894
|
+
* @description Uploads data for the given asset to CHS from the given source, taking a CancellationToken to allow cancelling the request.
|
|
21895
|
+
* @param assetCollection - Collection the asset is associated to
|
|
21896
|
+
* @param asset - Asset to upload data for
|
|
21897
|
+
* @param assetDataSource - Asset data to upload
|
|
21898
|
+
* AssetDataSource is an interface. A derived class must be passed.
|
|
21899
|
+
* @param cancellationToken - Token for cancelling upload
|
|
21173
21900
|
* @param callback - Callback when asynchronous task finishes
|
|
21174
21901
|
*/
|
|
21175
|
-
async
|
|
21902
|
+
async uploadAssetDataEx(assetCollection, asset, assetDataSource, cancellationToken, progressCallback) {
|
|
21176
21903
|
var _resolve;
|
|
21177
21904
|
var _promise = new Promise((_r) => {
|
|
21178
21905
|
_resolve = _r;
|
|
@@ -21180,7 +21907,42 @@ export class CSPFoundation {
|
|
|
21180
21907
|
var _callbackPtr;
|
|
21181
21908
|
var _callback = (_stateObject__, result) => {
|
|
21182
21909
|
var _resultPtr = getNativePointer(result);
|
|
21183
|
-
var _resultInstance = new Systems.
|
|
21910
|
+
var _resultInstance = new Systems.UriResult(_resultPtr);
|
|
21911
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21912
|
+
if (progressCallback != null) {
|
|
21913
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21914
|
+
}
|
|
21915
|
+
return;
|
|
21916
|
+
}
|
|
21917
|
+
_resolve(_resultInstance);
|
|
21918
|
+
Module.removeFunction(_callbackPtr);
|
|
21919
|
+
};
|
|
21920
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21921
|
+
Module.ccall("csp_systems_AssetSystem_UploadAssetDataEx_void_AssetCollectionRC_AssetRC_AssetDataSourceRC_CancellationTokenR_UriResultCallback", "void", ["number", "number", "number", "number", "number", "number", "number"], [
|
|
21922
|
+
this.pointer,
|
|
21923
|
+
assetCollection.pointer,
|
|
21924
|
+
asset.pointer,
|
|
21925
|
+
assetDataSource.pointer,
|
|
21926
|
+
cancellationToken.pointer,
|
|
21927
|
+
_callbackPtr,
|
|
21928
|
+
0,
|
|
21929
|
+
]);
|
|
21930
|
+
return _promise;
|
|
21931
|
+
}
|
|
21932
|
+
/**
|
|
21933
|
+
* @description Downloads data for a given Asset from CHS.
|
|
21934
|
+
* @param asset - Asset to download data for
|
|
21935
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21936
|
+
*/
|
|
21937
|
+
async downloadAssetData(asset) {
|
|
21938
|
+
var _resolve;
|
|
21939
|
+
var _promise = new Promise((_r) => {
|
|
21940
|
+
_resolve = _r;
|
|
21941
|
+
});
|
|
21942
|
+
var _callbackPtr;
|
|
21943
|
+
var _callback = (_stateObject__, result) => {
|
|
21944
|
+
var _resultPtr = getNativePointer(result);
|
|
21945
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21184
21946
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21185
21947
|
return;
|
|
21186
21948
|
}
|
|
@@ -21188,41 +21950,46 @@ export class CSPFoundation {
|
|
|
21188
21950
|
Module.removeFunction(_callbackPtr);
|
|
21189
21951
|
};
|
|
21190
21952
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21205
|
-
|
|
21953
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetData_void_AssetRC_AssetDataResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21954
|
+
return _promise;
|
|
21955
|
+
}
|
|
21956
|
+
/**
|
|
21957
|
+
* @description Downloads data for a given Asset from CHS, taking a CancellationToken to allow cancelling the request.
|
|
21958
|
+
* @param asset - Asset to download data for
|
|
21959
|
+
* @param cancellationToken - Token for cancelling download
|
|
21960
|
+
* @param callback - Callback when asynchronous task finishes
|
|
21961
|
+
*/
|
|
21962
|
+
async downloadAssetDataEx(asset, cancellationToken) {
|
|
21963
|
+
var _resolve;
|
|
21964
|
+
var _promise = new Promise((_r) => {
|
|
21965
|
+
_resolve = _r;
|
|
21966
|
+
});
|
|
21967
|
+
var _callbackPtr;
|
|
21968
|
+
var _callback = (_stateObject__, result) => {
|
|
21969
|
+
var _resultPtr = getNativePointer(result);
|
|
21970
|
+
var _resultInstance = new Systems.AssetDataResult(_resultPtr);
|
|
21971
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21972
|
+
return;
|
|
21973
|
+
}
|
|
21974
|
+
_resolve(_resultInstance);
|
|
21975
|
+
Module.removeFunction(_callbackPtr);
|
|
21976
|
+
};
|
|
21977
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21978
|
+
Module.ccall("csp_systems_AssetSystem_DownloadAssetDataEx_void_AssetRC_CancellationTokenR_AssetDataResultCallback", "void", ["number", "number", "number", "number", "number"], [
|
|
21206
21979
|
this.pointer,
|
|
21207
|
-
|
|
21208
|
-
|
|
21209
|
-
thirdPartyPackagedAssetIdentifier,
|
|
21210
|
-
thirdPartyPlatformPointer,
|
|
21211
|
-
type,
|
|
21980
|
+
asset.pointer,
|
|
21981
|
+
cancellationToken.pointer,
|
|
21212
21982
|
_callbackPtr,
|
|
21213
21983
|
0,
|
|
21214
21984
|
]);
|
|
21215
|
-
if (thirdPartyPlatformPointer) {
|
|
21216
|
-
Module._free(thirdPartyPlatformPointer);
|
|
21217
|
-
}
|
|
21218
21985
|
return _promise;
|
|
21219
21986
|
}
|
|
21220
21987
|
/**
|
|
21221
|
-
* @description
|
|
21222
|
-
* @param asset - Asset to
|
|
21988
|
+
* @description Get the size of the data associated with an Asset.
|
|
21989
|
+
* @param asset - Asset to get data size for
|
|
21223
21990
|
* @param callback - Callback when asynchronous task finishes
|
|
21224
21991
|
*/
|
|
21225
|
-
async
|
|
21992
|
+
async getAssetDataSize(asset) {
|
|
21226
21993
|
var _resolve;
|
|
21227
21994
|
var _promise = new Promise((_r) => {
|
|
21228
21995
|
_resolve = _r;
|
|
@@ -21230,7 +21997,7 @@ export class CSPFoundation {
|
|
|
21230
21997
|
var _callbackPtr;
|
|
21231
21998
|
var _callback = (_stateObject__, result) => {
|
|
21232
21999
|
var _resultPtr = getNativePointer(result);
|
|
21233
|
-
var _resultInstance = new Systems.
|
|
22000
|
+
var _resultInstance = new Systems.UInt64Result(_resultPtr);
|
|
21234
22001
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21235
22002
|
return;
|
|
21236
22003
|
}
|
|
@@ -21238,16 +22005,15 @@ export class CSPFoundation {
|
|
|
21238
22005
|
Module.removeFunction(_callbackPtr);
|
|
21239
22006
|
};
|
|
21240
22007
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21241
|
-
Module.ccall("
|
|
22008
|
+
Module.ccall("csp_systems_AssetSystem_GetAssetDataSize_void_AssetRC_UInt64ResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, asset.pointer, _callbackPtr, 0]);
|
|
21242
22009
|
return _promise;
|
|
21243
22010
|
}
|
|
21244
22011
|
/**
|
|
21245
|
-
* @description
|
|
21246
|
-
* @param assetCollection -
|
|
21247
|
-
* @param asset - Asset to delete
|
|
22012
|
+
* @description Gets a LOD chain within the given AssetCollection.
|
|
22013
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
21248
22014
|
* @param callback - Callback when asynchronous task finishes
|
|
21249
22015
|
*/
|
|
21250
|
-
async
|
|
22016
|
+
async getLODChain(assetCollection) {
|
|
21251
22017
|
var _resolve;
|
|
21252
22018
|
var _promise = new Promise((_r) => {
|
|
21253
22019
|
_resolve = _r;
|
|
@@ -21255,7 +22021,7 @@ export class CSPFoundation {
|
|
|
21255
22021
|
var _callbackPtr;
|
|
21256
22022
|
var _callback = (_stateObject__, result) => {
|
|
21257
22023
|
var _resultPtr = getNativePointer(result);
|
|
21258
|
-
var _resultInstance = new Systems.
|
|
22024
|
+
var _resultInstance = new Systems.LODChainResult(_resultPtr);
|
|
21259
22025
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21260
22026
|
return;
|
|
21261
22027
|
}
|
|
@@ -21263,15 +22029,17 @@ export class CSPFoundation {
|
|
|
21263
22029
|
Module.removeFunction(_callbackPtr);
|
|
21264
22030
|
};
|
|
21265
22031
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21266
|
-
Module.ccall("
|
|
22032
|
+
Module.ccall("csp_systems_AssetSystem_GetLODChain_void_AssetCollectionRC_LODChainResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, assetCollection.pointer, _callbackPtr, 0]);
|
|
21267
22033
|
return _promise;
|
|
21268
22034
|
}
|
|
21269
22035
|
/**
|
|
21270
|
-
* @description
|
|
21271
|
-
* @param assetCollection -
|
|
22036
|
+
* @description Registers an asset to the LOD chain
|
|
22037
|
+
* @param assetCollection - AssetCollection which contains the LOD chain.
|
|
22038
|
+
* @param asset - Asset to register as LOD
|
|
22039
|
+
* @param asset - LOD level for Asset to be registered to
|
|
21272
22040
|
* @param callback - Callback when asynchronous task finishes
|
|
21273
22041
|
*/
|
|
21274
|
-
async
|
|
22042
|
+
async registerAssetToLODChain(assetCollection, asset, lODLevel, progressCallback) {
|
|
21275
22043
|
var _resolve;
|
|
21276
22044
|
var _promise = new Promise((_r) => {
|
|
21277
22045
|
_resolve = _r;
|
|
@@ -21279,24 +22047,34 @@ export class CSPFoundation {
|
|
|
21279
22047
|
var _callbackPtr;
|
|
21280
22048
|
var _callback = (_stateObject__, result) => {
|
|
21281
22049
|
var _resultPtr = getNativePointer(result);
|
|
21282
|
-
var _resultInstance = new Systems.
|
|
22050
|
+
var _resultInstance = new Systems.AssetResult(_resultPtr);
|
|
21283
22051
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
22052
|
+
if (progressCallback != null) {
|
|
22053
|
+
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
22054
|
+
}
|
|
21284
22055
|
return;
|
|
21285
22056
|
}
|
|
21286
22057
|
_resolve(_resultInstance);
|
|
21287
22058
|
Module.removeFunction(_callbackPtr);
|
|
21288
22059
|
};
|
|
21289
22060
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21290
|
-
Module.ccall("
|
|
22061
|
+
Module.ccall("csp_systems_AssetSystem_RegisterAssetToLODChain_void_AssetCollectionRC_AssetRC_int_AssetResultCallback", "void", ["number", "number", "number", "number", "number", "number"], [
|
|
22062
|
+
this.pointer,
|
|
22063
|
+
assetCollection.pointer,
|
|
22064
|
+
asset.pointer,
|
|
22065
|
+
lODLevel,
|
|
22066
|
+
_callbackPtr,
|
|
22067
|
+
0,
|
|
22068
|
+
]);
|
|
21291
22069
|
return _promise;
|
|
21292
22070
|
}
|
|
21293
22071
|
/**
|
|
21294
|
-
* @description
|
|
21295
|
-
* @param
|
|
21296
|
-
* @param
|
|
21297
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22072
|
+
* @description Creates a new material backed by an AssetCollection/Asset.
|
|
22073
|
+
* @param name - The name of the new material.
|
|
22074
|
+
* @param spaceId - The space id this material is associated with.
|
|
22075
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21298
22076
|
*/
|
|
21299
|
-
async
|
|
22077
|
+
async createMaterial(name, spaceId) {
|
|
21300
22078
|
var _resolve;
|
|
21301
22079
|
var _promise = new Promise((_r) => {
|
|
21302
22080
|
_resolve = _r;
|
|
@@ -21304,7 +22082,7 @@ export class CSPFoundation {
|
|
|
21304
22082
|
var _callbackPtr;
|
|
21305
22083
|
var _callback = (_stateObject__, result) => {
|
|
21306
22084
|
var _resultPtr = getNativePointer(result);
|
|
21307
|
-
var _resultInstance = new Systems.
|
|
22085
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21308
22086
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21309
22087
|
return;
|
|
21310
22088
|
}
|
|
@@ -21312,15 +22090,18 @@ export class CSPFoundation {
|
|
|
21312
22090
|
Module.removeFunction(_callbackPtr);
|
|
21313
22091
|
};
|
|
21314
22092
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21315
|
-
Module.ccall("
|
|
22093
|
+
Module.ccall("csp_systems_AssetSystem_CreateMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, name, spaceId, _callbackPtr, 0]);
|
|
21316
22094
|
return _promise;
|
|
21317
22095
|
}
|
|
21318
22096
|
/**
|
|
21319
|
-
* @description
|
|
21320
|
-
*
|
|
21321
|
-
*
|
|
22097
|
+
* @description Updates an existing material's properties.
|
|
22098
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22099
|
+
* If the material doesn't exist, EResultCode::Failed will be returned.
|
|
22100
|
+
* If the material hasn't changed, EResultCode::Success will still be returned.
|
|
22101
|
+
* @param material - The material to update
|
|
22102
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21322
22103
|
*/
|
|
21323
|
-
async
|
|
22104
|
+
async updateMaterial(material) {
|
|
21324
22105
|
var _resolve;
|
|
21325
22106
|
var _promise = new Promise((_r) => {
|
|
21326
22107
|
_resolve = _r;
|
|
@@ -21328,7 +22109,7 @@ export class CSPFoundation {
|
|
|
21328
22109
|
var _callbackPtr;
|
|
21329
22110
|
var _callback = (_stateObject__, result) => {
|
|
21330
22111
|
var _resultPtr = getNativePointer(result);
|
|
21331
|
-
var _resultInstance = new Systems.
|
|
22112
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21332
22113
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21333
22114
|
return;
|
|
21334
22115
|
}
|
|
@@ -21336,19 +22117,16 @@ export class CSPFoundation {
|
|
|
21336
22117
|
Module.removeFunction(_callbackPtr);
|
|
21337
22118
|
};
|
|
21338
22119
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
21339
|
-
Module.ccall("
|
|
22120
|
+
Module.ccall("csp_systems_AssetSystem_UpdateMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21340
22121
|
return _promise;
|
|
21341
22122
|
}
|
|
21342
22123
|
/**
|
|
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
|
|
22124
|
+
* @description Deletes a given material.
|
|
22125
|
+
* The material should be retrieved through GetMaterials or GetMaterial.
|
|
22126
|
+
* @param material - The material to delete
|
|
22127
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21350
22128
|
*/
|
|
21351
|
-
async
|
|
22129
|
+
async deleteMaterial(material) {
|
|
21352
22130
|
var _resolve;
|
|
21353
22131
|
var _promise = new Promise((_r) => {
|
|
21354
22132
|
_resolve = _r;
|
|
@@ -21356,7 +22134,7 @@ export class CSPFoundation {
|
|
|
21356
22134
|
var _callbackPtr;
|
|
21357
22135
|
var _callback = (_stateObject__, result) => {
|
|
21358
22136
|
var _resultPtr = getNativePointer(result);
|
|
21359
|
-
var _resultInstance = new Systems.
|
|
22137
|
+
var _resultInstance = new Systems.NullResult(_resultPtr);
|
|
21360
22138
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21361
22139
|
return;
|
|
21362
22140
|
}
|
|
@@ -21364,26 +22142,15 @@ export class CSPFoundation {
|
|
|
21364
22142
|
Module.removeFunction(_callbackPtr);
|
|
21365
22143
|
};
|
|
21366
22144
|
_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
|
-
]);
|
|
22145
|
+
Module.ccall("csp_systems_AssetSystem_DeleteMaterial_void_GLTFMaterialRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, material.pointer, _callbackPtr, 0]);
|
|
21376
22146
|
return _promise;
|
|
21377
22147
|
}
|
|
21378
22148
|
/**
|
|
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
|
|
22149
|
+
* @description Gets all materials associated with the given space.
|
|
22150
|
+
* @param spaceId - The space id the material is associated with.
|
|
22151
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21385
22152
|
*/
|
|
21386
|
-
async
|
|
22153
|
+
async getMaterials(spaceId) {
|
|
21387
22154
|
var _resolve;
|
|
21388
22155
|
var _promise = new Promise((_r) => {
|
|
21389
22156
|
_resolve = _r;
|
|
@@ -21391,37 +22158,24 @@ export class CSPFoundation {
|
|
|
21391
22158
|
var _callbackPtr;
|
|
21392
22159
|
var _callback = (_stateObject__, result) => {
|
|
21393
22160
|
var _resultPtr = getNativePointer(result);
|
|
21394
|
-
var _resultInstance = new Systems.
|
|
22161
|
+
var _resultInstance = new Systems.GLTFMaterialsResult(_resultPtr);
|
|
21395
22162
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21396
|
-
if (progressCallback != null) {
|
|
21397
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21398
|
-
}
|
|
21399
22163
|
return;
|
|
21400
22164
|
}
|
|
21401
22165
|
_resolve(_resultInstance);
|
|
21402
22166
|
Module.removeFunction(_callbackPtr);
|
|
21403
22167
|
};
|
|
21404
22168
|
_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
|
-
]);
|
|
22169
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterials_void_StringRC_GLTFMaterialsResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, spaceId, _callbackPtr, 0]);
|
|
21413
22170
|
return _promise;
|
|
21414
22171
|
}
|
|
21415
22172
|
/**
|
|
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
|
|
22173
|
+
* @description Gets a material using its AssetCollection and Asset Id.
|
|
22174
|
+
* @param assetCollectionId - The asset collection id this material is associated with.
|
|
22175
|
+
* @param assetId - The asset id this material is associated with.
|
|
22176
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
21423
22177
|
*/
|
|
21424
|
-
async
|
|
22178
|
+
async getMaterial(assetCollectionId, assetId) {
|
|
21425
22179
|
var _resolve;
|
|
21426
22180
|
var _promise = new Promise((_r) => {
|
|
21427
22181
|
_resolve = _r;
|
|
@@ -21429,169 +22183,400 @@ export class CSPFoundation {
|
|
|
21429
22183
|
var _callbackPtr;
|
|
21430
22184
|
var _callback = (_stateObject__, result) => {
|
|
21431
22185
|
var _resultPtr = getNativePointer(result);
|
|
21432
|
-
var _resultInstance = new Systems.
|
|
22186
|
+
var _resultInstance = new Systems.GLTFMaterialResult(_resultPtr);
|
|
21433
22187
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
21434
|
-
if (progressCallback != null) {
|
|
21435
|
-
progressCallback(_resultInstance.getRequestProgress(), _resultInstance.getResponseProgress());
|
|
21436
|
-
}
|
|
21437
22188
|
return;
|
|
21438
22189
|
}
|
|
21439
22190
|
_resolve(_resultInstance);
|
|
21440
22191
|
Module.removeFunction(_callbackPtr);
|
|
21441
22192
|
};
|
|
21442
22193
|
_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
|
-
]);
|
|
22194
|
+
Module.ccall("csp_systems_AssetSystem_GetMaterial_void_StringRC_StringRC_GLTFMaterialResultCallback", "void", ["number", "string", "string", "number", "number"], [this.pointer, assetCollectionId, assetId, _callbackPtr, 0]);
|
|
21452
22195
|
return _promise;
|
|
21453
22196
|
}
|
|
21454
22197
|
/**
|
|
21455
|
-
* @description
|
|
21456
|
-
* @param
|
|
21457
|
-
|
|
22198
|
+
* @description Sets a callback for an asset changed event.
|
|
22199
|
+
* @param callback - Callback to receive data for the asset that has been changed.
|
|
22200
|
+
*/
|
|
22201
|
+
setAssetDetailBlobChangedCallback(callback) {
|
|
22202
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22203
|
+
var _arg1 = new Multiplayer.AssetDetailBlobParams(getNativePointer(arg1));
|
|
22204
|
+
callback(_arg1);
|
|
22205
|
+
};
|
|
22206
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22207
|
+
Module.ccall("csp_systems_AssetSystem_SetAssetDetailBlobChangedCallback_void_AssetDetailBlobChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22208
|
+
}
|
|
22209
|
+
/**
|
|
22210
|
+
* @description Sets a callback for a material changed event.
|
|
22211
|
+
* @param callback - Callback to receive data for the material that has been changed.
|
|
22212
|
+
*/
|
|
22213
|
+
setMaterialChangedCallback(callback) {
|
|
22214
|
+
var _callback = (_stateObject__, arg1) => {
|
|
22215
|
+
var _arg1 = new Multiplayer.MaterialChangedParams(getNativePointer(arg1));
|
|
22216
|
+
callback(_arg1);
|
|
22217
|
+
};
|
|
22218
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
22219
|
+
Module.ccall("csp_systems_AssetSystem_SetMaterialChangedCallback_void_MaterialChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
22220
|
+
}
|
|
22221
|
+
/**
|
|
22222
|
+
* @description Registers the system to listen for the named event.
|
|
22223
|
+
*/
|
|
22224
|
+
registerSystemCallback() {
|
|
22225
|
+
Module.ccall("csp_systems_AssetSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22226
|
+
}
|
|
22227
|
+
/**
|
|
22228
|
+
* @description Deregisters the system from listening for the named event.
|
|
22229
|
+
*/
|
|
22230
|
+
deregisterSystemCallback() {
|
|
22231
|
+
Module.ccall("csp_systems_AssetSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
22232
|
+
}
|
|
22233
|
+
}
|
|
22234
|
+
Systems.AssetSystem = AssetSystem;
|
|
22235
|
+
})(Systems || (Systems = {}));
|
|
22236
|
+
(function (Systems) {
|
|
22237
|
+
/**
|
|
22238
|
+
@ingroup Asset System
|
|
22239
|
+
* @description Data class which represents a GLTF material.
|
|
22240
|
+
*/
|
|
22241
|
+
class GLTFMaterial extends Systems.Material {
|
|
22242
|
+
/** @internal */
|
|
22243
|
+
constructor(pointer) {
|
|
22244
|
+
super(pointer);
|
|
22245
|
+
}
|
|
22246
|
+
static fromMaterial(baseInstance) {
|
|
22247
|
+
const nativeClassWrapper = baseInstance;
|
|
22248
|
+
return new Systems.GLTFMaterial(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22249
|
+
}
|
|
22250
|
+
/**
|
|
22251
|
+
* Sets how to alpha value is interpreted
|
|
22252
|
+
* @param mode - EAlphaMode
|
|
22253
|
+
*/
|
|
22254
|
+
setAlphaMode(mode) {
|
|
22255
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaMode_void_EAlphaMode", "void", ["number", "number"], [this.pointer, mode]);
|
|
22256
|
+
}
|
|
22257
|
+
/**
|
|
22258
|
+
* Gets how to alpha value is interpreted
|
|
22259
|
+
* @return EAlphaMode
|
|
22260
|
+
*/
|
|
22261
|
+
getAlphaMode() {
|
|
22262
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaModeC_EAlphaMode", "number", ["number"], [this.pointer]);
|
|
22263
|
+
return _result;
|
|
22264
|
+
}
|
|
22265
|
+
/**
|
|
22266
|
+
* @description Sets the alpha cutoff value
|
|
22267
|
+
* When alphaMode is set to MASK the alphaCutoff property specifies the cutoff threshold.
|
|
22268
|
+
* If the alpha value is greater than or equal to the alphaCutoff value then it is rendered as fully opaque,
|
|
22269
|
+
* otherwise, it is rendered as fully transparent. alphaCutoff value is ignored for other modes.
|
|
22270
|
+
* @param cutoff - Float
|
|
22271
|
+
*/
|
|
22272
|
+
setAlphaCutoff(cutoff) {
|
|
22273
|
+
assert(cutoff >= Limits.FLOAT_MIN);
|
|
22274
|
+
assert(cutoff <= Limits.FLOAT_MAX);
|
|
22275
|
+
Module.ccall("csp_systems_GLTFMaterial_SetAlphaCutoff_void_float", "void", ["number", "number"], [this.pointer, cutoff]);
|
|
22276
|
+
}
|
|
22277
|
+
/**
|
|
22278
|
+
* Gets the alpha cutoff value
|
|
22279
|
+
* @return Float
|
|
22280
|
+
*/
|
|
22281
|
+
getAlphaCutoff() {
|
|
22282
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetAlphaCutoffC_float", "number", ["number"], [this.pointer]);
|
|
22283
|
+
return _result;
|
|
22284
|
+
}
|
|
22285
|
+
/**
|
|
22286
|
+
* @description Sets the doubleSided property which specifies whether the material is double sided.
|
|
22287
|
+
* When this value is false, back - face culling is enabled, i.e., only front-facing triangles are rendered.
|
|
22288
|
+
* When this value is true, back - face culling is disabled and double sided lighting is enabled.
|
|
22289
|
+
* @param doubleSided - Bool
|
|
22290
|
+
*/
|
|
22291
|
+
setDoubleSided(doubleSided) {
|
|
22292
|
+
Module.ccall("csp_systems_GLTFMaterial_SetDoubleSided_void_bool", "void", ["number", "boolean"], [this.pointer, doubleSided]);
|
|
22293
|
+
}
|
|
22294
|
+
/**
|
|
22295
|
+
* @description Gets the double sided value
|
|
22296
|
+
* @return Bool
|
|
22297
|
+
*/
|
|
22298
|
+
getDoubleSided() {
|
|
22299
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetDoubleSidedC_bool", "boolean", ["number"], [this.pointer]);
|
|
22300
|
+
return _result;
|
|
22301
|
+
}
|
|
22302
|
+
/**
|
|
22303
|
+
* @description Sets the factors for the base color of the material.
|
|
22304
|
+
* This value defines linear multipliers for the sampled texels of the base color texture.
|
|
22305
|
+
* @param factor - Const csp::common::vector4&
|
|
22306
|
+
*/
|
|
22307
|
+
setBaseColorFactor(factor) {
|
|
22308
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorFactor_void_Vector4RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22309
|
+
}
|
|
22310
|
+
/**
|
|
22311
|
+
* @description Gets the factor of the base color texture
|
|
22312
|
+
* @return Csp::common::vector4&
|
|
22313
|
+
*/
|
|
22314
|
+
getBaseColorFactor() {
|
|
22315
|
+
var _ret = Module._malloc(8);
|
|
22316
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorFactorC_Vector4RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22317
|
+
var _nPtr = new Common.Vector4(getNativePointer(_ret));
|
|
22318
|
+
Module._free(_ret);
|
|
22319
|
+
return _nPtr;
|
|
22320
|
+
}
|
|
22321
|
+
/**
|
|
22322
|
+
* @description Sets the factor for the metalness of the material.
|
|
22323
|
+
* This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.
|
|
22324
|
+
* @param factor - Float
|
|
22325
|
+
*/
|
|
22326
|
+
setMetallicFactor(factor) {
|
|
22327
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22328
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22329
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22330
|
+
}
|
|
22331
|
+
/**
|
|
22332
|
+
* @description Gets the factor of the metallic texture
|
|
22333
|
+
* @return Float
|
|
22334
|
+
*/
|
|
22335
|
+
getMetallicFactor() {
|
|
22336
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetMetallicFactorC_float", "number", ["number"], [this.pointer]);
|
|
22337
|
+
return _result;
|
|
22338
|
+
}
|
|
22339
|
+
/**
|
|
22340
|
+
* @description Sets the factor for the roughness of the material.
|
|
22341
|
+
* This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.
|
|
22342
|
+
* @param factor - Float
|
|
22343
|
+
*/
|
|
22344
|
+
setRoughnessFactor(factor) {
|
|
22345
|
+
assert(factor >= Limits.FLOAT_MIN);
|
|
22346
|
+
assert(factor <= Limits.FLOAT_MAX);
|
|
22347
|
+
Module.ccall("csp_systems_GLTFMaterial_SetRoughnessFactor_void_float", "void", ["number", "number"], [this.pointer, factor]);
|
|
22348
|
+
}
|
|
22349
|
+
/**
|
|
22350
|
+
* @description Gets the factor of the roughness texture
|
|
22351
|
+
* @return Float
|
|
22352
|
+
*/
|
|
22353
|
+
getRoughnessFactor() {
|
|
22354
|
+
let _result = Module.ccall("csp_systems_GLTFMaterial_GetRoughnessFactorC_float", "number", ["number"], [this.pointer]);
|
|
22355
|
+
return _result;
|
|
22356
|
+
}
|
|
22357
|
+
/**
|
|
22358
|
+
* @description Sets factors for the emissive color of the material.
|
|
22359
|
+
* This value defines linear multipliers for the sampled texels of the emissive texture.
|
|
22360
|
+
* @param factor - Const csp::common::vector3&
|
|
22361
|
+
*/
|
|
22362
|
+
setEmissiveFactor(factor) {
|
|
22363
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveFactor_void_Vector3RC", "void", ["number", "number"], [this.pointer, factor.pointer]);
|
|
22364
|
+
}
|
|
22365
|
+
/**
|
|
22366
|
+
* @description Gets the factor of the emissive color texture
|
|
22367
|
+
* @return Csp::common::vector3&
|
|
22368
|
+
*/
|
|
22369
|
+
getEmissiveFactor() {
|
|
22370
|
+
var _ret = Module._malloc(8);
|
|
22371
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveFactorC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22372
|
+
var _nPtr = new Common.Vector3(getNativePointer(_ret));
|
|
22373
|
+
Module._free(_ret);
|
|
22374
|
+
return _nPtr;
|
|
22375
|
+
}
|
|
22376
|
+
/**
|
|
22377
|
+
* @description Sets the base color texture. The first three components (RGB) MUST be encoded with the sRGB transfer function.
|
|
22378
|
+
* They specify the base color of the material.
|
|
22379
|
+
* If the fourth component (A) is present, it represents the linear alpha coverage of the material.
|
|
22380
|
+
* Otherwise, the alpha coverage is equal to 1.0. The material.alphaMode property specifies how alpha is interpreted.
|
|
22381
|
+
* The stored texels MUST NOT be premultiplied.
|
|
22382
|
+
* When undefined, the texture MUST be sampled as having 1.0 in all components.
|
|
22383
|
+
* @param texture - Const textureinfo&
|
|
22384
|
+
*/
|
|
22385
|
+
setBaseColorTexture(texture) {
|
|
22386
|
+
Module.ccall("csp_systems_GLTFMaterial_SetBaseColorTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22387
|
+
}
|
|
22388
|
+
/**
|
|
22389
|
+
* @description Gets the base color texture
|
|
22390
|
+
* @return Const textureinfo&
|
|
22391
|
+
*/
|
|
22392
|
+
getBaseColorTexture() {
|
|
22393
|
+
var _ret = Module._malloc(8);
|
|
22394
|
+
Module.ccall("csp_systems_GLTFMaterial_GetBaseColorTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22395
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22396
|
+
Module._free(_ret);
|
|
22397
|
+
return _nPtr;
|
|
22398
|
+
}
|
|
22399
|
+
/**
|
|
22400
|
+
* @description Sets the metallic-roughness texture.
|
|
22401
|
+
* The metalness values are sampled from the B channel.
|
|
22402
|
+
* The roughness values are sampled from the G channel.
|
|
22403
|
+
* These values MUST be encoded with a linear transfer function.
|
|
22404
|
+
* If other channels are present (R or A), they MUST be ignored for metallic-roughness calculations.
|
|
22405
|
+
* When undefined, the texture MUST be sampled as having 1.0 in G and B components.
|
|
22406
|
+
* @param texture - Const textureinfo&
|
|
22407
|
+
*/
|
|
22408
|
+
setMetallicRoughnessTexture(texture) {
|
|
22409
|
+
Module.ccall("csp_systems_GLTFMaterial_SetMetallicRoughnessTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22410
|
+
}
|
|
22411
|
+
/**
|
|
22412
|
+
* @description Gets the metallic-roughness texture
|
|
22413
|
+
* @return Const textureinfo&
|
|
22414
|
+
*/
|
|
22415
|
+
getMetallicRoughnessTexture() {
|
|
22416
|
+
var _ret = Module._malloc(8);
|
|
22417
|
+
Module.ccall("csp_systems_GLTFMaterial_GetMetallicRoughnessTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22418
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22419
|
+
Module._free(_ret);
|
|
22420
|
+
return _nPtr;
|
|
22421
|
+
}
|
|
22422
|
+
/**
|
|
22423
|
+
* @description Sets the tangent space normal texture.
|
|
22424
|
+
* The texture encodes RGB components with linear transfer function.
|
|
22425
|
+
* Each texel represents the XYZ components of a normal vector in tangent space.
|
|
22426
|
+
* The normal vectors use the convention +X is right and +Y is up. +Z points toward the viewer.
|
|
22427
|
+
* If a fourth component (A) is present, it MUST be ignored. When undefined, the material does not have a tangent space normal texture.
|
|
22428
|
+
* @param texture - Const textureinfo&
|
|
22429
|
+
*/
|
|
22430
|
+
setNormalTexture(texture) {
|
|
22431
|
+
Module.ccall("csp_systems_GLTFMaterial_SetNormalTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
22432
|
+
}
|
|
22433
|
+
/**
|
|
22434
|
+
* @description Gets the tangent space normal texture.
|
|
22435
|
+
* @return Const textureinfo&
|
|
21458
22436
|
*/
|
|
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;
|
|
22437
|
+
getNormalTexture() {
|
|
22438
|
+
var _ret = Module._malloc(8);
|
|
22439
|
+
Module.ccall("csp_systems_GLTFMaterial_GetNormalTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22440
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22441
|
+
Module._free(_ret);
|
|
22442
|
+
return _nPtr;
|
|
21477
22443
|
}
|
|
21478
22444
|
/**
|
|
21479
|
-
* @description
|
|
21480
|
-
*
|
|
21481
|
-
*
|
|
21482
|
-
*
|
|
22445
|
+
* @description Sets the occlusion texture.
|
|
22446
|
+
* The occlusion values are linearly sampled from the R channel.
|
|
22447
|
+
* Higher values indicate areas that receive full indirect lighting and lower values indicate no indirect lighting.
|
|
22448
|
+
* If other channels are present (GBA), they MUST be ignored for occlusion calculations.
|
|
22449
|
+
* When undefined, the material does not have an occlusion texture.
|
|
22450
|
+
* @param texture - Const textureinfo&
|
|
21483
22451
|
*/
|
|
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;
|
|
22452
|
+
setOcclusionTexture(texture) {
|
|
22453
|
+
Module.ccall("csp_systems_GLTFMaterial_SetOcclusionTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21508
22454
|
}
|
|
21509
22455
|
/**
|
|
21510
|
-
* @description
|
|
21511
|
-
* @
|
|
21512
|
-
* @param callback - Callback when asynchronous task finishes
|
|
22456
|
+
* @description Gets the occlusion texture
|
|
22457
|
+
* @return Const textureinfo&
|
|
21513
22458
|
*/
|
|
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;
|
|
22459
|
+
getOcclusionTexture() {
|
|
22460
|
+
var _ret = Module._malloc(8);
|
|
22461
|
+
Module.ccall("csp_systems_GLTFMaterial_GetOcclusionTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22462
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22463
|
+
Module._free(_ret);
|
|
22464
|
+
return _nPtr;
|
|
21532
22465
|
}
|
|
21533
22466
|
/**
|
|
21534
|
-
* @description
|
|
21535
|
-
*
|
|
21536
|
-
*
|
|
22467
|
+
* @description Sets the emissive texture.
|
|
22468
|
+
* It controls the color and intensity of the light being emitted by the material.
|
|
22469
|
+
* This texture contains RGB components encoded with the sRGB transfer function.
|
|
22470
|
+
* If a fourth component (A) is present, it MUST be ignored.
|
|
22471
|
+
* When undefined, the texture MUST be sampled as having 1.0 in RGB components.
|
|
22472
|
+
* @param texture - Const textureinfo&
|
|
21537
22473
|
*/
|
|
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;
|
|
22474
|
+
setEmissiveTexture(texture) {
|
|
22475
|
+
Module.ccall("csp_systems_GLTFMaterial_SetEmissiveTexture_void_TextureInfoRC", "void", ["number", "number"], [this.pointer, texture.pointer]);
|
|
21556
22476
|
}
|
|
21557
22477
|
/**
|
|
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
|
|
22478
|
+
* @description Gets the emissive texture
|
|
22479
|
+
* @return Const textureinfo&
|
|
21563
22480
|
*/
|
|
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
|
-
|
|
22481
|
+
getEmissiveTexture() {
|
|
22482
|
+
var _ret = Module._malloc(8);
|
|
22483
|
+
Module.ccall("csp_systems_GLTFMaterial_GetEmissiveTextureC_TextureInfoRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22484
|
+
var _nPtr = new Systems.TextureInfo(getNativePointer(_ret));
|
|
22485
|
+
Module._free(_ret);
|
|
22486
|
+
return _nPtr;
|
|
22487
|
+
}
|
|
22488
|
+
/**
|
|
22489
|
+
* @description Constructor which links the material to an asset
|
|
22490
|
+
* @param name - The name of the material.
|
|
22491
|
+
* @param assetCollectionId - The asset collection where the material info is stored
|
|
22492
|
+
* @param assetId - The asset where the material info is stored
|
|
22493
|
+
*/
|
|
22494
|
+
static create_name_assetCollectionId_assetId(name, assetCollectionId, assetId) {
|
|
22495
|
+
var _ptr = Module._malloc(8);
|
|
22496
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor_StringRC_StringRC_StringRC", "void", ["number", "string", "string", "string"], [_ptr, name, assetCollectionId, assetId]);
|
|
22497
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22498
|
+
return new GLTFMaterial(_nPtr);
|
|
22499
|
+
}
|
|
22500
|
+
static create() {
|
|
22501
|
+
var _ptr = Module._malloc(8);
|
|
22502
|
+
Module.ccall("csp_systems_GLTFMaterial_Ctor", "void", ["number"], [_ptr]);
|
|
22503
|
+
var _nPtr = getNativePointer(_ptr);
|
|
22504
|
+
return new GLTFMaterial(_nPtr);
|
|
22505
|
+
}
|
|
22506
|
+
delete() {
|
|
22507
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22508
|
+
Module.ccall("csp_systems_GLTFMaterial_Dtor", "void", ["number"], [this.pointer]);
|
|
22509
|
+
this.disposed = true;
|
|
22510
|
+
}
|
|
21592
22511
|
}
|
|
21593
22512
|
}
|
|
21594
|
-
Systems.
|
|
22513
|
+
Systems.GLTFMaterial = GLTFMaterial;
|
|
22514
|
+
})(Systems || (Systems = {}));
|
|
22515
|
+
(function (Systems) {
|
|
22516
|
+
/**
|
|
22517
|
+
@ingroup Asset System
|
|
22518
|
+
* @description Data class used to contain information when attempting to download material data.
|
|
22519
|
+
*/
|
|
22520
|
+
class GLTFMaterialResult extends Systems.ResultBase {
|
|
22521
|
+
/** @internal */
|
|
22522
|
+
constructor(pointer) {
|
|
22523
|
+
super(pointer);
|
|
22524
|
+
}
|
|
22525
|
+
static fromResultBase(baseInstance) {
|
|
22526
|
+
const nativeClassWrapper = baseInstance;
|
|
22527
|
+
return new Systems.GLTFMaterialResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22528
|
+
}
|
|
22529
|
+
/**
|
|
22530
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22531
|
+
*/
|
|
22532
|
+
getGLTFMaterial() {
|
|
22533
|
+
var _ret = Module._malloc(8);
|
|
22534
|
+
Module.ccall("csp_systems_GLTFMaterialResult_GetGLTFMaterialC_GLTFMaterialRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22535
|
+
var _nPtr = new Systems.GLTFMaterial(getNativePointer(_ret));
|
|
22536
|
+
Module._free(_ret);
|
|
22537
|
+
return _nPtr;
|
|
22538
|
+
}
|
|
22539
|
+
delete() {
|
|
22540
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22541
|
+
Module.ccall("csp_systems_GLTFMaterialResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22542
|
+
this.disposed = true;
|
|
22543
|
+
}
|
|
22544
|
+
}
|
|
22545
|
+
}
|
|
22546
|
+
Systems.GLTFMaterialResult = GLTFMaterialResult;
|
|
22547
|
+
})(Systems || (Systems = {}));
|
|
22548
|
+
(function (Systems) {
|
|
22549
|
+
/**
|
|
22550
|
+
@ingroup Asset System
|
|
22551
|
+
* @description Data class used to contain information when attempting to download a collection of material data.
|
|
22552
|
+
*/
|
|
22553
|
+
class GLTFMaterialsResult extends Systems.ResultBase {
|
|
22554
|
+
/** @internal */
|
|
22555
|
+
constructor(pointer) {
|
|
22556
|
+
super(pointer);
|
|
22557
|
+
}
|
|
22558
|
+
static fromResultBase(baseInstance) {
|
|
22559
|
+
const nativeClassWrapper = baseInstance;
|
|
22560
|
+
return new Systems.GLTFMaterialsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22561
|
+
}
|
|
22562
|
+
/**
|
|
22563
|
+
* @description Retreives the GLTFMaterial from the result.
|
|
22564
|
+
*/
|
|
22565
|
+
getGLTFMaterials() {
|
|
22566
|
+
var _ret = Module._malloc(8);
|
|
22567
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_GetGLTFMaterialsC_ArrayRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22568
|
+
var _nPtr = new Common.Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
22569
|
+
Module._free(_ret);
|
|
22570
|
+
return _nPtr;
|
|
22571
|
+
}
|
|
22572
|
+
delete() {
|
|
22573
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22574
|
+
Module.ccall("csp_systems_GLTFMaterialsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22575
|
+
this.disposed = true;
|
|
22576
|
+
}
|
|
22577
|
+
}
|
|
22578
|
+
}
|
|
22579
|
+
Systems.GLTFMaterialsResult = GLTFMaterialsResult;
|
|
21595
22580
|
})(Systems || (Systems = {}));
|
|
21596
22581
|
(function (Systems) {
|
|
21597
22582
|
/**
|
|
@@ -22755,9 +23740,9 @@ export class CSPFoundation {
|
|
|
22755
23740
|
const nativeClassWrapper = baseInstance;
|
|
22756
23741
|
return new Systems.HotspotSequenceSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
22757
23742
|
}
|
|
22758
|
-
static
|
|
23743
|
+
static create_sequenceSystem_spaceSystem_eventBus(sequenceSystem, spaceSystem, eventBus) {
|
|
22759
23744
|
var _ptr = Module._malloc(8);
|
|
22760
|
-
Module.ccall("
|
|
23745
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_Ctor_SequenceSystemP_SpaceSystemP_EventBusP", "void", ["number", "number", "number", "number"], [_ptr, sequenceSystem.pointer, spaceSystem.pointer, eventBus.pointer]);
|
|
22761
23746
|
var _nPtr = getNativePointer(_ptr);
|
|
22762
23747
|
return new HotspotSequenceSystem(_nPtr);
|
|
22763
23748
|
}
|
|
@@ -22938,6 +23923,30 @@ export class CSPFoundation {
|
|
|
22938
23923
|
Module.ccall("csp_systems_HotspotSequenceSystem_RemoveItemFromGroups_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, itemName, _callbackPtr, 0]);
|
|
22939
23924
|
return _promise;
|
|
22940
23925
|
}
|
|
23926
|
+
/**
|
|
23927
|
+
* @description Sets a callback to be fired when a hotspot sequence is changed.
|
|
23928
|
+
* @param callback - Callback to receive data for the hotspot sequence that has been changed.
|
|
23929
|
+
*/
|
|
23930
|
+
setHotspotSequenceChangedCallback(callback) {
|
|
23931
|
+
var _callback = (_stateObject__, arg1) => {
|
|
23932
|
+
var _arg1 = new Multiplayer.SequenceHotspotChangedParams(getNativePointer(arg1));
|
|
23933
|
+
callback(_arg1);
|
|
23934
|
+
};
|
|
23935
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
23936
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_SetHotspotSequenceChangedCallback_void_HotspotSequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
23937
|
+
}
|
|
23938
|
+
/**
|
|
23939
|
+
* @description Registers the system to listen for the named event.
|
|
23940
|
+
*/
|
|
23941
|
+
registerSystemCallback() {
|
|
23942
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23943
|
+
}
|
|
23944
|
+
/**
|
|
23945
|
+
* @description Deregisters the system from listening for the named event.
|
|
23946
|
+
*/
|
|
23947
|
+
deregisterSystemCallback() {
|
|
23948
|
+
Module.ccall("csp_systems_HotspotSequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
23949
|
+
}
|
|
22941
23950
|
}
|
|
22942
23951
|
Systems.HotspotSequenceSystem = HotspotSequenceSystem;
|
|
22943
23952
|
})(Systems || (Systems = {}));
|
|
@@ -24112,6 +25121,30 @@ export class CSPFoundation {
|
|
|
24112
25121
|
Module.ccall("csp_systems_SequenceSystem_DeleteSequences_void_ArrayRC_NullResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, sequenceKeys.pointer, _callbackPtr, 0]);
|
|
24113
25122
|
return _promise;
|
|
24114
25123
|
}
|
|
25124
|
+
/**
|
|
25125
|
+
* @description Sets a callback for a sequence changed event.
|
|
25126
|
+
* @param callback - Callback to receive data for the sequence that has been changed.
|
|
25127
|
+
*/
|
|
25128
|
+
setSequenceChangedCallback(callback) {
|
|
25129
|
+
var _callback = (_stateObject__, arg1) => {
|
|
25130
|
+
var _arg1 = new Multiplayer.SequenceChangedParams(getNativePointer(arg1));
|
|
25131
|
+
callback(_arg1);
|
|
25132
|
+
};
|
|
25133
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
25134
|
+
Module.ccall("csp_systems_SequenceSystem_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
25135
|
+
}
|
|
25136
|
+
/**
|
|
25137
|
+
* @description Registers the system to listen for the named event.
|
|
25138
|
+
*/
|
|
25139
|
+
registerSystemCallback() {
|
|
25140
|
+
Module.ccall("csp_systems_SequenceSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25141
|
+
}
|
|
25142
|
+
/**
|
|
25143
|
+
* @description Deregisters the system from listening for the named event.
|
|
25144
|
+
*/
|
|
25145
|
+
deregisterSystemCallback() {
|
|
25146
|
+
Module.ccall("csp_systems_SequenceSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
25147
|
+
}
|
|
24115
25148
|
}
|
|
24116
25149
|
Systems.SequenceSystem = SequenceSystem;
|
|
24117
25150
|
})(Systems || (Systems = {}));
|
|
@@ -26823,7 +27856,8 @@ export class CSPFoundation {
|
|
|
26823
27856
|
* @description Retrieves an array with all the Points of Interest that are located inside the circular area defined by the parameters..
|
|
26824
27857
|
* @param originLocation - The latitude and longitude coordinates of origin of the search location.
|
|
26825
27858
|
* @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
|
|
27859
|
+
* @param type - The type of POI to search for. If none is specified, all types will be included in
|
|
27860
|
+
* the returned set.
|
|
26827
27861
|
* @param callback - Callback when asynchronous task finishes.
|
|
26828
27862
|
*/
|
|
26829
27863
|
async getPOIsInArea(originLocation, areaRadius, type) {
|
|
@@ -27763,6 +28797,30 @@ export class CSPFoundation {
|
|
|
27763
28797
|
Module.ccall("csp_systems_UserSystem_GetCheckoutSessionUrl_void_TierNames_StringResultCallback", "void", ["number", "number", "number", "number"], [this.pointer, tier, _callbackPtr, 0]);
|
|
27764
28798
|
return _promise;
|
|
27765
28799
|
}
|
|
28800
|
+
/**
|
|
28801
|
+
* @description Sets a callback for an access control changed event.
|
|
28802
|
+
* @param callback - Callback to receive data for the user permissions that has been changed.
|
|
28803
|
+
*/
|
|
28804
|
+
setUserPermissionsChangedCallback(callback) {
|
|
28805
|
+
var _callback = (_stateObject__, arg1) => {
|
|
28806
|
+
var _arg1 = new Multiplayer.UserPermissionsParams(getNativePointer(arg1));
|
|
28807
|
+
callback(_arg1);
|
|
28808
|
+
};
|
|
28809
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
28810
|
+
Module.ccall("csp_systems_UserSystem_SetUserPermissionsChangedCallback_void_UserPermissionsChangedCallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
28811
|
+
}
|
|
28812
|
+
/**
|
|
28813
|
+
* @description Registers the system to listen for the named event.
|
|
28814
|
+
*/
|
|
28815
|
+
registerSystemCallback() {
|
|
28816
|
+
Module.ccall("csp_systems_UserSystem_RegisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28817
|
+
}
|
|
28818
|
+
/**
|
|
28819
|
+
* @description Deregisters the system from listening for the named event.
|
|
28820
|
+
*/
|
|
28821
|
+
deregisterSystemCallback() {
|
|
28822
|
+
Module.ccall("csp_systems_UserSystem_DeregisterSystemCallback_void", "void", ["number"], [this.pointer]);
|
|
28823
|
+
}
|
|
27766
28824
|
}
|
|
27767
28825
|
Systems.UserSystem = UserSystem;
|
|
27768
28826
|
})(Systems || (Systems = {}));
|
|
@@ -27844,6 +28902,13 @@ export class CSPFoundation {
|
|
|
27844
28902
|
Module._free(_ret);
|
|
27845
28903
|
return _inst;
|
|
27846
28904
|
}
|
|
28905
|
+
static ofcsp_systems_GLTFMaterial() {
|
|
28906
|
+
var _ret = Module._malloc(8);
|
|
28907
|
+
Module.ccall("csp_common_Array_Ctor_csp_systems_GLTFMaterial", "void", ["number"], [_ret]);
|
|
28908
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
28909
|
+
Module._free(_ret);
|
|
28910
|
+
return _inst;
|
|
28911
|
+
}
|
|
27847
28912
|
static ofcsp_systems_LODAsset() {
|
|
27848
28913
|
var _ret = Module._malloc(8);
|
|
27849
28914
|
Module.ccall("csp_common_Array_Ctor_csp_systems_LODAsset", "void", ["number"], [_ret]);
|
|
@@ -28145,6 +29210,13 @@ export class CSPFoundation {
|
|
|
28145
29210
|
Module._free(_ret);
|
|
28146
29211
|
return _inst;
|
|
28147
29212
|
}
|
|
29213
|
+
static ofcsp_systems_GLTFMaterial_number(size) {
|
|
29214
|
+
var _ret = Module._malloc(8);
|
|
29215
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_GLTFMaterial", "void", ["number", "number"], [_ret, size]);
|
|
29216
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_GLTFMaterialFactory, "csp_systems_GLTFMaterial");
|
|
29217
|
+
Module._free(_ret);
|
|
29218
|
+
return _inst;
|
|
29219
|
+
}
|
|
28148
29220
|
static ofcsp_systems_LODAsset_number(size) {
|
|
28149
29221
|
var _ret = Module._malloc(8);
|
|
28150
29222
|
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_LODAsset", "void", ["number", "number"], [_ret, size]);
|
|
@@ -28551,10 +29623,10 @@ export class CSPFoundation {
|
|
|
28551
29623
|
Module._free(_ret);
|
|
28552
29624
|
return _inst;
|
|
28553
29625
|
}
|
|
28554
|
-
static
|
|
29626
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue() {
|
|
28555
29627
|
var _ret = Module._malloc(8);
|
|
28556
|
-
Module.ccall("
|
|
28557
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29628
|
+
Module.ccall("csp_common_Map_Ctor_String_csp_multiplayer_ReplicatedValue", "void", ["number"], [_ret]);
|
|
29629
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28558
29630
|
Module._free(_ret);
|
|
28559
29631
|
return _inst;
|
|
28560
29632
|
}
|
|
@@ -28593,10 +29665,10 @@ export class CSPFoundation {
|
|
|
28593
29665
|
Module._free(_ret);
|
|
28594
29666
|
return _inst;
|
|
28595
29667
|
}
|
|
28596
|
-
static
|
|
29668
|
+
static ofStringAndcsp_multiplayer_ReplicatedValue_Map(other) {
|
|
28597
29669
|
var _ret = Module._malloc(8);
|
|
28598
|
-
Module.ccall("
|
|
28599
|
-
var _inst = new Map(getNativePointer(_ret),
|
|
29670
|
+
Module.ccall("csp_common_Map_Ctor_MapRC_String_csp_multiplayer_ReplicatedValue", "void", ["number", "number"], [_ret, other.pointer]);
|
|
29671
|
+
var _inst = new Map(getNativePointer(_ret), StringFactory, "String", csp_multiplayer_ReplicatedValueFactory, "csp_multiplayer_ReplicatedValue");
|
|
28600
29672
|
Module._free(_ret);
|
|
28601
29673
|
return _inst;
|
|
28602
29674
|
}
|