@ntalmagor/3drize-viewer 0.1.19 → 0.1.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import RiseLogo from './RiseLogo.js';
|
|
3
3
|
const LoadingIndicator = ({ text, fullScreen = false, animate = true, size = 80, }) => {
|
|
4
|
-
return (_jsx("div", { children: _jsx(RiseLogo, { size: size, animated: animate, loop: true }) }));
|
|
4
|
+
return (_jsxs("div", { children: [text && _jsx("div", { className: "loading-text", children: text }), _jsx(RiseLogo, { size: size, animated: animate, loop: true })] }));
|
|
5
5
|
};
|
|
6
6
|
export default LoadingIndicator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCameraAnimation.d.ts","sourceRoot":"","sources":["../../src/hooks/useCameraAnimation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAW,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO5G,UAAU,yBAAyB;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC;AAED,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MA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AM,aACR,MAAM,aACL,MAAM,SACV,MAAM;;;CA4EhB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -10,15 +10,18 @@ export const useCameraAnimation = (options = {}, cameraState = {}) => {
|
|
|
10
10
|
// const cameraState = useAppSelector(selectCamera);
|
|
11
11
|
const { interpolateProperty } = useMouseHandlers();
|
|
12
12
|
const orbitControls = useOrbitControls();
|
|
13
|
-
const cameraRef = useRef(
|
|
13
|
+
const cameraRef = useRef(null);
|
|
14
14
|
const animationRef = useRef(null);
|
|
15
15
|
const isAnimatingRef = useRef(false);
|
|
16
16
|
const handlers = cameraState.handlers;
|
|
17
|
-
//
|
|
17
|
+
// Keep cameraRef synced with the singleton. The hook may be initialized
|
|
18
|
+
// before the host component's effect calls cameraManager.setCamera(...),
|
|
19
|
+
// so a one-shot backfill races and leaves the ref null in production.
|
|
18
20
|
useEffect(() => {
|
|
19
|
-
|
|
21
|
+
cameraRef.current = cameraManager.getCamera();
|
|
22
|
+
return cameraManager.subscribe(() => {
|
|
20
23
|
cameraRef.current = cameraManager.getCamera();
|
|
21
|
-
}
|
|
24
|
+
});
|
|
22
25
|
}, []);
|
|
23
26
|
// Kill any running animation
|
|
24
27
|
const killAnimation = () => {
|