@react-three/fiber 8.4.0 → 8.4.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
|
@@ -5,7 +5,7 @@ export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, Rea
|
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
fallback?: React.ReactNode;
|
|
7
7
|
resize?: ResizeOptions;
|
|
8
|
-
|
|
8
|
+
eventSource?: HTMLElement;
|
|
9
9
|
eventPrefix?: 'offset' | 'client' | 'page' | 'layer' | 'screen';
|
|
10
10
|
}
|
|
11
11
|
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
@@ -126,7 +126,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
126
126
|
style,
|
|
127
127
|
gl,
|
|
128
128
|
events = createPointerEvents,
|
|
129
|
-
|
|
129
|
+
eventSource,
|
|
130
130
|
eventPrefix,
|
|
131
131
|
shadows,
|
|
132
132
|
linear,
|
|
@@ -187,7 +187,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
187
187
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
188
188
|
onCreated: state => {
|
|
189
189
|
// Connect to event source
|
|
190
|
-
state.events.connect == null ? void 0 : state.events.connect(
|
|
190
|
+
state.events.connect == null ? void 0 : state.events.connect(eventSource ? eventSource : divRef.current); // Set up compute function
|
|
191
191
|
|
|
192
192
|
if (eventPrefix) {
|
|
193
193
|
state.setEvents({
|
|
@@ -126,7 +126,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
126
126
|
style,
|
|
127
127
|
gl,
|
|
128
128
|
events = createPointerEvents,
|
|
129
|
-
|
|
129
|
+
eventSource,
|
|
130
130
|
eventPrefix,
|
|
131
131
|
shadows,
|
|
132
132
|
linear,
|
|
@@ -187,7 +187,7 @@ const Canvas = /*#__PURE__*/React__namespace.forwardRef(function Canvas({
|
|
|
187
187
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
188
188
|
onCreated: state => {
|
|
189
189
|
// Connect to event source
|
|
190
|
-
state.events.connect == null ? void 0 : state.events.connect(
|
|
190
|
+
state.events.connect == null ? void 0 : state.events.connect(eventSource ? eventSource : divRef.current); // Set up compute function
|
|
191
191
|
|
|
192
192
|
if (eventPrefix) {
|
|
193
193
|
state.setEvents({
|
|
@@ -99,7 +99,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
99
99
|
style,
|
|
100
100
|
gl,
|
|
101
101
|
events = createPointerEvents,
|
|
102
|
-
|
|
102
|
+
eventSource,
|
|
103
103
|
eventPrefix,
|
|
104
104
|
shadows,
|
|
105
105
|
linear,
|
|
@@ -160,7 +160,7 @@ const Canvas = /*#__PURE__*/React.forwardRef(function Canvas({
|
|
|
160
160
|
onPointerMissed: (...args) => handlePointerMissed.current == null ? void 0 : handlePointerMissed.current(...args),
|
|
161
161
|
onCreated: state => {
|
|
162
162
|
// Connect to event source
|
|
163
|
-
state.events.connect == null ? void 0 : state.events.connect(
|
|
163
|
+
state.events.connect == null ? void 0 : state.events.connect(eventSource ? eventSource : divRef.current); // Set up compute function
|
|
164
164
|
|
|
165
165
|
if (eventPrefix) {
|
|
166
166
|
state.setEvents({
|