Skip to content
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

Pixel - Enhancement Wishlist #94

Open
dusk125 opened this issue Aug 14, 2024 · 3 comments
Open

Pixel - Enhancement Wishlist #94

dusk125 opened this issue Aug 14, 2024 · 3 comments
Milestone

Comments

@dusk125
Copy link
Contributor

dusk125 commented Aug 14, 2024

All of the following is up for discussion.

Reworks

  • Colors Color refactor #93
  • Abstract the backend away (pixel.Window interface)
    • A user can still drop into the backend if they need/want (pixelui), but for normal operations they don't
    • opengl.Run should be replaced with pixel.Run
  • Lighten Sprite
  • Cleanup the mess that is interface.go; these interfaces should make sense/be understandable
  • Change things like pixel.R to be generic so the user doesn't have to be cast happy
    ex)
func R[U,V,W,X constraints.Float|constraints.Integer](minX U, minY V, maxX W, maxY X) Rect {
    return Rect{
        Min: Vec[U, V]{minX, minY},
        Max: Vec[W, X]{maxX, maxY},
    }
}
func V[U, V constraints.Float|constraints.Integer](x U, y V) Vec {
    return Vec{float64(x), float64(y)}
}
  • Use standard library pieces where possible (image.Image (image.RGBA) instead of pixel.PictureData
  • Try to limit heap allocations (hard due to the use of interfaces)
  • Rework batching to be more predictable
  • Add an option for flipping the y-axis Should the origin (x=0, y=0) remain in lower-left hand corner? #8
    • I think something funky is going on here with the model-view-projection matrices, I've done opengl stuff and haven't had to flip images when displaying them like Pixel does.
  • WASM support / validation

Features

@dusk125 dusk125 added this to the v3 milestone Aug 14, 2024
@duysqubix duysqubix changed the title v3 Wishlist Pixel - Enhancement Wishlist Aug 16, 2024
@duysqubix
Copy link
Contributor

Are these a collection of thoughts an ideas for enhancements or are they all related?

@dusk125
Copy link
Contributor Author

dusk125 commented Aug 16, 2024

Collection of thoughts, originally meant for v3, but some/most of them will likely be able to be done with the need for a major release.
Could think of this as an Epic if you want :D

@bhperry
Copy link
Contributor

bhperry commented Aug 30, 2024

Make Anchor more intuitive

The current rationale is that pixel.BottomLeft will anchor text/whatever such that it appears to the bottom-left of the anchor. Or in other words... it is anchored to the top right.
image

The original design from the PR that introduced anchoring was the opposite, but they switched it before the final merge. This seems far more intuitive to me though. The anchor should describe the point at which the text is anchored, not the direction in which the text will flow.
image

Original PR faiface/pixel#252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants