-
由 Emil Ernerfeldt 创作于
### What * Closes https://github.com/rerun-io/rerun/issues/6909 * First steps on the road to https://github.com/rerun-io/rerun/issues/3381 * Creates a new issue: https://github.com/rerun-io/rerun/issues/7117 Best reviewed ignoring whitespace changes. The serializers for `Transform3D` and `LeafTransform3D` will now always write every component, effectively clearing all previously logged values. `Transform3D` uses `Option<C>` for each component, treating it as a single-element list component list where `None` is empty. If we ever want to support updating some components using the transform (as outlined in https://github.com/rerun-io/rerun/issues/3381) we would need to turn this into a tristate, i.e. something like `NoneOrZeroOrOne<C>`. `LeafTransform3D` uses `Option<Vec<C>>` for its components, but has no interface yet for logging an update. Both `Transform3D` and `LeafTransform3D` has a new `::clear()` constructor in Rust, that replaced both `::new()` and `::default()`. This is for added clarity, and to make the transition easier if we ever add an `::update()` constructor, as per https://github.com/rerun-io/rerun/issues/3381 ![image](https://github.com/user-attachments/assets/588224b8-daec-463d-b238-8263f578ae19) ### 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): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7111?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7111?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7111) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html ) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Andreas Reich <andreas@rerun.io>
由 Emil Ernerfeldt 创作于### What * Closes https://github.com/rerun-io/rerun/issues/6909 * First steps on the road to https://github.com/rerun-io/rerun/issues/3381 * Creates a new issue: https://github.com/rerun-io/rerun/issues/7117 Best reviewed ignoring whitespace changes. The serializers for `Transform3D` and `LeafTransform3D` will now always write every component, effectively clearing all previously logged values. `Transform3D` uses `Option<C>` for each component, treating it as a single-element list component list where `None` is empty. If we ever want to support updating some components using the transform (as outlined in https://github.com/rerun-io/rerun/issues/3381) we would need to turn this into a tristate, i.e. something like `NoneOrZeroOrOne<C>`. `LeafTransform3D` uses `Option<Vec<C>>` for its components, but has no interface yet for logging an update. Both `Transform3D` and `LeafTransform3D` has a new `::clear()` constructor in Rust, that replaced both `::new()` and `::default()`. This is for added clarity, and to make the transition easier if we ever add an `::update()` constructor, as per https://github.com/rerun-io/rerun/issues/3381 ![image](https://github.com/user-attachments/assets/588224b8-daec-463d-b238-8263f578ae19) ### 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): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7111?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7111?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7111) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html ) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Andreas Reich <andreas@rerun.io>
加载中