-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload the colmap rrd file to gcloud #1666
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,163 @@ | ||
<!DOCTYPE html> | ||
<!-- The version of index.html bundled with the Rerun SDK. --> | ||
<html> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
<!-- Disable zooming: --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | ||
|
||
<head> | ||
<title>rerun viewer</title> | ||
<style> | ||
html { | ||
/* Remove touch delay: */ | ||
touch-action: manipulation; | ||
} | ||
|
||
body { | ||
/* Light mode background color for what is not covered by the egui canvas, | ||
or where the egui canvas is translucent. */ | ||
background: #909090; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
body { | ||
/* Dark mode background color for what is not covered by the egui canvas, | ||
or where the egui canvas is translucent. */ | ||
background: #404040; | ||
} | ||
} | ||
|
||
/* Allow canvas to fill entire web page: */ | ||
html, | ||
body { | ||
overflow: hidden; | ||
margin: 0 !important; | ||
padding: 0 !important; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
/* Position canvas in center-top: */ | ||
canvas { | ||
margin-right: auto; | ||
margin-left: auto; | ||
display: block; | ||
position: absolute; | ||
top: 0%; | ||
left: 50%; | ||
transform: translate(-50%, 0%); | ||
} | ||
|
||
.centered { | ||
margin-right: auto; | ||
margin-left: auto; | ||
display: block; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
color: #f0f0f0; | ||
font-size: 24px; | ||
font-family: Ubuntu-Light, Helvetica, sans-serif; | ||
text-align: center; | ||
} | ||
|
||
/* ---------------------------------------------- */ | ||
/* Loading animation from https://loading.io/css/ */ | ||
.lds-dual-ring { | ||
display: inline-block; | ||
width: 24px; | ||
height: 24px; | ||
} | ||
|
||
.lds-dual-ring:after { | ||
content: " "; | ||
display: block; | ||
width: 24px; | ||
height: 24px; | ||
margin: 0px; | ||
border-radius: 50%; | ||
border: 3px solid #fff; | ||
border-color: #fff transparent #fff transparent; | ||
animation: lds-dual-ring 1.2s linear infinite; | ||
} | ||
|
||
@keyframes lds-dual-ring { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
|
||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- The Wasm code will resize the canvas dynamically --> | ||
<canvas id="the_canvas_id"></canvas> | ||
<div class="centered" id="center_text"> | ||
<p style="font-size:16px"> | ||
Loading… | ||
</p> | ||
<div class="lds-dual-ring"></div> | ||
</div> | ||
|
||
<script> | ||
// The `--no-modules`-generated JS from `wasm-bindgen` attempts to use | ||
// `WebAssembly.instantiateStreaming` to instantiate the wasm module, | ||
// but this doesn't work with `file://` urls. This example is frequently | ||
// viewed by simply opening `index.html` in a browser (with a `file://` | ||
// url), so it would fail if we were to call this function! | ||
// | ||
// Work around this for now by deleting the function to ensure that the | ||
// `no_modules.js` script doesn't have access to it. You won't need this | ||
// hack when deploying over HTTP. | ||
delete WebAssembly.instantiateStreaming; | ||
</script> | ||
|
||
<!-- this is the JS generated by the `wasm-bindgen` CLI tool --> | ||
<script src="re_viewer.js"></script> | ||
|
||
<script> | ||
// We'll defer our execution until the wasm is ready to go. | ||
// Here we tell bindgen the path to the wasm file so it can start | ||
// initialization and return to us a promise when it's done. | ||
console.debug("loading wasm…"); | ||
wasm_bindgen("./re_viewer_bg.wasm") | ||
.then(on_wasm_loaded) | ||
.catch(on_wasm_error); | ||
|
||
function on_wasm_loaded() { | ||
console.debug("wasm loaded. starting app…"); | ||
|
||
// This call installs a bunch of callbacks and then returns: | ||
let url = null; // you can use this to point to an .rrd file over http, or a WebSocket Rerun server. | ||
wasm_bindgen.start("the_canvas_id", url); | ||
|
||
console.debug("app started."); | ||
document.getElementById("center_text").remove(); | ||
} | ||
|
||
function on_wasm_error(error) { | ||
console.error("Failed to start: " + error); | ||
document.getElementById("center_text").innerHTML = ` | ||
<p> | ||
An error occurred during loading: | ||
</p> | ||
<p style="font-family:Courier New"> | ||
${error} | ||
</p> | ||
<p style="font-size:14px"> | ||
Make sure you use a modern browser with WebGL and Wasm enabled. | ||
</p>`; | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> | ||
|
||
<!-- Powered by egui: https://github.com/emilk/egui/ --> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should do
if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/tags/latest'
here and elsewhere to always get alatest
web viewer automaticallyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally agree but I'm going to handle the
latest
/prerelease
logic a bit differently in another PR. There's a bit of a mess around what does / doesn't trigger a workflow.github.ref
doesn't mean "this commit happens to be tagged with latest" but rather "pushing the tag latest is what triggered this workflow." But running the whole pipeline a second time (including wheel building on all platforms) seems heavy-handed to effectively update a pointer.