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

upgradeConfig not working #215

Open
phamtrantriem opened this issue May 27, 2024 · 1 comment
Open

upgradeConfig not working #215

phamtrantriem opened this issue May 27, 2024 · 1 comment

Comments

@phamtrantriem
Copy link

phamtrantriem commented May 27, 2024

I tried to use Particle-Emitter for Pixi v8, but I can't use upgradeConfig function, the code bellow:
const emitter = new PIXI.particles.Emitter(app.stage, PIXI.particles.EmitterConfig.upgradeConfig(particleConfig, [texture]));
I got an error Cannot read properties of undefined (reading 'upgradeConfig')

when i directly use JSON export from the editor, i get this message
Cannot read properties of undefined (reading 'map')
{
"alpha": {
"start": 1,
"end": 0
},
"scale": {
"start": 0.1,
"end": 0.01,
"minimumScaleMultiplier": 1
},
"color": {
"start": "#e4f9ff",
"end": "#3fcbff"
},
"speed": {
"start": 200,
"end": 50,
"minimumSpeedMultiplier": 1
},
"acceleration": {
"x": 0,
"y": 0
},
"maxSpeed": 0,
"startRotation": {
"min": 0,
"max": 360
},
"noRotation": false,
"rotationSpeed": {
"min": 0,
"max": 0
},
"lifetime": {
"min": 0.2,
"max": 0.8
},
"blendMode": "normal",
"frequency": 0.001,
"emitterLifetime": -1,
"maxParticles": 500,
"pos": {
"x": 0,
"y": 0
},
"addAtBack": false,
"spawnType": "circle",
"spawnCircle": {
"x": 0,
"y": 0,
"r": 0
}
}

@phamtrantriem phamtrantriem changed the title upgradeConfig upgradeConfig not working May 27, 2024
@andrewstart
Copy link
Collaborator

EmitterConfig is not a class/namespace, PIXI.particles.upgradeConfig() should be the method you call.

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

2 participants