mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-28 03:50:11 +08:00
* some initial code for viewer. copying from other repos * adding electron support * moving some test files around. need to rewrite these * camera traj. test cases. starting to transmit images * still working on vis * reorganized viewer and figured out websocket sending from client. need to do with camera pose * black * temporarily ignore pylinting for viewer * ignore viewer * fixed array * license and fixed ignore in pyproject.toml * improved syntax
46 lines
762 B
JavaScript
46 lines
762 B
JavaScript
import React, { Component } from "react";
|
|
import "./App.css";
|
|
import { Viewer } from "./Viewer";
|
|
|
|
class Image extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {};
|
|
}
|
|
}
|
|
|
|
class ColorGUIHelper {
|
|
constructor(object, prop) {
|
|
this.object = object;
|
|
this.prop = prop;
|
|
}
|
|
|
|
get value() {
|
|
return `#${this.object[this.prop].getHexString()}`;
|
|
}
|
|
|
|
set value(hexString) {
|
|
this.object[this.prop].set(hexString);
|
|
}
|
|
}
|
|
|
|
class App extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
this.state = {
|
|
client: null,
|
|
};
|
|
this.viewer_ref = React.createRef();
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className="App">
|
|
<Viewer ref={this.viewer_ref} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default App;
|