connected-spaces-platform.web 5.15.0 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Debug/ConnectedSpacesPlatform_WASM.js +30 -26
- package/Debug/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/Debug/ConnectedSpacesPlatform_WASM.wasm.debug.wasm +0 -0
- package/README.md +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.js +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/connectedspacesplatform.d.ts +32 -312
- package/connectedspacesplatform.js +98 -139
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +179 -497
- package/package.json +1 -1
|
@@ -3242,7 +3242,7 @@ export namespace Multiplayer {
|
|
|
3242
3242
|
* Add means the component is newly added, clients should ensure that this triggers appropriate instantiation of wrapping objects.
|
|
3243
3243
|
* All properties for the component should be included.
|
|
3244
3244
|
* Delete means the component has been marked for deletion. It is likely that some other clients will not have the component at the point this is
|
|
3245
|
-
*
|
|
3245
|
+
* received. Any wrapping data objects should be deleted when this is received, and clients should cease updating this component as any call would
|
|
3246
3246
|
* fail. The CSP representation of the component has been removed at this point.
|
|
3247
3247
|
*/
|
|
3248
3248
|
export enum ComponentUpdateType {
|
|
@@ -4334,278 +4334,6 @@ export namespace Web {
|
|
|
4334
4334
|
}
|
|
4335
4335
|
}
|
|
4336
4336
|
|
|
4337
|
-
export namespace Multiplayer {
|
|
4338
|
-
/**
|
|
4339
|
-
* @description The serialiser is responsible for converting a SpaceEntity instance into a data structure that both SignalR
|
|
4340
|
-
* and our servers can understand and use.
|
|
4341
|
-
* /// To use the serialiser, Start with BeginEntity(), then use the write(bool, int, etc) functions to write data at the
|
|
4342
|
-
* Entity level. Use BeginComponents() to start writing as the Server component data, with each BeginComponent and
|
|
4343
|
-
* EndComponent brace dictating information written into a server component. Within a component, use WriteProperty()
|
|
4344
|
-
* to write the individual data. Ensure you finish by closing out the relevant sections with the 'End' functions.
|
|
4345
|
-
*/
|
|
4346
|
-
export interface IEntitySerialiser {
|
|
4347
|
-
/**
|
|
4348
|
-
* @description Start the serialisiation.
|
|
4349
|
-
*/
|
|
4350
|
-
beginEntity: () => void;
|
|
4351
|
-
|
|
4352
|
-
/**
|
|
4353
|
-
* @description End the serialisiation.
|
|
4354
|
-
*/
|
|
4355
|
-
endEntity: () => void;
|
|
4356
|
-
|
|
4357
|
-
/**
|
|
4358
|
-
* @description Write a boolean field of the entity.
|
|
4359
|
-
* @param value - The value to write.
|
|
4360
|
-
*/
|
|
4361
|
-
writeBool: (value: boolean) => void;
|
|
4362
|
-
|
|
4363
|
-
/**
|
|
4364
|
-
* @description Write a byte field of the entity.
|
|
4365
|
-
* @param value - The value to write.
|
|
4366
|
-
*/
|
|
4367
|
-
writeByte: (value: number) => void;
|
|
4368
|
-
|
|
4369
|
-
/**
|
|
4370
|
-
* @description Write a double field of the entity.
|
|
4371
|
-
* @param value - The value to write.
|
|
4372
|
-
*/
|
|
4373
|
-
writeDouble: (value: number) => void;
|
|
4374
|
-
|
|
4375
|
-
/**
|
|
4376
|
-
* @description Write an int64_t field of the entity.
|
|
4377
|
-
* @param value - The value to write.
|
|
4378
|
-
*/
|
|
4379
|
-
writeInt64: (value: bigint) => void;
|
|
4380
|
-
|
|
4381
|
-
/**
|
|
4382
|
-
* @description Write a uint64_t field of the entity.
|
|
4383
|
-
* @param value - The value to write.
|
|
4384
|
-
*/
|
|
4385
|
-
writeUInt64: (value: bigint) => void;
|
|
4386
|
-
|
|
4387
|
-
/**
|
|
4388
|
-
* @description Write a string field of the entity.
|
|
4389
|
-
* @param value - The value to write.
|
|
4390
|
-
*/
|
|
4391
|
-
writeString: (value: string) => void;
|
|
4392
|
-
|
|
4393
|
-
/**
|
|
4394
|
-
* @description Write a null field of the entity.
|
|
4395
|
-
*/
|
|
4396
|
-
writeNull: () => void;
|
|
4397
|
-
|
|
4398
|
-
/**
|
|
4399
|
-
* @description Start an array section.
|
|
4400
|
-
*/
|
|
4401
|
-
beginArray: () => void;
|
|
4402
|
-
|
|
4403
|
-
/**
|
|
4404
|
-
* @description Finish an array section.
|
|
4405
|
-
*/
|
|
4406
|
-
endArray: () => void;
|
|
4407
|
-
|
|
4408
|
-
/**
|
|
4409
|
-
* @description Start the components section.
|
|
4410
|
-
*/
|
|
4411
|
-
beginComponents: () => void;
|
|
4412
|
-
|
|
4413
|
-
/**
|
|
4414
|
-
* @description Finish the components section
|
|
4415
|
-
*/
|
|
4416
|
-
endComponents: () => void;
|
|
4417
|
-
|
|
4418
|
-
/**
|
|
4419
|
-
* @description Begin writing component with the given ID and type.
|
|
4420
|
-
* @param id - The ID of the component.
|
|
4421
|
-
*/
|
|
4422
|
-
beginComponent: (id: number, type: bigint) => void;
|
|
4423
|
-
|
|
4424
|
-
/**
|
|
4425
|
-
* @description Finish a component section.
|
|
4426
|
-
*/
|
|
4427
|
-
endComponent: () => void;
|
|
4428
|
-
|
|
4429
|
-
/**
|
|
4430
|
-
* @description Write the given component property.
|
|
4431
|
-
* @param id - ID of the component property.
|
|
4432
|
-
* @param value - The value to be written.
|
|
4433
|
-
*/
|
|
4434
|
-
writeProperty: (id: bigint, value: Multiplayer.ReplicatedValue) => void;
|
|
4435
|
-
|
|
4436
|
-
/**
|
|
4437
|
-
* @description Specific handler for writing view components.
|
|
4438
|
-
* /// View Components are data that is stored in specific keys on the server, it allows us to discretely update these
|
|
4439
|
-
* singular data pieces, rather than replicating larger chunks of data, and also allows us to always know where
|
|
4440
|
-
* in a data structure this data will be.
|
|
4441
|
-
* /// @param Id uint16_t : The ID of the component
|
|
4442
|
-
* @param value - The value of the component data to add
|
|
4443
|
-
*/
|
|
4444
|
-
addViewComponent: (id: number, value: Multiplayer.ReplicatedValue) => void;
|
|
4445
|
-
}
|
|
4446
|
-
}
|
|
4447
|
-
|
|
4448
|
-
export namespace Multiplayer {
|
|
4449
|
-
/**
|
|
4450
|
-
* @description The deserialiser is used to take recieved signalr message data and turn it into values you can use to populate a SpaceEntity.
|
|
4451
|
-
* /// This works similarly to the serialiser and you can refer to the serialiser for more details.
|
|
4452
|
-
* It is expected that you will be using the data as you read it to populate either a newly created or currently existing SpaceEntity.
|
|
4453
|
-
*/
|
|
4454
|
-
export interface IEntityDeserialiser {
|
|
4455
|
-
/**
|
|
4456
|
-
* @description Starts the deserialisation.
|
|
4457
|
-
*/
|
|
4458
|
-
enterEntity: () => void;
|
|
4459
|
-
|
|
4460
|
-
/**
|
|
4461
|
-
* @description Ends the deserialisation.
|
|
4462
|
-
*/
|
|
4463
|
-
leaveEntity: () => void;
|
|
4464
|
-
|
|
4465
|
-
/**
|
|
4466
|
-
* @description Reads a boolean from the deserialiser.
|
|
4467
|
-
* @return The deserialised boolean.
|
|
4468
|
-
*/
|
|
4469
|
-
readBool: () => boolean;
|
|
4470
|
-
|
|
4471
|
-
/**
|
|
4472
|
-
* @description Reads a byte from the deserialiser.
|
|
4473
|
-
* @return The deserialised byte.
|
|
4474
|
-
*/
|
|
4475
|
-
readByte: () => number;
|
|
4476
|
-
|
|
4477
|
-
/**
|
|
4478
|
-
* @description Reads a double from the deserialiser.
|
|
4479
|
-
* @return The deserialised double.
|
|
4480
|
-
*/
|
|
4481
|
-
readDouble: () => number;
|
|
4482
|
-
|
|
4483
|
-
/**
|
|
4484
|
-
* @description Reads an int64_t from the deserialiser.
|
|
4485
|
-
* @return The deserialised boolean.
|
|
4486
|
-
*/
|
|
4487
|
-
readInt64: () => bigint;
|
|
4488
|
-
|
|
4489
|
-
/**
|
|
4490
|
-
* @description Reads a uint64_t from the deserialiser.
|
|
4491
|
-
* @return The deserialised uint64_t.
|
|
4492
|
-
*/
|
|
4493
|
-
readUInt64: () => bigint;
|
|
4494
|
-
|
|
4495
|
-
/**
|
|
4496
|
-
* @description Reads a string from the deserialiser.
|
|
4497
|
-
* @return The deserialised string.
|
|
4498
|
-
*/
|
|
4499
|
-
readString: () => string;
|
|
4500
|
-
|
|
4501
|
-
/**
|
|
4502
|
-
* @description Reads a vector2 from the deserialiser.
|
|
4503
|
-
* @return The deserialised vector2.
|
|
4504
|
-
*/
|
|
4505
|
-
readVector2: () => Common.Vector2;
|
|
4506
|
-
|
|
4507
|
-
/**
|
|
4508
|
-
* @description Reads a vector3 from the deserialiser.
|
|
4509
|
-
* @return The deserialised vector3.
|
|
4510
|
-
*/
|
|
4511
|
-
readVector3: () => Common.Vector3;
|
|
4512
|
-
|
|
4513
|
-
/**
|
|
4514
|
-
* @description Reads a vector4 from the deserialiser.
|
|
4515
|
-
* @return The deserialised vector4.
|
|
4516
|
-
*/
|
|
4517
|
-
readVector4: () => Common.Vector4;
|
|
4518
|
-
|
|
4519
|
-
/**
|
|
4520
|
-
* @description Checks if the next value is null.
|
|
4521
|
-
* @return True if the next value is null, false otherwise.
|
|
4522
|
-
*/
|
|
4523
|
-
nextValueIsNull: () => boolean;
|
|
4524
|
-
|
|
4525
|
-
/**
|
|
4526
|
-
* @description Checks if the next value is an array.
|
|
4527
|
-
* @return True if the next value is null, false otherwise.
|
|
4528
|
-
*/
|
|
4529
|
-
nextValueIsArray: () => boolean;
|
|
4530
|
-
|
|
4531
|
-
/**
|
|
4532
|
-
* @description Puts the deserialiser into array processing mode to begin reading from an array.
|
|
4533
|
-
* @param outLength - A reference to variable to store the length of the array.
|
|
4534
|
-
*/
|
|
4535
|
-
enterArray: (outLength: NativeRef) => void;
|
|
4536
|
-
|
|
4537
|
-
/**
|
|
4538
|
-
* @description Completes reading from and array and leaves the array processing mode.
|
|
4539
|
-
*/
|
|
4540
|
-
leaveArray: () => void;
|
|
4541
|
-
|
|
4542
|
-
/**
|
|
4543
|
-
* @description Puts the deserialiser into component processing mode to begin reading from the components section of the serialised entity.
|
|
4544
|
-
*/
|
|
4545
|
-
enterComponents: () => void;
|
|
4546
|
-
|
|
4547
|
-
/**
|
|
4548
|
-
* @description Completes reading the components and exits that mode.
|
|
4549
|
-
*/
|
|
4550
|
-
leaveComponents: () => void;
|
|
4551
|
-
|
|
4552
|
-
/**
|
|
4553
|
-
* @description Gets the total number of components, including view components.
|
|
4554
|
-
* /// If iterating components by this count, subtract number of view components.
|
|
4555
|
-
* /// @return The number of components.
|
|
4556
|
-
*/
|
|
4557
|
-
getNumComponents: () => bigint;
|
|
4558
|
-
|
|
4559
|
-
/**
|
|
4560
|
-
* @description Gets the number of components that are not view components.
|
|
4561
|
-
* @return The number of non-view components.
|
|
4562
|
-
*/
|
|
4563
|
-
getNumRealComponents: () => bigint;
|
|
4564
|
-
|
|
4565
|
-
/**
|
|
4566
|
-
* @description Begins the processes of deserialising a single component that is not a view component.
|
|
4567
|
-
*/
|
|
4568
|
-
enterComponent: (outId: NativeRef, outType: NativeRef) => void;
|
|
4569
|
-
|
|
4570
|
-
/**
|
|
4571
|
-
* @description Completes the deserialisation of a single component.
|
|
4572
|
-
*/
|
|
4573
|
-
leaveComponent: () => void;
|
|
4574
|
-
|
|
4575
|
-
/**
|
|
4576
|
-
* @description Gets the number of properties in the component that is currently being deserialised.
|
|
4577
|
-
* @return The number of properties in the component.
|
|
4578
|
-
*/
|
|
4579
|
-
getNumProperties: () => bigint;
|
|
4580
|
-
|
|
4581
|
-
/**
|
|
4582
|
-
* @description Reads a property from the deserialiser, returning it as a ReplicatedValue.
|
|
4583
|
-
* @param outId - A reference to a variable to store the ID of the property.
|
|
4584
|
-
* @return The property value.
|
|
4585
|
-
*/
|
|
4586
|
-
readProperty: (outId: NativeRef) => Multiplayer.ReplicatedValue;
|
|
4587
|
-
|
|
4588
|
-
/**
|
|
4589
|
-
* @description Reads a view component from the deserialiser, returning it as a ReplicatedValue.
|
|
4590
|
-
* /// Since view components are handled differently in the serialiser, they are similarly deserialised in their own way.
|
|
4591
|
-
* /// @return The view component value.
|
|
4592
|
-
*/
|
|
4593
|
-
getViewComponent: (id: number) => Multiplayer.ReplicatedValue;
|
|
4594
|
-
|
|
4595
|
-
/**
|
|
4596
|
-
* @description Gets whether there is a view component with the given ID.
|
|
4597
|
-
* @param id - The ID of the component.
|
|
4598
|
-
* @return True if there is a view component, false otherwise.
|
|
4599
|
-
*/
|
|
4600
|
-
hasViewComponent: (id: number) => boolean;
|
|
4601
|
-
|
|
4602
|
-
/**
|
|
4603
|
-
* @description Skips a field when deserialising the SpaceEntity fields.
|
|
4604
|
-
*/
|
|
4605
|
-
skip: () => void;
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
|
|
4609
4337
|
export namespace Multiplayer {
|
|
4610
4338
|
/**
|
|
4611
4339
|
* @description Controls whether a component is enabled or disabled.
|
|
@@ -21806,7 +21534,7 @@ export namespace Multiplayer {
|
|
|
21806
21534
|
|
|
21807
21535
|
getComponentType(): Multiplayer.ComponentType {
|
|
21808
21536
|
let _result = Module.ccall(
|
|
21809
|
-
"
|
|
21537
|
+
"csp_multiplayer_ComponentBase_GetComponentTypeC_ComponentType",
|
|
21810
21538
|
"number",
|
|
21811
21539
|
["number"],
|
|
21812
21540
|
[this.pointer],
|
|
@@ -21826,7 +21554,7 @@ export namespace Multiplayer {
|
|
|
21826
21554
|
var _ret = Module._malloc(8);
|
|
21827
21555
|
|
|
21828
21556
|
Module.ccall(
|
|
21829
|
-
"
|
|
21557
|
+
"csp_multiplayer_ComponentBase_GetPropertiesC_MapPC",
|
|
21830
21558
|
"void",
|
|
21831
21559
|
["number", "number"],
|
|
21832
21560
|
[_ret, this.pointer],
|
|
@@ -21965,7 +21693,7 @@ export namespace Multiplayer {
|
|
|
21965
21693
|
@ingroup Multiplayer
|
|
21966
21694
|
* @description Handling of all network events.
|
|
21967
21695
|
*/
|
|
21968
|
-
export class EventBus extends NativeClassWrapper {
|
|
21696
|
+
export class EventBus extends NativeClassWrapper implements INativeResource {
|
|
21969
21697
|
/** @internal */
|
|
21970
21698
|
constructor(pointer: NativePointer) {
|
|
21971
21699
|
super(pointer);
|
|
@@ -22111,6 +21839,19 @@ export namespace Multiplayer {
|
|
|
22111
21839
|
[this.pointer],
|
|
22112
21840
|
);
|
|
22113
21841
|
}
|
|
21842
|
+
|
|
21843
|
+
delete(): void {
|
|
21844
|
+
if (this.ownsPointer && !this.disposed) {
|
|
21845
|
+
Module.ccall(
|
|
21846
|
+
"csp_multiplayer_EventBus_Dtor",
|
|
21847
|
+
"void",
|
|
21848
|
+
["number"],
|
|
21849
|
+
[this.pointer],
|
|
21850
|
+
);
|
|
21851
|
+
|
|
21852
|
+
this.disposed = true;
|
|
21853
|
+
}
|
|
21854
|
+
}
|
|
22114
21855
|
}
|
|
22115
21856
|
}
|
|
22116
21857
|
|
|
@@ -22784,7 +22525,10 @@ export namespace Multiplayer {
|
|
|
22784
22525
|
@ingroup Multiplayer
|
|
22785
22526
|
* @description Handling of all multiplayer connection functionality, such as connect, disconnect, entity replication and network events.
|
|
22786
22527
|
*/
|
|
22787
|
-
export class MultiplayerConnection
|
|
22528
|
+
export class MultiplayerConnection
|
|
22529
|
+
extends NativeClassWrapper
|
|
22530
|
+
implements INativeResource
|
|
22531
|
+
{
|
|
22788
22532
|
/** @internal */
|
|
22789
22533
|
constructor(pointer: NativePointer) {
|
|
22790
22534
|
super(pointer);
|
|
@@ -22908,7 +22652,7 @@ export namespace Multiplayer {
|
|
|
22908
22652
|
|
|
22909
22653
|
/**
|
|
22910
22654
|
* @description Sets the Self Messaging flag for this client.
|
|
22911
|
-
* This allows a client to declare that it wishes to
|
|
22655
|
+
* This allows a client to declare that it wishes to receive every patch and object message it sends.
|
|
22912
22656
|
@warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
|
|
22913
22657
|
* @param allowSelfMessaging - True to allow and false to disallow.
|
|
22914
22658
|
* @param callback - A callback with failure state.
|
|
@@ -22957,6 +22701,19 @@ export namespace Multiplayer {
|
|
|
22957
22701
|
|
|
22958
22702
|
return _result;
|
|
22959
22703
|
}
|
|
22704
|
+
|
|
22705
|
+
delete(): void {
|
|
22706
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22707
|
+
Module.ccall(
|
|
22708
|
+
"csp_multiplayer_MultiplayerConnection_Dtor",
|
|
22709
|
+
"void",
|
|
22710
|
+
["number"],
|
|
22711
|
+
[this.pointer],
|
|
22712
|
+
);
|
|
22713
|
+
|
|
22714
|
+
this.disposed = true;
|
|
22715
|
+
}
|
|
22716
|
+
}
|
|
22960
22717
|
}
|
|
22961
22718
|
}
|
|
22962
22719
|
|
|
@@ -23910,8 +23667,8 @@ export namespace Multiplayer {
|
|
|
23910
23667
|
}
|
|
23911
23668
|
|
|
23912
23669
|
/**
|
|
23913
|
-
* @description Get whether the space is transient or
|
|
23914
|
-
* @return Returns true if the space is transient and false if it is marked as
|
|
23670
|
+
* @description Get whether the space is transient or persistent.
|
|
23671
|
+
* @return Returns true if the space is transient and false if it is marked as persistent.
|
|
23915
23672
|
*/
|
|
23916
23673
|
|
|
23917
23674
|
getIsTransient(): boolean {
|
|
@@ -24196,7 +23953,7 @@ export namespace Multiplayer {
|
|
|
24196
23953
|
* @description Set a callback to be executed when a patch message is received for this Entity. Only one callback can be set.
|
|
24197
23954
|
* @param callback - Contains the SpaceEntity that updated, a set of flags to tell which parts updated
|
|
24198
23955
|
* and an array of information to tell which components updated.
|
|
24199
|
-
* When this callback is
|
|
23956
|
+
* When this callback is received, the flags and arrays should be used to determine which properties have updated data.
|
|
24200
23957
|
*/
|
|
24201
23958
|
setUpdateCallback(
|
|
24202
23959
|
callback: (
|
|
@@ -24357,70 +24114,6 @@ export namespace Multiplayer {
|
|
|
24357
24114
|
);
|
|
24358
24115
|
}
|
|
24359
24116
|
|
|
24360
|
-
/**
|
|
24361
|
-
* @description Serialise local changes into patch message format into the given serialiser. Does not send a patch.
|
|
24362
|
-
* @param serialiser - The serialiser to use.
|
|
24363
|
-
*/
|
|
24364
|
-
|
|
24365
|
-
serialisePatch(serialiser: Multiplayer.IEntitySerialiser): void {
|
|
24366
|
-
Module.ccall(
|
|
24367
|
-
"csp_multiplayer_SpaceEntity_SerialisePatchC_void_IEntitySerialiserR",
|
|
24368
|
-
"void",
|
|
24369
|
-
["number", "number"],
|
|
24370
|
-
[this.pointer, (serialiser as unknown as NativeClassWrapper).pointer],
|
|
24371
|
-
);
|
|
24372
|
-
}
|
|
24373
|
-
|
|
24374
|
-
/**
|
|
24375
|
-
* @description Serialise the entire SpaceEntity into object message format into the given serialiser. Does not send a message.
|
|
24376
|
-
* @param serialiser - The serialiser to use.
|
|
24377
|
-
*/
|
|
24378
|
-
|
|
24379
|
-
serialise(serialiser: Multiplayer.IEntitySerialiser): void {
|
|
24380
|
-
Module.ccall(
|
|
24381
|
-
"csp_multiplayer_SpaceEntity_SerialiseC_void_IEntitySerialiserR",
|
|
24382
|
-
"void",
|
|
24383
|
-
["number", "number"],
|
|
24384
|
-
[this.pointer, (serialiser as unknown as NativeClassWrapper).pointer],
|
|
24385
|
-
);
|
|
24386
|
-
}
|
|
24387
|
-
|
|
24388
|
-
/**
|
|
24389
|
-
* @description Serialises a given component into a consistent format for the given serialiser.
|
|
24390
|
-
* @param serialiser - The serialiser to use.
|
|
24391
|
-
* @param component - The component to be serialised.
|
|
24392
|
-
*/
|
|
24393
|
-
|
|
24394
|
-
serialiseComponent(
|
|
24395
|
-
serialiser: Multiplayer.IEntitySerialiser,
|
|
24396
|
-
component: Multiplayer.ComponentBase,
|
|
24397
|
-
): void {
|
|
24398
|
-
Module.ccall(
|
|
24399
|
-
"csp_multiplayer_SpaceEntity_SerialiseComponentC_void_IEntitySerialiserR_ComponentBaseP",
|
|
24400
|
-
"void",
|
|
24401
|
-
["number", "number", "number"],
|
|
24402
|
-
[
|
|
24403
|
-
this.pointer,
|
|
24404
|
-
(serialiser as unknown as NativeClassWrapper).pointer,
|
|
24405
|
-
component.pointer,
|
|
24406
|
-
],
|
|
24407
|
-
);
|
|
24408
|
-
}
|
|
24409
|
-
|
|
24410
|
-
/**
|
|
24411
|
-
* @description Using the given deserialiser, populate the SpaceEntity with the data in the deserialiser.
|
|
24412
|
-
* @param deserialiser - The deserialiser to use.
|
|
24413
|
-
*/
|
|
24414
|
-
|
|
24415
|
-
deserialise(deserialiser: Multiplayer.IEntityDeserialiser): void {
|
|
24416
|
-
Module.ccall(
|
|
24417
|
-
"csp_multiplayer_SpaceEntity_Deserialise_void_IEntityDeserialiserR",
|
|
24418
|
-
"void",
|
|
24419
|
-
["number", "number"],
|
|
24420
|
-
[this.pointer, (deserialiser as unknown as NativeClassWrapper).pointer],
|
|
24421
|
-
);
|
|
24422
|
-
}
|
|
24423
|
-
|
|
24424
24117
|
/**
|
|
24425
24118
|
* @description Gets the script associated with the space entity.
|
|
24426
24119
|
* @return The EntityScript instance set on the entity.
|
|
@@ -24590,7 +24283,10 @@ export namespace Multiplayer {
|
|
|
24590
24283
|
* can be registered for certain events that occur within the entity system so clients can
|
|
24591
24284
|
* react appropriately.
|
|
24592
24285
|
*/
|
|
24593
|
-
export class SpaceEntitySystem
|
|
24286
|
+
export class SpaceEntitySystem
|
|
24287
|
+
extends NativeClassWrapper
|
|
24288
|
+
implements INativeResource
|
|
24289
|
+
{
|
|
24594
24290
|
/** @internal */
|
|
24595
24291
|
constructor(pointer: NativePointer) {
|
|
24596
24292
|
super(pointer);
|
|
@@ -25312,7 +25008,7 @@ export namespace Multiplayer {
|
|
|
25312
25008
|
* \rst
|
|
25313
25009
|
* .. note::
|
|
25314
25010
|
* If disabling this feature, more requests will be made to Magnopus Connected Services,
|
|
25315
|
-
* and
|
|
25011
|
+
* and consequently more patch merges may occur on the server as a result.
|
|
25316
25012
|
* \endrst
|
|
25317
25013
|
*/
|
|
25318
25014
|
|
|
@@ -25326,7 +25022,7 @@ export namespace Multiplayer {
|
|
|
25326
25022
|
}
|
|
25327
25023
|
|
|
25328
25024
|
/**
|
|
25329
|
-
* @description Retrieves all
|
|
25025
|
+
* @description Retrieves all entities that exist at the root level (do not have a parent entity).
|
|
25330
25026
|
* @return A list of root entities.
|
|
25331
25027
|
*/
|
|
25332
25028
|
|
|
@@ -25348,6 +25044,19 @@ export namespace Multiplayer {
|
|
|
25348
25044
|
|
|
25349
25045
|
return _nPtr;
|
|
25350
25046
|
}
|
|
25047
|
+
|
|
25048
|
+
delete(): void {
|
|
25049
|
+
if (this.ownsPointer && !this.disposed) {
|
|
25050
|
+
Module.ccall(
|
|
25051
|
+
"csp_multiplayer_SpaceEntitySystem_Dtor",
|
|
25052
|
+
"void",
|
|
25053
|
+
["number"],
|
|
25054
|
+
[this.pointer],
|
|
25055
|
+
);
|
|
25056
|
+
|
|
25057
|
+
this.disposed = true;
|
|
25058
|
+
}
|
|
25059
|
+
}
|
|
25351
25060
|
}
|
|
25352
25061
|
}
|
|
25353
25062
|
|
|
@@ -25825,12 +25534,6 @@ export namespace Multiplayer {
|
|
|
25825
25534
|
[this.pointer],
|
|
25826
25535
|
);
|
|
25827
25536
|
|
|
25828
|
-
const _unfixedValue = _result;
|
|
25829
|
-
let _fixedValue =
|
|
25830
|
-
_unfixedValue < 0 ? _unfixedValue + 2 ** 16 : _unfixedValue;
|
|
25831
|
-
|
|
25832
|
-
_result = _fixedValue;
|
|
25833
|
-
|
|
25834
25537
|
return _result;
|
|
25835
25538
|
}
|
|
25836
25539
|
|
|
@@ -25925,7 +25628,7 @@ export namespace Multiplayer {
|
|
|
25925
25628
|
): AnnotationData {
|
|
25926
25629
|
var _ptr = Module._malloc(8);
|
|
25927
25630
|
Module.ccall(
|
|
25928
|
-
"
|
|
25631
|
+
"csp_multiplayer_AnnotationData_Ctor_StringRC_StringRC_double_Vector3RC_Vector4RC",
|
|
25929
25632
|
"void",
|
|
25930
25633
|
["number", "string", "string", "number", "number", "number"],
|
|
25931
25634
|
[
|
|
@@ -25957,193 +25660,122 @@ export namespace Multiplayer {
|
|
|
25957
25660
|
return new AnnotationData(_nPtr);
|
|
25958
25661
|
}
|
|
25959
25662
|
|
|
25960
|
-
|
|
25961
|
-
|
|
25962
|
-
|
|
25963
|
-
|
|
25663
|
+
delete(): void {
|
|
25664
|
+
if (this.ownsPointer && !this.disposed) {
|
|
25665
|
+
Module.ccall(
|
|
25666
|
+
"csp_multiplayer_AnnotationData_Dtor",
|
|
25667
|
+
"void",
|
|
25668
|
+
["number"],
|
|
25669
|
+
[this.pointer],
|
|
25670
|
+
);
|
|
25671
|
+
|
|
25672
|
+
this.disposed = true;
|
|
25673
|
+
}
|
|
25674
|
+
}
|
|
25964
25675
|
|
|
25965
|
-
|
|
25676
|
+
get annotationId(): string {
|
|
25966
25677
|
let _result = Module.ccall(
|
|
25967
|
-
"
|
|
25968
|
-
"
|
|
25678
|
+
"csp_multiplayer_AnnotationData__Get_AnnotationId",
|
|
25679
|
+
"string",
|
|
25969
25680
|
["number"],
|
|
25970
25681
|
[this.pointer],
|
|
25971
25682
|
);
|
|
25972
25683
|
|
|
25973
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
25974
|
-
free(_result);
|
|
25975
|
-
|
|
25976
|
-
_result = _resultString;
|
|
25977
|
-
|
|
25978
25684
|
return _result;
|
|
25979
25685
|
}
|
|
25980
25686
|
|
|
25981
|
-
|
|
25982
|
-
|
|
25983
|
-
|
|
25984
|
-
|
|
25687
|
+
set annotationId(value: string) {
|
|
25688
|
+
Module.ccall(
|
|
25689
|
+
"csp_multiplayer_AnnotationData__Set_AnnotationId",
|
|
25690
|
+
"void",
|
|
25691
|
+
["number", "string"],
|
|
25692
|
+
[this.pointer, value],
|
|
25693
|
+
);
|
|
25694
|
+
}
|
|
25985
25695
|
|
|
25986
|
-
|
|
25696
|
+
get annotationThumbnailId(): string {
|
|
25987
25697
|
let _result = Module.ccall(
|
|
25988
|
-
"
|
|
25989
|
-
"
|
|
25698
|
+
"csp_multiplayer_AnnotationData__Get_AnnotationThumbnailId",
|
|
25699
|
+
"string",
|
|
25990
25700
|
["number"],
|
|
25991
25701
|
[this.pointer],
|
|
25992
25702
|
);
|
|
25993
25703
|
|
|
25994
|
-
const _resultString = Module.UTF8ToString(_result);
|
|
25995
|
-
free(_result);
|
|
25996
|
-
|
|
25997
|
-
_result = _resultString;
|
|
25998
|
-
|
|
25999
25704
|
return _result;
|
|
26000
25705
|
}
|
|
26001
25706
|
|
|
26002
|
-
|
|
26003
|
-
|
|
26004
|
-
|
|
26005
|
-
|
|
25707
|
+
set annotationThumbnailId(value: string) {
|
|
25708
|
+
Module.ccall(
|
|
25709
|
+
"csp_multiplayer_AnnotationData__Set_AnnotationThumbnailId",
|
|
25710
|
+
"void",
|
|
25711
|
+
["number", "string"],
|
|
25712
|
+
[this.pointer, value],
|
|
25713
|
+
);
|
|
25714
|
+
}
|
|
26006
25715
|
|
|
26007
|
-
|
|
25716
|
+
get verticalFov(): number {
|
|
26008
25717
|
let _result = Module.ccall(
|
|
26009
|
-
"
|
|
25718
|
+
"csp_multiplayer_AnnotationData__Get_VerticalFov",
|
|
26010
25719
|
"number",
|
|
26011
25720
|
["number"],
|
|
26012
25721
|
[this.pointer],
|
|
26013
25722
|
);
|
|
26014
25723
|
|
|
26015
|
-
const _unfixedValue = _result;
|
|
26016
|
-
let _fixedValue =
|
|
26017
|
-
_unfixedValue < 0 ? _unfixedValue + 2 ** 16 : _unfixedValue;
|
|
26018
|
-
_result = _fixedValue;
|
|
26019
|
-
|
|
26020
25724
|
return _result;
|
|
26021
25725
|
}
|
|
26022
25726
|
|
|
26023
|
-
|
|
26024
|
-
* @description Get the AuthorCameraPosition
|
|
26025
|
-
* @return A vector3 representing the authorcameraposition
|
|
26026
|
-
*/
|
|
26027
|
-
|
|
26028
|
-
getAuthorCameraPosition(): Common.Vector3 {
|
|
26029
|
-
var _ret = Module._malloc(8);
|
|
26030
|
-
|
|
25727
|
+
set verticalFov(value: number) {
|
|
26031
25728
|
Module.ccall(
|
|
26032
|
-
"
|
|
25729
|
+
"csp_multiplayer_AnnotationData__Set_VerticalFov",
|
|
26033
25730
|
"void",
|
|
26034
25731
|
["number", "number"],
|
|
26035
|
-
[
|
|
25732
|
+
[this.pointer, value],
|
|
26036
25733
|
);
|
|
26037
|
-
var _nPtr = new Common.Vector3(getNativePointer(_ret));
|
|
26038
|
-
Module._free(_ret);
|
|
26039
|
-
return _nPtr;
|
|
26040
25734
|
}
|
|
26041
25735
|
|
|
26042
|
-
|
|
26043
|
-
|
|
26044
|
-
* @return A vector4 representing the authorcamerarotation
|
|
26045
|
-
*/
|
|
26046
|
-
|
|
26047
|
-
getAuthorCameraRotation(): Common.Vector4 {
|
|
26048
|
-
var _ret = Module._malloc(8);
|
|
26049
|
-
|
|
25736
|
+
get authorCameraPosition(): Common.Vector3 {
|
|
25737
|
+
const _ptr = Module._malloc(8);
|
|
26050
25738
|
Module.ccall(
|
|
26051
|
-
"
|
|
25739
|
+
"csp_multiplayer_AnnotationData__Get_AuthorCameraPosition",
|
|
26052
25740
|
"void",
|
|
26053
25741
|
["number", "number"],
|
|
26054
|
-
[
|
|
26055
|
-
);
|
|
26056
|
-
var _nPtr = new Common.Vector4(getNativePointer(_ret));
|
|
26057
|
-
Module._free(_ret);
|
|
26058
|
-
return _nPtr;
|
|
26059
|
-
}
|
|
26060
|
-
|
|
26061
|
-
/**
|
|
26062
|
-
* @description Set the annotation id
|
|
26063
|
-
* @param id - Const csp::common::string& id
|
|
26064
|
-
*/
|
|
26065
|
-
|
|
26066
|
-
setAnnotationId(id: string): void {
|
|
26067
|
-
Module.ccall(
|
|
26068
|
-
"csp_multiplayer_AnnotationData_SetAnnotationId_void_StringRC",
|
|
26069
|
-
"void",
|
|
26070
|
-
["number", "string"],
|
|
26071
|
-
[this.pointer, id],
|
|
25742
|
+
[_ptr, this.pointer],
|
|
26072
25743
|
);
|
|
26073
|
-
}
|
|
26074
25744
|
|
|
26075
|
-
|
|
26076
|
-
|
|
26077
|
-
* @param id - Const csp::common::string& id
|
|
26078
|
-
*/
|
|
26079
|
-
|
|
26080
|
-
setAnnotationThumbnailId(id: string): void {
|
|
26081
|
-
Module.ccall(
|
|
26082
|
-
"csp_multiplayer_AnnotationData_SetAnnotationThumbnailId_void_StringRC",
|
|
26083
|
-
"void",
|
|
26084
|
-
["number", "string"],
|
|
26085
|
-
[this.pointer, id],
|
|
26086
|
-
);
|
|
25745
|
+
const _nPtr = getNativePointer(_ptr);
|
|
25746
|
+
return new Common.Vector3(_nPtr);
|
|
26087
25747
|
}
|
|
26088
25748
|
|
|
26089
|
-
|
|
26090
|
-
* @description Set the VerticalFov
|
|
26091
|
-
* @param inVerticalFo - InVerticalFov
|
|
26092
|
-
*/
|
|
26093
|
-
|
|
26094
|
-
setVerticalFov(verticalFov: number): void {
|
|
26095
|
-
assert(Number.isInteger(verticalFov));
|
|
26096
|
-
assert(verticalFov >= Limits.UINT16_MIN);
|
|
26097
|
-
assert(verticalFov <= Limits.UINT16_MAX);
|
|
26098
|
-
|
|
25749
|
+
set authorCameraPosition(value: Common.Vector3) {
|
|
26099
25750
|
Module.ccall(
|
|
26100
|
-
"
|
|
25751
|
+
"csp_multiplayer_AnnotationData__Set_AuthorCameraPosition",
|
|
26101
25752
|
"void",
|
|
26102
25753
|
["number", "number"],
|
|
26103
|
-
[this.pointer,
|
|
25754
|
+
[this.pointer, value.pointer],
|
|
26104
25755
|
);
|
|
26105
25756
|
}
|
|
26106
25757
|
|
|
26107
|
-
|
|
26108
|
-
|
|
26109
|
-
* @param inAuthorCameraPositio - InAuthorCameraPosition
|
|
26110
|
-
*/
|
|
26111
|
-
|
|
26112
|
-
setAuthorCameraPosition(authorCameraPosition: Common.Vector3): void {
|
|
25758
|
+
get authorCameraRotation(): Common.Vector4 {
|
|
25759
|
+
const _ptr = Module._malloc(8);
|
|
26113
25760
|
Module.ccall(
|
|
26114
|
-
"
|
|
25761
|
+
"csp_multiplayer_AnnotationData__Get_AuthorCameraRotation",
|
|
26115
25762
|
"void",
|
|
26116
25763
|
["number", "number"],
|
|
26117
|
-
[
|
|
25764
|
+
[_ptr, this.pointer],
|
|
26118
25765
|
);
|
|
26119
|
-
}
|
|
26120
25766
|
|
|
26121
|
-
|
|
26122
|
-
|
|
26123
|
-
|
|
26124
|
-
*/
|
|
25767
|
+
const _nPtr = getNativePointer(_ptr);
|
|
25768
|
+
return new Common.Vector4(_nPtr);
|
|
25769
|
+
}
|
|
26125
25770
|
|
|
26126
|
-
|
|
25771
|
+
set authorCameraRotation(value: Common.Vector4) {
|
|
26127
25772
|
Module.ccall(
|
|
26128
|
-
"
|
|
25773
|
+
"csp_multiplayer_AnnotationData__Set_AuthorCameraRotation",
|
|
26129
25774
|
"void",
|
|
26130
25775
|
["number", "number"],
|
|
26131
|
-
[this.pointer,
|
|
25776
|
+
[this.pointer, value.pointer],
|
|
26132
25777
|
);
|
|
26133
25778
|
}
|
|
26134
|
-
|
|
26135
|
-
delete(): void {
|
|
26136
|
-
if (this.ownsPointer && !this.disposed) {
|
|
26137
|
-
Module.ccall(
|
|
26138
|
-
"csp_multiplayer_AnnotationData_Dtor",
|
|
26139
|
-
"void",
|
|
26140
|
-
["number"],
|
|
26141
|
-
[this.pointer],
|
|
26142
|
-
);
|
|
26143
|
-
|
|
26144
|
-
this.disposed = true;
|
|
26145
|
-
}
|
|
26146
|
-
}
|
|
26147
25779
|
}
|
|
26148
25780
|
}
|
|
26149
25781
|
|
|
@@ -26238,6 +25870,22 @@ export namespace Multiplayer {
|
|
|
26238
25870
|
return _result;
|
|
26239
25871
|
}
|
|
26240
25872
|
|
|
25873
|
+
/**
|
|
25874
|
+
* @description Checks if the entity has a script component.
|
|
25875
|
+
* @return True if component exist, false otherwise.
|
|
25876
|
+
*/
|
|
25877
|
+
|
|
25878
|
+
hasEntityScriptComponent(): boolean {
|
|
25879
|
+
let _result = Module.ccall(
|
|
25880
|
+
"csp_multiplayer_EntityScript_HasEntityScriptComponent_bool",
|
|
25881
|
+
"boolean",
|
|
25882
|
+
["number"],
|
|
25883
|
+
[this.pointer],
|
|
25884
|
+
);
|
|
25885
|
+
|
|
25886
|
+
return _result;
|
|
25887
|
+
}
|
|
25888
|
+
|
|
26241
25889
|
/**
|
|
26242
25890
|
* @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
|
|
26243
25891
|
* @return Text of the last error.
|
|
@@ -38181,26 +37829,39 @@ export namespace Multiplayer {
|
|
|
38181
37829
|
* A CSP error will be sent to the LogSystem if this condition is not met, with a EResultCode::Failed response.
|
|
38182
37830
|
*/
|
|
38183
37831
|
|
|
38184
|
-
getAnnotationThumbnailsForConversation(
|
|
38185
|
-
|
|
38186
|
-
|
|
38187
|
-
|
|
38188
|
-
|
|
37832
|
+
async getAnnotationThumbnailsForConversation(): Promise<Multiplayer.AnnotationThumbnailCollectionResult> {
|
|
37833
|
+
var _resolve;
|
|
37834
|
+
|
|
37835
|
+
var _promise =
|
|
37836
|
+
new Promise<Multiplayer.AnnotationThumbnailCollectionResult>((_r) => {
|
|
37837
|
+
_resolve = _r;
|
|
37838
|
+
});
|
|
37839
|
+
|
|
37840
|
+
var _callbackPtr: number;
|
|
38189
37841
|
var _callback = (_stateObject__: number, result) => {
|
|
38190
|
-
var
|
|
38191
|
-
|
|
38192
|
-
|
|
38193
|
-
|
|
37842
|
+
var _resultPtr = getNativePointer(result);
|
|
37843
|
+
var _resultInstance =
|
|
37844
|
+
new Multiplayer.AnnotationThumbnailCollectionResult(_resultPtr);
|
|
37845
|
+
|
|
37846
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
37847
|
+
return;
|
|
37848
|
+
}
|
|
37849
|
+
|
|
37850
|
+
_resolve(_resultInstance);
|
|
37851
|
+
|
|
37852
|
+
Module.removeFunction(_callbackPtr);
|
|
38194
37853
|
};
|
|
38195
37854
|
|
|
38196
|
-
|
|
37855
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
38197
37856
|
|
|
38198
37857
|
Module.ccall(
|
|
38199
37858
|
"csp_multiplayer_ConversationSpaceComponent_GetAnnotationThumbnailsForConversation_void_AnnotationThumbnailCollectionResultCallback",
|
|
38200
37859
|
"void",
|
|
38201
|
-
["number", "number"],
|
|
38202
|
-
[this.pointer,
|
|
37860
|
+
["number", "number", "number"],
|
|
37861
|
+
[this.pointer, _callbackPtr, 0],
|
|
38203
37862
|
);
|
|
37863
|
+
|
|
37864
|
+
return _promise;
|
|
38204
37865
|
}
|
|
38205
37866
|
|
|
38206
37867
|
/**
|
|
@@ -45885,6 +45546,19 @@ export namespace Systems {
|
|
|
45885
45546
|
return _nPtr;
|
|
45886
45547
|
}
|
|
45887
45548
|
|
|
45549
|
+
static create(): AssetCollectionResult {
|
|
45550
|
+
var _ptr = Module._malloc(8);
|
|
45551
|
+
Module.ccall(
|
|
45552
|
+
"csp_systems_AssetCollectionResult_Ctor",
|
|
45553
|
+
"void",
|
|
45554
|
+
["number"],
|
|
45555
|
+
[_ptr],
|
|
45556
|
+
);
|
|
45557
|
+
var _nPtr = getNativePointer(_ptr);
|
|
45558
|
+
|
|
45559
|
+
return new AssetCollectionResult(_nPtr);
|
|
45560
|
+
}
|
|
45561
|
+
|
|
45888
45562
|
delete(): void {
|
|
45889
45563
|
if (this.ownsPointer && !this.disposed) {
|
|
45890
45564
|
Module.ccall(
|
|
@@ -53244,6 +52918,14 @@ export namespace Systems {
|
|
|
53244
52918
|
return _result;
|
|
53245
52919
|
}
|
|
53246
52920
|
|
|
52921
|
+
static create(): SpaceResult {
|
|
52922
|
+
var _ptr = Module._malloc(8);
|
|
52923
|
+
Module.ccall("csp_systems_SpaceResult_Ctor", "void", ["number"], [_ptr]);
|
|
52924
|
+
var _nPtr = getNativePointer(_ptr);
|
|
52925
|
+
|
|
52926
|
+
return new SpaceResult(_nPtr);
|
|
52927
|
+
}
|
|
52928
|
+
|
|
53247
52929
|
delete(): void {
|
|
53248
52930
|
if (this.ownsPointer && !this.disposed) {
|
|
53249
52931
|
Module.ccall(
|
|
@@ -54192,7 +53874,7 @@ export namespace Systems {
|
|
|
54192
53874
|
}
|
|
54193
53875
|
|
|
54194
53876
|
/**
|
|
54195
|
-
* @description Deletes a given space and the
|
|
53877
|
+
* @description Deletes a given space and the associated objects that belong to it. Including UserService group, Metadata, and Thumbnail.
|
|
54196
53878
|
* @param space - Space to delete
|
|
54197
53879
|
* @param callback - Callback when asynchronous task finishes
|
|
54198
53880
|
*/
|