connected-spaces-platform.web 5.21.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.
- package/Debug/ConnectedSpacesPlatform_WASM.js +194 -96
- 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 +403 -272
- package/connectedspacesplatform.js +1188 -730
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +2335 -1447
- package/package.json +1 -1
|
@@ -733,16 +733,16 @@ function csp_common_Vector4Factory(nativePointer) {
|
|
|
733
733
|
return new Common.Vector4(nativePointer);
|
|
734
734
|
}
|
|
735
735
|
ProxyClassFactories["csp_common_Vector4"] = csp_common_Vector4Factory;
|
|
736
|
-
function csp_common_InvalidInterfaceUseErrorFactory(nativePointer) {
|
|
737
|
-
return new Common.InvalidInterfaceUseError(nativePointer);
|
|
738
|
-
}
|
|
739
|
-
ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
|
|
740
|
-
csp_common_InvalidInterfaceUseErrorFactory;
|
|
741
736
|
function csp_common_IJSScriptRunnerFactory(nativePointer) {
|
|
742
737
|
return new Common.IJSScriptRunner(nativePointer);
|
|
743
738
|
}
|
|
744
739
|
ProxyClassFactories["csp_common_IJSScriptRunner"] =
|
|
745
740
|
csp_common_IJSScriptRunnerFactory;
|
|
741
|
+
function csp_common_InvalidInterfaceUseErrorFactory(nativePointer) {
|
|
742
|
+
return new Common.InvalidInterfaceUseError(nativePointer);
|
|
743
|
+
}
|
|
744
|
+
ProxyClassFactories["csp_common_InvalidInterfaceUseError"] =
|
|
745
|
+
csp_common_InvalidInterfaceUseErrorFactory;
|
|
746
746
|
function csp_common_IRealtimeEngineFactory(nativePointer) {
|
|
747
747
|
return new Common.IRealtimeEngine(nativePointer);
|
|
748
748
|
}
|
|
@@ -787,11 +787,6 @@ function csp_multiplayer_SpaceEntityFactory(nativePointer) {
|
|
|
787
787
|
}
|
|
788
788
|
ProxyClassFactories["csp_multiplayer_SpaceEntity"] =
|
|
789
789
|
csp_multiplayer_SpaceEntityFactory;
|
|
790
|
-
function csp_multiplayer_SpaceEntitySystemFactory(nativePointer) {
|
|
791
|
-
return new Multiplayer.SpaceEntitySystem(nativePointer);
|
|
792
|
-
}
|
|
793
|
-
ProxyClassFactories["csp_multiplayer_SpaceEntitySystem"] =
|
|
794
|
-
csp_multiplayer_SpaceEntitySystemFactory;
|
|
795
790
|
function csp_multiplayer_SpaceTransformFactory(nativePointer) {
|
|
796
791
|
return new Multiplayer.SpaceTransform(nativePointer);
|
|
797
792
|
}
|
|
@@ -827,6 +822,21 @@ function csp_systems_CSPSceneDataFactory(nativePointer) {
|
|
|
827
822
|
}
|
|
828
823
|
ProxyClassFactories["csp_systems_CSPSceneData"] =
|
|
829
824
|
csp_systems_CSPSceneDataFactory;
|
|
825
|
+
function csp_systems_VersionMetadataFactory(nativePointer) {
|
|
826
|
+
return new Systems.VersionMetadata(nativePointer);
|
|
827
|
+
}
|
|
828
|
+
ProxyClassFactories["csp_systems_VersionMetadata"] =
|
|
829
|
+
csp_systems_VersionMetadataFactory;
|
|
830
|
+
function csp_systems_ServiceStatusFactory(nativePointer) {
|
|
831
|
+
return new Systems.ServiceStatus(nativePointer);
|
|
832
|
+
}
|
|
833
|
+
ProxyClassFactories["csp_systems_ServiceStatus"] =
|
|
834
|
+
csp_systems_ServiceStatusFactory;
|
|
835
|
+
function csp_systems_ServicesDeploymentStatusFactory(nativePointer) {
|
|
836
|
+
return new Systems.ServicesDeploymentStatus(nativePointer);
|
|
837
|
+
}
|
|
838
|
+
ProxyClassFactories["csp_systems_ServicesDeploymentStatus"] =
|
|
839
|
+
csp_systems_ServicesDeploymentStatusFactory;
|
|
830
840
|
function csp_systems_SystemBaseFactory(nativePointer) {
|
|
831
841
|
return new Systems.SystemBase(nativePointer);
|
|
832
842
|
}
|
|
@@ -975,6 +985,11 @@ function csp_systems_SequenceFactory(nativePointer) {
|
|
|
975
985
|
return new Systems.Sequence(nativePointer);
|
|
976
986
|
}
|
|
977
987
|
ProxyClassFactories["csp_systems_Sequence"] = csp_systems_SequenceFactory;
|
|
988
|
+
function csp_systems_ApplicationSettingsFactory(nativePointer) {
|
|
989
|
+
return new Systems.ApplicationSettings(nativePointer);
|
|
990
|
+
}
|
|
991
|
+
ProxyClassFactories["csp_systems_ApplicationSettings"] =
|
|
992
|
+
csp_systems_ApplicationSettingsFactory;
|
|
978
993
|
function csp_systems_SettingsCollectionFactory(nativePointer) {
|
|
979
994
|
return new Systems.SettingsCollection(nativePointer);
|
|
980
995
|
}
|
|
@@ -1084,6 +1099,11 @@ function csp_common_SequenceChangedNetworkEventDataFactory(nativePointer) {
|
|
|
1084
1099
|
}
|
|
1085
1100
|
ProxyClassFactories["csp_common_SequenceChangedNetworkEventData"] =
|
|
1086
1101
|
csp_common_SequenceChangedNetworkEventDataFactory;
|
|
1102
|
+
function csp_multiplayer_OnlineRealtimeEngineFactory(nativePointer) {
|
|
1103
|
+
return new Multiplayer.OnlineRealtimeEngine(nativePointer);
|
|
1104
|
+
}
|
|
1105
|
+
ProxyClassFactories["csp_multiplayer_OnlineRealtimeEngine"] =
|
|
1106
|
+
csp_multiplayer_OnlineRealtimeEngineFactory;
|
|
1087
1107
|
function csp_multiplayer_AnimatedModelSpaceComponentFactory(nativePointer) {
|
|
1088
1108
|
return new Multiplayer.AnimatedModelSpaceComponent(nativePointer);
|
|
1089
1109
|
}
|
|
@@ -1229,6 +1249,11 @@ function csp_multiplayer_AnnotationThumbnailCollectionResultFactory(nativePointe
|
|
|
1229
1249
|
}
|
|
1230
1250
|
ProxyClassFactories["csp_multiplayer_AnnotationThumbnailCollectionResult"] =
|
|
1231
1251
|
csp_multiplayer_AnnotationThumbnailCollectionResultFactory;
|
|
1252
|
+
function csp_systems_ServicesDeploymentStatusResultFactory(nativePointer) {
|
|
1253
|
+
return new Systems.ServicesDeploymentStatusResult(nativePointer);
|
|
1254
|
+
}
|
|
1255
|
+
ProxyClassFactories["csp_systems_ServicesDeploymentStatusResult"] =
|
|
1256
|
+
csp_systems_ServicesDeploymentStatusResultFactory;
|
|
1232
1257
|
function csp_systems_NullResultFactory(nativePointer) {
|
|
1233
1258
|
return new Systems.NullResult(nativePointer);
|
|
1234
1259
|
}
|
|
@@ -1474,6 +1499,16 @@ function csp_systems_SequenceSystemFactory(nativePointer) {
|
|
|
1474
1499
|
}
|
|
1475
1500
|
ProxyClassFactories["csp_systems_SequenceSystem"] =
|
|
1476
1501
|
csp_systems_SequenceSystemFactory;
|
|
1502
|
+
function csp_systems_ApplicationSettingsResultFactory(nativePointer) {
|
|
1503
|
+
return new Systems.ApplicationSettingsResult(nativePointer);
|
|
1504
|
+
}
|
|
1505
|
+
ProxyClassFactories["csp_systems_ApplicationSettingsResult"] =
|
|
1506
|
+
csp_systems_ApplicationSettingsResultFactory;
|
|
1507
|
+
function csp_systems_ApplicationSettingsSystemFactory(nativePointer) {
|
|
1508
|
+
return new Systems.ApplicationSettingsSystem(nativePointer);
|
|
1509
|
+
}
|
|
1510
|
+
ProxyClassFactories["csp_systems_ApplicationSettingsSystem"] =
|
|
1511
|
+
csp_systems_ApplicationSettingsSystemFactory;
|
|
1477
1512
|
function csp_systems_SettingsCollectionResultFactory(nativePointer) {
|
|
1478
1513
|
return new Systems.SettingsCollectionResult(nativePointer);
|
|
1479
1514
|
}
|
|
@@ -1671,6 +1706,16 @@ function csp_common_Array_csp_systems_SequenceFactory(nativePointer) {
|
|
|
1671
1706
|
}
|
|
1672
1707
|
ProxyClassFactories["csp_common_Array_csp_systems_Sequence"] =
|
|
1673
1708
|
csp_common_Array_csp_systems_SequenceFactory;
|
|
1709
|
+
function csp_common_Array_csp_systems_VersionMetadataFactory(nativePointer) {
|
|
1710
|
+
return new Common.Array(nativePointer, csp_systems_VersionMetadataFactory, "csp_systems_VersionMetadata");
|
|
1711
|
+
}
|
|
1712
|
+
ProxyClassFactories["csp_common_Array_csp_systems_VersionMetadata"] =
|
|
1713
|
+
csp_common_Array_csp_systems_VersionMetadataFactory;
|
|
1714
|
+
function csp_common_Array_csp_systems_ServiceStatusFactory(nativePointer) {
|
|
1715
|
+
return new Common.Array(nativePointer, csp_systems_ServiceStatusFactory, "csp_systems_ServiceStatus");
|
|
1716
|
+
}
|
|
1717
|
+
ProxyClassFactories["csp_common_Array_csp_systems_ServiceStatus"] =
|
|
1718
|
+
csp_common_Array_csp_systems_ServiceStatusFactory;
|
|
1674
1719
|
function csp_common_Array_StringFactory(nativePointer) {
|
|
1675
1720
|
return new Common.Array(nativePointer, StringFactory, "String");
|
|
1676
1721
|
}
|
|
@@ -2130,8 +2175,8 @@ export var Systems;
|
|
|
2130
2175
|
*/
|
|
2131
2176
|
let RealtimeEngineType;
|
|
2132
2177
|
(function (RealtimeEngineType) {
|
|
2133
|
-
RealtimeEngineType[RealtimeEngineType["
|
|
2134
|
-
RealtimeEngineType[RealtimeEngineType["
|
|
2178
|
+
RealtimeEngineType[RealtimeEngineType["Online"] = 0] = "Online";
|
|
2179
|
+
RealtimeEngineType[RealtimeEngineType["Offline"] = 1] = "Offline";
|
|
2135
2180
|
})(RealtimeEngineType = Common.RealtimeEngineType || (Common.RealtimeEngineType = {}));
|
|
2136
2181
|
})(Common || (Common = {}));
|
|
2137
2182
|
(function (Common) {
|
|
@@ -2221,6 +2266,10 @@ export var Systems;
|
|
|
2221
2266
|
MultiplayerHubMethod[MultiplayerHubMethod["SET_SCOPES"] = 11] = "SET_SCOPES";
|
|
2222
2267
|
MultiplayerHubMethod[MultiplayerHubMethod["START_LISTENING"] = 12] = "START_LISTENING";
|
|
2223
2268
|
MultiplayerHubMethod[MultiplayerHubMethod["STOP_LISTENING"] = 13] = "STOP_LISTENING";
|
|
2269
|
+
MultiplayerHubMethod[MultiplayerHubMethod["ON_OBJECT_MESSAGE"] = 14] = "ON_OBJECT_MESSAGE";
|
|
2270
|
+
MultiplayerHubMethod[MultiplayerHubMethod["ON_OBJECT_PATCH"] = 15] = "ON_OBJECT_PATCH";
|
|
2271
|
+
MultiplayerHubMethod[MultiplayerHubMethod["ON_REQUEST_TO_SEND_OBJECT"] = 16] = "ON_REQUEST_TO_SEND_OBJECT";
|
|
2272
|
+
MultiplayerHubMethod[MultiplayerHubMethod["ON_REQUEST_TO_DISCONNECT"] = 17] = "ON_REQUEST_TO_DISCONNECT";
|
|
2224
2273
|
})(MultiplayerHubMethod = Multiplayer.MultiplayerHubMethod || (Multiplayer.MultiplayerHubMethod = {}));
|
|
2225
2274
|
})(Multiplayer || (Multiplayer = {}));
|
|
2226
2275
|
(function (Multiplayer) {
|
|
@@ -3187,7 +3236,7 @@ export var Systems;
|
|
|
3187
3236
|
})(EThirdPartyAuthenticationProviders = Systems.EThirdPartyAuthenticationProviders || (Systems.EThirdPartyAuthenticationProviders = {}));
|
|
3188
3237
|
})(Systems || (Systems = {}));
|
|
3189
3238
|
/**
|
|
3190
|
-
* @description Represents definition for identifying and versioning an external service endpoint
|
|
3239
|
+
* @description Represents definition for identifying and versioning an external service endpoint.
|
|
3191
3240
|
*/
|
|
3192
3241
|
export class ServiceDefinition extends NativeClassWrapper {
|
|
3193
3242
|
/** @internal */
|
|
@@ -10013,56 +10062,56 @@ export class CSPFoundation {
|
|
|
10013
10062
|
Common.Vector4 = Vector4;
|
|
10014
10063
|
})(Common || (Common = {}));
|
|
10015
10064
|
(function (Common) {
|
|
10016
|
-
class
|
|
10065
|
+
class IJSScriptRunner extends NativeClassWrapper {
|
|
10017
10066
|
/** @internal */
|
|
10018
10067
|
constructor(pointer) {
|
|
10019
10068
|
super(pointer);
|
|
10020
10069
|
}
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
var _nPtr = getNativePointer(_ptr);
|
|
10025
|
-
return new InvalidInterfaceUseError(_nPtr);
|
|
10026
|
-
}
|
|
10070
|
+
/**
|
|
10071
|
+
* @description Virtual destructor.
|
|
10072
|
+
*/
|
|
10027
10073
|
delete() {
|
|
10028
10074
|
if (this.ownsPointer && !this.disposed) {
|
|
10029
|
-
Module.ccall("
|
|
10075
|
+
Module.ccall("csp_common_IJSScriptRunner_Dtor", "void", ["number"], [this.pointer]);
|
|
10030
10076
|
this.disposed = true;
|
|
10031
10077
|
}
|
|
10032
10078
|
}
|
|
10033
|
-
|
|
10034
|
-
|
|
10079
|
+
runScript(contextId, scriptText) {
|
|
10080
|
+
assert(contextId >= Limits.INT64_MIN);
|
|
10081
|
+
assert(contextId <= Limits.INT64_MAX);
|
|
10082
|
+
let _result = Module.ccall("csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC", "boolean", ["number", "bigint", "string"], [this.pointer, contextId, scriptText]);
|
|
10035
10083
|
return _result;
|
|
10036
10084
|
}
|
|
10037
|
-
set msg(value) {
|
|
10038
|
-
Module.ccall("csp_common_InvalidInterfaceUseError__Set_msg", "void", ["number", "string"], [this.pointer, value]);
|
|
10039
|
-
}
|
|
10040
10085
|
}
|
|
10041
|
-
Common.
|
|
10086
|
+
Common.IJSScriptRunner = IJSScriptRunner;
|
|
10042
10087
|
})(Common || (Common = {}));
|
|
10043
10088
|
(function (Common) {
|
|
10044
|
-
class
|
|
10089
|
+
class InvalidInterfaceUseError extends NativeClassWrapper {
|
|
10045
10090
|
/** @internal */
|
|
10046
10091
|
constructor(pointer) {
|
|
10047
10092
|
super(pointer);
|
|
10048
10093
|
}
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10094
|
+
static create_msg(msg) {
|
|
10095
|
+
var _ptr = Module._malloc(8);
|
|
10096
|
+
Module.ccall("csp_common_InvalidInterfaceUseError_Ctor_StringRC", "void", ["number", "string"], [_ptr, msg]);
|
|
10097
|
+
var _nPtr = getNativePointer(_ptr);
|
|
10098
|
+
return new InvalidInterfaceUseError(_nPtr);
|
|
10099
|
+
}
|
|
10052
10100
|
delete() {
|
|
10053
10101
|
if (this.ownsPointer && !this.disposed) {
|
|
10054
|
-
Module.ccall("
|
|
10102
|
+
Module.ccall("csp_common_InvalidInterfaceUseError_Dtor", "void", ["number"], [this.pointer]);
|
|
10055
10103
|
this.disposed = true;
|
|
10056
10104
|
}
|
|
10057
10105
|
}
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
assert(contextId <= Limits.INT64_MAX);
|
|
10061
|
-
let _result = Module.ccall("csp_common_IJSScriptRunner_RunScript_bool_int64_t_StringRC", "boolean", ["number", "bigint", "string"], [this.pointer, contextId, scriptText]);
|
|
10106
|
+
get msg() {
|
|
10107
|
+
let _result = Module.ccall("csp_common_InvalidInterfaceUseError__Get_msg", "string", ["number"], [this.pointer]);
|
|
10062
10108
|
return _result;
|
|
10063
10109
|
}
|
|
10110
|
+
set msg(value) {
|
|
10111
|
+
Module.ccall("csp_common_InvalidInterfaceUseError__Set_msg", "void", ["number", "string"], [this.pointer, value]);
|
|
10112
|
+
}
|
|
10064
10113
|
}
|
|
10065
|
-
Common.
|
|
10114
|
+
Common.InvalidInterfaceUseError = InvalidInterfaceUseError;
|
|
10066
10115
|
})(Common || (Common = {}));
|
|
10067
10116
|
(function (Common) {
|
|
10068
10117
|
class IRealtimeEngine extends NativeClassWrapper {
|
|
@@ -10089,14 +10138,17 @@ export class CSPFoundation {
|
|
|
10089
10138
|
/**
|
|
10090
10139
|
* @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
|
|
10091
10140
|
* @param name - The entity name of the newly created avatar entity.
|
|
10141
|
+
* @param userId - Id of the user creating this avatar. If your backend data store requires authentication, this will
|
|
10142
|
+
* probably be your username or some similar unique identifier.
|
|
10092
10143
|
* @param spaceTransform - The initial transform to set the SpaceEntity to.
|
|
10093
|
-
* @param
|
|
10144
|
+
* @param isVisible - Whether the avatar defaults to being visible.
|
|
10145
|
+
* @param avatarState - The initial Avatar State to set.
|
|
10094
10146
|
* @param avatarId - The ID to be set on the AvatarSpaceComponent
|
|
10095
10147
|
* @param avatarPlayMode - The Initial AvatarPlayMode to set.
|
|
10096
10148
|
* @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
|
|
10097
10149
|
* which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
|
|
10098
10150
|
*/
|
|
10099
|
-
async createAvatar(name, spaceTransform,
|
|
10151
|
+
async createAvatar(name, userId, spaceTransform, isVisible, avatarState, avatarId, avatarPlayMode) {
|
|
10100
10152
|
var _resolve;
|
|
10101
10153
|
var _promise = new Promise((_r) => {
|
|
10102
10154
|
_resolve = _r;
|
|
@@ -10109,10 +10161,12 @@ export class CSPFoundation {
|
|
|
10109
10161
|
Module.removeFunction(_callbackPtr);
|
|
10110
10162
|
};
|
|
10111
10163
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
10112
|
-
Module.ccall("
|
|
10164
|
+
Module.ccall("csp_common_IRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback", "void", [
|
|
10113
10165
|
"number",
|
|
10114
10166
|
"string",
|
|
10167
|
+
"string",
|
|
10115
10168
|
"number",
|
|
10169
|
+
"boolean",
|
|
10116
10170
|
"number",
|
|
10117
10171
|
"string",
|
|
10118
10172
|
"number",
|
|
@@ -10121,8 +10175,10 @@ export class CSPFoundation {
|
|
|
10121
10175
|
], [
|
|
10122
10176
|
this.pointer,
|
|
10123
10177
|
name,
|
|
10178
|
+
userId,
|
|
10124
10179
|
spaceTransform.pointer,
|
|
10125
|
-
|
|
10180
|
+
isVisible,
|
|
10181
|
+
avatarState,
|
|
10126
10182
|
avatarId,
|
|
10127
10183
|
avatarPlayMode,
|
|
10128
10184
|
_callbackPtr,
|
|
@@ -10134,10 +10190,12 @@ export class CSPFoundation {
|
|
|
10134
10190
|
* @description Create and add a SpaceEntity, with relevant default values.
|
|
10135
10191
|
* @param name - The name of the newly created SpaceEntity.
|
|
10136
10192
|
* @param spaceTransform - The initial transform to set the SpaceEntity to.
|
|
10193
|
+
* @param parentID - ID of another entity in the space that this entity should be created as a child to. If
|
|
10194
|
+
* empty, entity is created as a root entity.
|
|
10137
10195
|
* @param callback - A callback that executes when the creation is complete,
|
|
10138
10196
|
* which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
|
|
10139
10197
|
*/
|
|
10140
|
-
async createEntity(name, spaceTransform) {
|
|
10198
|
+
async createEntity(name, spaceTransform, parentID) {
|
|
10141
10199
|
var _resolve;
|
|
10142
10200
|
var _promise = new Promise((_r) => {
|
|
10143
10201
|
_resolve = _r;
|
|
@@ -10150,9 +10208,27 @@ export class CSPFoundation {
|
|
|
10150
10208
|
Module.removeFunction(_callbackPtr);
|
|
10151
10209
|
};
|
|
10152
10210
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
10153
|
-
|
|
10211
|
+
var parentIDPointer = 0;
|
|
10212
|
+
if (parentID != null) {
|
|
10213
|
+
parentIDPointer = Module._malloc(4);
|
|
10214
|
+
Module.setValue(parentIDPointer, parentID, "i32");
|
|
10215
|
+
}
|
|
10216
|
+
Module.ccall("csp_common_IRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback", "void", ["number", "string", "number", "bigint", "number", "number"], [
|
|
10217
|
+
this.pointer,
|
|
10218
|
+
name,
|
|
10219
|
+
spaceTransform.pointer,
|
|
10220
|
+
parentIDPointer,
|
|
10221
|
+
_callbackPtr,
|
|
10222
|
+
0,
|
|
10223
|
+
]);
|
|
10224
|
+
if (parentIDPointer) {
|
|
10225
|
+
Module._free(parentIDPointer);
|
|
10226
|
+
}
|
|
10154
10227
|
return _promise;
|
|
10155
10228
|
}
|
|
10229
|
+
addEntity(entityToAdd) {
|
|
10230
|
+
Module.ccall("csp_common_IRealtimeEngine_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
|
|
10231
|
+
}
|
|
10156
10232
|
/**
|
|
10157
10233
|
* @description Destroy the specified entity.
|
|
10158
10234
|
* @param entity - A non-owning pointer to the entity to be destroyed.
|
|
@@ -10175,6 +10251,8 @@ export class CSPFoundation {
|
|
|
10175
10251
|
/**
|
|
10176
10252
|
* @description Sets a callback to be executed when an entity is fully created.
|
|
10177
10253
|
* /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
|
|
10254
|
+
* 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
|
|
10255
|
+
* override or remove this callback.
|
|
10178
10256
|
* /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
|
|
10179
10257
|
*/
|
|
10180
10258
|
setEntityCreatedCallback(callback) {
|
|
@@ -10325,15 +10403,24 @@ export class CSPFoundation {
|
|
|
10325
10403
|
return _nPtr;
|
|
10326
10404
|
}
|
|
10327
10405
|
/**
|
|
10328
|
-
* @description
|
|
10329
|
-
*
|
|
10406
|
+
* @description Set Callback that notifies when the OnlineRealtimeEngine is in a valid state
|
|
10407
|
+
* after entering a space, and entity mutation can begin. Users should not mutate entities before receiving this callback.
|
|
10408
|
+
* This callback should be emitted in response to FetchAllEntitiesAndPopulateBuffers completing, either syncronously or asyncronously.
|
|
10409
|
+
* This callback must be set prior to entering a space.
|
|
10410
|
+
* @param fetchCompleteCallback - Callback that notifies when the RealtimeEngine has completed initial
|
|
10411
|
+
* entity fetch
|
|
10330
10412
|
*/
|
|
10331
|
-
|
|
10413
|
+
setEntityFetchCompleteCallback(callback) {
|
|
10332
10414
|
var _callback = (_stateObject__, arg1) => {
|
|
10415
|
+
{
|
|
10416
|
+
const _unfixedValue = arg1;
|
|
10417
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
10418
|
+
arg1 = _fixedValue;
|
|
10419
|
+
}
|
|
10333
10420
|
callback(arg1);
|
|
10334
10421
|
};
|
|
10335
10422
|
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
10336
|
-
Module.ccall("
|
|
10423
|
+
Module.ccall("csp_common_IRealtimeEngine_SetEntityFetchCompleteCallback_void_EntityFetchCompleteCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
10337
10424
|
}
|
|
10338
10425
|
/**
|
|
10339
10426
|
* @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
|
|
@@ -10620,13 +10707,13 @@ export class CSPFoundation {
|
|
|
10620
10707
|
/**
|
|
10621
10708
|
* @description Constructor for CSPSceneDescription by deserializing a SceneDescription json file.
|
|
10622
10709
|
* @param sceneDescriptionJson - The SceneDescription to deserialize.
|
|
10623
|
-
* @param entitySystem - The
|
|
10624
|
-
* @param logSystem - The
|
|
10710
|
+
* @param entitySystem - The OnlineRealtimeEngine for this session.
|
|
10711
|
+
* @param logSystem - The OnlineRealtimeEngine for this session.
|
|
10625
10712
|
* @param remoteScriptRunner - The ScriptRunner for this session.
|
|
10626
10713
|
*/
|
|
10627
10714
|
static create_sceneDescriptionJson_entitySystem_logSystem_remoteScriptRunner(sceneDescriptionJson, entitySystem, logSystem, remoteScriptRunner) {
|
|
10628
10715
|
var _ptr = Module._malloc(8);
|
|
10629
|
-
Module.ccall("
|
|
10716
|
+
Module.ccall("csp_multiplayer_CSPSceneDescription_Ctor_StringRC_OnlineRealtimeEngineR_LogSystemR_IJSScriptRunnerR", "void", ["number", "string", "number", "number", "number"], [
|
|
10630
10717
|
_ptr,
|
|
10631
10718
|
sceneDescriptionJson,
|
|
10632
10719
|
entitySystem.pointer,
|
|
@@ -10761,6 +10848,18 @@ export class CSPFoundation {
|
|
|
10761
10848
|
let _result = Module.ccall("csp_multiplayer_MultiplayerConnection_GetAllowSelfMessagingFlagC_bool", "boolean", ["number"], [this.pointer]);
|
|
10762
10849
|
return _result;
|
|
10763
10850
|
}
|
|
10851
|
+
/**
|
|
10852
|
+
* @description Get the currently set realtime engine.
|
|
10853
|
+
* @return Non-owning pointer to currently set realtime engine. This should be non-null when in a space, and null before entering, or after
|
|
10854
|
+
* exiting a space.
|
|
10855
|
+
*/
|
|
10856
|
+
getOnlineRealtimeEngine() {
|
|
10857
|
+
var _ret = Module._malloc(8);
|
|
10858
|
+
Module.ccall("csp_multiplayer_MultiplayerConnection_GetOnlineRealtimeEngineC_OnlineRealtimeEngineP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
10859
|
+
var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
|
|
10860
|
+
Module._free(_ret);
|
|
10861
|
+
return _nPtr;
|
|
10862
|
+
}
|
|
10764
10863
|
delete() {
|
|
10765
10864
|
if (this.ownsPointer && !this.disposed) {
|
|
10766
10865
|
Module.ccall("csp_multiplayer_MultiplayerConnection_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -10884,38 +10983,31 @@ export class CSPFoundation {
|
|
|
10884
10983
|
}
|
|
10885
10984
|
/**
|
|
10886
10985
|
* @description Register interest in a network event, such that the NetworkEventBus will call the provided callback when it arrives
|
|
10887
|
-
* @param registration - Registration information, containing a ReceiverID and an EventName.
|
|
10888
|
-
*
|
|
10889
|
-
* @
|
|
10890
|
-
* null.
|
|
10986
|
+
* @param registration - Registration information, containing a ReceiverID and an EventName. Will fail to register if
|
|
10987
|
+
* identical callback registration already registered.
|
|
10988
|
+
* @param callback - Callback to invoke when specified event is received. Will fail to register if null.
|
|
10891
10989
|
*/
|
|
10892
10990
|
listenNetworkEvent(registration, callback) {
|
|
10893
10991
|
var _callback = (_stateObject__, networkEventData) => {
|
|
10894
10992
|
var _networkEventData = new Common.NetworkEventData(getNativePointer(networkEventData));
|
|
10895
10993
|
callback(_networkEventData);
|
|
10896
10994
|
};
|
|
10897
|
-
var callbackPtr = Module.addFunction(_callback, "
|
|
10898
|
-
|
|
10899
|
-
return _result;
|
|
10995
|
+
var callbackPtr = Module.addFunction(_callback, "vii");
|
|
10996
|
+
Module.ccall("csp_multiplayer_NetworkEventBus_ListenNetworkEvent_void_NetworkEventRegistration_NetworkEventCallback", "void", ["number", "number", "number"], [this.pointer, registration.pointer, callbackPtr]);
|
|
10900
10997
|
}
|
|
10901
10998
|
/**
|
|
10902
10999
|
* @description Deregister interest in a network event
|
|
10903
11000
|
* @param registration - Registration information of already registered event, containing a ReceiverID and an EventName.
|
|
10904
|
-
* @return True if the deregistration was successful, false otherwise, such as in the case where Registration was not found
|
|
10905
11001
|
*/
|
|
10906
11002
|
stopListenNetworkEvent(registration) {
|
|
10907
|
-
|
|
10908
|
-
return _result;
|
|
11003
|
+
Module.ccall("csp_multiplayer_NetworkEventBus_StopListenNetworkEvent_void_NetworkEventRegistration", "void", ["number", "number"], [this.pointer, registration.pointer]);
|
|
10909
11004
|
}
|
|
10910
11005
|
/**
|
|
10911
11006
|
* @description Deregister interest in all network events registered to a particular EventReceiverId
|
|
10912
11007
|
* @param eventReceiverId - EventReceiverId to deregister.
|
|
10913
|
-
* @return True if the deregistration was successful, false otherwise, such as if no events were found to deregister under the provided
|
|
10914
|
-
* EventReceiverId.
|
|
10915
11008
|
*/
|
|
10916
11009
|
stopListenAllNetworkEvents(eventReceiverId) {
|
|
10917
|
-
|
|
10918
|
-
return _result;
|
|
11010
|
+
Module.ccall("csp_multiplayer_NetworkEventBus_StopListenAllNetworkEvents_void_StringRC", "void", ["number", "string"], [this.pointer, eventReceiverId]);
|
|
10919
11011
|
}
|
|
10920
11012
|
/**
|
|
10921
11013
|
* @description Get an array of all interests currently registered to the NetworkEventBus
|
|
@@ -11009,7 +11101,7 @@ export class CSPFoundation {
|
|
|
11009
11101
|
*/
|
|
11010
11102
|
static create_entitySystem_scriptRunner_logSystem(entitySystem, scriptRunner, logSystem) {
|
|
11011
11103
|
var _ptr = Module._malloc(8);
|
|
11012
|
-
Module.ccall("
|
|
11104
|
+
Module.ccall("csp_multiplayer_SpaceEntity_Ctor_OnlineRealtimeEngineP_IJSScriptRunnerR_LogSystemP", "void", ["number", "number", "number", "number"], [_ptr, entitySystem.pointer, scriptRunner.pointer, logSystem.pointer]);
|
|
11013
11105
|
var _nPtr = getNativePointer(_ptr);
|
|
11014
11106
|
return new SpaceEntity(_nPtr);
|
|
11015
11107
|
}
|
|
@@ -11221,17 +11313,6 @@ export class CSPFoundation {
|
|
|
11221
11313
|
let _result = Module.ccall("csp_multiplayer_SpaceEntity_GetEntityTypeC_SpaceEntityType", "number", ["number"], [this.pointer]);
|
|
11222
11314
|
return _result;
|
|
11223
11315
|
}
|
|
11224
|
-
/**
|
|
11225
|
-
* @description Get SpaceEntitySystem Object
|
|
11226
|
-
* @return SpaceEntitySystem
|
|
11227
|
-
*/
|
|
11228
|
-
getSpaceEntitySystem() {
|
|
11229
|
-
var _ret = Module._malloc(8);
|
|
11230
|
-
Module.ccall("csp_multiplayer_SpaceEntity_GetSpaceEntitySystem_SpaceEntitySystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
11231
|
-
var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
|
|
11232
|
-
Module._free(_ret);
|
|
11233
|
-
return _nPtr;
|
|
11234
|
-
}
|
|
11235
11316
|
/**
|
|
11236
11317
|
* @description Sets the parent for this entity
|
|
11237
11318
|
* QueueUpdate() should be called afterwards to enable changes to the parent.
|
|
@@ -11501,630 +11582,185 @@ export class CSPFoundation {
|
|
|
11501
11582
|
})(Multiplayer || (Multiplayer = {}));
|
|
11502
11583
|
(function (Multiplayer) {
|
|
11503
11584
|
/**
|
|
11504
|
-
* @description
|
|
11505
|
-
* /// This provides functions to create and manage multiple player avatars and other objects.
|
|
11506
|
-
* It manages things like queueing updated entities and triggering tick events. Callbacks
|
|
11507
|
-
* can be registered for certain events that occur within the entity system so clients can
|
|
11508
|
-
* react appropriately.
|
|
11585
|
+
* @description Simple class for holding the position, rotation and scale of a transform.
|
|
11509
11586
|
*/
|
|
11510
|
-
class
|
|
11587
|
+
class SpaceTransform extends NativeClassWrapper {
|
|
11511
11588
|
/** @internal */
|
|
11512
11589
|
constructor(pointer) {
|
|
11513
11590
|
super(pointer);
|
|
11514
11591
|
}
|
|
11515
11592
|
/**
|
|
11516
|
-
* @description
|
|
11517
|
-
* @param inName - The name to give the new SpaceEntity.
|
|
11518
|
-
* @param inSpaceTransform - The initial transform to set the SpaceEntity to.
|
|
11519
|
-
* @param isVisible - The initial visibility of the Avatar.
|
|
11520
|
-
* @param inState - The initial Avatar State to set.
|
|
11521
|
-
* @param inAvatarId - The Initial AvatarID to set.
|
|
11522
|
-
* @param inAvatarPlayMode - The Initial AvatarPlayMode to set.
|
|
11523
|
-
* @param callback - EntityCreatedCallback A callback that executes when the creation is complete,
|
|
11524
|
-
* which contains a pointer to the new SpaceEntity so that it can be used on the local client.
|
|
11593
|
+
* @description Default constuctor for the SpaceTransform
|
|
11525
11594
|
*/
|
|
11526
|
-
|
|
11527
|
-
var
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
var _callbackPtr;
|
|
11532
|
-
var _callback = (_stateObject__, arg1) => {
|
|
11533
|
-
var _arg1Ptr = getNativePointer(arg1);
|
|
11534
|
-
var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
|
|
11535
|
-
_resolve(_arg1Instance);
|
|
11536
|
-
Module.removeFunction(_callbackPtr);
|
|
11537
|
-
};
|
|
11538
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11539
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_CreateAvatar_void_StringRC_LoginStateRC_SpaceTransformRC_bool_AvatarState_StringRC_AvatarPlayMode_EntityCreatedCallback", "void", [
|
|
11540
|
-
"number",
|
|
11541
|
-
"string",
|
|
11542
|
-
"number",
|
|
11543
|
-
"number",
|
|
11544
|
-
"boolean",
|
|
11545
|
-
"number",
|
|
11546
|
-
"string",
|
|
11547
|
-
"number",
|
|
11548
|
-
"number",
|
|
11549
|
-
"number",
|
|
11550
|
-
], [
|
|
11551
|
-
this.pointer,
|
|
11552
|
-
name,
|
|
11553
|
-
loginState.pointer,
|
|
11554
|
-
spaceTransform.pointer,
|
|
11555
|
-
isVisible,
|
|
11556
|
-
state,
|
|
11557
|
-
avatarId,
|
|
11558
|
-
avatarPlayMode,
|
|
11559
|
-
_callbackPtr,
|
|
11560
|
-
0,
|
|
11561
|
-
]);
|
|
11562
|
-
return _promise;
|
|
11595
|
+
static create() {
|
|
11596
|
+
var _ptr = Module._malloc(8);
|
|
11597
|
+
Module.ccall("csp_multiplayer_SpaceTransform_Ctor", "void", ["number"], [_ptr]);
|
|
11598
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11599
|
+
return new SpaceTransform(_nPtr);
|
|
11563
11600
|
}
|
|
11564
11601
|
/**
|
|
11565
|
-
* @description
|
|
11566
|
-
* @param
|
|
11567
|
-
* @param
|
|
11568
|
-
* @param
|
|
11569
|
-
* which contains a pointer to the new SpaceEntity so that it can be used on the local client.
|
|
11602
|
+
* @description Custom constructor for the SpaceTransform.
|
|
11603
|
+
* @param position - The position value for the transform.
|
|
11604
|
+
* @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
|
|
11605
|
+
* @param scale - The scale value for the transform.
|
|
11570
11606
|
*/
|
|
11571
|
-
|
|
11572
|
-
var
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
var _callbackPtr;
|
|
11577
|
-
var _callback = (_stateObject__, arg1) => {
|
|
11578
|
-
var _arg1Ptr = getNativePointer(arg1);
|
|
11579
|
-
var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
|
|
11580
|
-
_resolve(_arg1Instance);
|
|
11581
|
-
Module.removeFunction(_callbackPtr);
|
|
11582
|
-
};
|
|
11583
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11584
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_CreateObject_void_StringRC_SpaceTransformRC_EntityCreatedCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, name, spaceTransform.pointer, _callbackPtr, 0]);
|
|
11585
|
-
return _promise;
|
|
11607
|
+
static create_position_rotation_scale(position, rotation, scale) {
|
|
11608
|
+
var _ptr = Module._malloc(8);
|
|
11609
|
+
Module.ccall("csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC", "void", ["number", "number", "number", "number"], [_ptr, position.pointer, rotation.pointer, scale.pointer]);
|
|
11610
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11611
|
+
return new SpaceTransform(_nPtr);
|
|
11586
11612
|
}
|
|
11587
11613
|
/**
|
|
11588
|
-
* @description
|
|
11589
|
-
* @param
|
|
11590
|
-
* @param callback - The callback to execute.
|
|
11614
|
+
* @description Equality operator
|
|
11615
|
+
* @param spaceTransform - Transform
|
|
11591
11616
|
*/
|
|
11592
|
-
|
|
11593
|
-
var _resolve;
|
|
11594
|
-
var _promise = new Promise((_r) => {
|
|
11595
|
-
_resolve = _r;
|
|
11596
|
-
});
|
|
11597
|
-
var _callbackPtr;
|
|
11598
|
-
var _callback = (_stateObject__, arg1) => {
|
|
11599
|
-
_resolve(!!arg1);
|
|
11600
|
-
Module.removeFunction(_callbackPtr);
|
|
11601
|
-
};
|
|
11602
|
-
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
11603
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_DestroyEntity_void_SpaceEntityP_CallbackHandler", "void", ["number", "number", "number", "number"], [this.pointer, entity.pointer, _callbackPtr, 0]);
|
|
11604
|
-
return _promise;
|
|
11605
|
-
}
|
|
11617
|
+
// operator==
|
|
11606
11618
|
/**
|
|
11607
|
-
* @description
|
|
11608
|
-
* @param
|
|
11619
|
+
* @description Inequality operator
|
|
11620
|
+
* @param spaceTransform - Transform
|
|
11609
11621
|
*/
|
|
11610
|
-
|
|
11611
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_LocalDestroyEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
|
|
11612
|
-
}
|
|
11622
|
+
// operator!=
|
|
11613
11623
|
/**
|
|
11614
|
-
* @description
|
|
11615
|
-
* @param
|
|
11616
|
-
*
|
|
11624
|
+
* @description Multiplication operator
|
|
11625
|
+
* @param spaceTransform - Transform
|
|
11626
|
+
* NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
|
|
11617
11627
|
*/
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
|
|
11623
|
-
|
|
11628
|
+
// operator*
|
|
11629
|
+
delete() {
|
|
11630
|
+
if (this.ownsPointer && !this.disposed) {
|
|
11631
|
+
Module.ccall("csp_multiplayer_SpaceTransform_Dtor", "void", ["number"], [this.pointer]);
|
|
11632
|
+
this.disposed = true;
|
|
11633
|
+
}
|
|
11624
11634
|
}
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
|
|
11628
|
-
|
|
11629
|
-
|
|
11630
|
-
findSpaceEntityById(entityId) {
|
|
11631
|
-
assert(entityId >= Limits.UINT64_MIN);
|
|
11632
|
-
assert(entityId <= Limits.UINT64_MAX);
|
|
11633
|
-
var _ret = Module._malloc(8);
|
|
11634
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceEntityById_SpaceEntityP_uint64_t", "void", ["number", "number", "bigint"], [_ret, this.pointer, entityId]);
|
|
11635
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11636
|
-
Module._free(_ret);
|
|
11637
|
-
return _nPtr;
|
|
11635
|
+
get position() {
|
|
11636
|
+
const _ptr = Module._malloc(8);
|
|
11637
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Get_Position", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
11638
|
+
const _nPtr = getNativePointer(_ptr);
|
|
11639
|
+
return new Common.Vector3(_nPtr);
|
|
11638
11640
|
}
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
* @param inName - The name to search.
|
|
11642
|
-
* @return A pointer to the first found match SpaceEntity.
|
|
11643
|
-
*/
|
|
11644
|
-
findSpaceAvatar(name) {
|
|
11645
|
-
var _ret = Module._malloc(8);
|
|
11646
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceAvatar_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
|
|
11647
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11648
|
-
Module._free(_ret);
|
|
11649
|
-
return _nPtr;
|
|
11641
|
+
set position(value) {
|
|
11642
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Set_Position", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
11650
11643
|
}
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
findSpaceObject(name) {
|
|
11657
|
-
var _ret = Module._malloc(8);
|
|
11658
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_FindSpaceObject_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
|
|
11659
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11660
|
-
Module._free(_ret);
|
|
11661
|
-
return _nPtr;
|
|
11644
|
+
get rotation() {
|
|
11645
|
+
const _ptr = Module._malloc(8);
|
|
11646
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Get_Rotation", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
11647
|
+
const _nPtr = getNativePointer(_ptr);
|
|
11648
|
+
return new Common.Vector4(_nPtr);
|
|
11662
11649
|
}
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
*/
|
|
11666
|
-
lockEntityUpdate() {
|
|
11667
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_LockEntityUpdateC_void", "void", ["number"], [this.pointer]);
|
|
11650
|
+
set rotation(value) {
|
|
11651
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Set_Rotation", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
11668
11652
|
}
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
}
|
|
11675
|
-
/**
|
|
11676
|
-
* @description Get the number of total entities in the system (both Avatars and Objects).
|
|
11677
|
-
* @return The total number of entities.
|
|
11678
|
-
*/
|
|
11679
|
-
getNumEntities() {
|
|
11680
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumEntitiesC_size_t", "number", ["number"], [this.pointer]);
|
|
11681
|
-
const _unfixedValue = _result;
|
|
11682
|
-
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
11683
|
-
_result = _fixedValue;
|
|
11684
|
-
return _result;
|
|
11685
|
-
}
|
|
11686
|
-
/**
|
|
11687
|
-
* @description Get the number of total Avatars in the system.
|
|
11688
|
-
* @return The total number of Avatar entities.
|
|
11689
|
-
*/
|
|
11690
|
-
getNumAvatars() {
|
|
11691
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumAvatarsC_size_t", "number", ["number"], [this.pointer]);
|
|
11692
|
-
const _unfixedValue = _result;
|
|
11693
|
-
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
11694
|
-
_result = _fixedValue;
|
|
11695
|
-
return _result;
|
|
11696
|
-
}
|
|
11697
|
-
/**
|
|
11698
|
-
* @description Get the number of total Objects in the system.
|
|
11699
|
-
* @return The total number of object entities.
|
|
11700
|
-
*/
|
|
11701
|
-
getNumObjects() {
|
|
11702
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetNumObjectsC_size_t", "number", ["number"], [this.pointer]);
|
|
11703
|
-
const _unfixedValue = _result;
|
|
11704
|
-
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
11705
|
-
_result = _fixedValue;
|
|
11706
|
-
return _result;
|
|
11707
|
-
}
|
|
11708
|
-
/**
|
|
11709
|
-
* @description Get an Entity (Avatar or Object) by its index.
|
|
11710
|
-
* /// Note this is not currently thread safe and should only be called from the main thread.
|
|
11711
|
-
* /// @param EntityIndex size_t : The index of the entity to get.
|
|
11712
|
-
* @return A pointer to the entity with the given index.
|
|
11713
|
-
*/
|
|
11714
|
-
getEntityByIndex(entityIndex) {
|
|
11715
|
-
assert(Number.isInteger(entityIndex));
|
|
11716
|
-
assert(entityIndex >= Limits.UINT32_MIN);
|
|
11717
|
-
assert(entityIndex <= Limits.UINT32_MAX);
|
|
11718
|
-
var _ret = Module._malloc(8);
|
|
11719
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_GetEntityByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, entityIndex]);
|
|
11720
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11721
|
-
Module._free(_ret);
|
|
11722
|
-
return _nPtr;
|
|
11723
|
-
}
|
|
11724
|
-
/**
|
|
11725
|
-
* @description Get an Avatar by its index.
|
|
11726
|
-
* /// Note this is not currently thread safe and should only be called from the main thread.
|
|
11727
|
-
* /// @param AvatarIndex size_t : The index of the avatar entity to get.
|
|
11728
|
-
* @return A pointer to the avatar entity with the given index.
|
|
11729
|
-
*/
|
|
11730
|
-
getAvatarByIndex(avatarIndex) {
|
|
11731
|
-
assert(Number.isInteger(avatarIndex));
|
|
11732
|
-
assert(avatarIndex >= Limits.UINT32_MIN);
|
|
11733
|
-
assert(avatarIndex <= Limits.UINT32_MAX);
|
|
11734
|
-
var _ret = Module._malloc(8);
|
|
11735
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_GetAvatarByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, avatarIndex]);
|
|
11736
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11737
|
-
Module._free(_ret);
|
|
11738
|
-
return _nPtr;
|
|
11739
|
-
}
|
|
11740
|
-
/**
|
|
11741
|
-
* @description Get an Object by its index.
|
|
11742
|
-
* /// Note this is not currently thread safe and should only be called from the main thread.
|
|
11743
|
-
* /// @param ObjectIndex size_t : The index of the object entity to get.
|
|
11744
|
-
* @return A pointer to the object entity with the given index.
|
|
11745
|
-
*/
|
|
11746
|
-
getObjectByIndex(objectIndex) {
|
|
11747
|
-
assert(Number.isInteger(objectIndex));
|
|
11748
|
-
assert(objectIndex >= Limits.UINT32_MIN);
|
|
11749
|
-
assert(objectIndex <= Limits.UINT32_MAX);
|
|
11750
|
-
var _ret = Module._malloc(8);
|
|
11751
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_GetObjectByIndex_SpaceEntityP_size_tC", "void", ["number", "number", "number"], [_ret, this.pointer, objectIndex]);
|
|
11752
|
-
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
11753
|
-
Module._free(_ret);
|
|
11754
|
-
return _nPtr;
|
|
11755
|
-
}
|
|
11756
|
-
/**
|
|
11757
|
-
* @description Add a new entity to the system.
|
|
11758
|
-
* /// This can be called at any time from any thread and internally add the entity to a pending
|
|
11759
|
-
* list which is then updated in a thread safe manner when ProcessPendingEntityOperations
|
|
11760
|
-
* is called from the main thread.
|
|
11761
|
-
* /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
|
|
11762
|
-
*/
|
|
11763
|
-
addEntity(entityToAdd) {
|
|
11764
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
|
|
11765
|
-
}
|
|
11766
|
-
/**
|
|
11767
|
-
* @description Sets a callback to be executed when an entity is remotely created.
|
|
11768
|
-
* /// Only one callback may be registered, calling this function again will override whatever was previously set.
|
|
11769
|
-
* If this is not set, some patch functions may fail.
|
|
11770
|
-
* /// @param Callback EntityCreatedCallback : the callback to execute.
|
|
11771
|
-
*/
|
|
11772
|
-
setEntityCreatedCallback(callback) {
|
|
11773
|
-
var _callback = (_stateObject__, arg1) => {
|
|
11774
|
-
var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
|
|
11775
|
-
callback(_arg1);
|
|
11776
|
-
};
|
|
11777
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
11778
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_SetEntityCreatedCallback_void_EntityCreatedCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
11653
|
+
get scale() {
|
|
11654
|
+
const _ptr = Module._malloc(8);
|
|
11655
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Get_Scale", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
11656
|
+
const _nPtr = getNativePointer(_ptr);
|
|
11657
|
+
return new Common.Vector3(_nPtr);
|
|
11779
11658
|
}
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
* @param callback - The callback to execute.
|
|
11783
|
-
*/
|
|
11784
|
-
setInitialEntitiesRetrievedCallback(callback) {
|
|
11785
|
-
var _callback = (_stateObject__, arg1) => {
|
|
11786
|
-
callback(arg1);
|
|
11787
|
-
};
|
|
11788
|
-
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
11789
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_SetInitialEntitiesRetrievedCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
11659
|
+
set scale(value) {
|
|
11660
|
+
Module.ccall("csp_multiplayer_SpaceTransform__Set_Scale", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
11790
11661
|
}
|
|
11791
|
-
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11662
|
+
}
|
|
11663
|
+
Multiplayer.SpaceTransform = SpaceTransform;
|
|
11664
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
11665
|
+
(function (Multiplayer) {
|
|
11666
|
+
/**
|
|
11667
|
+
@ingroup Conversation
|
|
11668
|
+
* @description Contains information about a conversation message.
|
|
11669
|
+
*/
|
|
11670
|
+
class MessageInfo extends NativeClassWrapper {
|
|
11671
|
+
/** @internal */
|
|
11672
|
+
constructor(pointer) {
|
|
11673
|
+
super(pointer);
|
|
11801
11674
|
}
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
*/
|
|
11808
|
-
queueEntityUpdate(entityToUpdate) {
|
|
11809
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_QueueEntityUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToUpdate.pointer]);
|
|
11675
|
+
static create() {
|
|
11676
|
+
var _ptr = Module._malloc(8);
|
|
11677
|
+
Module.ccall("csp_multiplayer_MessageInfo_Ctor", "void", ["number"], [_ptr]);
|
|
11678
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11679
|
+
return new MessageInfo(_nPtr);
|
|
11810
11680
|
}
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11681
|
+
static create_conversationId_isConversation_message(conversationId, isConversation, message) {
|
|
11682
|
+
var _ptr = Module._malloc(8);
|
|
11683
|
+
Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC", "void", ["number", "string", "boolean", "string"], [_ptr, conversationId, isConversation, message]);
|
|
11684
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11685
|
+
return new MessageInfo(_nPtr);
|
|
11816
11686
|
}
|
|
11817
|
-
|
|
11818
|
-
|
|
11687
|
+
static create_conversationId_isConversation_message_messageId(conversationId, isConversation, message, messageId) {
|
|
11688
|
+
var _ptr = Module._malloc(8);
|
|
11689
|
+
Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC", "void", ["number", "string", "boolean", "string", "string"], [_ptr, conversationId, isConversation, message, messageId]);
|
|
11690
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11691
|
+
return new MessageInfo(_nPtr);
|
|
11819
11692
|
}
|
|
11820
|
-
|
|
11821
|
-
|
|
11693
|
+
static create_messageData(messageData) {
|
|
11694
|
+
var _ptr = Module._malloc(8);
|
|
11695
|
+
Module.ccall("csp_multiplayer_MessageInfo_Ctor_MessageInfoRC", "void", ["number", "number"], [_ptr, messageData.pointer]);
|
|
11696
|
+
var _nPtr = getNativePointer(_ptr);
|
|
11697
|
+
return new MessageInfo(_nPtr);
|
|
11822
11698
|
}
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11699
|
+
// operator=
|
|
11700
|
+
delete() {
|
|
11701
|
+
if (this.ownsPointer && !this.disposed) {
|
|
11702
|
+
Module.ccall("csp_multiplayer_MessageInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
11703
|
+
this.disposed = true;
|
|
11704
|
+
}
|
|
11829
11705
|
}
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
*/
|
|
11834
|
-
markEntityForUpdate(entity) {
|
|
11835
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_MarkEntityForUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
|
|
11706
|
+
get conversationId() {
|
|
11707
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_ConversationId", "string", ["number"], [this.pointer]);
|
|
11708
|
+
return _result;
|
|
11836
11709
|
}
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
* /// Note this should only be called from main thread
|
|
11840
|
-
*/
|
|
11841
|
-
processPendingEntityOperations() {
|
|
11842
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_ProcessPendingEntityOperations_void", "void", ["number"], [this.pointer]);
|
|
11710
|
+
set conversationId(value) {
|
|
11711
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_ConversationId", "void", ["number", "string"], [this.pointer, value]);
|
|
11843
11712
|
}
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
* If this is called by a client manually without first deleting all existing tracked entities, it is possible there will be duplicates.
|
|
11848
|
-
* It is highly advised not to call this function unless you know what you are doing.
|
|
11849
|
-
*/
|
|
11850
|
-
retrieveAllEntities() {
|
|
11851
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_RetrieveAllEntities_void", "void", ["number"], [this.pointer]);
|
|
11713
|
+
get createdTimestamp() {
|
|
11714
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_CreatedTimestamp", "string", ["number"], [this.pointer]);
|
|
11715
|
+
return _result;
|
|
11852
11716
|
}
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
* /// They still reside on the server, however they will not be accessible in the client application.
|
|
11856
|
-
*/
|
|
11857
|
-
localDestroyAllEntities() {
|
|
11858
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_LocalDestroyAllEntities_void", "void", ["number"], [this.pointer]);
|
|
11717
|
+
set createdTimestamp(value) {
|
|
11718
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_CreatedTimestamp", "void", ["number", "string"], [this.pointer, value]);
|
|
11859
11719
|
}
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
* /// Criteria:
|
|
11863
|
-
* For Selection:
|
|
11864
|
-
* - Entity must be deselected currently
|
|
11865
|
-
* For Deselection:
|
|
11866
|
-
* - Entity must be selected currently
|
|
11867
|
-
* - Entity must be selected by the client attempting the deselection (SpaceEntity::GetSelectingClientID will return this information)
|
|
11868
|
-
* /// @param SelectedState bool : The state to set the entity to, Selected = True, Deselected = false.
|
|
11869
|
-
* @param entity - A pointer to the entity to modify selection state on.
|
|
11870
|
-
* @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).
|
|
11871
|
-
*/
|
|
11872
|
-
setSelectionStateOfEntity(selectedState, entity) {
|
|
11873
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_SetSelectionStateOfEntity_bool_boolC_SpaceEntityP", "boolean", ["number", "boolean", "number"], [this.pointer, selectedState, entity.pointer]);
|
|
11720
|
+
get editedTimestamp() {
|
|
11721
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_EditedTimestamp", "string", ["number"], [this.pointer]);
|
|
11874
11722
|
return _result;
|
|
11875
11723
|
}
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
*/
|
|
11879
|
-
enableLeaderElection() {
|
|
11880
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_EnableLeaderElection_void", "void", ["number"], [this.pointer]);
|
|
11881
|
-
}
|
|
11882
|
-
/**
|
|
11883
|
-
* @description Disable Leader Election feature.
|
|
11884
|
-
*/
|
|
11885
|
-
disableLeaderElection() {
|
|
11886
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_DisableLeaderElection_void", "void", ["number"], [this.pointer]);
|
|
11724
|
+
set editedTimestamp(value) {
|
|
11725
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_EditedTimestamp", "void", ["number", "string"], [this.pointer, value]);
|
|
11887
11726
|
}
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
* @return True if enabled, false otherwise.
|
|
11891
|
-
*/
|
|
11892
|
-
isLeaderElectionEnabled() {
|
|
11893
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_IsLeaderElectionEnabledC_bool", "boolean", ["number"], [this.pointer]);
|
|
11727
|
+
get userId() {
|
|
11728
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_UserId", "string", ["number"], [this.pointer]);
|
|
11894
11729
|
return _result;
|
|
11895
11730
|
}
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
* @return The id of the leader.
|
|
11899
|
-
*/
|
|
11900
|
-
getLeaderId() {
|
|
11901
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetLeaderIdC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
11902
|
-
const _unfixedValue = _result;
|
|
11903
|
-
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
11904
|
-
_result = _fixedValue;
|
|
11905
|
-
return _result;
|
|
11731
|
+
set userId(value) {
|
|
11732
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
|
|
11906
11733
|
}
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
* @return True if enabled, false otherwise.
|
|
11910
|
-
*/
|
|
11911
|
-
getEntityPatchRateLimitEnabled() {
|
|
11912
|
-
let _result = Module.ccall("csp_multiplayer_SpaceEntitySystem_GetEntityPatchRateLimitEnabledC_bool", "boolean", ["number"], [this.pointer]);
|
|
11734
|
+
get message() {
|
|
11735
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_Message", "string", ["number"], [this.pointer]);
|
|
11913
11736
|
return _result;
|
|
11914
11737
|
}
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
* /// This feature is enabled by default and should only be disabled if you are encountering issues.
|
|
11918
|
-
* /// @param Enabled : sets if the feature should be enabled or not.
|
|
11919
|
-
* \rst
|
|
11920
|
-
* .. note::
|
|
11921
|
-
* If disabling this feature, more requests will be made to Magnopus Connected Services,
|
|
11922
|
-
* and consequently more patch merges may occur on the server as a result.
|
|
11923
|
-
* \endrst
|
|
11924
|
-
*/
|
|
11925
|
-
setEntityPatchRateLimitEnabled(enabled) {
|
|
11926
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_SetEntityPatchRateLimitEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, enabled]);
|
|
11738
|
+
set message(value) {
|
|
11739
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_Message", "void", ["number", "string"], [this.pointer, value]);
|
|
11927
11740
|
}
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
*/
|
|
11932
|
-
getRootHierarchyEntities() {
|
|
11933
|
-
var _ret = Module._malloc(8);
|
|
11934
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_GetRootHierarchyEntitiesC_ListPC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
11935
|
-
var _nPtr = new Common.List(getNativePointer(_ret), csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
|
|
11936
|
-
Module._free(_ret);
|
|
11937
|
-
return _nPtr;
|
|
11741
|
+
get messageId() {
|
|
11742
|
+
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_MessageId", "string", ["number"], [this.pointer]);
|
|
11743
|
+
return _result;
|
|
11938
11744
|
}
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
Module.ccall("csp_multiplayer_SpaceEntitySystem_Dtor", "void", ["number"], [this.pointer]);
|
|
11942
|
-
this.disposed = true;
|
|
11943
|
-
}
|
|
11745
|
+
set messageId(value) {
|
|
11746
|
+
Module.ccall("csp_multiplayer_MessageInfo__Set_MessageId", "void", ["number", "string"], [this.pointer, value]);
|
|
11944
11747
|
}
|
|
11945
11748
|
}
|
|
11946
|
-
Multiplayer.
|
|
11749
|
+
Multiplayer.MessageInfo = MessageInfo;
|
|
11947
11750
|
})(Multiplayer || (Multiplayer = {}));
|
|
11948
11751
|
(function (Multiplayer) {
|
|
11949
11752
|
/**
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11753
|
+
@ingroup Conversation
|
|
11754
|
+
* @description Information used to update a message
|
|
11755
|
+
*/
|
|
11756
|
+
class MessageUpdateParams extends NativeClassWrapper {
|
|
11953
11757
|
/** @internal */
|
|
11954
11758
|
constructor(pointer) {
|
|
11955
11759
|
super(pointer);
|
|
11956
11760
|
}
|
|
11957
|
-
/**
|
|
11958
|
-
* @description Default constuctor for the SpaceTransform
|
|
11959
|
-
*/
|
|
11960
11761
|
static create() {
|
|
11961
11762
|
var _ptr = Module._malloc(8);
|
|
11962
|
-
Module.ccall("
|
|
11963
|
-
var _nPtr = getNativePointer(_ptr);
|
|
11964
|
-
return new SpaceTransform(_nPtr);
|
|
11965
|
-
}
|
|
11966
|
-
/**
|
|
11967
|
-
* @description Custom constructor for the SpaceTransform.
|
|
11968
|
-
* @param position - The position value for the transform.
|
|
11969
|
-
* @param rotation - The rotation value for the transform, will be normalized during multiplication operations.
|
|
11970
|
-
* @param scale - The scale value for the transform.
|
|
11971
|
-
*/
|
|
11972
|
-
static create_position_rotation_scale(position, rotation, scale) {
|
|
11973
|
-
var _ptr = Module._malloc(8);
|
|
11974
|
-
Module.ccall("csp_multiplayer_SpaceTransform_Ctor_Vector3RC_Vector4RC_Vector3RC", "void", ["number", "number", "number", "number"], [_ptr, position.pointer, rotation.pointer, scale.pointer]);
|
|
11975
|
-
var _nPtr = getNativePointer(_ptr);
|
|
11976
|
-
return new SpaceTransform(_nPtr);
|
|
11977
|
-
}
|
|
11978
|
-
/**
|
|
11979
|
-
* @description Equality operator
|
|
11980
|
-
* @param spaceTransform - Transform
|
|
11981
|
-
*/
|
|
11982
|
-
// operator==
|
|
11983
|
-
/**
|
|
11984
|
-
* @description Inequality operator
|
|
11985
|
-
* @param spaceTransform - Transform
|
|
11986
|
-
*/
|
|
11987
|
-
// operator!=
|
|
11988
|
-
/**
|
|
11989
|
-
* @description Multiplication operator
|
|
11990
|
-
* @param spaceTransform - Transform
|
|
11991
|
-
* NOTE: This performs TRS matrix composition, then decomposes back to Pos, Rot, Scale.
|
|
11992
|
-
*/
|
|
11993
|
-
// operator*
|
|
11994
|
-
delete() {
|
|
11995
|
-
if (this.ownsPointer && !this.disposed) {
|
|
11996
|
-
Module.ccall("csp_multiplayer_SpaceTransform_Dtor", "void", ["number"], [this.pointer]);
|
|
11997
|
-
this.disposed = true;
|
|
11998
|
-
}
|
|
11999
|
-
}
|
|
12000
|
-
get position() {
|
|
12001
|
-
const _ptr = Module._malloc(8);
|
|
12002
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Get_Position", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
12003
|
-
const _nPtr = getNativePointer(_ptr);
|
|
12004
|
-
return new Common.Vector3(_nPtr);
|
|
12005
|
-
}
|
|
12006
|
-
set position(value) {
|
|
12007
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Set_Position", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
12008
|
-
}
|
|
12009
|
-
get rotation() {
|
|
12010
|
-
const _ptr = Module._malloc(8);
|
|
12011
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Get_Rotation", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
12012
|
-
const _nPtr = getNativePointer(_ptr);
|
|
12013
|
-
return new Common.Vector4(_nPtr);
|
|
12014
|
-
}
|
|
12015
|
-
set rotation(value) {
|
|
12016
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Set_Rotation", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
12017
|
-
}
|
|
12018
|
-
get scale() {
|
|
12019
|
-
const _ptr = Module._malloc(8);
|
|
12020
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Get_Scale", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
12021
|
-
const _nPtr = getNativePointer(_ptr);
|
|
12022
|
-
return new Common.Vector3(_nPtr);
|
|
12023
|
-
}
|
|
12024
|
-
set scale(value) {
|
|
12025
|
-
Module.ccall("csp_multiplayer_SpaceTransform__Set_Scale", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
12026
|
-
}
|
|
12027
|
-
}
|
|
12028
|
-
Multiplayer.SpaceTransform = SpaceTransform;
|
|
12029
|
-
})(Multiplayer || (Multiplayer = {}));
|
|
12030
|
-
(function (Multiplayer) {
|
|
12031
|
-
/**
|
|
12032
|
-
@ingroup Conversation
|
|
12033
|
-
* @description Contains information about a conversation message.
|
|
12034
|
-
*/
|
|
12035
|
-
class MessageInfo extends NativeClassWrapper {
|
|
12036
|
-
/** @internal */
|
|
12037
|
-
constructor(pointer) {
|
|
12038
|
-
super(pointer);
|
|
12039
|
-
}
|
|
12040
|
-
static create() {
|
|
12041
|
-
var _ptr = Module._malloc(8);
|
|
12042
|
-
Module.ccall("csp_multiplayer_MessageInfo_Ctor", "void", ["number"], [_ptr]);
|
|
12043
|
-
var _nPtr = getNativePointer(_ptr);
|
|
12044
|
-
return new MessageInfo(_nPtr);
|
|
12045
|
-
}
|
|
12046
|
-
static create_conversationId_isConversation_message(conversationId, isConversation, message) {
|
|
12047
|
-
var _ptr = Module._malloc(8);
|
|
12048
|
-
Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC", "void", ["number", "string", "boolean", "string"], [_ptr, conversationId, isConversation, message]);
|
|
12049
|
-
var _nPtr = getNativePointer(_ptr);
|
|
12050
|
-
return new MessageInfo(_nPtr);
|
|
12051
|
-
}
|
|
12052
|
-
static create_conversationId_isConversation_message_messageId(conversationId, isConversation, message, messageId) {
|
|
12053
|
-
var _ptr = Module._malloc(8);
|
|
12054
|
-
Module.ccall("csp_multiplayer_MessageInfo_Ctor_StringRC_bool_StringRC_StringRC", "void", ["number", "string", "boolean", "string", "string"], [_ptr, conversationId, isConversation, message, messageId]);
|
|
12055
|
-
var _nPtr = getNativePointer(_ptr);
|
|
12056
|
-
return new MessageInfo(_nPtr);
|
|
12057
|
-
}
|
|
12058
|
-
static create_messageData(messageData) {
|
|
12059
|
-
var _ptr = Module._malloc(8);
|
|
12060
|
-
Module.ccall("csp_multiplayer_MessageInfo_Ctor_MessageInfoRC", "void", ["number", "number"], [_ptr, messageData.pointer]);
|
|
12061
|
-
var _nPtr = getNativePointer(_ptr);
|
|
12062
|
-
return new MessageInfo(_nPtr);
|
|
12063
|
-
}
|
|
12064
|
-
delete() {
|
|
12065
|
-
if (this.ownsPointer && !this.disposed) {
|
|
12066
|
-
Module.ccall("csp_multiplayer_MessageInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
12067
|
-
this.disposed = true;
|
|
12068
|
-
}
|
|
12069
|
-
}
|
|
12070
|
-
get conversationId() {
|
|
12071
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_ConversationId", "string", ["number"], [this.pointer]);
|
|
12072
|
-
return _result;
|
|
12073
|
-
}
|
|
12074
|
-
set conversationId(value) {
|
|
12075
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_ConversationId", "void", ["number", "string"], [this.pointer, value]);
|
|
12076
|
-
}
|
|
12077
|
-
get createdTimestamp() {
|
|
12078
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_CreatedTimestamp", "string", ["number"], [this.pointer]);
|
|
12079
|
-
return _result;
|
|
12080
|
-
}
|
|
12081
|
-
set createdTimestamp(value) {
|
|
12082
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_CreatedTimestamp", "void", ["number", "string"], [this.pointer, value]);
|
|
12083
|
-
}
|
|
12084
|
-
get editedTimestamp() {
|
|
12085
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_EditedTimestamp", "string", ["number"], [this.pointer]);
|
|
12086
|
-
return _result;
|
|
12087
|
-
}
|
|
12088
|
-
set editedTimestamp(value) {
|
|
12089
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_EditedTimestamp", "void", ["number", "string"], [this.pointer, value]);
|
|
12090
|
-
}
|
|
12091
|
-
get userId() {
|
|
12092
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_UserId", "string", ["number"], [this.pointer]);
|
|
12093
|
-
return _result;
|
|
12094
|
-
}
|
|
12095
|
-
set userId(value) {
|
|
12096
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
|
|
12097
|
-
}
|
|
12098
|
-
get message() {
|
|
12099
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_Message", "string", ["number"], [this.pointer]);
|
|
12100
|
-
return _result;
|
|
12101
|
-
}
|
|
12102
|
-
set message(value) {
|
|
12103
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_Message", "void", ["number", "string"], [this.pointer, value]);
|
|
12104
|
-
}
|
|
12105
|
-
get messageId() {
|
|
12106
|
-
let _result = Module.ccall("csp_multiplayer_MessageInfo__Get_MessageId", "string", ["number"], [this.pointer]);
|
|
12107
|
-
return _result;
|
|
12108
|
-
}
|
|
12109
|
-
set messageId(value) {
|
|
12110
|
-
Module.ccall("csp_multiplayer_MessageInfo__Set_MessageId", "void", ["number", "string"], [this.pointer, value]);
|
|
12111
|
-
}
|
|
12112
|
-
}
|
|
12113
|
-
Multiplayer.MessageInfo = MessageInfo;
|
|
12114
|
-
})(Multiplayer || (Multiplayer = {}));
|
|
12115
|
-
(function (Multiplayer) {
|
|
12116
|
-
/**
|
|
12117
|
-
@ingroup Conversation
|
|
12118
|
-
* @description Information used to update a message
|
|
12119
|
-
*/
|
|
12120
|
-
class MessageUpdateParams extends NativeClassWrapper {
|
|
12121
|
-
/** @internal */
|
|
12122
|
-
constructor(pointer) {
|
|
12123
|
-
super(pointer);
|
|
12124
|
-
}
|
|
12125
|
-
static create() {
|
|
12126
|
-
var _ptr = Module._malloc(8);
|
|
12127
|
-
Module.ccall("csp_multiplayer_MessageUpdateParams_Ctor", "void", ["number"], [_ptr]);
|
|
11763
|
+
Module.ccall("csp_multiplayer_MessageUpdateParams_Ctor", "void", ["number"], [_ptr]);
|
|
12128
11764
|
var _nPtr = getNativePointer(_ptr);
|
|
12129
11765
|
return new MessageUpdateParams(_nPtr);
|
|
12130
11766
|
}
|
|
@@ -12229,6 +11865,7 @@ export class CSPFoundation {
|
|
|
12229
11865
|
var _nPtr = getNativePointer(_ptr);
|
|
12230
11866
|
return new AnnotationData(_nPtr);
|
|
12231
11867
|
}
|
|
11868
|
+
// operator=
|
|
12232
11869
|
delete() {
|
|
12233
11870
|
if (this.ownsPointer && !this.disposed) {
|
|
12234
11871
|
Module.ccall("csp_multiplayer_AnnotationData_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -12501,6 +12138,141 @@ export class CSPFoundation {
|
|
|
12501
12138
|
}
|
|
12502
12139
|
Systems.CSPSceneData = CSPSceneData;
|
|
12503
12140
|
})(Systems || (Systems = {}));
|
|
12141
|
+
(function (Systems) {
|
|
12142
|
+
/**
|
|
12143
|
+
@ingroup Status System
|
|
12144
|
+
* @description Stores the version and deprecation information for a service
|
|
12145
|
+
*/
|
|
12146
|
+
class VersionMetadata extends NativeClassWrapper {
|
|
12147
|
+
/** @internal */
|
|
12148
|
+
constructor(pointer) {
|
|
12149
|
+
super(pointer);
|
|
12150
|
+
}
|
|
12151
|
+
static create() {
|
|
12152
|
+
var _ptr = Module._malloc(8);
|
|
12153
|
+
Module.ccall("csp_systems_VersionMetadata_Ctor", "void", ["number"], [_ptr]);
|
|
12154
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12155
|
+
return new VersionMetadata(_nPtr);
|
|
12156
|
+
}
|
|
12157
|
+
delete() {
|
|
12158
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12159
|
+
Module.ccall("csp_systems_VersionMetadata_Dtor", "void", ["number"], [this.pointer]);
|
|
12160
|
+
this.disposed = true;
|
|
12161
|
+
}
|
|
12162
|
+
}
|
|
12163
|
+
get version() {
|
|
12164
|
+
let _result = Module.ccall("csp_systems_VersionMetadata__Get_Version", "string", ["number"], [this.pointer]);
|
|
12165
|
+
return _result;
|
|
12166
|
+
}
|
|
12167
|
+
set version(value) {
|
|
12168
|
+
Module.ccall("csp_systems_VersionMetadata__Set_Version", "void", ["number", "string"], [this.pointer, value]);
|
|
12169
|
+
}
|
|
12170
|
+
get deprecationDatetime() {
|
|
12171
|
+
let _result = Module.ccall("csp_systems_VersionMetadata__Get_DeprecationDatetime", "string", ["number"], [this.pointer]);
|
|
12172
|
+
return _result;
|
|
12173
|
+
}
|
|
12174
|
+
set deprecationDatetime(value) {
|
|
12175
|
+
Module.ccall("csp_systems_VersionMetadata__Set_DeprecationDatetime", "void", ["number", "string"], [this.pointer, value]);
|
|
12176
|
+
}
|
|
12177
|
+
}
|
|
12178
|
+
Systems.VersionMetadata = VersionMetadata;
|
|
12179
|
+
})(Systems || (Systems = {}));
|
|
12180
|
+
(function (Systems) {
|
|
12181
|
+
/**
|
|
12182
|
+
@ingroup Status System
|
|
12183
|
+
* @description Stores information about a service, including available versions
|
|
12184
|
+
*/
|
|
12185
|
+
class ServiceStatus extends NativeClassWrapper {
|
|
12186
|
+
/** @internal */
|
|
12187
|
+
constructor(pointer) {
|
|
12188
|
+
super(pointer);
|
|
12189
|
+
}
|
|
12190
|
+
static create() {
|
|
12191
|
+
var _ptr = Module._malloc(8);
|
|
12192
|
+
Module.ccall("csp_systems_ServiceStatus_Ctor", "void", ["number"], [_ptr]);
|
|
12193
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12194
|
+
return new ServiceStatus(_nPtr);
|
|
12195
|
+
}
|
|
12196
|
+
delete() {
|
|
12197
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12198
|
+
Module.ccall("csp_systems_ServiceStatus_Dtor", "void", ["number"], [this.pointer]);
|
|
12199
|
+
this.disposed = true;
|
|
12200
|
+
}
|
|
12201
|
+
}
|
|
12202
|
+
get reverseProxy() {
|
|
12203
|
+
let _result = Module.ccall("csp_systems_ServiceStatus__Get_ReverseProxy", "string", ["number"], [this.pointer]);
|
|
12204
|
+
return _result;
|
|
12205
|
+
}
|
|
12206
|
+
set reverseProxy(value) {
|
|
12207
|
+
Module.ccall("csp_systems_ServiceStatus__Set_ReverseProxy", "void", ["number", "string"], [this.pointer, value]);
|
|
12208
|
+
}
|
|
12209
|
+
get name() {
|
|
12210
|
+
let _result = Module.ccall("csp_systems_ServiceStatus__Get_Name", "string", ["number"], [this.pointer]);
|
|
12211
|
+
return _result;
|
|
12212
|
+
}
|
|
12213
|
+
set name(value) {
|
|
12214
|
+
Module.ccall("csp_systems_ServiceStatus__Set_Name", "void", ["number", "string"], [this.pointer, value]);
|
|
12215
|
+
}
|
|
12216
|
+
get apiVersions() {
|
|
12217
|
+
const _ptr = Module._malloc(8);
|
|
12218
|
+
Module.ccall("csp_systems_ServiceStatus__Get_ApiVersions", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
12219
|
+
const _nPtr = getNativePointer(_ptr);
|
|
12220
|
+
return new Common.Array(_nPtr, csp_systems_VersionMetadataFactory, "csp_systems_VersionMetadata");
|
|
12221
|
+
}
|
|
12222
|
+
set apiVersions(value) {
|
|
12223
|
+
Module.ccall("csp_systems_ServiceStatus__Set_ApiVersions", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
12224
|
+
}
|
|
12225
|
+
get currentApiVersion() {
|
|
12226
|
+
let _result = Module.ccall("csp_systems_ServiceStatus__Get_CurrentApiVersion", "string", ["number"], [this.pointer]);
|
|
12227
|
+
return _result;
|
|
12228
|
+
}
|
|
12229
|
+
set currentApiVersion(value) {
|
|
12230
|
+
Module.ccall("csp_systems_ServiceStatus__Set_CurrentApiVersion", "void", ["number", "string"], [this.pointer, value]);
|
|
12231
|
+
}
|
|
12232
|
+
}
|
|
12233
|
+
Systems.ServiceStatus = ServiceStatus;
|
|
12234
|
+
})(Systems || (Systems = {}));
|
|
12235
|
+
(function (Systems) {
|
|
12236
|
+
/**
|
|
12237
|
+
@ingroup Status System
|
|
12238
|
+
* @description Store information about the current service deployment
|
|
12239
|
+
*/
|
|
12240
|
+
class ServicesDeploymentStatus extends NativeClassWrapper {
|
|
12241
|
+
/** @internal */
|
|
12242
|
+
constructor(pointer) {
|
|
12243
|
+
super(pointer);
|
|
12244
|
+
}
|
|
12245
|
+
static create() {
|
|
12246
|
+
var _ptr = Module._malloc(8);
|
|
12247
|
+
Module.ccall("csp_systems_ServicesDeploymentStatus_Ctor", "void", ["number"], [_ptr]);
|
|
12248
|
+
var _nPtr = getNativePointer(_ptr);
|
|
12249
|
+
return new ServicesDeploymentStatus(_nPtr);
|
|
12250
|
+
}
|
|
12251
|
+
delete() {
|
|
12252
|
+
if (this.ownsPointer && !this.disposed) {
|
|
12253
|
+
Module.ccall("csp_systems_ServicesDeploymentStatus_Dtor", "void", ["number"], [this.pointer]);
|
|
12254
|
+
this.disposed = true;
|
|
12255
|
+
}
|
|
12256
|
+
}
|
|
12257
|
+
get version() {
|
|
12258
|
+
let _result = Module.ccall("csp_systems_ServicesDeploymentStatus__Get_Version", "string", ["number"], [this.pointer]);
|
|
12259
|
+
return _result;
|
|
12260
|
+
}
|
|
12261
|
+
set version(value) {
|
|
12262
|
+
Module.ccall("csp_systems_ServicesDeploymentStatus__Set_Version", "void", ["number", "string"], [this.pointer, value]);
|
|
12263
|
+
}
|
|
12264
|
+
get services() {
|
|
12265
|
+
const _ptr = Module._malloc(8);
|
|
12266
|
+
Module.ccall("csp_systems_ServicesDeploymentStatus__Get_Services", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
12267
|
+
const _nPtr = getNativePointer(_ptr);
|
|
12268
|
+
return new Common.Array(_nPtr, csp_systems_ServiceStatusFactory, "csp_systems_ServiceStatus");
|
|
12269
|
+
}
|
|
12270
|
+
set services(value) {
|
|
12271
|
+
Module.ccall("csp_systems_ServicesDeploymentStatus__Set_Services", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
12272
|
+
}
|
|
12273
|
+
}
|
|
12274
|
+
Systems.ServicesDeploymentStatus = ServicesDeploymentStatus;
|
|
12275
|
+
})(Systems || (Systems = {}));
|
|
12504
12276
|
(function (Systems) {
|
|
12505
12277
|
/**
|
|
12506
12278
|
* @description Base class for all Connected Spaces Platform Systems, which enforces passing of a WebClient or NetworkEventBus instance in the constructor
|
|
@@ -12635,12 +12407,23 @@ export class CSPFoundation {
|
|
|
12635
12407
|
return _nPtr;
|
|
12636
12408
|
}
|
|
12637
12409
|
/**
|
|
12638
|
-
* @description Retrieves the Settings system.
|
|
12639
|
-
* @return Pointer to the settings system class
|
|
12410
|
+
* @description Retrieves the Application Settings system.
|
|
12411
|
+
* @return Pointer to the application settings system class
|
|
12640
12412
|
*/
|
|
12641
|
-
|
|
12413
|
+
getApplicationSettingsSystem() {
|
|
12642
12414
|
var _ret = Module._malloc(8);
|
|
12643
|
-
Module.ccall("
|
|
12415
|
+
Module.ccall("csp_systems_SystemsManager_GetApplicationSettingsSystem_ApplicationSettingsSystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12416
|
+
var _nPtr = new Systems.ApplicationSettingsSystem(getNativePointer(_ret));
|
|
12417
|
+
Module._free(_ret);
|
|
12418
|
+
return _nPtr;
|
|
12419
|
+
}
|
|
12420
|
+
/**
|
|
12421
|
+
* @description Retrieves the Settings system.
|
|
12422
|
+
* @return Pointer to the settings system class
|
|
12423
|
+
*/
|
|
12424
|
+
getSettingsSystem() {
|
|
12425
|
+
var _ret = Module._malloc(8);
|
|
12426
|
+
Module.ccall("csp_systems_SystemsManager_GetSettingsSystem_SettingsSystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12644
12427
|
var _nPtr = new Systems.SettingsSystem(getNativePointer(_ret));
|
|
12645
12428
|
Module._free(_ret);
|
|
12646
12429
|
return _nPtr;
|
|
@@ -12733,13 +12516,6 @@ export class CSPFoundation {
|
|
|
12733
12516
|
Module._free(_ret);
|
|
12734
12517
|
return _nPtr;
|
|
12735
12518
|
}
|
|
12736
|
-
getSpaceEntitySystem() {
|
|
12737
|
-
var _ret = Module._malloc(8);
|
|
12738
|
-
Module.ccall("csp_systems_SystemsManager_GetSpaceEntitySystem_SpaceEntitySystemP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12739
|
-
var _nPtr = new Multiplayer.SpaceEntitySystem(getNativePointer(_ret));
|
|
12740
|
-
Module._free(_ret);
|
|
12741
|
-
return _nPtr;
|
|
12742
|
-
}
|
|
12743
12519
|
getMultiplayerConnection() {
|
|
12744
12520
|
var _ret = Module._malloc(8);
|
|
12745
12521
|
Module.ccall("csp_systems_SystemsManager_GetMultiplayerConnection_MultiplayerConnectionP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
@@ -12754,6 +12530,13 @@ export class CSPFoundation {
|
|
|
12754
12530
|
Module._free(_ret);
|
|
12755
12531
|
return _nPtr;
|
|
12756
12532
|
}
|
|
12533
|
+
makeOnlineRealtimeEngine() {
|
|
12534
|
+
var _ret = Module._malloc(8);
|
|
12535
|
+
Module.ccall("csp_systems_SystemsManager_MakeOnlineRealtimeEngine_OnlineRealtimeEngineP", "void", ["number", "number"], [_ret, this.pointer]);
|
|
12536
|
+
var _nPtr = new Multiplayer.OnlineRealtimeEngine(getNativePointer(_ret));
|
|
12537
|
+
Module._free(_ret);
|
|
12538
|
+
return _nPtr;
|
|
12539
|
+
}
|
|
12757
12540
|
}
|
|
12758
12541
|
Systems.SystemsManager = SystemsManager;
|
|
12759
12542
|
})(Systems || (Systems = {}));
|
|
@@ -12978,6 +12761,7 @@ export class CSPFoundation {
|
|
|
12978
12761
|
var _nPtr = getNativePointer(_ptr);
|
|
12979
12762
|
return new Asset(_nPtr);
|
|
12980
12763
|
}
|
|
12764
|
+
// operator=
|
|
12981
12765
|
delete() {
|
|
12982
12766
|
if (this.ownsPointer && !this.disposed) {
|
|
12983
12767
|
Module.ccall("csp_systems_Asset_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -14748,6 +14532,61 @@ export class CSPFoundation {
|
|
|
14748
14532
|
}
|
|
14749
14533
|
Systems.Sequence = Sequence;
|
|
14750
14534
|
})(Systems || (Systems = {}));
|
|
14535
|
+
(function (Systems) {
|
|
14536
|
+
/**
|
|
14537
|
+
@ingroup Application Settings System
|
|
14538
|
+
* @description Represents configuration settings for an application context.
|
|
14539
|
+
*/
|
|
14540
|
+
class ApplicationSettings extends NativeClassWrapper {
|
|
14541
|
+
/** @internal */
|
|
14542
|
+
constructor(pointer) {
|
|
14543
|
+
super(pointer);
|
|
14544
|
+
}
|
|
14545
|
+
static create() {
|
|
14546
|
+
var _ptr = Module._malloc(8);
|
|
14547
|
+
Module.ccall("csp_systems_ApplicationSettings_Ctor", "void", ["number"], [_ptr]);
|
|
14548
|
+
var _nPtr = getNativePointer(_ptr);
|
|
14549
|
+
return new ApplicationSettings(_nPtr);
|
|
14550
|
+
}
|
|
14551
|
+
delete() {
|
|
14552
|
+
if (this.ownsPointer && !this.disposed) {
|
|
14553
|
+
Module.ccall("csp_systems_ApplicationSettings_Dtor", "void", ["number"], [this.pointer]);
|
|
14554
|
+
this.disposed = true;
|
|
14555
|
+
}
|
|
14556
|
+
}
|
|
14557
|
+
get applicationName() {
|
|
14558
|
+
let _result = Module.ccall("csp_systems_ApplicationSettings__Get_ApplicationName", "string", ["number"], [this.pointer]);
|
|
14559
|
+
return _result;
|
|
14560
|
+
}
|
|
14561
|
+
set applicationName(value) {
|
|
14562
|
+
Module.ccall("csp_systems_ApplicationSettings__Set_ApplicationName", "void", ["number", "string"], [this.pointer, value]);
|
|
14563
|
+
}
|
|
14564
|
+
get context() {
|
|
14565
|
+
let _result = Module.ccall("csp_systems_ApplicationSettings__Get_Context", "string", ["number"], [this.pointer]);
|
|
14566
|
+
return _result;
|
|
14567
|
+
}
|
|
14568
|
+
set context(value) {
|
|
14569
|
+
Module.ccall("csp_systems_ApplicationSettings__Set_Context", "void", ["number", "string"], [this.pointer, value]);
|
|
14570
|
+
}
|
|
14571
|
+
get allowAnonymous() {
|
|
14572
|
+
let _result = Module.ccall("csp_systems_ApplicationSettings__Get_AllowAnonymous", "boolean", ["number"], [this.pointer]);
|
|
14573
|
+
return _result;
|
|
14574
|
+
}
|
|
14575
|
+
set allowAnonymous(value) {
|
|
14576
|
+
Module.ccall("csp_systems_ApplicationSettings__Set_AllowAnonymous", "void", ["number", "boolean"], [this.pointer, value]);
|
|
14577
|
+
}
|
|
14578
|
+
get settings() {
|
|
14579
|
+
const _ptr = Module._malloc(8);
|
|
14580
|
+
Module.ccall("csp_systems_ApplicationSettings__Get_Settings", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
14581
|
+
const _nPtr = getNativePointer(_ptr);
|
|
14582
|
+
return new Common.Map(_nPtr, StringFactory, "String", StringFactory, "String");
|
|
14583
|
+
}
|
|
14584
|
+
set settings(value) {
|
|
14585
|
+
Module.ccall("csp_systems_ApplicationSettings__Set_Settings", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
14586
|
+
}
|
|
14587
|
+
}
|
|
14588
|
+
Systems.ApplicationSettings = ApplicationSettings;
|
|
14589
|
+
})(Systems || (Systems = {}));
|
|
14751
14590
|
(function (Systems) {
|
|
14752
14591
|
/**
|
|
14753
14592
|
@ingroup Settings System
|
|
@@ -15001,6 +14840,7 @@ export class CSPFoundation {
|
|
|
15001
14840
|
var _nPtr = getNativePointer(_ptr);
|
|
15002
14841
|
return new UserRoleInfo(_nPtr);
|
|
15003
14842
|
}
|
|
14843
|
+
// operator=
|
|
15004
14844
|
delete() {
|
|
15005
14845
|
if (this.ownsPointer && !this.disposed) {
|
|
15006
14846
|
Module.ccall("csp_systems_UserRoleInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -15046,6 +14886,7 @@ export class CSPFoundation {
|
|
|
15046
14886
|
var _nPtr = getNativePointer(_ptr);
|
|
15047
14887
|
return new InviteUserRoleInfo(_nPtr);
|
|
15048
14888
|
}
|
|
14889
|
+
// operator=
|
|
15049
14890
|
delete() {
|
|
15050
14891
|
if (this.ownsPointer && !this.disposed) {
|
|
15051
14892
|
Module.ccall("csp_systems_InviteUserRoleInfo_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -15091,6 +14932,7 @@ export class CSPFoundation {
|
|
|
15091
14932
|
var _nPtr = getNativePointer(_ptr);
|
|
15092
14933
|
return new InviteUserRoleInfoCollection(_nPtr);
|
|
15093
14934
|
}
|
|
14935
|
+
// operator=
|
|
15094
14936
|
delete() {
|
|
15095
14937
|
if (this.ownsPointer && !this.disposed) {
|
|
15096
14938
|
Module.ccall("csp_systems_InviteUserRoleInfoCollection_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -16055,94 +15897,526 @@ export class CSPFoundation {
|
|
|
16055
15897
|
this.disposed = true;
|
|
16056
15898
|
}
|
|
16057
15899
|
}
|
|
16058
|
-
get spaceId() {
|
|
16059
|
-
let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_SpaceId", "string", ["number"], [this.pointer]);
|
|
16060
|
-
return _result;
|
|
15900
|
+
get spaceId() {
|
|
15901
|
+
let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_SpaceId", "string", ["number"], [this.pointer]);
|
|
15902
|
+
return _result;
|
|
15903
|
+
}
|
|
15904
|
+
set spaceId(value) {
|
|
15905
|
+
Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_SpaceId", "void", ["number", "string"], [this.pointer, value]);
|
|
15906
|
+
}
|
|
15907
|
+
get userRoles() {
|
|
15908
|
+
const _ptr = Module._malloc(8);
|
|
15909
|
+
Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_UserRoles", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
15910
|
+
const _nPtr = getNativePointer(_ptr);
|
|
15911
|
+
return new Common.Array(_nPtr, csp_systems_SpaceUserRoleFactory, "csp_systems_SpaceUserRole");
|
|
15912
|
+
}
|
|
15913
|
+
set userRoles(value) {
|
|
15914
|
+
Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_UserRoles", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
15915
|
+
}
|
|
15916
|
+
get changeType() {
|
|
15917
|
+
let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_ChangeType", "number", ["number"], [this.pointer]);
|
|
15918
|
+
return _result;
|
|
15919
|
+
}
|
|
15920
|
+
set changeType(value) {
|
|
15921
|
+
Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_ChangeType", "void", ["number", "number"], [this.pointer, value]);
|
|
15922
|
+
}
|
|
15923
|
+
get userId() {
|
|
15924
|
+
let _result = Module.ccall("csp_common_AccessControlChangedNetworkEventData__Get_UserId", "string", ["number"], [this.pointer]);
|
|
15925
|
+
return _result;
|
|
15926
|
+
}
|
|
15927
|
+
set userId(value) {
|
|
15928
|
+
Module.ccall("csp_common_AccessControlChangedNetworkEventData__Set_UserId", "void", ["number", "string"], [this.pointer, value]);
|
|
15929
|
+
}
|
|
15930
|
+
}
|
|
15931
|
+
Common.AccessControlChangedNetworkEventData = AccessControlChangedNetworkEventData;
|
|
15932
|
+
})(Common || (Common = {}));
|
|
15933
|
+
(function (Common) {
|
|
15934
|
+
class SequenceChangedNetworkEventData extends Common.NetworkEventData {
|
|
15935
|
+
/** @internal */
|
|
15936
|
+
constructor(pointer) {
|
|
15937
|
+
super(pointer);
|
|
15938
|
+
}
|
|
15939
|
+
static fromNetworkEventData(baseInstance) {
|
|
15940
|
+
const nativeClassWrapper = baseInstance;
|
|
15941
|
+
return new Common.SequenceChangedNetworkEventData(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
15942
|
+
}
|
|
15943
|
+
static create() {
|
|
15944
|
+
var _ptr = Module._malloc(8);
|
|
15945
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData_Ctor", "void", ["number"], [_ptr]);
|
|
15946
|
+
var _nPtr = getNativePointer(_ptr);
|
|
15947
|
+
return new SequenceChangedNetworkEventData(_nPtr);
|
|
15948
|
+
}
|
|
15949
|
+
delete() {
|
|
15950
|
+
if (this.ownsPointer && !this.disposed) {
|
|
15951
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData_Dtor", "void", ["number"], [this.pointer]);
|
|
15952
|
+
this.disposed = true;
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
get updateType() {
|
|
15956
|
+
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_UpdateType", "number", ["number"], [this.pointer]);
|
|
15957
|
+
return _result;
|
|
15958
|
+
}
|
|
15959
|
+
set updateType(value) {
|
|
15960
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_UpdateType", "void", ["number", "number"], [this.pointer, value]);
|
|
15961
|
+
}
|
|
15962
|
+
get key() {
|
|
15963
|
+
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_Key", "string", ["number"], [this.pointer]);
|
|
15964
|
+
return _result;
|
|
15965
|
+
}
|
|
15966
|
+
set key(value) {
|
|
15967
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_Key", "void", ["number", "string"], [this.pointer, value]);
|
|
15968
|
+
}
|
|
15969
|
+
get newKey() {
|
|
15970
|
+
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_NewKey", "string", ["number"], [this.pointer]);
|
|
15971
|
+
return _result;
|
|
15972
|
+
}
|
|
15973
|
+
set newKey(value) {
|
|
15974
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_NewKey", "void", ["number", "string"], [this.pointer, value]);
|
|
15975
|
+
}
|
|
15976
|
+
get hotspotData() {
|
|
15977
|
+
const _ptr = Module._malloc(8);
|
|
15978
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_HotspotData", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
15979
|
+
const _nPtr = getNativePointer(_ptr);
|
|
15980
|
+
return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
|
|
15981
|
+
}
|
|
15982
|
+
set hotspotData(value) {
|
|
15983
|
+
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_HotspotData", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
15984
|
+
}
|
|
15985
|
+
}
|
|
15986
|
+
Common.SequenceChangedNetworkEventData = SequenceChangedNetworkEventData;
|
|
15987
|
+
})(Common || (Common = {}));
|
|
15988
|
+
(function (Multiplayer) {
|
|
15989
|
+
/**
|
|
15990
|
+
* @description Class for creating and managing multiplayer objects known as space entities.
|
|
15991
|
+
* /// This provides functions to create and manage multiple player avatars and other objects.
|
|
15992
|
+
* It manages things like queueing updated entities and triggering tick events. Callbacks
|
|
15993
|
+
* can be registered for certain events that occur within the entity system so clients can
|
|
15994
|
+
* react appropriately.
|
|
15995
|
+
*/
|
|
15996
|
+
class OnlineRealtimeEngine extends Common.IRealtimeEngine {
|
|
15997
|
+
/** @internal */
|
|
15998
|
+
constructor(pointer) {
|
|
15999
|
+
super(pointer);
|
|
16000
|
+
}
|
|
16001
|
+
static fromIRealtimeEngine(baseInstance) {
|
|
16002
|
+
const nativeClassWrapper = baseInstance;
|
|
16003
|
+
return new Multiplayer.OnlineRealtimeEngine(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
16004
|
+
}
|
|
16005
|
+
/**
|
|
16006
|
+
* @description OnlineRealtimeEngine constructor
|
|
16007
|
+
* @param inMultiplayerConnection - The multiplayer connection to construct the onlinerealtimeengine with
|
|
16008
|
+
* @param logSystem - Logger such that this system can print status and debug output
|
|
16009
|
+
* @param networkEventBus - Reference the the network event bus, used for leadership election messaging.
|
|
16010
|
+
* @param remoteScriptRunner - Object capable of running a script. Called to execute scripts when the leader
|
|
16011
|
+
* election system
|
|
16012
|
+
*/
|
|
16013
|
+
static create_multiplayerConnection_logSystem_networkEventBus_remoteScriptRunner(multiplayerConnection, logSystem, networkEventBus, remoteScriptRunner) {
|
|
16014
|
+
var _ptr = Module._malloc(8);
|
|
16015
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_Ctor_MultiplayerConnectionR_LogSystemR_NetworkEventBusR_IJSScriptRunnerR", "void", ["number", "number", "number", "number", "number"], [
|
|
16016
|
+
_ptr,
|
|
16017
|
+
multiplayerConnection.pointer,
|
|
16018
|
+
logSystem.pointer,
|
|
16019
|
+
networkEventBus.pointer,
|
|
16020
|
+
remoteScriptRunner.pointer,
|
|
16021
|
+
]);
|
|
16022
|
+
var _nPtr = getNativePointer(_ptr);
|
|
16023
|
+
return new OnlineRealtimeEngine(_nPtr);
|
|
16024
|
+
}
|
|
16025
|
+
/**
|
|
16026
|
+
* @description Returns the concrete type of the instantiation of the abstract IRealtimeEngine.
|
|
16027
|
+
*/
|
|
16028
|
+
getRealtimeEngineType() {
|
|
16029
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetRealtimeEngineTypeC_RealtimeEngineType", "number", ["number"], [this.pointer]);
|
|
16030
|
+
return _result;
|
|
16031
|
+
}
|
|
16032
|
+
/**
|
|
16033
|
+
* @description Create and add a SpaceEntity with type Avatar, and relevant components and default states as specified.
|
|
16034
|
+
* @param name - The entity name of the newly created avatar entity.
|
|
16035
|
+
* @param userId - The Id of the user creating the avatar. This can be fetched from csp::systems::UserSystem::GetLoginState
|
|
16036
|
+
* @param spaceTransform - The initial transform to set the SpaceEntity to.
|
|
16037
|
+
* @param state - The initial Avatar State to set.
|
|
16038
|
+
* @param avatarId - The ID to be set on the AvatarSpaceComponent
|
|
16039
|
+
* @param avatarPlayMode - The Initial AvatarPlayMode to set.
|
|
16040
|
+
* @param callback - Csp::multiplayer::entitycreatedcallback a callback that executes when the creation is complete,
|
|
16041
|
+
* which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
|
|
16042
|
+
*/
|
|
16043
|
+
async createAvatar(name, userId, spaceTransform, isVisible, state, avatarId, avatarPlayMode) {
|
|
16044
|
+
var _resolve;
|
|
16045
|
+
var _promise = new Promise((_r) => {
|
|
16046
|
+
_resolve = _r;
|
|
16047
|
+
});
|
|
16048
|
+
var _callbackPtr;
|
|
16049
|
+
var _callback = (_stateObject__, arg1) => {
|
|
16050
|
+
var _arg1Ptr = getNativePointer(arg1);
|
|
16051
|
+
var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
|
|
16052
|
+
_resolve(_arg1Instance);
|
|
16053
|
+
Module.removeFunction(_callbackPtr);
|
|
16054
|
+
};
|
|
16055
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
16056
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_CreateAvatar_void_StringRC_StringRC_SpaceTransformRC_bool_AvatarStateRC_StringRC_AvatarPlayModeRC_EntityCreatedCallback", "void", [
|
|
16057
|
+
"number",
|
|
16058
|
+
"string",
|
|
16059
|
+
"string",
|
|
16060
|
+
"number",
|
|
16061
|
+
"boolean",
|
|
16062
|
+
"number",
|
|
16063
|
+
"string",
|
|
16064
|
+
"number",
|
|
16065
|
+
"number",
|
|
16066
|
+
"number",
|
|
16067
|
+
], [
|
|
16068
|
+
this.pointer,
|
|
16069
|
+
name,
|
|
16070
|
+
userId,
|
|
16071
|
+
spaceTransform.pointer,
|
|
16072
|
+
isVisible,
|
|
16073
|
+
state,
|
|
16074
|
+
avatarId,
|
|
16075
|
+
avatarPlayMode,
|
|
16076
|
+
_callbackPtr,
|
|
16077
|
+
0,
|
|
16078
|
+
]);
|
|
16079
|
+
return _promise;
|
|
16080
|
+
}
|
|
16081
|
+
/**
|
|
16082
|
+
* @description Create and add a SpaceEntity, with relevant default values.
|
|
16083
|
+
* @param name - The name of the newly created SpaceEntity.
|
|
16084
|
+
* @param spaceTransform - The initial transform to set the SpaceEntity to.
|
|
16085
|
+
* @param parentID - ID of another entity in the space that this entity should be created as a child to. If empty,
|
|
16086
|
+
* entity is created as a root entity.
|
|
16087
|
+
* @param callback - A callback that executes when the creation is complete,
|
|
16088
|
+
* which will provide a non-owning pointer to the new SpaceEntity so that it can be used on the local client.
|
|
16089
|
+
*/
|
|
16090
|
+
async createEntity(name, spaceTransform, parentID) {
|
|
16091
|
+
var _resolve;
|
|
16092
|
+
var _promise = new Promise((_r) => {
|
|
16093
|
+
_resolve = _r;
|
|
16094
|
+
});
|
|
16095
|
+
var _callbackPtr;
|
|
16096
|
+
var _callback = (_stateObject__, arg1) => {
|
|
16097
|
+
var _arg1Ptr = getNativePointer(arg1);
|
|
16098
|
+
var _arg1Instance = new Multiplayer.SpaceEntity(_arg1Ptr);
|
|
16099
|
+
_resolve(_arg1Instance);
|
|
16100
|
+
Module.removeFunction(_callbackPtr);
|
|
16101
|
+
};
|
|
16102
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
16103
|
+
var parentIDPointer = 0;
|
|
16104
|
+
if (parentID != null) {
|
|
16105
|
+
parentIDPointer = Module._malloc(4);
|
|
16106
|
+
Module.setValue(parentIDPointer, parentID, "i32");
|
|
16107
|
+
}
|
|
16108
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_CreateEntity_void_StringRC_SpaceTransformRC_uint64_tRC_EntityCreatedCallback", "void", ["number", "string", "number", "bigint", "number", "number"], [
|
|
16109
|
+
this.pointer,
|
|
16110
|
+
name,
|
|
16111
|
+
spaceTransform.pointer,
|
|
16112
|
+
parentIDPointer,
|
|
16113
|
+
_callbackPtr,
|
|
16114
|
+
0,
|
|
16115
|
+
]);
|
|
16116
|
+
if (parentIDPointer) {
|
|
16117
|
+
Module._free(parentIDPointer);
|
|
16118
|
+
}
|
|
16119
|
+
return _promise;
|
|
16120
|
+
}
|
|
16121
|
+
/**
|
|
16122
|
+
* @description Add a new entity to the system.
|
|
16123
|
+
* /// This can be called at any time from any thread and internally add the entity to a pending
|
|
16124
|
+
* list which is then updated in a thread safe manner when ProcessPendingEntityOperations
|
|
16125
|
+
* is called from the main thread.
|
|
16126
|
+
* /// @param EntityToAdd SpaceEntity : Pointer to the entity to be added.
|
|
16127
|
+
*/
|
|
16128
|
+
addEntity(entityToAdd) {
|
|
16129
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_AddEntity_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToAdd.pointer]);
|
|
16130
|
+
}
|
|
16131
|
+
/**
|
|
16132
|
+
* @description Destroy the specified entity.
|
|
16133
|
+
* @param entity - A non-owning pointer to the entity to be destroyed.
|
|
16134
|
+
* @param callback - A callback that executes when the entity destruction is complete.
|
|
16135
|
+
*/
|
|
16136
|
+
async destroyEntity(entity) {
|
|
16137
|
+
var _resolve;
|
|
16138
|
+
var _promise = new Promise((_r) => {
|
|
16139
|
+
_resolve = _r;
|
|
16140
|
+
});
|
|
16141
|
+
var _callbackPtr;
|
|
16142
|
+
var _callback = (_stateObject__, arg1) => {
|
|
16143
|
+
_resolve(!!arg1);
|
|
16144
|
+
Module.removeFunction(_callbackPtr);
|
|
16145
|
+
};
|
|
16146
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
16147
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_DestroyEntity_void_SpaceEntityP_CallbackHandler", "void", ["number", "number", "number", "number"], [this.pointer, entity.pointer, _callbackPtr, 0]);
|
|
16148
|
+
return _promise;
|
|
16149
|
+
}
|
|
16150
|
+
/**
|
|
16151
|
+
* @description Sets a callback to be executed when an entity is fully created.
|
|
16152
|
+
* /// Only one EntityCreatedCallback may be registered, calling this function again will override whatever was previously set.
|
|
16153
|
+
* /// @param Callback csp::multiplayer::EntityCreatedCallback : the callback to execute.
|
|
16154
|
+
*/
|
|
16155
|
+
setEntityCreatedCallback(callback) {
|
|
16156
|
+
var _callback = (_stateObject__, arg1) => {
|
|
16157
|
+
var _arg1 = new Multiplayer.SpaceEntity(getNativePointer(arg1));
|
|
16158
|
+
callback(_arg1);
|
|
16159
|
+
};
|
|
16160
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
16161
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetEntityCreatedCallback_void_EntityCreatedCallback", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
16162
|
+
}
|
|
16163
|
+
/**
|
|
16164
|
+
* @description Finds the first found SpaceEntity of a matching Name.
|
|
16165
|
+
* @param name - The name to search.
|
|
16166
|
+
* @return A non-owning pointer to the first found matching SpaceEntity.
|
|
16167
|
+
*/
|
|
16168
|
+
findSpaceEntity(name) {
|
|
16169
|
+
var _ret = Module._malloc(8);
|
|
16170
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntity_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
|
|
16171
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16172
|
+
Module._free(_ret);
|
|
16173
|
+
return _nPtr;
|
|
16174
|
+
}
|
|
16175
|
+
/**
|
|
16176
|
+
* @description Finds the first found SpaceEntity that has the ID EntityId.
|
|
16177
|
+
* @param entityId - The Id to look for.
|
|
16178
|
+
* @return A non-owning pointer to the first found matching SpaceEntity.
|
|
16179
|
+
*/
|
|
16180
|
+
findSpaceEntityById(entityId) {
|
|
16181
|
+
assert(entityId >= Limits.UINT64_MIN);
|
|
16182
|
+
assert(entityId <= Limits.UINT64_MAX);
|
|
16183
|
+
var _ret = Module._malloc(8);
|
|
16184
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceEntityById_SpaceEntityP_uint64_t", "void", ["number", "number", "bigint"], [_ret, this.pointer, entityId]);
|
|
16185
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16186
|
+
Module._free(_ret);
|
|
16187
|
+
return _nPtr;
|
|
16188
|
+
}
|
|
16189
|
+
/**
|
|
16190
|
+
* @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will contain an AvatarSpaceComponent.
|
|
16191
|
+
* @param name - The name to search for.
|
|
16192
|
+
* @return A pointer to the first found matching SpaceEntity.
|
|
16193
|
+
*/
|
|
16194
|
+
findSpaceAvatar(name) {
|
|
16195
|
+
var _ret = Module._malloc(8);
|
|
16196
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceAvatar_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
|
|
16197
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16198
|
+
Module._free(_ret);
|
|
16199
|
+
return _nPtr;
|
|
16200
|
+
}
|
|
16201
|
+
/**
|
|
16202
|
+
* @description Finds the first found SpaceEntity of a matching Name. The found SpaceEntity will not contain an AvatarSpaceComponent.
|
|
16203
|
+
* @param name - The name to search for.
|
|
16204
|
+
* @return A pointer to the first found matching SpaceEntity.
|
|
16205
|
+
*/
|
|
16206
|
+
findSpaceObject(name) {
|
|
16207
|
+
var _ret = Module._malloc(8);
|
|
16208
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_FindSpaceObject_SpaceEntityP_StringRC", "void", ["number", "number", "string"], [_ret, this.pointer, name]);
|
|
16209
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16210
|
+
Module._free(_ret);
|
|
16211
|
+
return _nPtr;
|
|
16212
|
+
}
|
|
16213
|
+
/**
|
|
16214
|
+
* @description Get an Entity by its index.
|
|
16215
|
+
* /// @param EntityIndex size_t : The index of the entity to get.
|
|
16216
|
+
* @return A non-owning pointer to the entity at the given index.
|
|
16217
|
+
*/
|
|
16218
|
+
getEntityByIndex(entityIndex) {
|
|
16219
|
+
assert(Number.isInteger(entityIndex));
|
|
16220
|
+
assert(entityIndex >= Limits.UINT32_MIN);
|
|
16221
|
+
assert(entityIndex <= Limits.UINT32_MAX);
|
|
16222
|
+
var _ret = Module._malloc(8);
|
|
16223
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetEntityByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, entityIndex]);
|
|
16224
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16225
|
+
Module._free(_ret);
|
|
16226
|
+
return _nPtr;
|
|
16227
|
+
}
|
|
16228
|
+
/**
|
|
16229
|
+
* @description Get an Avatar by its index. The returned pointer will be an entity that contains an AvatarSpaceComponent.
|
|
16230
|
+
* /// @param AvatarIndex size_t : The index of the avatar entity to get.
|
|
16231
|
+
* @return A non-owning pointer to the avatar entity with the given index.
|
|
16232
|
+
*/
|
|
16233
|
+
getAvatarByIndex(avatarIndex) {
|
|
16234
|
+
assert(Number.isInteger(avatarIndex));
|
|
16235
|
+
assert(avatarIndex >= Limits.UINT32_MIN);
|
|
16236
|
+
assert(avatarIndex <= Limits.UINT32_MAX);
|
|
16237
|
+
var _ret = Module._malloc(8);
|
|
16238
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetAvatarByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, avatarIndex]);
|
|
16239
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16240
|
+
Module._free(_ret);
|
|
16241
|
+
return _nPtr;
|
|
16242
|
+
}
|
|
16243
|
+
/**
|
|
16244
|
+
* @description Get an Object by its index. The returned pointer will be an entity that does not contain an AvatarSpaceComponent.
|
|
16245
|
+
* /// @param ObjectIndex size_t : The index of the object entity to get.
|
|
16246
|
+
* @return A non-owning pointer to the object entity with the given index.
|
|
16247
|
+
*/
|
|
16248
|
+
getObjectByIndex(objectIndex) {
|
|
16249
|
+
assert(Number.isInteger(objectIndex));
|
|
16250
|
+
assert(objectIndex >= Limits.UINT32_MIN);
|
|
16251
|
+
assert(objectIndex <= Limits.UINT32_MAX);
|
|
16252
|
+
var _ret = Module._malloc(8);
|
|
16253
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetObjectByIndex_SpaceEntityP_size_t", "void", ["number", "number", "number"], [_ret, this.pointer, objectIndex]);
|
|
16254
|
+
var _nPtr = new Multiplayer.SpaceEntity(getNativePointer(_ret));
|
|
16255
|
+
Module._free(_ret);
|
|
16256
|
+
return _nPtr;
|
|
16257
|
+
}
|
|
16258
|
+
/**
|
|
16259
|
+
* @description Get the number of total entities in the system.
|
|
16260
|
+
* @return The total number of entities.
|
|
16261
|
+
*/
|
|
16262
|
+
getNumEntities() {
|
|
16263
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumEntitiesC_size_t", "number", ["number"], [this.pointer]);
|
|
16264
|
+
const _unfixedValue = _result;
|
|
16265
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
16266
|
+
_result = _fixedValue;
|
|
16267
|
+
return _result;
|
|
16268
|
+
}
|
|
16269
|
+
/**
|
|
16270
|
+
* @description Get the number of total Avatars in the system. Avatars are entities that contain AvatarSpaceComponents.
|
|
16271
|
+
* @return The total number of Avatar entities.
|
|
16272
|
+
*/
|
|
16273
|
+
getNumAvatars() {
|
|
16274
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumAvatarsC_size_t", "number", ["number"], [this.pointer]);
|
|
16275
|
+
const _unfixedValue = _result;
|
|
16276
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
16277
|
+
_result = _fixedValue;
|
|
16278
|
+
return _result;
|
|
16279
|
+
}
|
|
16280
|
+
/**
|
|
16281
|
+
* @description Get the number of total Objects in the system. Objects are entities that do not contain AvatarSpaceComponents.
|
|
16282
|
+
* @return The total number of object entities.
|
|
16283
|
+
*/
|
|
16284
|
+
getNumObjects() {
|
|
16285
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetNumObjectsC_size_t", "number", ["number"], [this.pointer]);
|
|
16286
|
+
const _unfixedValue = _result;
|
|
16287
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2 ** 32 : _unfixedValue;
|
|
16288
|
+
_result = _fixedValue;
|
|
16289
|
+
return _result;
|
|
16290
|
+
}
|
|
16291
|
+
/**
|
|
16292
|
+
* @description Retrieves all entities that exist at the root level (do not have a parent entity).
|
|
16293
|
+
* @return A list of root entities containing non-owning pointers to entities.
|
|
16294
|
+
*/
|
|
16295
|
+
getRootHierarchyEntities() {
|
|
16296
|
+
var _ret = Module._malloc(8);
|
|
16297
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetRootHierarchyEntitiesC_ListPC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
16298
|
+
var _nPtr = new Common.List(getNativePointer(_ret), csp_multiplayer_SpaceEntityFactory, "csp_multiplayer_SpaceEntity");
|
|
16299
|
+
Module._free(_ret);
|
|
16300
|
+
return _nPtr;
|
|
16301
|
+
}
|
|
16302
|
+
/**
|
|
16303
|
+
* @description Adds an entity to a list of entities to be updated when ProcessPendingEntityOperations is called.
|
|
16304
|
+
* From a client perspective, ProcessPendingEntityOperations is normally called via the CSPFoundation::Tick method.
|
|
16305
|
+
* @param entity - A non-owning pointer to the entity to be marked.
|
|
16306
|
+
*/
|
|
16307
|
+
markEntityForUpdate(entity) {
|
|
16308
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_MarkEntityForUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
|
|
16309
|
+
}
|
|
16310
|
+
/**
|
|
16311
|
+
* @description Applies any pending changes to entities that have been marked for update.
|
|
16312
|
+
*/
|
|
16313
|
+
processPendingEntityOperations() {
|
|
16314
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ProcessPendingEntityOperations_void", "void", ["number"], [this.pointer]);
|
|
16315
|
+
}
|
|
16316
|
+
/**
|
|
16317
|
+
* @description Sets a callback to be executed when the script system is ready to run scripts.
|
|
16318
|
+
* @param callback - The callback to execute.
|
|
16319
|
+
*/
|
|
16320
|
+
setScriptLeaderReadyCallback(callback) {
|
|
16321
|
+
var _callback = (_stateObject__, arg1) => {
|
|
16322
|
+
callback(arg1);
|
|
16323
|
+
};
|
|
16324
|
+
var _callbackPtr = Module.addFunction(_callback, "vii");
|
|
16325
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetScriptLeaderReadyCallback_void_CallbackHandler", "void", ["number", "number", "number"], [this.pointer, _callbackPtr, 0]);
|
|
16061
16326
|
}
|
|
16062
|
-
|
|
16063
|
-
|
|
16327
|
+
/**
|
|
16328
|
+
* @description Sets the script owner for the given entity to the current client
|
|
16329
|
+
* @param entity - A pointer to the entity
|
|
16330
|
+
*/
|
|
16331
|
+
claimScriptOwnership(entity) {
|
|
16332
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ClaimScriptOwnershipC_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
|
|
16064
16333
|
}
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16334
|
+
/**
|
|
16335
|
+
* @description Enable Leader Election feature.
|
|
16336
|
+
*/
|
|
16337
|
+
enableLeaderElection() {
|
|
16338
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_EnableLeaderElection_void", "void", ["number"], [this.pointer]);
|
|
16070
16339
|
}
|
|
16071
|
-
|
|
16072
|
-
|
|
16340
|
+
/**
|
|
16341
|
+
* @description Disable Leader Election feature.
|
|
16342
|
+
*/
|
|
16343
|
+
disableLeaderElection() {
|
|
16344
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_DisableLeaderElection_void", "void", ["number"], [this.pointer]);
|
|
16073
16345
|
}
|
|
16074
|
-
|
|
16075
|
-
|
|
16346
|
+
/**
|
|
16347
|
+
* @description Check if the Leader Election feature is enabled.
|
|
16348
|
+
* @return True if enabled, false otherwise.
|
|
16349
|
+
*/
|
|
16350
|
+
isLeaderElectionEnabled() {
|
|
16351
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_IsLeaderElectionEnabledC_bool", "boolean", ["number"], [this.pointer]);
|
|
16076
16352
|
return _result;
|
|
16077
16353
|
}
|
|
16078
|
-
|
|
16079
|
-
|
|
16354
|
+
/**
|
|
16355
|
+
* @description Debug helper to get the id of the currently elected script leader.
|
|
16356
|
+
* @return The id of the leader.
|
|
16357
|
+
*/
|
|
16358
|
+
getLeaderId() {
|
|
16359
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetLeaderIdC_uint64_t", "bigint", ["number"], [this.pointer]);
|
|
16360
|
+
const _unfixedValue = _result;
|
|
16361
|
+
let _fixedValue = _unfixedValue < 0 ? _unfixedValue + 2n ** 64n : _unfixedValue;
|
|
16362
|
+
_result = _fixedValue;
|
|
16363
|
+
return _result;
|
|
16080
16364
|
}
|
|
16081
|
-
|
|
16082
|
-
|
|
16365
|
+
/**
|
|
16366
|
+
* @description Retrieve the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
|
|
16367
|
+
* @return True if enabled, false otherwise.
|
|
16368
|
+
*/
|
|
16369
|
+
getEntityPatchRateLimitEnabled() {
|
|
16370
|
+
let _result = Module.ccall("csp_multiplayer_OnlineRealtimeEngine_GetEntityPatchRateLimitEnabledC_bool", "boolean", ["number"], [this.pointer]);
|
|
16083
16371
|
return _result;
|
|
16084
16372
|
}
|
|
16085
|
-
|
|
16086
|
-
|
|
16373
|
+
/**
|
|
16374
|
+
* @description Set the state of the patch rate limiter. If true, patches are limited for each individual entity to a fixed rate.
|
|
16375
|
+
* /// This feature is enabled by default and should only be disabled if you are encountering issues.
|
|
16376
|
+
* /// @param Enabled : sets if the feature should be enabled or not.
|
|
16377
|
+
* \rst
|
|
16378
|
+
* .. note::
|
|
16379
|
+
* If disabling this feature, more requests will be made to Magnopus Connected Services,
|
|
16380
|
+
* and consequently more patch merges may occur on the server as a result.
|
|
16381
|
+
* \endrst
|
|
16382
|
+
*/
|
|
16383
|
+
setEntityPatchRateLimitEnabled(enabled) {
|
|
16384
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_SetEntityPatchRateLimitEnabled_void_bool", "void", ["number", "boolean"], [this.pointer, enabled]);
|
|
16087
16385
|
}
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
(
|
|
16092
|
-
|
|
16093
|
-
/** @internal */
|
|
16094
|
-
constructor(pointer) {
|
|
16095
|
-
super(pointer);
|
|
16386
|
+
/**
|
|
16387
|
+
* @description Locks the entity mutex.
|
|
16388
|
+
*/
|
|
16389
|
+
lockEntityUpdate() {
|
|
16390
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_LockEntityUpdateC_void", "void", ["number"], [this.pointer]);
|
|
16096
16391
|
}
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16392
|
+
/**
|
|
16393
|
+
* @description Unlocks the entity mutex.
|
|
16394
|
+
*/
|
|
16395
|
+
unlockEntityUpdate() {
|
|
16396
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_UnlockEntityUpdateC_void", "void", ["number"], [this.pointer]);
|
|
16100
16397
|
}
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16398
|
+
/**
|
|
16399
|
+
* @description Queues a specific entity to update. Used in SpaceEntity to queue updates via passing the this pointer
|
|
16400
|
+
*/
|
|
16401
|
+
queueEntityUpdate(entityToUpdate) {
|
|
16402
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_QueueEntityUpdate_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entityToUpdate.pointer]);
|
|
16403
|
+
}
|
|
16404
|
+
/**
|
|
16405
|
+
* @description "Resolves" the entity heirarchy, such that the entity is parented appropriately, and internal buffers are populated appropriately.
|
|
16406
|
+
* (Vague, need more understanding about what this does)
|
|
16407
|
+
*/
|
|
16408
|
+
resolveEntityHierarchy(entity) {
|
|
16409
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_ResolveEntityHierarchy_void_SpaceEntityP", "void", ["number", "number"], [this.pointer, entity.pointer]);
|
|
16106
16410
|
}
|
|
16107
16411
|
delete() {
|
|
16108
16412
|
if (this.ownsPointer && !this.disposed) {
|
|
16109
|
-
Module.ccall("
|
|
16413
|
+
Module.ccall("csp_multiplayer_OnlineRealtimeEngine_Dtor", "void", ["number"], [this.pointer]);
|
|
16110
16414
|
this.disposed = true;
|
|
16111
16415
|
}
|
|
16112
16416
|
}
|
|
16113
|
-
get updateType() {
|
|
16114
|
-
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_UpdateType", "number", ["number"], [this.pointer]);
|
|
16115
|
-
return _result;
|
|
16116
|
-
}
|
|
16117
|
-
set updateType(value) {
|
|
16118
|
-
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_UpdateType", "void", ["number", "number"], [this.pointer, value]);
|
|
16119
|
-
}
|
|
16120
|
-
get key() {
|
|
16121
|
-
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_Key", "string", ["number"], [this.pointer]);
|
|
16122
|
-
return _result;
|
|
16123
|
-
}
|
|
16124
|
-
set key(value) {
|
|
16125
|
-
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_Key", "void", ["number", "string"], [this.pointer, value]);
|
|
16126
|
-
}
|
|
16127
|
-
get newKey() {
|
|
16128
|
-
let _result = Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_NewKey", "string", ["number"], [this.pointer]);
|
|
16129
|
-
return _result;
|
|
16130
|
-
}
|
|
16131
|
-
set newKey(value) {
|
|
16132
|
-
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_NewKey", "void", ["number", "string"], [this.pointer, value]);
|
|
16133
|
-
}
|
|
16134
|
-
get hotspotData() {
|
|
16135
|
-
const _ptr = Module._malloc(8);
|
|
16136
|
-
Module.ccall("csp_common_SequenceChangedNetworkEventData__Get_HotspotData", "void", ["number", "number"], [_ptr, this.pointer]);
|
|
16137
|
-
const _nPtr = getNativePointer(_ptr);
|
|
16138
|
-
return new Common.HotspotSequenceChangedNetworkEventData(_nPtr);
|
|
16139
|
-
}
|
|
16140
|
-
set hotspotData(value) {
|
|
16141
|
-
Module.ccall("csp_common_SequenceChangedNetworkEventData__Set_HotspotData", "void", ["number", "number"], [this.pointer, value.pointer]);
|
|
16142
|
-
}
|
|
16143
16417
|
}
|
|
16144
|
-
|
|
16145
|
-
})(
|
|
16418
|
+
Multiplayer.OnlineRealtimeEngine = OnlineRealtimeEngine;
|
|
16419
|
+
})(Multiplayer || (Multiplayer = {}));
|
|
16146
16420
|
(function (Multiplayer) {
|
|
16147
16421
|
/**
|
|
16148
16422
|
@ingroup AnimatedModelSpaceComponent
|
|
@@ -21709,6 +21983,40 @@ export class CSPFoundation {
|
|
|
21709
21983
|
}
|
|
21710
21984
|
Multiplayer.AnnotationThumbnailCollectionResult = AnnotationThumbnailCollectionResult;
|
|
21711
21985
|
})(Multiplayer || (Multiplayer = {}));
|
|
21986
|
+
(function (Systems) {
|
|
21987
|
+
/**
|
|
21988
|
+
@ingroup Status System
|
|
21989
|
+
* @description Data class used to contain information when a Response is received from the Status Server
|
|
21990
|
+
*/
|
|
21991
|
+
class ServicesDeploymentStatusResult extends Systems.ResultBase {
|
|
21992
|
+
/** @internal */
|
|
21993
|
+
constructor(pointer) {
|
|
21994
|
+
super(pointer);
|
|
21995
|
+
}
|
|
21996
|
+
static fromResultBase(baseInstance) {
|
|
21997
|
+
const nativeClassWrapper = baseInstance;
|
|
21998
|
+
return new Systems.ServicesDeploymentStatusResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
21999
|
+
}
|
|
22000
|
+
/**
|
|
22001
|
+
* @description Will return services deployment status for the latest available deployment from the server
|
|
22002
|
+
* @return The latest services deployment status
|
|
22003
|
+
*/
|
|
22004
|
+
getLatestServicesDeploymentStatus() {
|
|
22005
|
+
var _ret = Module._malloc(8);
|
|
22006
|
+
Module.ccall("csp_systems_ServicesDeploymentStatusResult_GetLatestServicesDeploymentStatusC_ServicesDeploymentStatusRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
22007
|
+
var _nPtr = new Systems.ServicesDeploymentStatus(getNativePointer(_ret));
|
|
22008
|
+
Module._free(_ret);
|
|
22009
|
+
return _nPtr;
|
|
22010
|
+
}
|
|
22011
|
+
delete() {
|
|
22012
|
+
if (this.ownsPointer && !this.disposed) {
|
|
22013
|
+
Module.ccall("csp_systems_ServicesDeploymentStatusResult_Dtor", "void", ["number"], [this.pointer]);
|
|
22014
|
+
this.disposed = true;
|
|
22015
|
+
}
|
|
22016
|
+
}
|
|
22017
|
+
}
|
|
22018
|
+
Systems.ServicesDeploymentStatusResult = ServicesDeploymentStatusResult;
|
|
22019
|
+
})(Systems || (Systems = {}));
|
|
21712
22020
|
(function (Systems) {
|
|
21713
22021
|
/**
|
|
21714
22022
|
* @description A result handler that is used to notify a user of an error.
|
|
@@ -25975,6 +26283,123 @@ export class CSPFoundation {
|
|
|
25975
26283
|
}
|
|
25976
26284
|
Systems.SequenceSystem = SequenceSystem;
|
|
25977
26285
|
})(Systems || (Systems = {}));
|
|
26286
|
+
(function (Systems) {
|
|
26287
|
+
/**
|
|
26288
|
+
@ingroup Application Settings System
|
|
26289
|
+
* @description Represents the result of a request for application settings.
|
|
26290
|
+
*/
|
|
26291
|
+
class ApplicationSettingsResult extends Systems.ResultBase {
|
|
26292
|
+
/** @internal */
|
|
26293
|
+
constructor(pointer) {
|
|
26294
|
+
super(pointer);
|
|
26295
|
+
}
|
|
26296
|
+
static fromResultBase(baseInstance) {
|
|
26297
|
+
const nativeClassWrapper = baseInstance;
|
|
26298
|
+
return new Systems.ApplicationSettingsResult(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
26299
|
+
}
|
|
26300
|
+
getApplicationSettings() {
|
|
26301
|
+
var _ret = Module._malloc(8);
|
|
26302
|
+
Module.ccall("csp_systems_ApplicationSettingsResult_GetApplicationSettingsC_ApplicationSettingsRC", "void", ["number", "number"], [_ret, this.pointer]);
|
|
26303
|
+
var _nPtr = new Systems.ApplicationSettings(getNativePointer(_ret));
|
|
26304
|
+
Module._free(_ret);
|
|
26305
|
+
return _nPtr;
|
|
26306
|
+
}
|
|
26307
|
+
delete() {
|
|
26308
|
+
if (this.ownsPointer && !this.disposed) {
|
|
26309
|
+
Module.ccall("csp_systems_ApplicationSettingsResult_Dtor", "void", ["number"], [this.pointer]);
|
|
26310
|
+
this.disposed = true;
|
|
26311
|
+
}
|
|
26312
|
+
}
|
|
26313
|
+
}
|
|
26314
|
+
Systems.ApplicationSettingsResult = ApplicationSettingsResult;
|
|
26315
|
+
})(Systems || (Systems = {}));
|
|
26316
|
+
(function (Systems) {
|
|
26317
|
+
/**
|
|
26318
|
+
@ingroup Application Settings System
|
|
26319
|
+
* @description Public facing system that allows interfacing with Magnopus Connected Services' application settings service.
|
|
26320
|
+
*/
|
|
26321
|
+
class ApplicationSettingsSystem extends Systems.SystemBase {
|
|
26322
|
+
/** @internal */
|
|
26323
|
+
constructor(pointer) {
|
|
26324
|
+
super(pointer);
|
|
26325
|
+
}
|
|
26326
|
+
static fromSystemBase(baseInstance) {
|
|
26327
|
+
const nativeClassWrapper = baseInstance;
|
|
26328
|
+
return new Systems.ApplicationSettingsSystem(new NativePointer(nativeClassWrapper.pointer, nativeClassWrapper.ownsPointer));
|
|
26329
|
+
}
|
|
26330
|
+
/**
|
|
26331
|
+
* @description Asynchronously retrieves application settings for a specific context.
|
|
26332
|
+
* @param applicationName - The name of the application for which settings are requested.
|
|
26333
|
+
* @param context - The specific context whose settings should be retrieved.
|
|
26334
|
+
* @param keys - Array of setting keys to retrieve. If not provided, all settings
|
|
26335
|
+
* for the context are returned.
|
|
26336
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
26337
|
+
*/
|
|
26338
|
+
async getSettingsByContext(applicationName, context, keys) {
|
|
26339
|
+
var _resolve;
|
|
26340
|
+
var _promise = new Promise((_r) => {
|
|
26341
|
+
_resolve = _r;
|
|
26342
|
+
});
|
|
26343
|
+
var _callbackPtr;
|
|
26344
|
+
var _callback = (_stateObject__, result) => {
|
|
26345
|
+
var _resultPtr = getNativePointer(result);
|
|
26346
|
+
var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
|
|
26347
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
26348
|
+
return;
|
|
26349
|
+
}
|
|
26350
|
+
_resolve(_resultInstance);
|
|
26351
|
+
Module.removeFunction(_callbackPtr);
|
|
26352
|
+
};
|
|
26353
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
26354
|
+
Module.ccall("csp_systems_ApplicationSettingsSystem_GetSettingsByContext_void_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback", "void", ["number", "string", "string", "number", "number", "number"], [
|
|
26355
|
+
this.pointer,
|
|
26356
|
+
applicationName,
|
|
26357
|
+
context,
|
|
26358
|
+
keys != null ? keys.pointer : 0,
|
|
26359
|
+
_callbackPtr,
|
|
26360
|
+
0,
|
|
26361
|
+
]);
|
|
26362
|
+
return _promise;
|
|
26363
|
+
}
|
|
26364
|
+
/**
|
|
26365
|
+
* @description Asynchronously retrieves application settings for a specific context without requiring authentication.
|
|
26366
|
+
* @param tenant - The tenant identifier under which the application and settings are scoped.
|
|
26367
|
+
* @param applicationName - The name of the application for which settings are requested.
|
|
26368
|
+
* @param context - The specific context whose settings should be retrieved.
|
|
26369
|
+
* @param keys - Array of setting keys to retrieve. If not provided, all settings
|
|
26370
|
+
* for the context are returned.
|
|
26371
|
+
* @param callback - Callback when asynchronous task finishes.
|
|
26372
|
+
*/
|
|
26373
|
+
async getSettingsByContextAnonymous(tenant, applicationName, context, keys) {
|
|
26374
|
+
var _resolve;
|
|
26375
|
+
var _promise = new Promise((_r) => {
|
|
26376
|
+
_resolve = _r;
|
|
26377
|
+
});
|
|
26378
|
+
var _callbackPtr;
|
|
26379
|
+
var _callback = (_stateObject__, result) => {
|
|
26380
|
+
var _resultPtr = getNativePointer(result);
|
|
26381
|
+
var _resultInstance = new Systems.ApplicationSettingsResult(_resultPtr);
|
|
26382
|
+
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
26383
|
+
return;
|
|
26384
|
+
}
|
|
26385
|
+
_resolve(_resultInstance);
|
|
26386
|
+
Module.removeFunction(_callbackPtr);
|
|
26387
|
+
};
|
|
26388
|
+
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
26389
|
+
Module.ccall("csp_systems_ApplicationSettingsSystem_GetSettingsByContextAnonymous_void_StringRC_StringRC_StringRC_ArrayRC_ApplicationSettingsResultCallback", "void", ["number", "string", "string", "string", "number", "number", "number"], [
|
|
26390
|
+
this.pointer,
|
|
26391
|
+
tenant,
|
|
26392
|
+
applicationName,
|
|
26393
|
+
context,
|
|
26394
|
+
keys != null ? keys.pointer : 0,
|
|
26395
|
+
_callbackPtr,
|
|
26396
|
+
0,
|
|
26397
|
+
]);
|
|
26398
|
+
return _promise;
|
|
26399
|
+
}
|
|
26400
|
+
}
|
|
26401
|
+
Systems.ApplicationSettingsSystem = ApplicationSettingsSystem;
|
|
26402
|
+
})(Systems || (Systems = {}));
|
|
25978
26403
|
(function (Systems) {
|
|
25979
26404
|
/**
|
|
25980
26405
|
@ingroup Settings System
|
|
@@ -26544,6 +26969,7 @@ export class CSPFoundation {
|
|
|
26544
26969
|
var _nPtr = getNativePointer(_ptr);
|
|
26545
26970
|
return new Space(_nPtr);
|
|
26546
26971
|
}
|
|
26972
|
+
// operator=
|
|
26547
26973
|
delete() {
|
|
26548
26974
|
if (this.ownsPointer && !this.disposed) {
|
|
26549
26975
|
Module.ccall("csp_systems_Space_Dtor", "void", ["number"], [this.pointer]);
|
|
@@ -26958,14 +27384,18 @@ export class CSPFoundation {
|
|
|
26958
27384
|
}
|
|
26959
27385
|
/**
|
|
26960
27386
|
* @description Enter a space if you have permission to, based on the Space settings.
|
|
26961
|
-
*
|
|
26962
|
-
*
|
|
27387
|
+
* Registers the user as in the space on the backend service, and calls csp::common::IRealtimeEngine::FetchAllEntitiesAndPopulateBuffers.
|
|
27388
|
+
* The initial load behaviour will differ based on the concrete IRealtimeEngine passed to this function.
|
|
26963
27389
|
* If user does not have permission to discover or enter the space, callback will be called with EResultCode::Failed and
|
|
26964
27390
|
* ERequestFailureReason::UserSpaceAccessDenied
|
|
26965
27391
|
* @param space - Space to enter into
|
|
27392
|
+
* @param realtimeEngine - RealtimeEngine to load the space with. This object belongs to the caller, and does not
|
|
27393
|
+
* transfer ownership. Once the space is loaded, the caller should be sure to maintain the lifetime of the RealtimeEngine so long
|
|
27394
|
+
* as the space is active. Once the caller has called csp::systems::SpaceSystem::ExitSpace and received the callback, then they are
|
|
27395
|
+
* free to release the memory.
|
|
26966
27396
|
* @param callback - Callback when asynchronous task finishes
|
|
26967
27397
|
*/
|
|
26968
|
-
async enterSpace(spaceId) {
|
|
27398
|
+
async enterSpace(spaceId, realtimeEngine) {
|
|
26969
27399
|
var _resolve;
|
|
26970
27400
|
var _promise = new Promise((_r) => {
|
|
26971
27401
|
_resolve = _r;
|
|
@@ -26973,7 +27403,7 @@ export class CSPFoundation {
|
|
|
26973
27403
|
var _callbackPtr;
|
|
26974
27404
|
var _callback = (_stateObject__, result) => {
|
|
26975
27405
|
var _resultPtr = getNativePointer(result);
|
|
26976
|
-
var _resultInstance = new Systems.
|
|
27406
|
+
var _resultInstance = new Systems.SpaceResult(_resultPtr);
|
|
26977
27407
|
if (_resultInstance.getResultCode() == Systems.EResultCode.InProgress) {
|
|
26978
27408
|
return;
|
|
26979
27409
|
}
|
|
@@ -26981,7 +27411,7 @@ export class CSPFoundation {
|
|
|
26981
27411
|
Module.removeFunction(_callbackPtr);
|
|
26982
27412
|
};
|
|
26983
27413
|
_callbackPtr = Module.addFunction(_callback, "vii");
|
|
26984
|
-
Module.ccall("
|
|
27414
|
+
Module.ccall("csp_systems_SpaceSystem_EnterSpace_void_StringRC_IRealtimeEngineP_SpaceResultCallback", "void", ["number", "string", "number", "number", "number"], [this.pointer, spaceId, realtimeEngine.pointer, _callbackPtr, 0]);
|
|
26985
27415
|
return _promise;
|
|
26986
27416
|
}
|
|
26987
27417
|
/**
|
|
@@ -29824,6 +30254,20 @@ export class CSPFoundation {
|
|
|
29824
30254
|
Module._free(_ret);
|
|
29825
30255
|
return _inst;
|
|
29826
30256
|
}
|
|
30257
|
+
static ofcsp_systems_VersionMetadata() {
|
|
30258
|
+
var _ret = Module._malloc(8);
|
|
30259
|
+
Module.ccall("csp_common_Array_Ctor_csp_systems_VersionMetadata", "void", ["number"], [_ret]);
|
|
30260
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_VersionMetadataFactory, "csp_systems_VersionMetadata");
|
|
30261
|
+
Module._free(_ret);
|
|
30262
|
+
return _inst;
|
|
30263
|
+
}
|
|
30264
|
+
static ofcsp_systems_ServiceStatus() {
|
|
30265
|
+
var _ret = Module._malloc(8);
|
|
30266
|
+
Module.ccall("csp_common_Array_Ctor_csp_systems_ServiceStatus", "void", ["number"], [_ret]);
|
|
30267
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_ServiceStatusFactory, "csp_systems_ServiceStatus");
|
|
30268
|
+
Module._free(_ret);
|
|
30269
|
+
return _inst;
|
|
30270
|
+
}
|
|
29827
30271
|
static ofString() {
|
|
29828
30272
|
var _ret = Module._malloc(8);
|
|
29829
30273
|
Module.ccall("csp_common_Array_Ctor_String", "void", ["number"], [_ret]);
|
|
@@ -30125,6 +30569,20 @@ export class CSPFoundation {
|
|
|
30125
30569
|
Module._free(_ret);
|
|
30126
30570
|
return _inst;
|
|
30127
30571
|
}
|
|
30572
|
+
static ofcsp_systems_VersionMetadata_number(size) {
|
|
30573
|
+
var _ret = Module._malloc(8);
|
|
30574
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_VersionMetadata", "void", ["number", "number"], [_ret, size]);
|
|
30575
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_VersionMetadataFactory, "csp_systems_VersionMetadata");
|
|
30576
|
+
Module._free(_ret);
|
|
30577
|
+
return _inst;
|
|
30578
|
+
}
|
|
30579
|
+
static ofcsp_systems_ServiceStatus_number(size) {
|
|
30580
|
+
var _ret = Module._malloc(8);
|
|
30581
|
+
Module.ccall("csp_common_Array_Conv_size_tC_csp_systems_ServiceStatus", "void", ["number", "number"], [_ret, size]);
|
|
30582
|
+
var _inst = new Array(getNativePointer(_ret), csp_systems_ServiceStatusFactory, "csp_systems_ServiceStatus");
|
|
30583
|
+
Module._free(_ret);
|
|
30584
|
+
return _inst;
|
|
30585
|
+
}
|
|
30128
30586
|
static ofString_number(size) {
|
|
30129
30587
|
var _ret = Module._malloc(8);
|
|
30130
30588
|
Module.ccall("csp_common_Array_Conv_size_tC_String", "void", ["number", "number"], [_ret, size]);
|