@dcl/sdk 7.0.0-3469489430.commit-9c7979a → 7.0.0-3482345038.commit-6d0f818

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,7 +92,109 @@ declare const enum BillboardMode {
92
92
  /**
93
93
  * @public
94
94
  */
95
- declare type ByteBuffer = ReturnType<typeof createByteBuffer>;
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 defineSdkComponents(engine: PreEngine): {
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: SdkComponents;
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: Vector3_2 | undefined;
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?: Color3_2 | undefined;
2681
+ skinColor?: PBColor3 | undefined;
2698
2682
  /** default = decentraland.common.Color3(R = 0.283f, G = 0.142f, B = 0f) */
2699
- hairColor?: Color3_2 | undefined;
2683
+ hairColor?: PBColor3 | undefined;
2700
2684
  /** default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f) */
2701
- eyeColor?: Color3_2 | undefined;
2685
+ eyeColor?: PBColor3 | undefined;
2702
2686
  expressionTriggerId?: string | undefined;
2703
2687
  /** default = timestamp */
2704
2688
  expressionTriggerTimestamp?: number | undefined;
@@ -2729,10 +2713,23 @@ declare interface PBCameraMode {
2729
2713
  }
2730
2714
 
2731
2715
  declare interface PBCameraModeArea {
2732
- area: Vector3_2 | undefined;
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;
@@ -2762,11 +2759,11 @@ declare interface PBMaterial_PbrMaterial {
2762
2759
  /** default = null */
2763
2760
  bumpTexture?: TextureUnion | undefined;
2764
2761
  /** default = white; */
2765
- albedoColor?: Color3_2 | undefined;
2762
+ albedoColor?: PBColor3 | undefined;
2766
2763
  /** default = black; */
2767
- emissiveColor?: Color3_2 | undefined;
2764
+ emissiveColor?: PBColor3 | undefined;
2768
2765
  /** default = white; */
2769
- reflectivityColor?: Color3_2 | undefined;
2766
+ reflectivityColor?: PBColor3 | undefined;
2770
2767
  /** default = TransparencyMode.Auto */
2771
2768
  transparencyMode?: MaterialTransparencyMode | undefined;
2772
2769
  /** default = 0.5 */
@@ -2865,7 +2862,7 @@ declare interface PBNftShape {
2865
2862
  /** default = PictureFrameStyle.Classic */
2866
2863
  style?: NftFrameType | undefined;
2867
2864
  /** default = decentraland.common.Color3(0.6404918, 0.611472, 0.8584906) */
2868
- color?: Color3_2 | undefined;
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 */
@@ -2910,18 +2907,24 @@ declare interface PBPointerLock {
2910
2907
  isPointerLocked: boolean;
2911
2908
  }
2912
2909
 
2910
+ declare interface PBPosition {
2911
+ x: number;
2912
+ y: number;
2913
+ z: number;
2914
+ }
2915
+
2913
2916
  declare interface PBRaycast {
2914
2917
  timestamp: number;
2915
- origin: Vector3_2 | undefined;
2916
- direction: Vector3_2 | undefined;
2918
+ origin: PBVector3 | undefined;
2919
+ direction: PBVector3 | undefined;
2917
2920
  maxDistance: number;
2918
2921
  queryType: RaycastQueryType;
2919
2922
  }
2920
2923
 
2921
2924
  declare interface PBRaycastResult {
2922
2925
  timestamp: number;
2923
- origin: Vector3_2 | undefined;
2924
- direction: Vector3_2 | undefined;
2926
+ origin: PBVector3 | undefined;
2927
+ direction: PBVector3 | undefined;
2925
2928
  hits: RaycastHit[];
2926
2929
  }
2927
2930
 
@@ -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?: Color3_2 | undefined;
2956
+ shadowColor?: PBColor3 | undefined;
2954
2957
  /** default=(1.0,1.0,1.0) */
2955
- outlineColor?: Color3_2 | undefined;
2958
+ outlineColor?: PBColor3 | undefined;
2956
2959
  /** default=(1.0,1.0,1.0) */
2957
- textColor?: Color4_2 | undefined;
2960
+ textColor?: PBColor4 | undefined;
2958
2961
  }
2959
2962
 
2960
2963
  declare interface PBUiBackground {
2961
2964
  /** default=(0.0, 0.0, 0.0, 0.0) */
2962
- backgroundColor?: Color4_2 | undefined;
2965
+ backgroundColor?: PBColor4 | undefined;
2963
2966
  }
2964
2967
 
2965
2968
  declare interface PBUiText {
2966
2969
  value: string;
2967
2970
  /** default=(1.0,1.0,1.0) */
2968
- color?: Color3_2 | undefined;
2971
+ color?: PBColor3 | undefined;
2969
2972
  /** default='center' */
2970
2973
  textAlign?: TextAlignMode | undefined;
2971
2974
  /** default=0 */
@@ -2977,62 +2980,95 @@ declare interface PBUiText {
2977
2980
  declare interface PBUiTransform {
2978
2981
  parent: number;
2979
2982
  rightOf: number;
2983
+ /** default: YGAlign.YGA_FLEX_START */
2984
+ alignContent?: YGAlign | undefined;
2985
+ /** default: YGAlign.YGA_STRETCH */
2986
+ alignItems?: YGAlign | undefined;
2987
+ /** default: YGWrap.YGW_WRAP */
2988
+ flexWrap?: YGWrap | undefined;
2989
+ /** default: 1 */
2990
+ flexShrink?: number | undefined;
2991
+ /** YGPositionType.YGPT_RELATIVE */
2980
2992
  positionType: YGPositionType;
2981
- alignContent: YGAlign;
2982
- alignItems: YGAlign;
2993
+ /** YGAlign.YGA_AUTO */
2983
2994
  alignSelf: YGAlign;
2995
+ /** YGFlexDirection.YGFD_ROW */
2984
2996
  flexDirection: YGFlexDirection;
2985
- flexWrap: YGWrap;
2997
+ /** YGJustify.YGJ_FLEX_START */
2986
2998
  justifyContent: YGJustify;
2999
+ /** YGOverflow.YGO_VISIBLE */
2987
3000
  overflow: YGOverflow;
3001
+ /** YGDisplay.YGD_FLEX */
2988
3002
  display: YGDisplay;
2989
- direction: YGDirection;
2990
- flex: number;
3003
+ /** YGUnit.YGU_UNDEFINED */
2991
3004
  flexBasisUnit: YGUnit;
2992
3005
  flexBasis: number;
2993
3006
  flexGrow: number;
2994
- flexShrink: number;
3007
+ /** YGUnit.YGU_UNDEFINED */
2995
3008
  widthUnit: YGUnit;
2996
3009
  width: number;
3010
+ /** YGUnit.YGU_UNDEFINED */
2997
3011
  heightUnit: YGUnit;
2998
3012
  height: number;
3013
+ /** YGUnit.YGU_UNDEFINED */
2999
3014
  minWidthUnit: YGUnit;
3000
3015
  minWidth: number;
3016
+ /** YGUnit.YGU_UNDEFINED */
3001
3017
  minHeightUnit: YGUnit;
3002
3018
  minHeight: number;
3019
+ /** YGUnit.YGU_UNDEFINED */
3003
3020
  maxWidthUnit: YGUnit;
3004
3021
  maxWidth: number;
3022
+ /** YGUnit.YGU_UNDEFINED */
3005
3023
  maxHeightUnit: YGUnit;
3006
3024
  maxHeight: number;
3025
+ /** YGUnit.YGU_UNDEFINED */
3007
3026
  positionLeftUnit: YGUnit;
3008
3027
  positionLeft: number;
3028
+ /** YGUnit.YGU_UNDEFINED */
3009
3029
  positionTopUnit: YGUnit;
3010
3030
  positionTop: number;
3031
+ /** YGUnit.YGU_UNDEFINED */
3011
3032
  positionRightUnit: YGUnit;
3012
3033
  positionRight: number;
3034
+ /** YGUnit.YGU_UNDEFINED */
3013
3035
  positionBottomUnit: YGUnit;
3014
3036
  positionBottom: number;
3015
- /** margin */
3037
+ /** YGUnit.YGU_UNDEFINED */
3016
3038
  marginLeftUnit: YGUnit;
3017
3039
  marginLeft: number;
3040
+ /** YGUnit.YGU_UNDEFINED */
3018
3041
  marginTopUnit: YGUnit;
3019
3042
  marginTop: number;
3043
+ /** YGUnit.YGU_UNDEFINED */
3020
3044
  marginRightUnit: YGUnit;
3021
3045
  marginRight: number;
3046
+ /** YGUnit.YGU_UNDEFINED */
3022
3047
  marginBottomUnit: YGUnit;
3023
3048
  marginBottom: number;
3049
+ /** YGUnit.YGU_UNDEFINED */
3024
3050
  paddingLeftUnit: YGUnit;
3025
3051
  paddingLeft: number;
3052
+ /** YGUnit.YGU_UNDEFINED */
3026
3053
  paddingTopUnit: YGUnit;
3027
3054
  paddingTop: number;
3055
+ /** YGUnit.YGU_UNDEFINED */
3028
3056
  paddingRightUnit: YGUnit;
3029
3057
  paddingRight: number;
3058
+ /** YGUnit.YGU_UNDEFINED */
3030
3059
  paddingBottomUnit: YGUnit;
3031
3060
  paddingBottom: number;
3032
- borderLeft: number;
3033
- borderTop: number;
3034
- borderRight: number;
3035
- borderBottom: number;
3061
+ }
3062
+
3063
+ declare interface PBVector2 {
3064
+ x: number;
3065
+ y: number;
3066
+ }
3067
+
3068
+ declare interface PBVector3 {
3069
+ x: number;
3070
+ y: number;
3071
+ z: number;
3036
3072
  }
3037
3073
 
3038
3074
  declare interface PBVisibilityComponent {
@@ -3045,7 +3081,7 @@ declare interface PBVisibilityComponent {
3045
3081
  * @public
3046
3082
  */
3047
3083
  declare namespace Plane {
3048
- type MutablePlane = {
3084
+ export type MutablePlane = {
3049
3085
  /**
3050
3086
  * Normal of the plane (a,b,c)
3051
3087
  */
@@ -3055,7 +3091,7 @@ declare namespace Plane {
3055
3091
  */
3056
3092
  d: number;
3057
3093
  };
3058
- type ReadonlyPlane = {
3094
+ export type ReadonlyPlane = {
3059
3095
  /**
3060
3096
  * Normal of the plane (a,b,c)
3061
3097
  */
@@ -3072,7 +3108,7 @@ declare namespace Plane {
3072
3108
  * @param c - c component of the plane
3073
3109
  * @param d - d component of the plane
3074
3110
  */
3075
- function create(a: number, b: number, c: number, d: number): {
3111
+ export function create(a: number, b: number, c: number, d: number): {
3076
3112
  normal: Vector3.MutableVector3;
3077
3113
  d: number;
3078
3114
  };
@@ -3081,7 +3117,7 @@ declare namespace Plane {
3081
3117
  * @param array - the array to create a plane from
3082
3118
  * @returns a new Plane from the given array.
3083
3119
  */
3084
- function fromArray(array: number[]): MutablePlane;
3120
+ export function fromArray(array: number[]): MutablePlane;
3085
3121
  /**
3086
3122
  * Creates a plane from three points
3087
3123
  * @param point1 - point used to create the plane
@@ -3089,7 +3125,7 @@ declare namespace Plane {
3089
3125
  * @param point3 - point used to create the plane
3090
3126
  * @returns a new Plane defined by the three given points.
3091
3127
  */
3092
- function fromPoints(_point1: Vector3.ReadonlyVector3, _point2: Vector3.ReadonlyVector3, _point3: Vector3.ReadonlyVector3): MutablePlane;
3128
+ export function fromPoints(_point1: Vector3.ReadonlyVector3, _point2: Vector3.ReadonlyVector3, _point3: Vector3.ReadonlyVector3): MutablePlane;
3093
3129
  /**
3094
3130
  * Creates a plane from an origin point and a normal
3095
3131
  * @param origin - origin of the plane to be constructed
@@ -3097,7 +3133,7 @@ declare namespace Plane {
3097
3133
  * @returns a new Plane the normal vector to this plane at the given origin point.
3098
3134
  * Note : the vector "normal" is updated because normalized.
3099
3135
  */
3100
- function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
3136
+ export function romPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3): MutablePlane;
3101
3137
  /**
3102
3138
  * Calculates the distance from a plane and a point
3103
3139
  * @param origin - origin of the plane to be constructed
@@ -3105,36 +3141,36 @@ declare namespace Plane {
3105
3141
  * @param point - point to calculate distance to
3106
3142
  * @returns the signed distance between the plane defined by the normal vector at the "origin"" point and the given other point.
3107
3143
  */
3108
- function signedDistanceToPlaneFromPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3, point: Vector3.ReadonlyVector3): number;
3144
+ export function signedDistanceToPlaneFromPositionAndNormal(origin: Vector3.ReadonlyVector3, normal: Vector3.ReadonlyVector3, point: Vector3.ReadonlyVector3): number;
3109
3145
  /**
3110
3146
  * @returns the plane coordinates as a new array of 4 elements [a, b, c, d].
3111
3147
  */
3112
- function asArray(plane: ReadonlyPlane): number[];
3148
+ export function asArray(plane: ReadonlyPlane): number[];
3113
3149
  /**
3114
3150
  * @returns a new plane copied from the current Plane.
3115
3151
  */
3116
- function clone(plane: ReadonlyPlane): MutablePlane;
3152
+ export function clone(plane: ReadonlyPlane): MutablePlane;
3117
3153
  /**
3118
3154
  * @returns the Plane hash code.
3119
3155
  */
3120
- function getHashCode(_plane: ReadonlyPlane): number;
3156
+ export function getHashCode(_plane: ReadonlyPlane): number;
3121
3157
  /**
3122
3158
  * Normalize the current Plane in place.
3123
3159
  * @returns the updated Plane.
3124
3160
  */
3125
- function normalize(plane: ReadonlyPlane): MutablePlane;
3161
+ export function normalize(plane: ReadonlyPlane): MutablePlane;
3126
3162
  /**
3127
3163
  * Applies a transformation the plane and returns the result
3128
3164
  * @param transformation - the transformation matrix to be applied to the plane
3129
3165
  * @returns a new Plane as the result of the transformation of the current Plane by the given matrix.
3130
3166
  */
3131
- function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
3167
+ export function transform(plane: ReadonlyPlane, transformation: Matrix.ReadonlyMatrix): MutablePlane;
3132
3168
  /**
3133
3169
  * Calcualtte the dot product between the point and the plane normal
3134
3170
  * @param point - point to calculate the dot product with
3135
3171
  * @returns the dot product (float) of the point coordinates and the plane normal.
3136
3172
  */
3137
- function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
3173
+ export function dotCoordinate(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
3138
3174
  /**
3139
3175
  * Updates the current Plane from the plane defined by the three given points.
3140
3176
  * @param point1 - one of the points used to contruct the plane
@@ -3142,20 +3178,20 @@ declare namespace Plane {
3142
3178
  * @param point3 - one of the points used to contruct the plane
3143
3179
  * @returns the updated Plane.
3144
3180
  */
3145
- function copyFromPoints(point1: Vector3.ReadonlyVector3, point2: Vector3.ReadonlyVector3, point3: Vector3.ReadonlyVector3): MutablePlane;
3181
+ export function copyFromPoints(point1: Vector3.ReadonlyVector3, point2: Vector3.ReadonlyVector3, point3: Vector3.ReadonlyVector3): MutablePlane;
3146
3182
  /**
3147
3183
  * Checks if the plane is facing a given direction
3148
3184
  * @param direction - the direction to check if the plane is facing
3149
3185
  * @param epsilon - value the dot product is compared against (returns true if dot &lt;= epsilon)
3150
3186
  * @returns True is the vector "direction" is the same side than the plane normal.
3151
3187
  */
3152
- function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
3188
+ export function isFrontFacingTo(plane: ReadonlyPlane, direction: Vector3.ReadonlyVector3, epsilon: number): boolean;
3153
3189
  /**
3154
3190
  * Calculates the distance to a point
3155
3191
  * @param point - point to calculate distance to
3156
3192
  * @returns the signed distance (float) from the given point to the Plane.
3157
3193
  */
3158
- function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
3194
+ export function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
3159
3195
  }
3160
3196
 
3161
3197
  /** @public */
@@ -3174,31 +3210,6 @@ declare const PointerHoverFeedback: ComponentDefinition<ISchema<PBPointerHoverFe
3174
3210
  /** @public */
3175
3211
  declare const PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
3176
3212
 
3177
- /**
3178
- * @public
3179
- */
3180
- 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
3213
  /**
3203
3214
  * @public
3204
3215
  * Quaternion is a type and a namespace.
@@ -3467,10 +3478,10 @@ declare const Raycast: ComponentDefinition<ISchema<PBRaycast>, PBRaycast>;
3467
3478
 
3468
3479
  /** Position will be relative to the scene */
3469
3480
  declare interface RaycastHit {
3470
- position: Vector3_2 | undefined;
3471
- origin: Vector3_2 | undefined;
3472
- direction: Vector3_2 | undefined;
3473
- normalHit: Vector3_2 | undefined;
3481
+ position: PBVector3 | undefined;
3482
+ origin: PBVector3 | undefined;
3483
+ direction: PBVector3 | undefined;
3484
+ normalHit: PBVector3 | undefined;
3474
3485
  length: number;
3475
3486
  meshName?: string | undefined;
3476
3487
  entityId?: number | undefined;
@@ -3730,11 +3741,6 @@ declare namespace Schemas {
3730
3741
  const Optional: typeof IOptional;
3731
3742
  }
3732
3743
 
3733
- /**
3734
- * @public
3735
- */
3736
- declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
3737
-
3738
3744
  /**
3739
3745
  * @public
3740
3746
  */
@@ -3835,8 +3841,6 @@ declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
3835
3841
  /** @public */
3836
3842
  declare const UiBackground: ComponentDefinition<ISchema<PBUiBackground>, PBUiBackground>;
3837
3843
 
3838
- declare type Uint32 = number;
3839
-
3840
3844
  /** @public */
3841
3845
  declare const UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
3842
3846
 
@@ -4442,12 +4446,6 @@ declare namespace Vector3 {
4442
4446
  export function Random(): MutableVector3;
4443
4447
  }
4444
4448
 
4445
- declare interface Vector3_2 {
4446
- x: number;
4447
- y: number;
4448
- z: number;
4449
- }
4450
-
4451
4449
  /**
4452
4450
  * @public
4453
4451
  */
@@ -4461,7 +4459,8 @@ declare type Vector3Type = {
4461
4459
  declare const VisibilityComponent: ComponentDefinition<ISchema<PBVisibilityComponent>, PBVisibilityComponent>;
4462
4460
 
4463
4461
  declare namespace WireMessage {
4464
- enum Enum {
4462
+ export type Uint32 = number;
4463
+ export enum Enum {
4465
4464
  RESERVED = 0,
4466
4465
  PUT_COMPONENT = 1,
4467
4466
  DELETE_COMPONENT = 2,
@@ -4471,7 +4470,7 @@ declare namespace WireMessage {
4471
4470
  * @param length - Uint32 the length of all message (including the header)
4472
4471
  * @param type - define the function which handles the data
4473
4472
  */
4474
- type Header = {
4473
+ export type Header = {
4475
4474
  length: Uint32;
4476
4475
  type: Uint32;
4477
4476
  };
@@ -4480,8 +4479,8 @@ declare namespace WireMessage {
4480
4479
  * Validate if the message incoming is completed
4481
4480
  * @param buf - ByteBuffer
4482
4481
  */
4483
- function validate(buf: ByteBuffer): boolean;
4484
- function readHeader(buf: ByteBuffer): Header | null;
4482
+ export function validate(buf: ByteBuffer): boolean;
4483
+ export function readHeader(buf: ByteBuffer): Header | null;
4485
4484
  }
4486
4485
 
4487
4486
  declare const enum YGAlign {
@@ -4495,21 +4494,27 @@ declare const enum YGAlign {
4495
4494
  YGA_SPACE_AROUND = 7
4496
4495
  }
4497
4496
 
4498
- declare const enum YGDirection {
4499
- YGD_INHERIT = 0,
4500
- YGD_LTR = 1,
4501
- YGD_RTL = 2
4502
- }
4503
-
4504
4497
  declare const enum YGDisplay {
4505
4498
  YGD_FLEX = 0,
4506
4499
  YGD_NONE = 1
4507
4500
  }
4508
4501
 
4502
+ declare const enum YGEdge {
4503
+ YGE_LEFT = 0,
4504
+ YGE_TOP = 1,
4505
+ YGE_RIGHT = 2,
4506
+ YGE_BOTTOM = 3,
4507
+ YGE_START = 4,
4508
+ YGE_END = 5,
4509
+ YGE_HORIZONTAL = 6,
4510
+ YGE_VERTICAL = 7,
4511
+ YGE_ALL = 8
4512
+ }
4513
+
4509
4514
  declare const enum YGFlexDirection {
4510
- YGFD_COLUMN = 0,
4511
- YGFD_COLUMN_REVERSE = 1,
4512
- YGFD_ROW = 2,
4515
+ YGFD_ROW = 0,
4516
+ YGFD_COLUMN = 1,
4517
+ YGFD_COLUMN_REVERSE = 2,
4513
4518
  YGFD_ROW_REVERSE = 3
4514
4519
  }
4515
4520
 
@@ -4529,9 +4534,8 @@ declare const enum YGOverflow {
4529
4534
  }
4530
4535
 
4531
4536
  declare const enum YGPositionType {
4532
- YGPT_STATIC = 0,
4533
- YGPT_RELATIVE = 1,
4534
- YGPT_ABSOLUTE = 2
4537
+ YGPT_RELATIVE = 0,
4538
+ YGPT_ABSOLUTE = 1
4535
4539
  }
4536
4540
 
4537
4541
  declare const enum YGUnit {