@dcl/sdk 7.0.0-3015711272.commit-6716e5a → 7.0.0-3038080345.commit-de046a3
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 +149 -10
- package/dist/ecs7/index.js +601 -59
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/UiTransform.proto +3 -2
- package/package.json +4 -4
- package/types/dcl/decentraland-ecs.api.json +102 -102
- package/types/dcl/decentraland-ecs.api.md +35 -35
- package/types/ecs7/index.d.ts +149 -10
- package/types/tsconfig.ecs7.json +2 -0
package/dist/ecs7/index.d.ts
CHANGED
@@ -261,6 +261,8 @@ export declare namespace Components {
|
|
261
261
|
/** @public */
|
262
262
|
const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
263
263
|
/** @public */
|
264
|
+
const UiTransform: ComponentDefinition<ISchema<PBUiTransform>, PBUiTransform>;
|
265
|
+
/** @public */
|
264
266
|
const VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
|
265
267
|
}
|
266
268
|
|
@@ -493,6 +495,7 @@ declare function defineSdkComponents(engine: PreEngine): {
|
|
493
495
|
SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
|
494
496
|
TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
495
497
|
UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
498
|
+
UiTransform: ComponentDefinition<ISchema<PBUiTransform>, PBUiTransform>;
|
496
499
|
VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
|
497
500
|
};
|
498
501
|
|
@@ -596,13 +599,13 @@ export declare type IEngine = {
|
|
596
599
|
* engine.addSystem(mySystem, 10)
|
597
600
|
* ```
|
598
601
|
*/
|
599
|
-
addSystem(system:
|
602
|
+
addSystem(system: SystemFn, priority?: number, name?: string): void;
|
600
603
|
/**
|
601
604
|
* Remove a system from the engine.
|
602
605
|
* @param selector the function or the unique name to identify
|
603
606
|
* @returns if it was found and removed
|
604
607
|
*/
|
605
|
-
removeSystem(selector: string |
|
608
|
+
removeSystem(selector: string | SystemFn): boolean;
|
606
609
|
/**
|
607
610
|
* Define a component and add it to the engine.
|
608
611
|
* @param spec An object with schema fields
|
@@ -2193,6 +2196,67 @@ declare interface PBUiText {
|
|
2193
2196
|
textColor: Color3 | undefined;
|
2194
2197
|
}
|
2195
2198
|
|
2199
|
+
declare interface PBUiTransform {
|
2200
|
+
parent: number;
|
2201
|
+
rightOf: number;
|
2202
|
+
positionType: YGPositionType;
|
2203
|
+
alignContent: YGAlign;
|
2204
|
+
alignItems: YGAlign;
|
2205
|
+
alignSelf: YGAlign;
|
2206
|
+
flexDirection: YGFlexDirection;
|
2207
|
+
flexWrap: YGWrap;
|
2208
|
+
justifyContent: YGJustify;
|
2209
|
+
overflow: YGOverflow;
|
2210
|
+
display: YGDisplay;
|
2211
|
+
direction: YGDirection;
|
2212
|
+
flex: number;
|
2213
|
+
flexBasisUnit: YGUnit;
|
2214
|
+
flexBasis: number;
|
2215
|
+
flexGrow: number;
|
2216
|
+
flexShrink: number;
|
2217
|
+
widthUnit: YGUnit;
|
2218
|
+
width: number;
|
2219
|
+
heightUnit: YGUnit;
|
2220
|
+
height: number;
|
2221
|
+
minWidthUnit: YGUnit;
|
2222
|
+
minWidth: number;
|
2223
|
+
minHeightUnit: YGUnit;
|
2224
|
+
minHeight: number;
|
2225
|
+
maxWidthUnit: YGUnit;
|
2226
|
+
maxWidth: number;
|
2227
|
+
maxHeightUnit: YGUnit;
|
2228
|
+
maxHeight: number;
|
2229
|
+
positionLeftUnit: YGUnit;
|
2230
|
+
positionLeft: number;
|
2231
|
+
positionTopUnit: YGUnit;
|
2232
|
+
positionTop: number;
|
2233
|
+
positionRightUnit: YGUnit;
|
2234
|
+
positionRight: number;
|
2235
|
+
positionBottomUnit: YGUnit;
|
2236
|
+
positionBottom: number;
|
2237
|
+
/** margin */
|
2238
|
+
marginLeftUnit: YGUnit;
|
2239
|
+
marginLeft: number;
|
2240
|
+
marginTopUnit: YGUnit;
|
2241
|
+
marginTop: number;
|
2242
|
+
marginRightUnit: YGUnit;
|
2243
|
+
marginRight: number;
|
2244
|
+
marginBottomUnit: YGUnit;
|
2245
|
+
marginBottom: number;
|
2246
|
+
paddingLeftUnit: YGUnit;
|
2247
|
+
paddingLeft: number;
|
2248
|
+
paddingTopUnit: YGUnit;
|
2249
|
+
paddingTop: number;
|
2250
|
+
paddingRightUnit: YGUnit;
|
2251
|
+
paddingRight: number;
|
2252
|
+
paddingBottomUnit: YGUnit;
|
2253
|
+
paddingBottom: number;
|
2254
|
+
borderLeft: number;
|
2255
|
+
borderTop: number;
|
2256
|
+
borderRight: number;
|
2257
|
+
borderBottom: number;
|
2258
|
+
}
|
2259
|
+
|
2196
2260
|
declare interface PBVisibilityComponent {
|
2197
2261
|
/** default=true */
|
2198
2262
|
visible?: boolean | undefined;
|
@@ -2338,13 +2402,13 @@ declare function preEngine(): {
|
|
2338
2402
|
addEntity: (dynamic?: boolean) => Entity;
|
2339
2403
|
addDynamicEntity: () => Entity;
|
2340
2404
|
removeEntity: (entity: Entity) => boolean;
|
2341
|
-
addSystem: (fn:
|
2405
|
+
addSystem: (fn: SystemFn, priority?: number, name?: string | undefined) => void;
|
2342
2406
|
getSystems: () => {
|
2343
|
-
fn:
|
2407
|
+
fn: SystemFn;
|
2344
2408
|
priority: number;
|
2345
2409
|
name?: string | undefined;
|
2346
2410
|
}[];
|
2347
|
-
removeSystem: (selector: string |
|
2411
|
+
removeSystem: (selector: string | SystemFn) => boolean;
|
2348
2412
|
defineComponent: <T extends Spec, ConstructorType = Partial<Result<T>>>(spec: T, componentId: number, constructorDefault?: ConstructorType | undefined) => ComponentDefinition<ISchema<Result<T>>, ConstructorType>;
|
2349
2413
|
defineComponentFromSchema: <T_1 extends ISchema<any>, ConstructorType_1 = EcsResult<T_1>>(spec: T_1, componentId: number, constructorDefault?: ConstructorType_1 | undefined) => ComponentDefinition<T_1, ConstructorType_1>;
|
2350
2414
|
getEntitiesWith: <T_2 extends [ComponentDefinition<ISchema<any>, any>, ...ComponentDefinition<ISchema<any>, any>[]]>(...components: T_2) => Iterable<[Entity, ...ReadonlyComponentSchema<T_2>]>;
|
@@ -2613,6 +2677,11 @@ export declare interface Spec {
|
|
2613
2677
|
/** @public */
|
2614
2678
|
export declare const SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
|
2615
2679
|
|
2680
|
+
/**
|
2681
|
+
* @public
|
2682
|
+
*/
|
2683
|
+
export declare type SystemFn = (dt: number) => void;
|
2684
|
+
|
2616
2685
|
/** @public */
|
2617
2686
|
export declare const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
2618
2687
|
|
@@ -2687,15 +2756,13 @@ declare type Uint32 = number;
|
|
2687
2756
|
/** @public */
|
2688
2757
|
export declare const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
2689
2758
|
|
2690
|
-
/**
|
2691
|
-
|
2692
|
-
*/
|
2693
|
-
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
2759
|
+
/** @public */
|
2760
|
+
export declare const UiTransform: ComponentDefinition<ISchema<PBUiTransform>, PBUiTransform>;
|
2694
2761
|
|
2695
2762
|
/**
|
2696
2763
|
* @public
|
2697
2764
|
*/
|
2698
|
-
export declare type
|
2765
|
+
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
2699
2766
|
|
2700
2767
|
/**
|
2701
2768
|
* @public
|
@@ -2943,4 +3010,76 @@ declare namespace WireMessage {
|
|
2943
3010
|
function readHeader(buf: ByteBuffer): Header | null;
|
2944
3011
|
}
|
2945
3012
|
|
3013
|
+
declare const enum YGAlign {
|
3014
|
+
YGAlignAuto = 0,
|
3015
|
+
YGAlignFlexStart = 1,
|
3016
|
+
YGAlignCenter = 2,
|
3017
|
+
YGAlignFlexEnd = 3,
|
3018
|
+
YGAlignStretch = 4,
|
3019
|
+
YGAlignBaseline = 5,
|
3020
|
+
YGAlignSpaceBetween = 6,
|
3021
|
+
YGAlignSpaceAround = 7,
|
3022
|
+
UNRECOGNIZED = -1
|
3023
|
+
}
|
3024
|
+
|
3025
|
+
declare const enum YGDirection {
|
3026
|
+
YGDirectionInherit = 0,
|
3027
|
+
YGDirectionLTR = 1,
|
3028
|
+
YGDirectionRTL = 2,
|
3029
|
+
UNRECOGNIZED = -1
|
3030
|
+
}
|
3031
|
+
|
3032
|
+
declare const enum YGDisplay {
|
3033
|
+
YGDisplayFlex = 0,
|
3034
|
+
YGDisplayNone = 1,
|
3035
|
+
UNRECOGNIZED = -1
|
3036
|
+
}
|
3037
|
+
|
3038
|
+
declare const enum YGFlexDirection {
|
3039
|
+
YGFlexDirectionColumn = 0,
|
3040
|
+
YGFlexDirectionColumnReverse = 1,
|
3041
|
+
YGFlexDirectionRow = 2,
|
3042
|
+
YGFlexDirectionRowReverse = 3,
|
3043
|
+
UNRECOGNIZED = -1
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
declare const enum YGJustify {
|
3047
|
+
YGJustifyFlexStart = 0,
|
3048
|
+
YGJustifyCenter = 1,
|
3049
|
+
YGJustifyFlexEnd = 2,
|
3050
|
+
YGJustifySpaceBetween = 3,
|
3051
|
+
YGJustifySpaceAround = 4,
|
3052
|
+
YGJustifySpaceEvenly = 5,
|
3053
|
+
UNRECOGNIZED = -1
|
3054
|
+
}
|
3055
|
+
|
3056
|
+
declare const enum YGOverflow {
|
3057
|
+
YGOverflowVisible = 0,
|
3058
|
+
YGOverflowHidden = 1,
|
3059
|
+
YGOverflowScroll = 2,
|
3060
|
+
UNRECOGNIZED = -1
|
3061
|
+
}
|
3062
|
+
|
3063
|
+
declare const enum YGPositionType {
|
3064
|
+
YGPositionTypeStatic = 0,
|
3065
|
+
YGPositionTypeRelative = 1,
|
3066
|
+
YGPositionTypeAbsolute = 2,
|
3067
|
+
UNRECOGNIZED = -1
|
3068
|
+
}
|
3069
|
+
|
3070
|
+
declare const enum YGUnit {
|
3071
|
+
YGUnitUndefined = 0,
|
3072
|
+
YGUnitPoint = 1,
|
3073
|
+
YGUnitPercent = 2,
|
3074
|
+
YGUnitAuto = 3,
|
3075
|
+
UNRECOGNIZED = -1
|
3076
|
+
}
|
3077
|
+
|
3078
|
+
declare const enum YGWrap {
|
3079
|
+
YGWrapNoWrap = 0,
|
3080
|
+
YGWrapWrap = 1,
|
3081
|
+
YGWrapWrapReverse = 2,
|
3082
|
+
UNRECOGNIZED = -1
|
3083
|
+
}
|
3084
|
+
|
2946
3085
|
export { }
|