@react-three/fiber 8.6.0 → 8.6.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 +6 -0
- package/dist/declarations/src/core/events.d.ts +69 -69
- package/dist/declarations/src/core/hooks.d.ts +22 -22
- package/dist/declarations/src/core/index.d.ts +57 -57
- package/dist/declarations/src/core/loop.d.ts +13 -13
- package/dist/declarations/src/core/renderer.d.ts +51 -51
- package/dist/declarations/src/core/store.d.ts +95 -95
- package/dist/declarations/src/core/utils.d.ts +82 -82
- package/dist/declarations/src/index.d.ts +11 -11
- package/dist/declarations/src/native/Canvas.d.ts +8 -8
- package/dist/declarations/src/native/events.d.ts +4 -4
- package/dist/declarations/src/native/polyfills.d.ts +1 -1
- package/dist/declarations/src/native.d.ts +10 -10
- package/dist/declarations/src/three-types.d.ts +332 -332
- package/dist/declarations/src/web/Canvas.d.ts +11 -11
- package/dist/declarations/src/web/events.d.ts +4 -4
- package/dist/{index-08c4a2bb.cjs.dev.js → index-9a338808.cjs.dev.js} +9 -4
- package/dist/{index-cf0284c7.esm.js → index-cecf55e8.esm.js} +9 -4
- package/dist/{index-8826c241.cjs.prod.js → index-f368ca4a.cjs.prod.js} +9 -4
- package/dist/react-three-fiber.cjs.dev.js +1 -1
- package/dist/react-three-fiber.cjs.prod.js +1 -1
- package/dist/react-three-fiber.esm.js +2 -2
- package/native/dist/react-three-fiber-native.cjs.dev.js +1 -1
- package/native/dist/react-three-fiber-native.cjs.prod.js +1 -1
- package/native/dist/react-three-fiber-native.esm.js +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
-
import { RenderProps } from '../core';
|
|
4
|
-
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
fallback?: React.ReactNode;
|
|
7
|
-
resize?: ResizeOptions;
|
|
8
|
-
eventSource?: HTMLElement;
|
|
9
|
-
eventPrefix?: 'offset' | 'client' | 'page' | 'layer' | 'screen';
|
|
10
|
-
}
|
|
11
|
-
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Options as ResizeOptions } from 'react-use-measure';
|
|
3
|
+
import { RenderProps } from '../core';
|
|
4
|
+
export interface Props extends Omit<RenderProps<HTMLCanvasElement>, 'size'>, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
fallback?: React.ReactNode;
|
|
7
|
+
resize?: ResizeOptions;
|
|
8
|
+
eventSource?: HTMLElement;
|
|
9
|
+
eventPrefix?: 'offset' | 'client' | 'page' | 'layer' | 'screen';
|
|
10
|
+
}
|
|
11
|
+
export declare const Canvas: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLCanvasElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseBoundStore } from 'zustand';
|
|
2
|
-
import { RootState } from '../core/store';
|
|
3
|
-
import { EventManager } from '../core/events';
|
|
4
|
-
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
1
|
+
import { UseBoundStore } from 'zustand';
|
|
2
|
+
import { RootState } from '../core/store';
|
|
3
|
+
import { EventManager } from '../core/events';
|
|
4
|
+
export declare function createPointerEvents(store: UseBoundStore<RootState>): EventManager<HTMLElement>;
|
|
@@ -1090,8 +1090,10 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1090
1090
|
supportsHydration: false,
|
|
1091
1091
|
noTimeout: -1,
|
|
1092
1092
|
appendChildToContainer: (container, child) => {
|
|
1093
|
-
if (!child) return;
|
|
1094
|
-
|
|
1093
|
+
if (!child) return; // Don't append to unmounted container
|
|
1094
|
+
|
|
1095
|
+
const scene = container.getState().scene;
|
|
1096
|
+
if (!scene.__r3f) return; // Link current root to the default scene
|
|
1095
1097
|
|
|
1096
1098
|
scene.__r3f.root = container;
|
|
1097
1099
|
appendChild(scene, child);
|
|
@@ -1101,8 +1103,11 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1101
1103
|
removeChild(container.getState().scene, child);
|
|
1102
1104
|
},
|
|
1103
1105
|
insertInContainerBefore: (container, child, beforeChild) => {
|
|
1104
|
-
if (!child || !beforeChild) return;
|
|
1105
|
-
|
|
1106
|
+
if (!child || !beforeChild) return; // Don't append to unmounted container
|
|
1107
|
+
|
|
1108
|
+
const scene = container.getState().scene;
|
|
1109
|
+
if (!scene.__r3f) return;
|
|
1110
|
+
insertBefore(scene, child, beforeChild);
|
|
1106
1111
|
},
|
|
1107
1112
|
getRootHostContext: () => null,
|
|
1108
1113
|
getChildHostContext: parentHostContext => parentHostContext,
|
|
@@ -1063,8 +1063,10 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1063
1063
|
supportsHydration: false,
|
|
1064
1064
|
noTimeout: -1,
|
|
1065
1065
|
appendChildToContainer: (container, child) => {
|
|
1066
|
-
if (!child) return;
|
|
1067
|
-
|
|
1066
|
+
if (!child) return; // Don't append to unmounted container
|
|
1067
|
+
|
|
1068
|
+
const scene = container.getState().scene;
|
|
1069
|
+
if (!scene.__r3f) return; // Link current root to the default scene
|
|
1068
1070
|
|
|
1069
1071
|
scene.__r3f.root = container;
|
|
1070
1072
|
appendChild(scene, child);
|
|
@@ -1074,8 +1076,11 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1074
1076
|
removeChild(container.getState().scene, child);
|
|
1075
1077
|
},
|
|
1076
1078
|
insertInContainerBefore: (container, child, beforeChild) => {
|
|
1077
|
-
if (!child || !beforeChild) return;
|
|
1078
|
-
|
|
1079
|
+
if (!child || !beforeChild) return; // Don't append to unmounted container
|
|
1080
|
+
|
|
1081
|
+
const scene = container.getState().scene;
|
|
1082
|
+
if (!scene.__r3f) return;
|
|
1083
|
+
insertBefore(scene, child, beforeChild);
|
|
1079
1084
|
},
|
|
1080
1085
|
getRootHostContext: () => null,
|
|
1081
1086
|
getChildHostContext: parentHostContext => parentHostContext,
|
|
@@ -1090,8 +1090,10 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1090
1090
|
supportsHydration: false,
|
|
1091
1091
|
noTimeout: -1,
|
|
1092
1092
|
appendChildToContainer: (container, child) => {
|
|
1093
|
-
if (!child) return;
|
|
1094
|
-
|
|
1093
|
+
if (!child) return; // Don't append to unmounted container
|
|
1094
|
+
|
|
1095
|
+
const scene = container.getState().scene;
|
|
1096
|
+
if (!scene.__r3f) return; // Link current root to the default scene
|
|
1095
1097
|
|
|
1096
1098
|
scene.__r3f.root = container;
|
|
1097
1099
|
appendChild(scene, child);
|
|
@@ -1101,8 +1103,11 @@ function createRenderer(_roots, _getEventPriority) {
|
|
|
1101
1103
|
removeChild(container.getState().scene, child);
|
|
1102
1104
|
},
|
|
1103
1105
|
insertInContainerBefore: (container, child, beforeChild) => {
|
|
1104
|
-
if (!child || !beforeChild) return;
|
|
1105
|
-
|
|
1106
|
+
if (!child || !beforeChild) return; // Don't append to unmounted container
|
|
1107
|
+
|
|
1108
|
+
const scene = container.getState().scene;
|
|
1109
|
+
if (!scene.__r3f) return;
|
|
1110
|
+
insertBefore(scene, child, beforeChild);
|
|
1106
1111
|
},
|
|
1107
1112
|
getRootHostContext: () => null,
|
|
1108
1113
|
getChildHostContext: parentHostContext => parentHostContext,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-9a338808.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-f368ca4a.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-
|
|
2
|
-
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, b as useIsomorphicLayoutEffect, d as unmountComponentAtNode } from './index-cecf55e8.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, c as createEvents, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from './index-cecf55e8.esm.js';
|
|
3
3
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-9a338808.cjs.dev.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('../../dist/index-
|
|
5
|
+
var index = require('../../dist/index-f368ca4a.cjs.prod.js');
|
|
6
6
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var THREE = require('three');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-
|
|
2
|
-
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-
|
|
1
|
+
import { c as createEvents, e as extend, u as useMutableCallback, a as createRoot, E as ErrorBoundary, B as Block, d as unmountComponentAtNode } from '../../dist/index-cecf55e8.esm.js';
|
|
2
|
+
export { t as ReactThreeFiber, s as _roots, q as act, n as addAfterEffect, m as addEffect, o as addTail, l as advance, i as applyProps, f as context, g as createPortal, a as createRoot, j as dispose, e as extend, p as getRootState, k as invalidate, h as reconciler, r as render, d as unmountComponentAtNode, x as useFrame, y as useGraph, z as useLoader, v as useStore, w as useThree } from '../../dist/index-cecf55e8.esm.js';
|
|
3
3
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as THREE from 'three';
|