Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5887e21
add transform controls for 3d labels
sashankaryal Sep 24, 2025
f6d9dda
show HUD while transforming
sashankaryal Sep 25, 2025
30a4cb6
refactor transform controls and labels files for maintainability
sashankaryal Sep 25, 2025
62d53d2
add polyline point markers in annotate mode
sashankaryal Sep 25, 2025
721acdf
add hover state for labels in annotate mode
sashankaryal Sep 25, 2025
782b8c3
separate annotate and transform modes
sashankaryal Sep 25, 2025
f9975c4
add annotation toolbar
sashankaryal Sep 26, 2025
336377e
disable scaling and rotation in polylines
sashankaryal Sep 26, 2025
ffe014a
add centroid marker
sashankaryal Sep 26, 2025
a10cd7e
use drei line for segments
sashankaryal Sep 26, 2025
31fc7fc
improve per-point transformation controls for polylines
sashankaryal Sep 26, 2025
8ea2b61
make annotation actions point transformation mode
sashankaryal Sep 26, 2025
155f207
implement point transformation HUD display
sashankaryal Sep 26, 2025
0f05338
impl moving of existing polyline points using point-specific transfor…
sashankaryal Sep 26, 2025
7b61a31
add coordinate input fields for point transformation
sashankaryal Sep 28, 2025
5779182
don't allow transformation on centroid
sashankaryal Sep 28, 2025
0371040
add event sourcing
sashankaryal Oct 1, 2025
adbf425
have a retry limit number for getBounds
sashankaryal Oct 7, 2025
fcb7349
basic multi-camera view rendering for anntoation
sashankaryal Oct 7, 2025
4438fcc
forward all camera refs to annotation views
sashankaryal Oct 7, 2025
827724d
forward default camera position
sashankaryal Oct 9, 2025
e96a2d8
implement polyline point transformations persisting across panels
sashankaryal Oct 10, 2025
482f315
add dedicated button to deselect annotation label
sashankaryal Oct 10, 2025
124f3fd
add basic segment polyline functionality
sashankaryal Oct 10, 2025
086d5bf
dynamic camera positions in side panels according to up vector
sashankaryal Oct 11, 2025
a87afa1
only show multi panel view when main 2d viewer is hidden
sashankaryal Oct 12, 2025
1818a00
show crosshair in side panel views too while annotating
sashankaryal Oct 12, 2025
63be1f4
add annotation plane functionality for z-drift protection
sashankaryal Oct 12, 2025
0169312
use perspective camera in main panel always
sashankaryal Oct 13, 2025
2a5f31c
make annotation plane responsive to up vector
sashankaryal Oct 13, 2025
ab34785
use distance based scaling for poly marker
sashankaryal Oct 13, 2025
f59392a
show segments in side panels too; move annotation related modules to …
sashankaryal Oct 13, 2025
84a99f4
universal transform controls
sashankaryal Oct 15, 2025
a81e309
use styled components
sashankaryal Oct 15, 2025
632c8d7
allow snapping to plane even when plane is toggled off from display
sashankaryal Oct 15, 2025
b01c79f
add feature to support automatic closure of polylines
sashankaryal Oct 15, 2025
cdc3616
convert temp segments into FO polylines
sashankaryal Oct 15, 2025
22da52d
simplify plane projection logic
sashankaryal Oct 15, 2025
8b49c22
allow net new polylines to be created
sashankaryal Oct 15, 2025
198656f
allow deleting vertices and implement segment merging logic
sashankaryal Oct 16, 2025
2cbb1e9
fix escape behavior
sashankaryal Oct 16, 2025
d9ca0bb
allow deleting entire polyline, too
sashankaryal Oct 16, 2025
d6660c3
add unit tests
sashankaryal Oct 16, 2025
76ab193
refactor annotation types; remove unused TransformHUD component
sashankaryal Oct 16, 2025
8e0928f
fix broken bounds test
sashankaryal Oct 16, 2025
7359ee5
address coderabbit PR comments
sashankaryal Oct 16, 2025
f02988b
prevent segment tearing when moving in-between vertices
sashankaryal Oct 16, 2025
8e99fba
break polyline into hooks
sashankaryal Oct 16, 2025
e3091a4
allow adding new vertices in middle of segments
sashankaryal Oct 16, 2025
7da715c
remove unused selector
sashankaryal Oct 16, 2025
7da5a11
show annotation sidebar for 3d datasets, too
sashankaryal Oct 16, 2025
c243877
calculate bounds only after scene load
sashankaryal Oct 16, 2025
3f8ff5b
filter labels in annotate mode by what's in annotation schema
sashankaryal Oct 16, 2025
b8c8003
fix crosshair bounds issue
sashankaryal Oct 16, 2025
14aa49c
prevent segment tearing from coordinate input, too
sashankaryal Oct 16, 2025
e3366d6
fix buggy transform controls
sashankaryal Oct 16, 2025
90b1baa
more resilient bbox calculation
sashankaryal Oct 17, 2025
44709e0
add avoid-z-fighting global scene flag
sashankaryal Oct 17, 2025
14cf7a6
fix falsy check bug for minZ
sashankaryal Oct 17, 2025
3820e43
adjust scene bounds calculations
sashankaryal Oct 17, 2025
fc0315a
deep clone mesh geometry to fix caching bug in multi-panel view
sashankaryal Oct 17, 2025
4d2c058
sync point and polyline transient transform status to other panels, too
sashankaryal Oct 17, 2025
74bdb06
update screenshots
sashankaryal Oct 17, 2025
05e5a67
compute delta using world matrices
sashankaryal Oct 17, 2025
313b05f
use skeleton cloning
sashankaryal Oct 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/packages/core/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ const Modal = () => {
}
}

if (e.repeat) {
return;
}

if (e.altKey && e.code === "Space") {
const hoveringSampleId = (
await snapshot.getPromise(fos.hoveredSample)
Expand Down Expand Up @@ -145,7 +149,10 @@ const Modal = () => {
});
} else if (e.key === "Escape") {
const mediaType = await snapshot.getPromise(fos.mediaType);
if (activeLookerRef.current || mediaType === "3d") {
const is3dVisible = await snapshot.getPromise(
fos.groupMediaIs3dVisible
);
if (activeLookerRef.current || mediaType === "3d" || is3dVisible) {
// we handle close logic in modal + other places
return;
}
Expand All @@ -156,7 +163,7 @@ const Modal = () => {
[]
);

fos.useEventHandler(document, "keyup", keysHandler);
fos.useEventHandler(document, "keydown", keysHandler);

const isFullScreen = useRecoilValue(fos.fullscreen);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { LoadingSpinner } from "@fiftyone/components";
import { lighterSceneAtom } from "@fiftyone/lighter";
import * as fos from "@fiftyone/state";
import { EntryKind } from "@fiftyone/state";
import { Typography } from "@mui/material";
import { atom, useAtomValue } from "jotai";
import React from "react";
import { useRecoilValue } from "recoil";
import styled from "styled-components";
import Sidebar from "../../../Sidebar";
import Actions from "./Actions";
Expand Down Expand Up @@ -85,7 +86,9 @@ const Annotate = () => {
const editing = useAtomValue(isEditing);
const scene = useAtomValue(lighterSceneAtom);

if (loading || !scene) {
const mediaType = useRecoilValue(fos.mediaType);

if (loading || (!scene && mediaType !== "3d")) {
return <Loading />;
}

Expand Down
4 changes: 3 additions & 1 deletion app/packages/looker-3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@react-three/drei": "^10.6.0",
"@react-three/drei": "^10.7.6",
"@react-three/fiber": "^8.18.0",
"chroma-js": "^3.1.2",
"leva": "^0.9.36",
"lodash": "^4.17.21",
"r3f-perf": "^7.2.3",
Expand All @@ -28,6 +29,7 @@
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/chroma-js": "^3.1.1",
"@types/node": "^20.11.10",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
Expand Down
8 changes: 6 additions & 2 deletions app/packages/looker-3d/src/Looker3d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ import {
isPointCloud,
setContainsPointCloud,
} from "@fiftyone/utilities";
import { useAtomValue } from "jotai";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useRecoilValue, useSetRecoilState } from "recoil";
import { Fo3dErrorBoundary } from "./ErrorBoundary";
import { MediaTypePcdComponent } from "./MediaTypePcd";
import { ActionBar } from "./action-bar";
import { Container } from "./containers";
import { Fo3dErrorBoundary } from "./ErrorBoundary";
import { Leva } from "./fo3d/Leva";
import { MediaTypeFo3dComponent } from "./fo3d/MediaTypeFo3d";
import { useHotkey } from "./hooks";
import { MediaTypePcdComponent } from "./MediaTypePcd";
import {
clearTransformStateSelector,
currentActionAtom,
fo3dContainsBackground,
isColormapModalOpenAtom,
isGridOnAtom,
isLevaConfigPanelOnAtom,
selectedLabelForAnnotationAtom,
} from "./state";

/**
Expand All @@ -36,6 +39,7 @@ export const Looker3d = () => {
);
const isDynamicGroup = useRecoilValue(fos.isDynamicGroup);
const parentMediaType = useRecoilValue(fos.parentMediaTypeSelector);
const mode = useAtomValue(fos.modalMode);

const [isHovering, setIsHovering] = useState(false);
const timeout = useRef<ReturnType<typeof setTimeout>>(null);
Expand Down
2 changes: 1 addition & 1 deletion app/packages/looker-3d/src/MediaTypePcd.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useTheme } from "@fiftyone/components";
import * as fop from "@fiftyone/plugins";
import * as fos from "@fiftyone/state";
import { isPointCloud } from "@fiftyone/utilities";
import { Typography } from "@mui/material";
import type { OrbitControlsProps as OrbitControls } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";
Expand Down Expand Up @@ -32,7 +33,6 @@ import {
shadeByAtom,
} from "./state";
import { toEulerFromDegreesArray } from "./utils";
import { isPointCloud } from "@fiftyone/utilities";

type View = "pov" | "top";

Expand Down
Loading
Loading