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

Bug: [v8] Missing information on Migration guide for v8 or in the Blog post of v8 #10299

Open
danielbarion opened this issue Mar 8, 2024 · 4 comments
Assignees

Comments

@danielbarion
Copy link

danielbarion commented Mar 8, 2024

Migration v7 -> v8

Things that are not documented or missing some specific mention on docs: https://pixijs.com/guides/migrations/v8 and https://pixijs.com/blog/pixi-v8-launches

Breaking Changes

Bounds

image

 const slotBounds = slot.getBounds()

                  if (!slotBounds.contains(position.x, position.y)) {

Bounds.contains(...) -> Bounds.rectangle.contains(...)

 const slotBounds = slot.getBounds()

                  if (!slotBounds.rectangle.contains(position.x, position.y)) {

Container

image

Container doesn't accept another type inside of it on v8.0.0.

Container<ICharacterLifeInstance>-> Container

Extending Application class

image

class Game extends Application<Renderer<HTMLCanvasElement>> {

The new types are mentioned here:

image

But it's not clear to me which I should use, I mean, if I define it as WebGLRenderer type, Pixi.js will be locked on this renderer and will never try WebGPURenderer automatically. Should I put Renderer to let Pixi.js choose which one is available on the current browser? - I know it's just the types, but this is not clear to me on v8 migration guide.

image

Looks like super with params is now deprecated, but there's no direct mention of it when extending the Application class on the migration guide.

CompositeTilemap

image

CompositeTilemap no longer accepts name.

  tilemap.name = 'ground'

image

Can't add CompositeTilemap into a Container (TS error).


When I find more, I'll update this readme and ping as a comment so whoever is checking this issue gets notified.
are.

Environment

  • pixi.js version: 8.0.0
  • Browser & Version: * 122.0.6261.94*
  • OS & Version: MacOS Ventura 13.2.1
@danielbarion danielbarion changed the title Bug: [v8] Bug: [v8] Missing information on Migration guide for v8 or in the Blog post of v8 Mar 8, 2024
@theusaf
Copy link

theusaf commented Mar 8, 2024

Additional Items:

  • No mention on migrating from ParticleContainer

@Zyie Zyie self-assigned this Mar 11, 2024
@Zyie
Copy link
Member

Zyie commented Mar 11, 2024

Hey @danielbarion what is CompositeTilemap?
Its not part of regular pixi

@danielbarion
Copy link
Author

Hey @Zyie, you're right, I just realized it now, it's this package: https://www.npmjs.com/package/@pixi/tilemap

import { CompositeTilemap } from '@pixi/tilemap'

@danielbarion
Copy link
Author

@Zyie the build is running without errors now and also the docs are a lot clearer now about the V8, big thanks to you and the team!

One last thing before closing this issue:

image

the label exists because the target and current target is a Container instance, but the type needs to be updated on it.

Please feel free to close this issue when you want, everything from the main message is good to go

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

No branches or pull requests

3 participants