-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d934049
commit 0c91879
Showing
8 changed files
with
92 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ const Header = () => { | |
<p>YCB objects</p> | ||
</Col> | ||
</Row> | ||
<hr/> | ||
</Container> | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Container, Row } from "react-bootstrap"; | ||
import { useAnnotationStore } from '../stores/AnnotationStore'; | ||
|
||
const OutputContainer = () => { | ||
|
||
const { outputAnnotation } = useAnnotationStore() | ||
const outputJSON = JSON.stringify(outputAnnotation); | ||
|
||
return ( | ||
<Container fluid="md" className="mt-2"> | ||
<Row className="section-wrapper"> | ||
<div className="output"> | ||
<code>Output: </code> | ||
<code>{outputJSON}</code> | ||
|
||
</div> | ||
</Row> | ||
</Container> | ||
) | ||
} | ||
|
||
export default OutputContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import create from 'zustand'; | ||
|
||
const useAnnotationStore = create(set => ({ | ||
outputAnnotation : {url: "https://camera1-video.mp4", videoWidth: 500, videoHeight: 400 }, | ||
addAnnotation : (value) => | ||
set(state => ({ | ||
outputAnnotation: { | ||
...state.outputAnnotation, | ||
annotations: [{ | ||
id:value.id, | ||
position: value.position, | ||
rotation: value.rotation | ||
}] | ||
} | ||
})), | ||
|
||
})) | ||
|
||
|
||
export { useAnnotationStore }; |