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

Generated config not compatible with EmitterConfigV3 #21

Open
goldenratio opened this issue Feb 15, 2022 · 2 comments
Open

Generated config not compatible with EmitterConfigV3 #21

goldenratio opened this issue Feb 15, 2022 · 2 comments

Comments

@goldenratio
Copy link

Hi,
any plans on adding feature to export config as v3 from editor?

@andrewstart
Copy link
Collaborator

In theory, yes, but on top of new features that need to be supported, the editor is very old and needs to be rewritten in order to be properly maintainable. I just have not had the time to do so. That's why I made sure that the runtime can ingest older configs for use in the latest version of the library.

@schellenbergk
Copy link

schellenbergk commented Apr 17, 2023

The workaround is to convert your config to v3...

import {
  upgradeConfig,
  Emitter,
  EmitterConfigV1,
  EmitterConfigV3
} from '@pixi/particle-emitter'
......
    const { default: config } = await import(
      `../configs/particle-effect.json`
    )
    const cfgV1: EmitterConfigV1 = config
    const cfgV3: EmitterConfigV3 = upgradeConfig(cfgV1, texture)

    this.emitter = new Emitter(container, cfgV3)

This seems to work perfectly.

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