-
Notifications
You must be signed in to change notification settings - Fork 356
Prototype: Scary Vec2s and Nice Sprites #2219
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
base: development
Are you sure you want to change the base?
Conversation
|
Right, I need to figure out the zipballs since it's dependent on pyglet/pyglet#1154 |
|
Zipball's fixed, but the other pyright issues belong in #2183. |
7aeacbd to
1a5886c
Compare
|
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
|
Maybe set this PR to draft for now? |
|
@einarf @Cleptomania Given the pyglet 3.0 work, should I close this or leave it here as a reminder to look into the vectors? |
|
We can just leave it here for now |
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