接口优化

This commit is contained in:
2026-08-13 09:16:54 +08:00
parent b964dcdcd9
commit 9e598a0318
12 changed files with 182 additions and 229 deletions
+3 -5
View File
@@ -210,7 +210,7 @@ public:
auto root = detail::make_renderable_group(*this, true);
root->set_object_name("root");
auto builder = this->attach_builder();
builder.attach_renderable(root);
builder.attach(root);
}
[[nodiscard]] std::shared_ptr<Renderable> root_renderable() const {
const auto topology = this->topology_snapshot();
@@ -236,12 +236,10 @@ public:
attach_renderable_node(renderable, parent);
return renderable;
}
::Scene_Base::Mutation remove_renderable(
const std::shared_ptr<Renderable>& renderable,
::Scene_Base::Mutation_Callback callback = {}) {
::Scene_Base::Mutation remove_renderable(const std::shared_ptr<Renderable>& renderable) {
if (!renderable || renderable == root_renderable())
return {};
return this->detach_renderable(renderable, std::move(callback));
return this->detach_renderable(renderable);
}
void set_background_color(Color color) {
if (background_color() == color)