@react-three/fiber 7.0.19 → 7.0.20
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 +6 -0
- package/dist/declarations/src/three-types.d.ts +0 -2
- package/dist/react-three-fiber.cjs.dev.js +3 -3
- package/dist/react-three-fiber.cjs.prod.js +3 -3
- package/dist/react-three-fiber.esm.js +3 -3
- package/native/dist/react-three-fiber-native.cjs.d.ts +1 -11
- package/native/dist/react-three-fiber-native.cjs.dev.js +590 -0
- package/native/dist/react-three-fiber-native.cjs.js +6 -15
- package/native/dist/react-three-fiber-native.cjs.prod.js +590 -0
- package/native/dist/react-three-fiber-native.esm.js +538 -0
- package/package.json +2 -2
- package/readme.md +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -59,7 +59,6 @@ export declare type LineSegmentsProps = Object3DNode<THREE.LineSegments, typeof
|
|
|
59
59
|
export declare type LineLoopProps = Object3DNode<THREE.LineLoop, typeof THREE.LineLoop>;
|
|
60
60
|
export declare type PointsProps = Object3DNode<THREE.Points, typeof THREE.Points>;
|
|
61
61
|
export declare type GroupProps = Object3DNode<THREE.Group, typeof THREE.Group>;
|
|
62
|
-
export declare type ImmediateRenderObjectProps = Object3DNode<THREE.ImmediateRenderObject, typeof THREE.ImmediateRenderObject>;
|
|
63
62
|
export declare type CameraProps = Object3DNode<THREE.Camera, typeof THREE.Camera>;
|
|
64
63
|
export declare type PerspectiveCameraProps = Object3DNode<THREE.PerspectiveCamera, typeof THREE.PerspectiveCamera>;
|
|
65
64
|
export declare type OrthographicCameraProps = Object3DNode<THREE.OrthographicCamera, typeof THREE.OrthographicCamera>;
|
|
@@ -197,7 +196,6 @@ declare global {
|
|
|
197
196
|
lineLoop: LineLoopProps;
|
|
198
197
|
points: PointsProps;
|
|
199
198
|
group: GroupProps;
|
|
200
|
-
immediateRenderObject: ImmediateRenderObjectProps;
|
|
201
199
|
camera: CameraProps;
|
|
202
200
|
perspectiveCamera: PerspectiveCameraProps;
|
|
203
201
|
orthographicCamera: OrthographicCameraProps;
|
|
@@ -621,21 +621,21 @@ function createRenderer(roots) {
|
|
|
621
621
|
if (targetProp.fromArray) targetProp.fromArray(value);else targetProp.set(...value);
|
|
622
622
|
} // Test again target.copy(class) next ...
|
|
623
623
|
else if (targetProp.copy && value && value.constructor && targetProp.constructor.name === value.constructor.name) targetProp.copy(value); // If nothing else fits, just set the single value, ignore undefined
|
|
624
|
-
// https://github.com/
|
|
624
|
+
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
625
625
|
else if (value !== undefined) {
|
|
626
626
|
const isColor = targetProp instanceof THREE__namespace.Color; // Allow setting array scalars
|
|
627
627
|
|
|
628
628
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
629
629
|
else if (targetProp instanceof THREE__namespace.Layers && value instanceof THREE__namespace.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
630
630
|
else targetProp.set(value); // Auto-convert sRGB colors, for now ...
|
|
631
|
-
// https://github.com/
|
|
631
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
632
632
|
|
|
633
633
|
if (!rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
634
634
|
} // Else, just overwrite the value
|
|
635
635
|
|
|
636
636
|
} else {
|
|
637
637
|
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
638
|
-
// https://github.com/
|
|
638
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
639
639
|
|
|
640
640
|
if (!rootState.linear && currentInstance[key] instanceof THREE__namespace.Texture) currentInstance[key].encoding = THREE__namespace.sRGBEncoding;
|
|
641
641
|
}
|
|
@@ -621,21 +621,21 @@ function createRenderer(roots) {
|
|
|
621
621
|
if (targetProp.fromArray) targetProp.fromArray(value);else targetProp.set(...value);
|
|
622
622
|
} // Test again target.copy(class) next ...
|
|
623
623
|
else if (targetProp.copy && value && value.constructor && targetProp.constructor.name === value.constructor.name) targetProp.copy(value); // If nothing else fits, just set the single value, ignore undefined
|
|
624
|
-
// https://github.com/
|
|
624
|
+
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
625
625
|
else if (value !== undefined) {
|
|
626
626
|
const isColor = targetProp instanceof THREE__namespace.Color; // Allow setting array scalars
|
|
627
627
|
|
|
628
628
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
629
629
|
else if (targetProp instanceof THREE__namespace.Layers && value instanceof THREE__namespace.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
630
630
|
else targetProp.set(value); // Auto-convert sRGB colors, for now ...
|
|
631
|
-
// https://github.com/
|
|
631
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
632
632
|
|
|
633
633
|
if (!rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
634
634
|
} // Else, just overwrite the value
|
|
635
635
|
|
|
636
636
|
} else {
|
|
637
637
|
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
638
|
-
// https://github.com/
|
|
638
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
639
639
|
|
|
640
640
|
if (!rootState.linear && currentInstance[key] instanceof THREE__namespace.Texture) currentInstance[key].encoding = THREE__namespace.sRGBEncoding;
|
|
641
641
|
}
|
|
@@ -588,21 +588,21 @@ function createRenderer(roots) {
|
|
|
588
588
|
if (targetProp.fromArray) targetProp.fromArray(value);else targetProp.set(...value);
|
|
589
589
|
} // Test again target.copy(class) next ...
|
|
590
590
|
else if (targetProp.copy && value && value.constructor && targetProp.constructor.name === value.constructor.name) targetProp.copy(value); // If nothing else fits, just set the single value, ignore undefined
|
|
591
|
-
// https://github.com/
|
|
591
|
+
// https://github.com/pmndrs/react-three-fiber/issues/274
|
|
592
592
|
else if (value !== undefined) {
|
|
593
593
|
const isColor = targetProp instanceof THREE.Color; // Allow setting array scalars
|
|
594
594
|
|
|
595
595
|
if (!isColor && targetProp.setScalar) targetProp.setScalar(value); // Layers have no copy function, we must therefore copy the mask property
|
|
596
596
|
else if (targetProp instanceof THREE.Layers && value instanceof THREE.Layers) targetProp.mask = value.mask; // Otherwise just set ...
|
|
597
597
|
else targetProp.set(value); // Auto-convert sRGB colors, for now ...
|
|
598
|
-
// https://github.com/
|
|
598
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
599
599
|
|
|
600
600
|
if (!rootState.linear && isColor) targetProp.convertSRGBToLinear();
|
|
601
601
|
} // Else, just overwrite the value
|
|
602
602
|
|
|
603
603
|
} else {
|
|
604
604
|
currentInstance[key] = value; // Auto-convert sRGB textures, for now ...
|
|
605
|
-
// https://github.com/
|
|
605
|
+
// https://github.com/pmndrs/react-three-fiber/issues/344
|
|
606
606
|
|
|
607
607
|
if (!rootState.linear && currentInstance[key] instanceof THREE.Texture) currentInstance[key].encoding = THREE.sRGBEncoding;
|
|
608
608
|
}
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
-
|
|
4
|
-
// curious why you need to?
|
|
5
|
-
// this file exists so that you can import from the entrypoint normally
|
|
6
|
-
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
-
// which means we need to re-export all of the modules from your source file
|
|
8
|
-
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
-
// to check for a default export and re-export it if it exists
|
|
10
|
-
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
-
export * from "../../src/native";
|
|
1
|
+
export * from "../../dist/declarations/src/native";
|