@react-three/fiber 8.3.0 → 8.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @react-three/fiber
2
2
 
3
+ ## 8.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - aaeb2b8: fix(types): accept readonly arrays for vector props
8
+
3
9
  ## 8.3.0
4
10
 
5
11
  ### Minor Changes
@@ -8,10 +8,11 @@ export declare type NonFunctionKeys<T> = {
8
8
  export declare type Overwrite<T, O> = Omit<T, NonFunctionKeys<O>> & O;
9
9
  declare type Args<T> = T extends new (...args: any) => any ? ConstructorParameters<T> : T;
10
10
  export declare type Euler = THREE.Euler | Parameters<THREE.Euler['set']>;
11
- export declare type Matrix4 = THREE.Matrix4 | Parameters<THREE.Matrix4['set']>;
12
- export declare type Vector2 = THREE.Vector2 | Parameters<THREE.Vector2['set']> | Parameters<THREE.Vector2['setScalar']>[0];
13
- export declare type Vector3 = THREE.Vector3 | Parameters<THREE.Vector3['set']> | Parameters<THREE.Vector3['setScalar']>[0];
14
- export declare type Vector4 = THREE.Vector4 | Parameters<THREE.Vector4['set']> | Parameters<THREE.Vector4['setScalar']>[0];
11
+ export declare type Matrix4 = THREE.Matrix4 | Parameters<THREE.Matrix4['set']> | Readonly<THREE.Matrix4['set']>;
12
+ declare type VectorLike<VectorClass extends THREE.Vector> = VectorClass | Parameters<VectorClass['set']> | Readonly<Parameters<VectorClass['set']>> | Parameters<VectorClass['setScalar']>[0];
13
+ export declare type Vector2 = VectorLike<THREE.Vector2>;
14
+ export declare type Vector3 = VectorLike<THREE.Vector3>;
15
+ export declare type Vector4 = VectorLike<THREE.Vector4>;
15
16
  export declare type Color = ConstructorParameters<typeof THREE.Color> | THREE.Color | number | string;
16
17
  export declare type ColorArray = typeof THREE.Color | Parameters<THREE.Color['set']>;
17
18
  export declare type Layers = THREE.Layers | Parameters<THREE.Layers['set']>[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/fiber",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "description": "A React renderer for Threejs",
5
5
  "keywords": [
6
6
  "react",