@oliversalzburg/js-utils 0.0.18 → 0.0.19-dev.0

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.
Files changed (239) hide show
  1. package/array.d.ts +39 -0
  2. package/{lib/array.js → array.js} +12 -13
  3. package/array.js.map +1 -0
  4. package/async.d.ts +28 -0
  5. package/{lib/async.js → async.js} +16 -10
  6. package/async.js.map +1 -0
  7. package/async.test.js +28 -0
  8. package/async.test.js.map +1 -0
  9. package/core.d.ts +36 -0
  10. package/core.js +3 -0
  11. package/core.js.map +1 -0
  12. package/{lib/dom → dom}/core.d.ts +8 -8
  13. package/{lib/dom → dom}/core.js +8 -8
  14. package/{lib/error-serializer.d.ts → error-serializer.d.ts} +5 -5
  15. package/{lib/error-serializer.js → error-serializer.js} +5 -5
  16. package/{lib/errors → errors}/AbstractError.d.ts +5 -5
  17. package/{lib/errors → errors}/AbstractError.js +5 -5
  18. package/{lib/errors → errors}/InternalError.d.ts +3 -3
  19. package/{lib/errors → errors}/InternalError.js +3 -3
  20. package/{lib/errors → errors}/InvalidArgumentError.d.ts +2 -2
  21. package/{lib/errors → errors}/InvalidArgumentError.js +2 -2
  22. package/{lib/errors → errors}/InvalidOperationError.d.ts +2 -2
  23. package/{lib/errors → errors}/InvalidOperationError.js +2 -2
  24. package/{lib/errors → errors}/NotImplementedError.d.ts +2 -2
  25. package/{lib/errors → errors}/NotImplementedError.js +2 -2
  26. package/{lib/errors → errors}/PermissionViolationError.d.ts +2 -2
  27. package/{lib/errors → errors}/PermissionViolationError.js +2 -2
  28. package/{lib/errors → errors}/ResourceConflictError.d.ts +2 -2
  29. package/{lib/errors → errors}/ResourceConflictError.js +2 -2
  30. package/{lib/errors → errors}/UnknownError.d.ts +2 -2
  31. package/{lib/errors → errors}/UnknownError.js +2 -2
  32. package/{lib/graphics → graphics}/canvas-sandbox.d.ts +13 -13
  33. package/{lib/graphics → graphics}/canvas-sandbox.js +9 -9
  34. package/{lib/graphics → graphics}/canvas.d.ts +30 -30
  35. package/{lib/graphics → graphics}/canvas.js +30 -30
  36. package/{lib/graphics → graphics}/core.d.ts +23 -23
  37. package/{lib/graphics → graphics}/core.js +23 -24
  38. package/{lib/graphics → graphics}/core.js.map +1 -1
  39. package/{lib/graphics → graphics}/render-loop.d.ts +3 -3
  40. package/{lib/graphics → graphics}/render-loop.js +3 -3
  41. package/{lib/math → math}/core.d.ts +19 -10
  42. package/{lib/math → math}/core.js +21 -10
  43. package/{lib/math → math}/core.js.map +1 -1
  44. package/{lib/math → math}/euler.d.ts +4 -4
  45. package/{lib/math → math}/euler.js +4 -4
  46. package/{lib/math → math}/matrix3.d.ts +34 -34
  47. package/{lib/math → math}/matrix3.js +34 -34
  48. package/{lib/math → math}/quaternion.d.ts +25 -25
  49. package/{lib/math → math}/quaternion.js +25 -25
  50. package/{lib/math → math}/transformation.d.ts +3 -3
  51. package/{lib/math → math}/transformation.js +3 -3
  52. package/{lib/math → math}/vector2.d.ts +40 -40
  53. package/{lib/math → math}/vector2.js +40 -40
  54. package/{lib/math → math}/vector3.d.ts +66 -66
  55. package/{lib/math → math}/vector3.js +66 -66
  56. package/{lib/math → math}/vector4.d.ts +38 -38
  57. package/{lib/math → math}/vector4.js +38 -38
  58. package/{lib/nil.d.ts → nil.d.ts} +11 -9
  59. package/{lib/nil.js → nil.js} +10 -9
  60. package/{lib/nil.js.map → nil.js.map} +1 -1
  61. package/package.json +16 -18
  62. package/{lib/random.d.ts → random.d.ts} +11 -17
  63. package/{lib/random.js → random.js} +11 -17
  64. package/random.js.map +1 -0
  65. package/{lib/sleep.d.ts → sleep.d.ts} +1 -1
  66. package/{lib/sleep.js → sleep.js} +1 -1
  67. package/{lib/string-formatter.d.ts → string-formatter.d.ts} +8 -4
  68. package/{lib/string-formatter.js → string-formatter.js} +8 -4
  69. package/string-formatter.js.map +1 -0
  70. package/string-formatter.test.d.ts +1 -0
  71. package/tsconfig.tsbuildinfo +1 -0
  72. package/LICENSES.md +0 -17
  73. package/_site/assets/highlight.css +0 -141
  74. package/_site/assets/main.js +0 -59
  75. package/_site/assets/navigation.js +0 -1
  76. package/_site/assets/search.js +0 -1
  77. package/_site/assets/style.css +0 -1383
  78. package/_site/classes/AbstractError.html +0 -67
  79. package/_site/classes/Canvas.html +0 -106
  80. package/_site/classes/CanvasSandbox.html +0 -91
  81. package/_site/classes/Euler.html +0 -217
  82. package/_site/classes/InternalError.html +0 -71
  83. package/_site/classes/InvalidArgumentError.html +0 -67
  84. package/_site/classes/InvalidOperationError.html +0 -67
  85. package/_site/classes/Matrix3.html +0 -167
  86. package/_site/classes/NotImplementedError.html +0 -66
  87. package/_site/classes/PermissionViolationError.html +0 -67
  88. package/_site/classes/Quaternion.html +0 -211
  89. package/_site/classes/Random.html +0 -90
  90. package/_site/classes/RenderLoop.html +0 -85
  91. package/_site/classes/ResourceConflictError.html +0 -66
  92. package/_site/classes/Transformation.html +0 -52
  93. package/_site/classes/UnexpectedNilError.html +0 -54
  94. package/_site/classes/UnknownError.html +0 -70
  95. package/_site/classes/Vector2.html +0 -159
  96. package/_site/classes/Vector3.html +0 -214
  97. package/_site/classes/Vector4.html +0 -156
  98. package/_site/functions/addVector2.html +0 -44
  99. package/_site/functions/addVector3.html +0 -44
  100. package/_site/functions/blend.html +0 -47
  101. package/_site/functions/blendAdditive.html +0 -47
  102. package/_site/functions/blendSubtractive.html +0 -47
  103. package/_site/functions/clamp.html +0 -45
  104. package/_site/functions/coalesceOnRejection.html +0 -51
  105. package/_site/functions/cosDeg.html +0 -43
  106. package/_site/functions/crossVector3.html +0 -44
  107. package/_site/functions/deg2rad.html +0 -43
  108. package/_site/functions/difference.html +0 -46
  109. package/_site/functions/distance.html +0 -46
  110. package/_site/functions/dotVector3.html +0 -44
  111. package/_site/functions/errorToJSON.html +0 -43
  112. package/_site/functions/errorToRecord.html +0 -43
  113. package/_site/functions/errorToSimpleSerializable.html +0 -43
  114. package/_site/functions/filterType.html +0 -46
  115. package/_site/functions/formatString.html +0 -46
  116. package/_site/functions/formatStringTemplate.html +0 -46
  117. package/_site/functions/fromRGB.html +0 -46
  118. package/_site/functions/fromRGBA.html +0 -46
  119. package/_site/functions/getA.html +0 -43
  120. package/_site/functions/getB.html +0 -43
  121. package/_site/functions/getDocumentElementTypeById.html +0 -46
  122. package/_site/functions/getDocumentElementTypeByIdStrict.html +0 -48
  123. package/_site/functions/getG.html +0 -43
  124. package/_site/functions/getR.html +0 -43
  125. package/_site/functions/intersect.html +0 -47
  126. package/_site/functions/is.html +0 -46
  127. package/_site/functions/isError.html +0 -43
  128. package/_site/functions/isInteger.html +0 -43
  129. package/_site/functions/isNil.html +0 -44
  130. package/_site/functions/isqrt.html +0 -43
  131. package/_site/functions/multiplyVector2.html +0 -44
  132. package/_site/functions/multiplyVector3.html +0 -44
  133. package/_site/functions/mustExist.html +0 -45
  134. package/_site/functions/nextPalette.html +0 -42
  135. package/_site/functions/prepareAsyncContext.html +0 -46
  136. package/_site/functions/putPixel32.html +0 -53
  137. package/_site/functions/putPixel32Add.html +0 -53
  138. package/_site/functions/putPixel32Sub.html +0 -53
  139. package/_site/functions/putSubPixel32.html +0 -47
  140. package/_site/functions/rad2deg.html +0 -43
  141. package/_site/functions/randomRange.html +0 -45
  142. package/_site/functions/safeRGBComponent.html +0 -43
  143. package/_site/functions/seedFromString.html +0 -44
  144. package/_site/functions/shuffleArray.html +0 -44
  145. package/_site/functions/sinDeg.html +0 -43
  146. package/_site/functions/sleep.html +0 -43
  147. package/_site/functions/somecolor.html +0 -43
  148. package/_site/functions/subtractVector2.html +0 -44
  149. package/_site/functions/subtractVector3.html +0 -44
  150. package/_site/functions/toGrayScale.html +0 -43
  151. package/_site/functions/unknownToError.html +0 -45
  152. package/_site/index.html +0 -44
  153. package/_site/interfaces/CanvasOptions.html +0 -44
  154. package/_site/interfaces/CanvasSandboxApplication.html +0 -60
  155. package/_site/interfaces/CanvasSandboxExpectedOptions.html +0 -48
  156. package/_site/interfaces/CanvasSandboxOptions.html +0 -45
  157. package/_site/interfaces/RenderLoopOptions.html +0 -46
  158. package/_site/modules.html +0 -134
  159. package/_site/types/AnyAsyncFunction.html +0 -41
  160. package/_site/types/AnyConstructor.html +0 -41
  161. package/_site/types/AnyFunction.html +0 -41
  162. package/_site/types/ConstructorOf.html +0 -41
  163. package/_site/types/FunctionReturning.html +0 -41
  164. package/_site/types/Maybe.html +0 -41
  165. package/_site/types/Mixin.html +0 -42
  166. package/_site/types/Nil.html +0 -42
  167. package/_site/types/RenderLoopCallback.html +0 -41
  168. package/_site/types/SerializedError.html +0 -41
  169. package/_site/variables/CANVAS_SANDBOX_DEFAULT_CSS.html +0 -41
  170. package/_site/variables/MS_PER_FRAME_60FPS.html +0 -42
  171. package/_site/variables/PALETTES.html +0 -41
  172. package/_site/variables/TWO_PI.html +0 -41
  173. package/_site/variables/random-1.html +0 -41
  174. package/coverage/base.css +0 -224
  175. package/coverage/block-navigation.js +0 -87
  176. package/coverage/bundle.js +0 -30
  177. package/coverage/favicon.png +0 -0
  178. package/coverage/index.html +0 -16
  179. package/coverage/prettify.css +0 -1
  180. package/coverage/prettify.js +0 -2
  181. package/coverage/sort-arrow-sprite.png +0 -0
  182. package/coverage/sorter.js +0 -196
  183. package/coverage/spa.css +0 -298
  184. package/coverage/string-formatter.ts.html +0 -187
  185. package/coverage/tmp/coverage-4186-1699218521999-0.json +0 -1
  186. package/coverage/tmp/coverage-4196-1699218521967-0.json +0 -1
  187. package/docs/assets/favicon.ico +0 -0
  188. package/lib/array.d.ts +0 -40
  189. package/lib/array.js.map +0 -1
  190. package/lib/async.d.ts +0 -27
  191. package/lib/async.js.map +0 -1
  192. package/lib/core.d.ts +0 -33
  193. package/lib/core.js +0 -12
  194. package/lib/core.js.map +0 -1
  195. package/lib/random.js.map +0 -1
  196. package/lib/string-formatter.js.map +0 -1
  197. package/mkdocs.yml +0 -52
  198. /package/{lib/error-serializer.test.d.ts → async.test.d.ts} +0 -0
  199. /package/{lib/dom → dom}/core.js.map +0 -0
  200. /package/{lib/dom → dom}/index.d.ts +0 -0
  201. /package/{lib/dom → dom}/index.js +0 -0
  202. /package/{lib/dom → dom}/index.js.map +0 -0
  203. /package/{lib/error-serializer.js.map → error-serializer.js.map} +0 -0
  204. /package/{lib/string-formatter.test.d.ts → error-serializer.test.d.ts} +0 -0
  205. /package/{lib/error-serializer.test.js → error-serializer.test.js} +0 -0
  206. /package/{lib/error-serializer.test.js.map → error-serializer.test.js.map} +0 -0
  207. /package/{lib/errors → errors}/AbstractError.js.map +0 -0
  208. /package/{lib/errors → errors}/InternalError.js.map +0 -0
  209. /package/{lib/errors → errors}/InvalidArgumentError.js.map +0 -0
  210. /package/{lib/errors → errors}/InvalidOperationError.js.map +0 -0
  211. /package/{lib/errors → errors}/NotImplementedError.js.map +0 -0
  212. /package/{lib/errors → errors}/PermissionViolationError.js.map +0 -0
  213. /package/{lib/errors → errors}/ResourceConflictError.js.map +0 -0
  214. /package/{lib/errors → errors}/UnknownError.js.map +0 -0
  215. /package/{lib/errors → errors}/index.d.ts +0 -0
  216. /package/{lib/errors → errors}/index.js +0 -0
  217. /package/{lib/errors → errors}/index.js.map +0 -0
  218. /package/{lib/graphics → graphics}/canvas-sandbox.js.map +0 -0
  219. /package/{lib/graphics → graphics}/canvas.js.map +0 -0
  220. /package/{lib/graphics → graphics}/index.d.ts +0 -0
  221. /package/{lib/graphics → graphics}/index.js +0 -0
  222. /package/{lib/graphics → graphics}/index.js.map +0 -0
  223. /package/{lib/graphics → graphics}/render-loop.js.map +0 -0
  224. /package/{lib/index.d.ts → index.d.ts} +0 -0
  225. /package/{lib/index.js → index.js} +0 -0
  226. /package/{lib/index.js.map → index.js.map} +0 -0
  227. /package/{lib/math → math}/euler.js.map +0 -0
  228. /package/{lib/math → math}/index.d.ts +0 -0
  229. /package/{lib/math → math}/index.js +0 -0
  230. /package/{lib/math → math}/index.js.map +0 -0
  231. /package/{lib/math → math}/matrix3.js.map +0 -0
  232. /package/{lib/math → math}/quaternion.js.map +0 -0
  233. /package/{lib/math → math}/transformation.js.map +0 -0
  234. /package/{lib/math → math}/vector2.js.map +0 -0
  235. /package/{lib/math → math}/vector3.js.map +0 -0
  236. /package/{lib/math → math}/vector4.js.map +0 -0
  237. /package/{lib/sleep.js.map → sleep.js.map} +0 -0
  238. /package/{lib/string-formatter.test.js → string-formatter.test.js} +0 -0
  239. /package/{lib/string-formatter.test.js.map → string-formatter.test.js.map} +0 -0
@@ -131,15 +131,15 @@ export class Matrix3 {
131
131
  }
132
132
  /**
133
133
  * Constructs a new {@linkcode Matrix3}.
134
- * @param m00 Position `0,0` of this matrix.
135
- * @param m10 Position `1,0` of this matrix.
136
- * @param m20 Position `2,0` of this matrix.
137
- * @param m01 Position `0,1` of this matrix.
138
- * @param m11 Position `1,1` of this matrix.
139
- * @param m21 Position `2,1` of this matrix.
140
- * @param m02 Position `0,2` of this matrix.
141
- * @param m12 Position `1,2` of this matrix.
142
- * @param m22 Position `2,2` of this matrix.
134
+ * @param m00 - Position `0,0` of this matrix.
135
+ * @param m10 - Position `1,0` of this matrix.
136
+ * @param m20 - Position `2,0` of this matrix.
137
+ * @param m01 - Position `0,1` of this matrix.
138
+ * @param m11 - Position `1,1` of this matrix.
139
+ * @param m21 - Position `2,1` of this matrix.
140
+ * @param m02 - Position `0,2` of this matrix.
141
+ * @param m12 - Position `1,2` of this matrix.
142
+ * @param m22 - Position `2,2` of this matrix.
143
143
  */
144
144
  constructor(m00 = 1, m10 = 0, m20 = 0, m01 = 0, m11 = 1, m21 = 0, m02 = 0, m12 = 0, m22 = 1) {
145
145
  this.m00 = m00;
@@ -154,7 +154,7 @@ export class Matrix3 {
154
154
  }
155
155
  /**
156
156
  * Creates a new {@linkcode Matrix3} from another {@linkcode Matrix3}.
157
- * @param matrix The matrix to copy.
157
+ * @param matrix - The matrix to copy.
158
158
  * @returns A new matrix.
159
159
  */
160
160
  static fromMatrix3(matrix) {
@@ -162,7 +162,7 @@ export class Matrix3 {
162
162
  }
163
163
  /**
164
164
  * Creates a new {@linkcode Matrix3} from a rotation in Euler angles.
165
- * @param degrees The rotation in Euler angles.
165
+ * @param degrees - The rotation in Euler angles.
166
166
  * @returns A new matrix.
167
167
  */
168
168
  static fromEuler(degrees) {
@@ -170,8 +170,8 @@ export class Matrix3 {
170
170
  }
171
171
  /**
172
172
  * Creates a new {@linkcode Matrix3} from a rotation around an axis.
173
- * @param axis The axis around which to rotate.
174
- * @param degrees The rotation in degrees.
173
+ * @param axis - The axis around which to rotate.
174
+ * @param degrees - The rotation in degrees.
175
175
  * @returns A new matrix.
176
176
  */
177
177
  static fromVector3(axis, degrees) {
@@ -179,7 +179,7 @@ export class Matrix3 {
179
179
  }
180
180
  /**
181
181
  * Creates a new {@linkcode Matrix3} from a quaternion.
182
- * @param quaternion The quaternion describes the rotation.
182
+ * @param quaternion - The quaternion describes the rotation.
183
183
  * @returns A new matrix.
184
184
  */
185
185
  static fromQuaternion(quaternion) {
@@ -187,7 +187,7 @@ export class Matrix3 {
187
187
  }
188
188
  /**
189
189
  * Sets the matrix to new values from another matrix.
190
- * @param matrix The matrix to copy.
190
+ * @param matrix - The matrix to copy.
191
191
  * @returns This instance.
192
192
  */
193
193
  set(matrix) {
@@ -196,15 +196,15 @@ export class Matrix3 {
196
196
  }
197
197
  /**
198
198
  * Update the matrix by individual components.
199
- * @param m00 Position `0,0` of this matrix.
200
- * @param m10 Position `1,0` of this matrix.
201
- * @param m20 Position `2,0` of this matrix.
202
- * @param m01 Position `0,1` of this matrix.
203
- * @param m11 Position `1,1` of this matrix.
204
- * @param m21 Position `2,1` of this matrix.
205
- * @param m02 Position `0,2` of this matrix.
206
- * @param m12 Position `1,2` of this matrix.
207
- * @param m22 Position `2,2` of this matrix.
199
+ * @param m00 - Position `0,0` of this matrix.
200
+ * @param m10 - Position `1,0` of this matrix.
201
+ * @param m20 - Position `2,0` of this matrix.
202
+ * @param m01 - Position `0,1` of this matrix.
203
+ * @param m11 - Position `1,1` of this matrix.
204
+ * @param m21 - Position `2,1` of this matrix.
205
+ * @param m02 - Position `0,2` of this matrix.
206
+ * @param m12 - Position `1,2` of this matrix.
207
+ * @param m22 - Position `2,2` of this matrix.
208
208
  * @returns This instance.
209
209
  */
210
210
  setM(m00, m10, m20, m01, m11, m21, m02, m12, m22) {
@@ -221,7 +221,7 @@ export class Matrix3 {
221
221
  }
222
222
  /**
223
223
  * Sets the matrix to a rotation in Euler angles.
224
- * @param degrees The rotation in Euler angles.
224
+ * @param degrees - The rotation in Euler angles.
225
225
  * @returns This instance.
226
226
  */
227
227
  setEuler(degrees) {
@@ -257,8 +257,8 @@ export class Matrix3 {
257
257
  }
258
258
  /**
259
259
  * Sets the matrix to a rotation around an axis.
260
- * @param axis The axis around which to rotate.
261
- * @param degrees The rotation in degrees.
260
+ * @param axis - The axis around which to rotate.
261
+ * @param degrees - The rotation in degrees.
262
262
  * @returns This instance.
263
263
  */
264
264
  setVector3(axis, degrees) {
@@ -284,7 +284,7 @@ export class Matrix3 {
284
284
  }
285
285
  /**
286
286
  * Sets the matrix to a rotation described by a quaternion.
287
- * @param quaternion The quaternion describing the rotation.
287
+ * @param quaternion - The quaternion describing the rotation.
288
288
  * @returns This instance.
289
289
  */
290
290
  setQuaternion(quaternion) {
@@ -358,7 +358,7 @@ export class Matrix3 {
358
358
  }
359
359
  /**
360
360
  * Multiply with another matrix from the right.
361
- * @param matrix The matrix to multiply with.
361
+ * @param matrix - The matrix to multiply with.
362
362
  * @returns This instance.
363
363
  */
364
364
  multiplyR(matrix) {
@@ -384,7 +384,7 @@ export class Matrix3 {
384
384
  }
385
385
  /**
386
386
  * Inversely multiply with another matrix from the right.
387
- * @param matrix The matrix to multiply with.
387
+ * @param matrix - The matrix to multiply with.
388
388
  * @returns This instance.
389
389
  */
390
390
  multiplyInverseR(matrix) {
@@ -410,7 +410,7 @@ export class Matrix3 {
410
410
  }
411
411
  /**
412
412
  * Multiply with another matrix from the left.
413
- * @param matrix The matrix to multiply with.
413
+ * @param matrix - The matrix to multiply with.
414
414
  * @returns This instance.
415
415
  */
416
416
  multiplyL(matrix) {
@@ -436,7 +436,7 @@ export class Matrix3 {
436
436
  }
437
437
  /**
438
438
  * Inversely multiply with another matrix from the right.
439
- * @param matrix The matrix to multiply with.
439
+ * @param matrix - The matrix to multiply with.
440
440
  * @returns This instance.
441
441
  */
442
442
  multiplyInverseL(matrix) {
@@ -462,8 +462,8 @@ export class Matrix3 {
462
462
  }
463
463
  /**
464
464
  * Sets this matrix up as a transformation matrix to look in a given direction.
465
- * @param direction The direction to look in.
466
- * @param upVector The vector indicating the up direction. If not provided
465
+ * @param direction - The direction to look in.
466
+ * @param upVector - The vector indicating the up direction. If not provided
467
467
  * a best effort is made to find a good one.
468
468
  * @returns This instance.
469
469
  */
@@ -9,86 +9,86 @@ import { Vector4 } from "./vector4.js";
9
9
  export declare class Quaternion extends Vector4 {
10
10
  /**
11
11
  * Constructs a new {@linkcode Quaternion}.
12
- * @param x The X component.
13
- * @param y The Y component.
14
- * @param z The Z component.
15
- * @param w The W component.
12
+ * @param x - The X component.
13
+ * @param y - The Y component.
14
+ * @param z - The Z component.
15
+ * @param w - The W component.
16
16
  */
17
17
  constructor(x?: number, y?: number, z?: number, w?: number);
18
18
  /**
19
19
  * Creates a new {@linkcode Quaternion} from a rotation matrix.
20
- * @param matrix The matrix to construct the quaternion from.
20
+ * @param matrix - The matrix to construct the quaternion from.
21
21
  * @returns A new quaternion.
22
22
  */
23
23
  static fromMatrix3(matrix: Readonly<Matrix3>): Quaternion;
24
24
  /**
25
25
  * Creates a new {@linkcode Quaternion} from a rotation in Euler angles.
26
- * @param degrees The rotation in Euler angles.
26
+ * @param degrees - The rotation in Euler angles.
27
27
  * @returns A new quaternion.
28
28
  */
29
29
  static fromEuler(degrees: Readonly<Euler>): Quaternion;
30
30
  /**
31
31
  * Creates a new {@linkcode Quaternion} from a rotation around an axis.
32
- * @param axis The axis around which to rotate.
33
- * @param degrees The rotation in degrees.
32
+ * @param axis - The axis around which to rotate.
33
+ * @param degrees - The rotation in degrees.
34
34
  * @returns A new quaternion.
35
35
  */
36
36
  static fromVector3(axis: Readonly<Vector3>, degrees: number): Quaternion;
37
37
  /**
38
38
  * Creates a new {@linkcode Quaternion} from a {@linkcode Vector4}.
39
- * @param vector The vector to copy the components from.
39
+ * @param vector - The vector to copy the components from.
40
40
  * @returns A new quaternion.
41
41
  */
42
42
  static fromVector4(vector: Readonly<Vector4>): Quaternion;
43
43
  /**
44
44
  * Creates a new {@linkcode Quaternion} from another {@linkcode Quaternion}.
45
- * @param quaternion The quaternion to copy.
45
+ * @param quaternion - The quaternion to copy.
46
46
  * @returns A new quaternion.
47
47
  */
48
48
  static fromQuaternion(quaternion: Readonly<Quaternion>): Quaternion;
49
49
  /**
50
50
  * Sets the quaternion to the values of another quaternion.
51
- * @param quaternion The quaternion to copy.
51
+ * @param quaternion - The quaternion to copy.
52
52
  * @returns This instance.
53
53
  */
54
54
  set(quaternion: Readonly<Quaternion>): this;
55
55
  /**
56
56
  * Sets all components of the quaternion to the given value.
57
- * @param value The value to assign to the components of the quaternion.
57
+ * @param value - The value to assign to the components of the quaternion.
58
58
  * @returns This instance.
59
59
  */
60
60
  setValue(value: number): this;
61
61
  /**
62
62
  * Sets the components of the quaternion to the given values.
63
- * @param x The X component for the quaternion.
64
- * @param y The Y component for the quaternion.
65
- * @param z The Z component for the quaternion.
66
- * @param w The W component for the quaternion.
63
+ * @param x - The X component for the quaternion.
64
+ * @param y - The Y component for the quaternion.
65
+ * @param z - The Z component for the quaternion.
66
+ * @param w - The W component for the quaternion.
67
67
  * @returns This instance.
68
68
  */
69
69
  setXYZW(x: number, y: number, z?: number, w?: number): this;
70
70
  /**
71
71
  * Sets the quaternion to the rotation of the given matrix.
72
- * @param matrix The matrix describing the rotation of the quaternion.
72
+ * @param matrix - The matrix describing the rotation of the quaternion.
73
73
  * @returns This instance.
74
74
  */
75
75
  setMatrix3(matrix: Readonly<Matrix3>): this;
76
76
  /**
77
77
  * Sets the quaternion to a rotation in Euler angles.
78
- * @param degrees The rotation in Euler angles.
78
+ * @param degrees - The rotation in Euler angles.
79
79
  * @returns This instance.
80
80
  */
81
81
  setEuler(degrees: Readonly<Euler>): this;
82
82
  /**
83
83
  * Sets the quaternion to a rotation around an axis.
84
- * @param axis The axis around which to rotate.
85
- * @param degrees The rotation in degrees.
84
+ * @param axis - The axis around which to rotate.
85
+ * @param degrees - The rotation in degrees.
86
86
  * @returns This instance.
87
87
  */
88
88
  setVector3(axis: Readonly<Vector3>, degrees: number): this;
89
89
  /**
90
90
  * Sets the quaternion to the components of a {@linkcode Vector4}.
91
- * @param vector The vector to copy.
91
+ * @param vector - The vector to copy.
92
92
  * @returns This instance.
93
93
  */
94
94
  setVector4(vector: Readonly<Vector4>): this;
@@ -104,16 +104,16 @@ export declare class Quaternion extends Vector4 {
104
104
  invert(): this;
105
105
  /**
106
106
  * Multiply with another quaternion from the right.
107
- * @param quaternion The quaternion to multiply with.
107
+ * @param quaternion - The quaternion to multiply with.
108
108
  * @returns This instance.
109
109
  */
110
110
  multiplyR(quaternion: Readonly<Quaternion>): this;
111
111
  /**
112
112
  * Performs spherical linear interpolation between two rotations, and sets this
113
113
  * quaternion to the resulting rotation.
114
- * @param q1 The initial rotation.
115
- * @param q2 The target rotation.
116
- * @param t The location on the scale from `0` to `1`.
114
+ * @param q1 - The initial rotation.
115
+ * @param q2 - The target rotation.
116
+ * @param t - The location on the scale from `0` to `1`.
117
117
  * @returns This instance.
118
118
  */
119
119
  slerp(q1: Readonly<Quaternion>, q2: Readonly<Quaternion>, t: number): this;
@@ -6,10 +6,10 @@ import { Vector4 } from "./vector4.js";
6
6
  export class Quaternion extends Vector4 {
7
7
  /**
8
8
  * Constructs a new {@linkcode Quaternion}.
9
- * @param x The X component.
10
- * @param y The Y component.
11
- * @param z The Z component.
12
- * @param w The W component.
9
+ * @param x - The X component.
10
+ * @param y - The Y component.
11
+ * @param z - The Z component.
12
+ * @param w - The W component.
13
13
  */
14
14
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
15
15
  constructor(x = 0, y = 0, z = 0, w = 0) {
@@ -17,7 +17,7 @@ export class Quaternion extends Vector4 {
17
17
  }
18
18
  /**
19
19
  * Creates a new {@linkcode Quaternion} from a rotation matrix.
20
- * @param matrix The matrix to construct the quaternion from.
20
+ * @param matrix - The matrix to construct the quaternion from.
21
21
  * @returns A new quaternion.
22
22
  */
23
23
  static fromMatrix3(matrix) {
@@ -25,7 +25,7 @@ export class Quaternion extends Vector4 {
25
25
  }
26
26
  /**
27
27
  * Creates a new {@linkcode Quaternion} from a rotation in Euler angles.
28
- * @param degrees The rotation in Euler angles.
28
+ * @param degrees - The rotation in Euler angles.
29
29
  * @returns A new quaternion.
30
30
  */
31
31
  static fromEuler(degrees) {
@@ -33,8 +33,8 @@ export class Quaternion extends Vector4 {
33
33
  }
34
34
  /**
35
35
  * Creates a new {@linkcode Quaternion} from a rotation around an axis.
36
- * @param axis The axis around which to rotate.
37
- * @param degrees The rotation in degrees.
36
+ * @param axis - The axis around which to rotate.
37
+ * @param degrees - The rotation in degrees.
38
38
  * @returns A new quaternion.
39
39
  */
40
40
  static fromVector3(axis, degrees) {
@@ -42,7 +42,7 @@ export class Quaternion extends Vector4 {
42
42
  }
43
43
  /**
44
44
  * Creates a new {@linkcode Quaternion} from a {@linkcode Vector4}.
45
- * @param vector The vector to copy the components from.
45
+ * @param vector - The vector to copy the components from.
46
46
  * @returns A new quaternion.
47
47
  */
48
48
  static fromVector4(vector) {
@@ -50,7 +50,7 @@ export class Quaternion extends Vector4 {
50
50
  }
51
51
  /**
52
52
  * Creates a new {@linkcode Quaternion} from another {@linkcode Quaternion}.
53
- * @param quaternion The quaternion to copy.
53
+ * @param quaternion - The quaternion to copy.
54
54
  * @returns A new quaternion.
55
55
  */
56
56
  static fromQuaternion(quaternion) {
@@ -58,7 +58,7 @@ export class Quaternion extends Vector4 {
58
58
  }
59
59
  /**
60
60
  * Sets the quaternion to the values of another quaternion.
61
- * @param quaternion The quaternion to copy.
61
+ * @param quaternion - The quaternion to copy.
62
62
  * @returns This instance.
63
63
  */
64
64
  set(quaternion) {
@@ -70,7 +70,7 @@ export class Quaternion extends Vector4 {
70
70
  }
71
71
  /**
72
72
  * Sets all components of the quaternion to the given value.
73
- * @param value The value to assign to the components of the quaternion.
73
+ * @param value - The value to assign to the components of the quaternion.
74
74
  * @returns This instance.
75
75
  */
76
76
  setValue(value) {
@@ -82,10 +82,10 @@ export class Quaternion extends Vector4 {
82
82
  }
83
83
  /**
84
84
  * Sets the components of the quaternion to the given values.
85
- * @param x The X component for the quaternion.
86
- * @param y The Y component for the quaternion.
87
- * @param z The Z component for the quaternion.
88
- * @param w The W component for the quaternion.
85
+ * @param x - The X component for the quaternion.
86
+ * @param y - The Y component for the quaternion.
87
+ * @param z - The Z component for the quaternion.
88
+ * @param w - The W component for the quaternion.
89
89
  * @returns This instance.
90
90
  */
91
91
  setXYZW(x, y, z = 0, w = 1) {
@@ -97,7 +97,7 @@ export class Quaternion extends Vector4 {
97
97
  }
98
98
  /**
99
99
  * Sets the quaternion to the rotation of the given matrix.
100
- * @param matrix The matrix describing the rotation of the quaternion.
100
+ * @param matrix - The matrix describing the rotation of the quaternion.
101
101
  * @returns This instance.
102
102
  */
103
103
  setMatrix3(matrix) {
@@ -132,7 +132,7 @@ export class Quaternion extends Vector4 {
132
132
  }
133
133
  /**
134
134
  * Sets the quaternion to a rotation in Euler angles.
135
- * @param degrees The rotation in Euler angles.
135
+ * @param degrees - The rotation in Euler angles.
136
136
  * @returns This instance.
137
137
  */
138
138
  setEuler(degrees) {
@@ -152,8 +152,8 @@ export class Quaternion extends Vector4 {
152
152
  }
153
153
  /**
154
154
  * Sets the quaternion to a rotation around an axis.
155
- * @param axis The axis around which to rotate.
156
- * @param degrees The rotation in degrees.
155
+ * @param axis - The axis around which to rotate.
156
+ * @param degrees - The rotation in degrees.
157
157
  * @returns This instance.
158
158
  */
159
159
  setVector3(axis, degrees) {
@@ -166,7 +166,7 @@ export class Quaternion extends Vector4 {
166
166
  }
167
167
  /**
168
168
  * Sets the quaternion to the components of a {@linkcode Vector4}.
169
- * @param vector The vector to copy.
169
+ * @param vector - The vector to copy.
170
170
  * @returns This instance.
171
171
  */
172
172
  setVector4(vector) {
@@ -202,7 +202,7 @@ export class Quaternion extends Vector4 {
202
202
  }
203
203
  /**
204
204
  * Multiply with another quaternion from the right.
205
- * @param quaternion The quaternion to multiply with.
205
+ * @param quaternion - The quaternion to multiply with.
206
206
  * @returns This instance.
207
207
  */
208
208
  multiplyR(quaternion) {
@@ -223,9 +223,9 @@ export class Quaternion extends Vector4 {
223
223
  /**
224
224
  * Performs spherical linear interpolation between two rotations, and sets this
225
225
  * quaternion to the resulting rotation.
226
- * @param q1 The initial rotation.
227
- * @param q2 The target rotation.
228
- * @param t The location on the scale from `0` to `1`.
226
+ * @param q1 - The initial rotation.
227
+ * @param q2 - The target rotation.
228
+ * @param t - The location on the scale from `0` to `1`.
229
229
  * @returns This instance.
230
230
  */
231
231
  slerp(q1, q2, t) {
@@ -19,9 +19,9 @@ export declare class Transformation {
19
19
  scale: Vector3;
20
20
  /**
21
21
  * Construct a new {@linkcode Transformation}.
22
- * @param rotation The rotation to apply through the transformation.
23
- * @param position The position to apply through the transformation.
24
- * @param scale The scale to apply through the transformation.
22
+ * @param rotation - The rotation to apply through the transformation.
23
+ * @param position - The position to apply through the transformation.
24
+ * @param scale - The scale to apply through the transformation.
25
25
  */
26
26
  constructor(rotation: Readonly<Matrix3>, position: Readonly<Vector3>, scale: Readonly<Vector3>);
27
27
  }
@@ -19,9 +19,9 @@ export class Transformation {
19
19
  scale;
20
20
  /**
21
21
  * Construct a new {@linkcode Transformation}.
22
- * @param rotation The rotation to apply through the transformation.
23
- * @param position The position to apply through the transformation.
24
- * @param scale The scale to apply through the transformation.
22
+ * @param rotation - The rotation to apply through the transformation.
23
+ * @param position - The position to apply through the transformation.
24
+ * @param scale - The scale to apply through the transformation.
25
25
  */
26
26
  constructor(rotation, position, scale) {
27
27
  this.rotation = Matrix3.fromMatrix3(rotation);