connected-spaces-platform.web 5.22.0 → 6.1.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.
@@ -288,6 +288,16 @@ function csp_web_EResponseCodesFactory(nativePointer) {
288
288
  return nativePointer.pointer;
289
289
  }
290
290
  ProxyClassFactories["csp_web_EResponseCodes"] = csp_web_EResponseCodesFactory;
291
+ function csp_multiplayer_AvatarStateFactory(nativePointer) {
292
+ return nativePointer.pointer;
293
+ }
294
+ ProxyClassFactories["csp_multiplayer_AvatarState"] =
295
+ csp_multiplayer_AvatarStateFactory;
296
+ function csp_multiplayer_AvatarPlayModeFactory(nativePointer) {
297
+ return nativePointer.pointer;
298
+ }
299
+ ProxyClassFactories["csp_multiplayer_AvatarPlayMode"] =
300
+ csp_multiplayer_AvatarPlayModeFactory;
291
301
  function csp_multiplayer_ErrorCodeFactory(nativePointer) {
292
302
  return nativePointer.pointer;
293
303
  }
@@ -380,16 +390,6 @@ function csp_multiplayer_AudioPropertyKeysFactory(nativePointer) {
380
390
  }
381
391
  ProxyClassFactories["csp_multiplayer_AudioPropertyKeys"] =
382
392
  csp_multiplayer_AudioPropertyKeysFactory;
383
- function csp_multiplayer_AvatarStateFactory(nativePointer) {
384
- return nativePointer.pointer;
385
- }
386
- ProxyClassFactories["csp_multiplayer_AvatarState"] =
387
- csp_multiplayer_AvatarStateFactory;
388
- function csp_multiplayer_AvatarPlayModeFactory(nativePointer) {
389
- return nativePointer.pointer;
390
- }
391
- ProxyClassFactories["csp_multiplayer_AvatarPlayMode"] =
392
- csp_multiplayer_AvatarPlayModeFactory;
393
393
  function csp_multiplayer_LocomotionModelFactory(nativePointer) {
394
394
  return nativePointer.pointer;
395
395
  }
@@ -524,6 +524,11 @@ function csp_multiplayer_ReflectionShapeFactory(nativePointer) {
524
524
  }
525
525
  ProxyClassFactories["csp_multiplayer_ReflectionShape"] =
526
526
  csp_multiplayer_ReflectionShapeFactory;
527
+ function csp_multiplayer_ScreenSharingPropertyKeysFactory(nativePointer) {
528
+ return nativePointer.pointer;
529
+ }
530
+ ProxyClassFactories["csp_multiplayer_ScreenSharingPropertyKeys"] =
531
+ csp_multiplayer_ScreenSharingPropertyKeysFactory;
527
532
  function csp_multiplayer_ScriptScopeFactory(nativePointer) {
528
533
  return nativePointer.pointer;
529
534
  }
@@ -733,16 +738,16 @@ function csp_common_Vector4Factory(nativePointer) {
733
738
  return new Common.Vector4(nativePointer);
734
739
  }
735
740
  ProxyClassFactories["csp_common_Vector4"] = csp_common_Vector4Factory;
736
- function csp_common_InvalidInterfaceUseErrorFactory(nativePointer) {
737
- return new Common.InvalidInterfaceUseError(nativePointer);
738
- }
739
- ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
740
- csp_common_InvalidInterfaceUseErrorFactory;
741
741
  function csp_common_IJSScriptRunnerFactory(nativePointer) {
742
742
  return new Common.IJSScriptRunner(nativePointer);
743
743
  }
744
744
  ProxyClassFactories["csp_common_IJSScriptRunner"] =
745
745
  csp_common_IJSScriptRunnerFactory;
746
+ function csp_common_InvalidInterfaceUseErrorFactory(nativePointer) {
747
+ return new Common.InvalidInterfaceUseError(nativePointer);
748
+ }
749
+ ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
750
+ csp_common_InvalidInterfaceUseErrorFactory;
746
751
  function csp_common_IRealtimeEngineFactory(nativePointer) {
747
752
  return new Common.IRealtimeEngine(nativePointer);
748
753
  }
@@ -787,11 +792,6 @@ function csp_multiplayer_SpaceEntityFactory(nativePointer) {
787
792
  }
788
793
  ProxyClassFactories["csp_multiplayer_SpaceEntity"] =
789
794
  csp_multiplayer_SpaceEntityFactory;
790
- function csp_multiplayer_SpaceEntitySystemFactory(nativePointer) {
791
- return new Multiplayer.SpaceEntitySystem(nativePointer);
792
- }
793
- ProxyClassFactories["csp_multiplayer_SpaceEntitySystem"] =
794
- csp_multiplayer_SpaceEntitySystemFactory;
795
795
  function csp_multiplayer_SpaceTransformFactory(nativePointer) {
796
796
  return new Multiplayer.SpaceTransform(nativePointer);
797
797
  }
@@ -990,6 +990,11 @@ function csp_systems_SequenceFactory(nativePointer) {
990
990
  return new Systems.Sequence(nativePointer);
991
991
  }
992
992
  ProxyClassFactories["csp_systems_Sequence"] = csp_systems_SequenceFactory;
993
+ function csp_systems_ApplicationSettingsFactory(nativePointer) {
994
+ return new Systems.ApplicationSettings(nativePointer);
995
+ }
996
+ ProxyClassFactories["csp_systems_ApplicationSettings"] =
997
+ csp_systems_ApplicationSettingsFactory;
993
998
  function csp_systems_SettingsCollectionFactory(nativePointer) {
994
999
  return new Systems.SettingsCollection(nativePointer);
995
1000
  }
@@ -1099,6 +1104,11 @@ function csp_common_SequenceChangedNetworkEventDataFactory(nativePointer) {
1099
1104
  }
1100
1105
  ProxyClassFactories["csp_common_SequenceChangedNetworkEventData"] =
1101
1106
  csp_common_SequenceChangedNetworkEventDataFactory;
1107
+ function csp_multiplayer_OnlineRealtimeEngineFactory(nativePointer) {
1108
+ return new Multiplayer.OnlineRealtimeEngine(nativePointer);
1109
+ }
1110
+ ProxyClassFactories["csp_multiplayer_OnlineRealtimeEngine"] =
1111
+ csp_multiplayer_OnlineRealtimeEngineFactory;
1102
1112
  function csp_multiplayer_AnimatedModelSpaceComponentFactory(nativePointer) {
1103
1113
  return new Multiplayer.AnimatedModelSpaceComponent(nativePointer);
1104
1114
  }
@@ -1189,6 +1199,11 @@ function csp_multiplayer_ReflectionSpaceComponentFactory(nativePointer) {
1189
1199
  }
1190
1200
  ProxyClassFactories["csp_multiplayer_ReflectionSpaceComponent"] =
1191
1201
  csp_multiplayer_ReflectionSpaceComponentFactory;
1202
+ function csp_multiplayer_ScreenSharingSpaceComponentFactory(nativePointer) {
1203
+ return new Multiplayer.ScreenSharingSpaceComponent(nativePointer);
1204
+ }
1205
+ ProxyClassFactories["csp_multiplayer_ScreenSharingSpaceComponent"] =
1206
+ csp_multiplayer_ScreenSharingSpaceComponentFactory;
1192
1207
  function csp_multiplayer_ScriptSpaceComponentFactory(nativePointer) {
1193
1208
  return new Multiplayer.ScriptSpaceComponent(nativePointer);
1194
1209
  }
@@ -1494,6 +1509,16 @@ function csp_systems_SequenceSystemFactory(nativePointer) {
1494
1509
  }
1495
1510
  ProxyClassFactories["csp_systems_SequenceSystem"] =
1496
1511
  csp_systems_SequenceSystemFactory;
1512
+ function csp_systems_ApplicationSettingsResultFactory(nativePointer) {
1513
+ return new Systems.ApplicationSettingsResult(nativePointer);
1514
+ }
1515
+ ProxyClassFactories["csp_systems_ApplicationSettingsResult"] =
1516
+ csp_systems_ApplicationSettingsResultFactory;
1517
+ function csp_systems_ApplicationSettingsSystemFactory(nativePointer) {
1518
+ return new Systems.ApplicationSettingsSystem(nativePointer);
1519
+ }
1520
+ ProxyClassFactories["csp_systems_ApplicationSettingsSystem"] =
1521
+ csp_systems_ApplicationSettingsSystemFactory;
1497
1522
  function csp_systems_SettingsCollectionResultFactory(nativePointer) {
1498
1523
  return new Systems.SettingsCollectionResult(nativePointer);
1499
1524
  }
@@ -2058,6 +2083,35 @@ export var Web;
2058
2083
  })(EResponseCodes = Web.EResponseCodes || (Web.EResponseCodes = {}));
2059
2084
  })(Web || (Web = {}));
2060
2085
  export var Multiplayer;
2086
+ (function (Multiplayer) {
2087
+ /**
2088
+ * @description Enumerates the supported states for an avatar.
2089
+ * These are used to establish the related animation that the avatar will use on its state machine.
2090
+ */
2091
+ let AvatarState;
2092
+ (function (AvatarState) {
2093
+ AvatarState[AvatarState["Idle"] = 0] = "Idle";
2094
+ AvatarState[AvatarState["Walking"] = 1] = "Walking";
2095
+ AvatarState[AvatarState["Running"] = 2] = "Running";
2096
+ AvatarState[AvatarState["Flying"] = 3] = "Flying";
2097
+ AvatarState[AvatarState["Jumping"] = 4] = "Jumping";
2098
+ AvatarState[AvatarState["Falling"] = 5] = "Falling";
2099
+ AvatarState[AvatarState["Num"] = 6] = "Num";
2100
+ })(AvatarState = Multiplayer.AvatarState || (Multiplayer.AvatarState = {}));
2101
+ })(Multiplayer || (Multiplayer = {}));
2102
+ (function (Multiplayer) {
2103
+ /**
2104
+ * @description Enumerates the supported play mode for the avatar.
2105
+ */
2106
+ let AvatarPlayMode;
2107
+ (function (AvatarPlayMode) {
2108
+ AvatarPlayMode[AvatarPlayMode["Default"] = 0] = "Default";
2109
+ AvatarPlayMode[AvatarPlayMode["AR"] = 1] = "AR";
2110
+ AvatarPlayMode[AvatarPlayMode["VR"] = 2] = "VR";
2111
+ AvatarPlayMode[AvatarPlayMode["Creator"] = 3] = "Creator";
2112
+ AvatarPlayMode[AvatarPlayMode["Num"] = 4] = "Num";
2113
+ })(AvatarPlayMode = Multiplayer.AvatarPlayMode || (Multiplayer.AvatarPlayMode = {}));
2114
+ })(Multiplayer || (Multiplayer = {}));
2061
2115
  (function (Multiplayer) {
2062
2116
  /**
2063
2117
  * @description Enum used to indicate the failure state of a multiplayer request.
@@ -2160,8 +2214,8 @@ export var Systems;
2160
2214
  */
2161
2215
  let RealtimeEngineType;
2162
2216
  (function (RealtimeEngineType) {
2163
- RealtimeEngineType[RealtimeEngineType["OnlineMultiUser"] = 0] = "OnlineMultiUser";
2164
- RealtimeEngineType[RealtimeEngineType["OnlineSingleUser"] = 1] = "OnlineSingleUser";
2217
+ RealtimeEngineType[RealtimeEngineType["Online"] = 0] = "Online";
2218
+ RealtimeEngineType[RealtimeEngineType["Offline"] = 1] = "Offline";
2165
2219
  })(RealtimeEngineType = Common.RealtimeEngineType || (Common.RealtimeEngineType = {}));
2166
2220
  })(Common || (Common = {}));
2167
2221
  (function (Common) {
@@ -2213,9 +2267,10 @@ export var Systems;
2213
2267
  ComponentType[ComponentType["Text"] = 25] = "Text";
2214
2268
  ComponentType[ComponentType["Hotspot"] = 26] = "Hotspot";
2215
2269
  ComponentType[ComponentType["CinematicCamera"] = 27] = "CinematicCamera";
2270
+ ComponentType[ComponentType["ScreenSharing"] = 28] = "ScreenSharing";
2216
2271
  //,
2217
- ComponentType[ComponentType["spare"] = 28] = "spare";
2218
- ComponentType[ComponentType["values"] = 29] = "values";
2272
+ ComponentType[ComponentType["spare"] = 29] = "spare";
2273
+ ComponentType[ComponentType["values"] = 30] = "values";
2219
2274
  ComponentType[ComponentType["Delete"] = 56] = "Delete";
2220
2275
  })(ComponentType = Multiplayer.ComponentType || (Multiplayer.ComponentType = {}));
2221
2276
  })(Multiplayer || (Multiplayer = {}));
@@ -2251,6 +2306,10 @@ export var Systems;
2251
2306
  MultiplayerHubMethod[MultiplayerHubMethod["SET_SCOPES"] = 11] = "SET_SCOPES";
2252
2307
  MultiplayerHubMethod[MultiplayerHubMethod["START_LISTENING"] = 12] = "START_LISTENING";
2253
2308
  MultiplayerHubMethod[MultiplayerHubMethod["STOP_LISTENING"] = 13] = "STOP_LISTENING";
2309
+ MultiplayerHubMethod[MultiplayerHubMethod["ON_OBJECT_MESSAGE"] = 14] = "ON_OBJECT_MESSAGE";
2310
+ MultiplayerHubMethod[MultiplayerHubMethod["ON_OBJECT_PATCH"] = 15] = "ON_OBJECT_PATCH";
2311
+ MultiplayerHubMethod[MultiplayerHubMethod["ON_REQUEST_TO_SEND_OBJECT"] = 16] = "ON_REQUEST_TO_SEND_OBJECT";
2312
+ MultiplayerHubMethod[MultiplayerHubMethod["ON_REQUEST_TO_DISCONNECT"] = 17] = "ON_REQUEST_TO_DISCONNECT";
2254
2313
  })(MultiplayerHubMethod = Multiplayer.MultiplayerHubMethod || (Multiplayer.MultiplayerHubMethod = {}));
2255
2314
  })(Multiplayer || (Multiplayer = {}));
2256
2315
  (function (Multiplayer) {
@@ -2392,35 +2451,6 @@ export var Systems;
2392
2451
  AudioPropertyKeys[AudioPropertyKeys["Num"] = 11] = "Num";
2393
2452
  })(AudioPropertyKeys = Multiplayer.AudioPropertyKeys || (Multiplayer.AudioPropertyKeys = {}));
2394
2453
  })(Multiplayer || (Multiplayer = {}));
2395
- (function (Multiplayer) {
2396
- /**
2397
- * @description Enumerates the supported states for an avatar.
2398
- * These are used to establish the related animation that the avatar will use on its state machine.
2399
- */
2400
- let AvatarState;
2401
- (function (AvatarState) {
2402
- AvatarState[AvatarState["Idle"] = 0] = "Idle";
2403
- AvatarState[AvatarState["Walking"] = 1] = "Walking";
2404
- AvatarState[AvatarState["Running"] = 2] = "Running";
2405
- AvatarState[AvatarState["Flying"] = 3] = "Flying";
2406
- AvatarState[AvatarState["Jumping"] = 4] = "Jumping";
2407
- AvatarState[AvatarState["Falling"] = 5] = "Falling";
2408
- AvatarState[AvatarState["Num"] = 6] = "Num";
2409
- })(AvatarState = Multiplayer.AvatarState || (Multiplayer.AvatarState = {}));
2410
- })(Multiplayer || (Multiplayer = {}));
2411
- (function (Multiplayer) {
2412
- /**
2413
- * @description Enumerates the supported play mode for the avatar.
2414
- */
2415
- let AvatarPlayMode;
2416
- (function (AvatarPlayMode) {
2417
- AvatarPlayMode[AvatarPlayMode["Default"] = 0] = "Default";
2418
- AvatarPlayMode[AvatarPlayMode["AR"] = 1] = "AR";
2419
- AvatarPlayMode[AvatarPlayMode["VR"] = 2] = "VR";
2420
- AvatarPlayMode[AvatarPlayMode["Creator"] = 3] = "Creator";
2421
- AvatarPlayMode[AvatarPlayMode["Num"] = 4] = "Num";
2422
- })(AvatarPlayMode = Multiplayer.AvatarPlayMode || (Multiplayer.AvatarPlayMode = {}));
2423
- })(Multiplayer || (Multiplayer = {}));
2424
2454
  (function (Multiplayer) {
2425
2455
  /**
2426
2456
  * @description Enumerates the supported locomotion models available for the avatar movements.
@@ -2837,6 +2867,25 @@ export var Systems;
2837
2867
  ReflectionShape[ReflectionShape["UnitBox"] = 1] = "UnitBox";
2838
2868
  })(ReflectionShape = Multiplayer.ReflectionShape || (Multiplayer.ReflectionShape = {}));
2839
2869
  })(Multiplayer || (Multiplayer = {}));
2870
+ (function (Multiplayer) {
2871
+ /**
2872
+ * @description Enumerates the list of properties that can be replicated for a screen sharing component.
2873
+ */
2874
+ let ScreenSharingPropertyKeys;
2875
+ (function (ScreenSharingPropertyKeys) {
2876
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["Position"] = 0] = "Position";
2877
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["Rotation"] = 1] = "Rotation";
2878
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["Scale"] = 2] = "Scale";
2879
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["IsVisible"] = 3] = "IsVisible";
2880
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["IsARVisible"] = 4] = "IsARVisible";
2881
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["IsShadowCaster"] = 5] = "IsShadowCaster";
2882
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["UserId"] = 6] = "UserId";
2883
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["DefaultImageCollectionId"] = 7] = "DefaultImageCollectionId";
2884
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["DefaultImageAssetId"] = 8] = "DefaultImageAssetId";
2885
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["AttenuationRadius"] = 9] = "AttenuationRadius";
2886
+ ScreenSharingPropertyKeys[ScreenSharingPropertyKeys["Num"] = 10] = "Num";
2887
+ })(ScreenSharingPropertyKeys = Multiplayer.ScreenSharingPropertyKeys || (Multiplayer.ScreenSharingPropertyKeys = {}));
2888
+ })(Multiplayer || (Multiplayer = {}));
2840
2889
  (function (Multiplayer) {
2841
2890
  /**
2842
2891
  * @description Enumerates the supported scopes of a script.
@@ -10043,56 +10092,56 @@ export class CSPFoundation {
10043
10092
  Common.Vector4 = Vector4;
10044
10093
  })(Common || (Common = {}));
10045
10094
  (function (Common) {
10046
- class InvalidInterfaceUseError extends NativeClassWrapper {
10095
+ class IJSScriptRunner extends NativeClassWrapper {
10047
10096
  /** @internal */
10048
10097
  constructor(pointer) {
10049
10098
  super(pointer);
10050
10099
  }
10051
- static create_msg(msg) {
10052
- var _ptr = Module._malloc(8);
10053
- Module.ccall("csp_common_InvalidInterfaceUseError_Ctor_StringRC", "void", ["number", "string"], [_ptr, msg]);
10054
- var _nPtr = getNativePointer(_ptr);
10055
- return new InvalidInterfaceUseError(_nPtr);
10056
- }
10100
+ /**
10101
+ * @description Virtual destructor.
10102
+ */
10057
10103
  delete() {
10058
10104
  if (this.ownsPointer && !this.disposed) {
10059
- Module.ccall("csp_common_InvalidInterfaceUseError_Dtor", "void", ["number"], [this.pointer]);
10105
+ Module.ccall("csp_common_IJSScriptRunner_Dtor", "void", ["number"], [this.pointer]);
10060
10106
  this.disposed = true;
10061
10107
  }
10062
10108
  }
10063
- get msg() {
10064
- let _result = Module.ccall("csp_common_InvalidInterfaceUseError__Get_msg", "string", ["number"], [this.pointer]);
10109
+ runScript(contextId, scriptText) {
10110
+ assert(contextId >= Limits.INT64_MIN);
10111
+ assert(contextId <= Limits.INT64_MAX);
10112
+ let _result = Module.ccall("csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC", "boolean", ["number", "bigint", "string"], [this.pointer, contextId, scriptText]);
10065
10113
  return _result;
10066
10114
  }
10067
- set msg(value) {
10068
- Module.ccall("csp_common_InvalidInterfaceUseError__Set_msg", "void", ["number", "string"], [this.pointer, value]);
10069
- }
10070
10115
  }
10071
- Common.InvalidInterfaceUseError = InvalidInterfaceUseError;
10116
+ Common.IJSScriptRunner = IJSScriptRunner;
10072
10117
  })(Common || (Common = {}));
10073
10118
  (function (Common) {
10074
- class IJSScriptRunner extends NativeClassWrapper {
10119
+ class InvalidInterfaceUseError extends NativeClassWrapper {
10075
10120
  /** @internal */
10076
10121
  constructor(pointer) {
10077
10122
  super(pointer);
10078
10123
  }
10079
- /**
10080
- * @description Virtual destructor.
10081
- */
10124
+ static create_msg(msg) {
10125
+ var _ptr = Module._malloc(8);
10126
+ Module.ccall("csp_common_InvalidInterfaceUseError_Ctor_StringRC", "void", ["number", "string"], [_ptr, msg]);
10127
+ var _nPtr = getNativePointer(_ptr);
10128
+ return new InvalidInterfaceUseError(_nPtr);
10129
+ }
10082
10130
  delete() {
10083
10131
  if (this.ownsPointer && !this.disposed) {
10084
- Module.ccall("csp_common_IJSScriptRunner_Dtor", "void", ["number"], [this.pointer]);
10132
+ Module.ccall("csp_common_InvalidInterfaceUseError_Dtor", "void", ["number"], [this.pointer]);
10085
10133
  this.disposed = true;
10086
10134
  }
10087
10135
  }
10088
- runScript(contextId, scriptText) {
10089
- assert(contextId >= Limits.INT64_MIN);
10090
- assert(contextId <= Limits.INT64_MAX);
10091
- let _result = Module.ccall("csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC", "boolean", ["number", "bigint", "string"], [this.pointer, contextId, scriptText]);
10136
+ get msg() {
10137
+ let _result = Module.ccall("csp_common_InvalidInterfaceUseError__Get_msg", "string", ["number"], [this.pointer]);
10092
10138
  return _result;
10093
10139
  }
10140
+ set msg(value) {
10141
+ Module.ccall("csp_common_InvalidInterfaceUseError__Set_msg", "void", ["number", "string"], [this.pointer, value]);
10142
+ }
10094
10143
  }
10095
- Common.IJSScriptRunner = IJSScriptRunner;
10144
+ Common.InvalidInterfaceUseError = InvalidInterfaceUseError;
10096
10145
  })(Common || (Common = {}));
10097
10146
  (function (Common) {
10098
10147
  class IRealtimeEngine extends NativeClassWrapper {
@@ -10119,14 +10168,17 @@ export class CSPFoundation {
10119
10168
  /**
10120
10169
  * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
10121
10170
  * @param name - The entity name of the newly created avatar entity.
10171
+ * @param userId - Id of the user creating this avatar. If your backend data store requires authentication, this will
10172
+ * probably be your username or some similar unique identifier.
10122
10173
  * @param spaceTransform - The initial transform to set the SpaceEntity to.
10123
- * @param state - The initial Avatar State to set.
10174
+ * @param isVisible - Whether the avatar defaults to being visible.
10175
+ * @param avatarState - The initial Avatar State to set.
10124
10176
  * @param avatarId - The ID to be set on the AvatarSpaceComponent
10125
10177
  * @param avatarPlayMode - The Initial AvatarPlayMode to set.
10126
10178
  * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
10127
10179
  * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
10128
10180
  */
10129
- async createAvatar(name, spaceTransform, state, avatarId, avatarPlayMode) {
10181
+ async createAvatar(name, userId, spaceTransform, isVisible, avatarState, avatarId, avatarPlayMode) {
10130
10182
  var _resolve;
10131
10183
  var _promise = new Promise((_r) => {
10132
10184
  _resolve = _r;
@@ -10139,10 +10191,12 @@ export class CSPFoundation {
10139
10191
  Module.removeFunction(_callbackPtr);
10140
10192
  };
10141
10193
  _callbackPtr = Module.addFunction(_callback, "vii");
10142
- Module.ccall("csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_SpaceTransformRC_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback", "void", [
10194
+ Module.ccall("csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarState_StringRC_AvatarPlayMode_EntityCreatedCallback", "void", [
10143
10195
  "number",
10144
10196
  "string",
10197
+ "string",
10145
10198
  "number",
10199
+ "boolean",
10146
10200
  "number",
10147
10201
  "string",
10148
10202
  "number",
@@ -10151,8 +10205,10 @@ export class CSPFoundation {
10151
10205
  ], [
10152
10206
  this.pointer,
10153
10207
  name,
10208
+ userId,
10154
10209
  spaceTransform.pointer,
10155
- state,
10210
+ isVisible,
10211
+ avatarState,
10156
10212
  avatarId,
10157
10213
  avatarPlayMode,
10158
10214
  _callbackPtr,
@@ -10164,10 +10220,12 @@ export class CSPFoundation {
10164
10220
  * @description Create and add a SpaceEntity, with relevant default values.
10165
10221
  * @param name - The name of the newly created SpaceEntity.
10166
10222
  * @param spaceTransform - The initial transform to set the SpaceEntity to.
10223
+ * @param parentID - ID of another entity in the space that this entity should be created as a child to. If
10224
+ * empty, entity is created as a root entity.
10167
10225
  * @param callback - A callback that executes when the creation is complete,
10168
10226
  * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
10169
10227
  */
10170
- async createEntity(name, spaceTransform) {
10228
+ async createEntity(name, spaceTransform, parentID) {
10171
10229
  var _resolve;
10172
10230
  var _promise = new Promise((_r) => {
10173
10231
  _resolve = _r;
@@ -10180,9 +10238,27 @@ export class CSPFoundation {
10180
10238
  Module.removeFunction(_callbackPtr);
10181
10239
  };
10182
10240
  _callbackPtr = Module.addFunction(_callback, "vii");
10183
- Module.ccall("csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_EntityCreatedCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0]);
10241
+ var parentIDPointer = 0;
10242
+ if (parentID != null) {
10243
+ parentIDPointer = Module._malloc(4);
10244
+ Module.setValue(parentIDPointer, parentID, "i32");
10245
+ }
10246
+ Module.ccall("csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback", "void", ["number", "string", "number", "bigint", "number", "number"], [
10247
+ this.pointer,
10248
+ name,
10249
+ spaceTransform.pointer,
10250
+ parentIDPointer,
10251
+ _callbackPtr,
10252
+ 0,
10253
+ ]);
10254
+ if (parentIDPointer) {
10255
+ Module._free(parentIDPointer);
10256
+ }
10184
10257
  return _promise;
10185
10258
  }
10259
+ addEntity(entityToAdd) {
10260
+ Module.ccall("csp_common_IRealtimeEngine_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
10261
+ }
10186
10262
  /**
10187
10263
  * @description Destroy the specified entity.
10188
10264
  * @param entity - A non-owning pointer to the entity to be destroyed.
@@ -10205,6 +10281,8 @@ export class CSPFoundation {
10205
10281
  /**
10206
10282
  * @description Sets a callback to be executed when an entity is fully created.
10207
10283
  * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
10284
+ * The better way to set this and avoid initialisation race conditions is via passing this in the constructor, only use this if you wish to
10285
+ * override or remove this callback.
10208
10286
  * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
10209
10287
  */
10210
10288
  setEntityCreatedCallback(callback) {
@@ -10355,15 +10433,24 @@ export class CSPFoundation {
10355
10433
  return _nPtr;
10356
10434
  }
10357
10435
  /**
10358
- * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
10359
- * @param callback - A callback that executes when all existing entities have been retrieved.
10436
+ * @description Set Callback that notifies when the OnlineRealtimeEngine is in a valid state
10437
+ * after entering a space, and entity mutation can begin. Users should not mutate entities before receiving this callback.
10438
+ * This callback should be emitted in response to FetchAllEntitiesAndPopulateBuffers completing, either syncronously or asyncronously.
10439
+ * This callback must be set prior to entering a space.
10440
+ * @param fetchCompleteCallback - Callback that notifies when the RealtimeEngine has completed initial
10441
+ * entity fetch
10360
10442
  */
10361
- setInitialEntitiesRetrievedCallback(callback) {
10443
+ setEntityFetchCompleteCallback(callback) {
10362
10444
  var _callback = (_stateObject__, arg1) => {
10445
+ {
10446
+ const _unfixedValue = arg1;
10447
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
10448
+ arg1 = _fixedValue;
10449
+ }
10363
10450
  callback(arg1);
10364
10451
  };
10365
10452
  var _callbackPtr = Module.addFunction(_callback, "vii");
10366
- Module.ccall("csp_common_IRealtimeEngine_SetInitialEntitiesRetrievedCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
10453
+ Module.ccall("csp_common_IRealtimeEngine_SetEntityFetchCompleteCallback_void_EntityFetchCompleteCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
10367
10454
  }
10368
10455
  /**
10369
10456
  * @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
@@ -10650,13 +10737,13 @@ export class CSPFoundation {
10650
10737
  /**
10651
10738
  * @description Constructor for CSPSceneDescription by deserializing a SceneDescription json file.
10652
10739
  * @param sceneDescriptionJson - The SceneDescription to deserialize.
10653
- * @param entitySystem - The SpaceEntitySystem for this session.
10654
- * @param logSystem - The SpaceEntitySystem for this session.
10740
+ * @param entitySystem - The OnlineRealtimeEngine for this session.
10741
+ * @param logSystem - The OnlineRealtimeEngine for this session.
10655
10742
  * @param remoteScriptRunner - The ScriptRunner for this session.
10656
10743
  */
10657
10744
  static create_sceneDescriptionJson_entitySystem_logSystem_remoteScriptRunner(sceneDescriptionJson, entitySystem, logSystem, remoteScriptRunner) {
10658
10745
  var _ptr = Module._malloc(8);
10659
- Module.ccall("csp_multiplayer_CSPSceneDescription_Ctor_StringRC_SpaceEntitySystemR_LogSystemR_IJSScriptRunnerR", "void", ["number", "string", "number", "number", "number"], [
10746
+ Module.ccall("csp_multiplayer_CSPSceneDescription_Ctor_StringRC_OnlineRealtimeEngineR_LogSystemR_IJSScriptRunnerR", "void", ["number", "string", "number", "number", "number"], [
10660
10747
  _ptr,
10661
10748
  sceneDescriptionJson,
10662
10749
  entitySystem.pointer,
@@ -10791,6 +10878,18 @@ export class CSPFoundation {
10791
10878
  let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetAllowSelfMessagingFlagC_bool", "boolean", ["number"], [this.pointer]);
10792
10879
  return _result;
10793
10880
  }
10881
+ /**
10882
+ * @description Get the currently set realtime engine.
10883
+ * @return Non-owning pointer to currently set realtime engine. This should be non-null when in a space, and null before entering, or after
10884
+ * exiting a space.
10885
+ */
10886
+ getOnlineRealtimeEngine() {
10887
+ var _ret = Module._malloc(8);
10888
+ Module.ccall("csp_multiplayer_MultiplayerConnection_GetOnlineRealtimeEngineC_OnlineRealtimeEngineP", "void", ["number", "number"], [_ret, this.pointer]);
10889
+ var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
10890
+ Module._free(_ret);
10891
+ return _nPtr;
10892
+ }
10794
10893
  delete() {
10795
10894
  if (this.ownsPointer && !this.disposed) {
10796
10895
  Module.ccall("csp_multiplayer_MultiplayerConnection_Dtor", "void", ["number"], [this.pointer]);
@@ -11032,7 +11131,7 @@ export class CSPFoundation {
11032
11131
  */
11033
11132
  static create_entitySystem_scriptRunner_logSystem(entitySystem, scriptRunner, logSystem) {
11034
11133
  var _ptr = Module._malloc(8);
11035
- Module.ccall("csp_multiplayer_SpaceEntity_Ctor_SpaceEntitySystemP_IJSScriptRunnerR_LogSystemP", "void", ["number", "number", "number", "number"], [_ptr, entitySystem.pointer, scriptRunner.pointer, logSystem.pointer]);
11134
+ Module.ccall("csp_multiplayer_SpaceEntity_Ctor_OnlineRealtimeEngineP_IJSScriptRunnerR_LogSystemP", "void", ["number", "number", "number", "number"], [_ptr, entitySystem.pointer, scriptRunner.pointer, logSystem.pointer]);
11036
11135
  var _nPtr = getNativePointer(_ptr);
11037
11136
  return new SpaceEntity(_nPtr);
11038
11137
  }
@@ -11244,17 +11343,6 @@ export class CSPFoundation {
11244
11343
  let _result = Module.ccall("csp_multiplayer_SpaceEntity_GetEntityTypeC_SpaceEntityType", "number", ["number"], [this.pointer]);
11245
11344
  return _result;
11246
11345
  }
11247
- /**
11248
- * @description Get SpaceEntitySystem Object
11249
- * @return SpaceEntitySystem
11250
- */
11251
- getSpaceEntitySystem() {
11252
- var _ret = Module._malloc(8);
11253
- Module.ccall("csp_multiplayer_SpaceEntity_GetSpaceEntitySystem_SpaceEntitySystemP", "void", ["number", "number"], [_ret, this.pointer]);
11254
- var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
11255
- Module._free(_ret);
11256
- return _nPtr;
11257
- }
11258
11346
  /**
11259
11347
  * @description Sets the parent for this entity
11260
11348
  * QueueUpdate() should be called afterwards to enable changes to the parent.
@@ -11524,606 +11612,161 @@ export class CSPFoundation {
11524
11612
  })(Multiplayer || (Multiplayer = {}));
11525
11613
  (function (Multiplayer) {
11526
11614
  /**
11527
- * @description Class for creating and managing multiplayer objects known as space entities.
11528
- * /// This provides functions to create and manage multiple player avatars and other objects.
11529
- * It manages things like queueing updated entities and triggering tick events. Callbacks
11530
- * can be registered for certain events that occur within the entity system so clients can
11531
- * react appropriately.
11615
+ * @description Simple class for holding the position, rotation and scale of a transform.
11532
11616
  */
11533
- class SpaceEntitySystem extends NativeClassWrapper {
11617
+ class SpaceTransform extends NativeClassWrapper {
11534
11618
  /** @internal */
11535
11619
  constructor(pointer) {
11536
11620
  super(pointer);
11537
11621
  }
11538
11622
  /**
11539
- * @description Creates a SpaceEntity with type Avatar, and relevant components and default states as specified.
11540
- * @param inName - The name to give the new SpaceEntity.
11541
- * @param inSpaceTransform - The initial transform to set the SpaceEntity to.
11542
- * @param isVisible - The initial visibility of the Avatar.
11543
- * @param inState - The initial Avatar State to set.
11544
- * @param inAvatarId - The Initial AvatarID to set.
11545
- * @param inAvatarPlayMode - The Initial AvatarPlayMode to set.
11546
- * @param callback - EntityCreatedCallback A callback that executes when the creation is complete,
11547
- * which contains a pointer to the new SpaceEntity so that it can be used on the local client.
11623
+ * @description Default constuctor for the SpaceTransform
11548
11624
  */
11549
- async createAvatar(name, loginState, spaceTransform, isVisible, state, avatarId, avatarPlayMode) {
11550
- var _resolve;
11551
- var _promise = new Promise((_r) => {
11552
- _resolve = _r;
11553
- });
11554
- var _callbackPtr;
11555
- var _callback = (_stateObject__, arg1) => {
11556
- var _arg1Ptr = getNativePointer(arg1);
11557
- var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
11558
- _resolve(_arg1Instance);
11559
- Module.removeFunction(_callbackPtr);
11560
- };
11561
- _callbackPtr = Module.addFunction(_callback, "vii");
11562
- Module.ccall("csp_multiplayer_SpaceEntitySystem_CreateAvatar_void_StringRC_LoginStateRC_SpaceTransformRC_bool_AvatarState_StringRC_AvatarPlayMode_EntityCreatedCallback", "void", [
11563
- "number",
11564
- "string",
11565
- "number",
11566
- "number",
11567
- "boolean",
11568
- "number",
11569
- "string",
11570
- "number",
11571
- "number",
11572
- "number",
11573
- ], [
11574
- this.pointer,
11575
- name,
11576
- loginState.pointer,
11577
- spaceTransform.pointer,
11578
- isVisible,
11579
- state,
11580
- avatarId,
11581
- avatarPlayMode,
11582
- _callbackPtr,
11583
- 0,
11584
- ]);
11585
- return _promise;
11625
+ static create() {
11626
+ var _ptr = Module._malloc(8);
11627
+ Module.ccall("csp_multiplayer_SpaceTransform_Ctor", "void", ["number"], [_ptr]);
11628
+ var _nPtr = getNativePointer(_ptr);
11629
+ return new SpaceTransform(_nPtr);
11586
11630
  }
11587
11631
  /**
11588
- * @description Creates a SpaceEntity of type Object, and relevant default values.
11589
- * @param inName - The name to give the new SpaceEntity.
11590
- * @param inSpaceTransform - The initial transform to set the SpaceEntity to.
11591
- * @param callback - A callback that executes when the creation is complete,
11592
- * which contains a pointer to the new SpaceEntity so that it can be used on the local client.
11632
+ * @description Custom constructor for the SpaceTransform.
11633
+ * @param position - The position value for the transform.
11634
+ * @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
11635
+ * @param scale - The scale value for the transform.
11593
11636
  */
11594
- async createObject(name, spaceTransform) {
11595
- var _resolve;
11596
- var _promise = new Promise((_r) => {
11597
- _resolve = _r;
11598
- });
11599
- var _callbackPtr;
11600
- var _callback = (_stateObject__, arg1) => {
11601
- var _arg1Ptr = getNativePointer(arg1);
11602
- var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
11603
- _resolve(_arg1Instance);
11604
- Module.removeFunction(_callbackPtr);
11605
- };
11606
- _callbackPtr = Module.addFunction(_callback, "vii");
11607
- Module.ccall("csp_multiplayer_SpaceEntitySystem_CreateObject_void_StringRC_SpaceTransformRC_EntityCreatedCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0]);
11608
- return _promise;
11637
+ static create_position_rotation_scale(position, rotation, scale) {
11638
+ var _ptr = Module._malloc(8);
11639
+ Module.ccall("csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC", "void", ["number", "number", "number", "number"], [_ptr, position.pointer, rotation.pointer, scale.pointer]);
11640
+ var _nPtr = getNativePointer(_ptr);
11641
+ return new SpaceTransform(_nPtr);
11609
11642
  }
11610
11643
  /**
11611
- * @description Destroys both the remote view and the local view of the specified entity.
11612
- * @param entity - The entity to be destroyed.
11613
- * @param callback - The callback to execute.
11644
+ * @description Equality operator
11645
+ * @param spaceTransform - Transform
11614
11646
  */
11615
- async destroyEntity(entity) {
11616
- var _resolve;
11617
- var _promise = new Promise((_r) => {
11618
- _resolve = _r;
11619
- });
11620
- var _callbackPtr;
11621
- var _callback = (_stateObject__, arg1) => {
11622
- _resolve(!!arg1);
11623
- Module.removeFunction(_callbackPtr);
11624
- };
11625
- _callbackPtr = Module.addFunction(_callback, "vii");
11626
- Module.ccall("csp_multiplayer_SpaceEntitySystem_DestroyEntity_void_SpaceEntityP_CallbackHandler", "void", ["number", "number", "number", "number"], [this.pointer, entity.pointer, _callbackPtr, 0]);
11627
- return _promise;
11628
- }
11629
- /**
11630
- * @description Destroys the local client's view of the specified entity.
11631
- * @param entity - The entity to be destroyed locally.
11632
- */
11633
- localDestroyEntity(entity) {
11634
- Module.ccall("csp_multiplayer_SpaceEntitySystem_LocalDestroyEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
11635
- }
11647
+ // operator==
11636
11648
  /**
11637
- * @description Finds the first SpaceEntity that matches InName.
11638
- * @param inName - The name to search.
11639
- * @return A pointer to the first found match SpaceEntity.
11649
+ * @description Inequality operator
11650
+ * @param spaceTransform - Transform
11640
11651
  */
11641
- findSpaceEntity(name) {
11642
- var _ret = Module._malloc(8);
11643
- Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceEntity_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
11644
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11645
- Module._free(_ret);
11646
- return _nPtr;
11647
- }
11652
+ // operator!=
11648
11653
  /**
11649
- * @description Finds the first SpaceEntity that has the ID EntityId.
11650
- * @param entityId - The Id to look for.
11651
- * @return A pointer to the first found match SpaceEntity.
11654
+ * @description Multiplication operator
11655
+ * @param spaceTransform - Transform
11656
+ * NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
11652
11657
  */
11653
- findSpaceEntityById(entityId) {
11654
- assert(entityId >= Limits.UINT64_MIN);
11655
- assert(entityId <= Limits.UINT64_MAX);
11656
- var _ret = Module._malloc(8);
11657
- Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceEntityById_SpaceEntityP_uint64_t", "void", ["number", "number", "bigint"], [_ret, this.pointer, entityId]);
11658
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11659
- Module._free(_ret);
11660
- return _nPtr;
11658
+ // operator*
11659
+ delete() {
11660
+ if (this.ownsPointer && !this.disposed) {
11661
+ Module.ccall("csp_multiplayer_SpaceTransform_Dtor", "void", ["number"], [this.pointer]);
11662
+ this.disposed = true;
11663
+ }
11661
11664
  }
11662
- /**
11663
- * @description Finds the first SpaceEntity of type Avatar that matches InName.
11664
- * @param inName - The name to search.
11665
- * @return A pointer to the first found match SpaceEntity.
11666
- */
11667
- findSpaceAvatar(name) {
11668
- var _ret = Module._malloc(8);
11669
- Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceAvatar_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
11670
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11671
- Module._free(_ret);
11672
- return _nPtr;
11665
+ get position() {
11666
+ const _ptr = Module._malloc(8);
11667
+ Module.ccall("csp_multiplayer_SpaceTransform__Get_Position", "void", ["number", "number"], [_ptr, this.pointer]);
11668
+ const _nPtr = getNativePointer(_ptr);
11669
+ return new Common.Vector3(_nPtr);
11673
11670
  }
11674
- /**
11675
- * @description Finds the first SpaceEntity of type Object that matches InName.
11676
- * @param inName - The name to search.
11677
- * @return A pointer to the first found match SpaceEntity.
11678
- */
11679
- findSpaceObject(name) {
11680
- var _ret = Module._malloc(8);
11681
- Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceObject_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
11682
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11683
- Module._free(_ret);
11684
- return _nPtr;
11671
+ set position(value) {
11672
+ Module.ccall("csp_multiplayer_SpaceTransform__Set_Position", "void", ["number", "number"], [this.pointer, value.pointer]);
11685
11673
  }
11686
- /**
11687
- * @description Locks the entity mutex.
11688
- */
11689
- lockEntityUpdate() {
11690
- Module.ccall("csp_multiplayer_SpaceEntitySystem_LockEntityUpdateC_void", "void", ["number"], [this.pointer]);
11674
+ get rotation() {
11675
+ const _ptr = Module._malloc(8);
11676
+ Module.ccall("csp_multiplayer_SpaceTransform__Get_Rotation", "void", ["number", "number"], [_ptr, this.pointer]);
11677
+ const _nPtr = getNativePointer(_ptr);
11678
+ return new Common.Vector4(_nPtr);
11691
11679
  }
11692
- /**
11693
- * @description Unlocks the entity mutex.
11694
- */
11695
- unlockEntityUpdate() {
11696
- Module.ccall("csp_multiplayer_SpaceEntitySystem_UnlockEntityUpdateC_void", "void", ["number"], [this.pointer]);
11680
+ set rotation(value) {
11681
+ Module.ccall("csp_multiplayer_SpaceTransform__Set_Rotation", "void", ["number", "number"], [this.pointer, value.pointer]);
11697
11682
  }
11698
- /**
11699
- * @description Get the number of total entities in the system (both Avatars and Objects).
11700
- * @return The total number of entities.
11701
- */
11702
- getNumEntities() {
11703
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumEntitiesC_size_t", "number", ["number"], [this.pointer]);
11704
- const _unfixedValue = _result;
11705
- let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
11706
- _result = _fixedValue;
11707
- return _result;
11683
+ get scale() {
11684
+ const _ptr = Module._malloc(8);
11685
+ Module.ccall("csp_multiplayer_SpaceTransform__Get_Scale", "void", ["number", "number"], [_ptr, this.pointer]);
11686
+ const _nPtr = getNativePointer(_ptr);
11687
+ return new Common.Vector3(_nPtr);
11708
11688
  }
11709
- /**
11710
- * @description Get the number of total Avatars in the system.
11711
- * @return The total number of Avatar entities.
11712
- */
11713
- getNumAvatars() {
11714
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumAvatarsC_size_t", "number", ["number"], [this.pointer]);
11715
- const _unfixedValue = _result;
11716
- let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
11717
- _result = _fixedValue;
11718
- return _result;
11689
+ set scale(value) {
11690
+ Module.ccall("csp_multiplayer_SpaceTransform__Set_Scale", "void", ["number", "number"], [this.pointer, value.pointer]);
11719
11691
  }
11720
- /**
11721
- * @description Get the number of total Objects in the system.
11722
- * @return The total number of object entities.
11723
- */
11724
- getNumObjects() {
11725
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumObjectsC_size_t", "number", ["number"], [this.pointer]);
11726
- const _unfixedValue = _result;
11727
- let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
11728
- _result = _fixedValue;
11729
- return _result;
11692
+ }
11693
+ Multiplayer.SpaceTransform = SpaceTransform;
11694
+ })(Multiplayer || (Multiplayer = {}));
11695
+ (function (Multiplayer) {
11696
+ /**
11697
+ @ingroup Conversation
11698
+ * @description Contains information about a conversation message.
11699
+ */
11700
+ class MessageInfo extends NativeClassWrapper {
11701
+ /** @internal */
11702
+ constructor(pointer) {
11703
+ super(pointer);
11730
11704
  }
11731
- /**
11732
- * @description Get an Entity (Avatar or Object) by its index.
11733
- * /// Note this is not currently thread safe and should only be called from the main thread.
11734
- * /// @param EntityIndex size_t : The index of the entity to get.
11735
- * @return A pointer to the entity with the given index.
11736
- */
11737
- getEntityByIndex(entityIndex) {
11738
- assert(Number.isInteger(entityIndex));
11739
- assert(entityIndex >= Limits.UINT32_MIN);
11740
- assert(entityIndex <= Limits.UINT32_MAX);
11741
- var _ret = Module._malloc(8);
11742
- Module.ccall("csp_multiplayer_SpaceEntitySystem_GetEntityByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, entityIndex]);
11743
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11744
- Module._free(_ret);
11745
- return _nPtr;
11705
+ static create() {
11706
+ var _ptr = Module._malloc(8);
11707
+ Module.ccall("csp_multiplayer_MessageInfo_Ctor", "void", ["number"], [_ptr]);
11708
+ var _nPtr = getNativePointer(_ptr);
11709
+ return new MessageInfo(_nPtr);
11746
11710
  }
11747
- /**
11748
- * @description Get an Avatar by its index.
11749
- * /// Note this is not currently thread safe and should only be called from the main thread.
11750
- * /// @param AvatarIndex size_t : The index of the avatar entity to get.
11751
- * @return A pointer to the avatar entity with the given index.
11752
- */
11753
- getAvatarByIndex(avatarIndex) {
11754
- assert(Number.isInteger(avatarIndex));
11755
- assert(avatarIndex >= Limits.UINT32_MIN);
11756
- assert(avatarIndex <= Limits.UINT32_MAX);
11757
- var _ret = Module._malloc(8);
11758
- Module.ccall("csp_multiplayer_SpaceEntitySystem_GetAvatarByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, avatarIndex]);
11759
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11760
- Module._free(_ret);
11761
- return _nPtr;
11711
+ static create_conversationId_isConversation_message(conversationId, isConversation, message) {
11712
+ var _ptr = Module._malloc(8);
11713
+ Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC", "void", ["number", "string", "boolean", "string"], [_ptr, conversationId, isConversation, message]);
11714
+ var _nPtr = getNativePointer(_ptr);
11715
+ return new MessageInfo(_nPtr);
11762
11716
  }
11763
- /**
11764
- * @description Get an Object by its index.
11765
- * /// Note this is not currently thread safe and should only be called from the main thread.
11766
- * /// @param ObjectIndex size_t : The index of the object entity to get.
11767
- * @return A pointer to the object entity with the given index.
11768
- */
11769
- getObjectByIndex(objectIndex) {
11770
- assert(Number.isInteger(objectIndex));
11771
- assert(objectIndex >= Limits.UINT32_MIN);
11772
- assert(objectIndex <= Limits.UINT32_MAX);
11773
- var _ret = Module._malloc(8);
11774
- Module.ccall("csp_multiplayer_SpaceEntitySystem_GetObjectByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, objectIndex]);
11775
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
11776
- Module._free(_ret);
11777
- return _nPtr;
11717
+ static create_conversationId_isConversation_message_messageId(conversationId, isConversation, message, messageId) {
11718
+ var _ptr = Module._malloc(8);
11719
+ Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC", "void", ["number", "string", "boolean", "string", "string"], [_ptr, conversationId, isConversation, message, messageId]);
11720
+ var _nPtr = getNativePointer(_ptr);
11721
+ return new MessageInfo(_nPtr);
11778
11722
  }
11779
- /**
11780
- * @description Add a new entity to the system.
11781
- * /// This can be called at any time from any thread and internally add the entity to a pending
11782
- * list which is then updated in a thread safe manner when ProcessPendingEntityOperations
11783
- * is called from the main thread.
11784
- * /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
11785
- */
11786
- addEntity(entityToAdd) {
11787
- Module.ccall("csp_multiplayer_SpaceEntitySystem_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
11723
+ static create_messageData(messageData) {
11724
+ var _ptr = Module._malloc(8);
11725
+ Module.ccall("csp_multiplayer_MessageInfo_Ctor_MessageInfoRC", "void", ["number", "number"], [_ptr, messageData.pointer]);
11726
+ var _nPtr = getNativePointer(_ptr);
11727
+ return new MessageInfo(_nPtr);
11788
11728
  }
11789
- /**
11790
- * @description Sets a callback to be executed when an entity is remotely created.
11791
- * /// Only one callback may be registered, calling this function again will override whatever was previously set.
11792
- * If this is not set, some patch functions may fail.
11793
- * /// @param Callback EntityCreatedCallback : the callback to execute.
11794
- */
11795
- setEntityCreatedCallback(callback) {
11796
- var _callback = (_stateObject__, arg1) => {
11797
- var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
11798
- callback(_arg1);
11799
- };
11800
- var _callbackPtr = Module.addFunction(_callback, "vii");
11801
- Module.ccall("csp_multiplayer_SpaceEntitySystem_SetEntityCreatedCallback_void_EntityCreatedCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
11729
+ // operator=
11730
+ delete() {
11731
+ if (this.ownsPointer && !this.disposed) {
11732
+ Module.ccall("csp_multiplayer_MessageInfo_Dtor", "void", ["number"], [this.pointer]);
11733
+ this.disposed = true;
11734
+ }
11802
11735
  }
11803
- /**
11804
- * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
11805
- * @param callback - The callback to execute.
11806
- */
11807
- setInitialEntitiesRetrievedCallback(callback) {
11808
- var _callback = (_stateObject__, arg1) => {
11809
- callback(arg1);
11810
- };
11811
- var _callbackPtr = Module.addFunction(_callback, "vii");
11812
- Module.ccall("csp_multiplayer_SpaceEntitySystem_SetInitialEntitiesRetrievedCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
11736
+ get conversationId() {
11737
+ let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_ConversationId", "string", ["number"], [this.pointer]);
11738
+ return _result;
11813
11739
  }
11814
- /**
11815
- * @description Sets a callback to be executed when the script system is ready to run scripts.
11816
- * @param callback - The callback to execute.
11817
- */
11818
- setScriptSystemReadyCallback(callback) {
11819
- var _callback = (_stateObject__, arg1) => {
11820
- callback(arg1);
11821
- };
11822
- var _callbackPtr = Module.addFunction(_callback, "vii");
11823
- Module.ccall("csp_multiplayer_SpaceEntitySystem_SetScriptSystemReadyCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
11740
+ set conversationId(value) {
11741
+ Module.ccall("csp_multiplayer_MessageInfo__Set_ConversationId", "void", ["number", "string"], [this.pointer, value]);
11824
11742
  }
11825
- /**
11826
- * @description Triggers queuing of the SpaceEntities updated components and replicated data.
11827
- * /// Causes the replication of a SpaceEntities data on next Tick() or ProcessPendingEntityOperations(). However, this is bound by an
11828
- * entities rate limit and will only be replicated if there has been sufficient time since the last time the entity sent a message.
11829
- * /// @param EntityToUpdate SpaceEntity : A pointer to the SpaceEntity to update.
11830
- */
11831
- queueEntityUpdate(entityToUpdate) {
11832
- Module.ccall("csp_multiplayer_SpaceEntitySystem_QueueEntityUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToUpdate.pointer]);
11743
+ get createdTimestamp() {
11744
+ let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_CreatedTimestamp", "string", ["number"], [this.pointer]);
11745
+ return _result;
11833
11746
  }
11834
- /**
11835
- * @description Processes pending entity operations and then calls tick on scripts if necessary.
11836
- */
11837
- tickEntities() {
11838
- Module.ccall("csp_multiplayer_SpaceEntitySystem_TickEntities_void", "void", ["number"], [this.pointer]);
11747
+ set createdTimestamp(value) {
11748
+ Module.ccall("csp_multiplayer_MessageInfo__Set_CreatedTimestamp", "void", ["number", "string"], [this.pointer, value]);
11839
11749
  }
11840
- registerEntityScriptAsModule(newEntity) {
11841
- Module.ccall("csp_multiplayer_SpaceEntitySystem_RegisterEntityScriptAsModule_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, newEntity.pointer]);
11750
+ get editedTimestamp() {
11751
+ let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_EditedTimestamp", "string", ["number"], [this.pointer]);
11752
+ return _result;
11842
11753
  }
11843
- bindNewEntityToScript(newEntity) {
11844
- Module.ccall("csp_multiplayer_SpaceEntitySystem_BindNewEntityToScript_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, newEntity.pointer]);
11754
+ set editedTimestamp(value) {
11755
+ Module.ccall("csp_multiplayer_MessageInfo__Set_EditedTimestamp", "void", ["number", "string"], [this.pointer, value]);
11845
11756
  }
11846
- /**
11847
- * @description Sets the script owner for the given entity to the current client
11848
- * @param entity - A pointer to the entity
11849
- */
11850
- claimScriptOwnership(entity) {
11851
- Module.ccall("csp_multiplayer_SpaceEntitySystem_ClaimScriptOwnershipC_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
11757
+ get userId() {
11758
+ let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_UserId", "string", ["number"], [this.pointer]);
11759
+ return _result;
11852
11760
  }
11853
- /**
11854
- * @description Adds the entity to a list of entities to be updated on tick
11855
- * @param entity - A pointer to the entity to be added
11856
- */
11857
- markEntityForUpdate(entity) {
11858
- Module.ccall("csp_multiplayer_SpaceEntitySystem_MarkEntityForUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
11761
+ set userId(value) {
11762
+ Module.ccall("csp_multiplayer_MessageInfo__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
11859
11763
  }
11860
- /**
11861
- * @description Process pending entity adds/removes and Patch message send and receives.
11862
- * /// Note this should only be called from main thread
11863
- */
11864
- processPendingEntityOperations() {
11865
- Module.ccall("csp_multiplayer_SpaceEntitySystem_ProcessPendingEntityOperations_void", "void", ["number"], [this.pointer]);
11764
+ get message() {
11765
+ let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_Message", "string", ["number"], [this.pointer]);
11766
+ return _result;
11866
11767
  }
11867
- /**
11868
- * @description Retrieves all entities from the endpoint, calls "GetAllScopedObjects" currently.
11869
- * /// Note this will generate new entity objects for every entity in the current scopes.
11870
- * If this is called by a client manually without first deleting all existing tracked entities, it is possible there will be duplicates.
11871
- * It is highly advised not to call this function unless you know what you are doing.
11872
- */
11873
- retrieveAllEntities() {
11874
- Module.ccall("csp_multiplayer_SpaceEntitySystem_RetrieveAllEntities_void", "void", ["number"], [this.pointer]);
11875
- }
11876
- /**
11877
- * @description Destroys the client's local view of all currently known entities.
11878
- * /// They still reside on the server, however they will not be accessible in the client application.
11879
- */
11880
- localDestroyAllEntities() {
11881
- Module.ccall("csp_multiplayer_SpaceEntitySystem_LocalDestroyAllEntities_void", "void", ["number"], [this.pointer]);
11882
- }
11883
- /**
11884
- * @description Sets the selected state of an entity, if the operation is acceptable.
11885
- * /// Criteria:
11886
- * For Selection:
11887
- * - Entity must be deselected currently
11888
- * For Deselection:
11889
- * - Entity must be selected currently
11890
- * - Entity must be selected by the client attempting the deselection (SpaceEntity::GetSelectingClientID will return this information)
11891
- * /// @param SelectedState bool : The state to set the entity to, Selected = True, Deselected = false.
11892
- * @param entity - A pointer to the entity to modify selection state on.
11893
- * @return True if a selection state change has occurred, false if no change was made (due to one of the above criteria not being met).
11894
- */
11895
- setSelectionStateOfEntity(selectedState, entity) {
11896
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_SetSelectionStateOfEntity_bool_boolC_SpaceEntityP", "boolean", ["number", "boolean", "number"], [this.pointer, selectedState, entity.pointer]);
11897
- return _result;
11898
- }
11899
- /**
11900
- * @description Enable Leader Election feature.
11901
- */
11902
- enableLeaderElection() {
11903
- Module.ccall("csp_multiplayer_SpaceEntitySystem_EnableLeaderElection_void", "void", ["number"], [this.pointer]);
11904
- }
11905
- /**
11906
- * @description Disable Leader Election feature.
11907
- */
11908
- disableLeaderElection() {
11909
- Module.ccall("csp_multiplayer_SpaceEntitySystem_DisableLeaderElection_void", "void", ["number"], [this.pointer]);
11910
- }
11911
- /**
11912
- * @description Check if the Leader Election feature is enabled.
11913
- * @return True if enabled, false otherwise.
11914
- */
11915
- isLeaderElectionEnabled() {
11916
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_IsLeaderElectionEnabledC_bool", "boolean", ["number"], [this.pointer]);
11917
- return _result;
11918
- }
11919
- /**
11920
- * @description Debug helper to get the id of the currently elected script leader.
11921
- * @return The id of the leader.
11922
- */
11923
- getLeaderId() {
11924
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetLeaderIdC_uint64_t", "bigint", ["number"], [this.pointer]);
11925
- const _unfixedValue = _result;
11926
- let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
11927
- _result = _fixedValue;
11928
- return _result;
11929
- }
11930
- /**
11931
- * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
11932
- * @return True if enabled, false otherwise.
11933
- */
11934
- getEntityPatchRateLimitEnabled() {
11935
- let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetEntityPatchRateLimitEnabledC_bool", "boolean", ["number"], [this.pointer]);
11936
- return _result;
11937
- }
11938
- /**
11939
- * @description Set the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
11940
- * /// This feature is enabled by default and should only be disabled if you are encountering issues.
11941
- * /// @param Enabled : sets if the feature should be enabled or not.
11942
- * \rst
11943
- * .. note::
11944
- * If disabling this feature, more requests will be made to Magnopus Connected Services,
11945
- * and consequently more patch merges may occur on the server as a result.
11946
- * \endrst
11947
- */
11948
- setEntityPatchRateLimitEnabled(enabled) {
11949
- Module.ccall("csp_multiplayer_SpaceEntitySystem_SetEntityPatchRateLimitEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, enabled]);
11950
- }
11951
- /**
11952
- * @description Retrieves all entities that exist at the root level (do not have a parent entity).
11953
- * @return A list of root entities.
11954
- */
11955
- getRootHierarchyEntities() {
11956
- var _ret = Module._malloc(8);
11957
- Module.ccall("csp_multiplayer_SpaceEntitySystem_GetRootHierarchyEntitiesC_ListPC", "void", ["number", "number"], [_ret, this.pointer]);
11958
- var _nPtr = new Common.List(getNativePointer(_ret), csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
11959
- Module._free(_ret);
11960
- return _nPtr;
11961
- }
11962
- delete() {
11963
- if (this.ownsPointer && !this.disposed) {
11964
- Module.ccall("csp_multiplayer_SpaceEntitySystem_Dtor", "void", ["number"], [this.pointer]);
11965
- this.disposed = true;
11966
- }
11967
- }
11968
- }
11969
- Multiplayer.SpaceEntitySystem = SpaceEntitySystem;
11970
- })(Multiplayer || (Multiplayer = {}));
11971
- (function (Multiplayer) {
11972
- /**
11973
- * @description Simple class for holding the position, rotation and scale of a transform.
11974
- */
11975
- class SpaceTransform extends NativeClassWrapper {
11976
- /** @internal */
11977
- constructor(pointer) {
11978
- super(pointer);
11979
- }
11980
- /**
11981
- * @description Default constuctor for the SpaceTransform
11982
- */
11983
- static create() {
11984
- var _ptr = Module._malloc(8);
11985
- Module.ccall("csp_multiplayer_SpaceTransform_Ctor", "void", ["number"], [_ptr]);
11986
- var _nPtr = getNativePointer(_ptr);
11987
- return new SpaceTransform(_nPtr);
11988
- }
11989
- /**
11990
- * @description Custom constructor for the SpaceTransform.
11991
- * @param position - The position value for the transform.
11992
- * @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
11993
- * @param scale - The scale value for the transform.
11994
- */
11995
- static create_position_rotation_scale(position, rotation, scale) {
11996
- var _ptr = Module._malloc(8);
11997
- Module.ccall("csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC", "void", ["number", "number", "number", "number"], [_ptr, position.pointer, rotation.pointer, scale.pointer]);
11998
- var _nPtr = getNativePointer(_ptr);
11999
- return new SpaceTransform(_nPtr);
12000
- }
12001
- /**
12002
- * @description Equality operator
12003
- * @param spaceTransform - Transform
12004
- */
12005
- // operator==
12006
- /**
12007
- * @description Inequality operator
12008
- * @param spaceTransform - Transform
12009
- */
12010
- // operator!=
12011
- /**
12012
- * @description Multiplication operator
12013
- * @param spaceTransform - Transform
12014
- * NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
12015
- */
12016
- // operator*
12017
- delete() {
12018
- if (this.ownsPointer && !this.disposed) {
12019
- Module.ccall("csp_multiplayer_SpaceTransform_Dtor", "void", ["number"], [this.pointer]);
12020
- this.disposed = true;
12021
- }
12022
- }
12023
- get position() {
12024
- const _ptr = Module._malloc(8);
12025
- Module.ccall("csp_multiplayer_SpaceTransform__Get_Position", "void", ["number", "number"], [_ptr, this.pointer]);
12026
- const _nPtr = getNativePointer(_ptr);
12027
- return new Common.Vector3(_nPtr);
12028
- }
12029
- set position(value) {
12030
- Module.ccall("csp_multiplayer_SpaceTransform__Set_Position", "void", ["number", "number"], [this.pointer, value.pointer]);
12031
- }
12032
- get rotation() {
12033
- const _ptr = Module._malloc(8);
12034
- Module.ccall("csp_multiplayer_SpaceTransform__Get_Rotation", "void", ["number", "number"], [_ptr, this.pointer]);
12035
- const _nPtr = getNativePointer(_ptr);
12036
- return new Common.Vector4(_nPtr);
12037
- }
12038
- set rotation(value) {
12039
- Module.ccall("csp_multiplayer_SpaceTransform__Set_Rotation", "void", ["number", "number"], [this.pointer, value.pointer]);
12040
- }
12041
- get scale() {
12042
- const _ptr = Module._malloc(8);
12043
- Module.ccall("csp_multiplayer_SpaceTransform__Get_Scale", "void", ["number", "number"], [_ptr, this.pointer]);
12044
- const _nPtr = getNativePointer(_ptr);
12045
- return new Common.Vector3(_nPtr);
12046
- }
12047
- set scale(value) {
12048
- Module.ccall("csp_multiplayer_SpaceTransform__Set_Scale", "void", ["number", "number"], [this.pointer, value.pointer]);
12049
- }
12050
- }
12051
- Multiplayer.SpaceTransform = SpaceTransform;
12052
- })(Multiplayer || (Multiplayer = {}));
12053
- (function (Multiplayer) {
12054
- /**
12055
- @ingroup Conversation
12056
- * @description Contains information about a conversation message.
12057
- */
12058
- class MessageInfo extends NativeClassWrapper {
12059
- /** @internal */
12060
- constructor(pointer) {
12061
- super(pointer);
12062
- }
12063
- static create() {
12064
- var _ptr = Module._malloc(8);
12065
- Module.ccall("csp_multiplayer_MessageInfo_Ctor", "void", ["number"], [_ptr]);
12066
- var _nPtr = getNativePointer(_ptr);
12067
- return new MessageInfo(_nPtr);
12068
- }
12069
- static create_conversationId_isConversation_message(conversationId, isConversation, message) {
12070
- var _ptr = Module._malloc(8);
12071
- Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC", "void", ["number", "string", "boolean", "string"], [_ptr, conversationId, isConversation, message]);
12072
- var _nPtr = getNativePointer(_ptr);
12073
- return new MessageInfo(_nPtr);
12074
- }
12075
- static create_conversationId_isConversation_message_messageId(conversationId, isConversation, message, messageId) {
12076
- var _ptr = Module._malloc(8);
12077
- Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC", "void", ["number", "string", "boolean", "string", "string"], [_ptr, conversationId, isConversation, message, messageId]);
12078
- var _nPtr = getNativePointer(_ptr);
12079
- return new MessageInfo(_nPtr);
12080
- }
12081
- static create_messageData(messageData) {
12082
- var _ptr = Module._malloc(8);
12083
- Module.ccall("csp_multiplayer_MessageInfo_Ctor_MessageInfoRC", "void", ["number", "number"], [_ptr, messageData.pointer]);
12084
- var _nPtr = getNativePointer(_ptr);
12085
- return new MessageInfo(_nPtr);
12086
- }
12087
- delete() {
12088
- if (this.ownsPointer && !this.disposed) {
12089
- Module.ccall("csp_multiplayer_MessageInfo_Dtor", "void", ["number"], [this.pointer]);
12090
- this.disposed = true;
12091
- }
12092
- }
12093
- get conversationId() {
12094
- let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_ConversationId", "string", ["number"], [this.pointer]);
12095
- return _result;
12096
- }
12097
- set conversationId(value) {
12098
- Module.ccall("csp_multiplayer_MessageInfo__Set_ConversationId", "void", ["number", "string"], [this.pointer, value]);
12099
- }
12100
- get createdTimestamp() {
12101
- let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_CreatedTimestamp", "string", ["number"], [this.pointer]);
12102
- return _result;
12103
- }
12104
- set createdTimestamp(value) {
12105
- Module.ccall("csp_multiplayer_MessageInfo__Set_CreatedTimestamp", "void", ["number", "string"], [this.pointer, value]);
12106
- }
12107
- get editedTimestamp() {
12108
- let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_EditedTimestamp", "string", ["number"], [this.pointer]);
12109
- return _result;
12110
- }
12111
- set editedTimestamp(value) {
12112
- Module.ccall("csp_multiplayer_MessageInfo__Set_EditedTimestamp", "void", ["number", "string"], [this.pointer, value]);
12113
- }
12114
- get userId() {
12115
- let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_UserId", "string", ["number"], [this.pointer]);
12116
- return _result;
12117
- }
12118
- set userId(value) {
12119
- Module.ccall("csp_multiplayer_MessageInfo__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
12120
- }
12121
- get message() {
12122
- let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_Message", "string", ["number"], [this.pointer]);
12123
- return _result;
12124
- }
12125
- set message(value) {
12126
- Module.ccall("csp_multiplayer_MessageInfo__Set_Message", "void", ["number", "string"], [this.pointer, value]);
11768
+ set message(value) {
11769
+ Module.ccall("csp_multiplayer_MessageInfo__Set_Message", "void", ["number", "string"], [this.pointer, value]);
12127
11770
  }
12128
11771
  get messageId() {
12129
11772
  let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_MessageId", "string", ["number"], [this.pointer]);
@@ -12252,6 +11895,7 @@ export class CSPFoundation {
12252
11895
  var _nPtr = getNativePointer(_ptr);
12253
11896
  return new AnnotationData(_nPtr);
12254
11897
  }
11898
+ // operator=
12255
11899
  delete() {
12256
11900
  if (this.ownsPointer && !this.disposed) {
12257
11901
  Module.ccall("csp_multiplayer_AnnotationData_Dtor", "void", ["number"], [this.pointer]);
@@ -12792,6 +12436,17 @@ export class CSPFoundation {
12792
12436
  Module._free(_ret);
12793
12437
  return _nPtr;
12794
12438
  }
12439
+ /**
12440
+ * @description Retrieves the Application Settings system.
12441
+ * @return Pointer to the application settings system class
12442
+ */
12443
+ getApplicationSettingsSystem() {
12444
+ var _ret = Module._malloc(8);
12445
+ Module.ccall("csp_systems_SystemsManager_GetApplicationSettingsSystem_ApplicationSettingsSystemP", "void", ["number", "number"], [_ret, this.pointer]);
12446
+ var _nPtr = new Systems.ApplicationSettingsSystem(getNativePointer(_ret));
12447
+ Module._free(_ret);
12448
+ return _nPtr;
12449
+ }
12795
12450
  /**
12796
12451
  * @description Retrieves the Settings system.
12797
12452
  * @return Pointer to the settings system class
@@ -12891,13 +12546,6 @@ export class CSPFoundation {
12891
12546
  Module._free(_ret);
12892
12547
  return _nPtr;
12893
12548
  }
12894
- getSpaceEntitySystem() {
12895
- var _ret = Module._malloc(8);
12896
- Module.ccall("csp_systems_SystemsManager_GetSpaceEntitySystem_SpaceEntitySystemP", "void", ["number", "number"], [_ret, this.pointer]);
12897
- var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
12898
- Module._free(_ret);
12899
- return _nPtr;
12900
- }
12901
12549
  getMultiplayerConnection() {
12902
12550
  var _ret = Module._malloc(8);
12903
12551
  Module.ccall("csp_systems_SystemsManager_GetMultiplayerConnection_MultiplayerConnectionP", "void", ["number", "number"], [_ret, this.pointer]);
@@ -12912,6 +12560,13 @@ export class CSPFoundation {
12912
12560
  Module._free(_ret);
12913
12561
  return _nPtr;
12914
12562
  }
12563
+ makeOnlineRealtimeEngine() {
12564
+ var _ret = Module._malloc(8);
12565
+ Module.ccall("csp_systems_SystemsManager_MakeOnlineRealtimeEngine_OnlineRealtimeEngineP", "void", ["number", "number"], [_ret, this.pointer]);
12566
+ var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
12567
+ Module._free(_ret);
12568
+ return _nPtr;
12569
+ }
12915
12570
  }
12916
12571
  Systems.SystemsManager = SystemsManager;
12917
12572
  })(Systems || (Systems = {}));
@@ -13136,6 +12791,7 @@ export class CSPFoundation {
13136
12791
  var _nPtr = getNativePointer(_ptr);
13137
12792
  return new Asset(_nPtr);
13138
12793
  }
12794
+ // operator=
13139
12795
  delete() {
13140
12796
  if (this.ownsPointer && !this.disposed) {
13141
12797
  Module.ccall("csp_systems_Asset_Dtor", "void", ["number"], [this.pointer]);
@@ -14908,39 +14564,94 @@ export class CSPFoundation {
14908
14564
  })(Systems || (Systems = {}));
14909
14565
  (function (Systems) {
14910
14566
  /**
14911
- @ingroup Settings System
14912
- * @description Data representation of a Settings collection which maps to a UserService::Settings.
14567
+ @ingroup Application Settings System
14568
+ * @description Represents configuration settings for an application context.
14913
14569
  */
14914
- class SettingsCollection extends NativeClassWrapper {
14570
+ class ApplicationSettings extends NativeClassWrapper {
14915
14571
  /** @internal */
14916
14572
  constructor(pointer) {
14917
14573
  super(pointer);
14918
14574
  }
14919
14575
  static create() {
14920
14576
  var _ptr = Module._malloc(8);
14921
- Module.ccall("csp_systems_SettingsCollection_Ctor", "void", ["number"], [_ptr]);
14577
+ Module.ccall("csp_systems_ApplicationSettings_Ctor", "void", ["number"], [_ptr]);
14922
14578
  var _nPtr = getNativePointer(_ptr);
14923
- return new SettingsCollection(_nPtr);
14579
+ return new ApplicationSettings(_nPtr);
14924
14580
  }
14925
14581
  delete() {
14926
14582
  if (this.ownsPointer && !this.disposed) {
14927
- Module.ccall("csp_systems_SettingsCollection_Dtor", "void", ["number"], [this.pointer]);
14583
+ Module.ccall("csp_systems_ApplicationSettings_Dtor", "void", ["number"], [this.pointer]);
14928
14584
  this.disposed = true;
14929
14585
  }
14930
14586
  }
14931
- get userId() {
14932
- let _result = Module.ccall("csp_systems_SettingsCollection__Get_UserId", "string", ["number"], [this.pointer]);
14587
+ get applicationName() {
14588
+ let _result = Module.ccall("csp_systems_ApplicationSettings__Get_ApplicationName", "string", ["number"], [this.pointer]);
14933
14589
  return _result;
14934
14590
  }
14935
- set userId(value) {
14936
- Module.ccall("csp_systems_SettingsCollection__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
14591
+ set applicationName(value) {
14592
+ Module.ccall("csp_systems_ApplicationSettings__Set_ApplicationName", "void", ["number", "string"], [this.pointer, value]);
14937
14593
  }
14938
14594
  get context() {
14939
- let _result = Module.ccall("csp_systems_SettingsCollection__Get_Context", "string", ["number"], [this.pointer]);
14595
+ let _result = Module.ccall("csp_systems_ApplicationSettings__Get_Context", "string", ["number"], [this.pointer]);
14940
14596
  return _result;
14941
14597
  }
14942
14598
  set context(value) {
14943
- Module.ccall("csp_systems_SettingsCollection__Set_Context", "void", ["number", "string"], [this.pointer, value]);
14599
+ Module.ccall("csp_systems_ApplicationSettings__Set_Context", "void", ["number", "string"], [this.pointer, value]);
14600
+ }
14601
+ get allowAnonymous() {
14602
+ let _result = Module.ccall("csp_systems_ApplicationSettings__Get_AllowAnonymous", "boolean", ["number"], [this.pointer]);
14603
+ return _result;
14604
+ }
14605
+ set allowAnonymous(value) {
14606
+ Module.ccall("csp_systems_ApplicationSettings__Set_AllowAnonymous", "void", ["number", "boolean"], [this.pointer, value]);
14607
+ }
14608
+ get settings() {
14609
+ const _ptr = Module._malloc(8);
14610
+ Module.ccall("csp_systems_ApplicationSettings__Get_Settings", "void", ["number", "number"], [_ptr, this.pointer]);
14611
+ const _nPtr = getNativePointer(_ptr);
14612
+ return new Common.Map(_nPtr, StringFactory, "String", StringFactory, "String");
14613
+ }
14614
+ set settings(value) {
14615
+ Module.ccall("csp_systems_ApplicationSettings__Set_Settings", "void", ["number", "number"], [this.pointer, value.pointer]);
14616
+ }
14617
+ }
14618
+ Systems.ApplicationSettings = ApplicationSettings;
14619
+ })(Systems || (Systems = {}));
14620
+ (function (Systems) {
14621
+ /**
14622
+ @ingroup Settings System
14623
+ * @description Data representation of a Settings collection which maps to a UserService::Settings.
14624
+ */
14625
+ class SettingsCollection extends NativeClassWrapper {
14626
+ /** @internal */
14627
+ constructor(pointer) {
14628
+ super(pointer);
14629
+ }
14630
+ static create() {
14631
+ var _ptr = Module._malloc(8);
14632
+ Module.ccall("csp_systems_SettingsCollection_Ctor", "void", ["number"], [_ptr]);
14633
+ var _nPtr = getNativePointer(_ptr);
14634
+ return new SettingsCollection(_nPtr);
14635
+ }
14636
+ delete() {
14637
+ if (this.ownsPointer && !this.disposed) {
14638
+ Module.ccall("csp_systems_SettingsCollection_Dtor", "void", ["number"], [this.pointer]);
14639
+ this.disposed = true;
14640
+ }
14641
+ }
14642
+ get userId() {
14643
+ let _result = Module.ccall("csp_systems_SettingsCollection__Get_UserId", "string", ["number"], [this.pointer]);
14644
+ return _result;
14645
+ }
14646
+ set userId(value) {
14647
+ Module.ccall("csp_systems_SettingsCollection__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
14648
+ }
14649
+ get context() {
14650
+ let _result = Module.ccall("csp_systems_SettingsCollection__Get_Context", "string", ["number"], [this.pointer]);
14651
+ return _result;
14652
+ }
14653
+ set context(value) {
14654
+ Module.ccall("csp_systems_SettingsCollection__Set_Context", "void", ["number", "string"], [this.pointer, value]);
14944
14655
  }
14945
14656
  get settings() {
14946
14657
  const _ptr = Module._malloc(8);
@@ -15159,6 +14870,7 @@ export class CSPFoundation {
15159
14870
  var _nPtr = getNativePointer(_ptr);
15160
14871
  return new UserRoleInfo(_nPtr);
15161
14872
  }
14873
+ // operator=
15162
14874
  delete() {
15163
14875
  if (this.ownsPointer && !this.disposed) {
15164
14876
  Module.ccall("csp_systems_UserRoleInfo_Dtor", "void", ["number"], [this.pointer]);
@@ -15204,6 +14916,7 @@ export class CSPFoundation {
15204
14916
  var _nPtr = getNativePointer(_ptr);
15205
14917
  return new InviteUserRoleInfo(_nPtr);
15206
14918
  }
14919
+ // operator=
15207
14920
  delete() {
15208
14921
  if (this.ownsPointer && !this.disposed) {
15209
14922
  Module.ccall("csp_systems_InviteUserRoleInfo_Dtor", "void", ["number"], [this.pointer]);
@@ -15249,6 +14962,7 @@ export class CSPFoundation {
15249
14962
  var _nPtr = getNativePointer(_ptr);
15250
14963
  return new InviteUserRoleInfoCollection(_nPtr);
15251
14964
  }
14965
+ // operator=
15252
14966
  delete() {
15253
14967
  if (this.ownsPointer && !this.disposed) {
15254
14968
  Module.ccall("csp_systems_InviteUserRoleInfoCollection_Dtor", "void", ["number"], [this.pointer]);
@@ -16233,74 +15947,506 @@ export class CSPFoundation {
16233
15947
  let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_ChangeType", "number", ["number"], [this.pointer]);
16234
15948
  return _result;
16235
15949
  }
16236
- set changeType(value) {
16237
- Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_ChangeType", "void", ["number", "number"], [this.pointer, value]);
15950
+ set changeType(value) {
15951
+ Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_ChangeType", "void", ["number", "number"], [this.pointer, value]);
15952
+ }
15953
+ get userId() {
15954
+ let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_UserId", "string", ["number"], [this.pointer]);
15955
+ return _result;
15956
+ }
15957
+ set userId(value) {
15958
+ Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
15959
+ }
15960
+ }
15961
+ Common.AccessControlChangedNetworkEventData = AccessControlChangedNetworkEventData;
15962
+ })(Common || (Common = {}));
15963
+ (function (Common) {
15964
+ class SequenceChangedNetworkEventData extends Common.NetworkEventData {
15965
+ /** @internal */
15966
+ constructor(pointer) {
15967
+ super(pointer);
15968
+ }
15969
+ static fromNetworkEventData(baseInstance) {
15970
+ const nativeClassWrapper = baseInstance;
15971
+ return new Common.SequenceChangedNetworkEventData(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
15972
+ }
15973
+ static create() {
15974
+ var _ptr = Module._malloc(8);
15975
+ Module.ccall("csp_common_SequenceChangedNetworkEventData_Ctor", "void", ["number"], [_ptr]);
15976
+ var _nPtr = getNativePointer(_ptr);
15977
+ return new SequenceChangedNetworkEventData(_nPtr);
15978
+ }
15979
+ delete() {
15980
+ if (this.ownsPointer && !this.disposed) {
15981
+ Module.ccall("csp_common_SequenceChangedNetworkEventData_Dtor", "void", ["number"], [this.pointer]);
15982
+ this.disposed = true;
15983
+ }
15984
+ }
15985
+ get updateType() {
15986
+ let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_UpdateType", "number", ["number"], [this.pointer]);
15987
+ return _result;
15988
+ }
15989
+ set updateType(value) {
15990
+ Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_UpdateType", "void", ["number", "number"], [this.pointer, value]);
15991
+ }
15992
+ get key() {
15993
+ let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_Key", "string", ["number"], [this.pointer]);
15994
+ return _result;
15995
+ }
15996
+ set key(value) {
15997
+ Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_Key", "void", ["number", "string"], [this.pointer, value]);
15998
+ }
15999
+ get newKey() {
16000
+ let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_NewKey", "string", ["number"], [this.pointer]);
16001
+ return _result;
16002
+ }
16003
+ set newKey(value) {
16004
+ Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_NewKey", "void", ["number", "string"], [this.pointer, value]);
16005
+ }
16006
+ get hotspotData() {
16007
+ const _ptr = Module._malloc(8);
16008
+ Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_HotspotData", "void", ["number", "number"], [_ptr, this.pointer]);
16009
+ const _nPtr = getNativePointer(_ptr);
16010
+ return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
16011
+ }
16012
+ set hotspotData(value) {
16013
+ Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_HotspotData", "void", ["number", "number"], [this.pointer, value.pointer]);
16014
+ }
16015
+ }
16016
+ Common.SequenceChangedNetworkEventData = SequenceChangedNetworkEventData;
16017
+ })(Common || (Common = {}));
16018
+ (function (Multiplayer) {
16019
+ /**
16020
+ * @description Class for creating and managing multiplayer objects known as space entities.
16021
+ * /// This provides functions to create and manage multiple player avatars and other objects.
16022
+ * It manages things like queueing updated entities and triggering tick events. Callbacks
16023
+ * can be registered for certain events that occur within the entity system so clients can
16024
+ * react appropriately.
16025
+ */
16026
+ class OnlineRealtimeEngine extends Common.IRealtimeEngine {
16027
+ /** @internal */
16028
+ constructor(pointer) {
16029
+ super(pointer);
16030
+ }
16031
+ static fromIRealtimeEngine(baseInstance) {
16032
+ const nativeClassWrapper = baseInstance;
16033
+ return new Multiplayer.OnlineRealtimeEngine(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
16034
+ }
16035
+ /**
16036
+ * @description OnlineRealtimeEngine constructor
16037
+ * @param inMultiplayerConnection - The multiplayer connection to construct the onlinerealtimeengine with
16038
+ * @param logSystem - Logger such that this system can print status and debug output
16039
+ * @param networkEventBus - Reference the the network event bus, used for leadership election messaging.
16040
+ * @param remoteScriptRunner - Object capable of running a script. Called to execute scripts when the leader
16041
+ * election system
16042
+ */
16043
+ static create_multiplayerConnection_logSystem_networkEventBus_remoteScriptRunner(multiplayerConnection, logSystem, networkEventBus, remoteScriptRunner) {
16044
+ var _ptr = Module._malloc(8);
16045
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_Ctor_MultiplayerConnectionR_LogSystemR_NetworkEventBusR_IJSScriptRunnerR", "void", ["number", "number", "number", "number", "number"], [
16046
+ _ptr,
16047
+ multiplayerConnection.pointer,
16048
+ logSystem.pointer,
16049
+ networkEventBus.pointer,
16050
+ remoteScriptRunner.pointer,
16051
+ ]);
16052
+ var _nPtr = getNativePointer(_ptr);
16053
+ return new OnlineRealtimeEngine(_nPtr);
16054
+ }
16055
+ /**
16056
+ * @description Returns the concrete type of the instantiation of the abstract IRealtimeEngine.
16057
+ */
16058
+ getRealtimeEngineType() {
16059
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetRealtimeEngineTypeC_RealtimeEngineType", "number", ["number"], [this.pointer]);
16060
+ return _result;
16061
+ }
16062
+ /**
16063
+ * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
16064
+ * @param name - The entity name of the newly created avatar entity.
16065
+ * @param userId - The Id of the user creating the avatar. This can be fetched from csp::systems::UserSystem::GetLoginState
16066
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
16067
+ * @param state - The initial Avatar State to set.
16068
+ * @param avatarId - The ID to be set on the AvatarSpaceComponent
16069
+ * @param avatarPlayMode - The Initial AvatarPlayMode to set.
16070
+ * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
16071
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
16072
+ */
16073
+ async createAvatar(name, userId, spaceTransform, isVisible, state, avatarId, avatarPlayMode) {
16074
+ var _resolve;
16075
+ var _promise = new Promise((_r) => {
16076
+ _resolve = _r;
16077
+ });
16078
+ var _callbackPtr;
16079
+ var _callback = (_stateObject__, arg1) => {
16080
+ var _arg1Ptr = getNativePointer(arg1);
16081
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
16082
+ _resolve(_arg1Instance);
16083
+ Module.removeFunction(_callbackPtr);
16084
+ };
16085
+ _callbackPtr = Module.addFunction(_callback, "vii");
16086
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarState_StringRC_AvatarPlayMode_EntityCreatedCallback", "void", [
16087
+ "number",
16088
+ "string",
16089
+ "string",
16090
+ "number",
16091
+ "boolean",
16092
+ "number",
16093
+ "string",
16094
+ "number",
16095
+ "number",
16096
+ "number",
16097
+ ], [
16098
+ this.pointer,
16099
+ name,
16100
+ userId,
16101
+ spaceTransform.pointer,
16102
+ isVisible,
16103
+ state,
16104
+ avatarId,
16105
+ avatarPlayMode,
16106
+ _callbackPtr,
16107
+ 0,
16108
+ ]);
16109
+ return _promise;
16110
+ }
16111
+ /**
16112
+ * @description Create and add a SpaceEntity, with relevant default values.
16113
+ * @param name - The name of the newly created SpaceEntity.
16114
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
16115
+ * @param parentID - ID of another entity in the space that this entity should be created as a child to. If empty,
16116
+ * entity is created as a root entity.
16117
+ * @param callback - A callback that executes when the creation is complete,
16118
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
16119
+ */
16120
+ async createEntity(name, spaceTransform, parentID) {
16121
+ var _resolve;
16122
+ var _promise = new Promise((_r) => {
16123
+ _resolve = _r;
16124
+ });
16125
+ var _callbackPtr;
16126
+ var _callback = (_stateObject__, arg1) => {
16127
+ var _arg1Ptr = getNativePointer(arg1);
16128
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
16129
+ _resolve(_arg1Instance);
16130
+ Module.removeFunction(_callbackPtr);
16131
+ };
16132
+ _callbackPtr = Module.addFunction(_callback, "vii");
16133
+ var parentIDPointer = 0;
16134
+ if (parentID != null) {
16135
+ parentIDPointer = Module._malloc(4);
16136
+ Module.setValue(parentIDPointer, parentID, "i32");
16137
+ }
16138
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback", "void", ["number", "string", "number", "bigint", "number", "number"], [
16139
+ this.pointer,
16140
+ name,
16141
+ spaceTransform.pointer,
16142
+ parentIDPointer,
16143
+ _callbackPtr,
16144
+ 0,
16145
+ ]);
16146
+ if (parentIDPointer) {
16147
+ Module._free(parentIDPointer);
16148
+ }
16149
+ return _promise;
16150
+ }
16151
+ /**
16152
+ * @description Add a new entity to the system.
16153
+ * /// This can be called at any time from any thread and internally add the entity to a pending
16154
+ * list which is then updated in a thread safe manner when ProcessPendingEntityOperations
16155
+ * is called from the main thread.
16156
+ * /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
16157
+ */
16158
+ addEntity(entityToAdd) {
16159
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
16160
+ }
16161
+ /**
16162
+ * @description Destroy the specified entity.
16163
+ * @param entity - A non-owning pointer to the entity to be destroyed.
16164
+ * @param callback - A callback that executes when the entity destruction is complete.
16165
+ */
16166
+ async destroyEntity(entity) {
16167
+ var _resolve;
16168
+ var _promise = new Promise((_r) => {
16169
+ _resolve = _r;
16170
+ });
16171
+ var _callbackPtr;
16172
+ var _callback = (_stateObject__, arg1) => {
16173
+ _resolve(!!arg1);
16174
+ Module.removeFunction(_callbackPtr);
16175
+ };
16176
+ _callbackPtr = Module.addFunction(_callback, "vii");
16177
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_DestroyEntity_void_SpaceEntityP_CallbackHandler", "void", ["number", "number", "number", "number"], [this.pointer, entity.pointer, _callbackPtr, 0]);
16178
+ return _promise;
16179
+ }
16180
+ /**
16181
+ * @description Sets a callback to be executed when an entity is fully created.
16182
+ * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
16183
+ * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
16184
+ */
16185
+ setEntityCreatedCallback(callback) {
16186
+ var _callback = (_stateObject__, arg1) => {
16187
+ var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
16188
+ callback(_arg1);
16189
+ };
16190
+ var _callbackPtr = Module.addFunction(_callback, "vii");
16191
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetEntityCreatedCallback_void_EntityCreatedCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
16192
+ }
16193
+ /**
16194
+ * @description Finds the first found SpaceEntity of a matching Name.
16195
+ * @param name - The name to search.
16196
+ * @return A non-owning pointer to the first found matching SpaceEntity.
16197
+ */
16198
+ findSpaceEntity(name) {
16199
+ var _ret = Module._malloc(8);
16200
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntity_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
16201
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16202
+ Module._free(_ret);
16203
+ return _nPtr;
16204
+ }
16205
+ /**
16206
+ * @description Finds the first found SpaceEntity that has the ID EntityId.
16207
+ * @param entityId - The Id to look for.
16208
+ * @return A non-owning pointer to the first found matching SpaceEntity.
16209
+ */
16210
+ findSpaceEntityById(entityId) {
16211
+ assert(entityId >= Limits.UINT64_MIN);
16212
+ assert(entityId <= Limits.UINT64_MAX);
16213
+ var _ret = Module._malloc(8);
16214
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntityById_SpaceEntityP_uint64_t", "void", ["number", "number", "bigint"], [_ret, this.pointer, entityId]);
16215
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16216
+ Module._free(_ret);
16217
+ return _nPtr;
16218
+ }
16219
+ /**
16220
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will contain an AvatarSpaceComponent.
16221
+ * @param name - The name to search for.
16222
+ * @return A pointer to the first found matching SpaceEntity.
16223
+ */
16224
+ findSpaceAvatar(name) {
16225
+ var _ret = Module._malloc(8);
16226
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceAvatar_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
16227
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16228
+ Module._free(_ret);
16229
+ return _nPtr;
16230
+ }
16231
+ /**
16232
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will not contain an AvatarSpaceComponent.
16233
+ * @param name - The name to search for.
16234
+ * @return A pointer to the first found matching SpaceEntity.
16235
+ */
16236
+ findSpaceObject(name) {
16237
+ var _ret = Module._malloc(8);
16238
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceObject_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
16239
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16240
+ Module._free(_ret);
16241
+ return _nPtr;
16242
+ }
16243
+ /**
16244
+ * @description Get an Entity by its index.
16245
+ * /// @param EntityIndex size_t : The index of the entity to get.
16246
+ * @return A non-owning pointer to the entity at the given index.
16247
+ */
16248
+ getEntityByIndex(entityIndex) {
16249
+ assert(Number.isInteger(entityIndex));
16250
+ assert(entityIndex >= Limits.UINT32_MIN);
16251
+ assert(entityIndex <= Limits.UINT32_MAX);
16252
+ var _ret = Module._malloc(8);
16253
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetEntityByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, entityIndex]);
16254
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16255
+ Module._free(_ret);
16256
+ return _nPtr;
16257
+ }
16258
+ /**
16259
+ * @description Get an Avatar by its index. The returned pointer will be an entity that contains an AvatarSpaceComponent.
16260
+ * /// @param AvatarIndex size_t : The index of the avatar entity to get.
16261
+ * @return A non-owning pointer to the avatar entity with the given index.
16262
+ */
16263
+ getAvatarByIndex(avatarIndex) {
16264
+ assert(Number.isInteger(avatarIndex));
16265
+ assert(avatarIndex >= Limits.UINT32_MIN);
16266
+ assert(avatarIndex <= Limits.UINT32_MAX);
16267
+ var _ret = Module._malloc(8);
16268
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetAvatarByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, avatarIndex]);
16269
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16270
+ Module._free(_ret);
16271
+ return _nPtr;
16272
+ }
16273
+ /**
16274
+ * @description Get an Object by its index. The returned pointer will be an entity that does not contain an AvatarSpaceComponent.
16275
+ * /// @param ObjectIndex size_t : The index of the object entity to get.
16276
+ * @return A non-owning pointer to the object entity with the given index.
16277
+ */
16278
+ getObjectByIndex(objectIndex) {
16279
+ assert(Number.isInteger(objectIndex));
16280
+ assert(objectIndex >= Limits.UINT32_MIN);
16281
+ assert(objectIndex <= Limits.UINT32_MAX);
16282
+ var _ret = Module._malloc(8);
16283
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetObjectByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, objectIndex]);
16284
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
16285
+ Module._free(_ret);
16286
+ return _nPtr;
16287
+ }
16288
+ /**
16289
+ * @description Get the number of total entities in the system.
16290
+ * @return The total number of entities.
16291
+ */
16292
+ getNumEntities() {
16293
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumEntitiesC_size_t", "number", ["number"], [this.pointer]);
16294
+ const _unfixedValue = _result;
16295
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
16296
+ _result = _fixedValue;
16297
+ return _result;
16298
+ }
16299
+ /**
16300
+ * @description Get the number of total Avatars in the system. Avatars are entities that contain AvatarSpaceComponents.
16301
+ * @return The total number of Avatar entities.
16302
+ */
16303
+ getNumAvatars() {
16304
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumAvatarsC_size_t", "number", ["number"], [this.pointer]);
16305
+ const _unfixedValue = _result;
16306
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
16307
+ _result = _fixedValue;
16308
+ return _result;
16309
+ }
16310
+ /**
16311
+ * @description Get the number of total Objects in the system. Objects are entities that do not contain AvatarSpaceComponents.
16312
+ * @return The total number of object entities.
16313
+ */
16314
+ getNumObjects() {
16315
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumObjectsC_size_t", "number", ["number"], [this.pointer]);
16316
+ const _unfixedValue = _result;
16317
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
16318
+ _result = _fixedValue;
16319
+ return _result;
16320
+ }
16321
+ /**
16322
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
16323
+ * @return A list of root entities containing non-owning pointers to entities.
16324
+ */
16325
+ getRootHierarchyEntities() {
16326
+ var _ret = Module._malloc(8);
16327
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetRootHierarchyEntitiesC_ListPC", "void", ["number", "number"], [_ret, this.pointer]);
16328
+ var _nPtr = new Common.List(getNativePointer(_ret), csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
16329
+ Module._free(_ret);
16330
+ return _nPtr;
16331
+ }
16332
+ /**
16333
+ * @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
16334
+ * From a client perspective, ProcessPendingEntityOperations is normally called via the CSPFoundation::Tick method.
16335
+ * @param entity - A non-owning pointer to the entity to be marked.
16336
+ */
16337
+ markEntityForUpdate(entity) {
16338
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_MarkEntityForUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
16339
+ }
16340
+ /**
16341
+ * @description Applies any pending changes to entities that have been marked for update.
16342
+ */
16343
+ processPendingEntityOperations() {
16344
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ProcessPendingEntityOperations_void", "void", ["number"], [this.pointer]);
16345
+ }
16346
+ /**
16347
+ * @description Sets a callback to be executed when the script system is ready to run scripts.
16348
+ * @param callback - The callback to execute.
16349
+ */
16350
+ setScriptLeaderReadyCallback(callback) {
16351
+ var _callback = (_stateObject__, arg1) => {
16352
+ callback(arg1);
16353
+ };
16354
+ var _callbackPtr = Module.addFunction(_callback, "vii");
16355
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetScriptLeaderReadyCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
16356
+ }
16357
+ /**
16358
+ * @description Sets the script owner for the given entity to the current client
16359
+ * @param entity - A pointer to the entity
16360
+ */
16361
+ claimScriptOwnership(entity) {
16362
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ClaimScriptOwnershipC_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
16363
+ }
16364
+ /**
16365
+ * @description Enable Leader Election feature.
16366
+ */
16367
+ enableLeaderElection() {
16368
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_EnableLeaderElection_void", "void", ["number"], [this.pointer]);
16369
+ }
16370
+ /**
16371
+ * @description Disable Leader Election feature.
16372
+ */
16373
+ disableLeaderElection() {
16374
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_DisableLeaderElection_void", "void", ["number"], [this.pointer]);
16375
+ }
16376
+ /**
16377
+ * @description Check if the Leader Election feature is enabled.
16378
+ * @return True if enabled, false otherwise.
16379
+ */
16380
+ isLeaderElectionEnabled() {
16381
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_IsLeaderElectionEnabledC_bool", "boolean", ["number"], [this.pointer]);
16382
+ return _result;
16383
+ }
16384
+ /**
16385
+ * @description Debug helper to get the id of the currently elected script leader.
16386
+ * @return The id of the leader.
16387
+ */
16388
+ getLeaderId() {
16389
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetLeaderIdC_uint64_t", "bigint", ["number"], [this.pointer]);
16390
+ const _unfixedValue = _result;
16391
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
16392
+ _result = _fixedValue;
16393
+ return _result;
16238
16394
  }
16239
- get userId() {
16240
- let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_UserId", "string", ["number"], [this.pointer]);
16395
+ /**
16396
+ * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
16397
+ * @return True if enabled, false otherwise.
16398
+ */
16399
+ getEntityPatchRateLimitEnabled() {
16400
+ let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetEntityPatchRateLimitEnabledC_bool", "boolean", ["number"], [this.pointer]);
16241
16401
  return _result;
16242
16402
  }
16243
- set userId(value) {
16244
- Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
16403
+ /**
16404
+ * @description Set the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
16405
+ * /// This feature is enabled by default and should only be disabled if you are encountering issues.
16406
+ * /// @param Enabled : sets if the feature should be enabled or not.
16407
+ * \rst
16408
+ * .. note::
16409
+ * If disabling this feature, more requests will be made to Magnopus Connected Services,
16410
+ * and consequently more patch merges may occur on the server as a result.
16411
+ * \endrst
16412
+ */
16413
+ setEntityPatchRateLimitEnabled(enabled) {
16414
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetEntityPatchRateLimitEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, enabled]);
16245
16415
  }
16246
- }
16247
- Common.AccessControlChangedNetworkEventData = AccessControlChangedNetworkEventData;
16248
- })(Common || (Common = {}));
16249
- (function (Common) {
16250
- class SequenceChangedNetworkEventData extends Common.NetworkEventData {
16251
- /** @internal */
16252
- constructor(pointer) {
16253
- super(pointer);
16416
+ /**
16417
+ * @description Locks the entity mutex.
16418
+ */
16419
+ lockEntityUpdate() {
16420
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_LockEntityUpdateC_void", "void", ["number"], [this.pointer]);
16254
16421
  }
16255
- static fromNetworkEventData(baseInstance) {
16256
- const nativeClassWrapper = baseInstance;
16257
- return new Common.SequenceChangedNetworkEventData(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
16422
+ /**
16423
+ * @description Unlocks the entity mutex.
16424
+ */
16425
+ unlockEntityUpdate() {
16426
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_UnlockEntityUpdateC_void", "void", ["number"], [this.pointer]);
16258
16427
  }
16259
- static create() {
16260
- var _ptr = Module._malloc(8);
16261
- Module.ccall("csp_common_SequenceChangedNetworkEventData_Ctor", "void", ["number"], [_ptr]);
16262
- var _nPtr = getNativePointer(_ptr);
16263
- return new SequenceChangedNetworkEventData(_nPtr);
16428
+ /**
16429
+ * @description Queues a specific entity to update. Used in SpaceEntity to queue updates via passing the this pointer
16430
+ */
16431
+ queueEntityUpdate(entityToUpdate) {
16432
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_QueueEntityUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToUpdate.pointer]);
16433
+ }
16434
+ /**
16435
+ * @description "Resolves" the entity heirarchy, such that the entity is parented appropriately, and internal buffers are populated appropriately.
16436
+ * (Vague, need more understanding about what this does)
16437
+ */
16438
+ resolveEntityHierarchy(entity) {
16439
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ResolveEntityHierarchy_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
16264
16440
  }
16265
16441
  delete() {
16266
16442
  if (this.ownsPointer && !this.disposed) {
16267
- Module.ccall("csp_common_SequenceChangedNetworkEventData_Dtor", "void", ["number"], [this.pointer]);
16443
+ Module.ccall("csp_multiplayer_OnlineRealtimeEngine_Dtor", "void", ["number"], [this.pointer]);
16268
16444
  this.disposed = true;
16269
16445
  }
16270
16446
  }
16271
- get updateType() {
16272
- let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_UpdateType", "number", ["number"], [this.pointer]);
16273
- return _result;
16274
- }
16275
- set updateType(value) {
16276
- Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_UpdateType", "void", ["number", "number"], [this.pointer, value]);
16277
- }
16278
- get key() {
16279
- let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_Key", "string", ["number"], [this.pointer]);
16280
- return _result;
16281
- }
16282
- set key(value) {
16283
- Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_Key", "void", ["number", "string"], [this.pointer, value]);
16284
- }
16285
- get newKey() {
16286
- let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_NewKey", "string", ["number"], [this.pointer]);
16287
- return _result;
16288
- }
16289
- set newKey(value) {
16290
- Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_NewKey", "void", ["number", "string"], [this.pointer, value]);
16291
- }
16292
- get hotspotData() {
16293
- const _ptr = Module._malloc(8);
16294
- Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_HotspotData", "void", ["number", "number"], [_ptr, this.pointer]);
16295
- const _nPtr = getNativePointer(_ptr);
16296
- return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
16297
- }
16298
- set hotspotData(value) {
16299
- Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_HotspotData", "void", ["number", "number"], [this.pointer, value.pointer]);
16300
- }
16301
16447
  }
16302
- Common.SequenceChangedNetworkEventData = SequenceChangedNetworkEventData;
16303
- })(Common || (Common = {}));
16448
+ Multiplayer.OnlineRealtimeEngine = OnlineRealtimeEngine;
16449
+ })(Multiplayer || (Multiplayer = {}));
16304
16450
  (function (Multiplayer) {
16305
16451
  /**
16306
16452
  @ingroup AnimatedModelSpaceComponent
@@ -20439,122 +20585,313 @@ export class CSPFoundation {
20439
20585
  Module.ccall("csp_multiplayer_PortalSpaceComponent_SetRadius_void_float", "void", ["number", "number"], [this.pointer, value]);
20440
20586
  }
20441
20587
  /**
20442
- * \addtogroup IEnableableComponent
20588
+ * \addtogroup IEnableableComponent
20589
+ @{
20590
+ @copydoc IEnableableComponent::GetIsEnabled()
20591
+ */
20592
+ getIsEnabled() {
20593
+ let _result = Module.ccall("csp_multiplayer_PortalSpaceComponent_GetIsEnabledC_bool", "boolean", ["number"], [this.pointer]);
20594
+ return _result;
20595
+ }
20596
+ /**
20597
+ @copydoc IEnableableComponent::SetIsEnabled()
20598
+ */
20599
+ setIsEnabled(value) {
20600
+ Module.ccall("csp_multiplayer_PortalSpaceComponent_SetIsEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
20601
+ }
20602
+ delete() {
20603
+ if (this.ownsPointer && !this.disposed) {
20604
+ Module.ccall("csp_multiplayer_PortalSpaceComponent_Dtor", "void", ["number"], [this.pointer]);
20605
+ this.disposed = true;
20606
+ }
20607
+ }
20608
+ }
20609
+ Multiplayer.PortalSpaceComponent = PortalSpaceComponent;
20610
+ })(Multiplayer || (Multiplayer = {}));
20611
+ (function (Multiplayer) {
20612
+ /**
20613
+ @ingroup ReflectionSpaceComponent
20614
+ * @description Add sphere and box reflection captures to your Space which can be used by objects with reflective materials.
20615
+ */
20616
+ class ReflectionSpaceComponent extends Multiplayer.ComponentBase {
20617
+ /** @internal */
20618
+ constructor(pointer) {
20619
+ super(pointer);
20620
+ }
20621
+ static fromComponentBase(baseInstance) {
20622
+ const nativeClassWrapper = baseInstance;
20623
+ return new Multiplayer.ReflectionSpaceComponent(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
20624
+ }
20625
+ /**
20626
+ * @description Constructs the reflection component, and associates it with the specified Parent space entity.
20627
+ * @param parent - The Space entity that owns this component.
20628
+ */
20629
+ static create_logSystem_parent(logSystem, parent) {
20630
+ var _ptr = Module._malloc(8);
20631
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_Ctor_LogSystemP_SpaceEntityP", "void", ["number", "number", "number"], [_ptr, logSystem.pointer, parent.pointer]);
20632
+ var _nPtr = getNativePointer(_ptr);
20633
+ return new ReflectionSpaceComponent(_nPtr);
20634
+ }
20635
+ /**
20636
+ * @description Get the name of the Reflection component.
20637
+ * @return Csp::common::string specifying the component name.
20638
+ */
20639
+ /** @deprecated
20640
+ Deprecated in favour of ComponentBase::GetComponentName()
20641
+ */
20642
+ getName() {
20643
+ let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetNameC_StringRC", "number", ["number"], [this.pointer]);
20644
+ const _resultString = Module.UTF8ToString(_result);
20645
+ free(_result);
20646
+ _result = _resultString;
20647
+ return _result;
20648
+ }
20649
+ /**
20650
+ * @description Set the name for the Reflection component.
20651
+ * @param value - Name for the Reflection component.
20652
+ */
20653
+ /** @deprecated
20654
+ Deprecated in favour of ComponentBase::SetComponentName()
20655
+ */
20656
+ setName(value) {
20657
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetName_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20658
+ }
20659
+ /**
20660
+ * @description Get the Asset Id for the Reflection texture asset.
20661
+ */
20662
+ getReflectionAssetId() {
20663
+ let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetReflectionAssetIdC_StringRC", "number", ["number"], [this.pointer]);
20664
+ const _resultString = Module.UTF8ToString(_result);
20665
+ free(_result);
20666
+ _result = _resultString;
20667
+ return _result;
20668
+ }
20669
+ /**
20670
+ * @description Set the Asset Id for the Reflection texture asset.
20671
+ * @param value - Id for Reflection texture asset.
20672
+ */
20673
+ setReflectionAssetId(value) {
20674
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetReflectionAssetId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20675
+ }
20676
+ /**
20677
+ * @description Gets the ID of the asset collection associated with this component.
20678
+ * NOTE: To retrieve this component's reflection asset, both the Asset ID and the Asset Collection ID are required.
20679
+ * @return The ID of the asset collection associated with this component.
20680
+ */
20681
+ getAssetCollectionId() {
20682
+ let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetAssetCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
20683
+ const _resultString = Module.UTF8ToString(_result);
20684
+ free(_result);
20685
+ _result = _resultString;
20686
+ return _result;
20687
+ }
20688
+ /**
20689
+ * @description Sets the ID of the asset collection associated with this component.
20690
+ * NOTE: To retrieve this component's reflection asset, both the Asset ID and the Asset Collection ID are required.
20691
+ * @param value - The ID of the asset collection associated with this component.
20692
+ */
20693
+ setAssetCollectionId(value) {
20694
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetAssetCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20695
+ }
20696
+ /**
20697
+ * \addtogroup IPositionComponent
20698
+ @{
20699
+ @copydoc IPositionComponent::GetPosition()
20700
+ */
20701
+ getPosition() {
20702
+ var _ret = Module._malloc(8);
20703
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetPositionC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20704
+ var _nPtr = new Common.Vector3(getNativePointer(_ret));
20705
+ Module._free(_ret);
20706
+ return _nPtr;
20707
+ }
20708
+ /**
20709
+ @copydoc IPositionComponent::SetPosition()
20710
+ */
20711
+ setPosition(value) {
20712
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetPosition_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20713
+ }
20714
+ /**
20715
+ @}
20716
+ * \addtogroup IScaleComponent
20717
+ @{
20718
+ @copydoc IScaleComponent::GetScale()
20719
+ */
20720
+ getScale() {
20721
+ var _ret = Module._malloc(8);
20722
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetScaleC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20723
+ var _nPtr = new Common.Vector3(getNativePointer(_ret));
20724
+ Module._free(_ret);
20725
+ return _nPtr;
20726
+ }
20727
+ /**
20728
+ @copydoc IScaleComponent::SetScale()
20729
+ */
20730
+ setScale(value) {
20731
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetScale_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20732
+ }
20733
+ /**
20734
+ @}
20735
+ * @description Get the reflection shape enum value.
20736
+ * ReflectionShape.UnitBox: Projects a texture in a planar fashion from all six directions (like an inward facing cube).
20737
+ * ReflectionShape.UnitSphere: Warps the texture into a spherical shape and projects it onto a surface.
20738
+ * @return Enum specifying whether the captured reflections are box projected (UnitCube) or spherical projected (UnitSphere).
20739
+ */
20740
+ getReflectionShape() {
20741
+ let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetReflectionShapeC_ReflectionShape", "number", ["number"], [this.pointer]);
20742
+ return _result;
20743
+ }
20744
+ /**
20745
+ * @description Set the reflection shape.
20746
+ * ReflectionShape.UnitBox: Projects a texture in a planar fashion from all six directions (like an inward facing cube).
20747
+ * ReflectionShape.UnitSphere: Warps the texture into a spherical shape and projects it onto a surface.
20748
+ * @param value - Enum specifying whether the captured reflections are box (UnitCube) or spherical projected (UnitSphere).
20749
+ */
20750
+ setReflectionShape(value) {
20751
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetReflectionShape_void_ReflectionShape", "void", ["number", "number"], [this.pointer, value]);
20752
+ }
20753
+ /**
20754
+ * \addtogroup IThirdPartyComponentRef
20443
20755
  @{
20444
- @copydoc IEnableableComponent::GetIsEnabled()
20756
+ @copydoc IThirdPartyComponentRef::GetThirdPartyComponentRef()
20445
20757
  */
20446
- getIsEnabled() {
20447
- let _result = Module.ccall("csp_multiplayer_PortalSpaceComponent_GetIsEnabledC_bool", "boolean", ["number"], [this.pointer]);
20758
+ getThirdPartyComponentRef() {
20759
+ let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetThirdPartyComponentRefC_StringRC", "number", ["number"], [this.pointer]);
20760
+ const _resultString = Module.UTF8ToString(_result);
20761
+ free(_result);
20762
+ _result = _resultString;
20448
20763
  return _result;
20449
20764
  }
20450
20765
  /**
20451
- @copydoc IEnableableComponent::SetIsEnabled()
20766
+ @copydoc IThirdPartyComponentRef::SetThirdPartyComponentRef()
20452
20767
  */
20453
- setIsEnabled(value) {
20454
- Module.ccall("csp_multiplayer_PortalSpaceComponent_SetIsEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
20768
+ setThirdPartyComponentRef(value) {
20769
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetThirdPartyComponentRef_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20455
20770
  }
20456
20771
  delete() {
20457
20772
  if (this.ownsPointer && !this.disposed) {
20458
- Module.ccall("csp_multiplayer_PortalSpaceComponent_Dtor", "void", ["number"], [this.pointer]);
20773
+ Module.ccall("csp_multiplayer_ReflectionSpaceComponent_Dtor", "void", ["number"], [this.pointer]);
20459
20774
  this.disposed = true;
20460
20775
  }
20461
20776
  }
20462
20777
  }
20463
- Multiplayer.PortalSpaceComponent = PortalSpaceComponent;
20778
+ Multiplayer.ReflectionSpaceComponent = ReflectionSpaceComponent;
20464
20779
  })(Multiplayer || (Multiplayer = {}));
20465
20780
  (function (Multiplayer) {
20466
20781
  /**
20467
- @ingroup ReflectionSpaceComponent
20468
- * @description Add sphere and box reflection captures to your Space which can be used by objects with reflective materials.
20782
+ @ingroup ScreenSharingSpaceComponent
20783
+ * @description Enables screen sharing within the space.
20784
+ * /// The screen sharing component facilitates the sharing of a user's screen within a space.
20785
+ * The component itself does not make assumptions about the mechanism by which the screen is shared.
20786
+ * It provides properties to define a default image to be displayed when no users are
20787
+ * sharing their screen, as well a UserId property to store the Id of the user currently sharing their screen.
20469
20788
  */
20470
- class ReflectionSpaceComponent extends Multiplayer.ComponentBase {
20789
+ class ScreenSharingSpaceComponent extends Multiplayer.ComponentBase {
20471
20790
  /** @internal */
20472
20791
  constructor(pointer) {
20473
20792
  super(pointer);
20474
20793
  }
20475
20794
  static fromComponentBase(baseInstance) {
20476
20795
  const nativeClassWrapper = baseInstance;
20477
- return new Multiplayer.ReflectionSpaceComponent(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
20796
+ return new Multiplayer.ScreenSharingSpaceComponent(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
20478
20797
  }
20479
20798
  /**
20480
- * @description Constructs the reflection component, and associates it with the specified Parent space entity.
20799
+ * @description Constructs the screen sharing component, and associates it with the specified Parent space entity.
20481
20800
  * @param parent - The Space entity that owns this component.
20482
20801
  */
20483
20802
  static create_logSystem_parent(logSystem, parent) {
20484
20803
  var _ptr = Module._malloc(8);
20485
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_Ctor_LogSystemP_SpaceEntityP", "void", ["number", "number", "number"], [_ptr, logSystem.pointer, parent.pointer]);
20804
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_Ctor_LogSystemP_SpaceEntityP", "void", ["number", "number", "number"], [_ptr, logSystem.pointer, parent.pointer]);
20486
20805
  var _nPtr = getNativePointer(_ptr);
20487
- return new ReflectionSpaceComponent(_nPtr);
20806
+ return new ScreenSharingSpaceComponent(_nPtr);
20488
20807
  }
20489
20808
  /**
20490
- * @description Get the name of the Reflection component.
20491
- * @return Csp::common::string specifying the component name.
20809
+ * @description Gets the ID of the user who is currently sharing their screen to this component.
20810
+ * NOTE: An empty string means that no user is currently sharing their screen to this component.
20811
+ * @return The ID of the user who is currently sharing their screen to this component.
20492
20812
  */
20493
- /** @deprecated
20494
- Deprecated in favour of ComponentBase::GetComponentName()
20495
- */
20496
- getName() {
20497
- let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetNameC_StringRC", "number", ["number"], [this.pointer]);
20813
+ getUserId() {
20814
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetUserIdC_StringRC", "number", ["number"], [this.pointer]);
20498
20815
  const _resultString = Module.UTF8ToString(_result);
20499
20816
  free(_result);
20500
20817
  _result = _resultString;
20501
20818
  return _result;
20502
20819
  }
20503
20820
  /**
20504
- * @description Set the name for the Reflection component.
20505
- * @param value - Name for the Reflection component.
20821
+ * @description Sets the ID of the user who is sharing their screen to this component.
20822
+ * @param value - The ID of the user who is sharing their screen to this component. This must be set to an empty string when
20823
+ * the user finishes sharing.
20506
20824
  */
20507
- /** @deprecated
20508
- Deprecated in favour of ComponentBase::SetComponentName()
20509
- */
20510
- setName(value) {
20511
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetName_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20825
+ setUserId(value) {
20826
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetUserId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20512
20827
  }
20513
20828
  /**
20514
- * @description Get the Asset Id for the Reflection texture asset.
20829
+ * @description Gets the ID of the asset collection associated with the default image for this component.
20830
+ * NOTE: To retrieve this component's default image, both the DefaultImageCollectionId and the DefaultImageAssetId are required.
20831
+ * @return The ID of the default image asset collection associated with this component.
20515
20832
  */
20516
- getReflectionAssetId() {
20517
- let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetReflectionAssetIdC_StringRC", "number", ["number"], [this.pointer]);
20833
+ getDefaultImageCollectionId() {
20834
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetDefaultImageCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
20518
20835
  const _resultString = Module.UTF8ToString(_result);
20519
20836
  free(_result);
20520
20837
  _result = _resultString;
20521
20838
  return _result;
20522
20839
  }
20523
20840
  /**
20524
- * @description Set the Asset Id for the Reflection texture asset.
20525
- * @param value - Id for Reflection texture asset.
20841
+ * @description Sets the ID of the asset collection associated with the default image for this component.
20842
+ * NOTE: To retrieve this component's default image, both the DefaultImageCollectionId and the DefaultImageAssetId are required.
20843
+ * @param value - The ID of the default image asset collection associated with this component.
20526
20844
  */
20527
- setReflectionAssetId(value) {
20528
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetReflectionAssetId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20845
+ setDefaultImageCollectionId(value) {
20846
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetDefaultImageCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20529
20847
  }
20530
20848
  /**
20531
- * @description Gets the ID of the asset collection associated with this component.
20532
- * NOTE: To retrieve this component's reflection asset, both the Asset ID and the Asset Collection ID are required.
20533
- * @return The ID of the asset collection associated with this component.
20849
+ * @description Gets the ID of the asset associated with the default image for this component.
20850
+ * NOTE: To retrieve this component's default image, both the DefaultImageCollectionId and the DefaultImageAssetId are required.
20851
+ * @return The ID of the default image asset associated with this component.
20534
20852
  */
20535
- getAssetCollectionId() {
20536
- let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetAssetCollectionIdC_StringRC", "number", ["number"], [this.pointer]);
20853
+ getDefaultImageAssetId() {
20854
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetDefaultImageAssetIdC_StringRC", "number", ["number"], [this.pointer]);
20537
20855
  const _resultString = Module.UTF8ToString(_result);
20538
20856
  free(_result);
20539
20857
  _result = _resultString;
20540
20858
  return _result;
20541
20859
  }
20542
20860
  /**
20543
- * @description Sets the ID of the asset collection associated with this component.
20544
- * NOTE: To retrieve this component's reflection asset, both the Asset ID and the Asset Collection ID are required.
20545
- * @param value - The ID of the asset collection associated with this component.
20861
+ * @description Sets the ID of the asset associated with the default image for this component.
20862
+ * NOTE: To retrieve this component's default image, both the DefaultImageCollectionId and the DefaultImageAssetId are required.
20863
+ * @param value - The ID of the default image asset associated with this component.
20546
20864
  */
20547
- setAssetCollectionId(value) {
20548
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetAssetCollectionId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20865
+ setDefaultImageAssetId(value) {
20866
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetDefaultImageAssetId_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20549
20867
  }
20550
20868
  /**
20551
- * \addtogroup IPositionComponent
20869
+ * @description Gets the radius from this component origin within which the audio of this video can be heard by the user.
20870
+ * NOTE: Only when the user position is within this radius the audio of the video should be heard.
20871
+ * @return The radius within which the audio of the video can be heard by the user.
20872
+ */
20873
+ getAttenuationRadius() {
20874
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetAttenuationRadiusC_float", "number", ["number"], [this.pointer]);
20875
+ return _result;
20876
+ }
20877
+ /**
20878
+ * @description Sets the radius from this component origin within which the audio of this video can be heard by the user.
20879
+ * NOTE: Only when the user position is within this radius the audio of the video should be heard.
20880
+ * @param value - The radius within which the audio of the video can be heard by the user.
20881
+ */
20882
+ setAttenuationRadius(value) {
20883
+ assert(value >= Limits.FLOAT_MIN);
20884
+ assert(value <= Limits.FLOAT_MAX);
20885
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetAttenuationRadius_void_float", "void", ["number", "number"], [this.pointer, value]);
20886
+ }
20887
+ /**
20888
+ * \addtogroup ITransformComponent
20552
20889
  @{
20553
20890
  @copydoc IPositionComponent::GetPosition()
20554
20891
  */
20555
20892
  getPosition() {
20556
20893
  var _ret = Module._malloc(8);
20557
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetPositionC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20894
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetPositionC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20558
20895
  var _nPtr = new Common.Vector3(getNativePointer(_ret));
20559
20896
  Module._free(_ret);
20560
20897
  return _nPtr;
@@ -20563,17 +20900,30 @@ export class CSPFoundation {
20563
20900
  @copydoc IPositionComponent::SetPosition()
20564
20901
  */
20565
20902
  setPosition(value) {
20566
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetPosition_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20903
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetPosition_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20904
+ }
20905
+ /**
20906
+ @copydoc IRotationComponent::GetRotation()
20907
+ */
20908
+ getRotation() {
20909
+ var _ret = Module._malloc(8);
20910
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetRotationC_Vector4RC", "void", ["number", "number"], [_ret, this.pointer]);
20911
+ var _nPtr = new Common.Vector4(getNativePointer(_ret));
20912
+ Module._free(_ret);
20913
+ return _nPtr;
20914
+ }
20915
+ /**
20916
+ @copydoc IRotationComponent::SetRotation()
20917
+ */
20918
+ setRotation(value) {
20919
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetRotation_void_Vector4RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20567
20920
  }
20568
20921
  /**
20569
- @}
20570
- * \addtogroup IScaleComponent
20571
- @{
20572
20922
  @copydoc IScaleComponent::GetScale()
20573
20923
  */
20574
20924
  getScale() {
20575
20925
  var _ret = Module._malloc(8);
20576
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetScaleC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20926
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetScaleC_Vector3RC", "void", ["number", "number"], [_ret, this.pointer]);
20577
20927
  var _nPtr = new Common.Vector3(getNativePointer(_ret));
20578
20928
  Module._free(_ret);
20579
20929
  return _nPtr;
@@ -20582,54 +20932,77 @@ export class CSPFoundation {
20582
20932
  @copydoc IScaleComponent::SetScale()
20583
20933
  */
20584
20934
  setScale(value) {
20585
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetScale_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20935
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetScale_void_Vector3RC", "void", ["number", "number"], [this.pointer, value.pointer]);
20936
+ }
20937
+ /**
20938
+ @copydoc ITransformComponent::GetTransform()
20939
+ */
20940
+ getTransform() {
20941
+ var _ret = Module._malloc(8);
20942
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetTransformC_SpaceTransform", "void", ["number", "number"], [_ret, this.pointer]);
20943
+ var _nPtr = new Multiplayer.SpaceTransform(getNativePointer(_ret));
20944
+ Module._free(_ret);
20945
+ return _nPtr;
20946
+ }
20947
+ /**
20948
+ @copydoc ITransformComonent::SetTransform()
20949
+ */
20950
+ setTransform(value) {
20951
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetTransform_void_SpaceTransformRC", "void", ["number", "number"], [this.pointer, value.pointer]);
20586
20952
  }
20587
20953
  /**
20588
20954
  @}
20589
- * @description Get the reflection shape enum value.
20590
- * ReflectionShape.UnitBox: Projects a texture in a planar fashion from all six directions (like an inward facing cube).
20591
- * ReflectionShape.UnitSphere: Warps the texture into a spherical shape and projects it onto a surface.
20592
- * @return Enum specifying whether the captured reflections are box projected (UnitCube) or spherical projected (UnitSphere).
20955
+ * \addtogroup IVisibleComponent
20956
+ @{
20957
+ @copydoc IVisibleComponent::GetIsVisible()
20593
20958
  */
20594
- getReflectionShape() {
20595
- let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetReflectionShapeC_ReflectionShape", "number", ["number"], [this.pointer]);
20959
+ getIsVisible() {
20960
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetIsVisibleC_bool", "boolean", ["number"], [this.pointer]);
20596
20961
  return _result;
20597
20962
  }
20598
20963
  /**
20599
- * @description Set the reflection shape.
20600
- * ReflectionShape.UnitBox: Projects a texture in a planar fashion from all six directions (like an inward facing cube).
20601
- * ReflectionShape.UnitSphere: Warps the texture into a spherical shape and projects it onto a surface.
20602
- * @param value - Enum specifying whether the captured reflections are box (UnitCube) or spherical projected (UnitSphere).
20964
+ @copydoc IVisibleComponent::SetIsVisible()
20603
20965
  */
20604
- setReflectionShape(value) {
20605
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetReflectionShape_void_ReflectionShape", "void", ["number", "number"], [this.pointer, value]);
20966
+ setIsVisible(value) {
20967
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetIsVisible_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
20606
20968
  }
20607
20969
  /**
20608
- * \addtogroup IThirdPartyComponentRef
20970
+ @copydoc IVisibleComponent::GetIsARVisible()
20971
+ */
20972
+ getIsARVisible() {
20973
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetIsARVisibleC_bool", "boolean", ["number"], [this.pointer]);
20974
+ return _result;
20975
+ }
20976
+ /**
20977
+ @copydoc IVisibleComponent::SetIsARVisible()
20978
+ */
20979
+ setIsARVisible(value) {
20980
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetIsARVisible_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
20981
+ }
20982
+ /**
20983
+ @}
20984
+ * \addtogroup IShadowCasterComponent
20609
20985
  @{
20610
- @copydoc IThirdPartyComponentRef::GetThirdPartyComponentRef()
20986
+ @copydoc IShadowCasterComponent::GetIsShadowCaster()
20611
20987
  */
20612
- getThirdPartyComponentRef() {
20613
- let _result = Module.ccall("csp_multiplayer_ReflectionSpaceComponent_GetThirdPartyComponentRefC_StringRC", "number", ["number"], [this.pointer]);
20614
- const _resultString = Module.UTF8ToString(_result);
20615
- free(_result);
20616
- _result = _resultString;
20988
+ getIsShadowCaster() {
20989
+ let _result = Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_GetIsShadowCasterC_bool", "boolean", ["number"], [this.pointer]);
20617
20990
  return _result;
20618
20991
  }
20619
20992
  /**
20620
- @copydoc IThirdPartyComponentRef::SetThirdPartyComponentRef()
20993
+ @copydoc IShadowCasterComponent::SetIsShadowCaster()
20621
20994
  */
20622
- setThirdPartyComponentRef(value) {
20623
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_SetThirdPartyComponentRef_void_StringRC", "void", ["number", "string"], [this.pointer, value]);
20995
+ setIsShadowCaster(value) {
20996
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_SetIsShadowCaster_void_bool", "void", ["number", "boolean"], [this.pointer, value]);
20624
20997
  }
20625
20998
  delete() {
20626
20999
  if (this.ownsPointer && !this.disposed) {
20627
- Module.ccall("csp_multiplayer_ReflectionSpaceComponent_Dtor", "void", ["number"], [this.pointer]);
21000
+ Module.ccall("csp_multiplayer_ScreenSharingSpaceComponent_Dtor", "void", ["number"], [this.pointer]);
20628
21001
  this.disposed = true;
20629
21002
  }
20630
21003
  }
20631
21004
  }
20632
- Multiplayer.ReflectionSpaceComponent = ReflectionSpaceComponent;
21005
+ Multiplayer.ScreenSharingSpaceComponent = ScreenSharingSpaceComponent;
20633
21006
  })(Multiplayer || (Multiplayer = {}));
20634
21007
  (function (Multiplayer) {
20635
21008
  /**
@@ -26167,6 +26540,123 @@ export class CSPFoundation {
26167
26540
  }
26168
26541
  Systems.SequenceSystem = SequenceSystem;
26169
26542
  })(Systems || (Systems = {}));
26543
+ (function (Systems) {
26544
+ /**
26545
+ @ingroup Application Settings System
26546
+ * @description Represents the result of a request for application settings.
26547
+ */
26548
+ class ApplicationSettingsResult extends Systems.ResultBase {
26549
+ /** @internal */
26550
+ constructor(pointer) {
26551
+ super(pointer);
26552
+ }
26553
+ static fromResultBase(baseInstance) {
26554
+ const nativeClassWrapper = baseInstance;
26555
+ return new Systems.ApplicationSettingsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
26556
+ }
26557
+ getApplicationSettings() {
26558
+ var _ret = Module._malloc(8);
26559
+ Module.ccall("csp_systems_ApplicationSettingsResult_GetApplicationSettingsC_ApplicationSettingsRC", "void", ["number", "number"], [_ret, this.pointer]);
26560
+ var _nPtr = new Systems.ApplicationSettings(getNativePointer(_ret));
26561
+ Module._free(_ret);
26562
+ return _nPtr;
26563
+ }
26564
+ delete() {
26565
+ if (this.ownsPointer && !this.disposed) {
26566
+ Module.ccall("csp_systems_ApplicationSettingsResult_Dtor", "void", ["number"], [this.pointer]);
26567
+ this.disposed = true;
26568
+ }
26569
+ }
26570
+ }
26571
+ Systems.ApplicationSettingsResult = ApplicationSettingsResult;
26572
+ })(Systems || (Systems = {}));
26573
+ (function (Systems) {
26574
+ /**
26575
+ @ingroup Application Settings System
26576
+ * @description Public facing system that allows interfacing with Magnopus Connected Services' application settings service.
26577
+ */
26578
+ class ApplicationSettingsSystem extends Systems.SystemBase {
26579
+ /** @internal */
26580
+ constructor(pointer) {
26581
+ super(pointer);
26582
+ }
26583
+ static fromSystemBase(baseInstance) {
26584
+ const nativeClassWrapper = baseInstance;
26585
+ return new Systems.ApplicationSettingsSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
26586
+ }
26587
+ /**
26588
+ * @description Asynchronously retrieves application settings for a specific context.
26589
+ * @param applicationName - The name of the application for which settings are requested.
26590
+ * @param context - The specific context whose settings should be retrieved.
26591
+ * @param keys - Array of setting keys to retrieve. If not provided, all settings
26592
+ * for the context are returned.
26593
+ * @param callback - Callback when asynchronous task finishes.
26594
+ */
26595
+ async getSettingsByContext(applicationName, context, keys) {
26596
+ var _resolve;
26597
+ var _promise = new Promise((_r) => {
26598
+ _resolve = _r;
26599
+ });
26600
+ var _callbackPtr;
26601
+ var _callback = (_stateObject__, result) => {
26602
+ var _resultPtr = getNativePointer(result);
26603
+ var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
26604
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
26605
+ return;
26606
+ }
26607
+ _resolve(_resultInstance);
26608
+ Module.removeFunction(_callbackPtr);
26609
+ };
26610
+ _callbackPtr = Module.addFunction(_callback, "vii");
26611
+ Module.ccall("csp_systems_ApplicationSettingsSystem_GetSettingsByContext_void_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback", "void", ["number", "string", "string", "number", "number", "number"], [
26612
+ this.pointer,
26613
+ applicationName,
26614
+ context,
26615
+ keys != null ? keys.pointer : 0,
26616
+ _callbackPtr,
26617
+ 0,
26618
+ ]);
26619
+ return _promise;
26620
+ }
26621
+ /**
26622
+ * @description Asynchronously retrieves application settings for a specific context without requiring authentication.
26623
+ * @param tenant - The tenant identifier under which the application and settings are scoped.
26624
+ * @param applicationName - The name of the application for which settings are requested.
26625
+ * @param context - The specific context whose settings should be retrieved.
26626
+ * @param keys - Array of setting keys to retrieve. If not provided, all settings
26627
+ * for the context are returned.
26628
+ * @param callback - Callback when asynchronous task finishes.
26629
+ */
26630
+ async getSettingsByContextAnonymous(tenant, applicationName, context, keys) {
26631
+ var _resolve;
26632
+ var _promise = new Promise((_r) => {
26633
+ _resolve = _r;
26634
+ });
26635
+ var _callbackPtr;
26636
+ var _callback = (_stateObject__, result) => {
26637
+ var _resultPtr = getNativePointer(result);
26638
+ var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
26639
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
26640
+ return;
26641
+ }
26642
+ _resolve(_resultInstance);
26643
+ Module.removeFunction(_callbackPtr);
26644
+ };
26645
+ _callbackPtr = Module.addFunction(_callback, "vii");
26646
+ Module.ccall("csp_systems_ApplicationSettingsSystem_GetSettingsByContextAnonymous_void_StringRC_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback", "void", ["number", "string", "string", "string", "number", "number", "number"], [
26647
+ this.pointer,
26648
+ tenant,
26649
+ applicationName,
26650
+ context,
26651
+ keys != null ? keys.pointer : 0,
26652
+ _callbackPtr,
26653
+ 0,
26654
+ ]);
26655
+ return _promise;
26656
+ }
26657
+ }
26658
+ Systems.ApplicationSettingsSystem = ApplicationSettingsSystem;
26659
+ })(Systems || (Systems = {}));
26170
26660
  (function (Systems) {
26171
26661
  /**
26172
26662
  @ingroup Settings System
@@ -26215,12 +26705,15 @@ export class CSPFoundation {
26215
26705
  return new Systems.AvatarInfoResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
26216
26706
  }
26217
26707
  /**
26218
- * @description A getter which returns the String passed via the result.
26708
+ * @description Returns the type of avatar selected by the user.
26219
26709
  */
26220
26710
  getAvatarType() {
26221
26711
  let _result = Module.ccall("csp_systems_AvatarInfoResult_GetAvatarTypeC_AvatarType", "number", ["number"], [this.pointer]);
26222
26712
  return _result;
26223
26713
  }
26714
+ /**
26715
+ * @description Returns the string used to identify or locate the avatar.
26716
+ */
26224
26717
  getAvatarIdentifier() {
26225
26718
  let _result = Module.ccall("csp_systems_AvatarInfoResult_GetAvatarIdentifierC_StringRC", "number", ["number"], [this.pointer]);
26226
26719
  const _resultString = Module.UTF8ToString(_result);
@@ -26228,6 +26721,13 @@ export class CSPFoundation {
26228
26721
  _result = _resultString;
26229
26722
  return _result;
26230
26723
  }
26724
+ /**
26725
+ * @description Returns whether or not the user's avatar is intended to be visible or not.
26726
+ */
26727
+ getAvatarVisible() {
26728
+ let _result = Module.ccall("csp_systems_AvatarInfoResult_GetAvatarVisibleC_bool", "boolean", ["number"], [this.pointer]);
26729
+ return _result;
26730
+ }
26231
26731
  delete() {
26232
26732
  if (this.ownsPointer && !this.disposed) {
26233
26733
  Module.ccall("csp_systems_AvatarInfoResult_Dtor", "void", ["number"], [this.pointer]);
@@ -26596,9 +27096,10 @@ export class CSPFoundation {
26596
27096
  * @description Sets the avatar type and identifier for a user.
26597
27097
  * @param inType - The type of avatar (predefined, Ready Player Me, or custom).
26598
27098
  * @param inIdentifier - A string used to identify or locate the avatar.
27099
+ * @param inAvatarVisible - A bool used to identify whether the user's avatar should be visible or not.
26599
27100
  * @param callback - Callback to call when task finishes.
26600
27101
  */
26601
- async setAvatarInfo(type, identifier) {
27102
+ async setAvatarInfo(type, identifier, avatarVisible) {
26602
27103
  var _resolve;
26603
27104
  var _promise = new Promise((_r) => {
26604
27105
  _resolve = _r;
@@ -26614,7 +27115,7 @@ export class CSPFoundation {
26614
27115
  Module.removeFunction(_callbackPtr);
26615
27116
  };
26616
27117
  _callbackPtr = Module.addFunction(_callback, "vii");
26617
- Module.ccall("csp_systems_SettingsSystem_SetAvatarInfo_void_AvatarType_StringRC_NullResultCallback", "void", ["number", "number", "string", "number", "number"], [this.pointer, type, identifier, _callbackPtr, 0]);
27118
+ Module.ccall("csp_systems_SettingsSystem_SetAvatarInfo_void_AvatarType_StringRC_bool_NullResultCallback", "void", ["number", "number", "string", "boolean", "number", "number"], [this.pointer, type, identifier, avatarVisible, _callbackPtr, 0]);
26618
27119
  return _promise;
26619
27120
  }
26620
27121
  /**
@@ -26736,6 +27237,7 @@ export class CSPFoundation {
26736
27237
  var _nPtr = getNativePointer(_ptr);
26737
27238
  return new Space(_nPtr);
26738
27239
  }
27240
+ // operator=
26739
27241
  delete() {
26740
27242
  if (this.ownsPointer && !this.disposed) {
26741
27243
  Module.ccall("csp_systems_Space_Dtor", "void", ["number"], [this.pointer]);
@@ -27150,14 +27652,18 @@ export class CSPFoundation {
27150
27652
  }
27151
27653
  /**
27152
27654
  * @description Enter a space if you have permission to, based on the Space settings.
27153
- * This includes setting scopes (and toggling event listening in order to set the scope).
27154
- * It also retrieves all entities in the space. Ensure Connect is called prior to this.
27655
+ * Registers the user as in the space on the backend service, and calls csp::common::IRealtimeEngine::FetchAllEntitiesAndPopulateBuffers.
27656
+ * The initial load behaviour will differ based on the concrete IRealtimeEngine passed to this function.
27155
27657
  * If user does not have permission to discover or enter the space, callback will be called with EResultCode::Failed and
27156
27658
  * ERequestFailureReason::UserSpaceAccessDenied
27157
- * @param space - Space to enter into
27659
+ * @param spaceId - Space id to enter into
27660
+ * @param realtimeEngine - RealtimeEngine to load the space with. This object belongs to the caller, and does not
27661
+ * transfer ownership. Once the space is loaded, the caller should be sure to maintain the lifetime of the RealtimeEngine so long
27662
+ * as the space is active. Once the caller has called csp::systems::SpaceSystem::ExitSpace and received the callback, then they are
27663
+ * free to release the memory.
27158
27664
  * @param callback - Callback when asynchronous task finishes
27159
27665
  */
27160
- async enterSpace(spaceId) {
27666
+ async enterSpace(spaceId, realtimeEngine) {
27161
27667
  var _resolve;
27162
27668
  var _promise = new Promise((_r) => {
27163
27669
  _resolve = _r;
@@ -27165,7 +27671,7 @@ export class CSPFoundation {
27165
27671
  var _callbackPtr;
27166
27672
  var _callback = (_stateObject__, result) => {
27167
27673
  var _resultPtr = getNativePointer(result);
27168
- var _resultInstance = new Systems.NullResult(_resultPtr);
27674
+ var _resultInstance = new Systems.SpaceResult(_resultPtr);
27169
27675
  if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
27170
27676
  return;
27171
27677
  }
@@ -27173,7 +27679,7 @@ export class CSPFoundation {
27173
27679
  Module.removeFunction(_callbackPtr);
27174
27680
  };
27175
27681
  _callbackPtr = Module.addFunction(_callback, "vii");
27176
- Module.ccall("csp_systems_SpaceSystem_EnterSpace_void_StringRC_NullResultCallback", "void", ["number", "string", "number", "number"], [this.pointer, spaceId, _callbackPtr, 0]);
27682
+ Module.ccall("csp_systems_SpaceSystem_EnterSpace_void_StringRC_IRealtimeEngineP_SpaceResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, spaceId, realtimeEngine.pointer, _callbackPtr, 0]);
27177
27683
  return _promise;
27178
27684
  }
27179
27685
  /**
@@ -27325,7 +27831,7 @@ export class CSPFoundation {
27325
27831
  }
27326
27832
  /**
27327
27833
  * @description Updates the name and/or the description of a Space
27328
- * @param space - The space to update
27834
+ * @param spaceId - The space id to update
27329
27835
  * @param name - If a new name is provided it will be used to update the space name
27330
27836
  * @param description - If a new description is provided it will be used to update the space
27331
27837
  * description
@@ -27380,7 +27886,7 @@ export class CSPFoundation {
27380
27886
  }
27381
27887
  /**
27382
27888
  * @description Deletes a given space and the associated objects that belong to it. Including UserService group, Metadata, and Thumbnail.
27383
- * @param space - Space to delete
27889
+ * @param spaceId - Space id to delete
27384
27890
  * @param callback - Callback when asynchronous task finishes
27385
27891
  */
27386
27892
  async deleteSpace(spaceId) {
@@ -27606,7 +28112,7 @@ export class CSPFoundation {
27606
28112
  }
27607
28113
  /**
27608
28114
  * @description Invites a given email to a specific space.
27609
- * @param space - Space to invite to
28115
+ * @param spaceId - Space id to invite to
27610
28116
  * @param email - Email to invite to space
27611
28117
  * @param isModeratorRole - If present and true sets the user's role in the space to "moderator", pass false or
27612
28118
  * nullptr to leave role as default
@@ -27661,7 +28167,7 @@ export class CSPFoundation {
27661
28167
  }
27662
28168
  /**
27663
28169
  * @description Invites all the given emails to a specific space.
27664
- * @param space - Space to invite to
28170
+ * @param spaceId - Space id to invite to
27665
28171
  * @param inviteUsers - Collection containing the email link URL and the users to invite with their emails and roles
27666
28172
  * @param callback - Callback when asynchronous task finishes
27667
28173
  */
@@ -27686,7 +28192,7 @@ export class CSPFoundation {
27686
28192
  }
27687
28193
  /**
27688
28194
  * @description Returns an array of obfuscated email addresses, addresses of users that have not yet accepted the space invite
27689
- * @param space - Space for which the invites where sent
28195
+ * @param spaceId - Space ID for which the invites where sent
27690
28196
  * @param callback - Callback when asynchronous task finishes
27691
28197
  */
27692
28198
  async getPendingUserInvites(spaceId) {
@@ -27710,7 +28216,7 @@ export class CSPFoundation {
27710
28216
  }
27711
28217
  /**
27712
28218
  * @description Returns an array of ids of users that accepted the space invite
27713
- * @param space - Space for which the invites where sent
28219
+ * @param spaceId - Space ID for which the invites where sent
27714
28220
  * @param callback - Callback when asynchronous task finishes
27715
28221
  */
27716
28222
  async getAcceptedUserInvites(spaceId) {
@@ -27734,7 +28240,7 @@ export class CSPFoundation {
27734
28240
  }
27735
28241
  /**
27736
28242
  * @description Removes a user from a space by the user's unique ID.
27737
- * @param space - Space to remove user from
28243
+ * @param spaceId - Space id to remove user from
27738
28244
  * @param userId - Unique id of user
27739
28245
  * @param callback - Callback when asynchronous task finishes
27740
28246
  */
@@ -27759,7 +28265,7 @@ export class CSPFoundation {
27759
28265
  }
27760
28266
  /**
27761
28267
  * @description Adds a user to a space by the user's unique ID.
27762
- * @param space - Space to add user to
28268
+ * @param spaceId - Space id to add user to
27763
28269
  * @param userId - Unique id of user
27764
28270
  * @param callback - Callback when asynchronous task finishes
27765
28271
  */
@@ -27784,7 +28290,7 @@ export class CSPFoundation {
27784
28290
  }
27785
28291
  /**
27786
28292
  * @description Creates new Site information and associates it with the Space.
27787
- * @param space - Space to associate the Site information with
28293
+ * @param spaceId - Space ID to associate the Site information with
27788
28294
  * @param siteInfo - Site information to be added
27789
28295
  * @param callback - Callback when asynchronous task finishes
27790
28296
  */
@@ -27809,7 +28315,7 @@ export class CSPFoundation {
27809
28315
  }
27810
28316
  /**
27811
28317
  * @description Removes the Site information from the Space.
27812
- * @param space - Space for which to remove the associated Site information
28318
+ * @param spaceId - Space ID for which to remove the associated Site information
27813
28319
  * @param siteInfo - Site information to be removed
27814
28320
  * @param callback - Callback when asynchronous task
27815
28321
  */
@@ -27834,7 +28340,7 @@ export class CSPFoundation {
27834
28340
  }
27835
28341
  /**
27836
28342
  * @description Retrieves the Sites information associated with a Space.
27837
- * @param space - Space to be queried for Site information
28343
+ * @param spaceId - Space ID to be queried for Site information
27838
28344
  * @param callback - Callback when asynchronous task finishes
27839
28345
  */
27840
28346
  async getSitesInfo(spaceId) {
@@ -27858,7 +28364,7 @@ export class CSPFoundation {
27858
28364
  }
27859
28365
  /**
27860
28366
  * @description Updates the space role for a particular user
27861
- * @param space - The space that the requested user is part of
28367
+ * @param spaceId - The space ID that the requested user is part of
27862
28368
  * @param newUserRoleInfo - New user role information containing the new role for the specified user
27863
28369
  * @param callback - Callback when asynchronous task finishes
27864
28370
  */
@@ -27883,7 +28389,7 @@ export class CSPFoundation {
27883
28389
  }
27884
28390
  /**
27885
28391
  * @description Retrieves the User role information for the User Ids that have been passed in
27886
- * @param space - Space for which the User Roles will be retrieved
28392
+ * @param spaceId - Space ID for which the User Roles will be retrieved
27887
28393
  * @param requestedUserIds - Array of User Ids for which the User Roles will be retrieved
27888
28394
  * @param callback - Callback when asynchronous task finishes
27889
28395
  */
@@ -27957,7 +28463,7 @@ export class CSPFoundation {
27957
28463
  }
27958
28464
  /**
27959
28465
  * @description Retrieves the Space metadata information
27960
- * @param space - Space for which the metadata will be retrieved
28466
+ * @param spaceId - Space ID for which the metadata will be retrieved
27961
28467
  * @param callback - Callback when asynchronous task finishes
27962
28468
  */
27963
28469
  async getSpaceMetadata(spaceId) {
@@ -27981,7 +28487,7 @@ export class CSPFoundation {
27981
28487
  }
27982
28488
  /**
27983
28489
  * @description Updates the Space thumbnail image or adds one if it didn't have it previously using FileAssetDataSource
27984
- * @param space - Space for which the thumbnail will be updated
28490
+ * @param spaceId - Space ID for which the thumbnail will be updated
27985
28491
  * @param newThumbnail - New thumbnail information
27986
28492
  * @param callback - Callback when asynchronous task finishes
27987
28493
  */
@@ -28006,7 +28512,7 @@ export class CSPFoundation {
28006
28512
  }
28007
28513
  /**
28008
28514
  * @description Updates the Space thumbnail image or adds one if it didn't have it previously using BufferAssetDataSource
28009
- * @param space - Space for which the thumbnail will be updated
28515
+ * @param spaceId - Space ID for which the thumbnail will be updated
28010
28516
  * @param newThumbnail - New thumbnail information
28011
28517
  * @param callback - Callback when asynchronous task finishes
28012
28518
  */
@@ -28033,7 +28539,7 @@ export class CSPFoundation {
28033
28539
  * @description Retrieves the space thumbnail information associated with the space
28034
28540
  * If the space does not have a thumbnail associated with it the result callback will be successful, the HTTP res code will be ResponseNotFound
28035
28541
  * and the Uri field inside the UriResult will be empty
28036
- * @param space - Space for which the thumbnail information will be retrieved
28542
+ * @param spaceId - Space ID for which the thumbnail information will be retrieved
28037
28543
  * @param callback - Callback when asynchronous task finishes
28038
28544
  */
28039
28545
  async getSpaceThumbnail(spaceId) {
@@ -28057,7 +28563,7 @@ export class CSPFoundation {
28057
28563
  }
28058
28564
  /**
28059
28565
  * @description Adds user to group banned list. Banned list can be retrieved from the space
28060
- * @param space - Space for which the ban will be issued on
28566
+ * @param spaceId - Space ID for which the ban will be issued on
28061
28567
  * @param requestedUserId - User id to be banned from the space
28062
28568
  * @param callback - Callback when asynchronous task finishes
28063
28569
  */
@@ -28082,7 +28588,7 @@ export class CSPFoundation {
28082
28588
  }
28083
28589
  /**
28084
28590
  * @description Deletes user from group banned list. Banned list can be retrieved from the space
28085
- * @param space - Space for which the Space for which the ban will be removed on
28591
+ * @param spaceId - Space ID for which the Space for which the ban will be removed on
28086
28592
  * @param requestedUserId - User id to have ban removed from the space
28087
28593
  * @param callback - Callback when asynchronous task finishes
28088
28594
  */