@dcl/playground-assets 7.1.1-4387338275.commit-167a7e2 → 7.1.1-4388004980.commit-d41e42b
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/dist/alpha.d.ts +95 -0
- package/dist/beta.d.ts +95 -0
- package/dist/index.bundled.d.ts +95 -0
- package/dist/index.js +40 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +95 -0
- package/etc/playground-assets.api.json +1172 -76
- package/etc/playground-assets.api.md +55 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/sdk",
|
|
3
|
-
"version": "7.1.1-
|
|
3
|
+
"version": "7.1.1-4388004980.commit-d41e42b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"displayName": "SDK",
|
|
31
31
|
"tsconfig": "./tsconfig.json"
|
|
32
32
|
},
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "d41e42b3708afee075cd36ec8ab5649b119f88ad"
|
|
34
34
|
}
|
|
@@ -70,6 +70,19 @@ export declare type AppendValueMessageBody = {
|
|
|
70
70
|
data: Uint8Array;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export declare namespace AppendValueOperation {
|
|
77
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
|
78
|
+
/**
|
|
79
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
|
80
|
+
* already allocated
|
|
81
|
+
*/
|
|
82
|
+
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
83
|
+
export function read(buf: ByteBuffer): AppendValueMessage | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
73
86
|
/** @public */
|
|
74
87
|
export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
|
|
75
88
|
|
|
@@ -160,6 +173,11 @@ export declare interface BaseComponent<T> {
|
|
|
160
173
|
* @public
|
|
161
174
|
*/
|
|
162
175
|
getCrdtUpdates(): Iterable<CrdtMessageBody>;
|
|
176
|
+
/**
|
|
177
|
+
* This function writes the whole state of the component into a ByteBuffer
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
dumpCrdtState(buffer: ByteBuffer): void;
|
|
163
181
|
/**
|
|
164
182
|
* @public
|
|
165
183
|
* Marks the entity as deleted and signals it cannot be used ever again. It must
|
|
@@ -1110,6 +1128,35 @@ export declare type CrdtMessageHeader = {
|
|
|
1110
1128
|
type: uint32;
|
|
1111
1129
|
};
|
|
1112
1130
|
|
|
1131
|
+
/**
|
|
1132
|
+
* @public
|
|
1133
|
+
*/
|
|
1134
|
+
export declare namespace CrdtMessageProtocol {
|
|
1135
|
+
/**
|
|
1136
|
+
* Validate if the message incoming is completed
|
|
1137
|
+
* @param buf - ByteBuffer
|
|
1138
|
+
*/
|
|
1139
|
+
export function validate(buf: ByteBuffer): boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Get the current header, consuming the bytes involved.
|
|
1142
|
+
* @param buf - ByteBuffer
|
|
1143
|
+
* @returns header or null if there is no validated message
|
|
1144
|
+
*/
|
|
1145
|
+
export function readHeader(buf: ByteBuffer): CrdtMessageHeader | null;
|
|
1146
|
+
/**
|
|
1147
|
+
* Get the current header, without consuming the bytes involved.
|
|
1148
|
+
* @param buf - ByteBuffer
|
|
1149
|
+
* @returns header or null if there is no validated message
|
|
1150
|
+
*/
|
|
1151
|
+
export function getHeader(buf: ByteBuffer): CrdtMessageHeader | null;
|
|
1152
|
+
/**
|
|
1153
|
+
* Consume the incoming message without processing it.
|
|
1154
|
+
* @param buf - ByteBuffer
|
|
1155
|
+
* @returns true in case of success or false if there is no valid message.
|
|
1156
|
+
*/
|
|
1157
|
+
export function consumeMessage(buf: ByteBuffer): boolean;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1113
1160
|
/**
|
|
1114
1161
|
* @public
|
|
1115
1162
|
*/
|
|
@@ -1172,6 +1219,18 @@ export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
|
1172
1219
|
*/
|
|
1173
1220
|
export declare const DEG2RAD: number;
|
|
1174
1221
|
|
|
1222
|
+
/**
|
|
1223
|
+
* @public
|
|
1224
|
+
*/
|
|
1225
|
+
export declare namespace DeleteComponent {
|
|
1226
|
+
const MESSAGE_HEADER_LENGTH = 12;
|
|
1227
|
+
/**
|
|
1228
|
+
* Write DeleteComponent message
|
|
1229
|
+
*/
|
|
1230
|
+
export function write(entity: Entity, componentId: number, timestamp: number, buf: ByteBuffer): void;
|
|
1231
|
+
export function read(buf: ByteBuffer): DeleteComponentMessage | null;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1175
1234
|
/**
|
|
1176
1235
|
* @public
|
|
1177
1236
|
*/
|
|
@@ -1190,6 +1249,15 @@ export declare type DeleteComponentMessageBody = {
|
|
|
1190
1249
|
timestamp: number;
|
|
1191
1250
|
};
|
|
1192
1251
|
|
|
1252
|
+
/**
|
|
1253
|
+
* @public
|
|
1254
|
+
*/
|
|
1255
|
+
export declare namespace DeleteEntity {
|
|
1256
|
+
const MESSAGE_HEADER_LENGTH = 4;
|
|
1257
|
+
export function write(entity: Entity, buf: ByteBuffer): void;
|
|
1258
|
+
export function read(buf: ByteBuffer): DeleteEntityMessage | null;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1193
1261
|
/**
|
|
1194
1262
|
* @public
|
|
1195
1263
|
*/
|
|
@@ -1239,6 +1307,13 @@ export declare interface EcsElements {
|
|
|
1239
1307
|
};
|
|
1240
1308
|
}
|
|
1241
1309
|
|
|
1310
|
+
/**
|
|
1311
|
+
* Internal constructor of new engines, this is an internal API
|
|
1312
|
+
* @public
|
|
1313
|
+
* @deprecated Prevent manual usage prefer "engine" for scene development
|
|
1314
|
+
*/
|
|
1315
|
+
export declare function Engine(options?: IEngineOptions): IEngine;
|
|
1316
|
+
|
|
1242
1317
|
/**
|
|
1243
1318
|
* @public
|
|
1244
1319
|
* The engine is the part of the scene that sits in the middle and manages all of the other parts.
|
|
@@ -1615,6 +1690,13 @@ export declare interface IEngine {
|
|
|
1615
1690
|
seal(): void;
|
|
1616
1691
|
}
|
|
1617
1692
|
|
|
1693
|
+
/**
|
|
1694
|
+
* @public
|
|
1695
|
+
*/
|
|
1696
|
+
export declare interface IEngineOptions {
|
|
1697
|
+
onChangeFunction: OnChangeFunction;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1618
1700
|
export declare type IEventNames = keyof IEvents;
|
|
1619
1701
|
|
|
1620
1702
|
export declare interface IEvents {
|
|
@@ -3960,6 +4042,19 @@ export declare type PutComponentMessageBody = {
|
|
|
3960
4042
|
data: Uint8Array;
|
|
3961
4043
|
};
|
|
3962
4044
|
|
|
4045
|
+
/**
|
|
4046
|
+
* @public
|
|
4047
|
+
*/
|
|
4048
|
+
export declare namespace PutComponentOperation {
|
|
4049
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
|
4050
|
+
/**
|
|
4051
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
|
4052
|
+
* already allocated
|
|
4053
|
+
*/
|
|
4054
|
+
export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
4055
|
+
export function read(buf: ByteBuffer): PutComponentMessage | null;
|
|
4056
|
+
}
|
|
4057
|
+
|
|
3963
4058
|
/**
|
|
3964
4059
|
* @public
|
|
3965
4060
|
* Quaternion is a type and a namespace.
|