@dcl/ecs 7.0.6-4177592674.commit-39cdc99 → 7.0.6-4183962432.commit-2fbe270

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 (89) hide show
  1. package/dist/components/extended/Animator.d.ts +3 -2
  2. package/dist/components/extended/Material.d.ts +2 -2
  3. package/dist/components/extended/MeshCollider.d.ts +2 -2
  4. package/dist/components/extended/MeshRenderer.d.ts +2 -2
  5. package/dist/components/generated/Animator.gen.js +6 -0
  6. package/dist/components/generated/AudioSource.gen.js +6 -0
  7. package/dist/components/generated/AudioStream.gen.js +6 -0
  8. package/dist/components/generated/AvatarAttach.gen.js +6 -0
  9. package/dist/components/generated/AvatarModifierArea.gen.js +6 -0
  10. package/dist/components/generated/AvatarShape.gen.js +6 -0
  11. package/dist/components/generated/Billboard.gen.js +6 -0
  12. package/dist/components/generated/CameraMode.gen.js +6 -0
  13. package/dist/components/generated/CameraModeArea.gen.js +6 -0
  14. package/dist/components/generated/GltfContainer.gen.js +6 -0
  15. package/dist/components/generated/Material.gen.js +6 -0
  16. package/dist/components/generated/MeshCollider.gen.js +6 -0
  17. package/dist/components/generated/MeshRenderer.gen.js +6 -0
  18. package/dist/components/generated/NftShape.gen.js +6 -0
  19. package/dist/components/generated/PointerEvents.gen.js +6 -0
  20. package/dist/components/generated/PointerEventsResult.gen.js +6 -0
  21. package/dist/components/generated/PointerLock.gen.js +6 -0
  22. package/dist/components/generated/Raycast.gen.js +6 -0
  23. package/dist/components/generated/RaycastResult.gen.js +6 -0
  24. package/dist/components/generated/TextShape.gen.js +6 -0
  25. package/dist/components/generated/UiBackground.gen.js +6 -0
  26. package/dist/components/generated/UiDropdown.gen.js +6 -0
  27. package/dist/components/generated/UiDropdownResult.gen.js +6 -0
  28. package/dist/components/generated/UiInput.gen.js +6 -0
  29. package/dist/components/generated/UiInputResult.gen.js +6 -0
  30. package/dist/components/generated/UiText.gen.js +6 -0
  31. package/dist/components/generated/UiTransform.gen.js +6 -0
  32. package/dist/components/generated/VideoPlayer.gen.js +6 -0
  33. package/dist/components/generated/VisibilityComponent.gen.js +6 -0
  34. package/dist/components/generated/global.gen.d.ts +26 -26
  35. package/dist/components/generated/index.gen.d.ts +32 -31
  36. package/dist/components/generated/index.gen.js +4 -1
  37. package/dist/components/generated/pb/decentraland/sdk/components/pointer_events_result.gen.d.ts +1 -9
  38. package/dist/components/generated/pb/decentraland/sdk/components/pointer_events_result.gen.js +2 -36
  39. package/dist/components/index.d.ts +9 -9
  40. package/dist/components/index.js +1 -1
  41. package/dist/components/{legacy → manual}/Transform.d.ts +2 -2
  42. package/dist/components/{legacy → manual}/Transform.js +32 -0
  43. package/dist/components/types.d.ts +1 -1
  44. package/dist/engine/component.d.ts +74 -27
  45. package/dist/engine/component.js +7 -240
  46. package/dist/engine/grow-only-value-set-component-definition.d.ts +8 -0
  47. package/dist/engine/grow-only-value-set-component-definition.js +132 -0
  48. package/dist/engine/index.d.ts +1 -2
  49. package/dist/engine/index.js +18 -1
  50. package/dist/engine/input.d.ts +3 -3
  51. package/dist/engine/input.js +75 -68
  52. package/dist/engine/lww-element-set-component-definition.d.ts +6 -0
  53. package/dist/engine/lww-element-set-component-definition.js +229 -0
  54. package/dist/engine/readonly.d.ts +2 -2
  55. package/dist/engine/types.d.ts +20 -9
  56. package/dist/engine/types.js +1 -1
  57. package/dist/runtime/invariant.d.ts +1 -0
  58. package/dist/runtime/invariant.js +6 -1
  59. package/dist/runtime/types.d.ts +1 -2
  60. package/dist/runtime/types.js +0 -1
  61. package/dist/schemas/Array.js +5 -0
  62. package/dist/schemas/ISchema.d.ts +27 -2
  63. package/dist/schemas/Map.d.ts +0 -1
  64. package/dist/schemas/Map.js +9 -0
  65. package/dist/schemas/Optional.js +5 -0
  66. package/dist/schemas/basic/Boolean.js +4 -0
  67. package/dist/schemas/basic/Enum.js +27 -0
  68. package/dist/schemas/basic/Float.js +8 -0
  69. package/dist/schemas/basic/Integer.js +16 -0
  70. package/dist/schemas/basic/String.js +4 -0
  71. package/dist/schemas/buildSchema.d.ts +7 -0
  72. package/dist/schemas/buildSchema.js +63 -0
  73. package/dist/schemas/custom/Color3.js +9 -0
  74. package/dist/schemas/custom/Color4.js +10 -0
  75. package/dist/schemas/custom/Entity.js +4 -0
  76. package/dist/schemas/custom/Quaternion.js +10 -0
  77. package/dist/schemas/custom/Vector3.js +10 -0
  78. package/dist/schemas/index.d.ts +2 -2
  79. package/dist/serialization/crdt/appendValue.d.ts +1 -0
  80. package/dist/serialization/crdt/appendValue.js +49 -0
  81. package/dist/serialization/crdt/index.d.ts +1 -0
  82. package/dist/serialization/crdt/index.js +1 -0
  83. package/dist/serialization/crdt/message.js +4 -0
  84. package/dist/serialization/crdt/types.d.ts +24 -3
  85. package/dist/serialization/crdt/types.js +2 -1
  86. package/dist/systems/crdt/index.d.ts +1 -1
  87. package/dist/systems/crdt/index.js +21 -8
  88. package/dist/systems/events.d.ts +2 -2
  89. package/package.json +3 -3
@@ -1,9 +1,10 @@
1
- import { ComponentDefinition, Entity, IEngine } from '../../engine';
1
+ import { Entity, IEngine } from '../../engine';
2
+ import { LastWriteWinElementSetComponentDefinition } from '../../engine/component';
2
3
  import { PBAnimationState, PBAnimator } from '../generated/pb/decentraland/sdk/components/animator.gen';
3
4
  /**
4
5
  * @public
5
6
  */
6
- export interface AnimatorComponentDefinitionExtended extends ComponentDefinition<PBAnimator> {
7
+ export interface AnimatorComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAnimator> {
7
8
  /**
8
9
  * @public
9
10
  *
@@ -1,4 +1,4 @@
1
- import { ComponentDefinition, Entity, IEngine } from '../../engine';
1
+ import { LastWriteWinElementSetComponentDefinition, Entity, IEngine } from '../../engine';
2
2
  import { PBMaterial, PBMaterial_PbrMaterial, PBMaterial_UnlitMaterial } from '../generated/index.gen';
3
3
  import { AvatarTexture, Texture, TextureUnion, VideoTexture } from '../generated/types.gen';
4
4
  /**
@@ -21,7 +21,7 @@ export interface TextureHelper {
21
21
  /**
22
22
  * @public
23
23
  */
24
- export interface MaterialComponentDefinitionExtended extends ComponentDefinition<PBMaterial> {
24
+ export interface MaterialComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBMaterial> {
25
25
  /**
26
26
  * Texture helpers with constructor
27
27
  */
@@ -1,9 +1,9 @@
1
- import { ComponentDefinition, Entity, IEngine } from '../../engine';
1
+ import { LastWriteWinElementSetComponentDefinition, Entity, IEngine } from '../../engine';
2
2
  import { ColliderLayer, PBMeshCollider } from '../generated/index.gen';
3
3
  /**
4
4
  * @public
5
5
  */
6
- export interface MeshColliderComponentDefinitionExtended extends ComponentDefinition<PBMeshCollider> {
6
+ export interface MeshColliderComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBMeshCollider> {
7
7
  /**
8
8
  * @public
9
9
  * Set a box in the MeshCollider component
@@ -1,9 +1,9 @@
1
- import { ComponentDefinition, Entity, IEngine } from '../../engine';
1
+ import { LastWriteWinElementSetComponentDefinition, Entity, IEngine } from '../../engine';
2
2
  import { PBMeshRenderer } from '../generated/index.gen';
3
3
  /**
4
4
  * @public
5
5
  */
6
- export interface MeshRendererComponentDefinitionExtended extends ComponentDefinition<PBMeshRenderer> {
6
+ export interface MeshRendererComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBMeshRenderer> {
7
7
  /**
8
8
  * @public
9
9
  * Set a box in the MeshRenderer component
@@ -15,5 +15,11 @@ export const AnimatorSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAnimator.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAnimator"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const AudioSourceSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAudioSource.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAudioSource"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const AudioStreamSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAudioStream.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAudioStream"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const AvatarAttachSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAvatarAttach.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarAttach"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const AvatarModifierAreaSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAvatarModifierArea.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarModifierArea"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const AvatarShapeSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBAvatarShape.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBAvatarShape"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const BillboardSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBBillboard.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBBillboard"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const CameraModeSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBCameraMode.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBCameraMode"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const CameraModeAreaSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBCameraModeArea.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBCameraModeArea"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const GltfContainerSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBGltfContainer.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBGltfContainer"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const MaterialSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBMaterial.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBMaterial"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const MeshColliderSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBMeshCollider.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBMeshCollider"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const MeshRendererSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBMeshRenderer.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBMeshRenderer"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const NftShapeSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBNftShape.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBNftShape"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const PointerEventsSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBPointerEvents.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBPointerEvents"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const PointerEventsResultSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBPointerEventsResult.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBPointerEventsResult"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const PointerLockSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBPointerLock.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBPointerLock"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const RaycastSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBRaycast.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBRaycast"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const RaycastResultSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBRaycastResult.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBRaycastResult"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const TextShapeSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBTextShape.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBTextShape"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiBackgroundSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiBackground.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiBackground"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiDropdownSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiDropdown.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiDropdown"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiDropdownResultSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiDropdownResult.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiDropdownResult"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiInputSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiInput.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiInput"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiInputResultSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiInputResult.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiInputResult"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiTextSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiText.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiText"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const UiTransformSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBUiTransform.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBUiTransform"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const VideoPlayerSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBVideoPlayer.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBVideoPlayer"
18
24
  }
19
25
  };
@@ -15,5 +15,11 @@ export const VisibilityComponentSchema = {
15
15
  create() {
16
16
  // TODO: this is a hack.
17
17
  return PBVisibilityComponent.decode(new Uint8Array());
18
+ },
19
+ jsonSchema: {
20
+ type: "object",
21
+ properties: {},
22
+ serializationType: "protocol-buffer",
23
+ protocolBuffer: "PBVisibilityComponent"
18
24
  }
19
25
  };
@@ -1,4 +1,4 @@
1
- import { ComponentDefinition } from '../../engine/component';
1
+ import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDefinition } from '../../engine/component';
2
2
  export * from './index.gen';
3
3
  import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
4
4
  import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
@@ -25,28 +25,28 @@ import { PBUiText } from './pb/decentraland/sdk/components/ui_text.gen';
25
25
  import { PBUiTransform } from './pb/decentraland/sdk/components/ui_transform.gen';
26
26
  import { PBVideoPlayer } from './pb/decentraland/sdk/components/video_player.gen';
27
27
  import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibility_component.gen';
28
- /** @public */ export declare const AudioSource: ComponentDefinition<PBAudioSource>;
29
- /** @public */ export declare const AudioStream: ComponentDefinition<PBAudioStream>;
30
- /** @public */ export declare const AvatarAttach: ComponentDefinition<PBAvatarAttach>;
31
- /** @public */ export declare const AvatarModifierArea: ComponentDefinition<PBAvatarModifierArea>;
32
- /** @public */ export declare const AvatarShape: ComponentDefinition<PBAvatarShape>;
33
- /** @public */ export declare const Billboard: ComponentDefinition<PBBillboard>;
34
- /** @public */ export declare const CameraMode: ComponentDefinition<PBCameraMode>;
35
- /** @public */ export declare const CameraModeArea: ComponentDefinition<PBCameraModeArea>;
36
- /** @public */ export declare const GltfContainer: ComponentDefinition<PBGltfContainer>;
37
- /** @public */ export declare const NftShape: ComponentDefinition<PBNftShape>;
38
- /** @public */ export declare const PointerEvents: ComponentDefinition<PBPointerEvents>;
39
- /** @public */ export declare const PointerEventsResult: ComponentDefinition<PBPointerEventsResult>;
40
- /** @public */ export declare const PointerLock: ComponentDefinition<PBPointerLock>;
41
- /** @public */ export declare const Raycast: ComponentDefinition<PBRaycast>;
42
- /** @public */ export declare const RaycastResult: ComponentDefinition<PBRaycastResult>;
43
- /** @public */ export declare const TextShape: ComponentDefinition<PBTextShape>;
44
- /** @public */ export declare const UiBackground: ComponentDefinition<PBUiBackground>;
45
- /** @public */ export declare const UiDropdown: ComponentDefinition<PBUiDropdown>;
46
- /** @public */ export declare const UiDropdownResult: ComponentDefinition<PBUiDropdownResult>;
47
- /** @public */ export declare const UiInput: ComponentDefinition<PBUiInput>;
48
- /** @public */ export declare const UiInputResult: ComponentDefinition<PBUiInputResult>;
49
- /** @public */ export declare const UiText: ComponentDefinition<PBUiText>;
50
- /** @public */ export declare const UiTransform: ComponentDefinition<PBUiTransform>;
51
- /** @public */ export declare const VideoPlayer: ComponentDefinition<PBVideoPlayer>;
52
- /** @public */ export declare const VisibilityComponent: ComponentDefinition<PBVisibilityComponent>;
28
+ /** @public */ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
29
+ /** @public */ export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
30
+ /** @public */ export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBAvatarAttach>;
31
+ /** @public */ export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
32
+ /** @public */ export declare const AvatarShape: LastWriteWinElementSetComponentDefinition<PBAvatarShape>;
33
+ /** @public */ export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
34
+ /** @public */ export declare const CameraMode: LastWriteWinElementSetComponentDefinition<PBCameraMode>;
35
+ /** @public */ export declare const CameraModeArea: LastWriteWinElementSetComponentDefinition<PBCameraModeArea>;
36
+ /** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
37
+ /** @public */ export declare const NftShape: LastWriteWinElementSetComponentDefinition<PBNftShape>;
38
+ /** @public */ export declare const PointerEvents: LastWriteWinElementSetComponentDefinition<PBPointerEvents>;
39
+ /** @public */ export declare const PointerEventsResult: GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>;
40
+ /** @public */ export declare const PointerLock: LastWriteWinElementSetComponentDefinition<PBPointerLock>;
41
+ /** @public */ export declare const Raycast: LastWriteWinElementSetComponentDefinition<PBRaycast>;
42
+ /** @public */ export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
43
+ /** @public */ export declare const TextShape: LastWriteWinElementSetComponentDefinition<PBTextShape>;
44
+ /** @public */ export declare const UiBackground: LastWriteWinElementSetComponentDefinition<PBUiBackground>;
45
+ /** @public */ export declare const UiDropdown: LastWriteWinElementSetComponentDefinition<PBUiDropdown>;
46
+ /** @public */ export declare const UiDropdownResult: LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>;
47
+ /** @public */ export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInput>;
48
+ /** @public */ export declare const UiInputResult: LastWriteWinElementSetComponentDefinition<PBUiInputResult>;
49
+ /** @public */ export declare const UiText: LastWriteWinElementSetComponentDefinition<PBUiText>;
50
+ /** @public */ export declare const UiTransform: LastWriteWinElementSetComponentDefinition<PBUiTransform>;
51
+ /** @public */ export declare const VideoPlayer: LastWriteWinElementSetComponentDefinition<PBVideoPlayer>;
52
+ /** @public */ export declare const VisibilityComponent: LastWriteWinElementSetComponentDefinition<PBVisibilityComponent>;
@@ -1,5 +1,5 @@
1
1
  import type { IEngine } from '../../engine/types';
2
- import { ComponentDefinition } from '../../engine/component';
2
+ import { LastWriteWinElementSetComponentDefinition, GrowOnlyValueSetComponentDefinition } from '../../engine/component';
3
3
  import { PBAnimator } from './pb/decentraland/sdk/components/animator.gen';
4
4
  import { PBAudioSource } from './pb/decentraland/sdk/components/audio_source.gen';
5
5
  import { PBAudioStream } from './pb/decentraland/sdk/components/audio_stream.gen';
@@ -58,33 +58,34 @@ export * from './pb/decentraland/sdk/components/ui_text.gen';
58
58
  export * from './pb/decentraland/sdk/components/ui_transform.gen';
59
59
  export * from './pb/decentraland/sdk/components/video_player.gen';
60
60
  export * from './pb/decentraland/sdk/components/visibility_component.gen';
61
- export type ComponentGetter<T extends ComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
62
- /** @public */ export declare const Animator: ComponentGetter<ComponentDefinition<PBAnimator>>;
63
- /** @public */ export declare const AudioSource: ComponentGetter<ComponentDefinition<PBAudioSource>>;
64
- /** @public */ export declare const AudioStream: ComponentGetter<ComponentDefinition<PBAudioStream>>;
65
- /** @public */ export declare const AvatarAttach: ComponentGetter<ComponentDefinition<PBAvatarAttach>>;
66
- /** @public */ export declare const AvatarModifierArea: ComponentGetter<ComponentDefinition<PBAvatarModifierArea>>;
67
- /** @public */ export declare const AvatarShape: ComponentGetter<ComponentDefinition<PBAvatarShape>>;
68
- /** @public */ export declare const Billboard: ComponentGetter<ComponentDefinition<PBBillboard>>;
69
- /** @public */ export declare const CameraMode: ComponentGetter<ComponentDefinition<PBCameraMode>>;
70
- /** @public */ export declare const CameraModeArea: ComponentGetter<ComponentDefinition<PBCameraModeArea>>;
71
- /** @public */ export declare const GltfContainer: ComponentGetter<ComponentDefinition<PBGltfContainer>>;
72
- /** @public */ export declare const Material: ComponentGetter<ComponentDefinition<PBMaterial>>;
73
- /** @public */ export declare const MeshCollider: ComponentGetter<ComponentDefinition<PBMeshCollider>>;
74
- /** @public */ export declare const MeshRenderer: ComponentGetter<ComponentDefinition<PBMeshRenderer>>;
75
- /** @public */ export declare const NftShape: ComponentGetter<ComponentDefinition<PBNftShape>>;
76
- /** @public */ export declare const PointerEvents: ComponentGetter<ComponentDefinition<PBPointerEvents>>;
77
- /** @public */ export declare const PointerEventsResult: ComponentGetter<ComponentDefinition<PBPointerEventsResult>>;
78
- /** @public */ export declare const PointerLock: ComponentGetter<ComponentDefinition<PBPointerLock>>;
79
- /** @public */ export declare const Raycast: ComponentGetter<ComponentDefinition<PBRaycast>>;
80
- /** @public */ export declare const RaycastResult: ComponentGetter<ComponentDefinition<PBRaycastResult>>;
81
- /** @public */ export declare const TextShape: ComponentGetter<ComponentDefinition<PBTextShape>>;
82
- /** @public */ export declare const UiBackground: ComponentGetter<ComponentDefinition<PBUiBackground>>;
83
- /** @public */ export declare const UiDropdown: ComponentGetter<ComponentDefinition<PBUiDropdown>>;
84
- /** @public */ export declare const UiDropdownResult: ComponentGetter<ComponentDefinition<PBUiDropdownResult>>;
85
- /** @public */ export declare const UiInput: ComponentGetter<ComponentDefinition<PBUiInput>>;
86
- /** @public */ export declare const UiInputResult: ComponentGetter<ComponentDefinition<PBUiInputResult>>;
87
- /** @public */ export declare const UiText: ComponentGetter<ComponentDefinition<PBUiText>>;
88
- /** @public */ export declare const UiTransform: ComponentGetter<ComponentDefinition<PBUiTransform>>;
89
- /** @public */ export declare const VideoPlayer: ComponentGetter<ComponentDefinition<PBVideoPlayer>>;
90
- /** @public */ export declare const VisibilityComponent: ComponentGetter<ComponentDefinition<PBVisibilityComponent>>;
61
+ export type LwwComponentGetter<T extends LastWriteWinElementSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
62
+ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
63
+ /** @public */ export declare const Animator: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
64
+ /** @public */ export declare const AudioSource: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
65
+ /** @public */ export declare const AudioStream: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
66
+ /** @public */ export declare const AvatarAttach: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarAttach>>;
67
+ /** @public */ export declare const AvatarModifierArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
68
+ /** @public */ export declare const AvatarShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
69
+ /** @public */ export declare const Billboard: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
70
+ /** @public */ export declare const CameraMode: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
71
+ /** @public */ export declare const CameraModeArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
72
+ /** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
73
+ /** @public */ export declare const Material: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMaterial>>;
74
+ /** @public */ export declare const MeshCollider: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshCollider>>;
75
+ /** @public */ export declare const MeshRenderer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBMeshRenderer>>;
76
+ /** @public */ export declare const NftShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBNftShape>>;
77
+ /** @public */ export declare const PointerEvents: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerEvents>>;
78
+ /** @public */ export declare const PointerEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBPointerEventsResult>>;
79
+ /** @public */ export declare const PointerLock: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBPointerLock>>;
80
+ /** @public */ export declare const Raycast: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
81
+ /** @public */ export declare const RaycastResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
82
+ /** @public */ export declare const TextShape: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
83
+ /** @public */ export declare const UiBackground: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiBackground>>;
84
+ /** @public */ export declare const UiDropdown: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
85
+ /** @public */ export declare const UiDropdownResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
86
+ /** @public */ export declare const UiInput: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
87
+ /** @public */ export declare const UiInputResult: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
88
+ /** @public */ export declare const UiText: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
89
+ /** @public */ export declare const UiTransform: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
90
+ /** @public */ export declare const VideoPlayer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVideoPlayer>>;
91
+ /** @public */ export declare const VisibilityComponent: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBVisibilityComponent>>;
@@ -71,7 +71,10 @@ export * from './pb/decentraland/sdk/components/visibility_component.gen';
71
71
  /** @public */ /*#__PURE__*/ export const MeshRenderer = engine => engine.defineComponentFromSchema("core::MeshRenderer", MeshRendererSchema);
72
72
  /** @public */ /*#__PURE__*/ export const NftShape = engine => engine.defineComponentFromSchema("core::NftShape", NftShapeSchema);
73
73
  /** @public */ /*#__PURE__*/ export const PointerEvents = engine => engine.defineComponentFromSchema("core::PointerEvents", PointerEventsSchema);
74
- /** @public */ /*#__PURE__*/ export const PointerEventsResult = engine => engine.defineComponentFromSchema("core::PointerEventsResult", PointerEventsResultSchema);
74
+ /** @public */ /*#__PURE__*/ export const PointerEventsResult = (engine) => engine.defineValueSetComponentFromSchema("core::PointerEventsResult", PointerEventsResultSchema, {
75
+ timestampFunction: (t) => t.timestamp,
76
+ maxElements: 100
77
+ });
75
78
  /** @public */ /*#__PURE__*/ export const PointerLock = engine => engine.defineComponentFromSchema("core::PointerLock", PointerLockSchema);
76
79
  /** @public */ /*#__PURE__*/ export const Raycast = engine => engine.defineComponentFromSchema("core::Raycast", RaycastSchema);
77
80
  /** @public */ /*#__PURE__*/ export const RaycastResult = engine => engine.defineComponentFromSchema("core::RaycastResult", RaycastResultSchema);
@@ -1,19 +1,11 @@
1
1
  import { InputAction } from "./common/input_action.gen";
2
2
  import { PointerEventType } from "./pointer_events.gen";
3
3
  import { RaycastHit } from "./raycast_result.gen";
4
- /** the renderer will set this component to the root entity once per frame with all the events */
4
+ /** renderer append a new object of this in each command, there can be many commands per frames */
5
5
  /**
6
6
  * @public
7
7
  */
8
8
  export interface PBPointerEventsResult {
9
- /** a list of the last N pointer commands (from the engine) */
10
- commands: PBPointerEventsResult_PointerCommand[];
11
- }
12
- /** this message represents a pointer event, used both for UP and DOWN actions */
13
- /**
14
- * @public
15
- */
16
- export interface PBPointerEventsResult_PointerCommand {
17
9
  /** identifier of the input */
18
10
  button: InputAction;
19
11
  hit: RaycastHit | undefined;