@dcl/ecs 7.0.6-3991588905.commit-2387247 → 7.0.6-4006744889.commit-c6aff5f

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.
@@ -3,7 +3,7 @@ import { PBAnimationState, PBAnimator } from '../generated/pb/decentraland/sdk/c
3
3
  /**
4
4
  * @public
5
5
  */
6
- export declare type AnimatorComponentDefinition = ComponentDefinition<PBAnimator>;
6
+ export type AnimatorComponentDefinition = ComponentDefinition<PBAnimator>;
7
7
  /**
8
8
  * @public
9
9
  */
@@ -4,11 +4,11 @@ import { AvatarTexture, Texture, TextureUnion } from '../generated/types.gen';
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare type MaterialComponentDefinition = ComponentDefinition<PBMaterial>;
7
+ export type MaterialComponentDefinition = ComponentDefinition<PBMaterial>;
8
8
  /**
9
9
  * @public
10
10
  */
11
- export declare type TextureHelper = {
11
+ export type TextureHelper = {
12
12
  /**
13
13
  * @returns a common texture with a source file
14
14
  */
@@ -3,7 +3,7 @@ import { ColliderLayer, PBMeshCollider } from '../generated/index.gen';
3
3
  /**
4
4
  * @public
5
5
  */
6
- export declare type MeshColliderComponentDefinition = ComponentDefinition<PBMeshCollider>;
6
+ export type MeshColliderComponentDefinition = ComponentDefinition<PBMeshCollider>;
7
7
  /**
8
8
  * @public
9
9
  */
@@ -3,7 +3,7 @@ import { PBMeshRenderer } from '../generated/index.gen';
3
3
  /**
4
4
  * @public
5
5
  */
6
- export declare type MeshRendererComponentDefinition = ComponentDefinition<PBMeshRenderer>;
6
+ export type MeshRendererComponentDefinition = ComponentDefinition<PBMeshRenderer>;
7
7
  /**
8
8
  * @public
9
9
  */
@@ -56,7 +56,7 @@ export * from './pb/decentraland/sdk/components/ui_input_result.gen';
56
56
  export * from './pb/decentraland/sdk/components/ui_text.gen';
57
57
  export * from './pb/decentraland/sdk/components/ui_transform.gen';
58
58
  export * from './pb/decentraland/sdk/components/visibility_component.gen';
59
- export declare type ComponentGetter<T extends ComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
59
+ export type ComponentGetter<T extends ComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
60
60
  /** @public */ export declare const Animator: ComponentGetter<ComponentDefinition<PBAnimator>>;
61
61
  /** @public */ export declare const AudioSource: ComponentGetter<ComponentDefinition<PBAudioSource>>;
62
62
  /** @public */ export declare const AudioStream: ComponentGetter<ComponentDefinition<PBAudioStream>>;
@@ -3,7 +3,7 @@ import { Entity } from '../../engine/entity';
3
3
  /**
4
4
  * @public
5
5
  */
6
- export declare type TransformComponent = ComponentDefinition<TransformType>;
6
+ export type TransformComponent = ComponentDefinition<TransformType>;
7
7
  /**
8
8
  * @public
9
9
  */
@@ -14,7 +14,7 @@ export interface TransformComponentExtended extends TransformComponent {
14
14
  /**
15
15
  * @public
16
16
  */
17
- export declare type TransformType = {
17
+ export type TransformType = {
18
18
  position: {
19
19
  x: number;
20
20
  y: number;
@@ -36,5 +36,5 @@ export declare type TransformType = {
36
36
  /**
37
37
  * @public
38
38
  */
39
- export declare type TransformTypeWithOptionals = Partial<TransformType>;
39
+ export type TransformTypeWithOptionals = Partial<TransformType>;
40
40
  export declare function defineTransformComponent(engine: Pick<IEngine, 'defineComponentFromSchema'>): TransformComponentExtended;
@@ -5,7 +5,7 @@ import { DeepReadonly } from './readonly';
5
5
  /**
6
6
  * @public
7
7
  */
8
- export declare type ComponentDefinition<T> = {
8
+ export type ComponentDefinition<T> = {
9
9
  readonly componentId: number;
10
10
  readonly componentName: string;
11
11
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @public It only defines the type explicitly, no effects.
3
3
  */
4
- export declare type uint32 = number;
4
+ export type uint32 = number;
5
5
  export declare const MAX_U16 = 65535;
6
6
  export declare const MASK_UPPER_16_ON_32 = 4294901760;
7
7
  export declare const AMOUNT_VERSION_AVAILABLE: number;
@@ -17,7 +17,7 @@ export declare const AMOUNT_VERSION_AVAILABLE: number;
17
17
  * Convertion from its compound numbers to entity:
18
18
  * entity = (entityNumber & MAX_U16) | ((entityVersion & MAX_U16) << 16)
19
19
  */
20
- export declare type Entity = number & {
20
+ export type Entity = number & {
21
21
  __entity_type: '';
22
22
  };
23
23
  /**
@@ -56,7 +56,7 @@ export declare enum EntityState {
56
56
  */
57
57
  Reserved = 3
58
58
  }
59
- export declare type EntityContainer = {
59
+ export type EntityContainer = {
60
60
  generateEntity(): Entity;
61
61
  removeEntity(entity: Entity): boolean;
62
62
  getEntityState(entity: Entity): EntityState;
@@ -11,7 +11,7 @@ export { Entity, ByteBuffer, ComponentDefinition, SystemItem, OnChangeFunction }
11
11
  /**
12
12
  * @public
13
13
  */
14
- export declare type IEngineOptions = {
14
+ export type IEngineOptions = {
15
15
  onChangeFunction: OnChangeFunction;
16
16
  };
17
17
  /**
@@ -6,7 +6,7 @@ import { IEngine } from './types';
6
6
  /**
7
7
  * @public
8
8
  */
9
- export declare type IInputSystem = {
9
+ export type IInputSystem = {
10
10
  /**
11
11
  * @public
12
12
  * Check if a pointer event has been emitted in the last tick-update.
@@ -2,28 +2,28 @@ import { ComponentDefinition } from './component';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
5
+ export type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
6
6
  /**
7
7
  * @public
8
8
  */
9
- export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
9
+ export type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
10
10
  /**
11
11
  * @public
12
12
  */
13
- export declare type DeepReadonlyObject<T> = {
13
+ export type DeepReadonlyObject<T> = {
14
14
  readonly [K in keyof T]: DeepReadonly<T[K]>;
15
15
  };
16
16
  /**
17
17
  * @public
18
18
  */
19
- export declare type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
19
+ export type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
20
20
  /**
21
21
  * @public
22
22
  */
23
- export declare type ReadonlyComponentSchema<T extends [ComponentDefinition<unknown>, ...ComponentDefinition<unknown>[]]> = {
23
+ export type ReadonlyComponentSchema<T extends [ComponentDefinition<unknown>, ...ComponentDefinition<unknown>[]]> = {
24
24
  [K in keyof T]: T[K] extends ComponentDefinition<unknown> ? ReturnType<T[K]['get']> : never;
25
25
  };
26
26
  /**
27
27
  * @public
28
28
  */
29
- export declare type DeepReadonly<T> = T extends ReadonlyPrimitive ? T : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
29
+ export type DeepReadonly<T> = T extends ReadonlyPrimitive ? T : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @public
3
3
  */
4
- export declare type SystemFn = (dt: number) => void;
4
+ export type SystemFn = (dt: number) => void;
5
5
  export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
6
- export declare type SystemItem = {
6
+ export type SystemItem = {
7
7
  fn: SystemFn;
8
8
  priority: number;
9
9
  name?: string;
@@ -9,11 +9,11 @@ export { ISchema } from '../schemas/ISchema';
9
9
  /**
10
10
  * @public
11
11
  */
12
- export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
12
+ export type Unpacked<T> = T extends (infer U)[] ? U : T;
13
13
  /**
14
14
  * @public
15
15
  */
16
- export declare type ComponentSchema<T extends [ComponentDefinition<any>, ...ComponentDefinition<any>[]]> = {
16
+ export type ComponentSchema<T extends [ComponentDefinition<any>, ...ComponentDefinition<any>[]]> = {
17
17
  [K in keyof T]: T[K] extends ComponentDefinition<any> ? ReturnType<T[K]['getMutable']> : never;
18
18
  };
19
19
  export interface MapComponentDefinition<T> extends ComponentDefinition<T> {
@@ -35,7 +35,7 @@ export interface MapComponentDefinition<T> extends ComponentDefinition<T> {
35
35
  /**
36
36
  * @public
37
37
  */
38
- export declare type IEngine = {
38
+ export type IEngine = {
39
39
  /**
40
40
  * Increment the used entity counter and return the next one.
41
41
  * @param dynamic - whether or no the entity should be considered as Dynamic (vs Static)
@@ -1,3 +1,3 @@
1
- declare type K = unknown | Promise<unknown>;
1
+ type K = unknown | Promise<unknown>;
2
2
  export declare function checkNotThenable<T extends K>(t: T, error: string): T;
3
3
  export {};
@@ -2,7 +2,7 @@ import { ByteBuffer } from '../serialization/ByteBuffer';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type ISchema<T = any> = {
5
+ export type ISchema<T = any> = {
6
6
  serialize(value: T, builder: ByteBuffer): void;
7
7
  deserialize(reader: ByteBuffer): T;
8
8
  create(): T;
@@ -9,16 +9,16 @@ export interface Spec {
9
9
  /**
10
10
  * @public
11
11
  */
12
- export declare type MapResult<T extends Spec> = ToOptional<{
12
+ export type MapResult<T extends Spec> = ToOptional<{
13
13
  [K in keyof T]: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? MapResult<T[K]> : never;
14
14
  }>;
15
15
  /**
16
16
  * @public
17
17
  */
18
- export declare type MapResultWithOptional<T extends Spec> = ToOptional<{
18
+ export type MapResultWithOptional<T extends Spec> = ToOptional<{
19
19
  [K in keyof T]?: T[K] extends ISchema ? ReturnType<T[K]['deserialize']> : T[K] extends Spec ? MapResult<T[K]> : never;
20
20
  }>;
21
- export declare type MapSchemaType<T extends Spec> = ISchema<MapResult<T>>;
21
+ export type MapSchemaType<T extends Spec> = ISchema<MapResult<T>>;
22
22
  /**
23
23
  * @public
24
24
  */
@@ -2,7 +2,7 @@ import { ISchema } from '../ISchema';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type Color3Type = {
5
+ export type Color3Type = {
6
6
  r: number;
7
7
  g: number;
8
8
  b: number;
@@ -2,7 +2,7 @@ import { ISchema } from '../ISchema';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type Color4Type = {
5
+ export type Color4Type = {
6
6
  r: number;
7
7
  g: number;
8
8
  b: number;
@@ -2,7 +2,7 @@ import { ISchema } from '../ISchema';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type QuaternionType = {
5
+ export type QuaternionType = {
6
6
  x: number;
7
7
  y: number;
8
8
  z: number;
@@ -2,7 +2,7 @@ import { ISchema } from '../ISchema';
2
2
  /**
3
3
  * @public
4
4
  */
5
- export declare type Vector3Type = {
5
+ export type Vector3Type = {
6
6
  x: number;
7
7
  y: number;
8
8
  z: number;
@@ -1,15 +1,15 @@
1
1
  /** Include property keys from T where the property is assignable to U */
2
- export declare type IncludeUndefined<T> = {
2
+ export type IncludeUndefined<T> = {
3
3
  [P in keyof T]: undefined extends T[P] ? P : never;
4
4
  }[keyof T];
5
5
  /** Excludes property keys from T where the property is assignable to U */
6
- export declare type ExcludeUndefined<T> = {
6
+ export type ExcludeUndefined<T> = {
7
7
  [P in keyof T]: undefined extends T[P] ? never : P;
8
8
  }[keyof T];
9
- export declare type OnlyOptionalUndefinedTypes<T> = {
9
+ export type OnlyOptionalUndefinedTypes<T> = {
10
10
  [K in IncludeUndefined<T>]?: T[K];
11
11
  };
12
- export declare type OnlyNonUndefinedTypes<T> = {
12
+ export type OnlyNonUndefinedTypes<T> = {
13
13
  [K in ExcludeUndefined<T>]: T[K];
14
14
  };
15
- export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
15
+ export type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
@@ -75,7 +75,7 @@ export declare class ReadWriteByteBuffer implements ByteBuffer {
75
75
  /**
76
76
  * @public
77
77
  */
78
- export declare type ByteBuffer = {
78
+ export type ByteBuffer = {
79
79
  /**
80
80
  * @returns The entire current Uint8Array.
81
81
  *
@@ -1,5 +1,5 @@
1
1
  import { Entity } from '../../engine/entity';
2
- export declare type Uint32 = number;
2
+ export type Uint32 = number;
3
3
  export declare enum CrdtMessageType {
4
4
  RESERVED = 0,
5
5
  PUT_COMPONENT = 1,
@@ -13,7 +13,7 @@ export declare enum CrdtMessageType {
13
13
  * @param length - Uint32 the length of all message (including the header)
14
14
  * @param type - define the function which handles the data
15
15
  */
16
- export declare type CrdtMessageHeader = {
16
+ export type CrdtMessageHeader = {
17
17
  length: Uint32;
18
18
  type: Uint32;
19
19
  };
@@ -26,14 +26,14 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
26
26
  * @param timestamp - Uint64 Lamport timestamp
27
27
  * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
28
28
  */
29
- export declare type PutComponentMessageBody = {
29
+ export type PutComponentMessageBody = {
30
30
  type: CrdtMessageType.PUT_COMPONENT;
31
31
  entityId: Entity;
32
32
  componentId: number;
33
33
  timestamp: number;
34
34
  data: Uint8Array;
35
35
  };
36
- export declare type DeleteComponentMessageBody = {
36
+ export type DeleteComponentMessageBody = {
37
37
  type: CrdtMessageType.DELETE_COMPONENT;
38
38
  entityId: Entity;
39
39
  componentId: number;
@@ -42,12 +42,12 @@ export declare type DeleteComponentMessageBody = {
42
42
  /**
43
43
  * @param entity - Uint32 number of the entity
44
44
  */
45
- export declare type DeleteEntityMessageBody = {
45
+ export type DeleteEntityMessageBody = {
46
46
  type: CrdtMessageType.DELETE_ENTITY;
47
47
  entityId: Entity;
48
48
  };
49
- export declare type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
50
- export declare type DeleteComponentMessage = CrdtMessageHeader & DeleteComponentMessageBody;
51
- export declare type DeleteEntityMessage = CrdtMessageHeader & DeleteEntityMessageBody;
52
- export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage;
53
- export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessage;
49
+ export type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
50
+ export type DeleteComponentMessage = CrdtMessageHeader & DeleteComponentMessageBody;
51
+ export type DeleteEntityMessage = CrdtMessageHeader & DeleteEntityMessageBody;
52
+ export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage;
53
+ export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessage;
@@ -1,5 +1,5 @@
1
1
  import { IEngine } from '../engine';
2
- export declare type Task<T = unknown> = () => Promise<T>;
2
+ export type Task<T = unknown> = () => Promise<T>;
3
3
  export declare function createTaskSystem(engine: IEngine): {
4
4
  executeTask(task: Task): void;
5
5
  };
@@ -5,7 +5,7 @@ import { Transport } from './types';
5
5
  /**
6
6
  * @public
7
7
  */
8
- export declare type OnChangeFunction = (entity: Entity, operation: CrdtMessageType, component?: ComponentDefinition<any>) => void;
8
+ export type OnChangeFunction = (entity: Entity, operation: CrdtMessageType, component?: ComponentDefinition<any>) => void;
9
9
  export declare function crdtSceneSystem(engine: Pick<IEngine, 'getComponentOrNull' | 'getComponent' | 'entityContainer' | 'componentsIter'>, onProcessEntityComponentChange: OnChangeFunction | null): {
10
10
  getCrdt: () => import("@dcl/crdt").State<Uint8Array>;
11
11
  sendMessages: (dirtyEntities: Map<ComponentDefinition<unknown>, Array<Entity>>, deletedEntities: Entity[]) => Promise<void>;
@@ -1,10 +1,10 @@
1
1
  import { CrdtMessageBody } from '../../serialization/crdt/types';
2
- export declare type ReceiveMessage = CrdtMessageBody & {
2
+ export type ReceiveMessage = CrdtMessageBody & {
3
3
  transportId?: number;
4
4
  messageBuffer: Uint8Array;
5
5
  };
6
- export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
7
- export declare type Transport = {
6
+ export type TransportMessage = Omit<ReceiveMessage, 'data'>;
7
+ export type Transport = {
8
8
  send(message: Uint8Array): Promise<void>;
9
9
  onmessage?(message: Uint8Array): void;
10
10
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
@@ -3,14 +3,14 @@ import { PBPointerEventsResult_PointerCommand } from '../components/generated/pb
3
3
  import { IEngine } from '../engine/types';
4
4
  import { Entity } from '../engine/entity';
5
5
  import { IInputSystem } from '../engine/input';
6
- export declare type EventSystemCallback = (event: PBPointerEventsResult_PointerCommand) => void;
7
- export declare type EventSystemOptions = {
6
+ export type EventSystemCallback = (event: PBPointerEventsResult_PointerCommand) => void;
7
+ export type EventSystemOptions = {
8
8
  button: InputAction;
9
9
  hoverText?: string;
10
10
  maxDistance?: number;
11
11
  showFeedback?: boolean;
12
12
  };
13
- export declare type PointerEventsSystem = ReturnType<typeof createPointerEventSystem>;
13
+ export type PointerEventsSystem = ReturnType<typeof createPointerEventSystem>;
14
14
  export declare function createPointerEventSystem(engine: IEngine, inputSystem: IInputSystem): {
15
15
  /**
16
16
  * @internal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/ecs",
3
- "version": "7.0.6-3991588905.commit-2387247",
3
+ "version": "7.0.6-4006744889.commit-c6aff5f",
4
4
  "description": "Decentraland ECS",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -27,9 +27,9 @@
27
27
  "ts-proto": "^1.112.0"
28
28
  },
29
29
  "dependencies": {
30
- "@dcl/crdt": "7.0.6-3991588905.commit-2387247",
30
+ "@dcl/crdt": "7.0.6-4006744889.commit-c6aff5f",
31
31
  "@dcl/js-runtime": "file:../js-runtime",
32
- "@dcl/protocol": "^1.0.0-3939040004.commit-2c2721f"
32
+ "@dcl/protocol": "1.0.0-3998437165.commit-16d59c3"
33
33
  },
34
34
  "files": [
35
35
  "dist",
@@ -41,5 +41,5 @@
41
41
  "displayName": "ECS",
42
42
  "tsconfig": "./tsconfig.json"
43
43
  },
44
- "commit": "23872474e21fa2a754898685200f5763211b5f90"
44
+ "commit": "c6aff5f2e439d5af79c1e38d02ff90d3604670f3"
45
45
  }