@dcl/ecs 7.22.4 → 7.22.5-24776890516.commit-b10e9ab

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 (121) hide show
  1. package/dist/components/generated/component-names.gen.js +0 -1
  2. package/dist/components/generated/global.gen.d.ts +0 -2
  3. package/dist/components/generated/global.gen.js +0 -1
  4. package/dist/components/generated/index.gen.d.ts +0 -4
  5. package/dist/components/generated/index.gen.js +0 -5
  6. package/dist/components/generated/pb/decentraland/common/colors.gen.d.ts +0 -15
  7. package/dist/components/generated/pb/decentraland/common/colors.gen.js +0 -47
  8. package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +1 -10
  9. package/dist/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +0 -10
  10. package/dist/components/generated/pb/decentraland/sdk/components/pointer_events.gen.d.ts +1 -5
  11. package/dist/components/generated/pb/decentraland/sdk/components/pointer_events.gen.js +1 -20
  12. package/dist/components/generated/types.gen.d.ts +0 -2
  13. package/dist/components/generated/types.gen.js +0 -3
  14. package/dist/components/index.d.ts +5 -2
  15. package/dist/components/index.js +5 -5
  16. package/dist/components/manual/CreatedBy.d.ts +9 -0
  17. package/dist/components/manual/CreatedBy.js +8 -0
  18. package/dist/components/manual/Transform.d.ts +9 -13
  19. package/dist/components/manual/Transform.js +3 -11
  20. package/dist/components/types.d.ts +1 -1
  21. package/dist/engine/component.d.ts +52 -1
  22. package/dist/engine/grow-only-value-set-component-definition.js +45 -2
  23. package/dist/engine/lww-element-set-component-definition.d.ts +5 -3
  24. package/dist/engine/lww-element-set-component-definition.js +70 -35
  25. package/dist/index.d.ts +2 -3
  26. package/dist/index.js +1 -3
  27. package/dist/runtime/helpers/index.d.ts +0 -1
  28. package/dist/runtime/helpers/index.js +0 -1
  29. package/dist/runtime/helpers/tree.d.ts +0 -6
  30. package/dist/runtime/helpers/tree.js +2 -2
  31. package/dist/runtime/initialization/index.d.ts +0 -7
  32. package/dist/runtime/initialization/index.js +0 -6
  33. package/dist/serialization/crdt/authoritativePutComponent.d.ts +15 -0
  34. package/dist/serialization/crdt/authoritativePutComponent.js +47 -0
  35. package/dist/serialization/crdt/index.d.ts +1 -0
  36. package/dist/serialization/crdt/index.js +1 -0
  37. package/dist/serialization/crdt/types.d.ts +25 -3
  38. package/dist/serialization/crdt/types.js +3 -1
  39. package/dist/systems/crdt/index.d.ts +0 -1
  40. package/dist/systems/crdt/index.js +55 -146
  41. package/dist/systems/events.d.ts +0 -65
  42. package/dist/systems/events.js +8 -70
  43. package/dist-cjs/components/generated/component-names.gen.js +0 -1
  44. package/dist-cjs/components/generated/global.gen.d.ts +0 -2
  45. package/dist-cjs/components/generated/global.gen.js +1 -3
  46. package/dist-cjs/components/generated/index.gen.d.ts +0 -4
  47. package/dist-cjs/components/generated/index.gen.js +2 -8
  48. package/dist-cjs/components/generated/pb/decentraland/common/colors.gen.d.ts +0 -15
  49. package/dist-cjs/components/generated/pb/decentraland/common/colors.gen.js +1 -48
  50. package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.d.ts +1 -10
  51. package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/input_action.gen.js +1 -11
  52. package/dist-cjs/components/generated/pb/decentraland/sdk/components/pointer_events.gen.d.ts +1 -5
  53. package/dist-cjs/components/generated/pb/decentraland/sdk/components/pointer_events.gen.js +1 -20
  54. package/dist-cjs/components/generated/types.gen.d.ts +0 -2
  55. package/dist-cjs/components/generated/types.gen.js +0 -5
  56. package/dist-cjs/components/index.d.ts +5 -2
  57. package/dist-cjs/components/index.js +7 -7
  58. package/dist-cjs/components/manual/CreatedBy.d.ts +9 -0
  59. package/dist-cjs/components/manual/CreatedBy.js +10 -0
  60. package/dist-cjs/components/manual/Transform.d.ts +9 -13
  61. package/dist-cjs/components/manual/Transform.js +3 -34
  62. package/dist-cjs/components/types.d.ts +1 -1
  63. package/dist-cjs/engine/component.d.ts +52 -1
  64. package/dist-cjs/engine/grow-only-value-set-component-definition.js +44 -1
  65. package/dist-cjs/engine/lww-element-set-component-definition.d.ts +5 -3
  66. package/dist-cjs/engine/lww-element-set-component-definition.js +73 -36
  67. package/dist-cjs/index.d.ts +2 -3
  68. package/dist-cjs/index.js +2 -4
  69. package/dist-cjs/runtime/helpers/index.d.ts +0 -1
  70. package/dist-cjs/runtime/helpers/index.js +0 -1
  71. package/dist-cjs/runtime/helpers/tree.d.ts +0 -6
  72. package/dist-cjs/runtime/helpers/tree.js +2 -3
  73. package/dist-cjs/runtime/initialization/index.d.ts +0 -7
  74. package/dist-cjs/runtime/initialization/index.js +1 -7
  75. package/dist-cjs/serialization/crdt/authoritativePutComponent.d.ts +15 -0
  76. package/dist-cjs/serialization/crdt/authoritativePutComponent.js +50 -0
  77. package/dist-cjs/serialization/crdt/index.d.ts +1 -0
  78. package/dist-cjs/serialization/crdt/index.js +1 -0
  79. package/dist-cjs/serialization/crdt/types.d.ts +25 -3
  80. package/dist-cjs/serialization/crdt/types.js +3 -1
  81. package/dist-cjs/systems/crdt/index.d.ts +0 -1
  82. package/dist-cjs/systems/crdt/index.js +55 -169
  83. package/dist-cjs/systems/events.d.ts +0 -65
  84. package/dist-cjs/systems/events.js +8 -70
  85. package/package.json +2 -3
  86. package/dist/components/extended/ParticleSystem.d.ts +0 -24
  87. package/dist/components/extended/ParticleSystem.js +0 -23
  88. package/dist/components/generated/ParticleSystem.gen.d.ts +0 -1
  89. package/dist/components/generated/ParticleSystem.gen.js +0 -25
  90. package/dist/components/generated/pb/decentraland/common/floats.gen.d.ts +0 -16
  91. package/dist/components/generated/pb/decentraland/common/floats.gen.js +0 -50
  92. package/dist/components/generated/pb/decentraland/sdk/components/particle_system.gen.d.ts +0 -241
  93. package/dist/components/generated/pb/decentraland/sdk/components/particle_system.gen.js +0 -717
  94. package/dist/runtime/helpers/vectors.d.ts +0 -1
  95. package/dist/runtime/helpers/vectors.js +0 -36
  96. package/dist/serialization/crdt/network/utils.d.ts +0 -9
  97. package/dist/serialization/crdt/network/utils.js +0 -60
  98. package/dist/systems/physics-force.d.ts +0 -1
  99. package/dist/systems/physics-force.js +0 -140
  100. package/dist/systems/physics-impulse.d.ts +0 -12
  101. package/dist/systems/physics-impulse.js +0 -85
  102. package/dist/systems/physics.d.ts +0 -77
  103. package/dist/systems/physics.js +0 -18
  104. package/dist-cjs/components/extended/ParticleSystem.d.ts +0 -24
  105. package/dist-cjs/components/extended/ParticleSystem.js +0 -28
  106. package/dist-cjs/components/generated/ParticleSystem.gen.d.ts +0 -1
  107. package/dist-cjs/components/generated/ParticleSystem.gen.js +0 -28
  108. package/dist-cjs/components/generated/pb/decentraland/common/floats.gen.d.ts +0 -16
  109. package/dist-cjs/components/generated/pb/decentraland/common/floats.gen.js +0 -56
  110. package/dist-cjs/components/generated/pb/decentraland/sdk/components/particle_system.gen.d.ts +0 -241
  111. package/dist-cjs/components/generated/pb/decentraland/sdk/components/particle_system.gen.js +0 -723
  112. package/dist-cjs/runtime/helpers/vectors.d.ts +0 -1
  113. package/dist-cjs/runtime/helpers/vectors.js +0 -39
  114. package/dist-cjs/serialization/crdt/network/utils.d.ts +0 -9
  115. package/dist-cjs/serialization/crdt/network/utils.js +0 -67
  116. package/dist-cjs/systems/physics-force.d.ts +0 -1
  117. package/dist-cjs/systems/physics-force.js +0 -167
  118. package/dist-cjs/systems/physics-impulse.d.ts +0 -12
  119. package/dist-cjs/systems/physics-impulse.js +0 -112
  120. package/dist-cjs/systems/physics.d.ts +0 -77
  121. package/dist-cjs/systems/physics.js +0 -23
@@ -30,7 +30,6 @@ export const coreComponentMappings = {
30
30
  "core::MeshCollider": 1019,
31
31
  "core::MeshRenderer": 1018,
32
32
  "core::NftShape": 1040,
33
- "core::ParticleSystem": 1217,
34
33
  "core::PhysicsCombinedForce": 1216,
35
34
  "core::PhysicsCombinedImpulse": 1215,
36
35
  "core::PlayerIdentityData": 1089,
@@ -22,7 +22,6 @@ import { PBInputModifier } from './pb/decentraland/sdk/components/input_modifier
22
22
  import { PBLightSource } from './pb/decentraland/sdk/components/light_source.gen';
23
23
  import { PBMainCamera } from './pb/decentraland/sdk/components/main_camera.gen';
24
24
  import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
25
- import { PBParticleSystem } from './pb/decentraland/sdk/components/particle_system.gen';
26
25
  import { PBPhysicsCombinedForce } from './pb/decentraland/sdk/components/physics_combined_force.gen';
27
26
  import { PBPhysicsCombinedImpulse } from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
28
27
  import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -73,7 +72,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
73
72
  /** @public */ export declare const LightSource: LastWriteWinElementSetComponentDefinition<PBLightSource>;
74
73
  /** @public */ export declare const MainCamera: LastWriteWinElementSetComponentDefinition<PBMainCamera>;
75
74
  /** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
76
- /** @public */ export declare const ParticleSystem: LastWriteWinElementSetComponentDefinition<PBParticleSystem>;
77
75
  /** @public */ export declare const PhysicsCombinedForce: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>;
78
76
  /** @public */ export declare const PhysicsCombinedImpulse: LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>;
79
77
  /** @public */ export declare const PlayerIdentityData: LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>;
@@ -23,7 +23,6 @@ export * from './index.gen';
23
23
  /** @public */ export const LightSource = /* @__PURE__ */ components.LightSource(engine);
24
24
  /** @public */ export const MainCamera = /* @__PURE__ */ components.MainCamera(engine);
25
25
  /** @public */ export const NftShape = /* @__PURE__ */ components.NftShape(engine);
26
- /** @public */ export const ParticleSystem = /* @__PURE__ */ components.ParticleSystem(engine);
27
26
  /** @public */ export const PhysicsCombinedForce = /* @__PURE__ */ components.PhysicsCombinedForce(engine);
28
27
  /** @public */ export const PhysicsCombinedImpulse = /* @__PURE__ */ components.PhysicsCombinedImpulse(engine);
29
28
  /** @public */ export const PlayerIdentityData = /* @__PURE__ */ components.PlayerIdentityData(engine);
@@ -26,7 +26,6 @@ import { PBMaterial } from './pb/decentraland/sdk/components/material.gen';
26
26
  import { PBMeshCollider } from './pb/decentraland/sdk/components/mesh_collider.gen';
27
27
  import { PBMeshRenderer } from './pb/decentraland/sdk/components/mesh_renderer.gen';
28
28
  import { PBNftShape } from './pb/decentraland/sdk/components/nft_shape.gen';
29
- import { PBParticleSystem } from './pb/decentraland/sdk/components/particle_system.gen';
30
29
  import { PBPhysicsCombinedForce } from './pb/decentraland/sdk/components/physics_combined_force.gen';
31
30
  import { PBPhysicsCombinedImpulse } from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
32
31
  import { PBPlayerIdentityData } from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -82,7 +81,6 @@ export * from './pb/decentraland/sdk/components/material.gen';
82
81
  export * from './pb/decentraland/sdk/components/mesh_collider.gen';
83
82
  export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
84
83
  export * from './pb/decentraland/sdk/components/nft_shape.gen';
85
- export * from './pb/decentraland/sdk/components/particle_system.gen';
86
84
  export * from './pb/decentraland/sdk/components/physics_combined_force.gen';
87
85
  export * from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
88
86
  export * from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -140,7 +138,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
140
138
  /** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
141
139
  /** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
142
140
  /** @public */ export declare const NftShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
143
- /** @public */ export declare const ParticleSystem: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
144
141
  /** @public */ export declare const PhysicsCombinedForce: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
145
142
  /** @public */ export declare const PhysicsCombinedImpulse: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
146
143
  /** @public */ export declare const PlayerIdentityData: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
@@ -198,7 +195,6 @@ export declare const componentDefinitionByName: {
198
195
  "core::MeshCollider": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
199
196
  "core::MeshRenderer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
200
197
  "core::NftShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
201
- "core::ParticleSystem": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBParticleSystem>>;
202
198
  "core::PhysicsCombinedForce": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedForce>>;
203
199
  "core::PhysicsCombinedImpulse": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPhysicsCombinedImpulse>>;
204
200
  "core::PlayerIdentityData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPlayerIdentityData>>;
@@ -24,7 +24,6 @@ import { MaterialSchema } from './Material.gen';
24
24
  import { MeshColliderSchema } from './MeshCollider.gen';
25
25
  import { MeshRendererSchema } from './MeshRenderer.gen';
26
26
  import { NftShapeSchema } from './NftShape.gen';
27
- import { ParticleSystemSchema } from './ParticleSystem.gen';
28
27
  import { PhysicsCombinedForceSchema } from './PhysicsCombinedForce.gen';
29
28
  import { PhysicsCombinedImpulseSchema } from './PhysicsCombinedImpulse.gen';
30
29
  import { PlayerIdentityDataSchema } from './PlayerIdentityData.gen';
@@ -80,7 +79,6 @@ export * from './pb/decentraland/sdk/components/material.gen';
80
79
  export * from './pb/decentraland/sdk/components/mesh_collider.gen';
81
80
  export * from './pb/decentraland/sdk/components/mesh_renderer.gen';
82
81
  export * from './pb/decentraland/sdk/components/nft_shape.gen';
83
- export * from './pb/decentraland/sdk/components/particle_system.gen';
84
82
  export * from './pb/decentraland/sdk/components/physics_combined_force.gen';
85
83
  export * from './pb/decentraland/sdk/components/physics_combined_impulse.gen';
86
84
  export * from './pb/decentraland/sdk/components/player_identity_data.gen';
@@ -168,8 +166,6 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
168
166
  /* @__PURE__ */ engine.defineComponentFromSchema("core::MeshRenderer", MeshRendererSchema);
169
167
  /** @public */ export const NftShape = engine =>
170
168
  /* @__PURE__ */ engine.defineComponentFromSchema("core::NftShape", NftShapeSchema);
171
- /** @public */ export const ParticleSystem = engine =>
172
- /* @__PURE__ */ engine.defineComponentFromSchema("core::ParticleSystem", ParticleSystemSchema);
173
169
  /** @public */ export const PhysicsCombinedForce = engine =>
174
170
  /* @__PURE__ */ engine.defineComponentFromSchema("core::PhysicsCombinedForce", PhysicsCombinedForceSchema);
175
171
  /** @public */ export const PhysicsCombinedImpulse = engine =>
@@ -262,7 +258,6 @@ export const componentDefinitionByName = /* @__PURE__ */ {
262
258
  "core::MeshCollider": MeshCollider,
263
259
  "core::MeshRenderer": MeshRenderer,
264
260
  "core::NftShape": NftShape,
265
- "core::ParticleSystem": ParticleSystem,
266
261
  "core::PhysicsCombinedForce": PhysicsCombinedForce,
267
262
  "core::PhysicsCombinedImpulse": PhysicsCombinedImpulse,
268
263
  "core::PlayerIdentityData": PlayerIdentityData,
@@ -16,14 +16,6 @@ export interface Color4 {
16
16
  b: number;
17
17
  a: number;
18
18
  }
19
- /** A range of Color4 values. Randomized or lerped between start and end. */
20
- /**
21
- * @public
22
- */
23
- export interface ColorRange {
24
- start: Color4 | undefined;
25
- end: Color4 | undefined;
26
- }
27
19
  /**
28
20
  * @public
29
21
  */
@@ -38,10 +30,3 @@ export declare namespace Color4 {
38
30
  function encode(message: Color4, writer?: _m0.Writer): _m0.Writer;
39
31
  function decode(input: _m0.Reader | Uint8Array, length?: number): Color4;
40
32
  }
41
- /**
42
- * @public
43
- */
44
- export declare namespace ColorRange {
45
- function encode(message: ColorRange, writer?: _m0.Writer): _m0.Writer;
46
- function decode(input: _m0.Reader | Uint8Array, length?: number): ColorRange;
47
- }
@@ -122,50 +122,3 @@ export var Color4;
122
122
  }
123
123
  Color4.decode = decode;
124
124
  })(Color4 || (Color4 = {}));
125
- function createBaseColorRange() {
126
- return { start: undefined, end: undefined };
127
- }
128
- /**
129
- * @public
130
- */
131
- export var ColorRange;
132
- (function (ColorRange) {
133
- function encode(message, writer = _m0.Writer.create()) {
134
- if (message.start !== undefined) {
135
- Color4.encode(message.start, writer.uint32(10).fork()).ldelim();
136
- }
137
- if (message.end !== undefined) {
138
- Color4.encode(message.end, writer.uint32(18).fork()).ldelim();
139
- }
140
- return writer;
141
- }
142
- ColorRange.encode = encode;
143
- function decode(input, length) {
144
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
145
- let end = length === undefined ? reader.len : reader.pos + length;
146
- const message = createBaseColorRange();
147
- while (reader.pos < end) {
148
- const tag = reader.uint32();
149
- switch (tag >>> 3) {
150
- case 1:
151
- if (tag !== 10) {
152
- break;
153
- }
154
- message.start = Color4.decode(reader, reader.uint32());
155
- continue;
156
- case 2:
157
- if (tag !== 18) {
158
- break;
159
- }
160
- message.end = Color4.decode(reader, reader.uint32());
161
- continue;
162
- }
163
- if ((tag & 7) === 4 || tag === 0) {
164
- break;
165
- }
166
- reader.skipType(tag & 7);
167
- }
168
- return message;
169
- }
170
- ColorRange.decode = decode;
171
- })(ColorRange || (ColorRange = {}));
@@ -25,14 +25,5 @@ export declare const enum PointerEventType {
25
25
  PET_UP = 0,
26
26
  PET_DOWN = 1,
27
27
  PET_HOVER_ENTER = 2,
28
- PET_HOVER_LEAVE = 3,
29
- PET_PROXIMITY_ENTER = 4,
30
- PET_PROXIMITY_LEAVE = 5
31
- }
32
- /**
33
- * @public
34
- */
35
- export declare const enum InteractionType {
36
- CURSOR = 0,
37
- PROXIMITY = 1
28
+ PET_HOVER_LEAVE = 3
38
29
  }
@@ -30,14 +30,4 @@ export var PointerEventType;
30
30
  PointerEventType[PointerEventType["PET_DOWN"] = 1] = "PET_DOWN";
31
31
  PointerEventType[PointerEventType["PET_HOVER_ENTER"] = 2] = "PET_HOVER_ENTER";
32
32
  PointerEventType[PointerEventType["PET_HOVER_LEAVE"] = 3] = "PET_HOVER_LEAVE";
33
- PointerEventType[PointerEventType["PET_PROXIMITY_ENTER"] = 4] = "PET_PROXIMITY_ENTER";
34
- PointerEventType[PointerEventType["PET_PROXIMITY_LEAVE"] = 5] = "PET_PROXIMITY_LEAVE";
35
33
  })(PointerEventType || (PointerEventType = {}));
36
- /**
37
- * @public
38
- */
39
- export var InteractionType;
40
- (function (InteractionType) {
41
- InteractionType[InteractionType["CURSOR"] = 0] = "CURSOR";
42
- InteractionType[InteractionType["PROXIMITY"] = 1] = "PROXIMITY";
43
- })(InteractionType || (InteractionType = {}));
@@ -1,5 +1,5 @@
1
1
  import _m0 from "protobufjs/minimal";
2
- import { InputAction, InteractionType, PointerEventType } from "./common/input_action.gen";
2
+ import { InputAction, PointerEventType } from "./common/input_action.gen";
3
3
  /**
4
4
  * PointerEvents adds configurable pointer-based interactions to the attached Entity.
5
5
  *
@@ -61,8 +61,6 @@ export interface PBPointerEvents_Info {
61
61
  showHighlight?: boolean | undefined;
62
62
  /** range of interaction from the avatar's position (default 0) */
63
63
  maxPlayerDistance?: number | undefined;
64
- /** resolution order when multiple events overlap, higher wins (default 0) */
65
- priority?: number | undefined;
66
64
  }
67
65
  /**
68
66
  * @public
@@ -72,8 +70,6 @@ export interface PBPointerEvents_Entry {
72
70
  eventType: PointerEventType;
73
71
  /** additional configuration for this detection */
74
72
  eventInfo: PBPointerEvents_Info | undefined;
75
- /** the type of interaction source (default 0 == CURSOR) */
76
- interactionType?: InteractionType | undefined;
77
73
  }
78
74
  /**
79
75
  * @public
@@ -47,7 +47,6 @@ function createBasePBPointerEvents_Info() {
47
47
  showFeedback: undefined,
48
48
  showHighlight: undefined,
49
49
  maxPlayerDistance: undefined,
50
- priority: undefined,
51
50
  };
52
51
  }
53
52
  /**
@@ -74,9 +73,6 @@ export var PBPointerEvents_Info;
74
73
  if (message.maxPlayerDistance !== undefined) {
75
74
  writer.uint32(53).float(message.maxPlayerDistance);
76
75
  }
77
- if (message.priority !== undefined) {
78
- writer.uint32(56).uint32(message.priority);
79
- }
80
76
  return writer;
81
77
  }
82
78
  PBPointerEvents_Info.encode = encode;
@@ -123,12 +119,6 @@ export var PBPointerEvents_Info;
123
119
  }
124
120
  message.maxPlayerDistance = reader.float();
125
121
  continue;
126
- case 7:
127
- if (tag !== 56) {
128
- break;
129
- }
130
- message.priority = reader.uint32();
131
- continue;
132
122
  }
133
123
  if ((tag & 7) === 4 || tag === 0) {
134
124
  break;
@@ -140,7 +130,7 @@ export var PBPointerEvents_Info;
140
130
  PBPointerEvents_Info.decode = decode;
141
131
  })(PBPointerEvents_Info || (PBPointerEvents_Info = {}));
142
132
  function createBasePBPointerEvents_Entry() {
143
- return { eventType: 0, eventInfo: undefined, interactionType: undefined };
133
+ return { eventType: 0, eventInfo: undefined };
144
134
  }
145
135
  /**
146
136
  * @public
@@ -154,9 +144,6 @@ export var PBPointerEvents_Entry;
154
144
  if (message.eventInfo !== undefined) {
155
145
  PBPointerEvents_Info.encode(message.eventInfo, writer.uint32(18).fork()).ldelim();
156
146
  }
157
- if (message.interactionType !== undefined) {
158
- writer.uint32(24).int32(message.interactionType);
159
- }
160
147
  return writer;
161
148
  }
162
149
  PBPointerEvents_Entry.encode = encode;
@@ -179,12 +166,6 @@ export var PBPointerEvents_Entry;
179
166
  }
180
167
  message.eventInfo = PBPointerEvents_Info.decode(reader, reader.uint32());
181
168
  continue;
182
- case 3:
183
- if (tag !== 24) {
184
- break;
185
- }
186
- message.interactionType = reader.int32();
187
- continue;
188
169
  }
189
170
  if ((tag & 7) === 4 || tag === 0) {
190
171
  break;
@@ -1,6 +1,5 @@
1
1
  export type { Position as PBPosition, Vector2 as PBVector2, Vector3 as PBVector3, Quaternion as PBQuaternion } from './pb/decentraland/common/vectors.gen';
2
2
  export type { Color3 as PBColor3, Color4 as PBColor4 } from './pb/decentraland/common/colors.gen';
3
- export { ColorRange } from './pb/decentraland/common/colors.gen';
4
3
  export * from './pb/decentraland/sdk/components/common/camera_transition.gen';
5
4
  export * from './pb/decentraland/sdk/components/common/camera_type.gen';
6
5
  export * from './pb/decentraland/sdk/components/common/input_action.gen';
@@ -9,5 +8,4 @@ export * from './pb/decentraland/sdk/components/common/media_state.gen';
9
8
  export * from './pb/decentraland/sdk/components/common/raycast_hit.gen';
10
9
  export * from './pb/decentraland/sdk/components/common/texts.gen';
11
10
  export * from './pb/decentraland/common/border_rect.gen';
12
- export * from './pb/decentraland/common/floats.gen';
13
11
  export * from './pb/decentraland/common/texture.gen';
@@ -1,4 +1,3 @@
1
- export { ColorRange } from './pb/decentraland/common/colors.gen';
2
1
  export * from './pb/decentraland/sdk/components/common/camera_transition.gen';
3
2
  // export { PbCameraTransition }
4
3
  export * from './pb/decentraland/sdk/components/common/camera_type.gen';
@@ -15,7 +14,5 @@ export * from './pb/decentraland/sdk/components/common/texts.gen';
15
14
  // export { PbTexts }
16
15
  export * from './pb/decentraland/common/border_rect.gen';
17
16
  // export { PbBorderRect }
18
- export * from './pb/decentraland/common/floats.gen';
19
- // export { PbFloats }
20
17
  export * from './pb/decentraland/common/texture.gen';
21
18
  // export { PbTexture }
@@ -18,8 +18,8 @@ import { VirtualCameraComponentDefinitionExtended } from './extended/VirtualCame
18
18
  import { InputModifierComponentDefinitionExtended } from './extended/InputModifier';
19
19
  import { LightSourceComponentDefinitionExtended } from './extended/LightSource';
20
20
  import { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
21
- import { ParticleSystemComponentDefinitionExtended } from './extended/ParticleSystem';
22
21
  import { TagsComponentDefinitionExtended } from './manual/Tags';
22
+ import { ICreatedByType } from './manual/CreatedBy';
23
23
  export * from './generated/index.gen';
24
24
  export type { GrowOnlyValueSetComponentDefinition, LastWriteWinElementSetComponentDefinition, LwwComponentGetter, GSetComponentGetter };
25
25
  export declare const Transform: LwwComponentGetter<TransformComponentExtended>;
@@ -34,7 +34,6 @@ export declare const VirtualCamera: LwwComponentGetter<VirtualCameraComponentDef
34
34
  export declare const InputModifier: LwwComponentGetter<InputModifierComponentDefinitionExtended>;
35
35
  export declare const LightSource: LwwComponentGetter<LightSourceComponentDefinitionExtended>;
36
36
  export declare const TriggerArea: LwwComponentGetter<TriggerAreaComponentDefinitionExtended>;
37
- export declare const ParticleSystem: LwwComponentGetter<ParticleSystemComponentDefinitionExtended>;
38
37
  /**
39
38
  * @alpha
40
39
  */
@@ -52,4 +51,8 @@ export declare const NetworkEntity: (engine: Pick<IEngine, 'defineComponent'>) =
52
51
  * @alpha
53
52
  */
54
53
  export declare const NetworkParent: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
54
+ /**
55
+ * @public
56
+ */
57
+ export declare const CreatedBy: (engine: Pick<IEngine, 'defineComponent'>) => LastWriteWinElementSetComponentDefinition<ICreatedByType>;
55
58
  export { MediaState };
@@ -15,8 +15,8 @@ import { defineVirtualCameraComponent } from './extended/VirtualCamera';
15
15
  import { defineInputModifierComponent } from './extended/InputModifier';
16
16
  import { defineLightSourceComponent } from './extended/LightSource';
17
17
  import { defineTriggerAreaComponent } from './extended/TriggerArea';
18
- import { defineParticleSystemComponent } from './extended/ParticleSystem';
19
18
  import defineTagsComponent from './manual/Tags';
19
+ import defineCreatedBy from './manual/CreatedBy';
20
20
  export * from './generated/index.gen';
21
21
  /* @__PURE__ */
22
22
  export const Transform = (engine) => defineTransformComponent(engine);
@@ -42,8 +42,6 @@ export const InputModifier = (engine) => defineInputModifierComponent(engine);
42
42
  export const LightSource = (engine) => defineLightSourceComponent(engine);
43
43
  /* @__PURE__ */
44
44
  export const TriggerArea = (engine) => defineTriggerAreaComponent(engine);
45
- /* @__PURE__ */
46
- export const ParticleSystem = (engine) => defineParticleSystemComponent(engine);
47
45
  /**
48
46
  * @alpha
49
47
  */
@@ -59,11 +57,13 @@ export const SyncComponents = (engine) => defineSyncComponent(engine);
59
57
  /**
60
58
  * @alpha
61
59
  */
62
- /* @__PURE__ */
63
60
  export const NetworkEntity = (engine) => defineNetworkEntity(engine);
64
61
  /**
65
62
  * @alpha
66
63
  */
67
- /* @__PURE__ */
68
64
  export const NetworkParent = (engine) => defineNetworkParent(engine);
65
+ /**
66
+ * @public
67
+ */
68
+ export const CreatedBy = (engine) => defineCreatedBy(engine);
69
69
  export { MediaState };
@@ -0,0 +1,9 @@
1
+ import { IEngine, LastWriteWinElementSetComponentDefinition } from '../../engine/types';
2
+ export interface ICreatedByType {
3
+ address: string;
4
+ }
5
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
6
+ declare function defineCreatedBy(engine: Pick<IEngine, 'defineComponent'>): import("../../engine/types").MapComponentDefinition<import("../..").MapResult<{
7
+ address: import("../../schemas").ISchema<string>;
8
+ }>>;
9
+ export default defineCreatedBy;
@@ -0,0 +1,8 @@
1
+ import { Schemas } from '../../schemas';
2
+ function defineCreatedBy(engine) {
3
+ const CreatedBy = engine.defineComponent('core-schema::Created-By', {
4
+ address: Schemas.String
5
+ });
6
+ return CreatedBy;
7
+ }
8
+ export default defineCreatedBy;
@@ -1,6 +1,6 @@
1
1
  import { LastWriteWinElementSetComponentDefinition, IEngine } from '../../engine';
2
2
  import { Entity } from '../../engine/entity';
3
- import type { Vector3Type } from '../../schemas/custom/Vector3';
3
+ import type { ISchema } from '../../schemas/ISchema';
4
4
  /**
5
5
  * @public
6
6
  */
@@ -11,19 +11,11 @@ export type TransformComponent = LastWriteWinElementSetComponentDefinition<Trans
11
11
  export interface TransformComponentExtended extends TransformComponent {
12
12
  create(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
13
13
  createOrReplace(entity: Entity, val?: TransformTypeWithOptionals): TransformType;
14
- /**
15
- * Transforms a direction vector from an entity's local coordinate space
16
- * to world space, accounting for the full parent hierarchy.
17
- *
18
- * This applies only rotation (not translation or scale) — suitable for
19
- * direction vectors like force/impulse directions.
20
- *
21
- * @param entity - The source entity whose local space defines the direction
22
- * @param localDirection - Direction vector in the entity's local coordinates
23
- * @returns The direction vector in world coordinates
24
- */
25
- localToWorldDirection(entity: Entity, localDirection: Vector3Type): Vector3Type;
26
14
  }
15
+ /**
16
+ * @public
17
+ */
18
+ export declare const COMPONENT_ID = 1;
27
19
  /**
28
20
  * @public
29
21
  */
@@ -46,6 +38,10 @@ export type TransformType = {
46
38
  };
47
39
  parent?: Entity;
48
40
  };
41
+ /** @public */
42
+ export declare const TRANSFORM_LENGTH = 44;
43
+ /** @public */
44
+ export declare const TransformSchema: ISchema<TransformType>;
49
45
  /**
50
46
  * @public
51
47
  */
@@ -1,14 +1,10 @@
1
- // Use import * to safely handle circular dependency (tree.ts → components → Transform.ts → tree.ts).
2
- // With import *, the namespace object's properties are resolved at access time (live bindings in ESM,
3
- // getters via __importStar in CJS), so by the time methods are called all exports are available.
4
- import * as treeHelpers from '../../runtime/helpers/tree';
5
1
  /**
6
- * @internal
2
+ * @public
7
3
  */
8
4
  export const COMPONENT_ID = 1;
9
- /** @internal */
5
+ /** @public */
10
6
  export const TRANSFORM_LENGTH = 44;
11
- /** @internal */
7
+ /** @public */
12
8
  export const TransformSchema = {
13
9
  serialize(value, builder) {
14
10
  const ptr = builder.incrementWriteOffset(TRANSFORM_LENGTH);
@@ -105,10 +101,6 @@ export function defineTransformComponent(engine) {
105
101
  },
106
102
  createOrReplace(entity, val) {
107
103
  return transformDef.createOrReplace(entity, TransformSchema.extend(val));
108
- },
109
- localToWorldDirection(entity, localDirection) {
110
- const worldRotation = treeHelpers.getWorldRotation(engine, entity);
111
- return treeHelpers.rotateVectorByQuaternion(localDirection, worldRotation);
112
104
  }
113
105
  };
114
106
  }
@@ -12,7 +12,7 @@ export type { TagsComponentDefinitionExtended, TagsType } from './manual/Tags';
12
12
  export type { ISyncComponents, ISyncComponentsType } from './manual/SyncComponents';
13
13
  export type { INetowrkEntity, INetowrkEntityType } from './manual/NetworkEntity';
14
14
  export type { INetowrkParent, INetowrkParentType } from './manual/NetworkParent';
15
+ export type { ICreatedBy, ICreatedByType } from './manual/CreatedBy';
15
16
  export type { InputModifierHelper, InputModifierComponentDefinitionExtended } from './extended/InputModifier';
16
17
  export type { LightSourceHelper, LightSourceComponentDefinitionExtended } from './extended/LightSource';
17
18
  export type { TriggerAreaComponentDefinitionExtended } from './extended/TriggerArea';
18
- export type { ParticleSystemHelper, ParticleSystemComponentDefinitionExtended, ParticleSystemBlendMode, ParticleSystemPlaybackState } from './extended/ParticleSystem';
@@ -1,6 +1,6 @@
1
1
  import { ISchema } from '../schemas';
2
2
  import { ByteBuffer } from '../serialization/ByteBuffer';
3
- import { CrdtMessageBody, DeleteComponentMessageBody, PutComponentMessageBody } from '../serialization/crdt';
3
+ import { CrdtMessageBody, DeleteComponentMessageBody, ProcessMessageResultType, PutComponentMessageBody } from '../serialization/crdt';
4
4
  import { Entity } from './entity';
5
5
  import { DeepReadonly, DeepReadonlySet } from './readonly';
6
6
  /**
@@ -70,7 +70,58 @@ export interface BaseComponent<T> {
70
70
  * If the value is undefined, the component was deleted.
71
71
  */
72
72
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
73
+ /**
74
+ * @public
75
+ *
76
+ */
77
+ validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
78
+ validateBeforeChange(cb: ValidateCallback<T>): void;
79
+ /**
80
+ * Get the CRDT state for an entity (serialized data and timestamp)
81
+ * @param entity - Entity to get the CRDT state for
82
+ * @returns Object with serialized data and timestamp, or null if entity doesn't have the component
83
+ * @public
84
+ */
85
+ getCrdtState(entity: Entity): {
86
+ data: Uint8Array;
87
+ timestamp: number;
88
+ } | null;
89
+ }
90
+ /**
91
+ * Internal component interface that exposes all internal methods for SDK use
92
+ * This is not exposed to users, only for internal SDK operations
93
+ */
94
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
95
+ /**
96
+ * @public
97
+ * Dry run update to check if a CRDT message would be accepted without actually applying it
98
+ */
99
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
100
+ /**
101
+ * @public
102
+ * Get the iterator to every entity has the component
103
+ */
104
+ iterator(): Iterable<[Entity, any]>;
105
+ /**
106
+ * @public
107
+ */
108
+ dirtyIterator(): Iterable<Entity>;
109
+ /**
110
+ * @public
111
+ */
112
+ __onChangeCallbacks(entity: Entity, value: T): void;
113
+ /**
114
+ * @public
115
+ */
116
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
73
117
  }
118
+ export type ValidateCallback<T> = (value: {
119
+ entity: Entity;
120
+ currentValue: T | undefined;
121
+ newValue: T | undefined;
122
+ senderAddress: string;
123
+ createdBy: string;
124
+ }) => boolean;
74
125
  /**
75
126
  * @public
76
127
  */
@@ -1,7 +1,8 @@
1
1
  import { ReadWriteByteBuffer } from '../serialization/ByteBuffer';
2
- import { AppendValueOperation, CrdtMessageType } from '../serialization/crdt';
2
+ import { AppendValueOperation, CrdtMessageType, ProcessMessageResultType } from '../serialization/crdt';
3
3
  import { __DEV__ } from '../runtime/invariant';
4
4
  const emptyReadonlySet = freezeSet(new Set());
5
+ const __GLOBAL_ENTITY = '__GLOBAL_ENTITY';
5
6
  function frozenError() {
6
7
  throw new Error('The set is frozen');
7
8
  }
@@ -22,6 +23,7 @@ export function createValueSetComponentDefinitionFromSchema(componentName, compo
22
23
  const dirtyIterator = new Set();
23
24
  const queuedCommands = [];
24
25
  const onChangeCallbacks = new Map();
26
+ const validateCallbacks = new Map();
25
27
  // only sort the array if the latest (N) element has a timestamp <= N-1
26
28
  function shouldSort(row) {
27
29
  const len = row.raw.length;
@@ -80,8 +82,11 @@ export function createValueSetComponentDefinitionFromSchema(componentName, compo
80
82
  has(entity) {
81
83
  return data.has(entity);
82
84
  },
83
- entityDeleted(entity) {
85
+ entityDeleted(entity, markAsDirty) {
84
86
  data.delete(entity);
87
+ if (markAsDirty) {
88
+ // For grow-only sets, we don't need to mark as dirty since deletion doesn't generate CRDT messages
89
+ }
85
90
  },
86
91
  get(entity) {
87
92
  const values = data.get(entity);
@@ -152,6 +157,44 @@ export function createValueSetComponentDefinitionFromSchema(componentName, compo
152
157
  for (const cb of cbs) {
153
158
  cb(value);
154
159
  }
160
+ },
161
+ __dry_run_updateFromCrdt(_body) {
162
+ return ProcessMessageResultType.StateUpdatedData;
163
+ },
164
+ validateBeforeChange(entityOrCb, cb) {
165
+ if (arguments.length === 1) {
166
+ // Second overload: just callback (global validation)
167
+ validateCallbacks.set(__GLOBAL_ENTITY, entityOrCb);
168
+ }
169
+ else {
170
+ if (cb) {
171
+ validateCallbacks.set(entityOrCb, cb);
172
+ }
173
+ }
174
+ },
175
+ __run_validateBeforeChange(entity, newValue, senderAddress, createdBy) {
176
+ const cb = entity && validateCallbacks.get(entity);
177
+ const globalCb = validateCallbacks.get(__GLOBAL_ENTITY);
178
+ const currentValue = [...this.get(entity).values()];
179
+ const value = { entity, currentValue: currentValue, newValue, senderAddress, createdBy };
180
+ const globalResult = globalCb?.(value) ?? true;
181
+ const entityResult = (globalResult && cb?.(value)) ?? true;
182
+ return globalResult && entityResult;
183
+ },
184
+ getCrdtState(entity) {
185
+ const row = data.get(entity);
186
+ if (!row || row.raw.length === 0) {
187
+ return null;
188
+ }
189
+ // For GrowOnlySet, we need to return the complete CRDT messages for all values
190
+ // This is complex because GrowOnlySet uses APPEND messages, not a single PUT
191
+ // For now, return null to indicate this component type doesn't support simple corrections
192
+ return null;
193
+ },
194
+ __forceUpdateFromCrdt(_msg) {
195
+ // GrowOnlySet doesn't support authoritative corrections in the same way as LWW
196
+ // since it uses APPEND_VALUE messages instead of PUT_COMPONENT messages
197
+ return [null, undefined];
155
198
  }
156
199
  };
157
200
  return ret;