@casual-simulation/aux-runtime 4.1.3 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casual-simulation/aux-runtime",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "description": "Runtime for AUX projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -25,8 +25,8 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@casual-simulation/aux-common": "^4.1.3",
29
- "@casual-simulation/aux-records": "^4.1.3",
28
+ "@casual-simulation/aux-common": "^4.1.4",
29
+ "@casual-simulation/aux-records": "^4.1.5",
30
30
  "@casual-simulation/crypto": "^4.0.5",
31
31
  "@casual-simulation/engine262": "0.0.1-4de2170374e22761996e46eb1362f4496ee57f8f",
32
32
  "@casual-simulation/error-stack-parser": "^2.0.7",
@@ -7959,6 +7959,18 @@ declare class Vector2 {
7959
7959
  * Normalizing a vector preserves its directionality while making the length (i.e. scale) of it 1.
7960
7960
  */
7961
7961
  normalize(): Vector2;
7962
+
7963
+ /**
7964
+ * Negates each component of this vector and returns a new vector that contains the result.
7965
+ *
7966
+ * @example Negate a vector.
7967
+ * const myVector = new Vector2(1, 2);
7968
+ * const negated = myVector.negate();
7969
+ *
7970
+ * os.toast(`Vector: ${myVector}, Negated: ${negated}`);
7971
+ */
7972
+ negate(): Vector2;
7973
+
7962
7974
  toString(): string;
7963
7975
  /**
7964
7976
  * Determines if this vector equals the other vector.
@@ -8085,6 +8097,18 @@ declare class Vector3 {
8085
8097
  * A normalized vector is a vector whose length equals 1.
8086
8098
  */
8087
8099
  normalize(): Vector3;
8100
+
8101
+ /**
8102
+ * Negates each component of this vector and returns a new vector that contains the result.
8103
+ *
8104
+ * @example Negate a vector.
8105
+ * const myVector = new Vector3(1, 2, 3);
8106
+ * const negated = myVector.negate();
8107
+ *
8108
+ * os.toast(`Vector: ${myVector}, Negated: ${negated}`);
8109
+ */
8110
+ negate(): Vector3;
8111
+
8088
8112
  toString(): string;
8089
8113
  /**
8090
8114
  * Determines if this vector equals the other vector.
@@ -15599,6 +15623,14 @@ interface Os {
15599
15623
  */
15600
15624
  useDebugValue<T>(value: T, formatter?: (value: T) => any): void;
15601
15625
 
15626
+ /**
15627
+ * Returns the current context value, as given by the nearest context provider for the given context.
15628
+ * When the provider updates, this Hook will trigger a rerender with the latest context value.
15629
+ *
15630
+ * @param context The context you want to use
15631
+ */
15632
+ useContext<T>(context: PreactContext<T>): T;
15633
+
15602
15634
  useErrorBoundary(
15603
15635
  callback?: (error: any) => Promise<void> | void
15604
15636
  ): [any, () => void];
@@ -18087,6 +18119,36 @@ interface Math {
18087
18119
  */
18088
18120
  getForwardDirection(pointerRotation: RawRotation | Rotation): Vector3;
18089
18121
 
18122
+ /**
18123
+ * Converts the given number of [degrees](https://en.wikipedia.org/wiki/Degree_(angle)) to [radians](https://en.wikipedia.org/wiki/Radian) and returns the result.
18124
+ *
18125
+ * This operation is equivalent to `radians = degrees * (Math.PI / 180)`.
18126
+ *
18127
+ * @param degrees the number of degrees that should be converted to radians.
18128
+ *
18129
+ * @example Get the number of radians for a 90 degree angle
18130
+ * const radians = math.degreesToRadians(90);
18131
+ *
18132
+ * @dochash actions/math
18133
+ * @docname math.degreesToRadians
18134
+ */
18135
+ degreesToRadians(degrees: number): number;
18136
+
18137
+ /**
18138
+ * Converts the given number of [radians](https://en.wikipedia.org/wiki/Radian) to [degrees](https://en.wikipedia.org/wiki/Degree_(angle)) and returns the result.
18139
+ *
18140
+ * This operation is equivalent to `degrees = radians * (180 / Math.PI)`.
18141
+ *
18142
+ * @param radians the number of radians that should be converted to degrees.
18143
+ *
18144
+ * @example Get the number of degrees for a Math.PI / 2 angle
18145
+ * const degrees = math.radiansToDegrees(Math.PI / 2);
18146
+ *
18147
+ * @dochash actions/math
18148
+ * @docname math.radiansToDegrees
18149
+ */
18150
+ radiansToDegrees(radians: number): number;
18151
+
18090
18152
  /**
18091
18153
  * Finds the point at which the the given ray and ground plane intersect.
18092
18154
  * Returns null if the ray does not intersect the ground plane.