@dcl/sdk 7.0.0-2590698369.commit-b86034f → 7.0.0-2597145987.commit-a1336ed

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.
@@ -1551,11 +1551,12 @@ export declare namespace Quaternion {
1551
1551
  export declare const RAD2DEG: number;
1552
1552
 
1553
1553
  declare type ReceiveMessage = {
1554
+ type: WireMessage.Enum;
1554
1555
  entity: Entity;
1555
1556
  componentId: number;
1556
1557
  timestamp: number;
1557
1558
  transportType?: string;
1558
- data: Uint8Array;
1559
+ data?: Uint8Array;
1559
1560
  messageBuffer: Uint8Array;
1560
1561
  };
1561
1562
 
@@ -1621,11 +1622,13 @@ declare type Transport = {
1621
1622
  type: string;
1622
1623
  send(message: Uint8Array): void;
1623
1624
  onmessage?(message: Uint8Array): void;
1624
- filter(message: TransportMessage): boolean;
1625
+ filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
1625
1626
  };
1626
1627
 
1627
1628
  declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
1628
1629
 
1630
+ declare type Uint32 = number;
1631
+
1629
1632
  /**
1630
1633
  * @public
1631
1634
  */
@@ -1839,6 +1842,30 @@ export declare namespace Vector3 {
1839
1842
  export function Left(): MutableVector3;
1840
1843
  }
1841
1844
 
1845
+ declare namespace WireMessage {
1846
+ enum Enum {
1847
+ RESERVED = 0,
1848
+ PUT_COMPONENT = 1,
1849
+ DELETE_COMPONENT = 2,
1850
+ MAX_MESSAGE_TYPE = 3
1851
+ }
1852
+ /**
1853
+ * @param length - Uint32 the length of all message (including the header)
1854
+ * @param type - define the function which handles the data
1855
+ */
1856
+ type Header = {
1857
+ length: Uint32;
1858
+ type: Uint32;
1859
+ };
1860
+ const HEADER_LENGTH = 8;
1861
+ /**
1862
+ * Validate if the message incoming is completed
1863
+ * @param buf
1864
+ */
1865
+ function validate(buf: ByteBuffer): boolean;
1866
+ function readHeader(buf: ByteBuffer): Header | null;
1867
+ }
1868
+
1842
1869
  declare enum YGAlign {
1843
1870
  YGAlignAuto = 0,
1844
1871
  YGAlignFlexStart = 1,