Skip to content

Consider a more practical showcase for 2d_on_ui example #19472

Open
@rparrett

Description

@rparrett

Alice mentioned a desire for a potential followup here: https://bsky.app/profile/alice-i-cecile.bsky.social/post/3lqnthgrcee2t so here's an issue with my thoughts.

For reference, the example PR: #18513.

Problem

The example currently shows a sprite rotating in ways that would be hard to achieve using pure UI, so it's demonstrating something potentially useful, but it's not clear to me at least what the practical applications might be.

The linked discussion listed as motivation for the PR proposes the following question:

I want to draw a texture, a 3D mesh, a minimap… anything! on top of the bevy UI. How do I do this?

But the answer to most of that in recent/upcoming versions of Bevy is pretty likely to involve ImageNode, ViewportNode, or UiMaterial.

Solution?

Ideally, we should find a compelling reason to draw on top of UI and rework the example slightly to show that.

We may also want to cross-reference other related examples.

Also

I think we should consider moving the example to the ui subfolder. The example is showing 2d stuff on UI, but the concept isn't really 2d-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-UIGraphical user interfaces, styles, layouts, and widgetsC-ExamplesAn addition or correction to our examplesD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions