-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move re_renderer examples to its own crate in order to make workspace…
… level examples less confusing (#4472) ### What This way we don't show renderer examples like "the examples". Also, due to some dependency issues with the optional re_renderer arrow dependency (details somewhat unclear..), we were previously no longer able to run examples on the web. This works nicely now again: <img width="1953" alt="image" src="https://github.com/rerun-io/rerun/assets/1220815/87b4c2be-2080-44f2-b319-a222c49315b7"> depicted: * `cargo run -p re_renderer_examples --bin multiview` (native) * `cargo run-wasm -p re_renderer_examples --bin multiview --features "webgl"` (webgl, using firefox here) * `cargo run-wasm -p re_renderer_examples --bin multiview` (webgpu, using chrome here) ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Full build: [app.rerun.io](https://app.rerun.io/pr/4472/index.html) * Partial build: [app.rerun.io](https://app.rerun.io/pr/4472/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) - Useful for quick testing when changes do not affect examples in any way * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4472) - [Docs preview](https://rerun.io/preview/504ce9714e120af91374751e7ae86e70b195044c/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/504ce9714e120af91374751e7ae86e70b195044c/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
18 changed files
with
153 additions
and
79 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,68 @@ | ||
[package] | ||
name = "re_renderer_examples" | ||
description = "Examples for the re_renderer crate." | ||
version.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
license.workspace = true | ||
publish = false | ||
|
||
[features] | ||
webgl = ["re_renderer/webgl"] | ||
|
||
|
||
[[bin]] | ||
name = "2d" | ||
path = "2d.rs" | ||
|
||
[[bin]] | ||
name = "depth_cloud" | ||
path = "depth_cloud.rs" | ||
|
||
[[bin]] | ||
name = "depth_offset" | ||
path = "depth_offset.rs" | ||
|
||
[[bin]] | ||
name = "multiview" | ||
path = "multiview.rs" | ||
|
||
[[bin]] | ||
name = "outlines" | ||
path = "outlines.rs" | ||
|
||
[[bin]] | ||
name = "picking" | ||
path = "picking.rs" | ||
|
||
|
||
[dependencies] | ||
re_log.workspace = true | ||
re_renderer = { workspace = true, features = ["import-obj", "import-gltf"] } | ||
|
||
ahash.workspace = true | ||
anyhow.workspace = true | ||
bytemuck.workspace = true | ||
glam.workspace = true | ||
image = { workspace = true, default-features = false, features = ["png"] } | ||
itertools.workspace = true | ||
log.workspace = true | ||
macaw.workspace = true | ||
pollster.workspace = true | ||
rand = { workspace = true, features = ["std", "std_rng"] } | ||
web-time.workspace = true | ||
wgpu.workspace = true | ||
winit.workspace = true | ||
zip = { workspace = true, default-features = false, features = ["deflate"] } | ||
|
||
[target.'cfg(target_arch = "wasm32")'.dependencies] | ||
console_error_panic_hook.workspace = true | ||
wasm-bindgen-futures.workspace = true | ||
web-sys = { workspace = true, features = [ | ||
"Location", | ||
"Blob", | ||
"RequestInit", | ||
"RequestMode", | ||
"Request", | ||
"Response", | ||
] } |
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 @@ | ||
Standalone examples for `re_renderer` | ||
----------------------------------------------- | ||
|
||
To get a list of all examples run: | ||
``` | ||
cargo run -p re_renderer_examples --bin | ||
``` | ||
|
||
E.g. to run the `multiview`` example run | ||
``` | ||
cargo run -p re_renderer_examples --bin multiview | ||
``` | ||
To run the same example on the web using WebGPU: | ||
``` | ||
cargo run-wasm -p re_renderer_examples --bin multiview | ||
``` | ||
To run the same example on the web using WebGL: | ||
``` | ||
cargo run-wasm -p re_renderer_examples --bin multiview --features "webgl" | ||
``` |
File renamed without changes.
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
File renamed without changes.
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
Oops, something went wrong.