vim-web 0.3.44-dev.63 → 0.3.44-dev.65
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.
|
@@ -16,6 +16,6 @@ export declare function createViewer(container?: Container | HTMLElement): Promi
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function Viewer(props: {
|
|
18
18
|
container: Container;
|
|
19
|
-
|
|
19
|
+
core: Core.Ultra.Viewer;
|
|
20
20
|
onMount: (viewer: ViewerRef) => void;
|
|
21
21
|
}): import("react/jsx-runtime").JSX.Element;
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -76381,11 +76381,11 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76381
76381
|
function createViewer(container) {
|
|
76382
76382
|
const promise = new DeferredPromise();
|
|
76383
76383
|
const cmpContainer = container instanceof HTMLElement ? createContainer(container) : container ?? createContainer();
|
|
76384
|
-
const
|
|
76384
|
+
const core = Viewer$2.createWithCanvas(cmpContainer.gfx);
|
|
76385
76385
|
const reactRoot = clientExports.createRoot(cmpContainer.ui);
|
|
76386
76386
|
const attachDispose = (cmp) => {
|
|
76387
76387
|
cmp.dispose = () => {
|
|
76388
|
-
|
|
76388
|
+
core.dispose();
|
|
76389
76389
|
cmpContainer.dispose();
|
|
76390
76390
|
reactRoot.unmount();
|
|
76391
76391
|
};
|
|
@@ -76396,7 +76396,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76396
76396
|
Viewer,
|
|
76397
76397
|
{
|
|
76398
76398
|
container: cmpContainer,
|
|
76399
|
-
|
|
76399
|
+
core,
|
|
76400
76400
|
onMount: (cmp) => promise.resolve(attachDispose(cmp))
|
|
76401
76401
|
}
|
|
76402
76402
|
)
|
|
@@ -76405,21 +76405,21 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76405
76405
|
}
|
|
76406
76406
|
function Viewer(props) {
|
|
76407
76407
|
const modal = React2.useRef(null);
|
|
76408
|
-
const sectionBox2 = useUltraSectionBox(props.
|
|
76409
|
-
const camera2 = useUltraCamera(props.
|
|
76408
|
+
const sectionBox2 = useUltraSectionBox(props.core);
|
|
76409
|
+
const camera2 = useUltraCamera(props.core, sectionBox2);
|
|
76410
76410
|
const side = useSideState(true, 400);
|
|
76411
76411
|
const [_, setSelectState] = React2.useState(0);
|
|
76412
76412
|
const [controlBarCustom, setControlBarCustom] = React2.useState(() => (c) => c);
|
|
76413
|
-
const isolation = useUltraIsolation(props.
|
|
76414
|
-
const controlBar = useUltraControlBar(props.
|
|
76415
|
-
useViewerInput(props.
|
|
76413
|
+
const isolation = useUltraIsolation(props.core);
|
|
76414
|
+
const controlBar = useUltraControlBar(props.core, sectionBox2, isolation, camera2, (_2) => _2);
|
|
76415
|
+
useViewerInput(props.core.inputs, camera2);
|
|
76416
76416
|
React2.useEffect(() => {
|
|
76417
|
-
props.
|
|
76418
|
-
props.
|
|
76417
|
+
props.core.onStateChanged.subscribe((state) => updateModal(modal, state));
|
|
76418
|
+
props.core.selection.onSelectionChanged.subscribe(() => {
|
|
76419
76419
|
setSelectState((i2) => (i2 + 1) % 2);
|
|
76420
76420
|
});
|
|
76421
76421
|
props.onMount({
|
|
76422
|
-
|
|
76422
|
+
core: props.core,
|
|
76423
76423
|
get modal() {
|
|
76424
76424
|
return modal.current;
|
|
76425
76425
|
},
|
|
@@ -76431,14 +76431,14 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76431
76431
|
controlBar: {
|
|
76432
76432
|
customize: (v) => setControlBarCustom(() => v)
|
|
76433
76433
|
},
|
|
76434
|
-
load: patchLoad(props.
|
|
76434
|
+
load: patchLoad(props.core, modal)
|
|
76435
76435
|
});
|
|
76436
76436
|
}, []);
|
|
76437
76437
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76438
76438
|
/* @__PURE__ */ jsxRuntimeExports.jsx(RestOfScreen, { side, content: () => {
|
|
76439
76439
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
76440
76440
|
whenTrue(true, /* @__PURE__ */ jsxRuntimeExports.jsx(LogoMemo, {})),
|
|
76441
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.
|
|
76441
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Overlay, { canvas: props.core.viewport.canvas }),
|
|
76442
76442
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
76443
76443
|
ControlBar,
|
|
76444
76444
|
{
|