@dcl/ecs 7.3.15-6201184205.commit-767716e → 7.3.15-6201308535.commit-dd17bb7

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.
Files changed (67) hide show
  1. package/dist/components/generated/AvatarBase.gen.d.ts +1 -0
  2. package/dist/components/generated/AvatarBase.gen.js +25 -0
  3. package/dist/components/generated/AvatarEmoteCommand.gen.d.ts +1 -0
  4. package/dist/components/generated/AvatarEmoteCommand.gen.js +25 -0
  5. package/dist/components/generated/AvatarEquippedData.gen.d.ts +1 -0
  6. package/dist/components/generated/AvatarEquippedData.gen.js +25 -0
  7. package/dist/components/generated/PlayerIdentityData.gen.d.ts +1 -0
  8. package/dist/components/generated/PlayerIdentityData.gen.js +25 -0
  9. package/dist/components/generated/component-names.gen.js +4 -0
  10. package/dist/components/generated/pb/decentraland/sdk/components/avatar_base.gen.d.ts +20 -0
  11. package/dist/components/generated/pb/decentraland/sdk/components/avatar_base.gen.js +78 -0
  12. package/dist/components/generated/pb/decentraland/sdk/components/avatar_emote_command.gen.d.ts +32 -0
  13. package/dist/components/generated/pb/decentraland/sdk/components/avatar_emote_command.gen.js +88 -0
  14. package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +20 -0
  15. package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js +50 -0
  16. package/dist/components/generated/pb/decentraland/sdk/components/player_identity_data.gen.d.ts +21 -0
  17. package/dist/components/generated/pb/decentraland/sdk/components/player_identity_data.gen.js +50 -0
  18. package/dist/components/index.d.ts +5 -0
  19. package/dist/components/index.js +6 -0
  20. package/dist/components/manual/SyncComponents.d.ts +9 -0
  21. package/dist/components/manual/SyncComponents.js +8 -0
  22. package/dist/components/types.d.ts +1 -0
  23. package/dist/engine/component.d.ts +1 -1
  24. package/dist/engine/entity.d.ts +20 -1
  25. package/dist/engine/entity.js +48 -11
  26. package/dist/engine/grow-only-value-set-component-definition.js +3 -1
  27. package/dist/engine/index.js +19 -2
  28. package/dist/engine/lww-element-set-component-definition.d.ts +1 -1
  29. package/dist/engine/lww-element-set-component-definition.js +8 -1
  30. package/dist/engine/types.d.ts +13 -2
  31. package/dist/index.d.ts +7 -1
  32. package/dist/index.js +6 -0
  33. package/dist/systems/crdt/index.js +3 -1
  34. package/dist-cjs/components/generated/AvatarBase.gen.d.ts +1 -0
  35. package/dist-cjs/components/generated/AvatarBase.gen.js +28 -0
  36. package/dist-cjs/components/generated/AvatarEmoteCommand.gen.d.ts +1 -0
  37. package/dist-cjs/components/generated/AvatarEmoteCommand.gen.js +28 -0
  38. package/dist-cjs/components/generated/AvatarEquippedData.gen.d.ts +1 -0
  39. package/dist-cjs/components/generated/AvatarEquippedData.gen.js +28 -0
  40. package/dist-cjs/components/generated/PlayerIdentityData.gen.d.ts +1 -0
  41. package/dist-cjs/components/generated/PlayerIdentityData.gen.js +28 -0
  42. package/dist-cjs/components/generated/component-names.gen.js +4 -0
  43. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_base.gen.d.ts +20 -0
  44. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_base.gen.js +84 -0
  45. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_emote_command.gen.d.ts +32 -0
  46. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_emote_command.gen.js +94 -0
  47. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +20 -0
  48. package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js +56 -0
  49. package/dist-cjs/components/generated/pb/decentraland/sdk/components/player_identity_data.gen.d.ts +21 -0
  50. package/dist-cjs/components/generated/pb/decentraland/sdk/components/player_identity_data.gen.js +56 -0
  51. package/dist-cjs/components/index.d.ts +5 -0
  52. package/dist-cjs/components/index.js +8 -1
  53. package/dist-cjs/components/manual/SyncComponents.d.ts +9 -0
  54. package/dist-cjs/components/manual/SyncComponents.js +10 -0
  55. package/dist-cjs/components/types.d.ts +1 -0
  56. package/dist-cjs/engine/component.d.ts +1 -1
  57. package/dist-cjs/engine/entity.d.ts +20 -1
  58. package/dist-cjs/engine/entity.js +49 -12
  59. package/dist-cjs/engine/grow-only-value-set-component-definition.js +3 -1
  60. package/dist-cjs/engine/index.js +19 -2
  61. package/dist-cjs/engine/lww-element-set-component-definition.d.ts +1 -1
  62. package/dist-cjs/engine/lww-element-set-component-definition.js +8 -1
  63. package/dist-cjs/engine/types.d.ts +13 -2
  64. package/dist-cjs/index.d.ts +7 -1
  65. package/dist-cjs/index.js +7 -1
  66. package/dist-cjs/systems/crdt/index.js +3 -1
  67. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { PBAvatarBase } from './pb/decentraland/sdk/components/avatar_base.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const AvatarBaseSchema = {
6
+ COMPONENT_ID: 1087,
7
+ serialize(value, builder) {
8
+ const writer = PBAvatarBase.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBAvatarBase.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBAvatarBase.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarBase"
24
+ }
25
+ };
@@ -0,0 +1,25 @@
1
+ import { PBAvatarEmoteCommand } from './pb/decentraland/sdk/components/avatar_emote_command.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const AvatarEmoteCommandSchema = {
6
+ COMPONENT_ID: 1088,
7
+ serialize(value, builder) {
8
+ const writer = PBAvatarEmoteCommand.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBAvatarEmoteCommand.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBAvatarEmoteCommand.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarEmoteCommand"
24
+ }
25
+ };
@@ -0,0 +1,25 @@
1
+ import { PBAvatarEquippedData } from './pb/decentraland/sdk/components/avatar_equipped_data.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const AvatarEquippedDataSchema = {
6
+ COMPONENT_ID: 1091,
7
+ serialize(value, builder) {
8
+ const writer = PBAvatarEquippedData.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBAvatarEquippedData.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBAvatarEquippedData.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarEquippedData"
24
+ }
25
+ };
@@ -0,0 +1,25 @@
1
+ import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
2
+ /**
3
+ * @internal
4
+ */
5
+ export const PlayerIdentityDataSchema = {
6
+ COMPONENT_ID: 1089,
7
+ serialize(value, builder) {
8
+ const writer = PBPlayerIdentityData.encode(value);
9
+ const buffer = new Uint8Array(writer.finish(), 0, writer.len);
10
+ builder.writeBuffer(buffer, false);
11
+ },
12
+ deserialize(reader) {
13
+ return PBPlayerIdentityData.decode(reader.buffer(), reader.remainingBytes());
14
+ },
15
+ create() {
16
+ // TODO: this is a hack.
17
+ return PBPlayerIdentityData.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBPlayerIdentityData"
24
+ }
25
+ };
@@ -7,6 +7,9 @@ export const coreComponentMappings = {
7
7
  "core::AudioSource": 1020,
8
8
  "core::AudioStream": 1021,
9
9
  "core::AvatarAttach": 1073,
10
+ "core::AvatarBase": 1087,
11
+ "core::AvatarEmoteCommand": 1088,
12
+ "core::AvatarEquippedData": 1091,
10
13
  "core::AvatarModifierArea": 1070,
11
14
  "core::AvatarShape": 1080,
12
15
  "core::Billboard": 1090,
@@ -19,6 +22,7 @@ export const coreComponentMappings = {
19
22
  "core::MeshCollider": 1019,
20
23
  "core::MeshRenderer": 1018,
21
24
  "core::NftShape": 1040,
25
+ "core::PlayerIdentityData": 1089,
22
26
  "core::PointerEvents": 1062,
23
27
  "core::PointerEventsResult": 1063,
24
28
  "core::PointerLock": 1074,
@@ -0,0 +1,20 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ import { Color3 } from "../../common/colors.gen";
3
+ /** AvatarBase sets all modifiers over the avatar's apparence. */
4
+ /**
5
+ * @public
6
+ */
7
+ export interface PBAvatarBase {
8
+ skinColor: Color3 | undefined;
9
+ eyesColor: Color3 | undefined;
10
+ hairColor: Color3 | undefined;
11
+ bodyShapeUrn: string;
12
+ name: string;
13
+ }
14
+ /**
15
+ * @public
16
+ */
17
+ export declare namespace PBAvatarBase {
18
+ function encode(message: PBAvatarBase, writer?: _m0.Writer): _m0.Writer;
19
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarBase;
20
+ }
@@ -0,0 +1,78 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Color3 } from "../../common/colors.gen";
4
+ const protobufPackageSarasa = "decentraland.sdk.components";
5
+ function createBasePBAvatarBase() {
6
+ return { skinColor: undefined, eyesColor: undefined, hairColor: undefined, bodyShapeUrn: "", name: "" };
7
+ }
8
+ /**
9
+ * @public
10
+ */
11
+ export var PBAvatarBase;
12
+ (function (PBAvatarBase) {
13
+ function encode(message, writer = _m0.Writer.create()) {
14
+ if (message.skinColor !== undefined) {
15
+ Color3.encode(message.skinColor, writer.uint32(10).fork()).ldelim();
16
+ }
17
+ if (message.eyesColor !== undefined) {
18
+ Color3.encode(message.eyesColor, writer.uint32(18).fork()).ldelim();
19
+ }
20
+ if (message.hairColor !== undefined) {
21
+ Color3.encode(message.hairColor, writer.uint32(26).fork()).ldelim();
22
+ }
23
+ if (message.bodyShapeUrn !== "") {
24
+ writer.uint32(34).string(message.bodyShapeUrn);
25
+ }
26
+ if (message.name !== "") {
27
+ writer.uint32(42).string(message.name);
28
+ }
29
+ return writer;
30
+ }
31
+ PBAvatarBase.encode = encode;
32
+ function decode(input, length) {
33
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
34
+ let end = length === undefined ? reader.len : reader.pos + length;
35
+ const message = createBasePBAvatarBase();
36
+ while (reader.pos < end) {
37
+ const tag = reader.uint32();
38
+ switch (tag >>> 3) {
39
+ case 1:
40
+ if (tag !== 10) {
41
+ break;
42
+ }
43
+ message.skinColor = Color3.decode(reader, reader.uint32());
44
+ continue;
45
+ case 2:
46
+ if (tag !== 18) {
47
+ break;
48
+ }
49
+ message.eyesColor = Color3.decode(reader, reader.uint32());
50
+ continue;
51
+ case 3:
52
+ if (tag !== 26) {
53
+ break;
54
+ }
55
+ message.hairColor = Color3.decode(reader, reader.uint32());
56
+ continue;
57
+ case 4:
58
+ if (tag !== 34) {
59
+ break;
60
+ }
61
+ message.bodyShapeUrn = reader.string();
62
+ continue;
63
+ case 5:
64
+ if (tag !== 42) {
65
+ break;
66
+ }
67
+ message.name = reader.string();
68
+ continue;
69
+ }
70
+ if ((tag & 7) === 4 || tag === 0) {
71
+ break;
72
+ }
73
+ reader.skipType(tag & 7);
74
+ }
75
+ return message;
76
+ }
77
+ PBAvatarBase.decode = decode;
78
+ })(PBAvatarBase || (PBAvatarBase = {}));
@@ -0,0 +1,32 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /**
3
+ * AvatarEmoteCommand is a grow only value set, used to signal the renderer about
4
+ * avatar emotes playback.
5
+ */
6
+ /**
7
+ * @public
8
+ */
9
+ export interface PBAvatarEmoteCommand {
10
+ emoteCommand: PBAvatarEmoteCommand_EmoteCommand | undefined;
11
+ }
12
+ /**
13
+ * @public
14
+ */
15
+ export interface PBAvatarEmoteCommand_EmoteCommand {
16
+ emoteUrn: string;
17
+ loop: boolean;
18
+ }
19
+ /**
20
+ * @public
21
+ */
22
+ export declare namespace PBAvatarEmoteCommand {
23
+ function encode(message: PBAvatarEmoteCommand, writer?: _m0.Writer): _m0.Writer;
24
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand;
25
+ }
26
+ /**
27
+ * @public
28
+ */
29
+ export declare namespace PBAvatarEmoteCommand_EmoteCommand {
30
+ function encode(message: PBAvatarEmoteCommand_EmoteCommand, writer?: _m0.Writer): _m0.Writer;
31
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand_EmoteCommand;
32
+ }
@@ -0,0 +1,88 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ const protobufPackageSarasa = "decentraland.sdk.components";
4
+ function createBasePBAvatarEmoteCommand() {
5
+ return { emoteCommand: undefined };
6
+ }
7
+ /**
8
+ * @public
9
+ */
10
+ export var PBAvatarEmoteCommand;
11
+ (function (PBAvatarEmoteCommand) {
12
+ function encode(message, writer = _m0.Writer.create()) {
13
+ if (message.emoteCommand !== undefined) {
14
+ PBAvatarEmoteCommand_EmoteCommand.encode(message.emoteCommand, writer.uint32(10).fork()).ldelim();
15
+ }
16
+ return writer;
17
+ }
18
+ PBAvatarEmoteCommand.encode = encode;
19
+ function decode(input, length) {
20
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
21
+ let end = length === undefined ? reader.len : reader.pos + length;
22
+ const message = createBasePBAvatarEmoteCommand();
23
+ while (reader.pos < end) {
24
+ const tag = reader.uint32();
25
+ switch (tag >>> 3) {
26
+ case 1:
27
+ if (tag !== 10) {
28
+ break;
29
+ }
30
+ message.emoteCommand = PBAvatarEmoteCommand_EmoteCommand.decode(reader, reader.uint32());
31
+ continue;
32
+ }
33
+ if ((tag & 7) === 4 || tag === 0) {
34
+ break;
35
+ }
36
+ reader.skipType(tag & 7);
37
+ }
38
+ return message;
39
+ }
40
+ PBAvatarEmoteCommand.decode = decode;
41
+ })(PBAvatarEmoteCommand || (PBAvatarEmoteCommand = {}));
42
+ function createBasePBAvatarEmoteCommand_EmoteCommand() {
43
+ return { emoteUrn: "", loop: false };
44
+ }
45
+ /**
46
+ * @public
47
+ */
48
+ export var PBAvatarEmoteCommand_EmoteCommand;
49
+ (function (PBAvatarEmoteCommand_EmoteCommand) {
50
+ function encode(message, writer = _m0.Writer.create()) {
51
+ if (message.emoteUrn !== "") {
52
+ writer.uint32(10).string(message.emoteUrn);
53
+ }
54
+ if (message.loop === true) {
55
+ writer.uint32(16).bool(message.loop);
56
+ }
57
+ return writer;
58
+ }
59
+ PBAvatarEmoteCommand_EmoteCommand.encode = encode;
60
+ function decode(input, length) {
61
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
62
+ let end = length === undefined ? reader.len : reader.pos + length;
63
+ const message = createBasePBAvatarEmoteCommand_EmoteCommand();
64
+ while (reader.pos < end) {
65
+ const tag = reader.uint32();
66
+ switch (tag >>> 3) {
67
+ case 1:
68
+ if (tag !== 10) {
69
+ break;
70
+ }
71
+ message.emoteUrn = reader.string();
72
+ continue;
73
+ case 2:
74
+ if (tag !== 16) {
75
+ break;
76
+ }
77
+ message.loop = reader.bool();
78
+ continue;
79
+ }
80
+ if ((tag & 7) === 4 || tag === 0) {
81
+ break;
82
+ }
83
+ reader.skipType(tag & 7);
84
+ }
85
+ return message;
86
+ }
87
+ PBAvatarEmoteCommand_EmoteCommand.decode = decode;
88
+ })(PBAvatarEmoteCommand_EmoteCommand || (PBAvatarEmoteCommand_EmoteCommand = {}));
@@ -0,0 +1,20 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /**
3
+ * AvatarEquipData is used to read the information about the avatar's owneables.
4
+ * this component is written by the engine using the communications transports'
5
+ * data.
6
+ */
7
+ /**
8
+ * @public
9
+ */
10
+ export interface PBAvatarEquippedData {
11
+ wearableUrns: string[];
12
+ emotesUrns: string[];
13
+ }
14
+ /**
15
+ * @public
16
+ */
17
+ export declare namespace PBAvatarEquippedData {
18
+ function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
19
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
20
+ }
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ const protobufPackageSarasa = "decentraland.sdk.components";
4
+ function createBasePBAvatarEquippedData() {
5
+ return { wearableUrns: [], emotesUrns: [] };
6
+ }
7
+ /**
8
+ * @public
9
+ */
10
+ export var PBAvatarEquippedData;
11
+ (function (PBAvatarEquippedData) {
12
+ function encode(message, writer = _m0.Writer.create()) {
13
+ for (const v of message.wearableUrns) {
14
+ writer.uint32(10).string(v);
15
+ }
16
+ for (const v of message.emotesUrns) {
17
+ writer.uint32(18).string(v);
18
+ }
19
+ return writer;
20
+ }
21
+ PBAvatarEquippedData.encode = encode;
22
+ function decode(input, length) {
23
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBasePBAvatarEquippedData();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1:
30
+ if (tag !== 10) {
31
+ break;
32
+ }
33
+ message.wearableUrns.push(reader.string());
34
+ continue;
35
+ case 2:
36
+ if (tag !== 18) {
37
+ break;
38
+ }
39
+ message.emotesUrns.push(reader.string());
40
+ continue;
41
+ }
42
+ if ((tag & 7) === 4 || tag === 0) {
43
+ break;
44
+ }
45
+ reader.skipType(tag & 7);
46
+ }
47
+ return message;
48
+ }
49
+ PBAvatarEquippedData.decode = decode;
50
+ })(PBAvatarEquippedData || (PBAvatarEquippedData = {}));
@@ -0,0 +1,21 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ /**
3
+ * PlayerIdentityData is used to read the information about the avatar's
4
+ * identity. this component is written by the engine using the communications
5
+ * transports' data.
6
+ */
7
+ /**
8
+ * @public
9
+ */
10
+ export interface PBPlayerIdentityData {
11
+ /** ethereum address of this player */
12
+ address: string;
13
+ isGuest: boolean;
14
+ }
15
+ /**
16
+ * @public
17
+ */
18
+ export declare namespace PBPlayerIdentityData {
19
+ function encode(message: PBPlayerIdentityData, writer?: _m0.Writer): _m0.Writer;
20
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PBPlayerIdentityData;
21
+ }
@@ -0,0 +1,50 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ const protobufPackageSarasa = "decentraland.sdk.components";
4
+ function createBasePBPlayerIdentityData() {
5
+ return { address: "", isGuest: false };
6
+ }
7
+ /**
8
+ * @public
9
+ */
10
+ export var PBPlayerIdentityData;
11
+ (function (PBPlayerIdentityData) {
12
+ function encode(message, writer = _m0.Writer.create()) {
13
+ if (message.address !== "") {
14
+ writer.uint32(10).string(message.address);
15
+ }
16
+ if (message.isGuest === true) {
17
+ writer.uint32(24).bool(message.isGuest);
18
+ }
19
+ return writer;
20
+ }
21
+ PBPlayerIdentityData.encode = encode;
22
+ function decode(input, length) {
23
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBasePBPlayerIdentityData();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1:
30
+ if (tag !== 10) {
31
+ break;
32
+ }
33
+ message.address = reader.string();
34
+ continue;
35
+ case 3:
36
+ if (tag !== 24) {
37
+ break;
38
+ }
39
+ message.isGuest = reader.bool();
40
+ continue;
41
+ }
42
+ if ((tag & 7) === 4 || tag === 0) {
43
+ break;
44
+ }
45
+ reader.skipType(tag & 7);
46
+ }
47
+ return message;
48
+ }
49
+ PBPlayerIdentityData.decode = decode;
50
+ })(PBPlayerIdentityData || (PBPlayerIdentityData = {}));
@@ -6,6 +6,7 @@ import { MeshColliderComponentDefinitionExtended } from './extended/MeshCollider
6
6
  import { MeshRendererComponentDefinitionExtended } from './extended/MeshRenderer';
7
7
  import { LwwComponentGetter, GSetComponentGetter } from './generated/index.gen';
8
8
  import { NameType } from './manual/Name';
9
+ import { ISyncComponentsType } from './manual/SyncComponents';
9
10
  import { TransformComponentExtended } from './manual/Transform';
10
11
  export * from './generated/index.gen';
11
12
  export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
@@ -18,3 +19,7 @@ export declare const MeshCollider: LwwComponentGetter<MeshColliderComponentDefin
18
19
  * @alpha
19
20
  */
20
21
  export declare const Name: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<NameType>;
22
+ /**
23
+ * @alpha
24
+ */
25
+ export declare const SyncComponents: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<ISyncComponentsType>;
@@ -3,6 +3,7 @@ import { defineMaterialComponent } from './extended/Material';
3
3
  import { defineMeshColliderComponent } from './extended/MeshCollider';
4
4
  import { defineMeshRendererComponent } from './extended/MeshRenderer';
5
5
  import defineNameComponent from './manual/Name';
6
+ import defineSyncComponent from './manual/SyncComponents';
6
7
  import { defineTransformComponent } from './manual/Transform';
7
8
  export * from './generated/index.gen';
8
9
  /* @__PURE__ */
@@ -20,3 +21,8 @@ export const MeshCollider = (engine) => defineMeshColliderComponent(engine);
20
21
  */
21
22
  /* @__PURE__ */
22
23
  export const Name = (engine) => defineNameComponent(engine);
24
+ /**
25
+ * @alpha
26
+ */
27
+ /* @__PURE__ */
28
+ export const SyncComponents = (engine) => defineSyncComponent(engine);
@@ -0,0 +1,9 @@
1
+ import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine/types';
2
+ export interface ISyncComponentsType {
3
+ componentIds: number[];
4
+ }
5
+ export type ISyncComponents = LastWriteWinElementSetComponentDefinition<ISyncComponentsType>;
6
+ declare function defineSyncComponents(engine: Pick<IEngine, 'defineComponent'>): import("../../engine/types").MapComponentDefinition<import("../..").MapResult<{
7
+ componentIds: import("../../schemas").ISchema<number[]>;
8
+ }>>;
9
+ export default defineSyncComponents;
@@ -0,0 +1,8 @@
1
+ import { Schemas } from '../../schemas';
2
+ function defineSyncComponents(engine) {
3
+ const SyncComponents = engine.defineComponent('core-schema::Sync-Components', {
4
+ componentIds: Schemas.Array(Schemas.Int64)
5
+ });
6
+ return SyncComponents;
7
+ }
8
+ export default defineSyncComponents;
@@ -4,3 +4,4 @@ export type { MeshColliderComponentDefinitionExtended } from './extended/MeshCol
4
4
  export type { TextureHelper, MaterialComponentDefinitionExtended } from './extended/Material';
5
5
  export type { TransformComponentExtended, TransformTypeWithOptionals } from './manual/Transform';
6
6
  export type { NameComponent, NameType } from './manual/Name';
7
+ export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponents';
@@ -43,7 +43,7 @@ export interface BaseComponent<T> {
43
43
  * This function writes the whole state of the component into a ByteBuffer
44
44
  * @public
45
45
  */
46
- dumpCrdtStateToBuffer(buffer: ByteBuffer): void;
46
+ dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
47
47
  /**
48
48
  * @public
49
49
  * Marks the entity as deleted and signals it cannot be used ever again. It must
@@ -17,6 +17,24 @@ export type uint32 = number;
17
17
  export type Entity = number & {
18
18
  __entity_type: '';
19
19
  };
20
+ /**
21
+ * This first 512 entities are reserved by the renderer
22
+ */
23
+ export declare const RESERVED_STATIC_ENTITIES = 512;
24
+ export declare const RESERVED_LOCAL_ENTITIES = 65535;
25
+ /**
26
+ * @public
27
+ */
28
+ export declare namespace EntityUtils {
29
+ /**
30
+ * @returns [entityNumber, entityVersion]
31
+ */
32
+ function fromEntityId(entityId: Entity): [number, number];
33
+ /**
34
+ * @returns compound number from entityNumber and entityVerison
35
+ */
36
+ function toEntityId(entityNumber: number, entityVersion: number): Entity;
37
+ }
20
38
  /**
21
39
  * @public
22
40
  */
@@ -39,11 +57,12 @@ export declare enum EntityState {
39
57
  * @intenral
40
58
  */
41
59
  export type EntityContainer = {
42
- generateEntity(): Entity;
60
+ generateEntity(networked?: boolean): Entity;
43
61
  removeEntity(entity: Entity): boolean;
44
62
  getEntityState(entity: Entity): EntityState;
45
63
  getExistingEntities(): Set<Entity>;
46
64
  releaseRemovedEntities(): Entity[];
47
65
  updateRemovedEntity(entity: Entity): boolean;
48
66
  updateUsedEntity(entity: Entity): boolean;
67
+ setNetworkEntitiesRange(reservedLocalEntities: number, range: [number, number]): void;
49
68
  };