Prototype: Scary Vec2s and Nice Sprites#2219
Draft
pushfoo wants to merge 29 commits intodevelopmentfrom
Draft
Conversation
Member
Author
|
Right, I need to figure out the zipballs since it's dependent on pyglet/pyglet#1154 |
Member
Author
|
Zipball's fixed, but the other pyright issues belong in #2183. |
DragonMoffon
reviewed
Jul 7, 2024
7aeacbd to
1a5886c
Compare
Member
Author
|
I've dropped the zipball commits during rebase onto |
b13ab0f to
d58a2bd
Compare
* Keep unpack at top and old-style check * Defer Vec2 creation until know it's different
d58a2bd to
e168e82
Compare
Collaborator
|
Maybe set this PR to draft for now? |
Member
Author
|
@einarf @Cleptomania Given the pyglet 3.0 work, should I close this or leave it here as a reminder to look into the vectors? |
Member
|
We can just leave it here for now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR: Proof we can
Vec2all*Spritewithout destroying the universe![ Obligatory Skrillex Noises ]
Note
The remaining pyright issues belong in #2183
How to try it
In your Arcade clone
git checkout upstream/scary-vecs-and-nice-spritesor however you have your remotes instealledpip install -I -e .[dev]In your Project
For the latest unstable version:
arcade@git+https://github.com/pythonarcade/arcade/arcade.git@scary-vecs-and-nice-sprites#egg=arcadeYou can also pin specific commits using a zipball link, but that's more convoluted.
Changes
BasicSpriteand subclasses, the following are nowVec2:.sizeis now aVec2backed by._size.positionis now aVec2.scaleis now aVec2_widthand_heightare now compatibility properties for any subclasses we missedWhat's not changed
Anything outside the sprites really. Seriously. There's a sound tweak to get it to pass and run, but otherwise, not even tests.
Current Code Quality
Already done:
Sprites pass:
pytest tests/unitpyright./make./py format+ruff check arcadeOtherwise, no guarantees:

Follow-up Work