@dcl/sdk 7.0.0-2536237172.commit-c1aae82 → 7.0.0-2536766001.commit-8116fe1
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 -2
- package/dist/ecs7/index.js +698 -21
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/BoxShape.proto +2 -1
- package/dist/ecs7/proto-definitions/CylinderShape.proto +2 -1
- package/dist/ecs7/proto-definitions/GLTFShape.proto +11 -0
- package/dist/ecs7/proto-definitions/NFTShape.proto +1 -0
- package/dist/ecs7/proto-definitions/PlaneShape.proto +3 -1
- package/dist/ecs7/proto-definitions/SphereShape.proto +1 -1
- package/dist/ecs7/proto-definitions/TextShape.proto +7 -5
- package/dist/ecs7/proto-definitions/UiTransform.proto +159 -0
- package/package.json +6 -6
- package/types/ecs7/index.d.ts +149 -2
package/dist/ecs7/index.d.ts
CHANGED
@@ -22,9 +22,9 @@ export declare type ComponentDefinition<T extends EcsType = EcsType<any>> = {
|
|
22
22
|
has(entity: Entity): boolean;
|
23
23
|
getFrom(entity: Entity): DeepReadonly<ComponentType<T>>;
|
24
24
|
getOrNull(entity: Entity): DeepReadonly<ComponentType<T>> | null;
|
25
|
-
create(entity: Entity, val
|
25
|
+
create(entity: Entity, val?: ComponentType<T>): ComponentType<T>;
|
26
26
|
mutable(entity: Entity): ComponentType<T>;
|
27
|
-
createOrReplace(entity: Entity, val
|
27
|
+
createOrReplace(entity: Entity, val?: ComponentType<T>): ComponentType<T>;
|
28
28
|
deleteFrom(entity: Entity): ComponentType<T> | null;
|
29
29
|
upsertFromBinary(entity: Entity, data: ByteBuffer): ComponentType<T> | null;
|
30
30
|
updateFromBinary(entity: Entity, data: ByteBuffer): ComponentType<T> | null;
|
@@ -189,10 +189,12 @@ declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>):
|
|
189
189
|
AudioStream: ComponentDefinition<EcsType<PBAudioStream>>;
|
190
190
|
BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
|
191
191
|
CylinderShape: ComponentDefinition<EcsType<PBCylinderShape>>;
|
192
|
+
GLTFShape: ComponentDefinition<EcsType<PBGLTFShape>>;
|
192
193
|
NFTShape: ComponentDefinition<EcsType<PBNFTShape>>;
|
193
194
|
PlaneShape: ComponentDefinition<EcsType<PBPlaneShape>>;
|
194
195
|
SphereShape: ComponentDefinition<EcsType<PBSphereShape>>;
|
195
196
|
TextShape: ComponentDefinition<EcsType<PBTextShape>>;
|
197
|
+
UiTransform: ComponentDefinition<EcsType<PBUiTransform>>;
|
196
198
|
Transform: ComponentDefinition<EcsType<Transform>>;
|
197
199
|
};
|
198
200
|
|
@@ -226,6 +228,7 @@ export declare const EcsString: EcsType<string>;
|
|
226
228
|
export declare type EcsType<T = any> = {
|
227
229
|
serialize(value: T, builder: ByteBuffer): void;
|
228
230
|
deserialize(reader: ByteBuffer): T;
|
231
|
+
create(): T;
|
229
232
|
};
|
230
233
|
|
231
234
|
/**
|
@@ -1114,6 +1117,7 @@ declare interface PBAudioStream {
|
|
1114
1117
|
declare interface PBBoxShape {
|
1115
1118
|
withCollisions: boolean;
|
1116
1119
|
isPointerBlocker: boolean;
|
1120
|
+
/** TODO: should visible be another component? that maybe affects all the entities */
|
1117
1121
|
visible: boolean;
|
1118
1122
|
uvs: number[];
|
1119
1123
|
}
|
@@ -1121,14 +1125,23 @@ declare interface PBBoxShape {
|
|
1121
1125
|
declare interface PBCylinderShape {
|
1122
1126
|
withCollisions: boolean;
|
1123
1127
|
isPointerBlocker: boolean;
|
1128
|
+
/** TODO: should visible be another component? that maybe affects all the entities */
|
1124
1129
|
visible: boolean;
|
1125
1130
|
radiusTop: number;
|
1126
1131
|
radiusBottom: number;
|
1127
1132
|
}
|
1128
1133
|
|
1134
|
+
declare interface PBGLTFShape {
|
1135
|
+
withCollisions: boolean;
|
1136
|
+
isPointerBlocker: boolean;
|
1137
|
+
visible: boolean;
|
1138
|
+
src: string;
|
1139
|
+
}
|
1140
|
+
|
1129
1141
|
declare interface PBNFTShape {
|
1130
1142
|
withCollisions: boolean;
|
1131
1143
|
isPointerBlocker: boolean;
|
1144
|
+
/** TODO: should visible be another component? that maybe affects all the entities */
|
1132
1145
|
visible: boolean;
|
1133
1146
|
src: string;
|
1134
1147
|
assetId: string;
|
@@ -1139,7 +1152,9 @@ declare interface PBNFTShape {
|
|
1139
1152
|
declare interface PBPlaneShape {
|
1140
1153
|
withCollisions: boolean;
|
1141
1154
|
isPointerBlocker: boolean;
|
1155
|
+
/** TODO: should visible be another component? that maybe affects all the entities */
|
1142
1156
|
visible: boolean;
|
1157
|
+
/** TODO: this could be better serialized as u00 v00 u01 v01 u10 v10 u11 v11 for speed */
|
1143
1158
|
uvs: number[];
|
1144
1159
|
}
|
1145
1160
|
|
@@ -1151,6 +1166,7 @@ declare interface PBSphereShape {
|
|
1151
1166
|
|
1152
1167
|
declare interface PBTextShape {
|
1153
1168
|
text: string;
|
1169
|
+
/** this should be removed */
|
1154
1170
|
visible: boolean;
|
1155
1171
|
font: string;
|
1156
1172
|
opacity: number;
|
@@ -1176,6 +1192,65 @@ declare interface PBTextShape {
|
|
1176
1192
|
textColor: Color3 | undefined;
|
1177
1193
|
}
|
1178
1194
|
|
1195
|
+
declare interface PBUiTransform {
|
1196
|
+
positionType: YGPositionType;
|
1197
|
+
alignContent: YGAlign;
|
1198
|
+
alignItems: YGAlign;
|
1199
|
+
alignSelf: YGAlign;
|
1200
|
+
flexDirection: YGFlexDirection;
|
1201
|
+
flexWrap: YGWrap;
|
1202
|
+
justifyContent: YGJustify;
|
1203
|
+
overflow: YGOverflow;
|
1204
|
+
display: YGDisplay;
|
1205
|
+
direction: YGDirection;
|
1206
|
+
flex: number;
|
1207
|
+
flexBasisUnit: YGUnit;
|
1208
|
+
flexBasis: number;
|
1209
|
+
flexGrow: number;
|
1210
|
+
flexShrink: number;
|
1211
|
+
widthUnit: YGUnit;
|
1212
|
+
width: number;
|
1213
|
+
heightUnit: YGUnit;
|
1214
|
+
height: number;
|
1215
|
+
minWidthUnit: YGUnit;
|
1216
|
+
minWidth: number;
|
1217
|
+
minHeightUnit: YGUnit;
|
1218
|
+
minHeight: number;
|
1219
|
+
maxWidthUnit: YGUnit;
|
1220
|
+
maxWidth: number;
|
1221
|
+
maxHeightUnit: YGUnit;
|
1222
|
+
maxHeight: number;
|
1223
|
+
positionLeftUnit: YGUnit;
|
1224
|
+
positionLeft: number;
|
1225
|
+
positionTopUnit: YGUnit;
|
1226
|
+
positionTop: number;
|
1227
|
+
positionRightUnit: YGUnit;
|
1228
|
+
positionRight: number;
|
1229
|
+
positionBottomUnit: YGUnit;
|
1230
|
+
positionBottom: number;
|
1231
|
+
/** margin */
|
1232
|
+
marginLeftUnit: YGUnit;
|
1233
|
+
marginLeft: number;
|
1234
|
+
marginTopUnit: YGUnit;
|
1235
|
+
marginTop: number;
|
1236
|
+
marginRightUnit: YGUnit;
|
1237
|
+
marginRight: number;
|
1238
|
+
marginBottomUnit: YGUnit;
|
1239
|
+
marginBottom: number;
|
1240
|
+
paddingLeftUnit: YGUnit;
|
1241
|
+
paddingLeft: number;
|
1242
|
+
paddingTopUnit: YGUnit;
|
1243
|
+
paddingTop: number;
|
1244
|
+
paddingRightUnit: YGUnit;
|
1245
|
+
paddingRight: number;
|
1246
|
+
paddingBottomUnit: YGUnit;
|
1247
|
+
paddingBottom: number;
|
1248
|
+
borderLeft: number;
|
1249
|
+
borderTop: number;
|
1250
|
+
borderRight: number;
|
1251
|
+
borderBottom: number;
|
1252
|
+
}
|
1253
|
+
|
1179
1254
|
/**
|
1180
1255
|
* Represens a plane by the equation ax + by + cz + d = 0
|
1181
1256
|
* @public
|
@@ -1744,4 +1819,76 @@ export declare namespace Vector3 {
|
|
1744
1819
|
export function Left(): MutableVector3;
|
1745
1820
|
}
|
1746
1821
|
|
1822
|
+
declare enum YGAlign {
|
1823
|
+
YGAlignAuto = 0,
|
1824
|
+
YGAlignFlexStart = 1,
|
1825
|
+
YGAlignCenter = 2,
|
1826
|
+
YGAlignFlexEnd = 3,
|
1827
|
+
YGAlignStretch = 4,
|
1828
|
+
YGAlignBaseline = 5,
|
1829
|
+
YGAlignSpaceBetween = 6,
|
1830
|
+
YGAlignSpaceAround = 7,
|
1831
|
+
UNRECOGNIZED = -1
|
1832
|
+
}
|
1833
|
+
|
1834
|
+
declare enum YGDirection {
|
1835
|
+
YGDirectionInherit = 0,
|
1836
|
+
YGDirectionLTR = 1,
|
1837
|
+
YGDirectionRTL = 2,
|
1838
|
+
UNRECOGNIZED = -1
|
1839
|
+
}
|
1840
|
+
|
1841
|
+
declare enum YGDisplay {
|
1842
|
+
YGDisplayFlex = 0,
|
1843
|
+
YGDisplayNone = 1,
|
1844
|
+
UNRECOGNIZED = -1
|
1845
|
+
}
|
1846
|
+
|
1847
|
+
declare enum YGFlexDirection {
|
1848
|
+
YGFlexDirectionColumn = 0,
|
1849
|
+
YGFlexDirectionColumnReverse = 1,
|
1850
|
+
YGFlexDirectionRow = 2,
|
1851
|
+
YGFlexDirectionRowReverse = 3,
|
1852
|
+
UNRECOGNIZED = -1
|
1853
|
+
}
|
1854
|
+
|
1855
|
+
declare enum YGJustify {
|
1856
|
+
YGJustifyFlexStart = 0,
|
1857
|
+
YGJustifyCenter = 1,
|
1858
|
+
YGJustifyFlexEnd = 2,
|
1859
|
+
YGJustifySpaceBetween = 3,
|
1860
|
+
YGJustifySpaceAround = 4,
|
1861
|
+
YGJustifySpaceEvenly = 5,
|
1862
|
+
UNRECOGNIZED = -1
|
1863
|
+
}
|
1864
|
+
|
1865
|
+
declare enum YGOverflow {
|
1866
|
+
YGOverflowVisible = 0,
|
1867
|
+
YGOverflowHidden = 1,
|
1868
|
+
YGOverflowScroll = 2,
|
1869
|
+
UNRECOGNIZED = -1
|
1870
|
+
}
|
1871
|
+
|
1872
|
+
declare enum YGPositionType {
|
1873
|
+
YGPositionTypeStatic = 0,
|
1874
|
+
YGPositionTypeRelative = 1,
|
1875
|
+
YGPositionTypeAbsolute = 2,
|
1876
|
+
UNRECOGNIZED = -1
|
1877
|
+
}
|
1878
|
+
|
1879
|
+
declare enum YGUnit {
|
1880
|
+
YGUnitUndefined = 0,
|
1881
|
+
YGUnitPoint = 1,
|
1882
|
+
YGUnitPercent = 2,
|
1883
|
+
YGUnitAuto = 3,
|
1884
|
+
UNRECOGNIZED = -1
|
1885
|
+
}
|
1886
|
+
|
1887
|
+
declare enum YGWrap {
|
1888
|
+
YGWrapNoWrap = 0,
|
1889
|
+
YGWrapWrap = 1,
|
1890
|
+
YGWrapWrapReverse = 2,
|
1891
|
+
UNRECOGNIZED = -1
|
1892
|
+
}
|
1893
|
+
|
1747
1894
|
export { }
|