mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-01 21:39:06 +08:00
Update ui (#354)
This commit is contained in:
1 parent
81fbee213f
commit
28d5b3bda1
11 files changed
+161
-77
No files matched your search
@@ -6,6 +6,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.10.4",
|
"@emotion/react": "^11.10.4",
|
||||||
"@emotion/styled": "^11.10.4",
|
"@emotion/styled": "^11.10.4",
|
||||||
|
"@mui/icons-material": "^5.10.3",
|
||||||
"@mui/material": "^5.10.3",
|
"@mui/material": "^5.10.3",
|
||||||
"@reduxjs/toolkit": "^1.8.3",
|
"@reduxjs/toolkit": "^1.8.3",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$base-color1: #292d39;
|
$base-color1: #292d39;
|
||||||
$base-color2: #181c20;
|
$base-color2: #222831;
|
||||||
$base-color3: #373c4b;
|
$base-color3: #393e46;
|
||||||
$accent-color1: #db5200;
|
$accent-color1: #db5200;
|
||||||
$accent-color2: #ff8600;
|
$accent-color2: #ff8600;
|
||||||
$accent-color3: #ffd65c;
|
$accent-color3: #ffd369;
|
||||||
$highlight-color1: #606980;
|
$highlight-color1: #606980;
|
||||||
$highlight-color2: #d1d4db;
|
$highlight-color2: #eeeeee;
|
||||||
$highlight-color3: #ffffff;
|
$highlight-color3: #ffffff;
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
@@ -43,6 +43,12 @@ $highlight-color3: #ffffff;
|
|||||||
margin: 10px;
|
margin: 10px;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.banner-logo {
|
||||||
|
margin: 10px;
|
||||||
|
margin-right: 120px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-body {
|
.App-body {
|
||||||
@@ -85,7 +91,7 @@ $custom-border: solid 1px $base-color1;
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Your variable overrides
|
// Your variable overrides
|
||||||
$sidebar-color: #b71f0b !default;
|
$sidebar-color: $accent-color3 !default;
|
||||||
$sidebar-width: 100% !default;
|
$sidebar-width: 100% !default;
|
||||||
@import '~react-pro-sidebar/dist/scss/styles.scss';
|
@import '~react-pro-sidebar/dist/scss/styles.scss';
|
||||||
|
|
||||||
@@ -93,18 +99,16 @@ $sidebar-width: 100% !default;
|
|||||||
// Status Panel styling
|
// Status Panel styling
|
||||||
.StatusPanel {
|
.StatusPanel {
|
||||||
display: block;
|
display: block;
|
||||||
|
background-color: $base-color1;
|
||||||
// height: 170px;
|
// height: 170px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.StatusPanel-title {
|
.StatusPanel .StatusPanel-button-group {
|
||||||
margin: 5px;
|
margin: 12px;
|
||||||
text-align: center;
|
|
||||||
font-size: 1em;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.StatusPanel .StatusPanel-button {
|
.StatusPanel .StatusPanel-hide-scene-button {
|
||||||
margin: 20px;
|
margin: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.StatusPanel .WebSocketUrlField {
|
.StatusPanel .WebSocketUrlField {
|
||||||
@@ -114,14 +118,18 @@ $sidebar-width: 100% !default;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.StatusPanel-metrics {
|
.StatusPanel-metrics {
|
||||||
background-color: $base-color1;
|
background-color: $base-color2;
|
||||||
|
margin: 5px;
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.StatusPanel-metrics div {
|
.StatusPanel-metrics div {
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
display: block;
|
display: block;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------
|
// ------------------------------------
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import { useDispatch } from 'react-redux';
|
|||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
import Menu from '@mui/material/Menu';
|
import Menu from '@mui/material/Menu';
|
||||||
import MenuItem from '@mui/material/MenuItem';
|
import MenuItem from '@mui/material/MenuItem';
|
||||||
|
import GitHubIcon from '@mui/icons-material/GitHub';
|
||||||
|
import DescriptionRoundedIcon from '@mui/icons-material/DescriptionRounded';
|
||||||
import LandingModal from '../LandingModal';
|
import LandingModal from '../LandingModal';
|
||||||
|
|
||||||
function getParam(param_name) {
|
function getParam(param_name) {
|
||||||
@@ -77,6 +79,34 @@ export default function Banner() {
|
|||||||
<Button className="banner-button" variant="outlined" size="small">
|
<Button className="banner-button" variant="outlined" size="small">
|
||||||
Download Desktop App
|
Download Desktop App
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button // button with view in ar icon
|
||||||
|
className="banner-button"
|
||||||
|
variant="outlined"
|
||||||
|
startIcon={<GitHubIcon />}
|
||||||
|
target="_blank"
|
||||||
|
href="https://github.com/plenoptix/nerfactory"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
Github
|
||||||
|
</Button>
|
||||||
|
<Button // button with view in ar icon
|
||||||
|
className="banner-button"
|
||||||
|
variant="outlined"
|
||||||
|
startIcon={<DescriptionRoundedIcon />}
|
||||||
|
target="_blank"
|
||||||
|
href="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
Documentation
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<div className="banner-logo">
|
||||||
|
<img
|
||||||
|
style={{ height: 30, margin: 'auto' }}
|
||||||
|
src="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/_images/logo-dark.png"
|
||||||
|
alt="The favicon."
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,6 @@ export function RenderControls() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [, setControls] = useControls(
|
const [, setControls] = useControls(
|
||||||
'Rendering Controls',
|
|
||||||
() => ({
|
() => ({
|
||||||
// isTraining
|
// isTraining
|
||||||
'Pause Training': button(
|
'Pause Training': button(
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"colors": {
|
"colors": {
|
||||||
"elevation1": "#292d39",
|
"elevation1": "#292d39",
|
||||||
"elevation2": "#181c20",
|
"elevation2": "#222831",
|
||||||
"elevation3": "#373c4b",
|
"elevation3": "#393E46",
|
||||||
"accent1": "#db5200",
|
"accent1": "#ffc640",
|
||||||
"accent2": "#ff8600",
|
"accent2": "#FFD369",
|
||||||
"accent3": "#ffd65c",
|
"accent3": "#ffd65c",
|
||||||
"highlight1": "#606980",
|
"highlight1": "#d1d4db",
|
||||||
"highlight2": "#d1d4db",
|
"highlight2": "#EEEEEE",
|
||||||
"highlight3": "#ffffff",
|
"highlight3": "#222831",
|
||||||
"vivid1": "#ffcc00"
|
"vivid1": "#ffcc00"
|
||||||
},
|
},
|
||||||
"radii": {
|
"radii": {
|
||||||
|
|||||||
@@ -34,14 +34,13 @@ export default function LandingModel(props: LandingModalProps) {
|
|||||||
aria-describedby="modal-modal-description"
|
aria-describedby="modal-modal-description"
|
||||||
>
|
>
|
||||||
<Box className="LandingModal-box">
|
<Box className="LandingModal-box">
|
||||||
<Typography id="modal-modal-title" component="div">
|
<center>
|
||||||
Welcome to the Nerfactory Viewer!{' '}
|
|
||||||
<img
|
<img
|
||||||
style={{ height: 37, margin: 'auto' }}
|
style={{ height: 37, margin: 'auto' }}
|
||||||
src="/favicon.png"
|
src="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/_images/logo-dark.png"
|
||||||
alt="The favicon."
|
alt="The favicon."
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</center>
|
||||||
<Typography
|
<Typography
|
||||||
id="modal-modal-description"
|
id="modal-modal-description"
|
||||||
component="div"
|
component="div"
|
||||||
@@ -55,25 +54,6 @@ export default function LandingModel(props: LandingModalProps) {
|
|||||||
</p>
|
</p>
|
||||||
<WebSocketUrlField />
|
<WebSocketUrlField />
|
||||||
<p>{text_2}</p>
|
<p>{text_2}</p>
|
||||||
<b>Other Resources:</b>
|
|
||||||
<Button
|
|
||||||
className="LandingModal-button"
|
|
||||||
variant="outlined"
|
|
||||||
href="https://github.com/plenoptix/nerfactory"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
GitHub
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
className="LandingModal-button"
|
|
||||||
variant="outlined"
|
|
||||||
href="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/index.html"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
Documentation
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -5,12 +5,18 @@ import * as React from 'react';
|
|||||||
import { FaLightbulb, FaTractor } from 'react-icons/fa';
|
import { FaLightbulb, FaTractor } from 'react-icons/fa';
|
||||||
import { Menu, MenuItem, ProSidebar, SubMenu } from 'react-pro-sidebar';
|
import { Menu, MenuItem, ProSidebar, SubMenu } from 'react-pro-sidebar';
|
||||||
|
|
||||||
|
import TuneRoundedIcon from '@mui/icons-material/TuneRounded';
|
||||||
|
import WidgetsRoundedIcon from '@mui/icons-material/WidgetsRounded';
|
||||||
|
import CameraAltRoundedIcon from '@mui/icons-material/CameraAltRounded';
|
||||||
|
import ReceiptLongRoundedIcon from '@mui/icons-material/ReceiptLongRounded';
|
||||||
|
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { Leva } from 'leva';
|
import { Leva } from 'leva';
|
||||||
import Tab from '@mui/material/Tab';
|
import Tab from '@mui/material/Tab';
|
||||||
import Tabs from '@mui/material/Tabs';
|
import Tabs from '@mui/material/Tabs';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
import Divider from '@mui/material/Divider';
|
||||||
import StatusPanel from './StatusPanel';
|
import StatusPanel from './StatusPanel';
|
||||||
import SceneNode from '../../SceneNode';
|
import SceneNode from '../../SceneNode';
|
||||||
import LevaTheme from '../ConfigPanel/leva_theme.json';
|
import LevaTheme from '../ConfigPanel/leva_theme.json';
|
||||||
@@ -130,7 +136,7 @@ export function BasicTabs(props: BasicTabsProps) {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<StatusPanel sceneTree={sceneTree} />
|
<StatusPanel sceneTree={sceneTree} />
|
||||||
<hr />
|
<Divider />
|
||||||
<Box sx={{ width: '100%' }}>
|
<Box sx={{ width: '100%' }}>
|
||||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||||
<Tabs
|
<Tabs
|
||||||
@@ -138,10 +144,26 @@ export function BasicTabs(props: BasicTabsProps) {
|
|||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
aria-label="basic tabs example"
|
aria-label="basic tabs example"
|
||||||
>
|
>
|
||||||
<Tab label="Controls" {...a11yProps(0)} />
|
<Tab
|
||||||
<Tab label="Scene" {...a11yProps(1)} />
|
icon={<TuneRoundedIcon />}
|
||||||
<Tab label="Camera Path" {...a11yProps(2)} />
|
label="Controls"
|
||||||
<Tab label="Logs" {...a11yProps(3)} />
|
{...a11yProps(0)}
|
||||||
|
/>
|
||||||
|
<Tab
|
||||||
|
icon={<WidgetsRoundedIcon />}
|
||||||
|
label="Scene"
|
||||||
|
{...a11yProps(1)}
|
||||||
|
/>
|
||||||
|
<Tab
|
||||||
|
icon={<CameraAltRoundedIcon />}
|
||||||
|
label="Render"
|
||||||
|
{...a11yProps(2)}
|
||||||
|
/>
|
||||||
|
<Tab
|
||||||
|
icon={<ReceiptLongRoundedIcon />}
|
||||||
|
label="Logs"
|
||||||
|
{...a11yProps(3)}
|
||||||
|
/>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Box>
|
</Box>
|
||||||
<TabPanel value={value} index={0}>
|
<TabPanel value={value} index={0}>
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
|
import { ButtonGroup } from '@mui/material';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
import ViewInArIcon from '@mui/icons-material/ViewInAr';
|
||||||
import WebSocketUrlField from '../../WebSocketUrlField';
|
import WebSocketUrlField from '../../WebSocketUrlField';
|
||||||
|
|
||||||
interface StatusPanelProps {
|
interface StatusPanelProps {
|
||||||
@@ -33,28 +35,34 @@ export default function StatusPanel(props: StatusPanelProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="StatusPanel">
|
<div className="StatusPanel">
|
||||||
<div className="StatusPanel-title">Status Panel</div>
|
<ButtonGroup
|
||||||
<Button
|
className="StatusPanel-button-group"
|
||||||
className="StatusPanel-button"
|
|
||||||
variant="contained"
|
variant="contained"
|
||||||
disabled={!isWebsocketConnected}
|
aria-label="outlined button group"
|
||||||
style={{ textTransform: 'none' }}
|
|
||||||
>
|
>
|
||||||
Websocket Connected
|
<Button
|
||||||
</Button>
|
className="StatusPanel-button"
|
||||||
<Button
|
variant="contained"
|
||||||
className="StatusPanel-button"
|
disabled={!isWebsocketConnected}
|
||||||
variant="contained"
|
style={{ textTransform: 'none' }}
|
||||||
disabled={!isWebrtcConnected}
|
>
|
||||||
style={{ textTransform: 'none' }}
|
Websocket Connected
|
||||||
>
|
</Button>
|
||||||
WebRTC Connected
|
<Button
|
||||||
</Button>
|
className="StatusPanel-button"
|
||||||
<Button
|
variant="contained"
|
||||||
className="StatusPanel-button"
|
disabled={!isWebrtcConnected}
|
||||||
|
style={{ textTransform: 'none' }}
|
||||||
|
>
|
||||||
|
WebRTC Connected
|
||||||
|
</Button>
|
||||||
|
</ButtonGroup>
|
||||||
|
<Button // button with view in ar icon
|
||||||
|
className="StatusPanel-hide-scene-button"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
onClick={handleChange}
|
onClick={handleChange}
|
||||||
style={{ textTransform: 'none' }}
|
style={{ textTransform: 'none' }}
|
||||||
|
startIcon={<ViewInArIcon />}
|
||||||
>
|
>
|
||||||
{scene_button}
|
{scene_button}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default function WebSocketUrlField() {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
value={websocket_url}
|
value={websocket_url}
|
||||||
onChange={websocket_url_onchange}
|
onChange={websocket_url_onchange}
|
||||||
|
size="small"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,11 @@ import { createTheme } from '@mui/material/styles';
|
|||||||
|
|
||||||
export const appTheme = createTheme({
|
export const appTheme = createTheme({
|
||||||
palette: {
|
palette: {
|
||||||
primary: { main: '#d1d4db' },
|
primary: { main: '#EEEEEE' },
|
||||||
secondary: { main: '#ffd65c' },
|
secondary: { main: '#FFD369' },
|
||||||
text: {
|
text: {
|
||||||
primary: '#d1d4db',
|
primary: '#EEEEEE',
|
||||||
secondary: '#ff8600',
|
secondary: '#FFD369',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -14,25 +14,53 @@ export const appTheme = createTheme({
|
|||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
'& label': {
|
'& label': {
|
||||||
color: '#606980',
|
color: '#999999',
|
||||||
},
|
},
|
||||||
'& label.Mui-focused': {
|
'& label.Mui-focused': {
|
||||||
color: '#ff8600',
|
color: '#FFD369',
|
||||||
},
|
},
|
||||||
'& .MuiOutlinedInput-root': {
|
'& .MuiOutlinedInput-root': {
|
||||||
'& fieldset': {
|
'& fieldset': {
|
||||||
borderColor: '#373c4b',
|
borderColor: '#555555',
|
||||||
},
|
},
|
||||||
'&:hover fieldset': {
|
'&:hover fieldset': {
|
||||||
borderColor: '#606980',
|
borderColor: '#dddddd',
|
||||||
borderWidth: '0.15rem',
|
|
||||||
},
|
},
|
||||||
'&.Mui-focused fieldset': {
|
'&.Mui-focused fieldset': {
|
||||||
borderColor: '#ff8600',
|
borderColor: '#FFD369',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
MuiButtonBase: {
|
||||||
|
defaultProps: {
|
||||||
|
disableRipple: true, // No more ripple, on the whole application 💣!
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MuiButton: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
'&.Mui-disabled': {
|
||||||
|
color: '#999999',
|
||||||
|
backgroundColor: '#393e46',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MuiTab: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
fontSize: '.8rem',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
MuiDivider: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
backgroundColor: '#555555',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -1619,6 +1619,13 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.3.tgz#e17a3cd87c7814ff35592284b19ae39ad52b85ac"
|
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.3.tgz#e17a3cd87c7814ff35592284b19ae39ad52b85ac"
|
||||||
integrity sha512-mX2S0d1oboKBbWQqWIgRmyALAEzh37yiknpD3mKx8bcoMKbp1VtqzIt0aeHP16Uhsd0eValDFILxLNHWi0oddQ==
|
integrity sha512-mX2S0d1oboKBbWQqWIgRmyALAEzh37yiknpD3mKx8bcoMKbp1VtqzIt0aeHP16Uhsd0eValDFILxLNHWi0oddQ==
|
||||||
|
|
||||||
|
"@mui/icons-material@^5.10.3":
|
||||||
|
version "5.10.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.10.3.tgz#33bd1d973c4727ab55d02928fc8973b7f16fff55"
|
||||||
|
integrity sha512-o0kbUlsWCBtCE0wP33cGKbyryCh7kpm2EECYMPDmWrLhbA+HUODXIdhiTFS26szp2xXo9HY1lEx0ufeJ+tddYw==
|
||||||
|
dependencies:
|
||||||
|
"@babel/runtime" "^7.18.9"
|
||||||
|
|
||||||
"@mui/material@^5.10.3":
|
"@mui/material@^5.10.3":
|
||||||
version "5.10.3"
|
version "5.10.3"
|
||||||
resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.10.3.tgz#5497128ea7c8de1d40ba9bd95437d46d441fa1d1"
|
resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.10.3.tgz#5497128ea7c8de1d40ba9bd95437d46d441fa1d1"
|
||||||
|
|||||||
Reference in new issue
Block a user