@dcl/sdk 7.0.0-3469489430.commit-9c7979a → 7.0.0-3472029894.commit-ae9be34
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 +400 -411
- package/dist/ecs7/index.js +268 -146
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +5 -5
- package/types/ecs7/index.d.ts +317 -328
package/dist/ecs7/index.d.ts
CHANGED
@@ -52,7 +52,7 @@ export declare const AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PB
|
|
52
52
|
/** @public */
|
53
53
|
export declare const AudioStream: ComponentDefinition<ISchema<PBAudioStream>, PBAudioStream>;
|
54
54
|
|
55
|
-
declare const enum AvatarAnchorPointType {
|
55
|
+
export declare const enum AvatarAnchorPointType {
|
56
56
|
AAPT_POSITION = 0,
|
57
57
|
AAPT_NAME_TAG = 1,
|
58
58
|
AAPT_LEFT_HAND = 2,
|
@@ -65,7 +65,7 @@ export declare const AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>,
|
|
65
65
|
/** @public */
|
66
66
|
export declare const AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
|
67
67
|
|
68
|
-
declare const enum AvatarModifierType {
|
68
|
+
export declare const enum AvatarModifierType {
|
69
69
|
AMT_HIDE_AVATARS = 0,
|
70
70
|
AMT_DISABLE_PASSPORTS = 1
|
71
71
|
}
|
@@ -73,7 +73,7 @@ declare const enum AvatarModifierType {
|
|
73
73
|
/** @public */
|
74
74
|
export declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
75
75
|
|
76
|
-
declare interface AvatarTexture {
|
76
|
+
export declare interface AvatarTexture {
|
77
77
|
userId: string;
|
78
78
|
/** default = TextureWrapMode.Clamp */
|
79
79
|
wrapMode?: TextureWrapMode | undefined;
|
@@ -84,7 +84,7 @@ declare interface AvatarTexture {
|
|
84
84
|
/** @public */
|
85
85
|
export declare const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
86
86
|
|
87
|
-
declare const enum BillboardMode {
|
87
|
+
export declare const enum BillboardMode {
|
88
88
|
BM_ALL_AXES = 0,
|
89
89
|
BM_Y_AXE = 1
|
90
90
|
}
|
@@ -92,7 +92,109 @@ declare const enum BillboardMode {
|
|
92
92
|
/**
|
93
93
|
* @public
|
94
94
|
*/
|
95
|
-
export declare type ByteBuffer =
|
95
|
+
export declare type ByteBuffer = {
|
96
|
+
/**
|
97
|
+
* @returns The entire current Uint8Array.
|
98
|
+
*
|
99
|
+
* WARNING: if the buffer grows, the view had changed itself,
|
100
|
+
* and the reference will be a invalid one.
|
101
|
+
*/
|
102
|
+
buffer(): Uint8Array;
|
103
|
+
/**
|
104
|
+
* @returns The capacity of the current buffer
|
105
|
+
*/
|
106
|
+
bufferLength(): number;
|
107
|
+
/**
|
108
|
+
* Resets byteBuffer to avoid creating a new one
|
109
|
+
*/
|
110
|
+
resetBuffer(): void;
|
111
|
+
/**
|
112
|
+
* @returns The current read offset
|
113
|
+
*/
|
114
|
+
currentReadOffset(): number;
|
115
|
+
/**
|
116
|
+
* @returns The current write offset
|
117
|
+
*/
|
118
|
+
currentWriteOffset(): number;
|
119
|
+
/**
|
120
|
+
* Reading purpose
|
121
|
+
* Returns the previuos offsset size before incrementing
|
122
|
+
*/
|
123
|
+
incrementReadOffset(amount: number): number;
|
124
|
+
/**
|
125
|
+
* @returns How many bytes are available to read.
|
126
|
+
*/
|
127
|
+
remainingBytes(): number;
|
128
|
+
readFloat32(): number;
|
129
|
+
readFloat64(): number;
|
130
|
+
readInt8(): number;
|
131
|
+
readInt16(): number;
|
132
|
+
readInt32(): number;
|
133
|
+
readInt64(): bigint;
|
134
|
+
readUint8(): number;
|
135
|
+
readUint16(): number;
|
136
|
+
readUint32(): number;
|
137
|
+
readUint64(): bigint;
|
138
|
+
readBuffer(): Uint8Array;
|
139
|
+
/**
|
140
|
+
* Writing purpose
|
141
|
+
*/
|
142
|
+
/**
|
143
|
+
* Increment offset
|
144
|
+
* @param amount - how many bytes
|
145
|
+
* @returns The offset when this reserving starts.
|
146
|
+
*/
|
147
|
+
incrementWriteOffset(amount: number): number;
|
148
|
+
/**
|
149
|
+
* @returns The total number of bytes writen in the buffer.
|
150
|
+
*/
|
151
|
+
size(): number;
|
152
|
+
/**
|
153
|
+
* Take care using this function, if you modify the data after, the
|
154
|
+
* returned subarray will change too. If you'll modify the content of the
|
155
|
+
* bytebuffer, maybe you want to use toCopiedBinary()
|
156
|
+
*
|
157
|
+
* @returns The subarray from 0 to offset as reference.
|
158
|
+
*/
|
159
|
+
toBinary(): Uint8Array;
|
160
|
+
/**
|
161
|
+
* Safe copied buffer of the current data of ByteBuffer
|
162
|
+
*
|
163
|
+
* @returns The subarray from 0 to offset.
|
164
|
+
*/
|
165
|
+
toCopiedBinary(): Uint8Array;
|
166
|
+
writeBuffer(value: Uint8Array, writeLength?: boolean): void;
|
167
|
+
writeFloat32(value: number): void;
|
168
|
+
writeFloat64(value: number): void;
|
169
|
+
writeInt8(value: number): void;
|
170
|
+
writeInt16(value: number): void;
|
171
|
+
writeInt32(value: number): void;
|
172
|
+
writeInt64(value: bigint): void;
|
173
|
+
writeUint8(value: number): void;
|
174
|
+
writeUint16(value: number): void;
|
175
|
+
writeUint32(value: number): void;
|
176
|
+
writeUint64(value: bigint): void;
|
177
|
+
getFloat32(offset: number): number;
|
178
|
+
getFloat64(offset: number): number;
|
179
|
+
getInt8(offset: number): number;
|
180
|
+
getInt16(offset: number): number;
|
181
|
+
getInt32(offset: number): number;
|
182
|
+
getInt64(offset: number): bigint;
|
183
|
+
getUint8(offset: number): number;
|
184
|
+
getUint16(offset: number): number;
|
185
|
+
getUint32(offset: number): number;
|
186
|
+
getUint64(offset: number): bigint;
|
187
|
+
setFloat32(offset: number, value: number): void;
|
188
|
+
setFloat64(offset: number, value: number): void;
|
189
|
+
setInt8(offset: number, value: number): void;
|
190
|
+
setInt16(offset: number, value: number): void;
|
191
|
+
setInt32(offset: number, value: number): void;
|
192
|
+
setInt64(offset: number, value: bigint): void;
|
193
|
+
setUint8(offset: number, value: number): void;
|
194
|
+
setUint16(offset: number, value: number): void;
|
195
|
+
setUint32(offset: number, value: number): void;
|
196
|
+
setUint64(offset: number, value: bigint): void;
|
197
|
+
};
|
96
198
|
|
97
199
|
/** @public */
|
98
200
|
export declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
@@ -100,7 +202,7 @@ export declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCa
|
|
100
202
|
/** @public */
|
101
203
|
export declare const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
102
204
|
|
103
|
-
declare const enum CameraType {
|
205
|
+
export declare const enum CameraType {
|
104
206
|
CT_FIRST_PERSON = 0,
|
105
207
|
CT_THIRD_PERSON = 1
|
106
208
|
}
|
@@ -459,16 +561,10 @@ export declare namespace Color3 {
|
|
459
561
|
export function toGammaSpaceToRef(value: ReadonlyColor3, convertedColor: MutableColor3): void;
|
460
562
|
}
|
461
563
|
|
462
|
-
declare interface Color3_2 {
|
463
|
-
r: number;
|
464
|
-
g: number;
|
465
|
-
b: number;
|
466
|
-
}
|
467
|
-
|
468
564
|
/**
|
469
565
|
* @public
|
470
566
|
*/
|
471
|
-
declare type Color3Type = {
|
567
|
+
export declare type Color3Type = {
|
472
568
|
r: number;
|
473
569
|
g: number;
|
474
570
|
b: number;
|
@@ -812,17 +908,10 @@ export declare namespace Color4 {
|
|
812
908
|
export function toGammaSpaceToRef(value: ReadonlyColor4, convertedColor: MutableColor4): void;
|
813
909
|
}
|
814
910
|
|
815
|
-
declare interface Color4_2 {
|
816
|
-
r: number;
|
817
|
-
g: number;
|
818
|
-
b: number;
|
819
|
-
a: number;
|
820
|
-
}
|
821
|
-
|
822
911
|
/**
|
823
912
|
* @public
|
824
913
|
*/
|
825
|
-
declare type Color4Type = {
|
914
|
+
export declare type Color4Type = {
|
826
915
|
r: number;
|
827
916
|
g: number;
|
828
917
|
b: number;
|
@@ -1021,144 +1110,6 @@ export declare type ComponentSchema<T extends [ComponentDefinition, ...Component
|
|
1021
1110
|
*/
|
1022
1111
|
export declare type ComponentType<T extends ISchema> = EcsResult<T>;
|
1023
1112
|
|
1024
|
-
/**
|
1025
|
-
* ByteBuffer is a wrapper of DataView which also adds a read and write offset.
|
1026
|
-
* Also in a write operation it resizes the buffer is being used if it needs.
|
1027
|
-
*
|
1028
|
-
* - Use read and write function to generate or consume data.
|
1029
|
-
* - Use set and get only if you are sure that you're doing.
|
1030
|
-
*/
|
1031
|
-
declare function createByteBuffer(options?: CreateByteBufferOptions): {
|
1032
|
-
/**
|
1033
|
-
* @returns The entire current Uint8Array.
|
1034
|
-
*
|
1035
|
-
* WARNING: if the buffer grows, the view had changed itself,
|
1036
|
-
* and the reference will be a invalid one.
|
1037
|
-
*/
|
1038
|
-
buffer(): Uint8Array;
|
1039
|
-
/**
|
1040
|
-
* @returns The capacity of the current buffer
|
1041
|
-
*/
|
1042
|
-
bufferLength(): number;
|
1043
|
-
/**
|
1044
|
-
* Resets byteBuffer to avoid creating a new one
|
1045
|
-
*/
|
1046
|
-
resetBuffer(): void;
|
1047
|
-
/**
|
1048
|
-
* @returns The current read offset
|
1049
|
-
*/
|
1050
|
-
currentReadOffset(): number;
|
1051
|
-
/**
|
1052
|
-
* @returns The current write offset
|
1053
|
-
*/
|
1054
|
-
currentWriteOffset(): number;
|
1055
|
-
/**
|
1056
|
-
* Reading purpose
|
1057
|
-
* Returns the previuos offsset size before incrementing
|
1058
|
-
*/
|
1059
|
-
incrementReadOffset(amount: number): number;
|
1060
|
-
/**
|
1061
|
-
* @returns How many bytes are available to read.
|
1062
|
-
*/
|
1063
|
-
remainingBytes(): number;
|
1064
|
-
readFloat32(): number;
|
1065
|
-
readFloat64(): number;
|
1066
|
-
readInt8(): number;
|
1067
|
-
readInt16(): number;
|
1068
|
-
readInt32(): number;
|
1069
|
-
readInt64(): bigint;
|
1070
|
-
readUint8(): number;
|
1071
|
-
readUint16(): number;
|
1072
|
-
readUint32(): number;
|
1073
|
-
readUint64(): bigint;
|
1074
|
-
readBuffer(): Uint8Array;
|
1075
|
-
/**
|
1076
|
-
* Writing purpose
|
1077
|
-
*/
|
1078
|
-
/**
|
1079
|
-
* Increment offset
|
1080
|
-
* @param amount - how many bytes
|
1081
|
-
* @returns The offset when this reserving starts.
|
1082
|
-
*/
|
1083
|
-
incrementWriteOffset(amount: number): number;
|
1084
|
-
/**
|
1085
|
-
* @returns The total number of bytes writen in the buffer.
|
1086
|
-
*/
|
1087
|
-
size(): number;
|
1088
|
-
/**
|
1089
|
-
* Take care using this function, if you modify the data after, the
|
1090
|
-
* returned subarray will change too. If you'll modify the content of the
|
1091
|
-
* bytebuffer, maybe you want to use toCopiedBinary()
|
1092
|
-
*
|
1093
|
-
* @returns The subarray from 0 to offset as reference.
|
1094
|
-
*/
|
1095
|
-
toBinary(): Uint8Array;
|
1096
|
-
/**
|
1097
|
-
* Safe copied buffer of the current data of ByteBuffer
|
1098
|
-
*
|
1099
|
-
* @returns The subarray from 0 to offset.
|
1100
|
-
*/
|
1101
|
-
toCopiedBinary(): Uint8Array;
|
1102
|
-
writeBuffer(value: Uint8Array, writeLength?: boolean): void;
|
1103
|
-
writeFloat32(value: number): void;
|
1104
|
-
writeFloat64(value: number): void;
|
1105
|
-
writeInt8(value: number): void;
|
1106
|
-
writeInt16(value: number): void;
|
1107
|
-
writeInt32(value: number): void;
|
1108
|
-
writeInt64(value: bigint): void;
|
1109
|
-
writeUint8(value: number): void;
|
1110
|
-
writeUint16(value: number): void;
|
1111
|
-
writeUint32(value: number): void;
|
1112
|
-
writeUint64(value: bigint): void;
|
1113
|
-
getFloat32(offset: number): number;
|
1114
|
-
getFloat64(offset: number): number;
|
1115
|
-
getInt8(offset: number): number;
|
1116
|
-
getInt16(offset: number): number;
|
1117
|
-
getInt32(offset: number): number;
|
1118
|
-
getInt64(offset: number): bigint;
|
1119
|
-
getUint8(offset: number): number;
|
1120
|
-
getUint16(offset: number): number;
|
1121
|
-
getUint32(offset: number): number;
|
1122
|
-
getUint64(offset: number): bigint;
|
1123
|
-
setFloat32(offset: number, value: number): void;
|
1124
|
-
setFloat64(offset: number, value: number): void;
|
1125
|
-
setInt8(offset: number, value: number): void;
|
1126
|
-
setInt16(offset: number, value: number): void;
|
1127
|
-
setInt32(offset: number, value: number): void;
|
1128
|
-
setInt64(offset: number, value: bigint): void;
|
1129
|
-
setUint8(offset: number, value: number): void;
|
1130
|
-
setUint16(offset: number, value: number): void;
|
1131
|
-
setUint32(offset: number, value: number): void;
|
1132
|
-
setUint64(offset: number, value: bigint): void;
|
1133
|
-
};
|
1134
|
-
|
1135
|
-
/**
|
1136
|
-
* @param writing - writing option, see object specs.
|
1137
|
-
* @param reading - reading option, see object specs.
|
1138
|
-
* @param initialCapacity - Initial capacity of buffer to allocate, ignored if you use writing or reading options
|
1139
|
-
*/
|
1140
|
-
declare interface CreateByteBufferOptions {
|
1141
|
-
/**
|
1142
|
-
* @param buffer - a buffer already allocated to read from there.
|
1143
|
-
* @param currentOffset - set the cursor where begins to read. Default 0
|
1144
|
-
* @param length - delimite where the valid data ends. Default: buffer.length
|
1145
|
-
*/
|
1146
|
-
reading?: {
|
1147
|
-
buffer: Uint8Array;
|
1148
|
-
length?: number;
|
1149
|
-
currentOffset: number;
|
1150
|
-
};
|
1151
|
-
/**
|
1152
|
-
* @param buffer - a buffer already allocated to write there.
|
1153
|
-
* @param currentOffset - set the cursor to not start writing from the begin of it. Default 0
|
1154
|
-
*/
|
1155
|
-
writing?: {
|
1156
|
-
buffer: Uint8Array;
|
1157
|
-
currentOffset?: number;
|
1158
|
-
};
|
1159
|
-
initialCapacity?: number;
|
1160
|
-
}
|
1161
|
-
|
1162
1113
|
/**
|
1163
1114
|
* Transform parenting: cyclic dependency checker
|
1164
1115
|
* It checks only in modified Transforms
|
@@ -1198,7 +1149,36 @@ export declare type DeepReadonlyObject<T> = {
|
|
1198
1149
|
*/
|
1199
1150
|
export declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
1200
1151
|
|
1201
|
-
declare function
|
1152
|
+
export declare function defineComponent<T extends ISchema, ConstructorType = ComponentType<T>>(componentId: number, spec: T, constructorDefault?: ConstructorType): ComponentDefinition<T, ConstructorType>;
|
1153
|
+
|
1154
|
+
export declare function defineLibraryComponents({ defineComponentFromSchema }: Pick<IEngine, 'defineComponentFromSchema'>): {
|
1155
|
+
Animator: ComponentDefinition<ISchema<PBAnimator>, PBAnimator>;
|
1156
|
+
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
1157
|
+
AudioStream: ComponentDefinition<ISchema<PBAudioStream>, PBAudioStream>;
|
1158
|
+
AvatarAttach: ComponentDefinition<ISchema<PBAvatarAttach>, PBAvatarAttach>;
|
1159
|
+
AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
|
1160
|
+
AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
|
1161
|
+
Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
|
1162
|
+
CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
1163
|
+
CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
|
1164
|
+
GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
|
1165
|
+
Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
1166
|
+
MeshCollider: ComponentDefinition<ISchema<PBMeshCollider>, PBMeshCollider>;
|
1167
|
+
MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>, PBMeshRenderer>;
|
1168
|
+
NftShape: ComponentDefinition<ISchema<PBNftShape>, PBNftShape>;
|
1169
|
+
PointerEventsResult: ComponentDefinition<ISchema<PBPointerEventsResult>, PBPointerEventsResult>;
|
1170
|
+
PointerHoverFeedback: ComponentDefinition<ISchema<PBPointerHoverFeedback>, PBPointerHoverFeedback>;
|
1171
|
+
PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
1172
|
+
Raycast: ComponentDefinition<ISchema<PBRaycast>, PBRaycast>;
|
1173
|
+
RaycastResult: ComponentDefinition<ISchema<PBRaycastResult>, PBRaycastResult>;
|
1174
|
+
TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
1175
|
+
UiBackground: ComponentDefinition<ISchema<PBUiBackground>, PBUiBackground>;
|
1176
|
+
UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
1177
|
+
UiTransform: ComponentDefinition<ISchema<PBUiTransform>, PBUiTransform>;
|
1178
|
+
VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
|
1179
|
+
};
|
1180
|
+
|
1181
|
+
export declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponentFromSchema' | 'getComponent'>): {
|
1202
1182
|
Animator: AnimatorComponentDefinition;
|
1203
1183
|
Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
1204
1184
|
AudioSource: ComponentDefinition<ISchema<PBAudioSource>, PBAudioSource>;
|
@@ -1235,7 +1215,7 @@ export declare const DEG2RAD: number;
|
|
1235
1215
|
/**
|
1236
1216
|
* @public
|
1237
1217
|
*/
|
1238
|
-
declare type EcsResult<T extends ISchema> = T extends ISchema ? ReturnType<T['deserialize']> : never;
|
1218
|
+
export declare type EcsResult<T extends ISchema> = T extends ISchema ? ReturnType<T['deserialize']> : never;
|
1239
1219
|
|
1240
1220
|
/**
|
1241
1221
|
* @public
|
@@ -1301,7 +1281,7 @@ export declare namespace EventsSystem {
|
|
1301
1281
|
}
|
1302
1282
|
|
1303
1283
|
/** Excludes property keys from T where the property is assignable to U */
|
1304
|
-
declare type ExcludeUndefined<T> = {
|
1284
|
+
export declare type ExcludeUndefined<T> = {
|
1305
1285
|
[P in keyof T]: undefined extends T[P] ? never : P;
|
1306
1286
|
}[keyof T];
|
1307
1287
|
|
@@ -1312,9 +1292,9 @@ declare type ExcludeUndefined<T> = {
|
|
1312
1292
|
export declare const executeTask: (task: Task<unknown>) => void;
|
1313
1293
|
|
1314
1294
|
/** @public */
|
1315
|
-
declare type FloatArray = number[];
|
1295
|
+
export declare type FloatArray = number[];
|
1316
1296
|
|
1317
|
-
declare const enum Font {
|
1297
|
+
export declare const enum Font {
|
1318
1298
|
F_LIBERATION_SANS = 0,
|
1319
1299
|
F_SANS_SERIF = 1
|
1320
1300
|
}
|
@@ -1325,7 +1305,7 @@ export declare const GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>
|
|
1325
1305
|
/**
|
1326
1306
|
* @public
|
1327
1307
|
*/
|
1328
|
-
declare function IArray<T>(type: ISchema<T>): ISchema<Array<T>>;
|
1308
|
+
export declare function IArray<T>(type: ISchema<T>): ISchema<Array<T>>;
|
1329
1309
|
|
1330
1310
|
/**
|
1331
1311
|
* @public
|
@@ -1448,7 +1428,7 @@ export declare type IEngine = {
|
|
1448
1428
|
* Camera entity of current player.
|
1449
1429
|
*/
|
1450
1430
|
CameraEntity: Entity;
|
1451
|
-
baseComponents:
|
1431
|
+
baseComponents: ReturnType<typeof defineSdkComponents>;
|
1452
1432
|
};
|
1453
1433
|
|
1454
1434
|
/**
|
@@ -1461,7 +1441,7 @@ export declare type IEngineParams = {
|
|
1461
1441
|
/**
|
1462
1442
|
* @public
|
1463
1443
|
*/
|
1464
|
-
declare function IEnum<T>(type: ISchema<any>): ISchema<T>;
|
1444
|
+
export declare function IEnum<T>(type: ISchema<any>): ISchema<T>;
|
1465
1445
|
|
1466
1446
|
/**
|
1467
1447
|
* @public
|
@@ -1497,10 +1477,10 @@ export declare type IInput = {
|
|
1497
1477
|
/**
|
1498
1478
|
* @public
|
1499
1479
|
*/
|
1500
|
-
declare function IMap<T extends Spec>(spec: T): ISchema<Result<T>>;
|
1480
|
+
export declare function IMap<T extends Spec>(spec: T): ISchema<Result<T>>;
|
1501
1481
|
|
1502
1482
|
/** Include property keys from T where the property is assignable to U */
|
1503
|
-
declare type IncludeUndefined<T> = {
|
1483
|
+
export declare type IncludeUndefined<T> = {
|
1504
1484
|
[P in keyof T]: undefined extends T[P] ? P : never;
|
1505
1485
|
}[keyof T];
|
1506
1486
|
|
@@ -1509,7 +1489,7 @@ declare type IncludeUndefined<T> = {
|
|
1509
1489
|
*/
|
1510
1490
|
export declare const Input: IInput;
|
1511
1491
|
|
1512
|
-
declare const enum InputAction {
|
1492
|
+
export declare const enum InputAction {
|
1513
1493
|
IA_POINTER = 0,
|
1514
1494
|
IA_PRIMARY = 1,
|
1515
1495
|
IA_SECONDARY = 2,
|
@@ -1529,7 +1509,7 @@ declare const enum InputAction {
|
|
1529
1509
|
/**
|
1530
1510
|
* @public
|
1531
1511
|
*/
|
1532
|
-
declare function IOptional<T>(spec: ISchema<T>): ISchema<T | undefined>;
|
1512
|
+
export declare function IOptional<T>(spec: ISchema<T>): ISchema<T | undefined>;
|
1533
1513
|
|
1534
1514
|
/**
|
1535
1515
|
* @public
|
@@ -1550,7 +1530,7 @@ export declare const log: (...a: any[]) => void;
|
|
1550
1530
|
/** @public */
|
1551
1531
|
export declare const Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
|
1552
1532
|
|
1553
|
-
declare const enum MaterialTransparencyMode {
|
1533
|
+
export declare const enum MaterialTransparencyMode {
|
1554
1534
|
MTM_OPAQUE = 0,
|
1555
1535
|
MTM_ALPHA_TEST = 1,
|
1556
1536
|
MTM_ALPHA_BLEND = 2,
|
@@ -1562,8 +1542,8 @@ declare const enum MaterialTransparencyMode {
|
|
1562
1542
|
* Class used to store matrix data (4x4)
|
1563
1543
|
* @public
|
1564
1544
|
*/
|
1565
|
-
declare namespace Matrix {
|
1566
|
-
type Matrix4x4 = [
|
1545
|
+
export declare namespace Matrix {
|
1546
|
+
export type Matrix4x4 = [
|
1567
1547
|
number,
|
1568
1548
|
number,
|
1569
1549
|
number,
|
@@ -1581,7 +1561,7 @@ declare namespace Matrix {
|
|
1581
1561
|
number,
|
1582
1562
|
number
|
1583
1563
|
];
|
1584
|
-
type MutableMatrix = {
|
1564
|
+
export type MutableMatrix = {
|
1585
1565
|
/**
|
1586
1566
|
* Gets the update flag of the matrix which is an unique number for the matrix.
|
1587
1567
|
* It will be incremented every time the matrix data change.
|
@@ -1594,7 +1574,7 @@ declare namespace Matrix {
|
|
1594
1574
|
_isIdentity3x2Dirty: boolean;
|
1595
1575
|
_m: Matrix4x4;
|
1596
1576
|
};
|
1597
|
-
type ReadonlyMatrix = {
|
1577
|
+
export type ReadonlyMatrix = {
|
1598
1578
|
/**
|
1599
1579
|
* Gets the update flag of the matrix which is an unique number for the matrix.
|
1600
1580
|
* It will be incremented every time the matrix data change.
|
@@ -1610,29 +1590,29 @@ declare namespace Matrix {
|
|
1610
1590
|
/**
|
1611
1591
|
* Gets the internal data of the matrix
|
1612
1592
|
*/
|
1613
|
-
function m(self: MutableMatrix): Matrix4x4;
|
1593
|
+
export function m(self: MutableMatrix): Matrix4x4;
|
1614
1594
|
/**
|
1615
1595
|
* Gets an identity matrix that must not be updated
|
1616
1596
|
*/
|
1617
|
-
function IdentityReadonly(): ReadonlyMatrix;
|
1597
|
+
export function IdentityReadonly(): ReadonlyMatrix;
|
1618
1598
|
/**
|
1619
1599
|
* Creates an empty matrix (filled with zeros)
|
1620
1600
|
*/
|
1621
|
-
function create(): MutableMatrix;
|
1601
|
+
export function create(): MutableMatrix;
|
1622
1602
|
/**
|
1623
1603
|
* Creates a matrix from an array
|
1624
1604
|
* @param array - defines the source array
|
1625
1605
|
* @param offset - defines an offset in the source array
|
1626
1606
|
* @returns a new Matrix set from the starting index of the given array
|
1627
1607
|
*/
|
1628
|
-
function fromArray(array: Matrix4x4, offset?: number): MutableMatrix;
|
1608
|
+
export function fromArray(array: Matrix4x4, offset?: number): MutableMatrix;
|
1629
1609
|
/**
|
1630
1610
|
* Copy the content of an array into a given matrix
|
1631
1611
|
* @param array - defines the source array
|
1632
1612
|
* @param offset - defines an offset in the source array
|
1633
1613
|
* @param result - defines the target matrix
|
1634
1614
|
*/
|
1635
|
-
function fromArrayToRef(array: Matrix4x4, offset: number, result: MutableMatrix): void;
|
1615
|
+
export function fromArrayToRef(array: Matrix4x4, offset: number, result: MutableMatrix): void;
|
1636
1616
|
/**
|
1637
1617
|
* Stores an array into a matrix after having multiplied each component by a given factor
|
1638
1618
|
* @param array - defines the source array
|
@@ -1640,7 +1620,7 @@ declare namespace Matrix {
|
|
1640
1620
|
* @param scale - defines the scaling factor
|
1641
1621
|
* @param result - defines the target matrix
|
1642
1622
|
*/
|
1643
|
-
function fromFloatArrayToRefScaled(array: FloatArray, offset: number, scale: number, result: MutableMatrix): void;
|
1623
|
+
export function fromFloatArrayToRefScaled(array: FloatArray, offset: number, scale: number, result: MutableMatrix): void;
|
1644
1624
|
/**
|
1645
1625
|
* Stores a list of values (16) inside a given matrix
|
1646
1626
|
* @param initialM11 - defines 1st value of 1st row
|
@@ -1661,7 +1641,7 @@ declare namespace Matrix {
|
|
1661
1641
|
* @param initialM44 - defines 4th value of 4th row
|
1662
1642
|
* @param result - defines the target matrix
|
1663
1643
|
*/
|
1664
|
-
function fromValuesToRef(initialM11: number, initialM12: number, initialM13: number, initialM14: number, initialM21: number, initialM22: number, initialM23: number, initialM24: number, initialM31: number, initialM32: number, initialM33: number, initialM34: number, initialM41: number, initialM42: number, initialM43: number, initialM44: number, result: MutableMatrix): void;
|
1644
|
+
export function fromValuesToRef(initialM11: number, initialM12: number, initialM13: number, initialM14: number, initialM21: number, initialM22: number, initialM23: number, initialM24: number, initialM31: number, initialM32: number, initialM33: number, initialM34: number, initialM41: number, initialM42: number, initialM43: number, initialM44: number, result: MutableMatrix): void;
|
1665
1645
|
/**
|
1666
1646
|
* Creates new matrix from a list of values (16)
|
1667
1647
|
* @param initialM11 - defines 1st value of 1st row
|
@@ -1682,7 +1662,7 @@ declare namespace Matrix {
|
|
1682
1662
|
* @param initialM44 - defines 4th value of 4th row
|
1683
1663
|
* @returns the new matrix
|
1684
1664
|
*/
|
1685
|
-
function fromValues(initialM11: number, initialM12: number, initialM13: number, initialM14: number, initialM21: number, initialM22: number, initialM23: number, initialM24: number, initialM31: number, initialM32: number, initialM33: number, initialM34: number, initialM41: number, initialM42: number, initialM43: number, initialM44: number): MutableMatrix;
|
1665
|
+
export function fromValues(initialM11: number, initialM12: number, initialM13: number, initialM14: number, initialM21: number, initialM22: number, initialM23: number, initialM24: number, initialM31: number, initialM32: number, initialM33: number, initialM34: number, initialM41: number, initialM42: number, initialM43: number, initialM44: number): MutableMatrix;
|
1686
1666
|
/**
|
1687
1667
|
* Creates a new matrix composed by merging scale (vector3), rotation (quaternion) and translation (vector3)
|
1688
1668
|
* @param scale - defines the scale vector3
|
@@ -1690,7 +1670,7 @@ declare namespace Matrix {
|
|
1690
1670
|
* @param translation - defines the translation vector3
|
1691
1671
|
* @returns a new matrix
|
1692
1672
|
*/
|
1693
|
-
function compose(scale: Vector3.ReadonlyVector3, rotation: Quaternion.ReadonlyQuaternion, translation: Vector3.ReadonlyVector3): MutableMatrix;
|
1673
|
+
export function compose(scale: Vector3.ReadonlyVector3, rotation: Quaternion.ReadonlyQuaternion, translation: Vector3.ReadonlyVector3): MutableMatrix;
|
1694
1674
|
/**
|
1695
1675
|
* Sets a matrix to a value composed by merging scale (vector3), rotation (quaternion) and translation (vector3)
|
1696
1676
|
* @param scale - defines the scale vector3
|
@@ -1698,72 +1678,72 @@ declare namespace Matrix {
|
|
1698
1678
|
* @param translation - defines the translation vector3
|
1699
1679
|
* @param result - defines the target matrix
|
1700
1680
|
*/
|
1701
|
-
function composeToRef(scale: Vector3.ReadonlyVector3, rotation: Quaternion.ReadonlyQuaternion, translation: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1681
|
+
export function composeToRef(scale: Vector3.ReadonlyVector3, rotation: Quaternion.ReadonlyQuaternion, translation: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1702
1682
|
/**
|
1703
1683
|
* Creates a new identity matrix
|
1704
1684
|
* @returns a new identity matrix
|
1705
1685
|
*/
|
1706
|
-
function Identity(): MutableMatrix;
|
1686
|
+
export function Identity(): MutableMatrix;
|
1707
1687
|
/**
|
1708
1688
|
* Creates a new identity matrix and stores the result in a given matrix
|
1709
1689
|
* @param result - defines the target matrix
|
1710
1690
|
*/
|
1711
|
-
function IdentityToRef(result: MutableMatrix): void;
|
1691
|
+
export function IdentityToRef(result: MutableMatrix): void;
|
1712
1692
|
/**
|
1713
1693
|
* Creates a new zero matrix
|
1714
1694
|
* @returns a new zero matrix
|
1715
1695
|
*/
|
1716
|
-
function Zero(): MutableMatrix;
|
1696
|
+
export function Zero(): MutableMatrix;
|
1717
1697
|
/**
|
1718
1698
|
* Creates a new rotation matrix for "angle" radians around the X axis
|
1719
1699
|
* @param angle - defines the angle (in radians) to use
|
1720
1700
|
* @returns the new matrix
|
1721
1701
|
*/
|
1722
|
-
function RotationX(angle: number): MutableMatrix;
|
1702
|
+
export function RotationX(angle: number): MutableMatrix;
|
1723
1703
|
/**
|
1724
1704
|
* Creates a new rotation matrix for "angle" radians around the X axis and stores it in a given matrix
|
1725
1705
|
* @param angle - defines the angle (in radians) to use
|
1726
1706
|
* @param result - defines the target matrix
|
1727
1707
|
*/
|
1728
|
-
function rotationXToRef(angle: number, result: MutableMatrix): void;
|
1708
|
+
export function rotationXToRef(angle: number, result: MutableMatrix): void;
|
1729
1709
|
/**
|
1730
1710
|
* Creates a new rotation matrix for "angle" radians around the Y axis
|
1731
1711
|
* @param angle - defines the angle (in radians) to use
|
1732
1712
|
* @returns the new matrix
|
1733
1713
|
*/
|
1734
|
-
function rotationY(angle: number): MutableMatrix;
|
1714
|
+
export function rotationY(angle: number): MutableMatrix;
|
1735
1715
|
/**
|
1736
1716
|
* Creates a new rotation matrix for "angle" radians around the Y axis and stores it in a given matrix
|
1737
1717
|
* @param angle - defines the angle (in radians) to use
|
1738
1718
|
* @param result - defines the target matrix
|
1739
1719
|
*/
|
1740
|
-
function rotationYToRef(angle: number, result: MutableMatrix): void;
|
1720
|
+
export function rotationYToRef(angle: number, result: MutableMatrix): void;
|
1741
1721
|
/**
|
1742
1722
|
* Creates a new rotation matrix for "angle" radians around the Z axis
|
1743
1723
|
* @param angle - defines the angle (in radians) to use
|
1744
1724
|
* @returns the new matrix
|
1745
1725
|
*/
|
1746
|
-
function rotationZ(angle: number): MutableMatrix;
|
1726
|
+
export function rotationZ(angle: number): MutableMatrix;
|
1747
1727
|
/**
|
1748
1728
|
* Creates a new rotation matrix for "angle" radians around the Z axis and stores it in a given matrix
|
1749
1729
|
* @param angle - defines the angle (in radians) to use
|
1750
1730
|
* @param result - defines the target matrix
|
1751
1731
|
*/
|
1752
|
-
function rotationZToRef(angle: number, result: MutableMatrix): void;
|
1732
|
+
export function rotationZToRef(angle: number, result: MutableMatrix): void;
|
1753
1733
|
/**
|
1754
1734
|
* Creates a new rotation matrix for "angle" radians around the given axis
|
1755
1735
|
* @param axis - defines the axis to use
|
1756
1736
|
* @param angle - defines the angle (in radians) to use
|
1757
1737
|
* @returns the new matrix
|
1758
1738
|
*/
|
1759
|
-
function rotationAxis(axis: Vector3.ReadonlyVector3, angle: number): MutableMatrix;
|
1739
|
+
export function rotationAxis(axis: Vector3.ReadonlyVector3, angle: number): MutableMatrix;
|
1760
1740
|
/**
|
1761
1741
|
* Creates a new rotation matrix for "angle" radians around the given axis and stores it in a given matrix
|
1762
1742
|
* @param axis - defines the axis to use
|
1763
1743
|
* @param angle - defines the angle (in radians) to use
|
1764
1744
|
* @param result - defines the target matrix
|
1765
1745
|
*/
|
1766
|
-
function rotationAxisToRef(_axis: Vector3.ReadonlyVector3, angle: number, result: MutableMatrix): void;
|
1746
|
+
export function rotationAxisToRef(_axis: Vector3.ReadonlyVector3, angle: number, result: MutableMatrix): void;
|
1767
1747
|
/**
|
1768
1748
|
* Creates a rotation matrix
|
1769
1749
|
* @param yaw - defines the yaw angle in radians (Y axis)
|
@@ -1771,7 +1751,7 @@ declare namespace Matrix {
|
|
1771
1751
|
* @param roll - defines the roll angle in radians (X axis)
|
1772
1752
|
* @returns the new rotation matrix
|
1773
1753
|
*/
|
1774
|
-
function rotationYawPitchRoll(yaw: number, pitch: number, roll: number): MutableMatrix;
|
1754
|
+
export function rotationYawPitchRoll(yaw: number, pitch: number, roll: number): MutableMatrix;
|
1775
1755
|
/**
|
1776
1756
|
* Creates a rotation matrix and stores it in a given matrix
|
1777
1757
|
* @param yaw - defines the yaw angle in radians (Y axis)
|
@@ -1779,7 +1759,7 @@ declare namespace Matrix {
|
|
1779
1759
|
* @param roll - defines the roll angle in radians (X axis)
|
1780
1760
|
* @param result - defines the target matrix
|
1781
1761
|
*/
|
1782
|
-
function rotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: MutableMatrix): void;
|
1762
|
+
export function rotationYawPitchRollToRef(yaw: number, pitch: number, roll: number, result: MutableMatrix): void;
|
1783
1763
|
/**
|
1784
1764
|
* Creates a scaling matrix
|
1785
1765
|
* @param x - defines the scale factor on X axis
|
@@ -1787,7 +1767,7 @@ declare namespace Matrix {
|
|
1787
1767
|
* @param z - defines the scale factor on Z axis
|
1788
1768
|
* @returns the new matrix
|
1789
1769
|
*/
|
1790
|
-
function scaling(x: number, y: number, z: number): MutableMatrix;
|
1770
|
+
export function scaling(x: number, y: number, z: number): MutableMatrix;
|
1791
1771
|
/**
|
1792
1772
|
* Creates a scaling matrix and stores it in a given matrix
|
1793
1773
|
* @param x - defines the scale factor on X axis
|
@@ -1795,7 +1775,7 @@ declare namespace Matrix {
|
|
1795
1775
|
* @param z - defines the scale factor on Z axis
|
1796
1776
|
* @param result - defines the target matrix
|
1797
1777
|
*/
|
1798
|
-
function scalingToRef(x: number, y: number, z: number, result: MutableMatrix): void;
|
1778
|
+
export function scalingToRef(x: number, y: number, z: number, result: MutableMatrix): void;
|
1799
1779
|
/**
|
1800
1780
|
* Creates a translation matrix
|
1801
1781
|
* @param x - defines the translation on X axis
|
@@ -1803,7 +1783,7 @@ declare namespace Matrix {
|
|
1803
1783
|
* @param z - defines the translationon Z axis
|
1804
1784
|
* @returns the new matrix
|
1805
1785
|
*/
|
1806
|
-
function translation(x: number, y: number, z: number): MutableMatrix;
|
1786
|
+
export function translation(x: number, y: number, z: number): MutableMatrix;
|
1807
1787
|
/**
|
1808
1788
|
* Creates a translation matrix and stores it in a given matrix
|
1809
1789
|
* @param x - defines the translation on X axis
|
@@ -1811,7 +1791,7 @@ declare namespace Matrix {
|
|
1811
1791
|
* @param z - defines the translationon Z axis
|
1812
1792
|
* @param result - defines the target matrix
|
1813
1793
|
*/
|
1814
|
-
function translationToRef(x: number, y: number, z: number, result: MutableMatrix): void;
|
1794
|
+
export function translationToRef(x: number, y: number, z: number, result: MutableMatrix): void;
|
1815
1795
|
/**
|
1816
1796
|
* Returns a new Matrix whose values are the interpolated values for "gradient" (float) between the ones of the matrices "startValue" and "endValue".
|
1817
1797
|
* @param startValue - defines the start value
|
@@ -1819,7 +1799,7 @@ declare namespace Matrix {
|
|
1819
1799
|
* @param gradient - defines the gradient factor
|
1820
1800
|
* @returns the new matrix
|
1821
1801
|
*/
|
1822
|
-
function lerp(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number): MutableMatrix;
|
1802
|
+
export function lerp(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number): MutableMatrix;
|
1823
1803
|
/**
|
1824
1804
|
* Set the given matrix "result" as the interpolated values for "gradient" (float) between the ones of the matrices "startValue" and "endValue".
|
1825
1805
|
* @param startValue - defines the start value
|
@@ -1827,7 +1807,7 @@ declare namespace Matrix {
|
|
1827
1807
|
* @param gradient - defines the gradient factor
|
1828
1808
|
* @param result - defines the Matrix object where to store data
|
1829
1809
|
*/
|
1830
|
-
function lerpToRef(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number, result: MutableMatrix): void;
|
1810
|
+
export function lerpToRef(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number, result: MutableMatrix): void;
|
1831
1811
|
/**
|
1832
1812
|
* Builds a new matrix whose values are computed by:
|
1833
1813
|
* * decomposing the the "startValue" and "endValue" matrices into their respective scale, rotation and translation matrices
|
@@ -1838,7 +1818,7 @@ declare namespace Matrix {
|
|
1838
1818
|
* @param gradient - defines the gradient between the two matrices
|
1839
1819
|
* @returns the new matrix
|
1840
1820
|
*/
|
1841
|
-
function decomposeLerp(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number): MutableMatrix;
|
1821
|
+
export function decomposeLerp(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number): MutableMatrix;
|
1842
1822
|
/**
|
1843
1823
|
* Update a matrix to values which are computed by:
|
1844
1824
|
* * decomposing the the "startValue" and "endValue" matrices into their respective scale, rotation and translation matrices
|
@@ -1849,7 +1829,7 @@ declare namespace Matrix {
|
|
1849
1829
|
* @param gradient - defines the gradient between the two matrices
|
1850
1830
|
* @param result - defines the target matrix
|
1851
1831
|
*/
|
1852
|
-
function decomposeLerpToRef(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number, result: MutableMatrix): void;
|
1832
|
+
export function decomposeLerpToRef(startValue: ReadonlyMatrix, endValue: ReadonlyMatrix, gradient: number, result: MutableMatrix): void;
|
1853
1833
|
/**
|
1854
1834
|
* Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up"
|
1855
1835
|
* self function works in left handed mode
|
@@ -1858,7 +1838,7 @@ declare namespace Matrix {
|
|
1858
1838
|
* @param up - defines the up vector for the entity
|
1859
1839
|
* @returns the new matrix
|
1860
1840
|
*/
|
1861
|
-
function LookAtLH(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3): MutableMatrix;
|
1841
|
+
export function LookAtLH(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3): MutableMatrix;
|
1862
1842
|
/**
|
1863
1843
|
* Sets the given "result" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up".
|
1864
1844
|
* self function works in left handed mode
|
@@ -1867,7 +1847,7 @@ declare namespace Matrix {
|
|
1867
1847
|
* @param up - defines the up vector for the entity
|
1868
1848
|
* @param result - defines the target matrix
|
1869
1849
|
*/
|
1870
|
-
function lookAtLHToRef(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1850
|
+
export function lookAtLHToRef(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1871
1851
|
/**
|
1872
1852
|
* Gets a new rotation matrix used to rotate an entity so as it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up"
|
1873
1853
|
* self function works in right handed mode
|
@@ -1876,7 +1856,7 @@ declare namespace Matrix {
|
|
1876
1856
|
* @param up - defines the up vector for the entity
|
1877
1857
|
* @returns the new matrix
|
1878
1858
|
*/
|
1879
|
-
function lookAtRH(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3): MutableMatrix;
|
1859
|
+
export function lookAtRH(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3): MutableMatrix;
|
1880
1860
|
/**
|
1881
1861
|
* Sets the given "result" Matrix to a rotation matrix used to rotate an entity so that it looks at the target vector3, from the eye vector3 position, the up vector3 being oriented like "up".
|
1882
1862
|
* self function works in right handed mode
|
@@ -1885,7 +1865,7 @@ declare namespace Matrix {
|
|
1885
1865
|
* @param up - defines the up vector for the entity
|
1886
1866
|
* @param result - defines the target matrix
|
1887
1867
|
*/
|
1888
|
-
function lookAtRHToRef(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1868
|
+
export function lookAtRHToRef(eye: Vector3.ReadonlyVector3, target: Vector3.ReadonlyVector3, up: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
1889
1869
|
/**
|
1890
1870
|
* Create a left-handed orthographic projection matrix
|
1891
1871
|
* @param width - defines the viewport width
|
@@ -1894,7 +1874,7 @@ declare namespace Matrix {
|
|
1894
1874
|
* @param zfar - defines the far clip plane
|
1895
1875
|
* @returns a new matrix as a left-handed orthographic projection matrix
|
1896
1876
|
*/
|
1897
|
-
function orthoLH(width: number, height: number, znear: number, zfar: number): MutableMatrix;
|
1877
|
+
export function orthoLH(width: number, height: number, znear: number, zfar: number): MutableMatrix;
|
1898
1878
|
/**
|
1899
1879
|
* Store a left-handed orthographic projection to a given matrix
|
1900
1880
|
* @param width - defines the viewport width
|
@@ -1903,7 +1883,7 @@ declare namespace Matrix {
|
|
1903
1883
|
* @param zfar - defines the far clip plane
|
1904
1884
|
* @param result - defines the target matrix
|
1905
1885
|
*/
|
1906
|
-
function orthoLHToRef(width: number, height: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1886
|
+
export function orthoLHToRef(width: number, height: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1907
1887
|
/**
|
1908
1888
|
* Create a left-handed orthographic projection matrix
|
1909
1889
|
* @param left - defines the viewport left coordinate
|
@@ -1914,7 +1894,7 @@ declare namespace Matrix {
|
|
1914
1894
|
* @param zfar - defines the far clip plane
|
1915
1895
|
* @returns a new matrix as a left-handed orthographic projection matrix
|
1916
1896
|
*/
|
1917
|
-
function OrthoOffCenterLH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number): MutableMatrix;
|
1897
|
+
export function OrthoOffCenterLH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number): MutableMatrix;
|
1918
1898
|
/**
|
1919
1899
|
* Stores a left-handed orthographic projection into a given matrix
|
1920
1900
|
* @param left - defines the viewport left coordinate
|
@@ -1925,7 +1905,7 @@ declare namespace Matrix {
|
|
1925
1905
|
* @param zfar - defines the far clip plane
|
1926
1906
|
* @param result - defines the target matrix
|
1927
1907
|
*/
|
1928
|
-
function orthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1908
|
+
export function orthoOffCenterLHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1929
1909
|
/**
|
1930
1910
|
* Creates a right-handed orthographic projection matrix
|
1931
1911
|
* @param left - defines the viewport left coordinate
|
@@ -1936,7 +1916,7 @@ declare namespace Matrix {
|
|
1936
1916
|
* @param zfar - defines the far clip plane
|
1937
1917
|
* @returns a new matrix as a right-handed orthographic projection matrix
|
1938
1918
|
*/
|
1939
|
-
function orthoOffCenterRH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number): MutableMatrix;
|
1919
|
+
export function orthoOffCenterRH(left: number, right: number, bottom: number, top: number, znear: number, zfar: number): MutableMatrix;
|
1940
1920
|
/**
|
1941
1921
|
* Stores a right-handed orthographic projection into a given matrix
|
1942
1922
|
* @param left - defines the viewport left coordinate
|
@@ -1947,7 +1927,7 @@ declare namespace Matrix {
|
|
1947
1927
|
* @param zfar - defines the far clip plane
|
1948
1928
|
* @param result - defines the target matrix
|
1949
1929
|
*/
|
1950
|
-
function orthoOffCenterRHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1930
|
+
export function orthoOffCenterRHToRef(left: number, right: number, bottom: number, top: number, znear: number, zfar: number, result: MutableMatrix): void;
|
1951
1931
|
/**
|
1952
1932
|
* Creates a left-handed perspective projection matrix
|
1953
1933
|
* @param width - defines the viewport width
|
@@ -1956,7 +1936,7 @@ declare namespace Matrix {
|
|
1956
1936
|
* @param zfar - defines the far clip plane
|
1957
1937
|
* @returns a new matrix as a left-handed perspective projection matrix
|
1958
1938
|
*/
|
1959
|
-
function perspectiveLH(width: number, height: number, znear: number, zfar: number): MutableMatrix;
|
1939
|
+
export function perspectiveLH(width: number, height: number, znear: number, zfar: number): MutableMatrix;
|
1960
1940
|
/**
|
1961
1941
|
* Creates a left-handed perspective projection matrix
|
1962
1942
|
* @param fov - defines the horizontal field of view
|
@@ -1965,7 +1945,7 @@ declare namespace Matrix {
|
|
1965
1945
|
* @param zfar - defines the far clip plane
|
1966
1946
|
* @returns a new matrix as a left-handed perspective projection matrix
|
1967
1947
|
*/
|
1968
|
-
function perspectiveFovLH(fov: number, aspect: number, znear: number, zfar: number): MutableMatrix;
|
1948
|
+
export function perspectiveFovLH(fov: number, aspect: number, znear: number, zfar: number): MutableMatrix;
|
1969
1949
|
/**
|
1970
1950
|
* Stores a left-handed perspective projection into a given matrix
|
1971
1951
|
* @param fov - defines the horizontal field of view
|
@@ -1975,7 +1955,7 @@ declare namespace Matrix {
|
|
1975
1955
|
* @param result - defines the target matrix
|
1976
1956
|
* @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally
|
1977
1957
|
*/
|
1978
|
-
function perspectiveFovLHToRef(fov: number, aspect: number, znear: number, zfar: number, result: MutableMatrix, isVerticalFovFixed?: boolean): void;
|
1958
|
+
export function perspectiveFovLHToRef(fov: number, aspect: number, znear: number, zfar: number, result: MutableMatrix, isVerticalFovFixed?: boolean): void;
|
1979
1959
|
/**
|
1980
1960
|
* Creates a right-handed perspective projection matrix
|
1981
1961
|
* @param fov - defines the horizontal field of view
|
@@ -1984,7 +1964,7 @@ declare namespace Matrix {
|
|
1984
1964
|
* @param zfar - defines the far clip plane
|
1985
1965
|
* @returns a new matrix as a right-handed perspective projection matrix
|
1986
1966
|
*/
|
1987
|
-
function PerspectiveFovRH(fov: number, aspect: number, znear: number, zfar: number): MutableMatrix;
|
1967
|
+
export function PerspectiveFovRH(fov: number, aspect: number, znear: number, zfar: number): MutableMatrix;
|
1988
1968
|
/**
|
1989
1969
|
* Stores a right-handed perspective projection into a given matrix
|
1990
1970
|
* @param fov - defines the horizontal field of view
|
@@ -1994,7 +1974,7 @@ declare namespace Matrix {
|
|
1994
1974
|
* @param result - defines the target matrix
|
1995
1975
|
* @param isVerticalFovFixed - defines it the fov is vertically fixed (default) or horizontally
|
1996
1976
|
*/
|
1997
|
-
function perspectiveFovRHToRef(fov: number, aspect: number, znear: number, zfar: number, result: MutableMatrix, isVerticalFovFixed?: boolean): void;
|
1977
|
+
export function perspectiveFovRHToRef(fov: number, aspect: number, znear: number, zfar: number, result: MutableMatrix, isVerticalFovFixed?: boolean): void;
|
1998
1978
|
/**
|
1999
1979
|
* Stores a perspective projection for WebVR info a given matrix
|
2000
1980
|
* @param fov - defines the field of view
|
@@ -2003,7 +1983,7 @@ declare namespace Matrix {
|
|
2003
1983
|
* @param result - defines the target matrix
|
2004
1984
|
* @param rightHanded - defines if the matrix must be in right-handed mode (false by default)
|
2005
1985
|
*/
|
2006
|
-
function perspectiveFovWebVRToRef(fov: {
|
1986
|
+
export function perspectiveFovWebVRToRef(fov: {
|
2007
1987
|
upDegrees: number;
|
2008
1988
|
downDegrees: number;
|
2009
1989
|
leftDegrees: number;
|
@@ -2014,37 +1994,37 @@ declare namespace Matrix {
|
|
2014
1994
|
* @param matrix - defines the matrix to use
|
2015
1995
|
* @returns a new FloatArray array with 4 elements : the 2x2 matrix extracted from the given matrix
|
2016
1996
|
*/
|
2017
|
-
function GetAsMatrix2x2(matrix: ReadonlyMatrix): FloatArray;
|
1997
|
+
export function GetAsMatrix2x2(matrix: ReadonlyMatrix): FloatArray;
|
2018
1998
|
/**
|
2019
1999
|
* Extracts a 3x3 matrix from a given matrix and store the result in a FloatArray
|
2020
2000
|
* @param matrix - defines the matrix to use
|
2021
2001
|
* @returns a new FloatArray array with 9 elements : the 3x3 matrix extracted from the given matrix
|
2022
2002
|
*/
|
2023
|
-
function GetAsMatrix3x3(matrix: ReadonlyMatrix): FloatArray;
|
2003
|
+
export function GetAsMatrix3x3(matrix: ReadonlyMatrix): FloatArray;
|
2024
2004
|
/**
|
2025
2005
|
* Compute the transpose of a given matrix
|
2026
2006
|
* @param matrix - defines the matrix to transpose
|
2027
2007
|
* @returns the new matrix
|
2028
2008
|
*/
|
2029
|
-
function transpose(matrix: ReadonlyMatrix): MutableMatrix;
|
2009
|
+
export function transpose(matrix: ReadonlyMatrix): MutableMatrix;
|
2030
2010
|
/**
|
2031
2011
|
* Compute the transpose of a matrix and store it in a target matrix
|
2032
2012
|
* @param matrix - defines the matrix to transpose
|
2033
2013
|
* @param result - defines the target matrix
|
2034
2014
|
*/
|
2035
|
-
function transposeToRef(matrix: ReadonlyMatrix, result: MutableMatrix): void;
|
2015
|
+
export function transposeToRef(matrix: ReadonlyMatrix, result: MutableMatrix): void;
|
2036
2016
|
/**
|
2037
2017
|
* Computes a reflection matrix from a plane
|
2038
2018
|
* @param plane - defines the reflection plane
|
2039
2019
|
* @returns a new matrix
|
2040
2020
|
*/
|
2041
|
-
function reflection(plane: Plane.ReadonlyPlane): MutableMatrix;
|
2021
|
+
export function reflection(plane: Plane.ReadonlyPlane): MutableMatrix;
|
2042
2022
|
/**
|
2043
2023
|
* Computes a reflection matrix from a plane
|
2044
2024
|
* @param plane - defines the reflection plane
|
2045
2025
|
* @param result - defines the target matrix
|
2046
2026
|
*/
|
2047
|
-
function reflectionToRef(_plane: Plane.ReadonlyPlane, result: MutableMatrix): void;
|
2027
|
+
export function reflectionToRef(_plane: Plane.ReadonlyPlane, result: MutableMatrix): void;
|
2048
2028
|
/**
|
2049
2029
|
* Sets the given matrix as a rotation matrix composed from the 3 left handed axes
|
2050
2030
|
* @param xaxis - defines the value of the 1st axis
|
@@ -2052,88 +2032,88 @@ declare namespace Matrix {
|
|
2052
2032
|
* @param zaxis - defines the value of the 3rd axis
|
2053
2033
|
* @param result - defines the target matrix
|
2054
2034
|
*/
|
2055
|
-
function fromXYZAxesToRef(xaxis: Vector3.ReadonlyVector3, yaxis: Vector3.ReadonlyVector3, zaxis: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
2035
|
+
export function fromXYZAxesToRef(xaxis: Vector3.ReadonlyVector3, yaxis: Vector3.ReadonlyVector3, zaxis: Vector3.ReadonlyVector3, result: MutableMatrix): void;
|
2056
2036
|
/**
|
2057
2037
|
* Creates a rotation matrix from a quaternion and stores it in a target matrix
|
2058
2038
|
* @param quat - defines the quaternion to use
|
2059
2039
|
* @param result - defines the target matrix
|
2060
2040
|
*/
|
2061
|
-
function fromQuaternionToRef(quat: Quaternion.ReadonlyQuaternion, result: MutableMatrix): void;
|
2041
|
+
export function fromQuaternionToRef(quat: Quaternion.ReadonlyQuaternion, result: MutableMatrix): void;
|
2062
2042
|
/**
|
2063
2043
|
* Check if the current matrix is identity
|
2064
2044
|
* @returns true is the matrix is the identity matrix
|
2065
2045
|
*/
|
2066
|
-
function isIdentityUpdate(self: MutableMatrix): boolean;
|
2046
|
+
export function isIdentityUpdate(self: MutableMatrix): boolean;
|
2067
2047
|
/**
|
2068
2048
|
* Check if the current matrix is identity as a texture matrix (3x2 store in 4x4)
|
2069
2049
|
* @returns true is the matrix is the identity matrix
|
2070
2050
|
*/
|
2071
|
-
function isIdentityAs3x2Update(self: MutableMatrix): boolean;
|
2051
|
+
export function isIdentityAs3x2Update(self: MutableMatrix): boolean;
|
2072
2052
|
/**
|
2073
2053
|
* Gets the determinant of the matrix
|
2074
2054
|
* @returns the matrix determinant
|
2075
2055
|
*/
|
2076
|
-
function determinant(self: ReadonlyMatrix): number;
|
2056
|
+
export function determinant(self: ReadonlyMatrix): number;
|
2077
2057
|
/**
|
2078
2058
|
* Returns the matrix as a FloatArray
|
2079
2059
|
* @returns the matrix underlying array
|
2080
2060
|
*/
|
2081
|
-
function toArray(self: ReadonlyMatrix): Matrix4x4;
|
2061
|
+
export function toArray(self: ReadonlyMatrix): Matrix4x4;
|
2082
2062
|
/**
|
2083
2063
|
* Returns the matrix as a FloatArray
|
2084
2064
|
* @returns the matrix underlying array.
|
2085
2065
|
*/
|
2086
|
-
function asArray(self: ReadonlyMatrix): Matrix4x4;
|
2066
|
+
export function asArray(self: ReadonlyMatrix): Matrix4x4;
|
2087
2067
|
/**
|
2088
2068
|
* Sets all the matrix elements to zero
|
2089
2069
|
* @returns the current matrix
|
2090
2070
|
*/
|
2091
|
-
function reset(self: MutableMatrix): void;
|
2071
|
+
export function reset(self: MutableMatrix): void;
|
2092
2072
|
/**
|
2093
2073
|
* Adds the current matrix with a second one
|
2094
2074
|
* @param other - defines the matrix to add
|
2095
2075
|
* @returns a new matrix as the addition of the current matrix and the given one
|
2096
2076
|
*/
|
2097
|
-
function add(self: ReadonlyMatrix, other: ReadonlyMatrix): MutableMatrix;
|
2077
|
+
export function add(self: ReadonlyMatrix, other: ReadonlyMatrix): MutableMatrix;
|
2098
2078
|
/**
|
2099
2079
|
* Sets the given matrix "result" to the addition of the current matrix and the given one
|
2100
2080
|
* @param other - defines the matrix to add
|
2101
2081
|
* @param result - defines the target matrix
|
2102
2082
|
* @returns the current matrix
|
2103
2083
|
*/
|
2104
|
-
function addToRef(self: ReadonlyMatrix, other: ReadonlyMatrix, result: MutableMatrix): void;
|
2084
|
+
export function addToRef(self: ReadonlyMatrix, other: ReadonlyMatrix, result: MutableMatrix): void;
|
2105
2085
|
/**
|
2106
2086
|
* Adds in place the given matrix to the current matrix
|
2107
2087
|
* @param other - defines the second operand
|
2108
2088
|
* @returns the current updated matrix
|
2109
2089
|
*/
|
2110
|
-
function addToSelf(self: MutableMatrix, other: ReadonlyMatrix): void;
|
2090
|
+
export function addToSelf(self: MutableMatrix, other: ReadonlyMatrix): void;
|
2111
2091
|
/**
|
2112
2092
|
* Creates a new matrix as the invert of a given matrix
|
2113
2093
|
* @param source - defines the source matrix
|
2114
2094
|
* @returns the new matrix
|
2115
2095
|
*/
|
2116
|
-
function invert(source: ReadonlyMatrix): MutableMatrix;
|
2096
|
+
export function invert(source: ReadonlyMatrix): MutableMatrix;
|
2117
2097
|
/**
|
2118
2098
|
* Sets the given matrix to the current inverted Matrix
|
2119
2099
|
* @param other - defines the target matrix
|
2120
2100
|
* @returns the unmodified current matrix
|
2121
2101
|
*/
|
2122
|
-
function invertToRef(source: ReadonlyMatrix, result: MutableMatrix): void;
|
2102
|
+
export function invertToRef(source: ReadonlyMatrix, result: MutableMatrix): void;
|
2123
2103
|
/**
|
2124
2104
|
* add a value at the specified position in the current Matrix
|
2125
2105
|
* @param index - the index of the value within the matrix. between 0 and 15.
|
2126
2106
|
* @param value - the value to be added
|
2127
2107
|
* @returns the current updated matrix
|
2128
2108
|
*/
|
2129
|
-
function addAtIndex(self: MutableMatrix, index: number, value: number): void;
|
2109
|
+
export function addAtIndex(self: MutableMatrix, index: number, value: number): void;
|
2130
2110
|
/**
|
2131
2111
|
* mutiply the specified position in the current Matrix by a value
|
2132
2112
|
* @param index - the index of the value within the matrix. between 0 and 15.
|
2133
2113
|
* @param value - the value to be added
|
2134
2114
|
* @returns the current updated matrix
|
2135
2115
|
*/
|
2136
|
-
function multiplyAtIndex(self: MutableMatrix, index: number, value: number): MutableMatrix;
|
2116
|
+
export function multiplyAtIndex(self: MutableMatrix, index: number, value: number): MutableMatrix;
|
2137
2117
|
/**
|
2138
2118
|
* Inserts the translation vector (using 3 floats) in the current matrix
|
2139
2119
|
* @param x - defines the 1st component of the translation
|
@@ -2141,55 +2121,55 @@ declare namespace Matrix {
|
|
2141
2121
|
* @param z - defines the 3rd component of the translation
|
2142
2122
|
* @returns the current updated matrix
|
2143
2123
|
*/
|
2144
|
-
function setTranslationFromFloats(self: MutableMatrix, x: number, y: number, z: number): void;
|
2124
|
+
export function setTranslationFromFloats(self: MutableMatrix, x: number, y: number, z: number): void;
|
2145
2125
|
/**
|
2146
2126
|
* Inserts the translation vector in the current matrix
|
2147
2127
|
* @param vector3 - defines the translation to insert
|
2148
2128
|
* @returns the current updated matrix
|
2149
2129
|
*/
|
2150
|
-
function setTranslation(self: MutableMatrix, vector3: Vector3.ReadonlyVector3): void;
|
2130
|
+
export function setTranslation(self: MutableMatrix, vector3: Vector3.ReadonlyVector3): void;
|
2151
2131
|
/**
|
2152
2132
|
* Gets the translation value of the current matrix
|
2153
2133
|
* @returns a new Vector3 as the extracted translation from the matrix
|
2154
2134
|
*/
|
2155
|
-
function getTranslation(self: MutableMatrix): Vector3.MutableVector3;
|
2135
|
+
export function getTranslation(self: MutableMatrix): Vector3.MutableVector3;
|
2156
2136
|
/**
|
2157
2137
|
* Fill a Vector3 with the extracted translation from the matrix
|
2158
2138
|
* @param result - defines the Vector3 where to store the translation
|
2159
2139
|
* @returns the current matrix
|
2160
2140
|
*/
|
2161
|
-
function getTranslationToRef(self: MutableMatrix, result: Vector3.MutableVector3): void;
|
2141
|
+
export function getTranslationToRef(self: MutableMatrix, result: Vector3.MutableVector3): void;
|
2162
2142
|
/**
|
2163
2143
|
* Remove rotation and scaling part from the matrix
|
2164
2144
|
* @returns the updated matrix
|
2165
2145
|
*/
|
2166
|
-
function removeRotationAndScaling(self: MutableMatrix): MutableMatrix;
|
2146
|
+
export function removeRotationAndScaling(self: MutableMatrix): MutableMatrix;
|
2167
2147
|
/**
|
2168
2148
|
* Multiply two matrices
|
2169
2149
|
* @param other - defines the second operand
|
2170
2150
|
* @returns a new matrix set with the multiplication result of the current Matrix and the given one
|
2171
2151
|
*/
|
2172
|
-
function multiply(self: MutableMatrix, other: ReadonlyMatrix): MutableMatrix;
|
2152
|
+
export function multiply(self: MutableMatrix, other: ReadonlyMatrix): MutableMatrix;
|
2173
2153
|
/**
|
2174
2154
|
* Copy the current matrix from the given one
|
2175
2155
|
* @param other - defines the source matrix
|
2176
2156
|
* @returns the current updated matrix
|
2177
2157
|
*/
|
2178
|
-
function copy(from: ReadonlyMatrix, dest: MutableMatrix): void;
|
2158
|
+
export function copy(from: ReadonlyMatrix, dest: MutableMatrix): void;
|
2179
2159
|
/**
|
2180
2160
|
* Populates the given array from the starting index with the current matrix values
|
2181
2161
|
* @param array - defines the target array
|
2182
2162
|
* @param offset - defines the offset in the target array where to start storing values
|
2183
2163
|
* @returns the current matrix
|
2184
2164
|
*/
|
2185
|
-
function copyToArray(self: ReadonlyMatrix, arrayDest: FloatArray, offsetDest?: number): void;
|
2165
|
+
export function copyToArray(self: ReadonlyMatrix, arrayDest: FloatArray, offsetDest?: number): void;
|
2186
2166
|
/**
|
2187
2167
|
* Sets the given matrix "result" with the multiplication result of the current Matrix and the given one
|
2188
2168
|
* @param other - defines the second operand
|
2189
2169
|
* @param result - defines the matrix where to store the multiplication
|
2190
2170
|
* @returns the current matrix
|
2191
2171
|
*/
|
2192
|
-
function multiplyToRef(self: ReadonlyMatrix, other: ReadonlyMatrix, result: MutableMatrix): void;
|
2172
|
+
export function multiplyToRef(self: ReadonlyMatrix, other: ReadonlyMatrix, result: MutableMatrix): void;
|
2193
2173
|
/**
|
2194
2174
|
* Sets the FloatArray "result" from the given index "offset" with the multiplication of the current matrix and the given one
|
2195
2175
|
* @param other - defines the second operand
|
@@ -2197,23 +2177,23 @@ declare namespace Matrix {
|
|
2197
2177
|
* @param offset - defines the offset in the target array where to start storing values
|
2198
2178
|
* @returns the current matrix
|
2199
2179
|
*/
|
2200
|
-
function multiplyToArray(self: ReadonlyMatrix, other: ReadonlyMatrix, result: FloatArray, offset: number): void;
|
2180
|
+
export function multiplyToArray(self: ReadonlyMatrix, other: ReadonlyMatrix, result: FloatArray, offset: number): void;
|
2201
2181
|
/**
|
2202
2182
|
* Check equality between self matrix and a second one
|
2203
2183
|
* @param value - defines the second matrix to compare
|
2204
2184
|
* @returns true is the current matrix and the given one values are strictly equal
|
2205
2185
|
*/
|
2206
|
-
function equals(self: ReadonlyMatrix, value: ReadonlyMatrix): boolean;
|
2186
|
+
export function equals(self: ReadonlyMatrix, value: ReadonlyMatrix): boolean;
|
2207
2187
|
/**
|
2208
2188
|
* Clone the current matrix
|
2209
2189
|
* @returns a new matrix from the current matrix
|
2210
2190
|
*/
|
2211
|
-
function clone(self: ReadonlyMatrix): MutableMatrix;
|
2191
|
+
export function clone(self: ReadonlyMatrix): MutableMatrix;
|
2212
2192
|
/**
|
2213
2193
|
* Gets the hash code of the current matrix
|
2214
2194
|
* @returns the hash code
|
2215
2195
|
*/
|
2216
|
-
function getHashCode(self: ReadonlyMatrix): number;
|
2196
|
+
export function getHashCode(self: ReadonlyMatrix): number;
|
2217
2197
|
/**
|
2218
2198
|
* Decomposes the current Matrix into a translation, rotation and scaling components
|
2219
2199
|
* @param scale - defines the scale vector3 given as a reference to update
|
@@ -2221,7 +2201,7 @@ declare namespace Matrix {
|
|
2221
2201
|
* @param translation - defines the translation vector3 given as a reference to update
|
2222
2202
|
* @returns true if operation was successful
|
2223
2203
|
*/
|
2224
|
-
function decompose(self: ReadonlyMatrix, scale?: Vector3.MutableVector3, rotation?: Quaternion.MutableQuaternion, translation?: Vector3.MutableVector3): boolean;
|
2204
|
+
export function decompose(self: ReadonlyMatrix, scale?: Vector3.MutableVector3, rotation?: Quaternion.MutableQuaternion, translation?: Vector3.MutableVector3): boolean;
|
2225
2205
|
/**
|
2226
2206
|
* Gets specific row of the matrix
|
2227
2207
|
* @param index - defines the number of the row to get
|
@@ -2242,51 +2222,51 @@ declare namespace Matrix {
|
|
2242
2222
|
* @param w - defines the w component to set
|
2243
2223
|
* @returns the updated current matrix
|
2244
2224
|
*/
|
2245
|
-
function setRowFromFloats(self: MutableMatrix, index: number, x: number, y: number, z: number, w: number): void;
|
2225
|
+
export function setRowFromFloats(self: MutableMatrix, index: number, x: number, y: number, z: number, w: number): void;
|
2246
2226
|
/**
|
2247
2227
|
* Compute a new matrix set with the current matrix values multiplied by scale (float)
|
2248
2228
|
* @param scale - defines the scale factor
|
2249
2229
|
* @returns a new matrix
|
2250
2230
|
*/
|
2251
|
-
function scale(self: ReadonlyMatrix, scale: number): MutableMatrix;
|
2231
|
+
export function scale(self: ReadonlyMatrix, scale: number): MutableMatrix;
|
2252
2232
|
/**
|
2253
2233
|
* Scale the current matrix values by a factor to a given result matrix
|
2254
2234
|
* @param scale - defines the scale factor
|
2255
2235
|
* @param result - defines the matrix to store the result
|
2256
2236
|
* @returns the current matrix
|
2257
2237
|
*/
|
2258
|
-
function scaleToRef(self: ReadonlyMatrix, scale: number, result: MutableMatrix): void;
|
2238
|
+
export function scaleToRef(self: ReadonlyMatrix, scale: number, result: MutableMatrix): void;
|
2259
2239
|
/**
|
2260
2240
|
* Scale the current matrix values by a factor and add the result to a given matrix
|
2261
2241
|
* @param scale - defines the scale factor
|
2262
2242
|
* @param result - defines the Matrix to store the result
|
2263
2243
|
* @returns the current matrix
|
2264
2244
|
*/
|
2265
|
-
function scaleAndAddToRef(self: ReadonlyMatrix, scale: number, result: MutableMatrix): void;
|
2245
|
+
export function scaleAndAddToRef(self: ReadonlyMatrix, scale: number, result: MutableMatrix): void;
|
2266
2246
|
/**
|
2267
2247
|
* Writes to the given matrix a normal matrix, computed from self one (using values from identity matrix for fourth row and column).
|
2268
2248
|
* @param ref - matrix to store the result
|
2269
2249
|
*/
|
2270
|
-
function normalMatrixToRef(self: ReadonlyMatrix, ref: MutableMatrix): void;
|
2250
|
+
export function normalMatrixToRef(self: ReadonlyMatrix, ref: MutableMatrix): void;
|
2271
2251
|
/**
|
2272
2252
|
* Gets only rotation part of the current matrix
|
2273
2253
|
* @returns a new matrix sets to the extracted rotation matrix from the current one
|
2274
2254
|
*/
|
2275
|
-
function getRotationMatrix(self: ReadonlyMatrix): MutableMatrix;
|
2255
|
+
export function getRotationMatrix(self: ReadonlyMatrix): MutableMatrix;
|
2276
2256
|
/**
|
2277
2257
|
* Extracts the rotation matrix from the current one and sets it as the given "result"
|
2278
2258
|
* @param result - defines the target matrix to store data to
|
2279
2259
|
* @returns the current matrix
|
2280
2260
|
*/
|
2281
|
-
function getRotationMatrixToRef(self: ReadonlyMatrix, result: MutableMatrix): void;
|
2261
|
+
export function getRotationMatrixToRef(self: ReadonlyMatrix, result: MutableMatrix): void;
|
2282
2262
|
/**
|
2283
2263
|
* Toggles model matrix from being right handed to left handed in place and vice versa
|
2284
2264
|
*/
|
2285
|
-
function toggleModelMatrixHandInPlace(self: MutableMatrix): void;
|
2265
|
+
export function toggleModelMatrixHandInPlace(self: MutableMatrix): void;
|
2286
2266
|
/**
|
2287
2267
|
* Toggles projection matrix from being right handed to left handed in place and vice versa
|
2288
2268
|
*/
|
2289
|
-
function toggleProjectionMatrixHandInPlace(self: MutableMatrix): void;
|
2269
|
+
export function toggleProjectionMatrixHandInPlace(self: MutableMatrix): void;
|
2290
2270
|
}
|
2291
2271
|
|
2292
2272
|
/** @public */
|
@@ -2309,7 +2289,7 @@ export declare class MessageBus {
|
|
2309
2289
|
private flush;
|
2310
2290
|
}
|
2311
2291
|
|
2312
|
-
declare const enum NftFrameType {
|
2292
|
+
export declare const enum NftFrameType {
|
2313
2293
|
NFT_CLASSIC = 0,
|
2314
2294
|
NFT_BAROQUE_ORNAMENT = 1,
|
2315
2295
|
NFT_DIAMOND_ORNAMENT = 2,
|
@@ -2562,11 +2542,11 @@ export declare const onLeaveSceneObservable: Observable<{
|
|
2562
2542
|
userId: string;
|
2563
2543
|
}>;
|
2564
2544
|
|
2565
|
-
declare type OnlyNonUndefinedTypes<T> = {
|
2545
|
+
export declare type OnlyNonUndefinedTypes<T> = {
|
2566
2546
|
[K in ExcludeUndefined<T>]: T[K];
|
2567
2547
|
};
|
2568
2548
|
|
2569
|
-
declare type OnlyOptionalUndefinedTypes<T> = {
|
2549
|
+
export declare type OnlyOptionalUndefinedTypes<T> = {
|
2570
2550
|
[K in IncludeUndefined<T>]?: T[K];
|
2571
2551
|
};
|
2572
2552
|
|
@@ -2646,7 +2626,7 @@ export declare const onVideoEvent: Observable<{
|
|
2646
2626
|
totalVideoLength: number;
|
2647
2627
|
}>;
|
2648
2628
|
|
2649
|
-
declare interface PBAnimationState {
|
2629
|
+
export declare interface PBAnimationState {
|
2650
2630
|
name: string;
|
2651
2631
|
clip: string;
|
2652
2632
|
playing?: boolean | undefined;
|
@@ -2659,7 +2639,11 @@ declare interface PBAnimationState {
|
|
2659
2639
|
shouldReset?: boolean | undefined;
|
2660
2640
|
}
|
2661
2641
|
|
2662
|
-
declare interface
|
2642
|
+
export declare interface PBAnimator {
|
2643
|
+
states: PBAnimationState[];
|
2644
|
+
}
|
2645
|
+
|
2646
|
+
export declare interface PBAudioSource {
|
2663
2647
|
playing?: boolean | undefined;
|
2664
2648
|
/** default=1.0f */
|
2665
2649
|
volume?: number | undefined;
|
@@ -2669,36 +2653,36 @@ declare interface PBAudioSource {
|
|
2669
2653
|
audioClipUrl: string;
|
2670
2654
|
}
|
2671
2655
|
|
2672
|
-
declare interface PBAudioStream {
|
2656
|
+
export declare interface PBAudioStream {
|
2673
2657
|
playing?: boolean | undefined;
|
2674
2658
|
/** default=1.0f */
|
2675
2659
|
volume?: number | undefined;
|
2676
2660
|
url: string;
|
2677
2661
|
}
|
2678
2662
|
|
2679
|
-
declare interface PBAvatarAttach {
|
2663
|
+
export declare interface PBAvatarAttach {
|
2680
2664
|
avatarId: string;
|
2681
2665
|
anchorPointId: AvatarAnchorPointType;
|
2682
2666
|
}
|
2683
2667
|
|
2684
|
-
declare interface PBAvatarModifierArea {
|
2685
|
-
area:
|
2668
|
+
export declare interface PBAvatarModifierArea {
|
2669
|
+
area: PBVector3 | undefined;
|
2686
2670
|
excludeIds: string[];
|
2687
2671
|
modifiers: AvatarModifierType[];
|
2688
2672
|
}
|
2689
2673
|
|
2690
|
-
declare interface PBAvatarShape {
|
2674
|
+
export declare interface PBAvatarShape {
|
2691
2675
|
id: string;
|
2692
2676
|
/** default = NPC */
|
2693
2677
|
name?: string | undefined;
|
2694
2678
|
/** default = urn:decentraland:off-chain:base-avatars:BaseFemale */
|
2695
2679
|
bodyShape?: string | undefined;
|
2696
2680
|
/** default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f) */
|
2697
|
-
skinColor?:
|
2681
|
+
skinColor?: PBColor3 | undefined;
|
2698
2682
|
/** default = decentraland.common.Color3(R = 0.283f, G = 0.142f, B = 0f) */
|
2699
|
-
hairColor?:
|
2683
|
+
hairColor?: PBColor3 | undefined;
|
2700
2684
|
/** default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f) */
|
2701
|
-
eyeColor?:
|
2685
|
+
eyeColor?: PBColor3 | undefined;
|
2702
2686
|
expressionTriggerId?: string | undefined;
|
2703
2687
|
/** default = timestamp */
|
2704
2688
|
expressionTriggerTimestamp?: number | undefined;
|
@@ -2717,28 +2701,41 @@ declare interface PBAvatarShape {
|
|
2717
2701
|
emotes: string[];
|
2718
2702
|
}
|
2719
2703
|
|
2720
|
-
declare interface PBBillboard {
|
2704
|
+
export declare interface PBBillboard {
|
2721
2705
|
/** default=BM_ALL_AXES */
|
2722
2706
|
billboardMode?: BillboardMode | undefined;
|
2723
2707
|
/** default=false */
|
2724
2708
|
oppositeDirection?: boolean | undefined;
|
2725
2709
|
}
|
2726
2710
|
|
2727
|
-
declare interface PBCameraMode {
|
2711
|
+
export declare interface PBCameraMode {
|
2728
2712
|
mode: CameraType;
|
2729
2713
|
}
|
2730
2714
|
|
2731
|
-
declare interface PBCameraModeArea {
|
2732
|
-
area:
|
2715
|
+
export declare interface PBCameraModeArea {
|
2716
|
+
area: PBVector3 | undefined;
|
2733
2717
|
mode: CameraType;
|
2734
2718
|
}
|
2735
2719
|
|
2736
|
-
declare interface
|
2720
|
+
export declare interface PBColor3 {
|
2721
|
+
r: number;
|
2722
|
+
g: number;
|
2723
|
+
b: number;
|
2724
|
+
}
|
2725
|
+
|
2726
|
+
export declare interface PBColor4 {
|
2727
|
+
r: number;
|
2728
|
+
g: number;
|
2729
|
+
b: number;
|
2730
|
+
a: number;
|
2731
|
+
}
|
2732
|
+
|
2733
|
+
export declare interface PBGltfContainer {
|
2737
2734
|
/** which file to load */
|
2738
2735
|
src: string;
|
2739
2736
|
}
|
2740
2737
|
|
2741
|
-
declare interface PBMaterial {
|
2738
|
+
export declare interface PBMaterial {
|
2742
2739
|
material?: {
|
2743
2740
|
$case: 'unlit';
|
2744
2741
|
unlit: PBMaterial_UnlitMaterial;
|
@@ -2748,7 +2745,7 @@ declare interface PBMaterial {
|
|
2748
2745
|
};
|
2749
2746
|
}
|
2750
2747
|
|
2751
|
-
declare interface PBMaterial_PbrMaterial {
|
2748
|
+
export declare interface PBMaterial_PbrMaterial {
|
2752
2749
|
/** default = null */
|
2753
2750
|
texture?: TextureUnion | undefined;
|
2754
2751
|
/** default = 0.5. range value: from 0 to 1 */
|
@@ -2762,11 +2759,11 @@ declare interface PBMaterial_PbrMaterial {
|
|
2762
2759
|
/** default = null */
|
2763
2760
|
bumpTexture?: TextureUnion | undefined;
|
2764
2761
|
/** default = white; */
|
2765
|
-
albedoColor?:
|
2762
|
+
albedoColor?: PBColor3 | undefined;
|
2766
2763
|
/** default = black; */
|
2767
|
-
emissiveColor?:
|
2764
|
+
emissiveColor?: PBColor3 | undefined;
|
2768
2765
|
/** default = white; */
|
2769
|
-
reflectivityColor?:
|
2766
|
+
reflectivityColor?: PBColor3 | undefined;
|
2770
2767
|
/** default = TransparencyMode.Auto */
|
2771
2768
|
transparencyMode?: MaterialTransparencyMode | undefined;
|
2772
2769
|
/** default = 0.5 */
|
@@ -2783,7 +2780,7 @@ declare interface PBMaterial_PbrMaterial {
|
|
2783
2780
|
directIntensity?: number | undefined;
|
2784
2781
|
}
|
2785
2782
|
|
2786
|
-
declare interface PBMaterial_UnlitMaterial {
|
2783
|
+
export declare interface PBMaterial_UnlitMaterial {
|
2787
2784
|
/** default = null */
|
2788
2785
|
texture?: TextureUnion | undefined;
|
2789
2786
|
/** default = 0.5. range value: from 0 to 1 */
|
@@ -2792,7 +2789,7 @@ declare interface PBMaterial_UnlitMaterial {
|
|
2792
2789
|
castShadows?: boolean | undefined;
|
2793
2790
|
}
|
2794
2791
|
|
2795
|
-
declare interface PBMeshCollider {
|
2792
|
+
export declare interface PBMeshCollider {
|
2796
2793
|
/** default = ColliderLayer.Physics | ColliderLayer.Pointer */
|
2797
2794
|
collisionMask?: number | undefined;
|
2798
2795
|
mesh?: {
|
@@ -2810,23 +2807,23 @@ declare interface PBMeshCollider {
|
|
2810
2807
|
};
|
2811
2808
|
}
|
2812
2809
|
|
2813
|
-
declare interface PBMeshCollider_BoxMesh {
|
2810
|
+
export declare interface PBMeshCollider_BoxMesh {
|
2814
2811
|
}
|
2815
2812
|
|
2816
|
-
declare interface PBMeshCollider_CylinderMesh {
|
2813
|
+
export declare interface PBMeshCollider_CylinderMesh {
|
2817
2814
|
/** default=1.0 */
|
2818
2815
|
radiusTop?: number | undefined;
|
2819
2816
|
/** default=1.0 */
|
2820
2817
|
radiusBottom?: number | undefined;
|
2821
2818
|
}
|
2822
2819
|
|
2823
|
-
declare interface PBMeshCollider_PlaneMesh {
|
2820
|
+
export declare interface PBMeshCollider_PlaneMesh {
|
2824
2821
|
}
|
2825
2822
|
|
2826
|
-
declare interface PBMeshCollider_SphereMesh {
|
2823
|
+
export declare interface PBMeshCollider_SphereMesh {
|
2827
2824
|
}
|
2828
2825
|
|
2829
|
-
declare interface PBMeshRenderer {
|
2826
|
+
export declare interface PBMeshRenderer {
|
2830
2827
|
mesh?: {
|
2831
2828
|
$case: 'box';
|
2832
2829
|
box: PBMeshRenderer_BoxMesh;
|
@@ -2842,40 +2839,40 @@ declare interface PBMeshRenderer {
|
|
2842
2839
|
};
|
2843
2840
|
}
|
2844
2841
|
|
2845
|
-
declare interface PBMeshRenderer_BoxMesh {
|
2842
|
+
export declare interface PBMeshRenderer_BoxMesh {
|
2846
2843
|
uvs: number[];
|
2847
2844
|
}
|
2848
2845
|
|
2849
|
-
declare interface PBMeshRenderer_CylinderMesh {
|
2846
|
+
export declare interface PBMeshRenderer_CylinderMesh {
|
2850
2847
|
/** default=1.0 */
|
2851
2848
|
radiusTop?: number | undefined;
|
2852
2849
|
/** default=1.0 */
|
2853
2850
|
radiusBottom?: number | undefined;
|
2854
2851
|
}
|
2855
2852
|
|
2856
|
-
declare interface PBMeshRenderer_PlaneMesh {
|
2853
|
+
export declare interface PBMeshRenderer_PlaneMesh {
|
2857
2854
|
uvs: number[];
|
2858
2855
|
}
|
2859
2856
|
|
2860
|
-
declare interface PBMeshRenderer_SphereMesh {
|
2857
|
+
export declare interface PBMeshRenderer_SphereMesh {
|
2861
2858
|
}
|
2862
2859
|
|
2863
|
-
declare interface PBNftShape {
|
2860
|
+
export declare interface PBNftShape {
|
2864
2861
|
src: string;
|
2865
2862
|
/** default = PictureFrameStyle.Classic */
|
2866
2863
|
style?: NftFrameType | undefined;
|
2867
2864
|
/** default = decentraland.common.Color3(0.6404918, 0.611472, 0.8584906) */
|
2868
|
-
color?:
|
2865
|
+
color?: PBColor3 | undefined;
|
2869
2866
|
}
|
2870
2867
|
|
2871
2868
|
/** the renderer will set this component to the root entity once per frame with all the events */
|
2872
|
-
declare interface PBPointerEventsResult {
|
2869
|
+
export declare interface PBPointerEventsResult {
|
2873
2870
|
/** a list of the last N pointer commands (from the engine) */
|
2874
2871
|
commands: PBPointerEventsResult_PointerCommand[];
|
2875
2872
|
}
|
2876
2873
|
|
2877
2874
|
/** this message represents a pointer event, used both for UP and DOWN actions */
|
2878
|
-
declare interface PBPointerEventsResult_PointerCommand {
|
2875
|
+
export declare interface PBPointerEventsResult_PointerCommand {
|
2879
2876
|
/** identifier of the input */
|
2880
2877
|
button: InputAction;
|
2881
2878
|
hit: RaycastHit | undefined;
|
@@ -2886,16 +2883,16 @@ declare interface PBPointerEventsResult_PointerCommand {
|
|
2886
2883
|
analog?: number | undefined;
|
2887
2884
|
}
|
2888
2885
|
|
2889
|
-
declare interface PBPointerHoverFeedback {
|
2886
|
+
export declare interface PBPointerHoverFeedback {
|
2890
2887
|
pointerEvents: PBPointerHoverFeedback_Entry[];
|
2891
2888
|
}
|
2892
2889
|
|
2893
|
-
declare interface PBPointerHoverFeedback_Entry {
|
2890
|
+
export declare interface PBPointerHoverFeedback_Entry {
|
2894
2891
|
eventType: PointerEventType;
|
2895
2892
|
eventInfo: PBPointerHoverFeedback_Info | undefined;
|
2896
2893
|
}
|
2897
2894
|
|
2898
|
-
declare interface PBPointerHoverFeedback_Info {
|
2895
|
+
export declare interface PBPointerHoverFeedback_Info {
|
2899
2896
|
/** default=InputAction.ANY */
|
2900
2897
|
button?: InputAction | undefined;
|
2901
2898
|
/** default='Interact' */
|
@@ -2906,26 +2903,32 @@ declare interface PBPointerHoverFeedback_Info {
|
|
2906
2903
|
showFeedback?: boolean | undefined;
|
2907
2904
|
}
|
2908
2905
|
|
2909
|
-
declare interface PBPointerLock {
|
2906
|
+
export declare interface PBPointerLock {
|
2910
2907
|
isPointerLocked: boolean;
|
2911
2908
|
}
|
2912
2909
|
|
2913
|
-
declare interface
|
2910
|
+
export declare interface PBPosition {
|
2911
|
+
x: number;
|
2912
|
+
y: number;
|
2913
|
+
z: number;
|
2914
|
+
}
|
2915
|
+
|
2916
|
+
export declare interface PBRaycast {
|
2914
2917
|
timestamp: number;
|
2915
|
-
origin:
|
2916
|
-
direction:
|
2918
|
+
origin: PBVector3 | undefined;
|
2919
|
+
direction: PBVector3 | undefined;
|
2917
2920
|
maxDistance: number;
|
2918
2921
|
queryType: RaycastQueryType;
|
2919
2922
|
}
|
2920
2923
|
|
2921
|
-
declare interface PBRaycastResult {
|
2924
|
+
export declare interface PBRaycastResult {
|
2922
2925
|
timestamp: number;
|
2923
|
-
origin:
|
2924
|
-
direction:
|
2926
|
+
origin: PBVector3 | undefined;
|
2927
|
+
direction: PBVector3 | undefined;
|
2925
2928
|
hits: RaycastHit[];
|
2926
2929
|
}
|
2927
2930
|
|
2928
|
-
declare interface PBTextShape {
|
2931
|
+
export declare interface PBTextShape {
|
2929
2932
|
text: string;
|
2930
2933
|
/** default=F_SANS_SERIF */
|
2931
2934
|
font?: Font | undefined;
|
@@ -2950,22 +2953,22 @@ declare interface PBTextShape {
|
|
2950
2953
|
shadowOffsetY?: number | undefined;
|
2951
2954
|
outlineWidth?: number | undefined;
|
2952
2955
|
/** default=(1.0,1.0,1.0) */
|
2953
|
-
shadowColor?:
|
2956
|
+
shadowColor?: PBColor3 | undefined;
|
2954
2957
|
/** default=(1.0,1.0,1.0) */
|
2955
|
-
outlineColor?:
|
2958
|
+
outlineColor?: PBColor3 | undefined;
|
2956
2959
|
/** default=(1.0,1.0,1.0) */
|
2957
|
-
textColor?:
|
2960
|
+
textColor?: PBColor4 | undefined;
|
2958
2961
|
}
|
2959
2962
|
|
2960
|
-
declare interface PBUiBackground {
|
2963
|
+
export declare interface PBUiBackground {
|
2961
2964
|
/** default=(0.0, 0.0, 0.0, 0.0) */
|
2962
|
-
backgroundColor?:
|
2965
|
+
backgroundColor?: PBColor4 | undefined;
|
2963
2966
|
}
|
2964
2967
|
|
2965
|
-
declare interface PBUiText {
|
2968
|
+
export declare interface PBUiText {
|
2966
2969
|
value: string;
|
2967
2970
|
/** default=(1.0,1.0,1.0) */
|
2968
|
-
color?:
|
2971
|
+
color?: PBColor3 | undefined;
|
2969
2972
|
/** default='center' */
|
2970
2973
|
textAlign?: TextAlignMode | undefined;
|
2971
2974
|
/** default=0 */
|
@@ -2974,7 +2977,7 @@ declare interface PBUiText {
|
|
2974
2977
|
fontSize?: number | undefined;
|
2975
2978
|
}
|
2976
2979
|
|
2977
|
-
declare interface PBUiTransform {
|
2980
|
+
export declare interface PBUiTransform {
|
2978
2981
|
parent: number;
|
2979
2982
|
rightOf: number;
|
2980
2983
|
positionType: YGPositionType;
|
@@ -3035,7 +3038,18 @@ declare interface PBUiTransform {
|
|
3035
3038
|
borderBottom: number;
|
3036
3039
|
}
|
3037
3040
|
|
3038
|
-
declare interface
|
3041
|
+
export declare interface PBVector2 {
|
3042
|
+
x: number;
|
3043
|
+
y: number;
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
export declare interface PBVector3 {
|
3047
|
+
x: number;
|
3048
|
+
y: number;
|
3049
|
+
z: number;
|
3050
|
+
}
|
3051
|
+
|
3052
|
+
export declare interface PBVisibilityComponent {
|
3039
3053
|
/** default=true */
|
3040
3054
|
visible?: boolean | undefined;
|
3041
3055
|
}
|
@@ -3044,8 +3058,8 @@ declare interface PBVisibilityComponent {
|
|
3044
3058
|
* Represens a plane by the equation ax + by + cz + d = 0
|
3045
3059
|
* @public
|
3046
3060
|
*/
|
3047
|
-
declare namespace Plane {
|
3048
|
-
type MutablePlane = {
|
3061
|
+
export declare namespace Plane {
|
3062
|
+
export type MutablePlane = {
|
3049
3063
|
/**
|
3050
3064
|
* Normal of the plane (a,b,c)
|
3051
3065
|
*/
|
@@ -3055,7 +3069,7 @@ declare namespace Plane {
|
|
3055
3069
|
*/
|
3056
3070
|
d: number;
|
3057
3071
|
};
|
3058
|
-
type ReadonlyPlane = {
|
3072
|
+
export type ReadonlyPlane = {
|
3059
3073
|
/**
|
3060
3074
|
* Normal of the plane (a,b,c)
|
3061
3075
|
*/
|
@@ -3072,7 +3086,7 @@ declare namespace Plane {
|
|
3072
3086
|
* @param c - c component of the plane
|
3073
3087
|
* @param d - d component of the plane
|
3074
3088
|
*/
|
3075
|
-
function create(a: number, b: number, c: number, d: number): {
|
3089
|
+
export function create(a: number, b: number, c: number, d: number): {
|
3076
3090
|
normal: Vector3.MutableVector3;
|
3077
3091
|
d: number;
|
3078
3092
|
};
|
@@ -3081,7 +3095,7 @@ declare namespace Plane {
|
|
3081
3095
|
* @param array - the array to create a plane from
|
3082
3096
|
* @returns a new Plane from the given array.
|
3083
3097
|
*/
|
3084
|
-
function fromArray(array: number[]): MutablePlane;
|
3098
|
+
export function fromArray(array: number[]): MutablePlane;
|
3085
3099
|
/**
|
3086
3100
|
* Creates a plane from three points
|
3087
3101
|
* @param point1 - point used to create the plane
|
@@ -3089,7 +3103,7 @@ declare namespace Plane {
|
|
3089
3103
|
* @param point3 - point used to create the plane
|
3090
3104
|
* @returns a new Plane defined by the three given points.
|
3091
3105
|
*/
|
3092
|
-
function fromPoints(_point1: Vector3.ReadonlyVector3, _point2: Vector3.ReadonlyVector3, _point3: Vector3.ReadonlyVector3): MutablePlane;
|
3106
|
+
export function fromPoints(_point1: Vector3.ReadonlyVector3, _point2: Vector3.ReadonlyVector3, _point3: Vector3.ReadonlyVector3): MutablePlane;
|
3093
3107
|
/**
|
3094
3108
|
* Creates a plane from an origin point and a normal
|
3095
3109
|
* @param origin - origin of the plane to be constructed
|
@@ -3097,7 +3111,7 @@ declare namespace Plane {
|
|
3097
3111
|
* @returns a new Plane the normal vector to this plane at the given origin point.
|
3098
3112
|
* Note : the vector "normal" is updated because normalized.
|
3099
3113
|
*/
|
3100
|
-
function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
|
3114
|
+
export function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
|
3101
3115
|
/**
|
3102
3116
|
* Calculates the distance from a plane and a point
|
3103
3117
|
* @param origin - origin of the plane to be constructed
|
@@ -3105,36 +3119,36 @@ declare namespace Plane {
|
|
3105
3119
|
* @param point - point to calculate distance to
|
3106
3120
|
* @returns the signed distance between the plane defined by the normal vector at the "origin"" point and the given other point.
|
3107
3121
|
*/
|
3108
|
-
function signedDistanceToPlaneFromPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3, point: Vector3.ReadonlyVector3): number;
|
3122
|
+
export function signedDistanceToPlaneFromPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3, point: Vector3.ReadonlyVector3): number;
|
3109
3123
|
/**
|
3110
3124
|
* @returns the plane coordinates as a new array of 4 elements [a, b, c, d].
|
3111
3125
|
*/
|
3112
|
-
function asArray(plane: ReadonlyPlane): number[];
|
3126
|
+
export function asArray(plane: ReadonlyPlane): number[];
|
3113
3127
|
/**
|
3114
3128
|
* @returns a new plane copied from the current Plane.
|
3115
3129
|
*/
|
3116
|
-
function clone(plane: ReadonlyPlane): MutablePlane;
|
3130
|
+
export function clone(plane: ReadonlyPlane): MutablePlane;
|
3117
3131
|
/**
|
3118
3132
|
* @returns the Plane hash code.
|
3119
3133
|
*/
|
3120
|
-
function getHashCode(_plane: ReadonlyPlane): number;
|
3134
|
+
export function getHashCode(_plane: ReadonlyPlane): number;
|
3121
3135
|
/**
|
3122
3136
|
* Normalize the current Plane in place.
|
3123
3137
|
* @returns the updated Plane.
|
3124
3138
|
*/
|
3125
|
-
function normalize(plane: ReadonlyPlane): MutablePlane;
|
3139
|
+
export function normalize(plane: ReadonlyPlane): MutablePlane;
|
3126
3140
|
/**
|
3127
3141
|
* Applies a transformation the plane and returns the result
|
3128
3142
|
* @param transformation - the transformation matrix to be applied to the plane
|
3129
3143
|
* @returns a new Plane as the result of the transformation of the current Plane by the given matrix.
|
3130
3144
|
*/
|
3131
|
-
function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
|
3145
|
+
export function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
|
3132
3146
|
/**
|
3133
3147
|
* Calcualtte the dot product between the point and the plane normal
|
3134
3148
|
* @param point - point to calculate the dot product with
|
3135
3149
|
* @returns the dot product (float) of the point coordinates and the plane normal.
|
3136
3150
|
*/
|
3137
|
-
function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3151
|
+
export function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3138
3152
|
/**
|
3139
3153
|
* Updates the current Plane from the plane defined by the three given points.
|
3140
3154
|
* @param point1 - one of the points used to contruct the plane
|
@@ -3142,26 +3156,26 @@ declare namespace Plane {
|
|
3142
3156
|
* @param point3 - one of the points used to contruct the plane
|
3143
3157
|
* @returns the updated Plane.
|
3144
3158
|
*/
|
3145
|
-
function copyFromPoints(point1: Vector3.ReadonlyVector3, point2: Vector3.ReadonlyVector3, point3: Vector3.ReadonlyVector3): MutablePlane;
|
3159
|
+
export function copyFromPoints(point1: Vector3.ReadonlyVector3, point2: Vector3.ReadonlyVector3, point3: Vector3.ReadonlyVector3): MutablePlane;
|
3146
3160
|
/**
|
3147
3161
|
* Checks if the plane is facing a given direction
|
3148
3162
|
* @param direction - the direction to check if the plane is facing
|
3149
3163
|
* @param epsilon - value the dot product is compared against (returns true if dot <= epsilon)
|
3150
3164
|
* @returns True is the vector "direction" is the same side than the plane normal.
|
3151
3165
|
*/
|
3152
|
-
function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
|
3166
|
+
export function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
|
3153
3167
|
/**
|
3154
3168
|
* Calculates the distance to a point
|
3155
3169
|
* @param point - point to calculate distance to
|
3156
3170
|
* @returns the signed distance (float) from the given point to the Plane.
|
3157
3171
|
*/
|
3158
|
-
function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3172
|
+
export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3159
3173
|
}
|
3160
3174
|
|
3161
3175
|
/** @public */
|
3162
3176
|
export declare const PointerEventsResult: ComponentDefinition<ISchema<PBPointerEventsResult>, PBPointerEventsResult>;
|
3163
3177
|
|
3164
|
-
declare const enum PointerEventType {
|
3178
|
+
export declare const enum PointerEventType {
|
3165
3179
|
PET_UP = 0,
|
3166
3180
|
PET_DOWN = 1,
|
3167
3181
|
PET_HOVER_ENTER = 2,
|
@@ -3174,31 +3188,6 @@ export declare const PointerHoverFeedback: ComponentDefinition<ISchema<PBPointer
|
|
3174
3188
|
/** @public */
|
3175
3189
|
export declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
3176
3190
|
|
3177
|
-
/**
|
3178
|
-
* @public
|
3179
|
-
*/
|
3180
|
-
export declare type PreEngine = ReturnType<typeof preEngine>;
|
3181
|
-
|
3182
|
-
declare function preEngine(): {
|
3183
|
-
entityExists: (entity: Entity) => boolean;
|
3184
|
-
componentsDefinition: Map<number, ComponentDefinition<any, any>>;
|
3185
|
-
addEntity: (dynamic?: boolean) => Entity;
|
3186
|
-
addDynamicEntity: () => Entity;
|
3187
|
-
removeEntity: (entity: Entity) => boolean;
|
3188
|
-
addSystem: (fn: SystemFn, priority?: number, name?: string | undefined) => void;
|
3189
|
-
getSystems: () => {
|
3190
|
-
fn: SystemFn;
|
3191
|
-
priority: number;
|
3192
|
-
name?: string | undefined;
|
3193
|
-
}[];
|
3194
|
-
removeSystem: (selector: string | SystemFn) => boolean;
|
3195
|
-
defineComponent: <T extends Spec, ConstructorType = Partial<Result<T>>>(spec: T, componentId: number, constructorDefault?: ConstructorType | undefined) => ComponentDefinition<ISchema<Result<T>>, ConstructorType>;
|
3196
|
-
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>;
|
3197
|
-
getEntitiesWith: <T_2 extends [ComponentDefinition<ISchema<any>, any>, ...ComponentDefinition<ISchema<any>, any>[]]>(...components: T_2) => Iterable<[Entity, ...ReadonlyComponentSchema<T_2>]>;
|
3198
|
-
getComponent: <T_3 extends ISchema<any>>(componentId: number) => ComponentDefinition<T_3, EcsResult<T_3>>;
|
3199
|
-
removeComponentDefinition: (componentId: number) => void;
|
3200
|
-
};
|
3201
|
-
|
3202
3191
|
/**
|
3203
3192
|
* @public
|
3204
3193
|
* Quaternion is a type and a namespace.
|
@@ -3449,7 +3438,7 @@ export declare namespace Quaternion {
|
|
3449
3438
|
/**
|
3450
3439
|
* @public
|
3451
3440
|
*/
|
3452
|
-
declare type QuaternionType = {
|
3441
|
+
export declare type QuaternionType = {
|
3453
3442
|
x: number;
|
3454
3443
|
y: number;
|
3455
3444
|
z: number;
|
@@ -3466,17 +3455,17 @@ export declare const RAD2DEG: number;
|
|
3466
3455
|
export declare const Raycast: ComponentDefinition<ISchema<PBRaycast>, PBRaycast>;
|
3467
3456
|
|
3468
3457
|
/** Position will be relative to the scene */
|
3469
|
-
declare interface RaycastHit {
|
3470
|
-
position:
|
3471
|
-
origin:
|
3472
|
-
direction:
|
3473
|
-
normalHit:
|
3458
|
+
export declare interface RaycastHit {
|
3459
|
+
position: PBVector3 | undefined;
|
3460
|
+
origin: PBVector3 | undefined;
|
3461
|
+
direction: PBVector3 | undefined;
|
3462
|
+
normalHit: PBVector3 | undefined;
|
3474
3463
|
length: number;
|
3475
3464
|
meshName?: string | undefined;
|
3476
3465
|
entityId?: number | undefined;
|
3477
3466
|
}
|
3478
3467
|
|
3479
|
-
declare const enum RaycastQueryType {
|
3468
|
+
export declare const enum RaycastQueryType {
|
3480
3469
|
RQT_HIT_FIRST = 0,
|
3481
3470
|
RQT_QUERY_ALL = 1
|
3482
3471
|
}
|
@@ -3496,7 +3485,7 @@ export declare type ReadonlyComponentSchema<T extends [ComponentDefinition, ...C
|
|
3496
3485
|
*/
|
3497
3486
|
export declare type ReadonlyPrimitive = number | string | number[] | string[] | boolean | boolean[];
|
3498
3487
|
|
3499
|
-
declare type ReceiveMessage = {
|
3488
|
+
export declare type ReceiveMessage = {
|
3500
3489
|
type: WireMessage.Enum;
|
3501
3490
|
entity: Entity;
|
3502
3491
|
componentId: number;
|
@@ -3730,11 +3719,6 @@ export declare namespace Schemas {
|
|
3730
3719
|
const Optional: typeof IOptional;
|
3731
3720
|
}
|
3732
3721
|
|
3733
|
-
/**
|
3734
|
-
* @public
|
3735
|
-
*/
|
3736
|
-
export declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
|
3737
|
-
|
3738
3722
|
/**
|
3739
3723
|
* @public
|
3740
3724
|
*/
|
@@ -3749,7 +3733,7 @@ export declare type SystemFn = (dt: number) => void;
|
|
3749
3733
|
|
3750
3734
|
export declare type Task<T = unknown> = () => Promise<T>;
|
3751
3735
|
|
3752
|
-
declare const enum TextAlignMode {
|
3736
|
+
export declare const enum TextAlignMode {
|
3753
3737
|
TAM_TOP_LEFT = 0,
|
3754
3738
|
TAM_TOP_CENTER = 1,
|
3755
3739
|
TAM_TOP_RIGHT = 2,
|
@@ -3764,7 +3748,7 @@ declare const enum TextAlignMode {
|
|
3764
3748
|
/** @public */
|
3765
3749
|
export declare const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
|
3766
3750
|
|
3767
|
-
declare interface Texture {
|
3751
|
+
export declare interface Texture {
|
3768
3752
|
src: string;
|
3769
3753
|
/** default = TextureWrapMode.Clamp */
|
3770
3754
|
wrapMode?: TextureWrapMode | undefined;
|
@@ -3772,13 +3756,13 @@ declare interface Texture {
|
|
3772
3756
|
filterMode?: TextureFilterMode | undefined;
|
3773
3757
|
}
|
3774
3758
|
|
3775
|
-
declare const enum TextureFilterMode {
|
3759
|
+
export declare const enum TextureFilterMode {
|
3776
3760
|
TFM_POINT = 0,
|
3777
3761
|
TFM_BILINEAR = 1,
|
3778
3762
|
TFM_TRILINEAR = 2
|
3779
3763
|
}
|
3780
3764
|
|
3781
|
-
declare interface TextureUnion {
|
3765
|
+
export declare interface TextureUnion {
|
3782
3766
|
tex?: {
|
3783
3767
|
$case: 'texture';
|
3784
3768
|
texture: Texture;
|
@@ -3788,14 +3772,14 @@ declare interface TextureUnion {
|
|
3788
3772
|
};
|
3789
3773
|
}
|
3790
3774
|
|
3791
|
-
declare const enum TextureWrapMode {
|
3775
|
+
export declare const enum TextureWrapMode {
|
3792
3776
|
TWM_REPEAT = 0,
|
3793
3777
|
TWM_CLAMP = 1,
|
3794
3778
|
TWM_MIRROR = 2,
|
3795
3779
|
TWM_MIRROR_ONCE = 3
|
3796
3780
|
}
|
3797
3781
|
|
3798
|
-
declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
3782
|
+
export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
3799
3783
|
|
3800
3784
|
/** @public */
|
3801
3785
|
export declare const Transform: ComponentDefinition<ISchema<TransformType>, Partial<TransformType>>;
|
@@ -3803,7 +3787,7 @@ export declare const Transform: ComponentDefinition<ISchema<TransformType>, Part
|
|
3803
3787
|
/**
|
3804
3788
|
* @public
|
3805
3789
|
*/
|
3806
|
-
declare type TransformType = {
|
3790
|
+
export declare type TransformType = {
|
3807
3791
|
position: {
|
3808
3792
|
x: number;
|
3809
3793
|
y: number;
|
@@ -3835,8 +3819,6 @@ export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
|
3835
3819
|
/** @public */
|
3836
3820
|
export declare const UiBackground: ComponentDefinition<ISchema<PBUiBackground>, PBUiBackground>;
|
3837
3821
|
|
3838
|
-
declare type Uint32 = number;
|
3839
|
-
|
3840
3822
|
/** @public */
|
3841
3823
|
export declare const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
3842
3824
|
|
@@ -4442,16 +4424,10 @@ export declare namespace Vector3 {
|
|
4442
4424
|
export function Random(): MutableVector3;
|
4443
4425
|
}
|
4444
4426
|
|
4445
|
-
declare interface Vector3_2 {
|
4446
|
-
x: number;
|
4447
|
-
y: number;
|
4448
|
-
z: number;
|
4449
|
-
}
|
4450
|
-
|
4451
4427
|
/**
|
4452
4428
|
* @public
|
4453
4429
|
*/
|
4454
|
-
declare type Vector3Type = {
|
4430
|
+
export declare type Vector3Type = {
|
4455
4431
|
x: number;
|
4456
4432
|
y: number;
|
4457
4433
|
z: number;
|
@@ -4460,8 +4436,9 @@ declare type Vector3Type = {
|
|
4460
4436
|
/** @public */
|
4461
4437
|
export declare const VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
|
4462
4438
|
|
4463
|
-
declare namespace WireMessage {
|
4464
|
-
|
4439
|
+
export declare namespace WireMessage {
|
4440
|
+
export type Uint32 = number;
|
4441
|
+
export enum Enum {
|
4465
4442
|
RESERVED = 0,
|
4466
4443
|
PUT_COMPONENT = 1,
|
4467
4444
|
DELETE_COMPONENT = 2,
|
@@ -4471,7 +4448,7 @@ declare namespace WireMessage {
|
|
4471
4448
|
* @param length - Uint32 the length of all message (including the header)
|
4472
4449
|
* @param type - define the function which handles the data
|
4473
4450
|
*/
|
4474
|
-
type Header = {
|
4451
|
+
export type Header = {
|
4475
4452
|
length: Uint32;
|
4476
4453
|
type: Uint32;
|
4477
4454
|
};
|
@@ -4480,11 +4457,11 @@ declare namespace WireMessage {
|
|
4480
4457
|
* Validate if the message incoming is completed
|
4481
4458
|
* @param buf - ByteBuffer
|
4482
4459
|
*/
|
4483
|
-
function validate(buf: ByteBuffer): boolean;
|
4484
|
-
function readHeader(buf: ByteBuffer): Header | null;
|
4460
|
+
export function validate(buf: ByteBuffer): boolean;
|
4461
|
+
export function readHeader(buf: ByteBuffer): Header | null;
|
4485
4462
|
}
|
4486
4463
|
|
4487
|
-
declare const enum YGAlign {
|
4464
|
+
export declare const enum YGAlign {
|
4488
4465
|
YGA_AUTO = 0,
|
4489
4466
|
YGA_FLEX_START = 1,
|
4490
4467
|
YGA_CENTER = 2,
|
@@ -4495,25 +4472,37 @@ declare const enum YGAlign {
|
|
4495
4472
|
YGA_SPACE_AROUND = 7
|
4496
4473
|
}
|
4497
4474
|
|
4498
|
-
declare const enum YGDirection {
|
4475
|
+
export declare const enum YGDirection {
|
4499
4476
|
YGD_INHERIT = 0,
|
4500
4477
|
YGD_LTR = 1,
|
4501
4478
|
YGD_RTL = 2
|
4502
4479
|
}
|
4503
4480
|
|
4504
|
-
declare const enum YGDisplay {
|
4481
|
+
export declare const enum YGDisplay {
|
4505
4482
|
YGD_FLEX = 0,
|
4506
4483
|
YGD_NONE = 1
|
4507
4484
|
}
|
4508
4485
|
|
4509
|
-
declare const enum
|
4486
|
+
export declare const enum YGEdge {
|
4487
|
+
YGE_LEFT = 0,
|
4488
|
+
YGE_TOP = 1,
|
4489
|
+
YGE_RIGHT = 2,
|
4490
|
+
YGE_BOTTOM = 3,
|
4491
|
+
YGE_START = 4,
|
4492
|
+
YGE_END = 5,
|
4493
|
+
YGE_HORIZONTAL = 6,
|
4494
|
+
YGE_VERTICAL = 7,
|
4495
|
+
YGE_ALL = 8
|
4496
|
+
}
|
4497
|
+
|
4498
|
+
export declare const enum YGFlexDirection {
|
4510
4499
|
YGFD_COLUMN = 0,
|
4511
4500
|
YGFD_COLUMN_REVERSE = 1,
|
4512
4501
|
YGFD_ROW = 2,
|
4513
4502
|
YGFD_ROW_REVERSE = 3
|
4514
4503
|
}
|
4515
4504
|
|
4516
|
-
declare const enum YGJustify {
|
4505
|
+
export declare const enum YGJustify {
|
4517
4506
|
YGJ_FLEX_START = 0,
|
4518
4507
|
YGJ_CENTER = 1,
|
4519
4508
|
YGJ_FLEX_END = 2,
|
@@ -4522,26 +4511,26 @@ declare const enum YGJustify {
|
|
4522
4511
|
YGJ_SPACE_EVENLY = 5
|
4523
4512
|
}
|
4524
4513
|
|
4525
|
-
declare const enum YGOverflow {
|
4514
|
+
export declare const enum YGOverflow {
|
4526
4515
|
YGO_VISIBLE = 0,
|
4527
4516
|
YGO_HIDDEN = 1,
|
4528
4517
|
YGO_SCROLL = 2
|
4529
4518
|
}
|
4530
4519
|
|
4531
|
-
declare const enum YGPositionType {
|
4520
|
+
export declare const enum YGPositionType {
|
4532
4521
|
YGPT_STATIC = 0,
|
4533
4522
|
YGPT_RELATIVE = 1,
|
4534
4523
|
YGPT_ABSOLUTE = 2
|
4535
4524
|
}
|
4536
4525
|
|
4537
|
-
declare const enum YGUnit {
|
4526
|
+
export declare const enum YGUnit {
|
4538
4527
|
YGU_UNDEFINED = 0,
|
4539
4528
|
YGU_POINT = 1,
|
4540
4529
|
YGU_PERCENT = 2,
|
4541
4530
|
YGU_AUTO = 3
|
4542
4531
|
}
|
4543
4532
|
|
4544
|
-
declare const enum YGWrap {
|
4533
|
+
export declare const enum YGWrap {
|
4545
4534
|
YGW_NO_WRAP = 0,
|
4546
4535
|
YGW_WRAP = 1,
|
4547
4536
|
YGW_WRAP_REVERSE = 2
|