@dcl/react-ecs 0.0.1-3469489430.commit-9c7979a → 0.0.1-3482345038.commit-6d0f818
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 +50 -39
- package/dist/index.js +11 -32
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
export declare const CANVAS_ROOT_ENTITY = 7;
|
|
4
|
-
|
|
5
3
|
export declare type Children = any;
|
|
6
4
|
|
|
7
5
|
export declare interface Color3 {
|
|
@@ -39,8 +37,8 @@ declare type Entity = number & {
|
|
|
39
37
|
|
|
40
38
|
export declare type EntityComponents = {
|
|
41
39
|
uiTransform: PBUiTransform;
|
|
42
|
-
uiText:
|
|
43
|
-
uiBackground:
|
|
40
|
+
uiText: UiTextProps;
|
|
41
|
+
uiBackground: UiBackgroundProps;
|
|
44
42
|
onClick: OnClick;
|
|
45
43
|
};
|
|
46
44
|
|
|
@@ -167,62 +165,90 @@ export declare interface PBUiText {
|
|
|
167
165
|
export declare interface PBUiTransform {
|
|
168
166
|
parent: number;
|
|
169
167
|
rightOf: number;
|
|
168
|
+
/** default: YGAlign.YGA_FLEX_START */
|
|
169
|
+
alignContent?: YGAlign | undefined;
|
|
170
|
+
/** default: YGAlign.YGA_STRETCH */
|
|
171
|
+
alignItems?: YGAlign | undefined;
|
|
172
|
+
/** default: YGWrap.YGW_WRAP */
|
|
173
|
+
flexWrap?: YGWrap | undefined;
|
|
174
|
+
/** default: 1 */
|
|
175
|
+
flexShrink?: number | undefined;
|
|
176
|
+
/** YGPositionType.YGPT_RELATIVE */
|
|
170
177
|
positionType: YGPositionType;
|
|
171
|
-
|
|
172
|
-
alignItems: YGAlign;
|
|
178
|
+
/** YGAlign.YGA_AUTO */
|
|
173
179
|
alignSelf: YGAlign;
|
|
180
|
+
/** YGFlexDirection.YGFD_ROW */
|
|
174
181
|
flexDirection: YGFlexDirection;
|
|
175
|
-
|
|
182
|
+
/** YGJustify.YGJ_FLEX_START */
|
|
176
183
|
justifyContent: YGJustify;
|
|
184
|
+
/** YGOverflow.YGO_VISIBLE */
|
|
177
185
|
overflow: YGOverflow;
|
|
186
|
+
/** YGDisplay.YGD_FLEX */
|
|
178
187
|
display: YGDisplay;
|
|
179
|
-
|
|
180
|
-
flex: number;
|
|
188
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
181
189
|
flexBasisUnit: YGUnit;
|
|
182
190
|
flexBasis: number;
|
|
183
191
|
flexGrow: number;
|
|
184
|
-
|
|
192
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
185
193
|
widthUnit: YGUnit;
|
|
186
194
|
width: number;
|
|
195
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
187
196
|
heightUnit: YGUnit;
|
|
188
197
|
height: number;
|
|
198
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
189
199
|
minWidthUnit: YGUnit;
|
|
190
200
|
minWidth: number;
|
|
201
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
191
202
|
minHeightUnit: YGUnit;
|
|
192
203
|
minHeight: number;
|
|
204
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
193
205
|
maxWidthUnit: YGUnit;
|
|
194
206
|
maxWidth: number;
|
|
207
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
195
208
|
maxHeightUnit: YGUnit;
|
|
196
209
|
maxHeight: number;
|
|
210
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
197
211
|
positionLeftUnit: YGUnit;
|
|
198
212
|
positionLeft: number;
|
|
213
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
199
214
|
positionTopUnit: YGUnit;
|
|
200
215
|
positionTop: number;
|
|
216
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
201
217
|
positionRightUnit: YGUnit;
|
|
202
218
|
positionRight: number;
|
|
219
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
203
220
|
positionBottomUnit: YGUnit;
|
|
204
221
|
positionBottom: number;
|
|
205
|
-
/**
|
|
222
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
206
223
|
marginLeftUnit: YGUnit;
|
|
207
224
|
marginLeft: number;
|
|
225
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
208
226
|
marginTopUnit: YGUnit;
|
|
209
227
|
marginTop: number;
|
|
228
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
210
229
|
marginRightUnit: YGUnit;
|
|
211
230
|
marginRight: number;
|
|
231
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
212
232
|
marginBottomUnit: YGUnit;
|
|
213
233
|
marginBottom: number;
|
|
234
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
214
235
|
paddingLeftUnit: YGUnit;
|
|
215
236
|
paddingLeft: number;
|
|
237
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
216
238
|
paddingTopUnit: YGUnit;
|
|
217
239
|
paddingTop: number;
|
|
240
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
218
241
|
paddingRightUnit: YGUnit;
|
|
219
242
|
paddingRight: number;
|
|
243
|
+
/** YGUnit.YGU_UNDEFINED */
|
|
220
244
|
paddingBottomUnit: YGUnit;
|
|
221
245
|
paddingBottom: number;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
declare interface PBVector3 {
|
|
249
|
+
x: number;
|
|
250
|
+
y: number;
|
|
251
|
+
z: number;
|
|
226
252
|
}
|
|
227
253
|
|
|
228
254
|
declare const enum PointerEventType {
|
|
@@ -246,10 +272,10 @@ export declare type PositionUnit = `${number}px` | `${number}%` | number;
|
|
|
246
272
|
|
|
247
273
|
/** Position will be relative to the scene */
|
|
248
274
|
declare interface RaycastHit {
|
|
249
|
-
position:
|
|
250
|
-
origin:
|
|
251
|
-
direction:
|
|
252
|
-
normalHit:
|
|
275
|
+
position: PBVector3 | undefined;
|
|
276
|
+
origin: PBVector3 | undefined;
|
|
277
|
+
direction: PBVector3 | undefined;
|
|
278
|
+
normalHit: PBVector3 | undefined;
|
|
253
279
|
length: number;
|
|
254
280
|
meshName?: string | undefined;
|
|
255
281
|
entityId?: number | undefined;
|
|
@@ -311,7 +337,6 @@ export declare interface UiTransformProps {
|
|
|
311
337
|
position?: Partial<Position>;
|
|
312
338
|
padding?: Partial<Position>;
|
|
313
339
|
margin?: Partial<Position>;
|
|
314
|
-
direction?: YGDirection;
|
|
315
340
|
width?: PositionUnit;
|
|
316
341
|
height?: PositionUnit;
|
|
317
342
|
minWidth?: PositionUnit;
|
|
@@ -325,12 +350,6 @@ export declare interface UiTransformProps {
|
|
|
325
350
|
overflow?: YGOverflow;
|
|
326
351
|
}
|
|
327
352
|
|
|
328
|
-
declare interface Vector3_2 {
|
|
329
|
-
x: number;
|
|
330
|
-
y: number;
|
|
331
|
-
z: number;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
353
|
export declare enum YGAlign {
|
|
335
354
|
YGA_AUTO = 0,
|
|
336
355
|
YGA_FLEX_START = 1,
|
|
@@ -343,13 +362,6 @@ export declare enum YGAlign {
|
|
|
343
362
|
UNRECOGNIZED = -1
|
|
344
363
|
}
|
|
345
364
|
|
|
346
|
-
export declare enum YGDirection {
|
|
347
|
-
YGD_INHERIT = 0,
|
|
348
|
-
YGD_LTR = 1,
|
|
349
|
-
YGD_RTL = 2,
|
|
350
|
-
UNRECOGNIZED = -1
|
|
351
|
-
}
|
|
352
|
-
|
|
353
365
|
export declare enum YGDisplay {
|
|
354
366
|
YGD_FLEX = 0,
|
|
355
367
|
YGD_NONE = 1,
|
|
@@ -357,9 +369,9 @@ export declare enum YGDisplay {
|
|
|
357
369
|
}
|
|
358
370
|
|
|
359
371
|
export declare enum YGFlexDirection {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
372
|
+
YGFD_ROW = 0,
|
|
373
|
+
YGFD_COLUMN = 1,
|
|
374
|
+
YGFD_COLUMN_REVERSE = 2,
|
|
363
375
|
YGFD_ROW_REVERSE = 3,
|
|
364
376
|
UNRECOGNIZED = -1
|
|
365
377
|
}
|
|
@@ -382,9 +394,8 @@ export declare enum YGOverflow {
|
|
|
382
394
|
}
|
|
383
395
|
|
|
384
396
|
export declare enum YGPositionType {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
YGPT_ABSOLUTE = 2,
|
|
397
|
+
YGPT_RELATIVE = 0,
|
|
398
|
+
YGPT_ABSOLUTE = 1,
|
|
388
399
|
UNRECOGNIZED = -1
|
|
389
400
|
}
|
|
390
401
|
|