@dcl/react-ecs 0.0.1-3039764556.commit-d9e186e → 0.0.1-3045967591.commit-85b242a

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/index.d.ts CHANGED
@@ -2,6 +2,12 @@ export declare const CANVAS_ROOT_ENTITY = 7;
2
2
 
3
3
  export declare type Children = any;
4
4
 
5
+ export declare interface Color3 {
6
+ r: number;
7
+ g: number;
8
+ b: number;
9
+ }
10
+
5
11
  export declare type CommonProps = {
6
12
  key: Key;
7
13
  children: Children;
@@ -17,6 +23,7 @@ declare type EcsElements = {
17
23
 
18
24
  declare type EntityComponents = {
19
25
  uiTransform: PBUiTransform;
26
+ uiText: PBUiText;
20
27
  };
21
28
 
22
29
  /**
@@ -24,8 +31,15 @@ declare type EntityComponents = {
24
31
  */
25
32
  export declare type EntityPropTypes = {
26
33
  uiTransform?: UiTransformProps;
34
+ uiText?: UiTextProps;
27
35
  };
28
36
 
37
+ export declare enum Font {
38
+ LiberationSans = 0,
39
+ SansSerif = 1,
40
+ UNRECOGNIZED = -1
41
+ }
42
+
29
43
  declare namespace JSX {
30
44
  interface Element {
31
45
  }
@@ -36,6 +50,18 @@ declare namespace JSX {
36
50
 
37
51
  export declare type Key = number | string;
38
52
 
53
+ export declare interface PBUiText {
54
+ value: string;
55
+ /** default=(1.0,1.0,1.0) */
56
+ color?: Color3 | undefined;
57
+ /** default='center' */
58
+ textAlign?: TextAlign | undefined;
59
+ /** default=0 */
60
+ font?: Font | undefined;
61
+ /** default=10 */
62
+ fontSize?: number | undefined;
63
+ }
64
+
39
65
  export declare interface PBUiTransform {
40
66
  parent: number;
41
67
  rightOf: number;
@@ -124,6 +150,13 @@ export declare function removeUi(index: number): void;
124
150
 
125
151
  export declare function renderUi(ui: UiComponent): number;
126
152
 
153
+ export declare enum TextAlign {
154
+ Center = 0,
155
+ Left = 1,
156
+ Right = 2,
157
+ UNRECOGNIZED = -1
158
+ }
159
+
127
160
  export declare type UiComponent = () => JSX.Element;
128
161
 
129
162
  /**
@@ -131,6 +164,8 @@ export declare type UiComponent = () => JSX.Element;
131
164
  */
132
165
  export declare function UiEntity(props: EntityPropTypes & Partial<CommonProps>): ReactEcs.JSX.Element;
133
166
 
167
+ export declare type UiTextProps = PBUiText;
168
+
134
169
  /**
135
170
  * @public
136
171
  */