connected-spaces-platform.web 5.17.0 → 5.17.2

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.
@@ -98,6 +98,15 @@ export declare namespace Common {
98
98
  Vector4 = 6
99
99
  }
100
100
  }
101
+ export declare namespace Common {
102
+ /**
103
+ * @description Enum of concrete types of RealtimeEngines.
104
+ */
105
+ enum RealtimeEngineType {
106
+ OnlineMultiUser = 0,
107
+ OnlineSingleUser = 1
108
+ }
109
+ }
101
110
  export declare namespace Multiplayer {
102
111
  /**
103
112
  * @description Represents the type of component.
@@ -3482,6 +3491,128 @@ export declare namespace Common {
3482
3491
  set w(value: number);
3483
3492
  }
3484
3493
  }
3494
+ export declare namespace Common {
3495
+ class IRealtimeEngine extends NativeClassWrapper implements INativeResource {
3496
+ /** @internal */
3497
+ constructor(pointer: NativePointer);
3498
+ /**
3499
+ * @description Virtual destructor.
3500
+ */
3501
+ delete(): void;
3502
+ /**
3503
+ * @description Returns the concrete type of the instantiation of the abstract IRealtimeEngine.
3504
+ */
3505
+ getRealtimeEngineType(): Common.RealtimeEngineType;
3506
+ /**
3507
+ * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
3508
+ * @param name - The entity name of the newly created avatar entity.
3509
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
3510
+ * @param state - The initial Avatar State to set.
3511
+ * @param avatarId - The ID to be set on the AvatarSpaceComponent
3512
+ * @param avatarPlayMode - The Initial AvatarPlayMode to set.
3513
+ * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
3514
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
3515
+ */
3516
+ createAvatar(name: string, spaceTransform: Multiplayer.SpaceTransform, state: Multiplayer.AvatarState, avatarId: string, avatarPlayMode: Multiplayer.AvatarPlayMode): Promise<Multiplayer.SpaceEntity>;
3517
+ /**
3518
+ * @description Create and add a SpaceEntity, with relevant default values.
3519
+ * @param name - The name of the newly created SpaceEntity.
3520
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
3521
+ * @param callback - A callback that executes when the creation is complete,
3522
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
3523
+ */
3524
+ createEntity(name: string, spaceTransform: Multiplayer.SpaceTransform): Promise<Multiplayer.SpaceEntity>;
3525
+ /**
3526
+ * @description Destroy the specified entity.
3527
+ * @param entity - A non-owning pointer to the entity to be destroyed.
3528
+ * @param callback - A callback that executes when the entity destruction is complete.
3529
+ */
3530
+ destroyEntity(entity: Multiplayer.SpaceEntity): Promise<boolean>;
3531
+ /**
3532
+ * @description Sets a callback to be executed when an entity is fully created.
3533
+ * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
3534
+ * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
3535
+ */
3536
+ setEntityCreatedCallback(callback: (arg1: Multiplayer.SpaceEntity) => void): void;
3537
+ /**
3538
+ * @description Finds the first found SpaceEntity of a matching Name.
3539
+ * @param name - The name to search.
3540
+ * @return A non-owning pointer to the first found matching SpaceEntity.
3541
+ */
3542
+ findSpaceEntity(name: string): Multiplayer.SpaceEntity;
3543
+ /**
3544
+ * @description Finds the first found SpaceEntity that has the ID EntityId.
3545
+ * @param entityId - The Id to look for.
3546
+ * @return A non-owning pointer to the first found matching SpaceEntity.
3547
+ */
3548
+ findSpaceEntityById(entityId: bigint): Multiplayer.SpaceEntity;
3549
+ /**
3550
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will contain an AvatarSpaceComponent.
3551
+ * @param name - The name to search for.
3552
+ * @return A pointer to the first found matching SpaceEntity.
3553
+ */
3554
+ findSpaceAvatar(name: string): Multiplayer.SpaceEntity;
3555
+ /**
3556
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will not contain an AvatarSpaceComponent.
3557
+ * @param name - The name to search for.
3558
+ * @return A pointer to the first found matching SpaceEntity.
3559
+ */
3560
+ findSpaceObject(name: string): Multiplayer.SpaceEntity;
3561
+ /**
3562
+ * @description Get an Entity by its index.
3563
+ * /// @param EntityIndex size_t : The index of the entity to get.
3564
+ * @return A non-owning pointer to the entity at the given index.
3565
+ */
3566
+ getEntityByIndex(entityIndex: number): Multiplayer.SpaceEntity;
3567
+ /**
3568
+ * @description Get an Avatar by its index. The returned pointer will be an entity that contains an AvatarSpaceComponent.
3569
+ * /// @param AvatarIndex size_t : The index of the avatar entity to get.
3570
+ * @return A non-owning pointer to the avatar entity with the given index.
3571
+ */
3572
+ getAvatarByIndex(avatarIndex: number): Multiplayer.SpaceEntity;
3573
+ /**
3574
+ * @description Get an Object by its index. The returned pointer will be an entity that does not contain an AvatarSpaceComponent.
3575
+ * /// @param ObjectIndex size_t : The index of the object entity to get.
3576
+ * @return A non-owning pointer to the object entity with the given index.
3577
+ */
3578
+ getObjectByIndex(objectIndex: number): Multiplayer.SpaceEntity;
3579
+ /**
3580
+ * @description Get the number of total entities in the system.
3581
+ * @return The total number of entities.
3582
+ */
3583
+ getNumEntities(): number;
3584
+ /**
3585
+ * @description Get the number of total Avatars in the system. Avatars are entities that contain AvatarSpaceComponents.
3586
+ * @return The total number of Avatar entities.
3587
+ */
3588
+ getNumAvatars(): number;
3589
+ /**
3590
+ * @description Get the number of total Objects in the system. Objects are entities that do not contain AvatarSpaceComponents.
3591
+ * @return The total number of object entities.
3592
+ */
3593
+ getNumObjects(): number;
3594
+ /**
3595
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
3596
+ * @return A list of root entities containing non-owning pointers to entities.
3597
+ */
3598
+ getRootHierarchyEntities(): Common.List<Multiplayer.SpaceEntity>;
3599
+ /**
3600
+ * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
3601
+ * @param callback - A callback that executes when all existing entities have been retrieved.
3602
+ */
3603
+ setInitialEntitiesRetrievedCallback(callback: (arg1: boolean) => void): void;
3604
+ /**
3605
+ * @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
3606
+ * From a client perspective, ProcessPendingEntityOperations is normally called via the CSPFoundation::Tick method.
3607
+ * @param entity - A non-owning pointer to the entity to be marked.
3608
+ */
3609
+ markEntityForUpdate(entity: Multiplayer.SpaceEntity): void;
3610
+ /**
3611
+ * @description Applies any pending changes to entities that have been marked for update.
3612
+ */
3613
+ processPendingEntityOperations(): void;
3614
+ }
3615
+ }
3485
3616
  export declare namespace Multiplayer {
3486
3617
  /**
3487
3618
  * @description The base class for all components, provides mechanisms for dirtying properties and subscribing to events on property changes.
@@ -269,6 +269,11 @@ function csp_common_VariantTypeFactory(nativePointer) {
269
269
  return nativePointer.pointer;
270
270
  }
271
271
  ProxyClassFactories["csp_common_VariantType"] = csp_common_VariantTypeFactory;
272
+ function csp_common_RealtimeEngineTypeFactory(nativePointer) {
273
+ return nativePointer.pointer;
274
+ }
275
+ ProxyClassFactories["csp_common_RealtimeEngineType"] =
276
+ csp_common_RealtimeEngineTypeFactory;
272
277
  function csp_multiplayer_ComponentTypeFactory(nativePointer) {
273
278
  return nativePointer.pointer;
274
279
  }
@@ -695,6 +700,11 @@ function csp_common_Vector4Factory(nativePointer) {
695
700
  return new Common.Vector4(nativePointer);
696
701
  }
697
702
  ProxyClassFactories["csp_common_Vector4"] = csp_common_Vector4Factory;
703
+ function csp_common_IRealtimeEngineFactory(nativePointer) {
704
+ return new Common.IRealtimeEngine(nativePointer);
705
+ }
706
+ ProxyClassFactories["csp_common_IRealtimeEngine"] =
707
+ csp_common_IRealtimeEngineFactory;
698
708
  function csp_multiplayer_ComponentBaseFactory(nativePointer) {
699
709
  return new Multiplayer.ComponentBase(nativePointer);
700
710
  }
@@ -1858,6 +1868,16 @@ export var Common;
1858
1868
  VariantType[VariantType["Vector4"] = 6] = "Vector4";
1859
1869
  })(VariantType = Common.VariantType || (Common.VariantType = {}));
1860
1870
  })(Common || (Common = {}));
1871
+ (function (Common) {
1872
+ /**
1873
+ * @description Enum of concrete types of RealtimeEngines.
1874
+ */
1875
+ let RealtimeEngineType;
1876
+ (function (RealtimeEngineType) {
1877
+ RealtimeEngineType[RealtimeEngineType["OnlineMultiUser"] = 0] = "OnlineMultiUser";
1878
+ RealtimeEngineType[RealtimeEngineType["OnlineSingleUser"] = 1] = "OnlineSingleUser";
1879
+ })(RealtimeEngineType = Common.RealtimeEngineType || (Common.RealtimeEngineType = {}));
1880
+ })(Common || (Common = {}));
1861
1881
  export var Multiplayer;
1862
1882
  (function (Multiplayer) {
1863
1883
  /**
@@ -9348,6 +9368,294 @@ export class CSPFoundation {
9348
9368
  }
9349
9369
  Common.Vector4 = Vector4;
9350
9370
  })(Common || (Common = {}));
9371
+ (function (Common) {
9372
+ class IRealtimeEngine extends NativeClassWrapper {
9373
+ /** @internal */
9374
+ constructor(pointer) {
9375
+ super(pointer);
9376
+ }
9377
+ /**
9378
+ * @description Virtual destructor.
9379
+ */
9380
+ delete() {
9381
+ if (this.ownsPointer && !this.disposed) {
9382
+ Module.ccall("csp_common_IRealtimeEngine_Dtor", "void", ["number"], [this.pointer]);
9383
+ this.disposed = true;
9384
+ }
9385
+ }
9386
+ /**
9387
+ * @description Returns the concrete type of the instantiation of the abstract IRealtimeEngine.
9388
+ */
9389
+ getRealtimeEngineType() {
9390
+ let _result = Module.ccall("csp_common_IRealtimeEngine_GetRealtimeEngineTypeC_RealtimeEngineType", "number", ["number"], [this.pointer]);
9391
+ return _result;
9392
+ }
9393
+ /**
9394
+ * @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
9395
+ * @param name - The entity name of the newly created avatar entity.
9396
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
9397
+ * @param state - The initial Avatar State to set.
9398
+ * @param avatarId - The ID to be set on the AvatarSpaceComponent
9399
+ * @param avatarPlayMode - The Initial AvatarPlayMode to set.
9400
+ * @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
9401
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
9402
+ */
9403
+ async createAvatar(name, spaceTransform, state, avatarId, avatarPlayMode) {
9404
+ var _resolve;
9405
+ var _promise = new Promise((_r) => {
9406
+ _resolve = _r;
9407
+ });
9408
+ var _callbackPtr;
9409
+ var _callback = (_stateObject__, arg1) => {
9410
+ var _arg1Ptr = getNativePointer(arg1);
9411
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
9412
+ _resolve(_arg1Instance);
9413
+ Module.removeFunction(_callbackPtr);
9414
+ };
9415
+ _callbackPtr = Module.addFunction(_callback, "vii");
9416
+ Module.ccall("csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_SpaceTransformRC_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback", "void", [
9417
+ "number",
9418
+ "string",
9419
+ "number",
9420
+ "number",
9421
+ "string",
9422
+ "number",
9423
+ "number",
9424
+ "number",
9425
+ ], [
9426
+ this.pointer,
9427
+ name,
9428
+ spaceTransform.pointer,
9429
+ state,
9430
+ avatarId,
9431
+ avatarPlayMode,
9432
+ _callbackPtr,
9433
+ 0,
9434
+ ]);
9435
+ return _promise;
9436
+ }
9437
+ /**
9438
+ * @description Create and add a SpaceEntity, with relevant default values.
9439
+ * @param name - The name of the newly created SpaceEntity.
9440
+ * @param spaceTransform - The initial transform to set the SpaceEntity to.
9441
+ * @param callback - A callback that executes when the creation is complete,
9442
+ * which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
9443
+ */
9444
+ async createEntity(name, spaceTransform) {
9445
+ var _resolve;
9446
+ var _promise = new Promise((_r) => {
9447
+ _resolve = _r;
9448
+ });
9449
+ var _callbackPtr;
9450
+ var _callback = (_stateObject__, arg1) => {
9451
+ var _arg1Ptr = getNativePointer(arg1);
9452
+ var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
9453
+ _resolve(_arg1Instance);
9454
+ Module.removeFunction(_callbackPtr);
9455
+ };
9456
+ _callbackPtr = Module.addFunction(_callback, "vii");
9457
+ Module.ccall("csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_EntityCreatedCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0]);
9458
+ return _promise;
9459
+ }
9460
+ /**
9461
+ * @description Destroy the specified entity.
9462
+ * @param entity - A non-owning pointer to the entity to be destroyed.
9463
+ * @param callback - A callback that executes when the entity destruction is complete.
9464
+ */
9465
+ async destroyEntity(entity) {
9466
+ var _resolve;
9467
+ var _promise = new Promise((_r) => {
9468
+ _resolve = _r;
9469
+ });
9470
+ var _callbackPtr;
9471
+ var _callback = (_stateObject__, arg1) => {
9472
+ _resolve(!!arg1);
9473
+ Module.removeFunction(_callbackPtr);
9474
+ };
9475
+ _callbackPtr = Module.addFunction(_callback, "vii");
9476
+ Module.ccall("csp_common_IRealtimeEngine_DestroyEntity_void_SpaceEntityP_CallbackHandler", "void", ["number", "number", "number", "number"], [this.pointer, entity.pointer, _callbackPtr, 0]);
9477
+ return _promise;
9478
+ }
9479
+ /**
9480
+ * @description Sets a callback to be executed when an entity is fully created.
9481
+ * /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
9482
+ * /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
9483
+ */
9484
+ setEntityCreatedCallback(callback) {
9485
+ var _callback = (_stateObject__, arg1) => {
9486
+ var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
9487
+ callback(_arg1);
9488
+ };
9489
+ var _callbackPtr = Module.addFunction(_callback, "vii");
9490
+ Module.ccall("csp_common_IRealtimeEngine_SetEntityCreatedCallback_void_EntityCreatedCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
9491
+ }
9492
+ /**
9493
+ * @description Finds the first found SpaceEntity of a matching Name.
9494
+ * @param name - The name to search.
9495
+ * @return A non-owning pointer to the first found matching SpaceEntity.
9496
+ */
9497
+ findSpaceEntity(name) {
9498
+ var _ret = Module._malloc(8);
9499
+ Module.ccall("csp_common_IRealtimeEngine_FindSpaceEntity_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
9500
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9501
+ Module._free(_ret);
9502
+ return _nPtr;
9503
+ }
9504
+ /**
9505
+ * @description Finds the first found SpaceEntity that has the ID EntityId.
9506
+ * @param entityId - The Id to look for.
9507
+ * @return A non-owning pointer to the first found matching SpaceEntity.
9508
+ */
9509
+ findSpaceEntityById(entityId) {
9510
+ assert(entityId >= Limits.UINT64_MIN);
9511
+ assert(entityId <= Limits.UINT64_MAX);
9512
+ var _ret = Module._malloc(8);
9513
+ Module.ccall("csp_common_IRealtimeEngine_FindSpaceEntityById_SpaceEntityP_uint64_t", "void", ["number", "number", "bigint"], [_ret, this.pointer, entityId]);
9514
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9515
+ Module._free(_ret);
9516
+ return _nPtr;
9517
+ }
9518
+ /**
9519
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will contain an AvatarSpaceComponent.
9520
+ * @param name - The name to search for.
9521
+ * @return A pointer to the first found matching SpaceEntity.
9522
+ */
9523
+ findSpaceAvatar(name) {
9524
+ var _ret = Module._malloc(8);
9525
+ Module.ccall("csp_common_IRealtimeEngine_FindSpaceAvatar_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
9526
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9527
+ Module._free(_ret);
9528
+ return _nPtr;
9529
+ }
9530
+ /**
9531
+ * @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will not contain an AvatarSpaceComponent.
9532
+ * @param name - The name to search for.
9533
+ * @return A pointer to the first found matching SpaceEntity.
9534
+ */
9535
+ findSpaceObject(name) {
9536
+ var _ret = Module._malloc(8);
9537
+ Module.ccall("csp_common_IRealtimeEngine_FindSpaceObject_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
9538
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9539
+ Module._free(_ret);
9540
+ return _nPtr;
9541
+ }
9542
+ /**
9543
+ * @description Get an Entity by its index.
9544
+ * /// @param EntityIndex size_t : The index of the entity to get.
9545
+ * @return A non-owning pointer to the entity at the given index.
9546
+ */
9547
+ getEntityByIndex(entityIndex) {
9548
+ assert(Number.isInteger(entityIndex));
9549
+ assert(entityIndex >= Limits.UINT32_MIN);
9550
+ assert(entityIndex <= Limits.UINT32_MAX);
9551
+ var _ret = Module._malloc(8);
9552
+ Module.ccall("csp_common_IRealtimeEngine_GetEntityByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, entityIndex]);
9553
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9554
+ Module._free(_ret);
9555
+ return _nPtr;
9556
+ }
9557
+ /**
9558
+ * @description Get an Avatar by its index. The returned pointer will be an entity that contains an AvatarSpaceComponent.
9559
+ * /// @param AvatarIndex size_t : The index of the avatar entity to get.
9560
+ * @return A non-owning pointer to the avatar entity with the given index.
9561
+ */
9562
+ getAvatarByIndex(avatarIndex) {
9563
+ assert(Number.isInteger(avatarIndex));
9564
+ assert(avatarIndex >= Limits.UINT32_MIN);
9565
+ assert(avatarIndex <= Limits.UINT32_MAX);
9566
+ var _ret = Module._malloc(8);
9567
+ Module.ccall("csp_common_IRealtimeEngine_GetAvatarByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, avatarIndex]);
9568
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9569
+ Module._free(_ret);
9570
+ return _nPtr;
9571
+ }
9572
+ /**
9573
+ * @description Get an Object by its index. The returned pointer will be an entity that does not contain an AvatarSpaceComponent.
9574
+ * /// @param ObjectIndex size_t : The index of the object entity to get.
9575
+ * @return A non-owning pointer to the object entity with the given index.
9576
+ */
9577
+ getObjectByIndex(objectIndex) {
9578
+ assert(Number.isInteger(objectIndex));
9579
+ assert(objectIndex >= Limits.UINT32_MIN);
9580
+ assert(objectIndex <= Limits.UINT32_MAX);
9581
+ var _ret = Module._malloc(8);
9582
+ Module.ccall("csp_common_IRealtimeEngine_GetObjectByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, objectIndex]);
9583
+ var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
9584
+ Module._free(_ret);
9585
+ return _nPtr;
9586
+ }
9587
+ /**
9588
+ * @description Get the number of total entities in the system.
9589
+ * @return The total number of entities.
9590
+ */
9591
+ getNumEntities() {
9592
+ let _result = Module.ccall("csp_common_IRealtimeEngine_GetNumEntitiesC_size_t", "number", ["number"], [this.pointer]);
9593
+ const _unfixedValue = _result;
9594
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
9595
+ _result = _fixedValue;
9596
+ return _result;
9597
+ }
9598
+ /**
9599
+ * @description Get the number of total Avatars in the system. Avatars are entities that contain AvatarSpaceComponents.
9600
+ * @return The total number of Avatar entities.
9601
+ */
9602
+ getNumAvatars() {
9603
+ let _result = Module.ccall("csp_common_IRealtimeEngine_GetNumAvatarsC_size_t", "number", ["number"], [this.pointer]);
9604
+ const _unfixedValue = _result;
9605
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
9606
+ _result = _fixedValue;
9607
+ return _result;
9608
+ }
9609
+ /**
9610
+ * @description Get the number of total Objects in the system. Objects are entities that do not contain AvatarSpaceComponents.
9611
+ * @return The total number of object entities.
9612
+ */
9613
+ getNumObjects() {
9614
+ let _result = Module.ccall("csp_common_IRealtimeEngine_GetNumObjectsC_size_t", "number", ["number"], [this.pointer]);
9615
+ const _unfixedValue = _result;
9616
+ let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
9617
+ _result = _fixedValue;
9618
+ return _result;
9619
+ }
9620
+ /**
9621
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
9622
+ * @return A list of root entities containing non-owning pointers to entities.
9623
+ */
9624
+ getRootHierarchyEntities() {
9625
+ var _ret = Module._malloc(8);
9626
+ Module.ccall("csp_common_IRealtimeEngine_GetRootHierarchyEntitiesC_ListPC", "void", ["number", "number"], [_ret, this.pointer]);
9627
+ var _nPtr = new Common.List(getNativePointer(_ret), csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
9628
+ Module._free(_ret);
9629
+ return _nPtr;
9630
+ }
9631
+ /**
9632
+ * @description Sets a callback to be executed when all existing entities have been retrieved after entering a space.
9633
+ * @param callback - A callback that executes when all existing entities have been retrieved.
9634
+ */
9635
+ setInitialEntitiesRetrievedCallback(callback) {
9636
+ var _callback = (_stateObject__, arg1) => {
9637
+ callback(arg1);
9638
+ };
9639
+ var _callbackPtr = Module.addFunction(_callback, "vii");
9640
+ Module.ccall("csp_common_IRealtimeEngine_SetInitialEntitiesRetrievedCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
9641
+ }
9642
+ /**
9643
+ * @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
9644
+ * From a client perspective, ProcessPendingEntityOperations is normally called via the CSPFoundation::Tick method.
9645
+ * @param entity - A non-owning pointer to the entity to be marked.
9646
+ */
9647
+ markEntityForUpdate(entity) {
9648
+ Module.ccall("csp_common_IRealtimeEngine_MarkEntityForUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
9649
+ }
9650
+ /**
9651
+ * @description Applies any pending changes to entities that have been marked for update.
9652
+ */
9653
+ processPendingEntityOperations() {
9654
+ Module.ccall("csp_common_IRealtimeEngine_ProcessPendingEntityOperations_void", "void", ["number"], [this.pointer]);
9655
+ }
9656
+ }
9657
+ Common.IRealtimeEngine = IRealtimeEngine;
9658
+ })(Common || (Common = {}));
9351
9659
  (function (Multiplayer) {
9352
9660
  /**
9353
9661
  * @description The base class for all components, provides mechanisms for dirtying properties and subscribing to events on property changes.