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

Migrate from single size value to two dimensional values #5211

Closed
wants to merge 7 commits into from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 18, 2023

Description

This PR migrates the tsParticles library from using a single size value for particles to using two dimensional values (width and height). This allows for the creation of irregular shapes like rectangles and ellipses instead of just squares and circles. The changes are made in the Particle class, ParticlesOptions class, collision formulas, and shape drawing methods.

Summary of Changes

  • Updated the Particle class to include width and height properties instead of a single size property.
  • Updated the ParticlesOptions class to include width and height options instead of a single size option.
  • Updated the collision formulas in the QuadTree class to work with the new width and height properties of particles.
  • Updated the shape drawing methods in the Canvas class to draw shapes using the new width and height properties of particles.

Please review and merge this PR into the dev branch.

Fixes #2261.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 18, 2023
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 18, 2023

GitHub actions yielded the following error.

The command that failed is tsparticles-engine@2.12.0 build:ci /home/runner/work/tsparticles/tsparticles/engine. Here are the relevant lines from the logs:

Prettier - started on src
Error: /home/runner/work/tsparticles/tsparticles/engine/src/Core/Canvas.ts is not formatted correctly
at prettifySrc (/home/runner/work/tsparticles/tsparticles/node_modules/.pnpm/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/@tsparticles/cli/dist/build/build-prettier.js:32:27)
at async Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/.pnpm/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/@tsparticles/cli/dist/build/build.js:41:23)
Prettier - done on src
/home/runner/work/tsparticles/tsparticles/node_modules/.pnpm/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/@tsparticles/cli/dist/build/build.js:59
throw new Error("Build failed");
^

Error: Build failed
at Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/.pnpm/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/@tsparticles/cli/dist/build/build.js:59:15)

Please note that some parts of the logs have been truncated for brevity.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 18, 2023

GitHub actions yielded the following error.

The command that failed is tsparticles-engine@2.12.0 build:ci /home/runner/work/tsparticles/tsparticles/engine. Here are the relevant lines from the logs:

Prettier - started on src
Error: /home/runner/work/tsparticles/tsparticles/engine/src/Core/Canvas.ts is not formatted correctly
at prettifySrc (/home/runner/work/tsparticles/tsparticles/node_modules/�[4m.pnpm�[24m/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/�[4m@tsparticles�[24m/cli/dist/build/build-prettier.js:32:27)
at async Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/�[4m.pnpm�[24m/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/�[4m@tsparticles�[24m/cli/dist/build/build.js:41:23)
Prettier - done on src
/home/runner/work/tsparticles/tsparticles/node_modules/.pnpm/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/@tsparticles/cli/dist/build/build.js:59
throw new Error("Build failed");
^

Error: Build failed
at Command.<anonymous> (/home/runner/work/tsparticles/tsparticles/node_modules/�[4m.pnpm�[24m/@tsparticles+cli@1.13.0_webpack-cli@5.1.4/node_modules/�[4m@tsparticles�[24m/cli/dist/build/build.js:59:15)

Please note that some parts of the logs have been truncated for brevity.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@matteobruni matteobruni deleted the sweep/migrate-to-two-dimensional-values branch December 26, 2023 12:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate from single size value to two dimensional values
1 participant