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

Star shape throws a TypeError with links preset #110

Open
kodie opened this issue Jan 16, 2025 · 1 comment
Open

Star shape throws a TypeError with links preset #110

kodie opened this issue Jan 16, 2025 · 1 comment

Comments

@kodie
Copy link

kodie commented Jan 16, 2025

I have tsParticles working fine with the "links" preset, but when I add the star shape as per the instructions, it throws an error and nothing works.

Error:

tsparticles.shape.star.min.js?ver=3.7.1:2 Uncaught (in promise) TypeError: (0 , a.assertValidVersion) is not a function
    at c (tsparticles.shape.star.min.js?ver=3.7.1:2:1371)
    at scripts.js?ver=1737032405:19:7

Config:

{
    id: 'home-hero-background',
    options: {
      fullScreen: false,
      interactivity: {
        detectsOn: 'window'
      },
      particles: {
        color: '#ffffff',
        links: {
          color: '#b5e2fc'
        },
        shape: {
          type: 'star'
        },
        size: {
          value: 20,
        },
      },
      preset: 'links'
    }
}
@kodie
Copy link
Author

kodie commented Jan 16, 2025

I was able to get this working by just ditching the links preset and opting to load tsParticles' "slim" bundle which includes the star shape and using the links preset options in my own config: https://github.com/tsparticles/presets/blob/main/presets/links/src/options.ts

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

1 participant