We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug speed is still 0 when use ParticleCurveMode as Curve.
WebGLEngine.create({ canvas: "canvas", graphicDeviceOptions: { webGLMode: WebGLMode.WebGL1 }, }).then((engine) => { Logger.enable(); engine.canvas.resizeByClientSize(); const scene = engine.sceneManager.activeScene; const rootEntity = scene.createRootEntity(); scene.background.solidColor = new Color(15 / 255, 38 / 255, 18 / 255, 1); // Create camera const cameraEntity = rootEntity.createChild("camera_entity"); cameraEntity.transform.position = new Vector3(0, 1, 3); const camera = cameraEntity.addComponent(Camera); camera.fieldOfView = 60; const particleEntity = cameraEntity.createChild(); particleEntity.transform.position.set(0, -7.5, -8); const particleRenderer = particleEntity.addComponent(ParticleRenderer); const material = new ParticleMaterial(engine); particleRenderer.setMaterial(material); const { main, emission, velocityOverLifetime } = particleRenderer.generator; // Main module main.startSpeed.constant = 0; // Emission module emission.rateOverTime.constant = 5; // Velocity over lifetime module velocityOverLifetime.enabled = true; // velocityOverLifetime.velocityY.mode = ParticleCurveMode.Constant; // velocityOverLifetime.velocityY.constant = 1; velocityOverLifetime.velocityY.curve = new ParticleCurve(); velocityOverLifetime.velocityY.curve.setKeys([ new CurveKey(0, 1), new CurveKey(1, 1), ]); velocityOverLifetime.velocityY.mode = ParticleCurveMode.Curve; }); engine.run();
Expected behavior
velocityOverLifetime.velocityY.mode = ParticleCurveMode.Constant; velocityOverLifetime.velocityY.constant = 1;
velocityOverLifetime.velocityY.curve = new ParticleCurve(); velocityOverLifetime.velocityY.curve.setKeys([ new CurveKey(0, 1), new CurveKey(1, 1), ]); velocityOverLifetime.velocityY.mode = ParticleCurveMode.Curve; });
should has almost same performance
The text was updated successfully, but these errors were encountered:
JujieX
No branches or pull requests
Describe the bug
speed is still 0 when use ParticleCurveMode as Curve.
Expected behavior
should has almost same performance
The text was updated successfully, but these errors were encountered: