@dcl/sdk 7.0.0-2569737935.commit-cdfa2fc → 7.0.0-2598214894.commit-fe20830
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.
- package/dist/ecs7/index.d.ts +44 -2
- package/dist/ecs7/index.js +207 -102
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/Animator.proto +18 -0
- package/package.json +4 -4
- package/types/ecs7/index.d.ts +44 -2
package/dist/ecs7/index.d.ts
CHANGED
@@ -185,6 +185,7 @@ export declare type DeepReadonly<T> = {
|
|
185
185
|
};
|
186
186
|
|
187
187
|
declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>): {
|
188
|
+
Animator: ComponentDefinition<EcsType<PBAnimator>>;
|
188
189
|
AudioSource: ComponentDefinition<EcsType<PBAudioSource>>;
|
189
190
|
AudioStream: ComponentDefinition<EcsType<PBAudioStream>>;
|
190
191
|
BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
|
@@ -1104,6 +1105,20 @@ export declare enum Orientation {
|
|
1104
1105
|
CCW = 1
|
1105
1106
|
}
|
1106
1107
|
|
1108
|
+
declare interface PBAnimationState {
|
1109
|
+
name: string;
|
1110
|
+
clip: string;
|
1111
|
+
playing: boolean;
|
1112
|
+
weight: number;
|
1113
|
+
speed: number;
|
1114
|
+
loop: boolean;
|
1115
|
+
shouldReset: boolean;
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
declare interface PBAnimator {
|
1119
|
+
states: PBAnimationState[];
|
1120
|
+
}
|
1121
|
+
|
1107
1122
|
declare interface PBAudioSource {
|
1108
1123
|
playing: boolean;
|
1109
1124
|
volume: number;
|
@@ -1536,11 +1551,12 @@ export declare namespace Quaternion {
|
|
1536
1551
|
export declare const RAD2DEG: number;
|
1537
1552
|
|
1538
1553
|
declare type ReceiveMessage = {
|
1554
|
+
type: WireMessage.Enum;
|
1539
1555
|
entity: Entity;
|
1540
1556
|
componentId: number;
|
1541
1557
|
timestamp: number;
|
1542
1558
|
transportType?: string;
|
1543
|
-
data
|
1559
|
+
data?: Uint8Array;
|
1544
1560
|
messageBuffer: Uint8Array;
|
1545
1561
|
};
|
1546
1562
|
|
@@ -1606,11 +1622,13 @@ declare type Transport = {
|
|
1606
1622
|
type: string;
|
1607
1623
|
send(message: Uint8Array): void;
|
1608
1624
|
onmessage?(message: Uint8Array): void;
|
1609
|
-
filter(message: TransportMessage): boolean;
|
1625
|
+
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
1610
1626
|
};
|
1611
1627
|
|
1612
1628
|
declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
1613
1629
|
|
1630
|
+
declare type Uint32 = number;
|
1631
|
+
|
1614
1632
|
/**
|
1615
1633
|
* @public
|
1616
1634
|
*/
|
@@ -1824,6 +1842,30 @@ export declare namespace Vector3 {
|
|
1824
1842
|
export function Left(): MutableVector3;
|
1825
1843
|
}
|
1826
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
|
+
|
1827
1869
|
declare enum YGAlign {
|
1828
1870
|
YGAlignAuto = 0,
|
1829
1871
|
YGAlignFlexStart = 1,
|