@dcl/sdk 7.0.0-3445306719.commit-c9822af → 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 +417 -409
- package/dist/ecs7/index.js +350 -148
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/material.proto +35 -21
- package/dist/playground/snippets/billboard.ts +9 -4
- package/dist/playground/snippets/material.ts +29 -14
- package/package.json +5 -5
- package/types/ecs7/index.d.ts +336 -328
package/types/ecs7/index.d.ts
CHANGED
@@ -92,7 +92,109 @@ declare const enum BillboardMode {
|
|
92
92
|
/**
|
93
93
|
* @public
|
94
94
|
*/
|
95
|
-
declare type ByteBuffer =
|
95
|
+
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
|
declare const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
|
@@ -459,12 +561,6 @@ 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
|
*/
|
@@ -812,13 +908,6 @@ 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
|
*/
|
@@ -1021,144 +1110,6 @@ declare type ComponentSchema<T extends [ComponentDefinition, ...ComponentDefinit
|
|
1021
1110
|
*/
|
1022
1111
|
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 @@ declare type DeepReadonlyObject<T> = {
|
|
1198
1149
|
*/
|
1199
1150
|
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
1200
1151
|
|
1201
|
-
declare function
|
1152
|
+
declare function defineComponent<T extends ISchema, ConstructorType = ComponentType<T>>(componentId: number, spec: T, constructorDefault?: ConstructorType): ComponentDefinition<T, ConstructorType>;
|
1153
|
+
|
1154
|
+
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
|
+
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>;
|
@@ -1448,7 +1428,7 @@ 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
|
/**
|
@@ -1563,7 +1543,7 @@ declare const enum MaterialTransparencyMode {
|
|
1563
1543
|
* @public
|
1564
1544
|
*/
|
1565
1545
|
declare namespace Matrix {
|
1566
|
-
type Matrix4x4 = [
|
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 */
|
@@ -2659,6 +2639,10 @@ declare interface PBAnimationState {
|
|
2659
2639
|
shouldReset?: boolean | undefined;
|
2660
2640
|
}
|
2661
2641
|
|
2642
|
+
declare interface PBAnimator {
|
2643
|
+
states: PBAnimationState[];
|
2644
|
+
}
|
2645
|
+
|
2662
2646
|
declare interface PBAudioSource {
|
2663
2647
|
playing?: boolean | undefined;
|
2664
2648
|
/** default=1.0f */
|
@@ -2682,7 +2666,7 @@ declare interface PBAvatarAttach {
|
|
2682
2666
|
}
|
2683
2667
|
|
2684
2668
|
declare interface PBAvatarModifierArea {
|
2685
|
-
area:
|
2669
|
+
area: PBVector3 | undefined;
|
2686
2670
|
excludeIds: string[];
|
2687
2671
|
modifiers: AvatarModifierType[];
|
2688
2672
|
}
|
@@ -2694,11 +2678,11 @@ declare interface PBAvatarShape {
|
|
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;
|
@@ -2729,16 +2713,39 @@ declare interface PBCameraMode {
|
|
2729
2713
|
}
|
2730
2714
|
|
2731
2715
|
declare interface PBCameraModeArea {
|
2732
|
-
area:
|
2716
|
+
area: PBVector3 | undefined;
|
2733
2717
|
mode: CameraType;
|
2734
2718
|
}
|
2735
2719
|
|
2720
|
+
declare interface PBColor3 {
|
2721
|
+
r: number;
|
2722
|
+
g: number;
|
2723
|
+
b: number;
|
2724
|
+
}
|
2725
|
+
|
2726
|
+
declare interface PBColor4 {
|
2727
|
+
r: number;
|
2728
|
+
g: number;
|
2729
|
+
b: number;
|
2730
|
+
a: number;
|
2731
|
+
}
|
2732
|
+
|
2736
2733
|
declare interface PBGltfContainer {
|
2737
2734
|
/** which file to load */
|
2738
2735
|
src: string;
|
2739
2736
|
}
|
2740
2737
|
|
2741
2738
|
declare interface PBMaterial {
|
2739
|
+
material?: {
|
2740
|
+
$case: 'unlit';
|
2741
|
+
unlit: PBMaterial_UnlitMaterial;
|
2742
|
+
} | {
|
2743
|
+
$case: 'pbr';
|
2744
|
+
pbr: PBMaterial_PbrMaterial;
|
2745
|
+
};
|
2746
|
+
}
|
2747
|
+
|
2748
|
+
declare interface PBMaterial_PbrMaterial {
|
2742
2749
|
/** default = null */
|
2743
2750
|
texture?: TextureUnion | undefined;
|
2744
2751
|
/** default = 0.5. range value: from 0 to 1 */
|
@@ -2752,11 +2759,11 @@ declare interface PBMaterial {
|
|
2752
2759
|
/** default = null */
|
2753
2760
|
bumpTexture?: TextureUnion | undefined;
|
2754
2761
|
/** default = white; */
|
2755
|
-
albedoColor?:
|
2762
|
+
albedoColor?: PBColor3 | undefined;
|
2756
2763
|
/** default = black; */
|
2757
|
-
emissiveColor?:
|
2764
|
+
emissiveColor?: PBColor3 | undefined;
|
2758
2765
|
/** default = white; */
|
2759
|
-
reflectivityColor?:
|
2766
|
+
reflectivityColor?: PBColor3 | undefined;
|
2760
2767
|
/** default = TransparencyMode.Auto */
|
2761
2768
|
transparencyMode?: MaterialTransparencyMode | undefined;
|
2762
2769
|
/** default = 0.5 */
|
@@ -2773,6 +2780,15 @@ declare interface PBMaterial {
|
|
2773
2780
|
directIntensity?: number | undefined;
|
2774
2781
|
}
|
2775
2782
|
|
2783
|
+
declare interface PBMaterial_UnlitMaterial {
|
2784
|
+
/** default = null */
|
2785
|
+
texture?: TextureUnion | undefined;
|
2786
|
+
/** default = 0.5. range value: from 0 to 1 */
|
2787
|
+
alphaTest?: number | undefined;
|
2788
|
+
/** default = true */
|
2789
|
+
castShadows?: boolean | undefined;
|
2790
|
+
}
|
2791
|
+
|
2776
2792
|
declare interface PBMeshCollider {
|
2777
2793
|
/** default = ColliderLayer.Physics | ColliderLayer.Pointer */
|
2778
2794
|
collisionMask?: number | undefined;
|
@@ -2846,7 +2862,7 @@ declare interface PBNftShape {
|
|
2846
2862
|
/** default = PictureFrameStyle.Classic */
|
2847
2863
|
style?: NftFrameType | undefined;
|
2848
2864
|
/** default = decentraland.common.Color3(0.6404918, 0.611472, 0.8584906) */
|
2849
|
-
color?:
|
2865
|
+
color?: PBColor3 | undefined;
|
2850
2866
|
}
|
2851
2867
|
|
2852
2868
|
/** the renderer will set this component to the root entity once per frame with all the events */
|
@@ -2891,18 +2907,24 @@ declare interface PBPointerLock {
|
|
2891
2907
|
isPointerLocked: boolean;
|
2892
2908
|
}
|
2893
2909
|
|
2910
|
+
declare interface PBPosition {
|
2911
|
+
x: number;
|
2912
|
+
y: number;
|
2913
|
+
z: number;
|
2914
|
+
}
|
2915
|
+
|
2894
2916
|
declare interface PBRaycast {
|
2895
2917
|
timestamp: number;
|
2896
|
-
origin:
|
2897
|
-
direction:
|
2918
|
+
origin: PBVector3 | undefined;
|
2919
|
+
direction: PBVector3 | undefined;
|
2898
2920
|
maxDistance: number;
|
2899
2921
|
queryType: RaycastQueryType;
|
2900
2922
|
}
|
2901
2923
|
|
2902
2924
|
declare interface PBRaycastResult {
|
2903
2925
|
timestamp: number;
|
2904
|
-
origin:
|
2905
|
-
direction:
|
2926
|
+
origin: PBVector3 | undefined;
|
2927
|
+
direction: PBVector3 | undefined;
|
2906
2928
|
hits: RaycastHit[];
|
2907
2929
|
}
|
2908
2930
|
|
@@ -2931,22 +2953,22 @@ declare interface PBTextShape {
|
|
2931
2953
|
shadowOffsetY?: number | undefined;
|
2932
2954
|
outlineWidth?: number | undefined;
|
2933
2955
|
/** default=(1.0,1.0,1.0) */
|
2934
|
-
shadowColor?:
|
2956
|
+
shadowColor?: PBColor3 | undefined;
|
2935
2957
|
/** default=(1.0,1.0,1.0) */
|
2936
|
-
outlineColor?:
|
2958
|
+
outlineColor?: PBColor3 | undefined;
|
2937
2959
|
/** default=(1.0,1.0,1.0) */
|
2938
|
-
textColor?:
|
2960
|
+
textColor?: PBColor4 | undefined;
|
2939
2961
|
}
|
2940
2962
|
|
2941
2963
|
declare interface PBUiBackground {
|
2942
2964
|
/** default=(0.0, 0.0, 0.0, 0.0) */
|
2943
|
-
backgroundColor?:
|
2965
|
+
backgroundColor?: PBColor4 | undefined;
|
2944
2966
|
}
|
2945
2967
|
|
2946
2968
|
declare interface PBUiText {
|
2947
2969
|
value: string;
|
2948
2970
|
/** default=(1.0,1.0,1.0) */
|
2949
|
-
color?:
|
2971
|
+
color?: PBColor3 | undefined;
|
2950
2972
|
/** default='center' */
|
2951
2973
|
textAlign?: TextAlignMode | undefined;
|
2952
2974
|
/** default=0 */
|
@@ -3016,6 +3038,17 @@ declare interface PBUiTransform {
|
|
3016
3038
|
borderBottom: number;
|
3017
3039
|
}
|
3018
3040
|
|
3041
|
+
declare interface PBVector2 {
|
3042
|
+
x: number;
|
3043
|
+
y: number;
|
3044
|
+
}
|
3045
|
+
|
3046
|
+
declare interface PBVector3 {
|
3047
|
+
x: number;
|
3048
|
+
y: number;
|
3049
|
+
z: number;
|
3050
|
+
}
|
3051
|
+
|
3019
3052
|
declare interface PBVisibilityComponent {
|
3020
3053
|
/** default=true */
|
3021
3054
|
visible?: boolean | undefined;
|
@@ -3026,7 +3059,7 @@ declare interface PBVisibilityComponent {
|
|
3026
3059
|
* @public
|
3027
3060
|
*/
|
3028
3061
|
declare namespace Plane {
|
3029
|
-
type MutablePlane = {
|
3062
|
+
export type MutablePlane = {
|
3030
3063
|
/**
|
3031
3064
|
* Normal of the plane (a,b,c)
|
3032
3065
|
*/
|
@@ -3036,7 +3069,7 @@ declare namespace Plane {
|
|
3036
3069
|
*/
|
3037
3070
|
d: number;
|
3038
3071
|
};
|
3039
|
-
type ReadonlyPlane = {
|
3072
|
+
export type ReadonlyPlane = {
|
3040
3073
|
/**
|
3041
3074
|
* Normal of the plane (a,b,c)
|
3042
3075
|
*/
|
@@ -3053,7 +3086,7 @@ declare namespace Plane {
|
|
3053
3086
|
* @param c - c component of the plane
|
3054
3087
|
* @param d - d component of the plane
|
3055
3088
|
*/
|
3056
|
-
function create(a: number, b: number, c: number, d: number): {
|
3089
|
+
export function create(a: number, b: number, c: number, d: number): {
|
3057
3090
|
normal: Vector3.MutableVector3;
|
3058
3091
|
d: number;
|
3059
3092
|
};
|
@@ -3062,7 +3095,7 @@ declare namespace Plane {
|
|
3062
3095
|
* @param array - the array to create a plane from
|
3063
3096
|
* @returns a new Plane from the given array.
|
3064
3097
|
*/
|
3065
|
-
function fromArray(array: number[]): MutablePlane;
|
3098
|
+
export function fromArray(array: number[]): MutablePlane;
|
3066
3099
|
/**
|
3067
3100
|
* Creates a plane from three points
|
3068
3101
|
* @param point1 - point used to create the plane
|
@@ -3070,7 +3103,7 @@ declare namespace Plane {
|
|
3070
3103
|
* @param point3 - point used to create the plane
|
3071
3104
|
* @returns a new Plane defined by the three given points.
|
3072
3105
|
*/
|
3073
|
-
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;
|
3074
3107
|
/**
|
3075
3108
|
* Creates a plane from an origin point and a normal
|
3076
3109
|
* @param origin - origin of the plane to be constructed
|
@@ -3078,7 +3111,7 @@ declare namespace Plane {
|
|
3078
3111
|
* @returns a new Plane the normal vector to this plane at the given origin point.
|
3079
3112
|
* Note : the vector "normal" is updated because normalized.
|
3080
3113
|
*/
|
3081
|
-
function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
|
3114
|
+
export function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
|
3082
3115
|
/**
|
3083
3116
|
* Calculates the distance from a plane and a point
|
3084
3117
|
* @param origin - origin of the plane to be constructed
|
@@ -3086,36 +3119,36 @@ declare namespace Plane {
|
|
3086
3119
|
* @param point - point to calculate distance to
|
3087
3120
|
* @returns the signed distance between the plane defined by the normal vector at the "origin"" point and the given other point.
|
3088
3121
|
*/
|
3089
|
-
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;
|
3090
3123
|
/**
|
3091
3124
|
* @returns the plane coordinates as a new array of 4 elements [a, b, c, d].
|
3092
3125
|
*/
|
3093
|
-
function asArray(plane: ReadonlyPlane): number[];
|
3126
|
+
export function asArray(plane: ReadonlyPlane): number[];
|
3094
3127
|
/**
|
3095
3128
|
* @returns a new plane copied from the current Plane.
|
3096
3129
|
*/
|
3097
|
-
function clone(plane: ReadonlyPlane): MutablePlane;
|
3130
|
+
export function clone(plane: ReadonlyPlane): MutablePlane;
|
3098
3131
|
/**
|
3099
3132
|
* @returns the Plane hash code.
|
3100
3133
|
*/
|
3101
|
-
function getHashCode(_plane: ReadonlyPlane): number;
|
3134
|
+
export function getHashCode(_plane: ReadonlyPlane): number;
|
3102
3135
|
/**
|
3103
3136
|
* Normalize the current Plane in place.
|
3104
3137
|
* @returns the updated Plane.
|
3105
3138
|
*/
|
3106
|
-
function normalize(plane: ReadonlyPlane): MutablePlane;
|
3139
|
+
export function normalize(plane: ReadonlyPlane): MutablePlane;
|
3107
3140
|
/**
|
3108
3141
|
* Applies a transformation the plane and returns the result
|
3109
3142
|
* @param transformation - the transformation matrix to be applied to the plane
|
3110
3143
|
* @returns a new Plane as the result of the transformation of the current Plane by the given matrix.
|
3111
3144
|
*/
|
3112
|
-
function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
|
3145
|
+
export function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
|
3113
3146
|
/**
|
3114
3147
|
* Calcualtte the dot product between the point and the plane normal
|
3115
3148
|
* @param point - point to calculate the dot product with
|
3116
3149
|
* @returns the dot product (float) of the point coordinates and the plane normal.
|
3117
3150
|
*/
|
3118
|
-
function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3151
|
+
export function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3119
3152
|
/**
|
3120
3153
|
* Updates the current Plane from the plane defined by the three given points.
|
3121
3154
|
* @param point1 - one of the points used to contruct the plane
|
@@ -3123,20 +3156,20 @@ declare namespace Plane {
|
|
3123
3156
|
* @param point3 - one of the points used to contruct the plane
|
3124
3157
|
* @returns the updated Plane.
|
3125
3158
|
*/
|
3126
|
-
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;
|
3127
3160
|
/**
|
3128
3161
|
* Checks if the plane is facing a given direction
|
3129
3162
|
* @param direction - the direction to check if the plane is facing
|
3130
3163
|
* @param epsilon - value the dot product is compared against (returns true if dot <= epsilon)
|
3131
3164
|
* @returns True is the vector "direction" is the same side than the plane normal.
|
3132
3165
|
*/
|
3133
|
-
function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
|
3166
|
+
export function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
|
3134
3167
|
/**
|
3135
3168
|
* Calculates the distance to a point
|
3136
3169
|
* @param point - point to calculate distance to
|
3137
3170
|
* @returns the signed distance (float) from the given point to the Plane.
|
3138
3171
|
*/
|
3139
|
-
function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3172
|
+
export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
|
3140
3173
|
}
|
3141
3174
|
|
3142
3175
|
/** @public */
|
@@ -3155,31 +3188,6 @@ declare const PointerHoverFeedback: ComponentDefinition<ISchema<PBPointerHoverFe
|
|
3155
3188
|
/** @public */
|
3156
3189
|
declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
|
3157
3190
|
|
3158
|
-
/**
|
3159
|
-
* @public
|
3160
|
-
*/
|
3161
|
-
declare type PreEngine = ReturnType<typeof preEngine>;
|
3162
|
-
|
3163
|
-
declare function preEngine(): {
|
3164
|
-
entityExists: (entity: Entity) => boolean;
|
3165
|
-
componentsDefinition: Map<number, ComponentDefinition<any, any>>;
|
3166
|
-
addEntity: (dynamic?: boolean) => Entity;
|
3167
|
-
addDynamicEntity: () => Entity;
|
3168
|
-
removeEntity: (entity: Entity) => boolean;
|
3169
|
-
addSystem: (fn: SystemFn, priority?: number, name?: string | undefined) => void;
|
3170
|
-
getSystems: () => {
|
3171
|
-
fn: SystemFn;
|
3172
|
-
priority: number;
|
3173
|
-
name?: string | undefined;
|
3174
|
-
}[];
|
3175
|
-
removeSystem: (selector: string | SystemFn) => boolean;
|
3176
|
-
defineComponent: <T extends Spec, ConstructorType = Partial<Result<T>>>(spec: T, componentId: number, constructorDefault?: ConstructorType | undefined) => ComponentDefinition<ISchema<Result<T>>, ConstructorType>;
|
3177
|
-
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>;
|
3178
|
-
getEntitiesWith: <T_2 extends [ComponentDefinition<ISchema<any>, any>, ...ComponentDefinition<ISchema<any>, any>[]]>(...components: T_2) => Iterable<[Entity, ...ReadonlyComponentSchema<T_2>]>;
|
3179
|
-
getComponent: <T_3 extends ISchema<any>>(componentId: number) => ComponentDefinition<T_3, EcsResult<T_3>>;
|
3180
|
-
removeComponentDefinition: (componentId: number) => void;
|
3181
|
-
};
|
3182
|
-
|
3183
3191
|
/**
|
3184
3192
|
* @public
|
3185
3193
|
* Quaternion is a type and a namespace.
|
@@ -3448,10 +3456,10 @@ declare const Raycast: ComponentDefinition<ISchema<PBRaycast>, PBRaycast>;
|
|
3448
3456
|
|
3449
3457
|
/** Position will be relative to the scene */
|
3450
3458
|
declare interface RaycastHit {
|
3451
|
-
position:
|
3452
|
-
origin:
|
3453
|
-
direction:
|
3454
|
-
normalHit:
|
3459
|
+
position: PBVector3 | undefined;
|
3460
|
+
origin: PBVector3 | undefined;
|
3461
|
+
direction: PBVector3 | undefined;
|
3462
|
+
normalHit: PBVector3 | undefined;
|
3455
3463
|
length: number;
|
3456
3464
|
meshName?: string | undefined;
|
3457
3465
|
entityId?: number | undefined;
|
@@ -3711,11 +3719,6 @@ declare namespace Schemas {
|
|
3711
3719
|
const Optional: typeof IOptional;
|
3712
3720
|
}
|
3713
3721
|
|
3714
|
-
/**
|
3715
|
-
* @public
|
3716
|
-
*/
|
3717
|
-
declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
|
3718
|
-
|
3719
3722
|
/**
|
3720
3723
|
* @public
|
3721
3724
|
*/
|
@@ -3816,8 +3819,6 @@ declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
|
3816
3819
|
/** @public */
|
3817
3820
|
declare const UiBackground: ComponentDefinition<ISchema<PBUiBackground>, PBUiBackground>;
|
3818
3821
|
|
3819
|
-
declare type Uint32 = number;
|
3820
|
-
|
3821
3822
|
/** @public */
|
3822
3823
|
declare const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
|
3823
3824
|
|
@@ -4423,12 +4424,6 @@ declare namespace Vector3 {
|
|
4423
4424
|
export function Random(): MutableVector3;
|
4424
4425
|
}
|
4425
4426
|
|
4426
|
-
declare interface Vector3_2 {
|
4427
|
-
x: number;
|
4428
|
-
y: number;
|
4429
|
-
z: number;
|
4430
|
-
}
|
4431
|
-
|
4432
4427
|
/**
|
4433
4428
|
* @public
|
4434
4429
|
*/
|
@@ -4442,7 +4437,8 @@ declare type Vector3Type = {
|
|
4442
4437
|
declare const VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
|
4443
4438
|
|
4444
4439
|
declare namespace WireMessage {
|
4445
|
-
|
4440
|
+
export type Uint32 = number;
|
4441
|
+
export enum Enum {
|
4446
4442
|
RESERVED = 0,
|
4447
4443
|
PUT_COMPONENT = 1,
|
4448
4444
|
DELETE_COMPONENT = 2,
|
@@ -4452,7 +4448,7 @@ declare namespace WireMessage {
|
|
4452
4448
|
* @param length - Uint32 the length of all message (including the header)
|
4453
4449
|
* @param type - define the function which handles the data
|
4454
4450
|
*/
|
4455
|
-
type Header = {
|
4451
|
+
export type Header = {
|
4456
4452
|
length: Uint32;
|
4457
4453
|
type: Uint32;
|
4458
4454
|
};
|
@@ -4461,8 +4457,8 @@ declare namespace WireMessage {
|
|
4461
4457
|
* Validate if the message incoming is completed
|
4462
4458
|
* @param buf - ByteBuffer
|
4463
4459
|
*/
|
4464
|
-
function validate(buf: ByteBuffer): boolean;
|
4465
|
-
function readHeader(buf: ByteBuffer): Header | null;
|
4460
|
+
export function validate(buf: ByteBuffer): boolean;
|
4461
|
+
export function readHeader(buf: ByteBuffer): Header | null;
|
4466
4462
|
}
|
4467
4463
|
|
4468
4464
|
declare const enum YGAlign {
|
@@ -4487,6 +4483,18 @@ declare const enum YGDisplay {
|
|
4487
4483
|
YGD_NONE = 1
|
4488
4484
|
}
|
4489
4485
|
|
4486
|
+
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
|
+
|
4490
4498
|
declare const enum YGFlexDirection {
|
4491
4499
|
YGFD_COLUMN = 0,
|
4492
4500
|
YGFD_COLUMN_REVERSE = 1,
|