connected-spaces-platform.web 5.22.0 → 6.0.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.
@@ -1097,14 +1097,6 @@ function csp_common_Vector4Factory(
1097
1097
  }
1098
1098
  ProxyClassFactories["csp_common_Vector4"] = csp_common_Vector4Factory;
1099
1099
 
1100
- function csp_common_InvalidInterfaceUseErrorFactory(
1101
- nativePointer: NativePointer,
1102
- ): NativeClassWrapper {
1103
- return new Common.InvalidInterfaceUseError(nativePointer);
1104
- }
1105
- ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
1106
- csp_common_InvalidInterfaceUseErrorFactory;
1107
-
1108
1100
  function csp_common_IJSScriptRunnerFactory(
1109
1101
  nativePointer: NativePointer,
1110
1102
  ): NativeClassWrapper {
@@ -1113,6 +1105,14 @@ function csp_common_IJSScriptRunnerFactory(
1113
1105
  ProxyClassFactories["csp_common_IJSScriptRunner"] =
1114
1106
  csp_common_IJSScriptRunnerFactory;
1115
1107
 
1108
+ function csp_common_InvalidInterfaceUseErrorFactory(
1109
+ nativePointer: NativePointer,
1110
+ ): NativeClassWrapper {
1111
+ return new Common.InvalidInterfaceUseError(nativePointer);
1112
+ }
1113
+ ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
1114
+ csp_common_InvalidInterfaceUseErrorFactory;
1115
+
1116
1116
  function csp_common_IRealtimeEngineFactory(
1117
1117
  nativePointer: NativePointer,
1118
1118
  ): NativeClassWrapper {
@@ -1184,14 +1184,6 @@ function csp_multiplayer_SpaceEntityFactory(
1184
1184
  ProxyClassFactories["csp_multiplayer_SpaceEntity"] =
1185
1185
  csp_multiplayer_SpaceEntityFactory;
1186
1186
 
1187
- function csp_multiplayer_SpaceEntitySystemFactory(
1188
- nativePointer: NativePointer,
1189
- ): NativeClassWrapper {
1190
- return new Multiplayer.SpaceEntitySystem(nativePointer);
1191
- }
1192
- ProxyClassFactories["csp_multiplayer_SpaceEntitySystem"] =
1193
- csp_multiplayer_SpaceEntitySystemFactory;
1194
-
1195
1187
  function csp_multiplayer_SpaceTransformFactory(
1196
1188
  nativePointer: NativePointer,
1197
1189
  ): NativeClassWrapper {
@@ -1516,6 +1508,14 @@ function csp_systems_SequenceFactory(
1516
1508
  }
1517
1509
  ProxyClassFactories["csp_systems_Sequence"] = csp_systems_SequenceFactory;
1518
1510
 
1511
+ function csp_systems_ApplicationSettingsFactory(
1512
+ nativePointer: NativePointer,
1513
+ ): NativeClassWrapper {
1514
+ return new Systems.ApplicationSettings(nativePointer);
1515
+ }
1516
+ ProxyClassFactories["csp_systems_ApplicationSettings"] =
1517
+ csp_systems_ApplicationSettingsFactory;
1518
+
1519
1519
  function csp_systems_SettingsCollectionFactory(
1520
1520
  nativePointer: NativePointer,
1521
1521
  ): NativeClassWrapper {
@@ -1694,6 +1694,14 @@ function csp_common_SequenceChangedNetworkEventDataFactory(
1694
1694
  ProxyClassFactories["csp_common_SequenceChangedNetworkEventData"] =
1695
1695
  csp_common_SequenceChangedNetworkEventDataFactory;
1696
1696
 
1697
+ function csp_multiplayer_OnlineRealtimeEngineFactory(
1698
+ nativePointer: NativePointer,
1699
+ ): NativeClassWrapper {
1700
+ return new Multiplayer.OnlineRealtimeEngine(nativePointer);
1701
+ }
1702
+ ProxyClassFactories["csp_multiplayer_OnlineRealtimeEngine"] =
1703
+ csp_multiplayer_OnlineRealtimeEngineFactory;
1704
+
1697
1705
  function csp_multiplayer_AnimatedModelSpaceComponentFactory(
1698
1706
  nativePointer: NativePointer,
1699
1707
  ): NativeClassWrapper {
@@ -2329,6 +2337,22 @@ function csp_systems_SequenceSystemFactory(
2329
2337
  ProxyClassFactories["csp_systems_SequenceSystem"] =
2330
2338
  csp_systems_SequenceSystemFactory;
2331
2339
 
2340
+ function csp_systems_ApplicationSettingsResultFactory(
2341
+ nativePointer: NativePointer,
2342
+ ): NativeClassWrapper {
2343
+ return new Systems.ApplicationSettingsResult(nativePointer);
2344
+ }
2345
+ ProxyClassFactories["csp_systems_ApplicationSettingsResult"] =
2346
+ csp_systems_ApplicationSettingsResultFactory;
2347
+
2348
+ function csp_systems_ApplicationSettingsSystemFactory(
2349
+ nativePointer: NativePointer,
2350
+ ): NativeClassWrapper {
2351
+ return new Systems.ApplicationSettingsSystem(nativePointer);
2352
+ }
2353
+ ProxyClassFactories["csp_systems_ApplicationSettingsSystem"] =
2354
+ csp_systems_ApplicationSettingsSystemFactory;
2355
+
2332
2356
  function csp_systems_SettingsCollectionResultFactory(
2333
2357
  nativePointer: NativePointer,
2334
2358
  ): NativeClassWrapper {
@@ -3473,8 +3497,8 @@ export namespace Common {
3473
3497
  * @description Enum of concrete types of RealtimeEngines.
3474
3498
  */
3475
3499
  export enum RealtimeEngineType {
3476
- OnlineMultiUser = 0,
3477
- OnlineSingleUser,
3500
+ Online = 0,
3501
+ Offline,
3478
3502
  }
3479
3503
  }
3480
3504
 
@@ -3564,6 +3588,10 @@ export namespace Multiplayer {
3564
3588
  SET_SCOPES,
3565
3589
  START_LISTENING,
3566
3590
  STOP_LISTENING,
3591
+ ON_OBJECT_MESSAGE,
3592
+ ON_OBJECT_PATCH,
3593
+ ON_REQUEST_TO_SEND_OBJECT,
3594
+ ON_REQUEST_TO_DISCONNECT,
3567
3595
  }
3568
3596
  }
3569
3597
 
@@ -22783,7 +22811,7 @@ export namespace Common {
22783
22811
  }
22784
22812
 
22785
22813
  export namespace Common {
22786
- export class InvalidInterfaceUseError
22814
+ export class IJSScriptRunner
22787
22815
  extends NativeClassWrapper
22788
22816
  implements INativeResource
22789
22817
  {
@@ -22792,23 +22820,13 @@ export namespace Common {
22792
22820
  super(pointer);
22793
22821
  }
22794
22822
 
22795
- static create_msg(msg: string): InvalidInterfaceUseError {
22796
- var _ptr = Module._malloc(8);
22797
- Module.ccall(
22798
- "csp_common_InvalidInterfaceUseError_Ctor_StringRC",
22799
- "void",
22800
- ["number", "string"],
22801
- [_ptr, msg],
22802
- );
22803
- var _nPtr = getNativePointer(_ptr);
22804
-
22805
- return new InvalidInterfaceUseError(_nPtr);
22806
- }
22807
-
22823
+ /**
22824
+ * @description Virtual destructor.
22825
+ */
22808
22826
  delete(): void {
22809
22827
  if (this.ownsPointer && !this.disposed) {
22810
22828
  Module.ccall(
22811
- "csp_common_InvalidInterfaceUseError_Dtor",
22829
+ "csp_common_IJSScriptRunner_Dtor",
22812
22830
  "void",
22813
22831
  ["number"],
22814
22832
  [this.pointer],
@@ -22818,30 +22836,24 @@ export namespace Common {
22818
22836
  }
22819
22837
  }
22820
22838
 
22821
- get msg(): string {
22839
+ runScript(contextId: bigint, scriptText: string): boolean {
22840
+ assert(contextId >= Limits.INT64_MIN);
22841
+ assert(contextId <= Limits.INT64_MAX);
22842
+
22822
22843
  let _result = Module.ccall(
22823
- "csp_common_InvalidInterfaceUseError__Get_msg",
22824
- "string",
22825
- ["number"],
22826
- [this.pointer],
22844
+ "csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC",
22845
+ "boolean",
22846
+ ["number", "bigint", "string"],
22847
+ [this.pointer, contextId, scriptText],
22827
22848
  );
22828
22849
 
22829
22850
  return _result;
22830
22851
  }
22831
-
22832
- set msg(value: string) {
22833
- Module.ccall(
22834
- "csp_common_InvalidInterfaceUseError__Set_msg",
22835
- "void",
22836
- ["number", "string"],
22837
- [this.pointer, value],
22838
- );
22839
- }
22840
22852
  }
22841
22853
  }
22842
22854
 
22843
22855
  export namespace Common {
22844
- export class IJSScriptRunner
22856
+ export class InvalidInterfaceUseError
22845
22857
  extends NativeClassWrapper
22846
22858
  implements INativeResource
22847
22859
  {
@@ -22850,13 +22862,23 @@ export namespace Common {
22850
22862
  super(pointer);
22851
22863
  }
22852
22864
 
22853
- /**
22854
- * @description Virtual destructor.
22855
- */
22865
+ static create_msg(msg: string): InvalidInterfaceUseError {
22866
+ var _ptr = Module._malloc(8);
22867
+ Module.ccall(
22868
+ "csp_common_InvalidInterfaceUseError_Ctor_StringRC",
22869
+ "void",
22870
+ ["number", "string"],
22871
+ [_ptr, msg],
22872
+ );
22873
+ var _nPtr = getNativePointer(_ptr);
22874
+
22875
+ return new InvalidInterfaceUseError(_nPtr);
22876
+ }
22877
+
22856
22878
  delete(): void {
22857
22879
  if (this.ownsPointer && !this.disposed) {
22858
22880
  Module.ccall(
22859
- "csp_common_IJSScriptRunner_Dtor",
22881
+ "csp_common_InvalidInterfaceUseError_Dtor",
22860
22882
  "void",
22861
22883
  ["number"],
22862
22884
  [this.pointer],
@@ -22866,19 +22888,25 @@ export namespace Common {
22866
22888
  }
22867
22889
  }
22868
22890
 
22869
- runScript(contextId: bigint, scriptText: string): boolean {
22870
- assert(contextId >= Limits.INT64_MIN);
22871
- assert(contextId <= Limits.INT64_MAX);
22872
-
22891
+ get msg(): string {
22873
22892
  let _result = Module.ccall(
22874
- "csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC",
22875
- "boolean",
22876
- ["number", "bigint", "string"],
22877
- [this.pointer, contextId, scriptText],
22893
+ "csp_common_InvalidInterfaceUseError__Get_msg",
22894
+ "string",
22895
+ ["number"],
22896
+ [this.pointer],
22878
22897
  );
22879
22898
 
22880
22899
  return _result;
22881
22900
  }
22901
+
22902
+ set msg(value: string) {
22903
+ Module.ccall(
22904
+ "csp_common_InvalidInterfaceUseError__Set_msg",
22905
+ "void",
22906
+ ["number", "string"],
22907
+ [this.pointer, value],
22908
+ );
22909
+ }
22882
22910
  }
22883
22911
  }
22884
22912
 
@@ -22926,8 +22954,11 @@ export namespace Common {
22926
22954
  /**
22927
22955
  * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
22928
22956
  * @param name - The entity name of the newly created avatar entity.
22957
+ * @param userId - Id of the user creating this avatar. If your backend data store requires authentication, this will
22958
+ * probably be your username or some similar unique identifier.
22929
22959
  * @param spaceTransform - The initial transform to set the SpaceEntity to.
22930
- * @param state - The initial Avatar State to set.
22960
+ * @param isVisible - Whether the avatar defaults to being visible.
22961
+ * @param avatarState - The initial Avatar State to set.
22931
22962
  * @param avatarId - The ID to be set on the AvatarSpaceComponent
22932
22963
  * @param avatarPlayMode - The Initial AvatarPlayMode to set.
22933
22964
  * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
@@ -22936,8 +22967,10 @@ export namespace Common {
22936
22967
 
22937
22968
  async createAvatar(
22938
22969
  name: string,
22970
+ userId: string,
22939
22971
  spaceTransform: Multiplayer.SpaceTransform,
22940
- state: Multiplayer.AvatarState,
22972
+ isVisible: boolean,
22973
+ avatarState: Multiplayer.AvatarState,
22941
22974
  avatarId: string,
22942
22975
  avatarPlayMode: Multiplayer.AvatarPlayMode,
22943
22976
  ): Promise<Multiplayer.SpaceEntity> {
@@ -22960,12 +22993,14 @@ export namespace Common {
22960
22993
  _callbackPtr = Module.addFunction(_callback, "vii");
22961
22994
 
22962
22995
  Module.ccall(
22963
- "csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_SpaceTransformRC_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback",
22996
+ "csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback",
22964
22997
  "void",
22965
22998
  [
22966
22999
  "number",
22967
23000
  "string",
23001
+ "string",
22968
23002
  "number",
23003
+ "boolean",
22969
23004
  "number",
22970
23005
  "string",
22971
23006
  "number",
@@ -22975,8 +23010,10 @@ export namespace Common {
22975
23010
  [
22976
23011
  this.pointer,
22977
23012
  name,
23013
+ userId,
22978
23014
  spaceTransform.pointer,
22979
- state,
23015
+ isVisible,
23016
+ avatarState,
22980
23017
  avatarId,
22981
23018
  avatarPlayMode,
22982
23019
  _callbackPtr,
@@ -22991,6 +23028,8 @@ export namespace Common {
22991
23028
  * @description Create and add a SpaceEntity, with relevant default values.
22992
23029
  * @param name - The name of the newly created SpaceEntity.
22993
23030
  * @param spaceTransform - The initial transform to set the SpaceEntity to.
23031
+ * @param parentID - ID of another entity in the space that this entity should be created as a child to. If
23032
+ * empty, entity is created as a root entity.
22994
23033
  * @param callback - A callback that executes when the creation is complete,
22995
23034
  * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
22996
23035
  */
@@ -22998,6 +23037,7 @@ export namespace Common {
22998
23037
  async createEntity(
22999
23038
  name: string,
23000
23039
  spaceTransform: Multiplayer.SpaceTransform,
23040
+ parentID: bigint | null,
23001
23041
  ): Promise<Multiplayer.SpaceEntity> {
23002
23042
  var _resolve;
23003
23043
 
@@ -23017,16 +23057,42 @@ export namespace Common {
23017
23057
 
23018
23058
  _callbackPtr = Module.addFunction(_callback, "vii");
23019
23059
 
23060
+ var parentIDPointer = 0;
23061
+ if (parentID != null) {
23062
+ parentIDPointer = Module._malloc(4);
23063
+ Module.setValue(parentIDPointer, parentID, "i32");
23064
+ }
23065
+
23020
23066
  Module.ccall(
23021
- "csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_EntityCreatedCallback",
23067
+ "csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback",
23022
23068
  "void",
23023
- ["number", "string", "number", "number", "number"],
23024
- [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0],
23069
+ ["number", "string", "number", "bigint", "number", "number"],
23070
+ [
23071
+ this.pointer,
23072
+ name,
23073
+ spaceTransform.pointer,
23074
+ parentIDPointer,
23075
+ _callbackPtr,
23076
+ 0,
23077
+ ],
23025
23078
  );
23026
23079
 
23080
+ if (parentIDPointer) {
23081
+ Module._free(parentIDPointer);
23082
+ }
23083
+
23027
23084
  return _promise;
23028
23085
  }
23029
23086
 
23087
+ addEntity(entityToAdd: Multiplayer.SpaceEntity): void {
23088
+ Module.ccall(
23089
+ "csp_common_IRealtimeEngine_AddEntity_void_SpaceEntityP",
23090
+ "void",
23091
+ ["number", "number"],
23092
+ [this.pointer, entityToAdd.pointer],
23093
+ );
23094
+ }
23095
+
23030
23096
  /**
23031
23097
  * @description Destroy the specified entity.
23032
23098
  * @param entity - A non-owning pointer to the entity to be destroyed.
@@ -23062,6 +23128,8 @@ export namespace Common {
23062
23128
  /**
23063
23129
  * @description Sets a callback to be executed when an entity is fully created.
23064
23130
  * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
23131
+ * 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
23132
+ * override or remove this callback.
23065
23133
  * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
23066
23134
  */
23067
23135
  setEntityCreatedCallback(
@@ -23333,18 +23401,30 @@ export namespace Common {
23333
23401
  }
23334
23402
 
23335
23403
  /**
23336
- * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
23337
- * @param callback - A callback that executes when all existing entities have been retrieved.
23404
+ * @description Set Callback that notifies when the OnlineRealtimeEngine is in a valid state
23405
+ * after entering a space, and entity mutation can begin. Users should not mutate entities before receiving this callback.
23406
+ * This callback should be emitted in response to FetchAllEntitiesAndPopulateBuffers completing, either syncronously or asyncronously.
23407
+ * This callback must be set prior to entering a space.
23408
+ * @param fetchCompleteCallback - Callback that notifies when the RealtimeEngine has completed initial
23409
+ * entity fetch
23338
23410
  */
23339
- setInitialEntitiesRetrievedCallback(callback: (arg1: boolean) => void) {
23411
+ setEntityFetchCompleteCallback(callback: (arg1: number) => void) {
23340
23412
  var _callback = (_stateObject__: number, arg1) => {
23413
+ {
23414
+ const _unfixedValue = arg1;
23415
+ let _fixedValue =
23416
+ _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
23417
+
23418
+ arg1 = _fixedValue;
23419
+ }
23420
+
23341
23421
  callback(arg1);
23342
23422
  };
23343
23423
 
23344
23424
  var _callbackPtr = Module.addFunction(_callback, "vii");
23345
23425
 
23346
23426
  Module.ccall(
23347
- "csp_common_IRealtimeEngine_SetInitialEntitiesRetrievedCallback_void_CallbackHandler",
23427
+ "csp_common_IRealtimeEngine_SetEntityFetchCompleteCallback_void_EntityFetchCompleteCallback",
23348
23428
  "void",
23349
23429
  ["number", "number", "number"],
23350
23430
  [this.pointer, _callbackPtr, 0],
@@ -23857,19 +23937,19 @@ export namespace Multiplayer {
23857
23937
  /**
23858
23938
  * @description Constructor for CSPSceneDescription by deserializing a SceneDescription json file.
23859
23939
  * @param sceneDescriptionJson - The SceneDescription to deserialize.
23860
- * @param entitySystem - The SpaceEntitySystem for this session.
23861
- * @param logSystem - The SpaceEntitySystem for this session.
23940
+ * @param entitySystem - The OnlineRealtimeEngine for this session.
23941
+ * @param logSystem - The OnlineRealtimeEngine for this session.
23862
23942
  * @param remoteScriptRunner - The ScriptRunner for this session.
23863
23943
  */
23864
23944
  static create_sceneDescriptionJson_entitySystem_logSystem_remoteScriptRunner(
23865
23945
  sceneDescriptionJson: string,
23866
- entitySystem: Multiplayer.SpaceEntitySystem,
23946
+ entitySystem: Multiplayer.OnlineRealtimeEngine,
23867
23947
  logSystem: Common.LogSystem,
23868
23948
  remoteScriptRunner: Common.IJSScriptRunner,
23869
23949
  ): CSPSceneDescription {
23870
23950
  var _ptr = Module._malloc(8);
23871
23951
  Module.ccall(
23872
- "csp_multiplayer_CSPSceneDescription_Ctor_StringRC_SpaceEntitySystemR_LogSystemR_IJSScriptRunnerR",
23952
+ "csp_multiplayer_CSPSceneDescription_Ctor_StringRC_OnlineRealtimeEngineR_LogSystemR_IJSScriptRunnerR",
23873
23953
  "void",
23874
23954
  ["number", "string", "number", "number", "number"],
23875
23955
  [
@@ -24108,6 +24188,27 @@ export namespace Multiplayer {
24108
24188
  return _result;
24109
24189
  }
24110
24190
 
24191
+ /**
24192
+ * @description Get the currently set realtime engine.
24193
+ * @return Non-owning pointer to currently set realtime engine. This should be non-null when in a space, and null before entering, or after
24194
+ * exiting a space.
24195
+ */
24196
+
24197
+ getOnlineRealtimeEngine(): Multiplayer.OnlineRealtimeEngine {
24198
+ var _ret = Module._malloc(8);
24199
+
24200
+ Module.ccall(
24201
+ "csp_multiplayer_MultiplayerConnection_GetOnlineRealtimeEngineC_OnlineRealtimeEngineP",
24202
+ "void",
24203
+ ["number", "number"],
24204
+ [_ret, this.pointer],
24205
+ );
24206
+ var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
24207
+ Module._free(_ret);
24208
+
24209
+ return _nPtr;
24210
+ }
24211
+
24111
24212
  delete(): void {
24112
24213
  if (this.ownsPointer && !this.disposed) {
24113
24214
  Module.ccall(
@@ -24559,13 +24660,13 @@ export namespace Multiplayer {
24559
24660
  * @description Creates a SpaceEntity instance using the space entity system provided.
24560
24661
  */
24561
24662
  static create_entitySystem_scriptRunner_logSystem(
24562
- entitySystem: Multiplayer.SpaceEntitySystem,
24663
+ entitySystem: Multiplayer.OnlineRealtimeEngine,
24563
24664
  scriptRunner: Common.IJSScriptRunner,
24564
24665
  logSystem: Common.LogSystem,
24565
24666
  ): SpaceEntity {
24566
24667
  var _ptr = Module._malloc(8);
24567
24668
  Module.ccall(
24568
- "csp_multiplayer_SpaceEntity_Ctor_SpaceEntitySystemP_IJSScriptRunnerR_LogSystemP",
24669
+ "csp_multiplayer_SpaceEntity_Ctor_OnlineRealtimeEngineP_IJSScriptRunnerR_LogSystemP",
24569
24670
  "void",
24570
24671
  ["number", "number", "number", "number"],
24571
24672
  [_ptr, entitySystem.pointer, scriptRunner.pointer, logSystem.pointer],
@@ -24966,26 +25067,6 @@ export namespace Multiplayer {
24966
25067
  return _result;
24967
25068
  }
24968
25069
 
24969
- /**
24970
- * @description Get SpaceEntitySystem Object
24971
- * @return SpaceEntitySystem
24972
- */
24973
-
24974
- getSpaceEntitySystem(): Multiplayer.SpaceEntitySystem {
24975
- var _ret = Module._malloc(8);
24976
-
24977
- Module.ccall(
24978
- "csp_multiplayer_SpaceEntity_GetSpaceEntitySystem_SpaceEntitySystemP",
24979
- "void",
24980
- ["number", "number"],
24981
- [_ret, this.pointer],
24982
- );
24983
- var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
24984
- Module._free(_ret);
24985
-
24986
- return _nPtr;
24987
- }
24988
-
24989
25070
  /**
24990
25071
  * @description Sets the parent for this entity
24991
25072
  * QueueUpdate() should be called afterwards to enable changes to the parent.
@@ -25478,13 +25559,9 @@ export namespace Multiplayer {
25478
25559
 
25479
25560
  export namespace Multiplayer {
25480
25561
  /**
25481
- * @description Class for creating and managing multiplayer objects known as space entities.
25482
- * /// This provides functions to create and manage multiple player avatars and other objects.
25483
- * It manages things like queueing updated entities and triggering tick events. Callbacks
25484
- * can be registered for certain events that occur within the entity system so clients can
25485
- * react appropriately.
25562
+ * @description Simple class for holding the position, rotation and scale of a transform.
25486
25563
  */
25487
- export class SpaceEntitySystem
25564
+ export class SpaceTransform
25488
25565
  extends NativeClassWrapper
25489
25566
  implements INativeResource
25490
25567
  {
@@ -25494,677 +25571,320 @@ export namespace Multiplayer {
25494
25571
  }
25495
25572
 
25496
25573
  /**
25497
- * @description Creates a SpaceEntity with type Avatar, and relevant components and default states as specified.
25498
- * @param inName - The name to give the new SpaceEntity.
25499
- * @param inSpaceTransform - The initial transform to set the SpaceEntity to.
25500
- * @param isVisible - The initial visibility of the Avatar.
25501
- * @param inState - The initial Avatar State to set.
25502
- * @param inAvatarId - The Initial AvatarID to set.
25503
- * @param inAvatarPlayMode - The Initial AvatarPlayMode to set.
25504
- * @param callback - EntityCreatedCallback A callback that executes when the creation is complete,
25505
- * which contains a pointer to the new SpaceEntity so that it can be used on the local client.
25574
+ * @description Default constuctor for the SpaceTransform
25506
25575
  */
25507
-
25508
- async createAvatar(
25509
- name: string,
25510
- loginState: Common.LoginState,
25511
- spaceTransform: Multiplayer.SpaceTransform,
25512
- isVisible: boolean,
25513
- state: Multiplayer.AvatarState,
25514
- avatarId: string,
25515
- avatarPlayMode: Multiplayer.AvatarPlayMode,
25516
- ): Promise<Multiplayer.SpaceEntity> {
25517
- var _resolve;
25518
-
25519
- var _promise = new Promise<Multiplayer.SpaceEntity>((_r) => {
25520
- _resolve = _r;
25521
- });
25522
-
25523
- var _callbackPtr: number;
25524
- var _callback = (_stateObject__: number, arg1) => {
25525
- var _arg1Ptr = getNativePointer(arg1);
25526
- var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
25527
-
25528
- _resolve(_arg1Instance);
25529
-
25530
- Module.removeFunction(_callbackPtr);
25531
- };
25532
-
25533
- _callbackPtr = Module.addFunction(_callback, "vii");
25534
-
25576
+ static create(): SpaceTransform {
25577
+ var _ptr = Module._malloc(8);
25535
25578
  Module.ccall(
25536
- "csp_multiplayer_SpaceEntitySystem_CreateAvatar_void_StringRC_LoginStateRC_SpaceTransformRC_bool_AvatarState_StringRC_AvatarPlayMode_EntityCreatedCallback",
25579
+ "csp_multiplayer_SpaceTransform_Ctor",
25537
25580
  "void",
25538
- [
25539
- "number",
25540
- "string",
25541
- "number",
25542
- "number",
25543
- "boolean",
25544
- "number",
25545
- "string",
25546
- "number",
25547
- "number",
25548
- "number",
25549
- ],
25550
- [
25551
- this.pointer,
25552
- name,
25553
- loginState.pointer,
25554
- spaceTransform.pointer,
25555
- isVisible,
25556
- state,
25557
- avatarId,
25558
- avatarPlayMode,
25559
- _callbackPtr,
25560
- 0,
25561
- ],
25581
+ ["number"],
25582
+ [_ptr],
25562
25583
  );
25584
+ var _nPtr = getNativePointer(_ptr);
25563
25585
 
25564
- return _promise;
25586
+ return new SpaceTransform(_nPtr);
25565
25587
  }
25566
25588
 
25567
25589
  /**
25568
- * @description Creates a SpaceEntity of type Object, and relevant default values.
25569
- * @param inName - The name to give the new SpaceEntity.
25570
- * @param inSpaceTransform - The initial transform to set the SpaceEntity to.
25571
- * @param callback - A callback that executes when the creation is complete,
25572
- * which contains a pointer to the new SpaceEntity so that it can be used on the local client.
25590
+ * @description Custom constructor for the SpaceTransform.
25591
+ * @param position - The position value for the transform.
25592
+ * @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
25593
+ * @param scale - The scale value for the transform.
25573
25594
  */
25574
-
25575
- async createObject(
25576
- name: string,
25577
- spaceTransform: Multiplayer.SpaceTransform,
25578
- ): Promise<Multiplayer.SpaceEntity> {
25579
- var _resolve;
25580
-
25581
- var _promise = new Promise<Multiplayer.SpaceEntity>((_r) => {
25582
- _resolve = _r;
25583
- });
25584
-
25585
- var _callbackPtr: number;
25586
- var _callback = (_stateObject__: number, arg1) => {
25587
- var _arg1Ptr = getNativePointer(arg1);
25588
- var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
25589
-
25590
- _resolve(_arg1Instance);
25591
-
25592
- Module.removeFunction(_callbackPtr);
25593
- };
25594
-
25595
- _callbackPtr = Module.addFunction(_callback, "vii");
25596
-
25595
+ static create_position_rotation_scale(
25596
+ position: Common.Vector3,
25597
+ rotation: Common.Vector4,
25598
+ scale: Common.Vector3,
25599
+ ): SpaceTransform {
25600
+ var _ptr = Module._malloc(8);
25597
25601
  Module.ccall(
25598
- "csp_multiplayer_SpaceEntitySystem_CreateObject_void_StringRC_SpaceTransformRC_EntityCreatedCallback",
25602
+ "csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC",
25599
25603
  "void",
25600
- ["number", "string", "number", "number", "number"],
25601
- [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0],
25604
+ ["number", "number", "number", "number"],
25605
+ [_ptr, position.pointer, rotation.pointer, scale.pointer],
25602
25606
  );
25607
+ var _nPtr = getNativePointer(_ptr);
25603
25608
 
25604
- return _promise;
25609
+ return new SpaceTransform(_nPtr);
25605
25610
  }
25606
25611
 
25607
25612
  /**
25608
- * @description Destroys both the remote view and the local view of the specified entity.
25609
- * @param entity - The entity to be destroyed.
25610
- * @param callback - The callback to execute.
25613
+ * @description Equality operator
25614
+ * @param spaceTransform - Transform
25611
25615
  */
25616
+ // operator==
25612
25617
 
25613
- async destroyEntity(entity: Multiplayer.SpaceEntity): Promise<boolean> {
25614
- var _resolve;
25615
-
25616
- var _promise = new Promise<boolean>((_r) => {
25617
- _resolve = _r;
25618
- });
25618
+ /**
25619
+ * @description Inequality operator
25620
+ * @param spaceTransform - Transform
25621
+ */
25622
+ // operator!=
25619
25623
 
25620
- var _callbackPtr: number;
25621
- var _callback = (_stateObject__: number, arg1) => {
25622
- _resolve(!!arg1);
25624
+ /**
25625
+ * @description Multiplication operator
25626
+ * @param spaceTransform - Transform
25627
+ * NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
25628
+ */
25629
+ // operator*
25623
25630
 
25624
- Module.removeFunction(_callbackPtr);
25625
- };
25631
+ delete(): void {
25632
+ if (this.ownsPointer && !this.disposed) {
25633
+ Module.ccall(
25634
+ "csp_multiplayer_SpaceTransform_Dtor",
25635
+ "void",
25636
+ ["number"],
25637
+ [this.pointer],
25638
+ );
25626
25639
 
25627
- _callbackPtr = Module.addFunction(_callback, "vii");
25640
+ this.disposed = true;
25641
+ }
25642
+ }
25628
25643
 
25644
+ get position(): Common.Vector3 {
25645
+ const _ptr = Module._malloc(8);
25629
25646
  Module.ccall(
25630
- "csp_multiplayer_SpaceEntitySystem_DestroyEntity_void_SpaceEntityP_CallbackHandler",
25647
+ "csp_multiplayer_SpaceTransform__Get_Position",
25631
25648
  "void",
25632
- ["number", "number", "number", "number"],
25633
- [this.pointer, entity.pointer, _callbackPtr, 0],
25649
+ ["number", "number"],
25650
+ [_ptr, this.pointer],
25634
25651
  );
25635
25652
 
25636
- return _promise;
25653
+ const _nPtr = getNativePointer(_ptr);
25654
+ return new Common.Vector3(_nPtr);
25637
25655
  }
25638
25656
 
25639
- /**
25640
- * @description Destroys the local client's view of the specified entity.
25641
- * @param entity - The entity to be destroyed locally.
25642
- */
25643
-
25644
- localDestroyEntity(entity: Multiplayer.SpaceEntity): void {
25657
+ set position(value: Common.Vector3) {
25645
25658
  Module.ccall(
25646
- "csp_multiplayer_SpaceEntitySystem_LocalDestroyEntity_void_SpaceEntityP",
25659
+ "csp_multiplayer_SpaceTransform__Set_Position",
25647
25660
  "void",
25648
25661
  ["number", "number"],
25649
- [this.pointer, entity.pointer],
25662
+ [this.pointer, value.pointer],
25650
25663
  );
25651
25664
  }
25652
25665
 
25653
- /**
25654
- * @description Finds the first SpaceEntity that matches InName.
25655
- * @param inName - The name to search.
25656
- * @return A pointer to the first found match SpaceEntity.
25657
- */
25658
-
25659
- findSpaceEntity(name: string): Multiplayer.SpaceEntity {
25660
- var _ret = Module._malloc(8);
25661
-
25666
+ get rotation(): Common.Vector4 {
25667
+ const _ptr = Module._malloc(8);
25662
25668
  Module.ccall(
25663
- "csp_multiplayer_SpaceEntitySystem_FindSpaceEntity_SpaceEntityP_StringRC",
25669
+ "csp_multiplayer_SpaceTransform__Get_Rotation",
25664
25670
  "void",
25665
- ["number", "number", "string"],
25666
- [_ret, this.pointer, name],
25671
+ ["number", "number"],
25672
+ [_ptr, this.pointer],
25667
25673
  );
25668
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25669
- Module._free(_ret);
25670
25674
 
25671
- return _nPtr;
25675
+ const _nPtr = getNativePointer(_ptr);
25676
+ return new Common.Vector4(_nPtr);
25672
25677
  }
25673
25678
 
25674
- /**
25675
- * @description Finds the first SpaceEntity that has the ID EntityId.
25676
- * @param entityId - The Id to look for.
25677
- * @return A pointer to the first found match SpaceEntity.
25678
- */
25679
-
25680
- findSpaceEntityById(entityId: bigint): Multiplayer.SpaceEntity {
25681
- assert(entityId >= Limits.UINT64_MIN);
25682
- assert(entityId <= Limits.UINT64_MAX);
25683
-
25684
- var _ret = Module._malloc(8);
25685
-
25679
+ set rotation(value: Common.Vector4) {
25686
25680
  Module.ccall(
25687
- "csp_multiplayer_SpaceEntitySystem_FindSpaceEntityById_SpaceEntityP_uint64_t",
25681
+ "csp_multiplayer_SpaceTransform__Set_Rotation",
25688
25682
  "void",
25689
- ["number", "number", "bigint"],
25690
- [_ret, this.pointer, entityId],
25683
+ ["number", "number"],
25684
+ [this.pointer, value.pointer],
25691
25685
  );
25692
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25693
- Module._free(_ret);
25694
-
25695
- return _nPtr;
25696
25686
  }
25697
25687
 
25698
- /**
25699
- * @description Finds the first SpaceEntity of type Avatar that matches InName.
25700
- * @param inName - The name to search.
25701
- * @return A pointer to the first found match SpaceEntity.
25702
- */
25703
-
25704
- findSpaceAvatar(name: string): Multiplayer.SpaceEntity {
25705
- var _ret = Module._malloc(8);
25706
-
25688
+ get scale(): Common.Vector3 {
25689
+ const _ptr = Module._malloc(8);
25707
25690
  Module.ccall(
25708
- "csp_multiplayer_SpaceEntitySystem_FindSpaceAvatar_SpaceEntityP_StringRC",
25691
+ "csp_multiplayer_SpaceTransform__Get_Scale",
25709
25692
  "void",
25710
- ["number", "number", "string"],
25711
- [_ret, this.pointer, name],
25693
+ ["number", "number"],
25694
+ [_ptr, this.pointer],
25712
25695
  );
25713
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25714
- Module._free(_ret);
25715
25696
 
25716
- return _nPtr;
25697
+ const _nPtr = getNativePointer(_ptr);
25698
+ return new Common.Vector3(_nPtr);
25717
25699
  }
25718
25700
 
25719
- /**
25720
- * @description Finds the first SpaceEntity of type Object that matches InName.
25721
- * @param inName - The name to search.
25722
- * @return A pointer to the first found match SpaceEntity.
25723
- */
25724
-
25725
- findSpaceObject(name: string): Multiplayer.SpaceEntity {
25726
- var _ret = Module._malloc(8);
25727
-
25701
+ set scale(value: Common.Vector3) {
25728
25702
  Module.ccall(
25729
- "csp_multiplayer_SpaceEntitySystem_FindSpaceObject_SpaceEntityP_StringRC",
25703
+ "csp_multiplayer_SpaceTransform__Set_Scale",
25730
25704
  "void",
25731
- ["number", "number", "string"],
25732
- [_ret, this.pointer, name],
25705
+ ["number", "number"],
25706
+ [this.pointer, value.pointer],
25733
25707
  );
25734
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25735
- Module._free(_ret);
25736
-
25737
- return _nPtr;
25738
25708
  }
25709
+ }
25710
+ }
25739
25711
 
25740
- /**
25741
- * @description Locks the entity mutex.
25742
- */
25712
+ export namespace Multiplayer {
25713
+ /**
25714
+ @ingroup Conversation
25715
+ * @description Contains information about a conversation message.
25716
+ */
25717
+ export class MessageInfo
25718
+ extends NativeClassWrapper
25719
+ implements INativeResource
25720
+ {
25721
+ /** @internal */
25722
+ constructor(pointer: NativePointer) {
25723
+ super(pointer);
25724
+ }
25743
25725
 
25744
- lockEntityUpdate(): void {
25726
+ static create(): MessageInfo {
25727
+ var _ptr = Module._malloc(8);
25745
25728
  Module.ccall(
25746
- "csp_multiplayer_SpaceEntitySystem_LockEntityUpdateC_void",
25729
+ "csp_multiplayer_MessageInfo_Ctor",
25747
25730
  "void",
25748
25731
  ["number"],
25749
- [this.pointer],
25732
+ [_ptr],
25750
25733
  );
25751
- }
25734
+ var _nPtr = getNativePointer(_ptr);
25752
25735
 
25753
- /**
25754
- * @description Unlocks the entity mutex.
25755
- */
25736
+ return new MessageInfo(_nPtr);
25737
+ }
25756
25738
 
25757
- unlockEntityUpdate(): void {
25739
+ static create_conversationId_isConversation_message(
25740
+ conversationId: string,
25741
+ isConversation: boolean,
25742
+ message: string,
25743
+ ): MessageInfo {
25744
+ var _ptr = Module._malloc(8);
25758
25745
  Module.ccall(
25759
- "csp_multiplayer_SpaceEntitySystem_UnlockEntityUpdateC_void",
25746
+ "csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC",
25760
25747
  "void",
25761
- ["number"],
25762
- [this.pointer],
25748
+ ["number", "string", "boolean", "string"],
25749
+ [_ptr, conversationId, isConversation, message],
25763
25750
  );
25764
- }
25751
+ var _nPtr = getNativePointer(_ptr);
25765
25752
 
25766
- /**
25767
- * @description Get the number of total entities in the system (both Avatars and Objects).
25768
- * @return The total number of entities.
25769
- */
25753
+ return new MessageInfo(_nPtr);
25754
+ }
25770
25755
 
25771
- getNumEntities(): number {
25772
- let _result = Module.ccall(
25773
- "csp_multiplayer_SpaceEntitySystem_GetNumEntitiesC_size_t",
25774
- "number",
25775
- ["number"],
25776
- [this.pointer],
25756
+ static create_conversationId_isConversation_message_messageId(
25757
+ conversationId: string,
25758
+ isConversation: boolean,
25759
+ message: string,
25760
+ messageId: string,
25761
+ ): MessageInfo {
25762
+ var _ptr = Module._malloc(8);
25763
+ Module.ccall(
25764
+ "csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC",
25765
+ "void",
25766
+ ["number", "string", "boolean", "string", "string"],
25767
+ [_ptr, conversationId, isConversation, message, messageId],
25777
25768
  );
25769
+ var _nPtr = getNativePointer(_ptr);
25778
25770
 
25779
- const _unfixedValue = _result;
25780
- let _fixedValue =
25781
- _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
25782
- _result = _fixedValue;
25771
+ return new MessageInfo(_nPtr);
25772
+ }
25783
25773
 
25784
- return _result;
25774
+ static create_messageData(
25775
+ messageData: Multiplayer.MessageInfo,
25776
+ ): MessageInfo {
25777
+ var _ptr = Module._malloc(8);
25778
+ Module.ccall(
25779
+ "csp_multiplayer_MessageInfo_Ctor_MessageInfoRC",
25780
+ "void",
25781
+ ["number", "number"],
25782
+ [_ptr, messageData.pointer],
25783
+ );
25784
+ var _nPtr = getNativePointer(_ptr);
25785
+
25786
+ return new MessageInfo(_nPtr);
25785
25787
  }
25786
25788
 
25787
- /**
25788
- * @description Get the number of total Avatars in the system.
25789
- * @return The total number of Avatar entities.
25790
- */
25791
-
25792
- getNumAvatars(): number {
25793
- let _result = Module.ccall(
25794
- "csp_multiplayer_SpaceEntitySystem_GetNumAvatarsC_size_t",
25795
- "number",
25796
- ["number"],
25797
- [this.pointer],
25798
- );
25789
+ // operator=
25799
25790
 
25800
- const _unfixedValue = _result;
25801
- let _fixedValue =
25802
- _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
25803
- _result = _fixedValue;
25791
+ delete(): void {
25792
+ if (this.ownsPointer && !this.disposed) {
25793
+ Module.ccall(
25794
+ "csp_multiplayer_MessageInfo_Dtor",
25795
+ "void",
25796
+ ["number"],
25797
+ [this.pointer],
25798
+ );
25804
25799
 
25805
- return _result;
25800
+ this.disposed = true;
25801
+ }
25806
25802
  }
25807
25803
 
25808
- /**
25809
- * @description Get the number of total Objects in the system.
25810
- * @return The total number of object entities.
25811
- */
25812
-
25813
- getNumObjects(): number {
25804
+ get conversationId(): string {
25814
25805
  let _result = Module.ccall(
25815
- "csp_multiplayer_SpaceEntitySystem_GetNumObjectsC_size_t",
25816
- "number",
25806
+ "csp_multiplayer_MessageInfo__Get_ConversationId",
25807
+ "string",
25817
25808
  ["number"],
25818
25809
  [this.pointer],
25819
25810
  );
25820
25811
 
25821
- const _unfixedValue = _result;
25822
- let _fixedValue =
25823
- _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
25824
- _result = _fixedValue;
25825
-
25826
25812
  return _result;
25827
25813
  }
25828
25814
 
25829
- /**
25830
- * @description Get an Entity (Avatar or Object) by its index.
25831
- * /// Note this is not currently thread safe and should only be called from the main thread.
25832
- * /// @param EntityIndex size_t : The index of the entity to get.
25833
- * @return A pointer to the entity with the given index.
25834
- */
25835
-
25836
- getEntityByIndex(entityIndex: number): Multiplayer.SpaceEntity {
25837
- assert(Number.isInteger(entityIndex));
25838
- assert(entityIndex >= Limits.UINT32_MIN);
25839
- assert(entityIndex <= Limits.UINT32_MAX);
25840
-
25841
- var _ret = Module._malloc(8);
25842
-
25843
- Module.ccall(
25844
- "csp_multiplayer_SpaceEntitySystem_GetEntityByIndex_SpaceEntityP_size_tC",
25845
- "void",
25846
- ["number", "number", "number"],
25847
- [_ret, this.pointer, entityIndex],
25848
- );
25849
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25850
- Module._free(_ret);
25851
-
25852
- return _nPtr;
25853
- }
25854
-
25855
- /**
25856
- * @description Get an Avatar by its index.
25857
- * /// Note this is not currently thread safe and should only be called from the main thread.
25858
- * /// @param AvatarIndex size_t : The index of the avatar entity to get.
25859
- * @return A pointer to the avatar entity with the given index.
25860
- */
25861
-
25862
- getAvatarByIndex(avatarIndex: number): Multiplayer.SpaceEntity {
25863
- assert(Number.isInteger(avatarIndex));
25864
- assert(avatarIndex >= Limits.UINT32_MIN);
25865
- assert(avatarIndex <= Limits.UINT32_MAX);
25866
-
25867
- var _ret = Module._malloc(8);
25868
-
25869
- Module.ccall(
25870
- "csp_multiplayer_SpaceEntitySystem_GetAvatarByIndex_SpaceEntityP_size_tC",
25871
- "void",
25872
- ["number", "number", "number"],
25873
- [_ret, this.pointer, avatarIndex],
25874
- );
25875
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25876
- Module._free(_ret);
25877
-
25878
- return _nPtr;
25879
- }
25880
-
25881
- /**
25882
- * @description Get an Object by its index.
25883
- * /// Note this is not currently thread safe and should only be called from the main thread.
25884
- * /// @param ObjectIndex size_t : The index of the object entity to get.
25885
- * @return A pointer to the object entity with the given index.
25886
- */
25887
-
25888
- getObjectByIndex(objectIndex: number): Multiplayer.SpaceEntity {
25889
- assert(Number.isInteger(objectIndex));
25890
- assert(objectIndex >= Limits.UINT32_MIN);
25891
- assert(objectIndex <= Limits.UINT32_MAX);
25892
-
25893
- var _ret = Module._malloc(8);
25894
-
25895
- Module.ccall(
25896
- "csp_multiplayer_SpaceEntitySystem_GetObjectByIndex_SpaceEntityP_size_tC",
25897
- "void",
25898
- ["number", "number", "number"],
25899
- [_ret, this.pointer, objectIndex],
25900
- );
25901
- var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
25902
- Module._free(_ret);
25903
-
25904
- return _nPtr;
25905
- }
25906
-
25907
- /**
25908
- * @description Add a new entity to the system.
25909
- * /// This can be called at any time from any thread and internally add the entity to a pending
25910
- * list which is then updated in a thread safe manner when ProcessPendingEntityOperations
25911
- * is called from the main thread.
25912
- * /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
25913
- */
25914
-
25915
- addEntity(entityToAdd: Multiplayer.SpaceEntity): void {
25916
- Module.ccall(
25917
- "csp_multiplayer_SpaceEntitySystem_AddEntity_void_SpaceEntityP",
25918
- "void",
25919
- ["number", "number"],
25920
- [this.pointer, entityToAdd.pointer],
25921
- );
25922
- }
25923
-
25924
- /**
25925
- * @description Sets a callback to be executed when an entity is remotely created.
25926
- * /// Only one callback may be registered, calling this function again will override whatever was previously set.
25927
- * If this is not set, some patch functions may fail.
25928
- * /// @param Callback EntityCreatedCallback : the callback to execute.
25929
- */
25930
- setEntityCreatedCallback(
25931
- callback: (arg1: Multiplayer.SpaceEntity) => void,
25932
- ) {
25933
- var _callback = (_stateObject__: number, arg1) => {
25934
- var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
25935
-
25936
- callback(_arg1);
25937
- };
25938
-
25939
- var _callbackPtr = Module.addFunction(_callback, "vii");
25940
-
25941
- Module.ccall(
25942
- "csp_multiplayer_SpaceEntitySystem_SetEntityCreatedCallback_void_EntityCreatedCallback",
25943
- "void",
25944
- ["number", "number", "number"],
25945
- [this.pointer, _callbackPtr, 0],
25946
- );
25947
- }
25948
-
25949
- /**
25950
- * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
25951
- * @param callback - The callback to execute.
25952
- */
25953
- setInitialEntitiesRetrievedCallback(callback: (arg1: boolean) => void) {
25954
- var _callback = (_stateObject__: number, arg1) => {
25955
- callback(arg1);
25956
- };
25957
-
25958
- var _callbackPtr = Module.addFunction(_callback, "vii");
25959
-
25960
- Module.ccall(
25961
- "csp_multiplayer_SpaceEntitySystem_SetInitialEntitiesRetrievedCallback_void_CallbackHandler",
25962
- "void",
25963
- ["number", "number", "number"],
25964
- [this.pointer, _callbackPtr, 0],
25965
- );
25966
- }
25967
-
25968
- /**
25969
- * @description Sets a callback to be executed when the script system is ready to run scripts.
25970
- * @param callback - The callback to execute.
25971
- */
25972
- setScriptSystemReadyCallback(callback: (arg1: boolean) => void) {
25973
- var _callback = (_stateObject__: number, arg1) => {
25974
- callback(arg1);
25975
- };
25976
-
25977
- var _callbackPtr = Module.addFunction(_callback, "vii");
25978
-
25979
- Module.ccall(
25980
- "csp_multiplayer_SpaceEntitySystem_SetScriptSystemReadyCallback_void_CallbackHandler",
25981
- "void",
25982
- ["number", "number", "number"],
25983
- [this.pointer, _callbackPtr, 0],
25984
- );
25985
- }
25986
-
25987
- /**
25988
- * @description Triggers queuing of the SpaceEntities updated components and replicated data.
25989
- * /// Causes the replication of a SpaceEntities data on next Tick() or ProcessPendingEntityOperations(). However, this is bound by an
25990
- * entities rate limit and will only be replicated if there has been sufficient time since the last time the entity sent a message.
25991
- * /// @param EntityToUpdate SpaceEntity : A pointer to the SpaceEntity to update.
25992
- */
25993
-
25994
- queueEntityUpdate(entityToUpdate: Multiplayer.SpaceEntity): void {
25815
+ set conversationId(value: string) {
25995
25816
  Module.ccall(
25996
- "csp_multiplayer_SpaceEntitySystem_QueueEntityUpdate_void_SpaceEntityP",
25817
+ "csp_multiplayer_MessageInfo__Set_ConversationId",
25997
25818
  "void",
25998
- ["number", "number"],
25999
- [this.pointer, entityToUpdate.pointer],
25819
+ ["number", "string"],
25820
+ [this.pointer, value],
26000
25821
  );
26001
25822
  }
26002
25823
 
26003
- /**
26004
- * @description Processes pending entity operations and then calls tick on scripts if necessary.
26005
- */
26006
-
26007
- tickEntities(): void {
26008
- Module.ccall(
26009
- "csp_multiplayer_SpaceEntitySystem_TickEntities_void",
26010
- "void",
25824
+ get createdTimestamp(): string {
25825
+ let _result = Module.ccall(
25826
+ "csp_multiplayer_MessageInfo__Get_CreatedTimestamp",
25827
+ "string",
26011
25828
  ["number"],
26012
25829
  [this.pointer],
26013
25830
  );
26014
- }
26015
-
26016
- registerEntityScriptAsModule(newEntity: Multiplayer.SpaceEntity): void {
26017
- Module.ccall(
26018
- "csp_multiplayer_SpaceEntitySystem_RegisterEntityScriptAsModule_void_SpaceEntityP",
26019
- "void",
26020
- ["number", "number"],
26021
- [this.pointer, newEntity.pointer],
26022
- );
26023
- }
26024
-
26025
- bindNewEntityToScript(newEntity: Multiplayer.SpaceEntity): void {
26026
- Module.ccall(
26027
- "csp_multiplayer_SpaceEntitySystem_BindNewEntityToScript_void_SpaceEntityP",
26028
- "void",
26029
- ["number", "number"],
26030
- [this.pointer, newEntity.pointer],
26031
- );
26032
- }
26033
-
26034
- /**
26035
- * @description Sets the script owner for the given entity to the current client
26036
- * @param entity - A pointer to the entity
26037
- */
26038
25831
 
26039
- claimScriptOwnership(entity: Multiplayer.SpaceEntity): void {
26040
- Module.ccall(
26041
- "csp_multiplayer_SpaceEntitySystem_ClaimScriptOwnershipC_void_SpaceEntityP",
26042
- "void",
26043
- ["number", "number"],
26044
- [this.pointer, entity.pointer],
26045
- );
25832
+ return _result;
26046
25833
  }
26047
25834
 
26048
- /**
26049
- * @description Adds the entity to a list of entities to be updated on tick
26050
- * @param entity - A pointer to the entity to be added
26051
- */
26052
-
26053
- markEntityForUpdate(entity: Multiplayer.SpaceEntity): void {
25835
+ set createdTimestamp(value: string) {
26054
25836
  Module.ccall(
26055
- "csp_multiplayer_SpaceEntitySystem_MarkEntityForUpdate_void_SpaceEntityP",
25837
+ "csp_multiplayer_MessageInfo__Set_CreatedTimestamp",
26056
25838
  "void",
26057
- ["number", "number"],
26058
- [this.pointer, entity.pointer],
25839
+ ["number", "string"],
25840
+ [this.pointer, value],
26059
25841
  );
26060
25842
  }
26061
25843
 
26062
- /**
26063
- * @description Process pending entity adds/removes and Patch message send and receives.
26064
- * /// Note this should only be called from main thread
26065
- */
26066
-
26067
- processPendingEntityOperations(): void {
26068
- Module.ccall(
26069
- "csp_multiplayer_SpaceEntitySystem_ProcessPendingEntityOperations_void",
26070
- "void",
25844
+ get editedTimestamp(): string {
25845
+ let _result = Module.ccall(
25846
+ "csp_multiplayer_MessageInfo__Get_EditedTimestamp",
25847
+ "string",
26071
25848
  ["number"],
26072
25849
  [this.pointer],
26073
25850
  );
26074
- }
26075
25851
 
26076
- /**
26077
- * @description Retrieves all entities from the endpoint, calls "GetAllScopedObjects" currently.
26078
- * /// Note this will generate new entity objects for every entity in the current scopes.
26079
- * If this is called by a client manually without first deleting all existing tracked entities, it is possible there will be duplicates.
26080
- * It is highly advised not to call this function unless you know what you are doing.
26081
- */
26082
-
26083
- retrieveAllEntities(): void {
26084
- Module.ccall(
26085
- "csp_multiplayer_SpaceEntitySystem_RetrieveAllEntities_void",
26086
- "void",
26087
- ["number"],
26088
- [this.pointer],
26089
- );
25852
+ return _result;
26090
25853
  }
26091
25854
 
26092
- /**
26093
- * @description Destroys the client's local view of all currently known entities.
26094
- * /// They still reside on the server, however they will not be accessible in the client application.
26095
- */
26096
-
26097
- localDestroyAllEntities(): void {
25855
+ set editedTimestamp(value: string) {
26098
25856
  Module.ccall(
26099
- "csp_multiplayer_SpaceEntitySystem_LocalDestroyAllEntities_void",
25857
+ "csp_multiplayer_MessageInfo__Set_EditedTimestamp",
26100
25858
  "void",
26101
- ["number"],
26102
- [this.pointer],
25859
+ ["number", "string"],
25860
+ [this.pointer, value],
26103
25861
  );
26104
25862
  }
26105
25863
 
26106
- /**
26107
- * @description Sets the selected state of an entity, if the operation is acceptable.
26108
- * /// Criteria:
26109
- * For Selection:
26110
- * - Entity must be deselected currently
26111
- * For Deselection:
26112
- * - Entity must be selected currently
26113
- * - Entity must be selected by the client attempting the deselection (SpaceEntity::GetSelectingClientID will return this information)
26114
- * /// @param SelectedState bool : The state to set the entity to, Selected = True, Deselected = false.
26115
- * @param entity - A pointer to the entity to modify selection state on.
26116
- * @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).
26117
- */
26118
-
26119
- setSelectionStateOfEntity(
26120
- selectedState: boolean,
26121
- entity: Multiplayer.SpaceEntity,
26122
- ): boolean {
25864
+ get userId(): string {
26123
25865
  let _result = Module.ccall(
26124
- "csp_multiplayer_SpaceEntitySystem_SetSelectionStateOfEntity_bool_boolC_SpaceEntityP",
26125
- "boolean",
26126
- ["number", "boolean", "number"],
26127
- [this.pointer, selectedState, entity.pointer],
26128
- );
26129
-
26130
- return _result;
26131
- }
26132
-
26133
- /**
26134
- * @description Enable Leader Election feature.
26135
- */
26136
-
26137
- enableLeaderElection(): void {
26138
- Module.ccall(
26139
- "csp_multiplayer_SpaceEntitySystem_EnableLeaderElection_void",
26140
- "void",
25866
+ "csp_multiplayer_MessageInfo__Get_UserId",
25867
+ "string",
26141
25868
  ["number"],
26142
25869
  [this.pointer],
26143
25870
  );
26144
- }
26145
25871
 
26146
- /**
26147
- * @description Disable Leader Election feature.
26148
- */
25872
+ return _result;
25873
+ }
26149
25874
 
26150
- disableLeaderElection(): void {
25875
+ set userId(value: string) {
26151
25876
  Module.ccall(
26152
- "csp_multiplayer_SpaceEntitySystem_DisableLeaderElection_void",
25877
+ "csp_multiplayer_MessageInfo__Set_UserId",
26153
25878
  "void",
26154
- ["number"],
26155
- [this.pointer],
25879
+ ["number", "string"],
25880
+ [this.pointer, value],
26156
25881
  );
26157
25882
  }
26158
25883
 
26159
- /**
26160
- * @description Check if the Leader Election feature is enabled.
26161
- * @return True if enabled, false otherwise.
26162
- */
26163
-
26164
- isLeaderElectionEnabled(): boolean {
25884
+ get message(): string {
26165
25885
  let _result = Module.ccall(
26166
- "csp_multiplayer_SpaceEntitySystem_IsLeaderElectionEnabledC_bool",
26167
- "boolean",
25886
+ "csp_multiplayer_MessageInfo__Get_Message",
25887
+ "string",
26168
25888
  ["number"],
26169
25889
  [this.pointer],
26170
25890
  );
@@ -26172,36 +25892,19 @@ export namespace Multiplayer {
26172
25892
  return _result;
26173
25893
  }
26174
25894
 
26175
- /**
26176
- * @description Debug helper to get the id of the currently elected script leader.
26177
- * @return The id of the leader.
26178
- */
26179
-
26180
- getLeaderId(): bigint {
26181
- let _result = Module.ccall(
26182
- "csp_multiplayer_SpaceEntitySystem_GetLeaderIdC_uint64_t",
26183
- "bigint",
26184
- ["number"],
26185
- [this.pointer],
25895
+ set message(value: string) {
25896
+ Module.ccall(
25897
+ "csp_multiplayer_MessageInfo__Set_Message",
25898
+ "void",
25899
+ ["number", "string"],
25900
+ [this.pointer, value],
26186
25901
  );
26187
-
26188
- const _unfixedValue = _result;
26189
- let _fixedValue =
26190
- _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
26191
- _result = _fixedValue;
26192
-
26193
- return _result;
26194
25902
  }
26195
25903
 
26196
- /**
26197
- * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
26198
- * @return True if enabled, false otherwise.
26199
- */
26200
-
26201
- getEntityPatchRateLimitEnabled(): boolean {
25904
+ get messageId(): string {
26202
25905
  let _result = Module.ccall(
26203
- "csp_multiplayer_SpaceEntitySystem_GetEntityPatchRateLimitEnabledC_bool",
26204
- "boolean",
25906
+ "csp_multiplayer_MessageInfo__Get_MessageId",
25907
+ "string",
26205
25908
  ["number"],
26206
25909
  [this.pointer],
26207
25910
  );
@@ -26209,54 +25912,48 @@ export namespace Multiplayer {
26209
25912
  return _result;
26210
25913
  }
26211
25914
 
26212
- /**
26213
- * @description Set the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
26214
- * /// This feature is enabled by default and should only be disabled if you are encountering issues.
26215
- * /// @param Enabled : sets if the feature should be enabled or not.
26216
- * \rst
26217
- * .. note::
26218
- * If disabling this feature, more requests will be made to Magnopus Connected Services,
26219
- * and consequently more patch merges may occur on the server as a result.
26220
- * \endrst
26221
- */
26222
-
26223
- setEntityPatchRateLimitEnabled(enabled: boolean): void {
25915
+ set messageId(value: string) {
26224
25916
  Module.ccall(
26225
- "csp_multiplayer_SpaceEntitySystem_SetEntityPatchRateLimitEnabled_void_bool",
25917
+ "csp_multiplayer_MessageInfo__Set_MessageId",
26226
25918
  "void",
26227
- ["number", "boolean"],
26228
- [this.pointer, enabled],
25919
+ ["number", "string"],
25920
+ [this.pointer, value],
26229
25921
  );
26230
25922
  }
25923
+ }
25924
+ }
26231
25925
 
26232
- /**
26233
- * @description Retrieves all entities that exist at the root level (do not have a parent entity).
26234
- * @return A list of root entities.
26235
- */
26236
-
26237
- getRootHierarchyEntities(): Common.List<Multiplayer.SpaceEntity> {
26238
- var _ret = Module._malloc(8);
25926
+ export namespace Multiplayer {
25927
+ /**
25928
+ @ingroup Conversation
25929
+ * @description Information used to update a message
25930
+ */
25931
+ export class MessageUpdateParams
25932
+ extends NativeClassWrapper
25933
+ implements INativeResource
25934
+ {
25935
+ /** @internal */
25936
+ constructor(pointer: NativePointer) {
25937
+ super(pointer);
25938
+ }
26239
25939
 
25940
+ static create(): MessageUpdateParams {
25941
+ var _ptr = Module._malloc(8);
26240
25942
  Module.ccall(
26241
- "csp_multiplayer_SpaceEntitySystem_GetRootHierarchyEntitiesC_ListPC",
25943
+ "csp_multiplayer_MessageUpdateParams_Ctor",
26242
25944
  "void",
26243
- ["number", "number"],
26244
- [_ret, this.pointer],
26245
- );
26246
- var _nPtr = new Common.List<Multiplayer.SpaceEntity>(
26247
- getNativePointer(_ret),
26248
- csp_multiplayer_SpaceEntityFactory,
26249
- "csp_multiplayer_SpaceEntity",
25945
+ ["number"],
25946
+ [_ptr],
26250
25947
  );
26251
- Module._free(_ret);
25948
+ var _nPtr = getNativePointer(_ptr);
26252
25949
 
26253
- return _nPtr;
25950
+ return new MessageUpdateParams(_nPtr);
26254
25951
  }
26255
25952
 
26256
25953
  delete(): void {
26257
25954
  if (this.ownsPointer && !this.disposed) {
26258
25955
  Module.ccall(
26259
- "csp_multiplayer_SpaceEntitySystem_Dtor",
25956
+ "csp_multiplayer_MessageUpdateParams_Dtor",
26260
25957
  "void",
26261
25958
  ["number"],
26262
25959
  [this.pointer],
@@ -26265,14 +25962,35 @@ export namespace Multiplayer {
26265
25962
  this.disposed = true;
26266
25963
  }
26267
25964
  }
25965
+
25966
+ get newMessage(): string {
25967
+ let _result = Module.ccall(
25968
+ "csp_multiplayer_MessageUpdateParams__Get_NewMessage",
25969
+ "string",
25970
+ ["number"],
25971
+ [this.pointer],
25972
+ );
25973
+
25974
+ return _result;
25975
+ }
25976
+
25977
+ set newMessage(value: string) {
25978
+ Module.ccall(
25979
+ "csp_multiplayer_MessageUpdateParams__Set_NewMessage",
25980
+ "void",
25981
+ ["number", "string"],
25982
+ [this.pointer, value],
25983
+ );
25984
+ }
26268
25985
  }
26269
25986
  }
26270
25987
 
26271
25988
  export namespace Multiplayer {
26272
25989
  /**
26273
- * @description Simple class for holding the position, rotation and scale of a transform.
26274
- */
26275
- export class SpaceTransform
25990
+ @ingroup Conversation
25991
+ * @description Information used to update an annotation
25992
+ */
25993
+ export class AnnotationUpdateParams
26276
25994
  extends NativeClassWrapper
26277
25995
  implements INativeResource
26278
25996
  {
@@ -26281,68 +25999,23 @@ export namespace Multiplayer {
26281
25999
  super(pointer);
26282
26000
  }
26283
26001
 
26284
- /**
26285
- * @description Default constuctor for the SpaceTransform
26286
- */
26287
- static create(): SpaceTransform {
26002
+ static create(): AnnotationUpdateParams {
26288
26003
  var _ptr = Module._malloc(8);
26289
26004
  Module.ccall(
26290
- "csp_multiplayer_SpaceTransform_Ctor",
26005
+ "csp_multiplayer_AnnotationUpdateParams_Ctor",
26291
26006
  "void",
26292
26007
  ["number"],
26293
26008
  [_ptr],
26294
26009
  );
26295
26010
  var _nPtr = getNativePointer(_ptr);
26296
26011
 
26297
- return new SpaceTransform(_nPtr);
26298
- }
26299
-
26300
- /**
26301
- * @description Custom constructor for the SpaceTransform.
26302
- * @param position - The position value for the transform.
26303
- * @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
26304
- * @param scale - The scale value for the transform.
26305
- */
26306
- static create_position_rotation_scale(
26307
- position: Common.Vector3,
26308
- rotation: Common.Vector4,
26309
- scale: Common.Vector3,
26310
- ): SpaceTransform {
26311
- var _ptr = Module._malloc(8);
26312
- Module.ccall(
26313
- "csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC",
26314
- "void",
26315
- ["number", "number", "number", "number"],
26316
- [_ptr, position.pointer, rotation.pointer, scale.pointer],
26317
- );
26318
- var _nPtr = getNativePointer(_ptr);
26319
-
26320
- return new SpaceTransform(_nPtr);
26012
+ return new AnnotationUpdateParams(_nPtr);
26321
26013
  }
26322
26014
 
26323
- /**
26324
- * @description Equality operator
26325
- * @param spaceTransform - Transform
26326
- */
26327
- // operator==
26328
-
26329
- /**
26330
- * @description Inequality operator
26331
- * @param spaceTransform - Transform
26332
- */
26333
- // operator!=
26334
-
26335
- /**
26336
- * @description Multiplication operator
26337
- * @param spaceTransform - Transform
26338
- * NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
26339
- */
26340
- // operator*
26341
-
26342
26015
  delete(): void {
26343
26016
  if (this.ownsPointer && !this.disposed) {
26344
26017
  Module.ccall(
26345
- "csp_multiplayer_SpaceTransform_Dtor",
26018
+ "csp_multiplayer_AnnotationUpdateParams_Dtor",
26346
26019
  "void",
26347
26020
  ["number"],
26348
26021
  [this.pointer],
@@ -26352,446 +26025,64 @@ export namespace Multiplayer {
26352
26025
  }
26353
26026
  }
26354
26027
 
26355
- get position(): Common.Vector3 {
26356
- const _ptr = Module._malloc(8);
26357
- Module.ccall(
26358
- "csp_multiplayer_SpaceTransform__Get_Position",
26359
- "void",
26360
- ["number", "number"],
26361
- [_ptr, this.pointer],
26028
+ get verticalFov(): number {
26029
+ let _result = Module.ccall(
26030
+ "csp_multiplayer_AnnotationUpdateParams__Get_VerticalFov",
26031
+ "number",
26032
+ ["number"],
26033
+ [this.pointer],
26362
26034
  );
26363
26035
 
26364
- const _nPtr = getNativePointer(_ptr);
26365
- return new Common.Vector3(_nPtr);
26036
+ return _result;
26366
26037
  }
26367
26038
 
26368
- set position(value: Common.Vector3) {
26039
+ set verticalFov(value: number) {
26369
26040
  Module.ccall(
26370
- "csp_multiplayer_SpaceTransform__Set_Position",
26041
+ "csp_multiplayer_AnnotationUpdateParams__Set_VerticalFov",
26371
26042
  "void",
26372
26043
  ["number", "number"],
26373
- [this.pointer, value.pointer],
26044
+ [this.pointer, value],
26374
26045
  );
26375
26046
  }
26376
26047
 
26377
- get rotation(): Common.Vector4 {
26048
+ get authorCameraPosition(): Common.Vector3 {
26378
26049
  const _ptr = Module._malloc(8);
26379
26050
  Module.ccall(
26380
- "csp_multiplayer_SpaceTransform__Get_Rotation",
26051
+ "csp_multiplayer_AnnotationUpdateParams__Get_AuthorCameraPosition",
26381
26052
  "void",
26382
26053
  ["number", "number"],
26383
26054
  [_ptr, this.pointer],
26384
26055
  );
26385
26056
 
26386
26057
  const _nPtr = getNativePointer(_ptr);
26387
- return new Common.Vector4(_nPtr);
26058
+ return new Common.Vector3(_nPtr);
26388
26059
  }
26389
26060
 
26390
- set rotation(value: Common.Vector4) {
26061
+ set authorCameraPosition(value: Common.Vector3) {
26391
26062
  Module.ccall(
26392
- "csp_multiplayer_SpaceTransform__Set_Rotation",
26063
+ "csp_multiplayer_AnnotationUpdateParams__Set_AuthorCameraPosition",
26393
26064
  "void",
26394
26065
  ["number", "number"],
26395
26066
  [this.pointer, value.pointer],
26396
26067
  );
26397
26068
  }
26398
26069
 
26399
- get scale(): Common.Vector3 {
26070
+ get authorCameraRotation(): Common.Vector4 {
26400
26071
  const _ptr = Module._malloc(8);
26401
26072
  Module.ccall(
26402
- "csp_multiplayer_SpaceTransform__Get_Scale",
26073
+ "csp_multiplayer_AnnotationUpdateParams__Get_AuthorCameraRotation",
26403
26074
  "void",
26404
26075
  ["number", "number"],
26405
26076
  [_ptr, this.pointer],
26406
26077
  );
26407
26078
 
26408
26079
  const _nPtr = getNativePointer(_ptr);
26409
- return new Common.Vector3(_nPtr);
26080
+ return new Common.Vector4(_nPtr);
26410
26081
  }
26411
26082
 
26412
- set scale(value: Common.Vector3) {
26083
+ set authorCameraRotation(value: Common.Vector4) {
26413
26084
  Module.ccall(
26414
- "csp_multiplayer_SpaceTransform__Set_Scale",
26415
- "void",
26416
- ["number", "number"],
26417
- [this.pointer, value.pointer],
26418
- );
26419
- }
26420
- }
26421
- }
26422
-
26423
- export namespace Multiplayer {
26424
- /**
26425
- @ingroup Conversation
26426
- * @description Contains information about a conversation message.
26427
- */
26428
- export class MessageInfo
26429
- extends NativeClassWrapper
26430
- implements INativeResource
26431
- {
26432
- /** @internal */
26433
- constructor(pointer: NativePointer) {
26434
- super(pointer);
26435
- }
26436
-
26437
- static create(): MessageInfo {
26438
- var _ptr = Module._malloc(8);
26439
- Module.ccall(
26440
- "csp_multiplayer_MessageInfo_Ctor",
26441
- "void",
26442
- ["number"],
26443
- [_ptr],
26444
- );
26445
- var _nPtr = getNativePointer(_ptr);
26446
-
26447
- return new MessageInfo(_nPtr);
26448
- }
26449
-
26450
- static create_conversationId_isConversation_message(
26451
- conversationId: string,
26452
- isConversation: boolean,
26453
- message: string,
26454
- ): MessageInfo {
26455
- var _ptr = Module._malloc(8);
26456
- Module.ccall(
26457
- "csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC",
26458
- "void",
26459
- ["number", "string", "boolean", "string"],
26460
- [_ptr, conversationId, isConversation, message],
26461
- );
26462
- var _nPtr = getNativePointer(_ptr);
26463
-
26464
- return new MessageInfo(_nPtr);
26465
- }
26466
-
26467
- static create_conversationId_isConversation_message_messageId(
26468
- conversationId: string,
26469
- isConversation: boolean,
26470
- message: string,
26471
- messageId: string,
26472
- ): MessageInfo {
26473
- var _ptr = Module._malloc(8);
26474
- Module.ccall(
26475
- "csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC",
26476
- "void",
26477
- ["number", "string", "boolean", "string", "string"],
26478
- [_ptr, conversationId, isConversation, message, messageId],
26479
- );
26480
- var _nPtr = getNativePointer(_ptr);
26481
-
26482
- return new MessageInfo(_nPtr);
26483
- }
26484
-
26485
- static create_messageData(
26486
- messageData: Multiplayer.MessageInfo,
26487
- ): MessageInfo {
26488
- var _ptr = Module._malloc(8);
26489
- Module.ccall(
26490
- "csp_multiplayer_MessageInfo_Ctor_MessageInfoRC",
26491
- "void",
26492
- ["number", "number"],
26493
- [_ptr, messageData.pointer],
26494
- );
26495
- var _nPtr = getNativePointer(_ptr);
26496
-
26497
- return new MessageInfo(_nPtr);
26498
- }
26499
-
26500
- delete(): void {
26501
- if (this.ownsPointer && !this.disposed) {
26502
- Module.ccall(
26503
- "csp_multiplayer_MessageInfo_Dtor",
26504
- "void",
26505
- ["number"],
26506
- [this.pointer],
26507
- );
26508
-
26509
- this.disposed = true;
26510
- }
26511
- }
26512
-
26513
- get conversationId(): string {
26514
- let _result = Module.ccall(
26515
- "csp_multiplayer_MessageInfo__Get_ConversationId",
26516
- "string",
26517
- ["number"],
26518
- [this.pointer],
26519
- );
26520
-
26521
- return _result;
26522
- }
26523
-
26524
- set conversationId(value: string) {
26525
- Module.ccall(
26526
- "csp_multiplayer_MessageInfo__Set_ConversationId",
26527
- "void",
26528
- ["number", "string"],
26529
- [this.pointer, value],
26530
- );
26531
- }
26532
-
26533
- get createdTimestamp(): string {
26534
- let _result = Module.ccall(
26535
- "csp_multiplayer_MessageInfo__Get_CreatedTimestamp",
26536
- "string",
26537
- ["number"],
26538
- [this.pointer],
26539
- );
26540
-
26541
- return _result;
26542
- }
26543
-
26544
- set createdTimestamp(value: string) {
26545
- Module.ccall(
26546
- "csp_multiplayer_MessageInfo__Set_CreatedTimestamp",
26547
- "void",
26548
- ["number", "string"],
26549
- [this.pointer, value],
26550
- );
26551
- }
26552
-
26553
- get editedTimestamp(): string {
26554
- let _result = Module.ccall(
26555
- "csp_multiplayer_MessageInfo__Get_EditedTimestamp",
26556
- "string",
26557
- ["number"],
26558
- [this.pointer],
26559
- );
26560
-
26561
- return _result;
26562
- }
26563
-
26564
- set editedTimestamp(value: string) {
26565
- Module.ccall(
26566
- "csp_multiplayer_MessageInfo__Set_EditedTimestamp",
26567
- "void",
26568
- ["number", "string"],
26569
- [this.pointer, value],
26570
- );
26571
- }
26572
-
26573
- get userId(): string {
26574
- let _result = Module.ccall(
26575
- "csp_multiplayer_MessageInfo__Get_UserId",
26576
- "string",
26577
- ["number"],
26578
- [this.pointer],
26579
- );
26580
-
26581
- return _result;
26582
- }
26583
-
26584
- set userId(value: string) {
26585
- Module.ccall(
26586
- "csp_multiplayer_MessageInfo__Set_UserId",
26587
- "void",
26588
- ["number", "string"],
26589
- [this.pointer, value],
26590
- );
26591
- }
26592
-
26593
- get message(): string {
26594
- let _result = Module.ccall(
26595
- "csp_multiplayer_MessageInfo__Get_Message",
26596
- "string",
26597
- ["number"],
26598
- [this.pointer],
26599
- );
26600
-
26601
- return _result;
26602
- }
26603
-
26604
- set message(value: string) {
26605
- Module.ccall(
26606
- "csp_multiplayer_MessageInfo__Set_Message",
26607
- "void",
26608
- ["number", "string"],
26609
- [this.pointer, value],
26610
- );
26611
- }
26612
-
26613
- get messageId(): string {
26614
- let _result = Module.ccall(
26615
- "csp_multiplayer_MessageInfo__Get_MessageId",
26616
- "string",
26617
- ["number"],
26618
- [this.pointer],
26619
- );
26620
-
26621
- return _result;
26622
- }
26623
-
26624
- set messageId(value: string) {
26625
- Module.ccall(
26626
- "csp_multiplayer_MessageInfo__Set_MessageId",
26627
- "void",
26628
- ["number", "string"],
26629
- [this.pointer, value],
26630
- );
26631
- }
26632
- }
26633
- }
26634
-
26635
- export namespace Multiplayer {
26636
- /**
26637
- @ingroup Conversation
26638
- * @description Information used to update a message
26639
- */
26640
- export class MessageUpdateParams
26641
- extends NativeClassWrapper
26642
- implements INativeResource
26643
- {
26644
- /** @internal */
26645
- constructor(pointer: NativePointer) {
26646
- super(pointer);
26647
- }
26648
-
26649
- static create(): MessageUpdateParams {
26650
- var _ptr = Module._malloc(8);
26651
- Module.ccall(
26652
- "csp_multiplayer_MessageUpdateParams_Ctor",
26653
- "void",
26654
- ["number"],
26655
- [_ptr],
26656
- );
26657
- var _nPtr = getNativePointer(_ptr);
26658
-
26659
- return new MessageUpdateParams(_nPtr);
26660
- }
26661
-
26662
- delete(): void {
26663
- if (this.ownsPointer && !this.disposed) {
26664
- Module.ccall(
26665
- "csp_multiplayer_MessageUpdateParams_Dtor",
26666
- "void",
26667
- ["number"],
26668
- [this.pointer],
26669
- );
26670
-
26671
- this.disposed = true;
26672
- }
26673
- }
26674
-
26675
- get newMessage(): string {
26676
- let _result = Module.ccall(
26677
- "csp_multiplayer_MessageUpdateParams__Get_NewMessage",
26678
- "string",
26679
- ["number"],
26680
- [this.pointer],
26681
- );
26682
-
26683
- return _result;
26684
- }
26685
-
26686
- set newMessage(value: string) {
26687
- Module.ccall(
26688
- "csp_multiplayer_MessageUpdateParams__Set_NewMessage",
26689
- "void",
26690
- ["number", "string"],
26691
- [this.pointer, value],
26692
- );
26693
- }
26694
- }
26695
- }
26696
-
26697
- export namespace Multiplayer {
26698
- /**
26699
- @ingroup Conversation
26700
- * @description Information used to update an annotation
26701
- */
26702
- export class AnnotationUpdateParams
26703
- extends NativeClassWrapper
26704
- implements INativeResource
26705
- {
26706
- /** @internal */
26707
- constructor(pointer: NativePointer) {
26708
- super(pointer);
26709
- }
26710
-
26711
- static create(): AnnotationUpdateParams {
26712
- var _ptr = Module._malloc(8);
26713
- Module.ccall(
26714
- "csp_multiplayer_AnnotationUpdateParams_Ctor",
26715
- "void",
26716
- ["number"],
26717
- [_ptr],
26718
- );
26719
- var _nPtr = getNativePointer(_ptr);
26720
-
26721
- return new AnnotationUpdateParams(_nPtr);
26722
- }
26723
-
26724
- delete(): void {
26725
- if (this.ownsPointer && !this.disposed) {
26726
- Module.ccall(
26727
- "csp_multiplayer_AnnotationUpdateParams_Dtor",
26728
- "void",
26729
- ["number"],
26730
- [this.pointer],
26731
- );
26732
-
26733
- this.disposed = true;
26734
- }
26735
- }
26736
-
26737
- get verticalFov(): number {
26738
- let _result = Module.ccall(
26739
- "csp_multiplayer_AnnotationUpdateParams__Get_VerticalFov",
26740
- "number",
26741
- ["number"],
26742
- [this.pointer],
26743
- );
26744
-
26745
- return _result;
26746
- }
26747
-
26748
- set verticalFov(value: number) {
26749
- Module.ccall(
26750
- "csp_multiplayer_AnnotationUpdateParams__Set_VerticalFov",
26751
- "void",
26752
- ["number", "number"],
26753
- [this.pointer, value],
26754
- );
26755
- }
26756
-
26757
- get authorCameraPosition(): Common.Vector3 {
26758
- const _ptr = Module._malloc(8);
26759
- Module.ccall(
26760
- "csp_multiplayer_AnnotationUpdateParams__Get_AuthorCameraPosition",
26761
- "void",
26762
- ["number", "number"],
26763
- [_ptr, this.pointer],
26764
- );
26765
-
26766
- const _nPtr = getNativePointer(_ptr);
26767
- return new Common.Vector3(_nPtr);
26768
- }
26769
-
26770
- set authorCameraPosition(value: Common.Vector3) {
26771
- Module.ccall(
26772
- "csp_multiplayer_AnnotationUpdateParams__Set_AuthorCameraPosition",
26773
- "void",
26774
- ["number", "number"],
26775
- [this.pointer, value.pointer],
26776
- );
26777
- }
26778
-
26779
- get authorCameraRotation(): Common.Vector4 {
26780
- const _ptr = Module._malloc(8);
26781
- Module.ccall(
26782
- "csp_multiplayer_AnnotationUpdateParams__Get_AuthorCameraRotation",
26783
- "void",
26784
- ["number", "number"],
26785
- [_ptr, this.pointer],
26786
- );
26787
-
26788
- const _nPtr = getNativePointer(_ptr);
26789
- return new Common.Vector4(_nPtr);
26790
- }
26791
-
26792
- set authorCameraRotation(value: Common.Vector4) {
26793
- Module.ccall(
26794
- "csp_multiplayer_AnnotationUpdateParams__Set_AuthorCameraRotation",
26085
+ "csp_multiplayer_AnnotationUpdateParams__Set_AuthorCameraRotation",
26795
26086
  "void",
26796
26087
  ["number", "number"],
26797
26088
  [this.pointer, value.pointer],
@@ -26868,6 +26159,8 @@ export namespace Multiplayer {
26868
26159
  return new AnnotationData(_nPtr);
26869
26160
  }
26870
26161
 
26162
+ // operator=
26163
+
26871
26164
  delete(): void {
26872
26165
  if (this.ownsPointer && !this.disposed) {
26873
26166
  Module.ccall(
@@ -27959,6 +27252,26 @@ export namespace Systems {
27959
27252
  return _nPtr;
27960
27253
  }
27961
27254
 
27255
+ /**
27256
+ * @description Retrieves the Application Settings system.
27257
+ * @return Pointer to the application settings system class
27258
+ */
27259
+
27260
+ getApplicationSettingsSystem(): Systems.ApplicationSettingsSystem {
27261
+ var _ret = Module._malloc(8);
27262
+
27263
+ Module.ccall(
27264
+ "csp_systems_SystemsManager_GetApplicationSettingsSystem_ApplicationSettingsSystemP",
27265
+ "void",
27266
+ ["number", "number"],
27267
+ [_ret, this.pointer],
27268
+ );
27269
+ var _nPtr = new Systems.ApplicationSettingsSystem(getNativePointer(_ret));
27270
+ Module._free(_ret);
27271
+
27272
+ return _nPtr;
27273
+ }
27274
+
27962
27275
  /**
27963
27276
  * @description Retrieves the Settings system.
27964
27277
  * @return Pointer to the settings system class
@@ -28139,46 +27452,46 @@ export namespace Systems {
28139
27452
  return _nPtr;
28140
27453
  }
28141
27454
 
28142
- getSpaceEntitySystem(): Multiplayer.SpaceEntitySystem {
27455
+ getMultiplayerConnection(): Multiplayer.MultiplayerConnection {
28143
27456
  var _ret = Module._malloc(8);
28144
27457
 
28145
27458
  Module.ccall(
28146
- "csp_systems_SystemsManager_GetSpaceEntitySystem_SpaceEntitySystemP",
27459
+ "csp_systems_SystemsManager_GetMultiplayerConnection_MultiplayerConnectionP",
28147
27460
  "void",
28148
27461
  ["number", "number"],
28149
27462
  [_ret, this.pointer],
28150
27463
  );
28151
- var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
27464
+ var _nPtr = new Multiplayer.MultiplayerConnection(getNativePointer(_ret));
28152
27465
  Module._free(_ret);
28153
27466
 
28154
27467
  return _nPtr;
28155
27468
  }
28156
27469
 
28157
- getMultiplayerConnection(): Multiplayer.MultiplayerConnection {
27470
+ getEventBus(): Multiplayer.NetworkEventBus {
28158
27471
  var _ret = Module._malloc(8);
28159
27472
 
28160
27473
  Module.ccall(
28161
- "csp_systems_SystemsManager_GetMultiplayerConnection_MultiplayerConnectionP",
27474
+ "csp_systems_SystemsManager_GetEventBus_NetworkEventBusP",
28162
27475
  "void",
28163
27476
  ["number", "number"],
28164
27477
  [_ret, this.pointer],
28165
27478
  );
28166
- var _nPtr = new Multiplayer.MultiplayerConnection(getNativePointer(_ret));
27479
+ var _nPtr = new Multiplayer.NetworkEventBus(getNativePointer(_ret));
28167
27480
  Module._free(_ret);
28168
27481
 
28169
27482
  return _nPtr;
28170
27483
  }
28171
27484
 
28172
- getEventBus(): Multiplayer.NetworkEventBus {
27485
+ makeOnlineRealtimeEngine(): Multiplayer.OnlineRealtimeEngine {
28173
27486
  var _ret = Module._malloc(8);
28174
27487
 
28175
27488
  Module.ccall(
28176
- "csp_systems_SystemsManager_GetEventBus_NetworkEventBusP",
27489
+ "csp_systems_SystemsManager_MakeOnlineRealtimeEngine_OnlineRealtimeEngineP",
28177
27490
  "void",
28178
27491
  ["number", "number"],
28179
27492
  [_ret, this.pointer],
28180
27493
  );
28181
- var _nPtr = new Multiplayer.NetworkEventBus(getNativePointer(_ret));
27494
+ var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
28182
27495
  Module._free(_ret);
28183
27496
 
28184
27497
  return _nPtr;
@@ -28588,6 +27901,8 @@ export namespace Systems {
28588
27901
  return new Asset(_nPtr);
28589
27902
  }
28590
27903
 
27904
+ // operator=
27905
+
28591
27906
  delete(): void {
28592
27907
  if (this.ownsPointer && !this.disposed) {
28593
27908
  Module.ccall(
@@ -32490,6 +31805,136 @@ export namespace Systems {
32490
31805
  }
32491
31806
  }
32492
31807
 
31808
+ export namespace Systems {
31809
+ /**
31810
+ @ingroup Application Settings System
31811
+ * @description Represents configuration settings for an application context.
31812
+ */
31813
+ export class ApplicationSettings
31814
+ extends NativeClassWrapper
31815
+ implements INativeResource
31816
+ {
31817
+ /** @internal */
31818
+ constructor(pointer: NativePointer) {
31819
+ super(pointer);
31820
+ }
31821
+
31822
+ static create(): ApplicationSettings {
31823
+ var _ptr = Module._malloc(8);
31824
+ Module.ccall(
31825
+ "csp_systems_ApplicationSettings_Ctor",
31826
+ "void",
31827
+ ["number"],
31828
+ [_ptr],
31829
+ );
31830
+ var _nPtr = getNativePointer(_ptr);
31831
+
31832
+ return new ApplicationSettings(_nPtr);
31833
+ }
31834
+
31835
+ delete(): void {
31836
+ if (this.ownsPointer && !this.disposed) {
31837
+ Module.ccall(
31838
+ "csp_systems_ApplicationSettings_Dtor",
31839
+ "void",
31840
+ ["number"],
31841
+ [this.pointer],
31842
+ );
31843
+
31844
+ this.disposed = true;
31845
+ }
31846
+ }
31847
+
31848
+ get applicationName(): string {
31849
+ let _result = Module.ccall(
31850
+ "csp_systems_ApplicationSettings__Get_ApplicationName",
31851
+ "string",
31852
+ ["number"],
31853
+ [this.pointer],
31854
+ );
31855
+
31856
+ return _result;
31857
+ }
31858
+
31859
+ set applicationName(value: string) {
31860
+ Module.ccall(
31861
+ "csp_systems_ApplicationSettings__Set_ApplicationName",
31862
+ "void",
31863
+ ["number", "string"],
31864
+ [this.pointer, value],
31865
+ );
31866
+ }
31867
+
31868
+ get context(): string {
31869
+ let _result = Module.ccall(
31870
+ "csp_systems_ApplicationSettings__Get_Context",
31871
+ "string",
31872
+ ["number"],
31873
+ [this.pointer],
31874
+ );
31875
+
31876
+ return _result;
31877
+ }
31878
+
31879
+ set context(value: string) {
31880
+ Module.ccall(
31881
+ "csp_systems_ApplicationSettings__Set_Context",
31882
+ "void",
31883
+ ["number", "string"],
31884
+ [this.pointer, value],
31885
+ );
31886
+ }
31887
+
31888
+ get allowAnonymous(): boolean {
31889
+ let _result = Module.ccall(
31890
+ "csp_systems_ApplicationSettings__Get_AllowAnonymous",
31891
+ "boolean",
31892
+ ["number"],
31893
+ [this.pointer],
31894
+ );
31895
+
31896
+ return _result;
31897
+ }
31898
+
31899
+ set allowAnonymous(value: boolean) {
31900
+ Module.ccall(
31901
+ "csp_systems_ApplicationSettings__Set_AllowAnonymous",
31902
+ "void",
31903
+ ["number", "boolean"],
31904
+ [this.pointer, value],
31905
+ );
31906
+ }
31907
+
31908
+ get settings(): Common.Map<string, string> {
31909
+ const _ptr = Module._malloc(8);
31910
+ Module.ccall(
31911
+ "csp_systems_ApplicationSettings__Get_Settings",
31912
+ "void",
31913
+ ["number", "number"],
31914
+ [_ptr, this.pointer],
31915
+ );
31916
+
31917
+ const _nPtr = getNativePointer(_ptr);
31918
+ return new Common.Map<string, string>(
31919
+ _nPtr,
31920
+ StringFactory,
31921
+ "String",
31922
+ StringFactory,
31923
+ "String",
31924
+ );
31925
+ }
31926
+
31927
+ set settings(value: Common.Map<string, string>) {
31928
+ Module.ccall(
31929
+ "csp_systems_ApplicationSettings__Set_Settings",
31930
+ "void",
31931
+ ["number", "number"],
31932
+ [this.pointer, value.pointer],
31933
+ );
31934
+ }
31935
+ }
31936
+ }
31937
+
32493
31938
  export namespace Systems {
32494
31939
  /**
32495
31940
  @ingroup Settings System
@@ -33042,6 +32487,8 @@ export namespace Systems {
33042
32487
  return new UserRoleInfo(_nPtr);
33043
32488
  }
33044
32489
 
32490
+ // operator=
32491
+
33045
32492
  delete(): void {
33046
32493
  if (this.ownsPointer && !this.disposed) {
33047
32494
  Module.ccall(
@@ -33137,6 +32584,8 @@ export namespace Systems {
33137
32584
  return new InviteUserRoleInfo(_nPtr);
33138
32585
  }
33139
32586
 
32587
+ // operator=
32588
+
33140
32589
  delete(): void {
33141
32590
  if (this.ownsPointer && !this.disposed) {
33142
32591
  Module.ccall(
@@ -33234,6 +32683,8 @@ export namespace Systems {
33234
32683
  return new InviteUserRoleInfoCollection(_nPtr);
33235
32684
  }
33236
32685
 
32686
+ // operator=
32687
+
33237
32688
  delete(): void {
33238
32689
  if (this.ownsPointer && !this.disposed) {
33239
32690
  Module.ccall(
@@ -35392,265 +34843,987 @@ export namespace Common {
35392
34843
  [this.pointer],
35393
34844
  );
35394
34845
 
35395
- this.disposed = true;
35396
- }
34846
+ this.disposed = true;
34847
+ }
34848
+ }
34849
+
34850
+ get messageType(): Multiplayer.ConversationEventType {
34851
+ let _result = Module.ccall(
34852
+ "csp_common_ConversationNetworkEventData__Get_MessageType",
34853
+ "number",
34854
+ ["number"],
34855
+ [this.pointer],
34856
+ );
34857
+
34858
+ return _result;
34859
+ }
34860
+
34861
+ set messageType(value: Multiplayer.ConversationEventType) {
34862
+ Module.ccall(
34863
+ "csp_common_ConversationNetworkEventData__Set_MessageType",
34864
+ "void",
34865
+ ["number", "number"],
34866
+ [this.pointer, value],
34867
+ );
34868
+ }
34869
+
34870
+ get messageInfo(): Multiplayer.MessageInfo {
34871
+ const _ptr = Module._malloc(8);
34872
+ Module.ccall(
34873
+ "csp_common_ConversationNetworkEventData__Get_MessageInfo",
34874
+ "void",
34875
+ ["number", "number"],
34876
+ [_ptr, this.pointer],
34877
+ );
34878
+
34879
+ const _nPtr = getNativePointer(_ptr);
34880
+ return new Multiplayer.MessageInfo(_nPtr);
34881
+ }
34882
+
34883
+ set messageInfo(value: Multiplayer.MessageInfo) {
34884
+ Module.ccall(
34885
+ "csp_common_ConversationNetworkEventData__Set_MessageInfo",
34886
+ "void",
34887
+ ["number", "number"],
34888
+ [this.pointer, value.pointer],
34889
+ );
34890
+ }
34891
+ }
34892
+ }
34893
+
34894
+ export namespace Common {
34895
+ /**
34896
+ * @description Class used to provide details of a permission change that has happened to a user whilst the client application is connected to a space.
34897
+ */
34898
+ export class AccessControlChangedNetworkEventData
34899
+ extends Common.NetworkEventData
34900
+ implements INativeResource
34901
+ {
34902
+ /** @internal */
34903
+ constructor(pointer: NativePointer) {
34904
+ super(pointer);
34905
+ }
34906
+
34907
+ static fromNetworkEventData(
34908
+ baseInstance: Common.NetworkEventData,
34909
+ ): Common.AccessControlChangedNetworkEventData {
34910
+ const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
34911
+ return new Common.AccessControlChangedNetworkEventData(
34912
+ new NativePointer(
34913
+ nativeClassWrapper.pointer,
34914
+ nativeClassWrapper.ownsPointer,
34915
+ ),
34916
+ );
34917
+ }
34918
+
34919
+ static create(): AccessControlChangedNetworkEventData {
34920
+ var _ptr = Module._malloc(8);
34921
+ Module.ccall(
34922
+ "csp_common_AccessControlChangedNetworkEventData_Ctor",
34923
+ "void",
34924
+ ["number"],
34925
+ [_ptr],
34926
+ );
34927
+ var _nPtr = getNativePointer(_ptr);
34928
+
34929
+ return new AccessControlChangedNetworkEventData(_nPtr);
34930
+ }
34931
+
34932
+ delete(): void {
34933
+ if (this.ownsPointer && !this.disposed) {
34934
+ Module.ccall(
34935
+ "csp_common_AccessControlChangedNetworkEventData_Dtor",
34936
+ "void",
34937
+ ["number"],
34938
+ [this.pointer],
34939
+ );
34940
+
34941
+ this.disposed = true;
34942
+ }
34943
+ }
34944
+
34945
+ get spaceId(): string {
34946
+ let _result = Module.ccall(
34947
+ "csp_common_AccessControlChangedNetworkEventData__Get_SpaceId",
34948
+ "string",
34949
+ ["number"],
34950
+ [this.pointer],
34951
+ );
34952
+
34953
+ return _result;
34954
+ }
34955
+
34956
+ set spaceId(value: string) {
34957
+ Module.ccall(
34958
+ "csp_common_AccessControlChangedNetworkEventData__Set_SpaceId",
34959
+ "void",
34960
+ ["number", "string"],
34961
+ [this.pointer, value],
34962
+ );
34963
+ }
34964
+
34965
+ get userRoles(): Common.Array<Systems.SpaceUserRole> {
34966
+ const _ptr = Module._malloc(8);
34967
+ Module.ccall(
34968
+ "csp_common_AccessControlChangedNetworkEventData__Get_UserRoles",
34969
+ "void",
34970
+ ["number", "number"],
34971
+ [_ptr, this.pointer],
34972
+ );
34973
+
34974
+ const _nPtr = getNativePointer(_ptr);
34975
+ return new Common.Array<Systems.SpaceUserRole>(
34976
+ _nPtr,
34977
+ csp_systems_SpaceUserRoleFactory,
34978
+ "csp_systems_SpaceUserRole",
34979
+ );
34980
+ }
34981
+
34982
+ set userRoles(value: Common.Array<Systems.SpaceUserRole>) {
34983
+ Module.ccall(
34984
+ "csp_common_AccessControlChangedNetworkEventData__Set_UserRoles",
34985
+ "void",
34986
+ ["number", "number"],
34987
+ [this.pointer, value.pointer],
34988
+ );
34989
+ }
34990
+
34991
+ get changeType(): Common.EPermissionChangeType {
34992
+ let _result = Module.ccall(
34993
+ "csp_common_AccessControlChangedNetworkEventData__Get_ChangeType",
34994
+ "number",
34995
+ ["number"],
34996
+ [this.pointer],
34997
+ );
34998
+
34999
+ return _result;
35000
+ }
35001
+
35002
+ set changeType(value: Common.EPermissionChangeType) {
35003
+ Module.ccall(
35004
+ "csp_common_AccessControlChangedNetworkEventData__Set_ChangeType",
35005
+ "void",
35006
+ ["number", "number"],
35007
+ [this.pointer, value],
35008
+ );
35009
+ }
35010
+
35011
+ get userId(): string {
35012
+ let _result = Module.ccall(
35013
+ "csp_common_AccessControlChangedNetworkEventData__Get_UserId",
35014
+ "string",
35015
+ ["number"],
35016
+ [this.pointer],
35017
+ );
35018
+
35019
+ return _result;
35020
+ }
35021
+
35022
+ set userId(value: string) {
35023
+ Module.ccall(
35024
+ "csp_common_AccessControlChangedNetworkEventData__Set_UserId",
35025
+ "void",
35026
+ ["number", "string"],
35027
+ [this.pointer, value],
35028
+ );
35029
+ }
35030
+ }
35031
+ }
35032
+
35033
+ export namespace Common {
35034
+ export class SequenceChangedNetworkEventData
35035
+ extends Common.NetworkEventData
35036
+ implements INativeResource
35037
+ {
35038
+ /** @internal */
35039
+ constructor(pointer: NativePointer) {
35040
+ super(pointer);
35041
+ }
35042
+
35043
+ static fromNetworkEventData(
35044
+ baseInstance: Common.NetworkEventData,
35045
+ ): Common.SequenceChangedNetworkEventData {
35046
+ const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
35047
+ return new Common.SequenceChangedNetworkEventData(
35048
+ new NativePointer(
35049
+ nativeClassWrapper.pointer,
35050
+ nativeClassWrapper.ownsPointer,
35051
+ ),
35052
+ );
35053
+ }
35054
+
35055
+ static create(): SequenceChangedNetworkEventData {
35056
+ var _ptr = Module._malloc(8);
35057
+ Module.ccall(
35058
+ "csp_common_SequenceChangedNetworkEventData_Ctor",
35059
+ "void",
35060
+ ["number"],
35061
+ [_ptr],
35062
+ );
35063
+ var _nPtr = getNativePointer(_ptr);
35064
+
35065
+ return new SequenceChangedNetworkEventData(_nPtr);
35066
+ }
35067
+
35068
+ delete(): void {
35069
+ if (this.ownsPointer && !this.disposed) {
35070
+ Module.ccall(
35071
+ "csp_common_SequenceChangedNetworkEventData_Dtor",
35072
+ "void",
35073
+ ["number"],
35074
+ [this.pointer],
35075
+ );
35076
+
35077
+ this.disposed = true;
35078
+ }
35079
+ }
35080
+
35081
+ get updateType(): Common.ESequenceUpdateType {
35082
+ let _result = Module.ccall(
35083
+ "csp_common_SequenceChangedNetworkEventData__Get_UpdateType",
35084
+ "number",
35085
+ ["number"],
35086
+ [this.pointer],
35087
+ );
35088
+
35089
+ return _result;
35090
+ }
35091
+
35092
+ set updateType(value: Common.ESequenceUpdateType) {
35093
+ Module.ccall(
35094
+ "csp_common_SequenceChangedNetworkEventData__Set_UpdateType",
35095
+ "void",
35096
+ ["number", "number"],
35097
+ [this.pointer, value],
35098
+ );
35099
+ }
35100
+
35101
+ get key(): string {
35102
+ let _result = Module.ccall(
35103
+ "csp_common_SequenceChangedNetworkEventData__Get_Key",
35104
+ "string",
35105
+ ["number"],
35106
+ [this.pointer],
35107
+ );
35108
+
35109
+ return _result;
35110
+ }
35111
+
35112
+ set key(value: string) {
35113
+ Module.ccall(
35114
+ "csp_common_SequenceChangedNetworkEventData__Set_Key",
35115
+ "void",
35116
+ ["number", "string"],
35117
+ [this.pointer, value],
35118
+ );
35119
+ }
35120
+
35121
+ get newKey(): string {
35122
+ let _result = Module.ccall(
35123
+ "csp_common_SequenceChangedNetworkEventData__Get_NewKey",
35124
+ "string",
35125
+ ["number"],
35126
+ [this.pointer],
35127
+ );
35128
+
35129
+ return _result;
35130
+ }
35131
+
35132
+ set newKey(value: string) {
35133
+ Module.ccall(
35134
+ "csp_common_SequenceChangedNetworkEventData__Set_NewKey",
35135
+ "void",
35136
+ ["number", "string"],
35137
+ [this.pointer, value],
35138
+ );
35139
+ }
35140
+
35141
+ get hotspotData(): Common.HotspotSequenceChangedNetworkEventData {
35142
+ const _ptr = Module._malloc(8);
35143
+ Module.ccall(
35144
+ "csp_common_SequenceChangedNetworkEventData__Get_HotspotData",
35145
+ "void",
35146
+ ["number", "number"],
35147
+ [_ptr, this.pointer],
35148
+ );
35149
+
35150
+ const _nPtr = getNativePointer(_ptr);
35151
+ return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
35152
+ }
35153
+
35154
+ set hotspotData(value: Common.HotspotSequenceChangedNetworkEventData) {
35155
+ Module.ccall(
35156
+ "csp_common_SequenceChangedNetworkEventData__Set_HotspotData",
35157
+ "void",
35158
+ ["number", "number"],
35159
+ [this.pointer, value.pointer],
35160
+ );
35161
+ }
35162
+ }
35163
+ }
35164
+
35165
+ export namespace Multiplayer {
35166
+ /**
35167
+ * @description Class for creating and managing multiplayer objects known as space entities.
35168
+ * /// This provides functions to create and manage multiple player avatars and other objects.
35169
+ * It manages things like queueing updated entities and triggering tick events. Callbacks
35170
+ * can be registered for certain events that occur within the entity system so clients can
35171
+ * react appropriately.
35172
+ */
35173
+ export class OnlineRealtimeEngine
35174
+ extends Common.IRealtimeEngine
35175
+ implements INativeResource
35176
+ {
35177
+ /** @internal */
35178
+ constructor(pointer: NativePointer) {
35179
+ super(pointer);
35180
+ }
35181
+
35182
+ static fromIRealtimeEngine(
35183
+ baseInstance: Common.IRealtimeEngine,
35184
+ ): Multiplayer.OnlineRealtimeEngine {
35185
+ const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
35186
+ return new Multiplayer.OnlineRealtimeEngine(
35187
+ new NativePointer(
35188
+ nativeClassWrapper.pointer,
35189
+ nativeClassWrapper.ownsPointer,
35190
+ ),
35191
+ );
35192
+ }
35193
+
35194
+ /**
35195
+ * @description OnlineRealtimeEngine constructor
35196
+ * @param inMultiplayerConnection - The multiplayer connection to construct the onlinerealtimeengine with
35197
+ * @param logSystem - Logger such that this system can print status and debug output
35198
+ * @param networkEventBus - Reference the the network event bus, used for leadership election messaging.
35199
+ * @param remoteScriptRunner - Object capable of running a script. Called to execute scripts when the leader
35200
+ * election system
35201
+ */
35202
+ static create_multiplayerConnection_logSystem_networkEventBus_remoteScriptRunner(
35203
+ multiplayerConnection: Multiplayer.MultiplayerConnection,
35204
+ logSystem: Common.LogSystem,
35205
+ networkEventBus: Multiplayer.NetworkEventBus,
35206
+ remoteScriptRunner: Common.IJSScriptRunner,
35207
+ ): OnlineRealtimeEngine {
35208
+ var _ptr = Module._malloc(8);
35209
+ Module.ccall(
35210
+ "csp_multiplayer_OnlineRealtimeEngine_Ctor_MultiplayerConnectionR_LogSystemR_NetworkEventBusR_IJSScriptRunnerR",
35211
+ "void",
35212
+ ["number", "number", "number", "number", "number"],
35213
+ [
35214
+ _ptr,
35215
+ multiplayerConnection.pointer,
35216
+ logSystem.pointer,
35217
+ networkEventBus.pointer,
35218
+ remoteScriptRunner.pointer,
35219
+ ],
35220
+ );
35221
+ var _nPtr = getNativePointer(_ptr);
35222
+
35223
+ return new OnlineRealtimeEngine(_nPtr);
35224
+ }
35225
+
35226
+ /**
35227
+ * @description Returns the concrete type of the instantiation of the abstract IRealtimeEngine.
35228
+ */
35229
+
35230
+ getRealtimeEngineType(): Common.RealtimeEngineType {
35231
+ let _result = Module.ccall(
35232
+ "csp_multiplayer_OnlineRealtimeEngine_GetRealtimeEngineTypeC_RealtimeEngineType",
35233
+ "number",
35234
+ ["number"],
35235
+ [this.pointer],
35236
+ );
35237
+
35238
+ return _result;
35239
+ }
35240
+
35241
+ /**
35242
+ * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
35243
+ * @param name - The entity name of the newly created avatar entity.
35244
+ * @param userId - The Id of the user creating the avatar. This can be fetched from csp::systems::UserSystem::GetLoginState
35245
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
35246
+ * @param state - The initial Avatar State to set.
35247
+ * @param avatarId - The ID to be set on the AvatarSpaceComponent
35248
+ * @param avatarPlayMode - The Initial AvatarPlayMode to set.
35249
+ * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
35250
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
35251
+ */
35252
+
35253
+ async createAvatar(
35254
+ name: string,
35255
+ userId: string,
35256
+ spaceTransform: Multiplayer.SpaceTransform,
35257
+ isVisible: boolean,
35258
+ state: Multiplayer.AvatarState,
35259
+ avatarId: string,
35260
+ avatarPlayMode: Multiplayer.AvatarPlayMode,
35261
+ ): Promise<Multiplayer.SpaceEntity> {
35262
+ var _resolve;
35263
+
35264
+ var _promise = new Promise<Multiplayer.SpaceEntity>((_r) => {
35265
+ _resolve = _r;
35266
+ });
35267
+
35268
+ var _callbackPtr: number;
35269
+ var _callback = (_stateObject__: number, arg1) => {
35270
+ var _arg1Ptr = getNativePointer(arg1);
35271
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
35272
+
35273
+ _resolve(_arg1Instance);
35274
+
35275
+ Module.removeFunction(_callbackPtr);
35276
+ };
35277
+
35278
+ _callbackPtr = Module.addFunction(_callback, "vii");
35279
+
35280
+ Module.ccall(
35281
+ "csp_multiplayer_OnlineRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback",
35282
+ "void",
35283
+ [
35284
+ "number",
35285
+ "string",
35286
+ "string",
35287
+ "number",
35288
+ "boolean",
35289
+ "number",
35290
+ "string",
35291
+ "number",
35292
+ "number",
35293
+ "number",
35294
+ ],
35295
+ [
35296
+ this.pointer,
35297
+ name,
35298
+ userId,
35299
+ spaceTransform.pointer,
35300
+ isVisible,
35301
+ state,
35302
+ avatarId,
35303
+ avatarPlayMode,
35304
+ _callbackPtr,
35305
+ 0,
35306
+ ],
35307
+ );
35308
+
35309
+ return _promise;
35310
+ }
35311
+
35312
+ /**
35313
+ * @description Create and add a SpaceEntity, with relevant default values.
35314
+ * @param name - The name of the newly created SpaceEntity.
35315
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
35316
+ * @param parentID - ID of another entity in the space that this entity should be created as a child to. If empty,
35317
+ * entity is created as a root entity.
35318
+ * @param callback - A callback that executes when the creation is complete,
35319
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
35320
+ */
35321
+
35322
+ async createEntity(
35323
+ name: string,
35324
+ spaceTransform: Multiplayer.SpaceTransform,
35325
+ parentID: bigint | null,
35326
+ ): Promise<Multiplayer.SpaceEntity> {
35327
+ var _resolve;
35328
+
35329
+ var _promise = new Promise<Multiplayer.SpaceEntity>((_r) => {
35330
+ _resolve = _r;
35331
+ });
35332
+
35333
+ var _callbackPtr: number;
35334
+ var _callback = (_stateObject__: number, arg1) => {
35335
+ var _arg1Ptr = getNativePointer(arg1);
35336
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
35337
+
35338
+ _resolve(_arg1Instance);
35339
+
35340
+ Module.removeFunction(_callbackPtr);
35341
+ };
35342
+
35343
+ _callbackPtr = Module.addFunction(_callback, "vii");
35344
+
35345
+ var parentIDPointer = 0;
35346
+ if (parentID != null) {
35347
+ parentIDPointer = Module._malloc(4);
35348
+ Module.setValue(parentIDPointer, parentID, "i32");
35349
+ }
35350
+
35351
+ Module.ccall(
35352
+ "csp_multiplayer_OnlineRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback",
35353
+ "void",
35354
+ ["number", "string", "number", "bigint", "number", "number"],
35355
+ [
35356
+ this.pointer,
35357
+ name,
35358
+ spaceTransform.pointer,
35359
+ parentIDPointer,
35360
+ _callbackPtr,
35361
+ 0,
35362
+ ],
35363
+ );
35364
+
35365
+ if (parentIDPointer) {
35366
+ Module._free(parentIDPointer);
35367
+ }
35368
+
35369
+ return _promise;
35370
+ }
35371
+
35372
+ /**
35373
+ * @description Add a new entity to the system.
35374
+ * /// This can be called at any time from any thread and internally add the entity to a pending
35375
+ * list which is then updated in a thread safe manner when ProcessPendingEntityOperations
35376
+ * is called from the main thread.
35377
+ * /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
35378
+ */
35379
+
35380
+ addEntity(entityToAdd: Multiplayer.SpaceEntity): void {
35381
+ Module.ccall(
35382
+ "csp_multiplayer_OnlineRealtimeEngine_AddEntity_void_SpaceEntityP",
35383
+ "void",
35384
+ ["number", "number"],
35385
+ [this.pointer, entityToAdd.pointer],
35386
+ );
35387
+ }
35388
+
35389
+ /**
35390
+ * @description Destroy the specified entity.
35391
+ * @param entity - A non-owning pointer to the entity to be destroyed.
35392
+ * @param callback - A callback that executes when the entity destruction is complete.
35393
+ */
35394
+
35395
+ async destroyEntity(entity: Multiplayer.SpaceEntity): Promise<boolean> {
35396
+ var _resolve;
35397
+
35398
+ var _promise = new Promise<boolean>((_r) => {
35399
+ _resolve = _r;
35400
+ });
35401
+
35402
+ var _callbackPtr: number;
35403
+ var _callback = (_stateObject__: number, arg1) => {
35404
+ _resolve(!!arg1);
35405
+
35406
+ Module.removeFunction(_callbackPtr);
35407
+ };
35408
+
35409
+ _callbackPtr = Module.addFunction(_callback, "vii");
35410
+
35411
+ Module.ccall(
35412
+ "csp_multiplayer_OnlineRealtimeEngine_DestroyEntity_void_SpaceEntityP_CallbackHandler",
35413
+ "void",
35414
+ ["number", "number", "number", "number"],
35415
+ [this.pointer, entity.pointer, _callbackPtr, 0],
35416
+ );
35417
+
35418
+ return _promise;
35419
+ }
35420
+
35421
+ /**
35422
+ * @description Sets a callback to be executed when an entity is fully created.
35423
+ * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
35424
+ * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
35425
+ */
35426
+ setEntityCreatedCallback(
35427
+ callback: (arg1: Multiplayer.SpaceEntity) => void,
35428
+ ) {
35429
+ var _callback = (_stateObject__: number, arg1) => {
35430
+ var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
35431
+
35432
+ callback(_arg1);
35433
+ };
35434
+
35435
+ var _callbackPtr = Module.addFunction(_callback, "vii");
35436
+
35437
+ Module.ccall(
35438
+ "csp_multiplayer_OnlineRealtimeEngine_SetEntityCreatedCallback_void_EntityCreatedCallback",
35439
+ "void",
35440
+ ["number", "number", "number"],
35441
+ [this.pointer, _callbackPtr, 0],
35442
+ );
35443
+ }
35444
+
35445
+ /**
35446
+ * @description Finds the first found SpaceEntity of a matching Name.
35447
+ * @param name - The name to search.
35448
+ * @return A non-owning pointer to the first found matching SpaceEntity.
35449
+ */
35450
+
35451
+ findSpaceEntity(name: string): Multiplayer.SpaceEntity {
35452
+ var _ret = Module._malloc(8);
35453
+
35454
+ Module.ccall(
35455
+ "csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntity_SpaceEntityP_StringRC",
35456
+ "void",
35457
+ ["number", "number", "string"],
35458
+ [_ret, this.pointer, name],
35459
+ );
35460
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35461
+ Module._free(_ret);
35462
+
35463
+ return _nPtr;
35464
+ }
35465
+
35466
+ /**
35467
+ * @description Finds the first found SpaceEntity that has the ID EntityId.
35468
+ * @param entityId - The Id to look for.
35469
+ * @return A non-owning pointer to the first found matching SpaceEntity.
35470
+ */
35471
+
35472
+ findSpaceEntityById(entityId: bigint): Multiplayer.SpaceEntity {
35473
+ assert(entityId >= Limits.UINT64_MIN);
35474
+ assert(entityId <= Limits.UINT64_MAX);
35475
+
35476
+ var _ret = Module._malloc(8);
35477
+
35478
+ Module.ccall(
35479
+ "csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntityById_SpaceEntityP_uint64_t",
35480
+ "void",
35481
+ ["number", "number", "bigint"],
35482
+ [_ret, this.pointer, entityId],
35483
+ );
35484
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35485
+ Module._free(_ret);
35486
+
35487
+ return _nPtr;
35488
+ }
35489
+
35490
+ /**
35491
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will contain an AvatarSpaceComponent.
35492
+ * @param name - The name to search for.
35493
+ * @return A pointer to the first found matching SpaceEntity.
35494
+ */
35495
+
35496
+ findSpaceAvatar(name: string): Multiplayer.SpaceEntity {
35497
+ var _ret = Module._malloc(8);
35498
+
35499
+ Module.ccall(
35500
+ "csp_multiplayer_OnlineRealtimeEngine_FindSpaceAvatar_SpaceEntityP_StringRC",
35501
+ "void",
35502
+ ["number", "number", "string"],
35503
+ [_ret, this.pointer, name],
35504
+ );
35505
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35506
+ Module._free(_ret);
35507
+
35508
+ return _nPtr;
35509
+ }
35510
+
35511
+ /**
35512
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will not contain an AvatarSpaceComponent.
35513
+ * @param name - The name to search for.
35514
+ * @return A pointer to the first found matching SpaceEntity.
35515
+ */
35516
+
35517
+ findSpaceObject(name: string): Multiplayer.SpaceEntity {
35518
+ var _ret = Module._malloc(8);
35519
+
35520
+ Module.ccall(
35521
+ "csp_multiplayer_OnlineRealtimeEngine_FindSpaceObject_SpaceEntityP_StringRC",
35522
+ "void",
35523
+ ["number", "number", "string"],
35524
+ [_ret, this.pointer, name],
35525
+ );
35526
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35527
+ Module._free(_ret);
35528
+
35529
+ return _nPtr;
35530
+ }
35531
+
35532
+ /**
35533
+ * @description Get an Entity by its index.
35534
+ * /// @param EntityIndex size_t : The index of the entity to get.
35535
+ * @return A non-owning pointer to the entity at the given index.
35536
+ */
35537
+
35538
+ getEntityByIndex(entityIndex: number): Multiplayer.SpaceEntity {
35539
+ assert(Number.isInteger(entityIndex));
35540
+ assert(entityIndex >= Limits.UINT32_MIN);
35541
+ assert(entityIndex <= Limits.UINT32_MAX);
35542
+
35543
+ var _ret = Module._malloc(8);
35544
+
35545
+ Module.ccall(
35546
+ "csp_multiplayer_OnlineRealtimeEngine_GetEntityByIndex_SpaceEntityP_size_t",
35547
+ "void",
35548
+ ["number", "number", "number"],
35549
+ [_ret, this.pointer, entityIndex],
35550
+ );
35551
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35552
+ Module._free(_ret);
35553
+
35554
+ return _nPtr;
35555
+ }
35556
+
35557
+ /**
35558
+ * @description Get an Avatar by its index. The returned pointer will be an entity that contains an AvatarSpaceComponent.
35559
+ * /// @param AvatarIndex size_t : The index of the avatar entity to get.
35560
+ * @return A non-owning pointer to the avatar entity with the given index.
35561
+ */
35562
+
35563
+ getAvatarByIndex(avatarIndex: number): Multiplayer.SpaceEntity {
35564
+ assert(Number.isInteger(avatarIndex));
35565
+ assert(avatarIndex >= Limits.UINT32_MIN);
35566
+ assert(avatarIndex <= Limits.UINT32_MAX);
35567
+
35568
+ var _ret = Module._malloc(8);
35569
+
35570
+ Module.ccall(
35571
+ "csp_multiplayer_OnlineRealtimeEngine_GetAvatarByIndex_SpaceEntityP_size_t",
35572
+ "void",
35573
+ ["number", "number", "number"],
35574
+ [_ret, this.pointer, avatarIndex],
35575
+ );
35576
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35577
+ Module._free(_ret);
35578
+
35579
+ return _nPtr;
35580
+ }
35581
+
35582
+ /**
35583
+ * @description Get an Object by its index. The returned pointer will be an entity that does not contain an AvatarSpaceComponent.
35584
+ * /// @param ObjectIndex size_t : The index of the object entity to get.
35585
+ * @return A non-owning pointer to the object entity with the given index.
35586
+ */
35587
+
35588
+ getObjectByIndex(objectIndex: number): Multiplayer.SpaceEntity {
35589
+ assert(Number.isInteger(objectIndex));
35590
+ assert(objectIndex >= Limits.UINT32_MIN);
35591
+ assert(objectIndex <= Limits.UINT32_MAX);
35592
+
35593
+ var _ret = Module._malloc(8);
35594
+
35595
+ Module.ccall(
35596
+ "csp_multiplayer_OnlineRealtimeEngine_GetObjectByIndex_SpaceEntityP_size_t",
35597
+ "void",
35598
+ ["number", "number", "number"],
35599
+ [_ret, this.pointer, objectIndex],
35600
+ );
35601
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
35602
+ Module._free(_ret);
35603
+
35604
+ return _nPtr;
35605
+ }
35606
+
35607
+ /**
35608
+ * @description Get the number of total entities in the system.
35609
+ * @return The total number of entities.
35610
+ */
35611
+
35612
+ getNumEntities(): number {
35613
+ let _result = Module.ccall(
35614
+ "csp_multiplayer_OnlineRealtimeEngine_GetNumEntitiesC_size_t",
35615
+ "number",
35616
+ ["number"],
35617
+ [this.pointer],
35618
+ );
35619
+
35620
+ const _unfixedValue = _result;
35621
+ let _fixedValue =
35622
+ _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
35623
+ _result = _fixedValue;
35624
+
35625
+ return _result;
35626
+ }
35627
+
35628
+ /**
35629
+ * @description Get the number of total Avatars in the system. Avatars are entities that contain AvatarSpaceComponents.
35630
+ * @return The total number of Avatar entities.
35631
+ */
35632
+
35633
+ getNumAvatars(): number {
35634
+ let _result = Module.ccall(
35635
+ "csp_multiplayer_OnlineRealtimeEngine_GetNumAvatarsC_size_t",
35636
+ "number",
35637
+ ["number"],
35638
+ [this.pointer],
35639
+ );
35640
+
35641
+ const _unfixedValue = _result;
35642
+ let _fixedValue =
35643
+ _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
35644
+ _result = _fixedValue;
35645
+
35646
+ return _result;
35397
35647
  }
35398
35648
 
35399
- get messageType(): Multiplayer.ConversationEventType {
35649
+ /**
35650
+ * @description Get the number of total Objects in the system. Objects are entities that do not contain AvatarSpaceComponents.
35651
+ * @return The total number of object entities.
35652
+ */
35653
+
35654
+ getNumObjects(): number {
35400
35655
  let _result = Module.ccall(
35401
- "csp_common_ConversationNetworkEventData__Get_MessageType",
35656
+ "csp_multiplayer_OnlineRealtimeEngine_GetNumObjectsC_size_t",
35402
35657
  "number",
35403
35658
  ["number"],
35404
35659
  [this.pointer],
35405
35660
  );
35406
35661
 
35662
+ const _unfixedValue = _result;
35663
+ let _fixedValue =
35664
+ _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
35665
+ _result = _fixedValue;
35666
+
35407
35667
  return _result;
35408
35668
  }
35409
35669
 
35410
- set messageType(value: Multiplayer.ConversationEventType) {
35411
- Module.ccall(
35412
- "csp_common_ConversationNetworkEventData__Set_MessageType",
35413
- "void",
35414
- ["number", "number"],
35415
- [this.pointer, value],
35416
- );
35417
- }
35670
+ /**
35671
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
35672
+ * @return A list of root entities containing non-owning pointers to entities.
35673
+ */
35674
+
35675
+ getRootHierarchyEntities(): Common.List<Multiplayer.SpaceEntity> {
35676
+ var _ret = Module._malloc(8);
35418
35677
 
35419
- get messageInfo(): Multiplayer.MessageInfo {
35420
- const _ptr = Module._malloc(8);
35421
35678
  Module.ccall(
35422
- "csp_common_ConversationNetworkEventData__Get_MessageInfo",
35679
+ "csp_multiplayer_OnlineRealtimeEngine_GetRootHierarchyEntitiesC_ListPC",
35423
35680
  "void",
35424
35681
  ["number", "number"],
35425
- [_ptr, this.pointer],
35682
+ [_ret, this.pointer],
35683
+ );
35684
+ var _nPtr = new Common.List<Multiplayer.SpaceEntity>(
35685
+ getNativePointer(_ret),
35686
+ csp_multiplayer_SpaceEntityFactory,
35687
+ "csp_multiplayer_SpaceEntity",
35426
35688
  );
35689
+ Module._free(_ret);
35427
35690
 
35428
- const _nPtr = getNativePointer(_ptr);
35429
- return new Multiplayer.MessageInfo(_nPtr);
35691
+ return _nPtr;
35430
35692
  }
35431
35693
 
35432
- set messageInfo(value: Multiplayer.MessageInfo) {
35694
+ /**
35695
+ * @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
35696
+ * From a client perspective, ProcessPendingEntityOperations is normally called via the CSPFoundation::Tick method.
35697
+ * @param entity - A non-owning pointer to the entity to be marked.
35698
+ */
35699
+
35700
+ markEntityForUpdate(entity: Multiplayer.SpaceEntity): void {
35433
35701
  Module.ccall(
35434
- "csp_common_ConversationNetworkEventData__Set_MessageInfo",
35702
+ "csp_multiplayer_OnlineRealtimeEngine_MarkEntityForUpdate_void_SpaceEntityP",
35435
35703
  "void",
35436
35704
  ["number", "number"],
35437
- [this.pointer, value.pointer],
35705
+ [this.pointer, entity.pointer],
35438
35706
  );
35439
35707
  }
35440
- }
35441
- }
35442
-
35443
- export namespace Common {
35444
- /**
35445
- * @description Class used to provide details of a permission change that has happened to a user whilst the client application is connected to a space.
35446
- */
35447
- export class AccessControlChangedNetworkEventData
35448
- extends Common.NetworkEventData
35449
- implements INativeResource
35450
- {
35451
- /** @internal */
35452
- constructor(pointer: NativePointer) {
35453
- super(pointer);
35454
- }
35455
35708
 
35456
- static fromNetworkEventData(
35457
- baseInstance: Common.NetworkEventData,
35458
- ): Common.AccessControlChangedNetworkEventData {
35459
- const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
35460
- return new Common.AccessControlChangedNetworkEventData(
35461
- new NativePointer(
35462
- nativeClassWrapper.pointer,
35463
- nativeClassWrapper.ownsPointer,
35464
- ),
35465
- );
35466
- }
35709
+ /**
35710
+ * @description Applies any pending changes to entities that have been marked for update.
35711
+ */
35467
35712
 
35468
- static create(): AccessControlChangedNetworkEventData {
35469
- var _ptr = Module._malloc(8);
35713
+ processPendingEntityOperations(): void {
35470
35714
  Module.ccall(
35471
- "csp_common_AccessControlChangedNetworkEventData_Ctor",
35715
+ "csp_multiplayer_OnlineRealtimeEngine_ProcessPendingEntityOperations_void",
35472
35716
  "void",
35473
35717
  ["number"],
35474
- [_ptr],
35718
+ [this.pointer],
35475
35719
  );
35476
- var _nPtr = getNativePointer(_ptr);
35477
-
35478
- return new AccessControlChangedNetworkEventData(_nPtr);
35479
- }
35480
-
35481
- delete(): void {
35482
- if (this.ownsPointer && !this.disposed) {
35483
- Module.ccall(
35484
- "csp_common_AccessControlChangedNetworkEventData_Dtor",
35485
- "void",
35486
- ["number"],
35487
- [this.pointer],
35488
- );
35489
-
35490
- this.disposed = true;
35491
- }
35492
35720
  }
35493
35721
 
35494
- get spaceId(): string {
35495
- let _result = Module.ccall(
35496
- "csp_common_AccessControlChangedNetworkEventData__Get_SpaceId",
35497
- "string",
35498
- ["number"],
35499
- [this.pointer],
35500
- );
35722
+ /**
35723
+ * @description Sets a callback to be executed when the script system is ready to run scripts.
35724
+ * @param callback - The callback to execute.
35725
+ */
35726
+ setScriptLeaderReadyCallback(callback: (arg1: boolean) => void) {
35727
+ var _callback = (_stateObject__: number, arg1) => {
35728
+ callback(arg1);
35729
+ };
35501
35730
 
35502
- return _result;
35503
- }
35731
+ var _callbackPtr = Module.addFunction(_callback, "vii");
35504
35732
 
35505
- set spaceId(value: string) {
35506
35733
  Module.ccall(
35507
- "csp_common_AccessControlChangedNetworkEventData__Set_SpaceId",
35734
+ "csp_multiplayer_OnlineRealtimeEngine_SetScriptLeaderReadyCallback_void_CallbackHandler",
35508
35735
  "void",
35509
- ["number", "string"],
35510
- [this.pointer, value],
35736
+ ["number", "number", "number"],
35737
+ [this.pointer, _callbackPtr, 0],
35511
35738
  );
35512
35739
  }
35513
35740
 
35514
- get userRoles(): Common.Array<Systems.SpaceUserRole> {
35515
- const _ptr = Module._malloc(8);
35516
- Module.ccall(
35517
- "csp_common_AccessControlChangedNetworkEventData__Get_UserRoles",
35518
- "void",
35519
- ["number", "number"],
35520
- [_ptr, this.pointer],
35521
- );
35522
-
35523
- const _nPtr = getNativePointer(_ptr);
35524
- return new Common.Array<Systems.SpaceUserRole>(
35525
- _nPtr,
35526
- csp_systems_SpaceUserRoleFactory,
35527
- "csp_systems_SpaceUserRole",
35528
- );
35529
- }
35741
+ /**
35742
+ * @description Sets the script owner for the given entity to the current client
35743
+ * @param entity - A pointer to the entity
35744
+ */
35530
35745
 
35531
- set userRoles(value: Common.Array<Systems.SpaceUserRole>) {
35746
+ claimScriptOwnership(entity: Multiplayer.SpaceEntity): void {
35532
35747
  Module.ccall(
35533
- "csp_common_AccessControlChangedNetworkEventData__Set_UserRoles",
35748
+ "csp_multiplayer_OnlineRealtimeEngine_ClaimScriptOwnershipC_void_SpaceEntityP",
35534
35749
  "void",
35535
35750
  ["number", "number"],
35536
- [this.pointer, value.pointer],
35751
+ [this.pointer, entity.pointer],
35537
35752
  );
35538
35753
  }
35539
35754
 
35540
- get changeType(): Common.EPermissionChangeType {
35541
- let _result = Module.ccall(
35542
- "csp_common_AccessControlChangedNetworkEventData__Get_ChangeType",
35543
- "number",
35544
- ["number"],
35545
- [this.pointer],
35546
- );
35547
-
35548
- return _result;
35549
- }
35755
+ /**
35756
+ * @description Enable Leader Election feature.
35757
+ */
35550
35758
 
35551
- set changeType(value: Common.EPermissionChangeType) {
35759
+ enableLeaderElection(): void {
35552
35760
  Module.ccall(
35553
- "csp_common_AccessControlChangedNetworkEventData__Set_ChangeType",
35761
+ "csp_multiplayer_OnlineRealtimeEngine_EnableLeaderElection_void",
35554
35762
  "void",
35555
- ["number", "number"],
35556
- [this.pointer, value],
35557
- );
35558
- }
35559
-
35560
- get userId(): string {
35561
- let _result = Module.ccall(
35562
- "csp_common_AccessControlChangedNetworkEventData__Get_UserId",
35563
- "string",
35564
35763
  ["number"],
35565
35764
  [this.pointer],
35566
35765
  );
35567
-
35568
- return _result;
35569
35766
  }
35570
35767
 
35571
- set userId(value: string) {
35768
+ /**
35769
+ * @description Disable Leader Election feature.
35770
+ */
35771
+
35772
+ disableLeaderElection(): void {
35572
35773
  Module.ccall(
35573
- "csp_common_AccessControlChangedNetworkEventData__Set_UserId",
35774
+ "csp_multiplayer_OnlineRealtimeEngine_DisableLeaderElection_void",
35574
35775
  "void",
35575
- ["number", "string"],
35576
- [this.pointer, value],
35776
+ ["number"],
35777
+ [this.pointer],
35577
35778
  );
35578
35779
  }
35579
- }
35580
- }
35581
-
35582
- export namespace Common {
35583
- export class SequenceChangedNetworkEventData
35584
- extends Common.NetworkEventData
35585
- implements INativeResource
35586
- {
35587
- /** @internal */
35588
- constructor(pointer: NativePointer) {
35589
- super(pointer);
35590
- }
35591
35780
 
35592
- static fromNetworkEventData(
35593
- baseInstance: Common.NetworkEventData,
35594
- ): Common.SequenceChangedNetworkEventData {
35595
- const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
35596
- return new Common.SequenceChangedNetworkEventData(
35597
- new NativePointer(
35598
- nativeClassWrapper.pointer,
35599
- nativeClassWrapper.ownsPointer,
35600
- ),
35601
- );
35602
- }
35781
+ /**
35782
+ * @description Check if the Leader Election feature is enabled.
35783
+ * @return True if enabled, false otherwise.
35784
+ */
35603
35785
 
35604
- static create(): SequenceChangedNetworkEventData {
35605
- var _ptr = Module._malloc(8);
35606
- Module.ccall(
35607
- "csp_common_SequenceChangedNetworkEventData_Ctor",
35608
- "void",
35786
+ isLeaderElectionEnabled(): boolean {
35787
+ let _result = Module.ccall(
35788
+ "csp_multiplayer_OnlineRealtimeEngine_IsLeaderElectionEnabledC_bool",
35789
+ "boolean",
35609
35790
  ["number"],
35610
- [_ptr],
35791
+ [this.pointer],
35611
35792
  );
35612
- var _nPtr = getNativePointer(_ptr);
35613
35793
 
35614
- return new SequenceChangedNetworkEventData(_nPtr);
35794
+ return _result;
35615
35795
  }
35616
35796
 
35617
- delete(): void {
35618
- if (this.ownsPointer && !this.disposed) {
35619
- Module.ccall(
35620
- "csp_common_SequenceChangedNetworkEventData_Dtor",
35621
- "void",
35622
- ["number"],
35623
- [this.pointer],
35624
- );
35625
-
35626
- this.disposed = true;
35627
- }
35628
- }
35797
+ /**
35798
+ * @description Debug helper to get the id of the currently elected script leader.
35799
+ * @return The id of the leader.
35800
+ */
35629
35801
 
35630
- get updateType(): Common.ESequenceUpdateType {
35802
+ getLeaderId(): bigint {
35631
35803
  let _result = Module.ccall(
35632
- "csp_common_SequenceChangedNetworkEventData__Get_UpdateType",
35633
- "number",
35804
+ "csp_multiplayer_OnlineRealtimeEngine_GetLeaderIdC_uint64_t",
35805
+ "bigint",
35634
35806
  ["number"],
35635
35807
  [this.pointer],
35636
35808
  );
35637
35809
 
35810
+ const _unfixedValue = _result;
35811
+ let _fixedValue =
35812
+ _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
35813
+ _result = _fixedValue;
35814
+
35638
35815
  return _result;
35639
35816
  }
35640
35817
 
35641
- set updateType(value: Common.ESequenceUpdateType) {
35642
- Module.ccall(
35643
- "csp_common_SequenceChangedNetworkEventData__Set_UpdateType",
35644
- "void",
35645
- ["number", "number"],
35646
- [this.pointer, value],
35647
- );
35648
- }
35818
+ /**
35819
+ * @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
35820
+ * @return True if enabled, false otherwise.
35821
+ */
35649
35822
 
35650
- get key(): string {
35823
+ getEntityPatchRateLimitEnabled(): boolean {
35651
35824
  let _result = Module.ccall(
35652
- "csp_common_SequenceChangedNetworkEventData__Get_Key",
35653
- "string",
35825
+ "csp_multiplayer_OnlineRealtimeEngine_GetEntityPatchRateLimitEnabledC_bool",
35826
+ "boolean",
35654
35827
  ["number"],
35655
35828
  [this.pointer],
35656
35829
  );
@@ -35658,56 +35831,91 @@ export namespace Common {
35658
35831
  return _result;
35659
35832
  }
35660
35833
 
35661
- set key(value: string) {
35834
+ /**
35835
+ * @description Set the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
35836
+ * /// This feature is enabled by default and should only be disabled if you are encountering issues.
35837
+ * /// @param Enabled : sets if the feature should be enabled or not.
35838
+ * \rst
35839
+ * .. note::
35840
+ * If disabling this feature, more requests will be made to Magnopus Connected Services,
35841
+ * and consequently more patch merges may occur on the server as a result.
35842
+ * \endrst
35843
+ */
35844
+
35845
+ setEntityPatchRateLimitEnabled(enabled: boolean): void {
35662
35846
  Module.ccall(
35663
- "csp_common_SequenceChangedNetworkEventData__Set_Key",
35847
+ "csp_multiplayer_OnlineRealtimeEngine_SetEntityPatchRateLimitEnabled_void_bool",
35664
35848
  "void",
35665
- ["number", "string"],
35666
- [this.pointer, value],
35849
+ ["number", "boolean"],
35850
+ [this.pointer, enabled],
35667
35851
  );
35668
35852
  }
35669
35853
 
35670
- get newKey(): string {
35671
- let _result = Module.ccall(
35672
- "csp_common_SequenceChangedNetworkEventData__Get_NewKey",
35673
- "string",
35854
+ /**
35855
+ * @description Locks the entity mutex.
35856
+ */
35857
+
35858
+ lockEntityUpdate(): void {
35859
+ Module.ccall(
35860
+ "csp_multiplayer_OnlineRealtimeEngine_LockEntityUpdateC_void",
35861
+ "void",
35674
35862
  ["number"],
35675
35863
  [this.pointer],
35676
35864
  );
35677
-
35678
- return _result;
35679
35865
  }
35680
35866
 
35681
- set newKey(value: string) {
35867
+ /**
35868
+ * @description Unlocks the entity mutex.
35869
+ */
35870
+
35871
+ unlockEntityUpdate(): void {
35682
35872
  Module.ccall(
35683
- "csp_common_SequenceChangedNetworkEventData__Set_NewKey",
35873
+ "csp_multiplayer_OnlineRealtimeEngine_UnlockEntityUpdateC_void",
35684
35874
  "void",
35685
- ["number", "string"],
35686
- [this.pointer, value],
35875
+ ["number"],
35876
+ [this.pointer],
35687
35877
  );
35688
35878
  }
35689
35879
 
35690
- get hotspotData(): Common.HotspotSequenceChangedNetworkEventData {
35691
- const _ptr = Module._malloc(8);
35880
+ /**
35881
+ * @description Queues a specific entity to update. Used in SpaceEntity to queue updates via passing the this pointer
35882
+ */
35883
+
35884
+ queueEntityUpdate(entityToUpdate: Multiplayer.SpaceEntity): void {
35692
35885
  Module.ccall(
35693
- "csp_common_SequenceChangedNetworkEventData__Get_HotspotData",
35886
+ "csp_multiplayer_OnlineRealtimeEngine_QueueEntityUpdate_void_SpaceEntityP",
35694
35887
  "void",
35695
35888
  ["number", "number"],
35696
- [_ptr, this.pointer],
35889
+ [this.pointer, entityToUpdate.pointer],
35697
35890
  );
35698
-
35699
- const _nPtr = getNativePointer(_ptr);
35700
- return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
35701
35891
  }
35702
35892
 
35703
- set hotspotData(value: Common.HotspotSequenceChangedNetworkEventData) {
35893
+ /**
35894
+ * @description "Resolves" the entity heirarchy, such that the entity is parented appropriately, and internal buffers are populated appropriately.
35895
+ * (Vague, need more understanding about what this does)
35896
+ */
35897
+
35898
+ resolveEntityHierarchy(entity: Multiplayer.SpaceEntity): void {
35704
35899
  Module.ccall(
35705
- "csp_common_SequenceChangedNetworkEventData__Set_HotspotData",
35900
+ "csp_multiplayer_OnlineRealtimeEngine_ResolveEntityHierarchy_void_SpaceEntityP",
35706
35901
  "void",
35707
35902
  ["number", "number"],
35708
- [this.pointer, value.pointer],
35903
+ [this.pointer, entity.pointer],
35709
35904
  );
35710
35905
  }
35906
+
35907
+ delete(): void {
35908
+ if (this.ownsPointer && !this.disposed) {
35909
+ Module.ccall(
35910
+ "csp_multiplayer_OnlineRealtimeEngine_Dtor",
35911
+ "void",
35912
+ ["number"],
35913
+ [this.pointer],
35914
+ );
35915
+
35916
+ this.disposed = true;
35917
+ }
35918
+ }
35711
35919
  }
35712
35920
  }
35713
35921
 
@@ -53368,43 +53576,195 @@ export namespace Systems {
53368
53576
  _callbackPtr = Module.addFunction(_callback, "vii");
53369
53577
 
53370
53578
  Module.ccall(
53371
- "csp_systems_SequenceSystem_RenameSequence_void_StringRC_StringRC_SequenceResultCallback",
53579
+ "csp_systems_SequenceSystem_RenameSequence_void_StringRC_StringRC_SequenceResultCallback",
53580
+ "void",
53581
+ ["number", "string", "string", "number", "number"],
53582
+ [this.pointer, oldSequenceKey, newSequenceKey, _callbackPtr, 0],
53583
+ );
53584
+
53585
+ return _promise;
53586
+ }
53587
+
53588
+ /**
53589
+ * @description Finds sequences based on the given criteria
53590
+ * NOTE: This call will fail (Reason InvalidSequenceKey) if the SequenceKey parameter contains invalid keys, such as spaces, '/' or '%'
53591
+ * @param sequenceKeys - An array of sequence keys to search for
53592
+ * @param sequenceKeys - An optional regex string for searching keys
53593
+ * @param referenceType - The type of reference (GroupId etc.). Must be used with ReferenceIds
53594
+ * @param referenceIds - The ids of the reference. Must be used with ReferenceType
53595
+ * @param metaData - Any additional data relating to the Sequence
53596
+ * @param callback - Callback to call when a response is received
53597
+ */
53598
+
53599
+ async getSequencesByCriteria(
53600
+ sequenceKeys: Common.Array<string>,
53601
+ keyRegex: string | null,
53602
+ referenceType: string | null,
53603
+ referenceIds: Common.Array<string>,
53604
+ metaData: Common.Map<string, string>,
53605
+ ): Promise<Systems.SequencesResult> {
53606
+ var _resolve;
53607
+
53608
+ var _promise = new Promise<Systems.SequencesResult>((_r) => {
53609
+ _resolve = _r;
53610
+ });
53611
+
53612
+ var _callbackPtr: number;
53613
+ var _callback = (_stateObject__: number, result) => {
53614
+ var _resultPtr = getNativePointer(result);
53615
+ var _resultInstance = new Systems.SequencesResult(_resultPtr);
53616
+
53617
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53618
+ return;
53619
+ }
53620
+
53621
+ _resolve(_resultInstance);
53622
+
53623
+ Module.removeFunction(_callbackPtr);
53624
+ };
53625
+
53626
+ _callbackPtr = Module.addFunction(_callback, "vii");
53627
+
53628
+ Module.ccall(
53629
+ "csp_systems_SequenceSystem_GetSequencesByCriteria_void_ArrayRC_StringRC_StringRC_ArrayRC_MapRC_SequencesResultCallback",
53630
+ "void",
53631
+ [
53632
+ "number",
53633
+ "number",
53634
+ "string",
53635
+ "string",
53636
+ "number",
53637
+ "number",
53638
+ "number",
53639
+ "number",
53640
+ ],
53641
+ [
53642
+ this.pointer,
53643
+ sequenceKeys.pointer,
53644
+ keyRegex,
53645
+ referenceType,
53646
+ referenceIds.pointer,
53647
+ metaData.pointer,
53648
+ _callbackPtr,
53649
+ 0,
53650
+ ],
53651
+ );
53652
+
53653
+ return _promise;
53654
+ }
53655
+
53656
+ /**
53657
+ * @description Finds all sequences that contain the given items
53658
+ * @param items - An array of items which should be searched for
53659
+ * @param referenceType - The type of reference (GroupId etc.). Must be used with ReferenceIds
53660
+ * @param referenceIds - The ids of the reference. Must be used with ReferenceType
53661
+ * @param callback - Callback to call when a response is received
53662
+ */
53663
+
53664
+ async getAllSequencesContainingItems(
53665
+ items: Common.Array<string>,
53666
+ referenceType: string | null,
53667
+ referenceIds: Common.Array<string>,
53668
+ ): Promise<Systems.SequencesResult> {
53669
+ var _resolve;
53670
+
53671
+ var _promise = new Promise<Systems.SequencesResult>((_r) => {
53672
+ _resolve = _r;
53673
+ });
53674
+
53675
+ var _callbackPtr: number;
53676
+ var _callback = (_stateObject__: number, result) => {
53677
+ var _resultPtr = getNativePointer(result);
53678
+ var _resultInstance = new Systems.SequencesResult(_resultPtr);
53679
+
53680
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53681
+ return;
53682
+ }
53683
+
53684
+ _resolve(_resultInstance);
53685
+
53686
+ Module.removeFunction(_callbackPtr);
53687
+ };
53688
+
53689
+ _callbackPtr = Module.addFunction(_callback, "vii");
53690
+
53691
+ Module.ccall(
53692
+ "csp_systems_SequenceSystem_GetAllSequencesContainingItems_void_ArrayRC_StringRC_ArrayRC_SequencesResultCallback",
53693
+ "void",
53694
+ ["number", "number", "string", "number", "number", "number"],
53695
+ [
53696
+ this.pointer,
53697
+ items.pointer,
53698
+ referenceType,
53699
+ referenceIds.pointer,
53700
+ _callbackPtr,
53701
+ 0,
53702
+ ],
53703
+ );
53704
+
53705
+ return _promise;
53706
+ }
53707
+
53708
+ /**
53709
+ * @description Gets a sequence by it's key
53710
+ * NOTE: This call will fail (Reason InvalidSequenceKey) if the SequenceKey parameter contains invalid keys, such as spaces, '/' or '%'
53711
+ * @param sequenceKey - The unique grouping name
53712
+ * @param callback - Callback to call when a response is received
53713
+ */
53714
+
53715
+ async getSequence(sequenceKey: string): Promise<Systems.SequenceResult> {
53716
+ var _resolve;
53717
+
53718
+ var _promise = new Promise<Systems.SequenceResult>((_r) => {
53719
+ _resolve = _r;
53720
+ });
53721
+
53722
+ var _callbackPtr: number;
53723
+ var _callback = (_stateObject__: number, result) => {
53724
+ var _resultPtr = getNativePointer(result);
53725
+ var _resultInstance = new Systems.SequenceResult(_resultPtr);
53726
+
53727
+ if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53728
+ return;
53729
+ }
53730
+
53731
+ _resolve(_resultInstance);
53732
+
53733
+ Module.removeFunction(_callbackPtr);
53734
+ };
53735
+
53736
+ _callbackPtr = Module.addFunction(_callback, "vii");
53737
+
53738
+ Module.ccall(
53739
+ "csp_systems_SequenceSystem_GetSequence_void_StringRC_SequenceResultCallback",
53372
53740
  "void",
53373
- ["number", "string", "string", "number", "number"],
53374
- [this.pointer, oldSequenceKey, newSequenceKey, _callbackPtr, 0],
53741
+ ["number", "string", "number", "number"],
53742
+ [this.pointer, sequenceKey, _callbackPtr, 0],
53375
53743
  );
53376
53744
 
53377
53745
  return _promise;
53378
53746
  }
53379
53747
 
53380
53748
  /**
53381
- * @description Finds sequences based on the given criteria
53749
+ * @description Deletes the given sequences. This call will fail if the user isn't a creator of the space
53382
53750
  * NOTE: This call will fail (Reason InvalidSequenceKey) if the SequenceKey parameter contains invalid keys, such as spaces, '/' or '%'
53383
- * @param sequenceKeys - An array of sequence keys to search for
53384
- * @param sequenceKeys - An optional regex string for searching keys
53385
- * @param referenceType - The type of reference (GroupId etc.). Must be used with ReferenceIds
53386
- * @param referenceIds - The ids of the reference. Must be used with ReferenceType
53387
- * @param metaData - Any additional data relating to the Sequence
53751
+ * @param sequenceKeys - An array of sequence keys to delete
53388
53752
  * @param callback - Callback to call when a response is received
53389
53753
  */
53390
53754
 
53391
- async getSequencesByCriteria(
53755
+ async deleteSequences(
53392
53756
  sequenceKeys: Common.Array<string>,
53393
- keyRegex: string | null,
53394
- referenceType: string | null,
53395
- referenceIds: Common.Array<string>,
53396
- metaData: Common.Map<string, string>,
53397
- ): Promise<Systems.SequencesResult> {
53757
+ ): Promise<Systems.NullResult> {
53398
53758
  var _resolve;
53399
53759
 
53400
- var _promise = new Promise<Systems.SequencesResult>((_r) => {
53760
+ var _promise = new Promise<Systems.NullResult>((_r) => {
53401
53761
  _resolve = _r;
53402
53762
  });
53403
53763
 
53404
53764
  var _callbackPtr: number;
53405
53765
  var _callback = (_stateObject__: number, result) => {
53406
53766
  var _resultPtr = getNativePointer(result);
53407
- var _resultInstance = new Systems.SequencesResult(_resultPtr);
53767
+ var _resultInstance = new Systems.NullResult(_resultPtr);
53408
53768
 
53409
53769
  if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53410
53770
  return;
@@ -53418,103 +53778,171 @@ export namespace Systems {
53418
53778
  _callbackPtr = Module.addFunction(_callback, "vii");
53419
53779
 
53420
53780
  Module.ccall(
53421
- "csp_systems_SequenceSystem_GetSequencesByCriteria_void_ArrayRC_StringRC_StringRC_ArrayRC_MapRC_SequencesResultCallback",
53781
+ "csp_systems_SequenceSystem_DeleteSequences_void_ArrayRC_NullResultCallback",
53422
53782
  "void",
53423
- [
53424
- "number",
53425
- "number",
53426
- "string",
53427
- "string",
53428
- "number",
53429
- "number",
53430
- "number",
53431
- "number",
53432
- ],
53433
- [
53434
- this.pointer,
53435
- sequenceKeys.pointer,
53436
- keyRegex,
53437
- referenceType,
53438
- referenceIds.pointer,
53439
- metaData.pointer,
53440
- _callbackPtr,
53441
- 0,
53442
- ],
53783
+ ["number", "number", "number", "number"],
53784
+ [this.pointer, sequenceKeys.pointer, _callbackPtr, 0],
53443
53785
  );
53444
53786
 
53445
53787
  return _promise;
53446
53788
  }
53447
53789
 
53448
53790
  /**
53449
- * @description Finds all sequences that contain the given items
53450
- * @param items - An array of items which should be searched for
53451
- * @param referenceType - The type of reference (GroupId etc.). Must be used with ReferenceIds
53452
- * @param referenceIds - The ids of the reference. Must be used with ReferenceType
53453
- * @param callback - Callback to call when a response is received
53791
+ * @description Sets a callback for a sequence changed event.
53792
+ * @param callback - Callback to receive data for the sequence that has been changed.
53454
53793
  */
53794
+ setSequenceChangedCallback(
53795
+ callback: (arg1: Common.SequenceChangedNetworkEventData) => void,
53796
+ ) {
53797
+ var _callback = (_stateObject__: number, arg1) => {
53798
+ var _arg1 = new Common.SequenceChangedNetworkEventData(
53799
+ getNativePointer(arg1),
53800
+ );
53455
53801
 
53456
- async getAllSequencesContainingItems(
53457
- items: Common.Array<string>,
53458
- referenceType: string | null,
53459
- referenceIds: Common.Array<string>,
53460
- ): Promise<Systems.SequencesResult> {
53461
- var _resolve;
53802
+ callback(_arg1);
53803
+ };
53462
53804
 
53463
- var _promise = new Promise<Systems.SequencesResult>((_r) => {
53464
- _resolve = _r;
53465
- });
53805
+ var _callbackPtr = Module.addFunction(_callback, "vii");
53466
53806
 
53467
- var _callbackPtr: number;
53468
- var _callback = (_stateObject__: number, result) => {
53469
- var _resultPtr = getNativePointer(result);
53470
- var _resultInstance = new Systems.SequencesResult(_resultPtr);
53807
+ Module.ccall(
53808
+ "csp_systems_SequenceSystem_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler",
53809
+ "void",
53810
+ ["number", "number", "number"],
53811
+ [this.pointer, _callbackPtr, 0],
53812
+ );
53813
+ }
53471
53814
 
53472
- if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53473
- return;
53474
- }
53815
+ /**
53816
+ * @description Registers the system to listen for the named event.
53817
+ */
53475
53818
 
53476
- _resolve(_resultInstance);
53819
+ registerSystemCallback(): void {
53820
+ Module.ccall(
53821
+ "csp_systems_SequenceSystem_RegisterSystemCallback_void",
53822
+ "void",
53823
+ ["number"],
53824
+ [this.pointer],
53825
+ );
53826
+ }
53477
53827
 
53478
- Module.removeFunction(_callbackPtr);
53479
- };
53828
+ /**
53829
+ * @description Deregisters the system from listening for the named event.
53830
+ */
53480
53831
 
53481
- _callbackPtr = Module.addFunction(_callback, "vii");
53832
+ deregisterSystemCallback(): void {
53833
+ Module.ccall(
53834
+ "csp_systems_SequenceSystem_DeregisterSystemCallback_void",
53835
+ "void",
53836
+ ["number"],
53837
+ [this.pointer],
53838
+ );
53839
+ }
53840
+ }
53841
+ }
53842
+
53843
+ export namespace Systems {
53844
+ /**
53845
+ @ingroup Application Settings System
53846
+ * @description Represents the result of a request for application settings.
53847
+ */
53848
+ export class ApplicationSettingsResult
53849
+ extends Systems.ResultBase
53850
+ implements INativeResource
53851
+ {
53852
+ /** @internal */
53853
+ constructor(pointer: NativePointer) {
53854
+ super(pointer);
53855
+ }
53856
+
53857
+ static fromResultBase(
53858
+ baseInstance: Systems.ResultBase,
53859
+ ): Systems.ApplicationSettingsResult {
53860
+ const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
53861
+ return new Systems.ApplicationSettingsResult(
53862
+ new NativePointer(
53863
+ nativeClassWrapper.pointer,
53864
+ nativeClassWrapper.ownsPointer,
53865
+ ),
53866
+ );
53867
+ }
53868
+
53869
+ getApplicationSettings(): Systems.ApplicationSettings {
53870
+ var _ret = Module._malloc(8);
53482
53871
 
53483
53872
  Module.ccall(
53484
- "csp_systems_SequenceSystem_GetAllSequencesContainingItems_void_ArrayRC_StringRC_ArrayRC_SequencesResultCallback",
53873
+ "csp_systems_ApplicationSettingsResult_GetApplicationSettingsC_ApplicationSettingsRC",
53485
53874
  "void",
53486
- ["number", "number", "string", "number", "number", "number"],
53487
- [
53488
- this.pointer,
53489
- items.pointer,
53490
- referenceType,
53491
- referenceIds.pointer,
53492
- _callbackPtr,
53493
- 0,
53494
- ],
53875
+ ["number", "number"],
53876
+ [_ret, this.pointer],
53495
53877
  );
53878
+ var _nPtr = new Systems.ApplicationSettings(getNativePointer(_ret));
53879
+ Module._free(_ret);
53496
53880
 
53497
- return _promise;
53881
+ return _nPtr;
53882
+ }
53883
+
53884
+ delete(): void {
53885
+ if (this.ownsPointer && !this.disposed) {
53886
+ Module.ccall(
53887
+ "csp_systems_ApplicationSettingsResult_Dtor",
53888
+ "void",
53889
+ ["number"],
53890
+ [this.pointer],
53891
+ );
53892
+
53893
+ this.disposed = true;
53894
+ }
53895
+ }
53896
+ }
53897
+ }
53898
+
53899
+ export namespace Systems {
53900
+ /**
53901
+ @ingroup Application Settings System
53902
+ * @description Public facing system that allows interfacing with Magnopus Connected Services' application settings service.
53903
+ */
53904
+ export class ApplicationSettingsSystem extends Systems.SystemBase {
53905
+ /** @internal */
53906
+ constructor(pointer: NativePointer) {
53907
+ super(pointer);
53908
+ }
53909
+
53910
+ static fromSystemBase(
53911
+ baseInstance: Systems.SystemBase,
53912
+ ): Systems.ApplicationSettingsSystem {
53913
+ const nativeClassWrapper = baseInstance as unknown as NativeClassWrapper;
53914
+ return new Systems.ApplicationSettingsSystem(
53915
+ new NativePointer(
53916
+ nativeClassWrapper.pointer,
53917
+ nativeClassWrapper.ownsPointer,
53918
+ ),
53919
+ );
53498
53920
  }
53499
53921
 
53500
53922
  /**
53501
- * @description Gets a sequence by it's key
53502
- * NOTE: This call will fail (Reason InvalidSequenceKey) if the SequenceKey parameter contains invalid keys, such as spaces, '/' or '%'
53503
- * @param sequenceKey - The unique grouping name
53504
- * @param callback - Callback to call when a response is received
53923
+ * @description Asynchronously retrieves application settings for a specific context.
53924
+ * @param applicationName - The name of the application for which settings are requested.
53925
+ * @param context - The specific context whose settings should be retrieved.
53926
+ * @param keys - Array of setting keys to retrieve. If not provided, all settings
53927
+ * for the context are returned.
53928
+ * @param callback - Callback when asynchronous task finishes.
53505
53929
  */
53506
53930
 
53507
- async getSequence(sequenceKey: string): Promise<Systems.SequenceResult> {
53931
+ async getSettingsByContext(
53932
+ applicationName: string,
53933
+ context: string,
53934
+ keys: Common.Array<string> | null,
53935
+ ): Promise<Systems.ApplicationSettingsResult> {
53508
53936
  var _resolve;
53509
53937
 
53510
- var _promise = new Promise<Systems.SequenceResult>((_r) => {
53938
+ var _promise = new Promise<Systems.ApplicationSettingsResult>((_r) => {
53511
53939
  _resolve = _r;
53512
53940
  });
53513
53941
 
53514
53942
  var _callbackPtr: number;
53515
53943
  var _callback = (_stateObject__: number, result) => {
53516
53944
  var _resultPtr = getNativePointer(result);
53517
- var _resultInstance = new Systems.SequenceResult(_resultPtr);
53945
+ var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
53518
53946
 
53519
53947
  if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53520
53948
  return;
@@ -53528,35 +53956,48 @@ export namespace Systems {
53528
53956
  _callbackPtr = Module.addFunction(_callback, "vii");
53529
53957
 
53530
53958
  Module.ccall(
53531
- "csp_systems_SequenceSystem_GetSequence_void_StringRC_SequenceResultCallback",
53959
+ "csp_systems_ApplicationSettingsSystem_GetSettingsByContext_void_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback",
53532
53960
  "void",
53533
- ["number", "string", "number", "number"],
53534
- [this.pointer, sequenceKey, _callbackPtr, 0],
53961
+ ["number", "string", "string", "number", "number", "number"],
53962
+ [
53963
+ this.pointer,
53964
+ applicationName,
53965
+ context,
53966
+ keys != null ? keys.pointer : 0,
53967
+ _callbackPtr,
53968
+ 0,
53969
+ ],
53535
53970
  );
53536
53971
 
53537
53972
  return _promise;
53538
53973
  }
53539
53974
 
53540
53975
  /**
53541
- * @description Deletes the given sequences. This call will fail if the user isn't a creator of the space
53542
- * NOTE: This call will fail (Reason InvalidSequenceKey) if the SequenceKey parameter contains invalid keys, such as spaces, '/' or '%'
53543
- * @param sequenceKeys - An array of sequence keys to delete
53544
- * @param callback - Callback to call when a response is received
53976
+ * @description Asynchronously retrieves application settings for a specific context without requiring authentication.
53977
+ * @param tenant - The tenant identifier under which the application and settings are scoped.
53978
+ * @param applicationName - The name of the application for which settings are requested.
53979
+ * @param context - The specific context whose settings should be retrieved.
53980
+ * @param keys - Array of setting keys to retrieve. If not provided, all settings
53981
+ * for the context are returned.
53982
+ * @param callback - Callback when asynchronous task finishes.
53545
53983
  */
53546
53984
 
53547
- async deleteSequences(
53548
- sequenceKeys: Common.Array<string>,
53549
- ): Promise<Systems.NullResult> {
53985
+ async getSettingsByContextAnonymous(
53986
+ tenant: string,
53987
+ applicationName: string,
53988
+ context: string,
53989
+ keys: Common.Array<string> | null,
53990
+ ): Promise<Systems.ApplicationSettingsResult> {
53550
53991
  var _resolve;
53551
53992
 
53552
- var _promise = new Promise<Systems.NullResult>((_r) => {
53993
+ var _promise = new Promise<Systems.ApplicationSettingsResult>((_r) => {
53553
53994
  _resolve = _r;
53554
53995
  });
53555
53996
 
53556
53997
  var _callbackPtr: number;
53557
53998
  var _callback = (_stateObject__: number, result) => {
53558
53999
  var _resultPtr = getNativePointer(result);
53559
- var _resultInstance = new Systems.NullResult(_resultPtr);
54000
+ var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
53560
54001
 
53561
54002
  if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
53562
54003
  return;
@@ -53570,65 +54011,22 @@ export namespace Systems {
53570
54011
  _callbackPtr = Module.addFunction(_callback, "vii");
53571
54012
 
53572
54013
  Module.ccall(
53573
- "csp_systems_SequenceSystem_DeleteSequences_void_ArrayRC_NullResultCallback",
54014
+ "csp_systems_ApplicationSettingsSystem_GetSettingsByContextAnonymous_void_StringRC_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback",
53574
54015
  "void",
53575
- ["number", "number", "number", "number"],
53576
- [this.pointer, sequenceKeys.pointer, _callbackPtr, 0],
54016
+ ["number", "string", "string", "string", "number", "number", "number"],
54017
+ [
54018
+ this.pointer,
54019
+ tenant,
54020
+ applicationName,
54021
+ context,
54022
+ keys != null ? keys.pointer : 0,
54023
+ _callbackPtr,
54024
+ 0,
54025
+ ],
53577
54026
  );
53578
54027
 
53579
54028
  return _promise;
53580
54029
  }
53581
-
53582
- /**
53583
- * @description Sets a callback for a sequence changed event.
53584
- * @param callback - Callback to receive data for the sequence that has been changed.
53585
- */
53586
- setSequenceChangedCallback(
53587
- callback: (arg1: Common.SequenceChangedNetworkEventData) => void,
53588
- ) {
53589
- var _callback = (_stateObject__: number, arg1) => {
53590
- var _arg1 = new Common.SequenceChangedNetworkEventData(
53591
- getNativePointer(arg1),
53592
- );
53593
-
53594
- callback(_arg1);
53595
- };
53596
-
53597
- var _callbackPtr = Module.addFunction(_callback, "vii");
53598
-
53599
- Module.ccall(
53600
- "csp_systems_SequenceSystem_SetSequenceChangedCallback_void_SequenceChangedCallbackHandler",
53601
- "void",
53602
- ["number", "number", "number"],
53603
- [this.pointer, _callbackPtr, 0],
53604
- );
53605
- }
53606
-
53607
- /**
53608
- * @description Registers the system to listen for the named event.
53609
- */
53610
-
53611
- registerSystemCallback(): void {
53612
- Module.ccall(
53613
- "csp_systems_SequenceSystem_RegisterSystemCallback_void",
53614
- "void",
53615
- ["number"],
53616
- [this.pointer],
53617
- );
53618
- }
53619
-
53620
- /**
53621
- * @description Deregisters the system from listening for the named event.
53622
- */
53623
-
53624
- deregisterSystemCallback(): void {
53625
- Module.ccall(
53626
- "csp_systems_SequenceSystem_DeregisterSystemCallback_void",
53627
- "void",
53628
- ["number"],
53629
- [this.pointer],
53630
- );
53631
- }
53632
54030
  }
53633
54031
  }
53634
54032
 
@@ -54594,6 +54992,8 @@ export namespace Systems {
54594
54992
  return new Space(_nPtr);
54595
54993
  }
54596
54994
 
54995
+ // operator=
54996
+
54597
54997
  delete(): void {
54598
54998
  if (this.ownsPointer && !this.disposed) {
54599
54999
  Module.ccall(
@@ -55413,25 +55813,32 @@ export namespace Systems {
55413
55813
 
55414
55814
  /**
55415
55815
  * @description Enter a space if you have permission to, based on the Space settings.
55416
- * This includes setting scopes (and toggling event listening in order to set the scope).
55417
- * It also retrieves all entities in the space. Ensure Connect is called prior to this.
55816
+ * Registers the user as in the space on the backend service, and calls csp::common::IRealtimeEngine::FetchAllEntitiesAndPopulateBuffers.
55817
+ * The initial load behaviour will differ based on the concrete IRealtimeEngine passed to this function.
55418
55818
  * If user does not have permission to discover or enter the space, callback will be called with EResultCode::Failed and
55419
55819
  * ERequestFailureReason::UserSpaceAccessDenied
55420
55820
  * @param space - Space to enter into
55821
+ * @param realtimeEngine - RealtimeEngine to load the space with. This object belongs to the caller, and does not
55822
+ * transfer ownership. Once the space is loaded, the caller should be sure to maintain the lifetime of the RealtimeEngine so long
55823
+ * as the space is active. Once the caller has called csp::systems::SpaceSystem::ExitSpace and received the callback, then they are
55824
+ * free to release the memory.
55421
55825
  * @param callback - Callback when asynchronous task finishes
55422
55826
  */
55423
55827
 
55424
- async enterSpace(spaceId: string): Promise<Systems.NullResult> {
55828
+ async enterSpace(
55829
+ spaceId: string,
55830
+ realtimeEngine: Common.IRealtimeEngine,
55831
+ ): Promise<Systems.SpaceResult> {
55425
55832
  var _resolve;
55426
55833
 
55427
- var _promise = new Promise<Systems.NullResult>((_r) => {
55834
+ var _promise = new Promise<Systems.SpaceResult>((_r) => {
55428
55835
  _resolve = _r;
55429
55836
  });
55430
55837
 
55431
55838
  var _callbackPtr: number;
55432
55839
  var _callback = (_stateObject__: number, result) => {
55433
55840
  var _resultPtr = getNativePointer(result);
55434
- var _resultInstance = new Systems.NullResult(_resultPtr);
55841
+ var _resultInstance = new Systems.SpaceResult(_resultPtr);
55435
55842
 
55436
55843
  if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
55437
55844
  return;
@@ -55445,10 +55852,10 @@ export namespace Systems {
55445
55852
  _callbackPtr = Module.addFunction(_callback, "vii");
55446
55853
 
55447
55854
  Module.ccall(
55448
- "csp_systems_SpaceSystem_EnterSpace_void_StringRC_NullResultCallback",
55855
+ "csp_systems_SpaceSystem_EnterSpace_void_StringRC_IRealtimeEngineP_SpaceResultCallback",
55449
55856
  "void",
55450
- ["number", "string", "number", "number"],
55451
- [this.pointer, spaceId, _callbackPtr, 0],
55857
+ ["number", "string", "number", "number", "number"],
55858
+ [this.pointer, spaceId, realtimeEngine.pointer, _callbackPtr, 0],
55452
55859
  );
55453
55860
 
55454
55861
  return _promise;