mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-21 23:25:39 +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
@@ -4,6 +4,8 @@ import { useDispatch } from 'react-redux';
|
||||
import Button from '@mui/material/Button';
|
||||
import Menu from '@mui/material/Menu';
|
||||
import MenuItem from '@mui/material/MenuItem';
|
||||
import GitHubIcon from '@mui/icons-material/GitHub';
|
||||
import DescriptionRoundedIcon from '@mui/icons-material/DescriptionRounded';
|
||||
import LandingModal from '../LandingModal';
|
||||
|
||||
function getParam(param_name) {
|
||||
@@ -77,6 +79,34 @@ export default function Banner() {
|
||||
<Button className="banner-button" variant="outlined" size="small">
|
||||
Download Desktop App
|
||||
</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>
|
||||
);
|
||||
}
|
||||
@@ -130,7 +130,6 @@ export function RenderControls() {
|
||||
};
|
||||
|
||||
const [, setControls] = useControls(
|
||||
'Rendering Controls',
|
||||
() => ({
|
||||
// isTraining
|
||||
'Pause Training': button(
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"colors": {
|
||||
"elevation1": "#292d39",
|
||||
"elevation2": "#181c20",
|
||||
"elevation3": "#373c4b",
|
||||
"accent1": "#db5200",
|
||||
"accent2": "#ff8600",
|
||||
"elevation2": "#222831",
|
||||
"elevation3": "#393E46",
|
||||
"accent1": "#ffc640",
|
||||
"accent2": "#FFD369",
|
||||
"accent3": "#ffd65c",
|
||||
"highlight1": "#606980",
|
||||
"highlight2": "#d1d4db",
|
||||
"highlight3": "#ffffff",
|
||||
"highlight1": "#d1d4db",
|
||||
"highlight2": "#EEEEEE",
|
||||
"highlight3": "#222831",
|
||||
"vivid1": "#ffcc00"
|
||||
},
|
||||
"radii": {
|
||||
|
||||
@@ -34,14 +34,13 @@ export default function LandingModel(props: LandingModalProps) {
|
||||
aria-describedby="modal-modal-description"
|
||||
>
|
||||
<Box className="LandingModal-box">
|
||||
<Typography id="modal-modal-title" component="div">
|
||||
Welcome to the Nerfactory Viewer!{' '}
|
||||
<center>
|
||||
<img
|
||||
style={{ height: 37, margin: 'auto' }}
|
||||
src="/favicon.png"
|
||||
src="https://plenoptix-nerfactory.readthedocs-hosted.com/en/latest/_images/logo-dark.png"
|
||||
alt="The favicon."
|
||||
/>
|
||||
</Typography>
|
||||
</center>
|
||||
<Typography
|
||||
id="modal-modal-description"
|
||||
component="div"
|
||||
@@ -55,25 +54,6 @@ export default function LandingModel(props: LandingModalProps) {
|
||||
</p>
|
||||
<WebSocketUrlField />
|
||||
<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>
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
@@ -5,12 +5,18 @@ import * as React from 'react';
|
||||
import { FaLightbulb, FaTractor } from 'react-icons/fa';
|
||||
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 { Leva } from 'leva';
|
||||
import Tab from '@mui/material/Tab';
|
||||
import Tabs from '@mui/material/Tabs';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { useEffect } from 'react';
|
||||
import Divider from '@mui/material/Divider';
|
||||
import StatusPanel from './StatusPanel';
|
||||
import SceneNode from '../../SceneNode';
|
||||
import LevaTheme from '../ConfigPanel/leva_theme.json';
|
||||
@@ -130,7 +136,7 @@ export function BasicTabs(props: BasicTabsProps) {
|
||||
return (
|
||||
<div>
|
||||
<StatusPanel sceneTree={sceneTree} />
|
||||
<hr />
|
||||
<Divider />
|
||||
<Box sx={{ width: '100%' }}>
|
||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||
<Tabs
|
||||
@@ -138,10 +144,26 @@ export function BasicTabs(props: BasicTabsProps) {
|
||||
onChange={handleChange}
|
||||
aria-label="basic tabs example"
|
||||
>
|
||||
<Tab label="Controls" {...a11yProps(0)} />
|
||||
<Tab label="Scene" {...a11yProps(1)} />
|
||||
<Tab label="Camera Path" {...a11yProps(2)} />
|
||||
<Tab label="Logs" {...a11yProps(3)} />
|
||||
<Tab
|
||||
icon={<TuneRoundedIcon />}
|
||||
label="Controls"
|
||||
{...a11yProps(0)}
|
||||
/>
|
||||
<Tab
|
||||
icon={<WidgetsRoundedIcon />}
|
||||
label="Scene"
|
||||
{...a11yProps(1)}
|
||||
/>
|
||||
<Tab
|
||||
icon={<CameraAltRoundedIcon />}
|
||||
label="Render"
|
||||
{...a11yProps(2)}
|
||||
/>
|
||||
<Tab
|
||||
icon={<ReceiptLongRoundedIcon />}
|
||||
label="Logs"
|
||||
{...a11yProps(3)}
|
||||
/>
|
||||
</Tabs>
|
||||
</Box>
|
||||
<TabPanel value={value} index={0}>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import Button from '@mui/material/Button';
|
||||
import { ButtonGroup } from '@mui/material';
|
||||
import { useSelector } from 'react-redux';
|
||||
import ViewInArIcon from '@mui/icons-material/ViewInAr';
|
||||
import WebSocketUrlField from '../../WebSocketUrlField';
|
||||
|
||||
interface StatusPanelProps {
|
||||
@@ -33,28 +35,34 @@ export default function StatusPanel(props: StatusPanelProps) {
|
||||
|
||||
return (
|
||||
<div className="StatusPanel">
|
||||
<div className="StatusPanel-title">Status Panel</div>
|
||||
<Button
|
||||
className="StatusPanel-button"
|
||||
<ButtonGroup
|
||||
className="StatusPanel-button-group"
|
||||
variant="contained"
|
||||
disabled={!isWebsocketConnected}
|
||||
style={{ textTransform: 'none' }}
|
||||
aria-label="outlined button group"
|
||||
>
|
||||
Websocket Connected
|
||||
</Button>
|
||||
<Button
|
||||
className="StatusPanel-button"
|
||||
variant="contained"
|
||||
disabled={!isWebrtcConnected}
|
||||
style={{ textTransform: 'none' }}
|
||||
>
|
||||
WebRTC Connected
|
||||
</Button>
|
||||
<Button
|
||||
className="StatusPanel-button"
|
||||
<Button
|
||||
className="StatusPanel-button"
|
||||
variant="contained"
|
||||
disabled={!isWebsocketConnected}
|
||||
style={{ textTransform: 'none' }}
|
||||
>
|
||||
Websocket Connected
|
||||
</Button>
|
||||
<Button
|
||||
className="StatusPanel-button"
|
||||
variant="contained"
|
||||
disabled={!isWebrtcConnected}
|
||||
style={{ textTransform: 'none' }}
|
||||
>
|
||||
WebRTC Connected
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<Button // button with view in ar icon
|
||||
className="StatusPanel-hide-scene-button"
|
||||
variant="outlined"
|
||||
onClick={handleChange}
|
||||
style={{ textTransform: 'none' }}
|
||||
startIcon={<ViewInArIcon />}
|
||||
>
|
||||
{scene_button}
|
||||
</Button>
|
||||
|
||||
@@ -24,6 +24,7 @@ export default function WebSocketUrlField() {
|
||||
variant="outlined"
|
||||
value={websocket_url}
|
||||
onChange={websocket_url_onchange}
|
||||
size="small"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user