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

RectangleSprite objects create a Square image as default. #691

Closed
pathunstrom opened this issue Jan 30, 2024 · 1 comment · Fixed by #700
Closed

RectangleSprite objects create a Square image as default. #691

pathunstrom opened this issue Jan 30, 2024 · 1 comment · Fixed by #700

Comments

@pathunstrom
Copy link
Collaborator

Probably need to special case our default asset creation to create an appropriately shaped rectangle instead of a square.

Sample code:

import ppb


class Platform(ppb.RectangleSprite):
    pass


def setup(scene):
    scene.add(Platform(width=3, height=1, position=ppb.Vector(0, -5)))

We end up with a square of size 3 instead of a rectangle with a 3:1 aspect ratio.

image

What it should look like:

image

Noting, this currently gets set in the asset (https://github.com/ppb/pursuedpybear/blob/canon/ppb/systems/renderer.py#L93-L107) and would require some refactoring to make it possible to contextually choose the asset definition.

@davidism
Copy link
Contributor

davidism commented Apr 8, 2024

I'm working on this at the PyCascades 2024 sprint!

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

Successfully merging a pull request may close this issue.

2 participants