@luxonis/visualizer-protobuf 2.31.1 → 2.33.0
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/dist/{communicator-D49kmBTQ.js → communicator-CzBZDASw.js} +1 -1
- package/dist/{deserialization.worker-DsCOJqEa.js → deserialization.worker-CXyfLlRt.js} +1 -1
- package/dist/{index-BEFg_Sko.js → index-BUBQn6Kl.js} +1 -1
- package/dist/{index-QCS7rRjJ.js → index-Bg2wGIRX.js} +1 -1
- package/dist/{index-CDS7NmJ7.js → index-BmrFCWrk.js} +1 -1
- package/dist/{index-DKy3gbmW.js → index-Bt_1Ingm.js} +1 -1
- package/dist/{index-BgHqUgA4.js → index-C2xXrJ3A.js} +2 -2
- package/dist/{index-DjfB4_mu.js → index-C47Ti8Df.js} +1 -1
- package/dist/{index-D77uCBAO.js → index-C8AIoPAv.js} +1 -1
- package/dist/{index-DmLecJHe.js → index-CX4A9Odw.js} +1 -1
- package/dist/{index-uoDpeMpU.js → index-CYGRFZj-.js} +1 -1
- package/dist/{index-Bgmmj1v0.js → index-CdL1JTfy.js} +62 -43
- package/dist/{index-B87igDpg.js → index-CvW9Q4VD.js} +1 -1
- package/dist/{index-Cmshqsvw.js → index-D0SP7fRp.js} +1 -1
- package/dist/{index-Dgcol-fP.js → index-DN4ToaLh.js} +1 -1
- package/dist/{index-WSsHQmbV.js → index-DTVwWGhY.js} +1 -1
- package/dist/{index-B_E0WpuE.js → index-DoIQXSoy.js} +1 -1
- package/dist/{index-Bgt0P9DZ.js → index-Dpjb_uMZ.js} +1 -1
- package/dist/{index-CJis4XsK.js → index-TgfyH0by.js} +1 -1
- package/dist/{index-BRoKkcrX.js → index-af73Jp_A.js} +1 -1
- package/dist/{index-BP8xet9G.js → index-iUK2g5-Z.js} +286 -228
- package/dist/index.js +1 -1
- package/dist/lib/src/components/Panel.d.ts +2 -0
- package/dist/lib/src/components/Panel.d.ts.map +1 -1
- package/dist/lib/src/components/Panel.js +10 -5
- package/dist/lib/src/components/Panel.js.map +1 -1
- package/dist/lib/src/components/PanelToolbar.d.ts +1 -0
- package/dist/lib/src/components/PanelToolbar.d.ts.map +1 -1
- package/dist/lib/src/components/PanelToolbar.js +6 -6
- package/dist/lib/src/components/PanelToolbar.js.map +1 -1
- package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
- package/dist/lib/src/connection/foxglove-connection.js +7 -0
- package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts.map +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js +28 -15
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js.map +1 -1
- package/dist/lib/src/messaging/message-handler.d.ts.map +1 -1
- package/dist/lib/src/messaging/message-handler.js.map +1 -1
- package/dist/lib/src/output.css +23 -2
- package/dist/lib/src/panels/ImagePanel.d.ts.map +1 -1
- package/dist/lib/src/panels/ImagePanel.js +1 -1
- package/dist/lib/src/panels/ImagePanel.js.map +1 -1
- package/dist/lib/src/panels/PointCloudPanel.d.ts +2 -1
- package/dist/lib/src/panels/PointCloudPanel.d.ts.map +1 -1
- package/dist/lib/src/panels/PointCloudPanel.js +14 -13
- package/dist/lib/src/panels/PointCloudPanel.js.map +1 -1
- package/dist/lib/src/protobuf.generated/EncodedFrame.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/EncodedFrame.js +3 -0
- package/dist/lib/src/protobuf.generated/EncodedFrame.js.map +1 -1
- package/dist/lib/src/protobuf.generated/Event.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/Event.js +3 -0
- package/dist/lib/src/protobuf.generated/Event.js.map +1 -1
- package/dist/lib/src/protobuf.generated/IMUData.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/IMUData.js +3 -0
- package/dist/lib/src/protobuf.generated/IMUData.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImageAnnotations.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/ImageAnnotations.js +3 -0
- package/dist/lib/src/protobuf.generated/ImageAnnotations.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgDetections.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgDetections.js +3 -0
- package/dist/lib/src/protobuf.generated/ImgDetections.js.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgFrame.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/ImgFrame.js +3 -0
- package/dist/lib/src/protobuf.generated/ImgFrame.js.map +1 -1
- package/dist/lib/src/protobuf.generated/PointCloudData.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/PointCloudData.js +3 -0
- package/dist/lib/src/protobuf.generated/PointCloudData.js.map +1 -1
- package/dist/lib/src/protobuf.generated/SpatialImgDetections.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/SpatialImgDetections.js +3 -0
- package/dist/lib/src/protobuf.generated/SpatialImgDetections.js.map +1 -1
- package/dist/lib/src/protobuf.generated/common.d.ts.map +1 -1
- package/dist/lib/src/protobuf.generated/common.js +3 -0
- package/dist/lib/src/protobuf.generated/common.js.map +1 -1
- package/dist/lib/src/utils/poitcloud-sync.js +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/camera.js +3 -3
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/camera.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts +5 -5
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js +54 -21
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js +0 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/MessageHandler.js.map +1 -1
- package/dist/{protobuf-Cr0sn6Ua.js → protobuf-WAAVwVKb.js} +21 -35
- package/dist/{worker-C_ZGBh4B.js → worker-DgLpu88k.js} +2 -2
- package/dist/{worker-DMpdSxSr.js → worker-OyuK26A1.js} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as protobufsBySchema } from './protobuf-
|
|
1
|
+
import { p as protobufsBySchema } from './protobuf-WAAVwVKb.js';
|
|
2
2
|
|
|
3
3
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
4
4
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as expose } from './comlink-DHMAu6X7.js';
|
|
2
2
|
import { t as typescript } from './useMessageReducer-jNx5e6JW.js';
|
|
3
3
|
import { e as estimateObjectSize, d as dist } from './tslib.es6-C73eoP_E.js';
|
|
4
|
-
import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, a as Profile } from './protobuf-
|
|
4
|
+
import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, a as Profile } from './protobuf-WAAVwVKb.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import './_commonjsHelpers-E-ZsRS8r.js';
|
|
7
7
|
import 'zustand';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a3 as ContextTracker, V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, ac as parseMixed } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as indentNodeProp, M as continuedIndent, N as foldNodeProp, O as styleTags, Q as tags, T as LRLanguage, U as LanguageSupport, V as ExternalTokenizer, X as LRParser, Y as ifNotIn, Z as completeFromList, $ as syntaxTree } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a3 as ContextTracker, V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, N as foldNodeProp, ad as bracketMatchingHandle, U as LanguageSupport, a9 as EditorView, $ as syntaxTree, aa as EditorSelection } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImagePanel } from './index-
|
|
1
|
+
import { ImagePanel } from './index-CdL1JTfy.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-dom';
|
|
4
4
|
import './tslib.es6-C73eoP_E.js';
|
|
@@ -7,7 +7,7 @@ import './_commonjsHelpers-E-ZsRS8r.js';
|
|
|
7
7
|
import '@mui/material';
|
|
8
8
|
import './isArrayLikeObject-Bytw9p-q.js';
|
|
9
9
|
import 'zustand';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-iUK2g5-Z.js';
|
|
11
11
|
import './comlink-DHMAu6X7.js';
|
|
12
12
|
import './utils-Hzt3wxhG.js';
|
|
13
13
|
import './FoxgloveServer-BssAO1ix.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as styleTags, Q as tags, ae as javascriptLanguage, T as LRLanguage, U as LanguageSupport, X as LRParser, ab as html, ac as parseMixed, V as ExternalTokenizer } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as styleTags, Q as tags, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, a8 as defineCSSCompletionSource, U as LanguageSupport, X as LRParser, V as ExternalTokenizer } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -3,7 +3,7 @@ import React__default, { useReducer, useRef, useCallback, useLayoutEffect, Compo
|
|
|
3
3
|
import ReactDOM__default from 'react-dom';
|
|
4
4
|
import { S as isSymbol, U as toString, V as keys, W as getSymbols$1, X as stubArray, Y as arrayPush, Z as baseGetAllKeys, g as getTag, $ as getAllKeys, k as baseGet, c as baseIteratee, j as castPath, t as toKey, a0 as arrayMap$1, a1 as baseUniq, b as baseFlatten, a2 as useMustNotChange, a3 as useCurrentLayoutActions, a4 as useCurrentLayoutSelector, r as reportError, A as AppError, L as Logger, u as useGuaranteedContext, a5 as usePanelMosaicId, a6 as useSelectedPanels, a7 as PANEL_TITLE_CONFIG_KEY, a8 as noop$4, o as getPanelTypeFromId, M as useShallowMemo, T as TAB_PANEL_TYPE, J as filterMap, d as dist$3, a9 as useAppConfiguration, aa as useValueChangedDebugLog, ab as useJsonTreeTheme } from './tslib.es6-C73eoP_E.js';
|
|
5
5
|
import { createStore, useStore } from 'zustand';
|
|
6
|
-
import { g as generateUtilityClass, c as createAggregator, f as flatRest, b as baseSet, A as AnalyticsContext, P as PropTypes, E as ErrorDisplay, S as Stack$1, m as makeStyles$1, _ as _extends$1, W as WorkspaceContext, u as useAnalytics, a as AppEvent, L as LeftSidebarItemKeys, R as RightSidebarItemKeys, d as useTranslation, e as usePanelCatalog, h as EmptyState, i as isEmpty, j as PanelContext, k as PanelCatalogContext, l as usePanelStateStore, n as useDefaultPanelTitle, o as useWorkspaceStore, p as WorkspaceStoreSelectors, q as difference, r as usePanelContext, s as useMessagePipeline, v as v4, t as useHoverValue, w as useSetHoverValue, x as useClearHoverValue, y as useMessagePipelineGetter, z as usePanelSettingsTreeUpdate, B as PlayerCapabilities, C as assertNever, D as PlayerPresence, F as isEqual, G as isDesktopApp, H as createTheme, I as propTypesExports } from './index-
|
|
6
|
+
import { g as generateUtilityClass, c as createAggregator, f as flatRest, b as baseSet, A as AnalyticsContext, P as PropTypes, E as ErrorDisplay, S as Stack$1, m as makeStyles$1, _ as _extends$1, W as WorkspaceContext, u as useAnalytics, a as AppEvent, L as LeftSidebarItemKeys, R as RightSidebarItemKeys, d as useTranslation, e as usePanelCatalog, h as EmptyState, i as isEmpty, j as PanelContext, k as PanelCatalogContext, l as usePanelStateStore, n as useDefaultPanelTitle, o as useWorkspaceStore, p as WorkspaceStoreSelectors, q as difference, r as usePanelContext, s as useMessagePipeline, v as v4, t as useHoverValue, w as useSetHoverValue, x as useClearHoverValue, y as useMessagePipelineGetter, z as usePanelSettingsTreeUpdate, B as PlayerCapabilities, C as assertNever, D as PlayerPresence, F as isEqual, G as isDesktopApp, H as createTheme, I as propTypesExports, J as DEFAULT_CAMERA_STATE$1 } from './index-iUK2g5-Z.js';
|
|
7
7
|
import { MosaicDragType, MosaicContext, MosaicWindowContext, getOtherBranch, getNodeAtPath } from 'react-mosaic-component';
|
|
8
8
|
import { t as typescript } from './useMessageReducer-jNx5e6JW.js';
|
|
9
9
|
import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace } from './_commonjsHelpers-E-ZsRS8r.js';
|
|
@@ -31977,7 +31977,7 @@ const t3D = threeDeeKey => t$1(`threeDee:${threeDeeKey}`);
|
|
|
31977
31977
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
31978
31978
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
31979
31979
|
|
|
31980
|
-
const DEFAULT_CAMERA_STATE
|
|
31980
|
+
const DEFAULT_CAMERA_STATE = {
|
|
31981
31981
|
near: 0.001,
|
|
31982
31982
|
far: 1000
|
|
31983
31983
|
};
|
|
@@ -31985,7 +31985,7 @@ const MIN_USER_ZOOM = 0.5;
|
|
|
31985
31985
|
const MAX_USER_ZOOM = 50;
|
|
31986
31986
|
class ImageModeCamera extends PerspectiveCamera {
|
|
31987
31987
|
#model;
|
|
31988
|
-
#cameraState = DEFAULT_CAMERA_STATE
|
|
31988
|
+
#cameraState = DEFAULT_CAMERA_STATE;
|
|
31989
31989
|
#rotation = 0;
|
|
31990
31990
|
#flipHorizontal = false;
|
|
31991
31991
|
#flipVertical = false;
|
|
@@ -33696,7 +33696,6 @@ function findSynchronizedSetAndRemoveOlderItems(tree, visibleAnnotations) {
|
|
|
33696
33696
|
// Any bigger index with all annotations which is newer than already used index is the better option
|
|
33697
33697
|
const hasAllAnnotations = Array.from(visibleAnnotations).every(topic => entry[1].annotationsByTopic.has(topic));
|
|
33698
33698
|
if (hasAllAnnotations) {
|
|
33699
|
-
console.warn("upgrading to new valid entry", entry);
|
|
33700
33699
|
validEntry = entry;
|
|
33701
33700
|
}
|
|
33702
33701
|
}
|
|
@@ -60128,23 +60127,6 @@ class CameraControls extends EventDispatcher {
|
|
|
60128
60127
|
}
|
|
60129
60128
|
}
|
|
60130
60129
|
|
|
60131
|
-
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
60132
|
-
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
60133
|
-
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
60134
|
-
|
|
60135
|
-
const DEFAULT_CAMERA_STATE = {
|
|
60136
|
-
distance: -1000,
|
|
60137
|
-
perspective: true,
|
|
60138
|
-
phi: 89,
|
|
60139
|
-
target: [0, 0, 0],
|
|
60140
|
-
targetOffset: [0, 0, 0],
|
|
60141
|
-
targetOrientation: [0, 1, 1, 1],
|
|
60142
|
-
thetaOffset: 180,
|
|
60143
|
-
fovy: 60,
|
|
60144
|
-
near: 5,
|
|
60145
|
-
far: 20000
|
|
60146
|
-
};
|
|
60147
|
-
|
|
60148
60130
|
/**
|
|
60149
60131
|
* Types of items that can be included in a context menu. Either a clickable item
|
|
60150
60132
|
* or a divider.
|
|
@@ -73629,10 +73611,9 @@ const snapshotInRenderFrame = makePose();
|
|
|
73629
73611
|
const tempVec3$1 = new Vector3();
|
|
73630
73612
|
const tempSpherical = new Spherical();
|
|
73631
73613
|
const FOLLOW_TF_PATH$1 = ["general", "followTf"];
|
|
73632
|
-
const AZIMUTH_SENSITIVITY = 0.
|
|
73633
|
-
const POLAR_SENSITIVITY = 0.
|
|
73634
|
-
const
|
|
73635
|
-
const MAX_POLAR_DEG = 179;
|
|
73614
|
+
const AZIMUTH_SENSITIVITY = 0.2;
|
|
73615
|
+
const POLAR_SENSITIVITY = 0.2;
|
|
73616
|
+
const CAMERA_DISTANCE_OFFSET = 1500;
|
|
73636
73617
|
class CameraStateSettings extends SceneExtension {
|
|
73637
73618
|
#unfollowSnapshotFrameIds;
|
|
73638
73619
|
#controls;
|
|
@@ -73646,8 +73627,8 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73646
73627
|
#updateInterval = null;
|
|
73647
73628
|
#lastTargetOffset = new Vector3();
|
|
73648
73629
|
#isDraggingForRotation = false;
|
|
73649
|
-
#lastMouseX =
|
|
73650
|
-
#lastMouseY =
|
|
73630
|
+
#lastMouseX = 0;
|
|
73631
|
+
#lastMouseY = 0;
|
|
73651
73632
|
constructor(renderer, canvas, aspect) {
|
|
73652
73633
|
super("foxglove.CameraStateSettings", renderer);
|
|
73653
73634
|
this.renderer = renderer;
|
|
@@ -73706,7 +73687,18 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73706
73687
|
}
|
|
73707
73688
|
|
|
73708
73689
|
// Set camera state to default
|
|
73709
|
-
|
|
73690
|
+
|
|
73691
|
+
#setDefaultCameraState(resetCamera = false) {
|
|
73692
|
+
if (resetCamera) {
|
|
73693
|
+
this.#lastMouseX = 0;
|
|
73694
|
+
this.#lastMouseY = 0;
|
|
73695
|
+
this.#lastTargetOffset.set(0, 0, 0);
|
|
73696
|
+
this.#isDraggingForRotation = false;
|
|
73697
|
+
this.#orthographicCamera.position.set(0, 0, 0);
|
|
73698
|
+
this.renderer.updateConfig(draft => {
|
|
73699
|
+
draft.cameraState = cloneDeep(DEFAULT_CAMERA_STATE$1);
|
|
73700
|
+
});
|
|
73701
|
+
}
|
|
73710
73702
|
let restoredCameraState = false;
|
|
73711
73703
|
setTimeout(() => {
|
|
73712
73704
|
let defaultCameraState = undefined;
|
|
@@ -73725,12 +73717,18 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73725
73717
|
const activeCamera = this.getActiveCamera();
|
|
73726
73718
|
activeCamera.updateMatrixWorld(true);
|
|
73727
73719
|
this.renderer.queueAnimationFrame();
|
|
73728
|
-
|
|
73720
|
+
const cameraState = defaultCameraState ?? DEFAULT_CAMERA_STATE$1;
|
|
73721
|
+
this.#applyCameraStateToControls(cameraState, undefined);
|
|
73729
73722
|
this.#controls.update(0);
|
|
73723
|
+
this.renderer.queueAnimationFrame();
|
|
73730
73724
|
}, 10);
|
|
73731
73725
|
// Rotates the camera to the default position
|
|
73732
73726
|
setTimeout(() => {
|
|
73733
73727
|
if (restoredCameraState) {
|
|
73728
|
+
const currentTarget = new Vector3();
|
|
73729
|
+
this.#controls.getTarget(currentTarget);
|
|
73730
|
+
this.#controls.setTarget(currentTarget.x, currentTarget.y, CAMERA_DISTANCE_OFFSET);
|
|
73731
|
+
this.#controls.update(2);
|
|
73734
73732
|
this.#defaultConfig = true;
|
|
73735
73733
|
return;
|
|
73736
73734
|
}
|
|
@@ -73744,11 +73742,11 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73744
73742
|
spherical.theta = Math.max(0.001, Math.min(Math.PI - 0.001, spherical.theta + Math.PI));
|
|
73745
73743
|
const newOffset = new Vector3().setFromSpherical(spherical);
|
|
73746
73744
|
const newCameraPosition = currentTarget.clone().add(newOffset);
|
|
73747
|
-
this.#controls.setLookAt(newCameraPosition.x, newCameraPosition.y, newCameraPosition.z, currentTarget.x, currentTarget.y, currentTarget.z, false);
|
|
73745
|
+
this.#controls.setLookAt(newCameraPosition.x, newCameraPosition.y, newCameraPosition.z, currentTarget.x, currentTarget.y, restoredCameraState ? currentTarget.z : currentTarget.z + CAMERA_DISTANCE_OFFSET, false);
|
|
73748
73746
|
this.#controls.update(0);
|
|
73749
73747
|
this.renderer.queueAnimationFrame();
|
|
73750
73748
|
this.#defaultConfig = true;
|
|
73751
|
-
},
|
|
73749
|
+
}, 100);
|
|
73752
73750
|
}
|
|
73753
73751
|
cameraIcon() {
|
|
73754
73752
|
const dotRadius = 7.5;
|
|
@@ -73781,6 +73779,7 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73781
73779
|
compositeObject.add(pivot);
|
|
73782
73780
|
}
|
|
73783
73781
|
compositeObject.rotation.x = Math.PI / 2 * 3;
|
|
73782
|
+
compositeObject.position.z += -100;
|
|
73784
73783
|
this.add(compositeObject);
|
|
73785
73784
|
}
|
|
73786
73785
|
dispose() {
|
|
@@ -73870,7 +73869,7 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73870
73869
|
near: {
|
|
73871
73870
|
label: t$1("threeDee:near"),
|
|
73872
73871
|
input: "number",
|
|
73873
|
-
step: DEFAULT_CAMERA_STATE.near,
|
|
73872
|
+
step: DEFAULT_CAMERA_STATE$1.near,
|
|
73874
73873
|
precision: PRECISION_DISTANCE,
|
|
73875
73874
|
value: camera.near
|
|
73876
73875
|
},
|
|
@@ -73940,7 +73939,7 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73940
73939
|
if (action.action === "perform-node-action" && action.payload.id === "reset-camera") {
|
|
73941
73940
|
const previousState = cloneDeep(this.renderer.config.cameraState);
|
|
73942
73941
|
this.renderer.updateConfig(draft => {
|
|
73943
|
-
draft.cameraState = cloneDeep(DEFAULT_CAMERA_STATE);
|
|
73942
|
+
draft.cameraState = cloneDeep(DEFAULT_CAMERA_STATE$1);
|
|
73944
73943
|
});
|
|
73945
73944
|
this.#applyCameraStateToControls(this.renderer.config.cameraState, previousState);
|
|
73946
73945
|
this.renderer.emit("cameraMove", this.renderer);
|
|
@@ -73981,10 +73980,10 @@ class CameraStateSettings extends SceneExtension {
|
|
|
73981
73980
|
const followMode = value;
|
|
73982
73981
|
this.renderer.updateConfig(draft => {
|
|
73983
73982
|
if (draft.followMode === "follow-none" || followMode === "follow-pose") {
|
|
73984
|
-
draft.cameraState.targetOffset = [...DEFAULT_CAMERA_STATE.targetOffset];
|
|
73983
|
+
draft.cameraState.targetOffset = [...DEFAULT_CAMERA_STATE$1.targetOffset];
|
|
73985
73984
|
}
|
|
73986
73985
|
if (followMode === "follow-pose") {
|
|
73987
|
-
draft.cameraState.thetaOffset = DEFAULT_CAMERA_STATE.thetaOffset;
|
|
73986
|
+
draft.cameraState.thetaOffset = DEFAULT_CAMERA_STATE$1.thetaOffset;
|
|
73988
73987
|
}
|
|
73989
73988
|
draft.followMode = followMode;
|
|
73990
73989
|
});
|
|
@@ -74028,10 +74027,20 @@ class CameraStateSettings extends SceneExtension {
|
|
|
74028
74027
|
const state = this.renderer.config.cameraState;
|
|
74029
74028
|
const distChanged = Math.abs(state.distance - newDistance) > 1e-6;
|
|
74030
74029
|
const targetChanged = !isEqual(state.targetOffset, [tempVec3$1.x, tempVec3$1.y, tempVec3$1.z]);
|
|
74031
|
-
|
|
74030
|
+
const spherical = new Spherical();
|
|
74031
|
+
const cameraPosition = new Vector3();
|
|
74032
|
+
this.#controls.getPosition(cameraPosition);
|
|
74033
|
+
spherical.setFromVector3(cameraPosition.clone().sub(tempVec3$1));
|
|
74034
|
+
const phiDeg = MathUtils.radToDeg(spherical.phi);
|
|
74035
|
+
const thetaDeg = -MathUtils.radToDeg(spherical.theta);
|
|
74036
|
+
const phiChanged = Math.abs(state.phi - phiDeg) > 1e-3;
|
|
74037
|
+
const thetaChanged = Math.abs(state.thetaOffset - thetaDeg) > 1e-3;
|
|
74038
|
+
if (distChanged || targetChanged || phiChanged || thetaChanged) {
|
|
74032
74039
|
this.renderer.updateConfig(draft => {
|
|
74033
74040
|
if (distChanged) draft.cameraState.distance = newDistance;
|
|
74034
74041
|
if (targetChanged) draft.cameraState.targetOffset = [tempVec3$1.x, tempVec3$1.y, tempVec3$1.z];
|
|
74042
|
+
if (phiChanged) draft.cameraState.phi = phiDeg;
|
|
74043
|
+
if (thetaChanged) draft.cameraState.thetaOffset = thetaDeg;
|
|
74035
74044
|
});
|
|
74036
74045
|
this.#lastTargetOffset.copy(tempVec3$1);
|
|
74037
74046
|
this.renderer.emit("cameraMove", this.renderer);
|
|
@@ -74039,12 +74048,20 @@ class CameraStateSettings extends SceneExtension {
|
|
|
74039
74048
|
}
|
|
74040
74049
|
if (this.#defaultConfig) {
|
|
74041
74050
|
this.#updateInterval = setInterval(() => {
|
|
74042
|
-
|
|
74043
|
-
},
|
|
74044
|
-
|
|
74051
|
+
this.#saveCameraState();
|
|
74052
|
+
}, 200);
|
|
74053
|
+
this.#saveCameraState();
|
|
74045
74054
|
this.#defaultConfig = false;
|
|
74046
74055
|
}
|
|
74047
74056
|
};
|
|
74057
|
+
#saveCameraState = () => {
|
|
74058
|
+
const config = JSON.stringify(this.renderer.config.cameraState);
|
|
74059
|
+
if (config) {
|
|
74060
|
+
window.sessionStorage.setItem("camera3DState", config);
|
|
74061
|
+
} else {
|
|
74062
|
+
console.warn("Filed to save camera state");
|
|
74063
|
+
}
|
|
74064
|
+
};
|
|
74048
74065
|
#handleMouseDown = event => {
|
|
74049
74066
|
if (event.button === 0) {
|
|
74050
74067
|
event.preventDefault();
|
|
@@ -74065,11 +74082,11 @@ class CameraStateSettings extends SceneExtension {
|
|
|
74065
74082
|
return;
|
|
74066
74083
|
}
|
|
74067
74084
|
const deltaAzimuth = -deltaX * AZIMUTH_SENSITIVITY;
|
|
74068
|
-
const deltaPolar = deltaY * POLAR_SENSITIVITY;
|
|
74085
|
+
const deltaPolar = -deltaY * POLAR_SENSITIVITY;
|
|
74069
74086
|
const previousState = cloneDeep(this.renderer.config.cameraState);
|
|
74070
74087
|
this.renderer.updateConfig(draft => {
|
|
74071
74088
|
let currentPhi = draft.cameraState.phi + deltaPolar;
|
|
74072
|
-
currentPhi = Math.max(
|
|
74089
|
+
currentPhi = Math.max(1, Math.min(179, currentPhi));
|
|
74073
74090
|
draft.cameraState.phi = currentPhi;
|
|
74074
74091
|
draft.cameraState.thetaOffset += deltaAzimuth;
|
|
74075
74092
|
});
|
|
@@ -79080,7 +79097,7 @@ function ThreeDeeRender(props) {
|
|
|
79080
79097
|
const partialConfig = initialState;
|
|
79081
79098
|
|
|
79082
79099
|
// Initialize the camera from default settings overlaid with persisted settings
|
|
79083
|
-
const cameraState = merge$1(cloneDeep(DEFAULT_CAMERA_STATE), partialConfig?.cameraState);
|
|
79100
|
+
const cameraState = merge$1(cloneDeep(DEFAULT_CAMERA_STATE$1), partialConfig?.cameraState);
|
|
79084
79101
|
const publish = merge$1(cloneDeep(DEFAULT_PUBLISH_SETTINGS), partialConfig?.publish);
|
|
79085
79102
|
const transforms = partialConfig?.transforms ?? {};
|
|
79086
79103
|
return {
|
|
@@ -79090,7 +79107,9 @@ function ThreeDeeRender(props) {
|
|
|
79090
79107
|
scene: {
|
|
79091
79108
|
...(partialConfig?.scene ?? {}),
|
|
79092
79109
|
transforms: {
|
|
79093
|
-
editable: true
|
|
79110
|
+
editable: true,
|
|
79111
|
+
showLabel: false,
|
|
79112
|
+
axisScale: 0
|
|
79094
79113
|
}
|
|
79095
79114
|
},
|
|
79096
79115
|
transforms,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a9 as EditorView, aa as EditorSelection, T as LRLanguage, O as styleTags, Q as tags, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, U as LanguageSupport, X as LRParser, $ as syntaxTree, ab as html, ac as parseMixed, V as ExternalTokenizer } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, a4 as LocalTokenGroup, a5 as snippetCompletion, $ as syntaxTree, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, Y as ifNotIn, Z as completeFromList, a6 as IterMode, a7 as NodeWeakMap } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, O as styleTags, Q as tags, U as LanguageSupport, X as LRParser } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, $ as syntaxTree, Y as ifNotIn, T as LRLanguage, K as indentNodeProp, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport, a6 as IterMode, Z as completeFromList, a7 as NodeWeakMap, a5 as snippetCompletion } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, ab as html, U as LanguageSupport, ac as parseMixed } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V as ExternalTokenizer, a3 as ContextTracker, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, N as foldNodeProp, a2 as foldInside, K as indentNodeProp, M as continuedIndent, a8 as defineCSSCompletionSource, U as LanguageSupport } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as styleTags, Q as tags, T as LRLanguage, U as LanguageSupport, X as LRParser, a4 as LocalTokenGroup, ab as html, ac as parseMixed, ae as javascriptLanguage } from './index-iUK2g5-Z.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|